@antv/g 5.0.23-alpha.8 → 5.0.24
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.min.js +4 -3
- package/es/AbstractRenderer.d.ts +11 -0
- package/es/AbstractRenderer.js +17 -2
- package/es/Canvas.d.ts +1 -1
- package/es/css/CSS.d.ts +2 -1
- package/es/css/CSS.js +6 -2
- package/es/css/CSSProperty.d.ts +1 -1
- package/es/css/StyleValueRegistry.d.ts +2 -1
- package/es/css/StyleValueRegistry.js +34 -25
- package/es/css/cssom/CSSNumericValue.js +1 -1
- package/es/css/index.d.ts +2 -1
- package/es/css/index.js +2 -1
- package/es/css/interfaces.d.ts +6 -0
- package/es/css/interfaces.js +2 -0
- package/es/css/layout/FragmentResult.d.ts +32 -0
- package/es/css/layout/FragmentResult.js +32 -0
- package/es/css/layout/LayoutChildren.d.ts +23 -0
- package/es/css/layout/LayoutChildren.js +55 -0
- package/es/css/layout/LayoutContext.d.ts +35 -0
- package/es/css/layout/LayoutContext.js +35 -0
- package/es/css/layout/LayoutDefinition.d.ts +20 -0
- package/es/css/layout/LayoutDefinition.js +9 -0
- package/es/css/layout/LayoutEdges.d.ts +24 -0
- package/es/css/layout/LayoutEdges.js +41 -0
- package/es/css/layout/LayoutEngine.d.ts +41 -0
- package/es/css/layout/LayoutEngine.js +332 -0
- package/es/css/layout/LayoutFragment.d.ts +26 -0
- package/es/css/layout/LayoutFragment.js +28 -0
- package/es/css/layout/LayoutObject.d.ts +46 -0
- package/es/css/layout/LayoutObject.js +172 -0
- package/es/css/layout/LayoutRegistry.d.ts +16 -0
- package/es/css/layout/LayoutRegistry.js +78 -0
- package/es/css/layout/LayoutWorkTask.d.ts +14 -0
- package/es/css/layout/LayoutWorkTask.js +1 -0
- package/es/css/layout/index.d.ts +11 -0
- package/es/css/layout/index.js +11 -0
- package/es/css/layout/types.d.ts +104 -0
- package/es/css/layout/types.js +66 -0
- package/es/css/parser/numeric.d.ts +1 -1
- package/es/css/parser/numeric.js +1 -1
- package/es/css/parser/transform.js +5 -4
- package/es/css/properties/CSSPropertyColor.d.ts +1 -1
- package/es/css/properties/CSSPropertyLengthOrPercentage.d.ts +1 -1
- package/es/display-objects/DisplayObject.d.ts +1 -2
- package/es/display-objects/DisplayObject.js +2 -1
- package/es/dom/Document.js +2 -2
- package/es/global-module.js +91 -8
- package/es/index.d.ts +3 -0
- package/es/index.js +3 -0
- package/es/plugins/CullingPlugin.d.ts +1 -0
- package/es/plugins/CullingPlugin.js +8 -3
- package/es/plugins/DirtyCheckPlugin.d.ts +1 -0
- package/es/plugins/DirtyCheckPlugin.js +7 -2
- package/es/plugins/EventPlugin.d.ts +1 -0
- package/es/plugins/EventPlugin.js +14 -9
- package/es/plugins/PrepareRendererPlugin.d.ts +1 -0
- package/es/plugins/PrepareRendererPlugin.js +10 -5
- package/es/services/EventService.js +4 -8
- package/es/services/OffscreenCanvasCreator.d.ts +1 -1
- package/es/services/OffscreenCanvasCreator.js +1 -1
- package/es/services/RenderingService.d.ts +18 -18
- package/es/services/RenderingService.js +26 -23
- package/es/services/SceneGraphService.js +3 -1
- package/es/types.d.ts +7 -5
- package/es/utils/deferred.d.ts +43 -0
- package/es/utils/deferred.js +117 -0
- package/es/utils/dom.d.ts +2 -0
- package/es/utils/dom.js +8 -0
- package/es/utils/index.d.ts +2 -1
- package/es/utils/index.js +2 -1
- package/es/utils/interpolation.js +1 -1
- package/lib/AbstractRenderer.d.ts +11 -0
- package/lib/AbstractRenderer.js +17 -2
- package/lib/Canvas.d.ts +1 -1
- package/lib/css/CSS.d.ts +2 -1
- package/lib/css/CSS.js +9 -3
- package/lib/css/CSSProperty.d.ts +1 -1
- package/lib/css/StyleValueRegistry.d.ts +2 -1
- package/lib/css/StyleValueRegistry.js +39 -27
- package/lib/css/cssom/CSSNumericValue.js +17 -17
- package/lib/css/index.d.ts +2 -1
- package/lib/css/index.js +25 -12
- package/lib/css/interfaces.d.ts +6 -0
- package/lib/css/interfaces.js +12 -0
- package/lib/css/layout/FragmentResult.d.ts +32 -0
- package/lib/css/layout/FragmentResult.js +51 -0
- package/lib/css/layout/LayoutChildren.d.ts +23 -0
- package/lib/css/layout/LayoutChildren.js +72 -0
- package/lib/css/layout/LayoutContext.d.ts +35 -0
- package/lib/css/layout/LayoutContext.js +49 -0
- package/lib/css/layout/LayoutDefinition.d.ts +20 -0
- package/lib/css/layout/LayoutDefinition.js +16 -0
- package/lib/css/layout/LayoutEdges.d.ts +24 -0
- package/lib/css/layout/LayoutEdges.js +56 -0
- package/lib/css/layout/LayoutEngine.d.ts +41 -0
- package/lib/css/layout/LayoutEngine.js +345 -0
- package/lib/css/layout/LayoutFragment.d.ts +26 -0
- package/lib/css/layout/LayoutFragment.js +44 -0
- package/lib/css/layout/LayoutObject.d.ts +46 -0
- package/lib/css/layout/LayoutObject.js +182 -0
- package/lib/css/layout/LayoutRegistry.d.ts +16 -0
- package/lib/css/layout/LayoutRegistry.js +87 -0
- package/lib/css/layout/LayoutWorkTask.d.ts +14 -0
- package/lib/css/layout/LayoutWorkTask.js +5 -0
- package/lib/css/layout/index.d.ts +11 -0
- package/lib/css/layout/index.js +148 -0
- package/lib/css/layout/types.d.ts +104 -0
- package/lib/css/layout/types.js +74 -0
- package/lib/css/parser/numeric.d.ts +1 -1
- package/lib/css/parser/numeric.js +4 -4
- package/lib/css/parser/transform.js +6 -4
- package/lib/css/properties/CSSPropertyColor.d.ts +1 -1
- package/lib/css/properties/CSSPropertyLengthOrPercentage.d.ts +1 -1
- package/lib/display-objects/DisplayObject.d.ts +1 -2
- package/lib/display-objects/DisplayObject.js +3 -2
- package/lib/dom/Document.js +2 -2
- package/lib/global-module.js +91 -6
- package/lib/index.d.ts +3 -0
- package/lib/index.js +7 -2
- package/lib/plugins/CullingPlugin.d.ts +1 -0
- package/lib/plugins/CullingPlugin.js +7 -3
- package/lib/plugins/DirtyCheckPlugin.d.ts +1 -0
- package/lib/plugins/DirtyCheckPlugin.js +6 -2
- package/lib/plugins/EventPlugin.d.ts +1 -0
- package/lib/plugins/EventPlugin.js +13 -9
- package/lib/plugins/PrepareRendererPlugin.d.ts +1 -0
- package/lib/plugins/PrepareRendererPlugin.js +9 -5
- package/lib/services/EventService.js +4 -8
- package/lib/services/OffscreenCanvasCreator.d.ts +1 -1
- package/lib/services/OffscreenCanvasCreator.js +1 -1
- package/lib/services/RenderingService.d.ts +18 -18
- package/lib/services/RenderingService.js +26 -23
- package/lib/services/SceneGraphService.js +3 -1
- package/lib/types.d.ts +7 -5
- package/lib/utils/deferred.d.ts +43 -0
- package/lib/utils/deferred.js +131 -0
- package/lib/utils/dom.d.ts +2 -0
- package/lib/utils/dom.js +17 -0
- package/lib/utils/index.d.ts +2 -1
- package/lib/utils/index.js +17 -4
- package/lib/utils/interpolation.js +2 -2
- package/package.json +4 -3
- package/es/css/LayoutRegistry.d.ts +0 -11
- package/es/css/LayoutRegistry.js +0 -22
- package/es/utils/hooks.d.ts +0 -280
- package/es/utils/hooks.js +0 -753
- package/lib/css/LayoutRegistry.d.ts +0 -11
- package/lib/css/LayoutRegistry.js +0 -30
- package/lib/utils/hooks.d.ts +0 -280
- package/lib/utils/hooks.js +0 -759
package/lib/global-module.js
CHANGED
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.containerModule = void 0;
|
|
7
7
|
|
|
8
|
+
var _tslib = require("tslib");
|
|
9
|
+
|
|
8
10
|
var _manaSyringe = require("mana-syringe");
|
|
9
11
|
|
|
10
12
|
var _eventemitter = require("eventemitter3");
|
|
@@ -15,6 +17,8 @@ var _services = require("./services");
|
|
|
15
17
|
|
|
16
18
|
var _css = require("./css");
|
|
17
19
|
|
|
20
|
+
var _layout = require("./css/layout");
|
|
21
|
+
|
|
18
22
|
var containerModule = (0, _manaSyringe.Module)(function (register) {
|
|
19
23
|
(0, _manaSyringe.decorate)((0, _manaSyringe.injectable)(), _eventemitter.EventEmitter); // bind DisplayObject pool
|
|
20
24
|
|
|
@@ -30,10 +34,7 @@ var containerModule = (0, _manaSyringe.Module)(function (register) {
|
|
|
30
34
|
}
|
|
31
35
|
}); // bind scenegraph service
|
|
32
36
|
|
|
33
|
-
register(
|
|
34
|
-
token: _services.SceneGraphService,
|
|
35
|
-
useClass: _services.DefaultSceneGraphService
|
|
36
|
-
}); // bind text service
|
|
37
|
+
register(_services.DefaultSceneGraphService); // bind text service
|
|
37
38
|
|
|
38
39
|
register(_services.OffscreenCanvasCreator);
|
|
39
40
|
register(_services.TextService); // bind aabb updater
|
|
@@ -62,7 +63,7 @@ var containerModule = (0, _manaSyringe.Module)(function (register) {
|
|
|
62
63
|
}); // bind CSS property handlers
|
|
63
64
|
|
|
64
65
|
register(_css.LayoutRegistry);
|
|
65
|
-
register(_css.
|
|
66
|
+
register(_css.DefaultStyleValueRegistry);
|
|
66
67
|
register(_css.CSSPropertyLengthOrPercentage);
|
|
67
68
|
register(_css.CSSPropertyLocalPosition);
|
|
68
69
|
register(_css.CSSPropertyOpacity);
|
|
@@ -80,6 +81,90 @@ var containerModule = (0, _manaSyringe.Module)(function (register) {
|
|
|
80
81
|
register(_css.CSSPropertyPoints);
|
|
81
82
|
register(_css.CSSPropertyClipPath);
|
|
82
83
|
register(_css.CSSPropertyText);
|
|
83
|
-
register(_css.CSSPropertyTextTransform);
|
|
84
|
+
register(_css.CSSPropertyTextTransform); // bind layout engine
|
|
85
|
+
|
|
86
|
+
register(_layout.LayoutEngine);
|
|
87
|
+
register(_layout.LayoutEdges);
|
|
88
|
+
register({
|
|
89
|
+
token: _layout.LayoutEdgesFactory,
|
|
90
|
+
useFactory: function useFactory(context) {
|
|
91
|
+
return function (options) {
|
|
92
|
+
var container = context.container.createChild();
|
|
93
|
+
container.register({
|
|
94
|
+
token: _layout.LayoutEdgesOptions,
|
|
95
|
+
useValue: options
|
|
96
|
+
});
|
|
97
|
+
return container.get(_layout.LayoutEdges);
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
register({
|
|
102
|
+
token: _layout.LayoutContextFactory,
|
|
103
|
+
useFactory: function useFactory(context) {
|
|
104
|
+
return function (options) {
|
|
105
|
+
var container = context.container.createChild();
|
|
106
|
+
container.register(_layout.LayoutContext);
|
|
107
|
+
container.register(_layout.LayoutChildren);
|
|
108
|
+
container.register({
|
|
109
|
+
token: _layout.LayoutChildrenFactory,
|
|
110
|
+
useFactory: function useFactory(childContext) {
|
|
111
|
+
return function (childOptions) {
|
|
112
|
+
var childContainer = childContext.container.createChild();
|
|
113
|
+
childContainer.register({
|
|
114
|
+
token: _layout.LayoutChildrenOptions,
|
|
115
|
+
useValue: childOptions
|
|
116
|
+
});
|
|
117
|
+
return childContainer.get(_layout.LayoutChildren);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
container.register(_layout.FragmentResult);
|
|
122
|
+
container.register({
|
|
123
|
+
token: _layout.FragmentResultFactory,
|
|
124
|
+
useFactory: function useFactory(childContext) {
|
|
125
|
+
return function (childOptions, node) {
|
|
126
|
+
var childContainer = childContext.container.createChild();
|
|
127
|
+
childContainer.register({
|
|
128
|
+
token: _layout.FragmentResultOptions,
|
|
129
|
+
useValue: childOptions
|
|
130
|
+
});
|
|
131
|
+
childContainer.register({
|
|
132
|
+
token: _layout.ContextNode,
|
|
133
|
+
useValue: node
|
|
134
|
+
});
|
|
135
|
+
return childContainer.get(_layout.FragmentResult);
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
container.register(_layout.LayoutFragment);
|
|
140
|
+
container.register({
|
|
141
|
+
token: _layout.LayoutFragmentFactory,
|
|
142
|
+
useFactory: function useFactory(childContext) {
|
|
143
|
+
return function (childOptions) {
|
|
144
|
+
var childContainer = childContext.container.createChild();
|
|
145
|
+
childContainer.register({
|
|
146
|
+
token: _layout.LayoutFragmentOptions,
|
|
147
|
+
useValue: childOptions
|
|
148
|
+
});
|
|
149
|
+
return childContainer.get(_layout.LayoutFragment);
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
var layoutChildrenFactory = container.get(_layout.LayoutChildrenFactory);
|
|
154
|
+
var layoutFragmentFactory = container.get(_layout.LayoutFragmentFactory);
|
|
155
|
+
var fragmentResultFactory = container.get(_layout.FragmentResultFactory);
|
|
156
|
+
container.register({
|
|
157
|
+
token: _layout.LayoutContextOptions,
|
|
158
|
+
useValue: (0, _tslib.__assign)((0, _tslib.__assign)({}, options), {
|
|
159
|
+
layoutChildrenFactory: layoutChildrenFactory,
|
|
160
|
+
layoutFragmentFactory: layoutFragmentFactory,
|
|
161
|
+
fragmentResultFactory: fragmentResultFactory
|
|
162
|
+
})
|
|
163
|
+
});
|
|
164
|
+
var layoutContext = container.get(_layout.LayoutContext);
|
|
165
|
+
return layoutContext;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
});
|
|
84
169
|
});
|
|
85
170
|
exports.containerModule = containerModule;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
import * as ManaSyringe from 'mana-syringe';
|
|
3
|
+
import { LayoutEngine } from './css/layout';
|
|
3
4
|
export { ManaSyringe };
|
|
5
|
+
declare const layoutEngine: LayoutEngine;
|
|
6
|
+
export { layoutEngine };
|
|
4
7
|
export * from './types';
|
|
5
8
|
export * from './css';
|
|
6
9
|
export * from './dom';
|
package/lib/index.js
CHANGED
|
@@ -6,9 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
var _exportNames = {
|
|
9
|
+
layoutEngine: true,
|
|
9
10
|
ManaSyringe: true
|
|
10
11
|
};
|
|
11
|
-
exports.ManaSyringe = void 0;
|
|
12
|
+
exports.layoutEngine = exports.ManaSyringe = void 0;
|
|
12
13
|
|
|
13
14
|
require("reflect-metadata");
|
|
14
15
|
|
|
@@ -18,6 +19,8 @@ exports.ManaSyringe = ManaSyringe;
|
|
|
18
19
|
|
|
19
20
|
var _globalModule = require("./global-module");
|
|
20
21
|
|
|
22
|
+
var _layout = require("./css/layout");
|
|
23
|
+
|
|
21
24
|
var _types = require("./types");
|
|
22
25
|
|
|
23
26
|
Object.keys(_types).forEach(function (key) {
|
|
@@ -190,4 +193,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
190
193
|
|
|
191
194
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
192
195
|
|
|
193
|
-
ManaSyringe.GlobalContainer.load(_globalModule.containerModule);
|
|
196
|
+
ManaSyringe.GlobalContainer.load(_globalModule.containerModule);
|
|
197
|
+
var layoutEngine = ManaSyringe.GlobalContainer.get(_layout.LayoutEngine);
|
|
198
|
+
exports.layoutEngine = layoutEngine;
|
|
@@ -11,6 +11,7 @@ export interface CullingStrategyContribution {
|
|
|
11
11
|
* 2. other custom culling strategies, eg. frustum culling
|
|
12
12
|
*/
|
|
13
13
|
export declare class CullingPlugin implements RenderingPlugin {
|
|
14
|
+
static tag: string;
|
|
14
15
|
private strategyProvider;
|
|
15
16
|
apply(renderingService: RenderingService): void;
|
|
16
17
|
}
|
|
@@ -26,9 +26,11 @@ var CullingPlugin =
|
|
|
26
26
|
function () {
|
|
27
27
|
function CullingPlugin() {}
|
|
28
28
|
|
|
29
|
+
CullingPlugin_1 = CullingPlugin;
|
|
30
|
+
|
|
29
31
|
CullingPlugin.prototype.apply = function (renderingService) {
|
|
30
32
|
var strategies = this.strategyProvider.getContributions();
|
|
31
|
-
renderingService.hooks.cull.tap(function (object) {
|
|
33
|
+
renderingService.hooks.cull.tap(CullingPlugin_1.tag, function (object) {
|
|
32
34
|
if (object) {
|
|
33
35
|
var cullable = object.cullable;
|
|
34
36
|
|
|
@@ -50,13 +52,15 @@ function () {
|
|
|
50
52
|
|
|
51
53
|
return object;
|
|
52
54
|
});
|
|
53
|
-
renderingService.hooks.afterRender.tap(function (object) {
|
|
55
|
+
renderingService.hooks.afterRender.tap(CullingPlugin_1.tag, function (object) {
|
|
54
56
|
object.cullable.visibilityPlaneMask = -1;
|
|
55
57
|
});
|
|
56
58
|
};
|
|
57
59
|
|
|
60
|
+
var CullingPlugin_1;
|
|
61
|
+
CullingPlugin.tag = 'Culling';
|
|
58
62
|
(0, _tslib.__decorate)([(0, _manaSyringe.contrib)(CullingStrategyContribution), (0, _tslib.__metadata)("design:type", Object)], CullingPlugin.prototype, "strategyProvider", void 0);
|
|
59
|
-
CullingPlugin = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
63
|
+
CullingPlugin = CullingPlugin_1 = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
60
64
|
contrib: _RenderingService.RenderingPluginContribution
|
|
61
65
|
})], CullingPlugin);
|
|
62
66
|
return CullingPlugin;
|
|
@@ -3,6 +3,7 @@ import type { RenderingService, RenderingPlugin } from '../services/RenderingSer
|
|
|
3
3
|
* Filter dirty renderables and calculate the "dirty rectangle" which will be clear when frame began
|
|
4
4
|
*/
|
|
5
5
|
export declare class DirtyCheckPlugin implements RenderingPlugin {
|
|
6
|
+
static tag: string;
|
|
6
7
|
private canvasConfig;
|
|
7
8
|
private renderingContext;
|
|
8
9
|
apply(renderingService: RenderingService): void;
|
|
@@ -23,10 +23,12 @@ var DirtyCheckPlugin =
|
|
|
23
23
|
function () {
|
|
24
24
|
function DirtyCheckPlugin() {}
|
|
25
25
|
|
|
26
|
+
DirtyCheckPlugin_1 = DirtyCheckPlugin;
|
|
27
|
+
|
|
26
28
|
DirtyCheckPlugin.prototype.apply = function (renderingService) {
|
|
27
29
|
var _this = this;
|
|
28
30
|
|
|
29
|
-
renderingService.hooks.dirtycheck.tap(function (object) {
|
|
31
|
+
renderingService.hooks.dirtycheck.tap(DirtyCheckPlugin_1.tag, function (object) {
|
|
30
32
|
if (object) {
|
|
31
33
|
var enableDirtyCheck = _this.canvasConfig.renderer.getConfig().enableDirtyCheck;
|
|
32
34
|
|
|
@@ -48,9 +50,11 @@ function () {
|
|
|
48
50
|
});
|
|
49
51
|
};
|
|
50
52
|
|
|
53
|
+
var DirtyCheckPlugin_1;
|
|
54
|
+
DirtyCheckPlugin.tag = 'DirtyCheck';
|
|
51
55
|
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_types.CanvasConfig), (0, _tslib.__metadata)("design:type", Object)], DirtyCheckPlugin.prototype, "canvasConfig", void 0);
|
|
52
56
|
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_RenderingContext.RenderingContext), (0, _tslib.__metadata)("design:type", Object)], DirtyCheckPlugin.prototype, "renderingContext", void 0);
|
|
53
|
-
DirtyCheckPlugin = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
57
|
+
DirtyCheckPlugin = DirtyCheckPlugin_1 = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
54
58
|
contrib: _RenderingService.RenderingPluginContribution
|
|
55
59
|
})], DirtyCheckPlugin);
|
|
56
60
|
return DirtyCheckPlugin;
|
|
@@ -7,6 +7,7 @@ import { RenderingService } from '../services';
|
|
|
7
7
|
* also provide some extra events such as `drag`
|
|
8
8
|
*/
|
|
9
9
|
export declare class EventPlugin implements RenderingPlugin {
|
|
10
|
+
static tag: string;
|
|
10
11
|
private canvasConfig;
|
|
11
12
|
private contextService;
|
|
12
13
|
private renderingService;
|
|
@@ -55,6 +55,8 @@ function () {
|
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
EventPlugin_1 = EventPlugin;
|
|
59
|
+
|
|
58
60
|
EventPlugin.prototype.apply = function (renderingService) {
|
|
59
61
|
var _this = this;
|
|
60
62
|
|
|
@@ -67,7 +69,7 @@ function () {
|
|
|
67
69
|
case 0:
|
|
68
70
|
return [4
|
|
69
71
|
/*yield*/
|
|
70
|
-
, this.renderingService.hooks.pick.
|
|
72
|
+
, this.renderingService.hooks.pick.promise({
|
|
71
73
|
position: position,
|
|
72
74
|
picked: [],
|
|
73
75
|
topmost: true // we only concern the topmost element
|
|
@@ -83,12 +85,12 @@ function () {
|
|
|
83
85
|
});
|
|
84
86
|
});
|
|
85
87
|
});
|
|
86
|
-
renderingService.hooks.pointerWheel.tap(function (nativeEvent) {
|
|
88
|
+
renderingService.hooks.pointerWheel.tap(EventPlugin_1.tag, function (nativeEvent) {
|
|
87
89
|
var wheelEvent = _this.normalizeWheelEvent(nativeEvent);
|
|
88
90
|
|
|
89
91
|
_this.eventService.mapEvent(wheelEvent);
|
|
90
92
|
});
|
|
91
|
-
renderingService.hooks.pointerDown.tap(function (nativeEvent) {
|
|
93
|
+
renderingService.hooks.pointerDown.tap(EventPlugin_1.tag, function (nativeEvent) {
|
|
92
94
|
if (canvas.supportTouchEvent && nativeEvent.pointerType === 'touch') {
|
|
93
95
|
return;
|
|
94
96
|
}
|
|
@@ -109,7 +111,7 @@ function () {
|
|
|
109
111
|
|
|
110
112
|
_this.setCursor(_this.eventService.cursor);
|
|
111
113
|
});
|
|
112
|
-
renderingService.hooks.pointerUp.tap(function (nativeEvent) {
|
|
114
|
+
renderingService.hooks.pointerUp.tap(EventPlugin_1.tag, function (nativeEvent) {
|
|
113
115
|
if (canvas.supportTouchEvent && nativeEvent.pointerType === 'touch') return; // account for element in SVG
|
|
114
116
|
|
|
115
117
|
var $element = _this.contextService.getDomElement();
|
|
@@ -128,10 +130,10 @@ function () {
|
|
|
128
130
|
|
|
129
131
|
_this.setCursor(_this.eventService.cursor);
|
|
130
132
|
});
|
|
131
|
-
renderingService.hooks.pointerMove.tap(this.onPointerMove);
|
|
132
|
-
renderingService.hooks.pointerOver.tap(this.onPointerMove);
|
|
133
|
-
renderingService.hooks.pointerOut.tap(this.onPointerMove);
|
|
134
|
-
renderingService.hooks.pointerCancel.tap(function (nativeEvent) {
|
|
133
|
+
renderingService.hooks.pointerMove.tap(EventPlugin_1.tag, this.onPointerMove);
|
|
134
|
+
renderingService.hooks.pointerOver.tap(EventPlugin_1.tag, this.onPointerMove);
|
|
135
|
+
renderingService.hooks.pointerOut.tap(EventPlugin_1.tag, this.onPointerMove);
|
|
136
|
+
renderingService.hooks.pointerCancel.tap(EventPlugin_1.tag, function (nativeEvent) {
|
|
135
137
|
if (canvas.supportTouchEvent && nativeEvent.pointerType === 'touch') {
|
|
136
138
|
return;
|
|
137
139
|
}
|
|
@@ -364,12 +366,14 @@ function () {
|
|
|
364
366
|
}
|
|
365
367
|
};
|
|
366
368
|
|
|
369
|
+
var EventPlugin_1;
|
|
370
|
+
EventPlugin.tag = 'Event';
|
|
367
371
|
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_types.CanvasConfig), (0, _tslib.__metadata)("design:type", Object)], EventPlugin.prototype, "canvasConfig", void 0);
|
|
368
372
|
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_services.ContextService), (0, _tslib.__metadata)("design:type", Object)], EventPlugin.prototype, "contextService", void 0);
|
|
369
373
|
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_services.RenderingService), (0, _tslib.__metadata)("design:type", _services.RenderingService)], EventPlugin.prototype, "renderingService", void 0);
|
|
370
374
|
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_services.RenderingContext), (0, _tslib.__metadata)("design:type", Object)], EventPlugin.prototype, "renderingContext", void 0);
|
|
371
375
|
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_services.EventService), (0, _tslib.__metadata)("design:type", _services.EventService)], EventPlugin.prototype, "eventService", void 0);
|
|
372
|
-
EventPlugin = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
376
|
+
EventPlugin = EventPlugin_1 = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
373
377
|
contrib: _services.RenderingPluginContribution
|
|
374
378
|
})], EventPlugin);
|
|
375
379
|
return EventPlugin;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { RenderingService, RenderingPlugin } from '../services';
|
|
2
2
|
export declare class PrepareRendererPlugin implements RenderingPlugin {
|
|
3
|
+
static tag: string;
|
|
3
4
|
private renderingContext;
|
|
4
5
|
private styleValueRegistry;
|
|
5
6
|
apply(renderingService: RenderingService): void;
|
|
@@ -9,7 +9,7 @@ var _tslib = require("tslib");
|
|
|
9
9
|
|
|
10
10
|
var _manaSyringe = require("mana-syringe");
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _interfaces = require("../css/interfaces");
|
|
13
13
|
|
|
14
14
|
var _dom = require("../dom");
|
|
15
15
|
|
|
@@ -20,6 +20,8 @@ var PrepareRendererPlugin =
|
|
|
20
20
|
function () {
|
|
21
21
|
function PrepareRendererPlugin() {}
|
|
22
22
|
|
|
23
|
+
PrepareRendererPlugin_1 = PrepareRendererPlugin;
|
|
24
|
+
|
|
23
25
|
PrepareRendererPlugin.prototype.apply = function (renderingService) {
|
|
24
26
|
var _this = this;
|
|
25
27
|
|
|
@@ -48,7 +50,7 @@ function () {
|
|
|
48
50
|
renderingService.dirtify();
|
|
49
51
|
};
|
|
50
52
|
|
|
51
|
-
renderingService.hooks.init.tapPromise(function () {
|
|
53
|
+
renderingService.hooks.init.tapPromise(PrepareRendererPlugin_1.tag, function () {
|
|
52
54
|
return (0, _tslib.__awaiter)(_this, void 0, void 0, function () {
|
|
53
55
|
return (0, _tslib.__generator)(this, function (_a) {
|
|
54
56
|
this.renderingContext.root.addEventListener(_dom.ElementEvent.MOUNTED, handleMounted);
|
|
@@ -61,7 +63,7 @@ function () {
|
|
|
61
63
|
});
|
|
62
64
|
});
|
|
63
65
|
});
|
|
64
|
-
renderingService.hooks.destroy.tap(function () {
|
|
66
|
+
renderingService.hooks.destroy.tap(PrepareRendererPlugin_1.tag, function () {
|
|
65
67
|
_this.renderingContext.root.removeEventListener(_dom.ElementEvent.MOUNTED, handleMounted);
|
|
66
68
|
|
|
67
69
|
_this.renderingContext.root.removeEventListener(_dom.ElementEvent.UNMOUNTED, handleUnmounted);
|
|
@@ -72,9 +74,11 @@ function () {
|
|
|
72
74
|
});
|
|
73
75
|
};
|
|
74
76
|
|
|
77
|
+
var PrepareRendererPlugin_1;
|
|
78
|
+
PrepareRendererPlugin.tag = 'Prepare';
|
|
75
79
|
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_services.RenderingContext), (0, _tslib.__metadata)("design:type", Object)], PrepareRendererPlugin.prototype, "renderingContext", void 0);
|
|
76
|
-
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(
|
|
77
|
-
PrepareRendererPlugin = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
80
|
+
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_interfaces.StyleValueRegistry), (0, _tslib.__metadata)("design:type", Object)], PrepareRendererPlugin.prototype, "styleValueRegistry", void 0);
|
|
81
|
+
PrepareRendererPlugin = PrepareRendererPlugin_1 = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
78
82
|
contrib: _services.RenderingPluginContribution
|
|
79
83
|
})], PrepareRendererPlugin);
|
|
80
84
|
return PrepareRendererPlugin;
|
|
@@ -212,8 +212,7 @@ function (_super) {
|
|
|
212
212
|
e = _a.sent();
|
|
213
213
|
this.dispatchEvent(e, 'pointerdown');
|
|
214
214
|
|
|
215
|
-
if (e.pointerType === 'touch') {
|
|
216
|
-
this.dispatchEvent(e, 'touchstart');
|
|
215
|
+
if (e.pointerType === 'touch') {// this.dispatchEvent(e, 'touchstart');
|
|
217
216
|
} else if (e.pointerType === 'mouse' || e.pointerType === 'pen') {
|
|
218
217
|
isRightButton = e.button === 2;
|
|
219
218
|
this.dispatchEvent(e, isRightButton ? 'rightdown' : 'mousedown');
|
|
@@ -251,8 +250,7 @@ function (_super) {
|
|
|
251
250
|
e = _a.sent();
|
|
252
251
|
this.dispatchEvent(e, 'pointerup');
|
|
253
252
|
|
|
254
|
-
if (e.pointerType === 'touch') {
|
|
255
|
-
this.dispatchEvent(e, 'touchend');
|
|
253
|
+
if (e.pointerType === 'touch') {// this.dispatchEvent(e, 'touchend');
|
|
256
254
|
} else if (e.pointerType === 'mouse' || e.pointerType === 'pen') {
|
|
257
255
|
isRightButton = e.button === 2;
|
|
258
256
|
this.dispatchEvent(e, isRightButton ? 'rightup' : 'mouseup');
|
|
@@ -429,8 +427,7 @@ function (_super) {
|
|
|
429
427
|
} // Then pointermove
|
|
430
428
|
|
|
431
429
|
|
|
432
|
-
this.dispatchEvent(e, 'pointermove');
|
|
433
|
-
if (e.pointerType === 'touch') this.dispatchEvent(e, 'touchmove');
|
|
430
|
+
this.dispatchEvent(e, 'pointermove'); // if (e.pointerType === 'touch') this.dispatchEvent(e, 'touchmove');
|
|
434
431
|
|
|
435
432
|
if (isMouse) {
|
|
436
433
|
this.dispatchEvent(e, 'mousemove');
|
|
@@ -586,8 +583,7 @@ function (_super) {
|
|
|
586
583
|
e.currentTarget = currentTarget;
|
|
587
584
|
this.notifyTarget(e, 'pointerupoutside');
|
|
588
585
|
|
|
589
|
-
if (e.pointerType === 'touch') {
|
|
590
|
-
this.notifyTarget(e, 'touchendoutside');
|
|
586
|
+
if (e.pointerType === 'touch') {// this.notifyTarget(e, 'touchendoutside');
|
|
591
587
|
} else if (e.pointerType === 'mouse' || e.pointerType === 'pen') {
|
|
592
588
|
this.notifyTarget(e, e.button === 2 ? 'rightupoutside' : 'mouseupoutside');
|
|
593
589
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* used in following scenes:
|
|
4
4
|
* - g `ctx.measureText`
|
|
5
5
|
* - g-plugin-canvas-picker `ctx.isPointInPath`
|
|
6
|
-
* - g-plugin-
|
|
6
|
+
* - g-plugin-device-renderer `ctx.createLinearGradient` and generate texture
|
|
7
7
|
*/
|
|
8
8
|
export declare class OffscreenCanvasCreator {
|
|
9
9
|
private canvas;
|
|
@@ -13,7 +13,7 @@ var _manaSyringe = require("mana-syringe");
|
|
|
13
13
|
* used in following scenes:
|
|
14
14
|
* - g `ctx.measureText`
|
|
15
15
|
* - g-plugin-canvas-picker `ctx.isPointInPath`
|
|
16
|
-
* - g-plugin-
|
|
16
|
+
* - g-plugin-device-renderer `ctx.createLinearGradient` and generate texture
|
|
17
17
|
*/
|
|
18
18
|
var OffscreenCanvasCreator =
|
|
19
19
|
/** @class */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Syringe } from 'mana-syringe';
|
|
2
|
-
import { SyncHook, SyncWaterfallHook, AsyncParallelHook, AsyncSeriesWaterfallHook } from '
|
|
2
|
+
import { SyncHook, SyncWaterfallHook, AsyncParallelHook, AsyncSeriesWaterfallHook } from 'tapable';
|
|
3
3
|
import type { DisplayObject } from '../display-objects';
|
|
4
4
|
import type { CanvasConfig, EventPosition, InteractivePointerEvent } from '../types';
|
|
5
5
|
export interface RenderingPlugin {
|
|
@@ -38,47 +38,47 @@ export declare class RenderingService {
|
|
|
38
38
|
/**
|
|
39
39
|
* called before any frame rendered
|
|
40
40
|
*/
|
|
41
|
-
init: AsyncParallelHook<[],
|
|
41
|
+
init: AsyncParallelHook<[], import("tapable").UnsetAdditionalOptions>;
|
|
42
42
|
/**
|
|
43
43
|
* only dirty object which has sth changed will be rendered
|
|
44
44
|
*/
|
|
45
|
-
dirtycheck: SyncWaterfallHook<[DisplayObject<any, any>],
|
|
45
|
+
dirtycheck: SyncWaterfallHook<[DisplayObject<any, any>], import("tapable").UnsetAdditionalOptions>;
|
|
46
46
|
/**
|
|
47
47
|
* do culling
|
|
48
48
|
*/
|
|
49
|
-
cull: SyncWaterfallHook<[DisplayObject<any, any>],
|
|
49
|
+
cull: SyncWaterfallHook<[DisplayObject<any, any>], import("tapable").UnsetAdditionalOptions>;
|
|
50
50
|
/**
|
|
51
51
|
* called at beginning of each frame, won't get called if nothing to re-render
|
|
52
52
|
*/
|
|
53
|
-
beginFrame: SyncHook<[], void>;
|
|
53
|
+
beginFrame: SyncHook<[], void, import("tapable").UnsetAdditionalOptions>;
|
|
54
54
|
/**
|
|
55
55
|
* called before every dirty object get rendered
|
|
56
56
|
*/
|
|
57
|
-
beforeRender: SyncHook<[DisplayObject<any, any>], void>;
|
|
57
|
+
beforeRender: SyncHook<[DisplayObject<any, any>], void, import("tapable").UnsetAdditionalOptions>;
|
|
58
58
|
/**
|
|
59
59
|
* called when every dirty object rendering even it's culled
|
|
60
60
|
*/
|
|
61
|
-
render: SyncHook<[DisplayObject<any, any>], void>;
|
|
61
|
+
render: SyncHook<[DisplayObject<any, any>], void, import("tapable").UnsetAdditionalOptions>;
|
|
62
62
|
/**
|
|
63
63
|
* called after every dirty object get rendered
|
|
64
64
|
*/
|
|
65
|
-
afterRender: SyncHook<[DisplayObject<any, any>], void>;
|
|
66
|
-
endFrame: SyncHook<[], void>;
|
|
67
|
-
destroy: SyncHook<[], void>;
|
|
65
|
+
afterRender: SyncHook<[DisplayObject<any, any>], void, import("tapable").UnsetAdditionalOptions>;
|
|
66
|
+
endFrame: SyncHook<[], void, import("tapable").UnsetAdditionalOptions>;
|
|
67
|
+
destroy: SyncHook<[], void, import("tapable").UnsetAdditionalOptions>;
|
|
68
68
|
/**
|
|
69
|
-
* use async but faster method such as GPU-based picking in `g-plugin-
|
|
69
|
+
* use async but faster method such as GPU-based picking in `g-plugin-device-renderer`
|
|
70
70
|
*/
|
|
71
71
|
pick: AsyncSeriesWaterfallHook<[PickingResult], PickingResult>;
|
|
72
72
|
/**
|
|
73
73
|
* used in event system
|
|
74
74
|
*/
|
|
75
|
-
pointerDown: SyncHook<[InteractivePointerEvent], void>;
|
|
76
|
-
pointerUp: SyncHook<[InteractivePointerEvent], void>;
|
|
77
|
-
pointerMove: SyncHook<[InteractivePointerEvent], void>;
|
|
78
|
-
pointerOut: SyncHook<[InteractivePointerEvent], void>;
|
|
79
|
-
pointerOver: SyncHook<[InteractivePointerEvent], void>;
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
pointerDown: SyncHook<[InteractivePointerEvent], void, import("tapable").UnsetAdditionalOptions>;
|
|
76
|
+
pointerUp: SyncHook<[InteractivePointerEvent], void, import("tapable").UnsetAdditionalOptions>;
|
|
77
|
+
pointerMove: SyncHook<[InteractivePointerEvent], void, import("tapable").UnsetAdditionalOptions>;
|
|
78
|
+
pointerOut: SyncHook<[InteractivePointerEvent], void, import("tapable").UnsetAdditionalOptions>;
|
|
79
|
+
pointerOver: SyncHook<[InteractivePointerEvent], void, import("tapable").UnsetAdditionalOptions>;
|
|
80
|
+
pointerWheel: SyncHook<[InteractivePointerEvent], void, import("tapable").UnsetAdditionalOptions>;
|
|
81
|
+
pointerCancel: SyncHook<[InteractivePointerEvent], void, import("tapable").UnsetAdditionalOptions>;
|
|
82
82
|
};
|
|
83
83
|
init(): Promise<void>;
|
|
84
84
|
getStats(): {
|
|
@@ -9,9 +9,9 @@ var _tslib = require("tslib");
|
|
|
9
9
|
|
|
10
10
|
var _manaSyringe = require("mana-syringe");
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _tapable = require("tapable");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _interfaces = require("../css/interfaces");
|
|
15
15
|
|
|
16
16
|
var _dom = require("../dom");
|
|
17
17
|
|
|
@@ -19,6 +19,7 @@ var _RenderingContext = require("./RenderingContext");
|
|
|
19
19
|
|
|
20
20
|
var _SceneGraphService = require("./SceneGraphService");
|
|
21
21
|
|
|
22
|
+
// import { SyncHook, SyncWaterfallHook, AsyncParallelHook, AsyncSeriesWaterfallHook } from '../utils';
|
|
22
23
|
var RenderingPluginContribution = _manaSyringe.Syringe.defineToken('RenderingPluginContribution');
|
|
23
24
|
/**
|
|
24
25
|
* Use frame renderer implemented by `g-canvas/svg/webgl`, in every frame we do followings:
|
|
@@ -59,55 +60,55 @@ function () {
|
|
|
59
60
|
/**
|
|
60
61
|
* called before any frame rendered
|
|
61
62
|
*/
|
|
62
|
-
init: new
|
|
63
|
+
init: new _tapable.AsyncParallelHook(),
|
|
63
64
|
|
|
64
65
|
/**
|
|
65
66
|
* only dirty object which has sth changed will be rendered
|
|
66
67
|
*/
|
|
67
|
-
dirtycheck: new
|
|
68
|
+
dirtycheck: new _tapable.SyncWaterfallHook(['object']),
|
|
68
69
|
|
|
69
70
|
/**
|
|
70
71
|
* do culling
|
|
71
72
|
*/
|
|
72
|
-
cull: new
|
|
73
|
+
cull: new _tapable.SyncWaterfallHook(['object']),
|
|
73
74
|
|
|
74
75
|
/**
|
|
75
76
|
* called at beginning of each frame, won't get called if nothing to re-render
|
|
76
77
|
*/
|
|
77
|
-
beginFrame: new
|
|
78
|
+
beginFrame: new _tapable.SyncHook([]),
|
|
78
79
|
|
|
79
80
|
/**
|
|
80
81
|
* called before every dirty object get rendered
|
|
81
82
|
*/
|
|
82
|
-
beforeRender: new
|
|
83
|
+
beforeRender: new _tapable.SyncHook(['objectToRender']),
|
|
83
84
|
|
|
84
85
|
/**
|
|
85
86
|
* called when every dirty object rendering even it's culled
|
|
86
87
|
*/
|
|
87
|
-
render: new
|
|
88
|
+
render: new _tapable.SyncHook(['objectToRender']),
|
|
88
89
|
|
|
89
90
|
/**
|
|
90
91
|
* called after every dirty object get rendered
|
|
91
92
|
*/
|
|
92
|
-
afterRender: new
|
|
93
|
-
endFrame: new
|
|
94
|
-
destroy: new
|
|
93
|
+
afterRender: new _tapable.SyncHook(['objectToRender']),
|
|
94
|
+
endFrame: new _tapable.SyncHook([]),
|
|
95
|
+
destroy: new _tapable.SyncHook([]),
|
|
95
96
|
|
|
96
97
|
/**
|
|
97
|
-
* use async but faster method such as GPU-based picking in `g-plugin-
|
|
98
|
+
* use async but faster method such as GPU-based picking in `g-plugin-device-renderer`
|
|
98
99
|
*/
|
|
99
|
-
pick: new
|
|
100
|
+
pick: new _tapable.AsyncSeriesWaterfallHook(['result']),
|
|
100
101
|
|
|
101
102
|
/**
|
|
102
103
|
* used in event system
|
|
103
104
|
*/
|
|
104
|
-
pointerDown: new
|
|
105
|
-
pointerUp: new
|
|
106
|
-
pointerMove: new
|
|
107
|
-
pointerOut: new
|
|
108
|
-
pointerOver: new
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
pointerDown: new _tapable.SyncHook(['event']),
|
|
106
|
+
pointerUp: new _tapable.SyncHook(['event']),
|
|
107
|
+
pointerMove: new _tapable.SyncHook(['event']),
|
|
108
|
+
pointerOut: new _tapable.SyncHook(['event']),
|
|
109
|
+
pointerOver: new _tapable.SyncHook(['event']),
|
|
110
|
+
pointerWheel: new _tapable.SyncHook(['event']),
|
|
111
|
+
pointerCancel: new _tapable.SyncHook(['event'])
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
114
|
|
|
@@ -123,12 +124,14 @@ function () {
|
|
|
123
124
|
cache: false
|
|
124
125
|
}).forEach(function (plugin) {
|
|
125
126
|
plugin.apply(_this);
|
|
126
|
-
});
|
|
127
|
+
}); // await this.hooks.init.callPromise();
|
|
128
|
+
|
|
127
129
|
return [4
|
|
128
130
|
/*yield*/
|
|
129
|
-
, this.hooks.init.
|
|
131
|
+
, this.hooks.init.promise()];
|
|
130
132
|
|
|
131
133
|
case 1:
|
|
134
|
+
// await this.hooks.init.callPromise();
|
|
132
135
|
_a.sent();
|
|
133
136
|
|
|
134
137
|
this.inited = true;
|
|
@@ -233,7 +236,7 @@ function () {
|
|
|
233
236
|
(0, _tslib.__decorate)([(0, _manaSyringe.contrib)(RenderingPluginContribution), (0, _tslib.__metadata)("design:type", Object)], RenderingService.prototype, "renderingPluginProvider", void 0);
|
|
234
237
|
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_RenderingContext.RenderingContext), (0, _tslib.__metadata)("design:type", Object)], RenderingService.prototype, "renderingContext", void 0);
|
|
235
238
|
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_SceneGraphService.SceneGraphService), (0, _tslib.__metadata)("design:type", Object)], RenderingService.prototype, "sceneGraphService", void 0);
|
|
236
|
-
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(
|
|
239
|
+
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_interfaces.StyleValueRegistry), (0, _tslib.__metadata)("design:type", Object)], RenderingService.prototype, "styleValueRegistry", void 0);
|
|
237
240
|
RenderingService = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], RenderingService);
|
|
238
241
|
return RenderingService;
|
|
239
242
|
}();
|
|
@@ -854,7 +854,9 @@ function () {
|
|
|
854
854
|
};
|
|
855
855
|
|
|
856
856
|
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_SceneGraphSelector.SceneGraphSelectorFactory), (0, _tslib.__metadata)("design:type", Function)], DefaultSceneGraphService.prototype, "sceneGraphSelectorFactory", void 0);
|
|
857
|
-
DefaultSceneGraphService = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)(
|
|
857
|
+
DefaultSceneGraphService = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
858
|
+
token: SceneGraphService
|
|
859
|
+
})], DefaultSceneGraphService);
|
|
858
860
|
return DefaultSceneGraphService;
|
|
859
861
|
}();
|
|
860
862
|
|