@native/scene draws in 3D, inside the game frame and against its depth: walls hide your lines,
players get your materials, particles fall on the floor. It’s built on @native/gpu, but you
don’t touch pipelines here.
Like render, draw calls only work inside an
on("render") listener. Materials and
particle emitters are objects: make them once, at the top level.await scene.ready if you need to know. scene.device is that GPUDevice, for mixing in your own
@native/gpu passes.
Overview
Shapes
line, polyline, circle, box, sphere, triangle.Materials
Built-in looks, or your own
Surface() in HLSL.Players and models
player, model, replacing the cheat’s chams.Particles
GPU-simulated emitters: bursts and streams.
Shapes
Lines are drawn as smooth capsules in screen space, cut at the near plane, so a line from you to a
target behind you still shows its visible half.
Depth modes
Hooks
Where in the frame a draw happens.scene.hooks lists them.
Materials
Every option except
look, hlsl, params and blend is a live property:
Your own surface
Write one HLSL function. The scene calls it for every pixel of the model and handles the rest: skinning, the camera, x-ray, blending.SurfaceInput gives you:
Each entry of
params keeps the type of its starting value: a number is a float, an array of 2–4
numbers a float2..float4, a color a float4 in 0..1. Up to 32. Read them back with get(name),
change them with set(name, value); the upload happens once a frame. camera and the rest of
gpu.hlsli are in scope too.
Materials compile in the background. Until a material is ready its draws are skipped, and a compile
error shows up once on the error event with your own line numbers.
Players and models
replace: true turns the cheat’s own chams off for that player while your script draws them, so you
don’t get two models on top of each other. They come back the moment your script stops drawing.
Particles
position and rate stay settable. burst(at?, count) spawns count at once, at at or the
emitter’s position. dispose() frees it.
While an emitter lives, the scene keeps itself running every frame, even when your script draws nothing
else.