Coder Social home page Coder Social logo

ar.js-examples's People

Contributors

klausw avatar stemkoski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ar.js-examples's Issues

Problem trying to change an object when an event happens with the markers like in detection.html

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.

Drawing on webcam canvas prior to AR.js processing

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.