tommasoturchi / react-three-mind

MindAR components for @react-three/fiber
37 stars 12 forks source link

target size problrm #17

Open kordou opened 1 year ago

kordou commented 1 year ago

hi, i am trying react-mind with drei an i just loaded an html element. i see that your image target is 674X372 px

so i added an html od drei with the same image size but when it displayed it is huge.

how can we make it 1:1 on size with the target image ?

thank you

function App() { const [show, setShow] = useState(false); return ( <ARView imageTargets="https://cdn.jsdelivr.net/gh/hiukim/mind-ar-js@1.1.4/examples/image-tracking/assets/card-example/card.mind" filterMinCF={1} filterBeta={10000} missTolerance={0} warmupTolerance={0}

<ARAnchor target={0} onAnchorFound={() => { setShow(true); }}

onAnchorLost= {() => { setShow(false); }} {show && ( <Html occlude="blending" transform style={{width:674, height:372}}> <iframe width="674" height="372" src="https://www.youtube.com/embed/jx5hdo50a2M?controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen )} ); }