123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /**
- * @author mr.doob / http://mrdoob.com/
- */
- THREE.Scene = function () {
- this.objects = [];
- this.lights = [];
- this.addObject = function ( object ) {
- this.objects.push( object );
- };
- this.removeObject = function ( object ) {
- var i = this.objects.indexOf( object );
- if ( i !== -1 ) {
- this.objects.splice( i, 1 );
- }
-
- };
- this.addLight = function ( light ) {
- this.lights.push( light );
- };
- this.removeLight = function ( light ) {
- var i = this.lights.indexOf( light );
- if ( i !== -1 ) {
- this.lights.splice( i, 1 );
- }
- };
- this.toString = function () {
- return 'THREE.Scene ( ' + this.objects + ' )';
- };
- };
|