Skip to content

Resize DOM elements in real-time for a seamless smartphone experience.

License

Notifications You must be signed in to change notification settings

ys319/squashify.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

squashify.js

Resize DOM elements in real-time for a seamless smartphone experience.

Usage

// Retrieve the root element directly below the body.
const root = document.getElementById("root")!
// Create a squasher with the desired dimensions of 1280x720.
const squasher = Squashify(root, [1280, 720])
// Squash the content every frame.
const update = () => {
    squasher()
    requestAnimationFrame(update)
}
update()

About

Resize DOM elements in real-time for a seamless smartphone experience.

Resources

License

Stars

Watchers

Forks

Packages