Nova Wheel
dotmatrix/dotm-circular-5FreeComponent
Four rotating pinwheel blades spin through the circular matrix with a glowing center and soft trailing halo.
Install it
npx shadcn@latest add https://dotmatrix.zzzzshawn.cloud/r/dotm-circular-5.jsonSource
1"use client";23import { useMemo } from "react";45import { DotMatrixBase } from "@/components/ui/dotmatrix-core";6import { useDotMatrixPhases } from "@/components/ui/dotmatrix-hooks";7import { isWithinCircularMask } from "@/components/ui/dotmatrix-core";8import { useCyclePhase } from "@/components/ui/dotmatrix-hooks";9import { usePrefersReducedMotion } from "@/components/ui/dotmatrix-hooks";10import type { DotAnimationResolver, DotMatrixCommonProps } from "@/components/ui/dotmatrix-core";1112export type DotmCircular5Props = DotMatrixCommonProps;1314const BASE_OPACITY = 0.08;15const BLADE_OPACITY = 0.94;16const HALO_OPACITY = 0.34;1718export function DotmCircular5({19 speed = 1.7,20 animated = true,21 hoverAnimated = false,22 ...rest23}: DotmCircular5Props) {24 const reducedMotion = usePrefersReducedMotion();25 const { phase: matrixPhase, onMouseEnter, onMouseLeave } = useDotMatrixPhases({26 animated: Boolean(animated && !reducedMotion),27 hoverAnimated: Boolean(hoverAnimated && !reducedMotion),28 speed29 });30 const phase = useCyclePhase({31 active: !reducedMotion && matrixPhase !== "idle",32 cycleMsBase: 1650,33 speed34 });3536 const resolver = useMemo<DotAnimationResolver>(() => {37 return ({ row, col, phase: p }) => {38 if (!isWithinCircularMask(row, col)) {39 return { className: "dmx-inactive" };40 }4142 const x = col - 2;43 const y = row - 2;44 const radius = Math.hypot(x, y);45 const angle = Math.atan2(y, x);46 const theta = (reducedMotion || p === "idle" ? 0 : phase) * Math.PI * 2;47 const pinwheel = Math.cos(angle * 4 - theta * 2.2);48 const radialGate = Math.sin(radius * 2.1 - theta * 1.25);4950 if (radius < 0.6) {51 return { style: { opacity: 0.66 } };52 }5354 if (pinwheel > 0.48 && radialGate > -0.25) {55 return { style: { opacity: BLADE_OPACITY } };56 }5758 if (pinwheel > 0.1) {59 return { style: { opacity: HALO_OPACITY } };60 }6162 return { style: { opacity: BASE_OPACITY } };63 };64 }, [reducedMotion, phase]);6566 return (67 <DotMatrixBase68 {...rest}69 size={rest.size ?? 36}70 dotSize={rest.dotSize ?? 5}71 speed={speed}72 pattern="full"73 animated={animated}74 phase={matrixPhase}75 onMouseEnter={onMouseEnter}76 onMouseLeave={onMouseLeave}77 reducedMotion={reducedMotion}78 animationResolver={resolver}79 />80 );81}
More from @dotmatrix
All 91 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| All Dot Matrix Loadersall | @dotmatrix | Components | Free | no deps | |
| Square Spiraldotm-3x3-1 | @dotmatrix | Components | Free | no deps | |
| Frame Chasedotm-3x3-10 | @dotmatrix | Components | Free | no deps | |
| Glyph Pulsedotm-3x3-11 | @dotmatrix | Components | Free | no deps | |
| Drop Rippledotm-3x3-12 | @dotmatrix | Components | Free | no deps | |
| Right Surgedotm-3x3-13 | @dotmatrix | Components | Free | no deps | |
| Comet Traildotm-3x3-14 | @dotmatrix | Components | Free | no deps | |
| Echo Ringsdotm-3x3-15 | @dotmatrix | Components | Free | no deps |
