This is the continue of issue #213 and PR #208.
Instead to add a arNFT property inherited to the Window or Global object, i created a new target property inside every class, for example in the ARnft class:
const initEvent = new CustomEvent("initARnft");
this.target.dispatchEvent(initEvent);
Example to test
Test for now the arNT_event_example.html, but note that until i not change the code in the ARnft-threejs library won't works. But you can see that the other events are working.
Improving Events
This is the continue of issue #213 and PR #208. Instead to add a arNFT property inherited to the Window or Global object, i created a new target property inside every class, for example in the ARnft class:
and inside the constructor i assigned the
window || global
to thetarget
property:Finallly we can use it in the class:
Example to test
Test for now the arNT_event_example.html, but note that until i not change the code in the ARnft-threejs library won't works. But you can see that the other events are working.
Check list
window || global
. See https://github.com/webarkit/ARnft/pull/220/commits/687b0de7dbcdb2c7107ffb35bacaa6c9a3c6e09a