Skip to Content
defold-typescript libraries
selimanac

selimanac/defold-3D-outline-shader/outline

3D model outline shader for Defold: stencil or inverted-hull outlines drawn from a render script, with settable color, thickness and predicate tag.

  • GitHub: selimanac/defold-3D-outline-shader — pinned to 07c2eee
    1. This repo publishes no releases or tags. Add a commit archive URL — for the pinned commit, https://github.com/selimanac/defold-3D-outline-shader/archive/07c2eee1abd821fb36daad6c7621258116ef75f2.zip — to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as outline from "outline"

Functions

set(thickness: number, color: Vector4, type: number)

Parameters

  • thickness: number
  • color: Vector4
  • type: number

draw(toggle: boolean)

Parameters

  • toggle: boolean

set_tag(tag: string)

Parameters

  • tag: string

init(self: LuaMap<string, unknown> | PlainTable)

Parameters

  • self: LuaMap<string, unknown> | PlainTable

update(self: LuaMap<string, unknown> | PlainTable, predicates: LuaMap<string, unknown> | PlainTable, frustum: { frustum: Matrix4 }, clear_buffer?: LuaMap<render.ClearBufferKey, number | Vector4>)

Parameters

  • self: LuaMap<string, unknown> | PlainTable
  • predicates: LuaMap<string, unknown> | PlainTable
  • frustum: { frustum: Matrix4 }
  • clear_buffer?: LuaMap<render.ClearBufferKey, number | Vector4>

Variables

type: { OUTLINE_STENCIL: number; OUTLINE_INVERTED_HULL: number }

On this page