| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- /**
- * @author mr.doob / http://mrdoob.com/
- */
- THREE.Scene = function () {
- this.objects = [];
- this.lights = [];
- this.addObject = function ( object ) {
- var i = this.objects.indexOf( object );
- if ( i === -1 ) {
- 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 ) {
- var i = this.lights.indexOf( light );
- if ( i === -1 ) {
- 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 + ' )';
- };
- };
|