aframe

In a-frame how can I stop all sounds when a new sound starts playing?

那年仲夏 提交于 2020-01-05 04:57:14
问题 When I play click on the a-entity it plays the sound, but how can I get it to stop all other sounds when played, so it is not a loud muddled mess of a thing? I've googled the problem and tried adding the codes they use, but they haven't been working, I've tried about 5 different ones. I am running my sound like this: <audio id="mercury-sound" src="mercury.mp3" preload="auto"></audio> <script id="mercury" type="text/html"> <a-entity class="mercury" geometry="primitive: sphere; radius: 0.67"

Aframe unregister component

时光毁灭记忆、已成空白 提交于 2020-01-04 14:18:21
问题 I am using learning about how to aframe with react and redux. I am creating custom components and registering them in my reactjs componentWillMount lifecycle event. For example: I am sending the result of my raycasting to the parent react component to be saved off for other purposes. This works great. import React, {Component, PropTypes} from 'react' export default class AframeComponent extends Component { static propTypes = { cb: PropTypes.func.isRequired } componentWillMount () { const

Can I embed Google Street View into AFrame?

心不动则不痛 提交于 2020-01-04 05:43:20
问题 I'd like to recreate the Geoguesser street view game in VR. Although I understand the game is more complex than simply viewing Google Street View, I want to understand whether any work on the matter exists now. Even simply embedding Google Street View in VR would be helpful, even if it's not a solution in AFrame. Has anyone tried this before? Or can anyone speak to embedding Google Street View in VR? 回答1: It looks like you need to get the Street View panorama image in its full equirectangular

How to render YouTube videos as a texture in A-Frame?

℡╲_俬逩灬. 提交于 2020-01-03 08:37:26
问题 I want to take a YouTube url, and put it into an A-Frame scene as a video texture. Like <a-video src="https://www.youtube.com/watch?v=dQw4w9WgXcQ"> . Is this possible for https://aframe.io? 回答1: With some manual effort, you could either: Proxy YouTube videos as a texture like https://github.com/cvan/webvr360 / https://www.dropbox.com/s/298brayuh24et13/webvr360.mp4?dl=0 Download them locally to serve with a service. Note that these are probably against their terms of service. 来源: https:/

A-Frame: How do you add multiple meshes to an entity with setObject3D?

浪子不回头ぞ 提交于 2020-01-03 03:03:07
问题 With A-Frames tags, one can add multiple components as children to an entity: <a-scene> <a-entity> <a-box>...</a-box> <a-box>...</a-box> </a-entity> <a-scene> How would you duplicate this in a registered component with the setObject3D method? CodePen: https://codepen.io/ubermario/pen/wrwjVG 回答1: Yup, you can name the object3D however you want. The mesh word is just sort of commonly accepted for meshes and used by geometry/material components. To clarify: setObject3D('mesh') setObject3D(

How to mange memory used by A-Frame?

若如初见. 提交于 2020-01-01 19:18:11
问题 I'm building a web app which has 360 degree images loaded into an a-sky primitive. I'm using aframe-react . There are total of 20+ 360 degree images and only one img asset inside a-assets . once user switches scene react will change src of asset img and scene will re render. Everything works fine but it's using lot of memory because of caching. One time it used 4GB+ memory. In mobile the web page crashes after switching through ~8+ images. How do I handle this situation? I tried looking into

aframe gyroscope issue on some android devices

廉价感情. 提交于 2019-12-31 06:21:30
问题 I have been using Aframe for a while now making small apps on it. I have a Nubia N1 android 6.0 version which stopped orienting it horizontally but for vertical still works and there is less lag now. Other devices that are generating this issue are: It happens with some of the phones like: Honor 6x (Android version 7.0) Moto m droid 6.0 Devices that are fine: Oppo A57 (droid 6.0.1) One plus 5 I have been using aframe version 0.7.0..... I have slightly modified it, here is the link: https://s3

aframe gyroscope issue on some android devices

元气小坏坏 提交于 2019-12-31 06:21:26
问题 I have been using Aframe for a while now making small apps on it. I have a Nubia N1 android 6.0 version which stopped orienting it horizontally but for vertical still works and there is less lag now. Other devices that are generating this issue are: It happens with some of the phones like: Honor 6x (Android version 7.0) Moto m droid 6.0 Devices that are fine: Oppo A57 (droid 6.0.1) One plus 5 I have been using aframe version 0.7.0..... I have slightly modified it, here is the link: https://s3

A-Frame .obj model displaying but broken

痞子三分冷 提交于 2019-12-31 05:36:16
问题 Total beginner to a-frame here, have been through the tutorial scenes and am now setting up my first using .obj models. Using a remote server, feel like that's important information. I've seen questions about models not showing up but mine is displaying broken and I'm not sure where to start fixing it. This is how it looks in windows 3D builder: And this is how it looks in my project (backed on pink plane for contrast): Here's the html: <!DOCTYPE html> <html> <head> <meta charset="utf-8">

Why is my video or videosphere not playing on mobile in A-Frame VR?

早过忘川 提交于 2019-12-29 07:14:34
问题 I have an A-Frame scene with a video or videosphere: <a-scene> <a-assets> <video id="video" src="anothervideo.mp4></video> </a-assets> <a-video src="myvideo.mp4></a-video> <a-videosphere src="#video></a-videosphere> </a-scene> When I test in iOS or Android, I just see a black screen. It works on desktop. 回答1: Speaking of leveraging Enter VR button, try: <a-scene> <a-assets> <video id="video" src="anothervideo.mp4"></video> </a-assets> <a-video class="video" src="myvideo.mp4"></a-video> <a