@@ -9,6 +9,16 @@ import { getHouseworkStatusById } from "@/lib/utils/get-housework-status";
99import { getDirtinessLevel } from "@/lib/utils/get-dirtiness-level" ;
1010import { useHouseworkStore } from "@/stores/housework-store" ;
1111
12+ // 雲の形状バリエーション(SVGパス)
13+ const CLOUD_PATHS = [
14+ // もこもこした雲形状1
15+ "M15,60 C5,55 2,40 12,32 C8,20 22,10 35,16 C40,5 58,3 65,14 C72,5 90,12 88,28 C98,32 100,48 90,55 C96,65 85,75 72,70 C65,80 50,82 42,74 C32,82 15,75 18,65 C8,68 5,62 15,60Z" ,
16+ // 横に広がった雲形状2
17+ "M12,55 C2,48 4,32 16,26 C18,14 32,6 45,14 C52,2 68,5 72,18 C82,8 96,20 92,34 C100,42 96,58 84,58 C88,70 76,78 62,72 C52,82 38,80 30,70 C20,78 6,68 12,55Z" ,
18+ // 不規則な雲形状3
19+ "M22,58 C10,52 5,38 16,28 C14,16 28,6 42,14 C50,2 66,6 74,18 C85,10 98,24 92,38 C100,48 94,62 82,60 C86,72 74,82 58,74 C46,84 30,80 26,68 C14,76 6,66 22,58Z" ,
20+ ] ;
21+
1222interface ClickableRoomProps {
1323 onItemClick : ( houseworkId : string ) => void ;
1424 selectedId : string | null ;
@@ -83,7 +93,7 @@ export function ClickableRoom({ onItemClick, selectedId }: ClickableRoomProps) {
8393 />
8494
8595 { /* クリック可能な領域と汚れオーバーレイ */ }
86- { ROOM_ITEMS . map ( ( item ) => {
96+ { ROOM_ITEMS . map ( ( item , index ) => {
8797 const houseworkData = houseworksMap [ item . houseworkId ] ;
8898 const isRunning = runningHouseworkId !== null && Number ( item . houseworkId ) === runningHouseworkId ;
8999
@@ -95,24 +105,47 @@ export function ClickableRoom({ onItemClick, selectedId }: ClickableRoomProps) {
95105
96106 return (
97107 < div key = { item . id } >
98- { /* 汚れオーバーレイ (レベル2以上で表示) */ }
108+ { /* 汚れモヤモヤオーバーレイ (レベル2以上で表示) */ }
99109 { showOverlay && (
100110 < motion . div
101111 initial = { { opacity : 0 } }
102112 animate = { { opacity : 1 } }
103113 exit = { { opacity : 0 } }
104- transition = { { duration : 0.3 } }
105- className = "absolute z-50 pointer-events-none rounded-lg "
114+ transition = { { duration : 0.5 } }
115+ className = "absolute z-50 pointer-events-none"
106116 style = { {
107117 top : item . position . top ,
108118 left : item . position . left ,
109119 width : item . position . width ,
110120 height : item . position . height ,
111- backdropFilter : `blur(${ dirtiness . blur } px)` ,
112- WebkitBackdropFilter : `blur(${ dirtiness . blur } px)` ,
113- backgroundColor : `${ dirtiness . color } ${ Math . round ( dirtiness . opacity * 255 ) . toString ( 16 ) . padStart ( 2 , "0" ) } ` ,
114121 } }
115- />
122+ >
123+ < svg
124+ viewBox = "-10 -10 120 105"
125+ preserveAspectRatio = "none"
126+ className = "w-full h-full overflow-visible"
127+ >
128+ { /* 外側グロー(大きく・薄く) */ }
129+ < path
130+ d = { CLOUD_PATHS [ index % CLOUD_PATHS . length ] }
131+ fill = { dirtiness . cloudColor }
132+ transform = "translate(50,42.5) scale(1.25) translate(-50,-42.5)"
133+ opacity = { 0.25 }
134+ />
135+ { /* 中間グロー */ }
136+ < path
137+ d = { CLOUD_PATHS [ index % CLOUD_PATHS . length ] }
138+ fill = { dirtiness . cloudColor }
139+ transform = "translate(50,42.5) scale(1.12) translate(-50,-42.5)"
140+ opacity = { 0.5 }
141+ />
142+ { /* メインの雲 */ }
143+ < path
144+ d = { CLOUD_PATHS [ index % CLOUD_PATHS . length ] }
145+ fill = { dirtiness . cloudColor }
146+ />
147+ </ svg >
148+ </ motion . div >
116149 ) }
117150
118151 { /* クリック可能な領域 */ }
0 commit comments