aframe

Aframe splashscreen if videopsphere loads

↘锁芯ラ 提交于 2019-12-08 12:11:20
问题 Hiho Community, i try to show a splashscreen if my videosphere loads. I use this code -> set a loading animation with a-frame for loading a splash before the scene and it works perfect, but i need to let my videos have the attribute preload so if i start them they need some time to load too and there should the splashscreen pops up again. Some ideas (maybe a second listener which says: show splashscreen if video loading)?. HTML: <body> <div id="splash"> <div class="loading"></div> </div> <a

When do I need to call removeEventListener in my components?

你。 提交于 2019-12-08 12:03:56
问题 The documentation mentions that I could use the remove function of the components to remove eventlisteners I have added. Do I need to this at all times? Or are events removed when the entity is removed? I understand that I need to remove events I have added on other entities. But if the component adds a click event to its entity. Will that click event be removed when the entity is removed? Or can this cause a memory leak? Cheers Peter 回答1: Three cases to consider here: If a DOM element (like

How to fit a-plane to the a-canvas

这一生的挚爱 提交于 2019-12-08 11:33:36
问题 I'm trying to fit a <a-plane> to the a-frame canvas. I've managed to get the necessary params: scene = document.querySelector('a-scene'); width = scene.canvas.width; height = scene.canvas.height; I can't find a solid anwser regarding the correlation between pixels and meters, so i found a ratio of zPosition/590 which seems to work well on 720p and 1080p, but something is not linear, the distance between the window and the plane is different when the window is small, and when it's big. Tried

how separate the mouse click event and the courser click event in Aframe

自作多情 提交于 2019-12-08 07:51:24
问题 I'm creating a VR Editor using AFRAME... I need to create an event when the user clicks on an element by mouse and to do deferent action when clicking by Aframe camera cursor. I found the <a-scene cursor="rayOrigin: mouse"> but this would do the same click event on both mouse and cursor click. is that possible in AFRAME? 回答1: Discriminate by the cursor element: AFRAME.registerComponent('on-click', { init: function () { var self = this; this.el.addEventListener('click', function (evt) { if

Add gaze buttons to scene using A-frame

久未见 提交于 2019-12-08 07:34:15
问题 Is there a way to add gaze buttons in aframe? Note also for a better experience there must be an little progress bar to know how long the user must look to it. I've looked inside the inspector tools but nothing found that works. In this YouTube tutorial, I've found how to add click controls. Is it the same way I could make gaze events? 回答1: You can select an item by gazing at it using the fuse property of the cursor component. Check the A-Frame docs here: https://aframe.io/docs/0.5.0

How to embed a HTML page in webvr

帅比萌擦擦* 提交于 2019-12-08 07:05:05
问题 I have gone through the link "http://learningthreejs.com/blog/2013/04/30/closing-the-gap-between-html-and-webgl/", But I need not to add the texture instead I need that to be interactive like a webpage. So that i can go and play the inner pages also. 回答1: From the A-Frame FAQ: There is no direct way for the browser to display HTML or iframes within WebGL. While it is possible to overlay HTML elements or iframes on top of the canvas, they will not display in VR nor can it integrate with the

Argon.js: Error: A frame state has not yet been received

泄露秘密 提交于 2019-12-08 06:09:18
问题 I am attempting to use argon.js server side so that I can convert lla coordinates to a predefined reference frame. I'm not rendering any graphics of course, I'm just using it to convert values. See SO question Using Geo-coordintes Instead of Cartesian to Draw in Argon and A-Frame for details. Per that thread, I am trying to create a cesium entity for a fixed coordinate which I will later use to create other entities relative to it. When I do, everything runs until I get to the last line of

VideoSphere not playing video in A-Frame, even after following other guidance

梦想与她 提交于 2019-12-08 05:23:10
问题 I'm working on an A-Frame VR project and having issues getting video playback on the a-videophere element. The guidelines I've followed: - Place playsinline or webkit-playsinline inside of video asset and include meta tag in head. - Load video source during window load, then use a button to start the playback. - I'm aware of the autoplay issues for video playing in mobile. I've looked around all over stack overflow to find solutions, the latest one I tried is here, so please don't flag me for

Mapping shapes from a flat equirectangular panorama to planes within A-Frame

て烟熏妆下的殇ゞ 提交于 2019-12-08 03:28:12
问题 I'm trying to build a hotspot editor for 360 images within A-Frame. The idea is that you could draw on an equirectangular panorama and then this tool would convert the shapes into planes with THREE.ShapeGeometry. I can get X/Y coordinates for each shape's nodes from a JS vector editor and the planes rendered in A-Frame. However, I'm having problems getting them positioned correctly atop the skybox. I know I need to do some kind of equirectangular projection but am unsure how to approach that

Cannot assign to read only property 'detachedCallback' of object '#'

醉酒当歌 提交于 2019-12-08 01:54:58
问题 I installed A-Frame by npm install aframe --save. When I use: import 'aframe'; // or use: require 'aframe'; import { Component } from '@angular/core'; @Component({ selector: 'app', template: ` <a-scene></a-scene> ` }) export class AppComponent {} I got the error: zone.js:1046Uncaught TypeError: Cannot assign to read only property 'detachedCallback' of object '#' I checked this Angular_VRDemo, but still did not figure out myself. 回答1: I guess it because aframe library doesn't implement some