Vertex Chase
cellforge/cell-angle-4FreeComponent
Three staggered heads chase around the triangle perimeter, leaving short fading tails while all dots stay fixed in place.
Install it
npx shadcn@latest add https://cellforge.dev/r/cell-angle-4.jsonSource
1"use client";23import type { CSSProperties } from "react";45import { cx } from "@/components/ui/cellforge-core";6import { resolveDmxColorTokens } from "@/components/ui/cellforge-core";7import { useCellForgePhases } from "@/components/ui/cellforge-hooks";8import { styleOpacity, stylePx } from "@/components/ui/cellforge-core";9import { remapOpacityToTriplet } from "@/components/ui/cellforge-core";10import { dmxBloomHaloSpreadClass, dmxBloomRootActive, dmxDotBloomParts } from "@/components/ui/cellforge-core";11import { usePrefersReducedMotion } from "@/components/ui/cellforge-hooks";12import { useSteppedCycle } from "@/components/ui/cellforge-hooks";13import type { CellForgeCommonProps } from "@/components/ui/cellforge-core";1415export type CellAngle4Props = CellForgeCommonProps;1617const MATRIX_SIZE = 7;18const STEP_COUNT = 28;19const BASE_OPACITY = 0.0;20const MID_OPACITY = 0.0;21const HIGH_OPACITY = 0.96;22const TRAIL_LEVELS = [HIGH_OPACITY, 0.52, 0.3] as const;2324const TRIANGLE_CELLS = new Set([25 "1,3",26 "2,2",27 "2,4",28 "3,1",29 "3,3",30 "3,5",31 "4,0",32 "4,2",33 "4,4",34 "4,6"35]);3637const PERIMETER_PATH: ReadonlyArray<readonly [number, number]> = [38 [1, 3],39 [2, 2],40 [3, 1],41 [4, 0],42 [4, 2],43 [4, 4],44 [4, 6],45 [3, 5],46 [2, 4]47];4849function isWithinTriangleMask(row: number, col: number): boolean {50 if (row < 0 || row >= MATRIX_SIZE || col < 0 || col >= MATRIX_SIZE) {51 return false;52 }5354 return TRIANGLE_CELLS.has(`${row},${col}`);55}5657export function CellAngle4({58 size = 30,59 dotSize = 6.5,60 color = "currentColor",61 colorPreset,62 ariaLabel = "Loading",63 className,64 muted = false,65 bloom = false,66 halo = 0,67 dotClassName,68 dotShape = "circle",69 speed = 1.5,70 animated = true,71 hoverAnimated = false,72 cellPadding,73 opacityBase,74 opacityMid,75 opacityPeak76}: CellAngle4Props) {77 const reducedMotion = usePrefersReducedMotion();78 const { phase: matrixPhase, onMouseEnter, onMouseLeave } = useCellForgePhases({79 animated: Boolean(animated && !reducedMotion),80 hoverAnimated: Boolean(hoverAnimated && !reducedMotion),81 speed82 });83 const step = useSteppedCycle({84 active: !reducedMotion && matrixPhase !== "idle",85 cycleMsBase: 1450,86 steps: STEP_COUNT,87 speed,88 });8990 const frame = reducedMotion || matrixPhase === "idle" ? 0 : step;91 const segmentLength = Math.max(1, Math.floor(STEP_COUNT / 3));9293 const gap =94 cellPadding ?? Math.max(1, Math.floor((size - dotSize * MATRIX_SIZE) / (MATRIX_SIZE - 1)));95// … truncated
More from @cellforge
All 71 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| All CellForge Loadersall | @cellforge | Components | Free | no deps | |
| Core Spokescell-angle-1 | @cellforge | Components | Free | no deps | |
| Column Rakecell-angle-10 | @cellforge | Components | Free | no deps | |
| Shelf Descentcell-angle-11 | @cellforge | Components | Free | no deps | |
| Skew Driftcell-angle-12 | @cellforge | Components | Free | no deps | |
| Serpent Zipcell-angle-13 | @cellforge | Components | Free | no deps | |
| Pillar Sweepcell-angle-14 | @cellforge | Components | Free | no deps | |
| Tripod Handoffcell-angle-15 | @cellforge | Components | Free | no deps |
