src/core/SpawningManager.js
/**
	* Inits the spawning points from the parsed configuration file.
	*
	* @return {SpawningManager} A reference to this spawning manager.
	*/
Inits the spawning points from the parsed configuration file.
@return {SpawningManager} A reference to this spawning manager.
Inits the spawning points from the parsed configuration file . @return { SpawningManager } A reference to this spawning manager .
initSpawningPoints() {
		const levelConfig = this.world.assetManager.configs.get( 'level' );
		for ( const spawningPoint of levelConfig.competitorSpawningPoints ) {
			const position = spawningPoint.position;
			const rotation = spawningPoint.rotation;
			this.spawningPoints.push( {
				position: new Vector3().fromArray( position ),
				rotation: { x: rotation[ 0 ], y: rotation[ 1 ], z: rotation[ 2 ] } 
			} );
		}
		for ( const spawningPoint of levelConfig.healthPackSpawningPoints ) {
			this.healthPackSpawningPoints.push( new Vector3().fromArray( spawningPoint ) );
		}
		for ( const spawningPoint of levelConfig.shotgunSpawningPoints ) {
			this.shotgunSpawningPoints.push( new Vector3().fromArray( spawningPoint ) );
		}
		for ( const spawningPoint of levelConfig.assaultRilflesSpawningPoints ) {
			this.assaultRilflesSpawningPoints.push( new Vector3().fromArray( spawningPoint ) );
		}
		return this;
	}
initSpawningPoints ( ) { const levelConfig = this . world . assetManager . configs . get ( 'level' ) ; for ( const spawningPoint of levelConfig . competitorSpawningPoints ) { const position = spawningPoint . position ; const rotation = spawningPoint . rotation ; this . spawningPoints . push ( { position : new Vector3 ( ) . fromArray ( position ) , rotation : { x : rotation [ 0 ] , y : rotation [ 1 ] , z : rotation [ 2 ] } } ) ; } for ( const spawningPoint of levelConfig . healthPackSpawningPoints ) { this . healthPackSpawningPoints . push ( new Vector3 ( ) . fromArray ( spawningPoint ) ) ; } for ( const spawningPoint of levelConfig . shotgunSpawningPoints ) { this . shotgunSpawningPoints . push ( new Vector3 ( ) . fromArray ( spawningPoint ) ) ; } for ( const spawningPoint of levelConfig . assaultRilflesSpawningPoints ) { this . assaultRilflesSpawningPoints . push ( new Vector3 ( ) . fromArray ( spawningPoint ) ) ; } return this ; }
Inits the spawning points from the parsed configuration file.
Inits the spawning points from the parsed configuration file .
// euler angles