Skip to content

Commit fa003d9

Browse files
committed
Adds more documentation
1 parent 19a819a commit fa003d9

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

scripts/BonkSetupWorld/BonkSetupWorld.gml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@
3737
/// careful about adding too many triangles in one location. Try to use a low poly mesh for
3838
/// collisions and keep the triangle density low.
3939
///
40+
/// `.AddVertexBufferAsync(vertexBufferOrArray, vertexFormat, [matrix], [budget=12])`
41+
/// Starts an asynchronous process to load vertex buffers into the world over multiple frames.
42+
/// This function operates as above. This isn't truly asynchronous and will take up a small
43+
/// amount of time every game step. The optional `budget` parameter sets an approximate limit
44+
/// for the amount of time per step that the process is allowed to use (measured in milliseconds).
45+
///
46+
/// `.GetVertexBufferAsyncCount()`
47+
/// Returns the number of in-progress unfinished vertex buffer operations.
48+
///
49+
/// `.CancelVertexBufferAsync()`
50+
/// Cancels all asynchronous vertex buffer operations.
51+
///
4052
/// `.CellInside(x, y, z)`
4153
/// Returns if the given cell exists within the bounding box of the world.
4254
///
@@ -92,6 +104,21 @@
92104
/// optional `checkerboard` parameter is set to `false` then every cell will be drawn which
93105
/// doubles the number of cells drawn.
94106
///
107+
/// `.DrawNeighborhoodForRange(aabb, color)`
108+
/// Draws the world grid and any collision shapes nearby the cells in the AABB range.
109+
///
110+
/// `.DrawNeighborhoodForArray(array, color)`
111+
/// Draws the world grid and any collision shapes nearby any of the cells in the input array.
112+
///
113+
/// `.DrawNeighborhoodForShape(shape, color)`
114+
/// Draws the world grid and any collision shapes nearby the given shape.
115+
///
116+
/// `.DrawNeighborhoodForLine(lineShape, color)`
117+
/// Draws the world grid and any collision shapes nearby the given line/ray shape.
118+
///
119+
/// `.DrawNeighborhoodForLineExt(x1, y1, z1, x2, y2, z2, color)`
120+
/// Draws the world grid and any collision shapes nearby the given line segment.
121+
///
95122
/// `.__bonk*`
96123
/// Various cached values that are used to speed up collision detection. These are **read-only**
97124
/// and even then you'll probably never need to read these variables.

scripts/__BonkCommonWorld/__BonkCommonWorld.gml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ function __BonkCommonWorld(_cellXSize, _cellYSize, _cellZSize)
769769
return DrawShapesFromRange(GetAABB(), _color, _wireframe);
770770
}
771771

772+
DebugDraw = DrawShapes;
773+
772774
DrawCellsFromArray = function(_array, _color = undefined, _wireframe = true)
773775
{
774776
var _cellXSize = __bonkCellXSize;

0 commit comments

Comments
 (0)