Elements

ThreeUI · Backgrounds · 免费
Elements 预览

在云境TS 中打开并复制 →

内容预览

# Elements Water, lightning, fire, condensation, and a painterly generative tree collected as one elemental family across WebGL2 and Canvas 2D. > 来源:ThreeUI Community · https://threeui.com · MIT License(Meng To / Design+Code) > 组件页:https://threeui.com/component/elements · 预览动画:https://threeui.com/previews/elements.webm > 分类:Backgrounds > 包含变体(5):elemental-water、elemental-lightning、elemental-flame、condensation、generative-tree /* ===== src/shaders/elements/ElementsCollection.tsx (tsx) ===== */ import { lazy, Suspense } from "react"; import type { CondensationBackgroundProps } from "../condensation/CondensationBackground"; import type { ElementVariant, ElementsBackgroundProps } from "./ElementsBackground"; import type { GenerativeTreeProps } from "./GenerativeTree"; export type ElementsVariant = ElementVariant | "condensation" | "generative-tree"; type ElementVariantProps = Omit & { variant?: ElementVariant; }; type CondensationVariantProps = CondensationBackgroundProps & { variant: "condensation"; }; type GenerativeTreeVariantProps = GenerativeTreeProps & { variant: "generative-tree"; }; export type ElementsCollectionProps = ElementVariantProps | CondensationVariantProps | GenerativeTreeVariantProps; const ElementVariantRenderer = lazy(() => import("./ElementsBackground").then((module) => ({ default: module.ElementsBackground })), ); const CondensationVariant = lazy(() => import("../condensation/CondensationBackground").then((module) => ({ default: module.CondensationBackground

……(完整源码请在站内查看)