new items

This commit is contained in:
wass08
2026-01-29 16:17:35 +09:00
parent 07dee4aefc
commit edb2b181c2
29 changed files with 398 additions and 48 deletions
@@ -1,5 +1,346 @@
import { AssetInput, ItemNode } from "@pascal-app/core"; import { AssetInput, ItemNode } from "@pascal-app/core";
export const CATALOG_ITEMS: AssetInput[] = [ export const CATALOG_ITEMS: AssetInput[] = [
{
"id": "pillar",
"category": "outdoor",
"name": "pillar",
"thumbnail": "/items/pillar/thumbnail.webp",
"src": "/items/pillar/model.glb",
"scale": [
1,
1,
1
],
"offset": [
0,
0,
0
],
"rotation": [
0,
0,
0
],
"dimensions": [
0.5,
1.3,
0.5
]
},
{
"id": "patio-umbrella",
"category": "outdoor",
"name": "patio-umbrella",
"thumbnail": "/items/patio-umbrella/thumbnail.webp",
"src": "/items/patio-umbrella/model.glb",
"scale": [
0.96,
0.96,
0.96
],
"offset": [
0,
0,
0
],
"rotation": [
0,
0,
0
],
"dimensions": [
1,
3,
1
]
},
{
"id": "door-bar",
"category": "door",
"name": "door-bar",
"thumbnail": "/items/door-bar/thumbnail.webp",
"src": "/items/door-bar/model.glb",
"scale": [
1,
1,
1
],
"offset": [
-0.48,
0,
0
],
"rotation": [
0,
0,
0
],
"dimensions": [
1.5,
2.5,
0.5
],
"attachTo": "wall"
},
{
"id": "column",
"category": "furniture",
"name": "column",
"thumbnail": "/items/column/thumbnail.webp",
"src": "/items/column/model.glb",
"scale": [
1,
1,
1
],
"offset": [
0,
1.26,
0
],
"rotation": [
0,
0,
0
],
"dimensions": [
0.5,
2.6,
0.5
]
},
{
"id": "stairs",
"category": "furniture",
"name": "stairs",
"thumbnail": "/items/stairs/thumbnail.webp",
"src": "/items/stairs/model.glb",
"scale": [
0.91,
0.91,
0.91
],
"offset": [
0,
0.03,
2.7
],
"rotation": [
0,
0,
0
],
"dimensions": [
1.5,
3.7,
5
]
},
{
"id": "bush",
"category": "outdoor",
"name": "bush",
"thumbnail": "/items/bush/thumbnail.webp",
"src": "/items/bush/model.glb",
"scale": [
0.96,
0.96,
0.96
],
"offset": [
-0.14,
0.01,
-0.13
],
"rotation": [
0,
0,
0
],
"dimensions": [
3,
1.1,
1
]
},
{
"id": "high-fence",
"category": "outdoor",
"name": "high-fence",
"thumbnail": "/items/high-fence/thumbnail.webp",
"src": "/items/high-fence/model.glb",
"scale": [
1,
1,
1
],
"offset": [
0,
0.01,
0
],
"rotation": [
0,
0,
0
],
"dimensions": [
4,
4.1,
0.5
]
},
{
"id": "low-fence",
"category": "outdoor",
"name": "low-fence",
"thumbnail": "/items/low-fence/thumbnail.webp",
"src": "/items/low-fence/model.glb",
"scale": [
1,
1,
1
],
"offset": [
0,
0.01,
0
],
"rotation": [
0,
0,
0
],
"dimensions": [
2,
0.8,
0.5
]
},
{
"id": "fir-tree",
"category": "outdoor",
"name": "fir-tree",
"thumbnail": "/items/fir-tree/thumbnail.webp",
"src": "/items/fir-tree/model.glb",
"scale": [
1,
1,
1
],
"offset": [
-0.09,
0.05,
0.03
],
"rotation": [
0,
0,
0
],
"dimensions": [
1.5,
3.2,
1.5
]
},
{
"id": "tree",
"category": "outdoor",
"name": "tree",
"thumbnail": "/items/tree/thumbnail.webp",
"src": "/items/tree/model.glb",
"scale": [
0.65,
0.65,
0.65
],
"offset": [
0.09,
0.17,
0.06
],
"rotation": [
0,
0,
0
],
"dimensions": [
4,
5,
4
]
},
{
"id": "window-double",
"category": "window",
"name": "Window-double",
"thumbnail": "/items/window-double/thumbnail.webp",
"src": "/items/window-double/model.glb",
"scale": [
0.75,
0.75,
0.75
],
"offset": [
0,
-0.18,
0.02
],
"rotation": [
0,
3.14,
0
],
"dimensions": [
1.5,
1.5,
0.5
],
"attachTo": "wall"
},
{
"id": "window-simple",
"category": "window",
"name": "Window-simple",
"thumbnail": "/items/window-simple/thumbnail.webp",
"src": "/items/window-simple/model.glb",
"scale": [
1,
1,
1
],
"offset": [
1.06,
0,
0.05
],
"rotation": [
0,
3.14,
0
],
"dimensions": [
1.5,
2,
0.5
],
"attachTo": "wall"
},
{ {
id: "shower-rug", id: "shower-rug",
category: "furniture", category: "furniture",
@@ -49,27 +390,31 @@ export const CATALOG_ITEMS: AssetInput[] = [
}, },
{ {
id: "fence", "id": "low-fence",
category: "outdoor", "category": "outdoor",
name: "fence", "name": "low-fence",
thumbnail: "/items/fence/thumbnail.webp", "thumbnail": "/items/low-fence/thumbnail.webp",
src: "/items/fence/model.glb", "src": "/items/low-fence/model.glb",
scale: [0.8, 0.8, 0.8], "scale": [
offset: [0, 0, 0], 1,
rotation: [0, 0, 0], 1,
dimensions: [2, 0.7, 0.5], 1
}, ],
"offset": [
{ 0,
id: "patio-umbrella", 0.01,
category: "outdoor", 0
name: "patio-umbrella", ],
thumbnail: "/items/patio-umbrella/thumbnail.webp", "rotation": [
src: "/items/patio-umbrella/model.glb", 0,
scale: [0.8, 0.8, 0.8], 0,
offset: [0, 0, 0], 0
rotation: [0, 0, 0], ],
dimensions: [1, 3, 1], "dimensions": [
2,
0.8,
0.5
]
}, },
{ {
@@ -150,29 +495,32 @@ export const CATALOG_ITEMS: AssetInput[] = [
}, },
{ {
id: "window-large", "id": "window-rectangle",
category: "window", "category": "window",
name: "window-large", "name": "Window-rectangle",
thumbnail: "/items/window-large/thumbnail.webp", "thumbnail": "/items/window-rectangle/thumbnail.webp",
src: "/items/window-large/model.glb", "src": "/items/window-rectangle/model.glb",
scale: [1, 1, 1], "scale": [
offset: [0, 1, 0], 0.95,
rotation: [0, 0, 0], 1,
dimensions: [2, 2, 0.4], 1
attachTo: "wall", ],
}, "offset": [
-1.65,
{ -0.34,
id: "window-rectangle", 0.1
category: "window", ],
name: "window-rectangle", "rotation": [
thumbnail: "/items/window-rectangle/thumbnail.webp", 0,
src: "/items/window-rectangle/model.glb", 3.14,
scale: [0.68, 0.68, 0.68], 0
offset: [0, 0.75, 0], ],
rotation: [0, 0, 0], "dimensions": [
dimensions: [2, 1.5, 0.4], 3,
attachTo: "wall", 2,
0.5
],
"attachTo": "wall"
}, },
{ {
@@ -194,10 +542,10 @@ export const CATALOG_ITEMS: AssetInput[] = [
name: "door", name: "door",
thumbnail: "/items/door/thumbnail.webp", thumbnail: "/items/door/thumbnail.webp",
src: "/items/door/model.glb", src: "/items/door/model.glb",
scale: [0.9, 0.9, 0.9], scale: [0.8, 0.8, 0.8],
offset: [-0.43, 0, 0], offset: [-0.43, 0, 0],
rotation: [0, 0, 0], rotation: [0, 0, 0],
dimensions: [1.5, 2.5, 0.4], dimensions: [1.5, 2, 0.4],
attachTo: "wall", attachTo: "wall",
}, },
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@@ -3,7 +3,7 @@ import { Clone } from '@react-three/drei/core/Clone'
import { useGLTF } from '@react-three/drei/core/Gltf' import { useGLTF } from '@react-three/drei/core/Gltf'
import { Suspense, useEffect, useMemo, useRef } from 'react' import { Suspense, useEffect, useMemo, useRef } from 'react'
import type { Group, Material, Mesh } from 'three' import type { Group, Material, Mesh } from 'three'
import { MeshStandardNodeMaterial } from 'three/webgpu' import { DoubleSide, MeshStandardNodeMaterial } from 'three/webgpu'
import { useNodeEvents } from '../../../hooks/use-node-events' import { useNodeEvents } from '../../../hooks/use-node-events'
// Shared materials to avoid creating new instances for every mesh // Shared materials to avoid creating new instances for every mesh
@@ -20,6 +20,8 @@ const glassMaterial = new MeshStandardNodeMaterial({
metalness: 0, metalness: 0,
transparent: true, transparent: true,
opacity: 0.25, opacity: 0.25,
side: DoubleSide,
depthWrite: false,
}) })
const getMaterialForOriginal = (original: Material): MeshStandardNodeMaterial => { const getMaterialForOriginal = (original: Material): MeshStandardNodeMaterial => {