slab renderer

This commit is contained in:
wass08
2026-01-27 07:32:46 +09:00
parent 8b1fbb4c1d
commit 8940f70117
7 changed files with 467 additions and 1 deletions
@@ -0,0 +1,17 @@
import { useRegistry, type SlabNode } from '@pascal-app/core'
import { useRef } from 'react'
import type { Mesh } from 'three'
export const SlabRenderer = ({ node }: { node: SlabNode }) => {
const ref = useRef<Mesh>(null!)
useRegistry(node.id, 'slab', ref)
return (
<mesh ref={ref} castShadow receiveShadow>
{/* SlabSystem will replace this geometry in the next frame */}
<boxGeometry args={[0, 0, 0]} />
<meshStandardMaterial color="#e5e5e5" />
</mesh>
)
}