@vnejs/plugins.canvas.layer.sg 0.1.1

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/const/const.js ADDED
@@ -0,0 +1 @@
1
+ export const LAYER = "sg";
@@ -0,0 +1,3 @@
1
+ export const SUBSCRIBE_EVENTS = {
2
+ UPDATE: "vne:layer_sg:update",
3
+ };
@@ -0,0 +1 @@
1
+ export const ZINDEX = 1500;
package/index.js ADDED
@@ -0,0 +1,13 @@
1
+ import { regPlugin } from "@vnejs/shared";
2
+
3
+ import * as constants from "./const/const";
4
+ import { SUBSCRIBE_EVENTS } from "./const/events";
5
+ import * as params from "./const/params";
6
+
7
+ import { LayerSgController } from "./modules/controller";
8
+ import { LayerSgImage } from "./modules/image";
9
+ import { LayerSgProps } from "./modules/props";
10
+ import { LayerSgSprite } from "./modules/sprite";
11
+ import { LayerSgView } from "./modules/view";
12
+
13
+ regPlugin("LAYER_SG", { constants, events: SUBSCRIBE_EVENTS, params }, [LayerSgController, LayerSgImage, LayerSgProps, LayerSgSprite, LayerSgView]);
@@ -0,0 +1,11 @@
1
+ import { ModuleLayerController } from "@vnejs/module.layer";
2
+
3
+ export class LayerSgController extends ModuleLayerController {
4
+ name = "layer.sg.controller";
5
+
6
+ updateEvent = this.EVENTS.LAYER_SG.UPDATE;
7
+
8
+ LAYER = this.CONST.LAYER_SG.LAYER;
9
+ ZINDEX = this.PARAMS.LAYER_SG.ZINDEX;
10
+ WITH_POINTER_EVENTS_NONE = true;
11
+ }
@@ -0,0 +1,8 @@
1
+ import { ModuleImage } from "@vnejs/module.layer";
2
+
3
+ export class LayerSgImage extends ModuleImage {
4
+ name = "layer.sg.image";
5
+
6
+ LAYER = this.CONST.LAYER_SG.LAYER;
7
+ HIDE_OLD_IMAGES_ON_SHOW = true;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { ModuleProps } from "@vnejs/module.layer";
2
+
3
+ export class LayerSgProps extends ModuleProps {
4
+ name = "layer.sg.props";
5
+
6
+ LAYER = this.CONST.LAYER_SG.LAYER;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { ModuleSprite } from "@vnejs/module.layer";
2
+
3
+ export class LayerSgSprite extends ModuleSprite {
4
+ name = "layer.sg.sprite";
5
+
6
+ LAYER = this.CONST.LAYER_SG.LAYER;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { ModuleLayerView } from "@vnejs/module.layer";
2
+
3
+ export class LayerSgView extends ModuleLayerView {
4
+ name = "layer.sg.view";
5
+
6
+ updateEvent = this.EVENTS.LAYER_SG.UPDATE;
7
+ }
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@vnejs/plugins.canvas.layer.sg",
3
+ "version": "0.1.1",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "test": "echo \"Error: no test specified\" && exit 1",
7
+ "publish:major:plugin": "npm run publish:major",
8
+ "publish:minor:plugin": "npm run publish:minor",
9
+ "publish:patch:plugin": "npm run publish:patch",
10
+ "publish:major": "npm version major && npm publish --access public",
11
+ "publish:minor": "npm version minor && npm publish --access public",
12
+ "publish:patch": "npm version patch && npm publish --access public"
13
+ },
14
+ "author": "",
15
+ "license": "ISC",
16
+ "description": ""
17
+ }