Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/images/widget.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 5 additions & 25 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,27 @@
<meta charset="utf-8">
<title>aframe-material😲😆😛</title>
<meta name="description" content="Aframe-Material">
<script src="https://aframe.io/releases/0.6.1/aframe.min.js"></script>
<script src="https://rawgit.com/mayognaise/aframe-mouse-cursor-component/master/dist/aframe-mouse-cursor-component.min.js"></script>
<script src="https://rawgit.com/aframevr/aframe/b37f317/dist/aframe-master.min.js"></script>
<script src="https://cdn.rawgit.com/zcanter/aframe-gradient-sky/master/dist/gradientsky.min.js"></script>
<script src="dist/aframe-material.js"></script>
<script type="text/javascript">
AFRAME.ASSETS_PATH = "./assets";
</script>
</head>
<body>
<a-scene>
<a-scene stats>
<a-entity laser-controls="hand: right"></a-entity>

<a-entity> <a-camera look-controls-enabled wasd-controls-enabled mouse-cursor></a-camera></a-entity>
<a-entity cursor="rayOrigin: mouse"></a-entity>

<!-- BEGIN INPUTS/KEYBOARD -->
<a-keyboard physical-keyboard="true"></a-keyboard>
<a-keyboard></a-keyboard>
<a-input position="-0.7 1 -2.5" placeholder="Username" color="black" width="1"></a-input>
<a-input position="-0.7 0.8 -2.5" type="password" placeholder="Password" color="black" width="1"></a-input>
<!-- END INPUTS/KEYBOARD -->

<!-- BEGIN FORM -->
<a-rounded position="0.5 0.5 -2.5" width="4" height="3.1" radius="0.05" rotation="0 -20 0" scale="0.3 0.3 0.3">
<a-form>
<a-switch position="0.2 2.7 0" enabled="true"></a-switch>
<a-radio position="0.2 2.4 0" width="3" name="food" label="Burger with fries and pizza" value="pizza"></a-radio>
<a-radio position="0.2 2.1 0" width="3" name="food" label="Veggies" checked="true" disabled="true"></a-radio>
<a-radio position="0.2 1.8 0" width="3" name="food" label="Ice cream"></a-radio>
<a-checkbox position="0.2 1.5 0" width="3" name="stuff" label="I am a checkbox" checked="true"></a-checkbox>
<a-checkbox position="0.2 1.2 0" width="3" name="stuff" label="And I am another one" checked="true" disabled="true"></a-checkbox>
<a-button position="0.2 0.8 0" name="stuff" value="Click me" type="raised"></a-button>
<a-button position="0.2 0.35 0" width="3" name="stuff" value="You cannot click me" disabled="true"></a-button>
</a-form>
</a-rounded>
<!-- END FORM -->

<!-- BEGIN TOAST -->
<a-toast message="This is a toast" action="Got it"></a-toast>
<!-- END TOAST -->

<!-- BEGIN ENVIRONEMENT -->
<a-gradient-sky material="shader: gradient; topColor: 255 0 0; bottomColor: 0 121 255;"></a-gradient-sky>
<a-gradient-sky material="shader: gradient; topColor: 255 0 0; bottomColor: 0 121 255; side: back"></a-gradient-sky>
<!-- END ENVIRONEMENT -->
</a-scene>
<script type="text/javascript">
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"vr"
],
"dependencies": {
"aframe-rounded": "^1.0.3"
"aframe-rounded": "^1.0.3",
"aframe-slice9-component": "^1.0.0"
}
}
4 changes: 3 additions & 1 deletion src/fade/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ var opacityUpdate = function(opacity) {
}
});
for (let text of this.textEntities) {
text.setAttribute('opacity', opacity);
if (text.components.text) {
text.components.text.material.uniforms.opacity.value = opacity;
}
}
}

Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(()=>{
if (!AFRAME) { return console.error('AFRAME is required!'); }
if (!AFRAME.ASSETS_PATH) { AFRAME.ASSETS_PATH = "./assets"; }
if (!AFRAME.components.slice9) { require('aframe-slice9-component'); }
require('aframe-rounded');
require("./fade");
//require("./alert"); @TODO ;)
Expand Down
1 change: 1 addition & 0 deletions src/keyboard/assets.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
slice: `${AFRAME.ASSETS_PATH}/images/widget.png`,
aframeKeyboardShift: `${AFRAME.ASSETS_PATH}/images/ShiftIcon.png`,
aframeKeyboardShiftActive: `${AFRAME.ASSETS_PATH}/images/ShiftActiveIcon.png`,
aframeKeyboardGlobal: `${AFRAME.ASSETS_PATH}/images/GlobalIcon.png`,
Expand Down
Loading