diff --git a/src/components/Roof2.jsx b/src/components/Roof2.jsx index ff570d90..00661aca 100644 --- a/src/components/Roof2.jsx +++ b/src/components/Roof2.jsx @@ -535,44 +535,6 @@ export default function Roof2(props) { }) } - const setCurrentPattern = (polygon) => { - const { width, height, roofStyle } = roofMaterial - const roofRatio = window.devicePixelRatio || 1 - const patternSourceCanvas = document.createElement('canvas') - - if (roofStyle === 1) { - patternSourceCanvas.width = width * roofRatio - patternSourceCanvas.height = height * roofRatio - } else if (roofStyle === 2) { - patternSourceCanvas.width = width * 2 - patternSourceCanvas.height = height * 2 - } - - const ctx = patternSourceCanvas.getContext('2d') - - ctx.scale(roofRatio, roofRatio) - ctx.strokeStyle = 'green' - ctx.lineWidth = 0.4 - // 벽돌 패턴 그리기 - if (roofStyle === 1) { - ctx.strokeRect(0, 0, 50, 30) - } else if (roofStyle === 2) { - // 지그재그 - ctx.strokeRect(0, 0, 200, 100) - ctx.strokeRect(100, 100, 200, 100) - } - - // 패턴 생성 - const pattern = new fabric.Pattern({ - source: patternSourceCanvas, - repeat: 'repeat', - }) - polygon.set('fill', null) - - polygon.set('fill', pattern) - canvas?.renderAll() - } - /** * canvas 내용 불러오기 */ @@ -1531,6 +1493,9 @@ export default function Roof2(props) { }) } + const moduleConfiguration = () => { + createRoofRack() + } return ( <> {canvas && ( @@ -1764,8 +1729,11 @@ export default function Roof2(props) { - +