0.1.6 • Published 5 months ago
kaplay-lighting v0.1.6
KAPLAY Lighting Plugin
A lighting plugin for your KAPLAY games!
Features
- Basic Light Types: Point Light, Global Light (Doesn't have directional light yet, just lights the entire screen equally)
- Normal Map Support
- Lit Shaders that apply custom shader code combined with the lighting effect.
Usage
- Install kaplay-lighting with
npm i kaplay-lighting
- Import kaplay-lighting into your project with
import LightingPlugin from "kaplay-lighting"
- Add
LightingPlugin
as a plugin to kaplay.
import kaplay from "kaplay";
import LightingPlugin from "kaplay-lighting";
// Initialize KAPLAY with the Lighting plugin
const k = kaplay({
plugins: [LightingPlugin]
});
// Your game code here