Skip to content

Commit

Permalink
🥕 v0.17.0-b19 🌱 ThreeD: Home Design
Browse files Browse the repository at this point in the history
  • Loading branch information
marty-mcgee committed Jan 8, 2025
1 parent 617cccd commit 53e1b27
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions src/lib/threed/HomeDesign.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ const PaperCanvas = (props: any) => {

initThreeDPaperPlanView(planCanvas)
initPaperOrbitControls()
draw1()
drawFreestyle()
// **
// console.debug('%c PaperCanvas THREED PAPER JS: initThreeDPaperPlanView(planCanvasRef)', ccm.darkorangeAlert, planCanvasRef.current)
// console.debug(`%c PaperCanvas planCanvas`, ccm.darkgreenAlert, planCanvas)
Expand Down Expand Up @@ -671,14 +671,14 @@ const PaperCanvas = (props: any) => {
}

// ** SIMPLE DRAWING FUNCTION
const draw1 = () => {
const drawFreestyle = () => {
let myPath = new paper.Path()
// **
paper.view.onMouseDown = (event: any) => {
// myPath.remove()
// @ts-expect-error
myPath.strokeColor = 'orange'
myPath.strokeWidth = 3
myPath.strokeWidth = 4
}
// **
paper.view.onMouseDrag = (event: any) => {
Expand All @@ -689,7 +689,7 @@ const draw1 = () => {
paper.view.onMouseUp = (event: any) => {
// @ts-expect-error
myPath.strokeColor = 'darkgreen'
myPath.strokeWidth = 3
myPath.strokeWidth = 4
// reset myPath
myPath = new paper.Path()
}
Expand Down Expand Up @@ -867,16 +867,6 @@ function initThreeDPaperPlanView(planCanvas: any) {
draggingThreedRectangle
)

// ==============================================================
// **

// // ** DRAW GRID path lines x,y
// // drawGrid()
// drawGridNew(paper, 20)
// // redrawGrid()

// **

// ==============================================================
// ** TOOLS: PAPER GROUP OF TOOLS
// toolsGroup[0] = new paper.Group()
Expand Down Expand Up @@ -3213,8 +3203,8 @@ function initThreeDPaperPlanView(planCanvas: any) {

// ** DRAW GRID path lines x,y
// drawGrid()
drawGridNew(paper, 20)
// redrawGrid()
// drawGridNew(paper, 20)
redrawGrid()

} // END initThreeDPaperPlanView()

Expand Down Expand Up @@ -5498,13 +5488,15 @@ function redrawGrid(): boolean {
console.debug('redrawGrid: redrawing?', true)

if (paper.view == null) {
// ...do we need this? yes
// redrawing = false
// default: did not redrawGrid
return false

} else {

// draw initial grid on paper planCanvas
drawGridNew(paper, 20)

// dimensions of planView container of planCanvas
const planView = document.getElementById('planView')
const planViewWidth = planView.clientWidth
Expand Down Expand Up @@ -6531,10 +6523,10 @@ export default function ThreeDHomeDesign({
horizontalSliderRightDragging = false
}

// ** [MM] CLOSER.. NOT EVEN CLOSE
// ** [MM] CLOSER.. NOT EVEN CLOSE -- DON't DO THIS UNTIL YOU HAVE IT AS A threedTool.pointer
if (draggingThreedItem) {
// @ts-expect-error
addThreed(e, draggingThreedItem, canvasStateThreeDVar().state.scene)
// @ ts-expect-error
// addThreed(e, draggingThreedItem, canvasStateThreeDVar().state.scene)
// addThreed(e, draggingThreedItem, useCanvasStateThreeDVar.state.scene)
void (draggingNewGuide && (draggingNewGuide = false))
}
Expand Down

1 comment on commit 53e1b27

@vercel
Copy link

@vercel vercel bot commented on 53e1b27 Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.