-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reformat other examples, fix aframe master url, update to environment…
… 1.4.0 (#779) * Reformat other examples, fix aframe master url, update to environment 1.4.0 * Replace old a-animation with animation component * Use event-set 5.x.x url to get the latest version * add movement-controls to controllers.html example
- Loading branch information
1 parent
ebb07fa
commit a6e1314
Showing
7 changed files
with
45 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,11 @@ | |
<head> | ||
<meta charset="utf-8"> | ||
<title>Controllers</title> | ||
<script src="https://cdn.jsdelivr.net/gh/aframevr/aframe/dist/aframe-master.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/aframe-environment-component.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/aframe-teleport-controls.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/aframe-event-set-component.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/aframevr/aframe@master/dist/aframe-master.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/aframe-environment-component.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/aframe-blink-controls/dist/aframe-blink-controls.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/aframe-event-set-component.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/c-frame/[email protected]/dist/aframe-extras.controls.min.js"></script> | ||
</head> | ||
<body> | ||
<a-scene> | ||
|
@@ -23,8 +24,8 @@ | |
event-set__mouseenter="_event: mouseenter; material.opacity: 0.75" | ||
event-set__mouseleave="_event: mouseleave; material.opacity: 1" | ||
event-set__click="_event: click; scale: 1.1 1.1 1.1"></a-mixin> | ||
<img id="crateImg" src="https://aframe.io/sample-assets/assets/images/wood/crate.gif" crossOrigin="true"> | ||
<img id="floorImg" src="https://aframe.io/sample-assets/assets/images/terrain/grasslight-big.jpg" crossOrigin="true"> | ||
<img id="crateImg" src="https://aframe.io/sample-assets/assets/images/wood/crate.gif" crossorigin="true"> | ||
<img id="floorImg" src="https://aframe.io/sample-assets/assets/images/terrain/grasslight-big.jpg" crossorigin="true"> | ||
</a-assets> | ||
|
||
<a-entity id="environment" environment="preset: forest; fog: 0"></a-entity> | ||
|
@@ -34,10 +35,8 @@ | |
<a-entity id="aBlueBox" mixin="interactable" geometry="primitive: box; depth: 2; height: 5; width: 1" material="color: #4CC3D9" position="0 8 0"></a-entity> | ||
<a-entity id="shortOrangeBox" mixin="interactable short orange box" position="-5 2 0"></a-entity> | ||
<a-entity id="shortYellowBox" mixin="interactable short yellow box" position="5 2 0"></a-entity> | ||
<a-entity id="redBox" mixin="interactable" geometry="primitive: box" material="color: #F00" position="-4 1 0"> | ||
<a-animation attribute="rotation" to="0 360 0" repeat="indefinite" easing="linear" dur="9600"></a-animation> | ||
</a-entity> | ||
<a-entity id="yellowSphere" mixin="interactable" geometry="primitive: sphere" material="color:#ff0; metalness:0.0; roughness:1.0" position="-2 2 -2"></a-entity> | ||
<a-entity id="redBox" mixin="interactable" geometry="primitive: box" material="color: #F00" position="-4 1 0" animation="property: object3D.rotation.y; to: 360; loop: true; easing: linear; dur: 9600"></a-entity> | ||
<a-entity id="yellowSphere" mixin="interactable" geometry="primitive: sphere" material="color: #ff0; roughness: 1" position="-2 2 -2"></a-entity> | ||
<a-box id="brickBox" mixin="interactable" src="https://aframe.io/sample-assets/assets/images/bricks/brick_bump.jpg" position="-5 5 -2" width="1" color="#F16745"></a-box> | ||
<a-box id="aBox" mixin="interactable" position="0 2 0" height="2" color="#FFC65D"></a-box> | ||
|
||
|
@@ -50,9 +49,13 @@ | |
<!-- Lights. --> | ||
<a-entity id="pointLight" light="type: point; intensity: 0.25" position="0 3 3"></a-entity> | ||
|
||
<!-- Hands. --> | ||
<a-entity id="rightHand" laser-controls="hand: right"></a-entity> | ||
<a-entity id="leftHand" hand-controls="left" teleport-controls></a-entity> | ||
<a-entity id="rig" movement-controls> | ||
<a-entity id="player" camera position="0 1.6 0" look-controls></a-entity> | ||
<!-- Hands. --> | ||
<a-entity id="rightHand" laser-controls="hand: right"></a-entity> | ||
<a-entity id="leftHand" hand-controls="hand: left" | ||
blink-controls="rotateOnTeleport: false; cameraRig: #rig; teleportOrigin: #player; collisionEntities: .environmentGround"></a-entity> | ||
</a-entity> | ||
</a-scene> | ||
|
||
<script src="../dist/aframe-inspector.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters