Oblique Weave
cellforge/cell-angle-7FreeComponent
Diagonal harmonics keyed on row + col: bright bands glide along oblique lines through the triangle with a subtle second harmonic for texture.
Install it
npx shadcn@latest add https://cellforge.dev/r/cell-angle-7.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 CellAngle7Props = CellForgeCommonProps;1617const MATRIX_SIZE = 7;1819const BASE_OPACITY = 0.06;20const MID_OPACITY = 0.38;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}4344/** Sliding diagonal bands: same `row + col` share a phase so stripes read as continuous diagonals. */45function opacityForCell(row: number, col: number, phase: number): number {46 const diag = row + col;47 const t = phase * Math.PI * 2;48 const u = diag * 0.55 - t * 1.35;49 const primary = 0.5 + 0.5 * Math.cos(u);50 const harmonic = 0.5 + 0.5 * Math.cos(u * 2 + 0.4);51 const crest = primary * primary * 0.92 + Math.max(0, harmonic - 0.35) * 0.28;52 let opacity = BASE_OPACITY + crest * (HIGH_OPACITY - BASE_OPACITY);5354 if (row === 3 && col === 3) {55 opacity = Math.max(opacity, MID_OPACITY + (crest - 0.25) * 0.35);56 }5758 return Math.min(HIGH_OPACITY, opacity);59}6061export function CellAngle7({62 size = 30,63 dotSize = 6.5,64 color = "currentColor",65 colorPreset,66 ariaLabel = "Loading",67 className,68 muted = false,69 bloom = false,70 halo = 0,71 dotClassName,72 dotShape = "circle",73 speed = 1.65,74 animated = true,75 hoverAnimated = false,76 cellPadding,77 opacityBase,78 opacityMid,79 opacityPeak80}: CellAngle7Props) {81 const reducedMotion = usePrefersReducedMotion();82 const { phase: matrixPhase, onMouseEnter, onMouseLeave } = useCellForgePhases({83 animated: Boolean(animated && !reducedMotion),84 hoverAnimated: Boolean(hoverAnimated && !reducedMotion),85 speed86 });87// … 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 |
