ImageTracking not working
Hi! First of all, thanks for this repository. Sadly, the ImageTracking example does not work for me. I used the default image and the same version of MindAR (1.2.3) as in the link. I also tried using it with a new, compiled image.mind file based on the offical Tool, which I placed in the /public folder. Still nothing happens. I'm using newest Chrome 138.0.7204.184 and my Macbook Webcam.
Here is the package.json:
{
"name": "image-tracking",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --host",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@react-three/drei": "^9.36.0",
"@react-three/fiber": "^8.8.10",
"mind-ar": "^1.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-three-mind": "^0.3.0", // used the github repo instead the local version
"react-webcam": "^7.2.0",
"three": "^0.166.0"
},
"devDependencies": {
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"@vitejs/plugin-react": "^4.0.2",
"vite": "^4.4.0",
"vite-plugin-mkcert": "^1.17.8"
}
}
The rest is the same code like in /examlples/image-tracking/. Did I miss something?
Greetings
I noticed that my MindAR setup only works correctly on my smartphone. When I expose the dev server with vite --host and access it from my phone, AR tracking works and the anchors are displayed.
However, when I try to use my PC’s webcam in a desktop browser, nothing appears, which prevents me from debugging in the browser console.
I suspect this may be related to the facingMode setting in AR.jsx. It might be helpful to add a prop to allow choosing the camera mode, especially for users who want to use image tracking on a desktop without face tracking.
Is there a recommended way to make MindAR work with a PC webcam for development and debugging?
Thanks in advance!