@swf2es/render 0.0.0-stage → 0.1.1
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.
- package/LICENSE +202 -0
- package/README.md +17 -2
- package/dist/commands.d.ts +67 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +93 -0
- package/dist/commands.js.map +1 -0
- package/dist/filter-plan.d.ts +110 -0
- package/dist/filter-plan.d.ts.map +1 -0
- package/dist/filter-plan.js +480 -0
- package/dist/filter-plan.js.map +1 -0
- package/dist/filter-shaders.d.ts +63 -0
- package/dist/filter-shaders.d.ts.map +1 -0
- package/dist/filter-shaders.js +350 -0
- package/dist/filter-shaders.js.map +1 -0
- package/dist/filters.d.ts +107 -0
- package/dist/filters.d.ts.map +1 -0
- package/dist/filters.js +187 -0
- package/dist/filters.js.map +1 -0
- package/dist/geometry.d.ts +83 -0
- package/dist/geometry.d.ts.map +1 -0
- package/dist/geometry.js +93 -0
- package/dist/geometry.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/keeps.d.ts +17 -0
- package/dist/keeps.d.ts.map +1 -0
- package/dist/keeps.js +17 -0
- package/dist/keeps.js.map +1 -0
- package/dist/kernel-shaders.d.ts +74 -0
- package/dist/kernel-shaders.d.ts.map +1 -0
- package/dist/kernel-shaders.js +323 -0
- package/dist/kernel-shaders.js.map +1 -0
- package/dist/measure.d.ts +56 -0
- package/dist/measure.d.ts.map +1 -0
- package/dist/measure.js +287 -0
- package/dist/measure.js.map +1 -0
- package/dist/plan.d.ts +14 -0
- package/dist/plan.d.ts.map +1 -0
- package/dist/plan.js +247 -0
- package/dist/plan.js.map +1 -0
- package/dist/registry.d.ts +49 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +87 -0
- package/dist/registry.js.map +1 -0
- package/dist/rows.d.ts +39 -0
- package/dist/rows.d.ts.map +1 -0
- package/dist/rows.js +60 -0
- package/dist/rows.js.map +1 -0
- package/dist/scene.d.ts +179 -0
- package/dist/scene.d.ts.map +1 -0
- package/dist/scene.js +265 -0
- package/dist/scene.js.map +1 -0
- package/dist/shelves.d.ts +23 -0
- package/dist/shelves.d.ts.map +1 -0
- package/dist/shelves.js +63 -0
- package/dist/shelves.js.map +1 -0
- package/dist/textures.d.ts +72 -0
- package/dist/textures.d.ts.map +1 -0
- package/dist/textures.js +160 -0
- package/dist/textures.js.map +1 -0
- package/dist/webgl/atlas.d.ts +63 -0
- package/dist/webgl/atlas.d.ts.map +1 -0
- package/dist/webgl/atlas.js +328 -0
- package/dist/webgl/atlas.js.map +1 -0
- package/dist/webgl/backend.d.ts +141 -0
- package/dist/webgl/backend.d.ts.map +1 -0
- package/dist/webgl/backend.js +659 -0
- package/dist/webgl/backend.js.map +1 -0
- package/dist/webgl/composite.d.ts +101 -0
- package/dist/webgl/composite.d.ts.map +1 -0
- package/dist/webgl/composite.js +293 -0
- package/dist/webgl/composite.js.map +1 -0
- package/dist/webgl/draws.d.ts +213 -0
- package/dist/webgl/draws.d.ts.map +1 -0
- package/dist/webgl/draws.js +714 -0
- package/dist/webgl/draws.js.map +1 -0
- package/dist/webgl/filters.d.ts +107 -0
- package/dist/webgl/filters.d.ts.map +1 -0
- package/dist/webgl/filters.js +351 -0
- package/dist/webgl/filters.js.map +1 -0
- package/dist/webgl/gpu-textures.d.ts +44 -0
- package/dist/webgl/gpu-textures.d.ts.map +1 -0
- package/dist/webgl/gpu-textures.js +178 -0
- package/dist/webgl/gpu-textures.js.map +1 -0
- package/dist/webgl/holds.d.ts +97 -0
- package/dist/webgl/holds.d.ts.map +1 -0
- package/dist/webgl/holds.js +453 -0
- package/dist/webgl/holds.js.map +1 -0
- package/dist/webgl/index.d.ts +2 -0
- package/dist/webgl/index.d.ts.map +1 -0
- package/dist/webgl/index.js +4 -0
- package/dist/webgl/index.js.map +1 -0
- package/dist/webgl/kernels.d.ts +64 -0
- package/dist/webgl/kernels.d.ts.map +1 -0
- package/dist/webgl/kernels.js +160 -0
- package/dist/webgl/kernels.js.map +1 -0
- package/dist/webgl/pool.d.ts +71 -0
- package/dist/webgl/pool.d.ts.map +1 -0
- package/dist/webgl/pool.js +192 -0
- package/dist/webgl/pool.js.map +1 -0
- package/dist/webgl/programs.d.ts +130 -0
- package/dist/webgl/programs.d.ts.map +1 -0
- package/dist/webgl/programs.js +582 -0
- package/dist/webgl/programs.js.map +1 -0
- package/dist/webgl/stage.d.ts +67 -0
- package/dist/webgl/stage.d.ts.map +1 -0
- package/dist/webgl/stage.js +173 -0
- package/dist/webgl/stage.js.map +1 -0
- package/dist/webgl/targets.d.ts +172 -0
- package/dist/webgl/targets.d.ts.map +1 -0
- package/dist/webgl/targets.js +323 -0
- package/dist/webgl/targets.js.map +1 -0
- package/package.json +35 -3
- package/src/commands.ts +98 -0
- package/src/filter-plan.ts +755 -0
- package/src/filter-shaders.ts +360 -0
- package/src/filters.ts +220 -0
- package/src/geometry.ts +143 -0
- package/src/index.ts +87 -0
- package/src/keeps.ts +21 -0
- package/src/kernel-shaders.ts +375 -0
- package/src/measure.ts +400 -0
- package/src/plan.ts +331 -0
- package/src/registry.ts +105 -0
- package/src/rows.ts +93 -0
- package/src/scene.ts +297 -0
- package/src/shelves.ts +70 -0
- package/src/textures.ts +198 -0
- package/src/webgl/atlas.ts +370 -0
- package/src/webgl/backend.ts +973 -0
- package/src/webgl/composite.ts +372 -0
- package/src/webgl/draws.ts +902 -0
- package/src/webgl/filters.ts +502 -0
- package/src/webgl/gpu-textures.ts +253 -0
- package/src/webgl/holds.ts +624 -0
- package/src/webgl/index.ts +3 -0
- package/src/webgl/kernels.ts +205 -0
- package/src/webgl/pool.ts +245 -0
- package/src/webgl/programs.ts +620 -0
- package/src/webgl/stage.ts +214 -0
- package/src/webgl/targets.ts +464 -0
package/dist/scene.d.ts
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blend modes as a scene list names them, in Flash's order: the separable
|
|
3
|
+
* ones blend straight colours, the rest have formulas of their own.
|
|
4
|
+
*/
|
|
5
|
+
export declare const NORMAL = 0;
|
|
6
|
+
export declare const LAYER = 1;
|
|
7
|
+
export declare const MULTIPLY = 2;
|
|
8
|
+
export declare const SCREEN = 3;
|
|
9
|
+
export declare const LIGHTEN = 4;
|
|
10
|
+
export declare const DARKEN = 5;
|
|
11
|
+
export declare const DIFFERENCE = 6;
|
|
12
|
+
export declare const ADD = 7;
|
|
13
|
+
export declare const SUBTRACT = 8;
|
|
14
|
+
export declare const INVERT = 9;
|
|
15
|
+
export declare const ALPHA = 10;
|
|
16
|
+
export declare const ERASE = 11;
|
|
17
|
+
export declare const OVERLAY = 12;
|
|
18
|
+
export declare const HARDLIGHT = 13;
|
|
19
|
+
/**
|
|
20
|
+
* A Pixel Bender blend shader's, from KERNEL on: KERNEL + k blends by the
|
|
21
|
+
* kernel of chain k of the frame's filters (filters.ts, BLEND). A layer
|
|
22
|
+
* alone takes it, never a draw or a kept layer, whose modes are bytes.
|
|
23
|
+
*/
|
|
24
|
+
export declare const KERNEL = 14;
|
|
25
|
+
/**
|
|
26
|
+
* Not Flash's: an alpha mask's layer composited onto the unfiltered layer
|
|
27
|
+
* that ends after it, the layer of what it masks, keeping only what the
|
|
28
|
+
* mask covers, scaled by the mask's alpha. measureLayers cuts that layer to
|
|
29
|
+
* the mask's rectangle, past which nothing of it shows. A LAYER_END alone
|
|
30
|
+
* takes it; negative, as no blend mode's number is.
|
|
31
|
+
*/
|
|
32
|
+
export declare const ALPHA_MASK = -2;
|
|
33
|
+
/** Flash's blend mode names, by their number here. */
|
|
34
|
+
export declare const BLEND_NAMES: string[];
|
|
35
|
+
/**
|
|
36
|
+
* What an entry is: a draw, or a mask's marker. A mask's own draws lie
|
|
37
|
+
* between its MASK_BEGIN and its MASK_USE, which names them (its geometry
|
|
38
|
+
* the first, its row how many) for the planner to push them into the
|
|
39
|
+
* stencil; what it masks follows, up to the MASK_POP that names them again
|
|
40
|
+
* to take them out.
|
|
41
|
+
*/
|
|
42
|
+
export declare const DRAW = 0;
|
|
43
|
+
export declare const MASK_BEGIN = 1;
|
|
44
|
+
export declare const MASK_USE = 2;
|
|
45
|
+
export declare const MASK_POP = 3;
|
|
46
|
+
/**
|
|
47
|
+
* A layer: what lies between LAYER_BEGIN and LAYER_END is drawn into a
|
|
48
|
+
* target of its own over a rectangle of the target, then composited onto
|
|
49
|
+
* what is below in the END's blend mode (its geometry), its colour
|
|
50
|
+
* transform the END's row, or none (-1), after the END's chain of filters
|
|
51
|
+
* (its texture, or none, -1) runs over it. The BEGIN's geometry is the
|
|
52
|
+
* layer's number, whose rectangle measureLayers finds.
|
|
53
|
+
*/
|
|
54
|
+
export declare const LAYER_BEGIN = 4;
|
|
55
|
+
export declare const LAYER_END = 5;
|
|
56
|
+
/**
|
|
57
|
+
* A layer kept from a frame before (Keeps) composited again, over the
|
|
58
|
+
* rectangle of its layer number (its geometry), in its blend mode, its
|
|
59
|
+
* colour transform its row; its texture the kept one's id.
|
|
60
|
+
*/
|
|
61
|
+
export declare const KEPT = 6;
|
|
62
|
+
/** How an entry samples its texture: smoothed, and clamped, repeated or mirrored past its edges. */
|
|
63
|
+
export declare const SMOOTH = 1;
|
|
64
|
+
export declare const CLAMP = 0;
|
|
65
|
+
export declare const REPEAT = 2;
|
|
66
|
+
export declare const MIRROR = 4;
|
|
67
|
+
/**
|
|
68
|
+
* Drawn as drawTriangles' textured triangles are: its texels each
|
|
69
|
+
* vertex's u and v from 0 to 1, interpolated in perspective by the depth
|
|
70
|
+
* (t) it carries (GeometryData.depths), and the texture read as Flash
|
|
71
|
+
* reads it, once a pixel of Flash's (webgl/programs.ts, meshFragment).
|
|
72
|
+
*/
|
|
73
|
+
export declare const MESH = 8;
|
|
74
|
+
/**
|
|
75
|
+
* A 3D object's quad: drawn by the mesh program, its texture the kept
|
|
76
|
+
* output (Keeps) its bitmap was drawn into (WebGLBackend.drawPlane), its
|
|
77
|
+
* texels in that bitmap's texels, read smoothed at the centre of each pixel
|
|
78
|
+
* of Flash's, as Flash reads it.
|
|
79
|
+
*/
|
|
80
|
+
export declare const PLANE = 16;
|
|
81
|
+
/**
|
|
82
|
+
* Its vertices placed on quarters of a pixel of Flash's, ties to even, as
|
|
83
|
+
* Flash places a glyph's outline (the `legacy-static-text` case, drawn in
|
|
84
|
+
* adl): a pixel of the screen, a BitmapData's in a draw, a texel of a 3D
|
|
85
|
+
* object's bitmap.
|
|
86
|
+
*/
|
|
87
|
+
export declare const SNAP = 32;
|
|
88
|
+
/**
|
|
89
|
+
* A shader fill's part: its texels the kernel's coordinates, carried as a
|
|
90
|
+
* mesh's are with a depth of 1, and its texture the chain of the frame's
|
|
91
|
+
* filters that holds the kernel (filters.ts, FILL_SHADER); drawn by a
|
|
92
|
+
* program of the kernel's, once a pixel of Flash's, at its centre, as adl
|
|
93
|
+
* draws one.
|
|
94
|
+
*/
|
|
95
|
+
export declare const SHADED = 64;
|
|
96
|
+
/**
|
|
97
|
+
* Which pixels a filtered layer's object covers (SceneList.wholes): those
|
|
98
|
+
* of the target its drawing touches; or whole units, as Flash's bitmap of
|
|
99
|
+
* an object is, antialiased those its edges touch and one more right and
|
|
100
|
+
* down where an edge lies on one, aliased those whose centres it covers.
|
|
101
|
+
*/
|
|
102
|
+
export declare const NO_WHOLE = 0;
|
|
103
|
+
export declare const WHOLE_SMOOTH = 1;
|
|
104
|
+
export declare const WHOLE_ALIASED = 2;
|
|
105
|
+
/**
|
|
106
|
+
* A frame's drawing in order: each entry a geometry drawn under a row with
|
|
107
|
+
* a blend mode, and the texture it samples (-1 for none) and how. Boundaries
|
|
108
|
+
* (filters, masks, blend layers) come with the features that need them.
|
|
109
|
+
*/
|
|
110
|
+
export declare class SceneList {
|
|
111
|
+
geometry: Int32Array<ArrayBuffer>;
|
|
112
|
+
row: Int32Array<ArrayBuffer>;
|
|
113
|
+
blend: Uint8Array<ArrayBuffer>;
|
|
114
|
+
texture: Int32Array<ArrayBuffer>;
|
|
115
|
+
sampler: Uint8Array<ArrayBuffer>;
|
|
116
|
+
kind: Uint8Array<ArrayBuffer>;
|
|
117
|
+
length: number;
|
|
118
|
+
/** Each layer's rectangle of the target, in its pixels from the top left: x, y, width, height. */
|
|
119
|
+
layers: Int32Array<ArrayBuffer>;
|
|
120
|
+
/**
|
|
121
|
+
* Each layer's padding, as its filters reach past what is drawn: in the
|
|
122
|
+
* target's units (its pixels over the resolution), or -1 for an
|
|
123
|
+
* unfiltered layer, which covers what is drawn alone.
|
|
124
|
+
*/
|
|
125
|
+
pads: Int32Array<ArrayBuffer>;
|
|
126
|
+
/**
|
|
127
|
+
* Whether each filtered layer covers whole units of the target, as Flash
|
|
128
|
+
* places the bitmap a ShaderFilter's kernel runs over, its coordinates
|
|
129
|
+
* from its corner: NO_WHOLE, WHOLE_SMOOTH or WHOLE_ALIASED.
|
|
130
|
+
*/
|
|
131
|
+
wholes: Uint8Array<ArrayBuffer>;
|
|
132
|
+
/**
|
|
133
|
+
* Each whole layer's object, Flash's bitmap of it, uncut by the target:
|
|
134
|
+
* x, y, width and height in target pixels, as measureLayers finds it.
|
|
135
|
+
*/
|
|
136
|
+
objects: Float64Array<ArrayBuffer>;
|
|
137
|
+
/** Each layer's kept output, which its output becomes (Keeps), or -1. */
|
|
138
|
+
keeps: Int32Array<ArrayBuffer>;
|
|
139
|
+
/** The layer each layer is in, or -1. */
|
|
140
|
+
parents: Int32Array<ArrayBuffer>;
|
|
141
|
+
/** The layers begun and not yet ended, innermost last. */
|
|
142
|
+
private readonly open;
|
|
143
|
+
/**
|
|
144
|
+
* Each filtered layer's area as measured, before it was rounded and
|
|
145
|
+
* padded: least x and y, greatest x and y, in target pixels.
|
|
146
|
+
*/
|
|
147
|
+
areas: Float64Array<ArrayBuffer>;
|
|
148
|
+
layerCount: number;
|
|
149
|
+
reset(): void;
|
|
150
|
+
draw(geometry: number, row: number, blend: number, texture?: number, sampler?: number): void;
|
|
151
|
+
/**
|
|
152
|
+
* A layer begun, padded for its filters (or -1), over whole units as
|
|
153
|
+
* `whole` says (wholes), its rectangle none till measured (layerRect):
|
|
154
|
+
* its number.
|
|
155
|
+
*/
|
|
156
|
+
layerBegin(padding?: number, keep?: number, whole?: number): number;
|
|
157
|
+
/**
|
|
158
|
+
* Kept output `keep` composited again over the rectangle x y width height
|
|
159
|
+
* of the target, in blend mode `mode`, coloured by `row`.
|
|
160
|
+
*/
|
|
161
|
+
keptLayer(keep: number, mode: number, row: number, x: number, y: number, width: number, height: number): void;
|
|
162
|
+
private newLayer;
|
|
163
|
+
/** Filtered layer `layer` padded by `padding` after all, as its filters were fitted once it was drawn. */
|
|
164
|
+
padLayer(layer: number, padding: number): void;
|
|
165
|
+
/** The layer begun last ended: filtered by `chain` (or -1), composited in `mode`, coloured by `row`. */
|
|
166
|
+
layerEnd(mode: number, row: number, chain?: number): void;
|
|
167
|
+
/**
|
|
168
|
+
* Layer `layer` covers the rectangle x y width height of the target, in
|
|
169
|
+
* its pixels from the top left; one of no size shows nothing.
|
|
170
|
+
*/
|
|
171
|
+
layerRect(layer: number, x: number, y: number, width: number, height: number): void;
|
|
172
|
+
/**
|
|
173
|
+
* A mask's marker, with two numbers in its geometry and row: MASK_USE
|
|
174
|
+
* and MASK_POP name the mask's draws, from the first, so many of them.
|
|
175
|
+
*/
|
|
176
|
+
marker(kind: number, a?: number, b?: number): void;
|
|
177
|
+
private push;
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=scene.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scene.d.ts","sourceRoot":"","sources":["../src/scene.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,KAAK,IAAI,CAAC;AACvB,eAAO,MAAM,QAAQ,IAAI,CAAC;AAC1B,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,OAAO,IAAI,CAAC;AACzB,e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,EAAE,KAAK,SAAK,GAAG,IAAI,CAGpD;IAED;;;OAGG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAMlF;IAED;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,SAAI,EAAE,CAAC,SAAI,GAAG,IAAI,CAEvC;IAED,OAAO,CAAC,IAAI;CAyBb"}
|
package/dist/scene.js
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blend modes as a scene list names them, in Flash's order: the separable
|
|
3
|
+
* ones blend straight colours, the rest have formulas of their own.
|
|
4
|
+
*/
|
|
5
|
+
export const NORMAL = 0;
|
|
6
|
+
export const LAYER = 1;
|
|
7
|
+
export const MULTIPLY = 2;
|
|
8
|
+
export const SCREEN = 3;
|
|
9
|
+
export const LIGHTEN = 4;
|
|
10
|
+
export const DARKEN = 5;
|
|
11
|
+
export const DIFFERENCE = 6;
|
|
12
|
+
export const ADD = 7;
|
|
13
|
+
export const SUBTRACT = 8;
|
|
14
|
+
export const INVERT = 9;
|
|
15
|
+
export const ALPHA = 10;
|
|
16
|
+
export const ERASE = 11;
|
|
17
|
+
export const OVERLAY = 12;
|
|
18
|
+
export const HARDLIGHT = 13;
|
|
19
|
+
/**
|
|
20
|
+
* A Pixel Bender blend shader's, from KERNEL on: KERNEL + k blends by the
|
|
21
|
+
* kernel of chain k of the frame's filters (filters.ts, BLEND). A layer
|
|
22
|
+
* alone takes it, never a draw or a kept layer, whose modes are bytes.
|
|
23
|
+
*/
|
|
24
|
+
export const KERNEL = 14;
|
|
25
|
+
/**
|
|
26
|
+
* Not Flash's: an alpha mask's layer composited onto the unfiltered layer
|
|
27
|
+
* that ends after it, the layer of what it masks, keeping only what the
|
|
28
|
+
* mask covers, scaled by the mask's alpha. measureLayers cuts that layer to
|
|
29
|
+
* the mask's rectangle, past which nothing of it shows. A LAYER_END alone
|
|
30
|
+
* takes it; negative, as no blend mode's number is.
|
|
31
|
+
*/
|
|
32
|
+
export const ALPHA_MASK = -2;
|
|
33
|
+
/** Flash's blend mode names, by their number here. */
|
|
34
|
+
export const BLEND_NAMES = [
|
|
35
|
+
"normal",
|
|
36
|
+
"layer",
|
|
37
|
+
"multiply",
|
|
38
|
+
"screen",
|
|
39
|
+
"lighten",
|
|
40
|
+
"darken",
|
|
41
|
+
"difference",
|
|
42
|
+
"add",
|
|
43
|
+
"subtract",
|
|
44
|
+
"invert",
|
|
45
|
+
"alpha",
|
|
46
|
+
"erase",
|
|
47
|
+
"overlay",
|
|
48
|
+
"hardlight",
|
|
49
|
+
];
|
|
50
|
+
/**
|
|
51
|
+
* What an entry is: a draw, or a mask's marker. A mask's own draws lie
|
|
52
|
+
* between its MASK_BEGIN and its MASK_USE, which names them (its geometry
|
|
53
|
+
* the first, its row how many) for the planner to push them into the
|
|
54
|
+
* stencil; what it masks follows, up to the MASK_POP that names them again
|
|
55
|
+
* to take them out.
|
|
56
|
+
*/
|
|
57
|
+
export const DRAW = 0;
|
|
58
|
+
export const MASK_BEGIN = 1;
|
|
59
|
+
export const MASK_USE = 2;
|
|
60
|
+
export const MASK_POP = 3;
|
|
61
|
+
/**
|
|
62
|
+
* A layer: what lies between LAYER_BEGIN and LAYER_END is drawn into a
|
|
63
|
+
* target of its own over a rectangle of the target, then composited onto
|
|
64
|
+
* what is below in the END's blend mode (its geometry), its colour
|
|
65
|
+
* transform the END's row, or none (-1), after the END's chain of filters
|
|
66
|
+
* (its texture, or none, -1) runs over it. The BEGIN's geometry is the
|
|
67
|
+
* layer's number, whose rectangle measureLayers finds.
|
|
68
|
+
*/
|
|
69
|
+
export const LAYER_BEGIN = 4;
|
|
70
|
+
export const LAYER_END = 5;
|
|
71
|
+
/**
|
|
72
|
+
* A layer kept from a frame before (Keeps) composited again, over the
|
|
73
|
+
* rectangle of its layer number (its geometry), in its blend mode, its
|
|
74
|
+
* colour transform its row; its texture the kept one's id.
|
|
75
|
+
*/
|
|
76
|
+
export const KEPT = 6;
|
|
77
|
+
/** How an entry samples its texture: smoothed, and clamped, repeated or mirrored past its edges. */
|
|
78
|
+
export const SMOOTH = 1;
|
|
79
|
+
export const CLAMP = 0;
|
|
80
|
+
export const REPEAT = 2;
|
|
81
|
+
export const MIRROR = 4;
|
|
82
|
+
/**
|
|
83
|
+
* Drawn as drawTriangles' textured triangles are: its texels each
|
|
84
|
+
* vertex's u and v from 0 to 1, interpolated in perspective by the depth
|
|
85
|
+
* (t) it carries (GeometryData.depths), and the texture read as Flash
|
|
86
|
+
* reads it, once a pixel of Flash's (webgl/programs.ts, meshFragment).
|
|
87
|
+
*/
|
|
88
|
+
export const MESH = 8;
|
|
89
|
+
/**
|
|
90
|
+
* A 3D object's quad: drawn by the mesh program, its texture the kept
|
|
91
|
+
* output (Keeps) its bitmap was drawn into (WebGLBackend.drawPlane), its
|
|
92
|
+
* texels in that bitmap's texels, read smoothed at the centre of each pixel
|
|
93
|
+
* of Flash's, as Flash reads it.
|
|
94
|
+
*/
|
|
95
|
+
export const PLANE = 16;
|
|
96
|
+
/**
|
|
97
|
+
* Its vertices placed on quarters of a pixel of Flash's, ties to even, as
|
|
98
|
+
* Flash places a glyph's outline (the `legacy-static-text` case, drawn in
|
|
99
|
+
* adl): a pixel of the screen, a BitmapData's in a draw, a texel of a 3D
|
|
100
|
+
* object's bitmap.
|
|
101
|
+
*/
|
|
102
|
+
export const SNAP = 32;
|
|
103
|
+
/**
|
|
104
|
+
* A shader fill's part: its texels the kernel's coordinates, carried as a
|
|
105
|
+
* mesh's are with a depth of 1, and its texture the chain of the frame's
|
|
106
|
+
* filters that holds the kernel (filters.ts, FILL_SHADER); drawn by a
|
|
107
|
+
* program of the kernel's, once a pixel of Flash's, at its centre, as adl
|
|
108
|
+
* draws one.
|
|
109
|
+
*/
|
|
110
|
+
export const SHADED = 64;
|
|
111
|
+
/**
|
|
112
|
+
* Which pixels a filtered layer's object covers (SceneList.wholes): those
|
|
113
|
+
* of the target its drawing touches; or whole units, as Flash's bitmap of
|
|
114
|
+
* an object is, antialiased those its edges touch and one more right and
|
|
115
|
+
* down where an edge lies on one, aliased those whose centres it covers.
|
|
116
|
+
*/
|
|
117
|
+
export const NO_WHOLE = 0;
|
|
118
|
+
export const WHOLE_SMOOTH = 1;
|
|
119
|
+
export const WHOLE_ALIASED = 2;
|
|
120
|
+
/**
|
|
121
|
+
* A frame's drawing in order: each entry a geometry drawn under a row with
|
|
122
|
+
* a blend mode, and the texture it samples (-1 for none) and how. Boundaries
|
|
123
|
+
* (filters, masks, blend layers) come with the features that need them.
|
|
124
|
+
*/
|
|
125
|
+
export class SceneList {
|
|
126
|
+
geometry = new Int32Array(1024);
|
|
127
|
+
row = new Int32Array(1024);
|
|
128
|
+
blend = new Uint8Array(1024);
|
|
129
|
+
texture = new Int32Array(1024);
|
|
130
|
+
sampler = new Uint8Array(1024);
|
|
131
|
+
kind = new Uint8Array(1024);
|
|
132
|
+
length = 0;
|
|
133
|
+
/** Each layer's rectangle of the target, in its pixels from the top left: x, y, width, height. */
|
|
134
|
+
layers = new Int32Array(64);
|
|
135
|
+
/**
|
|
136
|
+
* Each layer's padding, as its filters reach past what is drawn: in the
|
|
137
|
+
* target's units (its pixels over the resolution), or -1 for an
|
|
138
|
+
* unfiltered layer, which covers what is drawn alone.
|
|
139
|
+
*/
|
|
140
|
+
pads = new Int32Array(16);
|
|
141
|
+
/**
|
|
142
|
+
* Whether each filtered layer covers whole units of the target, as Flash
|
|
143
|
+
* places the bitmap a ShaderFilter's kernel runs over, its coordinates
|
|
144
|
+
* from its corner: NO_WHOLE, WHOLE_SMOOTH or WHOLE_ALIASED.
|
|
145
|
+
*/
|
|
146
|
+
wholes = new Uint8Array(16);
|
|
147
|
+
/**
|
|
148
|
+
* Each whole layer's object, Flash's bitmap of it, uncut by the target:
|
|
149
|
+
* x, y, width and height in target pixels, as measureLayers finds it.
|
|
150
|
+
*/
|
|
151
|
+
objects = new Float64Array(64);
|
|
152
|
+
/** Each layer's kept output, which its output becomes (Keeps), or -1. */
|
|
153
|
+
keeps = new Int32Array(16);
|
|
154
|
+
/** The layer each layer is in, or -1. */
|
|
155
|
+
parents = new Int32Array(16);
|
|
156
|
+
/** The layers begun and not yet ended, innermost last. */
|
|
157
|
+
open = [];
|
|
158
|
+
/**
|
|
159
|
+
* Each filtered layer's area as measured, before it was rounded and
|
|
160
|
+
* padded: least x and y, greatest x and y, in target pixels.
|
|
161
|
+
*/
|
|
162
|
+
areas = new Float64Array(64);
|
|
163
|
+
layerCount = 0;
|
|
164
|
+
reset() {
|
|
165
|
+
this.length = 0;
|
|
166
|
+
this.layerCount = 0;
|
|
167
|
+
this.open.length = 0;
|
|
168
|
+
}
|
|
169
|
+
draw(geometry, row, blend, texture = -1, sampler = 0) {
|
|
170
|
+
this.push(DRAW, geometry, row, blend, texture, sampler);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* A layer begun, padded for its filters (or -1), over whole units as
|
|
174
|
+
* `whole` says (wholes), its rectangle none till measured (layerRect):
|
|
175
|
+
* its number.
|
|
176
|
+
*/
|
|
177
|
+
layerBegin(padding = -1, keep = -1, whole = NO_WHOLE) {
|
|
178
|
+
const layer = this.newLayer(padding, keep);
|
|
179
|
+
this.wholes[layer] = whole;
|
|
180
|
+
this.push(LAYER_BEGIN, layer, 0, 0, -1, 0);
|
|
181
|
+
this.open.push(layer);
|
|
182
|
+
return layer;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Kept output `keep` composited again over the rectangle x y width height
|
|
186
|
+
* of the target, in blend mode `mode`, coloured by `row`.
|
|
187
|
+
*/
|
|
188
|
+
keptLayer(keep, mode, row, x, y, width, height) {
|
|
189
|
+
const layer = this.newLayer(-1, keep);
|
|
190
|
+
this.layerRect(layer, x, y, width, height);
|
|
191
|
+
this.push(KEPT, layer, row, mode, keep, 0);
|
|
192
|
+
}
|
|
193
|
+
newLayer(padding, keep) {
|
|
194
|
+
const layer = this.layerCount++;
|
|
195
|
+
if (layer >= this.pads.length) {
|
|
196
|
+
this.layers = grow(this.layers);
|
|
197
|
+
this.pads = grow(this.pads);
|
|
198
|
+
this.wholes = grow(this.wholes);
|
|
199
|
+
const objects = new Float64Array(this.objects.length * 2);
|
|
200
|
+
objects.set(this.objects);
|
|
201
|
+
this.objects = objects;
|
|
202
|
+
this.keeps = grow(this.keeps);
|
|
203
|
+
this.parents = grow(this.parents);
|
|
204
|
+
const areas = new Float64Array(this.areas.length * 2);
|
|
205
|
+
areas.set(this.areas);
|
|
206
|
+
this.areas = areas;
|
|
207
|
+
}
|
|
208
|
+
this.pads[layer] = padding;
|
|
209
|
+
this.wholes[layer] = NO_WHOLE;
|
|
210
|
+
this.keeps[layer] = keep;
|
|
211
|
+
this.parents[layer] = this.open.at(-1) ?? -1;
|
|
212
|
+
this.layerRect(layer, 0, 0, 0, 0);
|
|
213
|
+
return layer;
|
|
214
|
+
}
|
|
215
|
+
/** Filtered layer `layer` padded by `padding` after all, as its filters were fitted once it was drawn. */
|
|
216
|
+
padLayer(layer, padding) {
|
|
217
|
+
this.pads[layer] = padding;
|
|
218
|
+
}
|
|
219
|
+
/** The layer begun last ended: filtered by `chain` (or -1), composited in `mode`, coloured by `row`. */
|
|
220
|
+
layerEnd(mode, row, chain = -1) {
|
|
221
|
+
this.open.pop();
|
|
222
|
+
this.push(LAYER_END, mode, row, 0, chain, 0);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Layer `layer` covers the rectangle x y width height of the target, in
|
|
226
|
+
* its pixels from the top left; one of no size shows nothing.
|
|
227
|
+
*/
|
|
228
|
+
layerRect(layer, x, y, width, height) {
|
|
229
|
+
const r = this.layers;
|
|
230
|
+
r[layer * 4] = x;
|
|
231
|
+
r[layer * 4 + 1] = y;
|
|
232
|
+
r[layer * 4 + 2] = width;
|
|
233
|
+
r[layer * 4 + 3] = height;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* A mask's marker, with two numbers in its geometry and row: MASK_USE
|
|
237
|
+
* and MASK_POP name the mask's draws, from the first, so many of them.
|
|
238
|
+
*/
|
|
239
|
+
marker(kind, a = 0, b = 0) {
|
|
240
|
+
this.push(kind, a, b, 0, -1, 0);
|
|
241
|
+
}
|
|
242
|
+
push(kind, geometry, row, blend, texture, sampler) {
|
|
243
|
+
if (this.length === this.geometry.length) {
|
|
244
|
+
this.geometry = grow(this.geometry);
|
|
245
|
+
this.row = grow(this.row);
|
|
246
|
+
this.blend = grow(this.blend);
|
|
247
|
+
this.texture = grow(this.texture);
|
|
248
|
+
this.sampler = grow(this.sampler);
|
|
249
|
+
this.kind = grow(this.kind);
|
|
250
|
+
}
|
|
251
|
+
const at = this.length++;
|
|
252
|
+
this.kind[at] = kind;
|
|
253
|
+
this.geometry[at] = geometry;
|
|
254
|
+
this.row[at] = row;
|
|
255
|
+
this.blend[at] = blend;
|
|
256
|
+
this.texture[at] = texture;
|
|
257
|
+
this.sampler[at] = sampler;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
function grow(array) {
|
|
261
|
+
const grown = new array.constructor(array.length * 2);
|
|
262
|
+
grown.set(array);
|
|
263
|
+
return grown;
|
|
264
|
+
}
|
|
265
|
+
//# sourceMappingURL=scene.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scene.js","sourceRoot":"","sources":["../src/scene.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC;AACxB,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC;AACvB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC;AACxB,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC;AACzB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,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AC,GAAG,OAAO,CAAC;IAC7B,CAAC;CACF;AAED,SAAS,IAAI,CAAoC,KAAQ;IACvD,MAAM,KAAK,GAAG,IAAK,KAAK,CAAC,WAAyC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACrF,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACjB,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Rectangles on pages `width` wide and at most `most` high, each page as high as they need. */
|
|
2
|
+
export declare class Shelves {
|
|
3
|
+
/** Each rectangle's page, and its corner there. */
|
|
4
|
+
readonly page: number[];
|
|
5
|
+
readonly x: number[];
|
|
6
|
+
readonly y: number[];
|
|
7
|
+
count: number;
|
|
8
|
+
/** Each page's height, as far down as its rectangles reach. */
|
|
9
|
+
readonly heights: number[];
|
|
10
|
+
pages: number;
|
|
11
|
+
private width;
|
|
12
|
+
private most;
|
|
13
|
+
/** Where the shelf open starts, how high it is, and how far along it is filled. */
|
|
14
|
+
private shelf;
|
|
15
|
+
private shelfHeight;
|
|
16
|
+
private along;
|
|
17
|
+
/** Empty, for pages `width` wide and at most `most` high. */
|
|
18
|
+
reset(width: number, most: number): void;
|
|
19
|
+
/** A rectangle `w` by `h` placed: its number; -1 for one larger than a page. */
|
|
20
|
+
add(w: number, h: number): number;
|
|
21
|
+
private newPage;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=shelves.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shelves.d.ts","sourceRoot":"","sources":["../src/shelves.ts"],"names":[],"mappings":"AAIA,gGAAgG;AAChG,qBAAa,OAAO;IAClB,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAM;IAC7B,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAM;IAC1B,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAM;IAC1B,KAAK,SAAK;IACV,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAM;IAChC,KAAK,SAAK;IACV,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,IAAI,CAAK;IACjB,mFAAmF;IACnF,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,KAAK,CAAK;IAElB,6DAA6D;IAC7D,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAQvC;IAED,gFAAgF;IAChF,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CA4BhC;IAED,OAAO,CAAC,OAAO;CAMhB"}
|
package/dist/shelves.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Rectangles placed side by side on pages, in shelves, in the order they
|
|
2
|
+
// come: a frame's held layers and their filters' targets (plan, HOLD_PUSH),
|
|
3
|
+
// each of a page a pass draws into with the others of its kind.
|
|
4
|
+
/** Rectangles on pages `width` wide and at most `most` high, each page as high as they need. */
|
|
5
|
+
export class Shelves {
|
|
6
|
+
/** Each rectangle's page, and its corner there. */
|
|
7
|
+
page = [];
|
|
8
|
+
x = [];
|
|
9
|
+
y = [];
|
|
10
|
+
count = 0;
|
|
11
|
+
/** Each page's height, as far down as its rectangles reach. */
|
|
12
|
+
heights = [];
|
|
13
|
+
pages = 0;
|
|
14
|
+
width = 0;
|
|
15
|
+
most = 0;
|
|
16
|
+
/** Where the shelf open starts, how high it is, and how far along it is filled. */
|
|
17
|
+
shelf = 0;
|
|
18
|
+
shelfHeight = 0;
|
|
19
|
+
along = 0;
|
|
20
|
+
/** Empty, for pages `width` wide and at most `most` high. */
|
|
21
|
+
reset(width, most) {
|
|
22
|
+
this.width = width;
|
|
23
|
+
this.most = most;
|
|
24
|
+
this.count = 0;
|
|
25
|
+
this.pages = 0;
|
|
26
|
+
this.shelf = 0;
|
|
27
|
+
this.shelfHeight = 0;
|
|
28
|
+
this.along = 0;
|
|
29
|
+
}
|
|
30
|
+
/** A rectangle `w` by `h` placed: its number; -1 for one larger than a page. */
|
|
31
|
+
add(w, h) {
|
|
32
|
+
if (w > this.width || h > this.most) {
|
|
33
|
+
return -1;
|
|
34
|
+
}
|
|
35
|
+
if (this.pages === 0) {
|
|
36
|
+
this.newPage();
|
|
37
|
+
}
|
|
38
|
+
if (this.along + w > this.width) {
|
|
39
|
+
this.shelf += this.shelfHeight;
|
|
40
|
+
this.shelfHeight = 0;
|
|
41
|
+
this.along = 0;
|
|
42
|
+
}
|
|
43
|
+
if (this.shelf + h > this.most) {
|
|
44
|
+
this.newPage();
|
|
45
|
+
}
|
|
46
|
+
const i = this.count++;
|
|
47
|
+
const page = this.pages - 1;
|
|
48
|
+
this.page[i] = page;
|
|
49
|
+
this.x[i] = this.along;
|
|
50
|
+
this.y[i] = this.shelf;
|
|
51
|
+
this.along += w;
|
|
52
|
+
this.shelfHeight = Math.max(this.shelfHeight, h);
|
|
53
|
+
this.heights[page] = Math.max(this.heights[page], this.shelf + this.shelfHeight);
|
|
54
|
+
return i;
|
|
55
|
+
}
|
|
56
|
+
newPage() {
|
|
57
|
+
this.heights[this.pages++] = 0;
|
|
58
|
+
this.shelf = 0;
|
|
59
|
+
this.shelfHeight = 0;
|
|
60
|
+
this.along = 0;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=shelves.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shelves.js","sourceRoot":"","sources":["../src/shelves.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,4EAA4E;AAC5E,gEAAgE;AAEhE,gGAAgG;AAChG,MAAM,OAAO,OAAO;IAClB,mDAAmD;IAC1C,IAAI,GAAa,EAAE,CAAC;IACpB,CAAC,GAAa,EAAE,CAAC;IACjB,CAAC,GAAa,EAAE,CAAC;IAC1B,KAAK,GAAG,CAAC,C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C;QAED,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACvB,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACvB,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QACjD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;QACjF,OAAO,CAAC,CAAC;IACX,CAAC;IAEO,OAAO;QACb,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACjB,CAAC;CACF"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type Handle, Registry } from "./registry.js";
|
|
2
|
+
/** A texture as its owner holds it: its id, and the generation the id had. */
|
|
3
|
+
export type TextureHandle = Handle;
|
|
4
|
+
/**
|
|
5
|
+
* A texture's size, and its pixels while they wait to be uploaded:
|
|
6
|
+
* premultiplied RGBA bytes, or RGBA floats, which only a kernel reads, a
|
|
7
|
+
* texel at a time.
|
|
8
|
+
*/
|
|
9
|
+
export interface TextureData {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
pixels: Uint8Array | Float32Array | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* How many frames a texture keeps the bytes it was last set from without
|
|
16
|
+
* being set again, and spare bytes wait for another texture: a texture set
|
|
17
|
+
* every frame, as a BitmapData drawn into every frame is, is converted into
|
|
18
|
+
* the same bytes each time; one that stops changing lets them go a couple
|
|
19
|
+
* of seconds later.
|
|
20
|
+
*/
|
|
21
|
+
export declare const KEEP_FRAMES = 60;
|
|
22
|
+
/**
|
|
23
|
+
* Every texture a scene list may name, by id. An owner adds a texture's
|
|
24
|
+
* pixels, and sets them again as they change; the backend uploads what is
|
|
25
|
+
* pending in its next render and lets the pixels go, keeping no hold on
|
|
26
|
+
* them. What goes undrawn for its idle frames, IDLE_FRAMES unless it was
|
|
27
|
+
* given fewer, is let go of, as geometries are.
|
|
28
|
+
*
|
|
29
|
+
* The bytes an owner fills to add or set a texture come from `bytes`, and
|
|
30
|
+
* stay this registry's: filled, they are passed to add or set at once and
|
|
31
|
+
* left be after, as they are lent again, to the same texture to be set again
|
|
32
|
+
* or, once it let them go, to another. A texture set again keeps the bytes it
|
|
33
|
+
* was last set from for KEEP_FRAMES; then, or once uploaded for one only
|
|
34
|
+
* added, or when it is removed, idle or with a lost context, they are spare
|
|
35
|
+
* for as long, for the next texture of their length.
|
|
36
|
+
*/
|
|
37
|
+
export declare class Textures extends Registry {
|
|
38
|
+
private readonly data;
|
|
39
|
+
/** The bytes each texture was last added or set from, where `bytes` lent them, and the frame. */
|
|
40
|
+
private readonly kept;
|
|
41
|
+
private readonly setAt;
|
|
42
|
+
/** Whether each texture was set again since it was added, which keeps its bytes for a while. */
|
|
43
|
+
private readonly changing;
|
|
44
|
+
/** Bytes no texture keeps, by length, the least lately spared first. */
|
|
45
|
+
private readonly spare;
|
|
46
|
+
private spareBytes;
|
|
47
|
+
private readonly lent;
|
|
48
|
+
/** Added or set again since the backend last took them. */
|
|
49
|
+
pending: number[];
|
|
50
|
+
/**
|
|
51
|
+
* `length` bytes to fill and add or set a texture from: those texture `id`
|
|
52
|
+
* keeps where they are as long, else spare ones, else new.
|
|
53
|
+
*/
|
|
54
|
+
bytes(length: number, id?: number): Uint8Array;
|
|
55
|
+
/** A texture of `pixels`, let go of once undrawn for `idle` frames. */
|
|
56
|
+
add(width: number, height: number, pixels: Uint8Array | Float32Array, idle?: number): TextureHandle;
|
|
57
|
+
/**
|
|
58
|
+
* `id`'s pixels changed, its size with them perhaps; with `idle`, it is
|
|
59
|
+
* let go of after as many undrawn frames where that is fewer.
|
|
60
|
+
*/
|
|
61
|
+
set(id: number, width: number, height: number, pixels: Uint8Array, idle?: number): void;
|
|
62
|
+
get(id: number): TextureData | null;
|
|
63
|
+
/** The bytes held on the CPU: those textures keep, and spare ones. */
|
|
64
|
+
get heldBytes(): number;
|
|
65
|
+
/** A frame ends: what went unused too long is let go of, and bytes kept no longer needed spared. */
|
|
66
|
+
endFrame(): void;
|
|
67
|
+
protected dropped(id: number): void;
|
|
68
|
+
/** `pixels` kept for `id` where `bytes` lent them; those it kept before spared. */
|
|
69
|
+
private keep;
|
|
70
|
+
private spareOf;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=textures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textures.d.ts","sourceRoot":"","sources":["../src/textures.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEtD,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,GAAG,YAAY,GAAG,IAAI,CAAC;CAC1C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,KAAK,CAAC;AAK9B;;;;;;;;;;;;;;GAcG;AACH,qBAA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