@visactor/vrender 1.0.15 → 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 +314 -311
- package/dist/index.js +313 -311
- 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 +4 -5
package/dist/index.js
CHANGED
|
@@ -588,7 +588,16 @@
|
|
|
588
588
|
const VGlobal = Symbol.for("VGlobal");
|
|
589
589
|
const DEFAULT_TEXT_FONT_FAMILY = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";
|
|
590
590
|
|
|
591
|
-
|
|
591
|
+
const container = new Container();
|
|
592
|
+
|
|
593
|
+
const RenderService = Symbol.for("RenderService");
|
|
594
|
+
const BeforeRenderConstribution = Symbol.for("BeforeRenderConstribution");
|
|
595
|
+
|
|
596
|
+
class Application {
|
|
597
|
+
get renderService() {
|
|
598
|
+
return this._renderService || (this._renderService = container.get(RenderService)), this._renderService;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
592
601
|
const application = new Application();
|
|
593
602
|
|
|
594
603
|
let idx = 0;
|
|
@@ -5301,8 +5310,6 @@
|
|
|
5301
5310
|
};
|
|
5302
5311
|
exports.DefaultTextMeasureContribution = __decorate$1L([injectable()], exports.DefaultTextMeasureContribution);
|
|
5303
5312
|
|
|
5304
|
-
const container = new Container();
|
|
5305
|
-
|
|
5306
5313
|
const CanvasFactory = Symbol.for("CanvasFactory");
|
|
5307
5314
|
const Context2dFactory = Symbol.for("Context2dFactory");
|
|
5308
5315
|
|
|
@@ -16088,8 +16095,6 @@
|
|
|
16088
16095
|
decorator(target, key, paramIndex);
|
|
16089
16096
|
};
|
|
16090
16097
|
};
|
|
16091
|
-
const RenderService = Symbol.for("RenderService");
|
|
16092
|
-
const BeforeRenderConstribution = Symbol.for("BeforeRenderConstribution");
|
|
16093
16098
|
exports.DefaultRenderService = class DefaultRenderService {
|
|
16094
16099
|
constructor(drawContribution) {
|
|
16095
16100
|
this.drawContribution = drawContribution;
|
|
@@ -16980,8 +16985,6 @@
|
|
|
16980
16985
|
application.transformUtil = transformUtil;
|
|
16981
16986
|
const graphicService = container.get(GraphicService);
|
|
16982
16987
|
application.graphicService = graphicService;
|
|
16983
|
-
const renderService = container.get(RenderService);
|
|
16984
|
-
application.renderService = renderService;
|
|
16985
16988
|
const layerService = container.get(LayerService);
|
|
16986
16989
|
application.layerService = layerService;
|
|
16987
16990
|
|
|
@@ -29136,6 +29139,302 @@
|
|
|
29136
29139
|
loadGifImageModule || (loadGifImageModule = !0, bind(DefaultCanvasGifImageRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasGifImageRender));
|
|
29137
29140
|
});
|
|
29138
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
|
+
|
|
29139
29438
|
var lottie = {exports: {}};
|
|
29140
29439
|
|
|
29141
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:{}}
|
|
@@ -29860,17 +30159,17 @@
|
|
|
29860
30159
|
return new Lottie(attributes);
|
|
29861
30160
|
}
|
|
29862
30161
|
|
|
29863
|
-
var __decorate$
|
|
30162
|
+
var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
29864
30163
|
var d,
|
|
29865
30164
|
c = arguments.length,
|
|
29866
30165
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
29867
30166
|
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);
|
|
29868
30167
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
29869
30168
|
},
|
|
29870
|
-
__metadata
|
|
30169
|
+
__metadata = undefined && undefined.__metadata || function (k, v) {
|
|
29871
30170
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
29872
30171
|
},
|
|
29873
|
-
__param
|
|
30172
|
+
__param = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
29874
30173
|
return function (target, key) {
|
|
29875
30174
|
decorator(target, key, paramIndex);
|
|
29876
30175
|
};
|
|
@@ -29880,14 +30179,14 @@
|
|
|
29880
30179
|
super(), this.canvasRenderer = canvasRenderer;
|
|
29881
30180
|
}
|
|
29882
30181
|
};
|
|
29883
|
-
DefaultCanvasLottiePicker = __decorate$
|
|
30182
|
+
DefaultCanvasLottiePicker = __decorate$1([injectable(), __param(0, inject(RectRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasLottiePicker);
|
|
29884
30183
|
|
|
29885
30184
|
let loadLottiePick = !1;
|
|
29886
30185
|
const lottieCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
29887
30186
|
loadLottiePick || (loadLottiePick = !0, bind(CanvasLottiePicker).to(DefaultCanvasLottiePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasLottiePicker));
|
|
29888
30187
|
});
|
|
29889
30188
|
|
|
29890
|
-
var __decorate
|
|
30189
|
+
var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
29891
30190
|
var d,
|
|
29892
30191
|
c = arguments.length,
|
|
29893
30192
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -29919,309 +30218,13 @@
|
|
|
29919
30218
|
context.fill();
|
|
29920
30219
|
}
|
|
29921
30220
|
};
|
|
29922
|
-
DefaultCanvasLottieRender = __decorate
|
|
30221
|
+
DefaultCanvasLottieRender = __decorate([injectable()], DefaultCanvasLottieRender);
|
|
29923
30222
|
|
|
29924
30223
|
let loadLottieModule = !1;
|
|
29925
30224
|
const lottieModule = new ContainerModule(bind => {
|
|
29926
30225
|
loadLottieModule || (loadLottieModule = !0, bind(DefaultCanvasLottieRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasLottieRender));
|
|
29927
30226
|
});
|
|
29928
30227
|
|
|
29929
|
-
const browser = isBrowserEnv();
|
|
29930
|
-
|
|
29931
|
-
function _registerArc() {
|
|
29932
|
-
_registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
|
|
29933
|
-
}
|
|
29934
|
-
_registerArc.__loaded = !1;
|
|
29935
|
-
const registerArc = _registerArc;
|
|
29936
|
-
|
|
29937
|
-
function _registerArc3d() {
|
|
29938
|
-
_registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
|
|
29939
|
-
}
|
|
29940
|
-
_registerArc3d.__loaded = !1;
|
|
29941
|
-
const registerArc3d = _registerArc3d;
|
|
29942
|
-
|
|
29943
|
-
function _registerArea() {
|
|
29944
|
-
_registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
|
|
29945
|
-
}
|
|
29946
|
-
_registerArea.__loaded = !1;
|
|
29947
|
-
const registerArea = _registerArea;
|
|
29948
|
-
|
|
29949
|
-
function _registerCircle() {
|
|
29950
|
-
_registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
|
|
29951
|
-
}
|
|
29952
|
-
_registerCircle.__loaded = !1;
|
|
29953
|
-
const registerCircle = _registerCircle;
|
|
29954
|
-
|
|
29955
|
-
function _registerGlyph() {
|
|
29956
|
-
_registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
|
|
29957
|
-
}
|
|
29958
|
-
_registerGlyph.__loaded = !1;
|
|
29959
|
-
const registerGlyph = _registerGlyph;
|
|
29960
|
-
|
|
29961
|
-
function _registerGroup() {
|
|
29962
|
-
_registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
|
|
29963
|
-
}
|
|
29964
|
-
_registerGroup.__loaded = !1;
|
|
29965
|
-
const registerGroup = _registerGroup;
|
|
29966
|
-
|
|
29967
|
-
function _registerImage() {
|
|
29968
|
-
_registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
|
|
29969
|
-
}
|
|
29970
|
-
_registerImage.__loaded = !1;
|
|
29971
|
-
const registerImage = _registerImage;
|
|
29972
|
-
|
|
29973
|
-
function _registerLine() {
|
|
29974
|
-
_registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
|
|
29975
|
-
}
|
|
29976
|
-
_registerLine.__loaded = !1;
|
|
29977
|
-
const registerLine = _registerLine;
|
|
29978
|
-
|
|
29979
|
-
function _registerPath() {
|
|
29980
|
-
_registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
|
|
29981
|
-
}
|
|
29982
|
-
_registerPath.__loaded = !1;
|
|
29983
|
-
const registerPath = _registerPath;
|
|
29984
|
-
|
|
29985
|
-
function _registerPolygon() {
|
|
29986
|
-
_registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
|
|
29987
|
-
}
|
|
29988
|
-
_registerPolygon.__loaded = !1;
|
|
29989
|
-
const registerPolygon = _registerPolygon;
|
|
29990
|
-
|
|
29991
|
-
function _registerPyramid3d() {
|
|
29992
|
-
_registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
|
|
29993
|
-
}
|
|
29994
|
-
_registerPyramid3d.__loaded = !1;
|
|
29995
|
-
const registerPyramid3d = _registerPyramid3d;
|
|
29996
|
-
|
|
29997
|
-
function _registerRect() {
|
|
29998
|
-
_registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
|
|
29999
|
-
}
|
|
30000
|
-
_registerRect.__loaded = !1;
|
|
30001
|
-
const registerRect = _registerRect;
|
|
30002
|
-
|
|
30003
|
-
function _registerRect3d() {
|
|
30004
|
-
_registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
|
|
30005
|
-
}
|
|
30006
|
-
_registerRect3d.__loaded = !1;
|
|
30007
|
-
const registerRect3d = _registerRect3d;
|
|
30008
|
-
|
|
30009
|
-
function _registerRichtext() {
|
|
30010
|
-
_registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
|
|
30011
|
-
}
|
|
30012
|
-
_registerRichtext.__loaded = !1;
|
|
30013
|
-
const registerRichtext = _registerRichtext;
|
|
30014
|
-
|
|
30015
|
-
function _registerShadowRoot() {
|
|
30016
|
-
_registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
|
|
30017
|
-
}
|
|
30018
|
-
_registerShadowRoot.__loaded = !1;
|
|
30019
|
-
const registerShadowRoot = _registerShadowRoot;
|
|
30020
|
-
|
|
30021
|
-
function _registerSymbol() {
|
|
30022
|
-
_registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
|
|
30023
|
-
}
|
|
30024
|
-
_registerSymbol.__loaded = !1;
|
|
30025
|
-
const registerSymbol = _registerSymbol;
|
|
30026
|
-
|
|
30027
|
-
function _registerText() {
|
|
30028
|
-
_registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
|
|
30029
|
-
}
|
|
30030
|
-
_registerText.__loaded = !1;
|
|
30031
|
-
const registerText = _registerText;
|
|
30032
|
-
|
|
30033
|
-
var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
30034
|
-
var d,
|
|
30035
|
-
c = arguments.length,
|
|
30036
|
-
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
30037
|
-
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);
|
|
30038
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
30039
|
-
},
|
|
30040
|
-
__metadata = undefined && undefined.__metadata || function (k, v) {
|
|
30041
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
30042
|
-
},
|
|
30043
|
-
__param = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
30044
|
-
return function (target, key) {
|
|
30045
|
-
decorator(target, key, paramIndex);
|
|
30046
|
-
};
|
|
30047
|
-
};
|
|
30048
|
-
let DefaultCanvasStarPicker = class extends PickerBase {
|
|
30049
|
-
constructor(canvasRenderer) {
|
|
30050
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "star", this.numberType = STAR_NUMBER_TYPE;
|
|
30051
|
-
}
|
|
30052
|
-
};
|
|
30053
|
-
DefaultCanvasStarPicker = __decorate([injectable(), __param(0, inject(StarRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasStarPicker);
|
|
30054
|
-
|
|
30055
|
-
let loadStarPick = !1;
|
|
30056
|
-
const starCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
30057
|
-
loadStarPick || (loadStarPick = !0, bind(CanvasStarPicker).to(DefaultCanvasStarPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasStarPicker));
|
|
30058
|
-
});
|
|
30059
|
-
|
|
30060
|
-
function _registerStar() {
|
|
30061
|
-
_registerStar.__loaded || (_registerStar.__loaded = !0, registerStarGraphic(), container.load(starModule), container.load(starCanvasPickModule));
|
|
30062
|
-
}
|
|
30063
|
-
_registerStar.__loaded = !1;
|
|
30064
|
-
const registerStar = _registerStar;
|
|
30065
|
-
|
|
30066
|
-
function _registerWrapText() {
|
|
30067
|
-
_registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
|
|
30068
|
-
}
|
|
30069
|
-
_registerWrapText.__loaded = !1;
|
|
30070
|
-
const registerWrapText = _registerWrapText;
|
|
30071
|
-
|
|
30072
|
-
function registerGifGraphic() {
|
|
30073
|
-
graphicCreator.RegisterGraphicCreator("gif", createGifImage);
|
|
30074
|
-
}
|
|
30075
|
-
function _registerGifImage() {
|
|
30076
|
-
_registerGifImage.__loaded || (_registerGifImage.__loaded = !0, registerGifGraphic(), container.load(gifImageModule), container.load(gifImageCanvasPickModule));
|
|
30077
|
-
}
|
|
30078
|
-
_registerGifImage.__loaded = !1;
|
|
30079
|
-
const registerGifImage = _registerGifImage;
|
|
30080
|
-
|
|
30081
|
-
function pseudoRandom(n, seed = 0) {
|
|
30082
|
-
let hash = 3735928559 ^ seed;
|
|
30083
|
-
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;
|
|
30084
|
-
}
|
|
30085
|
-
function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30086
|
-
const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
|
|
30087
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
|
|
30088
|
-
return Math.min(1, Math.max(0, _r));
|
|
30089
|
-
}
|
|
30090
|
-
function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30091
|
-
const delay = column / columnCount,
|
|
30092
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30093
|
-
return Math.min(1, Math.max(0, _r));
|
|
30094
|
-
}
|
|
30095
|
-
function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30096
|
-
const delay = (columnCount - 1 - column) / columnCount,
|
|
30097
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30098
|
-
return Math.min(1, Math.max(0, _r));
|
|
30099
|
-
}
|
|
30100
|
-
function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30101
|
-
const delay = row / rowCount,
|
|
30102
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30103
|
-
return Math.min(1, Math.max(0, _r));
|
|
30104
|
-
}
|
|
30105
|
-
function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30106
|
-
const delay = (rowCount - 1 - row) / rowCount,
|
|
30107
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30108
|
-
return Math.min(1, Math.max(0, _r));
|
|
30109
|
-
}
|
|
30110
|
-
function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30111
|
-
const centerRow = rowCount / 2,
|
|
30112
|
-
centerCol = columnCount / 2,
|
|
30113
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
|
|
30114
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30115
|
-
return Math.min(1, Math.max(0, _r));
|
|
30116
|
-
}
|
|
30117
|
-
function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30118
|
-
const delay = (row / rowCount + column / columnCount) / 2,
|
|
30119
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30120
|
-
return Math.min(1, Math.max(0, _r));
|
|
30121
|
-
}
|
|
30122
|
-
function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30123
|
-
const centerRow = rowCount / 2,
|
|
30124
|
-
centerCol = columnCount / 2,
|
|
30125
|
-
angle = Math.atan2(row - centerRow, column - centerCol),
|
|
30126
|
-
delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
|
|
30127
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30128
|
-
return Math.min(1, Math.max(0, _r));
|
|
30129
|
-
}
|
|
30130
|
-
function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30131
|
-
const centerRow = rowCount / 2,
|
|
30132
|
-
centerCol = columnCount / 2,
|
|
30133
|
-
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)),
|
|
30134
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
30135
|
-
return Math.min(1, Math.max(0, _r));
|
|
30136
|
-
}
|
|
30137
|
-
function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30138
|
-
const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
|
|
30139
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
|
|
30140
|
-
return Math.min(1, Math.max(0, _r));
|
|
30141
|
-
}
|
|
30142
|
-
function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30143
|
-
const rowPhase = row / rowCount,
|
|
30144
|
-
colPhase = column / columnCount,
|
|
30145
|
-
_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;
|
|
30146
|
-
return Math.min(1, Math.max(0, _r));
|
|
30147
|
-
}
|
|
30148
|
-
function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30149
|
-
const centerRow = rowCount / 2,
|
|
30150
|
-
centerCol = columnCount / 2,
|
|
30151
|
-
distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
|
|
30152
|
-
angle = Math.atan2(row - centerRow, column - centerCol),
|
|
30153
|
-
delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
|
|
30154
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
|
|
30155
|
-
return Math.min(1, Math.max(0, _r));
|
|
30156
|
-
}
|
|
30157
|
-
function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30158
|
-
const centerCol = columnCount / 2,
|
|
30159
|
-
distance = Math.abs(column - centerCol) / centerCol,
|
|
30160
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30161
|
-
return Math.min(1, Math.max(0, _r));
|
|
30162
|
-
}
|
|
30163
|
-
function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30164
|
-
const centerCol = columnCount / 2,
|
|
30165
|
-
distance = 1 - Math.abs(column - centerCol) / centerCol,
|
|
30166
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30167
|
-
return Math.min(1, Math.max(0, _r));
|
|
30168
|
-
}
|
|
30169
|
-
function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30170
|
-
const centerRow = rowCount / 2,
|
|
30171
|
-
distance = Math.abs(row - centerRow) / centerRow,
|
|
30172
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30173
|
-
return Math.min(1, Math.max(0, _r));
|
|
30174
|
-
}
|
|
30175
|
-
function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30176
|
-
const centerRow = rowCount / 2,
|
|
30177
|
-
distance = 1 - Math.abs(row - centerRow) / centerRow,
|
|
30178
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30179
|
-
return Math.min(1, Math.max(0, _r));
|
|
30180
|
-
}
|
|
30181
|
-
function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30182
|
-
const centerRow = rowCount / 2,
|
|
30183
|
-
centerCol = columnCount / 2,
|
|
30184
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
30185
|
-
normalizedDistance = Math.min(distance, 1),
|
|
30186
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
30187
|
-
return Math.min(1, Math.max(0, _r));
|
|
30188
|
-
}
|
|
30189
|
-
function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30190
|
-
const centerRow = rowCount / 2,
|
|
30191
|
-
centerCol = columnCount / 2,
|
|
30192
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
30193
|
-
normalizedDistance = 1 - Math.min(distance, 1),
|
|
30194
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
30195
|
-
return Math.min(1, Math.max(0, _r));
|
|
30196
|
-
}
|
|
30197
|
-
function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30198
|
-
const centerRow = rowCount / 2,
|
|
30199
|
-
centerCol = columnCount / 2,
|
|
30200
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
30201
|
-
normalizedDistance = Math.min(distance, 1),
|
|
30202
|
-
wavePhase = 2 * ratio * Math.PI * 3,
|
|
30203
|
-
decay = Math.max(0, 1 - normalizedDistance),
|
|
30204
|
-
_r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
|
|
30205
|
-
return Math.min(1, Math.max(0, _r));
|
|
30206
|
-
}
|
|
30207
|
-
function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
30208
|
-
const index = row * columnCount + column,
|
|
30209
|
-
phase = 2 * pseudoRandom(index, 0) * Math.PI,
|
|
30210
|
-
speed = .5 * pseudoRandom(index, 1) + .5,
|
|
30211
|
-
direction = 2 * pseudoRandom(index, 2) * Math.PI,
|
|
30212
|
-
centerRow = rowCount / 2,
|
|
30213
|
-
centerCol = columnCount / 2,
|
|
30214
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
30215
|
-
normalizedDistance = Math.min(distance, 1),
|
|
30216
|
-
scatterRatio = (ratio - .4) / .6,
|
|
30217
|
-
movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
|
|
30218
|
-
distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
|
|
30219
|
-
_r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
|
|
30220
|
-
return Math.min(1, Math.max(0, _r));
|
|
30221
|
-
}
|
|
30222
|
-
|
|
30223
|
-
const roughModule = _roughModule;
|
|
30224
|
-
|
|
30225
30228
|
class Easing {
|
|
30226
30229
|
constructor() {}
|
|
30227
30230
|
static linear(t) {
|
|
@@ -36464,7 +36467,7 @@
|
|
|
36464
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);
|
|
36465
36468
|
};
|
|
36466
36469
|
|
|
36467
|
-
const version = "1.0.
|
|
36470
|
+
const version = "1.0.17-alpha.0";
|
|
36468
36471
|
preLoadAllModule();
|
|
36469
36472
|
if (isBrowserEnv()) {
|
|
36470
36473
|
loadBrowserEnv(container);
|
|
@@ -37174,7 +37177,6 @@
|
|
|
37174
37177
|
exports.registerWrapText = registerWrapText;
|
|
37175
37178
|
exports.registerWrapTextGraphic = registerWrapTextGraphic;
|
|
37176
37179
|
exports.renderCommandList = renderCommandList;
|
|
37177
|
-
exports.renderService = renderService;
|
|
37178
37180
|
exports.rewriteProto = rewriteProto;
|
|
37179
37181
|
exports.richTextMathPickModule = richTextMathPickModule;
|
|
37180
37182
|
exports.richtextCanvasPickModule = richtextCanvasPickModule;
|