Skip to main content

Interface: ToonShadingOptions

Defined in: src/rendering/toon/toonShading.ts:59

Options for applyToonShading and Mobject3D.setToonShading().

Properties​

brightness?​

optional brightness: number

Defined in: src/rendering/toon/toonShading.ts:72

Factor on the mobject colour for the lit tone. 1 is the exact colour.


highlight?​

optional highlight: boolean | ToonHighlightOptions

Defined in: src/rendering/toon/toonShading.ts:84

Highlight. false turns it off.


light?​

optional light: "scene" | "view"

Defined in: src/rendering/toon/toonShading.ts:82

Light direction source. 'view' (default): one key light fixed to the camera, upper left, so the look does not change when the camera orbits. 'scene': the scene's directional, point and spot lights.


outline?​

optional outline: false | ToonOutlineOptions

Defined in: src/rendering/toon/toonShading.ts:86

Outline. false turns it off.


preset?​

optional preset: ToonPreset

Defined in: src/rendering/toon/toonShading.ts:61

Base look. Every other option overrides one part of it. Default: 'manim'.


shadowColor?​

optional shadowColor: string

Defined in: src/rendering/toon/toonShading.ts:74

Colour of the darkest tone. Default: a darker shade of the mobject colour.


shadowStrength?​

optional shadowStrength: number

Defined in: src/rendering/toon/toonShading.ts:76

How dark the derived shadow tone is, from 0 (none) to 1 (strong).


softness?​

optional softness: number

Defined in: src/rendering/toon/toonShading.ts:70

0 gives hard flat bands; 1 gives a smooth gradient between the darkest and the lit tone.


steps?​

optional steps: number

Defined in: src/rendering/toon/toonShading.ts:63

Number of tone bands, from 2 to 5.


threshold?​

optional threshold: number

Defined in: src/rendering/toon/toonShading.ts:68

Where the tone bands split, from 0 to 1, as a wrapped-light level. Higher puts more of the surface in shadow. Default: 0.5 (manim), 0.62 (cartoon).