@antv/g 5.3.1 → 5.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Transform.d.ts +5 -1
- package/dist/components/Transform.d.ts.map +1 -1
- package/dist/css/StyleValueRegistry.d.ts +1 -0
- package/dist/css/StyleValueRegistry.d.ts.map +1 -1
- package/dist/css/cssom/CSSNumericValue.d.ts +1 -1
- package/dist/css/cssom/CSSStyleValue.d.ts +2 -2
- package/dist/css/cssom/CSSStyleValue.d.ts.map +1 -1
- package/dist/css/interfaces.d.ts +1 -1
- package/dist/css/interfaces.d.ts.map +1 -1
- package/dist/css/layout/LayoutObject.d.ts +2 -2
- package/dist/css/layout/LayoutObject.d.ts.map +1 -1
- package/dist/css/parser/color.d.ts +4 -1
- package/dist/css/parser/color.d.ts.map +1 -1
- package/dist/css/parser/dimension.d.ts +1 -0
- package/dist/css/parser/dimension.d.ts.map +1 -1
- package/dist/css/parser/gradient.d.ts +4 -3
- package/dist/css/parser/gradient.d.ts.map +1 -1
- package/dist/css/parser/path.d.ts +2 -2
- package/dist/css/parser/path.d.ts.map +1 -1
- package/dist/css/parser/transform.d.ts +1 -0
- package/dist/css/parser/transform.d.ts.map +1 -1
- package/dist/css/properties/CSSPropertyClipPath.d.ts +1 -0
- package/dist/css/properties/CSSPropertyClipPath.d.ts.map +1 -1
- package/dist/css/properties/CSSPropertyColor.d.ts +4 -1
- package/dist/css/properties/CSSPropertyColor.d.ts.map +1 -1
- package/dist/css/properties/CSSPropertyLengthOrPercentage.d.ts.map +1 -1
- package/dist/css/properties/CSSPropertyNumber.d.ts +8 -0
- package/dist/css/properties/CSSPropertyNumber.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyTransform.d.ts.map +1 -1
- package/dist/css/properties/index.d.ts +1 -0
- package/dist/css/properties/index.d.ts.map +1 -1
- package/dist/display-objects/Circle.d.ts.map +1 -1
- package/dist/display-objects/DisplayObject.d.ts +3 -0
- package/dist/display-objects/DisplayObject.d.ts.map +1 -1
- package/dist/display-objects/Ellipse.d.ts.map +1 -1
- package/dist/display-objects/Line.d.ts.map +1 -1
- package/dist/display-objects/Path.d.ts +1 -1
- package/dist/display-objects/Path.d.ts.map +1 -1
- package/dist/display-objects/Polyline.d.ts.map +1 -1
- package/dist/dom/interfaces.d.ts +0 -1
- package/dist/dom/interfaces.d.ts.map +1 -1
- package/dist/global-module.d.ts.map +1 -1
- package/dist/index.esm.js +746 -262
- package/dist/index.js +711 -225
- package/dist/index.umd.js +1783 -1510
- package/dist/index.umd.min.js +2 -2
- package/dist/plugins/DirtyCheckPlugin.d.ts +0 -1
- package/dist/plugins/DirtyCheckPlugin.d.ts.map +1 -1
- package/dist/plugins/PrepareRendererPlugin.d.ts +1 -0
- package/dist/plugins/PrepareRendererPlugin.d.ts.map +1 -1
- package/dist/services/RenderingService.d.ts +9 -1
- package/dist/services/RenderingService.d.ts.map +1 -1
- package/dist/services/SceneGraphService.d.ts +12 -3
- package/dist/services/SceneGraphService.d.ts.map +1 -1
- package/dist/types.d.ts +2 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/interpolation.d.ts.map +1 -1
- package/dist/utils/memoize.d.ts +11 -0
- package/dist/utils/memoize.d.ts.map +1 -0
- package/dist/utils/string.d.ts +4 -1
- package/dist/utils/string.d.ts.map +1 -1
- package/package.json +6 -7
package/dist/index.esm.js
CHANGED
|
@@ -4,12 +4,12 @@ import RBush from 'rbush';
|
|
|
4
4
|
export { default as RBush } from 'rbush';
|
|
5
5
|
import 'reflect-metadata';
|
|
6
6
|
import { __decorate, __param, __metadata } from 'tslib';
|
|
7
|
-
import { vec3, mat3, mat4, quat, vec4 } from 'gl-matrix';
|
|
7
|
+
import { vec3, mat3, mat4, quat as quat$1, vec2, vec4 } from 'gl-matrix';
|
|
8
8
|
import { EventEmitter } from 'eventemitter3';
|
|
9
9
|
import { color } from 'd3-color';
|
|
10
|
-
import {
|
|
11
|
-
import { normalizePath, path2Curve, getPathBBoxTotalLength, equalizeSegments, getDrawDirection, reverseCurve, clonePath, getRotatedCurve, getPointAtLength } from '@antv/util';
|
|
10
|
+
import { path2String, normalizePath, path2Curve, getPathBBoxTotalLength, equalizeSegments, getDrawDirection, reverseCurve, clonePath, getRotatedCurve, getPointAtLength } from '@antv/util';
|
|
12
11
|
import { Polyline as Polyline$1, Line as Line$1 } from '@antv/g-math';
|
|
12
|
+
import decomposeMatrix from 'mat4-decompose';
|
|
13
13
|
import { requestAnimationFrame as requestAnimationFrame$1, cancelAnimationFrame as cancelAnimationFrame$1 } from 'request-animation-frame-polyfill';
|
|
14
14
|
|
|
15
15
|
function _regeneratorRuntime() {
|
|
@@ -1234,7 +1234,7 @@ var convertToDash = function convertToDash(str) {
|
|
|
1234
1234
|
return "-" + letter.toLowerCase();
|
|
1235
1235
|
}); // Remove first dash
|
|
1236
1236
|
|
|
1237
|
-
return str.charAt(0) === '-' ? str.
|
|
1237
|
+
return str.charAt(0) === '-' ? str.substring(1) : str;
|
|
1238
1238
|
};
|
|
1239
1239
|
/**
|
|
1240
1240
|
Easing Functions from anime.js, they are tried and true, so, its better to use them instead of other alternatives
|
|
@@ -2333,20 +2333,45 @@ function calculateIterationProgress(activeDuration, localTime, timing) {
|
|
|
2333
2333
|
return timing.easingFunction(directedProgress);
|
|
2334
2334
|
}
|
|
2335
2335
|
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2336
|
+
/**
|
|
2337
|
+
* @see https://github.com/lodash/lodash/blob/master/memoize.js
|
|
2338
|
+
*/
|
|
2339
|
+
function memoize(func, resolver) {
|
|
2340
|
+
if (typeof func !== 'function' || resolver != null && typeof resolver !== 'function') {
|
|
2341
|
+
throw new TypeError('Expected a function');
|
|
2340
2342
|
}
|
|
2341
2343
|
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
}
|
|
2346
|
-
|
|
2344
|
+
var memoized = function memoized() {
|
|
2345
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2346
|
+
args[_key] = arguments[_key];
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
var key = resolver ? resolver.apply(this, args) : args[0];
|
|
2350
|
+
var cache = memoized.cache;
|
|
2347
2351
|
|
|
2348
|
-
|
|
2352
|
+
if (cache.has(key)) {
|
|
2353
|
+
return cache.get(key);
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
var result = func.apply(this, args);
|
|
2357
|
+
memoized.cache = cache.set(key, result) || cache;
|
|
2358
|
+
return result;
|
|
2359
|
+
};
|
|
2360
|
+
|
|
2361
|
+
memoized.cache = new (memoize.Cache || Map)();
|
|
2362
|
+
return memoized;
|
|
2349
2363
|
}
|
|
2364
|
+
memoize.Cache = Map;
|
|
2365
|
+
|
|
2366
|
+
var camelCase = memoize(function (str) {
|
|
2367
|
+
if (str === void 0) {
|
|
2368
|
+
str = '';
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
return str.replace(/-([a-z])/g, function (g) {
|
|
2372
|
+
return g[1].toUpperCase();
|
|
2373
|
+
});
|
|
2374
|
+
});
|
|
2350
2375
|
function isString(str) {
|
|
2351
2376
|
if (!isNil(str) && typeof str === 'string') {
|
|
2352
2377
|
return true;
|
|
@@ -2552,15 +2577,33 @@ var FORMAT_ATTR_MAP = {
|
|
|
2552
2577
|
alias: 'img'
|
|
2553
2578
|
}
|
|
2554
2579
|
};
|
|
2555
|
-
function
|
|
2556
|
-
var _map$values;
|
|
2557
|
-
|
|
2580
|
+
var formatAttributeName = memoize(function (name) {
|
|
2558
2581
|
var attributeName = camelCase(name);
|
|
2559
2582
|
var map = FORMAT_ATTR_MAP[attributeName];
|
|
2560
2583
|
attributeName = (map === null || map === void 0 ? void 0 : map.alias) || attributeName;
|
|
2561
|
-
|
|
2584
|
+
return [attributeName, map];
|
|
2585
|
+
});
|
|
2586
|
+
function formatAttribute(name, value) {
|
|
2587
|
+
var _map$values;
|
|
2588
|
+
|
|
2589
|
+
var _formatAttributeName = formatAttributeName(name),
|
|
2590
|
+
attributeName = _formatAttributeName[0],
|
|
2591
|
+
map = _formatAttributeName[1];
|
|
2592
|
+
|
|
2593
|
+
var attributeValue = isString(value) && (map === null || map === void 0 ? void 0 : (_map$values = map.values) === null || _map$values === void 0 ? void 0 : _map$values[value]) || value;
|
|
2562
2594
|
return [attributeName, attributeValue];
|
|
2563
|
-
}
|
|
2595
|
+
} // export const formatAttribute = memoize(
|
|
2596
|
+
// (name: string, value: any): [string, any] => {
|
|
2597
|
+
// let attributeName = camelCase(name);
|
|
2598
|
+
// const map = FORMAT_ATTR_MAP[attributeName];
|
|
2599
|
+
// attributeName = map?.alias || attributeName;
|
|
2600
|
+
// const attributeValue = map?.values?.[value] || value;
|
|
2601
|
+
// return [attributeName, attributeValue];
|
|
2602
|
+
// },
|
|
2603
|
+
// (name: string, value: any) => {
|
|
2604
|
+
// return `${name}${value}`;
|
|
2605
|
+
// },
|
|
2606
|
+
// );
|
|
2564
2607
|
|
|
2565
2608
|
var Shape;
|
|
2566
2609
|
|
|
@@ -5142,8 +5185,8 @@ var CSSStyleValue = /*#__PURE__*/function () {
|
|
|
5142
5185
|
return UnitType.kPixels;
|
|
5143
5186
|
|
|
5144
5187
|
case UnitCategory.kUPercent:
|
|
5145
|
-
return UnitType.
|
|
5146
|
-
// Cannot convert between numbers and percent.
|
|
5188
|
+
return UnitType.kPercentage;
|
|
5189
|
+
// return UnitType.kUnknown; // Cannot convert between numbers and percent.
|
|
5147
5190
|
|
|
5148
5191
|
case UnitCategory.kUTime:
|
|
5149
5192
|
return UnitType.kSeconds;
|
|
@@ -7991,6 +8034,10 @@ function parserPercentage(css) {
|
|
|
7991
8034
|
*/
|
|
7992
8035
|
|
|
7993
8036
|
function parseLengthOrPercentage(css) {
|
|
8037
|
+
if (isNumber(css)) {
|
|
8038
|
+
return new CSSUnitValue(css, 'px');
|
|
8039
|
+
}
|
|
8040
|
+
|
|
7994
8041
|
return parseDimension(new RegExp('px|%|em|rem', 'g'), css);
|
|
7995
8042
|
}
|
|
7996
8043
|
function parseAngle(css) {
|
|
@@ -8002,6 +8049,7 @@ function parseAngle(css) {
|
|
|
8002
8049
|
* @example
|
|
8003
8050
|
* 10px + 20px = 30px
|
|
8004
8051
|
* 10deg + 10rad
|
|
8052
|
+
* 10% + 20% = 30%
|
|
8005
8053
|
*/
|
|
8006
8054
|
|
|
8007
8055
|
function mergeDimensions(left, right, target, nonNegative, index) {
|
|
@@ -8011,23 +8059,29 @@ function mergeDimensions(left, right, target, nonNegative, index) {
|
|
|
8011
8059
|
|
|
8012
8060
|
var unit = '';
|
|
8013
8061
|
var leftValue = left.value || 0;
|
|
8014
|
-
var rightValue = right.value || 0;
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
if (
|
|
8020
|
-
leftValue =
|
|
8021
|
-
rightValue =
|
|
8022
|
-
unit =
|
|
8023
|
-
}
|
|
8024
|
-
|
|
8062
|
+
var rightValue = right.value || 0;
|
|
8063
|
+
var canonicalUnit = CSSUnitValue.toCanonicalUnit(left.unit);
|
|
8064
|
+
var leftCanonicalUnitValue = left.convertTo(canonicalUnit);
|
|
8065
|
+
var rightCanonicalUnitValue = right.convertTo(canonicalUnit);
|
|
8066
|
+
|
|
8067
|
+
if (leftCanonicalUnitValue && rightCanonicalUnitValue) {
|
|
8068
|
+
leftValue = leftCanonicalUnitValue.value;
|
|
8069
|
+
rightValue = rightCanonicalUnitValue.value;
|
|
8070
|
+
unit = CSSUnitValue.unitTypeToString(left.unit);
|
|
8071
|
+
} else {
|
|
8072
|
+
// format '%' to 'px'
|
|
8073
|
+
if (CSSUnitValue.isLength(left.unit) || CSSUnitValue.isLength(right.unit)) {
|
|
8074
|
+
leftValue = convertPercentUnit(left, index, target);
|
|
8075
|
+
rightValue = convertPercentUnit(right, index, target);
|
|
8076
|
+
unit = 'px';
|
|
8077
|
+
}
|
|
8078
|
+
} // // format 'rad' 'turn' to 'deg'
|
|
8079
|
+
// if (CSSUnitValue.isAngle(left.unit) || CSSUnitValue.isAngle(right.unit)) {
|
|
8080
|
+
// leftValue = convertAngleUnit(left);
|
|
8081
|
+
// rightValue = convertAngleUnit(right);
|
|
8082
|
+
// unit = 'deg';
|
|
8083
|
+
// }
|
|
8025
8084
|
|
|
8026
|
-
if (CSSUnitValue.isAngle(left.unit) || CSSUnitValue.isAngle(right.unit)) {
|
|
8027
|
-
leftValue = convertAngleUnit(left);
|
|
8028
|
-
rightValue = convertAngleUnit(right);
|
|
8029
|
-
unit = 'deg';
|
|
8030
|
-
}
|
|
8031
8085
|
|
|
8032
8086
|
return [leftValue, rightValue, function (value) {
|
|
8033
8087
|
if (nonNegative) {
|
|
@@ -8157,7 +8211,7 @@ function mergeNumberLists(left, right) {
|
|
|
8157
8211
|
}];
|
|
8158
8212
|
}
|
|
8159
8213
|
|
|
8160
|
-
function
|
|
8214
|
+
var memoizedParsePath = memoize(function (path) {
|
|
8161
8215
|
var absolutePath;
|
|
8162
8216
|
|
|
8163
8217
|
try {
|
|
@@ -8189,11 +8243,6 @@ function parsePath(path, object) {
|
|
|
8189
8243
|
height = _getPathBBoxTotalLeng.height,
|
|
8190
8244
|
length = _getPathBBoxTotalLeng.length;
|
|
8191
8245
|
|
|
8192
|
-
if (object) {
|
|
8193
|
-
object.parsedStyle.defX = x;
|
|
8194
|
-
object.parsedStyle.defY = y;
|
|
8195
|
-
}
|
|
8196
|
-
|
|
8197
8246
|
return {
|
|
8198
8247
|
absolutePath: absolutePath,
|
|
8199
8248
|
hasArc: hasArc,
|
|
@@ -8205,6 +8254,18 @@ function parsePath(path, object) {
|
|
|
8205
8254
|
zCommandIndexes: zCommandIndexes,
|
|
8206
8255
|
rect: new Rectangle(x, y, width, height)
|
|
8207
8256
|
};
|
|
8257
|
+
}, function (path) {
|
|
8258
|
+
return isString(path) ? path : path2String(path);
|
|
8259
|
+
});
|
|
8260
|
+
function parsePath(path, object) {
|
|
8261
|
+
var result = memoizedParsePath(path);
|
|
8262
|
+
|
|
8263
|
+
if (object) {
|
|
8264
|
+
object.parsedStyle.defX = result.rect.x;
|
|
8265
|
+
object.parsedStyle.defY = result.rect.y;
|
|
8266
|
+
}
|
|
8267
|
+
|
|
8268
|
+
return result;
|
|
8208
8269
|
}
|
|
8209
8270
|
function mergePaths(left, right, object) {
|
|
8210
8271
|
var curve1 = left.curve;
|
|
@@ -8461,22 +8522,23 @@ function id$1(x) {
|
|
|
8461
8522
|
|
|
8462
8523
|
|
|
8463
8524
|
var transformFunctions = {
|
|
8464
|
-
//
|
|
8465
|
-
|
|
8525
|
+
// @ts-ignore
|
|
8526
|
+
matrix: ['NNNNNN', [_, _, 0, 0, _, _, 0, 0, 0, 0, 1, 0, _, _, 0, 1], id$1],
|
|
8527
|
+
matrix3d: ['NNNNNNNNNNNNNNNN', id$1],
|
|
8466
8528
|
rotate: ['A'],
|
|
8467
8529
|
rotatex: ['A'],
|
|
8468
8530
|
rotatey: ['A'],
|
|
8469
8531
|
rotatez: ['A'],
|
|
8470
8532
|
rotate3d: ['NNNA'],
|
|
8471
|
-
|
|
8533
|
+
perspective: ['L'],
|
|
8472
8534
|
scale: ['Nn', cast([_, _, CSS.number(1)]), id$1],
|
|
8473
8535
|
scalex: ['N', cast([_, CSS.number(1), CSS.number(1)]), cast([_, CSS.number(1)])],
|
|
8474
8536
|
scaley: ['N', cast([CSS.number(1), _, CSS.number(1)]), cast([CSS.number(1), _])],
|
|
8475
8537
|
scalez: ['N', cast([CSS.number(1), CSS.number(1), _])],
|
|
8476
8538
|
scale3d: ['NNN', id$1],
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8539
|
+
skew: ['Aa', null, id$1],
|
|
8540
|
+
skewx: ['A', null, cast([_, Odeg])],
|
|
8541
|
+
skewy: ['A', null, cast([Odeg, _])],
|
|
8480
8542
|
translate: ['Tt', cast([_, _, Opx]), id$1],
|
|
8481
8543
|
translatex: ['T', cast([_, Opx, Opx]), cast([_, Opx])],
|
|
8482
8544
|
translatey: ['T', cast([Opx, _, Opx]), cast([Opx, _])],
|
|
@@ -8569,33 +8631,289 @@ function parseTransform(string) {
|
|
|
8569
8631
|
}
|
|
8570
8632
|
|
|
8571
8633
|
return [];
|
|
8572
|
-
}
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8598
|
-
|
|
8634
|
+
}
|
|
8635
|
+
function convertItemToMatrix(item) {
|
|
8636
|
+
var x;
|
|
8637
|
+
var y;
|
|
8638
|
+
var z;
|
|
8639
|
+
var angle;
|
|
8640
|
+
|
|
8641
|
+
switch (item.t) {
|
|
8642
|
+
case 'rotatex':
|
|
8643
|
+
angle = deg2rad(convertAngleUnit(item.d[0]));
|
|
8644
|
+
return [1, 0, 0, 0, 0, Math.cos(angle), Math.sin(angle), 0, 0, -Math.sin(angle), Math.cos(angle), 0, 0, 0, 0, 1];
|
|
8645
|
+
|
|
8646
|
+
case 'rotatey':
|
|
8647
|
+
angle = deg2rad(convertAngleUnit(item.d[0]));
|
|
8648
|
+
return [Math.cos(angle), 0, -Math.sin(angle), 0, 0, 1, 0, 0, Math.sin(angle), 0, Math.cos(angle), 0, 0, 0, 0, 1];
|
|
8649
|
+
|
|
8650
|
+
case 'rotate':
|
|
8651
|
+
case 'rotatez':
|
|
8652
|
+
angle = deg2rad(convertAngleUnit(item.d[0]));
|
|
8653
|
+
return [Math.cos(angle), Math.sin(angle), 0, 0, -Math.sin(angle), Math.cos(angle), 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
8654
|
+
|
|
8655
|
+
case 'rotate3d':
|
|
8656
|
+
x = item.d[0].value;
|
|
8657
|
+
y = item.d[1].value;
|
|
8658
|
+
z = item.d[2].value;
|
|
8659
|
+
angle = deg2rad(convertAngleUnit(item.d[3]));
|
|
8660
|
+
var sqrLength = x * x + y * y + z * z;
|
|
8661
|
+
|
|
8662
|
+
if (sqrLength === 0) {
|
|
8663
|
+
x = 1;
|
|
8664
|
+
y = 0;
|
|
8665
|
+
z = 0;
|
|
8666
|
+
} else if (sqrLength !== 1) {
|
|
8667
|
+
var length = Math.sqrt(sqrLength);
|
|
8668
|
+
x /= length;
|
|
8669
|
+
y /= length;
|
|
8670
|
+
z /= length;
|
|
8671
|
+
}
|
|
8672
|
+
|
|
8673
|
+
var s = Math.sin(angle / 2);
|
|
8674
|
+
var sc = s * Math.cos(angle / 2);
|
|
8675
|
+
var sq = s * s;
|
|
8676
|
+
return [1 - 2 * (y * y + z * z) * sq, 2 * (x * y * sq + z * sc), 2 * (x * z * sq - y * sc), 0, 2 * (x * y * sq - z * sc), 1 - 2 * (x * x + z * z) * sq, 2 * (y * z * sq + x * sc), 0, 2 * (x * z * sq + y * sc), 2 * (y * z * sq - x * sc), 1 - 2 * (x * x + y * y) * sq, 0, 0, 0, 0, 1];
|
|
8677
|
+
|
|
8678
|
+
case 'scale':
|
|
8679
|
+
return [item.d[0].value, 0, 0, 0, 0, item.d[1].value, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
8680
|
+
|
|
8681
|
+
case 'scalex':
|
|
8682
|
+
return [item.d[0].value, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
8683
|
+
|
|
8684
|
+
case 'scaley':
|
|
8685
|
+
return [1, 0, 0, 0, 0, item.d[0].value, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
8686
|
+
|
|
8687
|
+
case 'scalez':
|
|
8688
|
+
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, item.d[0].value, 0, 0, 0, 0, 1];
|
|
8689
|
+
|
|
8690
|
+
case 'scale3d':
|
|
8691
|
+
return [item.d[0].value, 0, 0, 0, 0, item.d[1].value, 0, 0, 0, 0, item.d[2].value, 0, 0, 0, 0, 1];
|
|
8692
|
+
|
|
8693
|
+
case 'skew':
|
|
8694
|
+
var xAngle = deg2rad(convertAngleUnit(item.d[0]));
|
|
8695
|
+
var yAngle = deg2rad(convertAngleUnit(item.d[1]));
|
|
8696
|
+
return [1, Math.tan(yAngle), 0, 0, Math.tan(xAngle), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
8697
|
+
|
|
8698
|
+
case 'skewx':
|
|
8699
|
+
angle = deg2rad(convertAngleUnit(item.d[0]));
|
|
8700
|
+
return [1, 0, 0, 0, Math.tan(angle), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
8701
|
+
|
|
8702
|
+
case 'skewy':
|
|
8703
|
+
angle = deg2rad(convertAngleUnit(item.d[0]));
|
|
8704
|
+
return [1, Math.tan(angle), 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
8705
|
+
|
|
8706
|
+
case 'translate':
|
|
8707
|
+
// TODO: pass target
|
|
8708
|
+
x = convertPercentUnit(item.d[0], 0, null) || 0;
|
|
8709
|
+
y = convertPercentUnit(item.d[1], 0, null) || 0;
|
|
8710
|
+
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, 0, 1];
|
|
8711
|
+
|
|
8712
|
+
case 'translatex':
|
|
8713
|
+
x = convertPercentUnit(item.d[0], 0, null) || 0;
|
|
8714
|
+
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, 0, 0, 1];
|
|
8715
|
+
|
|
8716
|
+
case 'translatey':
|
|
8717
|
+
y = convertPercentUnit(item.d[0], 0, null) || 0;
|
|
8718
|
+
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, y, 0, 1];
|
|
8719
|
+
|
|
8720
|
+
case 'translatez':
|
|
8721
|
+
z = convertPercentUnit(item.d[0], 0, null) || 0;
|
|
8722
|
+
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, z, 1];
|
|
8723
|
+
|
|
8724
|
+
case 'translate3d':
|
|
8725
|
+
x = convertPercentUnit(item.d[0], 0, null) || 0;
|
|
8726
|
+
y = convertPercentUnit(item.d[1], 0, null) || 0;
|
|
8727
|
+
z = convertPercentUnit(item.d[2], 0, null) || 0;
|
|
8728
|
+
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, z, 1];
|
|
8729
|
+
|
|
8730
|
+
case 'perspective':
|
|
8731
|
+
var t = convertPercentUnit(item.d[0], 0, null) || 0;
|
|
8732
|
+
var p = t ? -1 / t : 0;
|
|
8733
|
+
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, p, 0, 0, 0, 1];
|
|
8734
|
+
|
|
8735
|
+
case 'matrix':
|
|
8736
|
+
return [item.d[0].value, item.d[1].value, 0, 0, item.d[2].value, item.d[3].value, 0, 0, 0, 0, 1, 0, item.d[4].value, item.d[5].value, 0, 1];
|
|
8737
|
+
|
|
8738
|
+
case 'matrix3d':
|
|
8739
|
+
return item.d.map(function (d) {
|
|
8740
|
+
return d.value;
|
|
8741
|
+
});
|
|
8742
|
+
}
|
|
8743
|
+
}
|
|
8744
|
+
|
|
8745
|
+
function multiplyMatrices(a, b) {
|
|
8746
|
+
return [a[0] * b[0] + a[4] * b[1] + a[8] * b[2] + a[12] * b[3], a[1] * b[0] + a[5] * b[1] + a[9] * b[2] + a[13] * b[3], a[2] * b[0] + a[6] * b[1] + a[10] * b[2] + a[14] * b[3], a[3] * b[0] + a[7] * b[1] + a[11] * b[2] + a[15] * b[3], a[0] * b[4] + a[4] * b[5] + a[8] * b[6] + a[12] * b[7], a[1] * b[4] + a[5] * b[5] + a[9] * b[6] + a[13] * b[7], a[2] * b[4] + a[6] * b[5] + a[10] * b[6] + a[14] * b[7], a[3] * b[4] + a[7] * b[5] + a[11] * b[6] + a[15] * b[7], a[0] * b[8] + a[4] * b[9] + a[8] * b[10] + a[12] * b[11], a[1] * b[8] + a[5] * b[9] + a[9] * b[10] + a[13] * b[11], a[2] * b[8] + a[6] * b[9] + a[10] * b[10] + a[14] * b[11], a[3] * b[8] + a[7] * b[9] + a[11] * b[10] + a[15] * b[11], a[0] * b[12] + a[4] * b[13] + a[8] * b[14] + a[12] * b[15], a[1] * b[12] + a[5] * b[13] + a[9] * b[14] + a[13] * b[15], a[2] * b[12] + a[6] * b[13] + a[10] * b[14] + a[14] * b[15], a[3] * b[12] + a[7] * b[13] + a[11] * b[14] + a[15] * b[15]];
|
|
8747
|
+
}
|
|
8748
|
+
|
|
8749
|
+
function convertToMatrix(transformList) {
|
|
8750
|
+
if (transformList.length === 0) {
|
|
8751
|
+
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
8752
|
+
}
|
|
8753
|
+
|
|
8754
|
+
return transformList.map(convertItemToMatrix).reduce(multiplyMatrices);
|
|
8755
|
+
}
|
|
8756
|
+
|
|
8757
|
+
function makeMatrixDecomposition(transformList) {
|
|
8758
|
+
var translate = [0, 0, 0];
|
|
8759
|
+
var scale = [0, 0, 0];
|
|
8760
|
+
var skew = [0, 0, 0];
|
|
8761
|
+
var perspective = [0, 0, 0, 1];
|
|
8762
|
+
var quaternion = [0, 0, 0, 1];
|
|
8763
|
+
decomposeMatrix(convertToMatrix(transformList), translate, scale, skew, perspective, quaternion);
|
|
8764
|
+
return [translate, scale, skew, quaternion, perspective];
|
|
8765
|
+
}
|
|
8766
|
+
|
|
8767
|
+
var composeMatrix = function () {
|
|
8768
|
+
function multiply(a, b) {
|
|
8769
|
+
var result = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]];
|
|
8770
|
+
|
|
8771
|
+
for (var i = 0; i < 4; i++) {
|
|
8772
|
+
for (var j = 0; j < 4; j++) {
|
|
8773
|
+
for (var k = 0; k < 4; k++) {
|
|
8774
|
+
result[i][j] += b[i][k] * a[k][j];
|
|
8775
|
+
}
|
|
8776
|
+
}
|
|
8777
|
+
}
|
|
8778
|
+
|
|
8779
|
+
return result;
|
|
8780
|
+
}
|
|
8781
|
+
|
|
8782
|
+
function is2D(m) {
|
|
8783
|
+
return m[0][2] == 0 && m[0][3] == 0 && m[1][2] == 0 && m[1][3] == 0 && m[2][0] == 0 && m[2][1] == 0 && m[2][2] == 1 && m[2][3] == 0 && m[3][2] == 0 && m[3][3] == 1;
|
|
8784
|
+
}
|
|
8785
|
+
|
|
8786
|
+
function composeMatrix(translate, scale, skew, quat, perspective) {
|
|
8787
|
+
var matrix = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]];
|
|
8788
|
+
|
|
8789
|
+
for (var i = 0; i < 4; i++) {
|
|
8790
|
+
matrix[i][3] = perspective[i];
|
|
8791
|
+
}
|
|
8792
|
+
|
|
8793
|
+
for (var _i = 0; _i < 3; _i++) {
|
|
8794
|
+
for (var j = 0; j < 3; j++) {
|
|
8795
|
+
matrix[3][_i] += translate[j] * matrix[j][_i];
|
|
8796
|
+
}
|
|
8797
|
+
}
|
|
8798
|
+
|
|
8799
|
+
var x = quat[0],
|
|
8800
|
+
y = quat[1],
|
|
8801
|
+
z = quat[2],
|
|
8802
|
+
w = quat[3];
|
|
8803
|
+
var rotMatrix = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]];
|
|
8804
|
+
rotMatrix[0][0] = 1 - 2 * (y * y + z * z);
|
|
8805
|
+
rotMatrix[0][1] = 2 * (x * y - z * w);
|
|
8806
|
+
rotMatrix[0][2] = 2 * (x * z + y * w);
|
|
8807
|
+
rotMatrix[1][0] = 2 * (x * y + z * w);
|
|
8808
|
+
rotMatrix[1][1] = 1 - 2 * (x * x + z * z);
|
|
8809
|
+
rotMatrix[1][2] = 2 * (y * z - x * w);
|
|
8810
|
+
rotMatrix[2][0] = 2 * (x * z - y * w);
|
|
8811
|
+
rotMatrix[2][1] = 2 * (y * z + x * w);
|
|
8812
|
+
rotMatrix[2][2] = 1 - 2 * (x * x + y * y);
|
|
8813
|
+
matrix = multiply(matrix, rotMatrix);
|
|
8814
|
+
var temp = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]];
|
|
8815
|
+
|
|
8816
|
+
if (skew[2]) {
|
|
8817
|
+
temp[2][1] = skew[2];
|
|
8818
|
+
matrix = multiply(matrix, temp);
|
|
8819
|
+
}
|
|
8820
|
+
|
|
8821
|
+
if (skew[1]) {
|
|
8822
|
+
temp[2][1] = 0;
|
|
8823
|
+
temp[2][0] = skew[0];
|
|
8824
|
+
matrix = multiply(matrix, temp);
|
|
8825
|
+
}
|
|
8826
|
+
|
|
8827
|
+
if (skew[0]) {
|
|
8828
|
+
temp[2][0] = 0;
|
|
8829
|
+
temp[1][0] = skew[0];
|
|
8830
|
+
matrix = multiply(matrix, temp);
|
|
8831
|
+
}
|
|
8832
|
+
|
|
8833
|
+
for (var _i2 = 0; _i2 < 3; _i2++) {
|
|
8834
|
+
for (var _j = 0; _j < 3; _j++) {
|
|
8835
|
+
matrix[_i2][_j] *= scale[_i2];
|
|
8836
|
+
}
|
|
8837
|
+
}
|
|
8838
|
+
|
|
8839
|
+
if (is2D(matrix)) {
|
|
8840
|
+
return [matrix[0][0], matrix[0][1], matrix[1][0], matrix[1][1], matrix[3][0], matrix[3][1]];
|
|
8841
|
+
}
|
|
8842
|
+
|
|
8843
|
+
return matrix[0].concat(matrix[1], matrix[2], matrix[3]);
|
|
8844
|
+
}
|
|
8845
|
+
|
|
8846
|
+
return composeMatrix;
|
|
8847
|
+
}();
|
|
8848
|
+
|
|
8849
|
+
function numberToLongString(x) {
|
|
8850
|
+
return x.toFixed(6).replace('.000000', '');
|
|
8851
|
+
}
|
|
8852
|
+
|
|
8853
|
+
function mergeMatrices(left, right) {
|
|
8854
|
+
var leftArgs;
|
|
8855
|
+
var rightArgs; // @ts-ignore
|
|
8856
|
+
|
|
8857
|
+
if (left.decompositionPair !== right) {
|
|
8858
|
+
// @ts-ignore
|
|
8859
|
+
left.decompositionPair = right;
|
|
8860
|
+
leftArgs = makeMatrixDecomposition(left);
|
|
8861
|
+
} // @ts-ignore
|
|
8862
|
+
|
|
8863
|
+
|
|
8864
|
+
if (right.decompositionPair !== left) {
|
|
8865
|
+
// @ts-ignore
|
|
8866
|
+
right.decompositionPair = left;
|
|
8867
|
+
rightArgs = makeMatrixDecomposition(right);
|
|
8868
|
+
}
|
|
8869
|
+
|
|
8870
|
+
if (leftArgs[0] === null || rightArgs[0] === null) return [// @ts-ignore
|
|
8871
|
+
[false], // @ts-ignore
|
|
8872
|
+
[true], // @ts-ignore
|
|
8873
|
+
function (x) {
|
|
8874
|
+
return x ? right[0].d : left[0].d;
|
|
8875
|
+
}];
|
|
8876
|
+
leftArgs[0].push(0);
|
|
8877
|
+
rightArgs[0].push(1);
|
|
8878
|
+
return [leftArgs, rightArgs, // @ts-ignore
|
|
8879
|
+
function (list) {
|
|
8880
|
+
// @ts-ignore
|
|
8881
|
+
var q = quat(leftArgs[0][3], rightArgs[0][3], list[5]);
|
|
8882
|
+
var mat = composeMatrix(list[0], list[1], list[2], q, list[4]);
|
|
8883
|
+
var stringifiedArgs = mat.map(numberToLongString).join(',');
|
|
8884
|
+
return stringifiedArgs;
|
|
8885
|
+
}];
|
|
8886
|
+
}
|
|
8887
|
+
|
|
8888
|
+
function dot(v1, v2) {
|
|
8889
|
+
var result = 0;
|
|
8890
|
+
|
|
8891
|
+
for (var i = 0; i < v1.length; i++) {
|
|
8892
|
+
result += v1[i] * v2[i];
|
|
8893
|
+
}
|
|
8894
|
+
|
|
8895
|
+
return result;
|
|
8896
|
+
}
|
|
8897
|
+
|
|
8898
|
+
function quat(fromQ, toQ, f) {
|
|
8899
|
+
var product = dot(fromQ, toQ);
|
|
8900
|
+
product = clamp(product, -1.0, 1.0);
|
|
8901
|
+
var quat = [];
|
|
8902
|
+
|
|
8903
|
+
if (product === 1.0) {
|
|
8904
|
+
quat = fromQ;
|
|
8905
|
+
} else {
|
|
8906
|
+
var theta = Math.acos(product);
|
|
8907
|
+
var w = Math.sin(f * theta) * 1 / Math.sqrt(1 - product * product);
|
|
8908
|
+
|
|
8909
|
+
for (var i = 0; i < 4; i++) {
|
|
8910
|
+
quat.push(fromQ[i] * (Math.cos(f * theta) - product * w) + toQ[i] * w);
|
|
8911
|
+
}
|
|
8912
|
+
}
|
|
8913
|
+
|
|
8914
|
+
return quat;
|
|
8915
|
+
} // scalex/y/z -> scale
|
|
8916
|
+
|
|
8599
8917
|
|
|
8600
8918
|
function typeTo2D(type) {
|
|
8601
8919
|
return type.replace(/[xy]/, '');
|
|
@@ -8625,7 +8943,7 @@ function mergeTransforms(left, right, target) {
|
|
|
8625
8943
|
type = _left$i.t,
|
|
8626
8944
|
args = _left$i.d; // none -> scale(1)/translateX(0)
|
|
8627
8945
|
|
|
8628
|
-
var defaultValue = type.
|
|
8946
|
+
var defaultValue = type.substring(0, 5) === 'scale' ? 1 : 0;
|
|
8629
8947
|
right.push({
|
|
8630
8948
|
t: type,
|
|
8631
8949
|
d: args.map(function (arg) {
|
|
@@ -8650,21 +8968,31 @@ function mergeTransforms(left, right, target) {
|
|
|
8650
8968
|
var rightResult = [];
|
|
8651
8969
|
var types = []; // merge matrix() with matrix3d()
|
|
8652
8970
|
|
|
8653
|
-
if (left.length !== right.length)
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8971
|
+
if (left.length !== right.length) {
|
|
8972
|
+
var merged = mergeMatrices(left, right); // @ts-ignore
|
|
8973
|
+
|
|
8974
|
+
leftResult = [merged[0]]; // @ts-ignore
|
|
8975
|
+
|
|
8976
|
+
rightResult = [merged[1]];
|
|
8977
|
+
types = [['matrix', [merged[2]]]];
|
|
8978
|
+
} else {
|
|
8979
|
+
for (var _i3 = 0; _i3 < left.length; _i3++) {
|
|
8980
|
+
var leftType = left[_i3].t;
|
|
8981
|
+
var rightType = right[_i3].t;
|
|
8982
|
+
var leftArgs = left[_i3].d;
|
|
8983
|
+
var rightArgs = right[_i3].d;
|
|
8659
8984
|
var leftFunctionData = transformFunctions[leftType];
|
|
8660
8985
|
var rightFunctionData = transformFunctions[rightType];
|
|
8661
8986
|
var type = void 0;
|
|
8662
8987
|
|
|
8663
8988
|
if (isMatrixOrPerspective(leftType, rightType)) {
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8989
|
+
var _merged = mergeMatrices([left[_i3]], [right[_i3]]); // @ts-ignore
|
|
8990
|
+
|
|
8991
|
+
|
|
8992
|
+
leftResult.push(_merged[0]); // @ts-ignore
|
|
8993
|
+
|
|
8994
|
+
rightResult.push(_merged[1]);
|
|
8995
|
+
types.push(['matrix', [_merged[2]]]);
|
|
8668
8996
|
continue;
|
|
8669
8997
|
} else if (leftType === rightType) {
|
|
8670
8998
|
type = leftType;
|
|
@@ -8681,10 +9009,13 @@ function mergeTransforms(left, right, target) {
|
|
|
8681
9009
|
|
|
8682
9010
|
rightArgs = rightFunctionData[1](rightArgs);
|
|
8683
9011
|
} else {
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
9012
|
+
var _merged2 = mergeMatrices(left, right); // @ts-ignore
|
|
9013
|
+
|
|
9014
|
+
|
|
9015
|
+
leftResult = [_merged2[0]]; // @ts-ignore
|
|
9016
|
+
|
|
9017
|
+
rightResult = [_merged2[1]];
|
|
9018
|
+
types = [['matrix', [_merged2[2]]]];
|
|
8688
9019
|
break;
|
|
8689
9020
|
}
|
|
8690
9021
|
|
|
@@ -8695,10 +9026,11 @@ function mergeTransforms(left, right, target) {
|
|
|
8695
9026
|
for (var j = 0; j < leftArgs.length; j++) {
|
|
8696
9027
|
var merge = leftArgs[j].unit === UnitType.kNumber ? mergeNumbers : mergeDimensions; // @ts-ignore
|
|
8697
9028
|
|
|
8698
|
-
var
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
9029
|
+
var _merged3 = merge(leftArgs[j], rightArgs[j], target, false, j);
|
|
9030
|
+
|
|
9031
|
+
leftArgsCopy[j] = _merged3[0];
|
|
9032
|
+
rightArgsCopy[j] = _merged3[1];
|
|
9033
|
+
stringConversions.push(_merged3[2]);
|
|
8702
9034
|
}
|
|
8703
9035
|
|
|
8704
9036
|
leftResult.push(leftArgsCopy);
|
|
@@ -8840,8 +9172,8 @@ var ElementEvent;
|
|
|
8840
9172
|
*/
|
|
8841
9173
|
|
|
8842
9174
|
ElementEvent["UNMOUNTED"] = "DOMNodeRemovedFromDocument";
|
|
8843
|
-
ElementEvent["BOUNDS_CHANGED"] = "bounds-changed";
|
|
8844
|
-
|
|
9175
|
+
ElementEvent["BOUNDS_CHANGED"] = "bounds-changed"; // GEOMETRY_BOUNDS_CHANGED = 'geometry-bounds-changed',
|
|
9176
|
+
|
|
8845
9177
|
/**
|
|
8846
9178
|
* trigger when z-index changed
|
|
8847
9179
|
*/
|
|
@@ -9601,11 +9933,12 @@ var Transform = function Transform() {
|
|
|
9601
9933
|
this.localDirtyFlag = false;
|
|
9602
9934
|
this.frozen = false;
|
|
9603
9935
|
this.localPosition = vec3.fromValues(0, 0, 0);
|
|
9604
|
-
this.localRotation = quat.fromValues(0, 0, 0, 1);
|
|
9936
|
+
this.localRotation = quat$1.fromValues(0, 0, 0, 1);
|
|
9605
9937
|
this.localScale = vec3.fromValues(1, 1, 1);
|
|
9606
9938
|
this.localTransform = mat4.create();
|
|
9939
|
+
this.localSkew = vec2.fromValues(0, 0);
|
|
9607
9940
|
this.position = vec3.fromValues(0, 0, 0);
|
|
9608
|
-
this.rotation = quat.fromValues(0, 0, 0, 1);
|
|
9941
|
+
this.rotation = quat$1.fromValues(0, 0, 0, 1);
|
|
9609
9942
|
this.scaling = vec3.fromValues(1, 1, 1);
|
|
9610
9943
|
this.worldTransform = mat4.create();
|
|
9611
9944
|
this.origin = vec3.fromValues(0, 0, 0);
|
|
@@ -11056,7 +11389,8 @@ var DEFAULT_STYLE_PROPS = {
|
|
|
11056
11389
|
fontVariant: '',
|
|
11057
11390
|
textAlign: '',
|
|
11058
11391
|
textBaseline: '',
|
|
11059
|
-
textTransform: ''
|
|
11392
|
+
textTransform: '',
|
|
11393
|
+
zIndex: ''
|
|
11060
11394
|
};
|
|
11061
11395
|
/**
|
|
11062
11396
|
* prototype chains: DisplayObject -> Element -> Node -> EventTarget
|
|
@@ -11088,7 +11422,7 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
11088
11422
|
* push to active animations after calling `animate()`
|
|
11089
11423
|
*/
|
|
11090
11424
|
function DisplayObject(config) {
|
|
11091
|
-
var _this$config$capture
|
|
11425
|
+
var _this$config$capture;
|
|
11092
11426
|
|
|
11093
11427
|
var _this;
|
|
11094
11428
|
|
|
@@ -11099,6 +11433,7 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
11099
11433
|
_this.styleValueRegistry = GlobalContainer.get(StyleValueRegistry);
|
|
11100
11434
|
_this.isCustomElement = false;
|
|
11101
11435
|
_this.activeAnimations = [];
|
|
11436
|
+
_this.mutationEvent = new MutationEvent(ElementEvent.ATTR_MODIFIED, _assertThisInitialized(_this), null, null, null, MutationEvent.MODIFICATION, null, null);
|
|
11102
11437
|
_this.config = config; // compatible with G 3.0
|
|
11103
11438
|
|
|
11104
11439
|
_this.config.interactive = (_this$config$capture = _this.config.capture) !== null && _this$config$capture !== void 0 ? _this$config$capture : _this.config.interactive; // init scene graph node
|
|
@@ -11112,10 +11447,7 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
11112
11447
|
|
|
11113
11448
|
_this.nodeName = _this.config.type || Shape.GROUP; // compatible with G 3.0
|
|
11114
11449
|
|
|
11115
|
-
_this.config.style = _extends({}, DEFAULT_STYLE_PROPS,
|
|
11116
|
-
zIndex: (_this$config$zIndex = _this.config.zIndex) !== null && _this$config$zIndex !== void 0 ? _this$config$zIndex : 0,
|
|
11117
|
-
interactive: (_this$config$interact = _this.config.interactive) !== null && _this$config$interact !== void 0 ? _this$config$interact : true
|
|
11118
|
-
}, _this.config.style, _this.config.attrs);
|
|
11450
|
+
_this.config.style = _extends({}, DEFAULT_STYLE_PROPS, _this.config.style, _this.config.attrs);
|
|
11119
11451
|
|
|
11120
11452
|
if (_this.config.visible != null) {
|
|
11121
11453
|
_this.config.style.visibility = _this.config.visible === false ? 'hidden' : 'visible';
|
|
@@ -11246,9 +11578,10 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
11246
11578
|
var oldParsedValue = this.parsedStyle[name];
|
|
11247
11579
|
this.styleValueRegistry.processProperties(this, (_this$styleValueRegis = {}, _this$styleValueRegis[name] = value, _this$styleValueRegis), parseOptions); // inform clip path targets
|
|
11248
11580
|
|
|
11249
|
-
if (this.
|
|
11250
|
-
this.
|
|
11251
|
-
dirtifyToRoot(target);
|
|
11581
|
+
if (this.parsedStyle.clipPathTargets && this.parsedStyle.clipPathTargets.length) {
|
|
11582
|
+
this.parsedStyle.clipPathTargets.forEach(function (target) {
|
|
11583
|
+
_this2.sceneGraphService.dirtifyToRoot(target);
|
|
11584
|
+
|
|
11252
11585
|
target.dispatchEvent(new MutationEvent(ElementEvent.ATTR_MODIFIED, target, _this2, _this2, 'clipPath', MutationEvent.MODIFICATION, _this2, _this2));
|
|
11253
11586
|
|
|
11254
11587
|
if (target.isCustomElement && target.isConnected) {
|
|
@@ -11260,8 +11593,15 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
11260
11593
|
} // redraw at next frame
|
|
11261
11594
|
|
|
11262
11595
|
|
|
11263
|
-
renderable.dirty = true;
|
|
11264
|
-
this.
|
|
11596
|
+
renderable.dirty = true; // trigger later
|
|
11597
|
+
// this.sceneGraphService.pendingEvents.push([ElementEvent.ATTR_MODIFIED, { affectChildren }]);
|
|
11598
|
+
|
|
11599
|
+
this.mutationEvent.prevValue = oldValue;
|
|
11600
|
+
this.mutationEvent.newValue = value;
|
|
11601
|
+
this.mutationEvent.attrName = name;
|
|
11602
|
+
this.mutationEvent.prevParsedValue = oldParsedValue;
|
|
11603
|
+
this.mutationEvent.newParsedValue = this.parsedStyle[name];
|
|
11604
|
+
this.dispatchEvent(this.mutationEvent);
|
|
11265
11605
|
|
|
11266
11606
|
if (this.isCustomElement && this.isConnected) {
|
|
11267
11607
|
if (this.attributeChangedCallback) {
|
|
@@ -11517,6 +11857,11 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
11517
11857
|
return this;
|
|
11518
11858
|
};
|
|
11519
11859
|
|
|
11860
|
+
_proto.setLocalSkew = function setLocalSkew(skew, y) {
|
|
11861
|
+
this.sceneGraphService.setLocalSkew(this, skew, y);
|
|
11862
|
+
return this;
|
|
11863
|
+
};
|
|
11864
|
+
|
|
11520
11865
|
_proto.getRotation = function getRotation() {
|
|
11521
11866
|
return this.sceneGraphService.getRotation(this);
|
|
11522
11867
|
};
|
|
@@ -11525,6 +11870,10 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
11525
11870
|
return this.sceneGraphService.getLocalRotation(this);
|
|
11526
11871
|
};
|
|
11527
11872
|
|
|
11873
|
+
_proto.getLocalSkew = function getLocalSkew() {
|
|
11874
|
+
return this.sceneGraphService.getLocalSkew(this);
|
|
11875
|
+
};
|
|
11876
|
+
|
|
11528
11877
|
_proto.getLocalTransform = function getLocalTransform() {
|
|
11529
11878
|
return this.sceneGraphService.getLocalTransform(this);
|
|
11530
11879
|
};
|
|
@@ -11563,10 +11912,10 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
11563
11912
|
|
|
11564
11913
|
var timeline = (_this$ownerDocument = this.ownerDocument) === null || _this$ownerDocument === void 0 ? void 0 : _this$ownerDocument.timeline; // account for clip path, use target's timeline
|
|
11565
11914
|
|
|
11566
|
-
if (this.
|
|
11915
|
+
if (this.parsedStyle.clipPathTargets && this.parsedStyle.clipPathTargets.length) {
|
|
11567
11916
|
var _target$ownerDocument;
|
|
11568
11917
|
|
|
11569
|
-
var target = this.
|
|
11918
|
+
var target = this.parsedStyle.clipPathTargets[0];
|
|
11570
11919
|
timeline = (_target$ownerDocument = target.ownerDocument) === null || _target$ownerDocument === void 0 ? void 0 : _target$ownerDocument.timeline;
|
|
11571
11920
|
} // clear old parsed transform
|
|
11572
11921
|
|
|
@@ -11860,7 +12209,7 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
11860
12209
|
sx = _mat4$getScaling[0],
|
|
11861
12210
|
sy = _mat4$getScaling[1];
|
|
11862
12211
|
|
|
11863
|
-
var rotation = mat4.getRotation(quat.create(), transform); // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12212
|
+
var rotation = mat4.getRotation(quat$1.create(), transform); // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11864
12213
|
|
|
11865
12214
|
var _getEuler3 = getEuler(vec3.create(), rotation),
|
|
11866
12215
|
eux = _getEuler3[0],
|
|
@@ -11972,9 +12321,7 @@ var Circle = /*#__PURE__*/function (_DisplayObject) {
|
|
|
11972
12321
|
style: _extends({
|
|
11973
12322
|
cx: '',
|
|
11974
12323
|
cy: '',
|
|
11975
|
-
r: ''
|
|
11976
|
-
anchor: '0.5 0.5',
|
|
11977
|
-
transformOrigin: 'center'
|
|
12324
|
+
r: ''
|
|
11978
12325
|
}, style)
|
|
11979
12326
|
}, rest)) || this;
|
|
11980
12327
|
}
|
|
@@ -11997,9 +12344,7 @@ var Ellipse = /*#__PURE__*/function (_DisplayObject) {
|
|
|
11997
12344
|
cx: '',
|
|
11998
12345
|
cy: '',
|
|
11999
12346
|
rx: '',
|
|
12000
|
-
ry: ''
|
|
12001
|
-
anchor: '0.5 0.5',
|
|
12002
|
-
transformOrigin: 'center'
|
|
12347
|
+
ry: ''
|
|
12003
12348
|
}, style)
|
|
12004
12349
|
}, rest)) || this;
|
|
12005
12350
|
}
|
|
@@ -12096,9 +12441,17 @@ var Line = /*#__PURE__*/function (_DisplayObject) {
|
|
|
12096
12441
|
x1 = _this$parsedStyle.x1,
|
|
12097
12442
|
y1 = _this$parsedStyle.y1,
|
|
12098
12443
|
x2 = _this$parsedStyle.x2,
|
|
12099
|
-
y2 = _this$parsedStyle.y2
|
|
12100
|
-
|
|
12101
|
-
|
|
12444
|
+
y2 = _this$parsedStyle.y2,
|
|
12445
|
+
defX = _this$parsedStyle.defX,
|
|
12446
|
+
defY = _this$parsedStyle.defY;
|
|
12447
|
+
|
|
12448
|
+
var _LineUtil$pointAt = Line$1.pointAt(x1.value, y1.value, x2.value, y2.value, ratio),
|
|
12449
|
+
x = _LineUtil$pointAt.x,
|
|
12450
|
+
y = _LineUtil$pointAt.y;
|
|
12451
|
+
|
|
12452
|
+
var transformed = vec3.transformMat4(vec3.create(), vec3.fromValues(x - defX, y - defY, 0), this.getLocalTransform()); // apply local transformation
|
|
12453
|
+
|
|
12454
|
+
return new Point(transformed[0], transformed[1]);
|
|
12102
12455
|
};
|
|
12103
12456
|
|
|
12104
12457
|
_proto.getTotalLength = function getTotalLength() {
|
|
@@ -12143,7 +12496,10 @@ var Path = /*#__PURE__*/function (_DisplayObject) {
|
|
|
12143
12496
|
;
|
|
12144
12497
|
|
|
12145
12498
|
_proto.getPoint = function getPoint(ratio) {
|
|
12146
|
-
var _this$parsedStyle
|
|
12499
|
+
var _this$parsedStyle = this.parsedStyle,
|
|
12500
|
+
defX = _this$parsedStyle.defX,
|
|
12501
|
+
defY = _this$parsedStyle.defY,
|
|
12502
|
+
_this$parsedStyle$pat = _this$parsedStyle.path,
|
|
12147
12503
|
totalLength = _this$parsedStyle$pat.totalLength,
|
|
12148
12504
|
absolutePath = _this$parsedStyle$pat.absolutePath;
|
|
12149
12505
|
|
|
@@ -12151,7 +12507,9 @@ var Path = /*#__PURE__*/function (_DisplayObject) {
|
|
|
12151
12507
|
x = _getPointAtLength.x,
|
|
12152
12508
|
y = _getPointAtLength.y;
|
|
12153
12509
|
|
|
12154
|
-
|
|
12510
|
+
var transformed = vec3.transformMat4(vec3.create(), vec3.fromValues(x - defX, y - defY, 0), this.getLocalTransform()); // apply local transformation
|
|
12511
|
+
|
|
12512
|
+
return new Point(transformed[0], transformed[1]);
|
|
12155
12513
|
}
|
|
12156
12514
|
/**
|
|
12157
12515
|
* Get start tangent vector
|
|
@@ -12256,7 +12614,10 @@ var Polyline = /*#__PURE__*/function (_DisplayObject) {
|
|
|
12256
12614
|
};
|
|
12257
12615
|
|
|
12258
12616
|
_proto.getPoint = function getPoint(ratio) {
|
|
12259
|
-
var _this$parsedStyle
|
|
12617
|
+
var _this$parsedStyle = this.parsedStyle,
|
|
12618
|
+
defX = _this$parsedStyle.defX,
|
|
12619
|
+
defY = _this$parsedStyle.defY,
|
|
12620
|
+
_this$parsedStyle$poi = _this$parsedStyle.points,
|
|
12260
12621
|
points = _this$parsedStyle$poi.points,
|
|
12261
12622
|
segments = _this$parsedStyle$poi.segments;
|
|
12262
12623
|
var subt = 0;
|
|
@@ -12272,7 +12633,9 @@ var Polyline = /*#__PURE__*/function (_DisplayObject) {
|
|
|
12272
12633
|
x = _LineUtil$pointAt.x,
|
|
12273
12634
|
y = _LineUtil$pointAt.y;
|
|
12274
12635
|
|
|
12275
|
-
|
|
12636
|
+
var transformed = vec3.transformMat4(vec3.create(), vec3.fromValues(x - defX, y - defY, 0), this.getLocalTransform()); // apply local transformation
|
|
12637
|
+
|
|
12638
|
+
return new Point(transformed[0], transformed[1]);
|
|
12276
12639
|
};
|
|
12277
12640
|
|
|
12278
12641
|
_proto.getStartTangent = function getStartTangent() {
|
|
@@ -14072,29 +14435,6 @@ function sortByZIndex(o1, o2) {
|
|
|
14072
14435
|
|
|
14073
14436
|
return zIndex1 - zIndex2;
|
|
14074
14437
|
}
|
|
14075
|
-
function dirtifyToRoot(element, affectChildren) {
|
|
14076
|
-
if (affectChildren === void 0) {
|
|
14077
|
-
affectChildren = false;
|
|
14078
|
-
}
|
|
14079
|
-
|
|
14080
|
-
var p = element;
|
|
14081
|
-
|
|
14082
|
-
while (p) {
|
|
14083
|
-
var renderable = p.renderable;
|
|
14084
|
-
|
|
14085
|
-
if (renderable) {
|
|
14086
|
-
renderable.renderBoundsDirty = true;
|
|
14087
|
-
renderable.boundsDirty = true;
|
|
14088
|
-
renderable.dirty = true;
|
|
14089
|
-
}
|
|
14090
|
-
|
|
14091
|
-
p = p.parentNode;
|
|
14092
|
-
}
|
|
14093
|
-
|
|
14094
|
-
element.dispatchEvent(new CustomEvent(ElementEvent.BOUNDS_CHANGED, {
|
|
14095
|
-
affectChildren: affectChildren
|
|
14096
|
-
}));
|
|
14097
|
-
}
|
|
14098
14438
|
var SceneGraphService = Syringe.defineToken('SceneGraphService');
|
|
14099
14439
|
/**
|
|
14100
14440
|
* update transform in scene graph
|
|
@@ -14107,9 +14447,11 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14107
14447
|
var _this = this;
|
|
14108
14448
|
|
|
14109
14449
|
this.sceneGraphSelectorFactory = void 0;
|
|
14450
|
+
this.pendingEvents = [];
|
|
14451
|
+
this.boundsChangedEvent = new CustomEvent(ElementEvent.BOUNDS_CHANGED);
|
|
14110
14452
|
|
|
14111
14453
|
this.rotate = function () {
|
|
14112
|
-
var parentInvertRotation = quat.create();
|
|
14454
|
+
var parentInvertRotation = quat$1.create();
|
|
14113
14455
|
return function (element, degrees, y, z) {
|
|
14114
14456
|
if (y === void 0) {
|
|
14115
14457
|
y = 0;
|
|
@@ -14128,18 +14470,18 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14128
14470
|
if (element.parentNode === null || !element.parentNode.transformable) {
|
|
14129
14471
|
_this.rotateLocal(element, degrees);
|
|
14130
14472
|
} else {
|
|
14131
|
-
var rotation = quat.create();
|
|
14132
|
-
quat.fromEuler(rotation, degrees[0], degrees[1], degrees[2]);
|
|
14473
|
+
var rotation = quat$1.create();
|
|
14474
|
+
quat$1.fromEuler(rotation, degrees[0], degrees[1], degrees[2]);
|
|
14133
14475
|
|
|
14134
14476
|
var rot = _this.getRotation(element);
|
|
14135
14477
|
|
|
14136
14478
|
var parentRot = _this.getRotation(element.parentNode);
|
|
14137
14479
|
|
|
14138
|
-
quat.copy(parentInvertRotation, parentRot);
|
|
14139
|
-
quat.invert(parentInvertRotation, parentInvertRotation);
|
|
14140
|
-
quat.multiply(rotation, parentInvertRotation, rotation);
|
|
14141
|
-
quat.multiply(transform.localRotation, rotation, rot);
|
|
14142
|
-
quat.normalize(transform.localRotation, transform.localRotation);
|
|
14480
|
+
quat$1.copy(parentInvertRotation, parentRot);
|
|
14481
|
+
quat$1.invert(parentInvertRotation, parentInvertRotation);
|
|
14482
|
+
quat$1.multiply(rotation, parentInvertRotation, rotation);
|
|
14483
|
+
quat$1.multiply(transform.localRotation, rotation, rot);
|
|
14484
|
+
quat$1.normalize(transform.localRotation, transform.localRotation);
|
|
14143
14485
|
|
|
14144
14486
|
_this.dirtifyLocal(element, transform);
|
|
14145
14487
|
}
|
|
@@ -14147,7 +14489,7 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14147
14489
|
}();
|
|
14148
14490
|
|
|
14149
14491
|
this.rotateLocal = function () {
|
|
14150
|
-
var rotation = quat.create();
|
|
14492
|
+
var rotation = quat$1.create();
|
|
14151
14493
|
return function (element, degrees, y, z) {
|
|
14152
14494
|
if (y === void 0) {
|
|
14153
14495
|
y = 0;
|
|
@@ -14162,15 +14504,15 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14162
14504
|
}
|
|
14163
14505
|
|
|
14164
14506
|
var transform = element.transformable;
|
|
14165
|
-
quat.fromEuler(rotation, degrees[0], degrees[1], degrees[2]);
|
|
14166
|
-
quat.mul(transform.localRotation, transform.localRotation, rotation);
|
|
14507
|
+
quat$1.fromEuler(rotation, degrees[0], degrees[1], degrees[2]);
|
|
14508
|
+
quat$1.mul(transform.localRotation, transform.localRotation, rotation);
|
|
14167
14509
|
|
|
14168
14510
|
_this.dirtifyLocal(element, transform);
|
|
14169
14511
|
};
|
|
14170
14512
|
}();
|
|
14171
14513
|
|
|
14172
14514
|
this.setEulerAngles = function () {
|
|
14173
|
-
var invParentRot = quat.create();
|
|
14515
|
+
var invParentRot = quat$1.create();
|
|
14174
14516
|
return function (element, degrees, y, z) {
|
|
14175
14517
|
if (y === void 0) {
|
|
14176
14518
|
y = 0;
|
|
@@ -14189,12 +14531,12 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14189
14531
|
if (element.parentNode === null || !element.parentNode.transformable) {
|
|
14190
14532
|
_this.setLocalEulerAngles(element, degrees);
|
|
14191
14533
|
} else {
|
|
14192
|
-
quat.fromEuler(transform.localRotation, degrees[0], degrees[1], degrees[2]);
|
|
14534
|
+
quat$1.fromEuler(transform.localRotation, degrees[0], degrees[1], degrees[2]);
|
|
14193
14535
|
|
|
14194
14536
|
var parentRotation = _this.getRotation(element.parentNode);
|
|
14195
14537
|
|
|
14196
|
-
quat.copy(invParentRot, quat.invert(quat.create(), parentRotation));
|
|
14197
|
-
quat.mul(transform.localRotation, transform.localRotation, invParentRot);
|
|
14538
|
+
quat$1.copy(invParentRot, quat$1.invert(quat$1.create(), parentRotation));
|
|
14539
|
+
quat$1.mul(transform.localRotation, transform.localRotation, invParentRot);
|
|
14198
14540
|
|
|
14199
14541
|
_this.dirtifyLocal(element, transform);
|
|
14200
14542
|
}
|
|
@@ -14279,12 +14621,12 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14279
14621
|
}();
|
|
14280
14622
|
|
|
14281
14623
|
this.setRotation = function () {
|
|
14282
|
-
var parentInvertRotation = quat.create();
|
|
14624
|
+
var parentInvertRotation = quat$1.create();
|
|
14283
14625
|
return function (element, rotation, y, z, w) {
|
|
14284
14626
|
var transform = element.transformable;
|
|
14285
14627
|
|
|
14286
14628
|
if (typeof rotation === 'number') {
|
|
14287
|
-
rotation = quat.fromValues(rotation, y, z, w);
|
|
14629
|
+
rotation = quat$1.fromValues(rotation, y, z, w);
|
|
14288
14630
|
}
|
|
14289
14631
|
|
|
14290
14632
|
if (element.parentNode === null || !element.parentNode.transformable) {
|
|
@@ -14292,10 +14634,10 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14292
14634
|
} else {
|
|
14293
14635
|
var parentRot = _this.getRotation(element.parentNode);
|
|
14294
14636
|
|
|
14295
|
-
quat.copy(parentInvertRotation, parentRot);
|
|
14296
|
-
quat.invert(parentInvertRotation, parentInvertRotation);
|
|
14297
|
-
quat.multiply(transform.localRotation, parentInvertRotation, rotation);
|
|
14298
|
-
quat.normalize(transform.localRotation, transform.localRotation);
|
|
14637
|
+
quat$1.copy(parentInvertRotation, parentRot);
|
|
14638
|
+
quat$1.invert(parentInvertRotation, parentInvertRotation);
|
|
14639
|
+
quat$1.multiply(transform.localRotation, parentInvertRotation, rotation);
|
|
14640
|
+
quat$1.normalize(transform.localRotation, transform.localRotation);
|
|
14299
14641
|
|
|
14300
14642
|
_this.dirtifyLocal(element, transform);
|
|
14301
14643
|
}
|
|
@@ -14440,7 +14782,7 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14440
14782
|
}
|
|
14441
14783
|
|
|
14442
14784
|
var transform = element.transformable;
|
|
14443
|
-
quat.fromEuler(transform.localRotation, degrees[0], degrees[1], degrees[2]);
|
|
14785
|
+
quat$1.fromEuler(transform.localRotation, degrees[0], degrees[1], degrees[2]);
|
|
14444
14786
|
this.dirtifyLocal(element, transform);
|
|
14445
14787
|
}
|
|
14446
14788
|
/**
|
|
@@ -14506,11 +14848,21 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14506
14848
|
|
|
14507
14849
|
_proto.setLocalRotation = function setLocalRotation(element, rotation, y, z, w) {
|
|
14508
14850
|
if (typeof rotation === 'number') {
|
|
14509
|
-
rotation = quat.fromValues(rotation, y, z, w);
|
|
14851
|
+
rotation = quat$1.fromValues(rotation, y, z, w);
|
|
14510
14852
|
}
|
|
14511
14853
|
|
|
14512
14854
|
var transform = element.transformable;
|
|
14513
|
-
quat.copy(transform.localRotation, rotation);
|
|
14855
|
+
quat$1.copy(transform.localRotation, rotation);
|
|
14856
|
+
this.dirtifyLocal(element, transform);
|
|
14857
|
+
};
|
|
14858
|
+
|
|
14859
|
+
_proto.setLocalSkew = function setLocalSkew(element, skew, y) {
|
|
14860
|
+
if (typeof skew === 'number') {
|
|
14861
|
+
skew = vec2.fromValues(skew, y);
|
|
14862
|
+
}
|
|
14863
|
+
|
|
14864
|
+
var transform = element.transformable;
|
|
14865
|
+
vec2.copy(transform.localSkew, skew);
|
|
14514
14866
|
this.dirtifyLocal(element, transform);
|
|
14515
14867
|
};
|
|
14516
14868
|
|
|
@@ -14530,7 +14882,60 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14530
14882
|
}
|
|
14531
14883
|
|
|
14532
14884
|
this.dirtifyWorldInternal(element, transform);
|
|
14533
|
-
dirtifyToRoot(element, true);
|
|
14885
|
+
this.dirtifyToRoot(element, true);
|
|
14886
|
+
};
|
|
14887
|
+
|
|
14888
|
+
_proto.triggerPendingEvents = function triggerPendingEvents() {
|
|
14889
|
+
var _this2 = this;
|
|
14890
|
+
|
|
14891
|
+
var set = new Set();
|
|
14892
|
+
|
|
14893
|
+
var trigger = function trigger(element, detail) {
|
|
14894
|
+
if (!set.has(element.entity)) {
|
|
14895
|
+
_this2.boundsChangedEvent.detail = detail;
|
|
14896
|
+
element.dispatchEvent(_this2.boundsChangedEvent);
|
|
14897
|
+
set.add(element.entity);
|
|
14898
|
+
}
|
|
14899
|
+
};
|
|
14900
|
+
|
|
14901
|
+
this.pendingEvents.forEach(function (_ref) {
|
|
14902
|
+
var element = _ref[0],
|
|
14903
|
+
detail = _ref[1];
|
|
14904
|
+
|
|
14905
|
+
if (detail.affectChildren) {
|
|
14906
|
+
element.forEach(function (e) {
|
|
14907
|
+
trigger(e, detail);
|
|
14908
|
+
});
|
|
14909
|
+
} else {
|
|
14910
|
+
trigger(element, detail);
|
|
14911
|
+
}
|
|
14912
|
+
});
|
|
14913
|
+
this.pendingEvents = [];
|
|
14914
|
+
};
|
|
14915
|
+
|
|
14916
|
+
_proto.dirtifyToRoot = function dirtifyToRoot(element, affectChildren) {
|
|
14917
|
+
if (affectChildren === void 0) {
|
|
14918
|
+
affectChildren = false;
|
|
14919
|
+
}
|
|
14920
|
+
|
|
14921
|
+
var p = element;
|
|
14922
|
+
|
|
14923
|
+
while (p) {
|
|
14924
|
+
var renderable = p.renderable;
|
|
14925
|
+
|
|
14926
|
+
if (renderable) {
|
|
14927
|
+
renderable.renderBoundsDirty = true;
|
|
14928
|
+
renderable.boundsDirty = true;
|
|
14929
|
+
renderable.dirty = true;
|
|
14930
|
+
}
|
|
14931
|
+
|
|
14932
|
+
p = p.parentNode;
|
|
14933
|
+
} // reuse the same custom event
|
|
14934
|
+
|
|
14935
|
+
|
|
14936
|
+
this.pendingEvents.push([element, {
|
|
14937
|
+
affectChildren: affectChildren
|
|
14938
|
+
}]);
|
|
14534
14939
|
};
|
|
14535
14940
|
|
|
14536
14941
|
_proto.getPosition = function getPosition(element) {
|
|
@@ -14577,11 +14982,37 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14577
14982
|
return element.transformable.localScale;
|
|
14578
14983
|
};
|
|
14579
14984
|
|
|
14985
|
+
_proto.getLocalSkew = function getLocalSkew(element) {
|
|
14986
|
+
return element.transformable.localSkew;
|
|
14987
|
+
};
|
|
14988
|
+
|
|
14989
|
+
_proto.calcLocalTransform = function calcLocalTransform(transform) {
|
|
14990
|
+
// @see https://github.com/mattdesl/css-mat4/blob/master/index.js
|
|
14991
|
+
// mat4.fromRotationTranslationScaleOrigin(
|
|
14992
|
+
// transform.localTransform,
|
|
14993
|
+
// transform.localRotation,
|
|
14994
|
+
// transform.localPosition,
|
|
14995
|
+
// transform.localScale,
|
|
14996
|
+
// transform.origin,
|
|
14997
|
+
// );
|
|
14998
|
+
mat4.fromRotationTranslationScaleOrigin(transform.localTransform, transform.localRotation, transform.localPosition, vec3.fromValues(1, 1, 1), transform.origin); // apply skew2D
|
|
14999
|
+
|
|
15000
|
+
if (transform.localSkew[0] !== 0 || transform.localSkew[1] !== 0) {
|
|
15001
|
+
var tmpMat4 = mat4.identity(mat4.create());
|
|
15002
|
+
tmpMat4[4] = Math.tan(transform.localSkew[0]);
|
|
15003
|
+
tmpMat4[1] = Math.tan(transform.localSkew[1]);
|
|
15004
|
+
mat4.multiply(transform.localTransform, transform.localTransform, tmpMat4);
|
|
15005
|
+
}
|
|
15006
|
+
|
|
15007
|
+
var scaling = mat4.fromRotationTranslationScaleOrigin(mat4.create(), quat$1.fromValues(0, 0, 0, 1), vec3.create(), transform.localScale, transform.origin);
|
|
15008
|
+
mat4.multiply(transform.localTransform, transform.localTransform, scaling);
|
|
15009
|
+
};
|
|
15010
|
+
|
|
14580
15011
|
_proto.getLocalTransform = function getLocalTransform(element) {
|
|
14581
15012
|
var transform = element.transformable;
|
|
14582
15013
|
|
|
14583
15014
|
if (transform.localDirtyFlag) {
|
|
14584
|
-
|
|
15015
|
+
this.calcLocalTransform(transform);
|
|
14585
15016
|
transform.localDirtyFlag = false;
|
|
14586
15017
|
}
|
|
14587
15018
|
|
|
@@ -14590,7 +15021,7 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14590
15021
|
|
|
14591
15022
|
_proto.setLocalTransform = function setLocalTransform(element, transform) {
|
|
14592
15023
|
var t = mat4.getTranslation(vec3.create(), transform);
|
|
14593
|
-
var r = mat4.getRotation(quat.create(), transform);
|
|
15024
|
+
var r = mat4.getRotation(quat$1.create(), transform);
|
|
14594
15025
|
var s = mat4.getScaling(vec3.create(), transform);
|
|
14595
15026
|
this.setLocalScale(element, s);
|
|
14596
15027
|
this.setLocalPosition(element, t);
|
|
@@ -14601,6 +15032,7 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14601
15032
|
this.setLocalScale(element, [1, 1, 1]);
|
|
14602
15033
|
this.setLocalPosition(element, [0, 0, 0]);
|
|
14603
15034
|
this.setLocalEulerAngles(element, [0, 0, 0]);
|
|
15035
|
+
this.setLocalSkew(element, [0, 0]);
|
|
14604
15036
|
};
|
|
14605
15037
|
|
|
14606
15038
|
_proto.getTransformedGeometryBounds = function getTransformedGeometryBounds(element, render) {
|
|
@@ -14629,8 +15061,9 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14629
15061
|
}
|
|
14630
15062
|
|
|
14631
15063
|
var geometry = element.geometry;
|
|
14632
|
-
var bounds = render ? geometry.renderBounds : geometry.contentBounds || null;
|
|
14633
|
-
|
|
15064
|
+
var bounds = render ? geometry.renderBounds : geometry.contentBounds || null; // return (bounds && new AABB(bounds.center, bounds.halfExtents)) || new AABB();
|
|
15065
|
+
|
|
15066
|
+
return bounds || new AABB();
|
|
14634
15067
|
}
|
|
14635
15068
|
/**
|
|
14636
15069
|
* account for children in world space
|
|
@@ -14638,7 +15071,7 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14638
15071
|
;
|
|
14639
15072
|
|
|
14640
15073
|
_proto.getBounds = function getBounds(element, render) {
|
|
14641
|
-
var
|
|
15074
|
+
var _this3 = this;
|
|
14642
15075
|
|
|
14643
15076
|
if (render === void 0) {
|
|
14644
15077
|
render = false;
|
|
@@ -14659,7 +15092,7 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14659
15092
|
|
|
14660
15093
|
var children = element.childNodes;
|
|
14661
15094
|
children.forEach(function (child) {
|
|
14662
|
-
var childBounds =
|
|
15095
|
+
var childBounds = _this3.getBounds(child, render);
|
|
14663
15096
|
|
|
14664
15097
|
if (childBounds) {
|
|
14665
15098
|
if (!aabb) {
|
|
@@ -14671,7 +15104,7 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14671
15104
|
}
|
|
14672
15105
|
}); // account for clip path
|
|
14673
15106
|
|
|
14674
|
-
var clipPath = element.
|
|
15107
|
+
var clipPath = element.parsedStyle.clipPath;
|
|
14675
15108
|
|
|
14676
15109
|
if (clipPath) {
|
|
14677
15110
|
var clipPathBounds = this.getTransformedGeometryBounds(clipPath, true);
|
|
@@ -14762,7 +15195,7 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14762
15195
|
};
|
|
14763
15196
|
|
|
14764
15197
|
_proto.dirtifyWorldInternal = function dirtifyWorldInternal(element, transform) {
|
|
14765
|
-
var
|
|
15198
|
+
var _this4 = this;
|
|
14766
15199
|
|
|
14767
15200
|
if (!transform.dirtyFlag) {
|
|
14768
15201
|
transform.dirtyFlag = true;
|
|
@@ -14771,7 +15204,7 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14771
15204
|
var childTransform = child.transformable;
|
|
14772
15205
|
|
|
14773
15206
|
if (!childTransform.dirtyFlag) {
|
|
14774
|
-
|
|
15207
|
+
_this4.dirtifyWorldInternal(child, childTransform);
|
|
14775
15208
|
}
|
|
14776
15209
|
});
|
|
14777
15210
|
var renderable = element.renderable;
|
|
@@ -14781,8 +15214,6 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14781
15214
|
renderable.boundsDirty = true;
|
|
14782
15215
|
renderable.dirty = true;
|
|
14783
15216
|
}
|
|
14784
|
-
|
|
14785
|
-
element.dispatchEvent(new MutationEvent(ElementEvent.ATTR_MODIFIED, element, null, null, 'modelMatrix', MutationEvent.MODIFICATION, null, null));
|
|
14786
15217
|
}
|
|
14787
15218
|
};
|
|
14788
15219
|
|
|
@@ -14808,7 +15239,7 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
|
|
|
14808
15239
|
|
|
14809
15240
|
_proto.sync = function sync(element, transform) {
|
|
14810
15241
|
if (transform.localDirtyFlag) {
|
|
14811
|
-
|
|
15242
|
+
this.calcLocalTransform(transform);
|
|
14812
15243
|
transform.localDirtyFlag = false;
|
|
14813
15244
|
}
|
|
14814
15245
|
|
|
@@ -15612,11 +16043,11 @@ var Camera = /*#__PURE__*/function (_EventEmitter) {
|
|
|
15612
16043
|
this.roll += this.relRoll;
|
|
15613
16044
|
|
|
15614
16045
|
if (this.type === CameraType.EXPLORING) {
|
|
15615
|
-
var rotX = quat.setAxisAngle(quat.create(), [1, 0, 0], (this.rotateWorld ? 1 : -1) * this.relElevation * DEG_2_RAD);
|
|
15616
|
-
var rotY = quat.setAxisAngle(quat.create(), [0, 1, 0], (this.rotateWorld ? 1 : -1) * this.relAzimuth * DEG_2_RAD);
|
|
15617
|
-
var rotZ = quat.setAxisAngle(quat.create(), [0, 0, 1], this.relRoll * DEG_2_RAD);
|
|
15618
|
-
var rotQ = quat.multiply(quat.create(), rotY, rotX);
|
|
15619
|
-
rotQ = quat.multiply(quat.create(), rotQ, rotZ);
|
|
16046
|
+
var rotX = quat$1.setAxisAngle(quat$1.create(), [1, 0, 0], (this.rotateWorld ? 1 : -1) * this.relElevation * DEG_2_RAD);
|
|
16047
|
+
var rotY = quat$1.setAxisAngle(quat$1.create(), [0, 1, 0], (this.rotateWorld ? 1 : -1) * this.relAzimuth * DEG_2_RAD);
|
|
16048
|
+
var rotZ = quat$1.setAxisAngle(quat$1.create(), [0, 0, 1], this.relRoll * DEG_2_RAD);
|
|
16049
|
+
var rotQ = quat$1.multiply(quat$1.create(), rotY, rotX);
|
|
16050
|
+
rotQ = quat$1.multiply(quat$1.create(), rotQ, rotZ);
|
|
15620
16051
|
var rotMatrix = mat4.fromQuat(mat4.create(), rotQ);
|
|
15621
16052
|
mat4.translate(this.matrix, this.matrix, [0, 0, -this.distance]);
|
|
15622
16053
|
mat4.multiply(this.matrix, this.matrix, rotMatrix);
|
|
@@ -15870,13 +16301,13 @@ var Camera = /*#__PURE__*/function (_EventEmitter) {
|
|
|
15870
16301
|
_proto.computeMatrix = function computeMatrix() {
|
|
15871
16302
|
// 使用四元数描述 3D 旋转
|
|
15872
16303
|
// @see https://xiaoiver.github.io/coding/2018/12/28/Camera-%E8%AE%BE%E8%AE%A1-%E4%B8%80.html
|
|
15873
|
-
var rotZ = quat.setAxisAngle(quat.create(), [0, 0, 1], this.roll * DEG_2_RAD);
|
|
16304
|
+
var rotZ = quat$1.setAxisAngle(quat$1.create(), [0, 0, 1], this.roll * DEG_2_RAD);
|
|
15874
16305
|
mat4.identity(this.matrix); // only consider HCS for EXPLORING and ORBITING cameras
|
|
15875
16306
|
|
|
15876
|
-
var rotX = quat.setAxisAngle(quat.create(), [1, 0, 0], (this.rotateWorld && this.type !== CameraType.TRACKING || this.type === CameraType.TRACKING ? 1 : -1) * this.elevation * DEG_2_RAD);
|
|
15877
|
-
var rotY = quat.setAxisAngle(quat.create(), [0, 1, 0], (this.rotateWorld && this.type !== CameraType.TRACKING || this.type === CameraType.TRACKING ? 1 : -1) * this.azimuth * DEG_2_RAD);
|
|
15878
|
-
var rotQ = quat.multiply(quat.create(), rotY, rotX);
|
|
15879
|
-
rotQ = quat.multiply(quat.create(), rotQ, rotZ);
|
|
16307
|
+
var rotX = quat$1.setAxisAngle(quat$1.create(), [1, 0, 0], (this.rotateWorld && this.type !== CameraType.TRACKING || this.type === CameraType.TRACKING ? 1 : -1) * this.elevation * DEG_2_RAD);
|
|
16308
|
+
var rotY = quat$1.setAxisAngle(quat$1.create(), [0, 1, 0], (this.rotateWorld && this.type !== CameraType.TRACKING || this.type === CameraType.TRACKING ? 1 : -1) * this.azimuth * DEG_2_RAD);
|
|
16309
|
+
var rotQ = quat$1.multiply(quat$1.create(), rotY, rotX);
|
|
16310
|
+
rotQ = quat$1.multiply(quat$1.create(), rotQ, rotZ);
|
|
15880
16311
|
var rotMatrix = mat4.fromQuat(mat4.create(), rotQ);
|
|
15881
16312
|
|
|
15882
16313
|
if (this.type === CameraType.ORBITING || this.type === CameraType.EXPLORING) {
|
|
@@ -15985,7 +16416,7 @@ var Camera = /*#__PURE__*/function (_EventEmitter) {
|
|
|
15985
16416
|
}
|
|
15986
16417
|
|
|
15987
16418
|
var position = this.position;
|
|
15988
|
-
var rotZ = quat.setAxisAngle(quat.create(), [0, 0, 1], -this.roll * Math.PI / 180);
|
|
16419
|
+
var rotZ = quat$1.setAxisAngle(quat$1.create(), [0, 0, 1], -this.roll * Math.PI / 180);
|
|
15989
16420
|
mat4.fromRotationTranslationScaleOrigin(this.orthoMatrix, rotZ, vec3.fromValues((this.rright - this.left) / 2 - position[0], (this.top - this.bottom) / 2 - position[1], 0), vec3.fromValues(this.zoom, this.zoom, 1), position);
|
|
15990
16421
|
};
|
|
15991
16422
|
|
|
@@ -16035,6 +16466,7 @@ var RenderingPluginContribution = Syringe.defineToken('RenderingPluginContributi
|
|
|
16035
16466
|
var RenderingService = /*#__PURE__*/function () {
|
|
16036
16467
|
function RenderingService() {
|
|
16037
16468
|
this.renderingPluginProvider = void 0;
|
|
16469
|
+
this.canvasConfig = void 0;
|
|
16038
16470
|
this.renderingContext = void 0;
|
|
16039
16471
|
this.sceneGraphService = void 0;
|
|
16040
16472
|
this.styleValueRegistry = void 0;
|
|
@@ -16148,6 +16580,21 @@ var RenderingService = /*#__PURE__*/function () {
|
|
|
16148
16580
|
|
|
16149
16581
|
_proto.getStats = function getStats() {
|
|
16150
16582
|
return this.stats;
|
|
16583
|
+
}
|
|
16584
|
+
/**
|
|
16585
|
+
* Meet the following conditions:
|
|
16586
|
+
* * disable DirtyRectangleRendering
|
|
16587
|
+
* * camera changed
|
|
16588
|
+
*/
|
|
16589
|
+
;
|
|
16590
|
+
|
|
16591
|
+
_proto.disableDirtyRectangleRendering = function disableDirtyRectangleRendering() {
|
|
16592
|
+
var renderer = this.canvasConfig.renderer;
|
|
16593
|
+
|
|
16594
|
+
var _renderer$getConfig = renderer.getConfig(),
|
|
16595
|
+
enableDirtyRectangleRendering = _renderer$getConfig.enableDirtyRectangleRendering;
|
|
16596
|
+
|
|
16597
|
+
return !enableDirtyRectangleRendering || this.renderingContext.renderReasons.has(RenderReason.CAMERA_CHANGED);
|
|
16151
16598
|
};
|
|
16152
16599
|
|
|
16153
16600
|
_proto.render = function render(canvasConfig) {
|
|
@@ -16157,6 +16604,7 @@ var RenderingService = /*#__PURE__*/function () {
|
|
|
16157
16604
|
this.stats.rendered = 0;
|
|
16158
16605
|
this.zIndexCounter = 0;
|
|
16159
16606
|
this.sceneGraphService.syncHierarchy(this.renderingContext.root);
|
|
16607
|
+
this.sceneGraphService.triggerPendingEvents();
|
|
16160
16608
|
|
|
16161
16609
|
if (this.renderingContext.renderReasons.size && this.inited) {
|
|
16162
16610
|
this.renderDisplayObject(this.renderingContext.root, canvasConfig);
|
|
@@ -16244,6 +16692,8 @@ var RenderingService = /*#__PURE__*/function () {
|
|
|
16244
16692
|
|
|
16245
16693
|
__decorate([contrib(RenderingPluginContribution), __metadata("design:type", Object)], RenderingService.prototype, "renderingPluginProvider", void 0);
|
|
16246
16694
|
|
|
16695
|
+
__decorate([inject(CanvasConfig), __metadata("design:type", Object)], RenderingService.prototype, "canvasConfig", void 0);
|
|
16696
|
+
|
|
16247
16697
|
__decorate([inject(RenderingContext), __metadata("design:type", Object)], RenderingService.prototype, "renderingContext", void 0);
|
|
16248
16698
|
|
|
16249
16699
|
__decorate([inject(SceneGraphService), __metadata("design:type", Object)], RenderingService.prototype, "sceneGraphService", void 0);
|
|
@@ -18237,7 +18687,9 @@ PathUpdater = __decorate([singleton({
|
|
|
18237
18687
|
*/
|
|
18238
18688
|
|
|
18239
18689
|
var CSSPropertyClipPath = /*#__PURE__*/function () {
|
|
18240
|
-
function CSSPropertyClipPath() {
|
|
18690
|
+
function CSSPropertyClipPath() {
|
|
18691
|
+
this.sceneGraphService = void 0;
|
|
18692
|
+
}
|
|
18241
18693
|
|
|
18242
18694
|
var _proto = CSSPropertyClipPath.prototype;
|
|
18243
18695
|
|
|
@@ -18248,26 +18700,28 @@ var CSSPropertyClipPath = /*#__PURE__*/function () {
|
|
|
18248
18700
|
} // clear ref to old clip path
|
|
18249
18701
|
|
|
18250
18702
|
|
|
18251
|
-
if (oldClipPath && oldClipPath !== newClipPath && oldClipPath.
|
|
18252
|
-
var index = oldClipPath.
|
|
18253
|
-
oldClipPath.
|
|
18703
|
+
if (oldClipPath && oldClipPath !== newClipPath && oldClipPath.parsedStyle.clipPathTargets) {
|
|
18704
|
+
var index = oldClipPath.parsedStyle.clipPathTargets.indexOf(object);
|
|
18705
|
+
oldClipPath.parsedStyle.clipPathTargets.splice(index, 1);
|
|
18254
18706
|
}
|
|
18255
18707
|
|
|
18256
18708
|
if (newClipPath) {
|
|
18257
|
-
if (!newClipPath.
|
|
18258
|
-
newClipPath.
|
|
18709
|
+
if (!newClipPath.parsedStyle.clipPathTargets) {
|
|
18710
|
+
newClipPath.parsedStyle.clipPathTargets = [];
|
|
18259
18711
|
}
|
|
18260
18712
|
|
|
18261
|
-
newClipPath.
|
|
18713
|
+
newClipPath.parsedStyle.clipPathTargets.push(object);
|
|
18262
18714
|
}
|
|
18263
18715
|
|
|
18264
|
-
dirtifyToRoot(object);
|
|
18716
|
+
this.sceneGraphService.dirtifyToRoot(object);
|
|
18265
18717
|
return newClipPath;
|
|
18266
18718
|
};
|
|
18267
18719
|
|
|
18268
18720
|
return CSSPropertyClipPath;
|
|
18269
18721
|
}();
|
|
18270
18722
|
|
|
18723
|
+
__decorate([inject(SceneGraphService), __metadata("design:type", Object)], CSSPropertyClipPath.prototype, "sceneGraphService", void 0);
|
|
18724
|
+
|
|
18271
18725
|
CSSPropertyClipPath = __decorate([singleton({
|
|
18272
18726
|
token: {
|
|
18273
18727
|
token: CSSProperty,
|
|
@@ -18347,21 +18801,6 @@ var CSSPropertyLengthOrPercentage = /*#__PURE__*/function () {
|
|
|
18347
18801
|
_proto.calculator = function calculator(name, oldParsed, computed, object, registry) {
|
|
18348
18802
|
if (CSSUnitValue.isRelativeUnit(computed.unit)) {
|
|
18349
18803
|
if (computed.unit === UnitType.kPercentage) {
|
|
18350
|
-
// try to resolve according to parent's geometry bounds
|
|
18351
|
-
// if (object.parentElement) {
|
|
18352
|
-
// // registry.registerParentGeometryBoundsChangedHandler(object, name);
|
|
18353
|
-
// return this.calculateUsedValueWithParentBounds(object, name);
|
|
18354
|
-
// } else {
|
|
18355
|
-
// registry.addUnresolveProperty(object, name);
|
|
18356
|
-
// // defer calculation after mounted
|
|
18357
|
-
// // object.addEventListener(
|
|
18358
|
-
// // ElementEvent.MOUNTED,
|
|
18359
|
-
// // () => {
|
|
18360
|
-
// // registry.registerParentGeometryBoundsChangedHandler(object, name);
|
|
18361
|
-
// // },
|
|
18362
|
-
// // { once: true },
|
|
18363
|
-
// // );
|
|
18364
|
-
// }
|
|
18365
18804
|
return new CSSUnitValue(0, 'px');
|
|
18366
18805
|
} else if (computed.unit === UnitType.kEms) {
|
|
18367
18806
|
if (object.parentNode) {
|
|
@@ -18395,10 +18834,13 @@ var CSSPropertyLengthOrPercentage = /*#__PURE__*/function () {
|
|
|
18395
18834
|
}();
|
|
18396
18835
|
|
|
18397
18836
|
CSSPropertyLengthOrPercentage = __decorate([singleton({
|
|
18398
|
-
token: {
|
|
18837
|
+
token: [{
|
|
18399
18838
|
token: CSSProperty,
|
|
18400
18839
|
named: PropertySyntax.LENGTH_PERCENTAGE
|
|
18401
|
-
}
|
|
18840
|
+
}, {
|
|
18841
|
+
token: CSSProperty,
|
|
18842
|
+
named: PropertySyntax.LENGTH
|
|
18843
|
+
}]
|
|
18402
18844
|
})], CSSPropertyLengthOrPercentage);
|
|
18403
18845
|
|
|
18404
18846
|
/**
|
|
@@ -18567,6 +19009,18 @@ CSSPropertyLocalPosition = __decorate([singleton({
|
|
|
18567
19009
|
}
|
|
18568
19010
|
})], CSSPropertyLocalPosition);
|
|
18569
19011
|
|
|
19012
|
+
var CSSPropertyNumber = function CSSPropertyNumber() {
|
|
19013
|
+
this.mixer = mergeNumbers;
|
|
19014
|
+
this.parser = parseNumber;
|
|
19015
|
+
};
|
|
19016
|
+
|
|
19017
|
+
CSSPropertyNumber = __decorate([singleton({
|
|
19018
|
+
token: {
|
|
19019
|
+
token: CSSProperty,
|
|
19020
|
+
named: PropertySyntax.NUMBER
|
|
19021
|
+
}
|
|
19022
|
+
})], CSSPropertyNumber);
|
|
19023
|
+
|
|
18570
19024
|
var CSSPropertyOffsetDistance = /*#__PURE__*/function () {
|
|
18571
19025
|
function CSSPropertyOffsetDistance() {
|
|
18572
19026
|
this.parser = parseNumber;
|
|
@@ -18875,9 +19329,9 @@ var CSSPropertyTransform = /*#__PURE__*/function () {
|
|
|
18875
19329
|
// reset transform
|
|
18876
19330
|
object.resetLocalTransform();
|
|
18877
19331
|
object.setLocalPosition(defX, defY);
|
|
18878
|
-
transform.forEach(function (
|
|
18879
|
-
var t =
|
|
18880
|
-
d =
|
|
19332
|
+
transform.forEach(function (parsed) {
|
|
19333
|
+
var t = parsed.t,
|
|
19334
|
+
d = parsed.d;
|
|
18881
19335
|
|
|
18882
19336
|
if (t === 'scale') {
|
|
18883
19337
|
// scale(1) scale(1, 1)
|
|
@@ -18943,7 +19397,24 @@ var CSSPropertyTransform = /*#__PURE__*/function () {
|
|
|
18943
19397
|
var _newAngles3 = d || [Odeg];
|
|
18944
19398
|
|
|
18945
19399
|
object.rotateLocal(0, 0, _newAngles3[0].value);
|
|
18946
|
-
} else ;
|
|
19400
|
+
} else if (t === 'rotate3d') ; else if (t === 'skew') {
|
|
19401
|
+
var newSkew = d.map(function (s) {
|
|
19402
|
+
return s.value;
|
|
19403
|
+
}) || [0, 0];
|
|
19404
|
+
object.setLocalSkew(deg2rad(newSkew[0]), deg2rad(newSkew[1]));
|
|
19405
|
+
} else if (t === 'skewx') {
|
|
19406
|
+
var _newSkew = d.map(function (s) {
|
|
19407
|
+
return s.value;
|
|
19408
|
+
}) || [0];
|
|
19409
|
+
|
|
19410
|
+
object.setLocalSkew(deg2rad(_newSkew[0]), object.getLocalSkew()[1]);
|
|
19411
|
+
} else if (t === 'skewy') {
|
|
19412
|
+
var _newSkew2 = d.map(function (s) {
|
|
19413
|
+
return s.value;
|
|
19414
|
+
}) || [0];
|
|
19415
|
+
|
|
19416
|
+
object.setLocalSkew(object.getLocalSkew()[0], deg2rad(_newSkew2[0]));
|
|
19417
|
+
}
|
|
18947
19418
|
});
|
|
18948
19419
|
}
|
|
18949
19420
|
};
|
|
@@ -19198,13 +19669,25 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
19198
19669
|
name: 'transformOrigin',
|
|
19199
19670
|
parsePriority: 100,
|
|
19200
19671
|
// interpolable: true,
|
|
19201
|
-
defaultValue:
|
|
19672
|
+
defaultValue: function defaultValue(nodeName) {
|
|
19673
|
+
if (nodeName === Shape.CIRCLE || nodeName === Shape.ELLIPSE) {
|
|
19674
|
+
return 'center';
|
|
19675
|
+
}
|
|
19676
|
+
|
|
19677
|
+
return 'left top';
|
|
19678
|
+
},
|
|
19202
19679
|
layoutDependent: true,
|
|
19203
19680
|
syntax: PropertySyntax.TRANSFORM_ORIGIN
|
|
19204
19681
|
}, {
|
|
19205
19682
|
name: 'anchor',
|
|
19206
19683
|
parsePriority: 99,
|
|
19207
|
-
defaultValue:
|
|
19684
|
+
defaultValue: function defaultValue(nodeName) {
|
|
19685
|
+
if (nodeName === Shape.CIRCLE || nodeName === Shape.ELLIPSE) {
|
|
19686
|
+
return '0.5 0.5';
|
|
19687
|
+
}
|
|
19688
|
+
|
|
19689
|
+
return '0 0';
|
|
19690
|
+
},
|
|
19208
19691
|
layoutDependent: true,
|
|
19209
19692
|
syntax: PropertySyntax.LENGTH_PERCENTAGE_12
|
|
19210
19693
|
}, // <circle> & <ellipse>
|
|
@@ -19424,6 +19907,7 @@ var DefaultStyleValueRegistry = /*#__PURE__*/function () {
|
|
|
19424
19907
|
this.cache = {};
|
|
19425
19908
|
this.unresolvedProperties = {};
|
|
19426
19909
|
this.propertySyntaxFactory = void 0;
|
|
19910
|
+
this.sceneGraphService = void 0;
|
|
19427
19911
|
this.cascadeProperties = {};
|
|
19428
19912
|
}
|
|
19429
19913
|
|
|
@@ -19629,7 +20113,7 @@ var DefaultStyleValueRegistry = /*#__PURE__*/function () {
|
|
|
19629
20113
|
if (value === 'initial') {
|
|
19630
20114
|
// @see https://developer.mozilla.org/en-US/docs/Web/CSS/initial
|
|
19631
20115
|
if (!isNil(defaultValue)) {
|
|
19632
|
-
computed = this.parseProperty(name, defaultValue, object);
|
|
20116
|
+
computed = this.parseProperty(name, isFunction(defaultValue) ? defaultValue(object.nodeName) : defaultValue, object);
|
|
19633
20117
|
}
|
|
19634
20118
|
} else if (value === 'inherit') {
|
|
19635
20119
|
// @see https://developer.mozilla.org/en-US/docs/Web/CSS/inherit
|
|
@@ -19870,8 +20354,7 @@ var DefaultStyleValueRegistry = /*#__PURE__*/function () {
|
|
|
19870
20354
|
usedOriginXValue = usedOriginXValue - (flipY ? -1 : 1) * (anchor && anchor[0].value || 0) * geometry.contentBounds.halfExtents[0] * 2;
|
|
19871
20355
|
usedOriginYValue = usedOriginYValue - (flipX ? -1 : 1) * (anchor && anchor[1].value || 0) * geometry.contentBounds.halfExtents[1] * 2;
|
|
19872
20356
|
object.setOrigin(usedOriginXValue, usedOriginYValue);
|
|
19873
|
-
|
|
19874
|
-
dirtifyToRoot(object);
|
|
20357
|
+
this.sceneGraphService.dirtifyToRoot(object);
|
|
19875
20358
|
}
|
|
19876
20359
|
};
|
|
19877
20360
|
|
|
@@ -19890,6 +20373,8 @@ var DefaultStyleValueRegistry = /*#__PURE__*/function () {
|
|
|
19890
20373
|
|
|
19891
20374
|
__decorate([inject(CSSPropertySyntaxFactory), __metadata("design:type", Function)], DefaultStyleValueRegistry.prototype, "propertySyntaxFactory", void 0);
|
|
19892
20375
|
|
|
20376
|
+
__decorate([inject(SceneGraphService), __metadata("design:type", Object)], DefaultStyleValueRegistry.prototype, "sceneGraphService", void 0);
|
|
20377
|
+
|
|
19893
20378
|
__decorate([postConstruct(), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", void 0)], DefaultStyleValueRegistry.prototype, "init", null);
|
|
19894
20379
|
|
|
19895
20380
|
DefaultStyleValueRegistry = __decorate([singleton({
|
|
@@ -19939,6 +20424,7 @@ var containerModule = Module(function (register) {
|
|
|
19939
20424
|
}
|
|
19940
20425
|
}); // bind CSS property handlers
|
|
19941
20426
|
|
|
20427
|
+
register(CSSPropertyNumber);
|
|
19942
20428
|
register(CSSPropertyAngle);
|
|
19943
20429
|
register(CSSPropertyClipPath);
|
|
19944
20430
|
register(CSSPropertyColor);
|
|
@@ -20070,7 +20556,7 @@ var AbstractRenderer = /*#__PURE__*/function () {
|
|
|
20070
20556
|
* only dirty object will cause re-render
|
|
20071
20557
|
*/
|
|
20072
20558
|
enableDirtyCheck: true,
|
|
20073
|
-
enableCulling:
|
|
20559
|
+
enableCulling: false,
|
|
20074
20560
|
|
|
20075
20561
|
/**
|
|
20076
20562
|
* enable auto rendering by default
|
|
@@ -20142,26 +20628,29 @@ var CullingPlugin = CullingPlugin_1 = (_class$1 = /*#__PURE__*/function () {
|
|
|
20142
20628
|
_proto.apply = function apply(renderingService) {
|
|
20143
20629
|
var _this = this;
|
|
20144
20630
|
|
|
20145
|
-
|
|
20631
|
+
var strategies = this.strategyProvider.getContributions();
|
|
20146
20632
|
renderingService.hooks.cull.tap(CullingPlugin_1.tag, function (object) {
|
|
20147
20633
|
if (object) {
|
|
20148
|
-
var cullable = object.cullable;
|
|
20149
|
-
|
|
20150
|
-
//
|
|
20151
|
-
//
|
|
20152
|
-
// // } else {
|
|
20153
|
-
// // const isShape2D = shape2D.indexOf(object.nodeName as Shape) > -1;
|
|
20154
|
-
// // const [p0, p1, p2, p3] = camera.getFrustum().planes;
|
|
20155
|
-
// // tmpAABB.setMinMax([-p1.distance, -p3.distance, 0], [p0.distance, p2.distance, 0]);
|
|
20156
|
-
// // cullable.visible = isShape2D ? renderBounds.intersects(tmpAABB) : true;
|
|
20157
|
-
// // }
|
|
20158
|
-
// if (strategies.length === 0) {
|
|
20159
|
-
// cullable.visible = this.renderingContext.unculledEntities.indexOf(object.entity) > -1;
|
|
20634
|
+
var cullable = object.cullable; // cullable.visible = true;
|
|
20635
|
+
// const renderBounds = object.getRenderBounds();
|
|
20636
|
+
// if (AABB.isEmpty(renderBounds)) {
|
|
20637
|
+
// cullable.visible = false;
|
|
20160
20638
|
// } else {
|
|
20161
|
-
//
|
|
20162
|
-
//
|
|
20639
|
+
// const isShape2D = shape2D.indexOf(object.nodeName as Shape) > -1;
|
|
20640
|
+
// const [p0, p1, p2, p3] = camera.getFrustum().planes;
|
|
20641
|
+
// tmpAABB.setMinMax([-p1.distance, -p3.distance, 0], [p0.distance, p2.distance, 0]);
|
|
20642
|
+
// cullable.visible = isShape2D ? renderBounds.intersects(tmpAABB) : true;
|
|
20163
20643
|
// }
|
|
20164
20644
|
|
|
20645
|
+
if (strategies.length === 0) {
|
|
20646
|
+
cullable.visible = _this.renderingContext.unculledEntities.indexOf(object.entity) > -1;
|
|
20647
|
+
} else {
|
|
20648
|
+
// eg. implemented by g-webgl(frustum culling)
|
|
20649
|
+
cullable.visible = strategies.every(function (strategy) {
|
|
20650
|
+
return strategy.isVisible(object);
|
|
20651
|
+
});
|
|
20652
|
+
}
|
|
20653
|
+
|
|
20165
20654
|
if (!cullable.isCulled() && object.isVisible()) {
|
|
20166
20655
|
return object;
|
|
20167
20656
|
} else {
|
|
@@ -20199,22 +20688,15 @@ var DirtyCheckPlugin_1;
|
|
|
20199
20688
|
*/
|
|
20200
20689
|
|
|
20201
20690
|
var DirtyCheckPlugin = DirtyCheckPlugin_1 = (_class$2 = /*#__PURE__*/function () {
|
|
20202
|
-
function DirtyCheckPlugin() {
|
|
20203
|
-
this.renderingContext = void 0;
|
|
20204
|
-
}
|
|
20691
|
+
function DirtyCheckPlugin() {}
|
|
20205
20692
|
|
|
20206
20693
|
var _proto = DirtyCheckPlugin.prototype;
|
|
20207
20694
|
|
|
20208
20695
|
_proto.apply = function apply(renderingService) {
|
|
20209
|
-
var _this = this;
|
|
20210
|
-
|
|
20211
20696
|
renderingService.hooks.dirtycheck.tap(DirtyCheckPlugin_1.tag, function (object) {
|
|
20212
20697
|
if (object) {
|
|
20213
20698
|
var renderable = object.renderable;
|
|
20214
|
-
|
|
20215
|
-
var isCameraDirty = _this.renderingContext.renderReasons.has(RenderReason.CAMERA_CHANGED);
|
|
20216
|
-
|
|
20217
|
-
var isDirty = renderable.dirty || isCameraDirty;
|
|
20699
|
+
var isDirty = renderable.dirty || renderingService.disableDirtyRectangleRendering();
|
|
20218
20700
|
|
|
20219
20701
|
if (isDirty) {
|
|
20220
20702
|
return object;
|
|
@@ -20229,9 +20711,6 @@ var DirtyCheckPlugin = DirtyCheckPlugin_1 = (_class$2 = /*#__PURE__*/function ()
|
|
|
20229
20711
|
|
|
20230
20712
|
return DirtyCheckPlugin;
|
|
20231
20713
|
}(), _class$2.tag = 'DirtyCheck', _class$2);
|
|
20232
|
-
|
|
20233
|
-
__decorate([inject(RenderingContext), __metadata("design:type", Object)], DirtyCheckPlugin.prototype, "renderingContext", void 0);
|
|
20234
|
-
|
|
20235
20714
|
DirtyCheckPlugin = DirtyCheckPlugin_1 = __decorate([singleton({
|
|
20236
20715
|
contrib: RenderingPluginContribution
|
|
20237
20716
|
})], DirtyCheckPlugin);
|
|
@@ -20656,6 +21135,7 @@ var PrepareRendererPlugin = PrepareRendererPlugin_1 = (_class$4 = /*#__PURE__*/f
|
|
|
20656
21135
|
function PrepareRendererPlugin() {
|
|
20657
21136
|
this.renderingContext = void 0;
|
|
20658
21137
|
this.styleValueRegistry = void 0;
|
|
21138
|
+
this.sceneGraphService = void 0;
|
|
20659
21139
|
this.rBush = void 0;
|
|
20660
21140
|
this.toSync = new Set();
|
|
20661
21141
|
}
|
|
@@ -20702,7 +21182,8 @@ var PrepareRendererPlugin = PrepareRendererPlugin_1 = (_class$4 = /*#__PURE__*/f
|
|
|
20702
21182
|
|
|
20703
21183
|
_this2.styleValueRegistry.recalc(object);
|
|
20704
21184
|
|
|
20705
|
-
dirtifyToRoot(object);
|
|
21185
|
+
_this2.sceneGraphService.dirtifyToRoot(object);
|
|
21186
|
+
|
|
20706
21187
|
renderingService.dirtify();
|
|
20707
21188
|
};
|
|
20708
21189
|
|
|
@@ -20716,7 +21197,8 @@ var PrepareRendererPlugin = PrepareRendererPlugin_1 = (_class$4 = /*#__PURE__*/f
|
|
|
20716
21197
|
_this2.toSync.delete(object);
|
|
20717
21198
|
}
|
|
20718
21199
|
|
|
20719
|
-
dirtifyToRoot(e.target);
|
|
21200
|
+
_this2.sceneGraphService.dirtifyToRoot(e.target);
|
|
21201
|
+
|
|
20720
21202
|
renderingService.dirtify();
|
|
20721
21203
|
};
|
|
20722
21204
|
|
|
@@ -20806,6 +21288,8 @@ __decorate([inject(RenderingContext), __metadata("design:type", Object)], Prepar
|
|
|
20806
21288
|
|
|
20807
21289
|
__decorate([inject(StyleValueRegistry), __metadata("design:type", Object)], PrepareRendererPlugin.prototype, "styleValueRegistry", void 0);
|
|
20808
21290
|
|
|
21291
|
+
__decorate([inject(SceneGraphService), __metadata("design:type", Object)], PrepareRendererPlugin.prototype, "sceneGraphService", void 0);
|
|
21292
|
+
|
|
20809
21293
|
__decorate([inject(RBushRoot), __metadata("design:type", RBush)], PrepareRendererPlugin.prototype, "rBush", void 0);
|
|
20810
21294
|
|
|
20811
21295
|
PrepareRendererPlugin = PrepareRendererPlugin_1 = __decorate([singleton({
|
|
@@ -21501,4 +21985,4 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
|
|
|
21501
21985
|
GlobalContainer.load(containerModule);
|
|
21502
21986
|
var layoutEngine = GlobalContainer.get(LayoutEngine);
|
|
21503
21987
|
|
|
21504
|
-
export { AABB, AbstractLayoutDefinition, AbstractRenderer, Animation, AnimationEffectTiming, AnimationEvent, AnimationTimeline, AsyncParallelHook, AsyncSeriesWaterfallHook, BUILT_IN_PROPERTIES, BaseType, BoundingSphere, CSS, CSSColorValue, CSSGradientValue, CSSKeywordValue, CSSMathInvert, CSSMathMax, CSSMathMin, CSSMathNegate, CSSMathOperator, CSSMathProduct, CSSMathSum, CSSMathValue, CSSMathVariadic, CSSNumericValue, CSSNumericValueType, CSSProperty, CSSPropertyAngle, CSSPropertyClipPath, CSSPropertyColor, CSSPropertyFilter, CSSPropertyLengthOrPercentage, CSSPropertyLengthOrPercentage12, CSSPropertyLengthOrPercentage14, CSSPropertyLocalPosition, CSSPropertyOffsetDistance, CSSPropertyOffsetPath, CSSPropertyOpacity, CSSPropertyPath, CSSPropertyPoints, CSSPropertyShadowBlur, CSSPropertySyntaxFactory, CSSPropertyText, CSSPropertyTextTransform, CSSPropertyTransform, CSSPropertyTransformOrigin, CSSPropertyZIndex, CSSRGB, CSSStyleValue, CSSStyleValueType, CSSUnitValue, Camera, CameraEvent, CameraProjectionMode, CameraTrackingMode, CameraType, Canvas, CanvasConfig, CanvasEvent, Circle, CircleUpdater, ContextNode, ContextService, Cullable, CustomElement, CustomElementRegistry, CustomEvent, DCHECK, DCHECK_EQ, DCHECK_NE, DELEGATION_SPLITTER, DefaultCamera, DefaultSceneGraphSelector, DefaultSceneGraphService, DefaultStyleValueRegistry, Deferred, DisplayObject, DisplayObjectPool, Document, EasingFunctions, Element, ElementEvent, Ellipse, EllipseUpdater, EventService, EventTarget, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FragmentResult, FragmentResultFactory, FragmentResultOptions, Frustum, Geometry, GeometryAABBUpdater, GeometryUpdaterFactory, GradientType, Group, HTML, Image, KeyframeEffect, LayoutChildren, LayoutChildrenFactory, LayoutChildrenOptions, LayoutContext, LayoutContextFactory, LayoutContextOptions, LayoutEdges, LayoutEdgesFactory, LayoutEdgesOptions, LayoutEngine, LayoutFragment, LayoutFragmentFactory, LayoutFragmentOptions, LayoutObject, LayoutRegistry, LayoutTaskType, Line, LineUpdater, MOUSE_POINTER_ID, Mask, MutationEvent, MutationObserver, MutationRecord, Nested, Node, ObjectTyped, Odeg, OffscreenCanvasCreator, Opx, ParenLess, Path, PathUpdater, Plane, Point, Polygon, Polyline, PolylineUpdater, PropertyName, PropertySyntax, RBushNode, RBushRoot, Ray, Rect, RectUpdater, Rectangle, Registration, RenderReason, Renderable, RenderingContext, RenderingPluginContribution, RenderingService, SceneGraphSelector, SceneGraphSelectorFactory, SceneGraphService, Shape, Sortable, Strategy, StyleValueRegistry, SyncHook, SyncWaterfallHook, TOUCH_TO_POINTER, Text, TextService, TextUpdater, Transform, UnitCategory, UnitType, ValueRange, baseTypeToString, camelCase, clamp, clampedMergeNumbers, cleanExistedCanvas, colorStopToString, compareAnimations, computeLinearGradient, computeRadialGradient, convertAngleUnit, convertEffectInput, convertPercentUnit, convertToDash, convertToPath, createVec3, decompose, deg2rad, deg2turn,
|
|
21988
|
+
export { AABB, AbstractLayoutDefinition, AbstractRenderer, Animation, AnimationEffectTiming, AnimationEvent, AnimationTimeline, AsyncParallelHook, AsyncSeriesWaterfallHook, BUILT_IN_PROPERTIES, BaseType, BoundingSphere, CSS, CSSColorValue, CSSGradientValue, CSSKeywordValue, CSSMathInvert, CSSMathMax, CSSMathMin, CSSMathNegate, CSSMathOperator, CSSMathProduct, CSSMathSum, CSSMathValue, CSSMathVariadic, CSSNumericValue, CSSNumericValueType, CSSProperty, CSSPropertyAngle, CSSPropertyClipPath, CSSPropertyColor, CSSPropertyFilter, CSSPropertyLengthOrPercentage, CSSPropertyLengthOrPercentage12, CSSPropertyLengthOrPercentage14, CSSPropertyLocalPosition, CSSPropertyNumber, CSSPropertyOffsetDistance, CSSPropertyOffsetPath, CSSPropertyOpacity, CSSPropertyPath, CSSPropertyPoints, CSSPropertyShadowBlur, CSSPropertySyntaxFactory, CSSPropertyText, CSSPropertyTextTransform, CSSPropertyTransform, CSSPropertyTransformOrigin, CSSPropertyZIndex, CSSRGB, CSSStyleValue, CSSStyleValueType, CSSUnitValue, Camera, CameraEvent, CameraProjectionMode, CameraTrackingMode, CameraType, Canvas, CanvasConfig, CanvasEvent, Circle, CircleUpdater, ContextNode, ContextService, Cullable, CustomElement, CustomElementRegistry, CustomEvent, DCHECK, DCHECK_EQ, DCHECK_NE, DELEGATION_SPLITTER, DefaultCamera, DefaultSceneGraphSelector, DefaultSceneGraphService, DefaultStyleValueRegistry, Deferred, DisplayObject, DisplayObjectPool, Document, EasingFunctions, Element, ElementEvent, Ellipse, EllipseUpdater, EventService, EventTarget, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FragmentResult, FragmentResultFactory, FragmentResultOptions, Frustum, Geometry, GeometryAABBUpdater, GeometryUpdaterFactory, GradientType, Group, HTML, Image, KeyframeEffect, LayoutChildren, LayoutChildrenFactory, LayoutChildrenOptions, LayoutContext, LayoutContextFactory, LayoutContextOptions, LayoutEdges, LayoutEdgesFactory, LayoutEdgesOptions, LayoutEngine, LayoutFragment, LayoutFragmentFactory, LayoutFragmentOptions, LayoutObject, LayoutRegistry, LayoutTaskType, Line, LineUpdater, MOUSE_POINTER_ID, Mask, MutationEvent, MutationObserver, MutationRecord, Nested, Node, ObjectTyped, Odeg, OffscreenCanvasCreator, Opx, ParenLess, Path, PathUpdater, Plane, Point, Polygon, Polyline, PolylineUpdater, PropertyName, PropertySyntax, RBushNode, RBushRoot, Ray, Rect, RectUpdater, Rectangle, Registration, RenderReason, Renderable, RenderingContext, RenderingPluginContribution, RenderingService, SceneGraphSelector, SceneGraphSelectorFactory, SceneGraphService, Shape, Sortable, Strategy, StyleValueRegistry, SyncHook, SyncWaterfallHook, TOUCH_TO_POINTER, Text, TextService, TextUpdater, Transform, UnitCategory, UnitType, ValueRange, baseTypeToString, camelCase, clamp, clampedMergeNumbers, cleanExistedCanvas, colorStopToString, compareAnimations, computeLinearGradient, computeRadialGradient, convertAngleUnit, convertEffectInput, convertItemToMatrix, convertPercentUnit, convertToDash, convertToPath, createVec3, decompose, deg2rad, deg2turn, equalSet, extractPolygons, formatAttribute, fromRotationTranslationScale, getAngle, getEasingFunction, getEuler, getHeight, getRotationInRadians, getScaling, getStyle, getTranslation, getWidth, grad2deg, hasArcOrBezier, isBoolean, isBrowser, isComparison, isFunction, isNil, isNumber, isObject, isPattern, isString, isUndefined, layoutEngine, makePerspective, makeQuerablePromise, makeTiming, memoize, mergeColors, mergeDimensionList, mergeDimensions, mergeNumberLists, mergeNumbers, mergePaths, mergeTransforms, normalizeKeyframes, normalizeTimingInput, numberToString, numericTimingToObject, parseAngle, parseColor, parseDimension, parseDimensionArray, parseFilter, parseGradient, parseLength, parseLengthOrPercentage, parseNumber, parseNumberList, parseParam, parsePath, parsePoints, parseTransform, parseTransformOrigin, parserPercentage, path2Segments, rad2deg, setDOMSize, sortByZIndex, toFontString, translatePathToString, turn2deg, typeCheck, unitTypeToBaseType };
|