src/etc/SceneUtils.js
/**
	 * Creates helper points to visualize the spawning points of the game.
	 *
	 * @param {Array} spawnPoints - An array of spawn points to visualize.
	 * @return {Group} The helper.
	 */
Creates helper points to visualize the spawning points of the game.
@param {Array} spawnPoints - An array of spawn points to visualize.
@return {Group} The helper.
Creates helper points to visualize the spawning points of the game . @param { Array } spawnPoints - An array of spawn points to visualize . @return { Group } The helper .
static createSpawnPointHelper( spawnPoints ) {
		const group = new Group();
		group.matrixAutoUpdate = false;
		const nodeColor = 0xff0000;
		const nodeMaterial = new MeshBasicMaterial( { color: nodeColor } );
		const nodeGeometry = new CylinderBufferGeometry( 0.2, 0.2, 0.5 );
		nodeGeometry.translate( 0, 0.25, 0 );
		for ( let i = 0, l = spawnPoints.length; i < l; i ++ ) {
			const nodeMesh = new Mesh( nodeGeometry, nodeMaterial );
			nodeMesh.position.copy( spawnPoints[ i ].position );
			nodeMesh.matrixAutoUpdate = false;
			nodeMesh.updateMatrix();
			group.add( nodeMesh );
		}
		group.visible = false;
		return group;
	}
static createSpawnPointHelper ( spawnPoints ) { const group = new Group ( ) ; group . matrixAutoUpdate = false ; const nodeColor = 0xff0000 ; const nodeMaterial = new MeshBasicMaterial ( { color : nodeColor } ) ; const nodeGeometry = new CylinderBufferGeometry ( 0.2 , 0.2 , 0.5 ) ; nodeGeometry . translate ( 0 , 0.25 , 0 ) ; for ( let i = 0 , l = spawnPoints . length ; i < l ; i ++ ) { const nodeMesh = new Mesh ( nodeGeometry , nodeMaterial ) ; nodeMesh . position . copy ( spawnPoints [ i ] . position ) ; nodeMesh . matrixAutoUpdate = false ; nodeMesh . updateMatrix ( ) ; group . add ( nodeMesh ) ; } group . visible = false ; return group ; }
Creates helper points to visualize the spawning points of the game.
Creates helper points to visualize the spawning points of the game .