simple export
This commit is contained in:
		| @ -2,7 +2,7 @@ import * as THREE from 'three'; | |||||||
|  |  | ||||||
| const mazeGeometry = new THREE.BoxGeometry( 1, 1, 1 ); | const mazeGeometry = new THREE.BoxGeometry( 1, 1, 1 ); | ||||||
|  |  | ||||||
| class MazeMesh extends THREE.InstancedMesh { | export default class MazeMesh extends THREE.InstancedMesh { | ||||||
|     constructor( width, length, material ) { |     constructor( width, length, material ) { | ||||||
|         super( mazeGeometry, material, width*length - 2 ); |         super( mazeGeometry, material, width*length - 2 ); | ||||||
|         this.length = length |         this.length = length | ||||||
| @ -60,5 +60,3 @@ class MazeMesh extends THREE.InstancedMesh { | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| export { MazeMesh } |  | ||||||
							
								
								
									
										2
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.js
									
									
									
									
									
								
							| @ -12,7 +12,7 @@ import { GUI } from 'three/addons/libs/lil-gui.module.min.js'; | |||||||
| import { Water } from 'three/addons/objects/Water.js'; | import { Water } from 'three/addons/objects/Water.js'; | ||||||
| import { Sky } from 'three/addons/objects/Sky.js'; | import { Sky } from 'three/addons/objects/Sky.js'; | ||||||
|  |  | ||||||
| import { MazeMesh } from './MazeMesh.js'; | import MazeMesh from './MazeMesh.js'; | ||||||
|  |  | ||||||
| const latitude  = THREE.MathUtils.degToRad(35) | const latitude  = THREE.MathUtils.degToRad(35) | ||||||
| const longitude = THREE.MathUtils.degToRad(25) | const longitude = THREE.MathUtils.degToRad(25) | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user