흑요석 유리

Obsidian

정면은 검게 유지하고 기울어진 면과 모서리에 흐르는 무지갯빛을 입힙니다.

다른 이름: ObsidianDark iridescent glassBlack glass

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

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

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

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

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

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

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
      <Obsidian />
    </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: 'Obsidian',
    }
  ]
}, { disableTelemetry: true })

속성(props) · Obsidian

값을 바꾸면 위 데모와 코드 탭에 바로 반영됩니다. 설명은 라이브러리 레지스트리의 영어 원문(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 glass shape
scaleScale10.1 – 3 (step 0.01)Scale of the glass shape (1 = default size)
rotationRotation00 – 360 (step 1)Rotation of the glass shape in degrees
bodyColorBody Color#06071a—The dark body of the glass — what the faces looking straight at you show. Keep it deep for the iridescence to pop.
colorAColor A#ff2f7a—First iridescent color (two-color fallback when stops are cleared)
colorBColor B#5fe6ff—Second iridescent color (two-color fallback when stops are cleared)
stopsColors코드에서 지정[{"color":"#ff2f7a","position":0},{"color":"#2a2cff","pos…—Multi-stop gradient colors (overrides Color A / Color B when set)
colorSpaceColor Spaceoklablinear · oklch · oklab · hsl · hsv · lchColor space for color interpolation
iridescenceIridescence10 – 1.5 (step 0.01)Strength of the color on the oblique surfaces — 0 = plain dark glass, above 1 = saturated neon walls
rimWidthRim Width0.550 – 1 (step 0.01)How far in from edge-on the color reaches — small keeps it to the steepest walls, large lets it creep across gently turning faces
rimSoftnessRim Softness0.250.02 – 0.6 (step 0.01)Softness of the transition from dark face to colored wall
flowAngleFlow Angle300 – 360 (step 1)Direction the gradient flows across the surface, in degrees
flowScaleFlow Scale10.2 – 4 (step 0.01)How many times the palette cycles across the shape — higher = tighter color bands
speedSpeed0.50 – 4 (step 0.01)Speed the gradient flows along the walls. 0 pauses.
glossGloss0.350 – 2 (step 0.01)Strength of the studio softboxes reflected in the glass — the pale highlights riding the top edges
envRotationEnv Rotation00 – 360 (step 1)Rotates the reflected studio — spins where the bright reflections fall
bevelWidthBevel Width0.080.005 – 0.3 (step 0.001)Width of the edge bevel on flat shapes — the band that turns away from the viewer and catches the color
bevelShapeBevel Profile00 – 1 (step 0.01)Bevel profile — 0 = one smooth round fillet, 1 = machined: a steep outer fillet, a chamfer plateau and an inner knee
edgeSoftnessEdge Softness0.050 – 1 (step 0.01)Softness of the shape boundary edge
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

검은 유리 조각을 기울였을 때 모서리에서만 색이 번쩍이는 듯, 정면은 어둡고 비스듬한 면은 무지갯빛으로 빛납니다.

`bodyColor`는 정면의 어두운 바탕색입니다. `iridescence`를 올리면 기울어진 면의 색이 강해지고, `rimWidth`를 넓히면 색이 가장자리에서 안쪽으로 더 번집니다. `flowAngle`은 색 흐름 방향을, `speed`는 움직임을 조절합니다.

자체 재질로 사용할 수 있으며, 어두운 유리 면이 읽히도록 밝은 배경과 대비시키면 좋습니다. 다크 배경 위에서는 정면 윤곽이 사라질 수 있으니 작은 텍스트나 버튼에는 피하세요.

언제 쓰나

어두운 고급 배지, 보석 같은 로고, 반짝이는 유리 장식에 잘 맞습니다. 검은 바탕에서 형태를 또렷이 보여야 하거나 정보 전달이 우선인 곳에는 피하세요.

페이지로 열기 ↗