Sky and lights

Drop-in sky and lighting rig. Day: a physical (Preetham) sky, a warm sun with soft shadows, a hemisphere fill, an offline environment map baked from the sky and Lightformers (no network), exponential haze and a horizon band that hides the sea and sky seam. Night: a star dome with a moon in the sun direction, cool moonlight, a warm fill standing in for deck floodlights (deckLights) and a dark environment map. Set lights: false to keep your own lights; preview adds a reference pile with chrome and matte spheres standing in the sea.

Preetham sky model (three.js Sky)
Drag to orbit, scroll to zoom
Parameters
– °
– °
–
–

Installation

$npx -y https://decktwin.com/cli/deck-twin-0.2.2.tgz add sky

Copies environment/sky.tsx and the shared lib/ into src/components/deck-twin/. Needs three, @react-three/fiber and @react-three/drei. See installation for the manual route.

Usage

import { Canvas } from '@react-three/fiber'
import { OrbitControls } from '@react-three/drei'
import { Stage } from './components/deck-twin/lib/stage'
import { Sky } from './components/deck-twin/environment/sky'

export default function Scene() {
  return (
    <Canvas shadows camera={{ position: [8, 5, 9], fov: 35 }}>
      <Stage>
        <Sky />
      </Stage>
      <OrbitControls makeDefault />
    </Canvas>
  )
}

Props

PropTypeDefaultRange
mode"day" | "night"null
elevationnumber (°)null2 – 85
azimuthnumber (°)null0 – 360
hazenumbernull0 – 4
deckLightsnumbernull0 – 2
starsbooleannull
lightsbooleannull
previewbooleannull
...groupposition, rotation, scale…

P&ID

P&ID symbol for sky

Not drawn on P&IDs or layouts. Plot plans only carry a north arrow; sun path or lighting studies are separate reports.

Not drawn

Scene lighting for the 3D model, not plant equipment.

For agents

Machine-readable entry with props, ranges, defaults and ports:

$npx -y https://decktwin.com/cli/deck-twin-0.2.2.tgz info sky

Or fetch /r/sky.json, or copy a ready-made instruction:

Add the Deck Twin "Sky and lights" component to this project. Run `npx -y https://decktwin.com/cli/deck-twin-0.2.2.tgz add sky` (it copies the file and the shared lib into src/components/deck-twin/), then `npx -y https://decktwin.com/cli/deck-twin-0.2.2.tgz info sky` for its props, ranges and ports. Render <Sky /> inside a React Three Fiber <Canvas shadows>, wrapped in <Stage> from src/components/deck-twin/lib/stage. Set props from my data (metres, NPS in inches, ASME class) and leave the rest at defaults. Install three, @react-three/fiber, @react-three/drei and @types/three if they're missing. Full guide: https://decktwin.com/skill/SKILL.md