Skip to content

Commit

Permalink
fix: Line accepts readonly points and vertex colors (#2055)
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoHamuy authored Sep 20, 2024
1 parent 6c9cd38 commit 115d464
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/Line.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import { Vector2, Vector3, Vector4, Color, ColorRepresentation } from 'three'
import { ReactThreeFiber, useThree } from '@react-three/fiber'
import { ReactThreeFiber, useThree, Vector2 as FiberVector2, Vector3 as FiberVector3 } from '@react-three/fiber'
import {
LineGeometry,
LineSegmentsGeometry,
Expand All @@ -12,8 +12,8 @@ import {
import { ForwardRefComponent } from '../helpers/ts-utils'

export type LineProps = {
points: Array<Vector3 | Vector2 | [number, number, number] | [number, number] | number>
vertexColors?: Array<Color | [number, number, number] | [number, number, number, number]>
points: ReadonlyArray<FiberVector2 | FiberVector3>
vertexColors?: ReadonlyArray<Color | [number, number, number] | [number, number, number, number]>
lineWidth?: number
segments?: boolean
} & Omit<LineMaterialParameters, 'vertexColors' | 'color'> &
Expand Down

0 comments on commit 115d464

Please sign in to comment.