Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught runtime error: Undefined is not an object (evaluating 'this.tracker dummyRun') #535

Open
FernandoSa93 opened this issue Jun 19, 2024 · 1 comment

Comments

@FernandoSa93
Copy link

FernandoSa93 commented Jun 19, 2024

I'm using mind ar aframe with react and sometimes when the camera starts this error occurs, including with the example of multi targets.

Here is my code:
import React, { useEffect, useRef } from 'react';
import 'aframe';
import 'aframe-extras';
import 'mind-ar/dist/mindar-image-aframe.prod.js';

const ARComponent = () => {
const sceneRef = useRef(null);

useEffect(() => {
const sceneEl = sceneRef.current;
const arSystem = sceneEl.systems["mindar-image-system"];
sceneEl.addEventListener('renderstart', () => {
arSystem.start(); // start AR
});
return () => {
arSystem.stop();
}
}, []);

return (

<a-scene ref={sceneRef} mindar-image="imageTargetSrc: https://cdn.jsdelivr.net/gh/FernandoSa93/courage_quest_ar@main/src/mind/teste/assets/band.mind; filterMinCF:0.1; filterBeta: 10; maxTrack: 1" color-space="sRGB" vr-mode-ui="enabled: false" device-orientation-permission-ui="enabled: false">
  <a-assets>
    <a-asset-item id="barata1" src="https://cdn.jsdelivr.net/gh/FernandoSa93/courage_quest_ar@main/src/mind/barata/assets/barata1/scene.gltf"></a-asset-item>
  </a-assets>

  <a-camera position="0 0 0" look-controls="enabled: false"></a-camera>

  <a-entity mindar-image-target="targetIndex: 0">
    <a-gltf-model rotation="270 180 0" position="0 -0.25 0" scale="0.8 0.8 0.7" src="#barata1" animation-mixer />
  </a-entity>
</a-scene>

);
}

export default ARComponent;

Could you tell me what could be causing this problem?

@ThatGuyTre
Copy link

I'm having the same issue. I am not sure why it's happening, but I think it's causing issues when reloading the page due to the "arReady" emit not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants