Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

phavuer

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phavuer - npm Package Compare versions

Comparing version 0.10.10 to 0.11.0

2

dist/phavuer.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("Vue")):"function"==typeof define&&define.amd?define(["Vue"],t):"object"==typeof exports?exports.Phavuer=t(require("Vue")):e.Phavuer=t(e.Vue)}(this,(e=>(()=>{"use strict";var t={744:(e,t)=>{t.Z=(e,t)=>{const i=e.__vccOpts||e;for(const[e,r]of t)i[e]=r;return i}},740:t=>{t.exports=e}},i={};function r(e){var n=i[e];if(void 0!==n)return n.exports;var o=i[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{Body:()=>D,Circle:()=>S,Container:()=>g,Image:()=>Y,InjectionKeys:()=>T,Light:()=>R,Line:()=>O,Rectangle:()=>b,RoundRectangle:()=>w,Scene:()=>p,Sprite:()=>C,StaticBody:()=>F,Text:()=>B,TilemapLayer:()=>P,Zone:()=>E,createPhavuerApp:()=>Z,initGameObject:()=>V,onPostUpdate:()=>Q,onPreUpdate:()=>J,refObj:()=>H,refScene:()=>q,refTo:()=>z,useGame:()=>L,useScene:()=>M});var e=r(740);const t=[{attr:"onPointerdown",emit:"pointerdown",eventIndex:3},{attr:"onPointermove",emit:"pointermove",eventIndex:3},{attr:"onPointerup",emit:"pointerup",eventIndex:3},{attr:"onPointerout",emit:"pointerout",eventIndex:1},{attr:"onPointerover",emit:"pointerover",eventIndex:3},{attr:"onWheel",emit:"wheel",eventIndex:4},{attr:"onDragstart",emit:"dragstart",drag:!0},{attr:"onDrag",emit:"drag",drag:!0},{attr:"onDragend",emit:"dragend",drag:!0},{attr:"onDragenter",emit:"dragenter",drag:!0},{attr:"onDragover",emit:"dragover",drag:!0},{attr:"onDragleave",emit:"dragleave",drag:!0},{attr:"onDrop",emit:"drop",drag:!0}],i=e=>{e.updateDisplayOrigin&&e.updateDisplayOrigin(),e.input?e.input.hitArea.setSize(e.width,e.height):e._events&&t.some((t=>t.emit in e._events))&&e.setInteractive()},o=["tween","tweens","timeline","style"],s={active:e=>t=>e.setActive(t),visible:e=>t=>e.setVisible(t),x:e=>t=>e.x=t,_x:e=>t=>e._x=t,y:e=>t=>e.y=t,_y:e=>t=>e._y=t,x1:e=>t=>e.geom.x1=t,y1:e=>t=>e.geom.y1=t,x2:e=>t=>e.geom.x2=t,y2:e=>t=>e.geom.y2=t,rotation:e=>t=>e.setRotation(t),origin:e=>t=>e.setOrigin(t,t),originX:e=>t=>e.setOrigin(t,e.originY),originY:e=>t=>e.setOrigin(e.originX,t),scale:e=>t=>e.setScale(t,t),scaleX:e=>t=>e.setScale(t,e.scaleY),scaleY:e=>t=>e.setScale(e.scaleX,t),width:e=>t=>{e.setSize(t,e.height),i(e)},height:e=>t=>{e.setSize(e.width,t),i(e)},radius:e=>t=>e.setRadius(t),displayWidth:e=>t=>e.setDisplaySize(t,e.displayHeight),displayHeight:e=>t=>e.setDisplaySize(e.displayWidth,t),displayOriginX:e=>t=>e.setDisplayOrigin(t,e.displayOriginY),displayOriginY:e=>t=>e.setDisplayOrigin(e.displayOriginX,t),dropZone:e=>t=>{t&&(e.input||e.setInteractive(),e.input.dropZone=!0)},flipX:e=>t=>e.setFlipX(t),flipY:e=>t=>e.setFlipY(t),depth:e=>t=>e.setDepth(t),alpha:e=>t=>e.setAlpha(t),blendMode:e=>t=>e.setBlendMode(t),pipeline:e=>t=>e.setPipeline(t),intensity:e=>t=>e.setIntensity(t),tint:e=>t=>e.setTint(t),text:e=>t=>e.setText(t),texture:e=>t=>e.setTexture(t,e.frame&&e.frame.name),frame:e=>t=>e.setFrame(t),color:e=>t=>e.setColor(t),fillColor:e=>t=>e.setFillStyle(t,e.fillAlpha),fillAlpha:e=>t=>e.setFillStyle(e.fillColor,t),lineWidth:e=>(t,i)=>{e.setLineWidth?e.setLineWidth(t,i):e.setStrokeStyle(...t?[t,e.strokeColor,e.strokeAlpha]:[])},strokeColor:e=>t=>e.setStrokeStyle(e.lineWidth,t,e.strokeAlpha),strokeAlpha:e=>t=>e.setStrokeStyle(e.lineWidth,e.strokeColor,t),style:e=>t=>e.setStyle(t),lineSpacing:e=>t=>e.setLineSpacing(t),padding:e=>t=>e.setPadding(t),collision:e=>t=>e.setCollision(t),collisionByProperty:e=>t=>e.setCollisionByProperty(t),enable:e=>t=>e.enable=t,immovable:e=>t=>e.setImmovable(t),moves:e=>t=>e.moves=t,bounceX:e=>t=>e.setBounceX(t),bounceY:e=>t=>e.setBounceY(t),drag:e=>t=>e.setDrag(t),dragX:e=>t=>e.setDragX(t),dragY:e=>t=>e.setDragY(t),gravityX:e=>t=>e.setGravityX(t),gravityY:e=>t=>e.setGravityY(t),frictionX:e=>t=>e.setFrictionX(t),frictionY:e=>t=>e.setFrictionY(t),velocityX:e=>t=>e.setVelocityX(t),velocityY:e=>t=>e.setVelocityY(t),maxVelocityX:e=>t=>e.setMaxVelocityX(t),maxVelocityY:e=>t=>e.setMaxVelocityY(t),accelerationX:e=>t=>e.setAccelerationX(t),accelerationY:e=>t=>e.setAccelerationY(t),offsetX:e=>t=>e.setOffset(t,e.offset.y),offsetY:e=>t=>e.setOffset(e.offset.x,t),tween:e=>t=>{e.tween&&e.tween.stop(),t&&(e.tween=e.scene.add.tween(Object.assign({targets:e},t)))},tweens:e=>t=>{e.tween&&e.tween.stop(),t&&(e.tween=e.scene.tweens.timeline({targets:e,tweens:t}))},timeline:e=>t=>{e.tween&&e.tween.stop(),t&&(e.tween=e.scene.tweens.timeline(Object.assign({targets:e},t)))}},l=(0,e.defineComponent)({emits:["init","create","update","preload"],props:{name:{type:String,required:!0},autoStart:{type:Boolean,default:!0}},setup(t,i){const r=(0,e.ref)(!1),n=[],o=[],s=class extends Phaser.Scene{init(e){i.emit("init",this,e)}create(e){r.value=!0,i.emit("create",this,e)}update(e,t){n.forEach((i=>i(e,t))),i.emit("update",this,e,t),o.forEach((i=>i(e,t)))}preload(){i.emit("preload",this)}},l=(0,e.inject)(T.Game).scene.add(t.name,s,t.autoStart);return l.events.on("shutdown",(()=>r.value=!1)),(0,e.provide)(T.Scene,l),(0,e.provide)(T.PreUpdateEvents,n),(0,e.provide)(T.PostUpdateEvents,o),{scene:l,show:r}}});var a=r(744);const p=(0,a.Z)(l,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[t.show?(0,e.renderSlot)(t.$slots,"default",{key:0}):(0,e.createCommentVNode)("v-if",!0)])}]]),d={active:{type:Boolean},visible:{type:Boolean},x:{type:Number},y:{type:Number},x1:{type:Number},y1:{type:Number},x2:{type:Number},y2:{type:Number},rotation:{type:Number},origin:{type:Number},originX:{type:Number},originY:{type:Number},scale:{type:Number},scaleX:{type:Number},scaleY:{type:Number},width:{type:Number},height:{type:Number},radius:{type:Number},displayWidth:{type:Number},displayHeight:{type:Number},displayOriginX:{type:Number},displayOriginY:{type:Number},dropZone:{type:Boolean},flipX:{type:Boolean},flipY:{type:Boolean},depth:{type:Number},alpha:{type:Number},blendMode:{type:[Number,String]},pipeline:{type:[String,Object]},intensity:{type:Number},tint:{type:Number},text:{type:[String,Number]},texture:{type:String},frame:{type:[Number,String]},color:{type:String},fillColor:{type:Number},fillAlpha:{type:Number},lineWidth:{type:Number},strokeColor:{type:Number},strokeAlpha:{type:Number},style:{type:Object},lineSpacing:{type:Number},padding:{type:[Number,Object]},collision:{type:[Number,Array]},collisionByProperty:{type:Object},enable:{type:Boolean},immovable:{type:Boolean},moves:{type:Boolean},bounceX:{type:Number},bounceY:{type:Number},drag:{type:Number},dragX:{type:Number},dragY:{type:Number},gravityX:{type:Number},gravityY:{type:Number},frictionX:{type:Number},frictionY:{type:Number},velocityX:{type:Number},velocityY:{type:Number},maxVelocityX:{type:Number},maxVelocityY:{type:Number},accelerationX:{type:Number},accelerationY:{type:Number},offsetX:{type:Number},offsetY:{type:Number},tween:{type:Object},tweens:{type:Array},timeline:{type:Object}},c=Object.entries(d),h=(...e)=>{const t=new Set(e);return Object.fromEntries(c.filter((([e])=>t.has(e))))},u=h("tween","tweens","timeline","visible","x","y","rotation","origin","originX","originY","displayOriginX","displayOriginY","scale","scaleX","scaleY","displayWidth","displayHeight","dropZone","depth","alpha","blendMode","pipeline"),m=["create",...t.map((e=>e.emit)),"update:x","update:y"],y=(0,e.defineComponent)({emits:[...m],props:{...u},setup(t,i){const r=(0,e.inject)(T.Scene),n=new Phaser.GameObjects.Container(r,t.x||0,t.y||0);return V(n,t,i),(0,e.provide)(T.Container,n),(0,e.provide)(T.GameObject,n),{object:n}}}),g=(0,a.Z)(y,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),f=(0,e.defineComponent)({emits:[...m],props:{...u,...h("width","height","fillColor","fillAlpha","lineWidth","strokeColor","strokeAlpha")},setup(t,i){const r=(0,e.inject)(T.Scene),n=new Phaser.GameObjects.Rectangle(r,t.x||0,t.y||0,t.width,t.height);return V(n,t,i),(0,e.provide)(T.GameObject,n),{object:n}}}),b=(0,a.Z)(f,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),v=(0,e.defineComponent)({emits:[...m],props:{...u,...h("width","height","radius","fillColor","fillAlpha","lineWidth","strokeColor","strokeAlpha")},setup(t,i){const r=(0,e.inject)(T.Scene);class n extends Phaser.GameObjects.Graphics{constructor(e,t,i,r,n,o){super(e,t,i,r,n),this._originX=0,this._originY=0,this._width=r||0,this._height=n||0,this._radius=o||0,this._fillColor=null,this._fillAlpha=1,this._lineWidth=0,this._strokeColor=null,this._strokeAlpha=1,this.setRenderFlag(!0)}preUpdate(...e){this.renderFlag&&this.render()}setRenderFlag(e){this.renderFlag=e}render(){this.setRenderFlag(!1);const e=this.originX*-this.width,t=this.originY*-this.height,i="number"==typeof this.radius?Math.min(this.radius,this.width.half,this.height.half):this.radius;this.clear(),null!==this.fillColor&&(this.fillStyle(this.fillColor,this.fillAlpha),this.fillRoundedRect(e,t,this.width,this.height,i)),this.lineWidth&&null!==this.strokeColor&&(this.lineStyle(this.lineWidth,this.strokeColor,this.strokeAlpha),this.strokeRoundedRect(e,t,this.width,this.height,i))}get originX(){return this._originX}set originX(e){this._originX=e,this.displayOriginX=this.width*e,this.setRenderFlag(!0)}get originY(){return this._originY}set originY(e){this._originY=e,this.displayOriginY=this.height*e,this.setRenderFlag(!0)}setOrigin(e,t){return this.originX=e,this.originY=void 0===t?e:t,this}get radius(){return this._radius}set radius(e){this._radius=e,this.setRenderFlag(!0)}setRadius(e){return this.radius=e,this}get width(){return this._width}set width(e){this._width=e,this.fixSize(),this.setRenderFlag(!0)}get height(){return this._height}set height(e){this._height=e,this.fixSize(),this.setRenderFlag(!0)}setSize(e,t){return void 0!==e&&(this.width=e),void 0!==t&&(this.height=t),this}fixSize(){this.input&&this.input.hitArea.setSize(this.width,this.height),this.body&&this.body.setSize(this.width,this.height)}get displayWidth(){return Math.abs(this.scaleX*this.width)}set displayWidth(e){this.scaleX=e/this.width}get displayHeight(){return Math.abs(this.scaleY*this.height)}set displayHeight(e){this.scaleY=e/this.height}get fillColor(){return this._fillColor}set fillColor(e){this._fillColor=e,this.setRenderFlag(!0)}get fillAlpha(){return this._fillAlpha}set fillAlpha(e){this._fillAlpha=e,this.setRenderFlag(!0)}setFillStyle(e,t){return void 0!==e&&(this.fillColor=e),void 0!==t&&(this.fillAlpha=t),this}get lineWidth(){return this._lineWidth}set lineWidth(e){this._lineWidth=e,this.setRenderFlag(!0)}get strokeColor(){return this._strokeColor}set strokeColor(e){this._strokeColor=e,this.setRenderFlag(!0)}get strokeAlpha(){return this._strokeAlpha}set strokeAlpha(e){this._strokeAlpha=e,this.setRenderFlag(!0)}setStrokeStyle(e,t,i){return void 0!==e&&(this.lineWidth=e),void 0!==t&&(this.strokeColor=t),void 0!==i&&(this.strokeAlpha=i),this}}const o=new n(r,t.x||0,t.y||0,t.width,t.height,t.radius);return V(o,t,i),(0,e.provide)(T.GameObject,o),{object:o}}}),w=(0,a.Z)(v,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),x=(0,e.defineComponent)({emits:[...m],props:{...u,...h("radius","fillColor","fillAlpha","lineWidth","strokeColor","strokeAlpha")},setup(t,i){const r=(0,e.inject)(T.Scene),n=new Phaser.GameObjects.Arc(r,t.x||0,t.y||0,t.radius);return V(n,t,i),(0,e.provide)(T.GameObject,n),{object:n}}}),S=(0,a.Z)(x,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),j=(0,e.defineComponent)({emits:[...m],props:{...u,...h("x1","y1","x2","y2","lineWidth","strokeColor","strokeAlpha")},setup(t,i){const r=(0,e.inject)(T.Scene),n=new Phaser.GameObjects.Line(r,t.x||0,t.y||0,t.x1,t.y1,t.x2,t.y2);return V(n,t,i),(0,e.provide)(T.GameObject,n),{object:n}}}),O=(0,a.Z)(j,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),k=(0,e.defineComponent)({emits:[...m],props:{...u,...h("texture","frame","tint","flipX","flipY")},setup(t,i){const r=(0,e.inject)(T.Scene),n=new Phaser.GameObjects.Image(r,t.x||0,t.y||0,t.texture);return V(n,t,i),(0,e.provide)(T.GameObject,n),{object:n}}}),Y=(0,a.Z)(k,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),X=(0,e.defineComponent)({emits:[...m],props:{...u,...h("texture","frame","tint","flipX","flipY")},setup(t,i){const r=(0,e.inject)(T.Scene),n=new Phaser.GameObjects.Sprite(r,t.x||0,t.y||0,t.texture);return V(n,t,i),(0,e.provide)(T.GameObject,n),{object:n}}}),C=(0,a.Z)(X,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),N=(0,e.defineComponent)({emits:[...m],props:{...u,...h("text","style","lineSpacing","padding")},setup(t,i){const r=(0,e.inject)(T.Scene),n=new Phaser.GameObjects.Text(r,t.x||0,t.y||0,t.text);return V(n,t,i),{object:n}}}),B=(0,a.Z)(N,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div")}]]),_=(0,e.defineComponent)({emits:["create"],props:{...h("tween","tweens","timeline","visible","x","y","width","height","depth","pipeline","collision","collisionByProperty"),tilemap:{type:Object},layerIndex:{type:Number},tileset:{type:[Array,String]}},setup(t,i){const r=(0,e.inject)(T.Scene),n=new Phaser.Tilemaps.TilemapLayer(r,t.tilemap,t.layerIndex,t.tileset,t.x||0,t.y||0);return V(n,t,i),{object:n}}}),P=(0,a.Z)(_,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div")}]]),A=(0,e.defineComponent)({emits:["create"],props:{...h("tween","tweens","timeline","active","dropArea","x","y","width","height","origin","originX","originY","displayOriginX","displayOriginY")},setup(t,i){const r=(0,e.inject)(T.Scene),n=new Phaser.GameObjects.Zone(r,t.x||0,t.y||0,t.width,t.height);return V(n,t,i),{object:n}}}),E=(0,a.Z)(A,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div")}]]),G=(0,e.defineComponent)({emits:["create"],props:{...h("tween","tweens","timeline","visible","x","y","radius","color","intensity")},setup(e,t){const i=new Phaser.GameObjects.Light(e.x||0,e.y||0);return V(i,e,t),{object:i}}}),R=(0,a.Z)(G,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div")}]]),W=(0,e.defineComponent)({emits:[...m],props:{...h("width","height","offsetX","offsetY","enable")},setup(t,i){const r=(0,e.inject)(T.Scene),n=(0,e.inject)(T.GameObject),o=r.physics.add.existing(n,Phaser.Physics.Arcade.STATIC_BODY).body;V(o,t,i)}}),F=(0,a.Z)(W,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div")}]]),I=(0,e.defineComponent)({emits:["create"],props:{...h("width","height","offsetX","offsetY","enable","immovable","moves","bounceX","bounceY","drag","dragX","dragY","gravityX","gravityY","frictionX","frictionY","velocityX","velocityY","maxVelocityX","maxVelocityY","accelerationX","accelerationY")},setup(t,i){const r=(0,e.inject)(T.Scene),n=(0,e.inject)(T.GameObject),o=r.physics.add.existing(n,Phaser.Physics.Arcade.DYNAMIC_BODY).body;V(o,t,i)}}),D=(0,a.Z)(I,[["render",function(t,i,r,n,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div")}]]),Z=(e,t)=>{t.provide(T.Game,e),t.provide(T.Scene,null),t.provide(T.Container,null);const i=()=>{const e=window.document.createElement("div");return document.body.appendChild(e),t.mount(e)};return new Promise((t=>{if(e.isRunning)return t(i());e.events.addListener("ready",(()=>{t(i())}))}))},U=(e,t,i)=>{const r=`_${t}`,n=`update:${t}`;e[r]=e[t],Object.defineProperty(e,t,{get(){return this[r]},set(e){this[r]!==e&&i(n,e)}})},V=(i,r,n)=>{const l=(0,e.getCurrentInstance)(),a="bounce"in i,p=i.constructor===Phaser.GameObjects.Light,d=(0,e.inject)(T.Scene);if(p)d.lights.active||d.lights.enable(),d.lights.lights.push(i);else if(a);else{d.add.existing(i);const t=(0,e.inject)(T.Container);t&&t.add([i])}const c=l.vnode.props||[],h=(l.vnode.dynamicProps,Object.keys(c).filter((e=>e.startsWith("onUpdate:"))).map((e=>e.split(":")[1])).filter((e=>s[`_${e}`])));h.forEach((e=>U(i,e,n.emit)));const u=Object.entries(c).filter((([e])=>s[e])).map((([t,n])=>{const l=h.includes(t)?`_${t}`:t,a=s[l](i);return a(n),(0,e.watch)((()=>r[t]),a,{deep:o.includes(t)})})).filter(Boolean);c.onCreate&&n.emit("create",i);const m=t.filter((e=>e.attr in c));return m.length&&(i.input||i.setInteractive(),m.some((e=>e.drag))&&d.input.setDraggable(i),m.forEach((e=>{i.on(e.emit,((...t)=>{"eventIndex"in e&&(t[0].stopPropagation=t[e.eventIndex].stopPropagation),n.emit(e.emit,...t)}))}))),(0,e.onBeforeUnmount)((()=>{i.tween&&i.tween.stop(),u.forEach((e=>e()))})),p?(0,e.onBeforeUnmount)((()=>d.lights.removeLight(i))):(0,e.onBeforeUnmount)((()=>i.destroy())),i},T={Game:"phavuer_game",Scene:"phavuer_scene",GameObject:"phavuer_gameObject",Container:"phavuer_container",PreUpdateEvents:"phavuer_preUpdateEvents",PostUpdateEvents:"phavuer_postUpdateEvents"},$=t=>()=>{const i=(0,e.inject)(t);if(!i)throw new Error(`${t.description} is not provided`);return i},L=$(T.Game),M=$(T.Scene),z=(t,i)=>(0,e.customRef)(((e,r)=>({get:()=>(e(),t),set(e){t&&e||(t=e?e[i]:null,r())}}))),H=e=>z(e,"object"),q=e=>z(e,"scene"),K=t=>i=>{const r=(0,e.inject)(t);r.push(i),(0,e.onBeforeUnmount)((()=>{const e=r.findIndex((e=>e===i));r.splice(e,1)}))},J=K(T.PreUpdateEvents),Q=K(T.PostUpdateEvents)})(),n})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("Vue")):"function"==typeof define&&define.amd?define(["Vue"],t):"object"==typeof exports?exports.Phavuer=t(require("Vue")):e.Phavuer=t(e.Vue)}(this,(e=>(()=>{"use strict";var t={744:(e,t)=>{t.Z=(e,t)=>{const i=e.__vccOpts||e;for(const[e,n]of t)i[e]=n;return i}},740:t=>{t.exports=e}},i={};function n(e){var r=i[e];if(void 0!==r)return r.exports;var o=i[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{n.r(r),n.d(r,{Body:()=>Z,Circle:()=>S,Container:()=>g,Image:()=>Y,InjectionKeys:()=>$,Light:()=>W,Line:()=>O,Rectangle:()=>b,RoundRectangle:()=>w,Scene:()=>p,Sprite:()=>N,StaticBody:()=>I,Text:()=>_,TilemapLayer:()=>P,Zone:()=>G,createPhavuerApp:()=>U,initGameObject:()=>T,onPostUpdate:()=>ee,onPreUpdate:()=>Q,refObj:()=>q,refScene:()=>K,refTo:()=>H,useGame:()=>M,useScene:()=>z});var e=n(740);const t=[{attr:"onPointerdown",emit:"pointerdown",eventIndex:3},{attr:"onPointermove",emit:"pointermove",eventIndex:3},{attr:"onPointerup",emit:"pointerup",eventIndex:3},{attr:"onPointerout",emit:"pointerout",eventIndex:1},{attr:"onPointerover",emit:"pointerover",eventIndex:3},{attr:"onWheel",emit:"wheel",eventIndex:4},{attr:"onDragstart",emit:"dragstart",drag:!0},{attr:"onDrag",emit:"drag",drag:!0},{attr:"onDragend",emit:"dragend",drag:!0},{attr:"onDragenter",emit:"dragenter",drag:!0},{attr:"onDragover",emit:"dragover",drag:!0},{attr:"onDragleave",emit:"dragleave",drag:!0},{attr:"onDrop",emit:"drop",drag:!0}],i=e=>{e.updateDisplayOrigin&&e.updateDisplayOrigin(),e.input?e.input.hitArea.setSize(e.width,e.height):e._events&&t.some((t=>t.emit in e._events))&&e.setInteractive()},o=["tween","tweens","timeline","style"],s={active:e=>t=>e.setActive(t),visible:e=>t=>e.setVisible(t),x:e=>t=>e.x=t,_x:e=>t=>e._x=t,y:e=>t=>e.y=t,_y:e=>t=>e._y=t,x1:e=>t=>e.geom.x1=t,y1:e=>t=>e.geom.y1=t,x2:e=>t=>e.geom.x2=t,y2:e=>t=>e.geom.y2=t,rotation:e=>t=>e.setRotation(t),origin:e=>t=>e.setOrigin(t,t),originX:e=>t=>e.setOrigin(t,e.originY),originY:e=>t=>e.setOrigin(e.originX,t),scale:e=>t=>e.setScale(t,t),scaleX:e=>t=>e.setScale(t,e.scaleY),scaleY:e=>t=>e.setScale(e.scaleX,t),width:e=>t=>{e.setSize(t,e.height),i(e)},height:e=>t=>{e.setSize(e.width,t),i(e)},radius:e=>t=>e.setRadius(t),displayWidth:e=>t=>e.setDisplaySize(t,e.displayHeight),displayHeight:e=>t=>e.setDisplaySize(e.displayWidth,t),displayOriginX:e=>t=>e.setDisplayOrigin(t,e.displayOriginY),displayOriginY:e=>t=>e.setDisplayOrigin(e.displayOriginX,t),dropZone:e=>t=>{t&&(e.input||e.setInteractive(),e.input.dropZone=!0)},flipX:e=>t=>e.setFlipX(t),flipY:e=>t=>e.setFlipY(t),depth:e=>t=>e.setDepth(t),alpha:e=>t=>e.setAlpha(t),blendMode:e=>t=>e.setBlendMode(t),pipeline:e=>t=>e.setPipeline(t),intensity:e=>t=>e.setIntensity(t),tint:e=>t=>e.setTint(t),text:e=>t=>e.setText(t),texture:e=>t=>e.setTexture(t,e.frame&&e.frame.name),frame:e=>t=>e.setFrame(t),color:e=>t=>e.setColor(t),fillColor:e=>t=>e.setFillStyle(t,e.fillAlpha),fillAlpha:e=>t=>e.setFillStyle(e.fillColor,t),lineWidth:e=>(t,i)=>{e.setLineWidth?e.setLineWidth(t,i):e.setStrokeStyle(...t?[t,e.strokeColor,e.strokeAlpha]:[])},strokeColor:e=>t=>e.setStrokeStyle(e.lineWidth,t,e.strokeAlpha),strokeAlpha:e=>t=>e.setStrokeStyle(e.lineWidth,e.strokeColor,t),style:e=>t=>e.setStyle(t),lineSpacing:e=>t=>e.setLineSpacing(t),padding:e=>t=>e.setPadding(t),collision:e=>t=>e.setCollision(t),collisionByProperty:e=>t=>e.setCollisionByProperty(t),play:e=>t=>t?e.play(t):e.stop(),enable:e=>t=>e.enable=t,immovable:e=>t=>e.setImmovable(t),moves:e=>t=>e.moves=t,bounceX:e=>t=>e.setBounceX(t),bounceY:e=>t=>e.setBounceY(t),drag:e=>t=>e.setDrag(t),dragX:e=>t=>e.setDragX(t),dragY:e=>t=>e.setDragY(t),gravityX:e=>t=>e.setGravityX(t),gravityY:e=>t=>e.setGravityY(t),frictionX:e=>t=>e.setFrictionX(t),frictionY:e=>t=>e.setFrictionY(t),velocityX:e=>t=>e.setVelocityX(t),velocityY:e=>t=>e.setVelocityY(t),maxVelocityX:e=>t=>e.setMaxVelocityX(t),maxVelocityY:e=>t=>e.setMaxVelocityY(t),accelerationX:e=>t=>e.setAccelerationX(t),accelerationY:e=>t=>e.setAccelerationY(t),offsetX:e=>t=>e.setOffset(t,e.offset.y),offsetY:e=>t=>e.setOffset(e.offset.x,t),tween:e=>t=>{e.tween&&e.tween.stop(),t&&(e.tween=e.scene.add.tween(Object.assign({targets:e},t)))},tweens:e=>t=>{e.tween&&e.tween.stop(),t&&(e.tween=e.scene.tweens.timeline({targets:e,tweens:t}))},timeline:e=>t=>{e.tween&&e.tween.stop(),t&&(e.tween=e.scene.tweens.timeline(Object.assign({targets:e},t)))}},a=(0,e.defineComponent)({emits:["init","create","update","preload"],props:{name:{type:String,required:!0},autoStart:{type:Boolean,default:!0}},setup(t,i){const n=(0,e.ref)(!1),r=[],o=[],s=class extends Phaser.Scene{init(e){i.emit("init",this,e)}create(e){n.value=!0,i.emit("create",this,e)}update(e,t){r.forEach((i=>i(e,t))),i.emit("update",this,e,t),o.forEach((i=>i(e,t)))}preload(){i.emit("preload",this)}},a=(0,e.inject)($.Game).scene.add(t.name,s,t.autoStart);return a.events.on("shutdown",(()=>n.value=!1)),(0,e.provide)($.Scene,a),(0,e.provide)($.PreUpdateEvents,r),(0,e.provide)($.PostUpdateEvents,o),{scene:a,show:n}}});var l=n(744);const p=(0,l.Z)(a,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[t.show?(0,e.renderSlot)(t.$slots,"default",{key:0}):(0,e.createCommentVNode)("v-if",!0)])}]]),d={active:{type:Boolean},visible:{type:Boolean},x:{type:Number},y:{type:Number},x1:{type:Number},y1:{type:Number},x2:{type:Number},y2:{type:Number},rotation:{type:Number},origin:{type:Number},originX:{type:Number},originY:{type:Number},scale:{type:Number},scaleX:{type:Number},scaleY:{type:Number},width:{type:Number},height:{type:Number},radius:{type:Number},displayWidth:{type:Number},displayHeight:{type:Number},displayOriginX:{type:Number},displayOriginY:{type:Number},dropZone:{type:Boolean},flipX:{type:Boolean},flipY:{type:Boolean},depth:{type:Number},alpha:{type:Number},blendMode:{type:[Number,String]},pipeline:{type:[String,Object]},intensity:{type:Number},tint:{type:Number},text:{type:[String,Number]},texture:{type:String},frame:{type:[Number,String]},color:{type:String},fillColor:{type:Number},fillAlpha:{type:Number},lineWidth:{type:Number},strokeColor:{type:Number},strokeAlpha:{type:Number},style:{type:Object},lineSpacing:{type:Number},padding:{type:[Number,Object]},collision:{type:[Number,Array]},collisionByProperty:{type:Object},enable:{type:Boolean},immovable:{type:Boolean},moves:{type:Boolean},bounceX:{type:Number},bounceY:{type:Number},drag:{type:Number},dragX:{type:Number},dragY:{type:Number},gravityX:{type:Number},gravityY:{type:Number},frictionX:{type:Number},frictionY:{type:Number},velocityX:{type:Number},velocityY:{type:Number},maxVelocityX:{type:Number},maxVelocityY:{type:Number},accelerationX:{type:Number},accelerationY:{type:Number},offsetX:{type:Number},offsetY:{type:Number},tween:{type:Object},tweens:{type:Array},timeline:{type:Object}},c=Object.entries(d),h=(...e)=>{const t=new Set(e);return Object.fromEntries(c.filter((([e])=>t.has(e))))},u=h("tween","tweens","timeline","visible","x","y","rotation","origin","originX","originY","displayOriginX","displayOriginY","scale","scaleX","scaleY","displayWidth","displayHeight","dropZone","depth","alpha","blendMode","pipeline"),m=["create",...t.map((e=>e.emit)),"update:x","update:y"],y=(0,e.defineComponent)({emits:[...m],props:{...u},setup(t,i){const n=(0,e.inject)($.Scene),r=new Phaser.GameObjects.Container(n,t.x||0,t.y||0);return T(r,t,i),(0,e.provide)($.Container,r),(0,e.provide)($.GameObject,r),{object:r}}}),g=(0,l.Z)(y,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),f=(0,e.defineComponent)({emits:[...m],props:{...u,...h("width","height","fillColor","fillAlpha","lineWidth","strokeColor","strokeAlpha")},setup(t,i){const n=(0,e.inject)($.Scene),r=new Phaser.GameObjects.Rectangle(n,t.x||0,t.y||0,t.width,t.height);return T(r,t,i),(0,e.provide)($.GameObject,r),{object:r}}}),b=(0,l.Z)(f,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),v=(0,e.defineComponent)({emits:[...m],props:{...u,...h("width","height","radius","fillColor","fillAlpha","lineWidth","strokeColor","strokeAlpha")},setup(t,i){const n=(0,e.inject)($.Scene);class r extends Phaser.GameObjects.Graphics{constructor(e,t,i,n,r,o){super(e,t,i,n,r),this._originX=0,this._originY=0,this._width=n||0,this._height=r||0,this._radius=o||0,this._fillColor=null,this._fillAlpha=1,this._lineWidth=0,this._strokeColor=null,this._strokeAlpha=1,this.setRenderFlag(!0)}preUpdate(...e){this.renderFlag&&this.render()}setRenderFlag(e){this.renderFlag=e}render(){this.setRenderFlag(!1);const e=this.originX*-this.width,t=this.originY*-this.height,i="number"==typeof this.radius?Math.min(this.radius,this.width.half,this.height.half):this.radius;this.clear(),null!==this.fillColor&&(this.fillStyle(this.fillColor,this.fillAlpha),this.fillRoundedRect(e,t,this.width,this.height,i)),this.lineWidth&&null!==this.strokeColor&&(this.lineStyle(this.lineWidth,this.strokeColor,this.strokeAlpha),this.strokeRoundedRect(e,t,this.width,this.height,i))}get originX(){return this._originX}set originX(e){this._originX=e,this.displayOriginX=this.width*e,this.setRenderFlag(!0)}get originY(){return this._originY}set originY(e){this._originY=e,this.displayOriginY=this.height*e,this.setRenderFlag(!0)}setOrigin(e,t){return this.originX=e,this.originY=void 0===t?e:t,this}get radius(){return this._radius}set radius(e){this._radius=e,this.setRenderFlag(!0)}setRadius(e){return this.radius=e,this}get width(){return this._width}set width(e){this._width=e,this.fixSize(),this.setRenderFlag(!0)}get height(){return this._height}set height(e){this._height=e,this.fixSize(),this.setRenderFlag(!0)}setSize(e,t){return void 0!==e&&(this.width=e),void 0!==t&&(this.height=t),this}fixSize(){this.input&&this.input.hitArea.setSize(this.width,this.height),this.body&&this.body.setSize(this.width,this.height)}get displayWidth(){return Math.abs(this.scaleX*this.width)}set displayWidth(e){this.scaleX=e/this.width}get displayHeight(){return Math.abs(this.scaleY*this.height)}set displayHeight(e){this.scaleY=e/this.height}get fillColor(){return this._fillColor}set fillColor(e){this._fillColor=e,this.setRenderFlag(!0)}get fillAlpha(){return this._fillAlpha}set fillAlpha(e){this._fillAlpha=e,this.setRenderFlag(!0)}setFillStyle(e,t){return void 0!==e&&(this.fillColor=e),void 0!==t&&(this.fillAlpha=t),this}get lineWidth(){return this._lineWidth}set lineWidth(e){this._lineWidth=e,this.setRenderFlag(!0)}get strokeColor(){return this._strokeColor}set strokeColor(e){this._strokeColor=e,this.setRenderFlag(!0)}get strokeAlpha(){return this._strokeAlpha}set strokeAlpha(e){this._strokeAlpha=e,this.setRenderFlag(!0)}setStrokeStyle(e,t,i){return void 0!==e&&(this.lineWidth=e),void 0!==t&&(this.strokeColor=t),void 0!==i&&(this.strokeAlpha=i),this}}const o=new r(n,t.x||0,t.y||0,t.width,t.height,t.radius);return T(o,t,i),(0,e.provide)($.GameObject,o),{object:o}}}),w=(0,l.Z)(v,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),x=(0,e.defineComponent)({emits:[...m],props:{...u,...h("radius","fillColor","fillAlpha","lineWidth","strokeColor","strokeAlpha")},setup(t,i){const n=(0,e.inject)($.Scene),r=new Phaser.GameObjects.Arc(n,t.x||0,t.y||0,t.radius);return T(r,t,i),(0,e.provide)($.GameObject,r),{object:r}}}),S=(0,l.Z)(x,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),j=(0,e.defineComponent)({emits:[...m],props:{...u,...h("x1","y1","x2","y2","lineWidth","strokeColor","strokeAlpha")},setup(t,i){const n=(0,e.inject)($.Scene),r=new Phaser.GameObjects.Line(n,t.x||0,t.y||0,t.x1,t.y1,t.x2,t.y2);return T(r,t,i),(0,e.provide)($.GameObject,r),{object:r}}}),O=(0,l.Z)(j,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),k=(0,e.defineComponent)({emits:[...m],props:{...u,...h("texture","frame","tint","flipX","flipY")},setup(t,i){const n=(0,e.inject)($.Scene),r=new Phaser.GameObjects.Image(n,t.x||0,t.y||0,t.texture);return T(r,t,i),(0,e.provide)($.GameObject,r),{object:r}}}),Y=(0,l.Z)(k,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),C=[{attr:"onAnimationcomplete",emit:"animationcomplete"},{attr:"onAnimationrepeat",emit:"animationrepeat"},{attr:"onAnimationrestart",emit:"animationrestart"},{attr:"onAnimationstop",emit:"animationstop"},{attr:"animationupdate",emit:"animationupdate"}],X=(0,e.defineComponent)({emits:[...m,...C.map((e=>e.emit))],props:{...u,...h("texture","frame","tint","flipX","flipY"),play:{type:String}},setup(t,i){const n=(0,e.inject)($.Scene),r=new Phaser.GameObjects.Sprite(n,t.x||0,t.y||0,t.texture),o=(0,e.getCurrentInstance)().vnode.props||[];return C.filter((e=>e.attr in o)).forEach((e=>{r.on(e.emit,((...t)=>{i.emit(e.emit,...t)}))})),T(r,t,i),(0,e.provide)($.GameObject,r),{object:r}}}),N=(0,l.Z)(X,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]),B=(0,e.defineComponent)({emits:[...m],props:{...u,...h("text","style","lineSpacing","padding")},setup(t,i){const n=(0,e.inject)($.Scene),r=new Phaser.GameObjects.Text(n,t.x||0,t.y||0,t.text);return T(r,t,i),{object:r}}}),_=(0,l.Z)(B,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div")}]]),A=(0,e.defineComponent)({emits:["create"],props:{...h("tween","tweens","timeline","visible","x","y","width","height","depth","pipeline","collision","collisionByProperty"),tilemap:{type:Object},layerIndex:{type:Number},tileset:{type:[Array,String]}},setup(t,i){const n=(0,e.inject)($.Scene),r=new Phaser.Tilemaps.TilemapLayer(n,t.tilemap,t.layerIndex,t.tileset,t.x||0,t.y||0);return T(r,t,i),{object:r}}}),P=(0,l.Z)(A,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div")}]]),E=(0,e.defineComponent)({emits:["create"],props:{...h("tween","tweens","timeline","active","dropArea","x","y","width","height","origin","originX","originY","displayOriginX","displayOriginY")},setup(t,i){const n=(0,e.inject)($.Scene),r=new Phaser.GameObjects.Zone(n,t.x||0,t.y||0,t.width,t.height);return T(r,t,i),{object:r}}}),G=(0,l.Z)(E,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div")}]]),R=(0,e.defineComponent)({emits:["create"],props:{...h("tween","tweens","timeline","visible","x","y","radius","color","intensity")},setup(e,t){const i=new Phaser.GameObjects.Light(e.x||0,e.y||0);return T(i,e,t),{object:i}}}),W=(0,l.Z)(R,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div")}]]),F=(0,e.defineComponent)({emits:[...m],props:{...h("width","height","offsetX","offsetY","enable")},setup(t,i){const n=(0,e.inject)($.Scene),r=(0,e.inject)($.GameObject),o=n.physics.add.existing(r,Phaser.Physics.Arcade.STATIC_BODY).body;T(o,t,i)}}),I=(0,l.Z)(F,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div")}]]),D=(0,e.defineComponent)({emits:["create"],props:{...h("width","height","offsetX","offsetY","enable","immovable","moves","bounceX","bounceY","drag","dragX","dragY","gravityX","gravityY","frictionX","frictionY","velocityX","velocityY","maxVelocityX","maxVelocityY","accelerationX","accelerationY")},setup(t,i){const n=(0,e.inject)($.Scene),r=(0,e.inject)($.GameObject),o=n.physics.add.existing(r,Phaser.Physics.Arcade.DYNAMIC_BODY).body;T(o,t,i)}}),Z=(0,l.Z)(D,[["render",function(t,i,n,r,o,s){return(0,e.openBlock)(),(0,e.createElementBlock)("div")}]]),U=(e,t)=>{t.provide($.Game,e),t.provide($.Scene,null),t.provide($.Container,null);const i=()=>{const e=window.document.createElement("div");return document.body.appendChild(e),t.mount(e)};return new Promise((t=>{if(e.isRunning)return t(i());e.events.addListener("ready",(()=>{t(i())}))}))},V=(e,t,i)=>{const n=`_${t}`,r=`update:${t}`;e[n]=e[t],Object.defineProperty(e,t,{get(){return this[n]},set(e){this[n]!==e&&i(r,e)}})},T=(i,n,r)=>{const a=(0,e.getCurrentInstance)(),l="bounce"in i,p=i.constructor===Phaser.GameObjects.Light,d=(0,e.inject)($.Scene);if(p)d.lights.active||d.lights.enable(),d.lights.lights.push(i);else if(l);else{d.add.existing(i);const t=(0,e.inject)($.Container);t&&t.add([i])}const c=a.vnode.props||[],h=(a.vnode.dynamicProps,Object.keys(c).filter((e=>e.startsWith("onUpdate:"))).map((e=>e.split(":")[1])).filter((e=>s[`_${e}`])));h.forEach((e=>V(i,e,r.emit)));const u=Object.entries(c).filter((([e])=>s[e])).map((([t,r])=>{const a=h.includes(t)?`_${t}`:t,l=s[a](i);return l(r),(0,e.watch)((()=>n[t]),l,{deep:o.includes(t)})})).filter(Boolean);c.onCreate&&r.emit("create",i);const m=t.filter((e=>e.attr in c));return m.length&&(i.input||i.setInteractive(),m.some((e=>e.drag))&&d.input.setDraggable(i),m.forEach((e=>{i.on(e.emit,((...t)=>{"eventIndex"in e&&(t[0].stopPropagation=t[e.eventIndex].stopPropagation),r.emit(e.emit,...t)}))}))),(0,e.onBeforeUnmount)((()=>{i.tween&&i.tween.stop(),u.forEach((e=>e()))})),p?(0,e.onBeforeUnmount)((()=>d.lights.removeLight(i))):(0,e.onBeforeUnmount)((()=>i.destroy())),i},$={Game:"phavuer_game",Scene:"phavuer_scene",GameObject:"phavuer_gameObject",Container:"phavuer_container",PreUpdateEvents:"phavuer_preUpdateEvents",PostUpdateEvents:"phavuer_postUpdateEvents"},L=t=>()=>{const i=(0,e.inject)(t);if(!i)throw new Error(`${t.description} is not provided`);return i},M=L($.Game),z=L($.Scene),H=(t,i)=>(0,e.customRef)(((e,n)=>({get:()=>(e(),t),set(e){t&&e||(t=e?e[i]:null,n())}}))),q=e=>H(e,"object"),K=e=>H(e,"scene"),J=t=>i=>{const n=(0,e.inject)(t);n.push(i),(0,e.onBeforeUnmount)((()=>{const e=n.findIndex((e=>e===i));n.splice(e,1)}))},Q=J($.PreUpdateEvents),ee=J($.PostUpdateEvents)})(),r})()));
{
"name": "phavuer",
"version": "0.10.10",
"version": "0.11.0",
"description": "Reactive template engine based on Vue 3 for Phaser 3",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -92,2 +92,3 @@ export const GAME_OBJECT_EVENTS = [

collisionByProperty: object => v => object.setCollisionByProperty(v),
play: object => v => v ? object.play(v) : object.stop(),
// Body

@@ -94,0 +95,0 @@ enable: body => v => body.enable = v,

@@ -124,3 +124,10 @@ import * as Phaser from 'phaser'

flipY?: boolean
}, {}, {}, {}, {}, {}, {}, GameObjectEmits>
play?: string
}, {}, {}, {}, {}, {}, {}, GameObjectEmits & {
animationcomplete: (animation: Phaser.Animations.Animation, frame: Phaser.Animations.AnimationFrame, gameObject: Phaser.GameObjects.Sprite, frameKey: string) => void
animationrepeat: (animation: Phaser.Animations.Animation, frame: Phaser.Animations.AnimationFrame, gameObject: Phaser.GameObjects.Sprite, frameKey: string) => void
animationrestart: (animation: Phaser.Animations.Animation, frame: Phaser.Animations.AnimationFrame, gameObject: Phaser.GameObjects.Sprite, frameKey: string) => void
animationstop: (animation: Phaser.Animations.Animation, frame: Phaser.Animations.AnimationFrame, gameObject: Phaser.GameObjects.Sprite, frameKey: string) => void
animationcomplete: (animation: Phaser.Animations.Animation, frame: Phaser.Animations.AnimationFrame, gameObject: Phaser.GameObjects.Sprite, frameKey: string) => void
}>
export const Text: DefineComponent<Phavuer.GameObjectProps & {

@@ -127,0 +134,0 @@ text?: string

Sorry, the diff of this file is not supported yet

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