Skip to content

Latest commit

 

History

History
17 lines (9 loc) · 581 Bytes

README.md

File metadata and controls

17 lines (9 loc) · 581 Bytes

Friction DOM

Treat DOM elements like objects sliding around on the page.

This is currently considered experimental.

The API

Everything is either a Surface or a SurfaceObject. A Surface can contain contain many SurfaceObjects and a SurfaceObject must belong to a Surface.

Surface

This is what defines the boundaries of motions for SurfaceObjects. This can be a DOM node, the window, or manually specified bounds.

SurfaceObject

These are the objects that do the moving. They move within the bounds of the SurfaceObject that they belong to.