Skip to content

πŸ‘»ν• λ‘œμœˆμ„ λ§žμ΄ν•΄ ThreeJS Drei 라이브러리λ₯Ό ν™œμš©ν•˜μ—¬ μœΌμŠ€μŠ€ν•œ κ³΅λ™λ¬˜μ§€ λ§Œλ“€κΈ°, Float, Sparkles, GodRays(μ€‘μš”!) ν•™μŠ΅ν•˜κΈ°

Notifications You must be signed in to change notification settings

kwb020312/GraveKeeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GraveKeeper

ghost

πŸ€”μ–΄λ–€ 역할을 ν•˜λ‚˜μš”?

πŸ‘»ν• λ‘œμœˆμ„ λ§žμ΄ν•΄ ThreeJS Drei 라이브러리λ₯Ό ν™œμš©ν•˜μ—¬ μœΌμŠ€μŠ€ν•œ κ³΅λ™λ¬˜μ§€ λ§Œλ“€κΈ°, Float, Sparkles, GodRays(μ€‘μš”!) ν•™μŠ΅ν•˜κΈ° μœ„ν•΄ μ œμž‘λœ 개인 κ³΅λΆ€μš© ν”„λ‘œμ νŠΈ

μš°μ„ , GodRaysλž€? 직역 κ·ΈλŒ€λ‘œ μ‹ μ˜ 직사광선을 μ˜λ―Έν•˜λ©° μ „λ°©μ˜ 피사체에 κ°€λ €μ§€λŠ” 빛을 μ˜λ―Έν•œλ‹€.

const mesh = new Mesh(
  new CylinderGeometry(0.3, 0.3, 0.2, 20),
  new MeshBasicMaterial({
    color: lightColor,
    transparent: true,
    opacity: 1,
  })
);

<GodRays
 sun={mesh} // 광원, ν˜„μž¬ ν”„λ‘œμ νŠΈμ—μ„  μ›λΏ”ν˜• 물체에 κΈ°λ³Έ μ§ˆκ°μ„ μž…ν˜€ μ‚¬μš©ν•˜μ˜€μŒ(포털 λ‚΄λΆ€ μ΅œμƒλ‹¨ 광원)
 blendFunction={BlendFunction.Screen} // ν™”λ©΄ 전체에 적용
 samples={40} // 
 density={0.97} // λΉ›μ˜ 밀도, μ–Όλ§ˆλ‚˜ νΌμ§€λ‚˜
 decay={0.97} // 거리에 λ”°λ₯Έ λˆˆλΆ€μ‹¬μ˜ 감쇠도
 weight={0.6} // λΉ›μ˜ μ–‘
 exposure={0.3} // λ…ΈμΆœ, λΉ›μ˜ 밝기
 clampMax={1} // κ΄‘μ›μ˜ 이동
 width={Resizer.AUTO_SIZE} // κ°€λ‘œ 폭
 height={Resizer.AUTO_SIZE} // μ„Έλ‘œ 폭
 kernelSize={KernelSize.SMALL} // blur 크기
 blur={true} // blur μ—¬λΆ€
/>

πŸ˜Šμ–΄λ–»κ²Œ μ‹€ν–‰ν•˜λ‚˜μš”?

ν•„μš”λͺ¨λ“ˆ μ„€μΉ˜

npm install

λ‘œμ»¬ν™˜κ²½μ— μ‹€ν–‰ (localhost:5173)

npm run dev

πŸ€”μ–΄λ–€ 기술이 μ‚¬μš©λ˜μ—ˆλ‚˜μš”?

  • Framework
    • React(Vite)
      • "react": "^18.2.0"
  • etc
    • ThreeJS
      • "@react-three/drei": "9.14.3",
      • "@react-three/fiber": "8.0.26",
      • "@react-three/postprocessing": "2.4.4",

😎UIλŠ” μ–΄λ–€κ°€μš”?

image

image

image


πŸ˜Άλ¬Έμ œκ°€ μžˆμ–΄μš”..

μ΄μŠˆμ‚¬ν•­μ„ λ“±λ‘ν•΄μ£Όμ‹œλ©΄ λ°”λ‘œ ν™•μΈν•΄λ³΄κ² μŠ΅λ‹ˆλ‹€.


πŸ˜™μ •λ³΄

2023-11-08 배포 및 μ •μƒλ™μž‘ 확인

About

πŸ‘»ν• λ‘œμœˆμ„ λ§žμ΄ν•΄ ThreeJS Drei 라이브러리λ₯Ό ν™œμš©ν•˜μ—¬ μœΌμŠ€μŠ€ν•œ κ³΅λ™λ¬˜μ§€ λ§Œλ“€κΈ°, Float, Sparkles, GodRays(μ€‘μš”!) ν•™μŠ΅ν•˜κΈ°

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published