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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello, WebVR! - A-Frame</title> | |
<meta name="description" content="Hello, WebVR! - A-Frame"> | |
<script src="https://aframe.io/releases/0.8.0/aframe.min.js"></script> | |
</head> | |
<body> | |
<a-scene> | |
<a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9" shadow></a-box> |
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
<a-entity position="0 1 0"> | |
<a-camera></a-camera> | |
</a-entity> |
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
<a-assets> | |
<a-asset-item id="mtl" src="https://cdn.glitch.com/787f26e4-ded1-4eaf-ba99-e2a5c1ffda59%2Facesjustforroomshow.mtl?1525708212104"></a-asset-item> | |
<a-asset-item id="obj" src="https://cdn.glitch.com/787f26e4-ded1-4eaf-ba99-e2a5c1ffda59%2Facesjustforroomshow.obj?1525708229479"></a-asset-item> | |
</a-assets> | |
<a-entity obj-model="obj: #obj; mtl: #mtl;" position="-1 -1 -1" scale="1 1 1" rotation="0 180 0" shadow></a-entity> |
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
<script src="https://cdn.rawgit.com/matthewbryancurtis/aframe-star-system-component/db4f1030/index.js"></script> | |
<a-scene> | |
<a-sky color="#222"></a-sky> | |
<a-entity star-system></a-entity> | |
</a-scene> |
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
<script> | |
var direction = 1; | |
AFRAME.registerComponent('auto-camera', { | |
tick: function () { | |
var currentPosition = this.el.object3D.position; | |
if (currentPosition.z < -2) { | |
direction = 1; | |
} else if (currentPosition.z > 0) { | |
direction = -1; | |
} |
OlderNewer