Fix JSCAD, useEdgeSplit issue
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
Environment,
|
||||
useTexture,
|
||||
} from '@react-three/drei'
|
||||
import { useEdgeSplit } from 'src/helpers/hooks/useEdegeSplit'
|
||||
import { useEdgeSplit } from 'src/helpers/hooks/useEdgeSplit'
|
||||
import { Vector3 } from 'three'
|
||||
import { requestRender } from 'src/helpers/hooks/useIdeState'
|
||||
import texture from './dullFrontLitMetal.png'
|
||||
|
||||
@@ -16,13 +16,13 @@ export function useEdgeSplit(
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!original.current && ref.current) {
|
||||
original.current = ref.current.geometry.clone()
|
||||
original.current = ref.current.geometry?.clone()
|
||||
modifier.current = new EdgeSplitModifier()
|
||||
}
|
||||
}, [])
|
||||
|
||||
React.useEffect(() => {
|
||||
original.current = dependantGeometry.clone()
|
||||
original.current = dependantGeometry?.clone?.()
|
||||
modifier.current = new EdgeSplitModifier()
|
||||
}, [dependantGeometry])
|
||||
|
||||
Reference in New Issue
Block a user