Black Trigram (흑괘) - Korean Martial Arts Combat Simulator API - v0.7.9
    Preparing search index...
    InstancableSpheres: React.FC<InstancableSpheresProps> = ...

    Instanced spheres component

    Renders multiple spheres with a single draw call. Ideal for particles, projectiles, effects.

    Important: The instances array should be stable (use useMemo). Array indices are used as React keys, so adding/removing/reordering instances during component lifecycle may cause incorrect rendering. If instances need to be dynamic, consider using unique identifiers as keys.

    const particles = useMemo(() =>
    Array.from({ length: 50 }, (_, i) => ({
    position: [Math.random() * 10 - 5, Math.random() * 10, Math.random() * 10 - 5],
    color: i % 2 === 0 ? 0x00ffff : 0xffd700,
    })),
    []
    );

    <InstancableSpheres
    instances={particles}
    radius={0.1}
    segments={8}
    />