fixed large voxelGroup rendering

added terrain object
This commit is contained in:
azykov@mail.ru
2026-06-02 23:19:15 +03:00
parent 32386ba70f
commit 858b47e71b
3 changed files with 38 additions and 5 deletions
+3 -3
View File
@@ -89,8 +89,8 @@ export const ObjectView = observer(function ({ object }: ObjectViewProps) {
onClick={handleClick}
>
{
voxelGroups(objectType).map((vg) => (
<Instances key={vg.id}>
voxelGroups(objectType).map((vg) => {
return <Instances key={vg.id} limit={vg.positions.length}>
<boxGeometry args={[1, 1, 1]} />
<meshStandardMaterial color={vg.color} opacity={vg.opacity} transparent={vg.opacity < 1} />
{
@@ -98,7 +98,7 @@ export const ObjectView = observer(function ({ object }: ObjectViewProps) {
.map((pos, i) => <Instance key={i} position={pos} />)
}
</Instances>
))
})
}
</group>
</>);