Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
|
start:test [2019/04/09 11:35] enzomr créée |
start:test [2023/12/07 22:25] (Version actuelle) |
||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| <!DOCTYPE html> | <!DOCTYPE html> | ||
| <html> | <html> | ||
| - | <head> | + | |
| - | <meta charset="UTF-8"> | + | <head> |
| - | <title>WebGL - test</title> | + | <meta charset="UTF-8"> |
| - | <script src="js/aframe-v0.9.0.js"></script> | + | <title>Orbit Controls + click sur objet</title> |
| - | <script src="https://cdn.rawgit.com/feiss/aframe-environment-component/76b2bbf3/aframe-environment-component.min.js"></script> | + | <!-- Include framework aframe --> |
| - | <script src="https://unpkg.com/[email protected]/dist/aframe-orbit-controls.min.js"></script> | + | <script src="https://aframe.io/releases/0.9.0/aframe.min.js"></script> |
| - | <script type="text/javascript"> | + | <!-- Include Environnement sol + ciel --> |
| - | window.onload = function(){ | + | <script src="https://cdn.rawgit.com/feiss/aframe-environment-component/76b2bbf3/aframe-environment-component.min.js"></script> |
| - | + | <!-- Include framework Orbit Controls --> | |
| - | } | + | <script src="https://unpkg.com/[email protected]/dist/aframe-orbit-controls.min.js"></script> |
| - | </script> | + | <script type="text/javascript"> |
| - | </head> | + | window.onload = function() { |
| - | <body> | + | |
| - | <a-scene stats shadow="type: pcfsoft" vr-mode-ui="enabled: false" cursor="rayOrigin: mouse" raycaster="objects: .interactive"> | + | } |
| - | <a-entity environment shadow="receive: true"></a-entity> | + | </script> |
| - | + | </head> | |
| - | <a-entity id="box" | + | |
| - | class="interactive" | + | <body> |
| - | geometry="primitive: box; | + | <a-scene stats shadow="type: pcfsoft" vr-mode-ui="enabled: true" cursor="rayOrigin: mouse" raycaster="objects: .interactive"> |
| + | <a-entity environment shadow="receive: true"></a-entity> | ||
| + | |||
| + | <a-entity id="box" class="interactive" geometry="primitive: box; | ||
| height: 1; | height: 1; | ||
| width: 1; | width: 1; | ||
| - | depth: 1" | + | depth: 1" material="color: #AA00AA" position="0 0.5 -5" shadow="cast: true" animation__rotation="property: rotation; |
| - | material="color: #AA00AA" | + | |
| - | position="0 0.5 -5" | + | |
| - | shadow="cast: true" | + | |
| - | animation__rotation="property: rotation; | + | |
| from: 0 0 0; | from: 0 0 0; | ||
| to: 0 360 0; | to: 0 360 0; | ||
| dur: 2000; | dur: 2000; | ||
| startEvents: click; | startEvents: click; | ||
| - | easing: easeInOutElastic;" | + | easing: easeInOutElastic;" animation__colorIn="property: material.color; |
| - | animation__colorIn="property: material.color; | + | |
| to: #FF0000; | to: #FF0000; | ||
| startEvents: mouseenter; | startEvents: mouseenter; | ||
| - | dur: 0;" | + | dur: 0;" animation__colorOut="property: material.color; |
| - | animation__colorOut="property: material.color; | + | |
| to: #AA00AA; | to: #AA00AA; | ||
| startEvents: mouseleave; | startEvents: mouseleave; | ||
| - | dur: 0;" | + | dur: 0;"></a-entity> |
| - | ></a-entity> | + | |
| - | <a-entity camera orbit-controls="target: 0 0 0; | + | <a-entity camera orbit-controls="target: 0 0 0; |
| minDistance: 2; | minDistance: 2; | ||
| maxDistance: 50; | maxDistance: 50; | ||
| Ligne 49: | Ligne 45: | ||
| enablePan: false; | enablePan: false; | ||
| enableKeys: false; | enableKeys: false; | ||
| - | maxPolarAngle: 89;" | + | maxPolarAngle: 89;"></a-entity> |
| - | ></a-entity> | + | </a-scene> |
| - | <!-- <a-entity look-controls position="0 10 0"> | + | </body> |
| - | <a-entity id="camera" camera="fov: 45" wasd-controls="acceleration: 400" position="0 0 15" rotation="-30 0 0"> | + | |
| - | <a-cursor raycaster="objects: .collidable"></a-cursor> | + | </html> |
| - | </a-entity> | + | |
| - | </a-entity> --> | + | |
| - | </a-scene> | + | |
| - | </body> | + | |
| - | </html> | + | |
| </code> | </code> | ||