Examples using the AR.js library
stemkoski / ar.js-examples Goto Github PK
View Code? Open in Web Editor NEWExamples using the AR.js library
Home Page: https://stemkoski.github.io/AR.js-examples/index.html
License: MIT License
Examples using the AR.js library
Home Page: https://stemkoski.github.io/AR.js-examples/index.html
License: MIT License
Hi,
I`m trying to make an application with AR,js that is very similar to your detection app.
The only difference is that in your application, when a marker is not shown, or shown, you change the collor of the item on the lines in the link bellow.
{
init: function()
{
this.box = document.querySelector("#theBox");
},
tick: function (time, deltaTime)
{
// for convenience
let mv = markerVisible, r = "redMarker", y = "yellowMarker", b = "blueMarker";
if ( mv[r] && mv[y] && mv[b] )
this.box.setAttribute("color", "#654321");
else if ( mv[r] && mv[y] && !mv[b] )
this.box.setAttribute("color", "#FF8800");
else if ( mv[r] && !mv[y] && mv[b] )
this.box.setAttribute("color", "purple");
else if ( mv[r] && !mv[y] && !mv[b] )
this.box.setAttribute("color", "red");
else if ( !mv[r] && mv[y] && mv[b] )
this.box.setAttribute("color", "green");
else if ( !mv[r] && mv[y] && !mv[b] )
this.box.setAttribute("color", "yellow");
else if ( !mv[r] && !mv[y] && mv[b] )
this.box.setAttribute("color", "blue");
else // if ( !mv[r] && !mv[y] && !mv[b] )
this.box.setAttribute("color", "gray");
}
});
But what I need to do is to change that object, like from a box to an gltf 3d item when especific markers are visible or not.
For example, I have a 3D question mark and a 3D Bear, when I have all the markers that stands for the Bear, I want it to be shown, while them are not visible, I want the question mark to be.
I have al the scenario set, my only problem is this "change", document.querySelector seems to only change attributes from a specific object but not the object.
Well, I hope I have been clear and not bothering, thanks very much for the assistance.
I'm trying to draw a marker over the webcam input before AR.js processes it. I would like to have "virtual" markers as well as RL markers.
I haven't seen what I'm looking for but, being new to this, was curious if any of the examples are relevant to my goal?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.