I had limited time today, but still one demo per day! So I tweaked the #animation and colors of an old demo.
It uses only the CSS 3D rendering that LUME had at the time (back when it was called Infamous, and before it had any #WebGL features).
LUME's WebGL rendering abilities allow regular HTML content (div tags, span tags, etc) to be mixed with 3D content in the same 3D rendering space. Check out my previous posts for examples, and stay tuned for one new demo every day all 2021!
This is a web component system that allows you to create new, fast, and
performant HTML elements in a simple way. It provides the foundation for
LUME's…
JavaScript tweening engine for easy animations, incorporating optimised Robert Penner's equations.
Update Note In v18 the script you should include has moved from src/Tween.js to dist/tween.umd.js. See the installation section below.
constbox=document.createElement('div')box.style.setProperty('background-color','#008800')box.style.setProperty('width','100px')box.style.setProperty('height','100px')document.body.appendChild(box)// Setup the animation loop.functionanimate(time){requestAnimationFrame(animate)TWEEN.update(time)}requestAnimationFrame(animate)constcoords={x: 0,y: 0}// Start at (0, 0)consttween=newTWEEN.Tween(coords)// Create a new tween that modifies 'coords'..to({x: 300,y