Fix key prop in PointsCreator component: add unique key for nested point mapping to improve rendering performance.
This commit is contained in:
parent
4fc014cd28
commit
52c6017649
|
@ -122,7 +122,7 @@ function PointsCreator() {
|
||||||
key={i}
|
key={i}
|
||||||
position={new THREE.Vector3(...event.position)}
|
position={new THREE.Vector3(...event.position)}
|
||||||
>
|
>
|
||||||
{event.points.map((point) => (
|
{event.points.map((point, j) => (
|
||||||
<mesh
|
<mesh
|
||||||
name="Event-Sphere"
|
name="Event-Sphere"
|
||||||
uuid={point.uuid}
|
uuid={point.uuid}
|
||||||
|
@ -133,6 +133,7 @@ function PointsCreator() {
|
||||||
sphereRefs.current[point.uuid]
|
sphereRefs.current[point.uuid]
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
|
key={`${i}-${j}`}
|
||||||
position={new THREE.Vector3(...point.position)}
|
position={new THREE.Vector3(...point.position)}
|
||||||
userData={{
|
userData={{
|
||||||
modelUuid: event.modelUuid,
|
modelUuid: event.modelUuid,
|
||||||
|
|
Loading…
Reference in New Issue