adding default shadows even without ground

This commit is contained in:
wass08
2026-02-17 13:12:31 +09:00
parent d833245fbf
commit a5dc766b1a
@@ -1,7 +1,7 @@
import { type SiteNode, useRegistry } from '@pascal-app/core' import { type SiteNode, useRegistry } from '@pascal-app/core'
import { Html } from '@react-three/drei' import { Html } from '@react-three/drei'
import { useMemo, useRef } from 'react' import { useMemo, useRef } from 'react'
import { BufferGeometry, DoubleSide, Float32BufferAttribute, type Group, Shape } from 'three' import { BufferGeometry, Float32BufferAttribute, type Group, Shape } from 'three'
import { useNodeEvents } from '../../../hooks/use-node-events' import { useNodeEvents } from '../../../hooks/use-node-events'
import { NodeRenderer } from '../node-renderer' import { NodeRenderer } from '../node-renderer'
@@ -91,26 +91,15 @@ export const SiteRenderer = ({ node }: { node: SiteNode }) => {
))} ))}
{/* Transparent floor fill */} {/* Transparent floor fill */}
<mesh position={[0, Y_OFFSET - 0.005, 0]} rotation={[-Math.PI / 2, 0, 0]}> <mesh position={[0, Y_OFFSET - 0.005, 0]} rotation={[-Math.PI / 2, 0, 0]} receiveShadow>
<shapeGeometry args={[floorShape]} /> <shapeGeometry args={[floorShape]} />
<meshBasicMaterial <shadowMaterial transparent opacity={0.75} />
color="#f59e0b"
transparent
opacity={0.05}
side={DoubleSide}
depthWrite={false}
/>
</mesh> </mesh>
{/* Simple boundary line */} {/* Simple boundary line */}
{/* @ts-ignore */} {/* @ts-ignore */}
<line geometry={lineGeometry} frustumCulled={false} renderOrder={9}> <line geometry={lineGeometry} frustumCulled={false} renderOrder={9}>
<lineBasicMaterial <lineBasicMaterial color="#f59e0b" linewidth={2} transparent opacity={0.6} />
color="#f59e0b"
linewidth={2}
transparent
opacity={0.6}
/>
</line> </line>
{/* Edge distance labels */} {/* Edge distance labels */}