hiukim / mind-ar-js

Web Augmented Reality. Image Tracking, Face Tracking. Tensorflow.js
MIT License
2.14k stars 394 forks source link

use mind-ar as node dependency without loading three 2 times #346

Closed kordou closed 1 year ago

kordou commented 1 year ago

HI, all!

i know that you have a relative post , i have read it but i could not find a way to make it work.

i have a project that runs a three.js scene already and i wand to converted to AR with an image tracker

my questions A) should i use mindar-image.prod.js from the dist folder that does not have th three inside ? import {MindARThree} from "mind-ar/dist/mindar-image.prod";

b) and how can i connected to my existing three scene . I use my existing renderer, scene and camera i suppose but the anchors ? i add them as an Obect3D to my scene ?

can someone give me an example

thank you all

hiukim commented 1 year ago
  1. Unfortunately, there is no direct way to configure MindAR to control your existing scene.

  2. three is an external dependency since v1.2.0, you need to install your own version of threeJS, so it shouldnt get loaded twice

hiukim commented 1 year ago

closing it for now, please reopen if there is further comments