diff --git a/src/hub.html b/src/hub.html index f4a4cf297459ca6fcea9fc05cb4e1a40b3736bad..6b469e1351330ac006b602b9f8481ecb58c402e4 100644 --- a/src/hub.html +++ b/src/hub.html @@ -170,7 +170,8 @@ class="interactable" super-networked-interactable="counter: #media-counter;" body="type: dynamic; shape: none; mass: 1;" - animation__spawn="property: scale; dur: 200; from: 0.5 0.5 0.5; to: 1 1 1; easing: easeInQuad" + scale="0.5 0.5 0.5" + animation__spawn="property: scale; delay: 50; dur: 200; from: 0.5 0.5 0.5; to: 1 1 1; easing: easeInQuad" grabbable stretchable="useWorldPosition: true; usePhysics: never" hoverable @@ -243,7 +244,8 @@ hoverable stretchable camera-tool - animation__spawn="property: scale; dur: 200; from: 0.5 0.5 0.5; to: 1 1 1; easing: easeInQuad" + animation__spawn="property: scale; delay: 50; dur: 200; from: 0.5 0.5 0.5; to: 1 1 1; easing: easeOutQuad" + scale="0.5 0.5 0.5" body="type: dynamic; shape: none; mass: 1;" shape="shape: box; halfExtents: 0.22 0.145 0.1; offset: 0 0.02 0" sticky-object="autoLockOnRelease: true; autoLockOnLoad: true; autoLockSpeedLimit: 0;" diff --git a/src/utils/media-utils.js b/src/utils/media-utils.js index 97d89f01f4fa4cee6e296e203fedbdb0389a2433..20bce73736f73f7275b5363cb8dec652767b4b3d 100644 --- a/src/utils/media-utils.js +++ b/src/utils/media-utils.js @@ -117,8 +117,11 @@ export const addMedia = (src, template, contentOrigin, resolve = false, resize = clearTimeout(fireLoadingTimeout); if (!entity.classList.contains("pen")) { + entity.object3D.scale.setScalar(0.5); + entity.setAttribute("animation__spawn-start", { property: "scale", + delay: 50, dur: 300, from: { x: 0.5, y: 0.5, z: 0.5 }, to: { x: 1.0, y: 1.0, z: 1.0 },