LitSpriteOptions
Defined in: packages/nodes/src/lighting/lit.ts:263
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:271
Enable rim lighting
rimColor?
Section titled “rimColor?”
optionalrimColor?:Vec3Input
Defined in: packages/nodes/src/lighting/lit.ts:273
Rim light color
rimPower?
Section titled “rimPower?”
optionalrimPower?:FloatInput
Defined in: packages/nodes/src/lighting/lit.ts:275
Rim power (default: 2)
rimStrength?
Section titled “rimStrength?”
optionalrimStrength?:FloatInput
Defined in: packages/nodes/src/lighting/lit.ts:277
Rim strength (default: 1)
shininess?
Section titled “shininess?”
optionalshininess?:FloatInput
Defined in: packages/nodes/src/lighting/lit.ts:267
Specular shininess (default: 32)
specular?
Section titled “specular?”
optionalspecular?:boolean
Defined in: packages/nodes/src/lighting/lit.ts:265
Enable specular highlights
specularStrength?
Section titled “specularStrength?”
optionalspecularStrength?:FloatInput
Defined in: packages/nodes/src/lighting/lit.ts:269
Specular strength (default: 0.5)
viewDir?
Section titled “viewDir?”
optionalviewDir?:Vec3Input
Defined in: packages/nodes/src/lighting/lit.ts:279
View direction for specular/rim (default: [0, 0, 1])