aframe

Click event on a-entity in ar.js

一世执手 提交于 2021-01-28 12:24:08
问题 I have a simple code where there is a plane over barcode marker, when I click on this plane this action toggle visibility to another entity. <!doctype HTML> <html> <head> <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> </head> <script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script> <script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script> <script src="https://rawgit.com/donmccurdy

Click event on a-entity in ar.js

a 夏天 提交于 2021-01-28 12:20:46
问题 I have a simple code where there is a plane over barcode marker, when I click on this plane this action toggle visibility to another entity. <!doctype HTML> <html> <head> <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> </head> <script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script> <script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script> <script src="https://rawgit.com/donmccurdy

AFRAME: Android metallnesMap and roughnessMap issue

五迷三道 提交于 2021-01-28 08:09:36
问题 Tried to use in my project a model with metallnesMap and roughnessMap. On iOS everything looks good, but on Android it seems to be avoiding these maps. What could be the cause and if there any solution? On iOS: On Android: Use A-FRAME 1.1.0, .glb model exported from Blender Before the model looked dark on each devices but adding to the scene 'renderer="colorManagement: true"' and adding envMap has helped. 来源: https://stackoverflow.com/questions/65812649/aframe-android-metallnesmap-and

How to trigger multiple videos with ar.js

别等时光非礼了梦想. 提交于 2021-01-28 07:55:32
问题 FINAL UPDATE 9/13/2019 11:50pm : This code works with several custom markers, however the markers cannot be too similar. My previous custom markers were all stars with mild differences, and I think this was tripping it up somehow. But with newer, more unique markers, it works. For some reason, though, this did not affect the result when using the "separate components" method. Updated: 9/13/2019 : The below code works with hiro and kanji preset markers and one custom marker. However, when I

AFrame: reparenting an element keeping its world position, rotation

柔情痞子 提交于 2021-01-24 09:34:20
问题 I'm trying to reparent an element (entity), keeping its position, rotation (and if possible, size, eg, scale) in the scene. Ideally, I would like to have a component (say "reparent") that when set on an entity, "moves" it to the specified parent, keeping the aspect of the entity in the scene. For example, for the next HTML code, the green entity would become a child of the red one, but would keep its position and rotation in the scene: <a-scene id="scene" background="color: grey"> <a-entity

a-frame networked - how to match an avatar with a broadcasting client?

好久不见. 提交于 2021-01-08 05:22:50
问题 I'm using aframe-networked, and I'm sending some custom data between the users: // sender NAF.connection.broadcastDataGuaranteed(dataType, data) // all recipients listen NAF.connection.subscribeToDataChannel(dataType, (senderId, type, data, target) => {}) but I'm having trouble determining which avatar entity is corresponding to the broadcasting client. How the receivers know which player is the sender from the callback? 回答1: One way would be by using aframe-networked events, and keeping all

a-frame networked - how to match an avatar with a broadcasting client?

偶尔善良 提交于 2021-01-08 05:20:26
问题 I'm using aframe-networked, and I'm sending some custom data between the users: // sender NAF.connection.broadcastDataGuaranteed(dataType, data) // all recipients listen NAF.connection.subscribeToDataChannel(dataType, (senderId, type, data, target) => {}) but I'm having trouble determining which avatar entity is corresponding to the broadcasting client. How the receivers know which player is the sender from the callback? 回答1: One way would be by using aframe-networked events, and keeping all

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

Change parent of component and keep position

℡╲_俬逩灬. 提交于 2021-01-05 11:00:22
问题 I am using AR.js and have a sphere positioned in the marker component. <body style="margin : 0px; overflow: hidden;"> <a-scene vr-mode-ui="enabled: false" embedded="" arjs="sourceType: webcam; debugUIEnabled: false;"> <a-marker markerhandler id="marker" emitevents="true" cursor="rayOrigin: mouse" preset="hiro"> <a-sphere id="sphere" color="green" radius="0.3" position="0 1 0" ></a-sphere> </a-marker> <!-- use this <a-entity camera> to support multiple-markers, otherwise use <a-marker-camera>

Change parent of component and keep position

南楼画角 提交于 2021-01-05 11:00:12
问题 I am using AR.js and have a sphere positioned in the marker component. <body style="margin : 0px; overflow: hidden;"> <a-scene vr-mode-ui="enabled: false" embedded="" arjs="sourceType: webcam; debugUIEnabled: false;"> <a-marker markerhandler id="marker" emitevents="true" cursor="rayOrigin: mouse" preset="hiro"> <a-sphere id="sphere" color="green" radius="0.3" position="0 1 0" ></a-sphere> </a-marker> <!-- use this <a-entity camera> to support multiple-markers, otherwise use <a-marker-camera>