Skip to content

Releases: renatillas/tiramisu

v8.0.0

Choose a tag to compare

@renatillas renatillas released this 18 Mar 20:22
2df45c1
Update README.md

v7.0.0

Choose a tag to compare

@renatillas renatillas released this 10 Jan 19:16
Bump version

v7.0.0-rc1

v7.0.0-rc1 Pre-release
Pre-release

Choose a tag to compare

@renatillas renatillas released this 04 Jan 10:57
Gleam v7.0.0-rc1

v4.1.0

Choose a tag to compare

@renatillas renatillas released this 26 Oct 18:20

Added

  • Spritesheet Animation System: Complete texture-based sprite animation support
    • spritesheet.from_grid() - Create spritesheets from grid-based texture atlases
    • spritesheet.animation() - Define animation sequences with frame indices and timing
    • Three loop modes: Once, Repeat, and PingPong for different animation behaviors
    • scene.animated_sprite() - Scene node for displaying animated sprites
    • Animation state control: play, pause, stop, and change animations dynamically
    • Pixel art support with NearestFilter for crisp, non-blurred sprites
    • Independent animation per sprite instance (automatic texture cloning)
    • Example: examples/27-spritesheet_animation demonstrates three independently animating coins
  • Texture Manipulation API: New utilities for advanced texture control
    • texture.clone() - Clone textures for independent manipulation
    • texture.set_offset() - Control UV offset for texture positioning
    • texture.set_repeat() - Control UV repeat/scaling
    • texture.set_wrap_mode() - Set texture wrapping behavior (Repeat, Clamp, MirroredRepeat)
    • texture.set_filter_mode() - Set texture filtering (Nearest for pixel art, Linear for smooth)
  • 3D Sprite Labels with Canvas Rendering: New sprite system for depth-aware labels that properly occlude behind 3D objects
    • scene.canvas() - Create canvas-based sprites with paint.Picture for drawing custom graphics
    • Sprites use canvas 2D rendering via the paint library for flexible visual customization
    • True 3D depth testing - sprites hide behind other objects in the scene
    • Perfect for health bars, damage numbers, interactive labels, and UI elements in 3D space
    • Example: examples/26-css2d_labels demonstrates sprite usage alongside CSS2D labels
  • CSS2D and CSS3D Label Support: HTML-based overlay labels for UI elements
    • scene.css2d_label() - Create screen-space HTML labels that always render on top
    • scene.css3d_label() - Create 3D-positioned HTML labels (no depth occlusion with WebGL)
    • Full HTML/CSS support with Tailwind styling
    • Useful for UI overlays, tooltips, and text that should never be occluded
  • Paint Library Integration: Added paint (v0.4.0) dependency for canvas-based drawing
    • Functional canvas 2D API for creating Pictures
    • Combines shapes, text, fills, strokes with composition
    • Pictures are rendered to canvas textures for sprite display

v4.0.2

Choose a tag to compare

@renatillas renatillas released this 25 Oct 06:30

CHANGELOG

Fixed

  • Orthographic camera resize handling: Fixed window resize listener to properly update orthographic cameras
    • Resize event now updates orthographic camera frustum (left, right, top, bottom) based on new window dimensions
    • Previously only perspective cameras were updated on resize, causing 2D games to stretch when window was resized
    • camera_2d() cameras now maintain correct aspect ratio and scale across all window sizes

v4.0.1

Choose a tag to compare

@renatillas renatillas released this 25 Oct 06:29

Changelog

Fixed

  • Production build compatibility: Fixed constructor name encoding issues that could cause failures in minified builds
    • Background type checking now uses Gleam-generated Background$is* functions instead of constructor.name
    • Asset type checking now uses Gleam-generated AssetType$is* functions instead of constructor.name
    • ID serialization now uses WeakMap-based stable constructor IDs instead of constructor.name
    • All FFI code is now immune to JavaScript minification and build optimization

v4.0.0

Choose a tag to compare

@renatillas renatillas released this 25 Oct 06:29

Changelog

