Skip to content

Conversation

@ngokevin
Copy link
Member

@ngokevin ngokevin commented Mar 23, 2018

Description:

Save 4 component initializations per entity.

Allows for setting with object3D API on creation without the component overriding with 0/0/0:

var entity = document.createElement('a-entity');
entity.object3D.position.set(1, 2, 3);
scene.appendChild(entity);

Changes proposed:

  • Save 4 component initializations per entity.
  • Don't need pos/rot/scale/vis components initializations by default if not defined.
  • Removes a bunch of code in the component lifecycle that checks for default component

@ngokevin ngokevin force-pushed the nodefcomp branch 2 times, most recently from 927afc9 to 9270d5f Compare March 23, 2018 05:03
@ngokevin ngokevin changed the title [WIP] remove default components remove default components Mar 23, 2018
// If cached value exists, return partial component data.
var component = this.components[attr];
if (component) { return component.attrValue; }
// if (OBJECT3D_PROPERTIES.indexOf(attr) !== -1) { return this.getAttribute(attr); }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants