If I find anything inconsistent, I change my approach.
Set a fixed scale based on the model
When looking at the model spawn component, the scale seems to be set to 1, which makes me believe that the z-coordinate is wrong. Have you tried playing around by setting these values to fixed values?
model.object3D.position.set(detail.position.x, 0, detail.position.z)
model.object3D.lookAt(cam.object3D.position.x, model.object3D.position.y, cam.object3D.position.z)
Also, it feels wrong to me to first scan a QR code only to scan another target. Let the QR code activate the 3D model. You know where the QR code is relative to the painting.
Have the model appear static on the screen
Limit the user’s options to merely rotating and zooming the model. To do that, place the model inside a-camera
. You don’t need SLAM for this to work.
I can tell you that it took me three weeks to get the correct scaling of targets, but that also included getting dynamic image targets through pooling to work.