| janus-script-$tween.js | register tweak | |
| README.md | 📃 main: update documentation | |
a plugin for JJQ: tiny (recursive) tween function for Janus objects with auto-garbage collection
- animate multiple properties
- with multiples speed
- for a janus object
- and all its children too!
- with events!
- all in one call!
const speed = 0.05 // closer to zero == smoother/slower
logo.addEventListener("tween_done", alert )
logo.addEventListener("tween_prop_done", alert )
tween( logo, {"pos.y": [-0.1,speed], "pos.x": [-0.05,speed]})
room.update = this.tween.update // call tween.update() every frame
NOTE this is a plugin for JJQ
Background
What is janusXR? It's an open, user-operated immersive web layer, open-sourced by the JanusVR company, that seamlessly lives within websites, even 12 years later thanks to janusweb. It provides a highly viable and easy-to-adopt ecosystem of portals, enabling immersive experiences that challenge the traditional app store paradigm. Get started with this guide.
With 3D engines simply calling myobj.visible = false does not mean that all children automatically get hidden too.
it simply does not work like a 2D webbrowser (
document.querySelector("#container").style.display = 'none'e.g.)
The only assumption this tween-function makes, it that objects may or may not have a .children object.