From a2ca3153f4e6261792dc7383bdf93b715f8d3782 Mon Sep 17 00:00:00 2001 From: David Reed Date: Tue, 7 Nov 2023 00:09:15 -0500 Subject: [PATCH] fix: add material parameters to `SegmentsProps` --- README.md | 9 +++++++-- src/core/Segments.tsx | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9bc47afb7..beac45e5b 100644 --- a/README.md +++ b/README.md @@ -2468,7 +2468,7 @@ type Props = { /** Event callback when each frame changes */ onFrame?: Function /** @deprecated Control when the animation runs*/ - play?: boolean + play?: boolean /** Control when the animation pauses */ pause?: boolean /** Whether or not the Sprite should flip sides on the x-axis */ @@ -3234,7 +3234,12 @@ A wrapper around [THREE.LineSegments](https://threejs.org/docs/#api/en/objects/L ##### Prop based: ```jsx - + diff --git a/src/core/Segments.tsx b/src/core/Segments.tsx index ba16ed7c9..1cea63267 100644 --- a/src/core/Segments.tsx +++ b/src/core/Segments.tsx @@ -2,10 +2,10 @@ import * as THREE from 'three' import * as React from 'react' import mergeRefs from 'react-merge-refs' import { extend, useFrame, ReactThreeFiber } from '@react-three/fiber' -import { Line2, LineSegmentsGeometry, LineMaterial } from 'three-stdlib' +import { Line2, LineSegmentsGeometry, LineMaterial, LineMaterialParameters } from 'three-stdlib' import { ForwardRefComponent } from '../helpers/ts-utils' -type SegmentsProps = { +type SegmentsProps = LineMaterialParameters & { limit?: number lineWidth?: number children: React.ReactNode