Skip to content

Create 0.1.0

Choose a tag to compare

@Maelkiz Maelkiz released this 12 Nov 11:47
· 195 commits to main since this release

The first release of Create, a creative coding library for the Mojo programming language.

APIs are experimental. Expect breaking changes before 1.0.

Highlights

  • A program is one struct. Implement Program (create draws frame 1, update every later one) and pass it to run. Input is read from context.keyboard, context.mouse and context.gamepad(i) with one vocabulary: down, pressed, released.
  • Two renderers, one API. A CPU rasteriser by default, or OpenGL 3.3 with backend=RenderBackend.GPU. Both have antialiasing (OFF to HIGH).
  • Shapes and curves: Rectangle (rounded, turnable), Circle, Ellipse, Capsule, Triangle, Sector, Polygon, Line, Arc, Bezier and Spline, all drawn with canvas.draw. A program's own types draw the same way through Drawable.
  • Collision built in: overlaps, contains and intersects between every pair of shapes, rounded corners included.
  • Styling: fill, stroke (alignment and caps), linear and radial gradients, drop and inset shadows, tint, opacity, blend modes and clipping, scoped with with blocks.
  • Text through FreeType, with Noto Sans packaged, plus variable weights, italics and EditableText for input fields.
  • Images and animation: PNG, JPEG and BMP; sprite Animation/Animator; Tween and easing curves; pixel reads with color_at/snapshot; offscreen canvases; GIF recording.
  • Audio: WAV, OGG, FLAC and MP3 playback.
  • Camera and autoscale: design-size coordinates (origin centred, y up) mapped onto any window with FIT, EXTEND or OFF. The Camera handles world space, and overlay handles the HUD.
  • Math and data: Point2D/Vector2D, matrices, seeded Random and Noise, CSV/TSV Tables and JSON.

Getting started

See the README for setup and a walkthrough of a first program, and examples/ for one program per feature.

Platforms

  • Linux (x86-64): supported, tested on every change.
  • Windows via WSL2: supported.
  • macOS on Apple silicon: built and tested by an on-demand CI run, with little real-desktop use so far.

Requires Mojo 1.1. Every dependency comes through pixi.