Installation
Install the component
Run the following command to install the component and its dependencies:
npx @motion-core/cli add rubiks-cubeImport the component
Import the component into your Svelte file:
import { RubiksCube } from "$lib/motion-core";import { RubiksCube } from "$lib/motion-core";Usage
Props
RubiksCube
| Prop | Type | Default |
|---|---|---|
size | number | 1 |
duration | number | 1.5 |
gap | number | 0.015 |
radius | number | 0.125 |
fresnelConfig | FresnelConfig | Default Fresnel |
class | string | "" |
FresnelConfig
| Key | Type | Default |
|---|---|---|
color | THREE.ColorRepresentation | "#111113" |
rimColor | THREE.ColorRepresentation | "#FF6900" |
rimPower | number | 6 |
rimIntensity | number | 1.5 |