Pillar Sweep
cellforge/cell-angle-14FreeComponent
A smooth vertical beam sweeps grid columns 0→6; only triangle-masked dots respond so the silhouette lights one vertical slice at a time.
Install it
npx shadcn@latest add https://cellforge.dev/r/cell-angle-14.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 { dmxBloomRootActive, dmxDotBloomParts } from "@/components/ui/cellforge-core";11import { useCyclePhase } from "@/components/ui/cellforge-hooks";12import { usePrefersReducedMotion } from "@/components/ui/cellforge-hooks";13import type { CellForgeCommonProps } from "@/components/ui/cellforge-core";1415export type CellAngle14Props = CellForgeCommonProps;1617const MATRIX_SIZE = 7;1819const BASE_OPACITY = 0.07;20const MID_OPACITY = 0.32;21const HIGH_OPACITY = 0.96;2223const TRIANGLE_CELLS = new Set([24 "1,3",25 "2,2",26 "2,4",27 "3,1",28 "3,3",29 "3,5",30 "4,0",31 "4,2",32 "4,4",33 "4,6"34]);3536function isWithinTriangleMask(row: number, col: number): boolean {37 if (row < 0 || row >= MATRIX_SIZE || col < 0 || col >= MATRIX_SIZE) {38 return false;39 }4041 return TRIANGLE_CELLS.has(`${row},${col}`);42}4344function smoothstep01(edge0: number, edge1: number, x: number): number {45 if (edge1 <= edge0) {46 return x >= edge1 ? 1 : 0;47 }48 const t = Math.max(0, Math.min(1, (x - edge0) / (edge1 - edge0)));49 return t * t * (3 - 2 * t);50}5152/**53 * A soft vertical “pillar” of brightness sweeps column 0→6; only masked dots respond,54 * so the triangle appears to light one vertical slice at a time (not a cell path).55 */56function opacityForCell(row: number, col: number, phase: number): number {57 const beamCenter = phase * 7.2 - 0.35;58 const dist = Math.abs(col - beamCenter);59 const core = 1 - smoothstep01(0, 0.62, dist);60 const halo = 1 - smoothstep01(0.35, 1.42, dist);61 const eased = core * 0.92 + halo * 0.22;62 let opacity = BASE_OPACITY + eased * (HIGH_OPACITY - BASE_OPACITY);6364 if (row === 3 && col === 3) {65 opacity = Math.max(opacity, MID_OPACITY + eased * 0.28);66 }6768 return Math.min(HIGH_OPACITY, opacity);69}7071export function CellAngle14({72 size = 30,73 dotSize = 6.5,74 color = "currentColor",75 colorPreset,76 ariaLabel = "Loading",77 className,78 muted = false,79 bloom = false,80 halo = 0,81 dotClassName,82 dotShape = "circle",83 speed = 1.45,84 animated = true,85 hoverAnimated = false,86 cellPadding,87 opacityBase,88 opacityMid,89 opacityPeak90}: CellAngle14Props) {91// … 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 | |
| Tripod Handoffcell-angle-15 | @cellforge | Components | Free | no deps | |
| Updraftcell-angle-16 | @cellforge | Components | Free | no deps |
