BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/@cellforge/cell-angle-9

Corona Tier

cellforge/cell-angle-9
FreeComponent

Eight-connected distance rings from the heart cell: a bright corona sweeps outward through discrete tiers then back, so depth reads as concentric energy shells.

Install it

npx shadcn@latest add https://cellforge.dev/r/cell-angle-9.json

Source

components/ui/cell-angle-9.tsxcellforge.dev/r/cell-angle-9.json · first 6 KB
1"use client";
2
3import type { CSSProperties } from "react";
4
5import { 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";
14
15export type CellAngle9Props = CellForgeCommonProps;
16
17const MATRIX_SIZE = 7;
18
19const BASE_OPACITY = 0.14;
20const HIGH_OPACITY = 0.96;
21
22const TRIANGLE_CELLS = new Set([
23 "1,3",
24 "2,2",
25 "2,4",
26 "3,1",
27 "3,3",
28 "3,5",
29 "4,0",
30 "4,2",
31 "4,4",
32 "4,6"
33]);
34
35const DELTAS_8: ReadonlyArray<readonly [number, number]> = [
36 [-1, -1],
37 [-1, 0],
38 [-1, 1],
39 [0, -1],
40 [0, 1],
41 [1, -1],
42 [1, 0],
43 [1, 1]
44];
45
46function buildBfsRingFromCenter(): Map<string, number> {
47 const dist = new Map<string, number>();
48 const start = "3,3";
49 if (!TRIANGLE_CELLS.has(start)) {
50 return dist;
51 }
52
53 const queue: [number, number][] = [[3, 3]];
54 dist.set(start, 0);
55 let head = 0;
56
57 while (head < queue.length) {
58 const [r, c] = queue[head]!;
59 head += 1;
60 const d = dist.get(`${r},${c}`)!;
61
62 for (const [dr, dc] of DELTAS_8) {
63 const nr = r + dr;
64 const nc = c + dc;
65 const key = `${nr},${nc}`;
66 if (TRIANGLE_CELLS.has(key) && !dist.has(key)) {
67 dist.set(key, d + 1);
68 queue.push([nr, nc]);
69 }
70 }
71 }
72
73 return dist;
74}
75
76const BFS_RING = buildBfsRingFromCenter();
77const MAX_RING = Math.max(0, ...BFS_RING.values());
78
79function isWithinTriangleMask(row: number, col: number): boolean {
80 if (row < 0 || row >= MATRIX_SIZE || col < 0 || col >= MATRIX_SIZE) {
81 return false;
82 }
83
84 return TRIANGLE_CELLS.has(`${row},${col}`);
85}
86
87function smoothstep01(edge0: number, edge1: number, x: number): number {
88 if (edge1 <= edge0) {
89 return x >= edge1 ? 1 : 0;
90 }
91 const t = Math.max(0, Math.min(1, (x - edge0) / (edge1 - edge0)));
92 return t * t * (3 - 2 * t);
93}
94
95/**
96 * Concentric tiers from the heart (8-connected). One soft bright band travels outward/inward;
97// … truncated

Facts

Registry
@cellforge
Type
registry:ui
Access
Free
Files written
0
Licence
MIT
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

cellforge.dev cellforge-dev/cellforge on GitHub Raw registry item This item as JSON

More from @cellforge

All 71 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
All CellForge Loadersall@cellforgeComponentsFreeno deps
Core Spokescell-angle-1@cellforgeComponentsFreeno deps
Column Rakecell-angle-10@cellforgeComponentsFreeno deps
Shelf Descentcell-angle-11@cellforgeComponentsFreeno deps
Skew Driftcell-angle-12@cellforgeComponentsFreeno deps
Serpent Zipcell-angle-13@cellforgeComponentsFreeno deps
Pillar Sweepcell-angle-14@cellforgeComponentsFreeno deps
Tripod Handoffcell-angle-15@cellforgeComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex