@visactor/vrender-core 0.23.0-alpha.3 → 1.0.0-alpha.2
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/common/diff.d.ts +1 -0
- package/cjs/common/diff.js +19 -0
- package/cjs/common/diff.js.map +1 -0
- package/cjs/common/enums.d.ts +0 -16
- package/cjs/common/enums.js +4 -12
- package/cjs/common/enums.js.map +1 -1
- package/cjs/common/split-path.js +1 -2
- package/cjs/common/store.js +2 -1
- package/cjs/core/global-module.js +2 -0
- package/cjs/core/stage.js +1 -1
- package/cjs/core/stage.js.map +1 -1
- package/cjs/event/event-system.js +6 -7
- package/cjs/event/event-system.js.map +1 -1
- package/cjs/event/federated-event/base-event.js +1 -1
- package/cjs/event/federated-event/base-event.js.map +1 -1
- package/cjs/graphic/graphic.d.ts +3 -9
- package/cjs/graphic/graphic.js +13 -80
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/graphic/richtext/paragraph.d.ts +3 -0
- package/cjs/graphic/richtext/paragraph.js +14 -10
- package/cjs/graphic/richtext/paragraph.js.map +1 -1
- package/cjs/graphic/richtext/utils.js +12 -2
- package/cjs/graphic/richtext/utils.js.map +1 -1
- package/cjs/graphic/richtext.d.ts +3 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +7 -6
- package/cjs/index.js.map +1 -1
- package/cjs/interface/animate.d.ts +1 -165
- package/cjs/interface/animate.js +1 -4
- package/cjs/interface/animate.js.map +1 -1
- package/cjs/interface/animation/animate.d.ts +100 -0
- package/cjs/interface/animation/animate.js +10 -0
- package/cjs/interface/animation/animate.js.map +1 -0
- package/cjs/interface/animation/easing.d.ts +3 -0
- package/cjs/interface/animation/easing.js +6 -0
- package/cjs/interface/animation/easing.js.map +1 -0
- package/cjs/interface/animation/index.d.ts +5 -0
- package/cjs/interface/animation/index.js +23 -0
- package/cjs/interface/animation/index.js.map +1 -0
- package/cjs/interface/animation/ticker.d.ts +37 -0
- package/cjs/interface/animation/ticker.js +11 -0
- package/cjs/interface/animation/ticker.js.map +1 -0
- package/cjs/interface/animation/timeline.d.ts +17 -0
- package/cjs/interface/animation/timeline.js +6 -0
- package/cjs/interface/animation/timeline.js.map +1 -0
- package/cjs/interface/animation/type.d.ts +13 -0
- package/cjs/interface/animation/type.js +15 -0
- package/cjs/interface/animation/type.js.map +1 -0
- package/cjs/interface/graphic/richText.d.ts +3 -0
- package/cjs/interface/graphic/richText.js.map +1 -1
- package/cjs/interface/graphic.d.ts +1 -1
- package/cjs/interface/graphic.js.map +1 -1
- package/cjs/interface/index.d.ts +1 -1
- package/cjs/interface/index.js +1 -1
- package/cjs/interface/index.js.map +1 -1
- package/cjs/interface/stage.d.ts +1 -1
- package/cjs/interface/stage.js.map +1 -1
- package/cjs/plugins/builtin-plugin/edit-module.js +11 -8
- package/cjs/plugins/builtin-plugin/edit-module.js.map +1 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +1 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/dist/index.es.js +348 -425
- package/es/common/diff.d.ts +1 -0
- package/es/common/diff.js +11 -0
- package/es/common/diff.js.map +1 -0
- package/es/common/enums.d.ts +0 -16
- package/es/common/enums.js +2 -21
- package/es/common/enums.js.map +1 -1
- package/es/common/split-path.js +1 -2
- package/es/common/store.js +2 -1
- package/es/core/global-module.js +2 -0
- package/es/core/stage.js +1 -1
- package/es/core/stage.js.map +1 -1
- package/es/event/event-system.js +6 -7
- package/es/event/event-system.js.map +1 -1
- package/es/event/federated-event/base-event.js +1 -1
- package/es/event/federated-event/base-event.js.map +1 -1
- package/es/graphic/graphic.d.ts +3 -9
- package/es/graphic/graphic.js +13 -82
- package/es/graphic/graphic.js.map +1 -1
- package/es/graphic/richtext/paragraph.d.ts +3 -0
- package/es/graphic/richtext/paragraph.js +14 -10
- package/es/graphic/richtext/paragraph.js.map +1 -1
- package/es/graphic/richtext/utils.js +12 -2
- package/es/graphic/richtext/utils.js.map +1 -1
- package/es/graphic/richtext.d.ts +3 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -0
- package/es/index.js.map +1 -1
- package/es/interface/animate.d.ts +1 -165
- package/es/interface/animate.js +2 -1
- package/es/interface/animate.js.map +1 -1
- package/es/interface/animation/animate.d.ts +100 -0
- package/es/interface/animation/animate.js +6 -0
- package/es/interface/animation/animate.js.map +1 -0
- package/es/interface/animation/easing.d.ts +3 -0
- package/es/interface/animation/easing.js +2 -0
- package/es/interface/animation/easing.js.map +1 -0
- package/es/interface/animation/index.d.ts +5 -0
- package/es/interface/animation/index.js +10 -0
- package/es/interface/animation/index.js.map +1 -0
- package/es/interface/animation/ticker.d.ts +37 -0
- package/es/interface/animation/ticker.js +7 -0
- package/es/interface/animation/ticker.js.map +1 -0
- package/es/interface/animation/timeline.d.ts +17 -0
- package/es/interface/animation/timeline.js +2 -0
- package/es/interface/animation/timeline.js.map +1 -0
- package/es/interface/animation/type.d.ts +13 -0
- package/es/interface/animation/type.js +14 -0
- package/es/interface/animation/type.js.map +1 -0
- package/es/interface/graphic/richText.d.ts +3 -0
- package/es/interface/graphic/richText.js.map +1 -1
- package/es/interface/graphic.d.ts +1 -1
- package/es/interface/graphic.js.map +1 -1
- package/es/interface/index.d.ts +1 -1
- package/es/interface/index.js +1 -1
- package/es/interface/index.js.map +1 -1
- package/es/interface/stage.d.ts +1 -1
- package/es/interface/stage.js.map +1 -1
- package/es/plugins/builtin-plugin/edit-module.js +11 -8
- package/es/plugins/builtin-plugin/edit-module.js.map +1 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js +1 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, PointService, Point, abs, max, min, atan2, epsilon, Matrix, pi2, Logger, pi, isArray, isPointInLine, isNumberClose, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, isString, has, isUndefined,
|
|
1
|
+
import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, PointService, Point, abs, max, min, atan2, epsilon, Matrix, pi2, Logger, pi, isArray, isPointInLine, isNumberClose, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, isString, has, isUndefined, cos, sin, pointAt, isNumber, sqrt, OBBBounds, isNil, normalTransform, isValidUrl, isBase64, acos, Color, DEFAULT_COLORS, LRU, lowerCamelCaseToMiddle, isValid, transformBoundsWithMatrix, getContextFont, rotatePoint, clampAngleByRadian, asin, arrayEqual, Bounds, getRectIntersect, isRectIntersect, isEqual, getAngleByPoint, getIntersectPoint, merge, calculateAnchorOfBounds, styleStringToObject } from '@visactor/vutils';
|
|
2
2
|
|
|
3
3
|
class Generator {
|
|
4
4
|
static GenAutoIncrementId() {
|
|
@@ -1280,6 +1280,34 @@ const strCommandMap = [
|
|
|
1280
1280
|
'rect'
|
|
1281
1281
|
];
|
|
1282
1282
|
|
|
1283
|
+
var AnimateMode;
|
|
1284
|
+
(function (AnimateMode) {
|
|
1285
|
+
AnimateMode[AnimateMode["NORMAL"] = 0] = "NORMAL";
|
|
1286
|
+
AnimateMode[AnimateMode["SET_ATTR_IMMEDIATELY"] = 1] = "SET_ATTR_IMMEDIATELY";
|
|
1287
|
+
})(AnimateMode || (AnimateMode = {}));
|
|
1288
|
+
|
|
1289
|
+
var STATUS$1;
|
|
1290
|
+
(function (STATUS) {
|
|
1291
|
+
STATUS[STATUS["INITIAL"] = 0] = "INITIAL";
|
|
1292
|
+
STATUS[STATUS["RUNNING"] = 1] = "RUNNING";
|
|
1293
|
+
STATUS[STATUS["PAUSE"] = 2] = "PAUSE";
|
|
1294
|
+
})(STATUS$1 || (STATUS$1 = {}));
|
|
1295
|
+
|
|
1296
|
+
var AnimateStepType;
|
|
1297
|
+
(function (AnimateStepType) {
|
|
1298
|
+
AnimateStepType["wait"] = "wait";
|
|
1299
|
+
AnimateStepType["from"] = "from";
|
|
1300
|
+
AnimateStepType["to"] = "to";
|
|
1301
|
+
AnimateStepType["customAnimate"] = "customAnimate";
|
|
1302
|
+
})(AnimateStepType || (AnimateStepType = {}));
|
|
1303
|
+
var AnimateStatus;
|
|
1304
|
+
(function (AnimateStatus) {
|
|
1305
|
+
AnimateStatus[AnimateStatus["INITIAL"] = 0] = "INITIAL";
|
|
1306
|
+
AnimateStatus[AnimateStatus["RUNNING"] = 1] = "RUNNING";
|
|
1307
|
+
AnimateStatus[AnimateStatus["PAUSED"] = 2] = "PAUSED";
|
|
1308
|
+
AnimateStatus[AnimateStatus["END"] = 3] = "END";
|
|
1309
|
+
})(AnimateStatus || (AnimateStatus = {}));
|
|
1310
|
+
|
|
1283
1311
|
const circleThreshold = tau - 1e-8;
|
|
1284
1312
|
class BoundsContext {
|
|
1285
1313
|
constructor(bounds) {
|
|
@@ -1541,25 +1569,6 @@ var AttributeUpdateType;
|
|
|
1541
1569
|
AttributeUpdateType[AttributeUpdateType["ROTATE"] = 24] = "ROTATE";
|
|
1542
1570
|
AttributeUpdateType[AttributeUpdateType["ROTATE_TO"] = 25] = "ROTATE_TO";
|
|
1543
1571
|
})(AttributeUpdateType || (AttributeUpdateType = {}));
|
|
1544
|
-
var AnimateStatus;
|
|
1545
|
-
(function (AnimateStatus) {
|
|
1546
|
-
AnimateStatus[AnimateStatus["INITIAL"] = 0] = "INITIAL";
|
|
1547
|
-
AnimateStatus[AnimateStatus["RUNNING"] = 1] = "RUNNING";
|
|
1548
|
-
AnimateStatus[AnimateStatus["PAUSED"] = 2] = "PAUSED";
|
|
1549
|
-
AnimateStatus[AnimateStatus["END"] = 3] = "END";
|
|
1550
|
-
})(AnimateStatus || (AnimateStatus = {}));
|
|
1551
|
-
var AnimateMode;
|
|
1552
|
-
(function (AnimateMode) {
|
|
1553
|
-
AnimateMode[AnimateMode["NORMAL"] = 0] = "NORMAL";
|
|
1554
|
-
AnimateMode[AnimateMode["SET_ATTR_IMMEDIATELY"] = 1] = "SET_ATTR_IMMEDIATELY";
|
|
1555
|
-
})(AnimateMode || (AnimateMode = {}));
|
|
1556
|
-
var AnimateStepType;
|
|
1557
|
-
(function (AnimateStepType) {
|
|
1558
|
-
AnimateStepType["wait"] = "wait";
|
|
1559
|
-
AnimateStepType["from"] = "from";
|
|
1560
|
-
AnimateStepType["to"] = "to";
|
|
1561
|
-
AnimateStepType["customAnimate"] = "customAnimate";
|
|
1562
|
-
})(AnimateStepType || (AnimateStepType = {}));
|
|
1563
1572
|
var Direction;
|
|
1564
1573
|
(function (Direction) {
|
|
1565
1574
|
Direction[Direction["ROW"] = 1] = "ROW";
|
|
@@ -3933,6 +3942,9 @@ function applyStrokeStyle(ctx, character) {
|
|
|
3933
3942
|
setTextStyle(ctx, character);
|
|
3934
3943
|
}
|
|
3935
3944
|
function getStrByWithCanvas(desc, width, character, guessIndex, needTestLetter) {
|
|
3945
|
+
if (desc.length <= 1) {
|
|
3946
|
+
return 0;
|
|
3947
|
+
}
|
|
3936
3948
|
if (!width || width <= 0) {
|
|
3937
3949
|
return 0;
|
|
3938
3950
|
}
|
|
@@ -4013,6 +4025,15 @@ function testLetter2(string, index) {
|
|
|
4013
4025
|
return i + 1;
|
|
4014
4026
|
}
|
|
4015
4027
|
function measureTextCanvas(text, character, mode = 'actual') {
|
|
4028
|
+
var _a;
|
|
4029
|
+
if (text === '') {
|
|
4030
|
+
return {
|
|
4031
|
+
ascent: 0,
|
|
4032
|
+
height: 0,
|
|
4033
|
+
descent: 0,
|
|
4034
|
+
width: 0
|
|
4035
|
+
};
|
|
4036
|
+
}
|
|
4016
4037
|
const textMeasure = application.graphicUtil.textMeasure;
|
|
4017
4038
|
const measurement = textMeasure.measureText(text, character);
|
|
4018
4039
|
const result = {
|
|
@@ -4035,6 +4056,8 @@ function measureTextCanvas(text, character, mode = 'actual') {
|
|
|
4035
4056
|
result.ascent = Math.floor(ascent);
|
|
4036
4057
|
result.descent = result.height - result.ascent;
|
|
4037
4058
|
}
|
|
4059
|
+
const space = (_a = character.space) !== null && _a !== void 0 ? _a : 0;
|
|
4060
|
+
result.width += space;
|
|
4038
4061
|
return result;
|
|
4039
4062
|
}
|
|
4040
4063
|
|
|
@@ -6457,7 +6480,7 @@ class FederatedEvent {
|
|
|
6457
6480
|
}
|
|
6458
6481
|
_composedDetailPath(params) {
|
|
6459
6482
|
if (params && params.graphic) {
|
|
6460
|
-
const g =
|
|
6483
|
+
const g = params.graphic;
|
|
6461
6484
|
if (g.stage) {
|
|
6462
6485
|
const path = g.stage.eventSystem.manager.propagationPath(g);
|
|
6463
6486
|
this.detailPath.push(path);
|
|
@@ -7452,32 +7475,22 @@ class EventSystem {
|
|
|
7452
7475
|
this.eventsAdded = true;
|
|
7453
7476
|
}
|
|
7454
7477
|
removeEvents() {
|
|
7478
|
+
var _a;
|
|
7455
7479
|
if (!this.eventsAdded || !this.domElement) {
|
|
7456
7480
|
return;
|
|
7457
7481
|
}
|
|
7458
7482
|
const { globalObj, domElement } = this;
|
|
7483
|
+
const globalDocument = (_a = globalObj.getDocument()) !== null && _a !== void 0 ? _a : domElement;
|
|
7459
7484
|
if (this.supportsPointerEvents) {
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
globalObj.getDocument().removeEventListener('pointerup', this.onPointerUp, true);
|
|
7463
|
-
}
|
|
7464
|
-
else {
|
|
7465
|
-
domElement.removeEventListener('pointermove', this.onPointerMove, true);
|
|
7466
|
-
domElement.removeEventListener('pointerup', this.onPointerUp, true);
|
|
7467
|
-
}
|
|
7485
|
+
globalDocument.removeEventListener('pointermove', this.onPointerMove, true);
|
|
7486
|
+
globalDocument.removeEventListener('pointerup', this.onPointerUp, true);
|
|
7468
7487
|
domElement.removeEventListener('pointerdown', this.onPointerDown, true);
|
|
7469
7488
|
domElement.removeEventListener('pointerleave', this.onPointerOverOut, true);
|
|
7470
7489
|
domElement.removeEventListener('pointerover', this.onPointerOverOut, true);
|
|
7471
7490
|
}
|
|
7472
7491
|
else {
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
globalObj.getDocument().removeEventListener('mouseup', this.onPointerUp, true);
|
|
7476
|
-
}
|
|
7477
|
-
else {
|
|
7478
|
-
domElement.removeEventListener('mousemove', this.onPointerMove, true);
|
|
7479
|
-
domElement.removeEventListener('mouseup', this.onPointerUp, true);
|
|
7480
|
-
}
|
|
7492
|
+
globalDocument.removeEventListener('mousemove', this.onPointerMove, true);
|
|
7493
|
+
globalDocument.removeEventListener('mouseup', this.onPointerUp, true);
|
|
7481
7494
|
domElement.removeEventListener('mousedown', this.onPointerDown, true);
|
|
7482
7495
|
domElement.removeEventListener('mouseout', this.onPointerOverOut, true);
|
|
7483
7496
|
domElement.removeEventListener('mouseover', this.onPointerOverOut, true);
|
|
@@ -7723,234 +7736,6 @@ class EventSystem {
|
|
|
7723
7736
|
}
|
|
7724
7737
|
}
|
|
7725
7738
|
|
|
7726
|
-
function colorEqual(color1, color2) {
|
|
7727
|
-
const c1 = Color.parseColorString(color1);
|
|
7728
|
-
const c2 = Color.parseColorString(color2);
|
|
7729
|
-
return c1 && c2 ? c1.r === c2.r && c1.g === c2.g && c1.b === c2.b && c1.opacity === c2.opacity : false;
|
|
7730
|
-
}
|
|
7731
|
-
var ColorType;
|
|
7732
|
-
(function (ColorType) {
|
|
7733
|
-
ColorType[ColorType["Color255"] = 0] = "Color255";
|
|
7734
|
-
ColorType[ColorType["Color1"] = 1] = "Color1";
|
|
7735
|
-
})(ColorType || (ColorType = {}));
|
|
7736
|
-
class ColorStore {
|
|
7737
|
-
static Get(str, size = ColorType.Color1, arr = [0, 0, 0, 1]) {
|
|
7738
|
-
if (size === ColorType.Color1) {
|
|
7739
|
-
const color = ColorStore.store1[str];
|
|
7740
|
-
if (color) {
|
|
7741
|
-
arr[0] = color[0];
|
|
7742
|
-
arr[1] = color[1];
|
|
7743
|
-
arr[2] = color[2];
|
|
7744
|
-
arr[3] = color[3];
|
|
7745
|
-
return arr;
|
|
7746
|
-
}
|
|
7747
|
-
const c = Color.parseColorString(str);
|
|
7748
|
-
if (c) {
|
|
7749
|
-
const data = [c.r / 255, c.g / 255, c.b / 255, c.opacity];
|
|
7750
|
-
ColorStore.store1[str] = data;
|
|
7751
|
-
ColorStore.store255[str] = [c.r, c.g, c.b, c.opacity];
|
|
7752
|
-
arr[0] = data[0];
|
|
7753
|
-
arr[1] = data[1];
|
|
7754
|
-
arr[2] = data[2];
|
|
7755
|
-
arr[3] = data[3];
|
|
7756
|
-
}
|
|
7757
|
-
return arr;
|
|
7758
|
-
}
|
|
7759
|
-
const color = ColorStore.store255[str];
|
|
7760
|
-
if (color) {
|
|
7761
|
-
arr[0] = color[0];
|
|
7762
|
-
arr[1] = color[1];
|
|
7763
|
-
arr[2] = color[2];
|
|
7764
|
-
arr[3] = color[3];
|
|
7765
|
-
return arr;
|
|
7766
|
-
}
|
|
7767
|
-
const c = Color.parseColorString(str);
|
|
7768
|
-
if (c) {
|
|
7769
|
-
ColorStore.store1[str] = [c.r / 255, c.g / 255, c.b / 255, c.opacity];
|
|
7770
|
-
ColorStore.store255[str] = [c.r, c.g, c.b, c.opacity];
|
|
7771
|
-
arr[0] = c.r;
|
|
7772
|
-
arr[1] = c.g;
|
|
7773
|
-
arr[2] = c.b;
|
|
7774
|
-
arr[3] = c.opacity;
|
|
7775
|
-
}
|
|
7776
|
-
return arr;
|
|
7777
|
-
}
|
|
7778
|
-
static Set(str, size, arr) {
|
|
7779
|
-
if (size === ColorType.Color1) {
|
|
7780
|
-
if (ColorStore.store1[str]) {
|
|
7781
|
-
return;
|
|
7782
|
-
}
|
|
7783
|
-
ColorStore.store1[str] = arr;
|
|
7784
|
-
ColorStore.store255[str] = [
|
|
7785
|
-
Math.floor(arr[0] * 255),
|
|
7786
|
-
Math.floor(arr[1] * 255),
|
|
7787
|
-
Math.floor(arr[2] * 255),
|
|
7788
|
-
Math.floor(arr[3] * 255)
|
|
7789
|
-
];
|
|
7790
|
-
}
|
|
7791
|
-
else {
|
|
7792
|
-
if (ColorStore.store255[str]) {
|
|
7793
|
-
return;
|
|
7794
|
-
}
|
|
7795
|
-
ColorStore.store255[str] = arr;
|
|
7796
|
-
ColorStore.store1[str] = [arr[0] / 255, arr[1] / 255, arr[2] / 255, arr[3]];
|
|
7797
|
-
}
|
|
7798
|
-
}
|
|
7799
|
-
}
|
|
7800
|
-
ColorStore.store255 = {};
|
|
7801
|
-
ColorStore.store1 = {};
|
|
7802
|
-
|
|
7803
|
-
function colorArrayToString(color, alphaChannel = false) {
|
|
7804
|
-
if (Array.isArray(color) && isNumber(color[0])) {
|
|
7805
|
-
return alphaChannel
|
|
7806
|
-
? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})`
|
|
7807
|
-
: `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})`;
|
|
7808
|
-
}
|
|
7809
|
-
return color;
|
|
7810
|
-
}
|
|
7811
|
-
function interpolateColor(from, to, ratio, alphaChannel, cb) {
|
|
7812
|
-
if ((Array.isArray(from) && !isNumber(from[0])) || (Array.isArray(to) && !isNumber(to[0]))) {
|
|
7813
|
-
const out = new Array(4).fill(0).map((_, index) => {
|
|
7814
|
-
return _interpolateColor(isArray(from) ? from[index] : from, isArray(to) ? to[index] : to, ratio, alphaChannel);
|
|
7815
|
-
});
|
|
7816
|
-
return out;
|
|
7817
|
-
}
|
|
7818
|
-
return _interpolateColor(from, to, ratio, alphaChannel, cb);
|
|
7819
|
-
}
|
|
7820
|
-
function _interpolateColor(from, to, ratio, alphaChannel, cb) {
|
|
7821
|
-
if (!(from && to)) {
|
|
7822
|
-
return (from && colorArrayToString(from)) || (to && colorArrayToString(to)) || false;
|
|
7823
|
-
}
|
|
7824
|
-
let fromArray;
|
|
7825
|
-
let toArray;
|
|
7826
|
-
let fromGradient = false;
|
|
7827
|
-
let toGradient = false;
|
|
7828
|
-
if (Array.isArray(from)) {
|
|
7829
|
-
fromArray = from;
|
|
7830
|
-
}
|
|
7831
|
-
else if (typeof from === 'string') {
|
|
7832
|
-
fromArray = ColorStore.Get(from, ColorType.Color255);
|
|
7833
|
-
}
|
|
7834
|
-
else {
|
|
7835
|
-
fromGradient = true;
|
|
7836
|
-
}
|
|
7837
|
-
if (Array.isArray(to)) {
|
|
7838
|
-
toArray = to;
|
|
7839
|
-
}
|
|
7840
|
-
else if (typeof to === 'string') {
|
|
7841
|
-
toArray = ColorStore.Get(to, ColorType.Color255);
|
|
7842
|
-
}
|
|
7843
|
-
else {
|
|
7844
|
-
toGradient = true;
|
|
7845
|
-
}
|
|
7846
|
-
if (fromGradient !== toGradient) {
|
|
7847
|
-
const gradient = (fromGradient ? from : to);
|
|
7848
|
-
const pure = (fromGradient ? to : from);
|
|
7849
|
-
const gradientFromPure = Object.assign(Object.assign({}, gradient), { stops: gradient.stops.map(v => (Object.assign(Object.assign({}, v), { color: colorArrayToString(pure) }))) });
|
|
7850
|
-
return fromGradient
|
|
7851
|
-
? interpolateColor(gradient, gradientFromPure, ratio, alphaChannel, cb)
|
|
7852
|
-
: interpolateColor(gradientFromPure, gradient, ratio, alphaChannel, cb);
|
|
7853
|
-
}
|
|
7854
|
-
if (fromGradient) {
|
|
7855
|
-
if (from.gradient === to.gradient) {
|
|
7856
|
-
const fc = from;
|
|
7857
|
-
const tc = to;
|
|
7858
|
-
const fromStops = fc.stops;
|
|
7859
|
-
const toStops = tc.stops;
|
|
7860
|
-
if (fromStops.length !== toStops.length) {
|
|
7861
|
-
return false;
|
|
7862
|
-
}
|
|
7863
|
-
if (fc.gradient === 'linear') {
|
|
7864
|
-
return interpolateGradientLinearColor(fc, tc, ratio);
|
|
7865
|
-
}
|
|
7866
|
-
else if (fc.gradient === 'radial') {
|
|
7867
|
-
return interpolateGradientRadialColor(fc, tc, ratio);
|
|
7868
|
-
}
|
|
7869
|
-
else if (fc.gradient === 'conical') {
|
|
7870
|
-
return interpolateGradientConicalColor(fc, tc, ratio);
|
|
7871
|
-
}
|
|
7872
|
-
}
|
|
7873
|
-
return false;
|
|
7874
|
-
}
|
|
7875
|
-
cb && cb(fromArray, toArray);
|
|
7876
|
-
const result = interpolatePureColorArray(fromArray, toArray, ratio);
|
|
7877
|
-
return colorArrayToString(result, alphaChannel);
|
|
7878
|
-
}
|
|
7879
|
-
function interpolateGradientLinearColor(fc, tc, ratio) {
|
|
7880
|
-
const fStops = fc.stops;
|
|
7881
|
-
const tStops = tc.stops;
|
|
7882
|
-
const color = {
|
|
7883
|
-
gradient: 'linear',
|
|
7884
|
-
x0: fc.x0 + (tc.x0 - fc.x0) * ratio,
|
|
7885
|
-
x1: fc.x1 + (tc.x1 - fc.x1) * ratio,
|
|
7886
|
-
y0: fc.y0 + (tc.y0 - fc.y0) * ratio,
|
|
7887
|
-
y1: fc.y1 + (tc.y1 - fc.y1) * ratio,
|
|
7888
|
-
stops: new Array(fStops.length).fill(0).map((_, i) => {
|
|
7889
|
-
return {
|
|
7890
|
-
color: colorStringInterpolationToStr(fStops[i].color, tStops[i].color, ratio),
|
|
7891
|
-
offset: fStops[i].offset + (tStops[i].offset - fStops[i].offset) * ratio
|
|
7892
|
-
};
|
|
7893
|
-
})
|
|
7894
|
-
};
|
|
7895
|
-
return color;
|
|
7896
|
-
}
|
|
7897
|
-
function interpolateGradientRadialColor(fc, tc, ratio) {
|
|
7898
|
-
const fStops = fc.stops;
|
|
7899
|
-
const tStops = tc.stops;
|
|
7900
|
-
const color = {
|
|
7901
|
-
gradient: 'radial',
|
|
7902
|
-
x0: fc.x0 + (tc.x0 - fc.x0) * ratio,
|
|
7903
|
-
x1: fc.x1 + (tc.x1 - fc.x1) * ratio,
|
|
7904
|
-
y0: fc.y0 + (tc.y0 - fc.y0) * ratio,
|
|
7905
|
-
y1: fc.y1 + (tc.y1 - fc.y1) * ratio,
|
|
7906
|
-
r0: fc.r0 + (tc.r0 - fc.r0) * ratio,
|
|
7907
|
-
r1: fc.r1 + (tc.r1 - fc.r1) * ratio,
|
|
7908
|
-
stops: new Array(fStops.length).fill(0).map((_, i) => {
|
|
7909
|
-
return {
|
|
7910
|
-
color: colorStringInterpolationToStr(fStops[i].color, tStops[i].color, ratio),
|
|
7911
|
-
offset: fStops[i].offset + (tStops[i].offset - fStops[i].offset) * ratio
|
|
7912
|
-
};
|
|
7913
|
-
})
|
|
7914
|
-
};
|
|
7915
|
-
return color;
|
|
7916
|
-
}
|
|
7917
|
-
function interpolateGradientConicalColor(fc, tc, ratio) {
|
|
7918
|
-
const fStops = fc.stops;
|
|
7919
|
-
const tStops = tc.stops;
|
|
7920
|
-
const color = {
|
|
7921
|
-
gradient: 'conical',
|
|
7922
|
-
startAngle: fc.startAngle + (tc.startAngle - fc.startAngle) * ratio,
|
|
7923
|
-
endAngle: fc.endAngle + (tc.endAngle - fc.endAngle) * ratio,
|
|
7924
|
-
x: fc.x + (tc.x - fc.x) * ratio,
|
|
7925
|
-
y: fc.y + (tc.y - fc.y) * ratio,
|
|
7926
|
-
stops: new Array(fStops.length).fill(0).map((_, i) => {
|
|
7927
|
-
return {
|
|
7928
|
-
color: colorStringInterpolationToStr(fStops[i].color, tStops[i].color, ratio),
|
|
7929
|
-
offset: fStops[i].offset + (tStops[i].offset - fStops[i].offset) * ratio
|
|
7930
|
-
};
|
|
7931
|
-
})
|
|
7932
|
-
};
|
|
7933
|
-
return color;
|
|
7934
|
-
}
|
|
7935
|
-
function interpolatePureColorArray(from, to, ratio) {
|
|
7936
|
-
return [
|
|
7937
|
-
from[0] + (to[0] - from[0]) * ratio,
|
|
7938
|
-
from[1] + (to[1] - from[1]) * ratio,
|
|
7939
|
-
from[2] + (to[2] - from[2]) * ratio,
|
|
7940
|
-
from[3] + (to[3] - from[3]) * ratio
|
|
7941
|
-
];
|
|
7942
|
-
}
|
|
7943
|
-
function interpolatePureColorArrayToStr(from, to, ratio) {
|
|
7944
|
-
return `rgba(${from[0] + (to[0] - from[0]) * ratio},${from[1] + (to[1] - from[1]) * ratio},${from[2] + (to[2] - from[2]) * ratio},${from[3] + (to[3] - from[3]) * ratio})`;
|
|
7945
|
-
}
|
|
7946
|
-
const _fromColorRGB = [0, 0, 0, 0];
|
|
7947
|
-
const _toColorRGB = [0, 0, 0, 0];
|
|
7948
|
-
function colorStringInterpolationToStr(fromColor, toColor, ratio) {
|
|
7949
|
-
ColorStore.Get(fromColor, ColorType.Color255, _fromColorRGB);
|
|
7950
|
-
ColorStore.Get(toColor, ColorType.Color255, _toColorRGB);
|
|
7951
|
-
return `rgba(${Math.round(_fromColorRGB[0] + (_toColorRGB[0] - _fromColorRGB[0]) * ratio)},${Math.round(_fromColorRGB[1] + (_toColorRGB[1] - _fromColorRGB[1]) * ratio)},${Math.round(_fromColorRGB[2] + (_toColorRGB[2] - _fromColorRGB[2]) * ratio)},${_fromColorRGB[3] + (_toColorRGB[3] - _fromColorRGB[3]) * ratio})`;
|
|
7952
|
-
}
|
|
7953
|
-
|
|
7954
7739
|
const PARALLEL_NUMBER = 10;
|
|
7955
7740
|
class ResourceLoader {
|
|
7956
7741
|
static GetImage(url, mark) {
|
|
@@ -10042,6 +9827,15 @@ class Graphic extends Node {
|
|
|
10042
9827
|
}
|
|
10043
9828
|
return picker.containsPoint(this, { x, y });
|
|
10044
9829
|
}
|
|
9830
|
+
setAttributesAndPreventAnimate(params, forceUpdateTag = false, context) {
|
|
9831
|
+
this.setAttributes(params, forceUpdateTag, context);
|
|
9832
|
+
this.animates &&
|
|
9833
|
+
this.animates.forEach(animate => {
|
|
9834
|
+
Object.keys(params).forEach(key => {
|
|
9835
|
+
animate.preventAttr(key);
|
|
9836
|
+
});
|
|
9837
|
+
});
|
|
9838
|
+
}
|
|
10045
9839
|
setAttributes(params, forceUpdateTag = false, context) {
|
|
10046
9840
|
params =
|
|
10047
9841
|
(this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context)) || params;
|
|
@@ -10361,11 +10155,11 @@ class Graphic extends Node {
|
|
|
10361
10155
|
}
|
|
10362
10156
|
}
|
|
10363
10157
|
]);
|
|
10364
|
-
noAnimateAttrs && this.
|
|
10158
|
+
noAnimateAttrs && this.setAttributesAndPreventAnimate(noAnimateAttrs, false, { type: AttributeUpdateType.STATE });
|
|
10365
10159
|
}
|
|
10366
10160
|
else {
|
|
10367
10161
|
this.stopStateAnimates();
|
|
10368
|
-
this.
|
|
10162
|
+
this.setAttributesAndPreventAnimate(attrs, false, { type: AttributeUpdateType.STATE });
|
|
10369
10163
|
}
|
|
10370
10164
|
}
|
|
10371
10165
|
updateNormalAttrs(stateAttrs) {
|
|
@@ -10402,18 +10196,12 @@ class Graphic extends Node {
|
|
|
10402
10196
|
}
|
|
10403
10197
|
}
|
|
10404
10198
|
getNormalAttribute(key) {
|
|
10405
|
-
|
|
10199
|
+
var _a, _b;
|
|
10200
|
+
const value = this.attribute[key];
|
|
10406
10201
|
if (this.animates) {
|
|
10407
|
-
this.
|
|
10408
|
-
if (animate.stateNames) {
|
|
10409
|
-
const endProps = animate.getEndProps();
|
|
10410
|
-
if (has(endProps, key)) {
|
|
10411
|
-
value = endProps[key];
|
|
10412
|
-
}
|
|
10413
|
-
}
|
|
10414
|
-
});
|
|
10202
|
+
return (_a = this.finalAttribute) === null || _a === void 0 ? void 0 : _a[key];
|
|
10415
10203
|
}
|
|
10416
|
-
return value;
|
|
10204
|
+
return value !== null && value !== void 0 ? value : (_b = this.finalAttribute) === null || _b === void 0 ? void 0 : _b[key];
|
|
10417
10205
|
}
|
|
10418
10206
|
clearStates(hasAnimation) {
|
|
10419
10207
|
if (this.hasState() && this.normalAttrs) {
|
|
@@ -10622,143 +10410,14 @@ class Graphic extends Node {
|
|
|
10622
10410
|
this.shadowRoot.setStage(stage, layer);
|
|
10623
10411
|
}
|
|
10624
10412
|
}
|
|
10625
|
-
onAddStep(step) {
|
|
10626
|
-
return;
|
|
10627
|
-
}
|
|
10628
|
-
onStop(props) {
|
|
10629
|
-
if (props) {
|
|
10630
|
-
this.setAttributes(props, false, { type: AttributeUpdateType.ANIMATE_END });
|
|
10631
|
-
}
|
|
10632
|
-
}
|
|
10633
|
-
onStep(subAnimate, animate, step, ratio, end) {
|
|
10634
|
-
const nextAttributes = {};
|
|
10635
|
-
if (step.customAnimate) {
|
|
10636
|
-
step.customAnimate.update(end, ratio, nextAttributes);
|
|
10637
|
-
}
|
|
10638
|
-
else {
|
|
10639
|
-
const nextProps = step.props;
|
|
10640
|
-
const nextParsedProps = step.parsedProps;
|
|
10641
|
-
const propKeys = step.propKeys;
|
|
10642
|
-
this.stepInterpolate(subAnimate, animate, nextAttributes, step, ratio, end, nextProps, undefined, nextParsedProps, propKeys);
|
|
10643
|
-
}
|
|
10644
|
-
this.setAttributes(nextAttributes, false, {
|
|
10645
|
-
type: AttributeUpdateType.ANIMATE_UPDATE,
|
|
10646
|
-
animationState: {
|
|
10647
|
-
ratio,
|
|
10648
|
-
end,
|
|
10649
|
-
step,
|
|
10650
|
-
isFirstFrameOfStep: subAnimate.getLastStep() !== step
|
|
10651
|
-
}
|
|
10652
|
-
});
|
|
10653
|
-
this.stage && this.stage.renderNextFrame();
|
|
10654
|
-
}
|
|
10655
|
-
stepInterpolate(subAnimate, animate, nextAttributes, step, ratio, end, nextProps, lastProps, nextParsedProps, propKeys) {
|
|
10656
|
-
if (!propKeys) {
|
|
10657
|
-
propKeys = Object.keys(nextProps);
|
|
10658
|
-
step.propKeys = propKeys;
|
|
10659
|
-
}
|
|
10660
|
-
if (end) {
|
|
10661
|
-
step.propKeys.forEach(key => {
|
|
10662
|
-
if (!animate.validAttr(key)) {
|
|
10663
|
-
return;
|
|
10664
|
-
}
|
|
10665
|
-
nextAttributes[key] = nextProps[key];
|
|
10666
|
-
});
|
|
10667
|
-
}
|
|
10668
|
-
else {
|
|
10669
|
-
propKeys.forEach(key => {
|
|
10670
|
-
var _a;
|
|
10671
|
-
if (!animate.validAttr(key)) {
|
|
10672
|
-
return;
|
|
10673
|
-
}
|
|
10674
|
-
const nextStepVal = nextProps[key];
|
|
10675
|
-
const lastStepVal = (_a = (lastProps && lastProps[key])) !== null && _a !== void 0 ? _a : subAnimate.getLastPropByName(key, step);
|
|
10676
|
-
if (nextStepVal == null || lastStepVal == null || nextStepVal === lastStepVal) {
|
|
10677
|
-
nextAttributes[key] = nextStepVal;
|
|
10678
|
-
return;
|
|
10679
|
-
}
|
|
10680
|
-
let match;
|
|
10681
|
-
match =
|
|
10682
|
-
animate.interpolateFunc && animate.interpolateFunc(key, ratio, lastStepVal, nextStepVal, nextAttributes);
|
|
10683
|
-
if (match) {
|
|
10684
|
-
return;
|
|
10685
|
-
}
|
|
10686
|
-
match = animate.customInterpolate(key, ratio, lastStepVal, nextStepVal, this, nextAttributes);
|
|
10687
|
-
if (match) {
|
|
10688
|
-
return;
|
|
10689
|
-
}
|
|
10690
|
-
if (!this.defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio)) {
|
|
10691
|
-
this._interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes);
|
|
10692
|
-
}
|
|
10693
|
-
});
|
|
10694
|
-
}
|
|
10695
|
-
step.parsedProps = nextParsedProps;
|
|
10696
|
-
}
|
|
10697
|
-
defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio) {
|
|
10698
|
-
if (Number.isFinite(nextStepVal) && Number.isFinite(lastStepVal)) {
|
|
10699
|
-
nextAttributes[key] = lastStepVal + (nextStepVal - lastStepVal) * ratio;
|
|
10700
|
-
return true;
|
|
10701
|
-
}
|
|
10702
|
-
else if (key === 'fill') {
|
|
10703
|
-
if (!nextParsedProps) {
|
|
10704
|
-
nextParsedProps = {};
|
|
10705
|
-
}
|
|
10706
|
-
const fillColorArray = nextParsedProps.fillColorArray;
|
|
10707
|
-
const color = interpolateColor(lastStepVal, fillColorArray !== null && fillColorArray !== void 0 ? fillColorArray : nextStepVal, ratio, false, (fArray, tArray) => {
|
|
10708
|
-
nextParsedProps.fillColorArray = tArray;
|
|
10709
|
-
});
|
|
10710
|
-
if (color) {
|
|
10711
|
-
nextAttributes[key] = color;
|
|
10712
|
-
}
|
|
10713
|
-
return true;
|
|
10714
|
-
}
|
|
10715
|
-
else if (key === 'stroke') {
|
|
10716
|
-
if (!nextParsedProps) {
|
|
10717
|
-
nextParsedProps = {};
|
|
10718
|
-
}
|
|
10719
|
-
const strokeColorArray = nextParsedProps.strokeColorArray;
|
|
10720
|
-
const color = interpolateColor(lastStepVal, strokeColorArray !== null && strokeColorArray !== void 0 ? strokeColorArray : nextStepVal, ratio, false, (fArray, tArray) => {
|
|
10721
|
-
nextParsedProps.strokeColorArray = tArray;
|
|
10722
|
-
});
|
|
10723
|
-
if (color) {
|
|
10724
|
-
nextAttributes[key] = color;
|
|
10725
|
-
}
|
|
10726
|
-
return true;
|
|
10727
|
-
}
|
|
10728
|
-
else if (key === 'shadowColor') {
|
|
10729
|
-
if (!nextParsedProps) {
|
|
10730
|
-
nextParsedProps = {};
|
|
10731
|
-
}
|
|
10732
|
-
const shadowColorArray = nextParsedProps.shadowColorArray;
|
|
10733
|
-
const color = interpolateColor(lastStepVal, shadowColorArray !== null && shadowColorArray !== void 0 ? shadowColorArray : nextStepVal, ratio, true, (fArray, tArray) => {
|
|
10734
|
-
nextParsedProps.shadowColorArray = tArray;
|
|
10735
|
-
});
|
|
10736
|
-
if (color) {
|
|
10737
|
-
nextAttributes[key] = color;
|
|
10738
|
-
}
|
|
10739
|
-
return true;
|
|
10740
|
-
}
|
|
10741
|
-
else if (Array.isArray(nextStepVal) && nextStepVal.length === lastStepVal.length) {
|
|
10742
|
-
const nextList = [];
|
|
10743
|
-
let valid = true;
|
|
10744
|
-
for (let i = 0; i < nextStepVal.length; i++) {
|
|
10745
|
-
const v = lastStepVal[i];
|
|
10746
|
-
const val = v + (nextStepVal[i] - v) * ratio;
|
|
10747
|
-
if (!Number.isFinite(val)) {
|
|
10748
|
-
valid = false;
|
|
10749
|
-
break;
|
|
10750
|
-
}
|
|
10751
|
-
nextList.push(val);
|
|
10752
|
-
}
|
|
10753
|
-
if (valid) {
|
|
10754
|
-
nextAttributes[key] = nextList;
|
|
10755
|
-
}
|
|
10756
|
-
}
|
|
10757
|
-
return false;
|
|
10758
|
-
}
|
|
10759
|
-
_interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {
|
|
10413
|
+
onAddStep(step) {
|
|
10760
10414
|
return;
|
|
10761
10415
|
}
|
|
10416
|
+
onStop(props) {
|
|
10417
|
+
if (props) {
|
|
10418
|
+
this.setAttributes(props, false, { type: AttributeUpdateType.ANIMATE_END });
|
|
10419
|
+
}
|
|
10420
|
+
}
|
|
10762
10421
|
getDefaultAttribute(name) {
|
|
10763
10422
|
return this.getGraphicTheme()[name];
|
|
10764
10423
|
}
|
|
@@ -11739,6 +11398,234 @@ function drawArcPath$1(arc, context, cx, cy, outerRadius, innerRadius, partStrok
|
|
|
11739
11398
|
return collapsedToLine;
|
|
11740
11399
|
}
|
|
11741
11400
|
|
|
11401
|
+
function colorEqual(color1, color2) {
|
|
11402
|
+
const c1 = Color.parseColorString(color1);
|
|
11403
|
+
const c2 = Color.parseColorString(color2);
|
|
11404
|
+
return c1 && c2 ? c1.r === c2.r && c1.g === c2.g && c1.b === c2.b && c1.opacity === c2.opacity : false;
|
|
11405
|
+
}
|
|
11406
|
+
var ColorType;
|
|
11407
|
+
(function (ColorType) {
|
|
11408
|
+
ColorType[ColorType["Color255"] = 0] = "Color255";
|
|
11409
|
+
ColorType[ColorType["Color1"] = 1] = "Color1";
|
|
11410
|
+
})(ColorType || (ColorType = {}));
|
|
11411
|
+
class ColorStore {
|
|
11412
|
+
static Get(str, size = ColorType.Color1, arr = [0, 0, 0, 1]) {
|
|
11413
|
+
if (size === ColorType.Color1) {
|
|
11414
|
+
const color = ColorStore.store1[str];
|
|
11415
|
+
if (color) {
|
|
11416
|
+
arr[0] = color[0];
|
|
11417
|
+
arr[1] = color[1];
|
|
11418
|
+
arr[2] = color[2];
|
|
11419
|
+
arr[3] = color[3];
|
|
11420
|
+
return arr;
|
|
11421
|
+
}
|
|
11422
|
+
const c = Color.parseColorString(str);
|
|
11423
|
+
if (c) {
|
|
11424
|
+
const data = [c.r / 255, c.g / 255, c.b / 255, c.opacity];
|
|
11425
|
+
ColorStore.store1[str] = data;
|
|
11426
|
+
ColorStore.store255[str] = [c.r, c.g, c.b, c.opacity];
|
|
11427
|
+
arr[0] = data[0];
|
|
11428
|
+
arr[1] = data[1];
|
|
11429
|
+
arr[2] = data[2];
|
|
11430
|
+
arr[3] = data[3];
|
|
11431
|
+
}
|
|
11432
|
+
return arr;
|
|
11433
|
+
}
|
|
11434
|
+
const color = ColorStore.store255[str];
|
|
11435
|
+
if (color) {
|
|
11436
|
+
arr[0] = color[0];
|
|
11437
|
+
arr[1] = color[1];
|
|
11438
|
+
arr[2] = color[2];
|
|
11439
|
+
arr[3] = color[3];
|
|
11440
|
+
return arr;
|
|
11441
|
+
}
|
|
11442
|
+
const c = Color.parseColorString(str);
|
|
11443
|
+
if (c) {
|
|
11444
|
+
ColorStore.store1[str] = [c.r / 255, c.g / 255, c.b / 255, c.opacity];
|
|
11445
|
+
ColorStore.store255[str] = [c.r, c.g, c.b, c.opacity];
|
|
11446
|
+
arr[0] = c.r;
|
|
11447
|
+
arr[1] = c.g;
|
|
11448
|
+
arr[2] = c.b;
|
|
11449
|
+
arr[3] = c.opacity;
|
|
11450
|
+
}
|
|
11451
|
+
return arr;
|
|
11452
|
+
}
|
|
11453
|
+
static Set(str, size, arr) {
|
|
11454
|
+
if (size === ColorType.Color1) {
|
|
11455
|
+
if (ColorStore.store1[str]) {
|
|
11456
|
+
return;
|
|
11457
|
+
}
|
|
11458
|
+
ColorStore.store1[str] = arr;
|
|
11459
|
+
ColorStore.store255[str] = [
|
|
11460
|
+
Math.floor(arr[0] * 255),
|
|
11461
|
+
Math.floor(arr[1] * 255),
|
|
11462
|
+
Math.floor(arr[2] * 255),
|
|
11463
|
+
Math.floor(arr[3] * 255)
|
|
11464
|
+
];
|
|
11465
|
+
}
|
|
11466
|
+
else {
|
|
11467
|
+
if (ColorStore.store255[str]) {
|
|
11468
|
+
return;
|
|
11469
|
+
}
|
|
11470
|
+
ColorStore.store255[str] = arr;
|
|
11471
|
+
ColorStore.store1[str] = [arr[0] / 255, arr[1] / 255, arr[2] / 255, arr[3]];
|
|
11472
|
+
}
|
|
11473
|
+
}
|
|
11474
|
+
}
|
|
11475
|
+
ColorStore.store255 = {};
|
|
11476
|
+
ColorStore.store1 = {};
|
|
11477
|
+
|
|
11478
|
+
function colorArrayToString(color, alphaChannel = false) {
|
|
11479
|
+
if (Array.isArray(color) && isNumber(color[0])) {
|
|
11480
|
+
return alphaChannel
|
|
11481
|
+
? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})`
|
|
11482
|
+
: `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})`;
|
|
11483
|
+
}
|
|
11484
|
+
return color;
|
|
11485
|
+
}
|
|
11486
|
+
function interpolateColor(from, to, ratio, alphaChannel, cb) {
|
|
11487
|
+
if ((Array.isArray(from) && !isNumber(from[0])) || (Array.isArray(to) && !isNumber(to[0]))) {
|
|
11488
|
+
const out = new Array(4).fill(0).map((_, index) => {
|
|
11489
|
+
return _interpolateColor(isArray(from) ? from[index] : from, isArray(to) ? to[index] : to, ratio, alphaChannel);
|
|
11490
|
+
});
|
|
11491
|
+
return out;
|
|
11492
|
+
}
|
|
11493
|
+
return _interpolateColor(from, to, ratio, alphaChannel, cb);
|
|
11494
|
+
}
|
|
11495
|
+
function _interpolateColor(from, to, ratio, alphaChannel, cb) {
|
|
11496
|
+
if (!(from && to)) {
|
|
11497
|
+
return (from && colorArrayToString(from)) || (to && colorArrayToString(to)) || false;
|
|
11498
|
+
}
|
|
11499
|
+
let fromArray;
|
|
11500
|
+
let toArray;
|
|
11501
|
+
let fromGradient = false;
|
|
11502
|
+
let toGradient = false;
|
|
11503
|
+
if (Array.isArray(from)) {
|
|
11504
|
+
fromArray = from;
|
|
11505
|
+
}
|
|
11506
|
+
else if (typeof from === 'string') {
|
|
11507
|
+
fromArray = ColorStore.Get(from, ColorType.Color255);
|
|
11508
|
+
}
|
|
11509
|
+
else {
|
|
11510
|
+
fromGradient = true;
|
|
11511
|
+
}
|
|
11512
|
+
if (Array.isArray(to)) {
|
|
11513
|
+
toArray = to;
|
|
11514
|
+
}
|
|
11515
|
+
else if (typeof to === 'string') {
|
|
11516
|
+
toArray = ColorStore.Get(to, ColorType.Color255);
|
|
11517
|
+
}
|
|
11518
|
+
else {
|
|
11519
|
+
toGradient = true;
|
|
11520
|
+
}
|
|
11521
|
+
if (fromGradient !== toGradient) {
|
|
11522
|
+
const gradient = (fromGradient ? from : to);
|
|
11523
|
+
const pure = (fromGradient ? to : from);
|
|
11524
|
+
const gradientFromPure = Object.assign(Object.assign({}, gradient), { stops: gradient.stops.map(v => (Object.assign(Object.assign({}, v), { color: colorArrayToString(pure) }))) });
|
|
11525
|
+
return fromGradient
|
|
11526
|
+
? interpolateColor(gradient, gradientFromPure, ratio, alphaChannel, cb)
|
|
11527
|
+
: interpolateColor(gradientFromPure, gradient, ratio, alphaChannel, cb);
|
|
11528
|
+
}
|
|
11529
|
+
if (fromGradient) {
|
|
11530
|
+
if (from.gradient === to.gradient) {
|
|
11531
|
+
const fc = from;
|
|
11532
|
+
const tc = to;
|
|
11533
|
+
const fromStops = fc.stops;
|
|
11534
|
+
const toStops = tc.stops;
|
|
11535
|
+
if (fromStops.length !== toStops.length) {
|
|
11536
|
+
return false;
|
|
11537
|
+
}
|
|
11538
|
+
if (fc.gradient === 'linear') {
|
|
11539
|
+
return interpolateGradientLinearColor(fc, tc, ratio);
|
|
11540
|
+
}
|
|
11541
|
+
else if (fc.gradient === 'radial') {
|
|
11542
|
+
return interpolateGradientRadialColor(fc, tc, ratio);
|
|
11543
|
+
}
|
|
11544
|
+
else if (fc.gradient === 'conical') {
|
|
11545
|
+
return interpolateGradientConicalColor(fc, tc, ratio);
|
|
11546
|
+
}
|
|
11547
|
+
}
|
|
11548
|
+
return false;
|
|
11549
|
+
}
|
|
11550
|
+
cb && cb(fromArray, toArray);
|
|
11551
|
+
const result = interpolatePureColorArray(fromArray, toArray, ratio);
|
|
11552
|
+
return colorArrayToString(result, alphaChannel);
|
|
11553
|
+
}
|
|
11554
|
+
function interpolateGradientLinearColor(fc, tc, ratio) {
|
|
11555
|
+
const fStops = fc.stops;
|
|
11556
|
+
const tStops = tc.stops;
|
|
11557
|
+
const color = {
|
|
11558
|
+
gradient: 'linear',
|
|
11559
|
+
x0: fc.x0 + (tc.x0 - fc.x0) * ratio,
|
|
11560
|
+
x1: fc.x1 + (tc.x1 - fc.x1) * ratio,
|
|
11561
|
+
y0: fc.y0 + (tc.y0 - fc.y0) * ratio,
|
|
11562
|
+
y1: fc.y1 + (tc.y1 - fc.y1) * ratio,
|
|
11563
|
+
stops: new Array(fStops.length).fill(0).map((_, i) => {
|
|
11564
|
+
return {
|
|
11565
|
+
color: colorStringInterpolationToStr(fStops[i].color, tStops[i].color, ratio),
|
|
11566
|
+
offset: fStops[i].offset + (tStops[i].offset - fStops[i].offset) * ratio
|
|
11567
|
+
};
|
|
11568
|
+
})
|
|
11569
|
+
};
|
|
11570
|
+
return color;
|
|
11571
|
+
}
|
|
11572
|
+
function interpolateGradientRadialColor(fc, tc, ratio) {
|
|
11573
|
+
const fStops = fc.stops;
|
|
11574
|
+
const tStops = tc.stops;
|
|
11575
|
+
const color = {
|
|
11576
|
+
gradient: 'radial',
|
|
11577
|
+
x0: fc.x0 + (tc.x0 - fc.x0) * ratio,
|
|
11578
|
+
x1: fc.x1 + (tc.x1 - fc.x1) * ratio,
|
|
11579
|
+
y0: fc.y0 + (tc.y0 - fc.y0) * ratio,
|
|
11580
|
+
y1: fc.y1 + (tc.y1 - fc.y1) * ratio,
|
|
11581
|
+
r0: fc.r0 + (tc.r0 - fc.r0) * ratio,
|
|
11582
|
+
r1: fc.r1 + (tc.r1 - fc.r1) * ratio,
|
|
11583
|
+
stops: new Array(fStops.length).fill(0).map((_, i) => {
|
|
11584
|
+
return {
|
|
11585
|
+
color: colorStringInterpolationToStr(fStops[i].color, tStops[i].color, ratio),
|
|
11586
|
+
offset: fStops[i].offset + (tStops[i].offset - fStops[i].offset) * ratio
|
|
11587
|
+
};
|
|
11588
|
+
})
|
|
11589
|
+
};
|
|
11590
|
+
return color;
|
|
11591
|
+
}
|
|
11592
|
+
function interpolateGradientConicalColor(fc, tc, ratio) {
|
|
11593
|
+
const fStops = fc.stops;
|
|
11594
|
+
const tStops = tc.stops;
|
|
11595
|
+
const color = {
|
|
11596
|
+
gradient: 'conical',
|
|
11597
|
+
startAngle: fc.startAngle + (tc.startAngle - fc.startAngle) * ratio,
|
|
11598
|
+
endAngle: fc.endAngle + (tc.endAngle - fc.endAngle) * ratio,
|
|
11599
|
+
x: fc.x + (tc.x - fc.x) * ratio,
|
|
11600
|
+
y: fc.y + (tc.y - fc.y) * ratio,
|
|
11601
|
+
stops: new Array(fStops.length).fill(0).map((_, i) => {
|
|
11602
|
+
return {
|
|
11603
|
+
color: colorStringInterpolationToStr(fStops[i].color, tStops[i].color, ratio),
|
|
11604
|
+
offset: fStops[i].offset + (tStops[i].offset - fStops[i].offset) * ratio
|
|
11605
|
+
};
|
|
11606
|
+
})
|
|
11607
|
+
};
|
|
11608
|
+
return color;
|
|
11609
|
+
}
|
|
11610
|
+
function interpolatePureColorArray(from, to, ratio) {
|
|
11611
|
+
return [
|
|
11612
|
+
from[0] + (to[0] - from[0]) * ratio,
|
|
11613
|
+
from[1] + (to[1] - from[1]) * ratio,
|
|
11614
|
+
from[2] + (to[2] - from[2]) * ratio,
|
|
11615
|
+
from[3] + (to[3] - from[3]) * ratio
|
|
11616
|
+
];
|
|
11617
|
+
}
|
|
11618
|
+
function interpolatePureColorArrayToStr(from, to, ratio) {
|
|
11619
|
+
return `rgba(${from[0] + (to[0] - from[0]) * ratio},${from[1] + (to[1] - from[1]) * ratio},${from[2] + (to[2] - from[2]) * ratio},${from[3] + (to[3] - from[3]) * ratio})`;
|
|
11620
|
+
}
|
|
11621
|
+
const _fromColorRGB = [0, 0, 0, 0];
|
|
11622
|
+
const _toColorRGB = [0, 0, 0, 0];
|
|
11623
|
+
function colorStringInterpolationToStr(fromColor, toColor, ratio) {
|
|
11624
|
+
ColorStore.Get(fromColor, ColorType.Color255, _fromColorRGB);
|
|
11625
|
+
ColorStore.Get(toColor, ColorType.Color255, _toColorRGB);
|
|
11626
|
+
return `rgba(${Math.round(_fromColorRGB[0] + (_toColorRGB[0] - _fromColorRGB[0]) * ratio)},${Math.round(_fromColorRGB[1] + (_toColorRGB[1] - _fromColorRGB[1]) * ratio)},${Math.round(_fromColorRGB[2] + (_toColorRGB[2] - _fromColorRGB[2]) * ratio)},${_fromColorRGB[3] + (_toColorRGB[3] - _fromColorRGB[3]) * ratio})`;
|
|
11627
|
+
}
|
|
11628
|
+
|
|
11742
11629
|
Object.keys(DEFAULT_COLORS).forEach(k => {
|
|
11743
11630
|
DEFAULT_COLORS[k];
|
|
11744
11631
|
});
|
|
@@ -14476,6 +14363,7 @@ function getFixedLRTB(left, right, top, bottom) {
|
|
|
14476
14363
|
}
|
|
14477
14364
|
class Paragraph {
|
|
14478
14365
|
constructor(text, newLine, character, ascentDescentMode) {
|
|
14366
|
+
var _a, _b;
|
|
14479
14367
|
this.fontSize = character.fontSize || 16;
|
|
14480
14368
|
this.textBaseline = character.textBaseline || 'alphabetic';
|
|
14481
14369
|
this.ascentDescentMode = ascentDescentMode;
|
|
@@ -14522,6 +14410,9 @@ class Paragraph {
|
|
|
14522
14410
|
this.ellipsis = 'normal';
|
|
14523
14411
|
this.ellipsisWidth = 0;
|
|
14524
14412
|
this.ellipsisOtherParagraphWidth = 0;
|
|
14413
|
+
this.space = character.space;
|
|
14414
|
+
this.dx = (_a = character.dx) !== null && _a !== void 0 ? _a : 0;
|
|
14415
|
+
this.dy = (_b = character.dy) !== null && _b !== void 0 ? _b : 0;
|
|
14525
14416
|
if (character.direction === 'vertical') {
|
|
14526
14417
|
this.direction = character.direction;
|
|
14527
14418
|
this.widthOrigin = this.width;
|
|
@@ -14572,9 +14463,9 @@ class Paragraph {
|
|
|
14572
14463
|
text = text.slice(0, index);
|
|
14573
14464
|
text += this.ellipsisStr;
|
|
14574
14465
|
if (textAlign === 'right' || textAlign === 'end') {
|
|
14575
|
-
const { width } = measureTextCanvas(this.text.slice(index), this.character, this.ascentDescentMode);
|
|
14576
14466
|
if (direction === 'vertical') ;
|
|
14577
14467
|
else {
|
|
14468
|
+
const { width } = measureTextCanvas(this.text.slice(index), this.character, this.ascentDescentMode);
|
|
14578
14469
|
left -= this.ellipsisWidth - width;
|
|
14579
14470
|
}
|
|
14580
14471
|
}
|
|
@@ -14585,9 +14476,10 @@ class Paragraph {
|
|
|
14585
14476
|
return Object.assign(Object.assign({}, lrtb), { fillStyle: this.character.background, globalAlpha: this.character.backgroundOpacity });
|
|
14586
14477
|
}
|
|
14587
14478
|
draw(ctx, top, ascent, deltaLeft, isLineFirst, textAlign, lineHeight) {
|
|
14479
|
+
var _a;
|
|
14588
14480
|
let baseline = top + ascent;
|
|
14589
14481
|
let text = this.text;
|
|
14590
|
-
let left = this.left + deltaLeft;
|
|
14482
|
+
let left = this.left + deltaLeft + ((_a = this.space) !== null && _a !== void 0 ? _a : 0) / 2;
|
|
14591
14483
|
baseline += this.top;
|
|
14592
14484
|
let direction = this.direction;
|
|
14593
14485
|
if (this.verticalEllipsis) {
|
|
@@ -14609,9 +14501,9 @@ class Paragraph {
|
|
|
14609
14501
|
text = text.slice(0, index);
|
|
14610
14502
|
text += this.ellipsisStr;
|
|
14611
14503
|
if (textAlign === 'right' || textAlign === 'end') {
|
|
14612
|
-
const { width } = measureTextCanvas(this.text.slice(index), this.character, this.ascentDescentMode);
|
|
14613
14504
|
if (direction === 'vertical') ;
|
|
14614
14505
|
else {
|
|
14506
|
+
const { width } = measureTextCanvas(this.text.slice(index), this.character, this.ascentDescentMode);
|
|
14615
14507
|
left -= this.ellipsisWidth - width;
|
|
14616
14508
|
}
|
|
14617
14509
|
}
|
|
@@ -14634,10 +14526,10 @@ class Paragraph {
|
|
|
14634
14526
|
}
|
|
14635
14527
|
const { lineWidth = 1 } = this.character;
|
|
14636
14528
|
if (this.character.stroke && lineWidth) {
|
|
14637
|
-
ctx.strokeText(text, left, baseline);
|
|
14529
|
+
ctx.strokeText(text, left + this.dx, baseline + this.dy);
|
|
14638
14530
|
}
|
|
14639
14531
|
if (this.character.fill) {
|
|
14640
|
-
ctx.fillText(text, left, baseline);
|
|
14532
|
+
ctx.fillText(text, left + this.dx, baseline + this.dy);
|
|
14641
14533
|
}
|
|
14642
14534
|
if (this.character.fill) {
|
|
14643
14535
|
if (this.character.lineThrough || this.character.underline) {
|
|
@@ -22097,7 +21989,7 @@ class Stage extends Group {
|
|
|
22097
21989
|
var _a;
|
|
22098
21990
|
if (this.createTicker && this.createTimeline) {
|
|
22099
21991
|
this.ticker = params.ticker || this.createTicker(this);
|
|
22100
|
-
if (((_a = this.params.optimize) === null || _a === void 0 ? void 0 : _a.tickRenderMode)
|
|
21992
|
+
if (((_a = this.params.optimize) === null || _a === void 0 ? void 0 : _a.tickRenderMode) === 'performance') {
|
|
22101
21993
|
this.ticker.setFPS(30);
|
|
22102
21994
|
}
|
|
22103
21995
|
this.timeline = this.createTimeline();
|
|
@@ -23690,6 +23582,26 @@ function flatten_simplify(points, tolerance, highestQuality) {
|
|
|
23690
23582
|
return points;
|
|
23691
23583
|
}
|
|
23692
23584
|
|
|
23585
|
+
function diff(oldAttrs, newAttrs, getAttr) {
|
|
23586
|
+
const diffObj = {};
|
|
23587
|
+
for (const key in newAttrs) {
|
|
23588
|
+
if (!(key in oldAttrs) || !isEqual(oldAttrs[key], newAttrs[key])) {
|
|
23589
|
+
diffObj[key] = newAttrs[key];
|
|
23590
|
+
}
|
|
23591
|
+
}
|
|
23592
|
+
if (getAttr) {
|
|
23593
|
+
for (const key in oldAttrs) {
|
|
23594
|
+
if (!(key in newAttrs)) {
|
|
23595
|
+
const value = getAttr(key);
|
|
23596
|
+
if (value !== undefined) {
|
|
23597
|
+
diffObj[key] = value;
|
|
23598
|
+
}
|
|
23599
|
+
}
|
|
23600
|
+
}
|
|
23601
|
+
}
|
|
23602
|
+
return diffObj;
|
|
23603
|
+
}
|
|
23604
|
+
|
|
23693
23605
|
function cubicSubdivide(p0, p1, p2, p3, t, out) {
|
|
23694
23606
|
const p01 = (p1 - p0) * t + p0;
|
|
23695
23607
|
const p12 = (p2 - p1) * t + p1;
|
|
@@ -24474,12 +24386,13 @@ function getDefaultCharacterConfig(attribute) {
|
|
|
24474
24386
|
};
|
|
24475
24387
|
}
|
|
24476
24388
|
function findConfigIndexByCursorIdx(textConfig, cursorIndex) {
|
|
24389
|
+
var _a;
|
|
24477
24390
|
if (cursorIndex < 0) {
|
|
24478
24391
|
return 0;
|
|
24479
24392
|
}
|
|
24480
24393
|
const intCursorIndex = Math.round(cursorIndex);
|
|
24481
24394
|
let tempCursorIndex = intCursorIndex;
|
|
24482
|
-
let lineBreak =
|
|
24395
|
+
let lineBreak = ((_a = textConfig === null || textConfig === void 0 ? void 0 : textConfig[0]) === null || _a === void 0 ? void 0 : _a.text) === '\n';
|
|
24483
24396
|
let configIdx = 0;
|
|
24484
24397
|
for (configIdx = 0; configIdx < textConfig.length && tempCursorIndex >= 0; configIdx++) {
|
|
24485
24398
|
const c = textConfig[configIdx];
|
|
@@ -24502,12 +24415,12 @@ function findConfigIndexByCursorIdx(textConfig, cursorIndex) {
|
|
|
24502
24415
|
return configIdx;
|
|
24503
24416
|
}
|
|
24504
24417
|
function findCursorIdxByConfigIndex(textConfig, configIndex) {
|
|
24505
|
-
var _a, _b, _c;
|
|
24418
|
+
var _a, _b, _c, _d;
|
|
24506
24419
|
let cursorIndex = 0;
|
|
24507
24420
|
if (configIndex < 0) {
|
|
24508
24421
|
return -0.1;
|
|
24509
24422
|
}
|
|
24510
|
-
let lastLineBreak =
|
|
24423
|
+
let lastLineBreak = ((_a = textConfig === null || textConfig === void 0 ? void 0 : textConfig[0]) === null || _a === void 0 ? void 0 : _a.text) === '\n';
|
|
24511
24424
|
for (let i = 0; i <= configIndex && i < textConfig.length; i++) {
|
|
24512
24425
|
const c = textConfig[i];
|
|
24513
24426
|
if (c.text === '\n') {
|
|
@@ -24521,16 +24434,16 @@ function findCursorIdxByConfigIndex(textConfig, configIndex) {
|
|
|
24521
24434
|
}
|
|
24522
24435
|
cursorIndex = Math.max(cursorIndex - 1, 0);
|
|
24523
24436
|
if (configIndex > textConfig.length - 1) {
|
|
24524
|
-
if (((
|
|
24437
|
+
if (((_b = textConfig[textConfig.length - 1]) === null || _b === void 0 ? void 0 : _b.text) === '\n') {
|
|
24525
24438
|
return cursorIndex + 0.9;
|
|
24526
24439
|
}
|
|
24527
24440
|
return cursorIndex + 0.1;
|
|
24528
24441
|
}
|
|
24529
|
-
const lineBreak = ((
|
|
24442
|
+
const lineBreak = ((_c = textConfig[configIndex]) === null || _c === void 0 ? void 0 : _c.text) === '\n';
|
|
24530
24443
|
if (configIndex >= textConfig.length - 1 && lineBreak) {
|
|
24531
24444
|
return cursorIndex + 1 - 0.1;
|
|
24532
24445
|
}
|
|
24533
|
-
const singleLineBreak = lineBreak && ((
|
|
24446
|
+
const singleLineBreak = lineBreak && ((_d = textConfig[configIndex - 1]) === null || _d === void 0 ? void 0 : _d.text) !== '\n';
|
|
24534
24447
|
cursorIndex -= 0.1;
|
|
24535
24448
|
if (singleLineBreak) {
|
|
24536
24449
|
cursorIndex += 0.2;
|
|
@@ -24544,11 +24457,17 @@ class EditModule {
|
|
|
24544
24457
|
this.handleFocusOut = () => {
|
|
24545
24458
|
};
|
|
24546
24459
|
this.handleKeyDown = (e) => {
|
|
24460
|
+
if (!this.currRt) {
|
|
24461
|
+
return;
|
|
24462
|
+
}
|
|
24547
24463
|
if (e.key === 'Delete' || e.key === 'Backspace') {
|
|
24548
24464
|
this.handleInput({ data: null, type: 'Backspace' });
|
|
24549
24465
|
}
|
|
24550
24466
|
};
|
|
24551
24467
|
this.handleCompositionStart = () => {
|
|
24468
|
+
if (!this.currRt) {
|
|
24469
|
+
return;
|
|
24470
|
+
}
|
|
24552
24471
|
this.isComposing = true;
|
|
24553
24472
|
const { textConfig = [] } = this.currRt.attribute;
|
|
24554
24473
|
this.composingConfigIdx = this.cursorIndex < 0 ? 0 : findConfigIndexByCursorIdx(textConfig, this.cursorIndex);
|
|
@@ -24684,6 +24603,9 @@ class EditModule {
|
|
|
24684
24603
|
}
|
|
24685
24604
|
parseCompositionStr(configIdx) {
|
|
24686
24605
|
var _a;
|
|
24606
|
+
if (!this.currRt) {
|
|
24607
|
+
return '';
|
|
24608
|
+
}
|
|
24687
24609
|
const { textConfig = [] } = this.currRt.attribute;
|
|
24688
24610
|
const lastConfig = (_a = textConfig[configIdx]) !== null && _a !== void 0 ? _a : {};
|
|
24689
24611
|
textConfig.splice(configIdx, 1);
|
|
@@ -25367,6 +25289,7 @@ class RichTextEditPlugin {
|
|
|
25367
25289
|
currRt.detachShadow();
|
|
25368
25290
|
}
|
|
25369
25291
|
this.currRt = null;
|
|
25292
|
+
this.editModule.currRt = null;
|
|
25370
25293
|
const shadowRoot = this.getShadow(currRt);
|
|
25371
25294
|
if (this.editLine) {
|
|
25372
25295
|
this.removeEditLineOrBgOrBounds(this.editLine, shadowRoot);
|
|
@@ -27548,4 +27471,4 @@ const registerFlexLayoutPlugin = () => {
|
|
|
27548
27471
|
Factory.registerPlugin('FlexLayoutPlugin', FlexLayoutPlugin);
|
|
27549
27472
|
};
|
|
27550
27473
|
|
|
27551
|
-
export { ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, Circle, CircleRender, CircleRenderContribution, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, Graphic, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncrementalDrawContribution, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Mat4Allocate, MatrixAllocate, MeasureModeEnum, MonotoneX, MonotoneY, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerService, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StaticLayerHandlerContribution, Step, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepSegments, genStepTypeSegments, getAttributeFromDefaultAttrList, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, layerService, lineModule, lookAt, mat3Tomat4, mat4Allocate, matrixAllocate, multiInject, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlyphGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWrapTextGraphic, renderCommandList, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformKeys, transformMat4, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
|
|
27474
|
+
export { ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, Circle, CircleRender, CircleRenderContribution, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, Graphic, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncrementalDrawContribution, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Mat4Allocate, MatrixAllocate, MeasureModeEnum, MonotoneX, MonotoneY, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerService, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StaticLayerHandlerContribution, Step, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, diff, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepSegments, genStepTypeSegments, getAttributeFromDefaultAttrList, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, layerService, lineModule, lookAt, mat3Tomat4, mat4Allocate, matrixAllocate, multiInject, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlyphGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWrapTextGraphic, renderCommandList, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformKeys, transformMat4, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
|