What it does
graphics
Graphics tab for the System Tools panel — culling mode selector.
Input-driven (refresh = 0): the tab rebuilds only when the user
changes a control, and every change pushes back through the
__rendering.set* FFI calls.
Exports
M.label: string—"Graphics".M.refresh: number—0(input-driven).M.build(state) -> any— build the Graphics widget tree.M.onCallback(callbackId: string, data: any, state) -> boolean— handle dropdown events.
Types:
GraphicsState = any— shell-owned tab state (unused; the module owns its own mirror).
Usage
-- Registered by system_tools/init.luau:
local Graphics = require("@builtin::modules.engine.editor.system_tools.tabs.graphics")
TABS.graphics = Graphics
Notes
- The culling-mode mirror is module-scoped so the selection survives
tab switches and Luau hot-reloads.
__rendering.setCullingModeis the authoritative path and other systems can drive the renderer too. - Culling modes are a fixed list at the top of the file. Adding one requires a renderer-side change first so the FFI string-set is in sync.
- The FFI call is wrapped in
pcallso the tab survives if__renderingis absent (e.g. headless / test builds).
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.