simple export

This commit is contained in:
Adrien MALINGREY 2023-06-05 03:21:15 +02:00
parent a508a3710f
commit cbcec7e387
2 changed files with 3 additions and 5 deletions

View File

@ -2,7 +2,7 @@ import * as THREE from 'three';
const mazeGeometry = new THREE.BoxGeometry( 1, 1, 1 );
class MazeMesh extends THREE.InstancedMesh {
export default class MazeMesh extends THREE.InstancedMesh {
constructor( width, length, material ) {
super( mazeGeometry, material, width*length - 2 );
this.length = length
@ -59,6 +59,4 @@ class MazeMesh extends THREE.InstancedMesh {
return -1
}
}
}
export { MazeMesh }
}

View File

@ -12,7 +12,7 @@ import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
import { Water } from 'three/addons/objects/Water.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 longitude = THREE.MathUtils.degToRad(25)