@swf2es/player 0.1.0 → 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/package.json +7 -7
- package/dist/audio.d.ts +0 -22
- package/dist/audio.d.ts.map +0 -1
- package/dist/audio.js +0 -106
- package/dist/audio.js.map +0 -1
- package/dist/bitmap-filters.d.ts +0 -29
- package/dist/bitmap-filters.d.ts.map +0 -1
- package/dist/bitmap-filters.js +0 -906
- package/dist/bitmap-filters.js.map +0 -1
- package/dist/bitmap-ops.d.ts +0 -113
- package/dist/bitmap-ops.d.ts.map +0 -1
- package/dist/bitmap-ops.js +0 -725
- package/dist/bitmap-ops.js.map +0 -1
- package/dist/bitmap.d.ts +0 -98
- package/dist/bitmap.d.ts.map +0 -1
- package/dist/bitmap.js +0 -314
- package/dist/bitmap.js.map +0 -1
- package/dist/bounds.d.ts +0 -26
- package/dist/bounds.d.ts.map +0 -1
- package/dist/bounds.js +0 -300
- package/dist/bounds.js.map +0 -1
- package/dist/color.d.ts +0 -7
- package/dist/color.d.ts.map +0 -1
- package/dist/color.js +0 -42
- package/dist/color.js.map +0 -1
- package/dist/display.d.ts +0 -425
- package/dist/display.d.ts.map +0 -1
- package/dist/display.js +0 -1274
- package/dist/display.js.map +0 -1
- package/dist/drawing.d.ts +0 -52
- package/dist/drawing.d.ts.map +0 -1
- package/dist/drawing.js +0 -204
- package/dist/drawing.js.map +0 -1
- package/dist/filters.d.ts +0 -54
- package/dist/filters.d.ts.map +0 -1
- package/dist/filters.js +0 -155
- package/dist/filters.js.map +0 -1
- package/dist/fonts.d.ts +0 -23
- package/dist/fonts.d.ts.map +0 -1
- package/dist/fonts.js +0 -91
- package/dist/fonts.js.map +0 -1
- package/dist/geometry.d.ts +0 -21
- package/dist/geometry.d.ts.map +0 -1
- package/dist/geometry.js +0 -76
- package/dist/geometry.js.map +0 -1
- package/dist/gradients.d.ts +0 -29
- package/dist/gradients.d.ts.map +0 -1
- package/dist/gradients.js +0 -116
- package/dist/gradients.js.map +0 -1
- package/dist/images.d.ts +0 -22
- package/dist/images.d.ts.map +0 -1
- package/dist/images.js +0 -147
- package/dist/images.js.map +0 -1
- package/dist/input.d.ts +0 -79
- package/dist/input.d.ts.map +0 -1
- package/dist/input.js +0 -366
- package/dist/input.js.map +0 -1
- package/dist/keyboard.d.ts +0 -97
- package/dist/keyboard.d.ts.map +0 -1
- package/dist/keyboard.js +0 -583
- package/dist/keyboard.js.map +0 -1
- package/dist/morph.d.ts +0 -17
- package/dist/morph.d.ts.map +0 -1
- package/dist/morph.js +0 -218
- package/dist/morph.js.map +0 -1
- package/dist/pixi-blend.d.ts +0 -7
- package/dist/pixi-blend.d.ts.map +0 -1
- package/dist/pixi-blend.js +0 -253
- package/dist/pixi-blend.js.map +0 -1
- package/dist/pixi-color.d.ts +0 -54
- package/dist/pixi-color.d.ts.map +0 -1
- package/dist/pixi-color.js +0 -336
- package/dist/pixi-color.js.map +0 -1
- package/dist/pixi-filters.d.ts +0 -40
- package/dist/pixi-filters.d.ts.map +0 -1
- package/dist/pixi-filters.js +0 -953
- package/dist/pixi-filters.js.map +0 -1
- package/dist/pixi-resolve.d.ts +0 -4
- package/dist/pixi-resolve.d.ts.map +0 -1
- package/dist/pixi-resolve.js +0 -76
- package/dist/pixi-resolve.js.map +0 -1
- package/dist/pixi.d.ts +0 -219
- package/dist/pixi.d.ts.map +0 -1
- package/dist/pixi.js +0 -2169
- package/dist/pixi.js.map +0 -1
- package/dist/playerglobal/flash/filters/filters.d.ts +0 -26
- package/dist/playerglobal/flash/filters/filters.d.ts.map +0 -1
- package/dist/playerglobal/flash/filters/filters.js +0 -287
- package/dist/playerglobal/flash/filters/filters.js.map +0 -1
- package/dist/playerglobal/flash/system/FSCommand.d.ts +0 -4
- package/dist/playerglobal/flash/system/FSCommand.d.ts.map +0 -1
- package/dist/playerglobal/flash/system/FSCommand.js +0 -18
- package/dist/playerglobal/flash/system/FSCommand.js.map +0 -1
- package/dist/playerglobal/natives.d.ts +0 -10
- package/dist/playerglobal/natives.d.ts.map +0 -1
- package/dist/playerglobal/natives.js +0 -53
- package/dist/playerglobal/natives.js.map +0 -1
- package/dist/png.d.ts +0 -4
- package/dist/png.d.ts.map +0 -1
- package/dist/png.js +0 -140
- package/dist/png.js.map +0 -1
- package/dist/render/art.d.ts +0 -148
- package/dist/render/art.d.ts.map +0 -1
- package/dist/render/art.js +0 -575
- package/dist/render/art.js.map +0 -1
- package/dist/render/batchers.d.ts +0 -23
- package/dist/render/batchers.d.ts.map +0 -1
- package/dist/render/batchers.js +0 -52
- package/dist/render/batchers.js.map +0 -1
- package/dist/render/bitmaps.d.ts +0 -117
- package/dist/render/bitmaps.d.ts.map +0 -1
- package/dist/render/bitmaps.js +0 -422
- package/dist/render/bitmaps.js.map +0 -1
- package/dist/render/blend.d.ts +0 -37
- package/dist/render/blend.d.ts.map +0 -1
- package/dist/render/blend.js +0 -195
- package/dist/render/blend.js.map +0 -1
- package/dist/render/color.d.ts +0 -111
- package/dist/render/color.d.ts.map +0 -1
- package/dist/render/color.js +0 -533
- package/dist/render/color.js.map +0 -1
- package/dist/render/compositing.d.ts +0 -77
- package/dist/render/compositing.d.ts.map +0 -1
- package/dist/render/compositing.js +0 -188
- package/dist/render/compositing.js.map +0 -1
- package/dist/render/filters.d.ts +0 -98
- package/dist/render/filters.d.ts.map +0 -1
- package/dist/render/filters.js +0 -1326
- package/dist/render/filters.js.map +0 -1
- package/dist/render/hooks.d.ts +0 -4
- package/dist/render/hooks.d.ts.map +0 -1
- package/dist/render/hooks.js +0 -48
- package/dist/render/hooks.js.map +0 -1
- package/dist/render/node.d.ts +0 -139
- package/dist/render/node.d.ts.map +0 -1
- package/dist/render/node.js +0 -59
- package/dist/render/node.js.map +0 -1
- package/dist/render/patches.d.ts +0 -54
- package/dist/render/patches.d.ts.map +0 -1
- package/dist/render/patches.js +0 -154
- package/dist/render/patches.js.map +0 -1
- package/dist/render/planes.d.ts +0 -74
- package/dist/render/planes.d.ts.map +0 -1
- package/dist/render/planes.js +0 -267
- package/dist/render/planes.js.map +0 -1
- package/dist/render/pointer.d.ts +0 -5
- package/dist/render/pointer.d.ts.map +0 -1
- package/dist/render/pointer.js +0 -279
- package/dist/render/pointer.js.map +0 -1
- package/dist/render/pools.d.ts +0 -122
- package/dist/render/pools.d.ts.map +0 -1
- package/dist/render/pools.js +0 -238
- package/dist/render/pools.js.map +0 -1
- package/dist/render/resolve.d.ts +0 -4
- package/dist/render/resolve.d.ts.map +0 -1
- package/dist/render/resolve.js +0 -76
- package/dist/render/resolve.js.map +0 -1
- package/dist/render/saffron.d.ts +0 -135
- package/dist/render/saffron.d.ts.map +0 -1
- package/dist/render/saffron.js +0 -725
- package/dist/render/saffron.js.map +0 -1
- package/dist/render/settle.d.ts +0 -60
- package/dist/render/settle.d.ts.map +0 -1
- package/dist/render/settle.js +0 -128
- package/dist/render/settle.js.map +0 -1
- package/dist/render/shared.d.ts +0 -25
- package/dist/render/shared.d.ts.map +0 -1
- package/dist/render/shared.js +0 -33
- package/dist/render/shared.js.map +0 -1
- package/dist/render/snapshot.d.ts +0 -21
- package/dist/render/snapshot.d.ts.map +0 -1
- package/dist/render/snapshot.js +0 -91
- package/dist/render/snapshot.js.map +0 -1
- package/dist/render/spares.d.ts +0 -56
- package/dist/render/spares.d.ts.map +0 -1
- package/dist/render/spares.js +0 -160
- package/dist/render/spares.js.map +0 -1
- package/dist/render/strokes.d.ts +0 -107
- package/dist/render/strokes.d.ts.map +0 -1
- package/dist/render/strokes.js +0 -448
- package/dist/render/strokes.js.map +0 -1
- package/dist/render/table.d.ts +0 -213
- package/dist/render/table.d.ts.map +0 -1
- package/dist/render/table.js +0 -795
- package/dist/render/table.js.map +0 -1
- package/dist/render/tessellate.d.ts +0 -89
- package/dist/render/tessellate.d.ts.map +0 -1
- package/dist/render/tessellate.js +0 -386
- package/dist/render/tessellate.js.map +0 -1
- package/dist/render/text.d.ts +0 -40
- package/dist/render/text.d.ts.map +0 -1
- package/dist/render/text.js +0 -309
- package/dist/render/text.js.map +0 -1
- package/dist/render/three.d.ts +0 -83
- package/dist/render/three.d.ts.map +0 -1
- package/dist/render/three.js +0 -511
- package/dist/render/three.js.map +0 -1
- package/dist/render/triangles.d.ts +0 -28
- package/dist/render/triangles.d.ts.map +0 -1
- package/dist/render/triangles.js +0 -189
- package/dist/render/triangles.js.map +0 -1
- package/dist/render/view.d.ts +0 -238
- package/dist/render/view.d.ts.map +0 -1
- package/dist/render/view.js +0 -1173
- package/dist/render/view.js.map +0 -1
- package/dist/render/worker/bitmaps.d.ts +0 -43
- package/dist/render/worker/bitmaps.d.ts.map +0 -1
- package/dist/render/worker/bitmaps.js +0 -151
- package/dist/render/worker/bitmaps.js.map +0 -1
- package/dist/render/worker/drawing.d.ts +0 -21
- package/dist/render/worker/drawing.d.ts.map +0 -1
- package/dist/render/worker/drawing.js +0 -356
- package/dist/render/worker/drawing.js.map +0 -1
- package/dist/render/worker/filters.d.ts +0 -7
- package/dist/render/worker/filters.d.ts.map +0 -1
- package/dist/render/worker/filters.js +0 -125
- package/dist/render/worker/filters.js.map +0 -1
- package/dist/render/worker/frames.d.ts +0 -32
- package/dist/render/worker/frames.d.ts.map +0 -1
- package/dist/render/worker/frames.js +0 -124
- package/dist/render/worker/frames.js.map +0 -1
- package/dist/render/worker/host.d.ts +0 -60
- package/dist/render/worker/host.d.ts.map +0 -1
- package/dist/render/worker/host.js +0 -297
- package/dist/render/worker/host.js.map +0 -1
- package/dist/render/worker/libraries.d.ts +0 -36
- package/dist/render/worker/libraries.d.ts.map +0 -1
- package/dist/render/worker/libraries.js +0 -153
- package/dist/render/worker/libraries.js.map +0 -1
- package/dist/render/worker/presentation.d.ts +0 -18
- package/dist/render/worker/presentation.d.ts.map +0 -1
- package/dist/render/worker/presentation.js +0 -47
- package/dist/render/worker/presentation.js.map +0 -1
- package/dist/render/worker/renderer.d.ts +0 -4
- package/dist/render/worker/renderer.d.ts.map +0 -1
- package/dist/render/worker/renderer.js +0 -21
- package/dist/render/worker/renderer.js.map +0 -1
- package/dist/render/worker/scene.d.ts +0 -32
- package/dist/render/worker/scene.d.ts.map +0 -1
- package/dist/render/worker/scene.js +0 -611
- package/dist/render/worker/scene.js.map +0 -1
- package/dist/render/worker/text.d.ts +0 -47
- package/dist/render/worker/text.d.ts.map +0 -1
- package/dist/render/worker/text.js +0 -261
- package/dist/render/worker/text.js.map +0 -1
- package/dist/render/worker/thread.d.ts +0 -23
- package/dist/render/worker/thread.d.ts.map +0 -1
- package/dist/render/worker/thread.js +0 -107
- package/dist/render/worker/thread.js.map +0 -1
- package/dist/render/worker/values.d.ts +0 -18
- package/dist/render/worker/values.d.ts.map +0 -1
- package/dist/render/worker/values.js +0 -64
- package/dist/render/worker/values.js.map +0 -1
- package/dist/sha256.d.ts +0 -5
- package/dist/sha256.d.ts.map +0 -1
- package/dist/sha256.js +0 -96
- package/dist/sha256.js.map +0 -1
- package/dist/shapes.d.ts +0 -71
- package/dist/shapes.d.ts.map +0 -1
- package/dist/shapes.js +0 -340
- package/dist/shapes.js.map +0 -1
- package/dist/static-text.d.ts +0 -33
- package/dist/static-text.d.ts.map +0 -1
- package/dist/static-text.js +0 -105
- package/dist/static-text.js.map +0 -1
- package/dist/text-layout.d.ts +0 -66
- package/dist/text-layout.d.ts.map +0 -1
- package/dist/text-layout.js +0 -315
- package/dist/text-layout.js.map +0 -1
- package/dist/text.d.ts +0 -67
- package/dist/text.d.ts.map +0 -1
- package/dist/text.js +0 -383
- package/dist/text.js.map +0 -1
- package/dist/timeline.d.ts +0 -150
- package/dist/timeline.d.ts.map +0 -1
- package/dist/timeline.js +0 -266
- package/dist/timeline.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pointer.js","sourceRoot":"","sources":["../../src/render/pointer.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,uEAAuE;AACvE,qDAAqD;AACrD,OAAO,EAGL,SAAS,GAEV,MAAM,SAAS,CAAC;AAKj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,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;YACxB,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;YACzB,IAAI,MAAM,EAAE,KAAK,EAAE,CAAC;gBAClB,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC;YAC3B,CAAC;QACH,CAAC;QAED,IAAI,KAAK,EAAE,CAAC;YACV,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAC5B,KAAK,GAAG,CAAC,CAAC;QACZ,CAAC;QAED,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;QACxB,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC;QACtB,MAAM,EAAE,mBAAmB,EAAE,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;QACvD,MAAM,EAAE,mBAAmB,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC9C,KAAK,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;QACrC,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAC/B,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAC3B,KAAK,CAAC,GAAG,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;QACzC,KAAK,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QACjC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;QAC5B,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;QACrB,KAAK,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IAClD,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/render/pools.d.ts
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { RenderTexture } from "pixi.js";
|
|
2
|
-
/**
|
|
3
|
-
* The most Graphics a view keeps for the next content to take, of children
|
|
4
|
-
* taken off: a frame-by-frame timeline takes its children off and puts new
|
|
5
|
-
* ones on every frame, each made and destroyed with its Graphics.
|
|
6
|
-
*/
|
|
7
|
-
export declare const SPARE_GRAPHICS_MOST = 4096;
|
|
8
|
-
/**
|
|
9
|
-
* The most released nodes a view keeps, of all characters, for a new
|
|
10
|
-
* object of their character to take (render/spares.ts), the oldest going
|
|
11
|
-
* first. A crowd of 32 of one animated character releases some 340 a
|
|
12
|
-
* frame and takes most of them back only as its loop comes round, a second
|
|
13
|
-
* or two on: it keeps some 9,000. At 2,048 those went before they were
|
|
14
|
-
* taken, and a third of the nodes were made anew.
|
|
15
|
-
*/
|
|
16
|
-
export declare const SPARE_NODES_MOST = 16384;
|
|
17
|
-
/**
|
|
18
|
-
* How long, in milliseconds, what no instance uses is kept for one to come
|
|
19
|
-
* back to, as a loop does. By age, not count: a loop longer than a count
|
|
20
|
-
* would find each gone just before it came round to it; and by time, not
|
|
21
|
-
* renders, which a host may make many of between a SWF's frames.
|
|
22
|
-
*/
|
|
23
|
-
export declare const IDLE_MS = 5000;
|
|
24
|
-
/**
|
|
25
|
-
* How long lines' contexts no instance uses are kept, how many at most,
|
|
26
|
-
* and how many of their vertices, some 110 bytes each on the heap and 30
|
|
27
|
-
* on the GPU. Longer than IDLE_MS: animations come back to a stretch after
|
|
28
|
-
* seconds, a crowd's rarer ones (an attack, a fall) after tens of them,
|
|
29
|
-
* and kept 5 s, a third of a crowded room's new lines were ones it had
|
|
30
|
-
* made before. Not past Pixi's minute, after which it lets an unused
|
|
31
|
-
* context's geometry go, to be tessellated again anyway.
|
|
32
|
-
*/
|
|
33
|
-
export declare const LINES_IDLE_MS = 30000;
|
|
34
|
-
export declare const LINES_IDLE_MOST = 4096;
|
|
35
|
-
/**
|
|
36
|
-
* The vertices of idle lines kept to begin with, and at the least: enough
|
|
37
|
-
* for most content, which never grows it (IdleBudget). A crowded room in a
|
|
38
|
-
* busy SWF came back to 1.6 million within LINES_IDLE_MS; kept to this,
|
|
39
|
-
* it tessellated some 21 contexts a frame again, three quarters of all it
|
|
40
|
-
* allocated.
|
|
41
|
-
*/
|
|
42
|
-
export declare const LINES_IDLE_VERTICES = 500000;
|
|
43
|
-
/**
|
|
44
|
-
* The most the budget of idle lines' vertices grows to: two and a half
|
|
45
|
-
* times that room's, at most some 0.5 GB of heap and GPU between them,
|
|
46
|
-
* where content that comes back to more than this is better tessellated
|
|
47
|
-
* again than kept.
|
|
48
|
-
*/
|
|
49
|
-
export declare const LINES_IDLE_VERTICES_MOST = 4000000;
|
|
50
|
-
/** What a host tells of its memory: `navigator.deviceMemory` in GB, Chrome's `performance.memory` heap limit in bytes. */
|
|
51
|
-
export interface DeviceMemory {
|
|
52
|
-
deviceMemory?: number;
|
|
53
|
-
heapLimit?: number;
|
|
54
|
-
}
|
|
55
|
-
/** The host's memory as far as it tells it; nothing outside a browser that does. */
|
|
56
|
-
export declare function deviceMemory(): DeviceMemory;
|
|
57
|
-
/**
|
|
58
|
-
* The most the idle lines' budget may grow to on a device: a phone with a
|
|
59
|
-
* heap of half a GB would lose the tab long before LINES_IDLE_VERTICES_MOST.
|
|
60
|
-
* 0.5 million vertices for each GB of its memory, and an eighth of its
|
|
61
|
-
* heap's limit, the less of the two it tells; never under the floor, never
|
|
62
|
-
* over LINES_IDLE_VERTICES_MOST, which is also all where it tells neither.
|
|
63
|
-
*/
|
|
64
|
-
export declare function linesCeiling(device: DeviceMemory): number;
|
|
65
|
-
/**
|
|
66
|
-
* How much an idle pool keeps, grown as the pool turns out too small for
|
|
67
|
-
* what comes back to it, and shrunk back as nothing does, as ARC's ghosts
|
|
68
|
-
* size its lists. The keys of what the pool let go for room are kept a
|
|
69
|
-
* while, without what they named: one asked for again while age alone
|
|
70
|
-
* would still have kept it (`window` after it went idle) was let go only
|
|
71
|
-
* for want of room, which grows by its size. Not grown for a window, the
|
|
72
|
-
* budget's excess over `floor` halves each window, letting go of the
|
|
73
|
-
* oldest idle as it does: a pool that needed the room again soon grows
|
|
74
|
-
* back. Never past `ceiling`, nor under `floor`.
|
|
75
|
-
*/
|
|
76
|
-
export declare class IdleBudget {
|
|
77
|
-
readonly floor: number;
|
|
78
|
-
readonly ceiling: number;
|
|
79
|
-
readonly window: number;
|
|
80
|
-
/** The most keys remembered, the first let go going first. */
|
|
81
|
-
readonly ghostsMost: number;
|
|
82
|
-
/** What the pool may keep now, in its own units (vertices, say). */
|
|
83
|
-
size: number;
|
|
84
|
-
/** What was let go for room, by key, the first let go first: when it went idle, and its size. */
|
|
85
|
-
private readonly ghosts;
|
|
86
|
-
private grewAt;
|
|
87
|
-
private tickedAt;
|
|
88
|
-
constructor(floor: number, ceiling: number, window: number,
|
|
89
|
-
/** The most keys remembered, the first let go going first. */
|
|
90
|
-
ghostsMost: number);
|
|
91
|
-
/** How many keys are remembered. */
|
|
92
|
-
get remembered(): number;
|
|
93
|
-
/**
|
|
94
|
-
* Back to the floor, as content unloads: what it left idle goes on the
|
|
95
|
-
* next trim, and what is still used grows it again through its ghosts.
|
|
96
|
-
*/
|
|
97
|
-
reset(): void;
|
|
98
|
-
/** `key`, idle since `since` and `size` large, let go for room. */
|
|
99
|
-
evicted(key: string, since: number, size: number): void;
|
|
100
|
-
/** `key` made anew at `now`: if it went only for room, the budget was short by its size. */
|
|
101
|
-
missed(key: string, now: number): void;
|
|
102
|
-
/** Time passed to `now`: the keys age alone would have let go are forgotten, and the budget shrinks if it may. */
|
|
103
|
-
tick(now: number): void;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* The most objects off the list kept whole: enough for a pool or a panel,
|
|
107
|
-
* while a timeline that makes its children anew on every frame lets its
|
|
108
|
-
* last frames' go, whose Graphics in thousands made long collector pauses.
|
|
109
|
-
*/
|
|
110
|
-
export declare const PARKED_MOST = 1024;
|
|
111
|
-
/** First-time detached groups get one chance to return without letting churn fill the batch cache. */
|
|
112
|
-
export declare const PARKED_FIRST_GROUPS_MOST = 64;
|
|
113
|
-
export declare function drawTarget(width: number, height: number): RenderTexture;
|
|
114
|
-
/** A draw's target done with: kept for the next draw of its size, the oldest kept going past the most. */
|
|
115
|
-
export declare function releaseDrawTarget(texture: RenderTexture): void;
|
|
116
|
-
/**
|
|
117
|
-
* Pixi's pool of render data destroyed contexts gave back, emptied once
|
|
118
|
-
* past its most, and its batch elements of Graphics cut back to theirs;
|
|
119
|
-
* what is in use stays. And the draws' targets kept idle too long.
|
|
120
|
-
*/
|
|
121
|
-
export declare function trimPools(): void;
|
|
122
|
-
//# sourceMappingURL=pools.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pools.d.ts","sourceRoot":"","sources":["../../src/render/pools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyD,aAAa,EAAE,MAAM,SAAS,CAAC;AAE/F;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,QAAS,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,OAAO,OAAO,CAAC;AAC5B;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,QAAS,CAAC;AACpC,eAAO,MAAM,eAAe,OAAO,CAAC;AACpC;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,SAAU,CAAC;AAC3C;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,UAAY,CAAC;AAOlD,0HAA0H;AAC1H,MAAM,WAAW,YAAY;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,oFAAoF;AACpF,wBAAgB,YAAY,IAAI,YAAY,CAW3C;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAWzD;AAED;;;;;;;;;;GAUG;AACH,qBAAa,UAAU;IASnB,QAAQ,CAAC,KAAK,EAAE,MAAM;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,8DAA8D;IAC9D,QAAQ,CAAC,UAAU,EAAE,MAAM;IAZ7B,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,iGAAiG;IACjG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsD;IAC7E,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,QAAQ,CAA4B;IAE5C,YACW,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM;IACvB,8DAA8D;IACrD,UAAU,EAAE,MAAM,EAG5B;IAED,oCAAoC;IACpC,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED;;;OAGG;IACH,KAAK,IAAI,IAAI,CAEZ;IAED,mEAAmE;IACnE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAMtD;IAED,4FAA4F;IAC5F,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAWrC;IAED,kHAAkH;IAClH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAgBtB;CACF;AACD;;;;GAIG;AACH,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,sGAAsG;AACtG,eAAO,MAAM,wBAAwB,KAAK,CAAC;AA+B3C,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAUvE;AAED,0GAA0G;AAC1G,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAY9D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAYhC"}
|
package/dist/render/pools.js
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
// What the view and Pixi keep for reuse, and how much of it: Pixi's own
|
|
2
|
-
// pools never shrink, so they are cut back as a view prepares.
|
|
3
|
-
import { BatchableGraphics, BigPool, GraphicsContextRenderData, RenderTexture } from "pixi.js";
|
|
4
|
-
/**
|
|
5
|
-
* The most Graphics a view keeps for the next content to take, of children
|
|
6
|
-
* taken off: a frame-by-frame timeline takes its children off and puts new
|
|
7
|
-
* ones on every frame, each made and destroyed with its Graphics.
|
|
8
|
-
*/
|
|
9
|
-
export const SPARE_GRAPHICS_MOST = 4096;
|
|
10
|
-
/**
|
|
11
|
-
* The most released nodes a view keeps, of all characters, for a new
|
|
12
|
-
* object of their character to take (render/spares.ts), the oldest going
|
|
13
|
-
* first. A crowd of 32 of one animated character releases some 340 a
|
|
14
|
-
* frame and takes most of them back only as its loop comes round, a second
|
|
15
|
-
* or two on: it keeps some 9,000. At 2,048 those went before they were
|
|
16
|
-
* taken, and a third of the nodes were made anew.
|
|
17
|
-
*/
|
|
18
|
-
export const SPARE_NODES_MOST = 16_384;
|
|
19
|
-
/**
|
|
20
|
-
* How long, in milliseconds, what no instance uses is kept for one to come
|
|
21
|
-
* back to, as a loop does. By age, not count: a loop longer than a count
|
|
22
|
-
* would find each gone just before it came round to it; and by time, not
|
|
23
|
-
* renders, which a host may make many of between a SWF's frames.
|
|
24
|
-
*/
|
|
25
|
-
export const IDLE_MS = 5000;
|
|
26
|
-
/**
|
|
27
|
-
* How long lines' contexts no instance uses are kept, how many at most,
|
|
28
|
-
* and how many of their vertices, some 110 bytes each on the heap and 30
|
|
29
|
-
* on the GPU. Longer than IDLE_MS: animations come back to a stretch after
|
|
30
|
-
* seconds, a crowd's rarer ones (an attack, a fall) after tens of them,
|
|
31
|
-
* and kept 5 s, a third of a crowded room's new lines were ones it had
|
|
32
|
-
* made before. Not past Pixi's minute, after which it lets an unused
|
|
33
|
-
* context's geometry go, to be tessellated again anyway.
|
|
34
|
-
*/
|
|
35
|
-
export const LINES_IDLE_MS = 30_000;
|
|
36
|
-
export const LINES_IDLE_MOST = 4096;
|
|
37
|
-
/**
|
|
38
|
-
* The vertices of idle lines kept to begin with, and at the least: enough
|
|
39
|
-
* for most content, which never grows it (IdleBudget). A crowded room in a
|
|
40
|
-
* busy SWF came back to 1.6 million within LINES_IDLE_MS; kept to this,
|
|
41
|
-
* it tessellated some 21 contexts a frame again, three quarters of all it
|
|
42
|
-
* allocated.
|
|
43
|
-
*/
|
|
44
|
-
export const LINES_IDLE_VERTICES = 500_000;
|
|
45
|
-
/**
|
|
46
|
-
* The most the budget of idle lines' vertices grows to: two and a half
|
|
47
|
-
* times that room's, at most some 0.5 GB of heap and GPU between them,
|
|
48
|
-
* where content that comes back to more than this is better tessellated
|
|
49
|
-
* again than kept.
|
|
50
|
-
*/
|
|
51
|
-
export const LINES_IDLE_VERTICES_MOST = 4_000_000;
|
|
52
|
-
/** The vertices of idle lines allowed for each GB of the device's memory. */
|
|
53
|
-
const LINES_IDLE_VERTICES_PER_GB = 500_000;
|
|
54
|
-
/** The share of the JavaScript heap's limit idle lines may take, at some 110 bytes a vertex. */
|
|
55
|
-
const LINES_IDLE_HEAP_SHARE = 1 / 8;
|
|
56
|
-
const BYTES_PER_LINE_VERTEX = 110;
|
|
57
|
-
/** The host's memory as far as it tells it; nothing outside a browser that does. */
|
|
58
|
-
export function deviceMemory() {
|
|
59
|
-
const host = globalThis;
|
|
60
|
-
const gb = host.navigator?.deviceMemory;
|
|
61
|
-
const limit = host.performance?.memory?.jsHeapSizeLimit;
|
|
62
|
-
return {
|
|
63
|
-
deviceMemory: typeof gb === "number" && gb > 0 ? gb : undefined,
|
|
64
|
-
heapLimit: typeof limit === "number" && limit > 0 ? limit : undefined,
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* The most the idle lines' budget may grow to on a device: a phone with a
|
|
69
|
-
* heap of half a GB would lose the tab long before LINES_IDLE_VERTICES_MOST.
|
|
70
|
-
* 0.5 million vertices for each GB of its memory, and an eighth of its
|
|
71
|
-
* heap's limit, the less of the two it tells; never under the floor, never
|
|
72
|
-
* over LINES_IDLE_VERTICES_MOST, which is also all where it tells neither.
|
|
73
|
-
*/
|
|
74
|
-
export function linesCeiling(device) {
|
|
75
|
-
let most = LINES_IDLE_VERTICES_MOST;
|
|
76
|
-
if (device.deviceMemory !== undefined) {
|
|
77
|
-
most = Math.min(most, LINES_IDLE_VERTICES_PER_GB * device.deviceMemory);
|
|
78
|
-
}
|
|
79
|
-
if (device.heapLimit !== undefined) {
|
|
80
|
-
most = Math.min(most, (device.heapLimit * LINES_IDLE_HEAP_SHARE) / BYTES_PER_LINE_VERTEX);
|
|
81
|
-
}
|
|
82
|
-
return Math.max(LINES_IDLE_VERTICES, Math.floor(most));
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* How much an idle pool keeps, grown as the pool turns out too small for
|
|
86
|
-
* what comes back to it, and shrunk back as nothing does, as ARC's ghosts
|
|
87
|
-
* size its lists. The keys of what the pool let go for room are kept a
|
|
88
|
-
* while, without what they named: one asked for again while age alone
|
|
89
|
-
* would still have kept it (`window` after it went idle) was let go only
|
|
90
|
-
* for want of room, which grows by its size. Not grown for a window, the
|
|
91
|
-
* budget's excess over `floor` halves each window, letting go of the
|
|
92
|
-
* oldest idle as it does: a pool that needed the room again soon grows
|
|
93
|
-
* back. Never past `ceiling`, nor under `floor`.
|
|
94
|
-
*/
|
|
95
|
-
export class IdleBudget {
|
|
96
|
-
floor;
|
|
97
|
-
ceiling;
|
|
98
|
-
window;
|
|
99
|
-
ghostsMost;
|
|
100
|
-
/** What the pool may keep now, in its own units (vertices, say). */
|
|
101
|
-
size;
|
|
102
|
-
/** What was let go for room, by key, the first let go first: when it went idle, and its size. */
|
|
103
|
-
ghosts = new Map();
|
|
104
|
-
grewAt = Number.NEGATIVE_INFINITY;
|
|
105
|
-
tickedAt = Number.NEGATIVE_INFINITY;
|
|
106
|
-
constructor(floor, ceiling, window,
|
|
107
|
-
/** The most keys remembered, the first let go going first. */
|
|
108
|
-
ghostsMost) {
|
|
109
|
-
this.floor = floor;
|
|
110
|
-
this.ceiling = ceiling;
|
|
111
|
-
this.window = window;
|
|
112
|
-
this.ghostsMost = ghostsMost;
|
|
113
|
-
this.size = floor;
|
|
114
|
-
}
|
|
115
|
-
/** How many keys are remembered. */
|
|
116
|
-
get remembered() {
|
|
117
|
-
return this.ghosts.size;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Back to the floor, as content unloads: what it left idle goes on the
|
|
121
|
-
* next trim, and what is still used grows it again through its ghosts.
|
|
122
|
-
*/
|
|
123
|
-
reset() {
|
|
124
|
-
this.size = this.floor;
|
|
125
|
-
}
|
|
126
|
-
/** `key`, idle since `since` and `size` large, let go for room. */
|
|
127
|
-
evicted(key, since, size) {
|
|
128
|
-
this.ghosts.delete(key);
|
|
129
|
-
this.ghosts.set(key, { since, size });
|
|
130
|
-
if (this.ghosts.size > this.ghostsMost) {
|
|
131
|
-
this.ghosts.delete(this.ghosts.keys().next().value);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
/** `key` made anew at `now`: if it went only for room, the budget was short by its size. */
|
|
135
|
-
missed(key, now) {
|
|
136
|
-
const ghost = this.ghosts.get(key);
|
|
137
|
-
if (!ghost) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
this.ghosts.delete(key);
|
|
141
|
-
if (now - ghost.since < this.window) {
|
|
142
|
-
this.size = Math.min(this.ceiling, this.size + ghost.size);
|
|
143
|
-
this.grewAt = now;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
/** Time passed to `now`: the keys age alone would have let go are forgotten, and the budget shrinks if it may. */
|
|
147
|
-
tick(now) {
|
|
148
|
-
// In the order let go, which is near enough that of going idle: one young enough stops it.
|
|
149
|
-
for (const [key, ghost] of this.ghosts) {
|
|
150
|
-
if (now - ghost.since < this.window) {
|
|
151
|
-
break;
|
|
152
|
-
}
|
|
153
|
-
this.ghosts.delete(key);
|
|
154
|
-
}
|
|
155
|
-
const since = Math.max(this.tickedAt, this.grewAt + this.window);
|
|
156
|
-
this.tickedAt = now;
|
|
157
|
-
if (now > since && this.size > this.floor) {
|
|
158
|
-
const excess = (this.size - this.floor) * 2 ** (-(now - since) / this.window);
|
|
159
|
-
this.size = excess < 1 ? this.floor : this.floor + excess;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* The most objects off the list kept whole: enough for a pool or a panel,
|
|
165
|
-
* while a timeline that makes its children anew on every frame lets its
|
|
166
|
-
* last frames' go, whose Graphics in thousands made long collector pauses.
|
|
167
|
-
*/
|
|
168
|
-
export const PARKED_MOST = 1024;
|
|
169
|
-
/** First-time detached groups get one chance to return without letting churn fill the batch cache. */
|
|
170
|
-
export const PARKED_FIRST_GROUPS_MOST = 64;
|
|
171
|
-
/**
|
|
172
|
-
* The most render data Pixi may keep pooled from the contexts that went.
|
|
173
|
-
* Pixi pools each unbatched context's render data, a batcher with its
|
|
174
|
-
* buffers at their largest, and never shrinks the pool: lines drawn again
|
|
175
|
-
* for a window resized, hundreds a frame, left 100 MB of buffers behind.
|
|
176
|
-
* Pixi reads a context's render data afresh on each draw, so a pooled one
|
|
177
|
-
* is no one's. Its pooled batch elements are left: their geometry is
|
|
178
|
-
* emptied as they are pooled, and a batch may still list them.
|
|
179
|
-
*/
|
|
180
|
-
const POOLED_RENDER_DATA_MOST = 128;
|
|
181
|
-
/**
|
|
182
|
-
* The most batch elements of Graphics Pixi may keep pooled. Pixi pools one
|
|
183
|
-
* for each batch each context makes and never shrinks the pool: a crowded
|
|
184
|
-
* room left 165,000 behind it. They are let go of rather than destroyed,
|
|
185
|
-
* as a batch may still list one: that one lives on while it does.
|
|
186
|
-
*/
|
|
187
|
-
const POOLED_BATCHABLES_MOST = 4096;
|
|
188
|
-
/**
|
|
189
|
-
* The render textures draws render through, oldest first, kept for the
|
|
190
|
-
* next draw of the same size: a bitmap drawn again on every move of the
|
|
191
|
-
* pointer, as a colour picker's is, then makes and frees no texture each
|
|
192
|
-
* time. At most DRAW_TARGETS_MOST and DRAW_TARGET_TEXELS, the oldest going
|
|
193
|
-
* first, and none kept idle past IDLE_MS: a draw of the whole stage at four
|
|
194
|
-
* samples a pixel is tens of megabytes no other draw may want.
|
|
195
|
-
*/
|
|
196
|
-
const DRAW_TARGETS_MOST = 8;
|
|
197
|
-
const DRAW_TARGET_TEXELS = 4 * 1024 * 1024;
|
|
198
|
-
const drawTargets = [];
|
|
199
|
-
export function drawTarget(width, height) {
|
|
200
|
-
for (let i = drawTargets.length - 1; i >= 0; i--) {
|
|
201
|
-
const { texture } = drawTargets[i];
|
|
202
|
-
if (texture.width === width && texture.height === height) {
|
|
203
|
-
drawTargets.splice(i, 1);
|
|
204
|
-
return texture;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
return RenderTexture.create({ width, height });
|
|
208
|
-
}
|
|
209
|
-
/** A draw's target done with: kept for the next draw of its size, the oldest kept going past the most. */
|
|
210
|
-
export function releaseDrawTarget(texture) {
|
|
211
|
-
drawTargets.push({ texture, since: performance.now() });
|
|
212
|
-
let texels = 0;
|
|
213
|
-
for (const kept of drawTargets) {
|
|
214
|
-
texels += kept.texture.width * kept.texture.height;
|
|
215
|
-
}
|
|
216
|
-
while (drawTargets.length > DRAW_TARGETS_MOST || texels > DRAW_TARGET_TEXELS) {
|
|
217
|
-
const oldest = drawTargets.shift();
|
|
218
|
-
texels -= oldest.texture.width * oldest.texture.height;
|
|
219
|
-
oldest.texture.destroy(true);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Pixi's pool of render data destroyed contexts gave back, emptied once
|
|
224
|
-
* past its most, and its batch elements of Graphics cut back to theirs;
|
|
225
|
-
* what is in use stays. And the draws' targets kept idle too long.
|
|
226
|
-
*/
|
|
227
|
-
export function trimPools() {
|
|
228
|
-
const data = BigPool.getPool(GraphicsContextRenderData);
|
|
229
|
-
if (data.totalFree > POOLED_RENDER_DATA_MOST) {
|
|
230
|
-
data.clear();
|
|
231
|
-
}
|
|
232
|
-
BigPool.getPool(BatchableGraphics).trim(POOLED_BATCHABLES_MOST);
|
|
233
|
-
const now = performance.now();
|
|
234
|
-
while (drawTargets.length > 0 && now - drawTargets[0].since > IDLE_MS) {
|
|
235
|
-
drawTargets.shift()?.texture.destroy(true);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
//# sourceMappingURL=pools.js.map
|
package/dist/render/pools.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pools.js","sourceRoot":"","sources":["../../src/render/pools.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,+DAA+D;AAC/D,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE/F;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAC;AAC5B;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC;AACpC,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AACpC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAC3C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAClD,6EAA6E;AAC7E,MAAM,0BAA0B,GAAG,OAAO,CAAC;AAC3C,gGAAgG;AAChG,MAAM,qBAAqB,GAAG,CAAC,GAAG,CAAC,CAAC;AACpC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAQlC,oFAAoF;AACpF,MAAM,UAAU,YAAY;IAC1B,MAAM,IAAI,GAAG,UAGZ,CAAC;IACF,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC;IACxC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,CAAC;IACxD,OAAO;QACL,YAAY,EAAE,O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AAG,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACxD,IAAI,IAAI,CAAC,SAAS,GAAG,uBAAuB,EAAE,CAAC;QAC7C,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IAEhE,MAAM,GAAG,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IAC9B,OAAO,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,OAAO,EAAE,CAAC;QACtE,WAAW,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC"}
|
package/dist/render/resolve.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/render/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgD,aAAa,EAAE,MAAM,SAAS,CAAC;AAI3F,uFAAuF;AACvF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CA6F7D"}
|
package/dist/render/resolve.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
const installed = new WeakSet();
|
|
2
|
-
/** Resolve a blend's backdrop where it is read, and the stage once on presentation. */
|
|
3
|
-
export function boundedResolves(renderer) {
|
|
4
|
-
if (installed.has(renderer)) {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
installed.add(renderer);
|
|
8
|
-
const filter = renderer.filter;
|
|
9
|
-
const adaptor = renderer.renderTarget.adaptor;
|
|
10
|
-
const setup = filter._setupFilterTextures;
|
|
11
|
-
const apply = filter._setupBindGroupsAndRender;
|
|
12
|
-
const copy = adaptor.copyToTexture;
|
|
13
|
-
const finish = adaptor.finishRenderPass;
|
|
14
|
-
let preparing = 0;
|
|
15
|
-
let applying = 0;
|
|
16
|
-
let copying = null;
|
|
17
|
-
filter._setupFilterTextures = function (...args) {
|
|
18
|
-
preparing++;
|
|
19
|
-
try {
|
|
20
|
-
setup.apply(this, args);
|
|
21
|
-
}
|
|
22
|
-
finally {
|
|
23
|
-
preparing--;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
filter._setupBindGroupsAndRender = function (...args) {
|
|
27
|
-
applying++;
|
|
28
|
-
try {
|
|
29
|
-
apply.apply(this, args);
|
|
30
|
-
}
|
|
31
|
-
finally {
|
|
32
|
-
applying--;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
adaptor.copyToTexture = function (source, destination, origin, size, to) {
|
|
36
|
-
const previous = copying;
|
|
37
|
-
copying = { source, origin, size };
|
|
38
|
-
try {
|
|
39
|
-
return copy.call(this, source, destination, origin, size, to);
|
|
40
|
-
}
|
|
41
|
-
finally {
|
|
42
|
-
copying = previous;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
adaptor.finishRenderPass = function (target) {
|
|
46
|
-
if (!target) {
|
|
47
|
-
return finish.call(this, target);
|
|
48
|
-
}
|
|
49
|
-
const gpu = renderer.renderTarget.getGpuRenderTarget(target);
|
|
50
|
-
if (!gpu.msaa || target.colorAttachments.length === 0) {
|
|
51
|
-
return finish.call(this, target);
|
|
52
|
-
}
|
|
53
|
-
// The copy has already been clipped by render/blend.ts. Keep the resolve at
|
|
54
|
-
// the source coordinates: copyTexSubImage2D reads that same rectangle.
|
|
55
|
-
if (copying?.source === target) {
|
|
56
|
-
const { x, y } = copying.origin;
|
|
57
|
-
const { width, height } = copying.size;
|
|
58
|
-
const gl = renderer.gl;
|
|
59
|
-
this.bindFramebuffer(gpu.resolveTargetFramebuffer);
|
|
60
|
-
gl.bindFramebuffer(gl.READ_FRAMEBUFFER, gpu.framebuffer);
|
|
61
|
-
gl.blitFramebuffer(x, y, x + width, y + height, x, y, x + width, y + height, gl.COLOR_BUFFER_BIT, gl.NEAREST);
|
|
62
|
-
this.bindFramebuffer(gpu.framebuffer);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
// Setup resolves before copying the backdrop, which resolves it again.
|
|
66
|
-
// The main back buffer is read through those copies until presentation.
|
|
67
|
-
// Intermediate filter outputs still resolve immediately for sampling.
|
|
68
|
-
const back = renderer.backBuffer
|
|
69
|
-
?._backBufferTexture;
|
|
70
|
-
if (preparing || (applying && back && target.colorTexture === back.source)) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
finish.call(this, target);
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=resolve.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/render/resolve.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,IAAI,OAAO,EAAiB,CAAC;AAE/C,uFAAuF;AACvF,MAAM,UAAU,eAAe,CAAC,QAAuB;IACrD,IAAI,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,OAAO;IACT,CAAC;IAED,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxB,MAAM,MAAM,GAAG,QAAQ,CAAC,MAGvB,CAAC;IACF,MAAM,OAAO,GAAG,QAAQ,CAAC,YAAY,CAAC,OAAgC,CAAC;IACvE,MAAM,KAAK,GAAG,MAAM,CAAC,oBAAoB,CAAC;IAC1C,MAAM,KAAK,GAAG,MAAM,CAAC,yBAAyB,CAAC;IAC/C,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC;IACnC,MAAM,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IACxC,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,OAAO,GAIA,IAAI,CAAC;IAEhB,MAAM,CAAC,oBAAoB,GAAG,UAAU,GAA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C,CAAC;QAED,4EAA4E;QAC5E,uEAAuE;QACvE,IAAI,OAAO,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;YAC/B,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;YAChC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;YACvC,MAAM,EAAE,GAAG,QAAQ,CAAC,EAAE,CAAC;YACvB,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;YACnD,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC,gBAAgB,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;YACzD,EAAE,CAAC,eAAe,CAChB,CAAC,EACD,CAAC,EACD,CAAC,GAAG,KAAK,EACT,CAAC,GAAG,MAAM,EACV,CAAC,EACD,CAAC,EACD,CAAC,GAAG,KAAK,EACT,CAAC,GAAG,MAAM,EACV,EAAE,CAAC,gBAAgB,EACnB,EAAE,CAAC,OAAO,CACX,CAAC;YACF,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YACtC,OAAO;QACT,CAAC;QAED,uEAAuE;QACvE,wEAAwE;QACxE,sEAAsE;QACtE,MAAM,IAAI,GAAI,QAAQ,CAAC,UAA0D;YAC/E,EAAE,kBAAkB,CAAC;QACvB,IAAI,SAAS,IAAI,CAAC,QAAQ,IAAI,IAAI,IAAI,MAAM,CAAC,YAAY,KAAK,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3E,OAAO;QACT,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5B,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/render/saffron.d.ts
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import type { ColorTransform, Glyph } from "@swf2es/format";
|
|
2
|
-
import { Geometry, Mesh, type Renderer, Shader, UniformGroup } from "pixi.js";
|
|
3
|
-
import type { CsmTable } from "../text/csm.js";
|
|
4
|
-
/** The most segments kept: 16 bytes each, 16 MB. Past it the store starts again. */
|
|
5
|
-
export declare const MOST: number;
|
|
6
|
-
/**
|
|
7
|
-
* The most segments a glyph may have: every pixel of its quad goes through
|
|
8
|
-
* them all, so a glyph past this is drawn as normal text is.
|
|
9
|
-
*/
|
|
10
|
-
export declare const GLYPH_MOST = 2048;
|
|
11
|
-
/**
|
|
12
|
-
* The most a field may ask of the shader, its glyphs' segments times the
|
|
13
|
-
* pixels of their quads: past it, the field is drawn as normal text, so
|
|
14
|
-
* that no SWF has the GPU go through millions of segments a pixel.
|
|
15
|
-
*/
|
|
16
|
-
export declare const FIELD_BUDGET: number;
|
|
17
|
-
/** A glyph's run of segments and its outline's bounds, in the font's units over 20. */
|
|
18
|
-
export interface Outline {
|
|
19
|
-
start: number;
|
|
20
|
-
count: number;
|
|
21
|
-
xMin: number;
|
|
22
|
-
yMin: number;
|
|
23
|
-
xMax: number;
|
|
24
|
-
yMax: number;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Upload what `renderer` has not of the store: the rows added since it last
|
|
28
|
-
* did, or the whole after the store started again or grew. A view calls it
|
|
29
|
-
* after it syncs, before it draws.
|
|
30
|
-
*/
|
|
31
|
-
export declare function uploadSegments(renderer: Renderer): void;
|
|
32
|
-
/**
|
|
33
|
-
* Start the store again: every outline is cut again on its next draw, and
|
|
34
|
-
* every text drawn from the store hidden till it is drawn again.
|
|
35
|
-
*/
|
|
36
|
-
export declare function resetSegments(): void;
|
|
37
|
-
/** How many segments the store holds, for tests. */
|
|
38
|
-
export declare function segmentsUsed(): number;
|
|
39
|
-
/**
|
|
40
|
-
* A glyph's outline cut into segments, its curves into chords that stray
|
|
41
|
-
* from them by `tolerance` at most, as x0 y0 x1 y1 each.
|
|
42
|
-
*/
|
|
43
|
-
export declare function chordsOf(glyph: Glyph, tolerance: number): number[];
|
|
44
|
-
/**
|
|
45
|
-
* What every advanced text a view draws shares: Flash's pixels to a unit
|
|
46
|
-
* of its world, and whether its renderer draws them at all (WebGL 2, as
|
|
47
|
-
* the shader is GLSL ES 3.0; elsewhere text is drawn as normal text).
|
|
48
|
-
*/
|
|
49
|
-
export declare class SaffronView {
|
|
50
|
-
readonly uniforms: UniformGroup<{
|
|
51
|
-
uView: {
|
|
52
|
-
value: Float32Array<ArrayBuffer>;
|
|
53
|
-
type: "vec4<f32>";
|
|
54
|
-
};
|
|
55
|
-
}>;
|
|
56
|
-
readonly enabled: boolean;
|
|
57
|
-
constructor(renderer: Renderer, keeps: boolean);
|
|
58
|
-
get unit(): number;
|
|
59
|
-
set unit(unit: number);
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* The glyphs of a text drawn with advanced anti-aliasing: each glyph first
|
|
63
|
-
* reserved (reserve), which cuts its outline and counts what it asks of
|
|
64
|
-
* the shader, then, if all fit, added (add) and made into one mesh
|
|
65
|
-
* (done). One builds at a time: they share the vertices they write.
|
|
66
|
-
*/
|
|
67
|
-
export declare class SaffronBuilder {
|
|
68
|
-
private readonly view;
|
|
69
|
-
/** 0 none, 1 pixel, 2 subpixel. */
|
|
70
|
-
private readonly grid;
|
|
71
|
-
/** Flash's pixels to a pixel of the text, as it is placed now, for the quads' reach and cost. */
|
|
72
|
-
private readonly scale;
|
|
73
|
-
/** Draws the text again, when the store it is drawn from starts again. */
|
|
74
|
-
private readonly again;
|
|
75
|
-
private glyphs;
|
|
76
|
-
private readonly tables;
|
|
77
|
-
private readonly starts;
|
|
78
|
-
private entries;
|
|
79
|
-
private cost;
|
|
80
|
-
private readonly thickness;
|
|
81
|
-
private readonly sharpness;
|
|
82
|
-
/** The epoch the reserved glyphs' outlines are of. */
|
|
83
|
-
private reserved;
|
|
84
|
-
constructor(view: SaffronView,
|
|
85
|
-
/** 0 none, 1 pixel, 2 subpixel. */
|
|
86
|
-
grid: number, thickness: number, sharpness: number,
|
|
87
|
-
/** Flash's pixels to a pixel of the text, as it is placed now, for the quads' reach and cost. */
|
|
88
|
-
scale: number,
|
|
89
|
-
/** Draws the text again, when the store it is drawn from starts again. */
|
|
90
|
-
again: () => void);
|
|
91
|
-
/** Flash's pixels the shader may reach past the outline, at `size` pixels to the em, by `tables`. */
|
|
92
|
-
private reach;
|
|
93
|
-
/**
|
|
94
|
-
* Cut a glyph of a font of `em` units and count it at `size` pixels to the
|
|
95
|
-
* em: false where the text cannot be drawn so, a glyph past GLYPH_MOST
|
|
96
|
-
* or the field past FIELD_BUDGET, for the whole text to be drawn as
|
|
97
|
-
* normal text. The store may start again here: reserving every glyph
|
|
98
|
-
* then goes again (reserveAll).
|
|
99
|
-
*/
|
|
100
|
-
reserve(glyph: Glyph, em: number, size: number, tables: readonly [CsmTable, CsmTable]): boolean;
|
|
101
|
-
/**
|
|
102
|
-
* Whether every glyph reserved since restart is still in the store as it
|
|
103
|
-
* was: false where the store started again while they were reserved.
|
|
104
|
-
*/
|
|
105
|
-
intact(): boolean;
|
|
106
|
-
/** Reserve afresh, the store's epoch now. */
|
|
107
|
-
restart(): void;
|
|
108
|
-
/**
|
|
109
|
-
* Add a reserved glyph, its pen at (x, y) in the text's pixels, `size`
|
|
110
|
-
* pixels to the em, in 0xRRGGBB and `alpha`, by the light or the dark of
|
|
111
|
-
* `tables` as its colour is drawn: false where the tables' room is full,
|
|
112
|
-
* which leaves the text to be drawn as normal text.
|
|
113
|
-
*/
|
|
114
|
-
add(glyph: Glyph, em: number, x: number, y: number, size: number, color: number, alpha: number, tables: readonly [CsmTable, CsmTable]): boolean;
|
|
115
|
-
/** A table's place in the uniforms, its first entry plus 64 times its entries, added where new; -1 past their room. */
|
|
116
|
-
code(table: CsmTable): number;
|
|
117
|
-
/** The mesh of the glyphs added, null for none. */
|
|
118
|
-
done(): SaffronText | null;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* A text's glyphs drawn with advanced anti-aliasing: a mesh of their
|
|
122
|
-
* quads under its own shader, one draw. It destroys its geometry and its
|
|
123
|
-
* shader with itself, and leaves the segments' texture, which every one
|
|
124
|
-
* shares.
|
|
125
|
-
*/
|
|
126
|
-
export declare class SaffronText extends Mesh<Geometry, Shader> {
|
|
127
|
-
private readonly uniforms;
|
|
128
|
-
private flash;
|
|
129
|
-
constructor(geometry: Geometry, view: SaffronView, mode: Float32Array, table: Float32Array);
|
|
130
|
-
/** The Flash colour transform it draws under, in place of Pixi's colour (render/color.ts). */
|
|
131
|
-
get flashColor(): ColorTransform | null;
|
|
132
|
-
set flashColor(ct: ColorTransform | null);
|
|
133
|
-
destroy(): void;
|
|
134
|
-
}
|
|
135
|
-
//# sourceMappingURL=saffron.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"saffron.d.ts","sourceRoot":"","sources":["../../src/render/saffron.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAIL,QAAQ,EAER,IAAI,EACJ,KAAK,QAAQ,EAEb,MAAM,EACN,YAAY,EAEb,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AA4L/C,oFAAoF;AACpF,eAAO,MAAM,IAAI,QAAa,CAAC;AAC/B;;;GAGG;AACH,eAAO,MAAM,UAAU,OAAO,CAAC;AAC/B;;;;GAIG;AACH,eAAO,MAAM,YAAY,QAAU,CAAC;AAiBpC,uFAAuF;AACvF,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAyBD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAyBvD;AAED;;;GAGG;AACH,wBAAg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