@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
package/dist/render/triangles.js
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { GlProgram, Mesh, MeshGeometry, Shader, UniformGroup } from "pixi.js";
|
|
2
|
-
const vertex = `#version 300 es
|
|
3
|
-
in vec2 aPosition;
|
|
4
|
-
in vec3 aUVT;
|
|
5
|
-
out vec3 vUVT;
|
|
6
|
-
out vec4 vColor;
|
|
7
|
-
flat out float vDown;
|
|
8
|
-
uniform mat3 uProjectionMatrix;
|
|
9
|
-
uniform mat3 uWorldTransformMatrix;
|
|
10
|
-
uniform vec4 uWorldColorAlpha;
|
|
11
|
-
uniform mat3 uTransformMatrix;
|
|
12
|
-
uniform vec4 uColor;
|
|
13
|
-
|
|
14
|
-
void main(void) {
|
|
15
|
-
mat3 mvp = uProjectionMatrix * uWorldTransformMatrix * uTransformMatrix;
|
|
16
|
-
gl_Position = vec4((mvp * vec3(aPosition, 1.0)).xy, 0.0, 1.0);
|
|
17
|
-
vUVT = vec3(aUVT.xy * aUVT.z, aUVT.z);
|
|
18
|
-
vColor = uColor * uWorldColorAlpha;
|
|
19
|
-
// A texture's rows go down the stage as the window's y goes up; the screen's, as it goes down.
|
|
20
|
-
vDown = uProjectionMatrix[1][1] > 0.0 ? 1.0 : 0.0;
|
|
21
|
-
}
|
|
22
|
-
`;
|
|
23
|
-
// uMode: whether the fill repeats, whether it is smoothed, the target's pixels a side of one of
|
|
24
|
-
// Flash's, and whether a Flash colour transform (uMul, uAdd) replaces Pixi's colour.
|
|
25
|
-
const fragment = `#version 300 es
|
|
26
|
-
precision highp float;
|
|
27
|
-
in vec3 vUVT;
|
|
28
|
-
in vec4 vColor;
|
|
29
|
-
flat in float vDown;
|
|
30
|
-
out vec4 finalColor;
|
|
31
|
-
uniform sampler2D uTexture;
|
|
32
|
-
uniform vec2 uSize;
|
|
33
|
-
uniform vec4 uMode;
|
|
34
|
-
uniform vec4 uMul;
|
|
35
|
-
uniform vec4 uAdd;
|
|
36
|
-
|
|
37
|
-
vec4 texel(ivec2 at) {
|
|
38
|
-
return texelFetch(uTexture, at, 0);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
void main(void) {
|
|
42
|
-
float pixel = uMode.z;
|
|
43
|
-
vec2 f = gl_FragCoord.xy;
|
|
44
|
-
vec2 corner = vec2(floor(f.x / pixel), vDown > 0.5 ? floor(f.y / pixel) : ceil(f.y / pixel)) * pixel;
|
|
45
|
-
vec3 uvt = vUVT + dFdx(vUVT) * (corner.x - f.x) + dFdy(vUVT) * (corner.y - f.y);
|
|
46
|
-
vec2 uv = uvt.z != 0.0 ? uvt.xy / uvt.z : vec2(0.0);
|
|
47
|
-
// As adl draws one, a bitmap a texel high shows its first texel throughout.
|
|
48
|
-
if (uSize.y == 1.0) {
|
|
49
|
-
uv = vec2(0.0);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// A hair nearer 0, as adl's come out, stepped across the triangle in fixed point: 1 wraps to
|
|
53
|
-
// the last texel, not the first, and a corner halfway between texels takes the one nearer 0.
|
|
54
|
-
uv -= sign(uv) / 16384.0;
|
|
55
|
-
uv = uMode.x > 0.5 ? fract(uv) : clamp(uv, 0.0, 1.0);
|
|
56
|
-
vec2 p = uv * (uSize - 1.0);
|
|
57
|
-
vec4 color;
|
|
58
|
-
if (uMode.y > 0.5) {
|
|
59
|
-
vec2 below = floor(p);
|
|
60
|
-
vec2 t = p - below;
|
|
61
|
-
ivec2 a = ivec2(below);
|
|
62
|
-
ivec2 b = min(a + 1, ivec2(uSize) - 1);
|
|
63
|
-
color = mix(
|
|
64
|
-
mix(texel(a), texel(ivec2(b.x, a.y)), t.x),
|
|
65
|
-
mix(texel(ivec2(a.x, b.y)), texel(b), t.x),
|
|
66
|
-
t.y
|
|
67
|
-
);
|
|
68
|
-
} else {
|
|
69
|
-
color = texel(ivec2(floor(p + 0.5)));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (uMode.w < 0.5) {
|
|
73
|
-
finalColor = color * vColor;
|
|
74
|
-
} else if (color.a == 0.0) {
|
|
75
|
-
finalColor = vec4(0.0);
|
|
76
|
-
} else {
|
|
77
|
-
// As render/color.ts' batcher: the transform on the straight colour, premultiplied after.
|
|
78
|
-
vec4 c = clamp(vec4(color.rgb / color.a, color.a) * uMul + uAdd, 0.0, 1.0);
|
|
79
|
-
finalColor = vec4(c.rgb * c.a, c.a);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
`;
|
|
83
|
-
let program = null;
|
|
84
|
-
let ascending = new Uint32Array(0);
|
|
85
|
-
/**
|
|
86
|
-
* Indices 0 to `count` in order, the vertices drawn as they are: views of
|
|
87
|
-
* one array, which only ever grows, as no buffer writes to its data.
|
|
88
|
-
*/
|
|
89
|
-
function inOrder(count) {
|
|
90
|
-
if (ascending.length < count) {
|
|
91
|
-
ascending = new Uint32Array(Math.max(count, ascending.length * 2));
|
|
92
|
-
for (let i = 0; i < ascending.length; i++) {
|
|
93
|
-
ascending[i] = i;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return ascending.subarray(0, count);
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* A drawing's textured triangles: a mesh of their vertices under its own
|
|
100
|
-
* shader, one draw. It destroys its geometry, buffers and all, and its
|
|
101
|
-
* shader with itself, and leaves the texture, its store's.
|
|
102
|
-
*/
|
|
103
|
-
export class TriangleView extends Mesh {
|
|
104
|
-
/** What it draws, the drawing's. */
|
|
105
|
-
source;
|
|
106
|
-
uniforms;
|
|
107
|
-
/** The views it is listed in while it lives. */
|
|
108
|
-
owner;
|
|
109
|
-
flash;
|
|
110
|
-
constructor(source, texture, pixel, owner) {
|
|
111
|
-
const geometry = new MeshGeometry({
|
|
112
|
-
positions: source.positions,
|
|
113
|
-
indices: inOrder(source.positions.length / 2),
|
|
114
|
-
});
|
|
115
|
-
geometry.addAttribute("aUVT", { buffer: source.uvt, format: "float32x3" });
|
|
116
|
-
program ??= new GlProgram({ vertex, fragment, name: "flash-triangles" });
|
|
117
|
-
const uniforms = new UniformGroup({
|
|
118
|
-
uSize: { value: new Float32Array([1, 1]), type: "vec2<f32>" },
|
|
119
|
-
uMode: {
|
|
120
|
-
value: new Float32Array([source.repeat ? 1 : 0, source.smooth ? 1 : 0, pixel, 0]),
|
|
121
|
-
type: "vec4<f32>",
|
|
122
|
-
},
|
|
123
|
-
uMul: { value: new Float32Array([1, 1, 1, 1]), type: "vec4<f32>" },
|
|
124
|
-
uAdd: { value: new Float32Array(4), type: "vec4<f32>" },
|
|
125
|
-
});
|
|
126
|
-
const shader = new Shader({
|
|
127
|
-
glProgram: program,
|
|
128
|
-
resources: { uTexture: texture.source, triangleUniforms: uniforms },
|
|
129
|
-
});
|
|
130
|
-
super({ geometry, shader });
|
|
131
|
-
this.source = source;
|
|
132
|
-
this.uniforms = uniforms;
|
|
133
|
-
this.owner = owner;
|
|
134
|
-
this.flash = null;
|
|
135
|
-
this.show(texture);
|
|
136
|
-
owner.add(this);
|
|
137
|
-
}
|
|
138
|
-
/** The store's texture as it now is. */
|
|
139
|
-
show(texture) {
|
|
140
|
-
const size = this.uniforms.uniforms.uSize;
|
|
141
|
-
size[0] = texture.source.pixelWidth;
|
|
142
|
-
size[1] = texture.source.pixelHeight;
|
|
143
|
-
this.uniforms.update();
|
|
144
|
-
this.shader.resources.uTexture = texture.source;
|
|
145
|
-
// For Pixi's blend, which follows the texture's alpha.
|
|
146
|
-
this.texture = texture;
|
|
147
|
-
}
|
|
148
|
-
/** The target's pixels a side of one of Flash's, which the texture is sampled once in. */
|
|
149
|
-
set pixel(pixel) {
|
|
150
|
-
const mode = this.uniforms.uniforms.uMode;
|
|
151
|
-
if (mode[2] !== pixel) {
|
|
152
|
-
mode[2] = pixel;
|
|
153
|
-
this.uniforms.update();
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
/** Whether the stage's quality lets it smooth where its fill asks to be: not at Flash's low. */
|
|
157
|
-
set smoothing(smoothing) {
|
|
158
|
-
const mode = this.uniforms.uniforms.uMode;
|
|
159
|
-
const smooth = smoothing && this.source.smooth ? 1 : 0;
|
|
160
|
-
if (mode[1] !== smooth) {
|
|
161
|
-
mode[1] = smooth;
|
|
162
|
-
this.uniforms.update();
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
/** The Flash colour transform it draws under, in place of Pixi's colour (render/color.ts). */
|
|
166
|
-
get flashColor() {
|
|
167
|
-
return this.flash;
|
|
168
|
-
}
|
|
169
|
-
set flashColor(ct) {
|
|
170
|
-
this.flash = ct;
|
|
171
|
-
const { uMode, uMul, uAdd } = this.uniforms.uniforms;
|
|
172
|
-
uMode[3] = ct ? 1 : 0;
|
|
173
|
-
if (ct) {
|
|
174
|
-
uMul.set([ct.rMul, ct.gMul, ct.bMul, ct.aMul]);
|
|
175
|
-
uAdd.set([ct.rAdd / 255, ct.gAdd / 255, ct.bAdd / 255, ct.aAdd / 255]);
|
|
176
|
-
}
|
|
177
|
-
this.uniforms.update();
|
|
178
|
-
}
|
|
179
|
-
destroy() {
|
|
180
|
-
const geometry = this.geometry;
|
|
181
|
-
const shader = this.shader;
|
|
182
|
-
this.owner.delete(this);
|
|
183
|
-
super.destroy();
|
|
184
|
-
// Its buffers too: the renderer holds a buffer, and its data, till the buffer goes.
|
|
185
|
-
geometry.destroy(true);
|
|
186
|
-
shader.destroy();
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
//# sourceMappingURL=triangles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"triangles.js","sourceRoot":"","sources":["../../src/render/triangles.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAgB,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5F,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;CAoBd,CAAC;AAEF,gGAAgG;AAChG,qFAAqF;AACrF,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDhB,CAAC;AAEF,IAAI,OAAO,GAAqB,IAAI,CAAC;AACrC,IAAI,SAAS,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAEnC;;;GAGG;AACH,SAAS,OAAO,CAAC,KAAa;IAC5B,IAAI,SAAS,CA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,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,EAAE,EAAE,CAAC;YACP,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;YAC/C,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,GAAG,GAAG,EAAE,EAAE,CAAC,IAAI,GAAG,GAAG,EAAE,EAAE,CAAC,IAAI,GAAG,GAAG,EAAE,EAAE,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC;QACzE,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IACzB,CAAC;IAEQ,OAAO;QACd,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAgB,CAAC;QACrC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACxB,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,oFAAoF;QACpF,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACvB,MAAM,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;CACF"}
|
package/dist/render/view.d.ts
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import { Container as PixiContainer, type Renderer } from "pixi.js";
|
|
2
|
-
import { BitmapStore } from "../bitmap/bitmap.js";
|
|
3
|
-
import { type DisplayObject } from "../display/display.js";
|
|
4
|
-
import type { Player } from "../player.js";
|
|
5
|
-
export declare class PixiView {
|
|
6
|
-
readonly renderer: Renderer;
|
|
7
|
-
private readonly fresh;
|
|
8
|
-
readonly stage: PixiContainer<import("pixi.js").ContainerChild>;
|
|
9
|
-
/** What the view has built since it was made, for measuring: lines' contexts made and reused. */
|
|
10
|
-
readonly counts: {
|
|
11
|
-
strokeContexts: number;
|
|
12
|
-
strokeReuses: number;
|
|
13
|
-
};
|
|
14
|
-
/** The released nodes, for a new object of their character to take (render/spares.ts). */
|
|
15
|
-
private readonly spares;
|
|
16
|
-
/** The unloads (display's `unloads`) the spares were last dropped for. */
|
|
17
|
-
private unloadsSeen;
|
|
18
|
-
/** The nodes by their containers, for a child's sync to take the node that is in its place. */
|
|
19
|
-
private readonly containerNodes;
|
|
20
|
-
/** The container in the place the next object synced goes to, set and read as arrange syncs it. */
|
|
21
|
-
private placeHint;
|
|
22
|
-
/** settleGroups' scratch: the groups whose batched Graphics draw alone again, and whose to look through. */
|
|
23
|
-
private readonly unsettling;
|
|
24
|
-
private readonly scanned;
|
|
25
|
-
private readonly nodes;
|
|
26
|
-
/** What each object itself draws: its fills, lines, bitmap, text and triangles (render/art.ts). */
|
|
27
|
-
private readonly art;
|
|
28
|
-
/** The 3D objects, each drawn into its bitmap before the stage is drawn (render/planes.ts). */
|
|
29
|
-
private readonly planes;
|
|
30
|
-
/** How each object is composited, by the GPU's own blending, a layer or a blend filter. */
|
|
31
|
-
private readonly blends;
|
|
32
|
-
/**
|
|
33
|
-
* In a 3D object's sync, the renderer's units a pixel of its own space its content is drawn at
|
|
34
|
-
* (render/three.ts), and its thinnest line, a texel; 0 elsewhere.
|
|
35
|
-
*/
|
|
36
|
-
private planeUnits;
|
|
37
|
-
private planeLeast;
|
|
38
|
-
/**
|
|
39
|
-
* The released nodes that drew something, oldest first, with the time
|
|
40
|
-
* each left the list: kept whole for IDLE_MS, at most PARKED_MOST of them,
|
|
41
|
-
* as a pool's objects or a panel shown and hidden come back, then emptied.
|
|
42
|
-
*/
|
|
43
|
-
private readonly parked;
|
|
44
|
-
/** Retain only batches, not detached display trees, while a group waits for reuse. */
|
|
45
|
-
private readonly parkedGroups;
|
|
46
|
-
private readonly parkedFirstGroups;
|
|
47
|
-
/** The filters a fresh view made, which it destroys with the rest. */
|
|
48
|
-
private readonly builtFilters;
|
|
49
|
-
/** The objects `mask` was found set on, for the masks to be placed that are not under the root. */
|
|
50
|
-
private readonly maskees;
|
|
51
|
-
/** Where those masks are placed, beside the root. */
|
|
52
|
-
private readonly offList;
|
|
53
|
-
/**
|
|
54
|
-
* `fresh` makes a view that draws every object as new and leaves the
|
|
55
|
-
* objects' dirty flags as they were, for a one-off render such as
|
|
56
|
-
* BitmapData.draw's, so the stage's own view still sees each change.
|
|
57
|
-
*/
|
|
58
|
-
/**
|
|
59
|
-
* How many screen pixels a stage pixel covers, for the thinnest line,
|
|
60
|
-
* which Flash draws a pixel of the screen wide however far the stage is
|
|
61
|
-
* zoomed. The renderer's resolution unless set: a host that renders
|
|
62
|
-
* finer than the screen to average down, as the test page does, sets it
|
|
63
|
-
* to what the screen shows. A fresh view draws a BitmapData's pixels,
|
|
64
|
-
* which are the stage's, so its thinnest line is a pixel.
|
|
65
|
-
*/
|
|
66
|
-
screenScale: number | null;
|
|
67
|
-
/**
|
|
68
|
-
* The stage's quality, Flash's "LOW" to "BEST": at low, no bitmap is
|
|
69
|
-
* smoothed. Its edges' anti-aliasing is the host's, which makes the
|
|
70
|
-
* renderer and draws on it.
|
|
71
|
-
*/
|
|
72
|
-
set quality(quality: string);
|
|
73
|
-
/** The target's pixels a side of one of Flash's its textured triangles were last told, and their smoothing. */
|
|
74
|
-
private meshPixel;
|
|
75
|
-
private meshSmoothing;
|
|
76
|
-
/** The thinnest line it last drew the stage's lines with; a change draws them all again. */
|
|
77
|
-
private strokedAt;
|
|
78
|
-
/** The filter units it last drew the stage's filters with; the stage's own scale changes them too. */
|
|
79
|
-
private filteredAt;
|
|
80
|
-
/** The root the last prepare synced, to know whether an object is on the list. */
|
|
81
|
-
private root;
|
|
82
|
-
/** Whether this prepare visits every node, to stroke and filter again for a new screen scale. */
|
|
83
|
-
private rescaled;
|
|
84
|
-
/** What a fresh view draws, under the draw's matrix: Flash slices it by no grid of its own. */
|
|
85
|
-
drawRoot: DisplayObject | null;
|
|
86
|
-
/** A fresh view's units to a pixel of the BitmapData it draws, rendered that many times larger. */
|
|
87
|
-
private samples;
|
|
88
|
-
constructor(renderer: Renderer, fresh?: boolean,
|
|
89
|
-
/** The stage's view, whose geometry and textures a fresh view borrows where they are current. */
|
|
90
|
-
source?: PixiView | null);
|
|
91
|
-
/** Let Pixi normalize browser coordinates; Flash's display list chooses the target (render/pointer.ts). */
|
|
92
|
-
bindPointer(player: Player): () => void;
|
|
93
|
-
/** Destroy the view's containers and what it built; borrowed resources stay their owner's. */
|
|
94
|
-
dispose(root: PixiContainer): void;
|
|
95
|
-
private node;
|
|
96
|
-
/**
|
|
97
|
-
* Let go of every spare node, as a SWF unloads: they hold its characters,
|
|
98
|
-
* and its objects' containers, till taken or IDLE_MS on, which a player
|
|
99
|
-
* paused or let go of never reaches. For a host to call too as it lets
|
|
100
|
-
* go of a player whose view it keeps. And the lines' budget back to
|
|
101
|
-
* its floor: what grew it may have gone with the SWF.
|
|
102
|
-
*/
|
|
103
|
-
dropSpares(): void;
|
|
104
|
-
/**
|
|
105
|
-
* Whether `o`'s slice may have changed since its node's was made: its
|
|
106
|
-
* grid, drawing or children changed, a direct child's drawing, its scale
|
|
107
|
-
* (not its position, as a dragged panel's), a Shape child's matrix or
|
|
108
|
-
* parent, its mask role, or its owner's slice.
|
|
109
|
-
*/
|
|
110
|
-
private reslices;
|
|
111
|
-
/**
|
|
112
|
-
* The linear transform on the stage a sliced shape's lines are as wide
|
|
113
|
-
* through: the owner's parent's, as in adl a sliced line keeps the width
|
|
114
|
-
* it has in that space, times a Shape child's own, whose scale widens
|
|
115
|
-
* them; `parent` is `o`'s parent's.
|
|
116
|
-
*/
|
|
117
|
-
private lineSpace;
|
|
118
|
-
/**
|
|
119
|
-
* An object off the list, and all below it: their lines given back, so
|
|
120
|
-
* that the cache can let them go, and drawn again if they come back.
|
|
121
|
-
*/
|
|
122
|
-
private release;
|
|
123
|
-
/**
|
|
124
|
-
* Whether `kid`, which `from` last drew, is off the list: taken out, or
|
|
125
|
-
* moved to a parent that is off it too, which no sync will release.
|
|
126
|
-
*/
|
|
127
|
-
private left;
|
|
128
|
-
/** A released node's art emptied, its fills and lines given back: drawn again if it comes back. */
|
|
129
|
-
private empty;
|
|
130
|
-
/** Return a parked group's batches without changing its nested group hierarchy. */
|
|
131
|
-
private emptyGroup;
|
|
132
|
-
/**
|
|
133
|
-
* Bring `o`'s mirror up to date where it changed, and return it. `parent`
|
|
134
|
-
* is the linear part of its parent's transform on the stage, and `moved`
|
|
135
|
-
* whether that changed, which changes the lines of every shape below.
|
|
136
|
-
* `own` stands in for `o`'s own matrix, as a draw's matrix does.
|
|
137
|
-
*/
|
|
138
|
-
private sync;
|
|
139
|
-
/** Keep an animated branch from rebuilding all the stage's batches when its children change. */
|
|
140
|
-
private group;
|
|
141
|
-
/** Retire Pixi's per-group batches before it returns the group to its pool. */
|
|
142
|
-
private disableRenderGroup;
|
|
143
|
-
/**
|
|
144
|
-
* The children's containers in render order, under the object's art,
|
|
145
|
-
* those a timeline's mask clips in a container the mask masks, nested as
|
|
146
|
-
* the masks are; the masks themselves among them, where their place in
|
|
147
|
-
* the tree puts them, though not drawn.
|
|
148
|
-
*/
|
|
149
|
-
private arrange;
|
|
150
|
-
/** Mask groups survive child edits while the masks themselves keep their order. */
|
|
151
|
-
private sameClips;
|
|
152
|
-
/** Reconcile children and nesting without retiring unchanged stencil-mask effects. */
|
|
153
|
-
private arrangeClips;
|
|
154
|
-
/**
|
|
155
|
-
* The object's mask, and its scroll: true where the scroll's clip came
|
|
156
|
-
* or went, which moves the children. A mask's own mask, or one that is
|
|
157
|
-
* the object or above it, Pixi could not draw: it is left out.
|
|
158
|
-
*/
|
|
159
|
-
private clip;
|
|
160
|
-
/**
|
|
161
|
-
* The object's scroll, as a clip of its art and children to the
|
|
162
|
-
* rectangle, which its matrix's shift has moved to its place; true where
|
|
163
|
-
* the clip came or went, which moves the children.
|
|
164
|
-
*/
|
|
165
|
-
private scrollClip;
|
|
166
|
-
/**
|
|
167
|
-
* The masks `mask` set that are not under `root`, off the display list
|
|
168
|
-
* or elsewhere on it, each in `holder` at its place in the stage's space
|
|
169
|
-
* (the space a draw draws into, for a draw's), as Flash places such a
|
|
170
|
-
* mask; the objects they mask synced already.
|
|
171
|
-
*/
|
|
172
|
-
private placeMasks;
|
|
173
|
-
/**
|
|
174
|
-
* The target's pixels a side of a pixel of Flash's, which a 3D object's
|
|
175
|
-
* quad and textured triangles sample once: in a BitmapData's draw, its
|
|
176
|
-
* samples; on the stage, a pixel of the screen, where the host says what
|
|
177
|
-
* that is.
|
|
178
|
-
*/
|
|
179
|
-
/** Whether it syncs a 3D object's content, drawn into the object's bitmap. */
|
|
180
|
-
get inPlane(): boolean;
|
|
181
|
-
get flashPixel(): number;
|
|
182
|
-
/** Bring the stage up to date with `root`'s display list, without drawing. */
|
|
183
|
-
/** The thinnest line, in stage pixels: a pixel of the screen. */
|
|
184
|
-
get leastWidth(): number;
|
|
185
|
-
/**
|
|
186
|
-
* The renderer's units to a pixel of the stage, which Flash's filters reach in: a host showing
|
|
187
|
-
* the stage larger has them reach as much further on the screen, as Flash Player's do.
|
|
188
|
-
*/
|
|
189
|
-
get filterUnits(): number;
|
|
190
|
-
prepare(root: DisplayObject): void;
|
|
191
|
-
/**
|
|
192
|
-
* Each 3D object's quad placed in perspective and its bitmap drawn again where it may have
|
|
193
|
-
* changed (render/planes.ts).
|
|
194
|
-
*/
|
|
195
|
-
private renderPlanes;
|
|
196
|
-
/**
|
|
197
|
-
* Batch the Graphics of each render group drawn that has not been rebuilt
|
|
198
|
-
* for SETTLE_MS, and draw those of one rebuilt since alone again: walking
|
|
199
|
-
* Pixi's tree of groups from the stage's, which holds those drawn and no
|
|
200
|
-
* other. What a group batched is looked through as it unsettles or its
|
|
201
|
-
* structure changes, for Graphics a branch took along as it moved under
|
|
202
|
-
* another group or became a group of its own (unsettle).
|
|
203
|
-
*/
|
|
204
|
-
private settleGroups;
|
|
205
|
-
/**
|
|
206
|
-
* A fresh view of this one's, for BitmapData.draw (render/snapshot.ts):
|
|
207
|
-
* it draws `root` under the draw's matrix at `samples` units a pixel,
|
|
208
|
-
* borrowing this view's current geometry, so this one's is untouched.
|
|
209
|
-
*/
|
|
210
|
-
forDraw(root: DisplayObject, samples: number): PixiView;
|
|
211
|
-
/**
|
|
212
|
-
* A fresh view's `o` synced through `m` into `into`, with the masks and 3D objects' bitmaps it
|
|
213
|
-
* needs. Only a fresh view (forDraw's) may: the stage's would take `o` into its own nodes,
|
|
214
|
-
* clear its dirty flags and move its container.
|
|
215
|
-
*/
|
|
216
|
-
drawAlone(o: DisplayObject, m: DisplayObject["matrix"], into: PixiContainer): void;
|
|
217
|
-
/** `o` drawn alone, as BitmapData.draw takes a display object, read back as premultiplied ARGB. */
|
|
218
|
-
snapshot(o: DisplayObject, m: {
|
|
219
|
-
a: number;
|
|
220
|
-
b: number;
|
|
221
|
-
c: number;
|
|
222
|
-
d: number;
|
|
223
|
-
tx: number;
|
|
224
|
-
ty: number;
|
|
225
|
-
}, width: number, height: number, samples?: number): Uint32Array;
|
|
226
|
-
/** `o` drawn into `store` on the GPU at (x, y), as `snapshot`; false where the store has no texture. */
|
|
227
|
-
drawInto(store: BitmapStore, o: DisplayObject, m: {
|
|
228
|
-
a: number;
|
|
229
|
-
b: number;
|
|
230
|
-
c: number;
|
|
231
|
-
d: number;
|
|
232
|
-
tx: number;
|
|
233
|
-
ty: number;
|
|
234
|
-
}, x: number, y: number, width: number, height: number, samples?: number): boolean;
|
|
235
|
-
/** Draw `root`'s display list, synced first. */
|
|
236
|
-
render(root: DisplayObject): void;
|
|
237
|
-
}
|
|
238
|
-
//# sourceMappingURL=view.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/render/view.ts"],"names":[],"mappings":"AAWA,OAAO,EAIL,SAAS,IAAI,aAAa,EAC1B,KAAK,QAAQ,EAEd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,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