r3f-ify jsCadController

This commit is contained in:
Kurt Hutten
2021-08-21 11:04:01 +10:00
parent ac233a5920
commit b0647171d8
4 changed files with 65 additions and 45 deletions

View File

@@ -1,7 +1,10 @@
import { useReducer } from 'react'
import { cadPackages } from 'src/helpers/cadPackages'
import type { RootState } from '@react-three/fiber'
import type { RawCustomizerParams } from 'src/helpers/cadPackages/common'
import type {
RawCustomizerParams,
ArtifactTypes,
} from 'src/helpers/cadPackages/common'
import { CadhubParams } from 'src/components/Customizer/customizerConverter'
function withThunk(dispatch, getState) {
@@ -113,7 +116,7 @@ export interface State {
consoleMessages: { type: 'message' | 'error'; message: string; time: Date }[]
code: string
objectData: {
type: 'INIT' | 'stl' | 'png' | 'geometry'
type: 'INIT' | ArtifactTypes
data: any
quality: 'low' | 'high'
}