Homokozoo

Example

A configurable Three.js scene component powered by React Three Fiber.

Example default scene (example-default)
Wireframe sphere with grid (example-wireframe)
Cinematic floating shape (example-cinematic)

Installation


npx shadcn@latest add @homok/example

Usage


import { Example } from '@/components/example'
<Example
  scene={{
    geometry: 'cylinder',
    objectColor: '#7c3aed',
    emissiveColor: '#2e1065',
    background: '#0a0a0a',
    ambientIntensity: 0.35,
    controls: true,
    autoRotate: true,
    autoRotateSpeed: 1.2,
    rotationSpeed: 0.7,
    lightIntensity: 1.1,
    cameraPosition: [2.8, 2.2, 3.2],
    grid: true,
    float: true,
    floatIntensity: 1,
    objectScale: 1.1,
    floor: true,
    floorColor: '#111827',
    fog: true,
    fogColor: '#0b1020',
    fogNear: 4,
    fogFar: 11,
  }}
/>

Scene Props


Prop

Type

On this page