modern-canvas 0.4.50 → 0.4.52
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/dist/index.cjs +99 -99
- package/dist/index.d.cts +17 -12
- package/dist/index.d.mts +17 -12
- package/dist/index.d.ts +17 -12
- package/dist/index.js +35 -35
- package/dist/index.mjs +99 -99
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -7150,13 +7150,15 @@ exports.ColorReplaceEffect = __decorateClass$J([
|
|
|
7150
7150
|
], exports.ColorReplaceEffect);
|
|
7151
7151
|
|
|
7152
7152
|
class CanvasContext extends modernPath2d.Path2D {
|
|
7153
|
-
textureTransform;
|
|
7154
7153
|
fillStyle;
|
|
7155
7154
|
strokeStyle;
|
|
7156
7155
|
lineCap;
|
|
7157
7156
|
lineJoin;
|
|
7158
7157
|
lineWidth;
|
|
7159
7158
|
miterLimit;
|
|
7159
|
+
// custom
|
|
7160
|
+
uvTransform;
|
|
7161
|
+
vertTransform;
|
|
7160
7162
|
_defaultStyle = Texture2D.EMPTY;
|
|
7161
7163
|
_draws = [];
|
|
7162
7164
|
_toTexture(source) {
|
|
@@ -7178,7 +7180,8 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
7178
7180
|
type: "stroke",
|
|
7179
7181
|
path,
|
|
7180
7182
|
texture,
|
|
7181
|
-
|
|
7183
|
+
uvTransform: this.uvTransform,
|
|
7184
|
+
vertTransform: this.vertTransform,
|
|
7182
7185
|
style: {
|
|
7183
7186
|
alignment: 0.5,
|
|
7184
7187
|
cap: this.lineCap ?? "butt",
|
|
@@ -7207,7 +7210,8 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
7207
7210
|
type: "fill",
|
|
7208
7211
|
path,
|
|
7209
7212
|
texture,
|
|
7210
|
-
|
|
7213
|
+
uvTransform: this.uvTransform,
|
|
7214
|
+
vertTransform: this.vertTransform
|
|
7211
7215
|
});
|
|
7212
7216
|
super.reset();
|
|
7213
7217
|
}
|
|
@@ -7215,7 +7219,8 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
7215
7219
|
super.copy(source);
|
|
7216
7220
|
this.strokeStyle = source.strokeStyle;
|
|
7217
7221
|
this.fillStyle = source.fillStyle;
|
|
7218
|
-
this.
|
|
7222
|
+
this.uvTransform = source.uvTransform;
|
|
7223
|
+
this.vertTransform = source.vertTransform;
|
|
7219
7224
|
this.lineCap = source.lineCap;
|
|
7220
7225
|
this.lineJoin = source.lineJoin;
|
|
7221
7226
|
this.lineWidth = source.lineWidth;
|
|
@@ -7227,7 +7232,8 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
7227
7232
|
super.reset();
|
|
7228
7233
|
this.strokeStyle = void 0;
|
|
7229
7234
|
this.fillStyle = void 0;
|
|
7230
|
-
this.
|
|
7235
|
+
this.uvTransform = void 0;
|
|
7236
|
+
this.vertTransform = void 0;
|
|
7231
7237
|
this.lineCap = void 0;
|
|
7232
7238
|
this.lineJoin = void 0;
|
|
7233
7239
|
this.lineWidth = void 0;
|
|
@@ -7235,8 +7241,9 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
7235
7241
|
this._draws.length = 0;
|
|
7236
7242
|
return this;
|
|
7237
7243
|
}
|
|
7238
|
-
buildUvs(start, vertices, uvs, texture,
|
|
7244
|
+
buildUvs(start, vertices, uvs, texture, uvTransform) {
|
|
7239
7245
|
if (texture) {
|
|
7246
|
+
const _uvTransform = uvTransform ? typeof uvTransform === "function" ? uvTransform : (x, y) => uvTransform.applyToPoint(x, y) : uvTransform;
|
|
7240
7247
|
const w = texture.width;
|
|
7241
7248
|
const h = texture.height;
|
|
7242
7249
|
for (let len = vertices.length, i = start; i < len; i += 2) {
|
|
@@ -7244,8 +7251,8 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
7244
7251
|
const y = vertices[i + 1];
|
|
7245
7252
|
let uvX;
|
|
7246
7253
|
let uvY;
|
|
7247
|
-
if (
|
|
7248
|
-
[uvX, uvY] =
|
|
7254
|
+
if (_uvTransform) {
|
|
7255
|
+
[uvX, uvY] = _uvTransform(x, y);
|
|
7249
7256
|
} else {
|
|
7250
7257
|
[uvX, uvY] = [x / w, y / h];
|
|
7251
7258
|
}
|
|
@@ -7259,59 +7266,35 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
7259
7266
|
}
|
|
7260
7267
|
toBatchables() {
|
|
7261
7268
|
const batchables = [];
|
|
7262
|
-
let vertices = [];
|
|
7263
|
-
let indices = [];
|
|
7264
|
-
let uvs = [];
|
|
7265
|
-
let texture;
|
|
7266
|
-
const push = (draw) => {
|
|
7267
|
-
batchables.push({
|
|
7268
|
-
vertices,
|
|
7269
|
-
indices,
|
|
7270
|
-
uvs,
|
|
7271
|
-
texture,
|
|
7272
|
-
type: draw.type,
|
|
7273
|
-
disableWrapMode: draw.disableWrapMode
|
|
7274
|
-
});
|
|
7275
|
-
vertices = [];
|
|
7276
|
-
indices = [];
|
|
7277
|
-
uvs = [];
|
|
7278
|
-
texture = void 0;
|
|
7279
|
-
};
|
|
7280
7269
|
for (let len = this._draws.length, i = 0; i < len; i++) {
|
|
7281
|
-
const
|
|
7282
|
-
const
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
if (!oldTexture) {
|
|
7288
|
-
texture = draw.texture;
|
|
7289
|
-
}
|
|
7290
|
-
if (vertices.length && oldTexture !== draw.texture && !oldTexture?.is(draw.texture)) {
|
|
7291
|
-
push(draw);
|
|
7292
|
-
texture = draw.texture;
|
|
7293
|
-
}
|
|
7294
|
-
const start = vertices.length;
|
|
7295
|
-
if (draw.type === "fill") {
|
|
7296
|
-
draw.path.fillTriangulate({
|
|
7270
|
+
const current = this._draws[i];
|
|
7271
|
+
const vertices = [];
|
|
7272
|
+
const indices = [];
|
|
7273
|
+
const uvs = [];
|
|
7274
|
+
if (current.type === "fill") {
|
|
7275
|
+
current.path.fillTriangulate({
|
|
7297
7276
|
vertices,
|
|
7298
7277
|
indices
|
|
7299
7278
|
});
|
|
7300
|
-
this.buildUvs(start, vertices, uvs, draw.texture, draw.textureTransform);
|
|
7301
7279
|
} else {
|
|
7302
|
-
|
|
7280
|
+
current.path.strokeTriangulate({
|
|
7303
7281
|
vertices,
|
|
7304
7282
|
indices,
|
|
7305
|
-
lineStyle:
|
|
7283
|
+
lineStyle: current.style,
|
|
7306
7284
|
flipAlignment: false,
|
|
7307
7285
|
closed: true
|
|
7308
7286
|
});
|
|
7309
|
-
this.buildUvs(start, vertices, uvs, draw.texture, draw.textureTransform);
|
|
7310
7287
|
}
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7288
|
+
this.buildUvs(0, vertices, uvs, current.texture, current.uvTransform);
|
|
7289
|
+
batchables.push({
|
|
7290
|
+
vertices,
|
|
7291
|
+
indices,
|
|
7292
|
+
uvs,
|
|
7293
|
+
texture: current.texture,
|
|
7294
|
+
type: current.type,
|
|
7295
|
+
disableWrapMode: current.disableWrapMode,
|
|
7296
|
+
vertTransform: current.vertTransform
|
|
7297
|
+
});
|
|
7315
7298
|
}
|
|
7316
7299
|
return batchables;
|
|
7317
7300
|
}
|
|
@@ -7390,11 +7373,6 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
7390
7373
|
requestRelayout() {
|
|
7391
7374
|
this._relayouting = true;
|
|
7392
7375
|
this.requestUpdate();
|
|
7393
|
-
this.forEachChild((node) => {
|
|
7394
|
-
if (node instanceof exports.CanvasItem) {
|
|
7395
|
-
node.requestRelayout();
|
|
7396
|
-
}
|
|
7397
|
-
});
|
|
7398
7376
|
}
|
|
7399
7377
|
requestRepaint() {
|
|
7400
7378
|
this._repainting = true;
|
|
@@ -9024,7 +9002,7 @@ class BaseElement2DFill extends CoreObject {
|
|
|
9024
9002
|
_getDrawOptions() {
|
|
9025
9003
|
let disableWrapMode = false;
|
|
9026
9004
|
const { width, height } = this.parent.size;
|
|
9027
|
-
const
|
|
9005
|
+
const uvTransform = new Transform2D().scale(1 / width, 1 / height);
|
|
9028
9006
|
if (this.cropRect) {
|
|
9029
9007
|
const {
|
|
9030
9008
|
left = 0,
|
|
@@ -9032,7 +9010,7 @@ class BaseElement2DFill extends CoreObject {
|
|
|
9032
9010
|
right = 0,
|
|
9033
9011
|
bottom = 0
|
|
9034
9012
|
} = this.cropRect;
|
|
9035
|
-
|
|
9013
|
+
uvTransform.scale(
|
|
9036
9014
|
Math.abs(1 - (left + right)),
|
|
9037
9015
|
Math.abs(1 - (top + bottom))
|
|
9038
9016
|
).translate(left, top);
|
|
@@ -9047,24 +9025,26 @@ class BaseElement2DFill extends CoreObject {
|
|
|
9047
9025
|
// flip, TODO
|
|
9048
9026
|
// alignment, TODO
|
|
9049
9027
|
} = this.tile;
|
|
9050
|
-
|
|
9028
|
+
uvTransform.translate(-translateX / width, -translateY / height).scale(1 / scaleX, 1 / scaleY);
|
|
9051
9029
|
disableWrapMode = true;
|
|
9052
9030
|
} else if (this.stretchRect) {
|
|
9053
9031
|
const { left = 0, top = 0, right = 0, bottom = 0 } = this.stretchRect;
|
|
9054
|
-
|
|
9032
|
+
uvTransform.scale(
|
|
9055
9033
|
Math.abs(1 - (-left + -right)),
|
|
9056
9034
|
Math.abs(1 - (-top + -bottom))
|
|
9057
9035
|
).translate(-left, -top);
|
|
9058
9036
|
disableWrapMode = true;
|
|
9059
9037
|
}
|
|
9060
|
-
return { disableWrapMode,
|
|
9038
|
+
return { disableWrapMode, uvTransform };
|
|
9061
9039
|
}
|
|
9062
9040
|
draw() {
|
|
9063
9041
|
const ctx = this.parent.context;
|
|
9064
|
-
const {
|
|
9065
|
-
ctx.
|
|
9042
|
+
const { uvTransform, disableWrapMode } = this._getDrawOptions();
|
|
9043
|
+
ctx.uvTransform = uvTransform;
|
|
9066
9044
|
ctx.fillStyle = this._texture ?? this.color;
|
|
9067
|
-
ctx.fill({
|
|
9045
|
+
ctx.fill({
|
|
9046
|
+
disableWrapMode
|
|
9047
|
+
});
|
|
9068
9048
|
}
|
|
9069
9049
|
}
|
|
9070
9050
|
__decorateClass$u([
|
|
@@ -9164,14 +9144,14 @@ class BaseElement2DOutline extends BaseElement2DFill {
|
|
|
9164
9144
|
}
|
|
9165
9145
|
canDraw() {
|
|
9166
9146
|
return Boolean(
|
|
9167
|
-
this.width || super.canDraw()
|
|
9147
|
+
this.width || this.color || super.canDraw()
|
|
9168
9148
|
);
|
|
9169
9149
|
}
|
|
9170
9150
|
draw() {
|
|
9171
9151
|
const ctx = this.parent.context;
|
|
9172
|
-
const {
|
|
9152
|
+
const { uvTransform, disableWrapMode } = this._getDrawOptions();
|
|
9173
9153
|
ctx.lineWidth = this.width || 1;
|
|
9174
|
-
ctx.
|
|
9154
|
+
ctx.uvTransform = uvTransform;
|
|
9175
9155
|
ctx.strokeStyle = this._texture ?? this.color;
|
|
9176
9156
|
ctx.stroke({ disableWrapMode });
|
|
9177
9157
|
}
|
|
@@ -9411,13 +9391,6 @@ class BaseElement2DText extends CoreObject {
|
|
|
9411
9391
|
}
|
|
9412
9392
|
updateMeasure() {
|
|
9413
9393
|
this.measureResult = this.measure();
|
|
9414
|
-
const textWidth = this.measureResult.boundingBox.width;
|
|
9415
|
-
const textHeight = this.measureResult.boundingBox.height;
|
|
9416
|
-
const { left, top, width, height = textHeight } = this.parent.style;
|
|
9417
|
-
this.parent.position.x = left + Math.min(0, ((width || textWidth) - textWidth) / 2);
|
|
9418
|
-
this.parent.position.y = top + Math.min(0, ((height || textHeight) - textHeight) / 2);
|
|
9419
|
-
this.parent.size.width = textWidth;
|
|
9420
|
-
this.parent.size.height = textHeight;
|
|
9421
9394
|
return this;
|
|
9422
9395
|
}
|
|
9423
9396
|
canDraw() {
|
|
@@ -9426,15 +9399,24 @@ class BaseElement2DText extends CoreObject {
|
|
|
9426
9399
|
);
|
|
9427
9400
|
}
|
|
9428
9401
|
draw() {
|
|
9429
|
-
const ctx = this.parent.context;
|
|
9430
9402
|
this.baseText.render({
|
|
9431
9403
|
pixelRatio: this.texture.pixelRatio,
|
|
9432
9404
|
view: this.texture.source
|
|
9433
9405
|
});
|
|
9434
9406
|
this.texture.requestUpload();
|
|
9435
|
-
const
|
|
9407
|
+
const textWidth = this.measureResult?.boundingBox.width ?? this.parent.size.width;
|
|
9408
|
+
const textHeight = this.measureResult?.boundingBox.height ?? this.parent.size.height;
|
|
9409
|
+
const ctx = this.parent.context;
|
|
9436
9410
|
ctx.fillStyle = this.texture;
|
|
9437
|
-
ctx.
|
|
9411
|
+
ctx.uvTransform = new Transform2D().scale(1 / textWidth, 1 / textHeight);
|
|
9412
|
+
ctx.vertTransform = () => {
|
|
9413
|
+
const parent = this.parent;
|
|
9414
|
+
const origin = parent.getTransformOrigin();
|
|
9415
|
+
return new Transform2D().translate(-origin.x, -origin.y).scale(
|
|
9416
|
+
parent.globalScale.x > 0 ? 1 : -1,
|
|
9417
|
+
parent.globalScale.y > 0 ? 1 : -1
|
|
9418
|
+
).translate(origin.x, origin.y);
|
|
9419
|
+
};
|
|
9438
9420
|
ctx.fill();
|
|
9439
9421
|
}
|
|
9440
9422
|
}
|
|
@@ -9475,8 +9457,19 @@ exports.Node2D = class Node2D extends exports.CanvasItem {
|
|
|
9475
9457
|
super();
|
|
9476
9458
|
this.setProperties(properties).append(nodes);
|
|
9477
9459
|
}
|
|
9460
|
+
getTransformOrigin() {
|
|
9461
|
+
return new Vector2(0, 0);
|
|
9462
|
+
}
|
|
9463
|
+
getTransform(cb) {
|
|
9464
|
+
const origin = this.getTransformOrigin();
|
|
9465
|
+
const transform = new Transform2D();
|
|
9466
|
+
transform.translate(-origin.x, -origin.y).scale(this.scale.x, this.scale.y).skew(this.skew.x, this.skew.y).rotate(this.rotation);
|
|
9467
|
+
cb?.(transform);
|
|
9468
|
+
transform.translate(this.position.x, this.position.y).translate(origin.x, origin.y);
|
|
9469
|
+
return transform;
|
|
9470
|
+
}
|
|
9478
9471
|
_updateTransform() {
|
|
9479
|
-
this.transform.
|
|
9472
|
+
this.transform.copy(this.getTransform());
|
|
9480
9473
|
}
|
|
9481
9474
|
_updateGlobalTransform() {
|
|
9482
9475
|
const parent = this.getParent();
|
|
@@ -9503,8 +9496,17 @@ exports.Node2D = class Node2D extends exports.CanvasItem {
|
|
|
9503
9496
|
this.globalSkew.y = Math.atan2(b, d) - this.globalRotation;
|
|
9504
9497
|
this.requestRelayout();
|
|
9505
9498
|
}
|
|
9506
|
-
_transformVertices(vertices) {
|
|
9507
|
-
|
|
9499
|
+
_transformVertices(vertices, vertTransform) {
|
|
9500
|
+
let a, c, tx, b, d, ty;
|
|
9501
|
+
if (vertTransform) {
|
|
9502
|
+
const globalTransform = this.globalTransform.clone();
|
|
9503
|
+
globalTransform.multiply(
|
|
9504
|
+
typeof vertTransform === "function" ? vertTransform?.() : vertTransform
|
|
9505
|
+
);
|
|
9506
|
+
[a, c, tx, b, d, ty] = globalTransform.toArray();
|
|
9507
|
+
} else {
|
|
9508
|
+
[a, c, tx, b, d, ty] = this.globalTransform.toArray();
|
|
9509
|
+
}
|
|
9508
9510
|
const newVertices = vertices.slice();
|
|
9509
9511
|
for (let len = vertices.length, i = 0; i < len; i += 2) {
|
|
9510
9512
|
const x = vertices[i];
|
|
@@ -9520,7 +9522,7 @@ exports.Node2D = class Node2D extends exports.CanvasItem {
|
|
|
9520
9522
|
return super._relayout(batchables).map((batchable) => {
|
|
9521
9523
|
return {
|
|
9522
9524
|
...batchable,
|
|
9523
|
-
vertices: this._transformVertices(batchable.vertices)
|
|
9525
|
+
vertices: this._transformVertices(batchable.vertices, batchable.vertTransform)
|
|
9524
9526
|
};
|
|
9525
9527
|
});
|
|
9526
9528
|
}
|
|
@@ -9727,14 +9729,17 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
|
|
|
9727
9729
|
}
|
|
9728
9730
|
}
|
|
9729
9731
|
}
|
|
9730
|
-
|
|
9732
|
+
getTransformOrigin() {
|
|
9731
9733
|
const { width, height } = this.size;
|
|
9732
9734
|
const [originX, originY] = parseCSSTransformOrigin(this.style.transformOrigin);
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9735
|
+
return new Vector2(originX * width, originY * height);
|
|
9736
|
+
}
|
|
9737
|
+
getTransform(cb) {
|
|
9738
|
+
const { width, height } = this.size;
|
|
9739
|
+
return super.getTransform((transform) => {
|
|
9740
|
+
parseCSSTransform(this.style.transform ?? "", width, height, transform);
|
|
9741
|
+
cb?.(transform);
|
|
9742
|
+
});
|
|
9738
9743
|
}
|
|
9739
9744
|
_updateGlobalTransform() {
|
|
9740
9745
|
super._updateGlobalTransform();
|
|
@@ -10526,7 +10531,7 @@ exports.Image2D = class Image2D extends exports.Element2D {
|
|
|
10526
10531
|
const sy = 1 / h;
|
|
10527
10532
|
const tx = left * width * sx;
|
|
10528
10533
|
const ty = top * height * sy;
|
|
10529
|
-
this.context.
|
|
10534
|
+
this.context.uvTransform = new Transform2D().scale(sx, sy).translate(tx, ty);
|
|
10530
10535
|
this.shape.draw();
|
|
10531
10536
|
this.context.fill();
|
|
10532
10537
|
}
|
|
@@ -10566,7 +10571,7 @@ class TextureRect2D extends exports.Element2D {
|
|
|
10566
10571
|
if (this.texture?.valid) {
|
|
10567
10572
|
const { width, height } = this.size;
|
|
10568
10573
|
this.context.fillStyle = this.texture;
|
|
10569
|
-
this.context.
|
|
10574
|
+
this.context.uvTransform = new Transform2D().scale(
|
|
10570
10575
|
1 / width,
|
|
10571
10576
|
1 / height
|
|
10572
10577
|
);
|
|
@@ -10785,15 +10790,10 @@ exports.Text2D = class Text2D extends TextureRect2D {
|
|
|
10785
10790
|
}
|
|
10786
10791
|
_drawContent() {
|
|
10787
10792
|
if (!this.split) {
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
}
|
|
10792
|
-
this.base.render({
|
|
10793
|
-
pixelRatio: this.texture.pixelRatio,
|
|
10794
|
-
view: this.texture.source
|
|
10795
|
-
});
|
|
10796
|
-
}
|
|
10793
|
+
this.base.render({
|
|
10794
|
+
pixelRatio: this.texture.pixelRatio,
|
|
10795
|
+
view: this.texture.source
|
|
10796
|
+
});
|
|
10797
10797
|
this.texture.requestUpload();
|
|
10798
10798
|
super._drawContent();
|
|
10799
10799
|
}
|
|
@@ -12481,7 +12481,7 @@ exports.AudioWaveform = class AudioWaveform extends exports.Element2D {
|
|
|
12481
12481
|
const src = this._src;
|
|
12482
12482
|
if (src?.valid) {
|
|
12483
12483
|
this.context.fillStyle = src;
|
|
12484
|
-
this.context.
|
|
12484
|
+
this.context.uvTransform = new Transform2D().scale(
|
|
12485
12485
|
1 / this.style.width,
|
|
12486
12486
|
1 / this.style.height
|
|
12487
12487
|
);
|
|
@@ -12755,7 +12755,7 @@ exports.Ruler = class Ruler extends exports.Control {
|
|
|
12755
12755
|
const texture = this.texture;
|
|
12756
12756
|
if (texture?.valid) {
|
|
12757
12757
|
this.context.fillStyle = texture;
|
|
12758
|
-
this.context.
|
|
12758
|
+
this.context.uvTransform = new Transform2D().scale(
|
|
12759
12759
|
1 / this.size.width,
|
|
12760
12760
|
1 / this.size.height
|
|
12761
12761
|
);
|
package/dist/index.d.cts
CHANGED
|
@@ -1419,33 +1419,35 @@ declare class VideoTexture extends Texture2D<HTMLVideoElement> {
|
|
|
1419
1419
|
declare class ViewportTexture extends PixelsTexture {
|
|
1420
1420
|
}
|
|
1421
1421
|
|
|
1422
|
+
type UVTransform = Transform2D | ((x: number, y: number) => [number, number]);
|
|
1423
|
+
type VertTransform = Transform2D | (() => Transform2D);
|
|
1422
1424
|
interface CanvasBatchable extends Batchable2D {
|
|
1423
1425
|
type: 'stroke' | 'fill';
|
|
1424
1426
|
texture?: Texture2D;
|
|
1427
|
+
vertTransform?: VertTransform;
|
|
1425
1428
|
}
|
|
1426
1429
|
interface StrokeDraw extends Partial<CanvasBatchable> {
|
|
1427
1430
|
type: 'stroke';
|
|
1428
1431
|
path: Path2D;
|
|
1429
|
-
texture?: Texture2D;
|
|
1430
|
-
textureTransform?: Transform2D;
|
|
1431
1432
|
style: LineStyle;
|
|
1433
|
+
uvTransform?: UVTransform;
|
|
1432
1434
|
}
|
|
1433
1435
|
interface FillDraw extends Partial<CanvasBatchable> {
|
|
1434
1436
|
type: 'fill';
|
|
1435
1437
|
path: Path2D;
|
|
1436
|
-
|
|
1437
|
-
textureTransform?: Transform2D;
|
|
1438
|
+
uvTransform?: UVTransform;
|
|
1438
1439
|
}
|
|
1439
1440
|
declare class CanvasContext extends Path2D {
|
|
1440
|
-
textureTransform?: Transform2D;
|
|
1441
1441
|
fillStyle?: Color$1 | Texture2D;
|
|
1442
1442
|
strokeStyle?: Color$1 | Texture2D;
|
|
1443
1443
|
lineCap?: LineCap;
|
|
1444
1444
|
lineJoin?: LineJoin;
|
|
1445
1445
|
lineWidth?: number;
|
|
1446
1446
|
miterLimit?: number;
|
|
1447
|
-
|
|
1448
|
-
|
|
1447
|
+
uvTransform?: UVTransform;
|
|
1448
|
+
vertTransform?: VertTransform;
|
|
1449
|
+
protected _defaultStyle: Texture2D<Texture2DSource>;
|
|
1450
|
+
protected _draws: (StrokeDraw | FillDraw)[];
|
|
1449
1451
|
protected _toTexture(source: Color$1 | Texture2D): Texture2D;
|
|
1450
1452
|
stroke(options?: Partial<StrokeDraw>): void;
|
|
1451
1453
|
fillRect(x: number, y: number, width: number, height: number): void;
|
|
@@ -1453,7 +1455,7 @@ declare class CanvasContext extends Path2D {
|
|
|
1453
1455
|
fill(options?: Partial<FillDraw>): void;
|
|
1454
1456
|
copy(source: CanvasContext): this;
|
|
1455
1457
|
reset(): this;
|
|
1456
|
-
buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D,
|
|
1458
|
+
buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D, uvTransform?: UVTransform): void;
|
|
1457
1459
|
toBatchables(): CanvasBatchable[];
|
|
1458
1460
|
}
|
|
1459
1461
|
|
|
@@ -1882,9 +1884,11 @@ declare class Node2D extends CanvasItem {
|
|
|
1882
1884
|
globalTransform: Transform2D;
|
|
1883
1885
|
protected _parentTransformDirtyId?: number;
|
|
1884
1886
|
constructor(properties?: Partial<Node2DProperties>, nodes?: Node[]);
|
|
1887
|
+
getTransformOrigin(): Vector2;
|
|
1888
|
+
getTransform(cb?: (transform: Transform2D) => void): Transform2D;
|
|
1885
1889
|
protected _updateTransform(): void;
|
|
1886
1890
|
protected _updateGlobalTransform(): void;
|
|
1887
|
-
protected _transformVertices(vertices: number[]): number[];
|
|
1891
|
+
protected _transformVertices(vertices: number[], vertTransform?: VertTransform): number[];
|
|
1888
1892
|
protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
|
|
1889
1893
|
protected _process(delta: number): void;
|
|
1890
1894
|
}
|
|
@@ -1913,7 +1917,7 @@ declare class BaseElement2DFill extends CoreObject {
|
|
|
1913
1917
|
canDraw(): boolean;
|
|
1914
1918
|
protected _getDrawOptions(): {
|
|
1915
1919
|
disableWrapMode: boolean;
|
|
1916
|
-
|
|
1920
|
+
uvTransform: Transform2D;
|
|
1917
1921
|
};
|
|
1918
1922
|
draw(): void;
|
|
1919
1923
|
}
|
|
@@ -2051,7 +2055,8 @@ declare class BaseElement2D extends Node2D implements Rectangulable {
|
|
|
2051
2055
|
setProperties(properties?: Record<PropertyKey, any>): this;
|
|
2052
2056
|
protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2053
2057
|
protected _updateMaskImage(): void;
|
|
2054
|
-
|
|
2058
|
+
getTransformOrigin(): Vector2;
|
|
2059
|
+
getTransform(cb?: (transform: Transform2D) => void): Transform2D;
|
|
2055
2060
|
protected _updateGlobalTransform(): void;
|
|
2056
2061
|
getRect(): Rect2;
|
|
2057
2062
|
protected _updateOverflow(): void;
|
|
@@ -3267,4 +3272,4 @@ interface RenderOptions {
|
|
|
3267
3272
|
declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
|
|
3268
3273
|
|
|
3269
3274
|
export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, Scaler, SceneTree, ScrollBar, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, property, protectedProperty, render, timingFunctions, uid };
|
|
3270
|
-
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, PropertyDeclaration, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
|
|
3275
|
+
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, PropertyDeclaration, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, UVTransform, VectorLike, VectorOperateOutput, VertTransform, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
|
package/dist/index.d.mts
CHANGED
|
@@ -1419,33 +1419,35 @@ declare class VideoTexture extends Texture2D<HTMLVideoElement> {
|
|
|
1419
1419
|
declare class ViewportTexture extends PixelsTexture {
|
|
1420
1420
|
}
|
|
1421
1421
|
|
|
1422
|
+
type UVTransform = Transform2D | ((x: number, y: number) => [number, number]);
|
|
1423
|
+
type VertTransform = Transform2D | (() => Transform2D);
|
|
1422
1424
|
interface CanvasBatchable extends Batchable2D {
|
|
1423
1425
|
type: 'stroke' | 'fill';
|
|
1424
1426
|
texture?: Texture2D;
|
|
1427
|
+
vertTransform?: VertTransform;
|
|
1425
1428
|
}
|
|
1426
1429
|
interface StrokeDraw extends Partial<CanvasBatchable> {
|
|
1427
1430
|
type: 'stroke';
|
|
1428
1431
|
path: Path2D;
|
|
1429
|
-
texture?: Texture2D;
|
|
1430
|
-
textureTransform?: Transform2D;
|
|
1431
1432
|
style: LineStyle;
|
|
1433
|
+
uvTransform?: UVTransform;
|
|
1432
1434
|
}
|
|
1433
1435
|
interface FillDraw extends Partial<CanvasBatchable> {
|
|
1434
1436
|
type: 'fill';
|
|
1435
1437
|
path: Path2D;
|
|
1436
|
-
|
|
1437
|
-
textureTransform?: Transform2D;
|
|
1438
|
+
uvTransform?: UVTransform;
|
|
1438
1439
|
}
|
|
1439
1440
|
declare class CanvasContext extends Path2D {
|
|
1440
|
-
textureTransform?: Transform2D;
|
|
1441
1441
|
fillStyle?: Color$1 | Texture2D;
|
|
1442
1442
|
strokeStyle?: Color$1 | Texture2D;
|
|
1443
1443
|
lineCap?: LineCap;
|
|
1444
1444
|
lineJoin?: LineJoin;
|
|
1445
1445
|
lineWidth?: number;
|
|
1446
1446
|
miterLimit?: number;
|
|
1447
|
-
|
|
1448
|
-
|
|
1447
|
+
uvTransform?: UVTransform;
|
|
1448
|
+
vertTransform?: VertTransform;
|
|
1449
|
+
protected _defaultStyle: Texture2D<Texture2DSource>;
|
|
1450
|
+
protected _draws: (StrokeDraw | FillDraw)[];
|
|
1449
1451
|
protected _toTexture(source: Color$1 | Texture2D): Texture2D;
|
|
1450
1452
|
stroke(options?: Partial<StrokeDraw>): void;
|
|
1451
1453
|
fillRect(x: number, y: number, width: number, height: number): void;
|
|
@@ -1453,7 +1455,7 @@ declare class CanvasContext extends Path2D {
|
|
|
1453
1455
|
fill(options?: Partial<FillDraw>): void;
|
|
1454
1456
|
copy(source: CanvasContext): this;
|
|
1455
1457
|
reset(): this;
|
|
1456
|
-
buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D,
|
|
1458
|
+
buildUvs(start: number, vertices: number[], uvs: number[], texture?: Texture2D, uvTransform?: UVTransform): void;
|
|
1457
1459
|
toBatchables(): CanvasBatchable[];
|
|
1458
1460
|
}
|
|
1459
1461
|
|
|
@@ -1882,9 +1884,11 @@ declare class Node2D extends CanvasItem {
|
|
|
1882
1884
|
globalTransform: Transform2D;
|
|
1883
1885
|
protected _parentTransformDirtyId?: number;
|
|
1884
1886
|
constructor(properties?: Partial<Node2DProperties>, nodes?: Node[]);
|
|
1887
|
+
getTransformOrigin(): Vector2;
|
|
1888
|
+
getTransform(cb?: (transform: Transform2D) => void): Transform2D;
|
|
1885
1889
|
protected _updateTransform(): void;
|
|
1886
1890
|
protected _updateGlobalTransform(): void;
|
|
1887
|
-
protected _transformVertices(vertices: number[]): number[];
|
|
1891
|
+
protected _transformVertices(vertices: number[], vertTransform?: VertTransform): number[];
|
|
1888
1892
|
protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
|
|
1889
1893
|
protected _process(delta: number): void;
|
|
1890
1894
|
}
|
|
@@ -1913,7 +1917,7 @@ declare class BaseElement2DFill extends CoreObject {
|
|
|
1913
1917
|
canDraw(): boolean;
|
|
1914
1918
|
protected _getDrawOptions(): {
|
|
1915
1919
|
disableWrapMode: boolean;
|
|
1916
|
-
|
|
1920
|
+
uvTransform: Transform2D;
|
|
1917
1921
|
};
|
|
1918
1922
|
draw(): void;
|
|
1919
1923
|
}
|
|
@@ -2051,7 +2055,8 @@ declare class BaseElement2D extends Node2D implements Rectangulable {
|
|
|
2051
2055
|
setProperties(properties?: Record<PropertyKey, any>): this;
|
|
2052
2056
|
protected _updateStyleProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2053
2057
|
protected _updateMaskImage(): void;
|
|
2054
|
-
|
|
2058
|
+
getTransformOrigin(): Vector2;
|
|
2059
|
+
getTransform(cb?: (transform: Transform2D) => void): Transform2D;
|
|
2055
2060
|
protected _updateGlobalTransform(): void;
|
|
2056
2061
|
getRect(): Rect2;
|
|
2057
2062
|
protected _updateOverflow(): void;
|
|
@@ -3267,4 +3272,4 @@ interface RenderOptions {
|
|
|
3267
3272
|
declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
|
|
3268
3273
|
|
|
3269
3274
|
export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, Scaler, SceneTree, ScrollBar, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, property, protectedProperty, render, timingFunctions, uid };
|
|
3270
|
-
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, PropertyDeclaration, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
|
|
3275
|
+
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, PropertyDeclaration, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, UVTransform, VectorLike, VectorOperateOutput, VertTransform, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
|