Create a noise background to the threejs scene.
The project fork from: https://github.com/mattdesl/three-vignette-background
I modified it to:
- support webpack 5. No need to use
glslify
; - pack it as a module that can be imported using webpack
npm install
npm run build
npm start
Read the source code of demo.js
import { createBackground } from './dist/noise-background'
const background = createBackground({ grainScale: 0.0015 })
scene.add(background)
Read here for the detail configs.
npm i three-vignette-background-esm
import { createBackground } from 'three-vignette-background-esm/dist/noise-background'