The below example shows using controls on a 3D model of Axeltorv (Næstved) in the .glTF format.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
<html> <head> <title>Urban Power model - Axeltorv</title> <script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script> <script src="https://rawgit.com/fernandojsg/aframe-teleport-controls/master/dist/aframe-teleport-controls.min.js"></script> </head> <body> <a-scene> <a-asset-item id="axeltorv" src="20180131_axeltorv.gltf"></a-asset-item> <a-entity gltf-model="#axeltorv" scale="0.1 0.1 0.1" rotation="-86 -133 174" position="-2.11 -9.05 -1.32"></a-entity> <a-entity id="cameraRig"> <a-entity id="head" camera wasd-controls look-controls></a-entity> <a-entity id="left-hand" teleport-controls="cameraRig: #cameraRig; teleportOrigin: #head;" gearvr-controls></a-entity> <a-entity id="right-hand" teleport-controls="cameraRig: #cameraRig; teleportOrigin: #head;" gearvr-controls></a-entity> </a-entity> <a-sky color="#599"></a-sky> </a-scene> </body> </html> |