BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/threecn/world-cup

WorldCup

threecn/world-cup
FreeComponent

The World Cup trophy modeled procedurally: two sculpted figures with raised arms lift a continent-embossed globe above a green-banded base, turning under studio light amid a drift of confetti.

Install it

npx shadcn@latest add https://threecn.dev/r/world-cup.json

Source

components/threecn/world-cup.tsxthreecn.dev/r/world-cup.json · first 6 KB
1"use client"
2
3import * as React from "react"
4import { useFrame } from "@react-three/fiber"
5import { Environment, Lightformer } from "@react-three/drei"
6import * as THREE from "three"
7
8import {
9 SceneContainer,
10 type SceneContainerProps,
11} from "@/components/threecn/scene-container"
12import {
13 useShadcnTheme,
14 type ThemeMode,
15} from "@/components/hooks/use-shadcn-theme"
16
17/* ------------------------------------------------------------------ */
18/* Proportions (scene units). The real trophy: a draped column pinched */
19/* at the waist, two figures with raised arms, a globe resting in the */
20/* upstretched hands, all on a stepped base with two green bands. */
21/* ------------------------------------------------------------------ */
22
23const GLOBE_R = 0.62
24const GLOBE_Y = 2.45 // globe center; its lower third nests into the hands
25const BODY_TOP = 2.05
26/** Vertical shift so the whole piece sits centered on the origin. */
27const CENTER_Y = -1.28
28
29/**
30 * Silhouette of the body as (radius, height) control points, bottom to top:
31 * a draped skirt narrowing to the waist, then swelling through the figures'
32 * chests and opening where the arms rise to meet the globe.
33 */
34const PROFILE: [number, number][] = [
35 [0.45, 0.0],
36 [0.36, 0.1],
37 [0.29, 0.28],
38 [0.24, 0.52],
39 [0.215, 0.85], // waist
40 [0.24, 1.15],
41 [0.3, 1.4],
42 [0.38, 1.62],
43 [0.45, 1.8],
44 [0.49, 1.95],
45 [0.45, BODY_TOP], // curls back in right under the globe
46]
47
48const BODY_ROWS = 200
49const BODY_COLS = 160
50
51/* ----------------------------- noise ------------------------------ */
52
53function hash3(x: number, y: number, z: number) {
54 const s = Math.sin(x * 127.1 + y * 311.7 + z * 74.7) * 43758.5453
55 return s - Math.floor(s)
56}
57
58/** Trilinear value noise in [0, 1]. */
59function vnoise3(x: number, y: number, z: number) {
60 const ix = Math.floor(x)
61 const iy = Math.floor(y)
62 const iz = Math.floor(z)
63 const fx = x - ix
64 const fy = y - iy
65 const fz = z - iz
66 const ux = fx * fx * (3 - 2 * fx)
67 const uy = fy * fy * (3 - 2 * fy)
68 const uz = fz * fz * (3 - 2 * fz)
69 const lerp = (a: number, b: number, t: number) => a + (b - a) * t
70 const c00 = lerp(hash3(ix, iy, iz), hash3(ix + 1, iy, iz), ux)
71 const c10 = lerp(hash3(ix, iy + 1, iz), hash3(ix + 1, iy + 1, iz), ux)
72 const c01 = lerp(hash3(ix, iy, iz + 1), hash3(ix + 1, iy, iz + 1), ux)
73 const c11 = lerp(hash3(ix, iy + 1, iz + 1), hash3(ix + 1, iy + 1, iz + 1), ux)
74 return lerp(lerp(c00, c10, uy), lerp(c01, c11, uy), uz)
75}
76
77// … truncated

What it pulls in

npm packages

  • three
  • @react-three/fiber
  • @react-three/drei

Files it writes

  • components/threecn/world-cup.tsx
  • components/threecn/scene-container.tsx
  • components/hooks/use-shadcn-theme.ts

Facts

Registry
threecn
Type
registry:ui
Access
Free
Files written
3
Licence
MIT
First indexed
2026-08-03
Last confirmed
today

Go to the source

threecn.dev ln-dev7/threecn on GitHub Raw registry item This item as JSON

More from threecn

All 28 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AuroraRibbonsaurora-ribbonsthreecnComponentsFree3 deps · 3 files
BoidsboidsthreecnComponentsFree3 deps · 3 files
ClothcloththreecnComponentsFree3 deps · 3 files
CrystalcrystalthreecnComponentsFree3 deps · 3 files
CubeWavecube-wavethreecnComponentsFree3 deps · 3 files
CurlFlowcurl-flowthreecnComponentsFree3 deps · 3 files
DnaHelixdna-helixthreecnComponentsFree3 deps · 3 files
FloatingCard3Dfloating-card-3dthreecnComponentsFree3 deps · 3 files
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