Commit 33823dbd authored by wildfirecode13's avatar wildfirecode13

1

parent 6c1b291e
...@@ -95,5 +95,5 @@ ...@@ -95,5 +95,5 @@
} }
}, },
"id": "p2demo", "id": "p2demo",
"code": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('tslib')) :\n\ttypeof define === 'function' && define.amd ? define(['tslib'], factory) :\n\t(global = global || self, global.p2demo = factory(global.tslib));\n}(this, (function (tslib) { 'use strict';\n\n\tfunction getTexture(uuid) {\n\t return engine.Texture.from(getAssetByUUID(uuid).uuid);\n\t}\n\tfunction getTextureByName(name) {\n\t return getTexture(engine.getAssetByName(name).uuid);\n\t}\n\tvar OptionState;\n\t(function (OptionState) {\n\t OptionState[OptionState[\"CHOICE_RIGHT\"] = 0] = \"CHOICE_RIGHT\";\n\t OptionState[OptionState[\"CHOICE_WRONG\"] = 1] = \"CHOICE_WRONG\";\n\t OptionState[OptionState[\"CHOICE_SELECT\"] = 2] = \"CHOICE_SELECT\";\n\t})(OptionState || (OptionState = {}));\n\tvar GameState;\n\t(function (GameState) {\n\t GameState[GameState[\"STATE_START\"] = 0] = \"STATE_START\";\n\t GameState[GameState[\"STATE_END\"] = 1] = \"STATE_END\";\n\t})(GameState || (GameState = {}));\n\t//# sourceMappingURL=utils.js.map\n\n\tvar GameView = (function (_super) {\n\t tslib.__extends(GameView, _super);\n\t function GameView() {\n\t var _this = _super.call(this) || this;\n\t _this.factor = 10;\n\t _this.isDebug = 0;\n\t _this.once(engine.Event.ADDED_TO_STAGE, _this.setup, _this);\n\t return _this;\n\t }\n\t GameView.prototype.createBall = function (r) {\n\t var shape = new engine.Shape();\n\t shape.beginFill(0xfff000);\n\t shape.drawCircle(0, 0, r);\n\t shape.endFill();\n\t return shape;\n\t };\n\t GameView.prototype.start = function () {\n\t console.log('start');\n\t this.stage.addEventListener(engine.MouseEvent.CLICK, this.onClick, this);\n\t };\n\t GameView.prototype.createBitmapByName = function (name) {\n\t var imgContainer = new engine.Sprite();\n\t var img = new engine.Sprite(getTextureByName(name));\n\t img.anchorX = img.width / 2;\n\t img.anchorY = img.height / 2;\n\t img.x = -img.width / 2;\n\t img.y = -img.height / 2;\n\t imgContainer.addChild(img);\n\t return imgContainer;\n\t };\n\t GameView.prototype.createBox = function (width, height) {\n\t var shape = new engine.Shape();\n\t shape.beginFill(0xfff000);\n\t shape.drawRect(-width / 2, -height / 2, width, height);\n\t shape.endFill();\n\t return shape;\n\t };\n\t GameView.prototype.onClick = function (e) {\n\t var _a = this, world = _a.world, factor = _a.factor;\n\t var positionX = (e.stageX / factor);\n\t var positionY = ((engine.gameStage.stage.height - e.stageY) / factor);\n\t var display;\n\t if (Math.random() > .5) {\n\t var boxShape = new p2.Box({ width: 306 / factor, height: 172 / factor });\n\t var boxBody = new p2.Body({ mass: 1, position: [positionX, positionY], angularVelocity: 1 });\n\t boxBody.addShape(boxShape);\n\t world.addBody(boxBody);\n\t if (this.isDebug) {\n\t display = this.createBox(boxShape.width * factor, boxShape.height * factor);\n\t }\n\t else {\n\t display = this.createBitmapByName(\"block\");\n\t }\n\t }\n\t else {\n\t var boxShape = new p2.Circle({ radius: 120 / 2 / factor });\n\t var boxBody = new p2.Body({ mass: 1, position: [positionX, positionY] });\n\t boxBody.addShape(boxShape);\n\t world.addBody(boxBody);\n\t if (this.isDebug) {\n\t display = this.createBall(boxShape.radius * factor);\n\t }\n\t else {\n\t display = this.createBitmapByName(\"ball\");\n\t }\n\t }\n\t boxBody.displays = [display];\n\t this.addChild(display);\n\t };\n\t GameView.prototype.setup = function () {\n\t console.log('setup');\n\t var world = new p2.World({\n\t gravity: [0, -20],\n\t });\n\t world.sleepMode = p2.World.BODY_SLEEPING;\n\t var planeShape = new p2.Plane();\n\t var planeBody = new p2.Body();\n\t planeBody.addShape(planeShape);\n\t planeBody.displays = [];\n\t world.addBody(planeBody);\n\t this.world = world;\n\t this.stage.addEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this);\n\t };\n\t GameView.prototype.onEnterFrame = function () {\n\t var _a = this, world = _a.world, factor = _a.factor;\n\t world.step(60 / 1000);\n\t var stageHeight = engine.gameStage.stage.height;\n\t var l = world.bodies.length;\n\t for (var i = 0; i < l; i++) {\n\t var boxBody = world.bodies[i];\n\t var box = boxBody.displays[0];\n\t if (box) {\n\t box.x = boxBody.position[0] * factor;\n\t box.y = stageHeight - boxBody.position[1] * factor;\n\t box.rotation = 360 - (boxBody.angle + boxBody.shapes[0].angle) * 180 / Math.PI;\n\t if (boxBody.sleepState == p2.Body.SLEEPING) {\n\t box.alpha = 0.5;\n\t }\n\t else {\n\t box.alpha = 1;\n\t }\n\t }\n\t }\n\t };\n\t return GameView;\n\t}(engine.Container));\n\n\tvar props = {};\n\tfunction prepareProps() {\n\t var metaProps = getProps();\n\t engine.injectProp(props, metaProps);\n\t}\n\tfunction injectProps(p) {\n\t engine.injectProp(props, p);\n\t}\n\t//# sourceMappingURL=props.js.map\n\n\tvar GameWrapper = (function (_super) {\n\t tslib.__extends(GameWrapper, _super);\n\t function GameWrapper() {\n\t var _this = _super.call(this) || this;\n\t engine.globalEvent.addEventListener('pictures-start', _this.start, _this);\n\t engine.globalEvent.addEventListener('pictures-stop', _this.stop, _this);\n\t var gameView = _this._gameView = new GameView();\n\t _this.addChild(gameView);\n\t return _this;\n\t }\n\t GameWrapper.prototype.start = function (event) {\n\t injectProps(event.data);\n\t this._gameView.start();\n\t };\n\t GameWrapper.prototype.stop = function (event) {\n\t };\n\t return GameWrapper;\n\t}(engine.Container));\n\t//# sourceMappingURL=GameWrapper.js.map\n\n\tfunction index (props) {\n\t prepareProps();\n\t injectProps(props);\n\t var instance = new GameWrapper();\n\t return instance;\n\t}\n\t//# sourceMappingURL=index.js.map\n\n\treturn index;\n\n})));\n" "code": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('tslib')) :\n\ttypeof define === 'function' && define.amd ? define(['tslib'], factory) :\n\t(global = global || self, global.p2demo = factory(global.tslib));\n}(this, (function (tslib) { 'use strict';\n\n\tfunction getTexture(uuid) {\n\t return engine.Texture.from(getAssetByUUID(uuid).uuid);\n\t}\n\tfunction getTextureByName(name) {\n\t return getTexture(engine.getAssetByName(name).uuid);\n\t}\n\tvar OptionState;\n\t(function (OptionState) {\n\t OptionState[OptionState[\"CHOICE_RIGHT\"] = 0] = \"CHOICE_RIGHT\";\n\t OptionState[OptionState[\"CHOICE_WRONG\"] = 1] = \"CHOICE_WRONG\";\n\t OptionState[OptionState[\"CHOICE_SELECT\"] = 2] = \"CHOICE_SELECT\";\n\t})(OptionState || (OptionState = {}));\n\tvar GameState;\n\t(function (GameState) {\n\t GameState[GameState[\"STATE_START\"] = 0] = \"STATE_START\";\n\t GameState[GameState[\"STATE_END\"] = 1] = \"STATE_END\";\n\t})(GameState || (GameState = {}));\n\t//# sourceMappingURL=utils.js.map\n\n\tvar GameView = (function (_super) {\n\t tslib.__extends(GameView, _super);\n\t function GameView() {\n\t var _this = _super.call(this) || this;\n\t _this.factor = 10;\n\t _this.isDebug = 0;\n\t _this.once(engine.Event.ADDED_TO_STAGE, _this.setup, _this);\n\t return _this;\n\t }\n\t GameView.prototype.createBall = function (r) {\n\t var shape = new engine.Shape();\n\t shape.beginFill(0xfff000);\n\t shape.drawCircle(0, 0, r);\n\t shape.endFill();\n\t return shape;\n\t };\n\t GameView.prototype.start = function () {\n\t console.log('start');\n\t this.stage.addEventListener(engine.MouseEvent.CLICK, this.onClick, this);\n\t };\n\t GameView.prototype.createBitmapByName = function (name) {\n\t var imgContainer = new engine.Sprite();\n\t var img = new engine.Sprite(getTextureByName(name));\n\t img.anchorX = img.width / 2;\n\t img.anchorY = img.height / 2;\n\t img.x = -img.width / 2;\n\t img.y = -img.height / 2;\n\t imgContainer.addChild(img);\n\t return imgContainer;\n\t };\n\t GameView.prototype.createBox = function (width, height) {\n\t var shape = new engine.Shape();\n\t shape.beginFill(0xfff000);\n\t shape.drawRect(-width / 2, -height / 2, width, height);\n\t shape.endFill();\n\t return shape;\n\t };\n\t GameView.prototype.onClick = function (e) {\n\t var _a = this, world = _a.world, factor = _a.factor;\n\t var positionX = (e.stageX / factor);\n\t var positionY = ((engine.gameStage.stage.height - e.stageY) / factor);\n\t var display;\n\t if (Math.random() > .5) {\n\t var boxShape = new p2.Box({ width: 306 / factor, height: 172 / factor });\n\t var boxBody = new p2.Body({ mass: 1, position: [positionX, positionY], angularVelocity: 1 });\n\t boxBody.addShape(boxShape);\n\t world.addBody(boxBody);\n\t if (this.isDebug) {\n\t display = this.createBox(boxShape.width * factor, boxShape.height * factor);\n\t }\n\t else {\n\t display = this.createBitmapByName(\"block\");\n\t }\n\t }\n\t else {\n\t var boxShape = new p2.Circle({ radius: 120 / 2 / factor });\n\t var boxBody = new p2.Body({ mass: 1, position: [positionX, positionY] });\n\t boxBody.addShape(boxShape);\n\t world.addBody(boxBody);\n\t if (this.isDebug) {\n\t display = this.createBall(boxShape.radius * factor);\n\t }\n\t else {\n\t display = this.createBitmapByName(\"ball\");\n\t }\n\t }\n\t boxBody.displays = [display];\n\t this.addChild(display);\n\t };\n\t GameView.prototype.setup = function () {\n\t console.log('setup');\n\t var world = new p2.World({\n\t gravity: [0, -10],\n\t });\n\t world.sleepMode = p2.World.BODY_SLEEPING;\n\t var planeShape = new p2.Plane();\n\t var planeBody = new p2.Body();\n\t planeBody.addShape(planeShape);\n\t planeBody.displays = [];\n\t world.addBody(planeBody);\n\t this.world = world;\n\t this.stage.addEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this);\n\t };\n\t GameView.prototype.onEnterFrame = function () {\n\t var _a = this, world = _a.world, factor = _a.factor;\n\t world.step(60 / 1000);\n\t var stageHeight = engine.gameStage.stage.height;\n\t var l = world.bodies.length;\n\t for (var i = 0; i < l; i++) {\n\t var boxBody = world.bodies[i];\n\t var box = boxBody.displays[0];\n\t if (box) {\n\t box.x = boxBody.position[0] * factor;\n\t box.y = stageHeight - boxBody.position[1] * factor;\n\t box.rotation = 360 - (boxBody.angle + boxBody.shapes[0].angle) * 180 / Math.PI;\n\t if (boxBody.sleepState == p2.Body.SLEEPING) {\n\t box.alpha = 0.5;\n\t }\n\t else {\n\t box.alpha = 1;\n\t }\n\t }\n\t }\n\t };\n\t return GameView;\n\t}(engine.Container));\n\n\tvar props = {};\n\tfunction prepareProps() {\n\t var metaProps = getProps();\n\t engine.injectProp(props, metaProps);\n\t}\n\tfunction injectProps(p) {\n\t engine.injectProp(props, p);\n\t}\n\t//# sourceMappingURL=props.js.map\n\n\tvar GameWrapper = (function (_super) {\n\t tslib.__extends(GameWrapper, _super);\n\t function GameWrapper() {\n\t var _this = _super.call(this) || this;\n\t engine.globalEvent.addEventListener('pictures-start', _this.start, _this);\n\t engine.globalEvent.addEventListener('pictures-stop', _this.stop, _this);\n\t var gameView = _this._gameView = new GameView();\n\t _this.addChild(gameView);\n\t return _this;\n\t }\n\t GameWrapper.prototype.start = function (event) {\n\t injectProps(event.data);\n\t this._gameView.start();\n\t };\n\t GameWrapper.prototype.stop = function (event) {\n\t };\n\t return GameWrapper;\n\t}(engine.Container));\n\t//# sourceMappingURL=GameWrapper.js.map\n\n\tfunction index (props) {\n\t prepareProps();\n\t injectProps(props);\n\t var instance = new GameWrapper();\n\t return instance;\n\t}\n\t//# sourceMappingURL=index.js.map\n\n\treturn index;\n\n})));\n"
} }
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
GameView.prototype.setup = function () { GameView.prototype.setup = function () {
console.log('setup'); console.log('setup');
var world = new p2.World({ var world = new p2.World({
gravity: [0, -20], gravity: [0, -10],
}); });
world.sleepMode = p2.World.BODY_SLEEPING; world.sleepMode = p2.World.BODY_SLEEPING;
var planeShape = new p2.Plane(); var planeShape = new p2.Plane();
......
{"version":3,"file":"index.js","sources":["src/custom/answer-game/src/game/utils.ts","src/custom/p2demo/src/game/GameView.ts","src/custom/p2demo/src/props.ts","src/custom/p2demo/src/game/GameWrapper.ts","src/custom/p2demo/src/index.ts"],"sourcesContent":["\n/**\n * Created by rockyl on 2020-01-21.\n */\n\nexport function getTexture(uuid) {\n\treturn engine.Texture.from(getAssetByUUID(uuid).uuid);\n}\n\nexport function getTextureByName(name) {\n\treturn getTexture(engine.getAssetByName(name).uuid);\n}\n\nexport function playSound(name) {\n\tengine.playSound(engine.getAssetByName(name).uuid, {keep: true});\n}\nexport function getStage(){\n\treturn engine.gameStage.stage;\n}\n\n\nexport enum OptionState{\n\tCHOICE_RIGHT,//选对\n\tCHOICE_WRONG,//选错\n\tCHOICE_SELECT,//选中\n}\n\nexport enum GameState{\n\tSTATE_START,//开始 选择中\n\tSTATE_END,//倒计时结束\n}","import { Tool } from \"../../../seabed-game/src/game/Tools\";\nimport { getTextureByName } from \"../../../answer-game/src/game/utils\";\n\nexport default class GameView extends engine.Container {\n world: p2.World;\n factor: number = 10;\n isDebug = 0;\n constructor() {\n super();\n this.once(engine.Event.ADDED_TO_STAGE, this.setup, this);\n }\n\n private createBall(r: number) {\n var shape = new engine.Shape();\n shape.beginFill(0xfff000);\n shape.drawCircle(0, 0, r);\n shape.endFill();\n return shape;\n }\n\n start() {\n console.log('start');\n this.stage.addEventListener(engine.MouseEvent.CLICK, this.onClick, this);\n }\n\n createBitmapByName(name) {\n const imgContainer = new engine.Sprite();\n const img = new engine.Sprite(getTextureByName(name));\n img.anchorX = img.width / 2;\n img.anchorY = img.height / 2;\n img.x = -img.width / 2;\n img.y = -img.height / 2;\n imgContainer.addChild(img);\n return imgContainer\n }\n\n private createBox(width: number, height: number): engine.Shape {\n var shape = new engine.Shape();\n shape.beginFill(0xfff000);\n shape.drawRect(-width / 2, -height / 2, width, height);\n shape.endFill();\n return shape;\n }\n\n onClick(e: engine.MouseEvent) {\n\n // const ball = this.createBitmapByName('ball');\n // this.addChild(ball);\n // engine.Tween.get(ball, { loop: true }).to({ rotation: 360 }, 1000);\n // return;\n\n // const box = this.createBitmapByName('block');\n // this.addChild(box);\n // engine.Tween.get(box, { loop: true }).to({ rotation: 360 }, 1000);\n // return;\n\n // const box = this.createBox(750, 100)\n // this.addChild(box);\n // box.x = 750/2;\n // box.y = 1624/2;\n // engine.Tween.get(box, { loop: true }).to({ rotation: 360 }, 1000)\n // return;\n\n // const ball = this.createBall(750/2);\n // this.addChild(ball);\n // ball.x = e.stageX;\n // ball.y = e.stageY;\n // return;\n const { world, factor } = this;\n var positionX: number = (e.stageX / factor);\n var positionY: number = ((engine.gameStage.stage.height - e.stageY) / factor);\n var display: engine.DisplayObject;\n\n if (Math.random() > .5) {\n //添加方形刚体\n var boxShape: p2.Shape = new p2.Box({ width: 306 / factor, height: 172 / factor });\n var boxBody: p2.Body = new p2.Body({ mass: 1, position: [positionX, positionY], angularVelocity: 1 });\n boxBody.addShape(boxShape);\n world.addBody(boxBody);\n\n if (this.isDebug) {\n display = this.createBox((<p2.Box>boxShape).width * factor, (<p2.Box>boxShape).height * factor);\n } else {\n display = this.createBitmapByName(\"block\");\n }\n }\n else {\n //添加圆形刚体\n var boxShape: p2.Shape = new p2.Circle({ radius: 120 / 2 / factor });\n var boxBody: p2.Body = new p2.Body({ mass: 1, position: [positionX, positionY] });\n boxBody.addShape(boxShape);\n world.addBody(boxBody);\n\n if (this.isDebug) {\n display = this.createBall((<p2.Circle>boxShape).radius * factor);\n } else {\n display = this.createBitmapByName(\"ball\");\n }\n\n // display.width = (<p2.Circle>boxShape).radius * 2 * factor;\n // display.height = (<p2.Circle>boxShape).radius * 2 * factor;\n\n }\n\n // display.anchorX = display.width / 2;\n // display.anchorY = display.height / 2;\n\n boxBody.displays = [display];\n\n this.addChild(display);\n\n }\n\n setup() {\n console.log('setup');\n\n //创建world\n var world: p2.World = new p2.World({\n gravity: [0, -20],\n });\n\n world.sleepMode = p2.World.BODY_SLEEPING;\n\n //创建plane\n var planeShape: p2.Plane = new p2.Plane();\n var planeBody: p2.Body = new p2.Body();\n planeBody.addShape(planeShape);\n planeBody.displays = [];\n world.addBody(planeBody);\n this.world = world;\n\n this.stage.addEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this)\n }\n\n onEnterFrame() {\n const { world, factor } = this;\n world.step(60 / 1000);\n const stageHeight = engine.gameStage.stage.height;\n var l = world.bodies.length;\n\n for (var i: number = 0; i < l; i++) {\n var boxBody: p2.Body = world.bodies[i];\n var box = boxBody.displays[0];\n if (box) {\n box.x = boxBody.position[0] * factor;\n box.y = stageHeight - boxBody.position[1] * factor;\n\n box.rotation = 360 - (boxBody.angle + boxBody.shapes[0].angle) * 180 / Math.PI;\n if (boxBody.sleepState == p2.Body.SLEEPING) {\n box.alpha = 0.5;\n }\n else {\n box.alpha = 1;\n }\n }\n }\n\n }\n\n}\n","/**\n * Created by rockyl on 2020-01-21.\n */\n\nexport let props: any = {};\n\nexport function prepareProps() {\n\tlet metaProps = getProps();\n\n\tengine.injectProp(props, metaProps);\n}\n\nexport function injectProps(p) {\n\tengine.injectProp(props, p);\n}\n","/**\n * Created by rockyl on 2020-01-09.\n */\n\nimport GameView from \"./GameView\";\nimport { injectProps } from \"../props\";\n\n\nexport class GameWrapper extends engine.Container {\n\t// private _status;\n\tprivate _gameView: GameView;\n\n\n\n\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tengine.globalEvent.addEventListener('pictures-start', this.start, this);\n\t\tengine.globalEvent.addEventListener('pictures-stop', this.stop, this);\n\n\t\t//创建实例\n\t\tlet gameView = this._gameView = new GameView();\n\t\tthis.addChild(gameView);\n\n\t}\n\n\tstart(event: engine.Event) {\n\t\tinjectProps(event.data);\n\n\t\t// this._status = 1;\n\n\t\tthis._gameView.start();\n\t}\n\tstop(event: engine.Event) {\n\t\t\n\t}\n}\n","/**\n * Created by rockyl on 2019-11-20.\n */\n\nimport {GameWrapper} from \"./game/GameWrapper\";\nimport {injectProps, prepareProps} from \"./props\";\n\nexport default function (props) {\n\tprepareProps();\n\tinjectProps(props);\n\n\tlet instance = new GameWrapper();\n\t\n\treturn instance;\n}\n"],"names":["__extends"],"mappings":";;;;;;UAKgB,UAAU,CAAC,IAAI;KAC9B,OAAO,MA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CAAC;SAGtE,IAAI,QAAQ,GAAG,KAAI,CAAC,SAAS,GAAG,IAAI,QAAQ,EAAE,CAAC;SAC/C,KAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;;MAExB;KAED,2BAAK,GAAL,UAAM,KAAmB;SACxB,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SAIxB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;MACvB;KACD,0BAAI,GAAJ,UAAK,KAAmB;MAEvB;KACF,kBAAC;CAAD,CAAC,CA9BgC,MAAM,CAAC,SAAS,GA8BhD;;;iBC/BwB,KAAK;KAC7B,YAAY,EAAE,CAAC;KACf,WAAW,CAAC,KAAK,CAAC,CAAC;KAEnB,IAAI,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;KAEjC,OAAO,QAAQ,CAAC;CACjB,CAAC;;;;;;;;;"} {"version":3,"file":"index.js","sources":["src/custom/answer-game/src/game/utils.ts","src/custom/p2demo/src/game/GameView.ts","src/custom/p2demo/src/props.ts","src/custom/p2demo/src/game/GameWrapper.ts","src/custom/p2demo/src/index.ts"],"sourcesContent":["\n/**\n * Created by rockyl on 2020-01-21.\n */\n\nexport function getTexture(uuid) {\n\treturn engine.Texture.from(getAssetByUUID(uuid).uuid);\n}\n\nexport function getTextureByName(name) {\n\treturn getTexture(engine.getAssetByName(name).uuid);\n}\n\nexport function playSound(name) {\n\tengine.playSound(engine.getAssetByName(name).uuid, {keep: true});\n}\nexport function getStage(){\n\treturn engine.gameStage.stage;\n}\n\n\nexport enum OptionState{\n\tCHOICE_RIGHT,//选对\n\tCHOICE_WRONG,//选错\n\tCHOICE_SELECT,//选中\n}\n\nexport enum GameState{\n\tSTATE_START,//开始 选择中\n\tSTATE_END,//倒计时结束\n}","import { Tool } from \"../../../seabed-game/src/game/Tools\";\nimport { getTextureByName } from \"../../../answer-game/src/game/utils\";\n\nexport default class GameView extends engine.Container {\n world: p2.World;\n factor: number = 10;\n isDebug = 0;\n constructor() {\n super();\n this.once(engine.Event.ADDED_TO_STAGE, this.setup, this);\n }\n\n private createBall(r: number) {\n var shape = new engine.Shape();\n shape.beginFill(0xfff000);\n shape.drawCircle(0, 0, r);\n shape.endFill();\n return shape;\n }\n\n start() {\n console.log('start');\n this.stage.addEventListener(engine.MouseEvent.CLICK, this.onClick, this);\n }\n\n createBitmapByName(name) {\n const imgContainer = new engine.Sprite();\n const img = new engine.Sprite(getTextureByName(name));\n img.anchorX = img.width / 2;\n img.anchorY = img.height / 2;\n img.x = -img.width / 2;\n img.y = -img.height / 2;\n imgContainer.addChild(img);\n return imgContainer\n }\n\n private createBox(width: number, height: number): engine.Shape {\n var shape = new engine.Shape();\n shape.beginFill(0xfff000);\n shape.drawRect(-width / 2, -height / 2, width, height);\n shape.endFill();\n return shape;\n }\n\n onClick(e: engine.MouseEvent) {\n\n // const ball = this.createBitmapByName('ball');\n // this.addChild(ball);\n // engine.Tween.get(ball, { loop: true }).to({ rotation: 360 }, 1000);\n // return;\n\n // const box = this.createBitmapByName('block');\n // this.addChild(box);\n // engine.Tween.get(box, { loop: true }).to({ rotation: 360 }, 1000);\n // return;\n\n // const box = this.createBox(750, 100)\n // this.addChild(box);\n // box.x = 750/2;\n // box.y = 1624/2;\n // engine.Tween.get(box, { loop: true }).to({ rotation: 360 }, 1000)\n // return;\n\n // const ball = this.createBall(750/2);\n // this.addChild(ball);\n // ball.x = e.stageX;\n // ball.y = e.stageY;\n // return;\n const { world, factor } = this;\n var positionX: number = (e.stageX / factor);\n var positionY: number = ((engine.gameStage.stage.height - e.stageY) / factor);\n var display: engine.DisplayObject;\n\n if (Math.random() > .5) {\n //添加方形刚体\n var boxShape: p2.Shape = new p2.Box({ width: 306 / factor, height: 172 / factor });\n var boxBody: p2.Body = new p2.Body({ mass: 1, position: [positionX, positionY], angularVelocity: 1 });\n boxBody.addShape(boxShape);\n world.addBody(boxBody);\n\n if (this.isDebug) {\n display = this.createBox((<p2.Box>boxShape).width * factor, (<p2.Box>boxShape).height * factor);\n } else {\n display = this.createBitmapByName(\"block\");\n }\n }\n else {\n //添加圆形刚体\n var boxShape: p2.Shape = new p2.Circle({ radius: 120 / 2 / factor });\n var boxBody: p2.Body = new p2.Body({ mass: 1, position: [positionX, positionY] });\n boxBody.addShape(boxShape);\n world.addBody(boxBody);\n\n if (this.isDebug) {\n display = this.createBall((<p2.Circle>boxShape).radius * factor);\n } else {\n display = this.createBitmapByName(\"ball\");\n }\n\n // display.width = (<p2.Circle>boxShape).radius * 2 * factor;\n // display.height = (<p2.Circle>boxShape).radius * 2 * factor;\n\n }\n\n // display.anchorX = display.width / 2;\n // display.anchorY = display.height / 2;\n\n boxBody.displays = [display];\n\n this.addChild(display);\n\n }\n\n setup() {\n console.log('setup');\n\n //创建world\n var world: p2.World = new p2.World({\n gravity: [0, -10],\n });\n\n world.sleepMode = p2.World.BODY_SLEEPING;\n\n //创建plane\n var planeShape: p2.Plane = new p2.Plane();\n var planeBody: p2.Body = new p2.Body();\n planeBody.addShape(planeShape);\n planeBody.displays = [];\n world.addBody(planeBody);\n this.world = world;\n\n this.stage.addEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this)\n }\n\n onEnterFrame() {\n const { world, factor } = this;\n world.step(60 / 1000);\n const stageHeight = engine.gameStage.stage.height;\n var l = world.bodies.length;\n\n for (var i: number = 0; i < l; i++) {\n var boxBody: p2.Body = world.bodies[i];\n var box = boxBody.displays[0];\n if (box) {\n box.x = boxBody.position[0] * factor;\n box.y = stageHeight - boxBody.position[1] * factor;\n\n box.rotation = 360 - (boxBody.angle + boxBody.shapes[0].angle) * 180 / Math.PI;\n if (boxBody.sleepState == p2.Body.SLEEPING) {\n box.alpha = 0.5;\n }\n else {\n box.alpha = 1;\n }\n }\n }\n\n }\n\n}\n","/**\n * Created by rockyl on 2020-01-21.\n */\n\nexport let props: any = {};\n\nexport function prepareProps() {\n\tlet metaProps = getProps();\n\n\tengine.injectProp(props, metaProps);\n}\n\nexport function injectProps(p) {\n\tengine.injectProp(props, p);\n}\n","/**\n * Created by rockyl on 2020-01-09.\n */\n\nimport GameView from \"./GameView\";\nimport { injectProps } from \"../props\";\n\n\nexport class GameWrapper extends engine.Container {\n\t// private _status;\n\tprivate _gameView: GameView;\n\n\n\n\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tengine.globalEvent.addEventListener('pictures-start', this.start, this);\n\t\tengine.globalEvent.addEventListener('pictures-stop', this.stop, this);\n\n\t\t//创建实例\n\t\tlet gameView = this._gameView = new GameView();\n\t\tthis.addChild(gameView);\n\n\t}\n\n\tstart(event: engine.Event) {\n\t\tinjectProps(event.data);\n\n\t\t// this._status = 1;\n\n\t\tthis._gameView.start();\n\t}\n\tstop(event: engine.Event) {\n\t\t\n\t}\n}\n","/**\n * Created by rockyl on 2019-11-20.\n */\n\nimport {GameWrapper} from \"./game/GameWrapper\";\nimport {injectProps, prepareProps} from \"./props\";\n\nexport default function (props) {\n\tprepareProps();\n\tinjectProps(props);\n\n\tlet instance = new GameWrapper();\n\t\n\treturn instance;\n}\n"],"names":["__extends"],"mappings":";;;;;;UAKgB,UAAU,CAAC,IAAI;KAC9B,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;CACvD,CAAC;UAEe,gBAAgB,CAAC,IAAI;KACpC,OAAO,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;CACrD,CAAC;CAUD,IAAY,WAIX;CAJD,WAAY,WAAW;KACtB,6DAAY,CAAA;KACZ,6DAAY,CAAA;KACZ,+DAAa,CAAA;CACd,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;CAED,IAAY,SAGX;CAHD,WAAY,SAAS;KACpB,uDAAW,CAAA;KACX,mDAAS,CAAA;CACV,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;;;CC3BD;KAAsCA,kCAAgB;KAIpD;SAAA,YACE,iBAAO,SA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Q,CAAC;CACjB,CAAC;;;;;;;;;"}
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment