{
  "name": "neon-strip",
  "title": "NeonStrip",
  "type": "registry:component",
  "description": "A neon tube along local X: a white-hot core in a coloured sleeve with a soft halo, glowing at any hour. Decorative; light washes nearby walls in its colour through the world's light pool.",
  "dependencies": [
    "@runek/core@^0.18.0"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "NeonStrip.tsx",
      "content": "import {\n  glowLook,\n  useLight,\n  useLuminance,\n  useMaterials,\n  useWorld,\n  type WorldComponentProps,\n} from '@runek/core'\n\nexport interface NeonStripProps extends WorldComponentProps {\n  /** Length along local X, in units, centred on the origin. */\n  length?: number\n  /** The glow. */\n  color?: string\n  /** Tube diameter, in units. */\n  thickness?: number\n  /** Cast real light as well as glowing, from the middle of the tube. Leave it off on most\n   *  strips: the world lends real lights to only a few emitters at a time. */\n  light?: boolean\n  /** The real light's strength, with `light`. How bright the tube itself looks is the world's\n   *  `tube` luminance level. */\n  intensity?: number\n}\n\n/**\n * A neon tube along local X: a white-hot core in a coloured sleeve with a soft halo, unlit by\n * the scene so it reads as light at any hour, for cove lighting, a desk's edge or a line round\n * a room, at the world's `tube` luminance level. `light` also washes nearby walls in its colour.\n * Decorative: no collider.\n */\nexport function NeonStrip({\n  position = [0, 0, 0],\n  rotation = [0, 0, 0],\n  length = 2,\n  color = '#ff2fb3',\n  thickness = 0.03,\n  light = false,\n  intensity = 3,\n}: NeonStripProps) {\n  const { unit } = useWorld()\n  const { tube } = useLuminance()\n  const L = length * unit\n  const r = (thickness / 2) * unit\n  const glow = useLight({ color, intensity, distance: (length + 3) * unit, decay: 1.6 }, light)\n  const m = useMaterials({\n    core: glowLook('#ffffff', tube),\n    sleeve: glowLook(color, tube, { transparent: true, opacity: 0.85 }),\n    halo: glowLook(color, tube, { transparent: true, opacity: 0.12, depthWrite: false }),\n  })\n\n  return (\n    <group position={position} rotation={rotation}>\n      <group rotation={[0, 0, Math.PI / 2]}>\n        <mesh material={m.core}>\n          <cylinderGeometry args={[r * 0.55, r * 0.55, L, 8]} />\n        </mesh>\n        <mesh material={m.sleeve}>\n          <cylinderGeometry args={[r, r, L, 12]} />\n        </mesh>\n        <mesh material={m.halo}>\n          <cylinderGeometry args={[r * 2.6, r * 2.6, L, 12]} />\n        </mesh>\n      </group>\n      <object3D ref={glow.ref} />\n    </group>\n  )\n}\n",
      "type": "registry:component"
    }
  ]
}
