webvr

How to create a custom square in a-frame

喜夏-厌秋 提交于 2021-02-05 11:13:26
问题 How can I create a custom square registering a new component in a-frame? I am trying to update the example found here https://github.com/aframevr/aframe/blob/master/docs/components/geometry.md under the heading "Register a Custom Geometry" Below is what I have tried - first the js AFRAME.registerGeometry('example', { schema: { vertices: { default: ['-10 10 0', '-10 -10 0', '10 -10 0', '10 -10 0'], //added a 4th set of dimensions here } }, init: function (data) { var geometry = new THREE

How to create a custom square in a-frame

白昼怎懂夜的黑 提交于 2021-02-05 11:13:17
问题 How can I create a custom square registering a new component in a-frame? I am trying to update the example found here https://github.com/aframevr/aframe/blob/master/docs/components/geometry.md under the heading "Register a Custom Geometry" Below is what I have tried - first the js AFRAME.registerGeometry('example', { schema: { vertices: { default: ['-10 10 0', '-10 -10 0', '10 -10 0', '10 -10 0'], //added a 4th set of dimensions here } }, init: function (data) { var geometry = new THREE

component to play multiple audio files at the same time (on click) Aframe webVR

血红的双手。 提交于 2021-01-05 11:25:16
问题 I am trying to find a way to reproduce the effect of having all my sound files in my A-frame vr project autoplay once the scene loads, but with an on-window-click function so that they are able to work on browsers that do not allow autoplay / require user interaction i'm sure the solution is pretty simple but I have tried for quite a few hours and can't seem to find a solution online including stack anywhere. when I try to follow tutorials such as this, I can't get them to work: Play sound on

作为Web开发者,你愿给Firefox一次机会吗?

核能气质少年 提交于 2020-12-23 14:28:00
作为Web开发者,你愿给Firefox一次机会吗? 作者|Ibrahim Nergiz译者|大愚若智编辑|覃云本文从开发者角度介绍了 Mozilla 全新发布的 Firefox Quantum 浏览器在诸多方面的改进和增强,尤其是在 Web 开发者工具方面新增的功能。 友情提示:原文的图片大多都是动图,但由于微信对图片大小的限制,以及动图压缩后变成高糊,为了保证阅读质量,小编将动图换成了png图,想获取原图的读者可点击文末 原英文链接 。 作为“晚期”八零后的我,对 Firefox 的崛起和衰落至今依然感觉历历在目。 Firefox 最初作为开源项目,以 Internet Explorer 6 竞争对手的姿态诞生。当时这是个很棒的项目,因为它为用户提供了更多选择,例如,用户可以通过各种扩展获得新的功能,还可以更改浏览器的视觉主题等,每个人都爱过它。 然而几年后另一个重量级选手登场了。这个选手名叫 Chrome,Chrome 发布后迅速攻城掠地,很快超越了所有对手。实际上,Chrome 在极短的时间里获得了如此众多的用户,成为 Google 有史以来最有价值的 资产,相信很多人现在就是使用 Chrome 阅读本文的。 不过我们还是先简单回顾一下吧。作为开发者,我完全明白用户有多难取悦。 随着各种越来越复杂的 Web 技术,以及常规应用程序和软件逐渐涌现,内存和 CPU

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