Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ngokevin committed Jan 15, 2016
1 parent c618c89 commit d87c45f
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 31 deletions.
36 changes: 20 additions & 16 deletions src/components/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
require('../components/camera');
require('../components/cursor');
require('../components/fog');
require('../components/geometry');
require('../components/light');
require('../components/loader');
require('../components/look-at');
require('../components/look-controls');
require('../components/material');
require('../components/position');
require('../components/raycaster');
require('../components/rotation');
require('../components/scale');
require('../components/sound');
require('../components/visible');
require('../components/wasd-controls');
require('./camera');
require('./cursor');
require('./geometry');
require('./light');
require('./loader');
require('./look-at');
require('./look-controls');
require('./material');
require('./position');
require('./raycaster');
require('./rotation');
require('./scale');
require('./sound');
require('./visible');
require('./wasd-controls');

require('./scene/fog');
require('./scene/stats');
require('./scene/vr-mode');
require('./scene/vr-mode-ui');
2 changes: 1 addition & 1 deletion src/components/scene/fog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var register = require('../../core/component').registerComponent;
var THREE = require('../../../lib/three');
var THREE = require('../../lib/three');
var debug = require('../../utils/debug');

var warn = debug('components:fog:warn');
Expand Down
2 changes: 1 addition & 1 deletion src/components/scene/vr-mode-ui.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var registerComponent = require('../../core/component').registerComponent;
var THREE = require('../../../lib/three');
var THREE = require('../../lib/three');
var utils = require('../../utils/');

var dummyDolly = new THREE.Object3D();
Expand Down
2 changes: 1 addition & 1 deletion src/components/scene/vr-mode.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var registerComponent = require('../../core/component').registerComponent;
var getUrlParameter = require('../../utils/').getUrlParameter;
var THREE = require('../../../lib/three');
var THREE = require('../../lib/three');

module.exports.Component = registerComponent('vr-mode', {
init: function () {
Expand Down
10 changes: 5 additions & 5 deletions src/core/a-entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ var AEntity;
var proto = Object.create(ANode.prototype, {
defaultComponents: {
value: {
position: '',
rotation: '',
scale: '',
visible: ''
position: '0 0 0',
rotation: '0 0 0',
scale: '1 1 1',
visible: 'true'
}
},

Expand Down Expand Up @@ -268,7 +268,7 @@ var proto = Object.create(ANode.prototype, {
// Add component if it is a dependency and not yet defined.
this.setAttribute(name, '');
} else {
if (!this.getAttribute(name) && name in this.defaultComponents) {
if (!this.hasAttribute(name) && name in this.defaultComponents) {
// For default components, expose them as part of the entity in the DOM.
this.setAttribute(name, this.defaultComponents[name]);
}
Expand Down
11 changes: 5 additions & 6 deletions src/core/a-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ var utils = require('../utils/');
* Base class for A-Frame that manages loading of objects.
*
* Nodes can be modified using mixins.
* Nodes emit a `loaded` event when they and their children have initialized. Which children
* to wait for can be customized using `loadChildrenFilter`.
* Nodes emit a `loaded` event when they and their children have initialized.
*/
module.exports = registerElement('a-node', {
prototype: Object.create(HTMLElement.prototype, {
Expand Down Expand Up @@ -37,10 +36,10 @@ module.exports = registerElement('a-node', {
},

/**
* returns the first element that matches a CSS
* selector by traversing up the DOM tree starting
* from (and including) the receiver element.
* @param {string} selector - CSS selector of the matcched element
* Returns first element matching a selector by traversing up the tree starting
* from and including receiver element.
*
* @param {string} selector - Selector of element to find.
*/
closest: {
value: function closest (selector) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/a-scene.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* global MessageChannel, Promise */
var re = require('./a-register-element');
var THREE = require('../../lib/three');
var THREE = require('../lib/three');
var TWEEN = require('tween.js');
var utils = require('../utils/');
var AEntity = require('./a-entity');
Expand Down

0 comments on commit d87c45f

Please sign in to comment.