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

Zoom dont work #13

Open
AngelSan19 opened this issue Oct 7, 2020 · 7 comments
Open

Zoom dont work #13

AngelSan19 opened this issue Oct 7, 2020 · 7 comments

Comments

@AngelSan19
Copy link

Hi, well i am trying to use the zoom whit two finger bunt not work

@AngelSan19
Copy link
Author

@EvanBacon do you have some example for use the function zoom?

@T0mAl3x
Copy link

T0mAl3x commented Dec 4, 2020

Any hope on this? I saw the pull request from WebBeard which allows enableZoom property in config but it doesn't work

@AngelSan19
Copy link
Author

@T0mAl3x the best alternative is use react-native-static-server and mount de files of the three JS 💯

@adwaitmore700
Copy link

any update on zoom in and out ?

@AngelSan19
Copy link
Author

@adwaitmore700 not for moment , but any solution is using react-native-static-server

@shiva-hack
Copy link

@EvanBacon , any updates on the zoom issues?

@AlphaBril
Copy link

hello guys, here's what you can do to bypass (for now) the zoom problem on mobile
`
const controlRef = useRef();

const zoomIn = () => {
if (camera) {
if (controlRef.current) {
const controls = controlRef.current as any;
console.log(controls.getControls());
controls.getControls().dollyOut(0.95 ** 1.0);
controls.getControls().update();
}
}
}

const zoomOut = () => {
if (camera) {
if (controlRef.current) {
const controls = controlRef.current as any;
controls.getControls().dollyIn(0.95 ** 1.0);
controls.getControls().update();
}
}
}

return (
<>
{ molecule !== undefined ?
<OrbitControlsView style={{ flex: 1 }} camera={camera} ref={controlRef}>
<GLView style={{ flex: 1 }} onContextCreate={onContextCreate} key="d" />

: null }
<Button title='Zoom In' onPress={() => zoomIn()}>
<Button title='Zoom Out' onPress={() => zoomOut()}>
</>
);
}`

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

5 participants