New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

common-game

Package Overview
Dependencies
Maintainers
1
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

common-game - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

2

package.json
{
"name": "common-game",
"version": "0.0.8",
"version": "0.0.9",
"description": "",

@@ -5,0 +5,0 @@ "main": "common-game.js",

@@ -28,2 +28,38 @@ import * as PIXI from "@tbminiapp/pixi-miniprogram-engine";

}
fullClick(callback) {
this.destroyContainer("fullClick");
let clickContainer = this.getContainer("fullClick");
// 绘制个矩形,解决触摸事件
let rect1 = new PIXI.Graphics();
rect1.beginFill(0xff0000, 0);
rect1.drawRect(0, 0, this.namespace.width, this.namespace.height);
rect1.endFill();
clickContainer.addChild(rect1);
clickContainer.setChildIndex(rect1, 0);
clickContainer.interactive = true;
let startPoint;// = { x, y, baseX: this.playerSprite.x, baseY: this.playerSprite.y };
// 绑定事件
clickContainer.on('touchstart', (e) => {
let x = e.data.global.x, y = e.data.global.y;
startPoint = { x, y };
if (callback) { callback("start", e); }
})
.on('touchmove', (e) => {
let x = e.data.global.x, y = e.data.global.y;
let moveX = x - startPoint.x;
let moveY = y - startPoint.y;
e.moveV = { x: moveX, y: moveY };
if (callback) { callback("move", e); }
})
.on('touchend', (e) => {
startPoint = null;
if (callback) { callback("end", e); }
})
.on('touchendoutside', (e) => {
startPoint = null;
if (callback) { callback("end", e); }
});
}
parseData(options) {

@@ -30,0 +66,0 @@ try {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc