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.36 to 0.0.37

libs/greensock-js/docs.html

19

game.js
import PIXIUtils from './pixiUtils.js';
import Utils from './utils';
import TWEEN from './tween';
import Quadtree from './libs/quadtree';//四叉树
import { TweenMax } from './libs/greensock-js/src/esm/TweenMax';//补间动画

@@ -27,2 +29,19 @@ export default class Game {

// 四叉树用法
quadTreeFun() {
// 1.定义区域范围
this._tree = new Quadtree({ x: 0, y: 0, width: this.width, height: this.height });
// 2.四叉树清理
this._tree.clear();
// 3.新增 obj对象需要:x y width height属性
this._tree.insert(obj);
// 4.查找指定范围的对象,返回数组 rect: {x,y,width,height}
this._tree.retrieve(rect);
}
// 补间动画用法
tweenMaxFun() {
TweenMax.to(target, 0.1, { x: p.x, y: p.y })
}
renderPlayer() {

@@ -29,0 +48,0 @@ let imgObj = Object.assign({

2

package.json
{
"name": "common-game",
"version": "0.0.36",
"version": "0.0.37",
"description": "",

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

@@ -0,2 +1,7 @@

import Quadtree from './libs/quadtree';//四叉树
import { TweenMax } from './libs/greensock-js/src/esm/TweenMax';//补间动画
export default {
Quadtree,
TweenMax,
audioFun: function (audioSrc, audioGlobalName) {

@@ -3,0 +8,0 @@ if (!audioSrc) { return false; }

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