diff --git a/src/lib/api/graphql/apollo.ts b/src/lib/api/graphql/apollo.ts
index 774a711eb..a3677bda9 100644
--- a/src/lib/api/graphql/apollo.ts
+++ b/src/lib/api/graphql/apollo.ts
@@ -1033,6 +1033,7 @@ export const isCanvasStatePaperSetVar = makeVar(false) // boolean: false | true
// ** canvasStateThreeD(s)
export const canvasStateThreeDVar = makeVar(canvasStateThreeDVarDefaults)
// console.debug('canvasStateThreeDVar()', canvasStateThreeDVar())
+ // console.debug('canvasStateThreeDVar().state.scene', canvasStateThreeDVar().state.scene)
export const isCanvasStateThreeDSetVar = makeVar(false) // boolean: false | true
// console.debug('isCanvasStatePaperSetVar()', isCanvasStatePaperSetVar())
diff --git a/src/lib/threed/HomeDesign.tsx b/src/lib/threed/HomeDesign.tsx
index df3b8a93e..7fe1a1184 100644
--- a/src/lib/threed/HomeDesign.tsx
+++ b/src/lib/threed/HomeDesign.tsx
@@ -3267,6 +3267,9 @@ function closeAllModals() {
const ViewProperties = () => {
// console.debug('PropertiesView loading...')
+ // ** HOOKS
+ const useCanvasStateThreeDVar: Object = useReactiveVar(canvasStateThreeDVar)
+
return (
<>
{
Preview
@@ -5273,7 +5285,7 @@ function initThreed(threedItem: any, scene: any) {
imageN.visible = false
// scene.add(meshN)
- // canvasStateThreeDVar().scene.add(meshN)
+ // @ts-expect-error
canvasStateThreeDVar().state.scene.add(meshN)
console.debug('meshN added to scene')
@@ -5283,7 +5295,7 @@ function initThreed(threedItem: any, scene: any) {
// scene.add(OBJa)
- // canvasStateThreeDVar().scene.add(OBJa)
+ // @ts-expect-error
canvasStateThreeDVar().state.scene.add(OBJa)
console.debug('OBJa added to scene')
@@ -5467,7 +5479,9 @@ function redrawGrid(): boolean {
const planViewHeight = planView.clientHeight
console.debug('redrawGrid: planView.width:height', planViewWidth, planViewHeight)
const planCanvas = document.getElementById('planCanvas')
+ // @ts-expect-error
planCanvas.width = planViewWidth
+ // @ts-expect-error
planCanvas.height = planViewHeight
const planCanvasWidth = planCanvas.clientWidth
const planCanvasHeight = planCanvas.clientHeight
@@ -5799,8 +5813,8 @@ export default function ThreeDHomeDesign({
// const [isPrefsLoaded, setIsPrefsLoaded] = useState(isPreferencesSetVar())
// ** USE CANVAS STATE
- // const canvasState = useReactiveVar(canvasStateThreeDVar) // YES !!
- // console.debug('%c⚙️ ThreeD Home Design canvasState', ccm.orangeAlert, canvasState)
+ const useCanvasStateThreeDVar = useReactiveVar(canvasStateThreeDVar) // YES !!
+ // console.debug('%c⚙️ ThreeD Home Design useCanvasStateThreeDVar', ccm.orangeAlert, useCanvasStateThreeDVar)
// ** INIT CANVAS STATE
// const [isCanvasLoaded, setIsCanvasLoaded] = useState(false)
// const [isCanvasStateLoaded, setIsCanvasStateLoaded] = useState(isCanvasStateSetVar())
@@ -6479,8 +6493,9 @@ export default function ThreeDHomeDesign({
// ** [MM] CLOSER.. NOT EVEN CLOSE
if (draggingThreedItem) {
+ // @ts-expect-error
addThreed(e, draggingThreedItem, canvasStateThreeDVar().state.scene)
- // addThreed(e, draggingThreedItem, canvasState.state.scene)
+ // addThreed(e, draggingThreedItem, useCanvasStateThreeDVar.state.scene)
void (draggingNewGuide && (draggingNewGuide = false))
}