This commit is contained in:
2023-06-12 23:27:10 +02:00
parent 3541f1d461
commit b4ae6a8426

View File

@ -54,18 +54,18 @@ renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFShadowMap; renderer.shadowMap.type = THREE.PCFShadowMap;
container.appendChild(renderer.domElement); container.appendChild(renderer.domElement);
const scene = new THREE.Scene(); const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.1, 1000); const camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.rotation.order = 'YXZ'; camera.rotation.order = 'YXZ';
camera.position.set(0, 25, 0); camera.position.set(0, 25, 0);
const worldOctree = new Octree(); const worldOctree = new Octree();
const raftOctree = new Octree(); const raftOctree = new Octree();
// Maze // Maze
const wallTexture = loader.load('img/wall.jpg'); const wallTexture = loader.load('img/wall.jpg');
const wallMaterial = new THREE.MeshPhongMaterial({ const wallMaterial = new THREE.MeshPhongMaterial({
map: wallTexture, map: wallTexture,
color: 0xFCF8E5, color: 0xFCF8E5,
@ -73,7 +73,7 @@ const wallMaterial = new THREE.MeshPhongMaterial({
specular: 0x505050, specular: 0x505050,
shininess: 4, shininess: 4,
bumpMap: wallTexture, bumpMap: wallTexture,
bumpScale: .01, bumpScale: .005,
depthFunc: 3, depthFunc: 3,
depthTest: true, depthTest: true,
depthWrite: true depthWrite: true