aframe

AFrame Oculus Go Controller Documentation?

六月ゝ 毕业季﹏ 提交于 2019-12-23 12:47:17
问题 Does anyone know where I can get some decent AFrame Oculus Go Controller Documentation? I need to make a camera controller that moves like a WASD with the Oculus Go Controller. Right now on aframe.io there is no documentation on Oculus Go. 回答1: The Oculus Go controls are available in the master branch (you can use it today at https://rawgit.com/aframevr/aframe/master/dist/aframe-master.js) and will ship in A-Frame 0.9.0. Docs available here: https://github.com/aframevr/aframe/blob/master/docs

How to enable anti-aliasing in A-Frame?

家住魔仙堡 提交于 2019-12-23 12:35:19
问题 Anti-aliasing smooths jagged edges on curved lines and diagonals. How can I enable anti-aliasing on A-Frame? 回答1: You can do: <a-scene antialias="true"> Note that this does have a performance cost on higher resolution screens, but it is not determined whether that cost is a bottleneck. 回答2: I think the previous answer is outdated. It is like this now. <a-scene renderer="antialias: true"> ... </a-scene> Docs 来源: https://stackoverflow.com/questions/39476791/how-to-enable-anti-aliasing-in-a

How to find the coordinates of a raycaster intersection point on an object in a-frame?

寵の児 提交于 2019-12-23 10:09:30
问题 I have an entity with the geometry set as plane primitive. How can I know the coordinates of the point on which I clicked (on the entity) using the raycaster/cursor component? The best would be to the know the coordinates in the system in which the vertices of the geometry were defined at the intersection point. 回答1: Check the click event detail for intersection data. el.addEventListener('click', function (evt) { console.log(evt.detail.intersection); }); This object will contain (https:/

(A-Frame) local gltf wont load; Cannot read property 'slice' of undefined

谁都会走 提交于 2019-12-23 07:52:08
问题 I took the code from the A-Frame School in which a gltf model is loaded. Then I loaded the Sample Models from Khronos, this box and tried to load it, but I get this error (several times) GLTFLoader.js:979 Uncaught (in promise) TypeError: Cannot read property 'slice' of undefined at GLTFLoader.js:979 at i (GLTFLoader.js:570) at GLTFLoader.js:975 at <anonymous> I can load .obj models and tried the several versions of the model, but get always the error. The sample code does work locally,

combining Aframe and d3.js: embed issue with different library source

流过昼夜 提交于 2019-12-23 05:27:59
问题 I am trying to reproduce the example that combines d3.js with a-frame objects one can find here. If I reproduce it like so, it works, but my aim is to have it working in my webpage, where I embed the a-scene in a div. But I cannot have it embedded. It renders in the back ground full size. the sources of the libraries in the example are: <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script> <script src="https://aframe.io/releases/latest/aframe.min.js"></script> In

How do you create an aframe button

不问归期 提交于 2019-12-23 05:23:27
问题 Does anyone know how to create a button in aframe 回答1: One way to create a button with A-Frame would be to use the <a-box> primitive combined with a cursor. The following is a simple demo: <a-scene> <a-entity position="0 .6 4"> <a-camera> <a-entity id="mycursor" cursor="fuse: true; fuseTimeout: 500; max-distance: 30;" position="0 0 -5" geometry="primitive: ring" material="color: blue; shader: flat"> </a-entity> </a-camera> </a-entity> <!-- "button" --> <a-entity id="refresh-button" geometry=

Update Collada (.dae ) file code from A-Frame or JS

久未见 提交于 2019-12-23 05:16:14
问题 I load collada (.dae) file in A-Frame. Its loaded fine. But now i have to update that file from user input like color, etc.. How to update the code inside the .dae file from html, js or A-Frame This is the Loaded A Frame code : <a-scene> <a-assets> <a-asset-item id="box" src="box.dae"></a-asset-item> </a-assets> <a-entity id="collada" collada-model="#box"></a-entity> <a-entity id="cmr" position="0 1 5" rotation="0 0 0"> <a-camera> <a-cursor color="#2E3A87" > </a-camera> </a-entity> </a-scene>

Reflect a user's position and rotation in runtime on a minimap in Aframe

梦想的初衷 提交于 2019-12-23 04:54:12
问题 I am trying to make a minimap for my vr scene and update the user's position and location in runtime. I already made the following: <script> AFRAME.registerComponent('cam-listener', { init: function(){ var canvas = document.querySelector("#myCanvas"); //line 124(log result in the image) console.log(canvas); var context = canvas.getContext("2d"); //line 126(log result in the image) console.log(context); function drawTriangle(x, y) { // the triangle context.beginPath(); context.moveTo(x, y);

Aframe how to reset default scale after loading the GLTF model

本秂侑毒 提交于 2019-12-23 02:21:18
问题 I am trying to make an app which adds models from google poly in GLTF format. I had the issue of some models being extremely large when added on the scene which I solved by computing their size with bounding box max and min values and setting the scale amount. Now after adding the objects to the scene when I open the inspector and drag to scale objects, even with a small amount of drag the objects becomes very large. If there is any way to reset the scale value of loaded objects so that

Using aframe with Angular 2

烂漫一生 提交于 2019-12-22 18:28:57
问题 I'm trying to use Aframe in my angular 2 project. I imported the library in my index.html but I still can't use the aframe directive, for example: <a-scene> <a-box color="red"></a-box> </a-scene> Throws the error: Template parse errors: 'a-box' is not a known element: 1. If 'a-box' is an Angular component, then verify that it is part of this module. How I can import such library to my angular 2 project and use it's directives? 回答1: I fixed doing this: I Try adding: import {CUSTOM_ELEMENTS