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

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

+5
View File
@@ -0,0 +1,5 @@
var gdjs;(function(n){class o{constructor(){this.tasksWithCallback=new Array}processTasks(e){for(let s=0;s<this.tasksWithCallback.length;s++){const i=this.tasksWithCallback[s];i.asyncTask.update(e)&&(i.callback(e),this.tasksWithCallback.splice(s--,1))}}addTask(e,s){this.tasksWithCallback.push({asyncTask:e,callback:s})}clearTasks(){this.tasksWithCallback.length=0}}n.AsyncTasksManager=o;class t{}n.AsyncTask=t;class l extends t{constructor(){super(...arguments);this.tasks=new Array}addTask(e){this.tasks.push(e)}update(e){for(let s=0;s<this.tasks.length;s++)this.tasks[s].update(e)&&this.tasks.splice(s--,1);return this.tasks.length===0}}n.TaskGroup=l;class c extends t{update(){return!0}}n.ResolveTask=c;const r=new n.Logger("Internal PromiseTask");class h extends t{constructor(e){super();this.isResolved=!1;this.promise=e.catch(s=>{r.error(`A promise error has not been handled, this should never happen!
If you are using JavaScript promises in an asynchronous action, make sure to add a .catch().
Otherwise, report this as a bug on the GDevelop forums!
${s?"The following error was thrown: "+s:""}`)}).then(()=>{this.isResolved=!0})}update(){return this.isResolved}}n.PromiseTask=h;class k extends t{constructor(){super(...arguments);this.isResolved=!1}resolve(){this.isResolved=!0}update(){return this.isResolved}}n.ManuallyResolvableTask=k})(gdjs||(gdjs={}));
//# sourceMappingURL=AsyncTasksManager.js.map
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

