@antv/g-webgpu 1.6.0-alpha.0 → 1.6.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.
@@ -1,10 +1,10 @@
1
- import type { RendererPlugin, Syringe } from '@antv/g';
1
+ import { AbstractRendererPlugin } from '@antv/g';
2
2
  import type * as DeviceRenderer from '@antv/g-plugin-device-renderer';
3
- export declare class ContextRegisterPlugin implements RendererPlugin {
3
+ export declare class ContextRegisterPlugin extends AbstractRendererPlugin {
4
4
  private rendererPlugin;
5
5
  name: string;
6
6
  constructor(rendererPlugin: DeviceRenderer.Plugin);
7
- init(container: Syringe.Container): void;
8
- destroy(container: Syringe.Container): void;
7
+ init(): void;
8
+ destroy(): void;
9
9
  }
10
10
  //# sourceMappingURL=ContextRegisterPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextRegisterPlugin.d.ts","sourceRoot":"","sources":["../src/ContextRegisterPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvD,OAAO,KAAK,KAAK,cAAc,MAAM,gCAAgC,CAAC;AAWtE,qBAAa,qBAAsB,YAAW,cAAc;IAE9C,OAAO,CAAC,cAAc;IADlC,IAAI,SAA6B;gBACb,cAAc,EAAE,cAAc,CAAC,MAAM;IAEzD,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,GAAG,IAAI;IAMxC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,GAAG,IAAI;CAI5C"}
1
+ {"version":3,"file":"ContextRegisterPlugin.d.ts","sourceRoot":"","sources":["../src/ContextRegisterPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAU,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,KAAK,cAAc,MAAM,gCAAgC,CAAC;AAWtE,qBAAa,qBAAsB,SAAQ,sBAAsB;IAEnD,OAAO,CAAC,cAAc;IADlC,IAAI,SAA6B;gBACb,cAAc,EAAE,cAAc,CAAC,MAAM;IAIzD,IAAI,IAAI,IAAI;IAMZ,OAAO,IAAI,IAAI;CAIhB"}
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Syringe, setDOMSize, inject, CanvasConfig, singleton, ContextService, isString, isBrowser, Module, AbstractRenderer } from '@antv/g';
1
+ import { Syringe, setDOMSize, inject, CanvasConfig, singleton, ContextService, isString, isBrowser, Module, AbstractRendererPlugin, AbstractRenderer } from '@antv/g';
2
2
  import { Plugin } from '@antv/g-plugin-device-renderer';
3
3
  import * as DeviceRenderer from '@antv/g-plugin-device-renderer';
4
4
  export { DeviceRenderer };
@@ -588,29 +588,35 @@ var containerModule = Module(function (register) {
588
588
  */
589
589
  register(WebGPUContextService);
590
590
  });
591
- var ContextRegisterPlugin = /*#__PURE__*/function () {
591
+ var ContextRegisterPlugin = /*#__PURE__*/function (_AbstractRendererPlug) {
592
+ _inheritsLoose(ContextRegisterPlugin, _AbstractRendererPlug);
593
+
592
594
  function ContextRegisterPlugin(rendererPlugin) {
593
- this.rendererPlugin = void 0;
594
- this.name = 'webgpu-context-register';
595
- this.rendererPlugin = rendererPlugin;
595
+ var _this;
596
+
597
+ _this = _AbstractRendererPlug.call(this) || this;
598
+ _this.rendererPlugin = void 0;
599
+ _this.name = 'webgpu-context-register';
600
+ _this.rendererPlugin = rendererPlugin;
601
+ return _this;
596
602
  }
597
603
 
598
604
  var _proto = ContextRegisterPlugin.prototype;
599
605
 
600
- _proto.init = function init(container) {
601
- container.register(DeviceRendererPlugin, {
606
+ _proto.init = function init() {
607
+ this.container.register(DeviceRendererPlugin, {
602
608
  useValue: this.rendererPlugin
603
609
  });
604
- container.load(containerModule, true);
610
+ this.container.load(containerModule, true);
605
611
  };
606
612
 
607
- _proto.destroy = function destroy(container) {
608
- container.unload(containerModule);
609
- container.remove(DeviceRendererPlugin);
613
+ _proto.destroy = function destroy() {
614
+ this.container.unload(containerModule);
615
+ this.container.remove(DeviceRendererPlugin);
610
616
  };
611
617
 
612
618
  return ContextRegisterPlugin;
613
- }();
619
+ }(AbstractRendererPlugin);
614
620
 
615
621
  var Renderer = /*#__PURE__*/function (_AbstractRenderer) {
616
622
  _inheritsLoose(Renderer, _AbstractRenderer);
package/dist/index.js CHANGED
@@ -609,29 +609,35 @@ var containerModule = g.Module(function (register) {
609
609
  */
610
610
  register(WebGPUContextService);
611
611
  });
612
- var ContextRegisterPlugin = /*#__PURE__*/function () {
612
+ var ContextRegisterPlugin = /*#__PURE__*/function (_AbstractRendererPlug) {
613
+ _inheritsLoose(ContextRegisterPlugin, _AbstractRendererPlug);
614
+
613
615
  function ContextRegisterPlugin(rendererPlugin) {
614
- this.rendererPlugin = void 0;
615
- this.name = 'webgpu-context-register';
616
- this.rendererPlugin = rendererPlugin;
616
+ var _this;
617
+
618
+ _this = _AbstractRendererPlug.call(this) || this;
619
+ _this.rendererPlugin = void 0;
620
+ _this.name = 'webgpu-context-register';
621
+ _this.rendererPlugin = rendererPlugin;
622
+ return _this;
617
623
  }
618
624
 
619
625
  var _proto = ContextRegisterPlugin.prototype;
620
626
 
621
- _proto.init = function init(container) {
622
- container.register(DeviceRendererPlugin, {
627
+ _proto.init = function init() {
628
+ this.container.register(DeviceRendererPlugin, {
623
629
  useValue: this.rendererPlugin
624
630
  });
625
- container.load(containerModule, true);
631
+ this.container.load(containerModule, true);
626
632
  };
627
633
 
628
- _proto.destroy = function destroy(container) {
629
- container.unload(containerModule);
630
- container.remove(DeviceRendererPlugin);
634
+ _proto.destroy = function destroy() {
635
+ this.container.unload(containerModule);
636
+ this.container.remove(DeviceRendererPlugin);
631
637
  };
632
638
 
633
639
  return ContextRegisterPlugin;
634
- }();
640
+ }(g.AbstractRendererPlugin);
635
641
 
636
642
  var Renderer = /*#__PURE__*/function (_AbstractRenderer) {
637
643
  _inheritsLoose(Renderer, _AbstractRenderer);