diff --git a/tv-player/.gitignore b/tv-player/.gitignore index b512c09..76add87 100644 --- a/tv-player/.gitignore +++ b/tv-player/.gitignore @@ -1 +1,2 @@ -node_modules \ No newline at end of file +node_modules +dist \ No newline at end of file diff --git a/tv-player/index.html b/tv-player/index.html index 1e7b122..73ce6de 100644 --- a/tv-player/index.html +++ b/tv-player/index.html @@ -4,9 +4,7 @@ Retro TV Player - - - + + + @@ -38,15 +29,12 @@
-
- - - diff --git a/tv-player/preview.sh b/tv-player/preview.sh new file mode 100755 index 0000000..f5a6bea --- /dev/null +++ b/tv-player/preview.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +nix-shell -p nodejs --run "npx vite build && npx vite preview" diff --git a/tv-player/src/main.js b/tv-player/src/main.js index 5d65453..a19d709 100644 --- a/tv-player/src/main.js +++ b/tv-player/src/main.js @@ -1,5 +1,4 @@ import * as THREE from 'three'; -import './tailwind-config.js'; import { init } from './core/init.js'; // Start everything diff --git a/tv-player/src/scene/room-walls.js b/tv-player/src/scene/room-walls.js index 6275c74..8ec030c 100644 --- a/tv-player/src/scene/room-walls.js +++ b/tv-player/src/scene/room-walls.js @@ -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; diff --git a/tv-player/src/scene/root.js b/tv-player/src/scene/root.js index 0d045fc..bc62e1d 100644 --- a/tv-player/src/scene/root.js +++ b/tv-player/src/scene/root.js @@ -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); diff --git a/tv-player/src/tailwind-config.js b/tv-player/src/tailwind-config.js deleted file mode 100644 index 0861914..0000000 --- a/tv-player/src/tailwind-config.js +++ /dev/null @@ -1,10 +0,0 @@ -// Configure Tailwind for the button -tailwind.config = { - theme: { - extend: { - colors: { - 'tape-red': '#cc3333', - }, - } - } -}