LitSpriteOptions
Defined in: packages/nodes/src/lighting/lit.ts:262
Combined sprite lighting with diffuse, specular, and optional rim. Convenience function that combines common lighting components.
Surface normal
Base surface color
Light result from pointLight2D, directionalLight2D, etc.
Ambient light result
Additional lighting options
Example
Section titled “Example”const lit = litSprite(normal, inputColor, pointLight, ambient, { specular: true, shininess: 32, rim: true, rimColor: [0.5, 0.8, 1]})Properties
Section titled “Properties”
optionalrim?:boolean
Defined in: packages/nodes/src/lighting/lit.ts:270
Enable rim lighting
rimColor?
Section titled “rimColor?”
optionalrimColor?:Vec3Input
Defined in: packages/nodes/src/lighting/lit.ts:272
Rim light color
rimPower?
Section titled “rimPower?”
optionalrimPower?:FloatInput
Defined in: packages/nodes/src/lighting/lit.ts:274
Rim power (default: 2)
rimStrength?
Section titled “rimStrength?”
optionalrimStrength?:FloatInput
Defined in: packages/nodes/src/lighting/lit.ts:276
Rim strength (default: 1)
shininess?
Section titled “shininess?”
optionalshininess?:FloatInput
Defined in: packages/nodes/src/lighting/lit.ts:266
Specular shininess (default: 32)
specular?
Section titled “specular?”
optionalspecular?:boolean
Defined in: packages/nodes/src/lighting/lit.ts:264
Enable specular highlights
specularStrength?
Section titled “specularStrength?”
optionalspecularStrength?:FloatInput
Defined in: packages/nodes/src/lighting/lit.ts:268
Specular strength (default: 0.5)
viewDir?
Section titled “viewDir?”
optionalviewDir?:Vec3Input
Defined in: packages/nodes/src/lighting/lit.ts:278
View direction for specular/rim (default: [0, 0, 1])