Depositor - awesome-llama/procedural-sandbox GitHub Wiki

The "depositor" represents the voxel that will be drawn in a similar way you can choose a color or pattern to draw in image editing/drawing software. All the shape drawing custom blocks (such as cuboids, spheres, lines, etc.) use the depositor instead of having arguments for what kind of voxel they should draw.

The depositor consists of the following variables:

  • depositor_mode (DepositorMode)
  • depositor_replace (boolean)
  • depositor_voxel (voxel)
  • depositor_template_index (positive int counting from 1)
  • depositor_template_origin (XYZ)

You won't always be interacting with these variables directly when implementing a generator as there are some helper procedures to use instead. Listed are the most commonly-used procedures, see generator.gs for them all.

  • reset_depositor: reset the depositor to the default state.
  • set_depositor_to_air: set the depositor to an empty voxel with 0 opacity.
  • set_depositor_from_number number: set the depositor to a solid RGB color from a single number 0-16777215.
  • set_depositor_from_sRGB r, g, b: set the depositor to a solid color from red, green, and blue.
  • set_depositor_from_HSV h s v: set the depositor to a solid color from hue, saturation and value.
  • set_depositor_to_template slot_index, ox, oy, oz: set the depositor to a particular canvas template. Slot indices are counted from 1. ox, oy, and oz is the origin offset for the template in the current canvas.