@antv/g 1.0.0-alpha.35 → 1.0.0-alpha.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.umd.js +2 -17
- package/es/display-objects/Polyline.d.ts +2 -0
- package/es/display-objects/Polyline.js +1 -1
- package/es/property-handlers/color.d.ts +3 -0
- package/es/property-handlers/color.js +6 -3
- package/es/services/SceneGraphService.js +9 -8
- package/lib/display-objects/Polyline.d.ts +2 -0
- package/lib/display-objects/Polyline.js +2 -2
- package/lib/property-handlers/color.d.ts +3 -0
- package/lib/property-handlers/color.js +6 -3
- package/lib/services/SceneGraphService.js +9 -8
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __assign, __extends, __rest } from "tslib";
|
|
2
|
+
import { Line as LineUtil } from '@antv/g-math';
|
|
2
3
|
import { SHAPE } from '../types';
|
|
3
4
|
import { DisplayObject } from './DisplayObject';
|
|
4
|
-
import { Line as LineUtil } from '@antv/g-math';
|
|
5
5
|
import { Point } from '../shapes';
|
|
6
6
|
|
|
7
7
|
var Polyline =
|
|
@@ -7,6 +7,7 @@ export interface LinearGradient {
|
|
|
7
7
|
x1: number;
|
|
8
8
|
y1: number;
|
|
9
9
|
steps: string[][];
|
|
10
|
+
hash: string;
|
|
10
11
|
}
|
|
11
12
|
export interface RadialGradient {
|
|
12
13
|
x0: number;
|
|
@@ -16,10 +17,12 @@ export interface RadialGradient {
|
|
|
16
17
|
y1: number;
|
|
17
18
|
r1: number;
|
|
18
19
|
steps: string[][];
|
|
20
|
+
hash: string;
|
|
19
21
|
}
|
|
20
22
|
export interface Pattern {
|
|
21
23
|
repetition: string;
|
|
22
24
|
src: string;
|
|
25
|
+
hash: string;
|
|
23
26
|
}
|
|
24
27
|
export declare enum PARSED_COLOR_TYPE {
|
|
25
28
|
Constant = 0,
|
|
@@ -134,7 +134,8 @@ function parsePattern(patternStr) {
|
|
|
134
134
|
|
|
135
135
|
return {
|
|
136
136
|
src: src,
|
|
137
|
-
repetition: repetition
|
|
137
|
+
repetition: repetition,
|
|
138
|
+
hash: patternStr
|
|
138
139
|
};
|
|
139
140
|
}
|
|
140
141
|
|
|
@@ -210,7 +211,8 @@ function parseLineGradient(gradientStr) {
|
|
|
210
211
|
y0: start.y,
|
|
211
212
|
x1: x,
|
|
212
213
|
y1: y,
|
|
213
|
-
steps: steps
|
|
214
|
+
steps: steps,
|
|
215
|
+
hash: gradientStr
|
|
214
216
|
};
|
|
215
217
|
}
|
|
216
218
|
|
|
@@ -242,7 +244,8 @@ function parseRadialGradient(gradientStr) {
|
|
|
242
244
|
x1: 0.5,
|
|
243
245
|
y1: 0.5,
|
|
244
246
|
r1: fr,
|
|
245
|
-
steps: steps
|
|
247
|
+
steps: steps,
|
|
248
|
+
hash: gradientStr
|
|
246
249
|
};
|
|
247
250
|
}
|
|
248
251
|
|
|
@@ -524,14 +524,7 @@ function () {
|
|
|
524
524
|
if (!transform.dirtyFlag) {
|
|
525
525
|
this.dirtifyWorld(element, transform);
|
|
526
526
|
}
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
element.emit(ElementEvent.ATTRIBUTE_CHANGED, {
|
|
531
|
-
attributeName: 'modelMatrix',
|
|
532
|
-
oldValue: null,
|
|
533
|
-
newValue: null
|
|
534
|
-
});
|
|
527
|
+
}
|
|
535
528
|
};
|
|
536
529
|
|
|
537
530
|
DefaultSceneGraphService.prototype.dirtifyWorld = function (element, transform) {
|
|
@@ -773,6 +766,12 @@ function () {
|
|
|
773
766
|
if (!childTransform.dirtyFlag) {
|
|
774
767
|
_this.dirtifyWorldInternal(child, childTransform);
|
|
775
768
|
}
|
|
769
|
+
}); // model matrix changed
|
|
770
|
+
|
|
771
|
+
element.emit(ElementEvent.ATTRIBUTE_CHANGED, {
|
|
772
|
+
attributeName: 'modelMatrix',
|
|
773
|
+
oldValue: null,
|
|
774
|
+
newValue: null
|
|
776
775
|
}); // FIXME: emit on leaf node
|
|
777
776
|
|
|
778
777
|
if (element.childNodes.length === 0) {
|
|
@@ -818,6 +817,8 @@ function () {
|
|
|
818
817
|
// @see https://github.com/playcanvas/engine/issues/1077#issuecomment-359765557
|
|
819
818
|
mat4.multiply(transform.worldTransform, parentTransform.worldTransform, transform.localTransform);
|
|
820
819
|
}
|
|
820
|
+
|
|
821
|
+
transform.dirtyFlag = false;
|
|
821
822
|
}
|
|
822
823
|
};
|
|
823
824
|
|
|
@@ -7,12 +7,12 @@ exports.Polyline = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _tslib = require("tslib");
|
|
9
9
|
|
|
10
|
+
var _gMath = require("@antv/g-math");
|
|
11
|
+
|
|
10
12
|
var _types = require("../types");
|
|
11
13
|
|
|
12
14
|
var _DisplayObject = require("./DisplayObject");
|
|
13
15
|
|
|
14
|
-
var _gMath = require("@antv/g-math");
|
|
15
|
-
|
|
16
16
|
var _shapes = require("../shapes");
|
|
17
17
|
|
|
18
18
|
var Polyline =
|
|
@@ -7,6 +7,7 @@ export interface LinearGradient {
|
|
|
7
7
|
x1: number;
|
|
8
8
|
y1: number;
|
|
9
9
|
steps: string[][];
|
|
10
|
+
hash: string;
|
|
10
11
|
}
|
|
11
12
|
export interface RadialGradient {
|
|
12
13
|
x0: number;
|
|
@@ -16,10 +17,12 @@ export interface RadialGradient {
|
|
|
16
17
|
y1: number;
|
|
17
18
|
r1: number;
|
|
18
19
|
steps: string[][];
|
|
20
|
+
hash: string;
|
|
19
21
|
}
|
|
20
22
|
export interface Pattern {
|
|
21
23
|
repetition: string;
|
|
22
24
|
src: string;
|
|
25
|
+
hash: string;
|
|
23
26
|
}
|
|
24
27
|
export declare enum PARSED_COLOR_TYPE {
|
|
25
28
|
Constant = 0,
|
|
@@ -155,7 +155,8 @@ function parsePattern(patternStr) {
|
|
|
155
155
|
|
|
156
156
|
return {
|
|
157
157
|
src: src,
|
|
158
|
-
repetition: repetition
|
|
158
|
+
repetition: repetition,
|
|
159
|
+
hash: patternStr
|
|
159
160
|
};
|
|
160
161
|
}
|
|
161
162
|
|
|
@@ -231,7 +232,8 @@ function parseLineGradient(gradientStr) {
|
|
|
231
232
|
y0: start.y,
|
|
232
233
|
x1: x,
|
|
233
234
|
y1: y,
|
|
234
|
-
steps: steps
|
|
235
|
+
steps: steps,
|
|
236
|
+
hash: gradientStr
|
|
235
237
|
};
|
|
236
238
|
}
|
|
237
239
|
|
|
@@ -263,7 +265,8 @@ function parseRadialGradient(gradientStr) {
|
|
|
263
265
|
x1: 0.5,
|
|
264
266
|
y1: 0.5,
|
|
265
267
|
r1: fr,
|
|
266
|
-
steps: steps
|
|
268
|
+
steps: steps,
|
|
269
|
+
hash: gradientStr
|
|
267
270
|
};
|
|
268
271
|
}
|
|
269
272
|
|
|
@@ -573,14 +573,7 @@ function () {
|
|
|
573
573
|
if (!transform.dirtyFlag) {
|
|
574
574
|
this.dirtifyWorld(element, transform);
|
|
575
575
|
}
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
element.emit(_interfaces.ElementEvent.ATTRIBUTE_CHANGED, {
|
|
580
|
-
attributeName: 'modelMatrix',
|
|
581
|
-
oldValue: null,
|
|
582
|
-
newValue: null
|
|
583
|
-
});
|
|
576
|
+
}
|
|
584
577
|
};
|
|
585
578
|
|
|
586
579
|
DefaultSceneGraphService.prototype.dirtifyWorld = function (element, transform) {
|
|
@@ -823,6 +816,12 @@ function () {
|
|
|
823
816
|
if (!childTransform.dirtyFlag) {
|
|
824
817
|
_this.dirtifyWorldInternal(child, childTransform);
|
|
825
818
|
}
|
|
819
|
+
}); // model matrix changed
|
|
820
|
+
|
|
821
|
+
element.emit(_interfaces.ElementEvent.ATTRIBUTE_CHANGED, {
|
|
822
|
+
attributeName: 'modelMatrix',
|
|
823
|
+
oldValue: null,
|
|
824
|
+
newValue: null
|
|
826
825
|
}); // FIXME: emit on leaf node
|
|
827
826
|
|
|
828
827
|
if (element.childNodes.length === 0) {
|
|
@@ -869,6 +868,8 @@ function () {
|
|
|
869
868
|
// @see https://github.com/playcanvas/engine/issues/1077#issuecomment-359765557
|
|
870
869
|
_glMatrix.mat4.multiply(transform.worldTransform, parentTransform.worldTransform, transform.localTransform);
|
|
871
870
|
}
|
|
871
|
+
|
|
872
|
+
transform.dirtyFlag = false;
|
|
872
873
|
}
|
|
873
874
|
};
|
|
874
875
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/g",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.36",
|
|
4
4
|
"description": "A core module including ECS and DI container.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
|
-
"module": "es/index.
|
|
6
|
+
"module": "es/index.js",
|
|
7
7
|
"types": "es/index.d.ts",
|
|
8
8
|
"unpkg": "dist/index.umd.js",
|
|
9
9
|
"files": [
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://github.com/antvis/g#readme",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@antv/g-ecs": "^1.0.0-alpha.
|
|
42
|
-
"@antv/g-math": "^1.0.0-alpha.
|
|
41
|
+
"@antv/g-ecs": "^1.0.0-alpha.15",
|
|
42
|
+
"@antv/g-math": "^1.0.0-alpha.11",
|
|
43
43
|
"@antv/path-util": "^2.0.14",
|
|
44
44
|
"@antv/util": "^2.0.13",
|
|
45
45
|
"d3-color": "^1.4.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"scripts": {
|
|
52
52
|
"umd": "webpack"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "c0f918d5477e3099b9bfa3ecb077cc411c0b2e3a"
|
|
55
55
|
}
|