Created
October 16, 2014 21:03
-
-
Save bsparks/97e6e1aad6bff8a07ba8 to your computer and use it in GitHub Desktop.
ces test code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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