Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit098ece8e9e

README.md

ToonOutline

Draws the entity's mesh with an MToon-style outline: a shell of the mesh pushed out along its normals and seen from inside, a line around the silhouette and its creases, drawn by the toonOutline render feature (modules.toonOutline). A VRM avatar's body carries one on every mesh entity whose MToon material states an outline, with the material's own outline colour, width, width mode, lighting mix and width texture.

e.component.add("ToonOutline", { colorR = 0.1, colorG = 0.05, colorB = 0.05, width = 0.002, mode = "world" })
  • colorR, colorG, colorB, colorA: the line's colour, linear.
  • width: metres in world mode, a share of the screen's height in screen mode.
  • lightingMix: how much the line takes the light falling on it, 0 none to 1 all.
  • widthTexture, uvScaleX/Y, uvOffsetX/Y: a texture whose red channel scales the width at each vertex's UV.