-
Notifications
You must be signed in to change notification settings - Fork 0
Support via Mod.Call
While it's recommended to use GraphicsLib as a direct dependency, it isn't required.
Most functionality in the library can be done via Mod.Call usage.
Redirects to PrimitiveDrawing.DrawLineStrip(Vector2[], Color)
Redirects to PrimitiveDrawing.DrawLineStrip(Vector2[], Color, Color)
Redirects to PrimitiveDrawing.DrawLineStrip(Vector2[], Color[])
Redirects to PrimitiveDrawing.DrawLineList(Vector2[], Color)
Redirects to PrimitiveDrawing.DrawLineList(Vector2[], Color[])
Mod.Call("Draw Hollow Rectangle", Vector2 coordTL, Vector2 coordBR, Color colorTL, Color colorTR, Color colorBL, Color colorBR)
Redirects to PrimitiveDrawing.DrawHollowRectangle(Vector2, Vector2, Color, Color, Color, Color)
Mod.Call("Draw Filled Rectangle", Vector2 coordTL, Vector2 coordBR, Color colorTL, Color colorTR, Color colorBL, Color colorBR)
Redirects to PrimitiveDrawing.DrawFilledRectangle(Vector2, Vector2, Color, Color, Color, Color)
Redirects to PrimitiveDrawing.DrawHollowCircle(Vector2, float, Color)
Redirects to PrimitiveDrawing.DrawFilledCircle(Vector2, float, Color)
Redirects to PrimitiveDrawing.DrawFilledCircle(Vector2, float, Color, Color)
Redirects to PrimitiveDrawing.DrawTriangleList(Vector2[], Color)
Redirects to PrimitiveDrawing.DrawTriangleList(Vector2[], Color[])
Mod.Call("Draw Mesh, Single Color", Texture2D texture, Vector2[] positions, Vector2[] textureCoordinates, Color color, Effect shader)
Creates a Mesh instance via this constructor, draws it, then returns the new Mesh instance's ID.
Mod.Call("Draw Mesh, Lerp Color per Vertex", Texture2D texture, Vector2[] positions, Vector2[] textureCoords, Color[] colors, Effect shader)
Creates a Mesh instance via this constructor, draws it, then returns the new Mesh instance's ID.
Mod.Call("Draw Mesh, Direct Data", Texture2D texture, VertexPositionColorTexture[] vertices, Effect shader)
Creates a Mesh instance via this constructor, draws it, then returns the new Mesh instance's ID.
Retrieves the Mesh instance whose ID matches id then draws it.
Retrieves the Mesh instance whose ID matches id, then attempts to find the field to modify with the following criteria:
-
field == "shader"andvalueis anEffectinstance -
field == "texture"andvalueis aTexture2Dinstance
If the criteria were met, the corresponding data is modified. Otherwise, an exception is thrown.
Retrieves the Mesh instance whose ID matches id, then attempts to find the field to modify with the following criteria:
-
field == "position"andvalueis aVector2instance -
field == "texCoord"andvalueis aVector2instance -
field == "color"andvalueis aColorinstance
If the critera were met and slot is within the bounds of the mesh's vertex data, the cooresponding data is modified. Otherwise, an exception is thrown.
Retrieves the Mesh instance whose ID matches id, then translates all of its vertices by offset.
Retrieves the Mesh instance whose ID matches id, then revolves its vertices around the ABSOLUTE coordinate rotationOrigin by radians radians.
Retrieves the Mesh instance whose ID matches id, then scales the mesh by the scale factor, using scaleCenter as the anchor point (all points move away from or towards it) and scaleAxesDirection as the direction where the X-axis of scaling lies.
For meshes that have been rotated via Mod.Call("Rotate Mesh") or mesh.ApplyRotation(), it is recommended to pass in how much the mesh has been rotated by into scaleAxesDirection.
Retrieves the Mesh instance whose ID matches id, then scales the mesh by the scale factor, using scaleCenter as the anchor point (all points move away from or towards it) and scaleAxesDirection as the direction where the X-axis of scaling lies.
For meshes that have been rotated via Mod.Call("Rotate Mesh") or mesh.ApplyRotation(), it is recommended to pass in how much the mesh has been rotated by into scaleAxesDirection.
Retrieves the Mesh instance whose ID matches id, then resets its vertices to their original values.