postprocessing.glitch(props : Object) : Object
props - 設定オブジェクト。
- wild (Boolean) : ワイルドモード (デフォルト : false)。
Glitch エフェクトを追加します。
戻り値は、glitch のみのオブジェクトです。
戻り値の glitch は、animate の中で呼び出すことでエフェクトを適用します。
animate の第2引数を false にしてください。
const { camera, create, animate, postprocessing } = init()
camera.position.set(0, 0, 2)
create.ambientLight()
create.directionalLight()
const torusKnot = create.torusKnot({ size: 0.5, tube: 0.16 })
const { glitch } = postprocessing.glitch()
animate(({ delta }) => {
torusKnot.rotation.x += delta
torusKnot.rotation.y += delta
glitch()
}, false)
const { camera, create, animate, load, postprocessing } = init()
camera.position.set(0, 0, 2)
create.ambientLight()
create.directionalLight()
const torusKnot = create.torusKnot({ size: 0.5, tube: 0.16 })
const { glitch } = postprocessing.glitch({ wild: true })
animate(({ delta }) => {
torusKnot.rotation.x += delta
torusKnot.rotation.y += delta
glitch()
}, false)