New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pmndrs/vanilla

Package Overview
Dependencies
Maintainers
3
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pmndrs/vanilla - npm Package Compare versions

Comparing version 1.3.2 to 1.4.0

materials/SpotLightMaterial.cjs.js

2

package.json
{
"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.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc