Builtin Library
- ..
- .metadata156 B
- README.md1.6 KB
- fetch.module
- init.luau3.0 KB
README.md
scene.fetch (procNode)
Scene entities as points: one point per entity, in the order the ids name them, each carrying its id as entity and
what the node is asked to bring: its pose as P, orient and scale, and any component as an attribute named after
it holding its record. How a graph places things relative to entities already in the scene, or reads what they carry.
Inputs
ids(List<Entity>, default empty): the entities to bring: ids, Names, or scene.query'sidswired in. A reference that names no entity in the scene is refused, naming it.transform(Bool, default true): bring each entity's rotation asorientand its own scale asscale.Pis carried whatever this is.space(String, default"graph"): where the pose is read:"graph"is the graph's own space, whose origin is the entity the graph stands on;"world"is the scene's;"local"is each entity's offset from its own parent.components(List<String>, default empty): components to bring, native or script, each as a point attribute named after it holding the component's record; an entity that carries none holds an empty record.
Outputs
points(Points): one point per entity, carryingP,entity(the entity's id),id(the point's number, 0 up),orientandscalewhentransformis on, and one attribute per named component.
Example
local lamps = g.scene.query({ by = "name", name = "Lamp*" })
local points = g.scene.fetch({ ids = lamps.ids, space = "world", components = { "Light" } })