Skip to content

Instantly share code, notes, and snippets.

@bsparks
Created October 16, 2014 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsparks/97e6e1aad6bff8a07ba8 to your computer and use it in GitHub Desktop.
Save bsparks/97e6e1aad6bff8a07ba8 to your computer and use it in GitHub Desktop.
ces test code
var cube = EntityBuilder.build('Cubey-Doobey-Doo', {
position: [0, 3, 0],
components: {
model: {
//default
},
script: {
scripts: [
'assets/scripts/test.js'
]
}
}
});
// this tests that a child added prior to the parent being added to the world
// is still registered by the entity list
for (var x = 0; x < 10; x++) {
cube.add(EntityBuilder.build('Test Light ' + x, {
position: [x * 2, 5, 0],
components: {
light: {
type: 'PointLight'
}
}
}));
}
//cube.add(testChild);
$rootWorld.addEntity(cube);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment