aframe

aframe-physics-extras: collision of dynamic entity with static gltf model

爷,独闯天下 提交于 2020-12-27 05:25:43
问题 I'm trying to catch collision event between a dynamic sphere and a static gltf model. I'm building the gltf entity the following way: const template = document.createElement('a-entity'); template.setAttribute('physics-collider', 'ignoreSleep: false'); template.setAttribute('collision-filter', 'collisionForces: false'); template.setAttribute('body', 'type:static; shape:hull'); // add position, scale, url etc // ... template.addEventListener('collisions', e => { // debugger; }) This code

Rewind an animation in A-Frame

谁说胖子不能爱 提交于 2020-12-07 15:12:52
问题 I have an a-video somewhere in my scene. When I click a + button next to it, it triggers an animation to scale it up. It also makes visible a - button in order to scale it back to its original size. I managed to make the upsizing part without too many issues, but can't find a way to reverse the animation, to make the a-video return to its original scale. Here is what I have so far (adapted for briefness): <a-video animation="property: scale; to: 20 20 20; dur: 200; dir: alternate; startEvents

Rewind an animation in A-Frame

爷,独闯天下 提交于 2020-12-07 15:11:47
问题 I have an a-video somewhere in my scene. When I click a + button next to it, it triggers an animation to scale it up. It also makes visible a - button in order to scale it back to its original size. I managed to make the upsizing part without too many issues, but can't find a way to reverse the animation, to make the a-video return to its original scale. Here is what I have so far (adapted for briefness): <a-video animation="property: scale; to: 20 20 20; dur: 200; dir: alternate; startEvents

Rewind an animation in A-Frame

帅比萌擦擦* 提交于 2020-12-07 15:09:21
问题 I have an a-video somewhere in my scene. When I click a + button next to it, it triggers an animation to scale it up. It also makes visible a - button in order to scale it back to its original size. I managed to make the upsizing part without too many issues, but can't find a way to reverse the animation, to make the a-video return to its original scale. Here is what I have so far (adapted for briefness): <a-video animation="property: scale; to: 20 20 20; dur: 200; dir: alternate; startEvents

How to load a gif (with transparency) on a plane in Aframe (glitch)?

情到浓时终转凉″ 提交于 2020-12-06 15:34:59
问题 Hey guys I'm new to Aframe and trying to set up a whole bunch of gifs in a spatial web environment. I'm getting a bit stuck in loading a gif on a plane. I've loaded the image through the assets folder of Aframe (glitch), currently it looks like this: <a-assets> <img id="dance" src="https://cdn.glitch.com/89b3ce36-3eac-4bb0-865c-585a7fe58409%2Fdance.gif?1556817051483.gif" > </a-assets> <a-plane src="#dance" position="5 3 -5" transparent="true" ></a-plane> Right now the gif shows up, but it is

How to load a gif (with transparency) on a plane in Aframe (glitch)?

空扰寡人 提交于 2020-12-06 15:31:39
问题 Hey guys I'm new to Aframe and trying to set up a whole bunch of gifs in a spatial web environment. I'm getting a bit stuck in loading a gif on a plane. I've loaded the image through the assets folder of Aframe (glitch), currently it looks like this: <a-assets> <img id="dance" src="https://cdn.glitch.com/89b3ce36-3eac-4bb0-865c-585a7fe58409%2Fdance.gif?1556817051483.gif" > </a-assets> <a-plane src="#dance" position="5 3 -5" transparent="true" ></a-plane> Right now the gif shows up, but it is