@sadhaka/loom-engine 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,173 @@
1
+ // TextureAtlas - GL texture wrapper for the WebGL2 backend.
2
+ //
3
+ // Wraps a single GL texture plus a frame-rect lookup table. The
4
+ // device passes an AtlasDescriptor at registerAtlas time; we upload
5
+ // the source image as a texture and pre-compute UV rects per frame
6
+ // so drawSprite/drawTile can look up by frame index without a divide
7
+ // in the hot path.
8
+ //
9
+ // Texture coordinates use UNPACK_FLIP_Y_WEBGL=true on upload so frame
10
+ // (x, y) - which the AtlasDescriptor specifies in top-left source
11
+ // pixel coords - maps directly to UVs of (x/W, y/H, (x+w)/W, (y+h)/H)
12
+ // in the GL texture. The shader uses the unit-quad vertex (0..1) as
13
+ // the mix factor between (u0, v0) and (u1, v1).
14
+ //
15
+ // Context-loss handling: the device watches the canvas for
16
+ // 'webglcontextlost' and calls handleContextLoss() on every atlas
17
+ // to mark them invalid. On 'webglcontextrestored' the device calls
18
+ // rehydrate(gl) which re-uploads the cached source image.
19
+ export class TextureAtlas {
20
+ // GL texture object. Null while the context is lost or before
21
+ // upload. drawSprite paths must check before binding.
22
+ texture = null;
23
+ // Atlas dimensions in pixels - cached because the descriptor's
24
+ // image may be reclaimed from layout flow but the dims do not
25
+ // change.
26
+ width;
27
+ height;
28
+ // Pre-computed UV rects. Layout: 4 floats per frame
29
+ // [u0, v0, u1, v1]. Indexed by frame number * 4. Storing as a
30
+ // single Float32Array keeps lookup branchless and cache-friendly
31
+ // when the batcher iterates many sprites.
32
+ uvRects;
33
+ // Pre-computed frame sizes in pixels. Layout: 2 floats per frame
34
+ // [w, h]. drawSprite multiplies by camera zoom.
35
+ frameSizes;
36
+ frameCount;
37
+ // Optional debug name for logging.
38
+ name;
39
+ // Source image kept for context-restore rehydrate. AtlasDescriptor
40
+ // owns the image lifetime; we hold a reference but never mutate.
41
+ sourceImage;
42
+ // Marker to skip use-after-release. releaseAtlas sets this; the
43
+ // device's draw paths bail out on released atlases.
44
+ released = false;
45
+ constructor(gl, desc) {
46
+ this.sourceImage = desc.image;
47
+ this.name = desc.name ?? 'unnamed';
48
+ // Image dimensions vary by source type; ImageBitmap, HTMLImage-
49
+ // Element and HTMLCanvasElement all expose width/height the same
50
+ // way.
51
+ this.width = desc.image.width;
52
+ this.height = desc.image.height;
53
+ this.frameCount = desc.frames.length;
54
+ this.uvRects = new Float32Array(this.frameCount * 4);
55
+ this.frameSizes = new Float32Array(this.frameCount * 2);
56
+ var W = this.width || 1;
57
+ var H = this.height || 1;
58
+ for (var i = 0; i < this.frameCount; i++) {
59
+ var f = desc.frames[i];
60
+ if (!f)
61
+ continue;
62
+ var base4 = i * 4;
63
+ var base2 = i * 2;
64
+ this.uvRects[base4 + 0] = f.x / W;
65
+ this.uvRects[base4 + 1] = f.y / H;
66
+ this.uvRects[base4 + 2] = (f.x + f.w) / W;
67
+ this.uvRects[base4 + 3] = (f.y + f.h) / H;
68
+ this.frameSizes[base2 + 0] = f.w;
69
+ this.frameSizes[base2 + 1] = f.h;
70
+ }
71
+ if (gl) {
72
+ this.upload(gl);
73
+ }
74
+ }
75
+ // Upload source image to a GL texture. Used at construction and on
76
+ // context-restore. Idempotent: deletes any prior texture first.
77
+ upload(gl) {
78
+ if (this.released)
79
+ return;
80
+ if (this.texture) {
81
+ gl.deleteTexture(this.texture);
82
+ this.texture = null;
83
+ }
84
+ var tex = gl.createTexture();
85
+ if (!tex) {
86
+ // createTexture returns null only on context-lost; bail and
87
+ // leave this.texture null. The device will retry on restore.
88
+ return;
89
+ }
90
+ gl.bindTexture(gl.TEXTURE_2D, tex);
91
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
92
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
93
+ // Pixel-art friendly defaults to match Canvas2DDevice's
94
+ // imageSmoothingEnabled = false. Consumers can override after
95
+ // registerAtlas via the returned handle if they need bilinear.
96
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
97
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
98
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
99
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
100
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this.sourceImage);
101
+ this.texture = tex;
102
+ }
103
+ // Bind for sampling. Caller has the active texture unit set.
104
+ bind(gl) {
105
+ gl.bindTexture(gl.TEXTURE_2D, this.texture);
106
+ }
107
+ // Mark texture invalid - context lost. The GL object is already
108
+ // gone; we just clear the JS reference so subsequent draws skip.
109
+ handleContextLoss() {
110
+ this.texture = null;
111
+ }
112
+ dispose(gl) {
113
+ this.released = true;
114
+ if (gl && this.texture) {
115
+ gl.deleteTexture(this.texture);
116
+ }
117
+ this.texture = null;
118
+ }
119
+ // Look up the UV rect for a frame index. Returns false if the
120
+ // frame is out of range so the caller can skip the draw safely.
121
+ // out is filled with [u0, v0, u1, v1].
122
+ lookupUVRect(frame, out, offset) {
123
+ if (frame < 0 || frame >= this.frameCount)
124
+ return false;
125
+ var base = frame * 4;
126
+ out[offset + 0] = this.uvRects[base + 0] ?? 0;
127
+ out[offset + 1] = this.uvRects[base + 1] ?? 0;
128
+ out[offset + 2] = this.uvRects[base + 2] ?? 0;
129
+ out[offset + 3] = this.uvRects[base + 3] ?? 0;
130
+ return true;
131
+ }
132
+ // Look up the frame width/height in pixels.
133
+ lookupFrameSize(frame, out) {
134
+ if (frame < 0 || frame >= this.frameCount)
135
+ return false;
136
+ var base = frame * 2;
137
+ out.w = this.frameSizes[base + 0] ?? 0;
138
+ out.h = this.frameSizes[base + 1] ?? 0;
139
+ return true;
140
+ }
141
+ }
142
+ // Build a tiny built-in atlas containing a single soft-disc frame
143
+ // for drawParticle. 64 x 64 RGBA, white center fading to transparent
144
+ // edge. Returned wrapped in a TextureAtlas with one frame at index 0.
145
+ //
146
+ // Lazy-built on first drawParticle call. Headless / Node tests pass
147
+ // gl=null; the descriptor is still valid and the GL upload happens
148
+ // later when (if) the context is provided.
149
+ export function makeParticleDiscAtlas(gl) {
150
+ if (typeof document === 'undefined')
151
+ return null;
152
+ var size = 64;
153
+ var c = document.createElement('canvas');
154
+ c.width = size;
155
+ c.height = size;
156
+ var ctx = c.getContext('2d');
157
+ if (!ctx)
158
+ return null;
159
+ var center = size / 2;
160
+ var grad = ctx.createRadialGradient(center, center, 0, center, center, center);
161
+ grad.addColorStop(0, 'rgba(255,255,255,1)');
162
+ grad.addColorStop(1, 'rgba(255,255,255,0)');
163
+ ctx.fillStyle = grad;
164
+ ctx.beginPath();
165
+ ctx.arc(center, center, center, 0, Math.PI * 2);
166
+ ctx.fill();
167
+ return new TextureAtlas(gl, {
168
+ image: c,
169
+ frames: [{ x: 0, y: 0, w: size, h: size }],
170
+ name: 'particle-disc',
171
+ });
172
+ }
173
+ //# sourceMappingURL=texture-atlas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"texture-atlas.js","sourceRoot":"","sources":["../../src/renderer/texture-atlas.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,EAAE;AACF,gEAAgE;AAChE,oEAAoE;AACpE,mEAAmE;AACnE,qEAAqE;AACrE,mBAAmB;AACnB,EAAE;AACF,sEAAsE;AACtE,kEAAkE;AAClE,sEAAsE;AACtE,oEAAoE;AACpE,gDAAgD;AAChD,EAAE;AACF,2DAA2D;AAC3D,kEAAkE;AAClE,mEAAmE;AACnE,0DAA0D;AAI1D,MAAM,OAAO,YAAY;IACvB,8DAA8D;IAC9D,sDAAsD;IACtD,OAAO,GAAwB,IAAI,CAAC;IAEpC,+DAA+D;IAC/D,8DAA8D;IAC9D,UAAU;IACD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AAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC;QAC1C,IAAI,EAAE,eAAe;KACtB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,53 @@
1
+ import type { ColorRGBA } from '../util/color.js';
2
+ import { type IGraphicsDevice, type AtlasHandle, type AtlasDescriptor, type TextStyle } from './graphics-device.js';
3
+ import { type CameraView } from './camera.js';
4
+ export declare class WebGL2Device implements IGraphicsDevice {
5
+ readonly canvas: HTMLCanvasElement;
6
+ readonly viewportWidth: number;
7
+ readonly viewportHeight: number;
8
+ private gl;
9
+ private program;
10
+ private vao;
11
+ private quadVBO;
12
+ private instanceVBO;
13
+ private instanceVBOBytes;
14
+ private atlases;
15
+ private nextAtlasHandle;
16
+ private camera;
17
+ private drawCallCount;
18
+ private batcher;
19
+ private particleAtlas;
20
+ private textCache;
21
+ private contextLost;
22
+ private boundOnLost;
23
+ private boundOnRestored;
24
+ private lastUpload;
25
+ constructor(canvas: HTMLCanvasElement, gl?: WebGL2RenderingContext);
26
+ private initGLResources;
27
+ private compileProgram;
28
+ private handleContextLoss;
29
+ private handleContextRestored;
30
+ beginFrame(): void;
31
+ endFrame(): void;
32
+ setCamera(cam: Readonly<CameraView>): void;
33
+ registerAtlas(desc: AtlasDescriptor): AtlasHandle;
34
+ releaseAtlas(handle: AtlasHandle): void;
35
+ drawSprite(worldX: number, worldY: number, worldZ: number, atlas: AtlasHandle, frame: number, tint?: Readonly<ColorRGBA>): void;
36
+ drawTile(tileX: number, tileY: number, atlas: AtlasHandle, frame: number): void;
37
+ drawText(worldX: number, worldY: number, text: string, style: TextStyle): void;
38
+ drawParticle(worldX: number, worldY: number, worldZ: number, size: number, color: Readonly<ColorRGBA>, additive: boolean): void;
39
+ getDrawCallCount(): number;
40
+ dispose(): void;
41
+ getBatcherStats(): {
42
+ flushCount: number;
43
+ instanceTotal: number;
44
+ capacity: number;
45
+ };
46
+ _peekLastUpload(): {
47
+ count: number;
48
+ floats: number;
49
+ };
50
+ private executeFlush;
51
+ private getOrBakeText;
52
+ }
53
+ //# sourceMappingURL=webgl2-device.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webgl2-device.d.ts","sourceRoot":"","sources":["../../src/renderer/webgl2-device.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,SAAS,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,UAAU,EAEhB,MAAM,aAAa,CAAC;AAkDrB,qBAAa,YAAa,YAAW,eAAe;IAClD,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAEhC,OAAO,CAAC,EAAE,CAAyB;IACnC,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,GAAG,CAAuC;IAClD,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,WAAW,CAA4B;IAG/C,OAAO,CAAC,gBAAgB,CAAa;IAErC,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,eAAe,CAAa;IAEpC,OAAO,CAAC,MAAM,CAA2B;IACzC,OAAO,CAAC,aAAa,CAAa;IAElC,OAAO,CAAC,OAAO,CAAgB;IAG/B,OAAO,CAAC,aAAa,CAA6B;IAKlD,OAAO,CAAC,SAAS,CAAwC;IAIzD,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,WAAW,CAAqC;IACxD,OAAO,CAAC,eAAe,CAA6B;IAGpD,OAAO,CAAC,UAAU,CAA8D;gBAEpE,MAAM,EAAE,iBAAiB,EAAE,EAAE,CAAC,EAAE,sBAAsB;IAgDlE,OAAO,CAAC,eAAe;IAqD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