aframe-ar | experimenting with AR | Augmented Reality library
kandi X-RAY | aframe-ar Summary
kandi X-RAY | aframe-ar Summary
experimenting with AR using A-Frame
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of aframe-ar
aframe-ar Key Features
aframe-ar Examples and Code Snippets
Community Discussions
Trending Discussions on aframe-ar
QUESTION
My last question was marked as duplicate: A-Frame AR - Set Size of Scene
Here is the question that it was marked duplicate of: Aframe and aframe-ar: display video stream in div instead of fullscreen
Using iframe is not the optimal solution for me, I need the AR to be present on my webpage. The answerer alludes to changing the source code to be able to resize the scene and camera video. Can someone help me achieve this?
...ANSWER
Answered 2021-Feb-27 at 21:34tldr.
Afaik arjs has hardcoded sizes and multiple boundaries all over the place to keep the library universal (different devices with different aspect ratios, mobile portrait vs landscape etc...).
Re-creating it all with "embedding" options would be a huge project so I'll focus on a simple example with a non - resizable window.
Disclaimer: most of the following is just my take, mostly showing which parts I changed and why. All of this could be done in many other ways.
0. a wrapper element
So the idea is to be able to embed the video + scene into some div, like here
You can see both the video and scene are contained within a div - #arjs-cell
.
So just after the namespace I've added my variable for keeping my wrapper element, and a setter, which will also reparent the video:
QUESTION
I'm unable to see any reflexion on my gtLF model using "cube-env-map". I'd like to get something like this : helmet from threejs.org examples I don't know if this is because of the .jpg files I use, or html or linked javascript scripts, or... anything else? Here's my html :
...ANSWER
Answered 2020-Nov-19 at 23:29(Assuming there are no console errors suggesting incorrect cubemap paths, or wrong extensions)
If your model looks like this:
And you want it to be more like this:
Then the answer lies in two factors - metalness, and roughness.
- roughness determines whether the material is like a mirror (0), or completely diffuses the reflection (1).
- metalness determines whether the material is metallic (1), or not (0).
You can deal with this in at least two ways:
- Modify the materials in a modelling software like blender, or maya.
- Modify the properties within an a-frame custom component.
A component would have to wait until the model is loaded, and change all (or some selected) model nodes. Like this:
QUESTION
I am trying to disable the drag feature of A-frame so that if a object is in front of your screen the user can't just drag on the screen and remove it from your front to other place without even moving. Here is what i have tried with the camera, but still the drag is not disabled:
...ANSWER
Answered 2020-Jul-31 at 06:50According to the documentation, you can set the look-controls "touchEnabled" property to false, it should solve your issue.
https://aframe.io/docs/1.0.0/components/look-controls.html
It should do with something like this
QUESTION
I create the button through js and add it to the html when the user opens it adds a product to my order and adds a button to remove the same product, and it is in that button that I am giving the problem. The button has the class deletePrato but as it reads the .click () before creating the button it is not reacting as I want
...ANSWER
Answered 2020-Jul-21 at 02:26You need to use event Delegation
so your DOM
is listening to the click event for dynamically appended element
. by using .on
Also to get the value of p
you need to use attr
to retrieve the value of clicked item.
I have added some comments to each line as well. Change your click function to this below and it should work fine.
Just FYI - You also do not need the function deletar
. Its up-to to have it or not. Event delegation
on click will call .deletePrato
and will remove the that item you want to.
Run snippet below.
QUESTION
I've got an HTML file hosted in cPanel - https://ar.tiagoperes.eu/ar.html
...ANSWER
Answered 2020-May-25 at 06:05This problem happens because one needs to ask for camera permission. To fix it, I changed the iframe to
QUESTION
GeoAR.js demo
...ANSWER
Answered 2020-Apr-21 at 02:25The simple way i can think of is to completely disable all alert
by altering alert
functionality when the document is "ready."
QUESTION
I'm trying the Image Tracking example as explained here - https://github.com/AR-js-org/AR.js#get-started I've replaced the image and video with my own and added the whole project in an Amazon S3 bucket. When I run the html page, I get an error in the browser console "Error in loading marker on Worker 403". I'm assuming this indicates that the NFT image is somehow not loading. There are no CORS errors, or any other unauthorized errors indicated in the console.
Things I've tried after going through some pages on stack overflow (but they didn't help)-
Initially the image I was using was very basic, so I changed to the Pinball image so that AR.js gets more descriptions.
Disabled my chrome extensions like Ad Blocker etc.
Can someone help me with what is wrong or missing for the NFT to load properly?
Here's my code -
...ANSWER
Answered 2020-Apr-08 at 01:54The marker you are using is a .jpg
image which is not what a-nft
need. You need to make the NFT
from your image using this Carnaux NFT Marker Creator (which takes time)
Or follow this docs for Node version AR.js NFT Marker Creator Docs
Edit: Also, you are using but with
.mp4
(video).
gltf-model
is for .gltf
or .glb
format (3D model). If you want to use video use a-video
QUESTION
I've just started learning to create AR scenes with AR.js and I'm having some trouble with loading custom 3D models. I've tried many examples and all of them work perfectly, but once I insert my own model, it just doesn't show up. I used almost the same exact code for the given example and for my 3D model, which is this one:
...ANSWER
Answered 2020-Mar-24 at 10:53The model won't show up because of two factors:
- The model is huge and off - centered. Scaling it by 0.01 moves it a bit towards the center.
If your model shows up in Dons gltf-viewer - always try out your model in vanilla a-frame
- at least in a fiddle. Its easy to inspect, debug, and you can be sure whether a-frame
is causing the trouble.
- Glitch assets is not a folder. It may look this way for our convenience, but it's just a bunch of links. So
scene.gltf
is searching forscene.bin
in its current directory (edit and search thegltf
file - its human readable), but it's not there.
Replacing the paths with glitch urls is a bad idea (usually there are way more paths than just the .bin
). You should push the model into a github repository, where the directories work as expected.
Working arjs glitch here.
QUESTION
...ANSWER
Answered 2020-Mar-23 at 16:00To do this in a pure js way you could add an id to your text element like so
QUESTION
I'm currently testing AR.js to display 3D models in augmented reality using phones. My web coding skills are very novice so I'm pulling together different tutorials to get what I want. I believe I've just about nailed what I need to properly display a gltf file but there seems to be some small issue as the model won't display (I've confirmed that it's a valid file using a gltf viewer). The code also works fine to display a simple a-box, but falls down as soon as I comment that out and add the line for the gltf model.
Any help would be most appreciated!
...ANSWER
Answered 2020-Mar-22 at 22:48You can browse the new AR.js docs there is an example with a gltf model with also an online live version. In the example you provided you should make this change
from this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aframe-ar
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page