Skip to content

Releases

v0.5.0 - Animated GIF Export, Offscreen Graphics, Vector Math, FBM Noise & Easing

Choose a tag to compare

@h8gi h8gi released this 23 Aug 03:13
2924911

What's New in v0.5.0

✨ New Features

  • Animated GIF Export (RecordGIF): Automated animated GIF recording and exporting with configurable delay, loop count, and Floyd-Steinberg dithering (#24, #32).
  • Shape Primitives & Interpret Modes: Added DrawPolygon, DrawStar, DrawSector, DrawCenteredRectangle, DrawCenteredSquare, RectMode, and EllipseMode support (#25, #33).
  • 2D Vector Math Helpers: Intuitive vector operations including VecAdd, VecSub, VecMult, VecDiv, VecMag, VecNormalize, VecLimit, VecSetMag, VecDist, VecDot, VecCross, VecRotate, VecAngleBetween, and VecLerp (#26, #34).
  • FBM Noise & Animation Easings: Multi-octave Fractal Brownian Motion (NoiseFBM, NoiseFBM3D, NoiseFBM1D) and 27 standard animation easing functions in easing.go (#27, #35).
  • Offscreen Graphics Buffers: Independent drawing contexts via CreateGraphics / NewGraphics and layer blitting with DrawGraphics / DrawGraphicsAnchored (#28, #36).
  • Mouse Scroll & Window Resizing: Trackpad/mouse wheel scrolling (ctx.MouseScroll, c.MouseScrolled) and dynamic window resizing events (c.WindowResized) (#29, #37).

⚡ Performance

  • Added BenchmarkFlipV verifying zero heap allocations and ~25.3 GB/s throughput (~0.32 ms for full HD 1080p frame) (#30, #38).

🎨 Examples & Documentation

  • Added examples/gif-export: Automated animated GIF recording and exporting demo.
  • Added examples/boids: Craig Reynolds' flocking simulation using vector math.
  • Added examples/particle-system: Physics-based particle fountain with quadratic/cubic easings and offscreen trail layer.
  • Added examples/fractal-tree: Organic branching tree animated with 1D Perlin noise wind sway.
  • Updated README.md documentation and examples index.

v0.4.0 - Processing Primitives, Vertex Paths, Gaussian Randomness & Frame Sequences

Choose a tag to compare

@h8gi h8gi released this 23 Aug 02:42
1e76886

Highlights

🔺 Shape Primitives & Custom Vertex Paths

  • Primitives: Added ctx.DrawSquare(x, y, s), ctx.DrawTriangle(...), and ctx.DrawQuad(...).
  • Custom Shapes: Added ctx.BeginShape(), ctx.Vertex(x, y), and ctx.EndShape(close bool).

🎲 Math & Vector Extensions

  • Gaussian Distribution: Added canvas.RandomGaussian(mean, stdDev) and canvas.RandomSeed(seed).
  • 2D Vector Math: Added canvas.FromAngle(rad), canvas.Random2D(), and canvas.Heading(v).
  • Pixel Sampling: Added ctx.GetPixel(x, y) and ctx.SetPixelColor(x, y, c).

🎞️ Frame Sequence Export

  • Added ctx.SaveFrameSeq("frames/frame_%04d.png") with automatic parent directory creation.

v0.3.0 - Color Utilities, Event Callbacks & Visual Showcase

Choose a tag to compare

@h8gi h8gi released this 23 Aug 02:37
1a45bb2

Highlights

🎨 Color Utilities & Models

  • HSB / HSL: Added canvas.HSB(h, s, b), HSBA, HSL, HSLA for intuitive color picking.
  • Color Helpers: Added canvas.RGB(...), canvas.RGBA(...), and canvas.Hex("#hex").
  • Interpolation: Added canvas.LerpColor(c1, c2, amt).
  • Context Shortcuts: ctx.FillHSB(), ctx.StrokeHSB(), ctx.BackgroundHSB(), etc.

⌨️ Processing-Style Event Callbacks

  • Added c.KeyPressed(...) / c.KeyReleased(...)
  • Added c.MousePressed(...) / c.MouseReleased(...)
  • Added c.MouseMoved(...)

🖼️ New Showcase & Example

  • Added examples/flow-field: 2D Perlin noise particle flow field with HSB spectrum trails.
  • Added visual showcase previews to README.md.

v0.2.1 - Add MIT License & Examples READMEs

Choose a tag to compare

@h8gi h8gi released this 23 Aug 02:28
ef49d52

Highlights

  • Added official MIT License file to resolve pkg.go.dev documentation license policy restrictions.
  • Added comprehensive and concise README.md files to all example projects in examples/.
  • Fixed NoLoop() to ensure the first frame always renders before pausing.

v0.2.0 - Modernization & Creative Coding Features

Choose a tag to compare

@h8gi h8gi released this 23 Aug 02:20
45a4348

Highlights

🚀 Modernization & Quality

  • Upgraded to modern Go modules and gopxl/pixel/v2 (v2.3.0).
  • Cross-platform GitHub Actions CI matrix for Linux, macOS, and Windows.
  • Comprehensive unit tests and GoDoc documentation.

🎨 Creative Coding & Processing-like Features

  • Perlin Noise: Built-in canvas.Noise(x, y, z), Noise2D, Noise1D, and NoiseSeed.
  • Default Font: Out-of-the-box text drawing with ctx.DrawString without explicit font setup.
  • Convenience Methods: ctx.Background(...), ctx.FillHex(...), ctx.StrokeHex(...), ctx.FillRGB(...), ctx.NoFill(), ctx.NoStroke(), and ctx.SaveFrame(...).
  • Time & Frame Tracking: ctx.FrameCount, ctx.DeltaTime, ctx.Time.
  • Math Utilities: canvas.Map, canvas.Lerp, canvas.Constrain, canvas.Dist, canvas.Random, canvas.Radians, canvas.Degrees.
  • Loop Control: c.NoLoop(), c.Loop(), c.Redraw(), c.IsLooping().
  • Window Configuration: Resizable and Fullscreen support in CanvasConfig.

🐛 Bug Fixes

  • Fixed vertical coordinate system mismatch between gg and OpenGL, resolving upside-down text rendering and aligning mouse coordinates with Processing standards (#6).