Fix: production build

This commit is contained in:
Dejvino
2025-11-17 18:21:00 +01:00
parent cf3b915666
commit bc79301364
7 changed files with 17 additions and 32 deletions
+2 -1
View File
@@ -1,8 +1,9 @@
import * as THREE from 'three';
import { state } from '../state.js';
import wallTextureUrl from '/textures/wall.jpg';
export function createRoomWalls() {
const wallTexture = state.loader.load('/textures/wall.jpg');
const wallTexture = state.loader.load(wallTextureUrl);
wallTexture.wrapS = THREE.RepeatWrapping;
wallTexture.wrapT = THREE.RepeatWrapping;
+6 -3
View File
@@ -5,6 +5,9 @@ import { createBookshelf } from './bookshelf.js';
import { createDoor } from './door.js';
import { createTvSet } from './tv-set.js';
import { PictureFrame } from './PictureFrame.js';
import painting1 from '/textures/painting1.jpg';
import painting2 from '/textures/painting2.jpg';
import floorTextureUrl from '/textures/floor.jpg';
// --- Scene Modeling Function ---
export function createSceneObjects() {
@@ -17,7 +20,7 @@ export function createSceneObjects() {
// --- 1. Floor ---
const floorGeometry = new THREE.PlaneGeometry(20, 20);
const floorTexture = state.loader.load('/textures/floor.jpg');
const floorTexture = state.loader.load(floorTextureUrl);
floorTexture.wrapS = THREE.RepeatWrapping;
floorTexture.wrapT = THREE.RepeatWrapping;
floorTexture.repeat.set(state.roomSize, state.roomSize);
@@ -139,7 +142,7 @@ export function createSceneObjects() {
position: new THREE.Vector3(-state.roomSize/2 + 0.1, 2.0, -state.roomSize/2 + 1.5),
width: 1.5,
height: 1,
imageUrls: ['/textures/painting1.jpg', '/textures/painting2.jpg'],
imageUrls: [painting1, painting2],
rotationY: Math.PI / 2
});
state.pictureFrames.push(pictureFrame);
@@ -148,7 +151,7 @@ export function createSceneObjects() {
position: new THREE.Vector3(state.roomSize/2 - 0.1, 2.0, 0.5),
width: 1.5,
height: 1,
imageUrls: ['/textures/painting2.jpg', '/textures/painting1.jpg'],
imageUrls: [painting2, painting1],
rotationY: -Math.PI / 2
});
state.pictureFrames.push(pictureFrame2);