diff --git a/app/src/assets/textures/floor/blue.png b/app/src/assets/textures/floor/blue.png new file mode 100644 index 0000000..343445d Binary files /dev/null and b/app/src/assets/textures/floor/blue.png differ diff --git a/app/src/assets/textures/floor/white.png b/app/src/assets/textures/floor/white.png index efc1ea4..3d3418b 100644 Binary files a/app/src/assets/textures/floor/white.png and b/app/src/assets/textures/floor/white.png differ diff --git a/app/src/assets/textures/floor/white1.png b/app/src/assets/textures/floor/white1.png new file mode 100644 index 0000000..0270b48 Binary files /dev/null and b/app/src/assets/textures/floor/white1.png differ diff --git a/app/src/modules/builder/geomentries/floors/addFloorToScene.ts b/app/src/modules/builder/geomentries/floors/addFloorToScene.ts index 71f2d24..c0b3453 100644 --- a/app/src/modules/builder/geomentries/floors/addFloorToScene.ts +++ b/app/src/modules/builder/geomentries/floors/addFloorToScene.ts @@ -2,7 +2,7 @@ import * as THREE from 'three'; import * as Types from "../../../../types/world/worldTypes"; import * as CONSTANTS from "../../../../types/world/worldConstants"; -import texturePath from "../../../../assets/textures/floor/white.png"; +import texturePath from "../../../../assets/textures/floor/white1.png"; import texturePathDark from "../../../../assets/textures/floor/black.png"; // Cache for materials diff --git a/app/src/modules/builder/geomentries/floors/loadOnlyFloors.ts b/app/src/modules/builder/geomentries/floors/loadOnlyFloors.ts index 9400be2..4d32979 100644 --- a/app/src/modules/builder/geomentries/floors/loadOnlyFloors.ts +++ b/app/src/modules/builder/geomentries/floors/loadOnlyFloors.ts @@ -3,6 +3,9 @@ import * as turf from '@turf/turf'; import * as CONSTANTS from '../../../../types/world/worldConstants'; import * as Types from "../../../../types/world/worldTypes"; +// temp +import blueFloorImage from "../../../../assets/textures/floor/blue.png" + function loadOnlyFloors( floorGroup: Types.RefGroup, linesByLayer: any, @@ -160,18 +163,22 @@ function loadOnlyFloors( shape.closePath(); const extrudeSettings = { - depth: CONSTANTS.floorConfig.height, + depth: 0.3, bevelEnabled: false }; + const texture = new THREE.TextureLoader().load(blueFloorImage); + texture.wrapS = texture.wrapT = THREE.RepeatWrapping; + texture.colorSpace = THREE.SRGBColorSpace; + const geometry = new THREE.ExtrudeGeometry(shape, extrudeSettings); - const material = new THREE.MeshStandardMaterial({ color: CONSTANTS.floorConfig.defaultColor, side: THREE.DoubleSide }); + const material = new THREE.MeshStandardMaterial({ color: CONSTANTS.floorConfig.defaultColor, side: THREE.DoubleSide, map: texture }); const mesh = new THREE.Mesh(geometry, material); mesh.castShadow = true; mesh.receiveShadow = true; - mesh.position.y = (floor[0][0][2] - 1) * CONSTANTS.wallConfig.height; + mesh.position.y = (floor[0][0][2] - 0.99) * CONSTANTS.wallConfig.height; mesh.rotateX(Math.PI / 2); mesh.name = `Only_Floor_Line_${floor[0][0][2]}`; diff --git a/app/src/types/world/worldConstants.ts b/app/src/types/world/worldConstants.ts index 1d49585..83933b7 100644 --- a/app/src/types/world/worldConstants.ts +++ b/app/src/types/world/worldConstants.ts @@ -331,7 +331,7 @@ export const lineConfig: LineConfig = { export const wallConfig: WallConfig = { defaultColor: "#f2f2f2", // Default color of the walls - height: 7, // Height of the walls + height: 7.5, // Height of the walls width: 0.05, // Width of the walls };