+2
View File
@@ -0,0 +1,2 @@
var gdjs;(function(n){class r extends n.RuntimeObject{constructor(t,e){super(t,e);this._isUntransformedHitBoxesDirty=!0;this._untransformedHitBoxes=[];this._unrotatedAABB={min:[0,0],max:[0,0]};this._scaleX=1;this._scaleY=1;this._flippedX=!1;this._flippedY=!1;this.opacity=255;this._customCenter=null;this._localTransformation=new n.AffineTransformation;this._localInverseTransformation=new n.AffineTransformation;this._isLocalTransformationDirty=!0;this._instanceContainer=new n.CustomRuntimeObjectInstanceContainer(t,this),this._instanceContainer.loadFrom(e),this.getRenderer().reinitialize(this,t)}reinitialize(t){super.reinitialize(t),this._instanceContainer.loadFrom(t),this.getRenderer().reinitialize(this,this.getParent()),this.onCreated()}updateFromObjectData(t,e){return this._instanceContainer.updateFrom(t,e)}extraInitializationFromInitialInstance(t){t.customSize&&(this.setWidth(t.width),this.setHeight(t.height))}onDeletedFromScene(t){this.onDestroy(t),super.onDeletedFromScene(t),this._instanceContainer.onDestroyFromScene(t)}update(t){this._instanceContainer._updateObjectsPreEvents(),this.doStepPreEvents(t);const e=this.getRuntimeScene().getProfiler();e&&e.begin(this.type),this.doStepPostEvents(t),e&&e.end(this.type),this._instanceContainer._updateObjectsPostEvents()}onHotReloading(t){}doStepPreEvents(t){}doStepPostEvents(t){}onDestroy(t){}updatePreRender(t){this._instanceContainer._updateObjectsPreRender(),this.getRenderer().ensureUpToDate()}getRendererObject(){return this.getRenderer().getRendererObject()}getRenderer(){return this._instanceContainer.getRenderer()}onChildrenLocationChanged(){this._isUntransformedHitBoxesDirty=!0,this.invalidateHitboxes(),this.getRenderer().update()}updateHitBoxes(){this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes();const t=this.getLocalTransformation();for(let e=0;e<this._untransformedHitBoxes.length;++e){e>=this.hitBoxes.length&&this.hitBoxes.push(new n.Polygon);for(let i=0;i<this._untransformedHitBoxes[e].vertices.length;++i)i>=this.hitBoxes[e].vertices.length&&this.hitBoxes[e].vertices.push([0,0]),t.transform(this._untransformedHitBoxes[e].vertices[i],this.hitBoxes[e].vertices[i]);this.hitBoxes[e].vertices.length=this._untransformedHitBoxes[e].vertices.length}}_updateUntransformedHitBoxes(){if(this._isUntransformedHitBoxesDirty=!1,this._untransformedHitBoxes.length=0,this._instanceContainer.getAdhocListOfAllInstances().length===0)this._unrotatedAABB.min[0]=0,this._unrotatedAABB.min[1]=0,this._unrotatedAABB.max[0]=0,this._unrotatedAABB.max[1]=0;else{let t=Number.MAX_VALUE,e=Number.MAX_VALUE,i=-Number.MAX_VALUE,s=-Number.MAX_VALUE;for(const a of this._instanceContainer.getAdhocListOfAllInstances()){if(!a.isIncludedInParentCollisionMask())continue;Array.prototype.push.apply(this._untransformedHitBoxes,a.getHitBoxes());const o=a.getAABB();t=Math.min(t,o.min[0]),e=Math.min(e,o.min[1]),i=Math.max(i,o.max[0]),s=Math.max(s,o.max[1])}for(this._unrotatedAABB.min[0]=t,this._unrotatedAABB.min[1]=e,this._unrotatedAABB.max[0]=i,this._unrotatedAABB.max[1]=s;this.hitBoxes.length<this._untransformedHitBoxes.length;)this.hitBoxes.push(new n.Polygon);this.hitBoxes.length=this._untransformedHitBoxes.length}}applyObjectTransformation(t,e,i){const s=i;s[0]=t,s[1]=e,this.getLocalTransformation().transform(s,i)}getLocalTransformation(){return this._isLocalTransformationDirty&&this._updateLocalTransformation(),this._localTransformation}getLocalInverseTransformation(){return this._isLocalTransformationDirty&&this._updateLocalTransformation(),this._localInverseTransformation}_updateLocalTransformation(){const t=Math.abs(this._scaleX),e=Math.abs(this._scaleY),i=this.getUnscaledCenterX()*t,s=this.getUnscaledCenterY()*e,a=this.angle*Math.PI/180;this._localTransformation.setToTranslation(this.x,this.y),this._localTransformation.rotateAround(a,i,s),this._flippedX&&this._localTransformation.flipX(i),this._flippedY&&this._localTransformation.flipY(s),this._localTransformation.scale(t,e),this._localInverseTransformation.copyFrom(this._localTransformation),this._localInverseTransformation.invert(),this._isLocalTransformationDirty=!1}applyObjectInverseTransformation(t,e,i){const s=i;s[0]=t,s[1]=e,this.getLocalInverseTransformation().transform(s,i)}getDrawableX(){this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes();const t=this.getScaleX();return this._flippedX?this.x+(-this._unrotatedAABB.min[0]-this.getUnscaledWidth()+2*this.getUnscaledCenterX())*t:this.x+this._unrotatedAABB.min[0]*t}getDrawableY(){this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes();const t=this.getScaleY();return this._flippedY?this.y+(-this._unrotatedAABB.min[1]-this.getUnscaledHeight()+2*this.getUnscaledCenterY())*t:this.y+this._unrotatedAABB.min[1]*t}getUnscaledWidth(){return this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),this._unrotatedAABB.max[0]-this._unrotatedAABB.min[0]}getUnscaledHeight(){return this._isUntransformedHitBoxesDirty&&this._updateUntLine truncated
//# sourceMappingURL=CustomRuntimeObject.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(i){const c=new i.Logger("CustomRuntimeObject");class u extends i.RuntimeInstanceContainer{constructor(n,t){super();this._isLoaded=!1;this._parent=n,this._customObject=t,this._runtimeScene=n.getScene(),this._renderer=new i.CustomObjectRenderer(t,this,n),this._debuggerRenderer=new i.DebuggerRenderer(this)}addLayer(n){const t=new i.RuntimeCustomObjectLayer(n,this);this._layers.put(n.name,t),this._orderedLayers.push(t)}createObject(n){const t=super.createObject(n);return this._customObject.onChildrenLocationChanged(),t}loadFrom(n){this._isLoaded&&this.onDestroyFromScene(this._parent);const t=this._runtimeScene.getGame().getEventsBasedObjectData(n.type);if(!t){c.error("loadFrom was called without an events-based object");return}for(let s=0,e=t.objects.length;s<e;++s){const r=t.objects[s];this.registerObject({...r,...n.childrenContent[r.name]})}this.addLayer({name:"",visibility:!0,cameras:[{defaultSize:!0,defaultViewport:!0,height:0,viewportBottom:0,viewportLeft:0,viewportRight:0,viewportTop:0,width:0}],effects:[],ambientLightColorR:0,ambientLightColorG:0,ambientLightColorB:0,isLightingLayer:!1,followBaseLayerCamera:!1}),this._setLayerDefaultZOrders(),this._isLoaded=!0}updateFrom(n,t){const s=this._runtimeScene.getGame().getEventsBasedObjectData(t.type);if(!s)return c.error("updateFrom was called without an events-based object"),!1;for(let e=0,r=s.objects.length;e<r;++e){const o=s.objects[e].name,a={...s.objects[e],...n.childrenContent[o]},d={...s.objects[e],...t.childrenContent[o]};this.updateObject(d);for(const l of this.getInstancesOf(o))l.updateFromObjectData(a,d)}return!0}onDestroyFromScene(n){if(!this._isLoaded)return;const t=this.getAdhocListOfAllInstances();for(let s=0,e=t.length;s<e;++s)t[s].onDeletedFromScene(this);this._destroy(),this._isLoaded=!1}_destroy(){super._destroy(),this._onceTriggers=null}_updateObjectsPreRender(){const n=this.getAdhocListOfAllInstances();for(let t=0,s=n.length;t<s;++t){const e=n[t],r=e.getRendererObject();r&&(r.visible=!e.isHidden(),r.visible&&this.getGame().getEffectsManager().updatePreRender(e.getRendererEffects(),e)),this._debugDrawEnabled&&this._debuggerRenderer.renderDebugDraw(n,this._debugDrawShowHiddenInstances,this._debugDrawShowPointsNames,this._debugDrawShowCustomPoints),e.updatePreRender(this)}}_updateObjectsPreEvents(){const n=this.getAdhocListOfAllInstances();for(let t=0,s=n.length;t<s;++t){const e=n[t],r=e.getElapsedTime();if(e.hasNoForces())e.update(this);else{const o=e.getAverageForce(),a=r/1e3;e.setX(e.getX()+o.getX()*a),e.setY(e.getY()+o.getY()*a),e.update(this),e.updateForces(a)}e.updateTimers(r),e.stepBehaviorsPreEvents(this)}this._cacheOrClearRemovedInstances()}getRenderer(){return this._renderer}getDebuggerRenderer(){return this._debuggerRenderer}getGame(){return this._runtimeScene.getGame()}getScene(){return this._runtimeScene}getViewportWidth(){return this._customObject.getUnscaledWidth()}getViewportHeight(){return this._customObject.getUnscaledHeight()}getViewportOriginX(){return this._customObject.getUnscaledCenterX()}getViewportOriginY(){return this._customObject.getUnscaledCenterY()}onChildrenLocationChanged(){this._customObject.onChildrenLocationChanged()}convertCoords(n,t,s){let e=s||[0,0];return e=this._parent.getLayer(this._customObject.getLayer()).convertCoords(n,t,0,e),this._customObject.applyObjectInverseTransformation(e[0],e[1],e),e}convertInverseCoords(n,t,s){const e=s||[0,0];return this._customObject.applyObjectTransformation(n,t,e),this._parent.convertInverseCoords(e[0],e[1],e)}getElapsedTime(){return this._parent.getElapsedTime()}}i.CustomRuntimeObjectInstanceContainer=u})(gdjs||(gdjs={}));
//# sourceMappingURL=CustomRuntimeObjectInstanceContainer.js.map
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

+2
View File
@@ -0,0 +1,2 @@
var gdjs;(function(i){const d=new i.Logger("Model3DManager");class l{constructor(r,e){this._loadedThreeModels=new Map;this._loader=null;this._dracoLoader=null;if(this._resources=new Map,this.setResources(r),this._resourcesLoader=e,typeof THREE!="undefined"){this._loader=new THREE_ADDONS.GLTFLoader,this._dracoLoader=new THREE_ADDONS.DRACOLoader,this._dracoLoader.setDecoderPath("./pixi-renderers/draco/gltf/"),this._loader.setDRACOLoader(this._dracoLoader);const s=new THREE.Group;s.add(new THREE.Mesh(new THREE.BoxGeometry(1,1,1),new THREE.MeshBasicMaterial({color:"#ff00ff"}))),this._invalidModel={scene:s,animations:[],cameras:[],scenes:[],asset:{},userData:{},parser:null}}}setResources(r){this._resources.clear();for(const e of r)e.kind==="model3D"&&this._resources.set(e.name,e)}async loadModels(r){const e=this._loader;if(this._resources.size===0||!e)return 0;let s=0;return await Promise.all([...this._resources.values()].map(async o=>{const t=this._resourcesLoader.getFullUrl(o.file);e.withCredentials=this._resourcesLoader.checkIfCredentialsRequired(t);try{const a=await e.loadAsync(t,c=>{});this._loadedThreeModels.set(o.name,a)}catch(a){d.error("Can't fetch the 3D model file "+o.file+", error: "+a)}s++,r(s,this._resources.size)})),s}getModel(r){return this._loadedThreeModels.get(r)||this._invalidModel}}i.Model3DManager=l})(gdjs||(gdjs={}));
//# sourceMappingURL=Model3DManager.js.map
Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

@@ -0,0 +1,2 @@
var gdjs;(function(o){class n extends o.RuntimeLayer{constructor(e,a){super(e,a);this._renderer.onCreated()}onGameResolutionResized(e,a){}getCameraX(e){return 0}getCameraY(e){return 0}setCameraX(e,a){}setCameraY(e,a){}getCameraWidth(e){return 0}getCameraHeight(e){return 0}setCameraZoom(e,a){}getCameraZoom(e){return 1}setCameraZ(e,a,r){}getCameraZ(e=45,a){return 0}getCameraRotation(e){return 0}setCameraRotation(e,a){}convertCoords(e,a,r,t){return this._runtimeScene.convertCoords(e,a,t||[0,0])}convertInverseCoords(e,a,r,t){return this._runtimeScene.convertInverseCoords(e,a,t||[0,0])}applyLayerInverseTransformation(e,a,r,t){return t[0]=e,t[1]=a,t}applyLayerTransformation(e,a,r,t){return t[0]=e,t[1]=a,t}}o.RuntimeCustomObjectLayer=n})(gdjs||(gdjs={}));
//# sourceMappingURL=RuntimeCustomObjectLayer.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(l){const d=new l.Logger("RuntimeInstanceContainer");class u{constructor(){this._allInstancesList=[];this._allInstancesListIsUpToDate=!0;this._instancesRemoved=[];this._layersCameraCoordinates={};this._debugDrawEnabled=!1;this._debugDrawShowHiddenInstances=!1;this._debugDrawShowPointsNames=!1;this._debugDrawShowCustomPoints=!1;this._initialBehaviorSharedData=new Hashtable,this._instances=new Hashtable,this._instancesCache=new Hashtable,this._objects=new Hashtable,this._objectsCtor=new Hashtable,this._layers=new Hashtable,this._orderedLayers=[]}enableDebugDraw(e,t,s,n){this._debugDrawEnabled&&!e&&this.getDebuggerRenderer().clearDebugDraw(),this._debugDrawEnabled=e,this._debugDrawShowHiddenInstances=t,this._debugDrawShowPointsNames=s,this._debugDrawShowCustomPoints=n}isObjectRegistered(e){return this._objects.containsKey(e)&&this._instances.containsKey(e)&&this._objectsCtor.containsKey(e)}registerObject(e){this._objects.put(e.name,e),this._instances.put(e.name,[]);const t=l.getObjectConstructor(e.type);this._objectsCtor.put(e.name,t),t.supportsReinitialization&&this._instancesCache.put(e.name,[])}updateObject(e){this.isObjectRegistered(e.name)||d.warn("Tried to call updateObject for an object that was not registered ("+e.name+"). Call registerObject first."),this._objects.put(e.name,e)}unregisterObject(e){const t=this._instances.get(e);if(t){const s=t.slice();for(let n=0;n<s.length;n++)this.markObjectForDeletion(s[n]);this._cacheOrClearRemovedInstances()}this._objects.remove(e),this._instances.remove(e),this._instancesCache.remove(e),this._objectsCtor.remove(e)}createObjectsFrom(e,t,s,n,a){let i,o;arguments.length===5?(i=n,o=a):(i=0,o=arguments[3]);for(let h=0,g=e.length;h<g;++h){const r=e[h],_=r.name,c=this.createObject(_);c!==null&&(o&&(c.persistentUuid=r.persistentUuid||null),c.setPosition(r.x+t,r.y+s),c.setAngle(r.angle),l.RuntimeObject3D&&c instanceof l.RuntimeObject3D&&(r.z!==void 0&&c.setZ(r.z+i),r.rotationX!==void 0&&c.setRotationX(r.rotationX),r.rotationY!==void 0&&c.setRotationY(r.rotationY)),c.setZOrder(r.zOrder),c.setLayer(r.layer),c.getVariables().initFrom(r.initialVariables,!0),c.extraInitializationFromInitialInstance(r))}}getInitialSharedDataForBehavior(e){return this._initialBehaviorSharedData.get(e)}setInitialSharedDataForBehavior(e,t){this._initialBehaviorSharedData.put(e,t)}_setLayerDefaultZOrders(){if(this.getGame().getGameData().properties.useDeprecatedZeroAsDefaultZOrder)return;const e={},t=this.getAdhocListOfAllInstances();for(let s=0,n=t.length;s<n;++s){const a=t[s];let i=a.getLayer();const o=a.getZOrder();(e[i]===void 0||e[i]<o)&&(e[i]=o)}for(let s in e)this.getLayer(s).setDefaultZOrder(e[s]+1)}_updateLayersCameraCoordinates(e){this._layersCameraCoordinates=this._layersCameraCoordinates||{};for(const t in this._layers.items)if(this._layers.items.hasOwnProperty(t)){const s=this._layers.items[t];this._layersCameraCoordinates[t]=this._layersCameraCoordinates[t]||[0,0,0,0],this._layersCameraCoordinates[t][0]=s.getCameraX()-s.getCameraWidth()/2*e,this._layersCameraCoordinates[t][1]=s.getCameraY()-s.getCameraHeight()/2*e,this._layersCameraCoordinates[t][2]=s.getCameraX()+s.getCameraWidth()/2*e,this._layersCameraCoordinates[t][3]=s.getCameraY()+s.getCameraHeight()/2*e}}_updateLayersPreRender(){for(const e of this._orderedLayers)e.updatePreRender(this)}_updateObjectsPreRender(){const e=this.getAdhocListOfAllInstances();for(let t=0,s=e.length;t<s;++t){const n=e[t],a=n.getRendererObject();a&&(a.visible=!n.isHidden(),a.visible&&this.getGame().getEffectsManager().updatePreRender(n.getRendererEffects(),n)),n.updatePreRender(this)}}_cacheOrClearRemovedInstances(){for(let e=0,t=this._instancesRemoved.length;e<t;++e){const s=this._instancesRemoved[e],n=this._instancesCache.get(s.getName());n&&n.length<128&&n.push(s),s.onDestroyed()}this._instancesRemoved.length=0}_constructListOfAllInstances(){let e=0;for(const t in this._instances.items)if(this._instances.items.hasOwnProperty(t)){const s=this._instances.items[t],n=e;e+=s.length;for(let a=0,i=s.length;a<i;++a)n+a<this._allInstancesList.length?this._allInstancesList[n+a]=s[a]:this._allInstancesList.push(s[a])}this._allInstancesList.length=e,this._allInstancesListIsUpToDate=!0}getInstancesOf(e){return this._instances.items[e]}getAdhocListOfAllInstances(){return this._allInstancesListIsUpToDate||this._constructListOfAllInstances(),this._allInstancesList}_updateObjectsPreEvents(){const e=this.getAdhocListOfAllInstances();for(let t=0,s=e.length;t<s;++t){const n=e[t],a=n.getElapsedTime();if(n.hasNoForces())n.update(this);else{const i=n.getAverageForce(),o=a/1e3;n.setX(n.getX()+i.getX()*o),n.setY(n.getY()+i.getY()*o),n.update(this),n.updateForces(o)}n.updateTimers(a),e[t].stepBehaviorsPreEvents(this)}this._cacheOrClearRemovedInstances()}_updateObjectsPostEvents(){this._cacheOrClearRemovedInstances();const e=this.getAdhocListOfAllInstances();for(let t=0,s=e.length;t<s;++t)e[t].stepBehaviorsPostEvents(this);this._cacheOrClearRemovedInstanceLine truncated
//# sourceMappingURL=RuntimeInstanceContainer.js.map
+2
View File
@@ -0,0 +1,2 @@
var gdjs;(function(n){let r;(function(t){t[t.TWO_D=0]="TWO_D",t[t.THREE_D=1]="THREE_D",t[t.TWO_D_PLUS_THREE_D=2]="TWO_D_PLUS_THREE_D"})(r=n.RuntimeLayerRenderingType||(n.RuntimeLayerRenderingType={}));const s=i=>i==="3d"?1:i==="2d+3d"||i===""?2:0;class o{constructor(e,a){this._timeScale=1;this._defaultZOrder=0;this._rendererEffects={};this._name=e.name,this._renderingType=s(e.renderingType),this._hidden=!e.visibility,this._initialCamera3DFieldOfView=e.camera3DFieldOfView||45,this._initialCamera3DFarPlaneDistance=e.camera3DFarPlaneDistance||.1,this._initialCamera3DNearPlaneDistance=e.camera3DNearPlaneDistance||2e3,this._initialEffectsData=e.effects||[],this._runtimeScene=a,this._effectsManager=a.getGame().getEffectsManager(),this._isLightingLayer=e.isLightingLayer,this._followBaseLayerCamera=e.followBaseLayerCamera,this._clearColor=[e.ambientLightColorR/255,e.ambientLightColorG/255,e.ambientLightColorB/255,1],this._renderer=new n.LayerRenderer(this,a.getRenderer(),a.getGame().getRenderer()),this.show(!this._hidden);for(let t=0;t<e.effects.length;++t)this.addEffect(e.effects[t])}getRenderer(){return this._renderer}getRendererObject(){return this._renderer.getRendererObject()}get3DRendererObject(){return this._renderer.getThreeScene()}getRenderingType(){return this._renderingType}getDefaultZOrder(){return this._defaultZOrder}setDefaultZOrder(e){this._defaultZOrder=e}getRuntimeScene(){return this._runtimeScene.getScene()}updatePreRender(e){this._followBaseLayerCamera&&this.followBaseLayer(),this._renderer.updatePreRender(),this._effectsManager.updatePreRender(this._rendererEffects,this)}getName(){return this._name}show(e){this._hidden=!e,this._renderer.updateVisibility(e)}isVisible(){return!this._hidden}getWidth(){return this._runtimeScene.getViewportWidth()}getHeight(){return this._runtimeScene.getViewportHeight()}getInitialCamera3DFieldOfView(){return this._initialCamera3DFieldOfView}getInitialCamera3DNearPlaneDistance(){return this._initialCamera3DNearPlaneDistance}getInitialCamera3DFarPlaneDistance(){return this._initialCamera3DFarPlaneDistance}getInitialEffectsData(){return this._initialEffectsData}addEffect(e){this._effectsManager.addEffect(e,this._rendererEffects,this)}removeEffect(e){this._effectsManager.removeEffect(this._rendererEffects,this,e)}setEffectDoubleParameter(e,a,t){this._effectsManager.setEffectDoubleParameter(this._rendererEffects,e,a,t)}setEffectStringParameter(e,a,t){this._effectsManager.setEffectStringParameter(this._rendererEffects,e,a,t)}setEffectBooleanParameter(e,a,t){this._effectsManager.setEffectBooleanParameter(this._rendererEffects,e,a,t)}enableEffect(e,a){this._effectsManager.enableEffect(this._rendererEffects,this,e,a)}isEffectEnabled(e){return this._effectsManager.isEffectEnabled(this._rendererEffects,this,e)}hasEffect(e){return this._effectsManager.hasEffect(this._rendererEffects,e)}setTimeScale(e){e>=0&&(this._timeScale=e)}getTimeScale(){return this._timeScale}getElapsedTime(e){return(e||this._runtimeScene).getElapsedTime()*this._timeScale}followBaseLayer(){const e=this._runtimeScene.getLayer("");this.setCameraX(e.getCameraX()),this.setCameraY(e.getCameraY()),this.setCameraRotation(e.getCameraRotation()),this.setCameraZoom(e.getCameraZoom())}getClearColor(){return this._clearColor}setClearColor(e,a,t){this._clearColor[0]=e/255,this._clearColor[1]=a/255,this._clearColor[2]=t/255,this._renderer.updateClearColor()}setFollowBaseLayerCamera(e){this._followBaseLayerCamera=e}isLightingLayer(){return this._isLightingLayer}}n.RuntimeLayer=o})(gdjs||(gdjs={}));
//# sourceMappingURL=RuntimeLayer.js.map
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

+2
View File
@@ -0,0 +1,2 @@
var gdjs;(function(c){class y{constructor(){this.matrix=new Float32Array([1,0,0,1,0,0])}setToIdentity(){const o=this.matrix;o[0]=1,o[1]=0,o[2]=0,o[3]=1,o[4]=0,o[5]=0}isIdentity(){const o=this.matrix;return o[0]===1&&o[1]===0&&o[2]===0&&o[3]===1&&o[4]===0&&o[5]===0}equals(o){const t=this.matrix,a=o.matrix;return this===o||t[0]===a[0]&&t[1]===a[1]&&t[2]===a[2]&&t[3]===a[3]&&t[4]===a[4]&&t[5]===a[5]}nearlyEquals(o,t){const a=this.matrix,s=o.matrix;return this===o||c.nearlyEqual(a[0],s[0],t)&&c.nearlyEqual(a[1],s[1],t)&&c.nearlyEqual(a[2],s[2],t)&&c.nearlyEqual(a[3],s[3],t)&&c.nearlyEqual(a[4],s[4],t)&&c.nearlyEqual(a[5],s[5],t)}copyFrom(o){const t=this.matrix,a=o.matrix;return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t[4]=a[4],t[5]=a[5],this}setToTranslation(o,t){const a=this.matrix;a[0]=1,a[1]=0,a[2]=0,a[3]=1,a[4]=o,a[5]=t}translate(o,t){var a=this.matrix;a[4]=a[0]*o+a[2]*t+a[4],a[5]=a[1]*o+a[3]*t+a[5]}setToScale(o,t){const a=this.matrix;a[0]=o,a[1]=0,a[2]=0,a[3]=t,a[4]=0,a[5]=0}scale(o,t){const a=this.matrix;a[0]*=o,a[1]*=o,a[2]*=t,a[3]*=t}setToRotation(o){const t=this.matrix;let a=Math.cos(o),s=Math.sin(o);(a===-1||a===1)&&(s=0),(s===-1||s===1)&&(a=0),t[0]=a,t[1]=s,t[2]=-s,t[3]=a,t[4]=0,t[5]=0}rotate(o){const t=this.matrix;let a=Math.cos(o),s=Math.sin(o);(a===-1||a===1)&&(s=0),(s===-1||s===1)&&(a=0);const i=t[0],n=t[1],m=t[2],r=t[3];t[0]=i*a+m*s,t[1]=n*a+r*s,t[2]=i*-s+m*a,t[3]=n*-s+r*a}setToRotationAround(o,t,a){const s=this.matrix;let i=Math.cos(o),n=Math.sin(o);(i===-1||i===1)&&(n=0),(n===-1||n===1)&&(i=0),s[0]=i,s[1]=n,s[2]=-n,s[3]=i,s[4]=t-t*i+a*n,s[5]=a-t*n+a*i}rotateAround(o,t,a){this.translate(t,a),this.rotate(o),this.translate(-t,-a)}setToFlipX(o){const t=this.matrix;t[0]=-1,t[1]=0,t[2]=0,t[3]=1,t[4]=2*o,t[5]=0}flipX(o){this.translate(o,0),this.scale(-1,1),this.translate(-o,0)}setToFlipY(o){const t=this.matrix;t[0]=-1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=2*o}flipY(o){this.translate(0,o),this.scale(1,-1),this.translate(0,-o)}concatenate(o){const t=this.matrix,a=o.matrix,s=t[0],i=t[1],n=t[2],m=t[3],r=t[4],h=t[5],l=a[0],e=a[1],x=a[2],f=a[3],u=a[4],T=a[5];t[0]=l*s+e*n,t[1]=l*i+e*m,t[2]=x*s+f*n,t[3]=x*i+f*m,t[4]=u*s+T*n+r,t[5]=u*i+T*m+h}preConcatenate(o){const t=this.matrix,a=o.matrix,s=t[0],i=t[1],n=t[2],m=t[3],r=t[4],h=t[5],l=a[0],e=a[1],x=a[2],f=a[3],u=a[4],T=a[5];t[0]=s*l+i*x,t[1]=s*e+i*f,t[2]=n*l+m*x,t[3]=n*e+m*f,t[4]=r*l+h*x+u,t[5]=r*e+h*f+T}transform(o,t){const a=this.matrix,s=a[0]*o[0]+a[2]*o[1]+a[4],i=a[1]*o[0]+a[3]*o[1]+a[5];t[0]=s,t[1]=i}invert(){const o=this.matrix,t=o[0],a=o[1],s=o[2],i=o[3],n=o[4],m=o[5],r=t*i-a*s;return o[0]=i/r,o[1]=-a/r,o[2]=-s/r,o[3]=t/r,o[4]=(s*m-i*n)/r,o[5]=-(t*m-a*n)/r,this}toString(){const o=this.matrix;return`[[${o[0]} ${o[1]}] [${o[2]} ${o[3]}] [${o[4]} ${o[5]}]]`}}c.AffineTransformation=y})(gdjs||(gdjs={}));
//# sourceMappingURL=affinetransformation.js.map
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

+990
View File
@@ -0,0 +1,990 @@
gdjs.GameCode = {};
gdjs.GameCode.GDDustObjects1= [];
gdjs.GameCode.GDDustObjects2= [];
gdjs.GameCode.GDDustObjects3= [];
gdjs.GameCode.GDDustObjects4= [];
gdjs.GameCode.GDCoinPickUpObjects1= [];
gdjs.GameCode.GDCoinPickUpObjects2= [];
gdjs.GameCode.GDCoinPickUpObjects3= [];
gdjs.GameCode.GDCoinPickUpObjects4= [];
gdjs.GameCode.GDBestTimeTextObjects1= [];
gdjs.GameCode.GDBestTimeTextObjects2= [];
gdjs.GameCode.GDBestTimeTextObjects3= [];
gdjs.GameCode.GDBestTimeTextObjects4= [];
gdjs.GameCode.GDRemainingTextObjects1= [];
gdjs.GameCode.GDRemainingTextObjects2= [];
gdjs.GameCode.GDRemainingTextObjects3= [];
gdjs.GameCode.GDRemainingTextObjects4= [];
gdjs.GameCode.GDTimeTextObjects1= [];
gdjs.GameCode.GDTimeTextObjects2= [];
gdjs.GameCode.GDTimeTextObjects3= [];
gdjs.GameCode.GDTimeTextObjects4= [];
gdjs.GameCode.GDTutorialTextObjects1= [];
gdjs.GameCode.GDTutorialTextObjects2= [];
gdjs.GameCode.GDTutorialTextObjects3= [];
gdjs.GameCode.GDTutorialTextObjects4= [];
gdjs.GameCode.GDSteeringJoystickObjects1= [];
gdjs.GameCode.GDSteeringJoystickObjects2= [];
gdjs.GameCode.GDSteeringJoystickObjects3= [];
gdjs.GameCode.GDSteeringJoystickObjects4= [];
gdjs.GameCode.GDPedalJoystickObjects1= [];
gdjs.GameCode.GDPedalJoystickObjects2= [];
gdjs.GameCode.GDPedalJoystickObjects3= [];
gdjs.GameCode.GDPedalJoystickObjects4= [];
gdjs.GameCode.GDPlayerObjects1= [];
gdjs.GameCode.GDPlayerObjects2= [];
gdjs.GameCode.GDPlayerObjects3= [];
gdjs.GameCode.GDPlayerObjects4= [];
gdjs.GameCode.GDLargeBuildingFObjects1= [];
gdjs.GameCode.GDLargeBuildingFObjects2= [];
gdjs.GameCode.GDLargeBuildingFObjects3= [];
gdjs.GameCode.GDLargeBuildingFObjects4= [];
gdjs.GameCode.GDLargeBuildingAObjects1= [];
gdjs.GameCode.GDLargeBuildingAObjects2= [];
gdjs.GameCode.GDLargeBuildingAObjects3= [];
gdjs.GameCode.GDLargeBuildingAObjects4= [];
gdjs.GameCode.GDSuvLuxuryObjects1= [];
gdjs.GameCode.GDSuvLuxuryObjects2= [];
gdjs.GameCode.GDSuvLuxuryObjects3= [];
gdjs.GameCode.GDSuvLuxuryObjects4= [];
gdjs.GameCode.GDVanObjects1= [];
gdjs.GameCode.GDVanObjects2= [];
gdjs.GameCode.GDVanObjects3= [];
gdjs.GameCode.GDVanObjects4= [];
gdjs.GameCode.GDCoinObjects1= [];
gdjs.GameCode.GDCoinObjects2= [];
gdjs.GameCode.GDCoinObjects3= [];
gdjs.GameCode.GDCoinObjects4= [];
gdjs.GameCode.GDArrowObjects1= [];
gdjs.GameCode.GDArrowObjects2= [];
gdjs.GameCode.GDArrowObjects3= [];
gdjs.GameCode.GDArrowObjects4= [];
gdjs.GameCode.GDRoadStraightObjects1= [];
gdjs.GameCode.GDRoadStraightObjects2= [];
gdjs.GameCode.GDRoadStraightObjects3= [];
gdjs.GameCode.GDRoadStraightObjects4= [];
gdjs.GameCode.GDRoadCrossroadPathObjects1= [];
gdjs.GameCode.GDRoadCrossroadPathObjects2= [];
gdjs.GameCode.GDRoadCrossroadPathObjects3= [];
gdjs.GameCode.GDRoadCrossroadPathObjects4= [];
gdjs.GameCode.GDRoadIntersectionPathObjects1= [];
gdjs.GameCode.GDRoadIntersectionPathObjects2= [];
gdjs.GameCode.GDRoadIntersectionPathObjects3= [];
gdjs.GameCode.GDRoadIntersectionPathObjects4= [];
gdjs.GameCode.GDRoadBendObjects1= [];
gdjs.GameCode.GDRoadBendObjects2= [];
gdjs.GameCode.GDRoadBendObjects3= [];
gdjs.GameCode.GDRoadBendObjects4= [];
gdjs.GameCode.GDCommonTree1Objects1= [];
gdjs.GameCode.GDCommonTree1Objects2= [];
gdjs.GameCode.GDCommonTree1Objects3= [];
gdjs.GameCode.GDCommonTree1Objects4= [];
gdjs.GameCode.GDGrassObjects1= [];
gdjs.GameCode.GDGrassObjects2= [];
gdjs.GameCode.GDGrassObjects3= [];
gdjs.GameCode.GDGrassObjects4= [];
gdjs.GameCode.GDCameraTargetObjects1= [];
gdjs.GameCode.GDCameraTargetObjects2= [];
gdjs.GameCode.GDCameraTargetObjects3= [];
gdjs.GameCode.GDCameraTargetObjects4= [];
gdjs.GameCode.mapOfEmptyGDCoinObjects = Hashtable.newFrom({"Coin": []});
gdjs.GameCode.eventsList0 = function(runtimeScene) {
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = !(gdjs.evtTools.systemInfo.isMobile());
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("PedalJoystick"), gdjs.GameCode.GDPedalJoystickObjects2);
gdjs.copyArray(runtimeScene.getObjects("SteeringJoystick"), gdjs.GameCode.GDSteeringJoystickObjects2);
{for(var i = 0, len = gdjs.GameCode.GDSteeringJoystickObjects2.length ;i < len;++i) {
gdjs.GameCode.GDSteeringJoystickObjects2[i].deleteFromScene(runtimeScene);
}
}{for(var i = 0, len = gdjs.GameCode.GDPedalJoystickObjects2.length ;i < len;++i) {
gdjs.GameCode.GDPedalJoystickObjects2[i].deleteFromScene(runtimeScene);
}
}}
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.systemInfo.isMobile();
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("TutorialText"), gdjs.GameCode.GDTutorialTextObjects1);
{for(var i = 0, len = gdjs.GameCode.GDTutorialTextObjects1.length ;i < len;++i) {
gdjs.GameCode.GDTutorialTextObjects1[i].deleteFromScene(runtimeScene);
}
}}
}
};gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDPlayerObjects1Objects = Hashtable.newFrom({"Player": gdjs.GameCode.GDPlayerObjects1});
gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDRoadStraightObjects1ObjectsGDgdjs_9546GameCode_9546GDRoadCrossroadPathObjects1ObjectsGDgdjs_9546GameCode_9546GDRoadIntersectionPathObjects1ObjectsGDgdjs_9546GameCode_9546GDRoadBendObjects1Objects = Hashtable.newFrom({"RoadStraight": gdjs.GameCode.GDRoadStraightObjects1, "RoadCrossroadPath": gdjs.GameCode.GDRoadCrossroadPathObjects1, "RoadIntersectionPath": gdjs.GameCode.GDRoadIntersectionPathObjects1, "RoadBend": gdjs.GameCode.GDRoadBendObjects1});
gdjs.GameCode.eventsList1 = function(runtimeScene) {
{
let isConditionTrue_0 = false;
{
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
{for(var i = 0, len = gdjs.GameCode.GDPlayerObjects2.length ;i < len;++i) {
gdjs.GameCode.GDPlayerObjects2[i].returnVariable(gdjs.GameCode.GDPlayerObjects2[i].getVariables().get("Force")).setNumber(0);
}
}}
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.input.isKeyPressed(runtimeScene, "Down");
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
{for(var i = 0, len = gdjs.GameCode.GDPlayerObjects2.length ;i < len;++i) {
gdjs.GameCode.GDPlayerObjects2[i].returnVariable(gdjs.GameCode.GDPlayerObjects2[i].getVariables().get("Force")).setNumber(-(4));
}
}}
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.input.isKeyPressed(runtimeScene, "Up");
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
{for(var i = 0, len = gdjs.GameCode.GDPlayerObjects2.length ;i < len;++i) {
gdjs.GameCode.GDPlayerObjects2[i].returnVariable(gdjs.GameCode.GDPlayerObjects2[i].getVariables().get("Force")).setNumber(6);
}
}}
}
{
gdjs.copyArray(runtimeScene.getObjects("PedalJoystick"), gdjs.GameCode.GDPedalJoystickObjects2);
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
for (var i = 0, k = 0, l = gdjs.GameCode.GDPedalJoystickObjects2.length;i<l;++i) {
if ( gdjs.GameCode.GDPedalJoystickObjects2[i].IsDirectionPushed4Way("Down", (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined)) ) {
isConditionTrue_0 = true;
gdjs.GameCode.GDPedalJoystickObjects2[k] = gdjs.GameCode.GDPedalJoystickObjects2[i];
++k;
}
}
gdjs.GameCode.GDPedalJoystickObjects2.length = k;
if (isConditionTrue_0) {
/* Reuse gdjs.GameCode.GDPedalJoystickObjects2 */
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
{for(var i = 0, len = gdjs.GameCode.GDPlayerObjects2.length ;i < len;++i) {
gdjs.GameCode.GDPlayerObjects2[i].returnVariable(gdjs.GameCode.GDPlayerObjects2[i].getVariables().get("Force")).setNumber(-(4) * (( gdjs.GameCode.GDPedalJoystickObjects2.length === 0 ) ? 0 :gdjs.GameCode.GDPedalJoystickObjects2[0].StickForce((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined))));
}
}}
}
{
gdjs.copyArray(runtimeScene.getObjects("PedalJoystick"), gdjs.GameCode.GDPedalJoystickObjects2);
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
for (var i = 0, k = 0, l = gdjs.GameCode.GDPedalJoystickObjects2.length;i<l;++i) {
if ( gdjs.GameCode.GDPedalJoystickObjects2[i].IsDirectionPushed4Way("Up", (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined)) ) {
isConditionTrue_0 = true;
gdjs.GameCode.GDPedalJoystickObjects2[k] = gdjs.GameCode.GDPedalJoystickObjects2[i];
++k;
}
}
gdjs.GameCode.GDPedalJoystickObjects2.length = k;
if (isConditionTrue_0) {
/* Reuse gdjs.GameCode.GDPedalJoystickObjects2 */
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
{for(var i = 0, len = gdjs.GameCode.GDPlayerObjects2.length ;i < len;++i) {
gdjs.GameCode.GDPlayerObjects2[i].returnVariable(gdjs.GameCode.GDPlayerObjects2[i].getVariables().get("Force")).setNumber(6 * (( gdjs.GameCode.GDPedalJoystickObjects2.length === 0 ) ? 0 :gdjs.GameCode.GDPedalJoystickObjects2[0].StickForce((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined))));
}
}}
}
{
let isConditionTrue_0 = false;
{
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
{for(var i = 0, len = gdjs.GameCode.GDPlayerObjects2.length ;i < len;++i) {
gdjs.GameCode.GDPlayerObjects2[i].getBehavior("Physics2").applyPolarForce((gdjs.GameCode.GDPlayerObjects2[i].getAngle()), (gdjs.RuntimeObject.getVariableNumber(gdjs.GameCode.GDPlayerObjects2[i].getVariables().get("Force"))), (gdjs.GameCode.GDPlayerObjects2[i].getCenterXInScene()), (gdjs.GameCode.GDPlayerObjects2[i].getCenterYInScene()));
}
}}
}
{
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.input.isKeyPressed(runtimeScene, "Right");
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
{for(var i = 0, len = gdjs.GameCode.GDPlayerObjects2.length ;i < len;++i) {
gdjs.GameCode.GDPlayerObjects2[i].getBehavior("Physics2").applyTorque(0.002 * (gdjs.GameCode.GDPlayerObjects2[i].getBehavior("Physics2").getLinearVelocityLength()) * gdjs.evtTools.common.sign((gdjs.RuntimeObject.getVariableNumber(gdjs.GameCode.GDPlayerObjects2[i].getVariables().get("Force")))));
}
}}
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.input.isKeyPressed(runtimeScene, "Left");
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
{for(var i = 0, len = gdjs.GameCode.GDPlayerObjects2.length ;i < len;++i) {
gdjs.GameCode.GDPlayerObjects2[i].getBehavior("Physics2").applyTorque(-(0.002) * (gdjs.GameCode.GDPlayerObjects2[i].getBehavior("Physics2").getLinearVelocityLength()) * gdjs.evtTools.common.sign((gdjs.RuntimeObject.getVariableNumber(gdjs.GameCode.GDPlayerObjects2[i].getVariables().get("Force")))));
}
}}
}
{
gdjs.copyArray(runtimeScene.getObjects("SteeringJoystick"), gdjs.GameCode.GDSteeringJoystickObjects2);
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
for (var i = 0, k = 0, l = gdjs.GameCode.GDSteeringJoystickObjects2.length;i<l;++i) {
if ( gdjs.GameCode.GDSteeringJoystickObjects2[i].IsDirectionPushed4Way("Right", (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined)) ) {
isConditionTrue_0 = true;
gdjs.GameCode.GDSteeringJoystickObjects2[k] = gdjs.GameCode.GDSteeringJoystickObjects2[i];
++k;
}
}
gdjs.GameCode.GDSteeringJoystickObjects2.length = k;
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
/* Reuse gdjs.GameCode.GDSteeringJoystickObjects2 */
{for(var i = 0, len = gdjs.GameCode.GDPlayerObjects2.length ;i < len;++i) {
gdjs.GameCode.GDPlayerObjects2[i].getBehavior("Physics2").applyTorque(0.002 * (gdjs.GameCode.GDPlayerObjects2[i].getBehavior("Physics2").getLinearVelocityLength()) * gdjs.evtTools.common.sign((gdjs.RuntimeObject.getVariableNumber(gdjs.GameCode.GDPlayerObjects2[i].getVariables().get("Force")))) * (( gdjs.GameCode.GDSteeringJoystickObjects2.length === 0 ) ? 0 :gdjs.GameCode.GDSteeringJoystickObjects2[0].StickForce((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined))));
}
}}
}
{
gdjs.copyArray(runtimeScene.getObjects("SteeringJoystick"), gdjs.GameCode.GDSteeringJoystickObjects2);
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
for (var i = 0, k = 0, l = gdjs.GameCode.GDSteeringJoystickObjects2.length;i<l;++i) {
if ( gdjs.GameCode.GDSteeringJoystickObjects2[i].IsDirectionPushed4Way("Left", (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined)) ) {
isConditionTrue_0 = true;
gdjs.GameCode.GDSteeringJoystickObjects2[k] = gdjs.GameCode.GDSteeringJoystickObjects2[i];
++k;
}
}
gdjs.GameCode.GDSteeringJoystickObjects2.length = k;
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
/* Reuse gdjs.GameCode.GDSteeringJoystickObjects2 */
{for(var i = 0, len = gdjs.GameCode.GDPlayerObjects2.length ;i < len;++i) {
gdjs.GameCode.GDPlayerObjects2[i].getBehavior("Physics2").applyTorque(-(0.002) * (gdjs.GameCode.GDPlayerObjects2[i].getBehavior("Physics2").getLinearVelocityLength()) * gdjs.evtTools.common.sign((gdjs.RuntimeObject.getVariableNumber(gdjs.GameCode.GDPlayerObjects2[i].getVariables().get("Force")))) * (( gdjs.GameCode.GDSteeringJoystickObjects2.length === 0 ) ? 0 :gdjs.GameCode.GDSteeringJoystickObjects2[0].StickForce((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined))));
}
}}
}
{
}
{
let isConditionTrue_0 = false;
{
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
{for(var i = 0, len = gdjs.GameCode.GDPlayerObjects2.length ;i < len;++i) {
gdjs.GameCode.GDPlayerObjects2[i].getBehavior("Physics2").setLinearDamping(9);
}
}}
}
{
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects1);
gdjs.copyArray(runtimeScene.getObjects("RoadBend"), gdjs.GameCode.GDRoadBendObjects1);
gdjs.copyArray(runtimeScene.getObjects("RoadCrossroadPath"), gdjs.GameCode.GDRoadCrossroadPathObjects1);
gdjs.copyArray(runtimeScene.getObjects("RoadIntersectionPath"), gdjs.GameCode.GDRoadIntersectionPathObjects1);
gdjs.copyArray(runtimeScene.getObjects("RoadStraight"), gdjs.GameCode.GDRoadStraightObjects1);
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.object.hitBoxesCollisionTest(gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDPlayerObjects1Objects, gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDRoadStraightObjects1ObjectsGDgdjs_9546GameCode_9546GDRoadCrossroadPathObjects1ObjectsGDgdjs_9546GameCode_9546GDRoadIntersectionPathObjects1ObjectsGDgdjs_9546GameCode_9546GDRoadBendObjects1Objects, false, runtimeScene, false);
if (isConditionTrue_0) {
/* Reuse gdjs.GameCode.GDPlayerObjects1 */
{for(var i = 0, len = gdjs.GameCode.GDPlayerObjects1.length ;i < len;++i) {
gdjs.GameCode.GDPlayerObjects1[i].getBehavior("Physics2").setLinearDamping(4);
}
}}
}
};gdjs.GameCode.eventsList2 = function(runtimeScene) {
{
}
{
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
for (var i = 0, k = 0, l = gdjs.GameCode.GDPlayerObjects2.length;i<l;++i) {
if ( gdjs.GameCode.GDPlayerObjects2[i].getBehavior("Physics2").getLinearVelocityLength() > 0 ) {
isConditionTrue_0 = true;
gdjs.GameCode.GDPlayerObjects2[k] = gdjs.GameCode.GDPlayerObjects2[i];
++k;
}
}
gdjs.GameCode.GDPlayerObjects2.length = k;
if (isConditionTrue_0) {
isConditionTrue_0 = false;
isConditionTrue_0 = !(gdjs.evtTools.runtimeScene.getTimerElapsedTimeInSecondsOrNaN(runtimeScene, "Time") > 0);
}
if (isConditionTrue_0) {
{gdjs.evtTools.runtimeScene.resetTimer(runtimeScene, "Time");
}}
}
{
}
{
let isConditionTrue_0 = false;
{
gdjs.copyArray(runtimeScene.getObjects("TimeText"), gdjs.GameCode.GDTimeTextObjects2);
{for(var i = 0, len = gdjs.GameCode.GDTimeTextObjects2.length ;i < len;++i) {
gdjs.GameCode.GDTimeTextObjects2[i].getBehavior("Text").setText("Time: " + gdjs.evtsExt__TimeFormatter__SecondsToHHMMSS000.func(runtimeScene, gdjs.evtTools.runtimeScene.getTimerElapsedTimeInSeconds(runtimeScene, "Time"), (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined)));
}
}}
}
{
gdjs.GameCode.eventsList1(runtimeScene);
}
};gdjs.GameCode.eventsList3 = function(runtimeScene) {
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.variable.getVariableString(runtimeScene.getScene().getVariables().get("GameState")) == "Playing";
if (isConditionTrue_0) {
{ //Subevents
gdjs.GameCode.eventsList2(runtimeScene);} //End of subevents
}
}
};gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCameraTargetObjects2Objects = Hashtable.newFrom({"CameraTarget": gdjs.GameCode.GDCameraTargetObjects2});
gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCameraTargetObjects1Objects = Hashtable.newFrom({"CameraTarget": gdjs.GameCode.GDCameraTargetObjects1});
gdjs.GameCode.eventsList4 = function(runtimeScene) {
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.runtimeScene.sceneJustBegins(runtimeScene);
if (isConditionTrue_0) {
gdjs.GameCode.GDCameraTargetObjects2.length = 0;
{gdjs.evtTools.object.createObjectOnScene((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : runtimeScene), gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCameraTargetObjects2Objects, 0, 0, "");
}{for(var i = 0, len = gdjs.GameCode.GDCameraTargetObjects2.length ;i < len;++i) {
gdjs.GameCode.GDCameraTargetObjects2[i].hide();
}
}}
}
{
let isConditionTrue_0 = false;
{
gdjs.copyArray(runtimeScene.getObjects("CameraTarget"), gdjs.GameCode.GDCameraTargetObjects1);
gdjs.copyArray(runtimeScene.getObjects("Dust"), gdjs.GameCode.GDDustObjects1);
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects1);
{runtimeScene.getScene().getVariables().get("CameraAngle").setNumber(gdjs.evtTools.common.lerp(gdjs.evtTools.variable.getVariableNumber(runtimeScene.getScene().getVariables().get("CameraAngle")), (( gdjs.GameCode.GDPlayerObjects1.length === 0 ) ? 0 :gdjs.GameCode.GDPlayerObjects1[0].getAngle()), gdjs.evtTools.runtimeScene.getElapsedTimeInSeconds(runtimeScene) * 4));
}{for(var i = 0, len = gdjs.GameCode.GDCameraTargetObjects1.length ;i < len;++i) {
gdjs.GameCode.GDCameraTargetObjects1[i].putAroundObject((gdjs.GameCode.GDPlayerObjects1.length !== 0 ? gdjs.GameCode.GDPlayerObjects1[0] : null), 200, gdjs.evtTools.variable.getVariableNumber(runtimeScene.getScene().getVariables().get("CameraAngle")));
}
}{gdjs.evtsExt__ThirdPersonCamera__LookFromDistanceAtObject3D.func(runtimeScene, gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCameraTargetObjects1Objects, "Object3D", 800, gdjs.evtTools.variable.getVariableNumber(runtimeScene.getScene().getVariables().get("CameraAngle")) + 90, 80, "", (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined));
}{gdjs.scene3d.camera.setCameraZ(runtimeScene, gdjs.scene3d.camera.getCameraZ(runtimeScene, "", 0) + (0), "", 0);
}{for(var i = 0, len = gdjs.GameCode.GDDustObjects1.length ;i < len;++i) {
gdjs.GameCode.GDDustObjects1[i].setAngle((( gdjs.GameCode.GDPlayerObjects1.length === 0 ) ? 0 :gdjs.GameCode.GDPlayerObjects1[0].getAngle()) + 180);
}
}{for(var i = 0, len = gdjs.GameCode.GDDustObjects1.length ;i < len;++i) {
gdjs.GameCode.GDDustObjects1[i].putAroundObject((gdjs.GameCode.GDPlayerObjects1.length !== 0 ? gdjs.GameCode.GDPlayerObjects1[0] : null), 10, (( gdjs.GameCode.GDPlayerObjects1.length === 0 ) ? 0 :gdjs.GameCode.GDPlayerObjects1[0].getAngle()) - 180);
}
}{for(var i = 0, len = gdjs.GameCode.GDDustObjects1.length ;i < len;++i) {
gdjs.GameCode.GDDustObjects1[i].setPosition((gdjs.GameCode.GDDustObjects1[i].getX()) + gdjs.randomFloatInRange(-(6), 6),(gdjs.GameCode.GDDustObjects1[i].getY()) + gdjs.randomFloatInRange(-(6), 6));
}
}{gdjs.evtTools.sound.setSoundOnChannelPitch(runtimeScene, 0, Math.min(((( gdjs.GameCode.GDPlayerObjects1.length === 0 ) ? 0 :gdjs.GameCode.GDPlayerObjects1[0].getBehavior("Physics2").getLinearVelocityLength()) / 300), 1));
}{gdjs.evtTools.sound.setSoundOnChannelVolume(runtimeScene, 0, Math.min(((( gdjs.GameCode.GDPlayerObjects1.length === 0 ) ? 0 :gdjs.GameCode.GDPlayerObjects1[0].getBehavior("Physics2").getLinearVelocityLength())) * 10, 25));
}}
}
};gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCoinObjects2Objects = Hashtable.newFrom({"Coin": gdjs.GameCode.GDCoinObjects2});
gdjs.GameCode.eventsList5 = function(runtimeScene) {
{
gdjs.copyArray(gdjs.GameCode.GDCoinObjects2, gdjs.GameCode.GDCoinObjects3);
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
for (var i = 0, k = 0, l = gdjs.GameCode.GDCoinObjects3.length;i<l;++i) {
if ( gdjs.GameCode.GDCoinObjects3[i].getBehavior("InOnScreen").IsOnScreen(0, (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined)) ) {
isConditionTrue_0 = true;
gdjs.GameCode.GDCoinObjects3[k] = gdjs.GameCode.GDCoinObjects3[i];
++k;
}
}
gdjs.GameCode.GDCoinObjects3.length = k;
if (isConditionTrue_0) {
gdjs.copyArray(gdjs.GameCode.GDArrowObjects2, gdjs.GameCode.GDArrowObjects3);
{for(var i = 0, len = gdjs.GameCode.GDArrowObjects3.length ;i < len;++i) {
gdjs.GameCode.GDArrowObjects3[i].hide();
}
}}
}
{
/* Reuse gdjs.GameCode.GDCoinObjects2 */
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
for (var i = 0, k = 0, l = gdjs.GameCode.GDCoinObjects2.length;i<l;++i) {
if ( !(gdjs.GameCode.GDCoinObjects2[i].getBehavior("InOnScreen").IsOnScreen(10, (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined))) ) {
isConditionTrue_0 = true;
gdjs.GameCode.GDCoinObjects2[k] = gdjs.GameCode.GDCoinObjects2[i];
++k;
}
}
gdjs.GameCode.GDCoinObjects2.length = k;
if (isConditionTrue_0) {
/* Reuse gdjs.GameCode.GDArrowObjects2 */
{for(var i = 0, len = gdjs.GameCode.GDArrowObjects2.length ;i < len;++i) {
gdjs.GameCode.GDArrowObjects2[i].hide(false);
}
}}
}
};gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCoinObjects2Objects = Hashtable.newFrom({"Coin": gdjs.GameCode.GDCoinObjects2});
gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDPlayerObjects2Objects = Hashtable.newFrom({"Player": gdjs.GameCode.GDPlayerObjects2});
gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCoinPickUpObjects2Objects = Hashtable.newFrom({"CoinPickUp": gdjs.GameCode.GDCoinPickUpObjects2});
gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCoinObjects2Objects = Hashtable.newFrom({"Coin": gdjs.GameCode.GDCoinObjects2});
gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCoinObjects2Objects = Hashtable.newFrom({"Coin": gdjs.GameCode.GDCoinObjects2});
gdjs.GameCode.asyncCallback13308492 = function (runtimeScene, asyncObjectsList) {
{gdjs.evtTools.runtimeScene.replaceScene(runtimeScene, "Game", false);
}}
gdjs.GameCode.eventsList6 = function(runtimeScene) {
{
{
{
const asyncObjectsList = new gdjs.LongLivedObjectsList();
runtimeScene.getAsyncTasksManager().addTask(gdjs.evtTools.runtimeScene.wait(1.5), (runtimeScene) => (gdjs.GameCode.asyncCallback13308492(runtimeScene, asyncObjectsList)));
}
}
}
};gdjs.GameCode.asyncCallback13310644 = function (runtimeScene, asyncObjectsList) {
{gdjs.evtTools.runtimeScene.replaceScene(runtimeScene, "Leaderboard", false);
}}
gdjs.GameCode.eventsList7 = function(runtimeScene) {
{
{
{
const asyncObjectsList = new gdjs.LongLivedObjectsList();
runtimeScene.getAsyncTasksManager().addTask(gdjs.evtTools.runtimeScene.wait(1.5), (runtimeScene) => (gdjs.GameCode.asyncCallback13310644(runtimeScene, asyncObjectsList)));
}
}
}
};gdjs.GameCode.eventsList8 = function(runtimeScene) {
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.runtimeScene.getTimerElapsedTimeInSecondsOrNaN(runtimeScene, "Time") >= gdjs.evtTools.variable.getVariableNumber(runtimeScene.getScene().getVariables().getFromIndex(0));
if (isConditionTrue_0) {
{ //Subevents
gdjs.GameCode.eventsList6(runtimeScene);} //End of subevents
}
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
{let isConditionTrue_1 = false;
isConditionTrue_0 = false;
{
isConditionTrue_1 = gdjs.evtTools.runtimeScene.getTimerElapsedTimeInSecondsOrNaN(runtimeScene, "Time") < gdjs.evtTools.variable.getVariableNumber(runtimeScene.getScene().getVariables().getFromIndex(0));
if(isConditionTrue_1) {
isConditionTrue_0 = true;
}
}
{
isConditionTrue_1 = gdjs.evtTools.variable.getVariableNumber(runtimeScene.getScene().getVariables().getFromIndex(0)) == 0;
if(isConditionTrue_1) {
isConditionTrue_0 = true;
}
}
{
}
}
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("BestTimeText"), gdjs.GameCode.GDBestTimeTextObjects2);
{runtimeScene.getScene().getVariables().getFromIndex(0).setNumber(gdjs.evtTools.runtimeScene.getTimerElapsedTimeInSeconds(runtimeScene, "Time"));
}{runtimeScene.getGame().getVariables().get("Score").setNumber(gdjs.evtTools.variable.getVariableNumber(runtimeScene.getScene().getVariables().getFromIndex(0)));
}{gdjs.evtTools.storage.writeNumberInJSONFile("HighScore", "HighScore", gdjs.evtTools.variable.getVariableNumber(runtimeScene.getScene().getVariables().getFromIndex(0)));
}{for(var i = 0, len = gdjs.GameCode.GDBestTimeTextObjects2.length ;i < len;++i) {
gdjs.GameCode.GDBestTimeTextObjects2[i].setColor("248;231;28");
}
}
{ //Subevents
gdjs.GameCode.eventsList7(runtimeScene);} //End of subevents
}
}
};gdjs.GameCode.eventsList9 = function(runtimeScene) {
{
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.object.getSceneInstancesCount((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : runtimeScene), gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCoinObjects2Objects) == 0;
if (isConditionTrue_0) {
{runtimeScene.getScene().getVariables().get("GameState").setString("GameOver");
}{gdjs.evtTools.runtimeScene.setTimeScale(runtimeScene, 0.5);
}
{ //Subevents
gdjs.GameCode.eventsList8(runtimeScene);} //End of subevents
}
}
};gdjs.GameCode.eventsList10 = function(runtimeScene) {
{
let isConditionTrue_0 = false;
{
gdjs.copyArray(runtimeScene.getObjects("Coin"), gdjs.GameCode.GDCoinObjects2);
{for(var i = 0, len = gdjs.GameCode.GDCoinObjects2.length ;i < len;++i) {
gdjs.GameCode.GDCoinObjects2[i].rotate(50, runtimeScene);
}
}}
}
{
}
{
gdjs.copyArray(runtimeScene.getObjects("Coin"), gdjs.GameCode.GDCoinObjects2);
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.object.pickNearestObject(gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCoinObjects2Objects, (( gdjs.GameCode.GDPlayerObjects2.length === 0 ) ? 0 :gdjs.GameCode.GDPlayerObjects2[0].getCenterXInScene()), (( gdjs.GameCode.GDPlayerObjects2.length === 0 ) ? 0 :gdjs.GameCode.GDPlayerObjects2[0].getCenterYInScene()), false);
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("Arrow"), gdjs.GameCode.GDArrowObjects2);
/* Reuse gdjs.GameCode.GDCoinObjects2 */
/* Reuse gdjs.GameCode.GDPlayerObjects2 */
{for(var i = 0, len = gdjs.GameCode.GDArrowObjects2.length ;i < len;++i) {
gdjs.GameCode.GDArrowObjects2[i].setAngle(gdjs.evtTools.common.angleBetweenPositions((( gdjs.GameCode.GDPlayerObjects2.length === 0 ) ? 0 :gdjs.GameCode.GDPlayerObjects2[0].getCenterXInScene()), (( gdjs.GameCode.GDPlayerObjects2.length === 0 ) ? 0 :gdjs.GameCode.GDPlayerObjects2[0].getCenterYInScene()), (( gdjs.GameCode.GDCoinObjects2.length === 0 ) ? 0 :gdjs.GameCode.GDCoinObjects2[0].getCenterXInScene()), (( gdjs.GameCode.GDCoinObjects2.length === 0 ) ? 0 :gdjs.GameCode.GDCoinObjects2[0].getCenterYInScene())));
}
}{for(var i = 0, len = gdjs.GameCode.GDArrowObjects2.length ;i < len;++i) {
gdjs.GameCode.GDArrowObjects2[i].putAroundObject((gdjs.GameCode.GDPlayerObjects2.length !== 0 ? gdjs.GameCode.GDPlayerObjects2[0] : null), 160, (gdjs.GameCode.GDArrowObjects2[i].getAngle()));
}
}
{ //Subevents
gdjs.GameCode.eventsList5(runtimeScene);} //End of subevents
}
}
{
gdjs.copyArray(runtimeScene.getObjects("Coin"), gdjs.GameCode.GDCoinObjects2);
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects2);
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.object.hitBoxesCollisionTest(gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCoinObjects2Objects, gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDPlayerObjects2Objects, false, runtimeScene, false);
if (isConditionTrue_0) {
/* Reuse gdjs.GameCode.GDCoinObjects2 */
gdjs.copyArray(runtimeScene.getObjects("RemainingText"), gdjs.GameCode.GDRemainingTextObjects2);
gdjs.GameCode.GDCoinPickUpObjects2.length = 0;
{gdjs.evtTools.object.createObjectOnScene((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : runtimeScene), gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCoinPickUpObjects2Objects, (( gdjs.GameCode.GDCoinObjects2.length === 0 ) ? 0 :gdjs.GameCode.GDCoinObjects2[0].getCenterXInScene()), (( gdjs.GameCode.GDCoinObjects2.length === 0 ) ? 0 :gdjs.GameCode.GDCoinObjects2[0].getCenterYInScene()), "");
}{for(var i = 0, len = gdjs.GameCode.GDCoinPickUpObjects2.length ;i < len;++i) {
gdjs.GameCode.GDCoinPickUpObjects2[i].setZOrder(5);
}
}{for(var i = 0, len = gdjs.GameCode.GDCoinObjects2.length ;i < len;++i) {
gdjs.GameCode.GDCoinObjects2[i].deleteFromScene(runtimeScene);
}
}{gdjs.evtTools.sound.playSound(runtimeScene, "CoinPickUP", false, 25, gdjs.evtTools.variable.getVariableNumber(runtimeScene.getScene().getVariables().getFromIndex(2)));
}{for(var i = 0, len = gdjs.GameCode.GDRemainingTextObjects2.length ;i < len;++i) {
gdjs.GameCode.GDRemainingTextObjects2[i].getBehavior("Text").setText("Remaining: " + gdjs.evtTools.common.toString(gdjs.evtTools.object.getSceneInstancesCount((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : runtimeScene), gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDCoinObjects2Objects)));
}
}{runtimeScene.getScene().getVariables().getFromIndex(2).mul(1.05);
}{gdjs.evtTools.runtimeScene.resetTimer(runtimeScene, "RisingPitch");
}
{ //Subevents
gdjs.GameCode.eventsList9(runtimeScene);} //End of subevents
}
}
{
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.runtimeScene.getTimerElapsedTimeInSecondsOrNaN(runtimeScene, "RisingPitch") >= 1;
if (isConditionTrue_0) {
{runtimeScene.getScene().getVariables().getFromIndex(2).setNumber(gdjs.randomFloatInRange(0.9, 1.1));
}}
}
};gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDPlayerObjects1Objects = Hashtable.newFrom({"Player": gdjs.GameCode.GDPlayerObjects1});
gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDSuvLuxuryObjects1ObjectsGDgdjs_9546GameCode_9546GDLargeBuildingAObjects1ObjectsGDgdjs_9546GameCode_9546GDLargeBuildingFObjects1ObjectsGDgdjs_9546GameCode_9546GDVanObjects1Objects = Hashtable.newFrom({"SuvLuxury": gdjs.GameCode.GDSuvLuxuryObjects1, "LargeBuildingA": gdjs.GameCode.GDLargeBuildingAObjects1, "LargeBuildingF": gdjs.GameCode.GDLargeBuildingFObjects1, "Van": gdjs.GameCode.GDVanObjects1});
gdjs.GameCode.eventsList11 = function(runtimeScene) {
{
gdjs.copyArray(runtimeScene.getObjects("LargeBuildingA"), gdjs.GameCode.GDLargeBuildingAObjects1);
gdjs.copyArray(runtimeScene.getObjects("LargeBuildingF"), gdjs.GameCode.GDLargeBuildingFObjects1);
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects1);
gdjs.copyArray(runtimeScene.getObjects("SuvLuxury"), gdjs.GameCode.GDSuvLuxuryObjects1);
gdjs.copyArray(runtimeScene.getObjects("Van"), gdjs.GameCode.GDVanObjects1);
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.physics2.objectsCollide(gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDPlayerObjects1Objects, "Physics2", gdjs.GameCode.mapOfGDgdjs_9546GameCode_9546GDSuvLuxuryObjects1ObjectsGDgdjs_9546GameCode_9546GDLargeBuildingAObjects1ObjectsGDgdjs_9546GameCode_9546GDLargeBuildingFObjects1ObjectsGDgdjs_9546GameCode_9546GDVanObjects1Objects, false);
if (isConditionTrue_0) {
isConditionTrue_0 = false;
{isConditionTrue_0 = runtimeScene.getOnceTriggers().triggerOnce(13312668);
}
}
if (isConditionTrue_0) {
{gdjs.evtTools.sound.playSound(runtimeScene, "Collision", false, 50, gdjs.randomFloatInRange(0.8, 1));
}}
}
};gdjs.GameCode.eventsList12 = function(runtimeScene) {
{
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.runtimeScene.sceneJustBegins(runtimeScene);
if (isConditionTrue_0) {
{gdjs.evtTools.runtimeScene.createObjectsFromExternalLayout(runtimeScene, "Level1", 0, 0, 0);
}}
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.runtimeScene.sceneJustBegins(runtimeScene);
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("BestTimeText"), gdjs.GameCode.GDBestTimeTextObjects1);
gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.GameCode.GDPlayerObjects1);
gdjs.copyArray(runtimeScene.getObjects("RemainingText"), gdjs.GameCode.GDRemainingTextObjects1);
{runtimeScene.getScene().getVariables().get("GameState").setString("Playing");
}{gdjs.evtTools.camera.centerCamera(runtimeScene, (gdjs.GameCode.GDPlayerObjects1.length !== 0 ? gdjs.GameCode.GDPlayerObjects1[0] : null), true, "", 0);
}{gdjs.evtTools.storage.readNumberFromJSONFile("HighScore", "HighScore", runtimeScene, runtimeScene.getScene().getVariables().getFromIndex(0));
}{for(var i = 0, len = gdjs.GameCode.GDBestTimeTextObjects1.length ;i < len;++i) {
gdjs.GameCode.GDBestTimeTextObjects1[i].getBehavior("Text").setText("Best: " + gdjs.evtsExt__TimeFormatter__SecondsToHHMMSS000.func(runtimeScene, gdjs.evtTools.variable.getVariableNumber(runtimeScene.getScene().getVariables().getFromIndex(0)), (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined)));
}
}{for(var i = 0, len = gdjs.GameCode.GDRemainingTextObjects1.length ;i < len;++i) {
gdjs.GameCode.GDRemainingTextObjects1[i].getBehavior("Text").setText("Remaining: " + gdjs.evtTools.common.toString(gdjs.evtTools.object.getSceneInstancesCount((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : runtimeScene), gdjs.GameCode.mapOfEmptyGDCoinObjects)));
}
}{gdjs.evtTools.sound.playSoundOnChannel(runtimeScene, "assets\\CarEngine.mp3", 0, true, 30, 1);
}
{ //Subevents
gdjs.GameCode.eventsList0(runtimeScene);} //End of subevents
}
}
{
gdjs.GameCode.eventsList3(runtimeScene);
}
{
gdjs.GameCode.eventsList4(runtimeScene);
}
{
gdjs.GameCode.eventsList10(runtimeScene);
}
{
gdjs.GameCode.eventsList11(runtimeScene);
}
};
gdjs.GameCode.func = function(runtimeScene) {
runtimeScene.getOnceTriggers().startNewFrame();
gdjs.GameCode.GDDustObjects1.length = 0;
gdjs.GameCode.GDDustObjects2.length = 0;
gdjs.GameCode.GDDustObjects3.length = 0;
gdjs.GameCode.GDDustObjects4.length = 0;
gdjs.GameCode.GDCoinPickUpObjects1.length = 0;
gdjs.GameCode.GDCoinPickUpObjects2.length = 0;
gdjs.GameCode.GDCoinPickUpObjects3.length = 0;
gdjs.GameCode.GDCoinPickUpObjects4.length = 0;
gdjs.GameCode.GDBestTimeTextObjects1.length = 0;
gdjs.GameCode.GDBestTimeTextObjects2.length = 0;
gdjs.GameCode.GDBestTimeTextObjects3.length = 0;
gdjs.GameCode.GDBestTimeTextObjects4.length = 0;
gdjs.GameCode.GDRemainingTextObjects1.length = 0;
gdjs.GameCode.GDRemainingTextObjects2.length = 0;
gdjs.GameCode.GDRemainingTextObjects3.length = 0;
gdjs.GameCode.GDRemainingTextObjects4.length = 0;
gdjs.GameCode.GDTimeTextObjects1.length = 0;
gdjs.GameCode.GDTimeTextObjects2.length = 0;
gdjs.GameCode.GDTimeTextObjects3.length = 0;
gdjs.GameCode.GDTimeTextObjects4.length = 0;
gdjs.GameCode.GDTutorialTextObjects1.length = 0;
gdjs.GameCode.GDTutorialTextObjects2.length = 0;
gdjs.GameCode.GDTutorialTextObjects3.length = 0;
gdjs.GameCode.GDTutorialTextObjects4.length = 0;
gdjs.GameCode.GDSteeringJoystickObjects1.length = 0;
gdjs.GameCode.GDSteeringJoystickObjects2.length = 0;
gdjs.GameCode.GDSteeringJoystickObjects3.length = 0;
gdjs.GameCode.GDSteeringJoystickObjects4.length = 0;
gdjs.GameCode.GDPedalJoystickObjects1.length = 0;
gdjs.GameCode.GDPedalJoystickObjects2.length = 0;
gdjs.GameCode.GDPedalJoystickObjects3.length = 0;
gdjs.GameCode.GDPedalJoystickObjects4.length = 0;
gdjs.GameCode.GDPlayerObjects1.length = 0;
gdjs.GameCode.GDPlayerObjects2.length = 0;
gdjs.GameCode.GDPlayerObjects3.length = 0;
gdjs.GameCode.GDPlayerObjects4.length = 0;
gdjs.GameCode.GDLargeBuildingFObjects1.length = 0;
gdjs.GameCode.GDLargeBuildingFObjects2.length = 0;
gdjs.GameCode.GDLargeBuildingFObjects3.length = 0;
gdjs.GameCode.GDLargeBuildingFObjects4.length = 0;
gdjs.GameCode.GDLargeBuildingAObjects1.length = 0;
gdjs.GameCode.GDLargeBuildingAObjects2.length = 0;
gdjs.GameCode.GDLargeBuildingAObjects3.length = 0;
gdjs.GameCode.GDLargeBuildingAObjects4.length = 0;
gdjs.GameCode.GDSuvLuxuryObjects1.length = 0;
gdjs.GameCode.GDSuvLuxuryObjects2.length = 0;
gdjs.GameCode.GDSuvLuxuryObjects3.length = 0;
gdjs.GameCode.GDSuvLuxuryObjects4.length = 0;
gdjs.GameCode.GDVanObjects1.length = 0;
gdjs.GameCode.GDVanObjects2.length = 0;
gdjs.GameCode.GDVanObjects3.length = 0;
gdjs.GameCode.GDVanObjects4.length = 0;
gdjs.GameCode.GDCoinObjects1.length = 0;
gdjs.GameCode.GDCoinObjects2.length = 0;
gdjs.GameCode.GDCoinObjects3.length = 0;
gdjs.GameCode.GDCoinObjects4.length = 0;
gdjs.GameCode.GDArrowObjects1.length = 0;
gdjs.GameCode.GDArrowObjects2.length = 0;
gdjs.GameCode.GDArrowObjects3.length = 0;
gdjs.GameCode.GDArrowObjects4.length = 0;
gdjs.GameCode.GDRoadStraightObjects1.length = 0;
gdjs.GameCode.GDRoadStraightObjects2.length = 0;
gdjs.GameCode.GDRoadStraightObjects3.length = 0;
gdjs.GameCode.GDRoadStraightObjects4.length = 0;
gdjs.GameCode.GDRoadCrossroadPathObjects1.length = 0;
gdjs.GameCode.GDRoadCrossroadPathObjects2.length = 0;
gdjs.GameCode.GDRoadCrossroadPathObjects3.length = 0;
gdjs.GameCode.GDRoadCrossroadPathObjects4.length = 0;
gdjs.GameCode.GDRoadIntersectionPathObjects1.length = 0;
gdjs.GameCode.GDRoadIntersectionPathObjects2.length = 0;
gdjs.GameCode.GDRoadIntersectionPathObjects3.length = 0;
gdjs.GameCode.GDRoadIntersectionPathObjects4.length = 0;
gdjs.GameCode.GDRoadBendObjects1.length = 0;
gdjs.GameCode.GDRoadBendObjects2.length = 0;
gdjs.GameCode.GDRoadBendObjects3.length = 0;
gdjs.GameCode.GDRoadBendObjects4.length = 0;
gdjs.GameCode.GDCommonTree1Objects1.length = 0;
gdjs.GameCode.GDCommonTree1Objects2.length = 0;
gdjs.GameCode.GDCommonTree1Objects3.length = 0;
gdjs.GameCode.GDCommonTree1Objects4.length = 0;
gdjs.GameCode.GDGrassObjects1.length = 0;
gdjs.GameCode.GDGrassObjects2.length = 0;
gdjs.GameCode.GDGrassObjects3.length = 0;
gdjs.GameCode.GDGrassObjects4.length = 0;
gdjs.GameCode.GDCameraTargetObjects1.length = 0;
gdjs.GameCode.GDCameraTargetObjects2.length = 0;
gdjs.GameCode.GDCameraTargetObjects3.length = 0;
gdjs.GameCode.GDCameraTargetObjects4.length = 0;
gdjs.GameCode.eventsList12(runtimeScene);
return;
}
gdjs['GameCode'] = gdjs.GameCode;
+399
View File
@@ -0,0 +1,399 @@
gdjs.LeaderboardCode = {};
gdjs.LeaderboardCode.GDScoreTextObjects1= [];
gdjs.LeaderboardCode.GDScoreTextObjects2= [];
gdjs.LeaderboardCode.GDScoreTextObjects3= [];
gdjs.LeaderboardCode.GDPlayerNameInputObjects1= [];
gdjs.LeaderboardCode.GDPlayerNameInputObjects2= [];
gdjs.LeaderboardCode.GDPlayerNameInputObjects3= [];
gdjs.LeaderboardCode.GDSubmitButtonObjects1= [];
gdjs.LeaderboardCode.GDSubmitButtonObjects2= [];
gdjs.LeaderboardCode.GDSubmitButtonObjects3= [];
gdjs.LeaderboardCode.GDRestartButtonObjects1= [];
gdjs.LeaderboardCode.GDRestartButtonObjects2= [];
gdjs.LeaderboardCode.GDRestartButtonObjects3= [];
gdjs.LeaderboardCode.GDPanelObjects1= [];
gdjs.LeaderboardCode.GDPanelObjects2= [];
gdjs.LeaderboardCode.GDPanelObjects3= [];
gdjs.LeaderboardCode.GDCoinObjects1= [];
gdjs.LeaderboardCode.GDCoinObjects2= [];
gdjs.LeaderboardCode.GDCoinObjects3= [];
gdjs.LeaderboardCode.mapOfGDgdjs_9546LeaderboardCode_9546GDPanelObjects1Objects = Hashtable.newFrom({"Panel": gdjs.LeaderboardCode.GDPanelObjects1});
gdjs.LeaderboardCode.mapOfGDgdjs_9546LeaderboardCode_9546GDPanelObjects1Objects = Hashtable.newFrom({"Panel": gdjs.LeaderboardCode.GDPanelObjects1});
gdjs.LeaderboardCode.mapOfGDgdjs_9546LeaderboardCode_9546GDPanelObjects1Objects = Hashtable.newFrom({"Panel": gdjs.LeaderboardCode.GDPanelObjects1});
gdjs.LeaderboardCode.mapOfGDgdjs_9546LeaderboardCode_9546GDPanelObjects1Objects = Hashtable.newFrom({"Panel": gdjs.LeaderboardCode.GDPanelObjects1});
gdjs.LeaderboardCode.eventsList0 = function(runtimeScene) {
{
let isConditionTrue_0 = false;
{
{gdjs.playerAuthentication.displayAuthenticationBanner(runtimeScene);
}}
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.playerAuthentication.isAuthenticated();
if (isConditionTrue_0) {
gdjs.copyArray(gdjs.LeaderboardCode.GDPlayerNameInputObjects1, gdjs.LeaderboardCode.GDPlayerNameInputObjects2);
{for(var i = 0, len = gdjs.LeaderboardCode.GDPlayerNameInputObjects2.length ;i < len;++i) {
gdjs.LeaderboardCode.GDPlayerNameInputObjects2[i].getBehavior("Text").setText(gdjs.playerAuthentication.getUsername());
}
}{for(var i = 0, len = gdjs.LeaderboardCode.GDPlayerNameInputObjects2.length ;i < len;++i) {
gdjs.LeaderboardCode.GDPlayerNameInputObjects2[i].setDisabled(true);
}
}}
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = !(gdjs.playerAuthentication.isAuthenticated());
if (isConditionTrue_0) {
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.variable.getVariableString(runtimeScene.getGame().getVariables().get("PlayerName")) != "0";
}
if (isConditionTrue_0) {
/* Reuse gdjs.LeaderboardCode.GDPlayerNameInputObjects1 */
{for(var i = 0, len = gdjs.LeaderboardCode.GDPlayerNameInputObjects1.length ;i < len;++i) {
gdjs.LeaderboardCode.GDPlayerNameInputObjects1[i].getBehavior("Text").setText(gdjs.evtTools.variable.getVariableString(runtimeScene.getGame().getVariables().get("PlayerName")));
}
}}
}
};gdjs.LeaderboardCode.eventsList1 = function(runtimeScene) {
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.playerAuthentication.isAuthenticated();
if (isConditionTrue_0) {
{gdjs.evtTools.leaderboards.saveConnectedPlayerScore(runtimeScene, "deb878e9-5785-4881-81f9-13b517269c46", gdjs.evtTools.variable.getVariableNumber(runtimeScene.getGame().getVariables().get("Score")));
}}
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = !(gdjs.playerAuthentication.isAuthenticated());
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("PlayerNameInput"), gdjs.LeaderboardCode.GDPlayerNameInputObjects2);
{gdjs.evtTools.leaderboards.savePlayerScore(runtimeScene, "deb878e9-5785-4881-81f9-13b517269c46", gdjs.evtTools.variable.getVariableNumber(runtimeScene.getGame().getVariables().get("Score")), (( gdjs.LeaderboardCode.GDPlayerNameInputObjects2.length === 0 ) ? "" :gdjs.LeaderboardCode.GDPlayerNameInputObjects2[0].getText()));
}{runtimeScene.getGame().getVariables().get("PlayerName").setString((( gdjs.LeaderboardCode.GDPlayerNameInputObjects2.length === 0 ) ? "" :gdjs.LeaderboardCode.GDPlayerNameInputObjects2[0].getText()));
}}
}
{
let isConditionTrue_0 = false;
{
{gdjs.playerAuthentication.removeAuthenticationBanner(runtimeScene);
}{gdjs.evtTools.leaderboards.displayLeaderboard(runtimeScene, "deb878e9-5785-4881-81f9-13b517269c46", true);
}}
}
};gdjs.LeaderboardCode.mapOfGDgdjs_9546LeaderboardCode_9546GDCoinObjects3Objects = Hashtable.newFrom({"Coin": gdjs.LeaderboardCode.GDCoinObjects3});
gdjs.LeaderboardCode.eventsList2 = function(runtimeScene) {
};gdjs.LeaderboardCode.eventsList3 = function(runtimeScene) {
{
const repeatCount3 = 100;
for (let repeatIndex3 = 0;repeatIndex3 < repeatCount3;++repeatIndex3) {
gdjs.LeaderboardCode.GDCoinObjects3.length = 0;
let isConditionTrue_0 = false;
if (true)
{
{gdjs.evtTools.object.createObjectOnScene((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : runtimeScene), gdjs.LeaderboardCode.mapOfGDgdjs_9546LeaderboardCode_9546GDCoinObjects3Objects, gdjs.randomInRange(gdjs.evtTools.camera.getCameraBorderLeft(runtimeScene, "", 0), gdjs.evtTools.camera.getCameraBorderRight(runtimeScene, "", 0)), gdjs.randomInRange(-(500) + gdjs.evtTools.camera.getCameraBorderTop(runtimeScene, "", 0), gdjs.evtTools.camera.getCameraBorderBottom(runtimeScene, "", 0) + 500), "3D");
}{for(var i = 0, len = gdjs.LeaderboardCode.GDCoinObjects3.length ;i < len;++i) {
gdjs.LeaderboardCode.GDCoinObjects3[i].returnVariable(gdjs.LeaderboardCode.GDCoinObjects3[i].getVariables().get("RotationX")).setNumber(gdjs.randomFloatInRange(20, 45));
}
}{for(var i = 0, len = gdjs.LeaderboardCode.GDCoinObjects3.length ;i < len;++i) {
gdjs.LeaderboardCode.GDCoinObjects3[i].returnVariable(gdjs.LeaderboardCode.GDCoinObjects3[i].getVariables().get("RotationY")).setNumber(gdjs.randomFloatInRange(20, 45));
}
}{for(var i = 0, len = gdjs.LeaderboardCode.GDCoinObjects3.length ;i < len;++i) {
gdjs.LeaderboardCode.GDCoinObjects3[i].returnVariable(gdjs.LeaderboardCode.GDCoinObjects3[i].getVariables().get("RotationZ")).setNumber(gdjs.randomFloatInRange(20, 45));
}
}{for(var i = 0, len = gdjs.LeaderboardCode.GDCoinObjects3.length ;i < len;++i) {
gdjs.LeaderboardCode.GDCoinObjects3[i].addForce(0, 200, 1);
}
}{for(var i = 0, len = gdjs.LeaderboardCode.GDCoinObjects3.length ;i < len;++i) {
gdjs.LeaderboardCode.GDCoinObjects3[i].getBehavior("Object3D").setZ(gdjs.randomFloatInRange(-(1000), -(32)));
}
}{for(var i = 0, len = gdjs.LeaderboardCode.GDCoinObjects3.length ;i < len;++i) {
gdjs.LeaderboardCode.GDCoinObjects3[i].getBehavior("Object3D").setRotationX(gdjs.randomFloat(360));
}
}{for(var i = 0, len = gdjs.LeaderboardCode.GDCoinObjects3.length ;i < len;++i) {
gdjs.LeaderboardCode.GDCoinObjects3[i].getBehavior("Object3D").setRotationY(gdjs.randomFloat(360));
}
}}
}
}
};gdjs.LeaderboardCode.eventsList4 = function(runtimeScene) {
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.runtimeScene.sceneJustBegins(runtimeScene);
if (isConditionTrue_0) {
{ //Subevents
gdjs.LeaderboardCode.eventsList3(runtimeScene);} //End of subevents
}
}
{
let isConditionTrue_0 = false;
{
gdjs.copyArray(runtimeScene.getObjects("Coin"), gdjs.LeaderboardCode.GDCoinObjects1);
{for(var i = 0, len = gdjs.LeaderboardCode.GDCoinObjects1.length ;i < len;++i) {
gdjs.LeaderboardCode.GDCoinObjects1[i].getBehavior("Object3D").setRotationX(gdjs.LeaderboardCode.GDCoinObjects1[i].getBehavior("Object3D").getRotationX() + ((gdjs.RuntimeObject.getVariableNumber(gdjs.LeaderboardCode.GDCoinObjects1[i].getVariables().get("RotationX"))) * gdjs.evtTools.runtimeScene.getElapsedTimeInSeconds(runtimeScene)));
}
}{for(var i = 0, len = gdjs.LeaderboardCode.GDCoinObjects1.length ;i < len;++i) {
gdjs.LeaderboardCode.GDCoinObjects1[i].getBehavior("Object3D").setRotationY(gdjs.LeaderboardCode.GDCoinObjects1[i].getBehavior("Object3D").getRotationY() + ((gdjs.RuntimeObject.getVariableNumber(gdjs.LeaderboardCode.GDCoinObjects1[i].getVariables().get("RotationY"))) * gdjs.evtTools.runtimeScene.getElapsedTimeInSeconds(runtimeScene)));
}
}{for(var i = 0, len = gdjs.LeaderboardCode.GDCoinObjects1.length ;i < len;++i) {
gdjs.LeaderboardCode.GDCoinObjects1[i].setAngle(gdjs.LeaderboardCode.GDCoinObjects1[i].getAngle() + ((gdjs.RuntimeObject.getVariableNumber(gdjs.LeaderboardCode.GDCoinObjects1[i].getVariables().get("RotationZ"))) * gdjs.evtTools.runtimeScene.getElapsedTimeInSeconds(runtimeScene)));
}
}}
}
};gdjs.LeaderboardCode.eventsList5 = function(runtimeScene) {
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.runtimeScene.sceneJustBegins(runtimeScene);
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("Panel"), gdjs.LeaderboardCode.GDPanelObjects1);
gdjs.copyArray(runtimeScene.getObjects("PlayerNameInput"), gdjs.LeaderboardCode.GDPlayerNameInputObjects1);
gdjs.copyArray(runtimeScene.getObjects("RestartButton"), gdjs.LeaderboardCode.GDRestartButtonObjects1);
gdjs.copyArray(runtimeScene.getObjects("ScoreText"), gdjs.LeaderboardCode.GDScoreTextObjects1);
gdjs.copyArray(runtimeScene.getObjects("SubmitButton"), gdjs.LeaderboardCode.GDSubmitButtonObjects1);
{for(var i = 0, len = gdjs.LeaderboardCode.GDScoreTextObjects1.length ;i < len;++i) {
gdjs.LeaderboardCode.GDScoreTextObjects1[i].getBehavior("Text").setText("Time: " + gdjs.evtsExt__TimeFormatter__SecondsToHHMMSS000.func(runtimeScene, gdjs.evtTools.variable.getVariableNumber(runtimeScene.getGame().getVariables().get("Score")), (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined)));
}
}{for(var i = 0, len = gdjs.LeaderboardCode.GDScoreTextObjects1.length ;i < len;++i) {
gdjs.LeaderboardCode.GDScoreTextObjects1[i].getBehavior("Sticker").Stick(gdjs.LeaderboardCode.mapOfGDgdjs_9546LeaderboardCode_9546GDPanelObjects1Objects, (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined));
}
for(var i = 0, len = gdjs.LeaderboardCode.GDPlayerNameInputObjects1.length ;i < len;++i) {
gdjs.LeaderboardCode.GDPlayerNameInputObjects1[i].getBehavior("Sticker").Stick(gdjs.LeaderboardCode.mapOfGDgdjs_9546LeaderboardCode_9546GDPanelObjects1Objects, (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined));
}
for(var i = 0, len = gdjs.LeaderboardCode.GDSubmitButtonObjects1.length ;i < len;++i) {
gdjs.LeaderboardCode.GDSubmitButtonObjects1[i].getBehavior("Sticker").Stick(gdjs.LeaderboardCode.mapOfGDgdjs_9546LeaderboardCode_9546GDPanelObjects1Objects, (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined));
}
for(var i = 0, len = gdjs.LeaderboardCode.GDRestartButtonObjects1.length ;i < len;++i) {
gdjs.LeaderboardCode.GDRestartButtonObjects1[i].getBehavior("Sticker").Stick(gdjs.LeaderboardCode.mapOfGDgdjs_9546LeaderboardCode_9546GDPanelObjects1Objects, (typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined));
}
}
{ //Subevents
gdjs.LeaderboardCode.eventsList0(runtimeScene);} //End of subevents
}
}
{
let isConditionTrue_0 = false;
{
gdjs.copyArray(runtimeScene.getObjects("Panel"), gdjs.LeaderboardCode.GDPanelObjects1);
{for(var i = 0, len = gdjs.LeaderboardCode.GDPanelObjects1.length ;i < len;++i) {
gdjs.LeaderboardCode.GDPanelObjects1[i].setCenterXInScene(gdjs.evtTools.window.getGameResolutionWidth(runtimeScene) / 2);
}
}}
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.playerAuthentication.hasLoggedIn();
if (isConditionTrue_0) {
gdjs.copyArray(runtimeScene.getObjects("PlayerNameInput"), gdjs.LeaderboardCode.GDPlayerNameInputObjects1);
{for(var i = 0, len = gdjs.LeaderboardCode.GDPlayerNameInputObjects1.length ;i < len;++i) {
gdjs.LeaderboardCode.GDPlayerNameInputObjects1[i].getBehavior("Text").setText(gdjs.playerAuthentication.getUsername());
}
}{for(var i = 0, len = gdjs.LeaderboardCode.GDPlayerNameInputObjects1.length ;i < len;++i) {
gdjs.LeaderboardCode.GDPlayerNameInputObjects1[i].setDisabled(true);
}
}{gdjs.playerAuthentication.displayAuthenticationBanner(runtimeScene);
}}
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.leaderboards.isLeaderboardViewErrored();
if (isConditionTrue_0) {
{gdjs.playerAuthentication.displayAuthenticationBanner(runtimeScene);
}}
}
{
gdjs.copyArray(runtimeScene.getObjects("RestartButton"), gdjs.LeaderboardCode.GDRestartButtonObjects1);
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
for (var i = 0, k = 0, l = gdjs.LeaderboardCode.GDRestartButtonObjects1.length;i<l;++i) {
if ( gdjs.LeaderboardCode.GDRestartButtonObjects1[i].IsClicked((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined)) ) {
isConditionTrue_0 = true;
gdjs.LeaderboardCode.GDRestartButtonObjects1[k] = gdjs.LeaderboardCode.GDRestartButtonObjects1[i];
++k;
}
}
gdjs.LeaderboardCode.GDRestartButtonObjects1.length = k;
if (isConditionTrue_0) {
{gdjs.playerAuthentication.removeAuthenticationBanner(runtimeScene);
}{gdjs.evtTools.runtimeScene.replaceScene(runtimeScene, "Game", false);
}}
}
{
}
{
gdjs.copyArray(runtimeScene.getObjects("SubmitButton"), gdjs.LeaderboardCode.GDSubmitButtonObjects1);
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
for (var i = 0, k = 0, l = gdjs.LeaderboardCode.GDSubmitButtonObjects1.length;i<l;++i) {
if ( gdjs.LeaderboardCode.GDSubmitButtonObjects1[i].IsClicked((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined)) ) {
isConditionTrue_0 = true;
gdjs.LeaderboardCode.GDSubmitButtonObjects1[k] = gdjs.LeaderboardCode.GDSubmitButtonObjects1[i];
++k;
}
}
gdjs.LeaderboardCode.GDSubmitButtonObjects1.length = k;
if (isConditionTrue_0) {
{ //Subevents
gdjs.LeaderboardCode.eventsList1(runtimeScene);} //End of subevents
}
}
{
}
{
let isConditionTrue_0 = false;
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.leaderboards.hasPlayerJustClosedLeaderboardView();
if (isConditionTrue_0) {
isConditionTrue_0 = false;
isConditionTrue_0 = gdjs.evtTools.leaderboards.hasBeenSaved("deb878e9-5785-4881-81f9-13b517269c46");
}
if (isConditionTrue_0) {
{gdjs.evtTools.runtimeScene.replaceScene(runtimeScene, "Game", false);
}}
}
{
gdjs.LeaderboardCode.eventsList4(runtimeScene);
}
};
gdjs.LeaderboardCode.func = function(runtimeScene) {
runtimeScene.getOnceTriggers().startNewFrame();
gdjs.LeaderboardCode.GDScoreTextObjects1.length = 0;
gdjs.LeaderboardCode.GDScoreTextObjects2.length = 0;
gdjs.LeaderboardCode.GDScoreTextObjects3.length = 0;
gdjs.LeaderboardCode.GDPlayerNameInputObjects1.length = 0;
gdjs.LeaderboardCode.GDPlayerNameInputObjects2.length = 0;
gdjs.LeaderboardCode.GDPlayerNameInputObjects3.length = 0;
gdjs.LeaderboardCode.GDSubmitButtonObjects1.length = 0;
gdjs.LeaderboardCode.GDSubmitButtonObjects2.length = 0;
gdjs.LeaderboardCode.GDSubmitButtonObjects3.length = 0;
gdjs.LeaderboardCode.GDRestartButtonObjects1.length = 0;
gdjs.LeaderboardCode.GDRestartButtonObjects2.length = 0;
gdjs.LeaderboardCode.GDRestartButtonObjects3.length = 0;
gdjs.LeaderboardCode.GDPanelObjects1.length = 0;
gdjs.LeaderboardCode.GDPanelObjects2.length = 0;
gdjs.LeaderboardCode.GDPanelObjects3.length = 0;
gdjs.LeaderboardCode.GDCoinObjects1.length = 0;
gdjs.LeaderboardCode.GDCoinObjects2.length = 0;
gdjs.LeaderboardCode.GDCoinObjects3.length = 0;
gdjs.LeaderboardCode.eventsList5(runtimeScene);
return;
}
gdjs['LeaderboardCode'] = gdjs.LeaderboardCode;
+2
View File
@@ -0,0 +1,2 @@
gdjs.projectData = {"firstLayout":"","gdVersion":{"build":99,"major":4,"minor":0,"revision":0},"properties":{"adaptGameResolutionAtRuntime":true,"antialiasingMode":"MSAA","antialisingEnabledOnMobile":false,"folderProject":false,"orientation":"landscape","packageName":"com.example.gamename","pixelsRounding":false,"projectUuid":"738d7e12-05f0-4699-89d7-d628c2d1fbe5","scaleMode":"linear","sizeOnStartupMode":"adaptWidth","templateSlug":"3d-car-coin-hunt","useExternalSourceFiles":false,"version":"1.0.0","name":"Wooden Walk (3d car coin hunt)","description":"A top-down 3D racing game with 360° controls where players chase coins that are spread in a city.","author":"","windowWidth":1280,"windowHeight":720,"latestCompilationDirectory":"C:\\Users\\miles\\Downloads\\New folder","maxFPS":60,"minFPS":20,"verticalSync":false,"platformSpecificAssets":{"android-icon-144":"android-icon-144.png","android-icon-192":"android-icon-192.png","android-icon-36":"android-icon-36.png","android-icon-48":"android-icon-48.png","android-icon-72":"android-icon-72.png","android-icon-96":"android-icon-96.png","android-windowSplashScreenAnimatedIcon":"android-windowSplashScreenAnimatedIcon.png","desktop-icon-512":"desktop-icon-512.png","ios-icon-100":"ios-icon-100.png","ios-icon-1024":"ios-icon-1024.png","ios-icon-114":"ios-icon-114.png","ios-icon-120":"ios-icon-120.png","ios-icon-144":"ios-icon-144.png","ios-icon-152":"ios-icon-152.png","ios-icon-167":"ios-icon-167.png","ios-icon-180":"ios-icon-180.png","ios-icon-20":"ios-icon-20.png","ios-icon-29":"ios-icon-29.png","ios-icon-40":"ios-icon-40.png","ios-icon-50":"ios-icon-50.png","ios-icon-57":"ios-icon-57.png","ios-icon-58":"ios-icon-58.png","ios-icon-60":"ios-icon-60.png","ios-icon-72":"ios-icon-72.png","ios-icon-76":"ios-icon-76.png","ios-icon-80":"ios-icon-80.png","ios-icon-87":"ios-icon-87.png","liluo-thumbnail":"thumbnail.png"},"loadingScreen":{"backgroundColor":0,"backgroundFadeInDuration":0.2,"backgroundImageResourceName":"","gdevelopLogoStyle":"light","logoAndProgressFadeInDuration":0.2,"logoAndProgressLogoFadeInDelay":0.2,"minDuration":1.5,"progressBarColor":16777215,"progressBarHeight":20.0,"progressBarMaxWidth":200.0,"progressBarMinWidth":40.0,"progressBarWidthPercent":30.0,"showGDevelopSplash":true,"showProgressBar":true},"watermark":{"placement":"bottom-left","showWatermark":true},"authorIds":["w3Goopb4decVgZx11A7ISgHYNF72"],"authorUsernames":["mileswa1q22"],"categories":["racing","leaderboard"],"playableDevices":["keyboard","mobile"],"extensionProperties":[],"platforms":[{"name":"GDevelop JS platform"}],"currentPlatform":"GDevelop JS platform"},"resources":{"resources":[{"alwaysLoaded":false,"file":"RoadWide.png","kind":"image","metadata":"","name":"RoadWide.png","smoothed":true,"userAdded":false},{"file":"Chango-Regular.ttf","kind":"font","metadata":"","name":"27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf","userAdded":true,"origin":{"identifier":"https://asset-resources.gdevelop.io/public-resources/Open Font License/27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf","name":"gdevelop-asset-store"}},{"file":"Collision.wav","kind":"audio","metadata":"{\"extension\":\".wav\",\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Jump 1\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0,\\\"sustain\\\":0.07,\\\"sustainPunch\\\":20,\\\"decay\\\":0.14343251891524278,\\\"tremoloDepth\\\":0,\\\"tremoloFrequency\\\":10,\\\"frequency\\\":7700,\\\"frequencySweep\\\":-4600,\\\"frequencyDeltaSweep\\\":-3100,\\\"repeatFrequency\\\":0,\\\"frequencyJump1Onset\\\":33,\\\"frequencyJump1Amount\\\":0,\\\"frequencyJump2Onset\\\":66,\\\"frequencyJump2Amount\\\":0,\\\"harmonics\\\":0,\\\"harmonicsFalloff\\\":0.5,\\\"waveform\\\":\\\"brownnoise\\\",\\\"interpolateNoise\\\":false,\\\"vibratoDepth\\\":0,\\\"vibratoFrequency\\\":10,\\\"squareDuty\\\":50,\\\"squareDutySweep\\\":0,\\\"flangerOffset\\\":0,\\\"flangerOffsetSweep\\\":0,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":22050,\\\"lowPassCutoffSweep\\\":0,\\\"highPassCutoff\\\":0,\\\"highPassCutoffSweep\\\":0,\\\"compression\\\":1.7000000000000002,\\\"normalization\\\":true,\\\"amplification\\\":100}\",\"name\":\"Collision\"}}","name":"Collision","preloadAsMusic":false,"preloadAsSound":true,"preloadInCache":false,"userAdded":false},{"file":"CarEngine.mp3","kind":"audio","metadata":"","name":"assets\\CarEngine.mp3","preloadAsMusic":false,"preloadAsSound":true,"preloadInCache":false,"userAdded":true},{"alwaysLoaded":false,"file":"Line light joystick thumb.png","kind":"image","metadata":"","name":"Line light joystick thumb.png","smoothed":true,"userAdded":false,"origin":{"identifier":"https://asset-resources.gdevelop.io/public-resources/Multitouch joysticks/6e451170154c7ae31c25495ad2d2ac48ba8c8d62e93e90bfcfe3c7e509c9ce66_Line light joystick thumb.png","name":"Line light joystick thumb.png"}},{"alwaysLoaded":false,"file":"Line light joystickLine truncated
gdjs.runtimeGameOptions = {};
Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

@@ -0,0 +1,2 @@
var gdjs;(function(L){let I;(function(d){let b;(function(r){r.setCameraX=function(t,e,n,s){!t.hasLayer(n)||t.getLayer(n).setCameraX(e,s)},r.setCameraY=function(t,e,n,s){!t.hasLayer(n)||t.getLayer(n).setCameraY(e,s)},r.getCameraX=function(t,e,n){return t.hasLayer(e)?t.getLayer(e).getCameraX():0},r.getCameraY=function(t,e,n){return t.hasLayer(e)?t.getLayer(e).getCameraY():0},r.getCameraWidth=function(t,e,n){return t.hasLayer(e)?t.getLayer(e).getCameraWidth():0},r.getCameraHeight=function(t,e,n){return t.hasLayer(e)?t.getLayer(e).getCameraHeight():0},r.getCameraBorderLeft=function(t,e,n){return t.hasLayer(e)?r.getCameraX(t,e,n)-r.getCameraWidth(t,e,n)/2:0},r.getCameraBorderRight=function(t,e,n){return t.hasLayer(e)?r.getCameraX(t,e,n)+r.getCameraWidth(t,e,n)/2:0},r.getCameraBorderTop=function(t,e,n){return t.hasLayer(e)?r.getCameraY(t,e,n)-r.getCameraHeight(t,e,n)/2:0},r.getCameraBorderBottom=function(t,e,n){return t.hasLayer(e)?r.getCameraY(t,e,n)+r.getCameraHeight(t,e,n)/2:0},r.showLayer=function(t,e){if(!!t.hasLayer(e))return t.getLayer(e).show(!0)},r.hideLayer=function(t,e){if(!!t.hasLayer(e))return t.getLayer(e).show(!1)},r.layerIsVisible=function(t,e){return t.hasLayer(e)&&t.getLayer(e).isVisible()},r.setCameraRotation=function(t,e,n,s){if(!!t.hasLayer(n))return t.getLayer(n).setCameraRotation(e,s)},r.getCameraRotation=function(t,e,n){return t.hasLayer(e)?t.getLayer(e).getCameraRotation(n):0},r.getCameraZoom=function(t,e,n){return t.hasLayer(e)?t.getLayer(e).getCameraZoom(n):0},r.setCameraZoom=function(t,e,n,s){if(!!t.hasLayer(n))return t.getLayer(n).setCameraZoom(e,s)},r.centerCamera=function(t,e,n,s,o){if(!t.hasLayer(s)||e==null)return;let f=0,i=0;if(n&&!e.hasNoForces()){const u=e.getAverageForce(),a=e.getElapsedTime(t)/1e3;f=u.getX()*a,i=u.getY()*a}const g=t.getLayer(s);g.setCameraX(e.getCenterXInScene()+f,o),g.setCameraY(e.getCenterYInScene()+i,o)},r.centerCameraWithinLimits=function(t,e,n,s,o,f,i,g,u){r.centerCamera(t,e,i,g,u),r.clampCamera(t,n,s,o,f,g,u)},r.clampCamera=function(t,e,n,s,o,f,i){if(!t.hasLayer(f))return;const g=t.getLayer(f),u=g.getCameraWidth(i)/2,a=g.getCameraHeight(i)/2,m=e+u,c=s-u,h=n+a,p=o-a,E=m<c?L.evtTools.common.clamp(g.getCameraX(i),m,c):(m+c)/2,B=h<p?L.evtTools.common.clamp(g.getCameraY(i),h,p):(h+p)/2;g.setCameraX(E,i),g.setCameraY(B,i)},r.setLayerEffectDoubleParameter=function(t,e,n,s,o){if(!!t.hasLayer(e))return t.getLayer(e).setEffectDoubleParameter(n,s,o)},r.setLayerEffectStringParameter=function(t,e,n,s,o){if(!!t.hasLayer(e))return t.getLayer(e).setEffectStringParameter(n,s,o)},r.setLayerEffectBooleanParameter=function(t,e,n,s,o){if(!!t.hasLayer(e))return t.getLayer(e).setEffectBooleanParameter(n,s,o)},r.enableLayerEffect=function(t,e,n,s){!t.hasLayer(e)||t.getLayer(e).enableEffect(n,s)},r.layerEffectEnabled=function(t,e,n){return t.hasLayer(e)?t.getLayer(e).isEffectEnabled(n):!0},r.setLayerTimeScale=function(t,e,n){if(!!t.hasLayer(e))return t.getLayer(e).setTimeScale(n)},r.getLayerTimeScale=function(t,e){return t.hasLayer(e)?t.getLayer(e).getTimeScale():1},r.setLayerDefaultZOrder=function(t,e,n){if(!!t.hasLayer(e))return t.getLayer(e).setDefaultZOrder(n)},r.getLayerDefaultZOrder=function(t,e){return t.hasLayer(e)?t.getLayer(e).getDefaultZOrder():0},r.setLayerAmbientLightColor=function(t,e,n){if(!t.hasLayer(e)||!t.getLayer(e).isLightingLayer())return;const s=n.split(";");if(!(s.length<3))return t.getLayer(e).setClearColor(parseInt(s[0],10),parseInt(s[1],10),parseInt(s[2],10))}})(b=d.camera||(d.camera={}))})(I=L.evtTools||(L.evtTools={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=cameratools.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(o){let s;(function(u){let p;(function(n){n.toNumber=function(t){return parseFloat(t)},n.toString=function(t){return""+t},n.logicalNegation=function(t){return!t},n.normalize=function(t,e,r){return e===r?r:(t-e)/(r-e)},n.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},n.acosh=function(t){return Math.log(t+Math.sqrt(t*t-1))},n.asinh=function(t){return Math.log(t+Math.sqrt(t*t+1))},n.atanh=function(t){return .5*Math.log((1+t)/(1-t))},n.cosh=function(t){return(Math.exp(t)+Math.exp(-t))/2},n.sinh=function(t){return(Math.exp(t)-Math.exp(-t))/2},n.tanh=function(t){return(Math.exp(t)-Math.exp(-t))/(Math.exp(t)+Math.exp(-t))},n.cot=function(t){return 1/Math.tan(t)},n.csc=function(t){return 1/Math.sin(t)},n.sec=function(t){return 1/Math.cos(t)},n.log10=function(t){return Math.log(t)/Math.LN10},n.log2=function(t){return Math.log(t)/Math.LN2},n.sign=function(t){return t===0?0:t>0?1:-1},n.cbrt=function(t){return Math.pow(t,1/3)},n.nthroot=function(t,e){return Math.pow(t,1/e)},n.mod=function(t,e){return t-e*Math.floor(t/e)},n.angleDifference=function(t,e){return o.evtTools.common.mod(o.evtTools.common.mod(t-e,360)+180,360)-180},n.angleBetweenPositions=function(t,e,r,i){return Math.atan2(i-e,r-t)*180/Math.PI},n.distanceBetweenPositions=function(t,e,r,i){return Math.sqrt((t-r)*(t-r)+(e-i)*(e-i))},n.lerp=function(t,e,r){return t+(e-t)*r},n.exponentialInterpolation=(t,e,r)=>{const i=Math.log(t),l=Math.log(e);return Math.exp(i+(l-i)*r)},n.trunc=function(t){return t|0},n.getXFromAngleAndDistance=function(t,e){return e*Math.cos(o.toRad(t))},n.getYFromAngleAndDistance=function(t,e){return e*Math.sin(o.toRad(t))},n.roundTo=function(t,e){return!e||!Number.isInteger(e)?Math.round(t):Math.round(t*Math.pow(10,e))/Math.pow(10,e)},n.floorTo=function(t,e){return!e||!Number.isInteger(e)?Math.floor(t):Math.floor(t*Math.pow(10,e))/Math.pow(10,e)},n.ceilTo=function(t,e){return!e||!Number.isInteger(e)?Math.ceil(t):Math.ceil(t*Math.pow(10,e))/Math.pow(10,e)},n.pi=function(){return Math.PI},n.lerpAngle=function(t,e,r){return t+o.evtTools.common.angleDifference(e,t)*r},n.resolveAsyncEventsFunction=t=>{!!t&&!!t.task&&!!t.task.resolve&&t.task.resolve()};const c=()=>{if(typeof cc!="undefined"&&cc.sys)return cc.sys.isMobile;if(typeof Cocoon!="undefined"&&Cocoon.App)return!0;if(typeof window!="undefined"&&window.cordova)return!0;if(typeof window!="undefined"){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))||/iPad|iPhone|iPod/.test(navigator.platform))return!0;if(/MacIntel/.test(navigator.platform))return!!navigator.maxTouchPoints&&navigator.maxTouchPoints>2}return!1};let a=null;n.isMobile=()=>a!==null?a:a=c()})(p=u.common||(u.common={}))})(s=o.evtTools||(o.evtTools={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=commontools.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(o){let i;(function(c){let d;(function(n){n.lastTouchId=0,n.lastEndedTouchId=0,n.keysNameToCode={a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,Num0:48,Num1:49,Num2:50,Num3:51,Num4:52,Num5:53,Num6:54,Num7:55,Num8:56,Num9:57,Numpad0:96,Numpad1:97,Numpad2:98,Numpad3:99,Numpad4:100,Numpad5:101,Numpad6:102,Numpad7:103,Numpad8:104,Numpad9:105,LShift:1016,RShift:2016,LControl:1017,RControl:2017,LAlt:1018,RAlt:2018,LSystem:1091,RSystem:2091,SemiColon:186,Comma:188,Period:190,Quote:222,Slash:191,BackSlash:220,Equal:187,Dash:189,Menu:93,LBracket:219,RBracket:221,Tilde:192,Space:32,Back:8,Tab:9,Delete:46,Insert:45,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Return:13,NumpadPageUp:3033,NumpadPageDown:3034,NumpadEnd:3035,NumpadHome:3036,NumpadReturn:3013,Add:107,Subtract:109,Multiply:106,Divide:111,NumpadAdd:3107,NumpadSubtract:3109,NumpadMultiply:3106,NumpadDivide:3111,Left:37,Up:38,Right:39,Down:40,NumpadLeft:3037,NumpadUp:3038,NumpadRight:3039,NumpadDown:3040,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,Pause:19};const u={};for(const e in n.keysNameToCode)n.keysNameToCode.hasOwnProperty(e)&&(u[n.keysNameToCode[e]]=e);n.mouseButtonsNameToCode={Left:o.InputManager.MOUSE_LEFT_BUTTON,Right:o.InputManager.MOUSE_RIGHT_BUTTON,Middle:o.InputManager.MOUSE_MIDDLE_BUTTON,Back:o.InputManager.MOUSE_BACK_BUTTON,Forward:o.InputManager.MOUSE_FORWARD_BUTTON},n.isKeyPressed=function(e,t){return o.evtTools.input.keysNameToCode.hasOwnProperty(t)?e.getGame().getInputManager().isKeyPressed(o.evtTools.input.keysNameToCode[t]):!1},n.wasKeyReleased=function(e,t){return o.evtTools.input.keysNameToCode.hasOwnProperty(t)?e.getGame().getInputManager().wasKeyReleased(o.evtTools.input.keysNameToCode[t]):!1},n.lastPressedKey=function(e){const t=e.getGame().getInputManager().getLastPressedKey();return u.hasOwnProperty(t)?u[t]:""},n.anyKeyPressed=function(e){return e.getGame().getInputManager().anyKeyPressed()},n.anyKeyReleased=function(e){return e.getGame().getInputManager().anyKeyReleased()},n.isMouseButtonPressed=function(e,t){return o.evtTools.input.mouseButtonsNameToCode.hasOwnProperty(t)?e.getGame().getInputManager().isMouseButtonPressed(o.evtTools.input.mouseButtonsNameToCode[t]):!1},n.isMouseButtonReleased=function(e,t){return o.evtTools.input.mouseButtonsNameToCode.hasOwnProperty(t)?e.getGame().getInputManager().isMouseButtonReleased(o.evtTools.input.mouseButtonsNameToCode[t]):!1},n.hideCursor=function(e){e.getScene().getRenderer().hideCursor()},n.showCursor=function(e){e.getScene().getRenderer().showCursor()},n.getMouseWheelDelta=function(e){return e.getGame().getInputManager().getMouseWheelDelta()},n.isScrollingUp=function(e){return e.getGame().getInputManager().isScrollingUp()},n.isScrollingDown=function(e){return e.getGame().getInputManager().isScrollingDown()},n.getMouseX=function(e,t,r){return n.getCursorX(e,t,r)},n.getMouseY=function(e,t,r){return n.getCursorY(e,t,r)},n.getCursorX=function(e,t,r){const a=o.staticArray(o.evtTools.input.getCursorX);return e.getLayer(t).convertCoords(e.getGame().getInputManager().getCursorX(),e.getGame().getInputManager().getCursorY(),0,a)[0]},n.getCursorY=function(e,t,r){const a=o.staticArray(o.evtTools.input.getCursorY);return e.getLayer(t).convertCoords(e.getGame().getInputManager().getCursorX(),e.getGame().getInputManager().getCursorY(),0,a)[1]},n.getMouseOnlyCursorX=function(e,t,r){const a=o.staticArray(o.evtTools.input.getMouseOnlyCursorX);return e.getLayer(t).convertCoords(e.getGame().getInputManager().getMouseX(),e.getGame().getInputManager().getMouseY(),0,a)[0]},n.getMouseOnlyCursorY=function(e,t,r){const a=o.staticArray(o.evtTools.input.getMouseOnlyCursorY);return e.getLayer(t).convertCoords(e.getGame().getInputManager().getMouseX(),e.getGame().getInputManager().getMouseY(),0,a)[1]},n.isMouseInsideCanvas=function(e){return e.getGame().getInputManager().isMouseInsideCanvas()};const I=function(e,t){return e.cursorOnObject(t)};n.cursorOnObject=function(e,t,r,a){return o.evtTools.object.pickObjectsIf(I,e,a,t)},n.getTouchX=function(e,t,r,a){const g=o.staticArray(o.evtTools.input.getTouchX);return e.getLayer(r).convertCoords(e.getGame().getInputManager().getTouchX(t),e.getGame().getInputManager().getTouchY(t),0,g)[0]},n.getTouchY=(e,t,r,a)=>{const g=o.staticArray(o.evtTools.input.getTouchY);return e.getLayer(r).convertCoords(e.getGame().getInputManager().getTouchX(t),e.getGame().getInputManager().getTouchY(t),0,g)[1]},n.hasAnyTouchStarted=e=>{const t=e.getGame().getInputManager().getStartedTouchIdentifiers();return t.length>1||t.length>0&&t[0]!==o.InputManager.MOUSE_TOUCH_ID},n.getStartedTouchCount=e=>{const t=e.getGame().getInputManager().getStartedTouchIdentifiers();return t.length+(t.includes(o.InputManager.MOUSE_TOUCH_ID)?-1:0)},n.getStartedTouchIdentifier=(e,t)=>{const r=e.getGame().getInputManager().getStartedTouchIdentifiers(),a=r.indexOf(o.InputMaLine truncated
//# sourceMappingURL=inputtools.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(u){let p;(function(g){let d;(function(r){r.sendAsyncRequest=function(n,s,i,o,c,a){const e=t=>{t instanceof ProgressEvent&&t.currentTarget&&t.currentTarget instanceof XMLHttpRequest&&t.currentTarget.status===0?a.setString("REQUEST_NOT_SENT"):a.setString(""+t)};try{const t=new XMLHttpRequest;t.onerror=e,t.ontimeout=e,t.onabort=e,t.onreadystatechange=()=>{t.readyState===4&&(t.status>=400&&e(""+t.status),c.setString(t.responseText))},t.open(i,n),t.setRequestHeader("Content-Type",o===""?"application/x-www-form-urlencoded":o),t.send(s)}catch(t){e(t)}},r.sendAwaitableAsyncRequest=(n,s,i,o,c,a)=>new u.PromiseTask(fetch(n,{body:i!=="GET"?s:void 0,method:i,headers:{"Content-Type":o||"application/x-www-form-urlencoded"}}).then(async e=>{const t=await e.text();e.status>=400&&a.setString(""+e.status),c.setString(t)},e=>{a.setString(""+e)})),r.sendDeprecatedSynchronousRequest=function(n,s,i,o,c,a){try{let e;if(typeof XMLHttpRequest!="undefined")e=new XMLHttpRequest;else{const t=["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"];for(let l=0,b=t.length;l<b;l++)try{e=new ActiveXObject(t[l]);break}catch{}}if(e===void 0)return;e.open(o,n+s,!1),e.setRequestHeader("Content-Type",c===""?"application/x-www-form-urlencoded":c),e.send(i),a.setString(e.responseText)}catch{}},r.enableMetrics=function(n,s){n.getGame().enableMetrics(s)},r.variableStructureToJSON=function(n){return JSON.stringify(n.toJSObject())},r.objectVariableStructureToJSON=function(n,s){return JSON.stringify(s.toJSObject())},r._objectToVariable=function(n,s){s.fromJSObject(n)},r.jsonToVariableStructure=function(n,s){s.fromJSON(n)},r.jsonToObjectVariableStructure=function(n,s,i){i.fromJSON(n)}})(d=g.network||(g.network={}))})(p=u.evtTools||(u.evtTools={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=networktools.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(r){let x;(function(p){let C;(function(g){g.pickOnly=function(s,t){for(const e in s.items)if(s.items.hasOwnProperty(e)){const n=s.items[e];n.indexOf(t)===-1?n.length=0:(n.length=0,n.push(t))}},g.twoListsTest=function(s,t,e,n,o){let u=!1;const i=r.staticArray(r.evtTools.object.twoListsTest);t.values(i);const f=r.staticArray2(r.evtTools.object.twoListsTest);e.values(f);for(let a=0,b=i.length;a<b;++a){let c=i[a];for(let l=0,O=c.length;l<O;++l)c[l].pick=!1}for(let a=0,b=f.length;a<b;++a){let c=f[a];for(let l=0,O=c.length;l<O;++l)c[l].pick=!1}for(let a=0,b=i.length;a<b;++a){const c=i[a];for(let l=0,O=c.length;l<O;++l){let k=!1;for(let d=0,L=f.length;d<L;++d){const T=f[d];for(let h=0,R=T.length;h<R;++h)c[l].pick&&T[h].pick||c[l].id!==T[h].id&&s(c[l],T[h],o)&&(n||(u=!0,c[l].pick=!0,T[h].pick=!0),k=!0)}!k&&n&&(u=!0,c[l].pick=!0)}}for(let a=0,b=i.length;a<b;++a){let c=i[a],l=0;for(let O=0,k=c.length;O<k;++O){let d=c[O];c[O].pick&&(c[l]=d,l++)}c.length=l}if(!n)for(let a=0,b=f.length;a<b;++a){let c=f[a],l=0;for(let O=0,k=c.length;O<k;++O){let d=c[O];c[O].pick&&(c[l]=d,l++)}c.length=l}return u},g.pickObjectsIf=function(s,t,e,n){let o=!1;const u=r.staticArray(r.evtTools.object.pickObjectsIf);t.values(u);for(let i=0,f=u.length;i<f;++i){const a=u[i];for(let b=0,c=a.length;b<c;++b){const l=a[b];e^s(l,n)?(o=!0,l.pick=!0):l.pick=!1}}for(let i=0,f=u.length;i<f;++i)r.evtTools.object.filterPickedObjectsList(u[i]);return o},g.filterPickedObjectsList=function(s){let t=0;for(let e=0,n=s.length;e<n;++e){const o=s[e];o.pick&&(s[t]=o,t++)}s.length=t},g.hitBoxesCollisionTest=function(s,t,e,n,o){return r.evtTools.object.twoListsTest(r.RuntimeObject.collisionTest,s,t,e,o)},g._distanceBetweenObjects=function(s,t,e){return s.getSqDistanceToObject(t)<=e},g.distanceTest=function(s,t,e,n){return r.evtTools.object.twoListsTest(r.evtTools.object._distanceBetweenObjects,s,t,n,e*e)},g._movesToward=function(s,t,e){if(s.hasNoForces())return!1;let n=Math.atan2(t.getDrawableY()+t.getCenterY()-(s.getDrawableY()+s.getCenterY()),t.getDrawableX()+t.getCenterX()-(s.getDrawableX()+s.getCenterX()));return n*=180/3.14159,Math.abs(r.evtTools.common.angleDifference(s.getAverageForce().getAngle(),n))<=e/2},g.movesTowardTest=function(s,t,e,n){return r.evtTools.object.twoListsTest(r.evtTools.object._movesToward,s,t,n,e)},g._turnedToward=function(s,t,e){let n=Math.atan2(t.getDrawableY()+t.getCenterY()-(s.getDrawableY()+s.getCenterY()),t.getDrawableX()+t.getCenterX()-(s.getDrawableX()+s.getCenterX()));return n*=180/3.14159,Math.abs(r.evtTools.common.angleDifference(s.getAngle(),n))<=e/2},g.turnedTowardTest=function(s,t,e,n){return r.evtTools.object.twoListsTest(r.evtTools.object._turnedToward,s,t,n,e)},g.pickAllObjects=function(s,t){for(const e in t.items)if(t.items.hasOwnProperty(e)){const n=s.getObjects(e),o=t.items[e];o.length=0,o.push.apply(o,n)}return!0},g.pickRandomObject=function(s,t){let e=0;for(let i in t.items)t.items.hasOwnProperty(i)&&(e+=t.items[i].length);if(e===0)return!1;let n=Math.floor(Math.random()*e);n>=e&&(n=e-1);let o=0,u=null;for(let i in t.items)if(t.items.hasOwnProperty(i)){let f=t.items[i];if(n-o<f.length){u=f[n-o];break}o+=f.length}return r.evtTools.object.pickOnly(t,u),!0},g.pickNearestObject=function(s,t,e,n){let o=null,u=0,i=!0;const f=r.staticArray(r.evtTools.object.pickNearestObject);s.values(f);for(let a=0,b=f.length;a<b;++a){const c=f[a];for(let l=0;l<c.length;++l){const O=c[l],k=O.getSqDistanceToPosition(t,e);(i||k<u^n)&&(u=k,o=O),i=!1}}return o?(r.evtTools.object.pickOnly(s,o),!0):!1},g.raycastObject=function(s,t,e,n,o,u,i,f){return r.evtTools.object.raycastObjectToPosition(s,t,e,t+o*Math.cos(n*Math.PI/180),e+o*Math.sin(n*Math.PI/180),u,i,f)},g.raycastObjectToPosition=function(s,t,e,n,o,u,i,f){let a=null,b=f?0:(n-t)*(n-t)+(o-e)*(o-e),c=0,l=0;const O=r.staticArray(r.evtTools.object.raycastObjectToPosition);s.values(O);for(let k=0;k<O.length;k++){const d=O[k];for(let L=0;L<d.length;L++){const T=d[L],h=T.raycastTest(t,e,n,o,!f);h.collision&&(!f&&h.closeSqDist<=b?(b=h.closeSqDist,a=T,c=h.closeX,l=h.closeY):f&&h.farSqDist>=b&&(b=h.farSqDist,a=T,c=h.farX,l=h.farY))}}return a?(r.evtTools.object.pickOnly(s,a),u.setNumber(c),i.setNumber(l),!0):!1},g.doCreateObjectOnScene=function(s,t,e,n,o,u){const i=s.createObject(t),f=s.getLayer(u);return i!==null&&(i.setPosition(n,o),i.setLayer(u),i.setZOrder(f.getDefaultZOrder()),e.containsKey(t)&&e.get(t).push(i)),i},g.createObjectOnScene=function(s,t,e,n,o){return r.evtTools.object.doCreateObjectOnScene(s,t.firstKey(),t,e,n,o)},g.createObjectFromGroupOnScene=function(s,t,e,n,o,u){r.evtTools.object.doCreateObjectOnScene(s,e,t,n,o,u)},g.getPickedInstancesCount=s=>{let t=0;const e=r.staticArray(r.evtTools.object.getPickedInstancesCount);s.values(e);for(let n=0,o=e.length;n<o;++n)t+=e[n].length;return t},g.getSceneInstancesCount=(s,t)=>{let e=0;const n=r.staticArray(r.evtTools.object.getSceneInstancesCount);t.keys(n);const o=new Set(n);for(const u of o)e+=s.getInstancesCountOnScene(uLine truncated
//# sourceMappingURL=objecttools.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(r){let c;(function(i){let u;(function(s){s.sceneJustBegins=function(e){return e.getScene().getTimeManager().isFirstFrame()},s.sceneJustResumed=function(e){return e.getScene().sceneJustResumed()},s.getSceneName=function(e){return e.getScene().getName()},s.setBackgroundColor=function(e,t){const n=t.split(";");n.length<3||e.getScene().setBackgroundColor(parseInt(n[0]),parseInt(n[1]),parseInt(n[2]))},s.getElapsedTimeInSeconds=function(e){return e.getScene().getTimeManager().getElapsedTime()/1e3},s.setTimeScale=function(e,t){return e.getScene().getTimeManager().setTimeScale(t)},s.getTimeScale=function(e){return e.getScene().getTimeManager().getTimeScale()},s.timerElapsedTime=function(e,t,n){const a=e.getScene().getTimeManager();return a.hasTimer(n)?a.getTimer(n).getTime()/1e3>=t:(a.addTimer(n),!1)},s.timerPaused=function(e,t){const n=e.getScene().getTimeManager();return n.hasTimer(t)?n.getTimer(t).isPaused():!1},s.resetTimer=function(e,t){const n=e.getScene().getTimeManager();n.hasTimer(t)?n.getTimer(t).reset():n.addTimer(t)},s.pauseTimer=function(e,t){const n=e.getScene().getTimeManager();n.hasTimer(t)||n.addTimer(t),n.getTimer(t).setPaused(!0)},s.unpauseTimer=function(e,t){const n=e.getScene().getTimeManager();return n.hasTimer(t)||n.addTimer(t),n.getTimer(t).setPaused(!1)},s.removeTimer=function(e,t){e.getScene().getTimeManager().removeTimer(t)};class m extends r.AsyncTask{constructor(t){super();this.timeElapsedOnScene=0;this.duration=t}update(t){return this.timeElapsedOnScene+=t.getScene().getTimeManager().getElapsedTime(),this.timeElapsedOnScene>=this.duration}}s.WaitTask=m,s.wait=e=>new m(e*1e3),s.getTimerElapsedTimeInSeconds=function(e,t){const n=e.getScene().getTimeManager();return n.hasTimer(t)?n.getTimer(t).getTime()/1e3:0},s.getTimerElapsedTimeInSecondsOrNaN=function(e,t){const n=e.getScene().getTimeManager();return n.hasTimer(t)?n.getTimer(t).getTime()/1e3:Number.NaN},s.getTimeFromStartInSeconds=function(e){return e.getScene().getTimeManager().getTimeFromStart()/1e3},s.getTime=function(e,t){if(t==="timestamp")return Date.now();const n=new Date;if(t==="hour")return n.getHours();if(t==="min")return n.getMinutes();if(t==="sec")return n.getSeconds();if(t==="mday")return n.getDate();if(t==="mon")return n.getMonth();if(t==="year")return n.getFullYear()-1900;if(t==="wday")return n.getDay();if(t==="yday"){const a=new Date(n.getFullYear(),0,0),o=n.getTime()-a.getTime(),g=1e3*60*60*24;return Math.floor(o/g)}return 0},s.replaceScene=function(e,t,n){!e.getGame().getSceneData(t)||e.getScene().requestChange(n?r.SceneChangeRequest.CLEAR_SCENES:r.SceneChangeRequest.REPLACE_SCENE,t)},s.pushScene=function(e,t){!e.getGame().getSceneData(t)||e.getScene().requestChange(r.SceneChangeRequest.PUSH_SCENE,t)},s.popScene=function(e){e.getScene().requestChange(r.SceneChangeRequest.POP_SCENE)},s.stopGame=function(e){e.getScene().requestChange(r.SceneChangeRequest.STOP_GAME)},s.createObjectsFromExternalLayout=function(e,t,n,a,o){const g=e.getGame().getExternalLayoutData(t);g!==null&&e.getScene().createObjectsFrom(g.instances,n,a,o||0,!1)},s.hasGameJustResumed=e=>e.getGame().hasJustResumed(),s.doesSceneExist=(e,t)=>e.getGame().hasScene(t)})(u=i.runtimeScene||(i.runtimeScene={}))})(c=r.evtTools||(r.evtTools={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=runtimescenetools.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(s){let r;(function(c){let l;(function(o){const a=new s.Logger("Audio events");o.getGlobalVolume=function(t){return t.getScene().getSoundManager().getGlobalVolume()},o.setGlobalVolume=function(t,e){t.getScene().getSoundManager().setGlobalVolume(e)},o.unloadAllAudio=function(t){t.getScene().getSoundManager().unloadAll()},o.playSound=function(t,e,n,i,g){t.getScene().getSoundManager().playSound(e,n,i,g)},o.playSoundOnChannel=function(t,e,n,i,g,u){t.getScene().getSoundManager().playSoundOnChannel(e,n,i,g,u)},o.stopSoundOnChannel=function(t,e){const n=t.getScene().getSoundManager().getSoundOnChannel(e);n?n.stop():a.error(`Cannot stop non-existing sound on channel ${e}.`)},o.pauseSoundOnChannel=function(t,e){const n=t.getScene().getSoundManager().getSoundOnChannel(e);n?n.pause():a.error(`Cannot pause non-existing sound on channel ${e}.`)},o.continueSoundOnChannel=function(t,e){const n=t.getScene().getSoundManager().getSoundOnChannel(e);n?n.playing()||n.play():a.error(`Cannot continue playing non-existing sound on channel ${e}.`)},o.isSoundOnChannelPlaying=function(t,e){const n=t.getScene().getSoundManager().getSoundOnChannel(e);return n?n.playing():!1},o.isSoundOnChannelPaused=function(t,e){const n=t.getScene().getSoundManager().getSoundOnChannel(e);return n?n.paused():(a.error(`Cannot check if non-existing sound on channel ${e} is paused.`),!1)},o.isSoundOnChannelStopped=function(t,e){const n=t.getScene().getSoundManager().getSoundOnChannel(e);return n?n.stopped():(a.error(`Cannot check if non-existing sound on channel ${e} is stopped.`),!0)},o.getSoundOnChannelVolume=function(t,e){const n=t.getScene().getSoundManager().getSoundOnChannel(e);return n?n.getVolume()*100:(a.error(`Cannot get the volume of a non-existing sound on channel ${e}.`),100)},o.setSoundOnChannelVolume=function(t,e,n){const i=t.getScene().getSoundManager().getSoundOnChannel(e);i?i.setVolume(n/100):a.error(`Cannot set the volume of a non-existing sound on channel ${e}.`)},o.getSoundOnChannelPlayingOffset=function(t,e){const n=t.getScene().getSoundManager().getSoundOnChannel(e);return n?n.getSeek():(a.error(`Cannot get the playing offset of a non-existing sound on channel ${e}.`),0)},o.setSoundOnChannelPlayingOffset=function(t,e,n){const i=t.getScene().getSoundManager().getSoundOnChannel(e);i?i.setSeek(n):a.error(`Cannot set the playing offset of a non-existing sound on channel ${e}.`)},o.getSoundOnChannelPitch=function(t,e){const n=t.getScene().getSoundManager().getSoundOnChannel(e);return n?n.getRate():(a.error(`Cannot get the pitch of a non-existing sound on channel ${e}.`),1)},o.setSoundOnChannelPitch=function(t,e,n){const i=t.getScene().getSoundManager().getSoundOnChannel(e);i?i.setRate(n):a.error(`Cannot get the pitch of a non-existing sound on channel ${e}.`)},o.preloadSound=(t,e)=>t.getScene().getSoundManager().loadAudio(e,!1),o.unloadSound=(t,e)=>t.getScene().getSoundManager().unloadAudio(e,!1),o.playMusic=function(t,e,n,i,g){t.getScene().getSoundManager().playMusic(e,n,i,g)},o.playMusicOnChannel=function(t,e,n,i,g,u){t.getScene().getSoundManager().playMusicOnChannel(e,n,i,g,u)},o.stopMusicOnChannel=function(t,e){const n=t.getScene().getSoundManager().getMusicOnChannel(e);n?n.stop():a.error(`Cannot stop a non-existing music on channel ${e}.`)},o.pauseMusicOnChannel=function(t,e){const n=t.getScene().getSoundManager().getMusicOnChannel(e);n?n.pause():a.error(`Cannot pause a non-existing music on channel ${e}.`)},o.continueMusicOnChannel=function(t,e){const n=t.getScene().getSoundManager().getMusicOnChannel(e);n?n.playing()||n.play():a.error(`Cannot stop a non-existing music on channel ${e}.`)},o.isMusicOnChannelPlaying=function(t,e){const n=t.getScene().getSoundManager().getMusicOnChannel(e);return n?n.playing():!1},o.isMusicOnChannelPaused=function(t,e){const n=t.getScene().getSoundManager().getMusicOnChannel(e);return n?n.paused():(a.error(`Cannot check if non-existing music on channel ${e} is paused.`),!1)},o.isMusicOnChannelStopped=function(t,e){const n=t.getScene().getSoundManager().getMusicOnChannel(e);return n?n.stopped():(a.error(`Cannot check if non-existing music on channel ${e} is stopped.`),!0)},o.getMusicOnChannelVolume=function(t,e){const n=t.getScene().getSoundManager().getMusicOnChannel(e);return n?n.getVolume()*100:(a.error(`Cannot get the volume of a non-existing music on channel ${e}.`),100)},o.setMusicOnChannelVolume=function(t,e,n){const i=t.getScene().getSoundManager().getMusicOnChannel(e);i?i.setVolume(n/100):a.error(`Cannot set the volume of a non-existing music on channel ${e}.`)},o.getMusicOnChannelPlayingOffset=function(t,e){const n=t.getScene().getSoundManager().getMusicOnChannel(e);return n?n.getSeek():(a.error(`Cannot get the playing offset of a non-existing music on channel ${e}.`),0)},o.setMusicOnChannelPlayingOffset=function(t,e,n){const i=t.getScene().getSoundManager().getMusicOnChannel(e);i?i.setSeek(n):a.error(`Cannot set the playing offset of a non-existing music on channel ${e}.`)Line truncated
//# sourceMappingURL=soundtools.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(S){const f=new S.Logger("Storage");let d;(function(p){let h;(function(a){let c=null;try{typeof cc!="undefined"?c=cc.sys.localStorage:typeof window!="undefined"&&(c=window.localStorage)}catch(t){f.error("Unable to get access to the localStorage: "+t)}c||f.error("Storage actions won't work as no localStorage was found.");const u=new Hashtable;a.loadJSONFileFromStorage=t=>{if(u.containsKey(t))return;let i=null;try{c&&(i=c.getItem("GDJS_"+t))}catch(l){f.error('Unable to load data from localStorage for "'+t+'": '+l)}let o={};try{i&&(o=JSON.parse(i))}catch(l){f.error('Unable to load data from "'+t+'" - data is not valid JSON: '+l)}u.put(t,o)},a.unloadJSONFile=t=>{if(!u.containsKey(t))return;const i=u.get(t),o=JSON.stringify(i);try{c&&c.setItem("GDJS_"+t,o)}catch(l){f.error('Unable to save data to localStorage for "'+t+'": '+l)}u.remove(t)};const g=(t,i)=>{let o=!1;u.containsKey(t)||(o=!0,a.loadJSONFileFromStorage(t));const l=i(u.get(t));return o&&a.unloadJSONFile(t),l};a.clearJSONFile=t=>g(t,i=>{for(const o in i)i.hasOwnProperty(o)&&delete i[o];return!0}),a.elementExistsInJSONFile=(t,i)=>g(t,o=>{const l=i.split("/");let n=o;for(let e=0;e<l.length;++e){if(!n[l[e]])return!1;n=n[l[e]]}return!0}),a.deleteElementFromJSONFile=(t,i)=>g(t,o=>{const l=i.split("/");let n=o;for(let e=0;e<l.length;++e){if(!n[l[e]])return!1;e===l.length-1?delete n[l[e]]:n=n[l[e]]}return!0}),a.writeNumberInJSONFile=(t,i,o)=>g(t,l=>{const n=i.split("/");let e=l;for(let r=0;r<n.length;++r)e[n[r]]||(e[n[r]]={}),r===n.length-1?e[n[r]].value=o:e=e[n[r]];return!0}),a.writeStringInJSONFile=(t,i,o)=>g(t,l=>{const n=i.split("/");let e=l;for(let r=0;r<n.length;++r)e[n[r]]||(e[n[r]]={}),r===n.length-1?e[n[r]].str=o:e=e[n[r]];return!0}),a.readNumberFromJSONFile=(t,i,o,l)=>g(t,n=>{const e=i.split("/");let r=n;for(let s=0;s<e.length;++s){if(!r[e[s]])return!1;s===e.length-1&&typeof r[e[s]].value!="undefined"?l.setNumber(r[e[s]].value):r=r[e[s]]}return!0}),a.readStringFromJSONFile=(t,i,o,l)=>g(t,n=>{const e=i.split("/");let r=n;for(let s=0;s<e.length;++s){if(!r[e[s]])return!1;s===e.length-1&&typeof r[e[s]].str!="undefined"?l.setString(r[e[s]].str):r=r[e[s]]}return!0})})(h=p.storage||(p.storage={}))})(d=S.evtTools||(S.evtTools={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=storagetools.js.map
@@ -0,0 +1,3 @@
var gdjs;(function(s){let p;(function(c){let f;(function(e){e.newLine=function(){return`
`},e.fromCodePoint=function(t){return String.fromCodePoint(t)},e.toUpperCase=function(t){return t.toUpperCase()},e.toLowerCase=function(t){return t.toLowerCase()},e.subStr=function(t,n,r){return n<t.length&&n>=0?t.substr(n,r):""},e.strAt=function(t,n){return n<t.length&&n>=0?t.substr(n,1):""},e.strRepeat=function(t,n){let r="";for(let o=0;o<n;o++)r+=t;return r},e.strLen=function(t){return t.length},e.strFind=function(t,n){return t.indexOf(n)},e.strFindLast=function(t,n){return t.lastIndexOf(n)},e.strRFind=s.evtTools.string.strFindLast,e.strFindFrom=function(t,n,r){return t.indexOf(n,r)},e.strFindLastFrom=function(t,n,r){return t.lastIndexOf(n,r)},e.strReplaceOne=function(t,n,r){return t.replace(n,r)},e.strReplaceAll=function(t,n,r){let o=t,u=0,i=o.indexOf(n,u);for(;i!==-1&&(o=o.substring(0,i)+r+o.substring(i+n.length,o.length),u=i+r.length+(n.length===0?1:0),!(u>o.length));)i=o.indexOf(n,u);return o},e.strRFindFrom=s.evtTools.string.strFindLastFrom})(f=c.string||(c.string={}))})(p=s.evtTools||(s.evtTools={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=stringtools.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(a){let l;(function(o){let i;(function(r){r.getVariableNumber=function(e){return e.getAsNumber()},r.getVariableString=function(e){return e.getAsString()},r.getVariableBoolean=function(e,t){return e.getAsBoolean()===t},r.setVariableBoolean=function(e,t){e.setBoolean(t)},r.toggleVariableBoolean=function(e){e.setBoolean(!e.getAsBoolean())},r.sceneVariableExists=function(e,t){return e.getScene().getVariables().has(t)},r.globalVariableExists=function(e,t){return e.getGame().getVariables().has(t)},r.variableChildExists=function(e,t){return e.hasChild(t)},r.variableRemoveChild=function(e,t){e.removeChild(t)},r.variableClearChildren=function(e){e.clearChildren()},r.variablePushCopy=function(e,t){e.pushVariableCopy(t)},r.valuePush=function(e,t){e.pushValue(t)},r.variableRemoveAt=function(e,t){e.removeAtIndex(t)},r.getVariableChildCount=function(e){return e.getChildrenCount()},r.getFirstVariableNumber=function(e){return e.getChildrenCount()===0?0:e.getAllChildrenArray()[0].getAsNumber()},r.getFirstVariableString=function(e){return e.getChildrenCount()===0?"":e.getAllChildrenArray()[0].getAsString()},r.getLastVariableNumber=function(e){const t=e.getAllChildrenArray();return t.length===0?0:t[t.length-1].getAsNumber()},r.getLastVariableString=function(e){const t=e.getAllChildrenArray();return t.length===0?"":t[t.length-1].getAsString()}})(i=o.variable||(o.variable={}));let s;(function(n){n.getVariableNumber=a.evtTools.variable.getVariableNumber,n.getVariableString=a.evtTools.variable.getVariableString,n.getVariableBoolean=a.evtTools.variable.getVariableBoolean,n.setVariableBoolean=a.evtTools.variable.setVariableBoolean,n.toggleVariableBoolean=a.evtTools.variable.toggleVariableBoolean,n.sceneVariableExists=a.evtTools.variable.sceneVariableExists,n.globalVariableExists=a.evtTools.variable.globalVariableExists,n.variableChildExists=a.evtTools.variable.variableChildExists,n.variableRemoveChild=a.evtTools.variable.variableRemoveChild,n.variableClearChildren=a.evtTools.variable.variableClearChildren,n.variablePushCopy=a.evtTools.variable.variablePushCopy,n.valuePush=a.evtTools.variable.valuePush,n.variableRemoveAt=a.evtTools.variable.variableRemoveAt,n.getVariableChildCount=a.evtTools.variable.getVariableChildCount})(s=o.common||(o.common={}))})(l=a.evtTools||(a.evtTools={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=variabletools.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(r){let s;(function(u){let m;(function(t){t.setMargins=function(e,n,o,i,g){e.getGame().getRenderer().setMargins(n,o,i,g)},t.setFullScreen=function(e,n,o){e.getGame().getRenderer().keepAspectRatio(o),e.getGame().getRenderer().setFullScreen(n)},t.isFullScreen=function(e){return e.getGame().getRenderer().isFullScreen()},t.setWindowSize=function(e,n,o,i){e.getGame().getRenderer().setWindowSize(n,o),i&&e.getGame().setGameResolutionSize(n,o)},t.centerWindow=function(e){e.getGame().getRenderer().centerWindow()},t.setGameResolutionSize=function(e,n,o){e.getGame().setGameResolutionSize(n,o)},t.setGameResolutionResizeMode=function(e,n){e.getGame().setGameResolutionResizeMode(n)},t.setAdaptGameResolutionAtRuntime=function(e,n){e.getGame().setAdaptGameResolutionAtRuntime(n)},t.setWindowTitle=function(e,n){e.getGame().getRenderer().setWindowTitle(n)},t.getWindowTitle=function(e){return e.getGame().getRenderer().getWindowTitle()},t.getWindowInnerWidth=function(){return r.RuntimeGameRenderer&&r.RuntimeGameRenderer.getWindowInnerWidth?r.RuntimeGameRenderer.getWindowInnerWidth():typeof t!="undefined"?t.innerWidth:800},t.getWindowInnerHeight=function(){return r.RuntimeGameRenderer&&r.RuntimeGameRenderer.getWindowInnerHeight?r.RuntimeGameRenderer.getWindowInnerHeight():typeof t!="undefined"?t.innerHeight:800},t.getGameResolutionWidth=function(e){return e.getGame().getGameResolutionWidth()},t.getGameResolutionHeight=function(e){return e.getGame().getGameResolutionHeight()},t.openURL=function(e,n){return n.getGame().getRenderer().openURL(e)}})(m=u.window||(u.window={}))})(s=r.evtTools||(r.evtTools={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=windowtools.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(l){const i=new l.Logger("Font manager");class d{constructor(t,e){this._loadedFontFamily={};this._loadedFonts={};this._filenameToFontFamily={};this._resources=new Map,this.setResources(t),this._resourcesLoader=e}setResources(t){this._resources.clear();for(const e of t)e.kind==="font"&&this._resources.set(e.name,e)}getFontFamily(t){return this._loadedFontFamily[t]?this._loadedFontFamily[t]:"Arial"}getFontFile(t){return this._loadedFonts[t]?this._loadedFonts[t].file||"":t}_getFontFamilyFromFilename(t){if(this._filenameToFontFamily[t])return this._filenameToFontFamily[t];let e="gdjs_font_"+t.toLowerCase().replace(/[^\w]/gi,"-");const n=e;let r=2;for(;this._filenameToFontFamily[e];)e=e+"-"+r,r++;return this._filenameToFontFamily[t]=n}_loadFont(t,e){const n={},r="url("+encodeURI(e)+")";if(typeof FontFace!="undefined")return fetch(this._resourcesLoader.getFullUrl(e),{credentials:this._resourcesLoader.checkIfCredentialsRequired(e)?"include":"same-origin"}).then(o=>{if(!o.ok){const s="Unable to fetch "+e+" to be loaded as a font. HTTP status is: "+o.status+".";throw i.error(s),new Error(s)}return o.arrayBuffer()}).then(o=>{const s=new FontFace(t,o,n);document.fonts.add(s)});{const o=document.createElement("style");return o.appendChild(document.createTextNode("@font-face { font-family: '"+t+"'; src: "+r+"; }")),document.head.appendChild(o),new FontFaceObserver(t,n).load()}}async loadFonts(t){const e={};for(const o of this._resources.values())if(o.file){if(this._loadedFonts[o.name])continue;e[o.file]=e[o.file]?e[o.file].concat(o):[o]}const n=Object.keys(e).length;if(n===0)return 0;let r=0;return await Promise.all(Object.keys(e).map(async o=>{const s=this._getFontFamilyFromFilename(o),c=e[o];try{await this._loadFont(s,o)}catch(a){i.error('Error loading font resource "'+c[0].name+'" (file: '+o+"): "+(a.message||"Unknown error"))}c.forEach(a=>{this._loadedFontFamily[a.name]=s,this._loadedFonts[a.name]=a}),r++,t(r,n)})),n}}l.FontFaceObserverFontManager=d,l.FontManager=d})(gdjs||(gdjs={}));
//# sourceMappingURL=fontfaceobserver-font-manager.js.map
@@ -0,0 +1,16 @@
(function() {
var module; //Define an undefined module variable to avoid fontfaceobserver thinking it's used in an environment using require.
/* Font Face Observer v2.0.13 - © Bram Stein. License: BSD-3-Clause */(function(){'use strict';var f,g=[];function l(a){g.push(a);1==g.length&&f()}function m(){for(;g.length;)g[0](),g.shift()}f=function(){setTimeout(m)};function n(a){this.a=p;this.b=void 0;this.f=[];var b=this;try{a(function(a){q(b,a)},function(a){r(b,a)})}catch(c){r(b,c)}}var p=2;function t(a){return new n(function(b,c){c(a)})}function u(a){return new n(function(b){b(a)})}function q(a,b){if(a.a==p){if(b==a)throw new TypeError;var c=!1;try{var d=b&&b.then;if(null!=b&&"object"==typeof b&&"function"==typeof d){d.call(b,function(b){c||q(a,b);c=!0},function(b){c||r(a,b);c=!0});return}}catch(e){c||r(a,e);return}a.a=0;a.b=b;v(a)}}
function r(a,b){if(a.a==p){if(b==a)throw new TypeError;a.a=1;a.b=b;v(a)}}function v(a){l(function(){if(a.a!=p)for(;a.f.length;){var b=a.f.shift(),c=b[0],d=b[1],e=b[2],b=b[3];try{0==a.a?"function"==typeof c?e(c.call(void 0,a.b)):e(a.b):1==a.a&&("function"==typeof d?e(d.call(void 0,a.b)):b(a.b))}catch(h){b(h)}}})}n.prototype.g=function(a){return this.c(void 0,a)};n.prototype.c=function(a,b){var c=this;return new n(function(d,e){c.f.push([a,b,d,e]);v(c)})};
function w(a){return new n(function(b,c){function d(c){return function(d){h[c]=d;e+=1;e==a.length&&b(h)}}var e=0,h=[];0==a.length&&b(h);for(var k=0;k<a.length;k+=1)u(a[k]).c(d(k),c)})}function x(a){return new n(function(b,c){for(var d=0;d<a.length;d+=1)u(a[d]).c(b,c)})};window.Promise||(window.Promise=n,window.Promise.resolve=u,window.Promise.reject=t,window.Promise.race=x,window.Promise.all=w,window.Promise.prototype.then=n.prototype.c,window.Promise.prototype["catch"]=n.prototype.g);}());
(function(){function l(a,b){document.addEventListener?a.addEventListener("scroll",b,!1):a.attachEvent("scroll",b)}function m(a){document.body?a():document.addEventListener?document.addEventListener("DOMContentLoaded",function c(){document.removeEventListener("DOMContentLoaded",c);a()}):document.attachEvent("onreadystatechange",function k(){if("interactive"==document.readyState||"complete"==document.readyState)document.detachEvent("onreadystatechange",k),a()})};function r(a){this.a=document.createElement("div");this.a.setAttribute("aria-hidden","true");this.a.appendChild(document.createTextNode(a));this.b=document.createElement("span");this.c=document.createElement("span");this.h=document.createElement("span");this.f=document.createElement("span");this.g=-1;this.b.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.c.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";
this.f.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;";this.b.appendChild(this.h);this.c.appendChild(this.f);this.a.appendChild(this.b);this.a.appendChild(this.c)}
function t(a,b){a.a.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+b+";"}function y(a){var b=a.a.offsetWidth,c=b+100;a.f.style.width=c+"px";a.c.scrollLeft=c;a.b.scrollLeft=a.b.scrollWidth+100;return a.g!==b?(a.g=b,!0):!1}function z(a,b){function c(){var a=k;y(a)&&a.a.parentNode&&b(a.g)}var k=a;l(a.b,c);l(a.c,c);y(a)};function A(a,b){var c=b||{};this.family=a;this.style=c.style||"normal";this.weight=c.weight||"normal";this.stretch=c.stretch||"normal"}var B=null,C=null,E=null,F=null;function G(){if(null===C)if(J()&&/Apple/.test(window.navigator.vendor)){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent);C=!!a&&603>parseInt(a[1],10)}else C=!1;return C}function J(){null===F&&(F=!!document.fonts);return F}
function K(){if(null===E){var a=document.createElement("div");try{a.style.font="condensed 100px sans-serif"}catch(b){}E=""!==a.style.font}return E}function L(a,b){return[a.style,a.weight,K()?a.stretch:"","100px",b].join(" ")}
A.prototype.load=function(a,b){var c=this,k=a||"BESbswy",q=0,D=b||3E3,H=(new Date).getTime();return new Promise(function(a,b){if(J()&&!G()){var M=new Promise(function(a,b){function e(){(new Date).getTime()-H>=D?b():document.fonts.load(L(c,'"'+c.family+'"'),k).then(function(c){1<=c.length?a():setTimeout(e,25)},function(){b()})}e()}),N=new Promise(function(a,c){q=setTimeout(c,D)});Promise.race([N,M]).then(function(){clearTimeout(q);a(c)},function(){b(c)})}else m(function(){function u(){var b;if(b=-1!=
f&&-1!=g||-1!=f&&-1!=h||-1!=g&&-1!=h)(b=f!=g&&f!=h&&g!=h)||(null===B&&(b=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),B=!!b&&(536>parseInt(b[1],10)||536===parseInt(b[1],10)&&11>=parseInt(b[2],10))),b=B&&(f==v&&g==v&&h==v||f==w&&g==w&&h==w||f==x&&g==x&&h==x)),b=!b;b&&(d.parentNode&&d.parentNode.removeChild(d),clearTimeout(q),a(c))}function I(){if((new Date).getTime()-H>=D)d.parentNode&&d.parentNode.removeChild(d),b(c);else{var a=document.hidden;if(!0===a||void 0===a)f=e.a.offsetWidth,
g=n.a.offsetWidth,h=p.a.offsetWidth,u();q=setTimeout(I,50)}}var e=new r(k),n=new r(k),p=new r(k),f=-1,g=-1,h=-1,v=-1,w=-1,x=-1,d=document.createElement("div");d.dir="ltr";t(e,L(c,"sans-serif"));t(n,L(c,"serif"));t(p,L(c,"monospace"));d.appendChild(e.a);d.appendChild(n.a);d.appendChild(p.a);document.body.appendChild(d);v=e.a.offsetWidth;w=n.a.offsetWidth;x=p.a.offsetWidth;I();z(e,function(a){f=a;u()});t(e,L(c,'"'+c.family+'",sans-serif'));z(n,function(a){g=a;u()});t(n,L(c,'"'+c.family+'",serif'));
z(p,function(a){h=a;u()});t(p,L(c,'"'+c.family+'",monospace'))})})};"object"===typeof module?module.exports=A:(window.FontFaceObserver=A,window.FontFaceObserver.prototype.load=A.prototype.load);}());
})()
+2
View File
@@ -0,0 +1,2 @@
var gdjs;(function(_){class s{constructor(t,i,h){this._dirty=!1;this._x=t||0,this._y=i||0,this._angle=Math.atan2(i,t)*180/Math.PI,this._length=Math.sqrt(t*t+i*i),this._multiplier=h}getX(){return this._x}getY(){return this._y}setX(t){this._x=t,this._dirty=!0}setY(t){this._y=t,this._dirty=!0}clear(){this._x=0,this._y=0,this._length=0,this._dirty=!1}addForce(t){this._x+=t._x,this._y+=t._y,this._dirty=!0}add(t,i){this._x+=t,this._y+=i,this._dirty=!0}setAngle(t){this._dirty&&(this._length=Math.sqrt(this._x*this._x+this._y*this._y),this._dirty=!1),this._angle=t;const i=t/180*Math.PI;this._x=Math.cos(i)*this._length,this._y=Math.sin(i)*this._length}setLength(t){this._dirty&&(this._angle=Math.atan2(this._y,this._x)*180/Math.PI,this._dirty=!1),this._length=t;const i=this._angle/180*Math.PI;this._x=Math.cos(i)*this._length,this._y=Math.sin(i)*this._length}getAngle(){return this._dirty&&(this._angle=Math.atan2(this._y,this._x)*180/Math.PI,this._length=Math.sqrt(this._x*this._x+this._y*this._y),this._dirty=!1),this._angle}getLength(){return this._dirty&&(this._angle=Math.atan2(this._y,this._x)*180/Math.PI,this._length=Math.sqrt(this._x*this._x+this._y*this._y),this._dirty=!1),this._length}getMultiplier(){return this._multiplier}setMultiplier(t){this._multiplier=t}}_.Force=s})(gdjs||(gdjs={}));
//# sourceMappingURL=force.js.map
+2
View File
@@ -0,0 +1,2 @@
var gdjs;(function(t){const i=new t.Logger("Engine runtime");let u;(function(n){const e=!0})(u=t.evtTools||(t.evtTools={})),t.objectsTypes=new Hashtable,t.behaviorsTypes=new Hashtable,t.callbacksFirstRuntimeSceneLoaded=[],t.callbacksRuntimeSceneLoaded=[],t.callbacksRuntimeScenePreEvents=[],t.callbacksRuntimeScenePostEvents=[],t.callbacksRuntimeScenePaused=[],t.callbacksRuntimeSceneResumed=[],t.callbacksRuntimeSceneUnloading=[],t.callbacksRuntimeSceneUnloaded=[],t.callbacksObjectDeletedFromScene=[],t.gdevelopLogo="",t.rgbToHex=function(e,n,r){return""+((1<<24)+(e<<16)+(n<<8)+r).toString(16).slice(1)},t.hexToRGBColor=function(e){var n=parseInt(e.replace("#",""),16);return[n>>16&255,n>>8&255,n&255]},t.rgbOrHexToRGBColor=function(e){const n=e.split(";");return n.length===3?[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]:t.hexToRGBColor(e)},t.rgbOrHexStringToNumber=e=>{const n=t.rgbOrHexToRGBColor(e);return t.rgbToHexNumber(n[0],n[1],n[2])},t.rgbToHexNumber=function(e,n,r){return(e<<16)+(n<<8)+r},t.hexNumberToRGB=e=>({r:e>>16&255,g:e>>8&255,b:e&255,a:255}),t.hexNumberToRGBArray=e=>[e>>16&255,e>>8&255,e&255],t.random=function(e){return e<=0?0:Math.floor(Math.random()*(e+1))},t.randomInRange=function(e,n){return e+t.random(n-e)},t.randomFloat=function(e){return e<=0?0:Math.random()*e},t.randomFloatInRange=function(e,n){return e+t.randomFloat(n-e)},t.randomWithStep=function(e,n,r){return r<=0?e+t.random(n-e):e+t.random(Math.floor((n-e)/r))*r},t.toRad=function(e){return e/180*Math.PI},t.toDegrees=function(e){return e*180/Math.PI},t.registerObject=function(e,n){t.objectsTypes.put(e,n)},t.registerBehavior=function(e,n){t.behaviorsTypes.put(e,n)},t.registerFirstRuntimeSceneLoadedCallback=function(e){t.callbacksFirstRuntimeSceneLoaded.push(e)},t.registerRuntimeSceneLoadedCallback=function(e){t.callbacksRuntimeSceneLoaded.push(e)},t.registerRuntimeScenePreEventsCallback=function(e){t.callbacksRuntimeScenePreEvents.push(e)},t.registerRuntimeScenePostEventsCallback=function(e){t.callbacksRuntimeScenePostEvents.push(e)},t.registerRuntimeScenePausedCallback=function(e){t.callbacksRuntimeScenePaused.push(e)},t.registerRuntimeSceneResumedCallback=function(e){t.callbacksRuntimeSceneResumed.push(e)},t.registerRuntimeSceneUnloadingCallback=function(e){t.callbacksRuntimeSceneUnloading.push(e)},t.registerRuntimeSceneUnloadedCallback=function(e){t.callbacksRuntimeSceneUnloaded.push(e)},t.registerObjectDeletedFromSceneCallback=function(e){t.callbacksObjectDeletedFromScene.push(e)},t._unregisterCallback=function(e){const n=r=>{for(let o=0;o<r.length;)r[o]===e?r.splice(o,1):o++};n(t.callbacksFirstRuntimeSceneLoaded),n(t.callbacksRuntimeSceneLoaded),n(t.callbacksRuntimeScenePreEvents),n(t.callbacksRuntimeScenePostEvents),n(t.callbacksRuntimeScenePaused),n(t.callbacksRuntimeSceneResumed),n(t.callbacksRuntimeSceneUnloading),n(t.callbacksRuntimeSceneUnloaded),n(t.callbacksObjectDeletedFromScene)},t.registerGlobalCallbacks=function(){i.warn("You're calling gdjs.registerGlobalCallbacks. This method is now useless and you must not call it anymore.")},t.getObjectConstructor=function(e){return e!==void 0&&t.objectsTypes.containsKey(e)?t.objectsTypes.get(e):(i.warn('Object type "'+e+'" was not found.'),t.objectsTypes.get(""))},t.getBehaviorConstructor=function(e){return e!==void 0&&t.behaviorsTypes.containsKey(e)?t.behaviorsTypes.get(e):(i.warn('Behavior type "'+e+'" was not found.'),t.behaviorsTypes.get(""))},t.staticArray=function(e){return e._staticArray=e._staticArray||[],e._staticArray},t.staticArray2=function(e){return e._staticArray2=e._staticArray2||[],e._staticArray2},t.staticObject=function(e){return e._staticObject=e._staticObject||{},e._staticObject},t.objectsListsToArray=function(e){var n=t.staticArray(t.objectsListsToArray);e.values(n);for(var r=[],o=0;o<n.length;++o)for(var a=n[o],c=0;c<a.length;++c)r.push(a[c]);return r},t.copyArray=function(e,n){for(var r=e.length,o=0;o<r;++o)n[o]=e[o];n.length=r},t.makeUuid=function(){if(typeof crypto=="undefined"||!crypto.getRandomValues){const o=a=>a?(a^Math.random()*16>>a/4).toString(16):(""+1e7+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,o);return o()}if(!t.makeUuid.hex){t.makeUuid.hex=[];for(var e=0;e<256;e++)t.makeUuid.hex[e]=(e<16?"0":"")+e.toString(16)}const n=t.makeUuid.hex;var r=crypto.getRandomValues(new Uint8Array(16));return r[6]=r[6]&15|64,r[8]=r[8]&63|128,n[r[0]]+n[r[1]]+n[r[2]]+n[r[3]]+"-"+n[r[4]]+n[r[5]]+"-"+n[r[6]]+n[r[7]]+"-"+n[r[8]]+n[r[9]]+"-"+n[r[10]]+n[r[11]]+n[r[12]]+n[r[13]]+n[r[14]]+n[r[15]]},t.nearlyEqual=(e,n,r)=>{const o=Math.abs(e),a=Math.abs(n),c=Math.abs(e-n);return e===n?!0:e==0||n==0||o+a<Number.EPSILON?c<r*Number.EPSILON:c/Math.min(o+a,Number.MAX_VALUE)<r};const l=[];t.registerAsynchronouslyLoadingLibraryPromise=e=>{l.push(e)},t.getAllAsynchronouslyLoadingLibraryPromise=()=>Promise.all(l)})(gdjs||(gdjs={})),console.warn=console.warn||console.log,console.error=console.error||console.log;
//# sourceMappingURL=gd.js.map
@@ -0,0 +1,190 @@
gdjs.evtsExt__IsOnScreen__InOnScreen = gdjs.evtsExt__IsOnScreen__InOnScreen || {};
/**
* Behavior generated from Is on screen
*/
gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen = class InOnScreen extends gdjs.RuntimeBehavior {
constructor(instanceContainer, behaviorData, owner) {
super(instanceContainer, behaviorData, owner);
this._runtimeScene = instanceContainer;
this._onceTriggers = new gdjs.OnceTriggers();
this._behaviorData = {};
this._sharedData = gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.getSharedData(
instanceContainer,
behaviorData.name
);
}
// Hot-reload:
updateFromBehaviorData(oldBehaviorData, newBehaviorData) {
return true;
}
// Properties:
}
/**
* Shared data generated from Is on screen
*/
gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.SharedData = class InOnScreenSharedData {
constructor(sharedData) {
}
// Shared properties:
}
gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.getSharedData = function(instanceContainer, behaviorName) {
if (!instanceContainer._IsOnScreen_InOnScreenSharedData) {
const initialData = instanceContainer.getInitialSharedDataForBehavior(
behaviorName
);
instanceContainer._IsOnScreen_InOnScreenSharedData = new gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.SharedData(
initialData
);
}
return instanceContainer._IsOnScreen_InOnScreenSharedData;
}
// Methods:
gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.prototype.IsOnScreenContext = {};
gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.prototype.IsOnScreenContext.GDObjectObjects1= [];
gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.prototype.IsOnScreenContext.userFunc0xa27648 = function GDJSInlineCode(runtimeScene, objects, eventsFunctionContext) {
"use strict";
/*
Get the object layer, convert the position from this layer to the screen coordinates.
Get the point on each side on the object on screen, and compare with the screen area.
This way even if the camera has a rotation or custom scale the object is always compared to the screen area.
*/
// Get the layer of the object.
const object = objects[0];
const layer = runtimeScene.getLayer(object.getLayer());
// Get the aabb of the object on his layer.
const aabb = object.getVisibilityAABB();
// Get the layer to convert the coordinates of the AABB to the screen coordinates
const topLeft = layer.convertInverseCoords(aabb.min[0], aabb.min[1]);
const topRight = layer.convertInverseCoords(aabb.max[0], aabb.min[1]);
const bottomRight = layer.convertInverseCoords(aabb.max[0], aabb.max[1]);
const bottomLeft = layer.convertInverseCoords(aabb.min[0], aabb.max[1]);
// Get the points on each side of the object on screen.
const posLeftObjectOnScreen = Math.min(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]);
const posRightObjectOnScreen = Math.max(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]);
const posUpObjectOnScreen = Math.min(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]);
const posDownObjectOnScreen = Math.max(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]);
const padding = eventsFunctionContext.getArgument("Padding");
if (
!(posLeftObjectOnScreen - padding > runtimeScene.getGame().getGameResolutionWidth() ||
posUpObjectOnScreen - padding > runtimeScene.getGame().getGameResolutionHeight() ||
posRightObjectOnScreen + padding < 0 ||
posDownObjectOnScreen + padding < 0
)
) {
eventsFunctionContext.returnValue = true;
}
};
gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.prototype.IsOnScreenContext.eventsList0 = function(runtimeScene, eventsFunctionContext) {
{
gdjs.copyArray(eventsFunctionContext.getObjects("Object"), gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.prototype.IsOnScreenContext.GDObjectObjects1);
var objects = [];
objects.push.apply(objects,gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.prototype.IsOnScreenContext.GDObjectObjects1);
gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.prototype.IsOnScreenContext.userFunc0xa27648(runtimeScene, objects, typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined);
}
};
gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.prototype.IsOnScreen = function(Padding, parentEventsFunctionContext) {
var that = this;
var runtimeScene = this._runtimeScene;
var thisObjectList = [this.owner];
var Object = Hashtable.newFrom({Object: thisObjectList});
var Behavior = this.name;
var eventsFunctionContext = {
_objectsMap: {
"Object": Object
},
_objectArraysMap: {
"Object": thisObjectList
},
_behaviorNamesMap: {
"Behavior": Behavior
},
getObjects: function(objectName) {
return eventsFunctionContext._objectArraysMap[objectName] || [];
},
getObjectsLists: function(objectName) {
return eventsFunctionContext._objectsMap[objectName] || null;
},
getBehaviorName: function(behaviorName) {
return eventsFunctionContext._behaviorNamesMap[behaviorName] || behaviorName;
},
createObject: function(objectName) {
const objectsList = eventsFunctionContext._objectsMap[objectName];
if (objectsList) {
const object = parentEventsFunctionContext ?
parentEventsFunctionContext.createObject(objectsList.firstKey()) :
runtimeScene.createObject(objectsList.firstKey());
if (object) {
objectsList.get(objectsList.firstKey()).push(object);
eventsFunctionContext._objectArraysMap[objectName].push(object);
}
return object; }
return null;
},
getInstancesCountOnScene: function(objectName) {
const objectsList = eventsFunctionContext._objectsMap[objectName];
let count = 0;
if (objectsList) {
for(const objectName in objectsList.items)
count += parentEventsFunctionContext ?
parentEventsFunctionContext.getInstancesCountOnScene(objectName) :
runtimeScene.getInstancesCountOnScene(objectName);
}
return count;
},
getLayer: function(layerName) {
return runtimeScene.getLayer(layerName);
},
getArgument: function(argName) {
if (argName === "Padding") return Padding;
return "";
},
getOnceTriggers: function() { return that._onceTriggers; }
};
gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.prototype.IsOnScreenContext.GDObjectObjects1.length = 0;
gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.prototype.IsOnScreenContext.eventsList0(runtimeScene, eventsFunctionContext);
return !!eventsFunctionContext.returnValue;
}
gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen.prototype.doStepPreEvents = function() {
this._onceTriggers.startNewFrame();
};
gdjs.registerBehavior("IsOnScreen::InOnScreen", gdjs.evtsExt__IsOnScreen__InOnScreen.InOnScreen);
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,90 @@
if (typeof gdjs.evtsExt__ParticleEmitter3D__onScenePreEvents !== "undefined") {
gdjs.evtsExt__ParticleEmitter3D__onScenePreEvents.registeredGdjsCallbacks.forEach(callback =>
gdjs._unregisterCallback(callback)
);
}
gdjs.evtsExt__ParticleEmitter3D__onScenePreEvents = {};
gdjs.evtsExt__ParticleEmitter3D__onScenePreEvents.userFunc0xa44740 = function GDJSInlineCode(runtimeScene, eventsFunctionContext) {
"use strict";
// See doStepPostEvents
runtimeScene.__particleEmmiter3DExtension = runtimeScene.__particleEmmiter3DExtension || {};
runtimeScene.__particleEmmiter3DExtension.emittersStepped = 0;
};
gdjs.evtsExt__ParticleEmitter3D__onScenePreEvents.eventsList0 = function(runtimeScene, eventsFunctionContext) {
{
gdjs.evtsExt__ParticleEmitter3D__onScenePreEvents.userFunc0xa44740(runtimeScene, typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined);
}
};
gdjs.evtsExt__ParticleEmitter3D__onScenePreEvents.func = function(runtimeScene, parentEventsFunctionContext) {
var eventsFunctionContext = {
_objectsMap: {
},
_objectArraysMap: {
},
_behaviorNamesMap: {
},
getObjects: function(objectName) {
return eventsFunctionContext._objectArraysMap[objectName] || [];
},
getObjectsLists: function(objectName) {
return eventsFunctionContext._objectsMap[objectName] || null;
},
getBehaviorName: function(behaviorName) {
return eventsFunctionContext._behaviorNamesMap[behaviorName] || behaviorName;
},
createObject: function(objectName) {
const objectsList = eventsFunctionContext._objectsMap[objectName];
if (objectsList) {
const object = parentEventsFunctionContext ?
parentEventsFunctionContext.createObject(objectsList.firstKey()) :
runtimeScene.createObject(objectsList.firstKey());
if (object) {
objectsList.get(objectsList.firstKey()).push(object);
eventsFunctionContext._objectArraysMap[objectName].push(object);
}
return object; }
return null;
},
getInstancesCountOnScene: function(objectName) {
const objectsList = eventsFunctionContext._objectsMap[objectName];
let count = 0;
if (objectsList) {
for(const objectName in objectsList.items)
count += parentEventsFunctionContext ?
parentEventsFunctionContext.getInstancesCountOnScene(objectName) :
runtimeScene.getInstancesCountOnScene(objectName);
}
return count;
},
getLayer: function(layerName) {
return runtimeScene.getLayer(layerName);
},
getArgument: function(argName) {
return "";
},
getOnceTriggers: function() { return runtimeScene.getOnceTriggers(); }
};
gdjs.evtsExt__ParticleEmitter3D__onScenePreEvents.eventsList0(runtimeScene, eventsFunctionContext);
return;
}
gdjs.evtsExt__ParticleEmitter3D__onScenePreEvents.registeredGdjsCallbacks = [];
gdjs.evtsExt__ParticleEmitter3D__onScenePreEvents.registeredGdjsCallbacks.push((runtimeScene) => {
gdjs.evtsExt__ParticleEmitter3D__onScenePreEvents.func(runtimeScene, runtimeScene);
})
gdjs.registerRuntimeScenePreEventsCallback(gdjs.evtsExt__ParticleEmitter3D__onScenePreEvents.registeredGdjsCallbacks[gdjs.evtsExt__ParticleEmitter3D__onScenePreEvents.registeredGdjsCallbacks.length - 1]);
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
Loaded 100 of 714 files, more files were not shown because too many files have changed in this diff. Show more