Divooka Reference

Painting

6 nodes

On this page 6

Clear Layer

Function

The world with one layer emptied, so the layers below show through.

Signature
ClearLayer(world: World, layer: Integer) -> World
World ClearLayer(World world, int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Painting
Package
Fantasy Planet Painter

Erase

Function

The world with the brush's disc erased along a path, emptying cells so the layers below show through.

Signature
Erase -> World
    world: World
    latitudes: Number Array
    longitudes: Number Array
    size: Integer
    layer: Integer
World Erase(
    World world,
    double[] latitudes,
    double[] longitudes,
    int size = 15,
    int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
latitudesNumber Array—The path's latitudes, in degrees north; one point erases one disc.
longitudesNumber Array—The path's longitudes, in degrees east.
sizeInteger15The eraser's diameter, in cells.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Painting
Package
Fantasy Planet Painter

Fill Layer

Function

The world with every cell of one layer painted one height.

Signature
FillLayer(world: World, height: Number, layer: Integer) -> World
World FillLayer(World world, double height, int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
heightNumber—The height, in metres on the datum.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Painting
Package
Fantasy Planet Painter

Fill Polygon

Function

The world with the cells inside a polygon painted one height. The polygon is drawn on the grid, so it should not cross the date line.

Signature
FillPolygon -> World
    world: World
    latitudes: Number Array
    longitudes: Number Array
    height: Number
    layer: Integer
World FillPolygon(
    World world,
    double[] latitudes,
    double[] longitudes,
    double height = 200,
    int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
latitudesNumber Array—The corners' latitudes, in degrees north.
longitudesNumber Array—The corners' longitudes, in degrees east.
heightNumber200The height to paint, in metres on the datum.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Painting
Package
Fantasy Planet Painter

Paint

Function

The world with one dab of the brush.

Signature
Paint -> World
    world: World
    latitude: Number
    longitude: Number
    height: Number
    size: Integer
    tool: Brush Tool
    falloff: Brush Falloff
    layer: Integer
World Paint(
    World world,
    double latitude,
    double longitude,
    double height = 1500,
    int size = 9,
    BrushTool tool = BrushTool.Circle,
    BrushFalloff falloff = BrushFalloff.SmoothStep,
    int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
latitudeNumber—Where, in degrees north.
longitudeNumber—Where, in degrees east.
heightNumber1500The height to paint, in metres on the datum.
sizeInteger9The brush's diameter, in cells.
toolBrush ToolCircleThe brush's shape.
falloffBrush FalloffSmooth stepHow a soft or blending brush fades to its edge.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Painting
Package
Fantasy Planet Painter

Paint Stroke

Function

The world with one stroke of the brush along a path, a dab at every cell between the points, crossing the date line the short way.

Signature
PaintStroke -> World
    world: World
    latitudes: Number Array
    longitudes: Number Array
    height: Number
    size: Integer
    tool: Brush Tool
    falloff: Brush Falloff
    layer: Integer
World PaintStroke(
    World world,
    double[] latitudes,
    double[] longitudes,
    double height = 1500,
    int size = 9,
    BrushTool tool = BrushTool.SoftBrush,
    BrushFalloff falloff = BrushFalloff.SmoothStep,
    int layer = 0)

Parameters

nametypedefaultdescription
worldWorld—The world.
latitudesNumber Array—The path's latitudes, in degrees north.
longitudesNumber Array—The path's longitudes, in degrees east, one for each latitude.
heightNumber1500The height to paint, in metres on the datum.
sizeInteger9The brush's diameter, in cells.
toolBrush ToolSoft brushThe brush's shape.
falloffBrush FalloffSmooth stepHow a soft or blending brush fades to its edge.
layerInteger0Which layer, from the bottom at 0.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Painting
Package
Fantasy Planet Painter