From 91a34124880d932f97718b959b11bc5375c0dd79 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 12 Nov 2026 01:38:36 -0300 Subject: frame: a library's own state for the frame canim keeps its table of places on the frame rather than in a process global, so two players at once each have their own. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa --- src/sketch/root.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sketch/root.zig b/src/sketch/root.zig index 81ebad5..b2f9136 100644 --- a/src/sketch/root.zig +++ b/src/sketch/root.zig @@ -73,6 +73,9 @@ pub const Frame = struct { session: std.mem.Allocator, /// For Store: on disk, across restarts. store: std.mem.Allocator, + /// A library's own state for this frame (canim's table of places), in + /// `scratch`: null at each frame's start. + user: ?*anyopaque = null, pub fn init(ctx: *const abi.Context) Frame { return .{ .ctx = ctx, .in = ctx.input, .host = ctx.host, .scratch = ctx.scratch, .session = ctx.session, .store = ctx.store }; -- cgit v1.3