This commit is contained in:
mileswa1q2 authored and GitHub committed 2023-11-23 20:37:33 +00:00
1 parent 1cf1d1988e
commit 40fdf2a04e
714 files changed
+3 -3

No files matched your search

@@ -0,0 +1,2 @@
var gdjs;(function(o){const r=s=>s===void 0?100:s<=0?1:s;class h extends o.RuntimeObject{constructor(t,e){super(t,e);this._z=0;this._flippedX=!1;this._flippedY=!1;this._flippedZ=!1;this._rotationX=0;this._rotationY=0;this._width=this._originalWidth=r(e.content.width),this._height=this._originalHeight=r(e.content.height),this._depth=this._originalDepth=r(e.content.depth)}getRendererObject(){return null}get3DRendererObject(){return this.getRenderer().get3DRendererObject()}updateFromObjectData(t,e){return this._setOriginalWidth(r(e.content.width)),this._setOriginalHeight(r(e.content.height)),this._setOriginalDepth(r(e.content.depth)),!0}extraInitializationFromInitialInstance(t){t.customSize&&(this.setWidth(t.width),this.setHeight(t.height)),t.depth!==void 0&&this.setDepth(t.depth)}setX(t){super.setX(t),this.getRenderer().updatePosition()}setY(t){super.setY(t),this.getRenderer().updatePosition()}setZ(t){t!==this._z&&(this._z=t,this.getRenderer().updatePosition())}getZ(){return this._z}getDrawableZ(){return this.getZ()}getCenterZ(){return this.getDepth()/2}getCenterZInScene(){return this.getDrawableZ()+this.getCenterZ()}setCenterZInScene(t){this.setZ(t+this._z-(this.getDrawableZ()+this.getCenterZ()))}setAngle(t){super.setAngle(t),this.getRenderer().updateRotation()}setRotationX(t){this._rotationX=t,this.getRenderer().updateRotation()}setRotationY(t){this._rotationY=t,this.getRenderer().updateRotation()}getRotationX(){return this._rotationX}getRotationY(){return this._rotationY}turnAroundX(t){const e=o.RuntimeObject3D._temporaryVector;e.set(1,0,0);const i=this.getRenderer().get3DRendererObject();i.rotateOnWorldAxis(e,o.toRad(t)),this._rotationX=o.toDegrees(i.rotation.x),this._rotationY=o.toDegrees(i.rotation.y),this.setAngle(o.toDegrees(i.rotation.z))}turnAroundY(t){const e=o.RuntimeObject3D._temporaryVector;e.set(0,1,0);const i=this.getRenderer().get3DRendererObject();i.rotateOnWorldAxis(e,o.toRad(t)),this._rotationX=o.toDegrees(i.rotation.x),this._rotationY=o.toDegrees(i.rotation.y),this.setAngle(o.toDegrees(i.rotation.z))}turnAroundZ(t){const e=o.RuntimeObject3D._temporaryVector;e.set(0,0,1);const i=this.getRenderer().get3DRendererObject();i.rotateOnWorldAxis(e,o.toRad(t)),this._rotationX=o.toDegrees(i.rotation.x),this._rotationY=o.toDegrees(i.rotation.y),this.setAngle(o.toDegrees(i.rotation.z))}getWidth(){return this._width}getHeight(){return this._height}getDepth(){return this._depth}setWidth(t){this._width!==t&&(this._width=t,this.getRenderer().updateSize(),this.invalidateHitboxes())}setHeight(t){this._height!==t&&(this._height=t,this.getRenderer().updateSize(),this.invalidateHitboxes())}setSize(t,e){this.setWidth(t),this.setHeight(e)}setDepth(t){this._depth!==t&&(this._depth=t,this.getRenderer().updateSize())}_getOriginalWidth(){return this._originalWidth}_getOriginalHeight(){return this._originalHeight}_getOriginalDepth(){return this._originalDepth}_setOriginalWidth(t){t<=0&&(t=1);const e=this._originalWidth;this._originalWidth=t,e===this._width&&this.setWidth(t)}_setOriginalHeight(t){t<=0&&(t=1);const e=this._originalHeight;this._originalHeight=t,e===this._height&&this.setHeight(t)}_setOriginalDepth(t){t<=0&&(t=1);const e=this._originalDepth;this._originalDepth=t,e===this._depth&&this.setDepth(t)}setScale(t){this.setScaleX(t),this.setScaleY(t),this.setScaleZ(t)}setScaleX(t){t<0&&(t=0),this.setWidth(this._originalWidth*t)}setScaleY(t){t<0&&(t=0),this.setHeight(this._originalHeight*t)}setScaleZ(t){t<0&&(t=0),this.setDepth(this._originalDepth*t)}getScale(){const t=this.getScaleX(),e=this.getScaleY(),i=this.getScaleZ();return t===e&&t===i?t:Math.pow(t*e*i,1/3)}getScaleX(){return Math.abs(this._width/this._originalWidth)}getScaleY(){return Math.abs(this._height/this._originalHeight)}getScaleZ(){return Math.abs(this._depth/this._originalDepth)}flipX(t){t!==this._flippedX&&(this._flippedX=t,this.getRenderer().updateSize())}flipY(t){t!==this._flippedY&&(this._flippedY=t,this.getRenderer().updateSize())}flipZ(t){t!==this._flippedZ&&(this._flippedZ=t,this.getRenderer().updateSize())}isFlippedX(){return this._flippedX}isFlippedY(){return this._flippedY}isFlippedZ(){return this._flippedZ}hide(t){super.hide(t),this.getRenderer().updateVisibility()}}h._temporaryVector=new THREE.Vector3,o.RuntimeObject3D=h})(gdjs||(gdjs={}));
//# sourceMappingURL=A_RuntimeObject3D.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(e){class o{constructor(t,i,s){this._object=t,this._threeObject3D=s,this._threeObject3D.rotation.order="ZYX",i.getLayer("").getRenderer().add3DRendererObject(this._threeObject3D)}get3DRendererObject(){return this._threeObject3D}updatePosition(){this._threeObject3D.position.set(this._object.x+this._object.getWidth()/2,this._object.y+this._object.getHeight()/2,this._object.getZ()+this._object.getDepth()/2)}updateRotation(){this._threeObject3D.rotation.set(e.toRad(this._object.getRotationX()),e.toRad(this._object.getRotationY()),e.toRad(this._object.angle))}updateSize(){const t=this._object;this._threeObject3D.scale.set(t.isFlippedX()?-t.getWidth():t.getWidth(),t.isFlippedY()?-t.getHeight():t.getHeight(),t.isFlippedZ()?-t.getDepth():t.getDepth()),this.updatePosition()}updateVisibility(){this._threeObject3D.visible=!this._object.isHidden()}}e.RuntimeObject3DRenderer=o})(gdjs||(gdjs={}));
//# sourceMappingURL=A_RuntimeObject3DRenderer.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(e){class a extends e.RuntimeBehavior{constructor(t,o,n){super(t,o,n);this.object=n}updateFromBehaviorData(t,o){return!0}onDeActivate(){}onDestroy(){}doStepPreEvents(t){}doStepPostEvents(t){}setZ(t){this.object.setZ(t)}getZ(){return this.object.getZ()}getCenterZInScene(){return this.object.getCenterZInScene()}setCenterZInScene(t){this.object.setCenterZInScene(t)}setRotationX(t){this.object.setRotationX(t)}setRotationY(t){this.object.setRotationY(t)}getRotationX(){return this.object.getRotationX()}getRotationY(){return this.object.getRotationY()}turnAroundX(t){this.object.turnAroundX(t)}turnAroundY(t){this.object.turnAroundY(t)}turnAroundZ(t){this.object.turnAroundZ(t)}getDepth(){return this.object.getDepth()}setDepth(t){this.object.setDepth(t)}setScaleZ(t){this.object.setScaleZ(t)}getScaleZ(){return this.object.getScaleZ()}flipZ(t){this.object.flipZ(t)}isFlippedZ(){return this.object.isFlippedZ()}}e.Base3DBehavior=a,e.registerBehavior("Scene3D::Base3DBehavior",e.Base3DBehavior)})(gdjs||(gdjs={}));
//# sourceMappingURL=Base3DBehavior.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(c){const i={front:0,back:1,left:2,right:3,top:4,bottom:5};class o extends c.RuntimeObject3D{constructor(t,e){super(t,e);this._materialType=c.Cube3DRuntimeObject.MaterialType.Basic;this._shouldUseTransparentTexture=e.content.enableTextureTransparency||!1,this._facesOrientation=e.content.facesOrientation||"Y",this._visibleFacesBitmask=0,e.content.frontFaceVisible&&(this._visibleFacesBitmask|=1<<i.front),e.content.backFaceVisible&&(this._visibleFacesBitmask|=1<<i.back),e.content.leftFaceVisible&&(this._visibleFacesBitmask|=1<<i.left),e.content.rightFaceVisible&&(this._visibleFacesBitmask|=1<<i.right),e.content.topFaceVisible&&(this._visibleFacesBitmask|=1<<i.top),e.content.bottomFaceVisible&&(this._visibleFacesBitmask|=1<<i.bottom),this._textureRepeatFacesBitmask=0,e.content.frontFaceResourceRepeat&&(this._textureRepeatFacesBitmask|=1<<i.front),e.content.backFaceResourceRepeat&&(this._textureRepeatFacesBitmask|=1<<i.back),e.content.leftFaceResourceRepeat&&(this._textureRepeatFacesBitmask|=1<<i.left),e.content.rightFaceResourceRepeat&&(this._textureRepeatFacesBitmask|=1<<i.right),e.content.topFaceResourceRepeat&&(this._textureRepeatFacesBitmask|=1<<i.top),e.content.bottomFaceResourceRepeat&&(this._textureRepeatFacesBitmask|=1<<i.bottom),this._backFaceUpThroughWhichAxisRotation=e.content.backFaceUpThroughWhichAxisRotation||"X",this._faceResourceNames=[e.content.frontFaceResourceName,e.content.backFaceResourceName,e.content.leftFaceResourceName,e.content.rightFaceResourceName,e.content.topFaceResourceName,e.content.bottomFaceResourceName],this._materialType=this._convertMaterialType(e.content.materialType),this._renderer=new c.Cube3DRuntimeObjectRenderer(this,t),this.onCreated()}setFaceVisibility(t,e){const s=i[t];s!==void 0&&e!==this.isFaceAtIndexVisible(s)&&(e?this._visibleFacesBitmask|=1<<s:this._visibleFacesBitmask&=~(1<<s),this._renderer.updateFace(s))}setRepeatTextureOnFace(t,e){const s=i[t];s!==void 0&&e!==this.shouldRepeatTextureOnFaceAtIndex(s)&&(e?this._textureRepeatFacesBitmask|=1<<s:this._textureRepeatFacesBitmask&=~(1<<s),this._renderer.updateFace(s))}isFaceVisible(t){const e=i[t];return e===void 0?!1:this.isFaceAtIndexVisible(e)}isFaceAtIndexVisible(t){return(this._visibleFacesBitmask&1<<t)!=0}shouldRepeatTextureOnFaceAtIndex(t){return(this._textureRepeatFacesBitmask&1<<t)!=0}setFaceResourceName(t,e){const s=i[t];s!==void 0&&this._faceResourceNames[s]!==e&&(this._faceResourceNames[s]=e,this._renderer.updateFace(s))}getFaceAtIndexResourceName(t){return this._faceResourceNames[t]}getRenderer(){return this._renderer}getBackFaceUpThroughWhichAxisRotation(){return this._backFaceUpThroughWhichAxisRotation}setBackFaceUpThroughWhichAxisRotation(t){this._backFaceUpThroughWhichAxisRotation=t,this._renderer.updateFace(i.back)}getFacesOrientation(){return this._facesOrientation}setFacesOrientation(t){this._facesOrientation=t,this._renderer.updateFace(i.left),this._renderer.updateFace(i.right),this._renderer.updateFace(i.top)}updateFromObjectData(t,e){return super.updateFromObjectData(t,e),t.content.frontFaceVisible!==e.content.frontFaceVisible&&this.setFaceVisibility("front",e.content.frontFaceVisible),t.content.backFaceVisible!==e.content.backFaceVisible&&this.setFaceVisibility("back",e.content.backFaceVisible),t.content.leftFaceVisible!==e.content.leftFaceVisible&&this.setFaceVisibility("left",e.content.leftFaceVisible),t.content.rightFaceVisible!==e.content.rightFaceVisible&&this.setFaceVisibility("right",e.content.rightFaceVisible),t.content.topFaceVisible!==e.content.topFaceVisible&&this.setFaceVisibility("top",e.content.topFaceVisible),t.content.bottomFaceVisible!==e.content.bottomFaceVisible&&this.setFaceVisibility("bottom",e.content.bottomFaceVisible),t.content.frontFaceResourceName!==e.content.frontFaceResourceName&&this.setFaceResourceName("front",e.content.frontFaceResourceName),t.content.backFaceResourceName!==e.content.backFaceResourceName&&this.setFaceResourceName("back",e.content.backFaceResourceName),t.content.leftFaceResourceName!==e.content.leftFaceResourceName&&this.setFaceResourceName("left",e.content.leftFaceResourceName),t.content.rightFaceResourceName!==e.content.rightFaceResourceName&&this.setFaceResourceName("right",e.content.rightFaceResourceName),t.content.topFaceResourceName!==e.content.topFaceResourceName&&this.setFaceResourceName("top",e.content.topFaceResourceName),t.content.bottomFaceResourceName!==e.content.bottomFaceResourceName&&this.setFaceResourceName("bottom",e.content.bottomFaceResourceName),t.content.frontFaceResourceRepeat!==e.content.frontFaceResourceRepeat&&this.setRepeatTextureOnFace("front",e.content.frontFaceResourceRepeat),t.content.backFaceResourceRepeat!==e.content.backFaceResourceRepeat&&this.setRepeatTextureOnFace("back",e.content.backFaceResourceRepeat),t.content.leftFaceResourceRepeat!==e.content.leftFaceResourceRepeat&&this.setRepeatTextureOnFace("left",e.content.leftFaceResourceRepeat),t.content.rightFaceResourceRepeat!==e.content.rightFLine truncated
//# sourceMappingURL=Cube3DRuntimeObject.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(M){const b={3:0,2:1,5:2,4:3,0:4,1:5},r={0:3,1:2,2:5,3:4,4:0,5:1},h={0:[0,0],1:[1,0],2:[0,1],3:[1,1]},_={0:[0,1],1:[0,0],2:[1,1],3:[1,0]};let g;const T=()=>(g||(g=new THREE.MeshBasicMaterial({transparent:!0,opacity:0,alphaTest:1})),g),n=(c,t)=>c.isFaceAtIndexVisible(t)?c.getInstanceContainer().getGame().getImageManager().getThreeMaterial(c.getFaceAtIndexResourceName(t),{useTransparentTexture:c.shouldUseTransparentTexture(),forceBasicMaterial:c._materialType===M.Cube3DRuntimeObject.MaterialType.Basic}):T();class f extends M.RuntimeObject3DRenderer{constructor(t,i){const l=new THREE.BoxGeometry(1,1,1),m=[n(t,r[0]),n(t,r[1]),n(t,r[2]),n(t,r[3]),n(t,r[4]),n(t,r[5])],x=new THREE.Mesh(l,m);super(t,i,x);this._boxMesh=x,this._cube3DRuntimeObject=t,this.updateSize(),this.updatePosition(),this.updateRotation()}updateFace(t){const i=b[t];i!==void 0&&(this._boxMesh.material[i]=n(this._cube3DRuntimeObject,t),this._cube3DRuntimeObject.isFaceAtIndexVisible(t)&&this.updateTextureUvMapping(t))}updateSize(){super.updateSize(),this.updateTextureUvMapping()}updateTextureUvMapping(t){const i=this._boxMesh.geometry.getAttribute("position"),l=this._boxMesh.geometry.getAttribute("uv"),m=t===void 0?0:b[t]*4,x=t===void 0?23:b[t]*4+3;for(let e=m;e<=x;e++){const R=Math.floor(e/4),o=this._boxMesh.material[R];if(!o||!o.map)continue;const u=this._cube3DRuntimeObject.shouldRepeatTextureOnFaceAtIndex(r[R]),d=this._cube3DRuntimeObject.getFacesOrientation()==="Y";let a,s;switch(R){case 0:u?d?(a=-(this._boxMesh.scale.z/o.map.source.data.width)*(i.getZ(e)-.5),s=-(this._boxMesh.scale.y/o.map.source.data.height)*(i.getY(e)+.5)):(a=-(this._boxMesh.scale.y/o.map.source.data.width)*(i.getY(e)-.5),s=this._boxMesh.scale.z/o.map.source.data.height*(i.getZ(e)-.5)):d?[a,s]=h[e%4]:[a,s]=_[e%4];break;case 1:u?d?(a=this._boxMesh.scale.z/o.map.source.data.width*(i.getZ(e)+.5),s=-(this._boxMesh.scale.y/o.map.source.data.height)*(i.getY(e)+.5)):(a=this._boxMesh.scale.y/o.map.source.data.width*(i.getY(e)+.5),s=this._boxMesh.scale.z/o.map.source.data.height*(i.getZ(e)-.5)):d?[a,s]=h[e%4]:([a,s]=_[e%4],a=-a,s=-s);break;case 2:u?(a=this._boxMesh.scale.x/o.map.source.data.width*(i.getX(e)+.5),s=this._boxMesh.scale.z/o.map.source.data.height*(i.getZ(e)-.5)):[a,s]=h[e%4];break;case 3:u?d?(a=this._boxMesh.scale.x/o.map.source.data.width*(i.getX(e)+.5),s=-(this._boxMesh.scale.z/o.map.source.data.height)*(i.getZ(e)+.5)):(a=-(this._boxMesh.scale.x/o.map.source.data.width)*(i.getX(e)-.5),s=this._boxMesh.scale.z/o.map.source.data.height*(i.getZ(e)-.5)):([a,s]=h[e%4],d||(a=-a,s=-s));break;case 4:u?(a=this._boxMesh.scale.x/o.map.source.data.width*(i.getX(e)+.5),s=-(this._boxMesh.scale.y/o.map.source.data.height)*(i.getY(e)+.5)):[a,s]=h[e%4];break;case 5:const p=this._cube3DRuntimeObject.getBackFaceUpThroughWhichAxisRotation()==="X";u?(a=(p?1:-1)*(this._boxMesh.scale.x/o.map.source.data.width)*(i.getX(e)+(p?1:-1)*.5),s=(p?1:-1)*(this._boxMesh.scale.y/o.map.source.data.height)*(i.getY(e)+(p?-1:1)*.5)):([a,s]=h[e%4],p&&(a=-a,s=-s));break;default:[a,s]=h[e%4]}l.setXY(e,a,s)}l.needsUpdate=!0}_updateMaterials(){for(let t=0;t<6;t++)this.updateFace(t)}}M.Cube3DRuntimeObjectRenderer=f})(gdjs||(gdjs={}));
//# sourceMappingURL=Cube3DRuntimeObjectPixiRenderer.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(i){i.PixiFiltersTools.registerFilterCreator("Scene3D::DirectionalLight",new class{makeFilter(o,r){return typeof THREE=="undefined"?new i.PixiFiltersTools.EmptyFilter:new class{constructor(){this._isEnabled=!1;this.top="Y-";this.elevation=45;this.rotation=0;this.light=new THREE.DirectionalLight,this.light.position.set(1,0,0),this.rotationObject=new THREE.Group,this.rotationObject.add(this.light),this.updateRotation()}isEnabled(t){return this._isEnabled}setEnabled(t,e){return this._isEnabled===e?!0:e?this.applyEffect(t):this.removeEffect(t)}applyEffect(t){const e=t.get3DRendererObject();return e?(e.add(this.rotationObject),this._isEnabled=!0,!0):!1}removeEffect(t){const e=t.get3DRendererObject();return e?(e.remove(this.rotationObject),this._isEnabled=!1,!0):!1}updatePreRender(t){}updateDoubleParameter(t,e){t==="intensity"?this.light.intensity=e:t==="elevation"?(this.elevation=e,this.updateRotation()):t==="rotation"&&(this.rotation=e,this.updateRotation())}updateStringParameter(t,e){t==="color"&&(this.light.color=new THREE.Color(i.PixiFiltersTools.rgbOrHexToHexNumber(e))),t==="top"&&(this.top=e,this.updateRotation())}updateBooleanParameter(t,e){}updateRotation(){this.top==="Z+"?(this.rotationObject.rotation.z=i.toRad(this.rotation),this.rotationObject.rotation.y=-i.toRad(this.elevation)):(this.rotationObject.rotation.y=i.toRad(this.rotation)-90,this.rotationObject.rotation.z=-i.toRad(this.elevation))}}}})})(gdjs||(gdjs={}));
//# sourceMappingURL=DirectionalLight.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(i){i.PixiFiltersTools.registerFilterCreator("Scene3D::HemisphereLight",new class{makeFilter(o,r){return typeof THREE=="undefined"?new i.PixiFiltersTools.EmptyFilter:new class{constructor(){this._isEnabled=!1;this.top="Y-";this.elevation=45;this.rotation=0;this.light=new THREE.HemisphereLight,this.light.position.set(1,0,0),this.rotationObject=new THREE.Group,this.rotationObject.add(this.light),this.updateRotation()}isEnabled(t){return this._isEnabled}setEnabled(t,e){return this._isEnabled===e?!0:e?this.applyEffect(t):this.removeEffect(t)}applyEffect(t){const e=t.get3DRendererObject();return e?(e.add(this.rotationObject),this._isEnabled=!0,!0):!1}removeEffect(t){const e=t.get3DRendererObject();return e?(e.remove(this.rotationObject),this._isEnabled=!1,!0):!1}updatePreRender(t){}updateDoubleParameter(t,e){t==="intensity"?this.light.intensity=e:t==="elevation"?(this.elevation=e,this.updateRotation()):t==="rotation"&&(this.rotation=e,this.updateRotation())}updateStringParameter(t,e){t==="skyColor"&&(this.light.color=new THREE.Color(i.PixiFiltersTools.rgbOrHexToHexNumber(e))),t==="groundColor"&&(this.light.groundColor=new THREE.Color(i.PixiFiltersTools.rgbOrHexToHexNumber(e))),t==="top"&&(this.top=e,this.updateRotation())}updateBooleanParameter(t,e){}updateRotation(){this.top==="Z+"?(this.rotationObject.rotation.z=i.toRad(this.rotation),this.rotationObject.rotation.y=-i.toRad(this.elevation)):(this.rotationObject.rotation.y=i.toRad(this.rotation)-90,this.rotationObject.rotation.z=-i.toRad(this.elevation))}}}})})(gdjs||(gdjs={}));
//# sourceMappingURL=HemisphereLight.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(n){const o=r=>{switch(r){case"ModelOrigin":return null;case"ObjectCenter":return[.5,.5,.5];case"BottomCenterZ":return[.5,.5,0];case"BottomCenterY":return[.5,1,.5];case"TopLeft":return[0,0,0];default:return null}};class s extends n.RuntimeObject3D{constructor(t,e){super(t,e);this._materialType=n.Model3DRuntimeObject.MaterialType.Basic;this._currentAnimationIndex=0;this._animationSpeedScale=1;this._animationPaused=!1;this._modelResourceName=e.content.modelResourceName,this._animations=e.content.animations,this._originPoint=o(e.content.originLocation),this._centerPoint=o(e.content.centerLocation),this._renderer=new n.Model3DRuntimeObjectRenderer(this,t),this._materialType=this._convertMaterialType(e.content.materialType),this._updateModel(e),this._animations.length>0&&this._renderer.playAnimation(this._animations[0].source,this._animations[0].loop),this.onCreated()}updateFromObjectData(t,e){return super.updateFromObjectData(t,e),(t.content.width!==e.content.width||t.content.height!==e.content.height||t.content.depth!==e.content.depth||t.content.rotationX!==e.content.rotationX||t.content.rotationY!==e.content.rotationY||t.content.rotationZ!==e.content.rotationZ||t.content.keepAspectRatio!==e.content.keepAspectRatio)&&this._updateModel(e),t.content.materialType!==e.content.materialType&&(this._materialType=this._convertMaterialType(e.content.materialType),this._updateModel(e)),t.content.originLocation!==e.content.originLocation&&(this._originPoint=o(e.content.originLocation)),t.content.centerLocation!==e.content.centerLocation&&(this._centerPoint=o(e.content.centerLocation)),!0}_updateModel(t){const e=t.content.rotationX||0,a=t.content.rotationY||0,m=t.content.rotationZ||0,i=t.content.keepAspectRatio;this._renderer._updateModel(e,a,m,this._getOriginalWidth(),this._getOriginalHeight(),this._getOriginalDepth(),i)}getRenderer(){return this._renderer}_convertMaterialType(t){return t==="KeepOriginal"?n.Model3DRuntimeObject.MaterialType.KeepOriginal:t==="StandardWithoutMetalness"?n.Model3DRuntimeObject.MaterialType.StandardWithoutMetalness:n.Model3DRuntimeObject.MaterialType.Basic}update(t){const e=this.getElapsedTime()/1e3;this._renderer.updateAnimation(e*this._animationSpeedScale)}getAnimationIndex(){return this._currentAnimationIndex}setAnimationIndex(t){if(t=t|0,t<this._animations.length&&this._currentAnimationIndex!==t&&t>=0){const e=this._animations[t];this._currentAnimationIndex=t,this._renderer.playAnimation(e.source,e.loop),this._animationPaused&&this._renderer.pauseAnimation()}}getAnimationName(){return this._currentAnimationIndex>=this._animations.length?"":this._animations[this._currentAnimationIndex].name}setAnimationName(t){if(!t)return;const e=this._animations.findIndex(a=>a.name===t);e>=0&&this.setAnimationIndex(e)}isCurrentAnimationName(t){return this.getAnimationName()===t}hasAnimationEnded(){return this._renderer.hasAnimationEnded()}isAnimationPaused(){return this._animationPaused}pauseAnimation(){this._animationPaused=!0,this._renderer.pauseAnimation()}resumeAnimation(){this._animationPaused=!1,this._renderer.resumeAnimation()}getAnimationSpeedScale(){return this._animationSpeedScale}setAnimationSpeedScale(t){this._animationSpeedScale=t}getAnimationElapsedTime(){return this._renderer.getAnimationElapsedTime()}setAnimationElapsedTime(t){this._renderer.setAnimationElapsedTime(t)}getAnimationDuration(){return this._renderer.getAnimationDuration(this._animations[this._currentAnimationIndex].source)}getCenterX(){const t=this._renderer.getCenterPoint();return this.getWidth()*t[0]}getCenterY(){const t=this._renderer.getCenterPoint();return this.getHeight()*t[1]}getCenterZ(){const t=this._renderer.getCenterPoint();return this.getDepth()*t[2]}getDrawableX(){const t=this._renderer.getOriginPoint();return this.getX()-this.getWidth()*t[0]}getDrawableY(){const t=this._renderer.getOriginPoint();return this.getY()-this.getHeight()*t[1]}getDrawableZ(){const t=this._renderer.getOriginPoint();return this.getZ()-this.getDepth()*t[2]}}n.Model3DRuntimeObject=s,function(t){let r;(function(i){i[i.Basic=0]="Basic",i[i.StandardWithoutMetalness=1]="StandardWithoutMetalness",i[i.KeepOriginal=2]="KeepOriginal"})(r=t.MaterialType||(t.MaterialType={}))}(s=n.Model3DRuntimeObject||(n.Model3DRuntimeObject={})),n.registerObject("Scene3D::Model3DObject",n.Model3DRuntimeObject)})(gdjs||(gdjs={}));
//# sourceMappingURL=Model3DRuntimeObject.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(o){const E=n=>{n.metalness&&(n.metalness=0)},M=n=>{const t=n;if(!!t.material)if(Array.isArray(t.material))for(let e=0;e<t.material.length;e++)E(t.material[e]);else E(t.material)},T=n=>n.traverse(M),p=n=>{const t=new THREE.MeshBasicMaterial;return n.color&&(t.color=n.color),n.map&&(t.map=n.map),t},f=n=>{const t=n;if(!!t.material)if(Array.isArray(t.material))for(let e=0;e<t.material.length;e++)t.material[e]=p(t.material[e]);else t.material=p(t.material)},D=n=>n.traverse(f);class O extends o.RuntimeObject3DRenderer{constructor(t,e){const a=e.getGame().getModel3DManager().getModel(t._modelResourceName),s=new THREE.Group,l=new THREE.Group;l.rotation.order="ZYX",l.add(s);super(t,e,l);this._model3DRuntimeObject=t,this._threeObject=s,this._originalModel=a,this._modelOriginPoint=[0,0,0],this.updateSize(),this.updatePosition(),this.updateRotation(),this._animationMixer=new THREE.AnimationMixer(s),this._action=null}updateAnimation(t){this._animationMixer.update(t)}updatePosition(){const t=this.getOriginPoint(),e=this.getCenterPoint();this.get3DRendererObject().position.set(this._object.getX()-this._object.getWidth()*(t[0]-e[0]),this._object.getY()-this._object.getHeight()*(t[1]-e[1]),this._object.getZ()-this._object.getDepth()*(t[2]-e[2]))}getOriginPoint(){return this._model3DRuntimeObject._originPoint||this._modelOriginPoint}getCenterPoint(){return this._model3DRuntimeObject._centerPoint||this._modelOriginPoint}_updateDefaultTransformation(t,e,a,s,l,_,u,r){t.rotation.set(o.toRad(e),o.toRad(a),o.toRad(s)),t.updateMatrixWorld(!0);const i=new THREE.Box3().setFromObject(t),m=i.max.x-i.min.x,c=i.max.y-i.min.y,d=i.max.z-i.min.z;this._modelOriginPoint[0]=-i.min.x/m,this._modelOriginPoint[1]=-i.min.y/c,this._modelOriginPoint[2]=-i.min.z/d,this._modelOriginPoint[1]=1-this._modelOriginPoint[1];const h=this._model3DRuntimeObject._centerPoint;h&&t.position.set(-(i.min.x+(i.max.x-i.min.x)*h[0]),-(i.min.y+(i.max.y-i.min.y)*(1-h[1])),-(i.min.z+(i.max.z-i.min.z)*h[2])),t.scale.set(1,1,1),t.rotation.set(o.toRad(e),o.toRad(a),o.toRad(s));const b=1/m,j=1/c,x=1/d,g=new THREE.Matrix4;if(g.makeScale(b,-j,x),t.updateMatrix(),t.applyMatrix4(g),r){const H=l/m,A=_/c,P=u/d,R=Math.min(H,A,P);this._object._setOriginalWidth(R*m),this._object._setOriginalHeight(R*c),this._object._setOriginalDepth(R*d)}}_updateModel(t,e,a,s,l,_,u){const r=new THREE.Group;r.rotation.order="ZYX";const i=THREE_ADDONS.SkeletonUtils.clone(this._originalModel.scene);r.add(i),this._replaceMaterials(r),this._updateDefaultTransformation(r,t,e,a,s,l,_,u),this.get3DRendererObject().remove(this._threeObject),this.get3DRendererObject().add(r),this._threeObject=r,this._animationMixer=new THREE.AnimationMixer(i);const m=this._model3DRuntimeObject.isAnimationPaused();this._model3DRuntimeObject.setAnimationIndex(this._model3DRuntimeObject.getAnimationIndex()),m&&this.pauseAnimation()}_replaceMaterials(t){this._model3DRuntimeObject._materialType===o.Model3DRuntimeObject.MaterialType.StandardWithoutMetalness?T(t):this._model3DRuntimeObject._materialType===o.Model3DRuntimeObject.MaterialType.Basic&&D(t)}getAnimationCount(){return this._originalModel.animations.length}getAnimationName(t){return this._originalModel.animations[t].name}hasAnimationEnded(){return this._action?!this._action.isRunning():!0}animationPaused(){if(!!this._action)return this._action.paused}pauseAnimation(){!this._action||(this._action.paused=!0)}resumeAnimation(){!this._action||(this._action.paused=!1)}playAnimation(t,e){this._animationMixer.stopAllAction();const a=THREE.AnimationClip.findByName(this._originalModel.animations,t);if(!a){console.error(`The GLB file: ${this._model3DRuntimeObject._modelResourceName} doesn't have any animation named: ${t}`);return}this._action=this._animationMixer.clipAction(a),this._action.setLoop(e?THREE.LoopRepeat:THREE.LoopOnce,Number.POSITIVE_INFINITY),this._action.clampWhenFinished=!0,this._action.play(),this._animationMixer.update(0)}getAnimationElapsedTime(){return this._action?this._action.time:0}setAnimationElapsedTime(t){this._action&&(this._action.time=t)}getAnimationDuration(t){const e=THREE.AnimationClip.findByName(this._originalModel.animations,t);return e?e.duration:0}}o.Model3DRuntimeObjectRenderer=O})(gdjs||(gdjs={}));
//# sourceMappingURL=Model3DRuntimeObject3DRenderer.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(l){let R;(function(m){const y=45;let d;(function(g){g.getCameraZ=(t,r,a)=>{const o=t.getLayer(r),e=o.getRenderer().getThreeCamera(),n=e?e.fov:y;return o.getCameraZ(n,a)},g.setCameraZ=(t,r,a,o)=>{const s=t.getLayer(a),n=s.getRenderer().getThreeCamera(),i=n?n.fov:y;s.setCameraZ(r,i,o)},g.getCameraRotationX=(t,r,a)=>{const e=t.getLayer(r).getRenderer().getThreeCamera();return e?l.toDegrees(e.rotation.x):0},g.setCameraRotationX=(t,r,a,o)=>{const n=t.getLayer(a).getRenderer().getThreeCamera();!n||(n.rotation.x=l.toRad(r))},g.getCameraRotationY=(t,r,a)=>{const e=t.getLayer(r).getRenderer().getThreeCamera();return e?l.toDegrees(e.rotation.y):0},g.setCameraRotationY=(t,r,a,o)=>{const n=t.getLayer(a).getRenderer().getThreeCamera();!n||(n.rotation.y=l.toRad(r))},g.turnCameraTowardObject=(t,r,a,o,s)=>{if(!r)return;const e=t.getLayer(a),i=e.getRenderer().getThreeCamera();!i||(s?i.up.set(0,1,0):i.up.set(0,0,1),i.lookAt(r.getCenterXInScene(),-r.getCenterYInScene(),r.getZ?r.getZ():0),e.setCameraRotation(l.toDegrees(-i.rotation.z)))},g.turnCameraTowardPosition=(t,r,a,o,s,e,n)=>{const i=t.getLayer(s),c=i.getRenderer().getThreeCamera();!c||(n?c.up.set(0,1,0):c.up.set(0,0,1),c.lookAt(r,-a,o),i.setCameraRotation(l.toDegrees(-c.rotation.z)))},g.getNearPlane=(t,r,a)=>{const e=t.getLayer(r).getRenderer().getThreeCamera();return e?e.near:0},g.setNearPlane=(t,r,a,o)=>{const e=t.getLayer(a).getRenderer(),n=e.getThreeCamera();!n||(n.near=Math.min(Math.max(r,1e-4),n.far),e.setThreeCameraDirty(!0))},g.getFarPlane=(t,r,a)=>{const e=t.getLayer(r).getRenderer().getThreeCamera();return e?e.far:0},g.setFarPlane=(t,r,a,o)=>{const e=t.getLayer(a).getRenderer(),n=e.getThreeCamera();!n||(n.far=Math.max(r,n.near),e.setThreeCameraDirty(!0))},g.getFov=(t,r,a)=>{const e=t.getLayer(r).getRenderer().getThreeCamera();return e?e.fov:45},g.setFov=(t,r,a,o)=>{const e=t.getLayer(a).getRenderer(),n=e.getThreeCamera();!n||(n.fov=Math.min(Math.max(r,0),180),e.setThreeCameraDirty(!0))}})(d=m.camera||(m.camera={}))})(R=l.scene3d||(l.scene3d={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=Scene3DTools.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(c){const t=class extends c.RuntimeBehavior{constructor(o,e,s){super(o,e,s);this._invalidDistances=!0;this._leftEdgeDistance=0;this._rightEdgeDistance=0;this._topEdgeDistance=0;this._bottomEdgeDistance=0;this._useLegacyBottomAndRightAnchors=!1;this._relativeToOriginalWindowSize=!!e.relativeToOriginalWindowSize,this._leftEdgeAnchor=e.leftEdgeAnchor,this._rightEdgeAnchor=e.rightEdgeAnchor,this._topEdgeAnchor=e.topEdgeAnchor,this._bottomEdgeAnchor=e.bottomEdgeAnchor,this._useLegacyBottomAndRightAnchors=e.useLegacyBottomAndRightAnchors===void 0?!0:e.useLegacyBottomAndRightAnchors}updateFromBehaviorData(o,e){return o.leftEdgeAnchor!==e.leftEdgeAnchor&&(this._leftEdgeAnchor=e.leftEdgeAnchor),o.rightEdgeAnchor!==e.rightEdgeAnchor&&(this._rightEdgeAnchor=e.rightEdgeAnchor),o.topEdgeAnchor!==e.topEdgeAnchor&&(this._topEdgeAnchor=e.topEdgeAnchor),o.bottomEdgeAnchor!==e.bottomEdgeAnchor&&(this._bottomEdgeAnchor=e.bottomEdgeAnchor),o.useLegacyTrajectory!==e.useLegacyTrajectory&&(this._useLegacyBottomAndRightAnchors=e.useLegacyBottomAndRightAnchors),o.relativeToOriginalWindowSize===e.relativeToOriginalWindowSize}onActivate(){this._invalidDistances=!0}doStepPreEvents(o){const e=c.staticArray(c.AnchorRuntimeBehavior.prototype.doStepPreEvents),s=o.getGame();let r=s.getGameResolutionWidth(),h=s.getGameResolutionHeight();const A=o.getLayer(this.owner.getLayer());if(this._invalidDistances){this._relativeToOriginalWindowSize&&(r=s.getOriginalWidth(),h=s.getOriginalHeight());const i=A.convertCoords(this.owner.getDrawableX(),this.owner.getDrawableY(),0,e);this._leftEdgeAnchor===t.HorizontalAnchor.WINDOW_LEFT?this._leftEdgeDistance=i[0]:this._leftEdgeAnchor===t.HorizontalAnchor.WINDOW_RIGHT?this._leftEdgeDistance=r-i[0]:this._leftEdgeAnchor===t.HorizontalAnchor.PROPORTIONAL&&(this._leftEdgeDistance=i[0]/r),this._topEdgeAnchor===t.VerticalAnchor.WINDOW_TOP?this._topEdgeDistance=i[1]:this._topEdgeAnchor===t.VerticalAnchor.WINDOW_BOTTOM?this._topEdgeDistance=h-i[1]:this._topEdgeAnchor===t.VerticalAnchor.PROPORTIONAL&&(this._topEdgeDistance=i[1]/h);const n=A.convertCoords(this.owner.getDrawableX()+this.owner.getWidth(),this.owner.getDrawableY()+this.owner.getHeight(),0,e);this._rightEdgeAnchor===t.HorizontalAnchor.WINDOW_LEFT?this._rightEdgeDistance=n[0]:this._rightEdgeAnchor===t.HorizontalAnchor.WINDOW_RIGHT?this._rightEdgeDistance=r-n[0]:this._rightEdgeAnchor===t.HorizontalAnchor.PROPORTIONAL&&(this._rightEdgeDistance=n[0]/r),this._bottomEdgeAnchor===t.VerticalAnchor.WINDOW_TOP?this._bottomEdgeDistance=n[1]:this._bottomEdgeAnchor===t.VerticalAnchor.WINDOW_BOTTOM?this._bottomEdgeDistance=h-n[1]:this._bottomEdgeAnchor===t.VerticalAnchor.PROPORTIONAL&&(this._bottomEdgeDistance=n[1]/h),this._invalidDistances=!1}else{let i=0,n=0,d=0,E=0;this._leftEdgeAnchor===t.HorizontalAnchor.WINDOW_LEFT?i=this._leftEdgeDistance:this._leftEdgeAnchor===t.HorizontalAnchor.WINDOW_RIGHT?i=r-this._leftEdgeDistance:this._leftEdgeAnchor===t.HorizontalAnchor.PROPORTIONAL&&(i=this._leftEdgeDistance*r),this._topEdgeAnchor===t.VerticalAnchor.WINDOW_TOP?n=this._topEdgeDistance:this._topEdgeAnchor===t.VerticalAnchor.WINDOW_BOTTOM?n=h-this._topEdgeDistance:this._topEdgeAnchor===t.VerticalAnchor.PROPORTIONAL&&(n=this._topEdgeDistance*h),this._rightEdgeAnchor===t.HorizontalAnchor.WINDOW_LEFT?d=this._rightEdgeDistance:this._rightEdgeAnchor===t.HorizontalAnchor.WINDOW_RIGHT?d=r-this._rightEdgeDistance:this._rightEdgeAnchor===t.HorizontalAnchor.PROPORTIONAL&&(d=this._rightEdgeDistance*r),this._bottomEdgeAnchor===t.VerticalAnchor.WINDOW_TOP?E=this._bottomEdgeDistance:this._bottomEdgeAnchor===t.VerticalAnchor.WINDOW_BOTTOM?E=h-this._bottomEdgeDistance:this._bottomEdgeAnchor===t.VerticalAnchor.PROPORTIONAL&&(E=this._bottomEdgeDistance*h);const _=A.convertInverseCoords(i,n,0,e),g=_[0],l=_[1],N=A.convertInverseCoords(d,E,0,e),O=N[0],f=N[1];this._useLegacyBottomAndRightAnchors?(this._rightEdgeAnchor!==t.HorizontalAnchor.NONE&&this.owner.setWidth(O-g),this._bottomEdgeAnchor!==t.VerticalAnchor.NONE&&this.owner.setHeight(f-l),this._leftEdgeAnchor!==t.HorizontalAnchor.NONE&&this.owner.setX(g+this.owner.getX()-this.owner.getDrawableX()),this._topEdgeAnchor!==t.VerticalAnchor.NONE&&this.owner.setY(l+this.owner.getY()-this.owner.getDrawableY())):(this._rightEdgeAnchor!==t.HorizontalAnchor.NONE&&this._leftEdgeAnchor!==t.HorizontalAnchor.NONE?(this.owner.setWidth(O-g),this.owner.setX(g)):(this._leftEdgeAnchor!==t.HorizontalAnchor.NONE&&this.owner.setX(g+this.owner.getX()-this.owner.getDrawableX()),this._rightEdgeAnchor!==t.HorizontalAnchor.NONE&&this.owner.setX(O+this.owner.getX()-this.owner.getDrawableX()-this.owner.getWidth())),this._bottomEdgeAnchor!==t.VerticalAnchor.NONE&&this._topEdgeAnchor!==t.VerticalAnchor.NONE?(this.owner.setHeight(f-l),this.owner.setY(l)):(this._topEdgeAnchor!==t.VerticalAnchor.NONE&&this.owner.setY(l+this.owner.getY()-this.owner.getDrawableY()),this._bottomEdgeAnchor!==t.VerticalAnchor.NONE&&this.owner.setY(f+this.owner.getY()-this.ownerLine truncated
//# sourceMappingURL=anchorruntimebehavior.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(l){l.PixiFiltersTools.registerFilterCreator("Outline",new class extends l.PixiFiltersTools.PixiFilterCreator{makePIXIFilter(t,e){return new PIXI.filters.OutlineFilter}updatePreRender(t,e){}updateDoubleParameter(t,e,r){const i=t;e==="thickness"?i.thickness=r:e==="padding"&&(i.padding=r)}updateStringParameter(t,e,r){const i=t;e==="color"&&(i.color=l.PixiFiltersTools.rgbOrHexToHexNumber(r))}updateBooleanParameter(t,e,r){}})})(gdjs||(gdjs={}));
//# sourceMappingURL=outline-pixi-filter.js.map
@@ -0,0 +1,56 @@
/*!
* @pixi/filter-outline - v5.2.0
* Compiled Thu, 31 Aug 2023 09:18:38 UTC
*
* @pixi/filter-outline is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var __filters=function(r,s){"use strict";var u=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}`,c=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform vec4 filterClamp;
uniform float uAlpha;
uniform vec2 uThickness;
uniform vec4 uColor;
uniform bool uKnockout;
const float DOUBLE_PI = 2. * 3.14159265358979323846264;
const float ANGLE_STEP = \${angleStep};
float outlineMaxAlphaAtPos(vec2 pos) {
if (uThickness.x == 0. || uThickness.y == 0.) {
return 0.;
}
vec4 displacedColor;
vec2 displacedPos;
float maxAlpha = 0.;
for (float angle = 0.; angle <= DOUBLE_PI; angle += ANGLE_STEP) {
displacedPos.x = vTextureCoord.x + uThickness.x * cos(angle);
displacedPos.y = vTextureCoord.y + uThickness.y * sin(angle);
displacedColor = texture2D(uSampler, clamp(displacedPos, filterClamp.xy, filterClamp.zw));
maxAlpha = max(maxAlpha, displacedColor.a);
}
return maxAlpha;
}
void main(void) {
vec4 sourceColor = texture2D(uSampler, vTextureCoord);
vec4 contentColor = sourceColor * float(!uKnockout);
float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vTextureCoord.xy) * (1.-sourceColor.a);
vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);
gl_FragColor = contentColor + outlineColor;
}
`;const e=class extends s.Filter{constructor(t=1,o=0,n=.1,i=1,l=!1){super(u,c.replace(/\$\{angleStep\}/,e.getAngleStep(n))),this._thickness=1,this._alpha=1,this._knockout=!1,this.uniforms.uThickness=new Float32Array([0,0]),this.uniforms.uColor=new Float32Array([0,0,0,1]),this.uniforms.uAlpha=i,this.uniforms.uKnockout=l,Object.assign(this,{thickness:t,color:o,quality:n,alpha:i,knockout:l})}static getAngleStep(t){const o=Math.max(t*e.MAX_SAMPLES,e.MIN_SAMPLES);return(Math.PI*2/o).toFixed(7)}apply(t,o,n,i){this.uniforms.uThickness[0]=this._thickness/o._frame.width,this.uniforms.uThickness[1]=this._thickness/o._frame.height,this.uniforms.uAlpha=this._alpha,this.uniforms.uKnockout=this._knockout,t.applyFilter(this,o,n,i)}get alpha(){return this._alpha}set alpha(t){this._alpha=t}get color(){return s.utils.rgb2hex(this.uniforms.uColor)}set color(t){s.utils.hex2rgb(t,this.uniforms.uColor)}get knockout(){return this._knockout}set knockout(t){this._knockout=t}get thickness(){return this._thickness}set thickness(t){this._thickness=t,this.padding=t}};let a=e;return a.MIN_SAMPLES=1,a.MAX_SAMPLES=100,r.OutlineFilter=a,Object.defineProperty(r,"__esModule",{value:!0}),r}({},PIXI);Object.assign(PIXI.filters,__filters);
@@ -0,0 +1,2 @@
var gdjs;(function(S){const o=new S.Logger("Leaderboards");let G;(function(M){let O;(function(i){let P=!1;S.registerRuntimeScenePostEventsCallback(()=>{P=!1}),i.hasPlayerJustClosedLeaderboardView=()=>P;const U=t=>{const e=new jsSHA("SHA-256","TEXT",{encoding:"UTF8"});return e.update(t),e.getHash("B64")};class R{constructor(){this.lastScoreSavingStartedAt=null;this.lastScoreSavingSucceededAt=null;this.lastSavingPromise=null;this._currentlySavingScore=null;this._currentlySavingPlayerName=null;this._currentlySavingPlayerId=null;this._lastSavedScore=null;this._lastSavedPlayerName=null;this._lastSavedPlayerId=null;this.lastSavedLeaderboardEntryId=null;this.lastSaveError=null;this.hasScoreBeenSaved=!1;this.hasScoreSavingErrored=!1}isSaving(){return!!this.lastSavingPromise&&!this.hasScoreBeenSaved&&!this.hasScoreSavingErrored}_isSameAsLastScore({playerName:e,playerId:n,score:r}){return(!!e&&this._lastSavedPlayerName===e||!!n&&this._lastSavedPlayerId===n)&&this._lastSavedScore===r}_isAlreadySavingThisScore({playerName:e,playerId:n,score:r}){return this.isSaving()?(!!e&&this._currentlySavingPlayerName===e||!!n&&this._currentlySavingPlayerId===n)&&this._currentlySavingScore===r:!1}_isTooSoonToSaveAnotherScore(){return!!this.lastScoreSavingStartedAt&&Date.now()-this.lastScoreSavingStartedAt<500}startSaving({playerName:e,playerId:n,score:r}){if(this._isAlreadySavingThisScore({playerName:e,playerId:n,score:r}))throw o.warn("There is already a request to save with this player name and this score. Ignoring this one."),new Error("Ignoring this saving request.");if(this._isSameAsLastScore({playerName:e,playerId:n,score:r}))throw o.warn("The player and score to be sent are the same as previous one. Ignoring this one."),this._setError("SAME_AS_PREVIOUS"),new Error("Ignoring this saving request.");if(this._isTooSoonToSaveAnotherScore())throw o.warn("Last entry was sent too little time ago. Ignoring this one."),this._setError("TOO_FAST"),this.lastScoreSavingStartedAt=Date.now(),new Error("Ignoring this saving request.");let a;const d=new Promise(s=>{a=s});return this.lastScoreSavingStartedAt=Date.now(),this.lastSavingPromise=d,this.hasScoreBeenSaved=!1,this.hasScoreSavingErrored=!1,this._currentlySavingScore=r,e&&(this._currentlySavingPlayerName=e),n&&(this._currentlySavingPlayerId=n),{closeSaving:s=>{if(d!==this.lastSavingPromise){o.info("Score saving result received, but another save was launched in the meantime - ignoring the result of this one."),a();return}this.lastScoreSavingSucceededAt=Date.now(),this._lastSavedScore=this._currentlySavingScore,this._lastSavedPlayerName=this._currentlySavingPlayerName,this._lastSavedPlayerId=this._currentlySavingPlayerId,this.lastSavedLeaderboardEntryId=s,this.hasScoreBeenSaved=!0,a()},closeSavingWithError:s=>{if(d!==this.lastSavingPromise){o.info("Score saving result received, but another save was launched in the meantime - ignoring the result of this one."),a();return}this._setError(s),a()}}}_setError(e){this.lastSaveError=e,this.hasScoreBeenSaved=!1,this.hasScoreSavingErrored=!0}}let l={},I,c=null,D=!1,p=!1,f=!1,w=null,C=null;const u=document.createElement("div");u.style.backgroundColor="#000000",u.style.display="flex",u.style.height="100%",u.style.width="100%",u.style.justifyContent="center",u.style.alignItems="center",u.style.position="relative",u.style.zIndex="2";const A=document.createElement("img");A.setAttribute("width","50px"),A.setAttribute("src","data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CjxjaXJjbGUgb3BhY2l0eT0nMC4yNScgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIiBzdHJva2U9IiNGRkZGRkYiIHN0cm9rZS13aWR0aD0iNCI+PC9jaXJjbGU+CjxwYXRoIG9wYWNpdHk9JzAuNzUnIGZpbGw9IiNGRkZGRkYiIGQ9Ik00IDEyYTggOCAwIDAxOC04VjBDNS4zNzMgMCAwIDUuMzczIDAgMTJoNHptMiA1LjI5MUE3Ljk2MiA3Ljk2MiAwIDAxNCAxMkgwYzAgMy4wNDIgMS4xMzUgNS44MjQgMyA3LjkzOGwzLTIuNjQ3eiI+PC9wYXRoPgo8L3N2Zz4=");try{A.animate([{transform:"rotate(0deg)"},{transform:"rotate(359deg)"}],{duration:3e3,iterations:1/0})}catch{o.warn("Animation not supported, loader will be fixed.")}u.appendChild(A);const _=function({hasSucceeded:t}){const e=a=>t?a.lastScoreSavingSucceededAt:a.lastScoreSavingStartedAt,n=Object.values(l).filter(a=>!!e(a));if(n.length===0)return null;let r=n[0];return n.forEach(a=>{const d=e(a),s=e(r);d&&s&&d>s&&(r=a)}),r},x=async function({leaderboardId:t,playerName:e,authenticatedPlayerData:n,score:r,runtimeScene:a}){const s=`${a.getGame().isUsingGDevelopDevelopmentEnvironment()?"https://api-dev.gdevelop.io":"https://api.gdevelop.io"}/play`,g=a.getGame(),h={score:r,sessionId:g.getSessionId(),clientPlayerId:g.getPlayerId(),location:typeof window!="undefined"&&window.location?window.location.href:""},v={"Content-Type":"application/json"};let b=`${s}/game/${S.projectData.properties.projectUuid}/leaderboard/${t}/entry`;n?(v.Authorization=`player-game-token ${n.playerToken}`,b+=`?playerId=${n.playerId}`):h.playerName=i.formatPlayerName(e);const L=JSON.stringify(h);v.Digest=U(L)Line truncated
//# sourceMappingURL=leaderboardstools.js.map
@@ -0,0 +1,21 @@
/**
* A JavaScript implementation of the SHA family of hashes - defined in FIPS PUB 180-4, FIPS PUB 202,
* and SP 800-185 - as well as the corresponding HMAC implementation as defined in FIPS PUB 198-1.
*
* Copyright 2008-2021 Brian Turek, 1998-2009 Paul Johnston & Contributors
* Distributed under the BSD License
* See http://caligatio.github.com/jsSHA/ for more information
*
* Two ECMAScript polyfill functions carry the following license:
*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
* MERCHANTABLITY OR NON-INFRINGEMENT.
*
* See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.
*/
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).jsSHA=r()}(this,function(){"use strict";var t=function(r,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])})(r,n)},r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="ARRAYBUFFER not supported by this environment",e="UINT8ARRAY not supported by this environment";function o(t,r,n,e){var o,i,u,s=r||[0],h=(n=n||0)>>>3,a=-1===e?3:0;for(o=0;o<t.length;o+=1)i=(u=o+h)>>>2,s.length<=i&&s.push(0),s[i]|=t[o]<<8*(a+e*(u%4));return{value:s,binLen:8*t.length+n}}function i(t,i,u){switch(i){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(t){case"HEX":return function(t,r,n){return function(t,r,n,e){var o,i,u,s;if(0!=t.length%2)throw new Error("String of HEX type must be in byte increments");var h=r||[0],a=(n=n||0)>>>3,f=-1===e?3:0;for(o=0;o<t.length;o+=2){if(i=parseInt(t.substr(o,2),16),isNaN(i))throw new Error("String of HEX type contains invalid characters");for(u=(s=(o>>>1)+a)>>>2;h.length<=u;)h.push(0);h[u]|=i<<8*(f+e*(s%4))}return{value:h,binLen:4*t.length+n}}(t,r,n,u)};case"TEXT":return function(t,r,n){return function(t,r,n,e,o){var i,u,s,h,a,f,c,p,l=0,w=n||[0],d=(e=e||0)>>>3;if("UTF8"===r)for(c=-1===o?3:0,s=0;s<t.length;s+=1)for(u=[],128>(i=t.charCodeAt(s))?u.push(i):2048>i?(u.push(192|i>>>6),u.push(128|63&i)):55296>i||57344<=i?u.push(224|i>>>12,128|i>>>6&63,128|63&i):(s+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(s)),u.push(240|i>>>18,128|i>>>12&63,128|i>>>6&63,128|63&i)),h=0;h<u.length;h+=1){for(a=(f=l+d)>>>2;w.length<=a;)w.push(0);w[a]|=u[h]<<8*(c+o*(f%4)),l+=1}else for(c=-1===o?2:0,p="UTF16LE"===r&&1!==o||"UTF16LE"!==r&&1===o,s=0;s<t.length;s+=1){for(i=t.charCodeAt(s),!0===p&&(i=(h=255&i)<<8|i>>>8),a=(f=l+d)>>>2;w.length<=a;)w.push(0);w[a]|=i<<8*(c+o*(f%4)),l+=2}return{value:w,binLen:8*l+e}}(t,i,r,n,u)};case"B64":return function(t,n,e){return function(t,n,e,o){var i,u,s,h,a,f,c=0,p=n||[0],l=(e=e||0)>>>3,w=-1===o?3:0,d=t.indexOf("=");if(-1===t.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(t=t.replace(/=/g,""),-1!==d&&d<t.length)throw new Error("Invalid '=' found in base-64 string");for(i=0;i<t.length;i+=4){for(h=t.substr(i,4),s=0,u=0;u<h.length;u+=1)s|=r.indexOf(h.charAt(u))<<18-6*u;for(u=0;u<h.length-1;u+=1){for(a=(f=c+l)>>>2;p.length<=a;)p.push(0);p[a]|=(s>>>16-8*u&255)<<8*(w+o*(f%4)),c+=1}}return{value:p,binLen:8*c+e}}(t,n,e,u)};case"BYTES":return function(t,r,n){return function(t,r,n,e){var o,i,u,s,h=r||[0],a=(n=n||0)>>>3,f=-1===e?3:0;for(i=0;i<t.length;i+=1)o=t.charCodeAt(i),u=(s=i+a)>>>2,h.length<=u&&h.push(0),h[u]|=o<<8*(f+e*(s%4));return{value:h,binLen:8*t.length+n}}(t,r,n,u)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error(n)}return function(t,r,n){return function(t,r,n,e){return o(new Uint8Array(t),r,n,e)}(t,r,n,u)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error(e)}return function(t,r,n){return o(t,r,n,u)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function u(t,o,i,u){switch(t){case"HEX":return function(t){return function(t,r,n,e){var o,i,u="0123456789abcdef",s="",h=r/8,a=-1===n?3:0;for(o=0;o<h;o+=1)i=t[o>>>2]>>>8*(a+n*(o%4)),s+=u.charAt(i>>>4&15)+u.charAt(15&i);return e.outputUpper?s.toUpperCase():s}(t,o,i,u)};case"B64":return function(t){return function(t,n,e,o){var i,u,s,h,a,f="",c=n/8,p=-1===e?3:0;for(i=0;i<c;i+=3)for(h=i+1<c?t[i+1>>>2]:0,a=i+2<c?t[i+2>>>2]:0,s=(t[i>>>2]>>>8*(p+e*(i%4))&255)<<16|(h>>>8*(p+e*((i+1)%4))&255)<<8|a>>>8*(p+e*((i+2)%4))&255,u=0;u<4;u+=1)f+=8*i+6*u<=n?r.charAt(s>>>6*(3-u)&63):o.b64Pad;return f}(t,o,i,u)};case"BYTES":return function(t){return function(t,r,n){var e,o,i="",u=r/8,s=-1===n?3:0;for(e=0;e<u;e+=1)o=t[e>>>2]>>>8*(s+n*(e%4))&255,i+=String.fromCharCode(o);return i}(t,o,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error(n)}return function(t){return function(t,r,n){var e,o=r/8,i=new ArrayBuffer(o),u=new Uint8Array(i),s=-1===n?3:0;for(e=0;e<o;e+=1)u[e]=t[e>>>2]>>>8*(s+n*(e%4))&255;return i}(t,o,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error(e)}return function(t){return function(t,r,n){var e,o=r/8,i=-1===n?3:0,u=new Uint8Array(o);for(e=0;e<o;e+=1)u[e]=t[e>>>2]>>>8*(i+n*(e%4))&255;return u}(t,o,i)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,358452Line truncated
@@ -0,0 +1,2 @@
var gdjs;(function(h){class d{constructor(e,s,t,r){this._wasRendered=!1;this._textureWidth=0;this._textureHeight=0;this._object=e;const o=s.getGame().getImageManager().getPIXITexture(t),i=r?PIXI.TilingSprite:PIXI.Sprite;this._spritesContainer=new PIXI.Container,this._wrapperContainer=new PIXI.Container,this._centerSprite=new i(new PIXI.Texture(o.baseTexture)),this._borderSprites=[new i(new PIXI.Texture(o.baseTexture)),new PIXI.Sprite(o),new i(new PIXI.Texture(o.baseTexture)),new PIXI.Sprite(o),new i(new PIXI.Texture(o.baseTexture)),new PIXI.Sprite(o),new i(new PIXI.Texture(o.baseTexture)),new PIXI.Sprite(o)],this.setTexture(t,s),this._spritesContainer.removeChildren(),this._spritesContainer.addChild(this._centerSprite);for(let n=0;n<this._borderSprites.length;++n)this._spritesContainer.addChild(this._borderSprites[n]);this._wrapperContainer.addChild(this._spritesContainer),s.getLayer("").getRenderer().addRendererObject(this._wrapperContainer,e.getZOrder())}getRendererObject(){return this._wrapperContainer}ensureUpToDate(){this._spritesContainer.visible&&this._wasRendered&&this._centerSprite.texture.baseTexture.scaleMode!==PIXI.SCALE_MODES.NEAREST&&(this._spritesContainer.cacheAsBitmap=!0),this._wasRendered=!0}updateOpacity(){this._wrapperContainer.alpha=this._object.opacity/255,this._spritesContainer.cacheAsBitmap=!1}updateAngle(){this._wrapperContainer.rotation=h.toRad(this._object.angle)}updatePosition(){this._wrapperContainer.position.x=this._object.x+this._object._width/2,this._wrapperContainer.position.y=this._object.y+this._object._height/2}_updateLocalPositions(){const e=this._object;this._centerSprite.position.x=e._lBorder,this._centerSprite.position.y=e._tBorder,this._borderSprites[0].position.x=e._width-e._rBorder,this._borderSprites[0].position.y=e._tBorder,this._borderSprites[1].position.x=e._width-this._borderSprites[1].width,this._borderSprites[1].position.y=0,this._borderSprites[2].position.x=e._lBorder,this._borderSprites[2].position.y=0,this._borderSprites[3].position.x=0,this._borderSprites[3].position.y=0,this._borderSprites[4].position.x=0,this._borderSprites[4].position.y=e._tBorder,this._borderSprites[5].position.x=0,this._borderSprites[5].position.y=e._height-this._borderSprites[5].height,this._borderSprites[6].position.x=e._lBorder,this._borderSprites[6].position.y=e._height-e._bBorder,this._borderSprites[7].position.x=e._width-this._borderSprites[7].width,this._borderSprites[7].position.y=e._height-this._borderSprites[7].height}_updateSpritesAndTexturesSize(){const e=this._object;this._centerSprite.width=Math.max(e._width-e._rBorder-e._lBorder,0),this._centerSprite.height=Math.max(e._height-e._tBorder-e._bBorder,0),this._borderSprites[0].width=e._rBorder,this._borderSprites[0].height=Math.max(e._height-e._tBorder-e._bBorder,0),this._borderSprites[2].height=e._tBorder,this._borderSprites[2].width=Math.max(e._width-e._rBorder-e._lBorder,0),this._borderSprites[4].width=e._lBorder,this._borderSprites[4].height=Math.max(e._height-e._tBorder-e._bBorder,0),this._borderSprites[6].height=e._bBorder,this._borderSprites[6].width=Math.max(e._width-e._rBorder-e._lBorder,0),this._wasRendered=!0,this._spritesContainer.cacheAsBitmap=!1}setTexture(e,s){const t=this._object,r=s.getGame().getImageManager().getPIXITexture(e).baseTexture;this._textureWidth=r.width,this._textureHeight=r.height;function o(i){return i.width<0&&(i.width=0),i.height<0&&(i.height=0),i.x<0&&(i.x=0),i.y<0&&(i.y=0),i.x>r.width&&(i.x=r.width),i.y>r.height&&(i.y=r.height),i.x+i.width>r.width&&(i.width=r.width-i.x),i.y+i.height>r.height&&(i.height=r.height-i.y),i}this._centerSprite.texture=new PIXI.Texture(r,o(new PIXI.Rectangle(t._lBorder,t._tBorder,r.width-t._lBorder-t._rBorder,r.height-t._tBorder-t._bBorder))),this._borderSprites[0].texture=new PIXI.Texture(r,o(new PIXI.Rectangle(r.width-t._rBorder,t._tBorder,t._rBorder,r.height-t._tBorder-t._bBorder))),this._borderSprites[2].texture=new PIXI.Texture(r,o(new PIXI.Rectangle(t._lBorder,0,r.width-t._lBorder-t._rBorder,t._tBorder))),this._borderSprites[4].texture=new PIXI.Texture(r,o(new PIXI.Rectangle(0,t._tBorder,t._lBorder,r.height-t._tBorder-t._bBorder))),this._borderSprites[6].texture=new PIXI.Texture(r,o(new PIXI.Rectangle(t._lBorder,r.height-t._bBorder,r.width-t._lBorder-t._rBorder,t._bBorder))),this._borderSprites[1].texture=new PIXI.Texture(r,o(new PIXI.Rectangle(r.width-t._rBorder,0,t._rBorder,t._tBorder))),this._borderSprites[3].texture=new PIXI.Texture(r,o(new PIXI.Rectangle(0,0,t._lBorder,t._tBorder))),this._borderSprites[5].texture=new PIXI.Texture(r,o(new PIXI.Rectangle(0,r.height-t._bBorder,t._lBorder,t._bBorder))),this._borderSprites[7].texture=new PIXI.Texture(r,o(new PIXI.Rectangle(r.width-t._rBorder,r.height-t._bBorder,t._rBorder,t._bBorder))),this._updateSpritesAndTexturesSize(),this._updateLocalPositions(),this.updatePosition(),this._wrapperContainer.pivot.x=this._object._width/2,this._wrapperContainer.pivot.y=this._object._height/2}updateWidth(){this._wrapperLine truncated
//# sourceMappingURL=panelspriteruntimeobject-pixi-renderer.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(i){class s extends i.RuntimeObject{constructor(e,t){super(e,t);this.opacity=255;this._rBorder=t.rightMargin,this._lBorder=t.leftMargin,this._tBorder=t.topMargin,this._bBorder=t.bottomMargin,this._tiled=t.tiled,this._width=t.width,this._height=t.height,this._renderer=new i.PanelSpriteRuntimeObjectRenderer(this,e,t.texture,t.tiled),this.onCreated()}updateFromObjectData(e,t){e.width!==t.width&&this.setWidth(t.width),e.height!==t.height&&this.setHeight(t.height);let r=!1;return e.rightMargin!==t.rightMargin&&(this._rBorder=t.rightMargin,r=!0),e.leftMargin!==t.leftMargin&&(this._lBorder=t.leftMargin,r=!0),e.topMargin!==t.topMargin&&(this._tBorder=t.topMargin,r=!0),e.bottomMargin!==t.bottomMargin&&(this._bBorder=t.bottomMargin,r=!0),e.texture!==t.texture&&(r=!0),r&&this.setTexture(t.texture,this.getRuntimeScene()),e.tiled===t.tiled}getRendererObject(){return this._renderer.getRendererObject()}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}update(e){this._renderer.ensureUpToDate()}extraInitializationFromInitialInstance(e){e.customSize&&(this.setWidth(e.width),this.setHeight(e.height))}setX(e){super.setX(e),this._renderer.updatePosition()}setY(e){super.setY(e),this._renderer.updatePosition()}setTexture(e,t){this._renderer.setTexture(e,t)}setAngle(e){super.setAngle(e),this._renderer.updateAngle()}getWidth(){return this._width}getHeight(){return this._height}setWidth(e){this._width!==e&&(this._width=e,this._renderer.updateWidth(),this.invalidateHitboxes())}setHeight(e){this._height!==e&&(this._height=e,this._renderer.updateHeight(),this.invalidateHitboxes())}setSize(e,t){this.setWidth(e),this.setHeight(t)}setOpacity(e){e<0&&(e=0),e>255&&(e=255),this.opacity=e,this._renderer.updateOpacity()}getOpacity(){return this.opacity}setColor(e){this._renderer.setColor(e)}getColor(){return this._renderer.getColor()}getScale(){const e=Math.abs(this.getScaleX()),t=Math.abs(this.getScaleY());return e===t?e:Math.sqrt(e*t)}getScaleX(){return this._width/this._renderer.getTextureWidth()}getScaleY(){return this._height/this._renderer.getTextureHeight()}setScale(e){this.setWidth(this._renderer.getTextureWidth()*e),this.setHeight(this._renderer.getTextureHeight()*e)}setScaleX(e){this.setWidth(this._renderer.getTextureWidth()*e)}setScaleY(e){this.setHeight(this._renderer.getTextureHeight()*e)}}i.PanelSpriteRuntimeObject=s,i.registerObject("PanelSpriteObject::PanelSprite",i.PanelSpriteRuntimeObject)})(gdjs||(gdjs={}));
//# sourceMappingURL=panelspriteruntimeobject.js.map
@@ -0,0 +1,2 @@
(function(){var yJ=function(){var Jt=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename!="undefined"&&(Jt=Jt||__filename),function(St){St=St||{};var t;t||(t=typeof St!="undefined"?St:{});var ae;t.ready=new Promise(function(e){ae=e});var Tt={},Ct;for(Ct in t)t.hasOwnProperty(Ct)&&(Tt[Ct]=t[Ct]);var zt=!1,xt=!1,Yt=!1,le=!1;zt=typeof window=="object",xt=typeof importScripts=="function",Yt=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",le=!zt&&!Yt&&!xt;var ft="",Nt,Lt,$t,Qt;Yt?(ft=xt?require("path").dirname(ft)+"/":__dirname+"/",Nt=function(e,n){return $t||($t=require("fs")),Qt||(Qt=require("path")),e=Qt.normalize(e),$t.readFileSync(e,n?null:"utf8")},Lt=function(e){return e=Nt(e,!0),e.buffer||(e=new Uint8Array(e)),Kt(e.buffer),e},1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),process.on("uncaughtException",function(e){throw e}),process.on("unhandledRejection",Ot),t.inspect=function(){return"[Emscripten Module object]"}):le?(typeof read!="undefined"&&(Nt=function(e){return read(e)}),Lt=function(e){return typeof readbuffer=="function"?new Uint8Array(readbuffer(e)):(e=read(e,"binary"),Kt(typeof e=="object"),e)},typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)):(zt||xt)&&(xt?ft=self.location.href:document.currentScript&&(ft=document.currentScript.src),Jt&&(ft=Jt),ft=ft.indexOf("blob:")!==0?ft.substr(0,ft.lastIndexOf("/")+1):"",Nt=function(e){var n=new XMLHttpRequest;return n.open("GET",e,!1),n.send(null),n.responseText},xt&&(Lt=function(e){var n=new XMLHttpRequest;return n.open("GET",e,!1),n.responseType="arraybuffer",n.send(null),new Uint8Array(n.response)}));var ye=t.print||console.log.bind(console),Mt=t.printErr||console.warn.bind(console);for(Ct in Tt)Tt.hasOwnProperty(Ct)&&(t[Ct]=Tt[Ct]);Tt=null;var It;t.wasmBinary&&(It=t.wasmBinary);var me;t.noExitRuntime&&(me=t.noExitRuntime),typeof WebAssembly!="object"&&Mt("no native wasm support detected");var qt,mJ=new WebAssembly.Table({initial:210,maximum:230,element:"anyfunc"}),fe=!1;function Kt(e,n){e||Ot("Assertion failed: "+n)}var de=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function be(e,n,o){var _=n+o;for(o=n;e[o]&&!(o>=_);)++o;if(16<o-n&&e.subarray&&de)return de.decode(e.subarray(n,o));for(_="";n<o;){var U=e[n++];if(U&128){var st=e[n++]&63;if((U&224)==192)_+=String.fromCharCode((U&31)<<6|st);else{var Ut=e[n++]&63;U=(U&240)==224?(U&15)<<12|st<<6|Ut:(U&7)<<18|st<<12|Ut<<6|e[n++]&63,65536>U?_+=String.fromCharCode(U):(U-=65536,_+=String.fromCharCode(55296|U>>10,56320|U&1023))}}else _+=String.fromCharCode(U)}return _}function te(e){return e?be(wt,e,void 0):""}var Vt,wt,Wt,ge;function he(e){Vt=e,t.HEAP8=new Int8Array(e),t.HEAP16=new Int16Array(e),t.HEAP32=Wt=new Int32Array(e),t.HEAPU8=wt=new Uint8Array(e),t.HEAPU16=new Uint16Array(e),t.HEAPU32=new Uint32Array(e),t.HEAPF32=new Float32Array(e),t.HEAPF64=ge=new Float64Array(e)}var Ue=t.INITIAL_MEMORY||16777216;(qt=t.wasmMemory?t.wasmMemory:new WebAssembly.Memory({initial:Ue/65536,maximum:32768}))&&(Vt=qt.buffer),Ue=Vt.byteLength,he(Vt),Wt[6512]=5269088;function Ht(e){for(;0<e.length;){var n=e.shift();if(typeof n=="function")n(t);else{var o=n.ev;typeof o=="number"?n.Au===void 0?t.dynCall_v(o):t.dynCall_vi(o,n.Au):o(n.Au===void 0?null:n.Au)}}}var Je=[],De=[],ve=[],je=[],Ge=!1;function fJ(){var e=t.preRun.shift();Je.unshift(e)}var Rt=0,ee=null,kt=null;t.preloadedImages={},t.preloadedAudios={};function Ot(e){throw t.onAbort&&t.onAbort(e),e+="",ye(e),Mt(e),fe=!0,new WebAssembly.RuntimeError("abort("+e+"). Build with -s ASSERTIONS=1 for more info.")}function ne(e){var n=Ft;return String.prototype.startsWith?n.startsWith(e):n.indexOf(e)===0}function Ae(){return ne("data:application/octet-stream;base64,")}var Ft="Box2D_v2.3.1_min.wasm.wasm";if(!Ae()){var Se=Ft;Ft=t.locateFile?t.locateFile(Se,ft):ft+Se}function Ce(){try{if(It)return new Uint8Array(It);if(Lt)return Lt(Ft);throw"both async and sync fetching of the wasm failed"}catch(e){Ot(e)}}function dJ(){return It||!zt&&!xt||typeof fetch!="function"||ne("file://")?new Promise(function(e){e(Ce())}):fetch(Ft,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+Ft+"'";return e.arrayBuffer()}).catch(function(){return Ce()})}var Be={1156:function(e,n){if(e=t.getCache(t.JSDestructionListener)[e],!e.hasOwnProperty("SayGoodbyeJoint"))throw"a JSImplementation must implement all functions, you forgot JSDestructionListener::SayGoodbyeJoint.";e.SayGoodbyeJoint(n)},1414:function(e,n){if(e=t.getCache(t.JSDestructionListener)[e],!e.hasOwnProperty("SayGoodbyeFixture"))throw"a JSImplementation must implement all functions, you forgot JSDestructionListener::SayGoodbyeFixture.";e.SayGoodbyeFixture(n)},1840:function(e,n){if(e=t.getCache(t.JSQueryCallback)[e],!e.hasOwnProperty("ReLine truncated
//# sourceMappingURL=Box2D_v2.3.1_min.wasm.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(l){class m{constructor(e,t){this.frameTime=0;this.stepped=!1;this.timeScale=1;this._nextJointId=1;this.joints={};this._registeredBehaviors=new Set,this.gravityX=t.gravityX,this.gravityY=t.gravityY,this.scaleX=t.scaleX===0?100:t.scaleX,this.scaleY=t.scaleY===0?100:t.scaleY,this.invScaleX=1/this.scaleX,this.invScaleY=1/this.scaleY,this.timeStep=1/60,this.world=new Box2D.b2World(new Box2D.b2Vec2(this.gravityX,this.gravityY)),this.world.SetAutoClearForces(!1),this.staticBody=this.world.CreateBody(new Box2D.b2BodyDef),this.contactListener=new Box2D.JSContactListener,this.contactListener.BeginContact=function(i){const o=Box2D.wrapPointer(i,Box2D.b2Contact);if(o.GetFixtureA().GetBody()===null||o.GetFixtureB().GetBody()===null)return;const s=o.GetFixtureA().GetBody().gdjsAssociatedBehavior,n=o.GetFixtureB().GetBody().gdjsAssociatedBehavior;!s||!n||(s.onContactBegin(n),n.onContactBegin(s))},this.contactListener.EndContact=function(i){const o=Box2D.wrapPointer(i,Box2D.b2Contact);if(o.GetFixtureA().GetBody()===null||o.GetFixtureB().GetBody()===null)return;const s=o.GetFixtureA().GetBody().gdjsAssociatedBehavior,n=o.GetFixtureB().GetBody().gdjsAssociatedBehavior;!s||!n||(s.onContactEnd(n),n.onContactEnd(s))},this.contactListener.PreSolve=function(){},this.contactListener.PostSolve=function(){},this.world.SetContactListener(this.contactListener)}static getSharedData(e,t){if(!e.physics2SharedData){const i=e.getInitialSharedDataForBehavior(t);e.physics2SharedData=new l.Physics2SharedData(e,i)}return e.physics2SharedData}addToBehaviorsList(e){this._registeredBehaviors.add(e)}removeFromBehaviorsList(e){this._registeredBehaviors.delete(e)}resetStartedAndEndedCollisions(){for(const e of this._registeredBehaviors)e.contactsStartedThisFrame.length=0,e.contactsEndedThisFrame.length=0}updateBodiesFromObjects(){for(const e of this._registeredBehaviors)e.updateBodyFromObject()}step(e){this.frameTime+=e;let t=Math.max(0,Math.round(this.frameTime/this.timeStep));this.frameTime-=t*this.timeStep,t>5&&(t=5);for(let i=0;i<t;i++)this.world.Step(this.timeStep*this.timeScale,8,10);this.world.ClearForces(),this.stepped=!0}clearBodyJoints(e){for(const t in this.joints)this.joints.hasOwnProperty(t)&&(this.joints[t].GetBodyA()===e||this.joints[t].GetBodyB()===e)&&this.removeJoint(t)}addJoint(e){return this.joints[this._nextJointId.toString(10)]=e,this._nextJointId++}getJoint(e){return e=e.toString(10),this.joints.hasOwnProperty(e)?this.joints[e]:null}getJointId(e){for(const t in this.joints)if(this.joints.hasOwnProperty(t)&&this.joints[t]===e)return parseInt(t,10);return 0}removeJoint(e){if(e=e.toString(10),this.joints.hasOwnProperty(e)){const t=this.joints[e];if(t.GetType()===Box2D.e_revoluteJoint||t.GetType()===Box2D.e_prismaticJoint)for(const i in this.joints)this.joints.hasOwnProperty(i)&&this.joints[i].GetType()===Box2D.e_gearJoint&&(Box2D.getPointer(this.joints[i].GetJoint1())===Box2D.getPointer(t)||Box2D.getPointer(this.joints[i].GetJoint2())===Box2D.getPointer(t))&&this.removeJoint(parseInt(i,10));this.world.DestroyJoint(t),delete this.joints[e]}}}l.Physics2SharedData=m,l.registerRuntimeSceneUnloadedCallback(function(J){J.physics2SharedData&&J.physics2SharedData.world&&Box2D.destroy(J.physics2SharedData.world)});const B=class extends l.RuntimeBehavior{constructor(e,t,i){super(e,t,i);this.shapeScale=1;this._body=null;this._objectOldX=0;this._objectOldY=0;this._objectOldAngle=0;this._objectOldWidth=0;this._objectOldHeight=0;this._verticesBuffer=0;this.bodyType=t.bodyType,this.bullet=t.bullet,this.fixedRotation=t.fixedRotation,this.canSleep=t.canSleep,this.shape=t.shape,this.shapeDimensionA=t.shapeDimensionA,this.shapeDimensionB=t.shapeDimensionB,this.shapeOffsetX=t.shapeOffsetX,this.shapeOffsetY=t.shapeOffsetY,this.polygonOrigin=t.polygonOrigin,this.polygon=this.shape==="Polygon"?B.getPolygon(t.vertices):null,this.density=t.density,this.friction=t.friction,this.restitution=t.restitution,this.linearDamping=t.linearDamping,this.angularDamping=t.angularDamping,this.gravityScale=t.gravityScale,this.layers=t.layers,this.masks=t.masks,this.contactsStartedThisFrame=[],this.contactsEndedThisFrame=[],this.currentContacts=[],this.currentContacts.length=0,this.destroyedDuringFrameLogic=!1,this._sharedData=m.getSharedData(e.getScene(),t.name),this._tempb2Vec2=new Box2D.b2Vec2,this._tempb2Vec2Sec=new Box2D.b2Vec2,this._sharedData.addToBehaviorsList(this)}b2Vec2(e,t){return this._tempb2Vec2.set_x(e),this._tempb2Vec2.set_y(t),this._tempb2Vec2}b2Vec2Sec(e,t){return this._tempb2Vec2Sec.set_x(e),this._tempb2Vec2Sec.set_y(t),this._tempb2Vec2Sec}updateFromBehaviorData(e,t){return e.bullet!==t.bullet&&this.setBullet(t.bullet),e.fixedRotation!==t.fixedRotation&&this.setFixedRotation(t.fixedRotation),e.canSleep!==t.canSleep&&this.setSleepingAllowed(t.canSleep),e.shapeDimensionA!==t.shapeDimensionA&&(this.shapeDimensionA=t.shapeDimensionA,this.recreateShape()),e.shapeDimensionB!==t.shapeDimensionB&&(this.shapeDimensionB=t.shapeDimensionB,thisLine truncated
//# sourceMappingURL=physics2runtimebehavior.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(e){let c;(function(i){i.objectsCollide=function(o,s,n,t){return e.evtTools.object.twoListsTest(e.Physics2RuntimeBehavior.areObjectsColliding,o,n,t,s)},i.haveObjectsStartedColliding=function(o,s,n,t){return e.evtTools.object.twoListsTest(e.Physics2RuntimeBehavior.hasCollisionStartedBetween,o,n,t,s)},i.haveObjectsStoppedColliding=function(o,s,n,t){return e.evtTools.object.twoListsTest(e.Physics2RuntimeBehavior.hasCollisionStoppedBetween,o,n,t,s)},i.setTimeScale=function(o,s,n){const t=e.staticArray(e.physics2.setTimeScale);o.values(t);for(let a=0,b=t.length;a<b;a++){const l=t[a];for(let r=0,j=l.length;r<j;r++){e.Physics2RuntimeBehavior.setTimeScaleFromObject(l[r],s,n);return}}}})(c=e.physics2||(e.physics2={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=physics2tools.js.map
@@ -0,0 +1,5 @@
var gdjs;(function(y){const d=new y.Logger("Player Authentication");let m;(function(s){const u=({platform:o,isGameRegistered:t})=>t?{title:"Logging in...",text1:o==="cordova"?"One moment, we're opening a window for you to log in.":"One moment, we're opening a new page with your web browser for you to log in.",text2:"If the window did not open, please check your pop-up blocker and click the button below to try again."}:{title:"Publish your game!",text1:"GDevelop's player accounts are only available for published games.",text2:"Click the button below to learn how to publish your game then try again."};s.computeAuthenticationContainer=function(o){const t=document.createElement("div");t.id="authentication-root-container",t.style.position="relative",t.style.backgroundColor="rgba(14, 6, 45, 0.5)",t.style.opacity="1",t.style.width="100%",t.style.height="100%",t.style.zIndex="2",t.style.pointerEvents="all";const i=document.createElement("div");i.id="authentication-frame-container",i.style.backgroundColor="#FFFFFF",i.style.position="absolute",i.style.top="16px",i.style.bottom="16px",i.style.left="16px",i.style.right="16px",i.style.borderRadius="8px",i.style.boxShadow="0px 4px 4px rgba(0, 0, 0, 0.25)",i.style.padding="16px";const l=document.createElement("div");l.style.cursor="pointer",l.style.display="flex",l.style.justifyContent="right",l.style.alignItems="center",l.style.zIndex="3",r(l,o);const e=document.createElement("img");e.setAttribute("width","15px"),e.setAttribute("src","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI4IiB2aWV3Qm94PSIwIDAgOCA4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuODUzNTUgMC4xNDY0NDdDOC4wNDg4MiAwLjM0MTcwOSA4LjA0ODgyIDAuNjU4MjkxIDcuODUzNTUgMC44NTM1NTNMMC44NTM1NTMgNy44NTM1NUMwLjY1ODI5MSA4LjA0ODgyIDAuMzQxNzA5IDguMDQ4ODIgMC4xNDY0NDcgNy44NTM1NUMtMC4wNDg4MTU1IDcuNjU4MjkgLTAuMDQ4ODE1NSA3LjM0MTcxIDAuMTQ2NDQ3IDcuMTQ2NDVMNy4xNDY0NSAwLjE0NjQ0N0M3LjM0MTcxIC0wLjA0ODgxNTUgNy42NTgyOSAtMC4wNDg4MTU1IDcuODUzNTUgMC4xNDY0NDdaIiBmaWxsPSIjMUQxRDI2Ii8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMC4xNDY0NDcgMC4xNDY0NDdDMC4zNDE3MDkgLTAuMDQ4ODE1NSAwLjY1ODI5MSAtMC4wNDg4MTU1IDAuODUzNTUzIDAuMTQ2NDQ3TDcuODUzNTUgNy4xNDY0NUM4LjA0ODgyIDcuMzQxNzEgOC4wNDg4MiA3LjY1ODI5IDcuODUzNTUgNy44NTM1NUM3LjY1ODI5IDguMDQ4ODIgNy4zNDE3MSA4LjA0ODgyIDcuMTQ2NDUgNy44NTM1NUwwLjE0NjQ0NyAwLjg1MzU1M0MtMC4wNDg4MTU1IDAuNjU4MjkxIC0wLjA0ODgxNTUgMC4zNDE3MDkgMC4xNDY0NDcgMC4xNDY0NDdaIiBmaWxsPSIjMUQxRDI2Ii8+Cjwvc3ZnPgo="),l.appendChild(e);const n=document.createElement("div");n.id="authentication-container-loader",n.style.display="flex",n.style.flexDirection="column",n.style.height="100%",n.style.width="100%",n.style.justifyContent="center",n.style.alignItems="center";const c=document.createElement("img");c.setAttribute("width","28px"),c.setAttribute("src","data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iYW5pbWF0ZS1zcGluIC1tbC0xIG1yLTMgaC01IHctNSB0ZXh0LXdoaXRlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CjxjaXJjbGUgb3BhY2l0eT0nMC4yNScgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSI0Ij48L2NpcmNsZT4KPHBhdGggb3BhY2l0eT0nMC43NScgZmlsbD0iY3VycmVudENvbG9yIiBkPSJNNCAxMmE4IDggMCAwMTgtOFYwQzUuMzczIDAgMCA1LjM3MyAwIDEyaDR6bTIgNS4yOTFBNy45NjIgNy45NjIgMCAwMTQgMTJIMGMwIDMuMDQyIDEuMTM1IDUuODI0IDMgNy45MzhsMy0yLjY0N3oiPjwvcGF0aD4KPC9zdmc+"),c.style.marginTop="50px";try{c.animate([{transform:"rotate(0deg)"},{transform:"rotate(359deg)"}],{duration:3e3,iterations:1/0})}catch{d.warn("Animation not supported, loader will be fixed.")}n.appendChild(c);const a=document.createElement("div");return a.style.display="flex",a.style.flexDirection="column",a.style.height="100%",a.style.width="100%",a.style.justifyContent="stretch",a.style.alignItems="stretch",a.style.display="none",i.appendChild(l),i.appendChild(n),i.appendChild(a),t.appendChild(i),{rootContainer:t,loaderContainer:n,iframeContainer:a}},s.displayIframeInsideAuthenticationContainer=(o,t,i,l)=>{const e=document.createElement("iframe");e.setAttribute("sandbox","allow-forms allow-modals allow-orientation-lock allow-popups allow-same-origin allow-scripts"),e.addEventListener("load",()=>{o.style.display="flex",t.style.display="none"}),e.addEventListener("loaderror",()=>{s.addAuthenticationUrlToTextsContainer(()=>{o.removeChild(e),o.style.display="none",t.style.display="flex",s.displayIframeInsideAuthenticationContainer(o,t,i,l)},i)}),e.src=l,e.style.flex="1",e.style.border="0",o.appendChild(e)},s.addAuthenticationTextsToLoadingContainer=(o,t,i,l)=>{const e=document.createElement("div");e.id="authentication-container-texts",e.style.display="flex",e.style.flexDirection="column",e.style.width="100%",e.style.justifyContent="center",e.style.alignItems="center",e.style.position="relative",e.style.zIndex="3",e.style.fontSize="11pt",e.style.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, Line truncated
Logged as ${e}`,c.style.margin="0px";const a=document.createElement("p");return a.id="changeAccountText",a.innerText="Click here to switch to another account.",a.style.margin="0px",a.style.marginTop="4px",a.style.textDecoration="underline",a.style.cursor="pointer",r(a,o),n.appendChild(c),n.appendChild(a),l.appendChild(n),l},s.computeNotAuthenticatedBanner=function(o,t){const i=s.computeDismissableBanner(t),l=document.createElement("div"),e=document.createElement("p");e.id="loggedText",e.innerHTML="You are not authenticated.",e.style.margin="0px";const n=document.createElement("p");return n.id="changeAccountText",n.innerText="Click here to log in.",n.style.margin="0px",n.style.marginTop="4px",n.style.textDecoration="underline",n.style.cursor="pointer",r(n,o),l.appendChild(e),l.appendChild(n),i.appendChild(l),i},s.displayLoggedInNotification=function(o,t){s.showNotification(o,"authenticated-notification",`<img style="margin-right:4px" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgOSA5IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNNC4xNjY2NyAwQzEuODY2NjcgMCAwIDEuODY2NjcgMCA0LjE2NjY3QzAgNi40NjY2NyAxLjg2NjY3IDguMzMzMzMgNC4xNjY2NyA4LjMzMzMzQzYuNDY2NjcgOC4zMzMzMyA4LjMzMzMzIDYuNDY2NjcgOC4zMzMzMyA0LjE2NjY3QzguMzMzMzMgMS44NjY2NyA2LjQ2NjY3IDAgNC4xNjY2NyAwWk0zLjMzMzMzIDYuMjVMMS4yNSA0LjE2NjY3TDEuODM3NSAzLjU3OTE3TDMuMzMzMzMgNS4wNzA4M0w2LjQ5NTgzIDEuOTA4MzNMNy4wODMzMyAyLjVMMy4zMzMzMyA2LjI1WiIgZmlsbD0iIzAwQ0M4MyIvPgo8L3N2Zz4K" />
Logged as ${t}`,"success")},s.displayLoggedOutNotification=function(o){s.showNotification(o,"authenticated-notification",`<img style="margin-right:4px" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgOSA5IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNNC4xNjY2NyAwQzEuODY2NjcgMCAwIDEuODY2NjcgMCA0LjE2NjY3QzAgNi40NjY2NyAxLjg2NjY3IDguMzMzMzMgNC4xNjY2NyA4LjMzMzMzQzYuNDY2NjcgOC4zMzMzMyA4LjMzMzMzIDYuNDY2NjcgOC4zMzMzMyA0LjE2NjY3QzguMzMzMzMgMS44NjY2NyA2LjQ2NjY3IDAgNC4xNjY2NyAwWk0zLjMzMzMzIDYuMjVMMS4yNSA0LjE2NjY3TDEuODM3NSAzLjU3OTE3TDMuMzMzMzMgNS4wNzA4M0w2LjQ5NTgzIDEuOTA4MzNMNy4wODMzMyAyLjVMMy4zMzMzMyA2LjI1WiIgZmlsbD0iIzAwQ0M4MyIvPgo8L3N2Zz4K" />
Logged out`,"success")},s.displayErrorNotification=function(o){s.showNotification(o,"error-notification","An error occurred while authenticating, please try again.","error")},s.showNotification=function(o,t,i,l){const e=document.createElement("div");e.id=t,e.style.position="absolute",e.style.pointerEvents="all",e.style.backgroundColor=l==="success"?"#0E062D":"red",e.style.top="12px",e.style.right="16px",e.style.padding="6px 32px 6px 6px",e.style.zIndex="1",e.style.display="flex",e.style.flexDirection="row-reverse",e.style.justifyContent="space-between",e.style.alignItems="center",e.style.boxShadow="0px 4px 4px rgba(0, 0, 0, 0.25)",e.style.borderRadius="4px",e.style.fontSize="11pt",e.style.color="#FFFFFF",e.style.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';try{e.animate([{transform:"translateY(-30px)",opacity:0},{transform:"translateY(0px)",opacity:1}],{duration:700,easing:"ease-out"})}catch{d.warn("Animation not supported, div will be fixed.")}const n=document.createElement("p");n.id="loggedText",n.innerHTML=i,n.style.margin="0px",e.appendChild(n),o.appendChild(e);const c=700,a=5e3;setTimeout(()=>{try{e.animate([{transform:"translateY(0px)",opacity:1},{transform:"translateY(-30px)",opacity:0}],{duration:c,easing:"ease-in"})}catch{d.warn("Animation not supported, div will be fixed.")}},a),setTimeout(()=>{e.remove()},a+c)};const r=function(o,t){o.addEventListener("touchstart",i=>{t()}),o.addEventListener("click",i=>{t()})}})(m=y.playerAuthenticationComponents||(y.playerAuthenticationComponents={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=playerauthenticationcomponents.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(d){const a=new d.Logger("Player Authentication"),c=d.playerAuthenticationComponents;let S;(function(i){let f=null,T=null,p=null,M=!1,w=!1,G=null,b=null,E=null,C=null,D=null,h=null,l=null,x=null,W=null,u=null,_=null,g=null;d.registerRuntimeScenePostEventsCallback(()=>{M=!1}),d.registerFirstRuntimeSceneLoadedCallback(e=>{B(e)==="web"&&(L(),u=t=>{U(e,t,{checkOrigin:!0})},window.addEventListener("message",u,!0),a.info("Notifying parent window that player authentication is ready."),window.parent.postMessage({id:"playerAuthReady"},"*"),x=setTimeout(()=>{a.info("Removing initial authentication listener."),L()},3e3))});const O=e=>`${e}_authenticatedUser`,j=({runtimeGame:e,gameId:t,connectionId:n})=>`https://gd.games/auth?gameId=${t}${n?`&connectionId=${n}`:""}${e.isUsingGDevelopDevelopmentEnvironment()?"&dev=true":""}`,B=e=>e.getGame().getRenderer().getElectron()?"electron":typeof cordova!="undefined"?"cordova":"web",q=e=>{const t=e.getGame().getAdditionalOptions();return t&&t.isPreview&&t.allowAuthenticationUsingIframeForPreview};i.isAuthenticated=()=>(w||R(),p!==null),i.hasLoggedIn=()=>M,i.getUsername=()=>(w||R(),f||""),i.getUserToken=()=>(w||R(),p||null),i.getUserId=()=>(w||R(),T||null);const P=(e,t,n=0)=>{const r=`${e.isUsingGDevelopDevelopmentEnvironment()?"https://api-dev.gdevelop.io":"https://api.gdevelop.io"}/game/public-game/${t}`;return fetch(r,{method:"HEAD"}).then(s=>s.status!==200?(a.warn(`Error while fetching the game: ${s.status} ${s.statusText}`),s.status===404||n>2?!1:P(e,t,n+1)):!0,s=>(a.error("Error while fetching game:",s),!1))};i.logout=e=>{f=null,p=null,T=null;const t=d.projectData.properties.projectUuid;if(!t){a.error("Missing game id in project properties.");return}window.localStorage.removeItem(O(t)),k(e),i.removeAuthenticationBanner(e);const n=e.getGame().getRenderer().getDomElementContainer();if(!n){m(e,"The div element covering the game couldn't be found, the authentication banner cannot be displayed.");return}c.displayLoggedOutNotification(n)};const R=()=>{const e=d.projectData.properties.projectUuid;if(!e){a.error("Missing game id in project properties.");return}try{const t=window.localStorage.getItem(O(e));if(!t){w=!0;return}const n=JSON.parse(t);f=n.username,T=n.userId,p=n.userToken,w=!0}catch(t){a.warn("Unable to read authentication details from localStorage. Player authentication will not be available.",t)}},k=e=>{i.removeAuthenticationContainer(e),J(),g&&(g.close(),g=null),G&&(G.close(),G=null),b&&(b.close(),b=null)},F=({username:e,userId:t,userToken:n})=>{e||a.warn("The authenticated player does not have a username"),f=e,T=t,p=n,M=!0;const o=d.projectData.properties.projectUuid;if(!o){a.error("Missing game id in project properties.");return}try{window.localStorage.setItem(O(o),JSON.stringify({username:f,userId:T,userToken:p}))}catch(r){a.warn("Unable to save the authentication details to localStorage. Player authentication will not be available.",r)}},H=function(e,t,n,o){F({userId:t,username:n,userToken:o}),k(e),i.removeAuthenticationBanner(e);const r=e.getGame().getRenderer().getDomElementContainer();if(!r){m(e,"The div element covering the game couldn't be found, the authentication banner cannot be displayed.");return}c.displayLoggedInNotification(r,f||"Anonymous"),$(e)},U=function(e,t,{checkOrigin:n}){if(!(n&&!["https://liluo.io","https://gd.games"].includes(t.origin))){if(!t.data.id)throw new Error("Malformed message");switch(t.data.id){case"authenticationResult":{if(!(t.data.body&&t.data.body.token))throw new Error("Malformed message.");H(e,t.data.body.userId,t.data.body.username,t.data.body.token);break}case"alreadyAuthenticated":{if(!(t.data.body&&t.data.body.token))throw new Error("Malformed message.");F({userId:t.data.body.userId,username:t.data.body.username,userToken:t.data.body.token}),L(),V(e);break}}}},m=function(e,t){a.error(t),k(e);const n=e.getGame().getRenderer().getDomElementContainer();if(!n){m(e,"The div element covering the game couldn't be found, the authentication banner cannot be displayed.");return}c.displayErrorNotification(n),$(e)},z=e=>{J();const t=12*60*1e3;W=setTimeout(()=>{a.info("Authentication window did not send message in time. Closing it."),k(e),$(e)},t)},J=()=>{x&&clearTimeout(x),W&&clearTimeout(W)},K=function(e){const t=()=>{i.removeAuthenticationBanner(e)},n=()=>{i.openAuthenticationWindow(e)};return p?c.computeAuthenticatedBanner(n,t,f):c.computeNotAuthenticatedBanner(n,t)};i.displayAuthenticationBanner=function(e){if(l){l.style.opacity="1";return}w||R();const t=e.getGame().getRenderer().getDomElementContainer();if(!t){m(e,"The div element covering the game couldn't be found, the authentication banner cannot be displayed.");return}l=K(e),t.appendChild(l)};const V=function(e){if(!l)return;const t=e.getGame().getRenderer().getDomElementContainer();if(!t){m(e,"The div element covering the game couldn't be found, the authentication banner cannot be displayed.");return}const n=l;l=K(e),t.replaceChild(l,n)},X=(e,t)=>{const n=Line truncated
//# sourceMappingURL=playerauthenticationtools.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(o){let a;(function(t){let i;(function(e){let r=null;e.isMobile=()=>o.evtTools.common.isMobile(),e.isNativeMobileApp=()=>typeof window!="undefined"&&window.cordova,e.isNativeDesktopApp=n=>!!n.getGame().getRenderer().getElectron();const u=()=>e.isMobile()?!0:!!navigator.maxTouchPoints&&navigator.maxTouchPoints>2;e.hasTouchScreen=()=>r!==null?r:r=u(),e.isWebGLSupported=n=>n.getGame().getRenderer().isWebGLSupported(),e.isPreview=n=>n.getGame().isPreview()})(i=t.systemInfo||(t.systemInfo={}))})(a=o.evtTools||(o.evtTools={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=systeminfotools.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(a){const m={text:"text",email:"email",password:"password",number:"number","telephone number":"tel",url:"url",search:"search"},n=(o,e)=>"rgba("+o[0]+","+o[1]+","+o[2]+","+e/255+")";class s{constructor(e,t){this._input=null;this._object=e,this._instanceContainer=t,this._runtimeGame=this._instanceContainer.getGame(),this._createElement()}_createElement(){if(this._input)throw new Error("Tried to recreate an input while it already exists.");const e=this._object.getInputType()==="text area";this._input=document.createElement(e?"textarea":"input"),this._input.style.border="1px solid black",this._input.autocomplete="off",this._input.style.borderRadius="0px",this._input.style.backgroundColor="white",this._input.style.position="absolute",this._input.style.resize="none",this._input.style.outline="none",this._input.style.pointerEvents="auto",this._input.style.display="none",this._input.style.boxSizing="border-box",this._input.addEventListener("input",()=>{!this._input||this._object.onRendererInputValueChanged(this._input.value)}),this._input.addEventListener("touchstart",()=>{!this._input||document.activeElement!==this._input&&this._input.focus()}),this.updateString(),this.updateFont(),this.updatePlaceholder(),this.updateOpacity(),this.updateInputType(),this.updateTextColor(),this.updateFillColorAndOpacity(),this.updateBorderColorAndOpacity(),this.updateBorderWidth(),this.updateDisabled(),this.updateReadOnly(),this._runtimeGame.getRenderer().getDomElementContainer().appendChild(this._input)}_destroyElement(){!this._input||(this._input.remove(),this._input=null)}onScenePaused(){this._destroyElement()}onSceneResumed(){this._createElement()}onDestroy(){this._destroyElement()}updatePreRender(){if(!this._input)return;if(this._object.isHidden()){this._input.style.display="none";return}const e=this._instanceContainer.getLayer(this._object.getLayer());if(!e.isVisible()){this._input.style.display="none";return}const t=a.staticArray(s.prototype.updatePreRender),i=this._instanceContainer.getGame(),r=i.getRenderer(),u=e.convertInverseCoords(this._object.x,this._object.y,0,t),p=u[0],h=u[1],l=e.convertInverseCoords(this._object.x+this._object.getWidth(),this._object.y+this._object.getHeight(),0,t),c=l[0],d=l[1];if(c<0||d<0||p>i.getGameResolutionWidth()||h>i.getGameResolutionHeight()){this._input.style.display="none";return}t[0]=p,t[1]=h,r.convertCanvasToDomElementContainerCoords(t,t);const _=t[0],y=t[1];t[0]=c,t[1]=d,r.convertCanvasToDomElementContainerCoords(t,t);const g=t[0],b=t[1],f=g-_,C=b-y;this._input.style.left=_+"px",this._input.style.top=y+"px",this._input.style.width=f+"px",this._input.style.height=C+"px",this._input.style.transform="rotate3d(0,0,1,"+this._object.getAngle()%360+"deg)",this._input.style.fontSize=this._object.getFontSize()*r.getCanvasToDomElementContainerHeightScale()+"px",this._input.style.display="initial"}updateString(){!this._input||(this._input.value=this._object.getString())}updatePlaceholder(){!this._input||(this._input.placeholder=this._object.getPlaceholder())}updateFont(){!this._input||(this._input.style.fontFamily=this._instanceContainer.getGame().getFontManager().getFontFamily(this._object.getFontResourceName()))}updateOpacity(){!this._input||(this._input.style.opacity=""+this._object.getOpacity()/255)}updateInputType(){if(!this._input)return;const e=this._input instanceof HTMLTextAreaElement,t=this._object.getInputType()==="text area";e!==t&&(this._destroyElement(),this._createElement());const i=m[this._object.getInputType()]||"text";this._input.setAttribute("type",i)}updateTextColor(){!this._input||(this._input.style.color=n(this._object._getRawTextColor(),255))}updateFillColorAndOpacity(){!this._input||(this._input.style.backgroundColor=n(this._object._getRawFillColor(),this._object.getFillOpacity()))}updateBorderColorAndOpacity(){!this._input||(this._input.style.borderColor=n(this._object._getRawBorderColor(),this._object.getBorderOpacity()))}updateBorderWidth(){!this._input||(this._input.style.borderWidth=this._object.getBorderWidth()+"px")}updateDisabled(){!this._input||(this._input.disabled=this._object.isDisabled())}updateReadOnly(){!this._input||(this._input.readOnly=this._object.isReadOnly())}isFocused(){return this._input===document.activeElement}focus(){!this._input||this._input.focus()}}a.TextInputRuntimeObjectRenderer=s})(gdjs||(gdjs={}));
//# sourceMappingURL=textinputruntimeobject-pixi-renderer.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(r){const n=["text","email","password","number","telephone number","url","search","text area"],i=o=>{const t=o.toLowerCase();return n.includes(t)?o:"text"},s=300,l=30;class d extends r.RuntimeObject{constructor(t,e){super(t,e);this.opacity=255;this._width=s;this._height=l;this._string=e.content.initialValue,this._placeholder=e.content.placeholder,this._fontResourceName=e.content.fontResourceName,this._fontSize=e.content.fontSize||20,this._inputType=i(e.content.inputType),this._textColor=r.rgbOrHexToRGBColor(e.content.textColor),this._fillColor=r.rgbOrHexToRGBColor(e.content.fillColor),this._fillOpacity=e.content.fillOpacity,this._borderColor=r.rgbOrHexToRGBColor(e.content.borderColor),this._borderOpacity=e.content.borderOpacity,this._borderWidth=e.content.borderWidth,this._disabled=e.content.disabled,this._readOnly=e.content.readOnly,this._renderer=new r.TextInputRuntimeObjectRenderer(this,t),this.onCreated()}getRendererObject(){return null}updateFromObjectData(t,e){return t.content.initialValue!==e.content.initialValue&&this._string===t.content.initialValue&&this.setString(e.content.initialValue),t.content.placeholder!==e.content.placeholder&&this.setPlaceholder(e.content.placeholder),t.content.fontResourceName!==e.content.fontResourceName&&this.setFontResourceName(e.content.fontResourceName),t.content.fontSize!==e.content.fontSize&&this.setFontSize(e.content.fontSize),t.content.inputType!==e.content.inputType&&this.setInputType(e.content.inputType),t.content.textColor!==e.content.textColor&&this.setTextColor(e.content.textColor),t.content.fillColor!==e.content.fillColor&&this.setFillColor(e.content.fillColor),t.content.fillOpacity!==e.content.fillOpacity&&this.setFillOpacity(e.content.fillOpacity),t.content.borderColor!==e.content.borderColor&&this.setBorderColor(e.content.borderColor),t.content.borderOpacity!==e.content.borderOpacity&&this.setBorderOpacity(e.content.borderOpacity),t.content.borderWidth!==e.content.borderWidth&&this.setBorderWidth(e.content.borderWidth),t.content.disabled!==e.content.disabled&&this.setDisabled(e.content.disabled),t.content.readOnly!==e.content.readOnly&&this.setReadOnly(e.content.readOnly),!0}updatePreRender(t){this._renderer.updatePreRender()}extraInitializationFromInitialInstance(t){for(const e of t.stringProperties)e.name==="initialValue"?this.setString(e.value):e.name==="placeholder"&&this.setPlaceholder(e.value);t.customSize&&(this.setWidth(t.width),this.setHeight(t.height))}onScenePaused(t){this._renderer.onScenePaused()}onSceneResumed(t){this._renderer.onSceneResumed()}onDestroyed(){super.onDestroyed(),this._renderer.onDestroy()}setOpacity(t){this.opacity=Math.max(0,Math.min(255,t)),this._renderer.updateOpacity()}getOpacity(){return this.opacity}setSize(t,e){this.setWidth(t),this.setHeight(e)}setWidth(t){this._width=t}setHeight(t){this._height=t}getWidth(){return this._width}getHeight(){return this._height}getString(){return this.getText()}setString(t){this.setText(t)}getText(){return this._string}setText(t){t!==this._string&&(this._string=t,this._renderer.updateString())}onRendererInputValueChanged(t){this._string=t}getFontResourceName(){return this._fontResourceName}setFontResourceName(t){this._fontResourceName!==t&&(this._fontResourceName=t,this._renderer.updateFont())}getFontSize(){return this._fontSize}setFontSize(t){this._fontSize=t}getPlaceholder(){return this._placeholder}setPlaceholder(t){t!==this._placeholder&&(this._placeholder=t,this._renderer.updatePlaceholder())}getInputType(){return this._inputType}setInputType(t){const e=t.toLowerCase();e!==this._inputType&&(this._inputType=i(e),this._renderer.updateInputType())}setTextColor(t){this._textColor=r.rgbOrHexToRGBColor(t),this._renderer.updateTextColor()}getTextColor(){return this._textColor[0]+";"+this._textColor[1]+";"+this._textColor[2]}_getRawTextColor(){return this._textColor}setFillColor(t){this._fillColor=r.rgbOrHexToRGBColor(t),this._renderer.updateFillColorAndOpacity()}getFillColor(){return this._fillColor[0]+";"+this._fillColor[1]+";"+this._fillColor[2]}_getRawFillColor(){return this._fillColor}setFillOpacity(t){this._fillOpacity=Math.max(0,Math.min(255,t)),this._renderer.updateFillColorAndOpacity()}getFillOpacity(){return this._fillOpacity}setBorderColor(t){this._borderColor=r.rgbOrHexToRGBColor(t),this._renderer.updateBorderColorAndOpacity()}getBorderColor(){return this._borderColor[0]+";"+this._borderColor[1]+";"+this._borderColor[2]}_getRawBorderColor(){return this._borderColor}setBorderOpacity(t){this._borderOpacity=Math.max(0,Math.min(255,t)),this._renderer.updateBorderColorAndOpacity()}getBorderOpacity(){return this._borderOpacity}setBorderWidth(t){this._borderWidth=Math.max(0,t),this._renderer.updateBorderWidth()}getBorderWidth(){return this._borderWidth}setDisabled(t){this._disabled=t,this._renderer.updateDisabled()}isDisabled(){return this._disabled}setReadOnly(t){this._readOnly=t,this._renderer.updateReadOnly()}isReadOnly(){return this._readOnly}isFocused(){return Line truncated
//# sourceMappingURL=textinputruntimeobject.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(i){class o{constructor(e,t){this._justCreated=!0;this._object=e,this._fontManager=t.getGame().getFontManager(),this._text=new PIXI.Text(" ",{align:"left"}),this._text.anchor.x=.5,this._text.anchor.y=.5,t.getLayer("").getRenderer().addRendererObject(this._text,e.getZOrder()),this._text.text=e._str.length===0?" ":e._str,this.updateStyle(),this.updatePosition()}getRendererObject(){return this._text}ensureUpToDate(){this._justCreated&&(this._text.updateText(!1),this.updatePosition(),this._justCreated=!1)}updateStyle(){const e='"'+this._fontManager.getFontFamily(this._object._fontName)+'"',t=this._text.style;t.fontStyle=this._object._italic?"italic":"normal",t.fontWeight=this._object._bold?"bold":"normal",t.fontSize=this._object._characterSize,t.fontFamily=e,this._object._useGradient?t.fill=this._getGradientHex():t.fill=this._getColorHex(),this._object._gradientType==="LINEAR_VERTICAL"?t.fillGradientType=PIXI.TEXT_GRADIENT.LINEAR_VERTICAL:t.fillGradientType=PIXI.TEXT_GRADIENT.LINEAR_HORIZONTAL,t.align=this._object._textAlign,t.wordWrap=this._object._wrapping,t.wordWrapWidth=this._object._wrappingWidth,t.breakWords=!0,t.stroke=i.rgbToHexNumber(this._object._outlineColor[0],this._object._outlineColor[1],this._object._outlineColor[2]),t.strokeThickness=this._object._outlineThickness,t.dropShadow=this._object._shadow,t.dropShadowColor=i.rgbToHexNumber(this._object._shadowColor[0],this._object._shadowColor[1],this._object._shadowColor[2]),t.dropShadowBlur=this._object._shadowBlur,t.dropShadowAngle=this._object._shadowAngle,t.dropShadowDistance=this._object._shadowDistance,t.padding=this._object._padding,t.miterLimit=3,this.updatePosition(),this._text.dirty=!0}updatePosition(){if(this._object.isWrapping()){const e=this._object._textAlign==="right"?1:this._object._textAlign==="center"?.5:0,t=this._object.getWrappingWidth(),s=(t-this._text.width)*(e-.5);this._text.position.x=this._object.x+t/2,this._text.anchor.x=.5-s/this._text.width}else this._text.position.x=this._object.x+this._text.width/2,this._text.anchor.x=.5;this._text.position.y=this._object.y+this._text.height/2}updateAngle(){this._text.rotation=i.toRad(this._object.angle)}updateOpacity(){this._text.alpha=this._object.opacity/255}updateString(){this._text.text=this._object._str.length===0?" ":this._object._str,this._text.updateText(!1)}getWidth(){return this._text.width}getHeight(){return this._text.height}_getColorHex(){return i.rgbToHexNumber(this._object._color[0],this._object._color[1],this._object._color[2])}_getGradientHex(){const e=[];for(let t=0;t<this._object._gradient.length;t++)e.push("#"+i.rgbToHex(this._object._gradient[t][0],this._object._gradient[t][1],this._object._gradient[t][2]));return e}getScaleX(){return this._text.scale.x}getScaleY(){return this._text.scale.y}setScale(e){this._text.scale.x=e,this._text.scale.y=e}setScaleX(e){this._text.scale.x=e}setScaleY(e){this._text.scale.y=e}destroy(){this._text.destroy(!0)}}i.TextRuntimeObjectRenderer=o})(gdjs||(gdjs={}));
//# sourceMappingURL=textruntimeobject-pixi-renderer.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(s){class d extends s.RuntimeObject{constructor(t,e){super(t,e);this._useGradient=!1;this._gradient=[];this._gradientType="";this.opacity=255;this._textAlign="left";this._wrapping=!1;this._wrappingWidth=1;this._outlineThickness=0;this._outlineColor=[255,255,255];this._shadow=!1;this._shadowColor=[0,0,0];this._shadowDistance=1;this._shadowBlur=1;this._shadowAngle=0;this._padding=5;this._scaleX=1;this._scaleY=1;this._characterSize=Math.max(1,e.characterSize),this._fontName=e.font,this._bold=e.bold,this._italic=e.italic,this._underlined=e.underlined,this._color=[e.color.r,e.color.g,e.color.b],this._str=e.string,this._textAlign=e.textAlignment,this._renderer=new s.TextRuntimeObjectRenderer(this,t),this.onCreated()}updateFromObjectData(t,e){return t.characterSize!==e.characterSize&&this.setCharacterSize(e.characterSize),t.font!==e.font&&this.setFontName(e.font),t.bold!==e.bold&&this.setBold(e.bold),t.italic!==e.italic&&this.setItalic(e.italic),(t.color.r!==e.color.r||t.color.g!==e.color.g||t.color.b!==e.color.b)&&this.setColor(""+e.color.r+";"+e.color.g+";"+e.color.b),t.string!==e.string&&this.setString(e.string),t.underlined!==e.underlined?!1:(t.textAlignment!==e.textAlignment&&this.setTextAlignment(e.textAlignment),!0)}getRendererObject(){return this._renderer.getRendererObject()}update(t){this._renderer.ensureUpToDate()}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}extraInitializationFromInitialInstance(t){t.customSize?(this.setWrapping(!0),this.setWrappingWidth(t.width)):this.setWrapping(!1)}_updateTextPosition(){this.invalidateHitboxes(),this._renderer.updatePosition()}setX(t){super.setX(t),this._updateTextPosition()}setY(t){super.setY(t),this._updateTextPosition()}setAngle(t){super.setAngle(t),this._renderer.updateAngle()}setOpacity(t){t<0&&(t=0),t>255&&(t=255),this.opacity=t,this._renderer.updateOpacity()}getOpacity(){return this.opacity}getString(){return this.getText()}setString(t){this.setText(t)}getText(){return this._str}setText(t){t!==this._str&&(this._str=t,this._renderer.updateString(),this._updateTextPosition())}getCharacterSize(){return this._characterSize}setCharacterSize(t){t<=1&&(t=1),this._characterSize=t,this._renderer.updateStyle()}setFontName(t){this._fontName=t,this._renderer.updateStyle()}isBold(){return this._bold}setBold(t){this._bold=t,this._renderer.updateStyle()}isItalic(){return this._italic}setItalic(t){this._italic=t,this._renderer.updateStyle()}getWidth(){return this._wrapping?this._wrappingWidth:this._renderer.getWidth()}getHeight(){return this._renderer.getHeight()}getScaleMean(){return(Math.abs(this._scaleX)+Math.abs(this._scaleY))/2}getScale(){const t=Math.abs(this._scaleX),e=Math.abs(this._scaleY);return t===e?t:Math.sqrt(t*e)}getScaleX(){return this._scaleX}getScaleY(){return this._scaleY}setScale(t){this._scaleX===t&&this._scaleY===t||(this._scaleX=t,this._scaleY=t,this._renderer.setScale(t),this.invalidateHitboxes())}setScaleX(t){this._scaleX!==t&&(this._scaleX=t,this._renderer.setScaleX(t),this.invalidateHitboxes())}setScaleY(t){this._scaleY!==t&&(this._scaleY=t,this._renderer.setScaleY(t),this.invalidateHitboxes())}setColor(t){const e=t.split(";");e.length<3||(this._color[0]=parseInt(e[0],10),this._color[1]=parseInt(e[1],10),this._color[2]=parseInt(e[2],10),this._useGradient=!1,this._renderer.updateStyle())}getColor(){return this._color[0]+";"+this._color[1]+";"+this._color[2]}setTextAlignment(t){this._textAlign=t,this._renderer.updateStyle()}getTextAlignment(){return this._textAlign}isWrapping(){return this._wrapping}setWrapping(t){this._wrapping!==t&&(this._wrapping=t,this._renderer.updateStyle(),this.invalidateHitboxes())}getWrappingWidth(){return this._wrappingWidth}setWrappingWidth(t){t<=1&&(t=1),this._wrappingWidth!==t&&(this._wrappingWidth=t,this._renderer.updateStyle(),this.invalidateHitboxes())}setOutline(t,e){const i=t.split(";");i.length<3||(this._outlineColor[0]=parseInt(i[0],10),this._outlineColor[1]=parseInt(i[1],10),this._outlineColor[2]=parseInt(i[2],10),this._outlineThickness=e,this._renderer.updateStyle())}setShadow(t,e,i,h){const r=t.split(";");r.length<3||(this._shadowColor[0]=parseInt(r[0],10),this._shadowColor[1]=parseInt(r[1],10),this._shadowColor[2]=parseInt(r[2],10),this._shadowDistance=e,this._shadowBlur=i,this._shadowAngle=h,this._shadow=!0,this._renderer.updateStyle())}setGradient(t,e,i,h,r){const n=e.split(";"),o=i.split(";"),l=h.split(";"),a=r.split(";");this._gradient=[],n.length==3&&this._gradient.push([parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]),o.length==3&&this._gradient.push([parseInt(o[0],10),parseInt(o[1],10),parseInt(o[2],10)]),l.length==3&&this._gradient.push([parseInt(l[0],10),parseInt(l[1],10),parseInt(l[2],10)]),a.length==3&&this._gradient.push([parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)]),this._gradientType=t,this._useGradient=this._gradient.length>1,this._renderer.updateStyle()}showShadow(t){this._shadow=t,this._renderer.updateStyle()}getPadding(){return this._padding}sLine truncated
//# sourceMappingURL=textruntimeobject.js.map
@@ -0,0 +1,13 @@
/*!
* All equations are adapted from Thomas Fuchs'
* [Scripty2](https://github.com/madrobby/scripty2/blob/master/src/effects/transitions/penner.js).
*
* Based on Easing Equations (c) 2003 [Robert
* Penner](http://www.robertpenner.com/), all rights reserved. This work is
* [subject to terms](http://www.robertpenner.com/easing_terms_of_use.html).
*//*!
* TERMS OF USE - EASING EQUATIONS
* Open source under the BSD License.
* Easing Equations (c) 2003 Robert Penner, all rights reserved.
*//*! Shifty 3.0.3 - https://github.com/jeremyckahn/shifty */var gdjs;(function(t){let i;(function(u){let m;(function(a){a.ease=(e,n,b,h)=>{const r=t.evtTools.tween.easingFunctions,M=r.hasOwnProperty(e)?r[e]:r.linear;return n+(b-n)*M(h)},a.easingFunctions={linear:e=>e,easeInQuad:e=>Math.pow(e,2),easeOutQuad:e=>-(Math.pow(e-1,2)-1),easeInOutQuad:e=>(e/=.5)<1?.5*Math.pow(e,2):-.5*((e-=2)*e-2),easeInCubic:e=>Math.pow(e,3),easeOutCubic:e=>Math.pow(e-1,3)+1,easeInOutCubic:e=>(e/=.5)<1?.5*Math.pow(e,3):.5*(Math.pow(e-2,3)+2),easeInQuart:e=>Math.pow(e,4),easeOutQuart:e=>-(Math.pow(e-1,4)-1),easeInOutQuart:e=>(e/=.5)<1?.5*Math.pow(e,4):-.5*((e-=2)*Math.pow(e,3)-2),easeInQuint:e=>Math.pow(e,5),easeOutQuint:e=>Math.pow(e-1,5)+1,easeInOutQuint:e=>(e/=.5)<1?.5*Math.pow(e,5):.5*(Math.pow(e-2,5)+2),easeInSine:e=>-Math.cos(e*(Math.PI/2))+1,easeOutSine:e=>Math.sin(e*(Math.PI/2)),easeInOutSine:e=>-.5*(Math.cos(Math.PI*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>e===0?0:e===1?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(-Math.pow(2,-10*--e)+2),easeInCirc:e=>-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeOutBounce:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,easeInBack:e=>{const n=1.70158;return e*e*((n+1)*e-n)},easeOutBack:e=>{const n=1.70158;return(e=e-1)*e*((n+1)*e+n)+1},easeInOutBack:e=>{let n=1.70158;return(e/=.5)<1?.5*(e*e*(((n*=1.525)+1)*e-n)):.5*((e-=2)*e*(((n*=1.525)+1)*e+n)+2)},elastic:e=>-1*Math.pow(4,-8*e)*Math.sin((e*6-1)*(2*Math.PI)/2)+1,swingFromTo:e=>{let n=1.70158;return(e/=.5)<1?.5*(e*e*(((n*=1.525)+1)*e-n)):.5*((e-=2)*e*(((n*=1.525)+1)*e+n)+2)},swingFrom:e=>{const n=1.70158;return e*e*((n+1)*e-n)},swingTo:e=>{const n=1.70158;return(e-=1)*e*((n+1)*e+n)+1},bounce:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,bouncePast:e=>e<1/2.75?7.5625*e*e:e<2/2.75?2-(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?2-(7.5625*(e-=2.25/2.75)*e+.9375):2-(7.5625*(e-=2.625/2.75)*e+.984375),easeFromTo:e=>(e/=.5)<1?.5*Math.pow(e,4):-.5*((e-=2)*Math.pow(e,3)-2),easeFrom:e=>Math.pow(e,4),easeTo:e=>Math.pow(e,.25)}})(m=u.tween||(u.tween={}))})(i=t.evtTools||(t.evtTools={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=standard-easing-functions.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(T){function v(c){return c.setScaleX&&c.setScaleY&&c.getScaleX&&c.getScaleY}function F(c){return c.setOpacity&&c.getOpacity}function R(c){return c.setColor&&c.getColor}function P(c){return c.setCharacterSize&&c.getCharacterSize}function j(c,e,t){c/=255,e/=255,t/=255;let n=Math.max(c,e,t),i=n-Math.min(c,e,t),o=1-Math.abs(n+n-i-1),a=i&&(n===c?(e-t)/i:n===e?2+(t-c)/i:4+(c-e)/i);return[Math.round(60*(a<0?a+6:a)),Math.round((o?i/o:0)*100),Math.round((n+n-i)/2*100)]}function V(c,e,t){c=c%=360,c<0&&(c+=360),e=e/100,t=t/100;const n=e*Math.min(t,1-t),i=(o=0,a=(o+c/30)%12)=>t-n*Math.max(Math.min(a-3,9-a,1),-1);return[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)]}const g=T.evtTools.common.lerp,_=T.evtTools.common.exponentialInterpolation;class C extends T.RuntimeBehavior{constructor(e,t,n){super(e,t,n);this._tweens=new T.TweenRuntimeBehavior.TweenManager;this._isActive=!0}updateFromBehaviorData(e,t){return!0}doStepPreEvents(e){this._tweens.step()}_deleteFromScene(){this.owner.deleteFromScene(this.owner.getInstanceContainer())}addVariableTween(e,t,n,i,o,a,d){this._tweens.addSimpleTween(e,this.owner.getRuntimeScene(),a/1e3,o,g,n,i,r=>t.setNumber(r),d?()=>this._deleteFromScene():null)}addVariableTween2(e,t,n,i,o,a){this._addVariableTween(e,t,n,i,o/1e3,a,this.owner.getRuntimeScene())}addVariableTween3(e,t,n,i,o,a){this._addVariableTween(e,t,n,i,o,a,this.owner)}_addVariableTween(e,t,n,i,o,a,d){t.getType()==="number"&&this._tweens.addSimpleTween(e,d,o,i,g,t.getValue(),n,r=>t.setNumber(r),a?()=>this._deleteFromScene():null)}addValueTween(e,t,n,i,o,a,d){this._tweens.addSimpleTween(e,this.owner,o,i,a?_:g,t,n,r=>{},d?()=>this._deleteFromScene():null)}addObjectPositionTween(e,t,n,i,o,a){this._addObjectPositionTween(e,t,n,i,o/1e3,a,this.owner.getRuntimeScene())}addObjectPositionTween2(e,t,n,i,o,a){this._addObjectPositionTween(e,t,n,i,o,a,this.owner)}_addObjectPositionTween(e,t,n,i,o,a,d){this._tweens.addMultiTween(e,d,o,i,g,[this.owner.getX(),this.owner.getY()],[t,n],([r,s])=>this.owner.setPosition(r,s),a?()=>this._deleteFromScene():null)}addObjectPositionXTween(e,t,n,i,o){this._addObjectPositionXTween(e,t,n,i/1e3,o,this.owner.getRuntimeScene())}addObjectPositionXTween2(e,t,n,i,o){this._addObjectPositionXTween(e,t,n,i,o,this.owner)}_addObjectPositionXTween(e,t,n,i,o,a){this._tweens.addSimpleTween(e,a,i,n,g,this.owner.getX(),t,d=>this.owner.setX(d),o?()=>this._deleteFromScene():null)}addObjectPositionYTween(e,t,n,i,o){this._addObjectPositionYTween(e,t,n,i/1e3,o,this.owner.getRuntimeScene())}addObjectPositionYTween2(e,t,n,i,o){this._addObjectPositionYTween(e,t,n,i,o,this.owner)}_addObjectPositionYTween(e,t,n,i,o,a){this._tweens.addSimpleTween(e,a,i,n,g,this.owner.getY(),t,d=>this.owner.setY(d),o?()=>this._deleteFromScene():null)}addObjectPositionZTween(e,t,n,i,o){const{owner:a}=this;a instanceof T.RuntimeObject3D&&this._tweens.addSimpleTween(e,this.owner.getRuntimeScene(),i/1e3,n,g,a.getZ(),t,d=>a.setZ(d),o?()=>this._deleteFromScene():null)}addObjectAngleTween(e,t,n,i,o){this._addObjectAngleTween(e,t,n,i/1e3,o,this.owner.getRuntimeScene())}addObjectAngleTween2(e,t,n,i,o){this._addObjectAngleTween(e,t,n,i,o,this.owner)}_addObjectAngleTween(e,t,n,i,o,a){this._tweens.addSimpleTween(e,a,i,n,g,this.owner.getAngle(),t,d=>this.owner.setAngle(d),o?()=>this._deleteFromScene():null)}addObjectScaleTween(e,t,n,i,o,a,d){this._addObjectScaleTween(e,t,n,i,o/1e3,a,d,this.owner.getRuntimeScene(),g)}addObjectScaleTween2(e,t,n,i,o,a,d){this._addObjectScaleTween(e,t,n,i,o,a,d,this.owner,_)}_addObjectScaleTween(e,t,n,i,o,a,d,r,s){const l=this.owner;if(!v(l))return;t<0&&(t=0),n<0&&(n=0);const h=d?([u,w])=>{const b=l.getCenterXInScene(),m=l.getCenterYInScene();l.setScaleX(u),l.setScaleY(w),l.setCenterPositionInScene(b,m)}:([u,w])=>{l.setScaleX(u),l.setScaleY(w)};this._tweens.addMultiTween(e,r,o,i,s,[l.getScaleX(),l.getScaleY()],[t,n],h,a?()=>this._deleteFromScene():null)}addObjectScaleXTween(e,t,n,i,o,a){this._addObjectScaleXTween(e,t,n,i/1e3,o,a,this.owner.getRuntimeScene(),g)}addObjectScaleXTween2(e,t,n,i,o,a){this._addObjectScaleXTween(e,t,n,i,o,a,this.owner,_)}_addObjectScaleXTween(e,t,n,i,o,a,d,r){const s=this.owner;if(!v(s))return;const l=a?h=>{const u=s.getCenterXInScene();s.setScaleX(h),s.setCenterXInScene(u)}:h=>s.setScaleX(h);this._tweens.addSimpleTween(e,d,i,n,r,s.getScaleX(),t,l,o?()=>this._deleteFromScene():null)}addObjectScaleYTween(e,t,n,i,o,a){this._addObjectScaleYTween(e,t,n,i/1e3,o,a,this.owner.getRuntimeScene(),g)}addObjectScaleYTween2(e,t,n,i,o,a){this._addObjectScaleYTween(e,t,n,i,o,a,this.owner,_)}_addObjectScaleYTween(e,t,n,i,o,a,d,r){const s=this.owner;if(!v(s))return;const l=a?h=>{const u=s.getCenterYInScene();s.setScaleY(h),s.setCenterYInScene(u)}:h=>s.setScaleY(h);this._tweens.addSimpleTween(e,d,i,n,r,s.getScaleY(),t,l,o?()=>this._deleteFromScene():null)}addObjectOpacityTween(e,t,n,i,o){this._addObjectOpacityTween(e,t,n,i/1e3,o,this.owner.getRuntimeScene())}addObjectOpacityTween2(e,t,n,i,o){Line truncated
//# sourceMappingURL=tweenruntimebehavior.js.map