Scene.js 405 B

1234567891011121314151617181920212223242526272829
  1. THREE.Scene = function () {
  2. this.objects = [];
  3. this.add = function (object) {
  4. this.objects.push(object);
  5. }
  6. /*
  7. this.remove = function (object) {
  8. var nrObjects = this.objects.length;
  9. for(var i = 0; i < nrObjects; i++) {
  10. if(object == this.objects[i]) {
  11. alert("yay");
  12. }
  13. }
  14. }
  15. */
  16. this.toString = function () {
  17. return 'THREE.Scene ( ' + this.objects + ' )';
  18. }
  19. }
粤ICP备19079148号