성운

Nebula

구름처럼 흐르는 발광 가스와 어두운 빈틈, 깊이감 있는 별을 도형 안에 채웁니다.

다른 이름: NebulaGas nebulaCosmic nebula

WebGPU 를 지원하는 브라우저에서 움직입니다

이 기기에서는 데모를 그리지 못해 정지 화면을 보여 줍니다

React
// WebGPU 를 지원하는 브라우저에서만 그립니다.
import { Shader, Nebula } from 'shaders/react'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: 320 }} disableTelemetry>
      <Nebula />
    </Shader>
  )
}
Vue
<!-- WebGPU 를 지원하는 브라우저에서만 그립니다. -->
<script setup lang="ts">
import { Shader, Nebula } from 'shaders/vue'
</script>

<template>
  <Shader style="width: 100%; height: 320px" :disable-telemetry="true">
    <Nebula/>
  </Shader>
</template>
Svelte
<!-- WebGPU 를 지원하는 브라우저에서만 그립니다. -->
<script>
  import { Shader, Nebula } from 'shaders/svelte'
</script>

<Shader style="width: 100%; height: 320px" disableTelemetry>
  <Nebula />
</Shader>
Solid
// WebGPU 를 지원하는 브라우저에서만 그립니다.
import { Shader, Nebula } from 'shaders/solid'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
      <Nebula />
    </Shader>
  )
}
JavaScript
// WebGPU 를 지원하는 브라우저에서만 그립니다.
// <canvas id="canvas" style="width:100%;height:320px"></canvas> 가 페이지에 있어야 한다
import { createShader } from 'shaders/js'

const shader = await createShader(document.getElementById("canvas"), {
  components: [
    {
      type: 'Nebula',
    }
  ]
}, { disableTelemetry: true })

속성(props) · Nebula

값을 바꾸면 위 데모와 코드 탭에 바로 반영됩니다. 설명은 라이브러리 레지스트리의 영어 원문(MIT)입니다.

이름값기본값범위·선택지설명(원문)
originOrigin코드에서 지정center—Reference edge the center position is measured from (center default). Lets you pin the shape relative to a corner or the canvas centre.
centerCenter
x0.5y0.5
{"x":0.5,"y":0.5}x, y: 0 – 1Center position of the nebula shape
scaleScale10.1 – 3 (step 0.01)Scale of the nebula shape (1 = default size)
rotationRotation00 – 360 (step 1)Rotation of the nebula shape in degrees
coreColorCore Color#ffd9b0—The hot color the densest gas cores glow with — the embedded newborn stars
gasColorGas Color#ff5e7a—The main emission color of the gas body — H-alpha rose by default
veilColorVeil Color#3a5bdb—The color of the thin outer veils and the deep-space background behind the gas
colorSpaceColor Spaceoklablinear · oklch · oklab · hsl · hsv · lchColor space the veil → gas → core ramps blend in
densityDensity10 – 1 (step 0.01)Optical density of the gas — how strongly clouds occlude the stars and gas behind them
cavityCavity00 – 1 (step 0.01)How hollowed-out the nebula is — 0 fills the volume with cloud banks, high carves large dark voids between them
dustDust0.550 – 1 (step 0.01)Cold dark dust lanes threading the gas — absorb-only tendrils that redden the clouds and stars behind them
gasScaleGas Scale0.40.1 – 1 (step 0.01)Feature size of the gas — higher = finer, busier cloud detail
billowBillow0.60 – 1 (step 0.01)Turbulent folding of the clouds — 0 = smooth drifting banks, 1 = heavily churned billows
glowGlow00 – 2 (step 0.01)Hot emission bloom of the dense cores
seedSeed00 – 100 (step 1)Random seed — pans the gas field to a different region of noise space for a new cloud composition
starsStars0.070 – 1 (step 0.01)Brightness of the star fields drifting at depth behind and inside the gas
starScaleStar Scale10.25 – 3 (step 0.01)Density of the star fields — higher = smaller, busier stars
twinkleTwinkle0.350 – 1 (step 0.01)Intensity of the star twinkle (0 = steady stars, 1 = full shimmer)
refractionRefraction0.50 – 1 (step 0.01)How strongly the curved glass walls bend the interior seen near the edges
environmentEnvironment0.70 – 2 (step 0.01)Strength of the studio softboxes reflected in the polished glass surface
highlightHighlight1.150 – 2 (step 0.01)Sharp key-light glint on the glass
highlightSoftnessHighlight Softness0.50 – 1 (step 0.01)Specular highlight softness — lower is a tighter, sharper glint
lightAngleLight Angle3150 – 360 (step 1)Direction of the key light and reflected studio, in degrees
edgeSoftnessEdge Softness0.050 – 1 (step 0.01)Softness of the shape boundary edge
speedSpeed0.30 – 4 (step 0.01)Speed of the slowly churning gas and twinkling stars. 0 freezes the nebula.
shapeShape코드에서 지정{"type":"sphere3D","radius":0.35}—Serialized shape configuration (JSON)
shapeSdfUrlshapeSdfUrl코드에서 지정—URL to a pre-generated SDF .bin file
shapeTypeshapeType코드에서 지정—Active SDF shape type

모든 컴포넌트 공통: blendMode · opacity · visible · maskSource/maskType · boundingBox · id

유리 구 안에 먼 우주의 성운을 담은 듯, 가스 구름 사이로 어두운 빈틈과 뜨거운 빛, 별이 겹쳐 보입니다.

`density`는 가스가 뒤쪽 별과 구름을 가리는 정도를, `cavity`는 성운 안의 어두운 빈 공간을 조절합니다. `gasScale`을 높이면 구름 결이 더 잘게 나뉘고, `billow`는 접히는 정도를 키웁니다. `glow`는 밝은 중심부의 빛을, `stars`는 깊이 있는 별빛을 조절합니다.

자체적으로 우주 장면을 채우므로 히어로 배경이나 큰 장식에 어울립니다. 별과 구름이 복잡해지면 위에 얹은 본문이 묻힐 수 있어 텍스트에는 단색 바탕을 별도로 두세요.

언제 쓰나

우주 테마 히어로 배경, 성운 일러스트, 큰 타이틀 장식에 잘 맞습니다. 촘촘한 데이터나 읽어야 할 문장이 놓이는 배경에는 피하세요.

페이지로 열기 ↗