fixed large voxelGroup rendering
added terrain object
This commit is contained in:
@@ -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>
|
||||
</>);
|
||||
|
||||
Reference in New Issue
Block a user