itch.io is community of indie game creators and players

Devlogs

Added functions for drawing capsules and lines

Drago3D
A browser project made in HTML5

Added a few new functions for drawing capsules, lines, and polylines.

Capsule drawing functions take the same parameters as cylinders.

d3d_draw_capsule(x1, y1, z1, x2, y2, z2, tex, closed, steps, hrepeat, vrepeat, color1*, alpha1*, color2*, alpha2*)
d3d_draw_capsule_simple(x1, y1, z1, x2, y2, z2, tex)

Lines are similar. They have a thickness (radius) and start and end colors, but no texture.

d3d_draw_line(x1, y1, z1, x2, y2, z2, radius*, color1*, alpha1*, color2*, alpha2*)

Polylines take an array of { x, y, z } structs and connect them with lines; color and alpha properties are optional.

d3d_draw_polyline(points, radius*, default_color*, default_alpha*)

Also I fixed a bug in shape caching.

Files

  • drago3d.yymps 39 kB
    Oct 10, 2024
Download Drago3D
Leave a comment