Irradiance
Photorealistic light spilling around the edge of any 2D, SVG, or 3D shape — any number of movable coloured point lights strike the silhouette and the lit edges irradiate their surroundings, gathered in a compute pass with real cast shadows, mixing where they meet and burning to white at the rim
Props
Prop
Details
originstringDefault:
centerReference edge the center position is measured from (center default). Lets you pin the shape relative to a corner or the canvas centre.
originstringDefault: centerReference edge the center position is measured from (center default). Lets you pin the shape relative to a corner or the canvas centre.
center{x: number, y: number}Default:
{"x":0.5,"y":0.5}Center position of the shape
center{x: number, y: number}Default: {"x":0.5,"y":0.5}Center position of the shape
scalenumberDefault:
1Scale of the shape (1 = default size)
scalenumberDefault: 1Scale of the shape (1 = default size)
rotationnumberDefault:
0Rotation of the shape in degrees
rotationnumberDefault: 0Rotation of the shape in degrees
lightsArray<{position: {x: number, y: number}, color: string, intensity: number}>Default:
[{"position":{"x":0.3,"y":0.3},"color":"#ffb347","intensity":3},{"position":{"x":0.72,"y":0.7},"color":"#7a5cff","intensity":2}]The point lights striking the shape — each with its own position, colour and brightness
lightsArray<{position: {x: number, y: number}, color: string, intensity: number}>Default: [{"position":{"x":0.3,"y":0.3},"color":"#ffb347","intensity":3},{"position":{"x":0.72,"y":0.7},"color":"#7a5cff","intensity":2}]The point lights striking the shape — each with its own position, colour and brightness
lightHeightnumberDefault:
0.5Height of the lights above the shape plane, relative to the shape — low lights graze the body, high lights flood it evenly
lightHeightnumberDefault: 0.5Height of the lights above the shape plane, relative to the shape — low lights graze the body, high lights flood it evenly
lightRangenumberDefault:
1.2Reach of each light — the distance at which it has fallen to half strength, relative to the shape
lightRangenumberDefault: 1.2Reach of each light — the distance at which it has fallen to half strength, relative to the shape
reachnumberDefault:
3How far from the shape the spilled light is gathered, relative to the shape — the glow fades out toward this distance
reachnumberDefault: 3How far from the shape the spilled light is gathered, relative to the shape — the glow fades out toward this distance
corenumberDefault:
1The lit edge seen directly — the white-hot line along the rim where the lights strike
corenumberDefault: 1The lit edge seen directly — the white-hot line along the rim where the lights strike
wrapnumberDefault:
0.1How far light wraps around edges that face away from it — 0 leaves the far side dark
wrapnumberDefault: 0.1How far light wraps around edges that face away from it — 0 leaves the far side dark
shadowsbooleanDefault:
trueCast shadows — the body blocks each light from edges it stands in front of (keeps holes and concave pockets dark)
shadowsbooleanDefault: trueCast shadows — the body blocks each light from edges it stands in front of (keeps holes and concave pockets dark)
shadowSoftnessnumberDefault:
0.15Penumbra width of the cast shadows — 0 is razor sharp
shadowSoftnessnumberDefault: 0.15Penumbra width of the cast shadows — 0 is razor sharp
bodyColorstringDefault:
#000000Color of the shape itself — black for a pure occluder, lighter to see the lights land on its form
bodyColorstringDefault: #000000Color of the shape itself — black for a pure occluder, lighter to see the lights land on its form
bodyLightnumberDefault:
0.6How much the lights illuminate the body — the bevel of a flat shape or the form of a 3D one
bodyLightnumberDefault: 0.6How much the lights illuminate the body — the bevel of a flat shape or the form of a 3D one
bevelWidthnumberDefault:
0.01Width of the rounded edge a flat shape catches the light on, relative to the shape
bevelWidthnumberDefault: 0.01Width of the rounded edge a flat shape catches the light on, relative to the shape
edgeSoftnessnumberDefault:
0.05Softness of the shape boundary edge
edgeSoftnessnumberDefault: 0.05Softness of the shape boundary edge
shapeShapeConfigDefault:
circleSDFShape to render — choose from 11 built-in analytical shapes or supply a custom SDF. See the Shape Effects guide for all available shapes and their options.
shapeShapeConfigDefault: circleSDFShape to render — choose from 11 built-in analytical shapes or supply a custom SDF. See the Shape Effects guide for all available shapes and their options.
shapeSdfUrlstringDefault:
""URL to a pre-generated SDF `.bin` file — when non-empty, activates SVG mode and triggers a shader recompile. See the Shape Effects guide for how to generate an SDF from an SVG.
shapeSdfUrlstringDefault: ""URL to a pre-generated SDF `.bin` file — when non-empty, activates SVG mode and triggers a shader recompile. See the Shape Effects guide for how to generate an SDF from an SVG.