Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

scene

Reading the scene into a graph. These nodes pull from the scene; every other node takes what they make as an input.

A graph is evaluated in its own space, whose origin is the entity it stands on — a Generator's. An effect built at the origin therefore works wherever it is played, with nothing wired, and a pose brought in from the scene lands in that same space unless a node asks for the world's.

Nodes

  • scene.query — entity ids out of the scene: by Name or a glob over Names, by a component they carry (native or script), as the children, descendants or parent of other entities, or the camera the scene is seen through. Its of and within take another query's ids, so queries compose. It outputs ids and their count.
  • scene.fetch — the entities ids names as points, one each, in that order. Every point carries its entity's id as entity; transform brings the pose as P, orient and scale, in the graph's space, the world's or each entity's own under its parent (space); components brings any component as an attribute named after it holding its record. Those are the attributes proc.translate writes back to an entity, so what a graph fetches, edits and outputs lands back on the same components. The pose follows the entities, and the graph's origin, as they move, without a cook.
  • scene.input — scene.fetch on the entity the graph stands on, always. Its pose in the graph's space is the origin; space = "world" says where the graph stands. A graph standing on no entity has no point here.
  • scene.water: the water the scene holds, read as it stands each frame: every surface a water system provides. Wired into terrain.drape's ground, it sets points on the water, each taking the surface's height and normal and marked wet, and they follow the waves.

procgen.searchNodes("", { pulls = "scene" }) lists every node that pulls from the scene, these and the ones reading a particular part of it (terrain.ground, sim.scene_colliders).