1.0.2 • Published 6 years ago

three-envmap-helper v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

three-envmap-helper

Quickly add an HDR IBL envMap to your materials in a scene. envMap and code pulled from threejs webgl hdr environment map example

installation

npm install --save three-envmap-helper

usage

const envMapify = require('three-envmap-helper')(THREE)
envMapify(scene, renderer)
// Optionally, if you host the assets somewhere else
envMapify(scene, renderer, '/public/path/to/assets/)

envMapify takes an optional third parameter identifying where the .hdr files live. These files need to be accessible to the browser so if you need to copy them elsewhere to serve them, you'll put the path prefix as the third parameter.