ar.js

Event listeners in ar.js

你说的曾经没有我的故事 提交于 2021-01-19 10:29:50
问题 I am developing a project which involves ar.js that is displaying 3d objects and text to teach children the alphabet on both mobile devices and laptops. I was trying to add an event listener as an extra to make the children interact more. My target is to click/touch on the model displayed and it will enlarge or change color or rotation. Attached find my code. Hopefully you could solve my issue. HTML Code <!DOCTYPE html> <html> <head> <script src = "https://aframe.io/releases/1.0.3/aframe.min

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>

霸榜日本热搜一周!这个应用让涂鸦从纸上活过来,还能喂吃的

半世苍凉 提交于 2020-08-18 11:03:08
      大数据文摘出品    作者:刘俊寰   如果有一天,你画中的 2D人物突然变成3D ,还能动起来,你信吗?   文摘菌没有在说神笔马良的故事,只要是你笔下的人物,文摘菌都有办法让它动起来。   不信?   反正最近火爆日本的这款APP らくがきAR(涂鸦AR) 就能实现这个功能。   这款应用目前刚刚在日本App Store 上线不到一周 ,但是网友们都已经玩疯了,纷纷在推特上分享了自己的收获,相关话题也连续登上推特热搜好多天,一度 霸榜第三位 。      先一起看看效果网友的涂鸦效果!   比如这个,不仅活灵活现的站了起来,还眯着眼睛去啃苹果,简直可爱到爆炸!      比如,很多阿松齐聚一堂,抢奶酪吃。      偶尔也能看到一些画风不那么正常的,比如鬼畜得有点恐怖的怪猫:         咳咳…总而言之,不管你打算走可爱风还是鬼畜风,3D涂鸦生成后,它们都会 根据不同的背景做出不同的动作 ,比如跳舞抖动、摔桌子、跳进水杯等。   同时, 点击空白处,还有一些从天而降的食物 ,比如苹果、香蕉和鱼,“看”到食物后,这些3D涂鸦会跑去食物所在地,两三口就能“饱餐一顿”,简直不要太养成系。   但是,文摘菌也要提醒你一下,运气不好的时候会 天降大便 ,这个只能自行祈福了。   目前,这款APP 只开放了iOS版本 ,国外账号能免费下载,好消息是

Image Tracking using AR.js - Problem with Custom Image Descriptors

自闭症网瘾萝莉.ら 提交于 2020-06-17 16:22:25
问题 I am trying to generate an AR scene using Image Tracking based on the tutorial in AR.js documentation. When I was using the sample URL as provided in the demo in Codepen, it worked but when I specified the URL to be the path to my own generated image descriptors in my local machine, I got this error: "Error in loading marker on Worker 404" Since it was working well when I used the image descriptors provided in the demo, I assume it's something to do with the image descriptors that I generated

Image Tracking using AR.js - Problem with Custom Image Descriptors

有些话、适合烂在心里 提交于 2020-06-17 16:19:44
问题 I am trying to generate an AR scene using Image Tracking based on the tutorial in AR.js documentation. When I was using the sample URL as provided in the demo in Codepen, it worked but when I specified the URL to be the path to my own generated image descriptors in my local machine, I got this error: "Error in loading marker on Worker 404" Since it was working well when I used the image descriptors provided in the demo, I assume it's something to do with the image descriptors that I generated

AR.JS Can't get Video or Picture working with NFT only 3D

女生的网名这么多〃 提交于 2020-06-17 09:11:11
问题 I finally have given up as I can't get AR.JS to run with a simple NFT marker that should display a Video or a PNG image over it. If I run it with a GLTF Model it works without problems. I tried changing the scale and position to see if it is somehow behind the marker etc. but that doesn't help in any way. The console doesn't throw me any errors as well. Could anybody throw me a short fix as I tried a lot of different stuff but nothing gets displayed. Link to page with marker https://natrium83

AR.JS Can't get Video or Picture working with NFT only 3D

半城伤御伤魂 提交于 2020-06-17 09:11:07
问题 I finally have given up as I can't get AR.JS to run with a simple NFT marker that should display a Video or a PNG image over it. If I run it with a GLTF Model it works without problems. I tried changing the scale and position to see if it is somehow behind the marker etc. but that doesn't help in any way. The console doesn't throw me any errors as well. Could anybody throw me a short fix as I tried a lot of different stuff but nothing gets displayed. Link to page with marker https://natrium83

3D开发-AR.js 安卓-WebView支持AR.js

陌路散爱 提交于 2020-05-04 00:33:16
WebRTC 支持 报错:Webcam Error navigator.mediadevices.getusermedia not present in your browser 解决办法: // 重新WebChromeClient public class MWebChromeClient extends WebChromeClient { /** * 支持WebRTC * @param request */ @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) @Override public void onPermissionRequest(PermissionRequest request) { request.grant(request.getResources()); } } Ref: https://github.com/oauth-io/oauth-android/issues/2 HTTPS SSL 证书报错问题 报错:TAG: X509Util - Failed to validate the certificate chain error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not

3D开发-AR.js 图片匹配

瘦欲@ 提交于 2020-05-04 00:32:57
图片匹配方式 加载一张图片作为识别的pattern marker。 代码 AR.js/three.js/examples/marker-training/examples/patternmarker-from-image.html修改代码 //从图片加载匹配模式 // load image and convert it to a marker var imageURL = '../../res/arjs/marker/inner/inner-letterA.png'; THREEx.ArPatternFile.encodeImageURL(imageURL, function onComplete(patternFileString) { var patternURL = 'data:text/plain;base64,' + btoa(patternFileString) // create THREEx.ArMarkerControls var markerControls = new THREEx.ArMarkerControls(arToolkitContext, markerRoot1, { type: 'pattern', patternUrl: patternURL, // patternUrl : "../../res/arjs/data/pattern