Skip to content

Commit b991f99

Browse files
committed
a-toolkit -> a-ui-toolkit
1 parent 0512629 commit b991f99

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

a-toolkit/a-toolkit.js renamed to a-toolkit/a-ui-toolkit.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function getRandomInt(min, max) {
1111
return Math.floor(Math.random() * (max - min)) + min; //The maximum is exclusive and the minimum is inclusive
1212
}
1313

14-
console.log("Registering a-toolkit");
14+
console.log("Registering a-ui-toolkit");
1515
const requireDreem = path => window.defineDreem.requireDreem(path);
1616

1717
const dreemAppendChild = function(parent, child){
@@ -34,7 +34,7 @@ const dreemAppendChild = function(parent, child){
3434
parent.relayout();
3535
}
3636

37-
AFRAME.registerComponent('a-toolkit', {
37+
AFRAME.registerComponent('a-ui-toolkit', {
3838
schema: {
3939
widthPx: {type: 'int', default: 800},
4040
heightPx: {type: 'int', default: 600}
@@ -134,11 +134,8 @@ AFRAME.registerComponent('a-toolkit', {
134134

135135
window.widgies = [];
136136
Array.from(widgetNameToPath.entries()).forEach(([widgetName, dreemPath]) => {
137-
console.log("Registering component: ", widgetName);
138137
AFRAME.registerComponent(widgetName, {
139-
init() {
140-
console.log("initializing ", widgetName, dreemPath);
141-
138+
init() {
142139
const DreemClass = requireDreem(dreemPath);
143140
const dreemInstance = new DreemClass(props(this.el));
144141

@@ -195,15 +192,15 @@ AFRAME.registerComponent('a-toolkit', {
195192
play: function () {}
196193
});
197194

198-
AFRAME.registerPrimitive('a-toolkit', {
195+
AFRAME.registerPrimitive('a-ui-toolkit', {
199196
defaultComponents: {
200-
"a-toolkit": {},
197+
"a-ui-toolkit": {},
201198
geometry: {primitive: 'box', width: 1.33333333, height: 1, depth: 0.02, color: 'white' }
202199
},
203200
// Maps HTML attributes to the `ocean` component's properties.
204201
mappings: {
205-
widtpx: 'a-toolkit.widthPx',
206-
heightpx: 'a-toolkit.depthPx', },
202+
widtpx: 'a-ui-toolkit.widthPx',
203+
heightpx: 'a-ui-toolkit.depthPx', },
207204
depth: 'geometry.depth',
208205
height: 'geometry.height',
209206
width: 'geometry.width'

a-toolkit/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import './a-toolkit';
1+
import './a-ui-toolkit';
22
import library from './dreem-imports';
33
import define from '../system/base/define';
44
import defineRequire from '../system/base/define.require';

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta http-equiv="cache-control" content="no-cache" />
88
<meta http-equiv="pragma" content="no-cache" />
99

10-
<script src="dist/aframe-toolkit-component.js"></script>
10+
<script src="dist/aframe-ui-toolkit.js"></script>
1111

1212
</head>
1313

@@ -16,14 +16,14 @@
1616
<a-scene id="scene">
1717
<a-assets></a-assets>
1818

19-
<a-toolkit position="0 1.5 -1.5">
19+
<a-ui-toolkit position="0 1.5 -1.5">
2020
<a-button text="Hi Hi Hi World"></a-button>
2121
<a-slider value="0.1"></a-slider>
2222
<a-view funny="surely">
2323
<a-button text="Ground Control to Major Tom"></a-button>
2424
<a-button text="UR Circuits Ded LOL"></a-button>
2525
</a-view>
26-
</a-toolkit>
26+
</a-ui-toolkit>
2727

2828
<a-sky color="#87CEEB"></a-sky>
2929
<a-plane position="0 -10 -25" rotation="-90 0 0" width="50" height="50" color="#7BC8A4"></a-plane>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "a-toolkit",
2+
"name": "a-ui-toolkit",
33
"version": "0.0.1",
4-
"description": "2D UI Widget Toolkit for A-Frame, based on DreemGL",
4+
"description": "UI Toolkit for A-Frame, based on DreemGL. Large set of widgets, but 2D. Good for screens.",
55
"scripts": {
66
"start": "webpack-dev-server -d --progress",
77
"test": "echo \"Error: no test specified\" && exit 1",

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const path = require("path");
55

66
module.exports = {
77
entry: {
8-
"aframe-toolkit-component": "./a-toolkit/index.js"
8+
"aframe-ui-toolkit": "./a-toolkit/index.js"
99
},
1010
output: {
1111
path: path.resolve(__dirname, ""),

0 commit comments

Comments
 (0)