Getting close to a target object, e.g. here latest added PDF, makes it grow for any avatar within a 5m radius
✓ Published0🌍 Public
UUtopiah
Last edited Mar 31, 2020
Created on Mar 31, 2020
In this Hubs scene, the most recently added PDF grows incrementally whenever any networked avatar comes within a 5-meter radius, making proximity visually tangible. The code uses Three.js object3D position and scale properties, querying all `[networked-avatar]` elements and the last `[media-pdf]` element from the AFRAME scene. A `setInterval` loop checks distances every 300 milliseconds, adding 0.1 to the PDF’s scale for each nearby avatar, while the animation is driven by the interval rather than a continuous render loop.
AI-generated description