{"_id":"three-vignette-background","_rev":"8-00e1b71e230c4e17ae386d0efff8b25b","name":"three-vignette-background","description":"a simple ThreeJS vignette background","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"three-vignette-background","version":"1.0.0","description":"a simple ThreeJS vignette background","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"standard":{"globals":["THREE"]},"dependencies":{"glslify":"^4.0.0"},"devDependencies":{"browserify":"^12.0.1","budo":"^7.0.2","glsl-blend-soft-light":"^1.0.5","glsl-film-grain":"^1.0.2","three":"^0.73.0","three-orbit-viewer":"^69.3.0","uglify-js":"^2.6.1"},"scripts":{"test":"node test.js","build":"browserify demo.js | uglifyjs -cm > bundle.js","start":"budo demo.js:bundle.js --live"},"keywords":["three","js","vignette","background","mesh","object","geometry"],"repository":{"type":"git","url":"git://github.com/mattdesl/three-vignette-background.git"},"browserify":{"transform":["glslify"]},"homepage":"https://github.com/mattdesl/three-vignette-background","bugs":{"url":"https://github.com/mattdesl/three-vignette-background/issues"},"gitHead":"c4b118a06aebbc96f5535cecebb30c515285897b","_id":"three-vignette-background@1.0.0","_shasum":"bb510535a0057fa1d0c322b12f8043f757e6c36b","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"bb510535a0057fa1d0c322b12f8043f757e6c36b","tarball":"https://registry.npmjs.org/three-vignette-background/-/three-vignette-background-1.0.0.tgz","integrity":"sha512-EEuoHr5MhAYGZVlWpT5lsVKMurm21At/JLvCP+oceJN64QoIVXGQD2FfA2ND6j82Z2G5m03UltUQIscRi7pjyQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG0RRPe2wli6PVAF3XJXVlnCZQGvoNjtcgTbMS3hG1DyAiEA3nW6OEz9Mel69y9FYaCAGaW+jYlXHwQ4ppkzUFaLhXU="}]},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}]},"1.0.1":{"name":"three-vignette-background","version":"1.0.1","description":"a simple ThreeJS vignette background","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"standard":{"globals":["THREE"]},"dependencies":{"glslify":"^4.0.0"},"devDependencies":{"browserify":"^12.0.1","budo":"^7.0.2","glsl-blend-soft-light":"^1.0.5","glsl-film-grain":"^1.0.2","three":"^0.73.0","three-orbit-viewer":"^69.3.0","uglify-js":"^2.6.1"},"scripts":{"test":"node test.js","build":"browserify demo.js | uglifyjs -cm > bundle.js","start":"budo demo.js:bundle.js --live"},"keywords":["three","js","vignette","background","mesh","object","geometry"],"repository":{"type":"git","url":"git://github.com/mattdesl/three-vignette-background.git"},"browserify":{"transform":["glslify"]},"homepage":"https://github.com/mattdesl/three-vignette-background","bugs":{"url":"https://github.com/mattdesl/three-vignette-background/issues"},"gitHead":"64fb5bdc6ed88b1c8ed0d46452a98756827cd52a","_id":"three-vignette-background@1.0.1","_shasum":"c6d811c2b1842c2e100cccd3a7f2d4d550bcca2c","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"c6d811c2b1842c2e100cccd3a7f2d4d550bcca2c","tarball":"https://registry.npmjs.org/three-vignette-background/-/three-vignette-background-1.0.1.tgz","integrity":"sha512-W1MgPsOOZSpB0ivNLLMTKoGfx47wiE514jx7PnJ79i+FfLh1tgheqr1tF5+S3SHEuB6cKKhEfaAdzpecDSoyjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEtspMmljsXGG0TfTXFZWj//96r98vA6zQHpk8bkXxRUAiEAxyif0xmtpVmvYzgryU2NUfbKw1i6jNTBE1d2QB2SmhY="}]},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}]},"1.0.2":{"name":"three-vignette-background","version":"1.0.2","description":"a simple ThreeJS vignette background","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"standard":{"globals":["THREE"]},"dependencies":{"glsl-film-grain":"^1.0.2","glsl-blend-soft-light":"^1.0.5","glslify":"^4.0.0"},"devDependencies":{"browserify":"^12.0.1","budo":"^7.0.2","three":"^0.73.0","three-orbit-viewer":"^69.3.0","uglify-js":"^2.6.1"},"scripts":{"test":"node test.js","build":"browserify demo.js | uglifyjs -cm > bundle.js","start":"budo demo.js:bundle.js --live"},"keywords":["three","js","vignette","background","mesh","object","geometry"],"repository":{"type":"git","url":"git://github.com/mattdesl/three-vignette-background.git"},"browserify":{"transform":["glslify"]},"homepage":"https://github.com/mattdesl/three-vignette-background","bugs":{"url":"https://github.com/mattdesl/three-vignette-background/issues"},"gitHead":"8a00db41c980c072364a6bf9c57e4e8284f90e26","_id":"three-vignette-background@1.0.2","_shasum":"4ee59b45c667ed8e38236a59fed194aa601d8c14","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"4ee59b45c667ed8e38236a59fed194aa601d8c14","tarball":"https://registry.npmjs.org/three-vignette-background/-/three-vignette-background-1.0.2.tgz","integrity":"sha512-/oRMF9PdlfvNsdqnuebKntedhtTudHZMNLLdpSF2hqc8+vFYoUVMATL6UMZwwbMxfvmjz2BXpN9skUyYB5Z9jw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDK8/iMeqbMWowO1bVepelSFc3EtxjCUwUcPruJMFfhaAiEAoXVp8chFxku7/zB9MltR+eZ2NMklqtzPRYc9OGYyslk="}]},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}]},"1.0.3":{"name":"three-vignette-background","version":"1.0.3","description":"a simple ThreeJS vignette background","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"standard":{"globals":["THREE"]},"dependencies":{"glsl-film-grain":"^1.0.2","glsl-blend-soft-light":"^1.0.5","glslify":"^4.0.0"},"devDependencies":{"browserify":"^12.0.1","budo":"^7.0.2","three":"^0.73.0","three-orbit-viewer":"^69.3.0","uglify-js":"^2.6.1"},"scripts":{"test":"node test.js","build":"browserify demo.js | uglifyjs -cm > bundle.js","start":"budo demo.js:bundle.js --live"},"keywords":["three","js","vignette","background","mesh","object","geometry"],"repository":{"type":"git","url":"git://github.com/mattdesl/three-vignette-background.git"},"browserify":{"transform":["glslify"]},"homepage":"https://github.com/mattdesl/three-vignette-background","bugs":{"url":"https://github.com/mattdesl/three-vignette-background/issues"},"gitHead":"8d46e5c07909bbf7661c3c0cc862a50cda9e8088","_id":"three-vignette-background@1.0.3","_shasum":"4e92ecc1c1db5946adf5d03eaead08614eb44be7","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"4e92ecc1c1db5946adf5d03eaead08614eb44be7","tarball":"https://registry.npmjs.org/three-vignette-background/-/three-vignette-background-1.0.3.tgz","integrity":"sha512-ucsO0haIl9qFucPH/r10orjx9VJr9hhcxe9Vsm4NEGlI19h2VDBb0YOtUHM9TENOyHyVqE88phlfeMZXmCuVpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA9rdWF3fEDKkEX5WbHFkeQJZKt7+O4u8MzMA+wpDQxVAiAdrawEodCFNs1Za2NWEmSVo/xwhvlUIktudhq8wZ+/og=="}]},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/three-vignette-background-1.0.3.tgz_1477327940092_0.9629170512780547"}}},"readme":"# three-vignette-background\n\n[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)\n\n[(demo)](http://mattdesl.github.io/three-vignette-background/)\n\nA soft vignette background for ThreeJS demos with a [simplex noise grain](https://github.com/mattdesl/glsl-film-grain). This returns a THREE.Mesh with a plane geometry and a shader which does not project into camera space, and so it fits across the entire device viewport.\n\n[<img src=\"http://i.imgur.com/wiVE7UE.png\" width=\"60%\" />](http://mattdesl.github.io/three-vignette-background/)\n\nCurrently, browserify is required to use this module as it has a hard dependency on [glslify](https://github.com/stackgl/glslify), a browserify transform.\n\nAlso see [gl-vignette-background](https://github.com/mattdesl/gl-vignette-background).\n\n## Install\n\n```sh\nnpm install three-vignette-background --save\n```\n\n## Example\n\n```js\nvar createOrbitViewer = require('three-orbit-viewer')(THREE)\nvar createBackground = require('./')\n\nvar app = createOrbitViewer({\n  clearColor: 'rgb(40, 40, 40)',\n  clearAlpha: 1.0,\n  fov: 55,\n  position: new THREE.Vector3(0, 2, -2)\n})\n\n// add a default background\nvar background = createBackground()\napp.scene.add(background)\n\n// ... setup rest of scene ...\n```\n\nSee [demo.js](./demo.js) for another usage example.\n\n## Usage\n\n[![NPM](https://nodei.co/npm/three-vignette-background.png)](https://www.npmjs.com/package/three-vignette-background)\n\n#### `background = createBackground([opt])`\n\nCreates a new vignette background with some default options. Turning the `grainScale` or `noiseAlpha` to zero will not compute the grain noise.\n\n- `geometry` the geometry to use, defaults to `new PlaneGeometry(2, 2, 1)`\n- `colors` an array of two colors to use; either strings or `THREE.Color` objects; default `[ '#fff', '#283844' ]`\n- `aspect` aspect ratio for grain and vignette; default 1\n- `grainScale` how large to scale the grain particles, default 0.005\n- `grainTime` the time offset for animating grain; default 0\n- `noiseAlpha` the alpha to blend the noise onto the background, default 0.25\n- `smooth` an `[x, y]` array or THREE.Vector2 with the low and high smoothstep values for the vignetting, default `[ 0, 1 ]`\n- `scale` a number, `[x, y]` array, or THREE.Vector2 with the scaling for the vignette, default 1\n- `offset` a `[x, y]` array or THREE.Vector2 to offset the vignette; default `[0, 0]`\n- `aspectCorrection` a boolean, default false, as to whether to correct the vignette scale to the `aspect` value\n\n#### `background.style(opt)`\n\nRe-style the background. Any values that are specified in `opt` will be set, others will not be changed. Takes all the same values except `geometry`, which must be set at creation time.\n\n## License\n\nMIT, see [LICENSE.md](http://github.com/mattdesl/three-vignette-background/blob/master/LICENSE.md) for details.\n","maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"time":{"modified":"2022-06-27T06:19:44.736Z","created":"2015-12-07T03:18:47.462Z","1.0.0":"2015-12-07T03:18:47.462Z","1.0.1":"2015-12-07T03:21:51.211Z","1.0.2":"2015-12-07T03:23:07.255Z","1.0.3":"2016-10-24T16:52:22.076Z"},"homepage":"https://github.com/mattdesl/three-vignette-background","keywords":["three","js","vignette","background","mesh","object","geometry"],"repository":{"type":"git","url":"git://github.com/mattdesl/three-vignette-background.git"},"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"bugs":{"url":"https://github.com/mattdesl/three-vignette-background/issues"},"license":"MIT","readmeFilename":"README.md","users":{"mystaticself":true,"looeee":true}}