@antv/g-lite 1.3.0-next.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Canvas.d.ts +2 -1
- package/dist/css/StyleValueRegistry.d.ts +1 -0
- package/dist/css/cssom/CSSStyleValue.d.ts +1 -1
- package/dist/css/interfaces.d.ts +1 -0
- package/dist/css/parser/dimension.d.ts +1 -1
- package/dist/css/parser/path.d.ts +2 -2
- package/dist/css/parser/points.d.ts +1 -1
- package/dist/css/properties/CSSPropertyOffsetDistance.d.ts +1 -1
- package/dist/css/properties/CSSPropertyPath.d.ts +2 -2
- package/dist/css/properties/CSSPropertyTransformOrigin.d.ts +3 -1
- package/dist/display-objects/Circle.d.ts +1 -1
- package/dist/display-objects/DisplayObject.d.ts +0 -10
- package/dist/display-objects/Ellipse.d.ts +3 -1
- package/dist/display-objects/Group.d.ts +1 -1
- package/dist/display-objects/Image.d.ts +1 -3
- package/dist/display-objects/Path.d.ts +1 -12
- package/dist/display-objects/Polygon.d.ts +2 -0
- package/dist/display-objects/Rect.d.ts +3 -1
- package/dist/global-runtime.d.ts +7 -0
- package/dist/index.esm.js +508 -446
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +506 -443
- package/dist/index.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/plugins/PrepareRendererPlugin.d.ts +3 -0
- package/dist/services/EventService.d.ts +2 -2
- package/dist/services/aabb/GroupUpdater.d.ts +10 -0
- package/dist/services/aabb/index.d.ts +1 -0
- package/dist/types.d.ts +5 -1
- package/dist/utils/path.d.ts +1 -0
- package/package.json +3 -3
|
@@ -6,6 +6,9 @@ export declare class PrepareRendererPlugin implements RenderingPlugin {
|
|
|
6
6
|
* sync to RBush later
|
|
7
7
|
*/
|
|
8
8
|
private toSync;
|
|
9
|
+
private isFirstTimeRendering;
|
|
10
|
+
private syncing;
|
|
11
|
+
isFirstTimeRenderingFinished: boolean;
|
|
9
12
|
apply(context: RenderingPluginContext): void;
|
|
10
13
|
private syncRTree;
|
|
11
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CanvasContext, GlobalRuntime } from '..';
|
|
1
|
+
import type { CanvasContext, GlobalRuntime, InteractivePointerEvent } from '..';
|
|
2
2
|
import type { HTML } from '../display-objects';
|
|
3
3
|
import type { FederatedEvent } from '../dom/FederatedEvent';
|
|
4
4
|
import { FederatedPointerEvent } from '../dom/FederatedPointerEvent';
|
|
@@ -59,7 +59,7 @@ export declare class EventService {
|
|
|
59
59
|
* whether the native event trigger came from Canvas,
|
|
60
60
|
* should account for HTML shape
|
|
61
61
|
*/
|
|
62
|
-
|
|
62
|
+
isNativeEventFromCanvas($el: HTMLCanvasElement, nativeEvent: InteractivePointerEvent): boolean;
|
|
63
63
|
/**
|
|
64
64
|
* Find HTML from composed path in native UI event.
|
|
65
65
|
*/
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Group, ParsedImageStyleProps } from '../../display-objects';
|
|
2
|
+
import type { GeometryAABBUpdater } from './interfaces';
|
|
3
|
+
export declare class GroupUpdater implements GeometryAABBUpdater<ParsedImageStyleProps> {
|
|
4
|
+
update(parsedStyle: ParsedImageStyleProps, object: Group): {
|
|
5
|
+
cx: number;
|
|
6
|
+
cy: number;
|
|
7
|
+
hwidth: number;
|
|
8
|
+
hheight: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -172,7 +172,7 @@ export interface BaseStyleProps {
|
|
|
172
172
|
*/
|
|
173
173
|
droppable?: boolean;
|
|
174
174
|
}
|
|
175
|
-
export interface ParsedBaseStyleProps extends Omit<BaseStyleProps, 'fill' | 'stroke' | 'lineWidth' | 'increasedLineWidthForHitTesting' | 'lineDash' | '
|
|
175
|
+
export interface ParsedBaseStyleProps extends Omit<BaseStyleProps, 'fill' | 'stroke' | 'lineWidth' | 'increasedLineWidthForHitTesting' | 'lineDash' | 'points' | 'shadowColor' | 'transform' | 'transformOrigin' | 'miterLimit' | 'filter' | 'opacity' | 'fillOpacity' | 'strokeOpacity'> {
|
|
176
176
|
opacity?: number;
|
|
177
177
|
fillOpacity?: number;
|
|
178
178
|
strokeOpacity?: number;
|
|
@@ -218,6 +218,10 @@ export interface RendererConfig {
|
|
|
218
218
|
* enable auto rendering
|
|
219
219
|
*/
|
|
220
220
|
enableAutoRendering: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Canvas / SVG / Canvaskit should listen to camera changed events, while WebGL / WebGPU will apply this effect in shader.
|
|
223
|
+
*/
|
|
224
|
+
enableSizeAttenuation: boolean;
|
|
221
225
|
}
|
|
222
226
|
/**
|
|
223
227
|
* eg. NodeCanvas, OffscreenCanvas, HTMLCanvasElement
|
package/dist/utils/path.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { AbsoluteArray } from '@antv/util';
|
|
|
2
2
|
import { mat4 } from 'gl-matrix';
|
|
3
3
|
import type { Circle, Ellipse, Line, Path, PathSegment, Polygon, Polyline, Rect } from '../display-objects';
|
|
4
4
|
export declare function getOrCalculatePathTotalLength(path: Path): number;
|
|
5
|
+
export declare function getOrCalculatePolylineTotalLength(polyline: Polyline): number;
|
|
5
6
|
export declare function removeRedundantMCommand(path: AbsoluteArray): void;
|
|
6
7
|
export declare function hasArcOrBezier(path: AbsoluteArray): boolean;
|
|
7
8
|
export declare function extractPolygons(pathArray: AbsoluteArray): {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/g-lite",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A core module for rendering engine implements DOM API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antv",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"README.md"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@antv/util": "^3.3.
|
|
38
|
+
"@antv/util": "^3.3.5",
|
|
39
39
|
"d3-color": "^1.4.0",
|
|
40
40
|
"eventemitter3": "^5.0.1",
|
|
41
41
|
"gl-matrix": "^3.4.3",
|
|
42
42
|
"rbush": "^3.0.1",
|
|
43
43
|
"tslib": "^2.5.3",
|
|
44
|
-
"@antv/g-math": "
|
|
44
|
+
"@antv/g-math": "3.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/d3-color": "^3.0.2",
|