I've come through the official docs but wasn't able to locate information about how possibility of zooming in/out panorama
images, is it supported in the A-Frame or maybe there is a workaround to read about implementing some of three.js
on top of it?
相关问题
- Problems with changing color of gltf object
- How to enable anti-aliasing in A-Frame?
- How to find the coordinates of a raycaster interse
- How to load JSON data into an A-Frame component?
- (A-Frame) local gltf wont load; Cannot read proper
相关文章
- Aframe gltf-model demo with envmap
- How to change the pivot point, transform origin, o
- How can I hide an element with A-Frame?
- set a loading animation with a-frame
- Aframe video only plays muted on ios
- How to change the rotation axis for an animated A-
- AFrame: How to render a camera to a texture
- gltf file not showing in Aframe
This might be a cleaner way in 2018. I limited the zoom of the Aframe camera 1-5 so it doesn't get too messy.I just tested this and its working greatly.Hope it helps others.
This is what I put together to do it. Check the initial vrZoom variable.
For me, what I struggled the most, was to understand the way you set a parameter that's inside a component. You have to call it like this:
element.setAttribute('componentName', 'parameterName', 'value')
and in my casecam.setAttribute('camera', 'zoom', vrZoom)
Here's my script all together. It would be possible to create a component with this, such as look-controls.
You could either:
<a-sphere>
up or down when detecting the mouse wheel eventThis article might be helpful, as it covers using the mousewheel event on multiple browsers.
I think scaling may screw up Your setup, or be a resource waste, so I'd go with 2.