pixijs / lights

Adds dynamic lighting via deferred shading to PixiJS
https://pixijs.io/lights/docs/index.html
MIT License
198 stars 29 forks source link

Spotlight Polygon (suggest) #22

Open jonlepage opened 6 years ago

jonlepage commented 6 years ago

It would be great to see another type of light. A polygonal light for emulate a spot light.

"spot" : Spotlight A directional light with with range cone. var shape = new PIXI.Polygon (points,...)

If that can give a good idea. It's a suggestion.

PIXI.lights.Spotlight({
        type: "Spotlight",        // Light type,
        diffuse:  [1.0,1.0,1.0],  // Diffuse Light color.
        specular: [0.1,0.1,0.1],  // Specular Light color.
        intensity: 1.0,           // Light intensity.
        distance: 10.0,           // Maximum light distance for point lights.
        cutoff: 60.0,             // For spotlight types this is the cut-off angle of the cone.
    });
jonlepage commented 6 years ago

https://webglfundamentals.org/webgl/lessons/webgl-3d-lighting-spot.html telechargement

schellenbergk commented 2 years ago

I'd love to use this one