Added

  • Comprehensive API documentation: Added extensive module-level and function-level documentation with examples for:
    • scene module - Scene node system with constructor functions, node types, and usage patterns
    • animation module - Tweening and model animation system
    • physics module - Rigid body dynamics, colliders, forces, and collision detection
    • material module - PBR materials, builder pattern, texture mapping examples
    • light module - Lighting types, shadow configuration, typical setups
    • debug module - Debug visualization utilities and performance monitoring
    • state_machine module - Type-safe animation state machines with context
    • particle_emitter module - GPU-accelerated particle effects with builder API
    • audio module - Spatial and global audio with Web Audio API
    • asset module - Asset loading, caching, and batch loading
    • spatial module - Spatial partitioning and collision detection
  • Scene node constructor functions: Scene nodes now use opaque types with explicit constructor functions:
    • scene.mesh() - Create mesh nodes
    • scene.instanced_mesh() - Create instanced mesh nodes
    • scene.group() - Create group nodes
    • scene.light() - Create light nodes
    • scene.camera() - Create camera nodes
    • scene.lod() - Create LOD nodes
    • scene.model3d() - Create 3D model nodes
    • scene.instanced_model() - Create instanced model nodes
    • scene.audio() - Create audio nodes
    • scene.particles() - Create particle emitter nodes
    • scene.debug_*() - Create debug visualization nodes
  • Enhanced Collider API: Spatial module now uses a unified Collider type supporting both boxes and spheres:
    • spatial.collider_box() - Create box collider from min/max points
    • spatial.collider_box_from_center() - Create box from center and half-extents
    • spatial.collider_sphere() - Create sphere collider from center and radius
    • spatial.collider_contains_point() - Point-in-collider test (works for both box and sphere)
    • spatial.collider_intersects() - Collider intersection test (box-box, sphere-sphere, box-sphere)
    • Box-sphere collision detection for heterogeneous spatial queries
  • Documentation guide: Added docs/physics-guide.md with comprehensive physics system documentation

Changed

  • Scene module refactoring: Moved renderer logic from tiramisu/internal/renderer.gleam into tiramisu/scene.gleam for better organization (removed 1926 lines, added rendering functions directly to scene module)
  • Scene.Node type is now opaque: Must use constructor functions instead of direct constructors (e.g., scene.mesh() instead of scene.Mesh())
  • Spatial API redesign: Renamed AABB type to Collider and updated all related functions:
    • spatial.aabb()spatial.collider_box()
    • spatial.aabb_from_center()spatial.collider_box_from_center()
    • spatial.aabb_contains_point()spatial.collider_contains_point()
    • spatial.aabb_intersects()spatial.collider_intersects()
    • spatial.aabb_center()spatial.collider_center()
    • Octree API updated to use new collider types: octree_new(), octree_insert(), octree_query_radius(), etc.
  • Type reorganization:
    • Moved Object3D type from tiramisu/object3d module to tiramisu/asset module
    • Moved AnimationClip type from tiramisu/object3d module to tiramisu/animation module
    • Moved AnimationPlayback type to tiramisu/animation module
  • Context type simplified: Removed input_manager field from Context type (internal implementation detail)
  • Main module streamlined: Simplified tiramisu.gleam by removing example code and focusing on core API surface
  • Documentation improvements: Updated scene graph and getting started guides, removed spatial partitioning guide (content integrated into API docs)

v3.0.0

Choose a tag to compare

@renatillas renatillas released this 17 Oct 15:15
  • The WorldConfig's parameter correspondences has been removed from the physics module.
  • The function step_world from the module physics has been removed in favour of the step function.
  • Fixed references to tiramisu.Color and tiramisu.Texture, as they should be background.Color and background.Texture.
  • The RigidBody type from the physics module is now opaque
  • The Transform type is now opaque - fields cannot be accessed directly
  • Direct field access (e.g., transform.position) must be replaced with accessor functions
  • The Quaternion type has been moved from the physics module to the transform module
  • Added transform.position(t) - Get position from a transform
  • Added transform.rotation(t) - Get rotation as Euler angles (radians)
  • Added transform.rotation_quaternion(t) - Get rotation as a quaternion
  • Added transform.scale(t) - Get scale from a transform
  • Added transform.with_euler_rotation(t, euler) - Set rotation using Euler angles
  • Added transform.with_quaternion_rotation(t, quat) - Set rotation using a quaternion
  • Added transform.with_rotation(t, euler) - Alias for with_euler_rotation (backwards compatible)
  • Added transform.euler_to_quaternion(euler) - Convert Euler angles to quaternion
  • Added transform.quaternion_to_euler(quat) - Convert quaternion to Euler angles
  • Added transform.identity_quaternion - The identity quaternion (no rotation)
  • Rotations are now stored internally as quaternions to avoid gimbal lock
  • rotate_by() now uses proper quaternion multiplication for accurate rotation composition
  • All quaternion/Euler conversions implemented in pure Gleam (no FFI)
  • Smoother rotation interpolation with spherical linear interpolation (slerp)

v2.0.0

Choose a tag to compare

@renatillas renatillas released this 13 Oct 18:48