@antv/g-plugin-canvas-renderer
Advanced tools
Comparing version 1.0.0-alpha.23 to 1.0.0-alpha.24
import { __assign, __decorate, __metadata, __read, __spreadArray } from "tslib"; | ||
import { AABB, DisplayObjectPool, CanvasConfig, ContextService, SceneGraphService, Renderable, RenderingContext, getEuler, fromRotationTranslationScale, Camera, DefaultCamera, PARSED_COLOR_TYPE, RENDER_REASON, ElementEvent } from '@antv/g'; | ||
import { AABB, DisplayObjectPool, CanvasConfig, ContextService, SceneGraphService, Renderable, RenderingContext, getEuler, fromRotationTranslationScale, Camera, DefaultCamera, PARSED_COLOR_TYPE, RENDER_REASON, ElementEvent, RenderingServiceEvent } from '@antv/g'; | ||
import { isArray } from '@antv/util'; | ||
@@ -31,4 +31,2 @@ import { inject, injectable } from 'inversify'; | ||
CanvasRendererPlugin_1 = CanvasRendererPlugin; | ||
CanvasRendererPlugin.prototype.apply = function (renderingService) { | ||
@@ -90,3 +88,3 @@ var _this = this; | ||
renderingService.hooks.init.tap(CanvasRendererPlugin_1.tag, function () { | ||
renderingService.emitter.on(RenderingServiceEvent.Init, function () { | ||
var context = _this.contextService.getContext(); | ||
@@ -106,3 +104,3 @@ | ||
}); | ||
renderingService.hooks.destroy.tap(CanvasRendererPlugin_1.tag, function () { | ||
renderingService.emitter.on(RenderingServiceEvent.Destroy, function () { | ||
_this.renderingContext.root.removeEventListener(ElementEvent.MOUNTED, handleMounted); | ||
@@ -114,3 +112,3 @@ | ||
}); | ||
renderingService.hooks.beginFrame.tap(CanvasRendererPlugin_1.tag, function () { | ||
renderingService.emitter.on(RenderingServiceEvent.BeginFrame, function () { | ||
var context = _this.contextService.getContext(); | ||
@@ -139,3 +137,3 @@ | ||
renderingService.hooks.endFrame.tap(CanvasRendererPlugin_1.tag, function () { | ||
renderingService.emitter.on(RenderingServiceEvent.EndFrame, function () { | ||
var enableDirtyRectangleRendering = _this.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering; | ||
@@ -200,3 +198,3 @@ | ||
}); | ||
renderingService.hooks.render.tap(CanvasRendererPlugin_1.tag, function (object) { | ||
renderingService.emitter.on(RenderingServiceEvent.Render, function (object) { | ||
var enableDirtyRectangleRendering = _this.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering; | ||
@@ -534,3 +532,3 @@ | ||
var CanvasRendererPlugin_1, _a; | ||
var _a; | ||
@@ -561,3 +559,3 @@ CanvasRendererPlugin.tag = 'CanvasRendererPlugin'; | ||
CanvasRendererPlugin = CanvasRendererPlugin_1 = __decorate([injectable()], CanvasRendererPlugin); | ||
CanvasRendererPlugin = __decorate([injectable()], CanvasRendererPlugin); | ||
return CanvasRendererPlugin; | ||
@@ -564,0 +562,0 @@ }(); |
import { __decorate, __metadata } from "tslib"; | ||
import { inject, injectable } from 'inversify'; | ||
import { SHAPE, Renderable, RenderingContext, ElementEvent } from '@antv/g'; | ||
import { SHAPE, Renderable, RenderingContext, ElementEvent, RenderingServiceEvent } from '@antv/g'; | ||
import { ImagePool } from './shapes/ImagePool'; | ||
@@ -10,4 +10,2 @@ import { isString } from '@antv/util'; | ||
LoadImagePlugin_1 = LoadImagePlugin; | ||
LoadImagePlugin.prototype.apply = function (renderingService) { | ||
@@ -53,3 +51,3 @@ var _this = this; | ||
renderingService.hooks.init.tap(LoadImagePlugin_1.tag, function () { | ||
renderingService.emitter.on(RenderingServiceEvent.Init, function () { | ||
_this.renderingContext.root.addEventListener(ElementEvent.MOUNTED, handleMounted); | ||
@@ -59,3 +57,3 @@ | ||
}); | ||
renderingService.hooks.destroy.tap(LoadImagePlugin_1.tag, function () { | ||
renderingService.emitter.on(RenderingServiceEvent.Destroy, function () { | ||
_this.renderingContext.root.removeEventListener(ElementEvent.MOUNTED, handleMounted); | ||
@@ -67,3 +65,2 @@ | ||
var LoadImagePlugin_1; | ||
LoadImagePlugin.tag = 'LoadImagePlugin'; | ||
@@ -75,3 +72,3 @@ | ||
LoadImagePlugin = LoadImagePlugin_1 = __decorate([injectable()], LoadImagePlugin); | ||
LoadImagePlugin = __decorate([injectable()], LoadImagePlugin); | ||
return LoadImagePlugin; | ||
@@ -78,0 +75,0 @@ }(); |
@@ -52,4 +52,2 @@ "use strict"; | ||
CanvasRendererPlugin_1 = CanvasRendererPlugin; | ||
CanvasRendererPlugin.prototype.apply = function (renderingService) { | ||
@@ -111,3 +109,3 @@ var _this = this; | ||
renderingService.hooks.init.tap(CanvasRendererPlugin_1.tag, function () { | ||
renderingService.emitter.on(_g.RenderingServiceEvent.Init, function () { | ||
var context = _this.contextService.getContext(); | ||
@@ -127,3 +125,3 @@ | ||
}); | ||
renderingService.hooks.destroy.tap(CanvasRendererPlugin_1.tag, function () { | ||
renderingService.emitter.on(_g.RenderingServiceEvent.Destroy, function () { | ||
_this.renderingContext.root.removeEventListener(_g.ElementEvent.MOUNTED, handleMounted); | ||
@@ -135,3 +133,3 @@ | ||
}); | ||
renderingService.hooks.beginFrame.tap(CanvasRendererPlugin_1.tag, function () { | ||
renderingService.emitter.on(_g.RenderingServiceEvent.BeginFrame, function () { | ||
var context = _this.contextService.getContext(); | ||
@@ -160,3 +158,3 @@ | ||
renderingService.hooks.endFrame.tap(CanvasRendererPlugin_1.tag, function () { | ||
renderingService.emitter.on(_g.RenderingServiceEvent.EndFrame, function () { | ||
var enableDirtyRectangleRendering = _this.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering; | ||
@@ -221,3 +219,3 @@ | ||
}); | ||
renderingService.hooks.render.tap(CanvasRendererPlugin_1.tag, function (object) { | ||
renderingService.emitter.on(_g.RenderingServiceEvent.Render, function (object) { | ||
var enableDirtyRectangleRendering = _this.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering; | ||
@@ -555,3 +553,3 @@ | ||
var CanvasRendererPlugin_1, _a; | ||
var _a; | ||
@@ -570,3 +568,3 @@ CanvasRendererPlugin.tag = 'CanvasRendererPlugin'; | ||
(0, _tslib.__decorate)([(0, _inversify.inject)(RBushRoot), (0, _tslib.__metadata)("design:type", typeof (_a = typeof _rbush.default !== "undefined" && _rbush.default) === "function" ? _a : Object)], CanvasRendererPlugin.prototype, "rBush", void 0); | ||
CanvasRendererPlugin = CanvasRendererPlugin_1 = (0, _tslib.__decorate)([(0, _inversify.injectable)()], CanvasRendererPlugin); | ||
CanvasRendererPlugin = (0, _tslib.__decorate)([(0, _inversify.injectable)()], CanvasRendererPlugin); | ||
return CanvasRendererPlugin; | ||
@@ -573,0 +571,0 @@ }(); |
@@ -21,4 +21,2 @@ "use strict"; | ||
LoadImagePlugin_1 = LoadImagePlugin; | ||
LoadImagePlugin.prototype.apply = function (renderingService) { | ||
@@ -64,3 +62,3 @@ var _this = this; | ||
renderingService.hooks.init.tap(LoadImagePlugin_1.tag, function () { | ||
renderingService.emitter.on(_g.RenderingServiceEvent.Init, function () { | ||
_this.renderingContext.root.addEventListener(_g.ElementEvent.MOUNTED, handleMounted); | ||
@@ -70,3 +68,3 @@ | ||
}); | ||
renderingService.hooks.destroy.tap(LoadImagePlugin_1.tag, function () { | ||
renderingService.emitter.on(_g.RenderingServiceEvent.Destroy, function () { | ||
_this.renderingContext.root.removeEventListener(_g.ElementEvent.MOUNTED, handleMounted); | ||
@@ -78,7 +76,6 @@ | ||
var LoadImagePlugin_1; | ||
LoadImagePlugin.tag = 'LoadImagePlugin'; | ||
(0, _tslib.__decorate)([(0, _inversify.inject)(_ImagePool.ImagePool), (0, _tslib.__metadata)("design:type", _ImagePool.ImagePool)], LoadImagePlugin.prototype, "imagePool", void 0); | ||
(0, _tslib.__decorate)([(0, _inversify.inject)(_g.RenderingContext), (0, _tslib.__metadata)("design:type", Object)], LoadImagePlugin.prototype, "renderingContext", void 0); | ||
LoadImagePlugin = LoadImagePlugin_1 = (0, _tslib.__decorate)([(0, _inversify.injectable)()], LoadImagePlugin); | ||
LoadImagePlugin = (0, _tslib.__decorate)([(0, _inversify.injectable)()], LoadImagePlugin); | ||
return LoadImagePlugin; | ||
@@ -85,0 +82,0 @@ }(); |
{ | ||
"name": "@antv/g-plugin-canvas-renderer", | ||
"version": "1.0.0-alpha.23", | ||
"version": "1.0.0-alpha.24", | ||
"description": "A G plugin of renderer implementation with Canvas2D API", | ||
@@ -34,3 +34,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@antv/g": "^1.0.0-alpha.23", | ||
"@antv/g": "^1.0.0-alpha.24", | ||
"@antv/g-ecs": "^1.0.0-alpha.8", | ||
@@ -48,3 +48,3 @@ "@antv/g-math": "^1.0.0-alpha.5", | ||
"homepage": "https://github.com/antvis/g#readme", | ||
"gitHead": "c64e9f589805686657e64d063f80de34e276ba0b" | ||
"gitHead": "fb9ebf362059d1f55a855856f05d42514a72c922" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114289
2728
Updated@antv/g@^1.0.0-alpha.24