Skip to content

Add "markerLost" event for THREEx artoolkitControls #84

@ToufMar

Description

@ToufMar

Do you want to request a feature or report a bug?
feature

What is the current behavior?
I'm working with the Three / Threex version not de A-Frame one.

When I set a addEventListener("markerLost", () => console.log("marker lost") i have nothing whereas with addEventListener("markerFound", () => console.log("marker found") the log is displayed.

You can reproduce it on the nft.html example in three.js just add listeners.

 var markerControls = new THREEx.ArMarkerControls(arToolkitContext, camera, {

            type: 'nft',
            descriptorsUrl: 'data/dataNFT/pinball',
            changeMatrixMode: 'cameraTransformMatrix'
        })
        markerControls.addEventListener('markerFound', () => {
            console.log("hey");
        })
        markerControls.addEventListener('markerLost', () => {
            console.log("nope");
        })

If the current behavior is a bug, please provide the steps to reproduce.

Please mention other relevant information such as the browser version, Operating System and Device Name

What is the expected behavior?
addEventListener("markerLost", (event) => //get event);
If this is a feature request, what is motivation or use case for changing the behavior?
I need this feature to display a target on my screen when marker is lost ..
Thx for every things guys, this lib is awesome !!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions