Softanza
StartFrançais
Softanza
The library documents itself · Graphics

stzScene

41 own methods · 18 forms written with extensions, listed under their method

the source: base/graphics/stzScene.ring(opens in a new tab) · All classes · The area reference: Graphics

Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean

Examples: 0 come from the library's tests; 17 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzScene(1100, 660). 24 methods have none yet. Examples run on 2026-10-03 12:54 inside the library at commit 0e72e2e2c.

Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
Id_
(no comment in the source: the name reads as a sentence) id_no extension
Width
(no comment in the source: the name reads as a sentence) width
composed example
o1 = new stzScene(1100, 660)
? o1.Width()
#--> 1100
composed from the signature, run for this page
no extension
Height
(no comment in the source: the name reads as a sentence) height
composed example
o1 = new stzScene(1100, 660)
? o1.Height()
#--> 660
composed from the signature, run for this page
no extension
Resize
It matters more than a reported number: `Project()` divides by the viewport, and the GUI plane's in-scene raycast reads the same size to turn a screen pixel into a ray. A face that still believed its construction size would send every click to the wrong place in a window the user had resized -- silently, since a wrong click looks like a working program doing something else.
composed example
o1 = new stzScene(1100, 660)
? o1.Resize(2, 5)
#--> 1
composed from the signature, run for this page
QCSXTZZZIBWU
Stats
[ instances, meshesResident, drawCalls, geometryUploads, transformUploads ]
composed example
o1 = new stzScene(1100, 660)
? @@( o1.Stats() )
#--> [ 0, 0, 0, 0, 0 ]
composed from the signature, run for this page
no extension
InstanceCount
(no comment in the source: the name reads as a sentence) instance count
composed example
o1 = new stzScene(1100, 660)
? o1.InstanceCount()
#--> 0
composed from the signature, run for this page
no extension
SetBackground
the frameQCSXTZZZIBWU
SetCamera
Eye and target in scene units. Field of view, near and far are optional -- 45 degrees over 0.1..200 suits most scenes.QCSXTZZZIBWU
SetLens
(no comment in the source: the name reads as a sentence) set lensQCSXTZZZIBWU
Camera
(no comment in the source: the name reads as a sentence) camera
composed example
o1 = new stzScene(1100, 660)
? @@( o1.Camera() )
#--> [ 0, 0, 5, 0, 0, 0, 45, 0.10, 200 ]
composed from the signature, run for this page
no extension
SetLight
A directional light: the direction it SHINES (so 0,-1,0 is noon), its colour, and the ambient that fills the shadows.QCSXTZZZIBWU
AddMesh
things in the scene ------------------------------------------------- Place a mesh. Returns nothing (the plain form's law); the index is available as LastIndex(), and the Q twin keeps the chain on the scene.QCSXTZZZIBWU
SetParent
A parent that does not exist, or an instance parented to itself, is REFUSED. A cycle is broken and COUNTED (CyclesRefused) rather than hung on -- a graph the caller built wrong must not freeze the frame.
composed example
o1 = new stzScene(1100, 660)
? o1.SetParent(2, 5)
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWU
ClearParent
Detach: the instance keeps its LOCAL transform and becomes a root.
composed example
o1 = new stzScene(1100, 660)
? o1.ClearParent(2)
#--> 0
composed from the signature, run for this page
no extension
HierarchyDepth
How many links the longest chain has. 0 means the scene is flat -- the witness that a hierarchy is actually a hierarchy.
composed example
o1 = new stzScene(1100, 660)
? o1.HierarchyDepth()
#--> 0
composed from the signature, run for this page
no extension
CyclesRefused
(no comment in the source: the name reads as a sentence) cycles refused
composed example
o1 = new stzScene(1100, 660)
? o1.CyclesRefused()
#--> 0
composed from the signature, run for this page
no extension
WorldPosition
Where an instance ACTUALLY ended up, after its parents were applied. The number to assert on: a child that did not follow its parent shows up here, not in the picture.no extension
LastIndex
(no comment in the source: the name reads as a sentence) last index
composed example
o1 = new stzScene(1100, 660)
? o1.LastIndex()
#--> 0
composed from the signature, run for this page
no extension
MoveTo
transform state (kept apart from what is drawn)QCSXTZZZIBWU
RotateTo
(no comment in the source: the name reads as a sentence) rotate toQCSXTZZZIBWU
ScaleTo
(no comment in the source: the name reads as a sentence) scale toQCSXTZZZIBWU
SetColor
(no comment in the source: the name reads as a sentence) set colorQCSXTZZZIBWU
Color
The chain-friendly styling: acts on the instance most recently added, so AddMeshQ(...).ColorQ(...) reads the way it looks.QCSXTZZZIBWU
Move
(no comment in the source: the name reads as a sentence) moveQCSXTZZZIBWU
Rotate
(no comment in the source: the name reads as a sentence) rotateQCSXTZZZIBWU
Scale
(no comment in the source: the name reads as a sentence) scaleQCSXTZZZIBWU
Project
where a 3D point lands on the picture ------------------------------- [ x, y, depth, bVisible ] in canvas pixels. bVisible is 0 for a point behind the camera -- a real answer, not a NaN to trip over.
composed example
o1 = new stzScene(1100, 660)
? @@( o1.Project(2, 5, 2) )
#--> [ 1081.13, -997.82, 0.97, 1 ]
composed from the signature, run for this page
no extension
SetMaterial
oScene.SetMaterial(oMaterial, [ :base = "#e0a030", :glow = 0.6 ]) oScene.ClearMaterial() # back to forward-litQCSXTZZZIBWU
ClearMaterial
(no comment in the source: the name reads as a sentence) clear materialQCSXTZZZIBWU
HasMaterial
(no comment in the source: the name reads as a sentence) has material
composed example
o1 = new stzScene(1100, 660)
? o1.HasMaterial()
#--> 0
composed from the signature, run for this page
no extension
MaterialTextureCount
How many textures the material bound. Worth exposing because the binding is the part that cannot report its own mistakes: a texture that failed to bind does not draw wrong, it panics at submit.
composed example
o1 = new stzScene(1100, 660)
? o1.MaterialTextureCount()
#--> 0
composed from the signature, run for this page
no extension
InstanceBuffer
letting the GPU drive the transforms -------------------------------- Hand the instance buffer to a compute kernel: from here the scene stops rewriting transforms from its own state and draws whatever the kernel leaves there. Render once first, so the buffer exists.
composed example
o1 = new stzScene(1100, 660)
? o1.InstanceBuffer()
#--> 0
composed from the signature, run for this page
no extension
InstanceStride
(no comment in the source: the name reads as a sentence) instance stride
composed example
o1 = new stzScene(1100, 660)
? o1.InstanceStride()
#--> 36
composed from the signature, run for this page
no extension
SetGpuDriven
(no comment in the source: the name reads as a sentence) set gpu drivenQCSXTZZZIBWU
IsGpuDriven
(no comment in the source: the name reads as a sentence) is gpu driven
composed example
o1 = new stzScene(1100, 660)
? o1.IsGpuDriven()
#--> 0
composed from the signature, run for this page
no extension
ToPNG
outputno extension
ToPixels
(no comment in the source: the name reads as a sentence) to pixelsno extension
CanDrawPixels
(no comment in the source: the name reads as a sentence) can draw pixelsno extension
Show
(no comment in the source: the name reads as a sentence) showno extension
Free
(no comment in the source: the name reads as a sentence) freeno extension