@visactor/vrender 1.0.16 → 1.0.17-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +11 -10
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +379 -379
- package/dist/index.js +379 -379
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +6 -7
package/dist/index.js
CHANGED
|
@@ -29139,6 +29139,302 @@
|
|
|
29139
29139
|
loadGifImageModule || (loadGifImageModule = !0, bind(DefaultCanvasGifImageRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasGifImageRender));
|
|
29140
29140
|
});
|
|
29141
29141
|
|
|
29142
|
+
const browser = isBrowserEnv();
|
|
29143
|
+
|
|
29144
|
+
function _registerArc() {
|
|
29145
|
+
_registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
|
|
29146
|
+
}
|
|
29147
|
+
_registerArc.__loaded = !1;
|
|
29148
|
+
const registerArc = _registerArc;
|
|
29149
|
+
|
|
29150
|
+
function _registerArc3d() {
|
|
29151
|
+
_registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
|
|
29152
|
+
}
|
|
29153
|
+
_registerArc3d.__loaded = !1;
|
|
29154
|
+
const registerArc3d = _registerArc3d;
|
|
29155
|
+
|
|
29156
|
+
function _registerArea() {
|
|
29157
|
+
_registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
|
|
29158
|
+
}
|
|
29159
|
+
_registerArea.__loaded = !1;
|
|
29160
|
+
const registerArea = _registerArea;
|
|
29161
|
+
|
|
29162
|
+
function _registerCircle() {
|
|
29163
|
+
_registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
|
|
29164
|
+
}
|
|
29165
|
+
_registerCircle.__loaded = !1;
|
|
29166
|
+
const registerCircle = _registerCircle;
|
|
29167
|
+
|
|
29168
|
+
function _registerGlyph() {
|
|
29169
|
+
_registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
|
|
29170
|
+
}
|
|
29171
|
+
_registerGlyph.__loaded = !1;
|
|
29172
|
+
const registerGlyph = _registerGlyph;
|
|
29173
|
+
|
|
29174
|
+
function _registerGroup() {
|
|
29175
|
+
_registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
|
|
29176
|
+
}
|
|
29177
|
+
_registerGroup.__loaded = !1;
|
|
29178
|
+
const registerGroup = _registerGroup;
|
|
29179
|
+
|
|
29180
|
+
function _registerImage() {
|
|
29181
|
+
_registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
|
|
29182
|
+
}
|
|
29183
|
+
_registerImage.__loaded = !1;
|
|
29184
|
+
const registerImage = _registerImage;
|
|
29185
|
+
|
|
29186
|
+
function _registerLine() {
|
|
29187
|
+
_registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
|
|
29188
|
+
}
|
|
29189
|
+
_registerLine.__loaded = !1;
|
|
29190
|
+
const registerLine = _registerLine;
|
|
29191
|
+
|
|
29192
|
+
function _registerPath() {
|
|
29193
|
+
_registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
|
|
29194
|
+
}
|
|
29195
|
+
_registerPath.__loaded = !1;
|
|
29196
|
+
const registerPath = _registerPath;
|
|
29197
|
+
|
|
29198
|
+
function _registerPolygon() {
|
|
29199
|
+
_registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
|
|
29200
|
+
}
|
|
29201
|
+
_registerPolygon.__loaded = !1;
|
|
29202
|
+
const registerPolygon = _registerPolygon;
|
|
29203
|
+
|
|
29204
|
+
function _registerPyramid3d() {
|
|
29205
|
+
_registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
|
|
29206
|
+
}
|
|
29207
|
+
_registerPyramid3d.__loaded = !1;
|
|
29208
|
+
const registerPyramid3d = _registerPyramid3d;
|
|
29209
|
+
|
|
29210
|
+
function _registerRect() {
|
|
29211
|
+
_registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
|
|
29212
|
+
}
|
|
29213
|
+
_registerRect.__loaded = !1;
|
|
29214
|
+
const registerRect = _registerRect;
|
|
29215
|
+
|
|
29216
|
+
function _registerRect3d() {
|
|
29217
|
+
_registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
|
|
29218
|
+
}
|
|
29219
|
+
_registerRect3d.__loaded = !1;
|
|
29220
|
+
const registerRect3d = _registerRect3d;
|
|
29221
|
+
|
|
29222
|
+
function _registerRichtext() {
|
|
29223
|
+
_registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
|
|
29224
|
+
}
|
|
29225
|
+
_registerRichtext.__loaded = !1;
|
|
29226
|
+
const registerRichtext = _registerRichtext;
|
|
29227
|
+
|
|
29228
|
+
function _registerShadowRoot() {
|
|
29229
|
+
_registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
|
|
29230
|
+
}
|
|
29231
|
+
_registerShadowRoot.__loaded = !1;
|
|
29232
|
+
const registerShadowRoot = _registerShadowRoot;
|
|
29233
|
+
|
|
29234
|
+
function _registerSymbol() {
|
|
29235
|
+
_registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
|
|
29236
|
+
}
|
|
29237
|
+
_registerSymbol.__loaded = !1;
|
|
29238
|
+
const registerSymbol = _registerSymbol;
|
|
29239
|
+
|
|
29240
|
+
function _registerText() {
|
|
29241
|
+
_registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
|
|
29242
|
+
}
|
|
29243
|
+
_registerText.__loaded = !1;
|
|
29244
|
+
const registerText = _registerText;
|
|
29245
|
+
|
|
29246
|
+
var __decorate$2 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
29247
|
+
var d,
|
|
29248
|
+
c = arguments.length,
|
|
29249
|
+
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
29250
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
29251
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
29252
|
+
},
|
|
29253
|
+
__metadata$1 = undefined && undefined.__metadata || function (k, v) {
|
|
29254
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
29255
|
+
},
|
|
29256
|
+
__param$1 = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
29257
|
+
return function (target, key) {
|
|
29258
|
+
decorator(target, key, paramIndex);
|
|
29259
|
+
};
|
|
29260
|
+
};
|
|
29261
|
+
let DefaultCanvasStarPicker = class extends PickerBase {
|
|
29262
|
+
constructor(canvasRenderer) {
|
|
29263
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "star", this.numberType = STAR_NUMBER_TYPE;
|
|
29264
|
+
}
|
|
29265
|
+
};
|
|
29266
|
+
DefaultCanvasStarPicker = __decorate$2([injectable(), __param$1(0, inject(StarRender)), __metadata$1("design:paramtypes", [Object])], DefaultCanvasStarPicker);
|
|
29267
|
+
|
|
29268
|
+
let loadStarPick = !1;
|
|
29269
|
+
const starCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
29270
|
+
loadStarPick || (loadStarPick = !0, bind(CanvasStarPicker).to(DefaultCanvasStarPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasStarPicker));
|
|
29271
|
+
});
|
|
29272
|
+
|
|
29273
|
+
function _registerStar() {
|
|
29274
|
+
_registerStar.__loaded || (_registerStar.__loaded = !0, registerStarGraphic(), container.load(starModule), container.load(starCanvasPickModule));
|
|
29275
|
+
}
|
|
29276
|
+
_registerStar.__loaded = !1;
|
|
29277
|
+
const registerStar = _registerStar;
|
|
29278
|
+
|
|
29279
|
+
function _registerWrapText() {
|
|
29280
|
+
_registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
|
|
29281
|
+
}
|
|
29282
|
+
_registerWrapText.__loaded = !1;
|
|
29283
|
+
const registerWrapText = _registerWrapText;
|
|
29284
|
+
|
|
29285
|
+
function registerGifGraphic() {
|
|
29286
|
+
graphicCreator.RegisterGraphicCreator("gif", createGifImage);
|
|
29287
|
+
}
|
|
29288
|
+
function _registerGifImage() {
|
|
29289
|
+
_registerGifImage.__loaded || (_registerGifImage.__loaded = !0, registerGifGraphic(), container.load(gifImageModule), container.load(gifImageCanvasPickModule));
|
|
29290
|
+
}
|
|
29291
|
+
_registerGifImage.__loaded = !1;
|
|
29292
|
+
const registerGifImage = _registerGifImage;
|
|
29293
|
+
|
|
29294
|
+
function pseudoRandom(n, seed = 0) {
|
|
29295
|
+
let hash = 3735928559 ^ seed;
|
|
29296
|
+
return hash = (2654435769 ^ hash) + (hash << 6) + (hash >> 2), hash = 3432918353 * (hash ^ n), hash = hash << 15 | hash >>> 17, hash ^= hash << 25, hash += hash << 9, hash ^= hash >> 4, hash ^= hash << 18, hash |= 1, (hash >>> 0) % 2147483647 / 2147483647;
|
|
29297
|
+
}
|
|
29298
|
+
function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29299
|
+
const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
|
|
29300
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
|
|
29301
|
+
return Math.min(1, Math.max(0, _r));
|
|
29302
|
+
}
|
|
29303
|
+
function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29304
|
+
const delay = column / columnCount,
|
|
29305
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
29306
|
+
return Math.min(1, Math.max(0, _r));
|
|
29307
|
+
}
|
|
29308
|
+
function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29309
|
+
const delay = (columnCount - 1 - column) / columnCount,
|
|
29310
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
29311
|
+
return Math.min(1, Math.max(0, _r));
|
|
29312
|
+
}
|
|
29313
|
+
function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29314
|
+
const delay = row / rowCount,
|
|
29315
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
29316
|
+
return Math.min(1, Math.max(0, _r));
|
|
29317
|
+
}
|
|
29318
|
+
function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29319
|
+
const delay = (rowCount - 1 - row) / rowCount,
|
|
29320
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
29321
|
+
return Math.min(1, Math.max(0, _r));
|
|
29322
|
+
}
|
|
29323
|
+
function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29324
|
+
const centerRow = rowCount / 2,
|
|
29325
|
+
centerCol = columnCount / 2,
|
|
29326
|
+
distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
|
|
29327
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
29328
|
+
return Math.min(1, Math.max(0, _r));
|
|
29329
|
+
}
|
|
29330
|
+
function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29331
|
+
const delay = (row / rowCount + column / columnCount) / 2,
|
|
29332
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
29333
|
+
return Math.min(1, Math.max(0, _r));
|
|
29334
|
+
}
|
|
29335
|
+
function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29336
|
+
const centerRow = rowCount / 2,
|
|
29337
|
+
centerCol = columnCount / 2,
|
|
29338
|
+
angle = Math.atan2(row - centerRow, column - centerCol),
|
|
29339
|
+
delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
|
|
29340
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
29341
|
+
return Math.min(1, Math.max(0, _r));
|
|
29342
|
+
}
|
|
29343
|
+
function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29344
|
+
const centerRow = rowCount / 2,
|
|
29345
|
+
centerCol = columnCount / 2,
|
|
29346
|
+
normalizedDistance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)) / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)),
|
|
29347
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
29348
|
+
return Math.min(1, Math.max(0, _r));
|
|
29349
|
+
}
|
|
29350
|
+
function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29351
|
+
const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
|
|
29352
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
|
|
29353
|
+
return Math.min(1, Math.max(0, _r));
|
|
29354
|
+
}
|
|
29355
|
+
function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29356
|
+
const rowPhase = row / rowCount,
|
|
29357
|
+
colPhase = column / columnCount,
|
|
29358
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * rowPhase * Math.PI) * Math.sin(2 * ratio * Math.PI - 2 * colPhase * Math.PI) + 1) / 2;
|
|
29359
|
+
return Math.min(1, Math.max(0, _r));
|
|
29360
|
+
}
|
|
29361
|
+
function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29362
|
+
const centerRow = rowCount / 2,
|
|
29363
|
+
centerCol = columnCount / 2,
|
|
29364
|
+
distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
|
|
29365
|
+
angle = Math.atan2(row - centerRow, column - centerCol),
|
|
29366
|
+
delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
|
|
29367
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
|
|
29368
|
+
return Math.min(1, Math.max(0, _r));
|
|
29369
|
+
}
|
|
29370
|
+
function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29371
|
+
const centerCol = columnCount / 2,
|
|
29372
|
+
distance = Math.abs(column - centerCol) / centerCol,
|
|
29373
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
29374
|
+
return Math.min(1, Math.max(0, _r));
|
|
29375
|
+
}
|
|
29376
|
+
function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29377
|
+
const centerCol = columnCount / 2,
|
|
29378
|
+
distance = 1 - Math.abs(column - centerCol) / centerCol,
|
|
29379
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
29380
|
+
return Math.min(1, Math.max(0, _r));
|
|
29381
|
+
}
|
|
29382
|
+
function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29383
|
+
const centerRow = rowCount / 2,
|
|
29384
|
+
distance = Math.abs(row - centerRow) / centerRow,
|
|
29385
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
29386
|
+
return Math.min(1, Math.max(0, _r));
|
|
29387
|
+
}
|
|
29388
|
+
function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29389
|
+
const centerRow = rowCount / 2,
|
|
29390
|
+
distance = 1 - Math.abs(row - centerRow) / centerRow,
|
|
29391
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
29392
|
+
return Math.min(1, Math.max(0, _r));
|
|
29393
|
+
}
|
|
29394
|
+
function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29395
|
+
const centerRow = rowCount / 2,
|
|
29396
|
+
centerCol = columnCount / 2,
|
|
29397
|
+
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
29398
|
+
normalizedDistance = Math.min(distance, 1),
|
|
29399
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
29400
|
+
return Math.min(1, Math.max(0, _r));
|
|
29401
|
+
}
|
|
29402
|
+
function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29403
|
+
const centerRow = rowCount / 2,
|
|
29404
|
+
centerCol = columnCount / 2,
|
|
29405
|
+
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
29406
|
+
normalizedDistance = 1 - Math.min(distance, 1),
|
|
29407
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
29408
|
+
return Math.min(1, Math.max(0, _r));
|
|
29409
|
+
}
|
|
29410
|
+
function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29411
|
+
const centerRow = rowCount / 2,
|
|
29412
|
+
centerCol = columnCount / 2,
|
|
29413
|
+
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
29414
|
+
normalizedDistance = Math.min(distance, 1),
|
|
29415
|
+
wavePhase = 2 * ratio * Math.PI * 3,
|
|
29416
|
+
decay = Math.max(0, 1 - normalizedDistance),
|
|
29417
|
+
_r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
|
|
29418
|
+
return Math.min(1, Math.max(0, _r));
|
|
29419
|
+
}
|
|
29420
|
+
function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
29421
|
+
const index = row * columnCount + column,
|
|
29422
|
+
phase = 2 * pseudoRandom(index, 0) * Math.PI,
|
|
29423
|
+
speed = .5 * pseudoRandom(index, 1) + .5,
|
|
29424
|
+
direction = 2 * pseudoRandom(index, 2) * Math.PI,
|
|
29425
|
+
centerRow = rowCount / 2,
|
|
29426
|
+
centerCol = columnCount / 2,
|
|
29427
|
+
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
29428
|
+
normalizedDistance = Math.min(distance, 1),
|
|
29429
|
+
scatterRatio = (ratio - .4) / .6,
|
|
29430
|
+
movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
|
|
29431
|
+
distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
|
|
29432
|
+
_r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
|
|
29433
|
+
return Math.min(1, Math.max(0, _r));
|
|
29434
|
+
}
|
|
29435
|
+
|
|
29436
|
+
const roughModule = _roughModule;
|
|
29437
|
+
|
|
29142
29438
|
var lottie = {exports: {}};
|
|
29143
29439
|
|
|
29144
29440
|
(function(module,exports){typeof document!=="undefined"&&typeof navigator!=="undefined"&&function(global,factory){module.exports=factory();}(commonjsGlobal,function(){var svgNS='http://www.w3.org/2000/svg';var locationHref='';var _useWebWorker=false;var initialDefaultFrame=-999999;var setWebWorker=function setWebWorker(flag){_useWebWorker=!!flag;};var getWebWorker=function getWebWorker(){return _useWebWorker;};var setLocationHref=function setLocationHref(value){locationHref=value;};var getLocationHref=function getLocationHref(){return locationHref;};function createTag(type){// return {appendChild:function(){},setAttribute:function(){},style:{}}
|
|
@@ -29822,218 +30118,48 @@
|
|
|
29822
30118
|
}
|
|
29823
30119
|
setAttributes(params, forceUpdateTag, context) {
|
|
29824
30120
|
return params.data && this.initLottieWeb(params.data), super.setAttributes(params, forceUpdateTag, context);
|
|
29825
|
-
}
|
|
29826
|
-
setAttribute(key, value, forceUpdateTag, context) {
|
|
29827
|
-
return "data" === key && this.initLottieWeb(value), super.setAttribute(key, value, forceUpdateTag, context);
|
|
29828
|
-
}
|
|
29829
|
-
getGraphicTheme() {
|
|
29830
|
-
return getTheme(this).rect;
|
|
29831
|
-
}
|
|
29832
|
-
initLottieWeb(data) {
|
|
29833
|
-
if ("browser" !== vglobal.env) return;
|
|
29834
|
-
this.lottieInstance && this.releaseLottieInstance();
|
|
29835
|
-
const theme = this.getGraphicTheme(),
|
|
29836
|
-
{
|
|
29837
|
-
width = theme.width,
|
|
29838
|
-
height = theme.height
|
|
29839
|
-
} = this.attribute,
|
|
29840
|
-
canvas = vglobal.createCanvas({
|
|
29841
|
-
width: width,
|
|
29842
|
-
height: height,
|
|
29843
|
-
dpr: vglobal.devicePixelRatio
|
|
29844
|
-
}),
|
|
29845
|
-
params = {
|
|
29846
|
-
rendererSettings: {
|
|
29847
|
-
context: canvas.getContext("2d")
|
|
29848
|
-
},
|
|
29849
|
-
animType: "canvas",
|
|
29850
|
-
loop: !0
|
|
29851
|
-
};
|
|
29852
|
-
"string" == typeof data ? params.path = data : params.animationData = data, this.lottieInstance = bodymovin.loadAnimation(params), this.canvas = canvas, this.lottieInstance.addEventListener("drawnFrame", this.renderNextFrame);
|
|
29853
|
-
}
|
|
29854
|
-
release() {
|
|
29855
|
-
super.release(), this.releaseLottieInstance();
|
|
29856
|
-
}
|
|
29857
|
-
releaseLottieInstance() {
|
|
29858
|
-
this.lottieInstance.removeEventListener("drawnFrame", this.renderNextFrame), this.lottieInstance.destroy(), this.lottieInstance = null;
|
|
29859
|
-
}
|
|
29860
|
-
}
|
|
29861
|
-
Lottie.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
|
|
29862
|
-
function createLottie(attributes) {
|
|
29863
|
-
return new Lottie(attributes);
|
|
29864
|
-
}
|
|
29865
|
-
|
|
29866
|
-
var __decorate$2 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
29867
|
-
var d,
|
|
29868
|
-
c = arguments.length,
|
|
29869
|
-
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
29870
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
29871
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
29872
|
-
},
|
|
29873
|
-
__metadata$1 = undefined && undefined.__metadata || function (k, v) {
|
|
29874
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
29875
|
-
},
|
|
29876
|
-
__param$1 = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
29877
|
-
return function (target, key) {
|
|
29878
|
-
decorator(target, key, paramIndex);
|
|
29879
|
-
};
|
|
29880
|
-
};
|
|
29881
|
-
let DefaultCanvasLottiePicker = class extends RectPickerBase {
|
|
29882
|
-
constructor(canvasRenderer) {
|
|
29883
|
-
super(), this.canvasRenderer = canvasRenderer;
|
|
29884
|
-
}
|
|
29885
|
-
};
|
|
29886
|
-
DefaultCanvasLottiePicker = __decorate$2([injectable(), __param$1(0, inject(RectRender)), __metadata$1("design:paramtypes", [Object])], DefaultCanvasLottiePicker);
|
|
29887
|
-
|
|
29888
|
-
let loadLottiePick = !1;
|
|
29889
|
-
const lottieCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
29890
|
-
loadLottiePick || (loadLottiePick = !0, bind(CanvasLottiePicker).to(DefaultCanvasLottiePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasLottiePicker));
|
|
29891
|
-
});
|
|
29892
|
-
|
|
29893
|
-
var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
29894
|
-
var d,
|
|
29895
|
-
c = arguments.length,
|
|
29896
|
-
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
29897
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
29898
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
29899
|
-
};
|
|
29900
|
-
let DefaultCanvasLottieRender = class extends exports.DefaultCanvasRectRender {
|
|
29901
|
-
constructor() {
|
|
29902
|
-
super(...arguments), this.numberType = LOTTIE_NUMBER_TYPE;
|
|
29903
|
-
}
|
|
29904
|
-
drawShape(lottie, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
29905
|
-
const _fillCb = fillCb || (() => this._drawShape.call(this, lottie, context, x, y, drawContext, params));
|
|
29906
|
-
super.drawShape(lottie, context, x, y, drawContext, params, _fillCb, strokeCb);
|
|
29907
|
-
}
|
|
29908
|
-
_drawShape(lottie, context, x, y, drawContext, params) {
|
|
29909
|
-
var _a;
|
|
29910
|
-
const lottieAttribute = null !== (_a = this.tempTheme) && void 0 !== _a ? _a : getTheme(lottie, null == params ? void 0 : params.theme).rect,
|
|
29911
|
-
{
|
|
29912
|
-
x: originX = lottieAttribute.x,
|
|
29913
|
-
y: originY = lottieAttribute.y
|
|
29914
|
-
} = lottie.attribute;
|
|
29915
|
-
context.setCommonStyle(lottie, lottie.attribute, originX - x, originY - y, lottieAttribute);
|
|
29916
|
-
const canvas = lottie.canvas;
|
|
29917
|
-
if (canvas) {
|
|
29918
|
-
const pattern = context.createPattern(canvas, "no-repeat"),
|
|
29919
|
-
dpr = context.dpr;
|
|
29920
|
-
pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, x, y])), context.fillStyle = pattern;
|
|
29921
|
-
}
|
|
29922
|
-
context.fill();
|
|
29923
|
-
}
|
|
29924
|
-
};
|
|
29925
|
-
DefaultCanvasLottieRender = __decorate$1([injectable()], DefaultCanvasLottieRender);
|
|
29926
|
-
|
|
29927
|
-
let loadLottieModule = !1;
|
|
29928
|
-
const lottieModule = new ContainerModule(bind => {
|
|
29929
|
-
loadLottieModule || (loadLottieModule = !0, bind(DefaultCanvasLottieRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasLottieRender));
|
|
29930
|
-
});
|
|
29931
|
-
|
|
29932
|
-
const browser = isBrowserEnv();
|
|
29933
|
-
|
|
29934
|
-
function _registerArc() {
|
|
29935
|
-
_registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
|
|
29936
|
-
}
|
|
29937
|
-
_registerArc.__loaded = !1;
|
|
29938
|
-
const registerArc = _registerArc;
|
|
29939
|
-
|
|
29940
|
-
function _registerArc3d() {
|
|
29941
|
-
_registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
|
|
29942
|
-
}
|
|
29943
|
-
_registerArc3d.__loaded = !1;
|
|
29944
|
-
const registerArc3d = _registerArc3d;
|
|
29945
|
-
|
|
29946
|
-
function _registerArea() {
|
|
29947
|
-
_registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
|
|
29948
|
-
}
|
|
29949
|
-
_registerArea.__loaded = !1;
|
|
29950
|
-
const registerArea = _registerArea;
|
|
29951
|
-
|
|
29952
|
-
function _registerCircle() {
|
|
29953
|
-
_registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
|
|
29954
|
-
}
|
|
29955
|
-
_registerCircle.__loaded = !1;
|
|
29956
|
-
const registerCircle = _registerCircle;
|
|
29957
|
-
|
|
29958
|
-
function _registerGlyph() {
|
|
29959
|
-
_registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
|
|
29960
|
-
}
|
|
29961
|
-
_registerGlyph.__loaded = !1;
|
|
29962
|
-
const registerGlyph = _registerGlyph;
|
|
29963
|
-
|
|
29964
|
-
function _registerGroup() {
|
|
29965
|
-
_registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
|
|
29966
|
-
}
|
|
29967
|
-
_registerGroup.__loaded = !1;
|
|
29968
|
-
const registerGroup = _registerGroup;
|
|
29969
|
-
|
|
29970
|
-
function _registerImage() {
|
|
29971
|
-
_registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
|
|
29972
|
-
}
|
|
29973
|
-
_registerImage.__loaded = !1;
|
|
29974
|
-
const registerImage = _registerImage;
|
|
29975
|
-
|
|
29976
|
-
function _registerLine() {
|
|
29977
|
-
_registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
|
|
29978
|
-
}
|
|
29979
|
-
_registerLine.__loaded = !1;
|
|
29980
|
-
const registerLine = _registerLine;
|
|
29981
|
-
|
|
29982
|
-
function _registerPath() {
|
|
29983
|
-
_registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
|
|
29984
|
-
}
|
|
29985
|
-
_registerPath.__loaded = !1;
|
|
29986
|
-
const registerPath = _registerPath;
|
|
29987
|
-
|
|
29988
|
-
function _registerPolygon() {
|
|
29989
|
-
_registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
|
|
29990
|
-
}
|
|
29991
|
-
_registerPolygon.__loaded = !1;
|
|
29992
|
-
const registerPolygon = _registerPolygon;
|
|
29993
|
-
|
|
29994
|
-
function _registerPyramid3d() {
|
|
29995
|
-
_registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
|
|
29996
|
-
}
|
|
29997
|
-
_registerPyramid3d.__loaded = !1;
|
|
29998
|
-
const registerPyramid3d = _registerPyramid3d;
|
|
29999
|
-
|
|
30000
|
-
function _registerRect() {
|
|
30001
|
-
_registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
|
|
30002
|
-
}
|
|
30003
|
-
_registerRect.__loaded = !1;
|
|
30004
|
-
const registerRect = _registerRect;
|
|
30005
|
-
|
|
30006
|
-
function _registerRect3d() {
|
|
30007
|
-
_registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
|
|
30008
|
-
}
|
|
30009
|
-
_registerRect3d.__loaded = !1;
|
|
30010
|
-
const registerRect3d = _registerRect3d;
|
|
30011
|
-
|
|
30012
|
-
function _registerRichtext() {
|
|
30013
|
-
_registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
|
|
30014
|
-
}
|
|
30015
|
-
_registerRichtext.__loaded = !1;
|
|
30016
|
-
const registerRichtext = _registerRichtext;
|
|
30017
|
-
|
|
30018
|
-
function _registerShadowRoot() {
|
|
30019
|
-
_registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
|
|
30020
|
-
}
|
|
30021
|
-
_registerShadowRoot.__loaded = !1;
|
|
30022
|
-
const registerShadowRoot = _registerShadowRoot;
|
|
30023
|
-
|
|
30024
|
-
function _registerSymbol() {
|
|
30025
|
-
_registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
|
|
30121
|
+
}
|
|
30122
|
+
setAttribute(key, value, forceUpdateTag, context) {
|
|
30123
|
+
return "data" === key && this.initLottieWeb(value), super.setAttribute(key, value, forceUpdateTag, context);
|
|
30124
|
+
}
|
|
30125
|
+
getGraphicTheme() {
|
|
30126
|
+
return getTheme(this).rect;
|
|
30127
|
+
}
|
|
30128
|
+
initLottieWeb(data) {
|
|
30129
|
+
if ("browser" !== vglobal.env) return;
|
|
30130
|
+
this.lottieInstance && this.releaseLottieInstance();
|
|
30131
|
+
const theme = this.getGraphicTheme(),
|
|
30132
|
+
{
|
|
30133
|
+
width = theme.width,
|
|
30134
|
+
height = theme.height
|
|
30135
|
+
} = this.attribute,
|
|
30136
|
+
canvas = vglobal.createCanvas({
|
|
30137
|
+
width: width,
|
|
30138
|
+
height: height,
|
|
30139
|
+
dpr: vglobal.devicePixelRatio
|
|
30140
|
+
}),
|
|
30141
|
+
params = {
|
|
30142
|
+
rendererSettings: {
|
|
30143
|
+
context: canvas.getContext("2d")
|
|
30144
|
+
},
|
|
30145
|
+
animType: "canvas",
|
|
30146
|
+
loop: !0
|
|
30147
|
+
};
|
|
30148
|
+
"string" == typeof data ? params.path = data : params.animationData = data, this.lottieInstance = bodymovin.loadAnimation(params), this.canvas = canvas, this.lottieInstance.addEventListener("drawnFrame", this.renderNextFrame);
|
|
30149
|
+
}
|
|
30150
|
+
release() {
|
|
30151
|
+
super.release(), this.releaseLottieInstance();
|
|
30152
|
+
}
|
|
30153
|
+
releaseLottieInstance() {
|
|
30154
|
+
this.lottieInstance.removeEventListener("drawnFrame", this.renderNextFrame), this.lottieInstance.destroy(), this.lottieInstance = null;
|
|
30155
|
+
}
|
|
30026
30156
|
}
|
|
30027
|
-
|
|
30028
|
-
|
|
30029
|
-
|
|
30030
|
-
function _registerText() {
|
|
30031
|
-
_registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
|
|
30157
|
+
Lottie.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
|
|
30158
|
+
function createLottie(attributes) {
|
|
30159
|
+
return new Lottie(attributes);
|
|
30032
30160
|
}
|
|
30033
|
-
_registerText.__loaded = !1;
|
|
30034
|
-
const registerText = _registerText;
|
|
30035
30161
|
|
|
30036
|
-
var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
30162
|
+
var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
30037
30163
|
var d,
|
|
30038
30164
|
c = arguments.length,
|
|
30039
30165
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -30048,182 +30174,56 @@
|
|
|
30048
30174
|
decorator(target, key, paramIndex);
|
|
30049
30175
|
};
|
|
30050
30176
|
};
|
|
30051
|
-
let
|
|
30177
|
+
let DefaultCanvasLottiePicker = class extends RectPickerBase {
|
|
30052
30178
|
constructor(canvasRenderer) {
|
|
30053
|
-
super(), this.canvasRenderer = canvasRenderer
|
|
30179
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
30054
30180
|
}
|
|
30055
30181
|
};
|
|
30056
|
-
|
|
30182
|
+
DefaultCanvasLottiePicker = __decorate$1([injectable(), __param(0, inject(RectRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasLottiePicker);
|
|
30057
30183
|
|
|
30058
|
-
let
|
|
30059
|
-
const
|
|
30060
|
-
|
|
30184
|
+
let loadLottiePick = !1;
|
|
30185
|
+
const lottieCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
30186
|
+
loadLottiePick || (loadLottiePick = !0, bind(CanvasLottiePicker).to(DefaultCanvasLottiePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasLottiePicker));
|
|
30061
30187
|
});
|
|
30062
30188
|
|
|
30063
|
-
function
|
|
30064
|
-
|
|
30065
|
-
|
|
30066
|
-
|
|
30067
|
-
|
|
30068
|
-
|
|
30069
|
-
|
|
30070
|
-
|
|
30071
|
-
|
|
30072
|
-
|
|
30073
|
-
|
|
30074
|
-
|
|
30075
|
-
|
|
30076
|
-
|
|
30077
|
-
|
|
30078
|
-
|
|
30079
|
-
|
|
30080
|
-
|
|
30081
|
-
|
|
30082
|
-
|
|
30083
|
-
|
|
30084
|
-
|
|
30085
|
-
|
|
30086
|
-
|
|
30087
|
-
|
|
30088
|
-
|
|
30089
|
-
|
|
30090
|
-
|
|
30091
|
-
|
|
30092
|
-
|
|
30093
|
-
|
|
30094
|
-
|
|
30095
|
-
|
|
30096
|
-
return Math.min(1, Math.max(0, _r));
|
|
30097
|
-
}
|
|
30098
|
-
function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30099
|
-
const delay = (columnCount - 1 - column) / columnCount,
|
|
30100
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30101
|
-
return Math.min(1, Math.max(0, _r));
|
|
30102
|
-
}
|
|
30103
|
-
function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30104
|
-
const delay = row / rowCount,
|
|
30105
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30106
|
-
return Math.min(1, Math.max(0, _r));
|
|
30107
|
-
}
|
|
30108
|
-
function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30109
|
-
const delay = (rowCount - 1 - row) / rowCount,
|
|
30110
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30111
|
-
return Math.min(1, Math.max(0, _r));
|
|
30112
|
-
}
|
|
30113
|
-
function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30114
|
-
const centerRow = rowCount / 2,
|
|
30115
|
-
centerCol = columnCount / 2,
|
|
30116
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
|
|
30117
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30118
|
-
return Math.min(1, Math.max(0, _r));
|
|
30119
|
-
}
|
|
30120
|
-
function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30121
|
-
const delay = (row / rowCount + column / columnCount) / 2,
|
|
30122
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30123
|
-
return Math.min(1, Math.max(0, _r));
|
|
30124
|
-
}
|
|
30125
|
-
function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30126
|
-
const centerRow = rowCount / 2,
|
|
30127
|
-
centerCol = columnCount / 2,
|
|
30128
|
-
angle = Math.atan2(row - centerRow, column - centerCol),
|
|
30129
|
-
delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
|
|
30130
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30131
|
-
return Math.min(1, Math.max(0, _r));
|
|
30132
|
-
}
|
|
30133
|
-
function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30134
|
-
const centerRow = rowCount / 2,
|
|
30135
|
-
centerCol = columnCount / 2,
|
|
30136
|
-
normalizedDistance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)) / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)),
|
|
30137
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
30138
|
-
return Math.min(1, Math.max(0, _r));
|
|
30139
|
-
}
|
|
30140
|
-
function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30141
|
-
const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
|
|
30142
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
|
|
30143
|
-
return Math.min(1, Math.max(0, _r));
|
|
30144
|
-
}
|
|
30145
|
-
function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30146
|
-
const rowPhase = row / rowCount,
|
|
30147
|
-
colPhase = column / columnCount,
|
|
30148
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * rowPhase * Math.PI) * Math.sin(2 * ratio * Math.PI - 2 * colPhase * Math.PI) + 1) / 2;
|
|
30149
|
-
return Math.min(1, Math.max(0, _r));
|
|
30150
|
-
}
|
|
30151
|
-
function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30152
|
-
const centerRow = rowCount / 2,
|
|
30153
|
-
centerCol = columnCount / 2,
|
|
30154
|
-
distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
|
|
30155
|
-
angle = Math.atan2(row - centerRow, column - centerCol),
|
|
30156
|
-
delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
|
|
30157
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
|
|
30158
|
-
return Math.min(1, Math.max(0, _r));
|
|
30159
|
-
}
|
|
30160
|
-
function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30161
|
-
const centerCol = columnCount / 2,
|
|
30162
|
-
distance = Math.abs(column - centerCol) / centerCol,
|
|
30163
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30164
|
-
return Math.min(1, Math.max(0, _r));
|
|
30165
|
-
}
|
|
30166
|
-
function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30167
|
-
const centerCol = columnCount / 2,
|
|
30168
|
-
distance = 1 - Math.abs(column - centerCol) / centerCol,
|
|
30169
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30170
|
-
return Math.min(1, Math.max(0, _r));
|
|
30171
|
-
}
|
|
30172
|
-
function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30173
|
-
const centerRow = rowCount / 2,
|
|
30174
|
-
distance = Math.abs(row - centerRow) / centerRow,
|
|
30175
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30176
|
-
return Math.min(1, Math.max(0, _r));
|
|
30177
|
-
}
|
|
30178
|
-
function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30179
|
-
const centerRow = rowCount / 2,
|
|
30180
|
-
distance = 1 - Math.abs(row - centerRow) / centerRow,
|
|
30181
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30182
|
-
return Math.min(1, Math.max(0, _r));
|
|
30183
|
-
}
|
|
30184
|
-
function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30185
|
-
const centerRow = rowCount / 2,
|
|
30186
|
-
centerCol = columnCount / 2,
|
|
30187
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
30188
|
-
normalizedDistance = Math.min(distance, 1),
|
|
30189
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
30190
|
-
return Math.min(1, Math.max(0, _r));
|
|
30191
|
-
}
|
|
30192
|
-
function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30193
|
-
const centerRow = rowCount / 2,
|
|
30194
|
-
centerCol = columnCount / 2,
|
|
30195
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
30196
|
-
normalizedDistance = 1 - Math.min(distance, 1),
|
|
30197
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
30198
|
-
return Math.min(1, Math.max(0, _r));
|
|
30199
|
-
}
|
|
30200
|
-
function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30201
|
-
const centerRow = rowCount / 2,
|
|
30202
|
-
centerCol = columnCount / 2,
|
|
30203
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
30204
|
-
normalizedDistance = Math.min(distance, 1),
|
|
30205
|
-
wavePhase = 2 * ratio * Math.PI * 3,
|
|
30206
|
-
decay = Math.max(0, 1 - normalizedDistance),
|
|
30207
|
-
_r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
|
|
30208
|
-
return Math.min(1, Math.max(0, _r));
|
|
30209
|
-
}
|
|
30210
|
-
function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30211
|
-
const index = row * columnCount + column,
|
|
30212
|
-
phase = 2 * pseudoRandom(index, 0) * Math.PI,
|
|
30213
|
-
speed = .5 * pseudoRandom(index, 1) + .5,
|
|
30214
|
-
direction = 2 * pseudoRandom(index, 2) * Math.PI,
|
|
30215
|
-
centerRow = rowCount / 2,
|
|
30216
|
-
centerCol = columnCount / 2,
|
|
30217
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
30218
|
-
normalizedDistance = Math.min(distance, 1),
|
|
30219
|
-
scatterRatio = (ratio - .4) / .6,
|
|
30220
|
-
movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
|
|
30221
|
-
distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
|
|
30222
|
-
_r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
|
|
30223
|
-
return Math.min(1, Math.max(0, _r));
|
|
30224
|
-
}
|
|
30189
|
+
var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
30190
|
+
var d,
|
|
30191
|
+
c = arguments.length,
|
|
30192
|
+
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
30193
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
30194
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
30195
|
+
};
|
|
30196
|
+
let DefaultCanvasLottieRender = class extends exports.DefaultCanvasRectRender {
|
|
30197
|
+
constructor() {
|
|
30198
|
+
super(...arguments), this.numberType = LOTTIE_NUMBER_TYPE;
|
|
30199
|
+
}
|
|
30200
|
+
drawShape(lottie, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
30201
|
+
const _fillCb = fillCb || (() => this._drawShape.call(this, lottie, context, x, y, drawContext, params));
|
|
30202
|
+
super.drawShape(lottie, context, x, y, drawContext, params, _fillCb, strokeCb);
|
|
30203
|
+
}
|
|
30204
|
+
_drawShape(lottie, context, x, y, drawContext, params) {
|
|
30205
|
+
var _a;
|
|
30206
|
+
const lottieAttribute = null !== (_a = this.tempTheme) && void 0 !== _a ? _a : getTheme(lottie, null == params ? void 0 : params.theme).rect,
|
|
30207
|
+
{
|
|
30208
|
+
x: originX = lottieAttribute.x,
|
|
30209
|
+
y: originY = lottieAttribute.y
|
|
30210
|
+
} = lottie.attribute;
|
|
30211
|
+
context.setCommonStyle(lottie, lottie.attribute, originX - x, originY - y, lottieAttribute);
|
|
30212
|
+
const canvas = lottie.canvas;
|
|
30213
|
+
if (canvas) {
|
|
30214
|
+
const pattern = context.createPattern(canvas, "no-repeat"),
|
|
30215
|
+
dpr = context.dpr;
|
|
30216
|
+
pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, x, y])), context.fillStyle = pattern;
|
|
30217
|
+
}
|
|
30218
|
+
context.fill();
|
|
30219
|
+
}
|
|
30220
|
+
};
|
|
30221
|
+
DefaultCanvasLottieRender = __decorate([injectable()], DefaultCanvasLottieRender);
|
|
30225
30222
|
|
|
30226
|
-
|
|
30223
|
+
let loadLottieModule = !1;
|
|
30224
|
+
const lottieModule = new ContainerModule(bind => {
|
|
30225
|
+
loadLottieModule || (loadLottieModule = !0, bind(DefaultCanvasLottieRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasLottieRender));
|
|
30226
|
+
});
|
|
30227
30227
|
|
|
30228
30228
|
class Easing {
|
|
30229
30229
|
constructor() {}
|
|
@@ -36467,7 +36467,7 @@
|
|
|
36467
36467
|
AnimateExecutor.registerBuiltInAnimate("increaseCount", IncreaseCount), AnimateExecutor.registerBuiltInAnimate("fromTo", FromTo), AnimateExecutor.registerBuiltInAnimate("scaleIn", ScaleIn), AnimateExecutor.registerBuiltInAnimate("scaleOut", ScaleOut), AnimateExecutor.registerBuiltInAnimate("growHeightIn", GrowHeightIn), AnimateExecutor.registerBuiltInAnimate("growHeightOut", GrowHeightOut), AnimateExecutor.registerBuiltInAnimate("growWidthIn", GrowWidthIn), AnimateExecutor.registerBuiltInAnimate("growWidthOut", GrowWidthOut), AnimateExecutor.registerBuiltInAnimate("growCenterIn", GrowCenterIn), AnimateExecutor.registerBuiltInAnimate("growCenterOut", GrowCenterOut), AnimateExecutor.registerBuiltInAnimate("clipIn", ClipIn), AnimateExecutor.registerBuiltInAnimate("clipOut", ClipOut), AnimateExecutor.registerBuiltInAnimate("fadeIn", FadeIn), AnimateExecutor.registerBuiltInAnimate("fadeOut", FadeOut), AnimateExecutor.registerBuiltInAnimate("growPointsIn", GrowPointsIn), AnimateExecutor.registerBuiltInAnimate("growPointsOut", GrowPointsOut), AnimateExecutor.registerBuiltInAnimate("growPointsXIn", GrowPointsXIn), AnimateExecutor.registerBuiltInAnimate("growPointsXOut", GrowPointsXOut), AnimateExecutor.registerBuiltInAnimate("growPointsYIn", GrowPointsYIn), AnimateExecutor.registerBuiltInAnimate("growPointsYOut", GrowPointsYOut), AnimateExecutor.registerBuiltInAnimate("growAngleIn", GrowAngleIn), AnimateExecutor.registerBuiltInAnimate("growAngleOut", GrowAngleOut), AnimateExecutor.registerBuiltInAnimate("growRadiusIn", GrowRadiusIn), AnimateExecutor.registerBuiltInAnimate("growRadiusOut", GrowRadiusOut), AnimateExecutor.registerBuiltInAnimate("moveIn", MoveIn), AnimateExecutor.registerBuiltInAnimate("moveOut", MoveOut), AnimateExecutor.registerBuiltInAnimate("rotateIn", RotateIn), AnimateExecutor.registerBuiltInAnimate("rotateOut", RotateOut), AnimateExecutor.registerBuiltInAnimate("update", Update), AnimateExecutor.registerBuiltInAnimate("state", State), AnimateExecutor.registerBuiltInAnimate("labelItemAppear", LabelItemAppear), AnimateExecutor.registerBuiltInAnimate("labelItemDisappear", LabelItemDisappear), AnimateExecutor.registerBuiltInAnimate("poptipAppear", PoptipAppear), AnimateExecutor.registerBuiltInAnimate("poptipDisappear", PoptipDisappear), AnimateExecutor.registerBuiltInAnimate("inputText", InputText), AnimateExecutor.registerBuiltInAnimate("inputRichText", InputRichText), AnimateExecutor.registerBuiltInAnimate("outputRichText", OutputRichText), AnimateExecutor.registerBuiltInAnimate("slideRichText", SlideRichText), AnimateExecutor.registerBuiltInAnimate("slideOutRichText", SlideOutRichText), AnimateExecutor.registerBuiltInAnimate("slideIn", SlideIn), AnimateExecutor.registerBuiltInAnimate("growIn", GrowIn), AnimateExecutor.registerBuiltInAnimate("spinIn", SpinIn), AnimateExecutor.registerBuiltInAnimate("moveScaleIn", MoveScaleIn), AnimateExecutor.registerBuiltInAnimate("moveRotateIn", MoveRotateIn), AnimateExecutor.registerBuiltInAnimate("strokeIn", StrokeIn), AnimateExecutor.registerBuiltInAnimate("slideOut", SlideOut), AnimateExecutor.registerBuiltInAnimate("growOut", GrowOut), AnimateExecutor.registerBuiltInAnimate("spinOut", SpinOut), AnimateExecutor.registerBuiltInAnimate("moveScaleOut", MoveScaleOut), AnimateExecutor.registerBuiltInAnimate("moveRotateOut", MoveRotateOut), AnimateExecutor.registerBuiltInAnimate("strokeOut", StrokeOut), AnimateExecutor.registerBuiltInAnimate("pulse", PulseAnimate), AnimateExecutor.registerBuiltInAnimate("MotionPath", MotionPath), AnimateExecutor.registerBuiltInAnimate("streamLight", StreamLight), AnimateExecutor.registerBuiltInAnimate("dissolve", Dissolve), AnimateExecutor.registerBuiltInAnimate("grayscale", Grayscale), AnimateExecutor.registerBuiltInAnimate("distortion", Distortion), AnimateExecutor.registerBuiltInAnimate("particle", Particle), AnimateExecutor.registerBuiltInAnimate("glitch", Glitch), AnimateExecutor.registerBuiltInAnimate("gaussianBlur", GaussianBlur), AnimateExecutor.registerBuiltInAnimate("pixelation", Pixelation);
|
|
36468
36468
|
};
|
|
36469
36469
|
|
|
36470
|
-
const version = "1.0.
|
|
36470
|
+
const version = "1.0.17-alpha.0";
|
|
36471
36471
|
preLoadAllModule();
|
|
36472
36472
|
if (isBrowserEnv()) {
|
|
36473
36473
|
loadBrowserEnv(container);
|