Repository navigation
Film grain and light leaks
Two new effects, both optional and backwards compatible.
vintagejs(photo, {
grain: 0.35, // 0–1
lightLeak: { intensity: 0.5, edge: 'left' }, // edge: left | right | top | bottom
});grain: film grain that shows most in the midtones. It scales with the image size, so a small preview and the full-size photo look the same, and it is identical on every run (no flicker between renders).lightLeak: a warm glow bleeding in from one edge, like light getting into an old camera. Optionalcolor(default warm orange).- New exported types:
TLightLeak,TLightLeakEdge,TRGBColor. - Tests now render real pixels in Node via
@napi-rs/canvas.