{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/5D799su7V7ajm6Twl8fn/KrBHY3aH2mkAPm2S0LaI/Examples.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{motion}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function Dice(props){const[diceNumber,setDiceNumber]=useState(1);const[isRolling,setIsRolling]=useState(false);const rollDice=()=>{setIsRolling(true);// Generate random dice number after the rotation completes\nsetTimeout(()=>{const randomNumber=Math.floor(Math.random()*6)+1;setDiceNumber(randomNumber);setIsRolling(false);},1e3)// Wait for 1 second before setting the new dice number\n;};const diceRotation=()=>{switch(diceNumber){case 1:return{rotateX:0,rotateY:0};case 2:return{rotateX:-90,rotateY:0};case 3:return{rotateX:0,rotateY:-90};case 4:return{rotateX:0,rotateY:90};case 5:return{rotateX:90,rotateY:0};case 6:return{rotateX:180,rotateY:0};default:return{rotateX:0,rotateY:0};}};// Function to generate dot layouts for each face\nconst renderDots=number=>{switch(number){case 1:return /*#__PURE__*/_jsx(\"div\",{style:dotContainer,children:/*#__PURE__*/_jsx(\"div\",{style:centerDot})});case 2:return /*#__PURE__*/_jsxs(\"div\",{style:dotContainer,children:[/*#__PURE__*/_jsx(\"div\",{style:topLeftDot}),/*#__PURE__*/_jsx(\"div\",{style:bottomRightDot})]});case 3:return /*#__PURE__*/_jsxs(\"div\",{style:dotContainer,children:[/*#__PURE__*/_jsx(\"div\",{style:topLeftDot}),/*#__PURE__*/_jsx(\"div\",{style:centerDot}),/*#__PURE__*/_jsx(\"div\",{style:bottomRightDot})]});case 4:return /*#__PURE__*/_jsxs(\"div\",{style:dotContainer,children:[/*#__PURE__*/_jsx(\"div\",{style:topLeftDot}),/*#__PURE__*/_jsx(\"div\",{style:topRightDot}),/*#__PURE__*/_jsx(\"div\",{style:bottomLeftDot}),/*#__PURE__*/_jsx(\"div\",{style:bottomRightDot})]});case 5:return /*#__PURE__*/_jsxs(\"div\",{style:dotContainer,children:[/*#__PURE__*/_jsx(\"div\",{style:topLeftDot}),/*#__PURE__*/_jsx(\"div\",{style:topRightDot}),/*#__PURE__*/_jsx(\"div\",{style:centerDot}),/*#__PURE__*/_jsx(\"div\",{style:bottomLeftDot}),/*#__PURE__*/_jsx(\"div\",{style:bottomRightDot})]});case 6:return /*#__PURE__*/_jsxs(\"div\",{style:dotContainer,children:[/*#__PURE__*/_jsx(\"div\",{style:topLeftDot}),/*#__PURE__*/_jsx(\"div\",{style:topRightDot}),/*#__PURE__*/_jsx(\"div\",{style:middleLeftDot}),/*#__PURE__*/_jsx(\"div\",{style:middleRightDot}),/*#__PURE__*/_jsx(\"div\",{style:bottomLeftDot}),/*#__PURE__*/_jsx(\"div\",{style:bottomRightDot})]});default:return null;}};return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:/*#__PURE__*/_jsxs(motion.div,{style:diceWrapperStyle,animate:isRolling?{rotateX:[0,360],rotateY:[0,360]}:diceRotation(),transition:{duration:1},onClick:rollDice,children:[/*#__PURE__*/_jsx(\"div\",{style:{...diceFaceStyle,...faceOne},children:renderDots(1)}),/*#__PURE__*/_jsx(\"div\",{style:{...diceFaceStyle,...faceTwo},children:renderDots(2)}),/*#__PURE__*/_jsx(\"div\",{style:{...diceFaceStyle,...faceThree},children:renderDots(3)}),/*#__PURE__*/_jsx(\"div\",{style:{...diceFaceStyle,...faceFour},children:renderDots(4)}),/*#__PURE__*/_jsx(\"div\",{style:{...diceFaceStyle,...faceFive},children:renderDots(5)}),/*#__PURE__*/_jsx(\"div\",{style:{...diceFaceStyle,...faceSix},children:renderDots(6)})]})});}// 3D container style\nconst containerStyle={display:\"flex\",justifyContent:\"center\",alignItems:\"center\",height:\"100vh\",perspective:\"1000px\"};// Wrapper to hold the 3D dice\nconst diceWrapperStyle={width:\"100px\",height:\"100px\",position:\"relative\",transformStyle:\"preserve-3d\",cursor:\"pointer\"};// Base style for each dice face\nconst diceFaceStyle={position:\"absolute\",width:\"100px\",height:\"100px\",backgroundColor:\"red\",border:\"2px solid black\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",fontSize:\"24px\",fontWeight:\"bold\",color:\"white\",borderRadius:\"15px\"};// Individual face positioning using CSS 3D transforms\nconst faceOne={transform:\"rotateY(0deg) translateZ(50px)\"};const faceTwo={transform:\"rotateX(90deg) translateZ(50px)\"};const faceThree={transform:\"rotateY(90deg) translateZ(50px)\"};const faceFour={transform:\"rotateY(-90deg) translateZ(50px)\"};const faceFive={transform:\"rotateX(-90deg) translateZ(50px)\"};const faceSix={transform:\"rotateX(180deg) translateZ(50px)\"};// Dot positions\nconst dotContainer={display:\"grid\",gridTemplateColumns:\"repeat(3, 1fr)\",gridTemplateRows:\"repeat(3, 1fr)\",width:\"100%\",height:\"100%\",padding:\"10px\"};// Styles for the dots\nconst centerDot={gridColumn:\"2 / 3\",gridRow:\"2 / 3\",width:\"20px\",height:\"20px\",backgroundColor:\"white\",borderRadius:\"50%\"};const topLeftDot={gridColumn:\"1 / 2\",gridRow:\"1 / 2\",width:\"20px\",height:\"20px\",backgroundColor:\"white\",borderRadius:\"50%\"};const topRightDot={gridColumn:\"3 / 4\",gridRow:\"1 / 2\",width:\"20px\",height:\"20px\",backgroundColor:\"white\",borderRadius:\"50%\"};const bottomLeftDot={gridColumn:\"1 / 2\",gridRow:\"3 / 4\",width:\"20px\",height:\"20px\",backgroundColor:\"white\",borderRadius:\"50%\"};const bottomRightDot={gridColumn:\"3 / 4\",gridRow:\"3 / 4\",width:\"20px\",height:\"20px\",backgroundColor:\"white\",borderRadius:\"50%\"};const middleLeftDot={gridColumn:\"1 / 2\",gridRow:\"2 / 3\",width:\"20px\",height:\"20px\",backgroundColor:\"white\",borderRadius:\"50%\"};const middleRightDot={gridColumn:\"3 / 4\",gridRow:\"2 / 3\",width:\"20px\",height:\"20px\",backgroundColor:\"white\",borderRadius:\"50%\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Dice\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],
  "mappings": "yDAGkB,SAARA,EAAsBC,EAAM,CAAC,GAAK,CAACC,EAAWC,CAAa,EAAEC,EAAS,CAAC,EAAO,CAACC,EAAUC,CAAY,EAAEF,EAAS,EAAK,EAAQG,EAAS,IAAI,CAACD,EAAa,EAAI,EACtK,WAAW,IAAI,CAAC,IAAME,EAAa,KAAK,MAAM,KAAK,OAAO,EAAE,CAAC,EAAE,EAAEL,EAAcK,CAAY,EAAEF,EAAa,EAAK,CAAE,EAAE,GAAG,CACrH,EAAQG,EAAa,IAAI,CAAC,OAAOP,EAAW,CAAC,IAAK,GAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,IAAK,GAAE,MAAM,CAAC,QAAQ,IAAI,QAAQ,CAAC,EAAE,IAAK,GAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,EAAE,IAAK,GAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,IAAK,GAAE,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,IAAK,GAAE,MAAM,CAAC,QAAQ,IAAI,QAAQ,CAAC,EAAE,QAAQ,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAE,CAAC,EACvSQ,EAAWC,GAAQ,CAAC,OAAOA,EAAO,CAAC,IAAK,GAAE,OAAoBC,EAAK,MAAM,CAAC,MAAMC,EAAa,SAAsBD,EAAK,MAAM,CAAC,MAAME,CAAS,CAAC,CAAC,CAAC,EAAE,IAAK,GAAE,OAAoBC,EAAM,MAAM,CAAC,MAAMF,EAAa,SAAS,CAAcD,EAAK,MAAM,CAAC,MAAMI,CAAU,CAAC,EAAeJ,EAAK,MAAM,C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C,UAAU,gCAAgC,EAAQC,EAAQ,CAAC,UAAU,iCAAiC,EAAQC,EAAU,CAAC,UAAU,iCAAiC,EAAQC,EAAS,CAAC,UAAU,kCAAkC,EAAQC,EAAS,CAAC,UAAU,kCAAkC,EAAQC,EAAQ,CAAC,UAAU,kCAAkC,EACtWlB,EAAa,CAAC,QAAQ,OAAO,oBAAoB,iBAAiB,iBAAiB,iBAAiB,MAAM,OAAO,OAAO,OAAO,QAAQ,MAAM,EAC7IC,EAAU,CAAC,WAAW,QAAQ,QAAQ,QAAQ,MAAM,OAAO,OAAO,OAAO,gBAAgB,QAAQ,aAAa,KAAK,EAAQE,EAAW,CAAC,WAAW,QAAQ,QAAQ,QAAQ,MAAM,OAAO,OAAO,OAAO,gBAAgB,QAAQ,aAAa,KAAK,EAAQE,EAAY,CAAC,WAAW,QAAQ,QAAQ,QAAQ,MAAM,OAAO,OAAO,OAAO,gBAAgB,QAAQ,aAAa,KAAK,EAAQC,EAAc,CAAC,WAAW,QAAQ,QAAQ,QAAQ,MAAM,OAAO,OAAO,OAAO,gBAAgB,QAAQ,aAAa,KAAK,EAAQF,EAAe,CAAC,WAAW,QAAQ,QAAQ,QAAQ,MAAM,OAAO,OAAO,OAAO,gBAAgB,QAAQ,aAAa,KAAK,EAAQG,EAAc,CAAC,WAAW,QAAQ,QAAQ,QAAQ,MAAM,OAAO,OAAO,OAAO,gBAAgB,QAAQ,aAAa,KAAK,EAAQC,EAAe,CAAC,WAAW,QAAQ,QAAQ,QAAQ,MAAM,OAAO,OAAO,OAAO,gBAAgB,QAAQ,aAAa,KAAK",
  "names": ["Dice", "props", "diceNumber", "setDiceNumber", "ye", "isRolling", "setIsRolling", "rollDice", "randomNumber", "diceRotation", "renderDots", "number", "p", "dotContainer", "centerDot", "u", "topLeftDot", "bottomRightDot", "topRightDot", "bottomLeftDot", "middleLeftDot", "middleRightDot", "containerStyle", "motion", "diceWrapperStyle", "diceFaceStyle", "faceOne", "faceTwo", "faceThree", "faceFour", "faceFive", "faceSix"]
}
