addictla.blogg.se

Autodesk 360 viewer
Autodesk 360 viewer




autodesk 360 viewer

The HTML page hasn’t changed substantially – it has some additional styles, but that’s about it. The vertical rotation can be absolute, but we want to fix the left-right rotation based on an initial direction – horizontal rotations after that should be relative to that initial direction. We’re only interested in landscape mode, so we need to look at the alpha value for the horizontal (left-right) rotation and gamma for the vertical (front-back) rotation.

autodesk 360 viewer

These appear to be given irrespective of the actual orientation (meaning whether it’s in portrait or landscape mode). We’ll extend this approach in tomorrow’s post to show more buttons, one for each hosted model.ĭevice-tilt support is only a little more involved: the window has a ‘deviceorientation’ event we can listen to that gives us alpha/beta/gamma values representing data coming from the host device’s sensors (presumably the accelerometer and magnetometer). Nothing particularly interesting, although we do hide – and change the Z-order on – some divs to make an apparently multi-page UI happen via a single HTML file. So we’re adding a single, huge “Start” button to launch the viewer. This is clearly intended to stop naughty pages from forcing you into full-screen mode on load. In today’s post we’re going to extend the implementation we saw yesterday (and introduced on Monday) by adding full-screen viewing and device-tilt navigation.įull-screen mode is easy: I borrowed some code from here that works well, the only thing to keep in mind is that the API can only be called in a UI event handler (such as when someone has pressed a button). I’ll have time on the flight to write up the next part in the series, so all will be in place for this weekend’s VR Hackathon.

autodesk 360 viewer

I’m heading out the door in a few minutes to take the train to Zurich and a (thankfully direct) flight from there to San Francisco.






Autodesk 360 viewer