Blocks

Understanding the block system in Editx Engine.

Block Types

Every element in the scene is a block. Each block has a type, optional kind, properties, and can participate in a parent-child hierarchy.

TypeDescription
sceneRoot container
pageCanvas page
graphicShape with fill (rect, ellipse, line, etc.)
textRich text annotation
imageImage layer
stackGrouping container
effectEffect sub-block (adjustments, filter)
shapeShape sub-block (rect, ellipse, polygon, etc.)
fillFill sub-block (solid color, image fill)

Sub-blocks

Graphic blocks own sub-blocks for their visual properties:

  • Shape — defines geometry (rect, ellipse, line, arrow, polygon, star)
  • Fill — defines appearance (solid-color, image)
  • Effects — stackable effects (adjustments, filter)

Properties

Blocks store typed key-value properties. Access them through the BlockAPI:

engine.block.getFloat(blockId, "transform/position/x");
engine.block.getString(blockId, "text/fontFamily");
engine.block.getBool(blockId, "appearance/visible");
engine.block.getColor(blockId, "fill/color");

Full property reference coming soon.