RoadRiver API

editor.createRoad(roadInfo)
Parameters:
  • nodes

    list of nodes to create the road with, fields per node:

    • pos - position of the node
    • width - width of the node
  • roadInfo – dictionary with the fields that should be set for the new road
Returns:

road object id

Create a new road object.

editor.deleteRoad(roadObjectId)
Parameters:roadObjectId – the road object id

Delete the road object specified by its id.

editor.addRoadNode(roadObjectId, nodeInfo)
Parameters:
  • roadObjectId – the road object id
  • nodeInfo

    the node info table, fields:

    • position - node position
    • width - node width
    • index - node index to insert node into. Use U32_MAX to insert at the end.
Returns:

new node id

Add a new road node to a road object.

editor.deleteRoadNode(roadObjectId, nodeId)
Parameters:
  • roadObjectId – the road object id
  • nodeId – the node id

Delete a road node by its id.

editor.createRiver(riverInfo)
Parameters:riverInfo

river descriptor table, fields:

  • wip - wip
Returns:river object id

Create a new river object.

editor.deleteRiver(riverObjectId)
Parameters:riverObjectId – the river object id

Delete a river object by its id.

editor.addRiverNode(riverObjectId, nodeInfo)
Parameters:
  • riverObjectId – the river object id
  • nodeInfo

    the node info table, fields:

    • wip - wip
Returns:

the new river node id

Add a new river node.

editor.deleteRiverNode(riverObjectId, nodeId)
Parameters:
  • riverObjectId – the river object id
  • nodeId – the node id

Delete a river object node by its id.

editor.createRoadMesh(roadMeshInfo)
Parameters:roadMeshInfo

the road mesh info table, fields:

  • wip - wip
Returns:the road mesh object id

Create a new road mesh object.

editor.deleteRoadMesh(roadMeshObjectId)
Parameters:roadMeshObjectId – the road mesh object id

Delete a road mesh object by its id.

editor.addRoadMeshNode(roadMeshObjectId, nodeInfo)
Parameters:
  • roadMeshObjectId – the road mesh object id
  • nodeInfo

    the node info table, fields:

    • wip - wip
Returns:

the road mesh node id

Add a new road mesh node.

editor.deleteRoadMeshNode(roadMeshObjectId, nodeId)
Parameters:
  • roadMeshObjectId – the road mesh object id
  • nodeId – the node id

Delete the road mesh node by its id.