@pmndrs/vanilla
Advanced tools
Comparing version 1.3.2 to 1.4.0
{ | ||
"name": "@pmndrs/vanilla", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -41,2 +41,3 @@ ![logo](logo.jpg) | ||
<li><a href="#meshtransmissionmaterial">MeshTransmissionMaterial</a></li> | ||
<li><a href="#spotlight">SpotLight</a></li> | ||
</ul> | ||
@@ -172,1 +173,27 @@ </ul> | ||
``` | ||
#### SpotLight | ||
<p> | ||
<a href="https://codesandbox.io/s/tx1pq"><img width="20%" src="https://codesandbox.io/api/v1/sandboxes/tx1pq/screenshot.png" alt="Demo"/></a> | ||
<a href="https://codesandbox.io/s/wdzv4"><img width="20%" src="https://codesandbox.io/api/v1/sandboxes/wdzv4/screenshot.png" alt="Demo"/></a> | ||
</p> | ||
A Volumetric spotlight. | ||
```javascript | ||
const material = new SpotLightMaterial({ | ||
opacity: 1, // volume shader opacity | ||
attenuation: 2.5, // how far the volume will travel | ||
anglePower: 12, // volume edge fade | ||
spotPosition: new Vector3(0, 0, 0), // spotlight's world position | ||
lightColor: new Color('white'), // volume color | ||
cameraNear: 0, // for depth | ||
cameraFar: 1, // for depth | ||
depth: null, // for depth , add depthTexture here | ||
resolution: new Vector2(0, 0), // for depth , set viewport/canvas resolution here | ||
}) | ||
``` | ||
Optionally you can provide a depth-buffer which converts the spotlight into a soft particle. |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
74468
27
718
198
6
5