Skip to content

Releases

Create 0.3.2

Choose a tag to compare

@Maelkiz Maelkiz released this 18 Nov 13:24

A documentation release: the user guide is reorganised into sections (basics, drawing, interaction, motion, geometry, media, data and maths), several pages are renamed, and gaps in what it covers are filled. Its prose is rewritten to a consistent style, and the maths pages now say what they assume.

For contributors, CONTRIBUTING.md is split into a guide for each part of the repository, with a prose style guide, and the repository has issue forms and a pull request template. The sidescroller example is renamed platformer, and the sketch example is removed.

No change to the library.

pixi add "create>=0.3.2,<0.4"

Create 0.3.1

Choose a tag to compare

@Maelkiz Maelkiz released this 16 Nov 23:50

The package now ships the project template that create-cli's create new starts a project from: a main.mojo and the assets/logo.png it draws, installed to share/create/template. New projects can therefore start on the newest Create, with a template written for it, without waiting for a create-cli release.

No change to the library.

pixi add "create>=0.3.1,<0.4"

Create 0.3.0

Choose a tag to compare

@Maelkiz Maelkiz released this 16 Nov 14:57

Add it to a project with:

pixi workspace channel add https://prefix.dev/create-framework/create
pixi add "create>=0.3,<0.4"

Breaking changes

  • Playheads keep time by the run clock. Animator and Tween work out their position from the run's clock whenever they are asked, so Animator.update and Tween.update are removed: nothing needs ticking, and forgetting to can no longer freeze a sprite. A tween's changed duration takes effect at once (#47).
  • time.delta and time.elapsed are scaled time, which the new time scale and pause slow and stop. Real time is time.real_delta and time.real_elapsed. delta_millis and elapsed_millis are removed (#47).
  • New create.time and create.animation packages. Time, DateTime and Clock move into create.time; Tween, Animation and Animator into create.animation. Easing and ease stay in math. Only code importing these by package path changes; from create import * is unaffected (#53, #54).
  • Shapes spell out their extents. r becomes radius on Circle, Capsule, Arc, Sector, Polygon.regular and Polygon.star; w, h become width, height on Rectangle and Ellipse. The matching canvas calls and canvas.image's keywords follow (#49).
  • Voice is renamed Playback (#61).
  • overlaps is a method of each region, like contains and intersects: overlaps(a, b) becomes a.overlaps(b) (#64).

New

  • A time scale and a pause for the run's time: context.time_scale(s) and context.time_paused(True). A playhead built with clock=Clock.REAL keeps moving through them, for a pause menu's own animations (#47).
  • canvas.autoclear(False) works on the GPU backend too (#51).
  • Recordings with the autoclear off keep what the screen keeps, starting from the picture already on screen (#57).
  • start_recording(..., transparent=True) records a GIF with a transparent background (#57).

Improvements

  • A recording writes only what changed between frames: an 800x500 painting recorded for 90 frames with the autoclear off shrinks from 159 KB to 13 KB (#57).
  • The documentation site moved to create-framework.org, with the latest release and main side by side (#46, #48). The user guide is reorganised, with new pages for time, animation, installation and coming from Processing, and the API reference gives each type and function a page of its own and is committed under docs/reference (#50, #52, #53, #54, #60, #65).

Fixes

  • A polygon contains itself, its own edges, and rectangles and triangles on its corners (#63).

Create 0.2.0

Choose a tag to compare

@Maelkiz Maelkiz released this 14 Nov 11:04

Create is now published to its own prefix.dev channel, create-framework/create, the one create-cli is on, instead of modular-community. Add it to a project with:

pixi workspace channel add https://prefix.dev/create-framework/create
pixi add "create>=0.2,<0.3"

Breaking changes

  • Mojo 1.2. Create now builds against Mojo 1.2 only (#31).
  • File paths resolve against the calling source file, not the working directory: Image.load, Font.load, Sound.load, Table/JSON load and save, save_image, start_recording and the rest. Use source_path("...") for the standard library's open() and friends (#40).
  • Audio.update is removed. Looping voices are fed on SDL's audio thread, so nothing needs calling each frame (#38).
  • Sound.from_pcm is replaced by Sound.from_samples, which takes Float64 samples from -1.0 to 1.0 and raises on a format that can't play (#38).

New

  • canvas.text breaks lines at newlines and wraps to a width (#41).
  • Dashed strokes (#42).
  • Audio: a voice's playback speed and start volume, Audio.pause_all/resume_all, Audio.is_paused, and Sound.frame_count, duration and sample (#38).
  • The packaged Noto fonts are compiled into the library, so text draws from a built program or package moved off the machine (#30).
  • A user guide and API reference, published at create-framework.github.io/create.

Fixes

  • Every voice is mixed on one audio device, looping voices no longer run dry between frames, and one-shot voices end without waiting (#38).
  • Audio plays silently where no audio device opens, rather than failing (#38).
  • Loading a sound file with no samples raises; a negative volume is silence (#38).
  • Shared libraries are opened by their versioned soname, so a system without -devel packages works (#30).

Create 0.1.1

Choose a tag to compare

@Maelkiz Maelkiz released this 12 Nov 12:18

Text now works in an installed conda package: Create finds its packaged fonts in the environment's share/create/fonts when they aren't beside its source (#26).

Create 0.1.0

Choose a tag to compare

@Maelkiz Maelkiz released this 12 Nov 11:47

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.