init
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +1 -0
- AsyncTasksManager.js +5 -0
- BlueBunny.glb +3 -0
- BlueBunnyIcon.png +0 -0
- Bomb.glb +3 -0
- Bomb.png +0 -0
- BombeBonus.png +0 -0
- Cabbage.glb +3 -0
- ClassicLevel.png +0 -0
- CustomRuntimeObject.js +2 -0
- CustomRuntimeObject2D.js +2 -0
- CustomRuntimeObjectInstanceContainer.js +2 -0
- EmptyLevel.png +0 -0
- ExplosionCentre-Anim5.png +0 -0
- Extensions/3D/A_RuntimeObject3D.js +2 -0
- Extensions/3D/A_RuntimeObject3DRenderer.js +2 -0
- Extensions/3D/Base3DBehavior.js +2 -0
- Extensions/3D/Cube3DRuntimeObject.js +2 -0
- Extensions/3D/Cube3DRuntimeObjectPixiRenderer.js +2 -0
- Extensions/3D/CustomRuntimeObject3D.js +2 -0
- Extensions/3D/CustomRuntimeObject3DRenderer.js +2 -0
- Extensions/3D/HemisphereLight.js +2 -0
- Extensions/3D/Model3DRuntimeObject.js +2 -0
- Extensions/3D/Model3DRuntimeObject3DRenderer.js +2 -0
- Extensions/3D/Scene3DTools.js +2 -0
- Extensions/Effects/adjustment-pixi-filter.js +2 -0
- Extensions/Effects/pixi-filters/filter-adjustment.js +49 -0
- Extensions/LinkedObjects/linkedobjects.js +2 -0
- Extensions/TextObject/textruntimeobject-pixi-renderer.js +2 -0
- Extensions/TextObject/textruntimeobject.js +2 -0
- Extensions/TopDownMovementBehavior/topdownmovementruntimebehavior.js +2 -0
- Extensions/TweenBehavior/TweenManager.js +13 -0
- Extensions/TweenBehavior/tweenruntimebehavior.js +2 -0
- FlammeBonus.png +0 -0
- FlashyRock.glb +3 -0
- GreyBlock.glb +3 -0
- JoueurSelectionMask.png +0 -0
- LICENSE.GDevelop.txt +2 -0
- Model3DManager.js +2 -0
- New image.png +0 -0
- NewObject.png +0 -0
- NewSprite.png +0 -0
- Orange.png +0 -0
- OrangeBunny.glb +3 -0
- OrangeBunnyIcon.png +0 -0
- Pink.png +0 -0
- PinkBunny.glb +3 -0
- PinkBunnyIcon.png +0 -0
- Purple.png +0 -0
- PurpleBunny.glb +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*.glb filter=lfs diff=lfs merge=lfs -text
|
AsyncTasksManager.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(i){class l{constructor(){this.tasksWithCallback=new Array}processTasks(e){for(let s=0;s<this.tasksWithCallback.length;s++){const r=this.tasksWithCallback[s];r.asyncTask.update(e)&&(r.callback(e),this.tasksWithCallback.splice(s--,1))}}addTask(e,s){this.tasksWithCallback.push({asyncTask:e,callback:s})}clearTasks(){this.tasksWithCallback.length=0}}i.AsyncTasksManager=l;class t{}i.AsyncTask=t;class o 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}}i.TaskGroup=o;class c extends t{update(){return!0}}i.ResolveTask=c;const n=new i.Logger("Internal PromiseTask");class h extends t{constructor(e){super();this.isResolved=!1;this.promise=e.catch(s=>{n.error(`A promise error has not been handled, this should never happen!
|
2 |
+
If you are using JavaScript promises in an asynchronous action, make sure to add a .catch().
|
3 |
+
Otherwise, report this as a bug on the GDevelop forums!
|
4 |
+
${s?"The following error was thrown: "+s:""}`)}).then(s=>(this.isResolved=!0,s))}update(){return this.isResolved}}i.PromiseTask=h;class k extends t{constructor(){super(...arguments);this.isResolved=!1}resolve(){this.isResolved=!0}update(){return this.isResolved}}i.ManuallyResolvableTask=k})(gdjs||(gdjs={}));
|
5 |
+
//# sourceMappingURL=AsyncTasksManager.js.map
|
BlueBunny.glb
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:47447fe211400dc60bebcda47cefb6485a4a8055c40c976fe0e13e3ea7aeda2c
|
3 |
+
size 1108556
|
BlueBunnyIcon.png
ADDED
![]() |
Bomb.glb
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a4f277dd9464d6edcbd8f2ad5333e9805e976da851657e1196b8e2f1724fc8f0
|
3 |
+
size 12264
|
Bomb.png
ADDED
![]() |
BombeBonus.png
ADDED
![]() |
Cabbage.glb
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0182f48f50b95aea7cc6345b71a401ee9a6aa4f449d826b77b99b5c84a3288a1
|
3 |
+
size 11616
|
ClassicLevel.png
ADDED
![]() |
CustomRuntimeObject.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(r){const o=new r.Logger("CustomRuntimeObject");class h extends r.RuntimeObject{constructor(t,e){super(t,e);this._isUntransformedHitBoxesDirty=!0;this._untransformedHitBoxes=[];this._unrotatedAABB={min:[0,0],max:[0,0]};this._innerArea=null;this._isInnerAreaFollowingParentSize=!1;this._scaleX=1;this._scaleY=1;this._flippedX=!1;this._flippedY=!1;this.opacity=255;this._customCenter=null;this._localTransformation=new r.AffineTransformation;this._localInverseTransformation=new r.AffineTransformation;this._isLocalTransformationDirty=!0;this._type=e.type,this._instanceContainer=new r.CustomRuntimeObjectInstanceContainer(t,this),this._renderer=this._createRender(),this._initializeFromObjectData(e)}_initializeFromObjectData(t){const e=this._runtimeScene.getGame().getEventsBasedObjectData(t.type);if(!e){o.error(`A CustomRuntimeObject was initialized (or re-initialized) from object data referring to an non existing events based object data with type "${t.type}".`);return}this._isInnerAreaFollowingParentSize=e.isInnerAreaFollowingParentSize,e.instances.length>0&&(this._innerArea||(this._innerArea={min:[0,0,0],max:[0,0,0]}),this._innerArea.min[0]=e.areaMinX,this._innerArea.min[1]=e.areaMinY,this._innerArea.min[2]=e.areaMinZ,this._innerArea.max[0]=e.areaMaxX,this._innerArea.max[1]=e.areaMaxY,this._innerArea.max[2]=e.areaMaxZ),this._instanceContainer.loadFrom(t,e)}reinitialize(t){super.reinitialize(t),this._initializeFromObjectData(t),this._reinitializeRenderer(),this.onCreated()}updateFromObjectData(t,e){const i=this.getAnimator();return i&&i.updateFromObjectData(t.animatable||[],e.animatable||[]),!0}extraInitializationFromInitialInstance(t){const e=this.getAnimator();if(t.numberProperties)for(let i=0,n=t.numberProperties.length;i<n;++i){const s=t.numberProperties[i];e&&s.name==="animation"&&e.setAnimationIndex(s.value)}t.customSize&&(this.setWidth(t.width),this.setHeight(t.height)),t.opacity!==void 0&&this.setOpacity(t.opacity),t.flippedX&&this.flipX(t.flippedX),t.flippedY&&this.flipY(t.flippedY)}onDeletedFromScene(t){this.onDestroy(t),super.onDeletedFromScene(t),this._instanceContainer.onDestroyFromScene(t)}update(t){this._instanceContainer._updateObjectsPreEvents(),this.doStepPreEvents(this._instanceContainer);const e=this.getRuntimeScene().getProfiler();e&&e.begin(this.type),this.doStepPostEvents(this._instanceContainer),e&&e.end(this.type),this._instanceContainer._updateObjectsPostEvents()}onHotReloading(t){}doStepPreEvents(t){}doStepPostEvents(t){}onDestroy(t){}updatePreRender(t){this._instanceContainer._updateObjectsPreRender(),this.getRenderer().ensureUpToDate()}getRenderer(){return this._renderer}getChildrenContainer(){return this._instanceContainer}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 r.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(){this._isUntransformedHitBoxesDirty=!1,this._untransformedHitBoxes.length=0;let t=Number.MAX_VALUE,e=Number.MAX_VALUE,i=-Number.MAX_VALUE,n=-Number.MAX_VALUE;for(const s of this._instanceContainer.getAdhocListOfAllInstances()){if(!s.isIncludedInParentCollisionMask())continue;Array.prototype.push.apply(this._untransformedHitBoxes,s.getHitBoxes());const a=s.getAABB();t=Math.min(t,a.min[0]),e=Math.min(e,a.min[1]),i=Math.max(i,a.max[0]),n=Math.max(n,a.max[1])}for(t===Number.MAX_VALUE&&(t=0,e=0,i=1,n=1),this._unrotatedAABB.min[0]=t,this._unrotatedAABB.min[1]=e,this._unrotatedAABB.max[0]=i,this._unrotatedAABB.max[1]=n;this.hitBoxes.length<this._untransformedHitBoxes.length;)this.hitBoxes.push(new r.Polygon);this.hitBoxes.length=this._untransformedHitBoxes.length}applyObjectTransformation(t,e,i){const n=i;n[0]=t,n[1]=e,this.getLocalTransformation().transform(n,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,n=this.getUnscaledCenterY()*e,s=this.angle*Math.PI/180;this._localTransformation.setToTranslation(this.x,this.y),this._localTransformation.rotateAround(s,i,n),this._flippedX&&this._localTransformation.flipX(i),this._flippedY&&this._localTransformation.flipY(n),this._localTransformation.scale(t,e),this._localInverseTransformation.copyFrom(this._localTransformation),this._localInverseTransformation.invert(),this._isLocalTransformationDirty=!1}applyObjectInverseTransformation(t,e,i){const n=i;n[0]=t,n[1]=e,this.getLocalInverseTransformation().transform(n,i)}getDrawableX(){let t=0;this._innerArea?t=this._innerArea.min[0]:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),t=this._unrotatedAABB.min[0]);const e=this.getScaleX();return this._flippedX?this.x+(-t-this.getUnscaledWidth()+2*this.getUnscaledCenterX())*e:this.x+t*e}getDrawableY(){let t=0;this._innerArea?t=this._innerArea.min[1]:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),t=this._unrotatedAABB.min[1]);const e=this.getScaleY();return this._flippedY?this.y+(-t-this.getUnscaledHeight()+2*this.getUnscaledCenterY())*e:this.y+t*e}getInnerAreaMinX(){return this._innerArea?this._innerArea.min[0]:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),this._unrotatedAABB.min[0])}getInnerAreaMinY(){return this._innerArea?this._innerArea.min[1]:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),this._unrotatedAABB.min[1])}getInnerAreaMaxX(){return this._innerArea?this._innerArea.max[0]:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),this._unrotatedAABB.max[0])}getInnerAreaMaxY(){return this._innerArea?this._innerArea.max[1]:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),this._unrotatedAABB.max[1])}getUnscaledWidth(){return this._innerArea?this._innerArea.max[0]-this._innerArea.min[0]:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),this._unrotatedAABB.max[0]-this._unrotatedAABB.min[0])}getUnscaledHeight(){return this._innerArea?this._innerArea.max[1]-this._innerArea.min[1]:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),this._unrotatedAABB.max[1]-this._unrotatedAABB.min[1])}getUnscaledCenterX(){return this._customCenter?this._customCenter[0]:this._innerArea?(this._innerArea.min[0]+this._innerArea.max[0])/2:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),(this._unrotatedAABB.min[0]+this._unrotatedAABB.max[0])/2)}getUnscaledCenterY(){return this._customCenter?this._customCenter[1]:this._innerArea?(this._innerArea.min[1]+this._innerArea.max[1])/2:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),(this._unrotatedAABB.min[1]+this._unrotatedAABB.max[1])/2)}setRotationCenter(t,e){this._customCenter||(this._customCenter=[0,0]),this._customCenter[0]=t,this._customCenter[1]=e,this._isLocalTransformationDirty=!0,this.invalidateHitboxes()}hasCustomRotationCenter(){return!!this._customCenter}getCenterX(){return(this.getUnscaledCenterX()-this._unrotatedAABB.min[0])*this.getScaleX()}getCenterY(){return(this.getUnscaledCenterY()-this._unrotatedAABB.min[1])*this.getScaleY()}getWidth(){return this.getUnscaledWidth()*this.getScaleX()}getHeight(){return this.getUnscaledHeight()*this.getScaleY()}setWidth(t){const e=this.getUnscaledWidth();if(e===0)return;const i=t/e;this._innerArea&&this._isInnerAreaFollowingParentSize?(this._innerArea.min[0]*=i,this._innerArea.max[0]*=i):this.setScaleX(i)}setHeight(t){const e=this.getUnscaledHeight();if(e===0)return;const i=t/e;this._innerArea&&this._isInnerAreaFollowingParentSize?(this._innerArea.min[1]*=i,this._innerArea.max[1]*=i):this.setScaleY(i)}setSize(t,e){this.setWidth(t),this.setHeight(e)}setX(t){t!==this.x&&(this.x=t,this._isLocalTransformationDirty=!0,this.invalidateHitboxes(),this.getRenderer().updateX())}setY(t){t!==this.y&&(this.y=t,this._isLocalTransformationDirty=!0,this.invalidateHitboxes(),this.getRenderer().updateY())}setAngle(t){this.angle!==t&&(this.angle=t,this._isLocalTransformationDirty=!0,this.invalidateHitboxes(),this.getRenderer().updateAngle())}setScale(t){this._innerArea&&this._isInnerAreaFollowingParentSize||(t<0&&(t=0),!(t===Math.abs(this._scaleX)&&t===Math.abs(this._scaleY))&&(this._scaleX=t*(this._flippedX?-1:1),this._scaleY=t*(this._flippedY?-1:1),this._isLocalTransformationDirty=!0,this.invalidateHitboxes(),this.getRenderer().update()))}setScaleX(t){this._innerArea&&this._isInnerAreaFollowingParentSize||(t<0&&(t=0),t!==Math.abs(this._scaleX)&&(this._scaleX=t*(this._flippedX?-1:1),this._isLocalTransformationDirty=!0,this.invalidateHitboxes(),this.getRenderer().update()))}setScaleY(t){this._innerArea&&this._isInnerAreaFollowingParentSize||(t<0&&(t=0),t!==Math.abs(this._scaleY)&&(this._scaleY=t*(this._flippedY?-1:1),this.invalidateHitboxes(),this.getRenderer().update()))}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)}getScaleY(){return Math.abs(this._scaleY)}getScaleX(){return Math.abs(this._scaleX)}setOpacity(t){t<0&&(t=0),t>255&&(t=255),this.opacity=t,this.getRenderer().updateOpacity()}getOpacity(){return this.opacity}hide(t){t===void 0&&(t=!0),this.hidden=t,this.getRenderer().updateVisibility()}flipX(t){t!==this._flippedX&&(this._scaleX*=-1,this._flippedX=t,this.invalidateHitboxes(),this.getRenderer().update())}flipY(t){t!==this._flippedY&&(this._scaleY*=-1,this._flippedY=t,this.invalidateHitboxes(),this.getRenderer().update())}isFlippedX(){return this._flippedX}isFlippedY(){return this._flippedY}getAnimator(){return null}}r.CustomRuntimeObject=h,h.supportsReinitialization=!1})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=CustomRuntimeObject.js.map
|
CustomRuntimeObject2D.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(t){class n extends t.CustomRuntimeObject{constructor(e,r){super(e,r);this.getRenderer().reinitialize(this,e)}_createRender(){const e=this._runtimeScene;return new t.CustomRuntimeObject2DRenderer(this,this._instanceContainer,e)}_reinitializeRenderer(){this.getRenderer().reinitialize(this,this.getParent())}getRenderer(){return super.getRenderer()}getRendererObject(){return this.getRenderer().getRendererObject()}}t.CustomRuntimeObject2D=n})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=CustomRuntimeObject2D.js.map
|
CustomRuntimeObjectInstanceContainer.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(s){class l extends s.RuntimeInstanceContainer{constructor(t,n){super();this._isLoaded=!1;this._initialInnerArea=null;this._parent=t,this._customObject=n,this._runtimeScene=t.getScene(),this._debuggerRenderer=new s.DebuggerRenderer(this)}addLayer(t){const n=new s.RuntimeCustomObjectLayer(t,this);this._layers.put(t.name,n),this._orderedLayers.push(n)}createObject(t){const n=super.createObject(t);return this._customObject.onChildrenLocationChanged(),n}loadFrom(t,n){this._isLoaded&&this.onDestroyFromScene(this._parent),this._setOriginalInnerArea(n);for(let r=0,e=n.objects.length;r<e;++r){const i=n.objects[r];t.childrenContent?this.registerObject({...i,...t.childrenContent[i.name]}):this.registerObject(i)}if(n.layers.length>0)for(let r=0,e=n.layers.length;r<e;++r)this.addLayer(n.layers[r]);else 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.createObjectsFrom(n.instances,0,0,0,!0),this._setLayerDefaultZOrders(),this._isLoaded=!0}_setOriginalInnerArea(t){t.instances.length>0&&(t._initialInnerArea||(t._initialInnerArea={min:[t.areaMinX,t.areaMinY,t.areaMinZ],max:[t.areaMaxX,t.areaMaxY,t.areaMaxZ]}),this._initialInnerArea=t._initialInnerArea)}onDestroyFromScene(t){if(!this._isLoaded)return;const n=this.getAdhocListOfAllInstances();for(let r=0,e=n.length;r<e;++r){const i=n[r];i.onDeletedFromScene(this),i.onDestroyed()}this._destroy(),this._isLoaded=!1}_destroy(){super._destroy(),this._onceTriggers=null}_updateObjectsPreRender(){const t=this.getAdhocListOfAllInstances();for(let n=0,r=t.length;n<r;++n){const e=t[n],i=e.getRendererObject();i&&(i.visible=!e.isHidden(),i.visible&&this.getGame().getEffectsManager().updatePreRender(e.getRendererEffects(),e)),this._debugDrawEnabled&&this._debuggerRenderer.renderDebugDraw(t,this._debugDrawShowHiddenInstances,this._debugDrawShowPointsNames,this._debugDrawShowCustomPoints),e.updatePreRender(this)}}_updateObjectsPreEvents(){const t=this.getAdhocListOfAllInstances();for(let n=0,r=t.length;n<r;++n){const e=t[n],i=e.getElapsedTime();if(e.hasNoForces())e.update(this);else{const a=e.getAverageForce(),o=i/1e3;e.setX(e.getX()+a.getX()*o),e.setY(e.getY()+a.getY()*o),e.update(this),e.updateForces(o)}e.updateTimers(i),e.stepBehaviorsPreEvents(this)}this._cacheOrClearRemovedInstances()}getRenderer(){return this._customObject.getRenderer()}getDebuggerRenderer(){return this._debuggerRenderer}getGame(){return this._runtimeScene.getGame()}getScene(){return this._runtimeScene}getOwner(){return this._customObject}getAsyncTasksManager(){return this._runtimeScene.getAsyncTasksManager()}getUnrotatedViewportMinX(){return this._customObject.getInnerAreaMinX()}getUnrotatedViewportMinY(){return this._customObject.getInnerAreaMinY()}getUnrotatedViewportMaxX(){return this._customObject.getInnerAreaMaxX()}getUnrotatedViewportMaxY(){return this._customObject.getInnerAreaMaxY()}getInitialUnrotatedViewportMinX(){return this._initialInnerArea?this._initialInnerArea.min[0]:0}getInitialUnrotatedViewportMinY(){return this._initialInnerArea?this._initialInnerArea.min[1]:0}getInitialUnrotatedViewportMaxX(){return this._initialInnerArea?this._initialInnerArea.max[0]:0}getInitialUnrotatedViewportMaxY(){return this._initialInnerArea?this._initialInnerArea.max[1]:0}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(t,n,r){let e=r||[0,0];return e=this._parent.getLayer(this._customObject.getLayer()).convertCoords(t,n,0,e),this._customObject.applyObjectInverseTransformation(e[0],e[1],e),e}convertInverseCoords(t,n,r){const e=r||[0,0];return this._customObject.applyObjectTransformation(t,n,e),this._parent.convertInverseCoords(e[0],e[1],e)}getElapsedTime(){return this._parent.getElapsedTime()}}s.CustomRuntimeObjectInstanceContainer=l})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=CustomRuntimeObjectInstanceContainer.js.map
|
EmptyLevel.png
ADDED
![]() |
ExplosionCentre-Anim5.png
ADDED
![]() |
Extensions/3D/A_RuntimeObject3D.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(s){const r=o=>o===void 0?100:o<=0?1:o;class h extends s.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}getNetworkSyncData(){return{...super.getNetworkSyncData(),z:this.getZ(),w:this.getWidth(),h:this.getHeight(),d:this.getDepth(),rx:this.getRotationX(),ry:this.getRotationY(),flipX:this.isFlippedX(),flipY:this.isFlippedY(),flipZ:this.isFlippedZ()}}updateFromNetworkSyncData(t){super.updateFromNetworkSyncData(t),t.z!==void 0&&this.setZ(t.z),t.w!==void 0&&this.setWidth(t.w),t.h!==void 0&&this.setHeight(t.h),t.d!==void 0&&this.setDepth(t.d),t.rx!==void 0&&this.setRotationX(t.rx),t.ry!==void 0&&this.setRotationY(t.ry),t.flipX!==void 0&&this.flipX(t.flipX),t.flipY!==void 0&&this.flipY(t.flipY),t.flipZ!==void 0&&this.flipZ(t.flipZ)}extraInitializationFromInitialInstance(t){t.customSize&&(this.setWidth(t.width),this.setHeight(t.height)),t.depth!==void 0&&this.setDepth(t.depth),t.flippedX&&this.flipX(t.flippedX),t.flippedY&&this.flipY(t.flippedY),t.flippedZ&&this.flipZ(t.flippedZ)}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._z}getUnrotatedAABBMinZ(){return this.getDrawableZ()}getUnrotatedAABBMaxZ(){return this.getDrawableZ()+this.getDepth()}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=s.RuntimeObject3D._temporaryVector;e.set(1,0,0);const i=this.getRenderer().get3DRendererObject();i.rotateOnWorldAxis(e,s.toRad(t)),this._rotationX=s.toDegrees(i.rotation.x),this._rotationY=s.toDegrees(i.rotation.y),this.setAngle(s.toDegrees(i.rotation.z))}turnAroundY(t){const e=s.RuntimeObject3D._temporaryVector;e.set(0,1,0);const i=this.getRenderer().get3DRendererObject();i.rotateOnWorldAxis(e,s.toRad(t)),this._rotationX=s.toDegrees(i.rotation.x),this._rotationY=s.toDegrees(i.rotation.y),this.setAngle(s.toDegrees(i.rotation.z))}turnAroundZ(t){const e=s.RuntimeObject3D._temporaryVector;e.set(0,0,1);const i=this.getRenderer().get3DRendererObject();i.rotateOnWorldAxis(e,s.toRad(t)),this._rotationX=s.toDegrees(i.rotation.x),this._rotationY=s.toDegrees(i.rotation.y),this.setAngle(s.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,s.RuntimeObject3D=h})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=A_RuntimeObject3D.js.map
|
Extensions/3D/A_RuntimeObject3DRenderer.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
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.getX()+this._object.getWidth()/2,this._object.getY()+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={}));
|
2 |
+
//# sourceMappingURL=A_RuntimeObject3DRenderer.js.map
|
Extensions/3D/Base3DBehavior.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(e){let a;(function(t){t.is3D=o=>o.getZ&&o.setZ})(a=e.Base3DHandler||(e.Base3DHandler={}));class r 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()}getUnrotatedAABBMinZ(){return this.object.getUnrotatedAABBMinZ()}getUnrotatedAABBMaxZ(){return this.object.getUnrotatedAABBMaxZ()}}e.Base3DBehavior=r,e.registerBehavior("Scene3D::Base3DBehavior",e.Base3DBehavior)})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=Base3DBehavior.js.map
|
Extensions/3D/Cube3DRuntimeObject.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(c){const i={front:0,back:1,left:2,right:3,top:4,bottom:5};class a 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.rightFaceResourceRepeat&&this.setRepeatTextureOnFace("right",e.content.rightFaceResourceRepeat),t.content.topFaceResourceRepeat!==e.content.topFaceResourceRepeat&&this.setRepeatTextureOnFace("top",e.content.topFaceResourceRepeat),t.content.bottomFaceResourceRepeat!==e.content.bottomFaceResourceRepeat&&this.setRepeatTextureOnFace("bottom",e.content.bottomFaceResourceRepeat),t.content.backFaceUpThroughWhichAxisRotation!==e.content.backFaceUpThroughWhichAxisRotation&&this.setBackFaceUpThroughWhichAxisRotation(e.content.backFaceUpThroughWhichAxisRotation),t.content.facesOrientation!==e.content.facesOrientation&&this.setFacesOrientation(e.content.facesOrientation),t.content.materialType!==e.content.materialType&&this.setMaterialType(e.content.materialType),!0}getNetworkSyncData(){return{...super.getNetworkSyncData(),mt:this._materialType,fo:this._facesOrientation,bfu:this._backFaceUpThroughWhichAxisRotation,vfb:this._visibleFacesBitmask,trfb:this._textureRepeatFacesBitmask,frn:this._faceResourceNames}}updateFromNetworkSyncData(t){if(super.updateFromNetworkSyncData(t),t.mt!==void 0&&(this._materialType=t.mt),t.fo!==void 0&&this._facesOrientation!==t.fo&&this.setFacesOrientation(t.fo),t.bfu!==void 0&&this._backFaceUpThroughWhichAxisRotation!==t.bfu&&this.setBackFaceUpThroughWhichAxisRotation(t.bfu),t.vfb!==void 0&&this._visibleFacesBitmask!==t.vfb){this._visibleFacesBitmask=t.vfb;for(let e=0;e<this._faceResourceNames.length;e++)this._renderer.updateFace(e)}if(t.trfb!==void 0&&this._textureRepeatFacesBitmask!==t.trfb){this._textureRepeatFacesBitmask=t.trfb;for(let e=0;e<this._faceResourceNames.length;e++)this._renderer.updateFace(e)}if(t.frn!==void 0&&!this._faceResourceNames.every((e,s)=>e===t.frn[s])){this._faceResourceNames=t.frn;for(let e=0;e<this._faceResourceNames.length;e++)this._renderer.updateFace(e)}}shouldUseTransparentTexture(){return this._shouldUseTransparentTexture}_convertMaterialType(t){return t==="StandardWithoutMetalness"?c.Cube3DRuntimeObject.MaterialType.StandardWithoutMetalness:c.Cube3DRuntimeObject.MaterialType.Basic}setMaterialType(t){const e=this._convertMaterialType(t);this._materialType!==e&&(this._materialType=e,this._renderer._updateMaterials())}}c.Cube3DRuntimeObject=a,function(t){let n;(function(r){r[r.Basic=0]="Basic",r[r.StandardWithoutMetalness=1]="StandardWithoutMetalness"})(n=t.MaterialType||(t.MaterialType={}))}(a=c.Cube3DRuntimeObject||(c.Cube3DRuntimeObject={})),c.registerObject("Scene3D::Cube3DObject",c.Cube3DRuntimeObject)})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=Cube3DRuntimeObject.js.map
|
Extensions/3D/Cube3DRuntimeObjectPixiRenderer.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
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={}));
|
2 |
+
//# sourceMappingURL=Cube3DRuntimeObjectPixiRenderer.js.map
|
Extensions/3D/CustomRuntimeObject3D.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(r){class n extends r.CustomRuntimeObject{constructor(t,i){super(t,i);this._z=0;this._minZ=0;this._maxZ=0;this._scaleZ=1;this._flippedZ=!1;this._rotationX=0;this._rotationY=0;this._customCenterZ=0;this._renderer.reinitialize(this,t)}_createRender(){const t=this._runtimeScene;return new r.CustomRuntimeObject3DRenderer(this,this._instanceContainer,t)}_reinitializeRenderer(){this.getRenderer().reinitialize(this,this.getParent())}getRenderer(){return super.getRenderer()}get3DRendererObject(){return this.getRenderer().get3DRendererObject()}extraInitializationFromInitialInstance(t){super.extraInitializationFromInitialInstance(t),t.depth!==void 0&&this.setDepth(t.depth),t.flippedX&&this.flipX(t.flippedX),t.flippedY&&this.flipY(t.flippedY),t.flippedZ&&this.flipZ(t.flippedZ)}setZ(t){t!==this._z&&(this._z=t,this.getRenderer().updatePosition())}getZ(){return this._z}getDrawableZ(){let t=0;this._innerArea?t=this._innerArea.min[2]:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),t=this._minZ);const i=this.getScaleZ();return this._flippedZ?this._z+(-t-this.getUnscaledDepth()+2*this.getUnscaledCenterZ())*i:this._z+t*i}getCenterZ(){return this.getDepth()/2}getCenterZInScene(){return this.getDrawableZ()+this.getCenterZ()}setCenterZInScene(t){this.setZ(t+this._z-(this.getDrawableZ()+this.getCenterZ()))}getUnrotatedAABBMinZ(){return this.getDrawableZ()}getUnrotatedAABBMaxZ(){return this.getDrawableZ()+this.getDepth()}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 i=r.CustomRuntimeObject3D._temporaryVector;i.set(1,0,0);const e=this.get3DRendererObject();e.rotateOnWorldAxis(i,r.toRad(t)),this._rotationX=r.toDegrees(e.rotation.x),this._rotationY=r.toDegrees(e.rotation.y),this.setAngle(r.toDegrees(e.rotation.z))}turnAroundY(t){const i=r.CustomRuntimeObject3D._temporaryVector;i.set(0,1,0);const e=this.get3DRendererObject();e.rotateOnWorldAxis(i,r.toRad(t)),this._rotationX=r.toDegrees(e.rotation.x),this._rotationY=r.toDegrees(e.rotation.y),this.setAngle(r.toDegrees(e.rotation.z))}turnAroundZ(t){const i=r.CustomRuntimeObject3D._temporaryVector;i.set(0,0,1);const e=this.get3DRendererObject();e.rotateOnWorldAxis(i,r.toRad(t)),this._rotationX=r.toDegrees(e.rotation.x),this._rotationY=r.toDegrees(e.rotation.y),this.setAngle(r.toDegrees(e.rotation.z))}getInnerAreaMinZ(){return this._innerArea?this._innerArea.min[2]:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),this._minZ)}getInnerAreaMaxZ(){return this._innerArea?this._innerArea.max[2]:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),this._maxZ)}getUnscaledDepth(){return this._innerArea?this._innerArea.max[2]-this._innerArea.min[2]:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),this._maxZ-this._minZ)}_updateUntransformedHitBoxes(){super._updateUntransformedHitBoxes();let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(const e of this._instanceContainer.getAdhocListOfAllInstances())!e.isIncludedInParentCollisionMask()||!r.Base3DHandler.is3D(e)||(t=Math.min(t,e.getUnrotatedAABBMinZ()),i=Math.max(i,e.getUnrotatedAABBMaxZ()));t===Number.MAX_VALUE&&(t=0,i=1),this._minZ=t,this._maxZ=i}getUnscaledCenterZ(){return this.hasCustomRotationCenter()?this._customCenterZ:this._innerArea?(this._innerArea.min[2]+this._innerArea.max[2])/2:(this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes(),(this._minZ+this._maxZ)/2)}setRotationCenter3D(t,i,e){this._customCenterZ=e,this.setRotationCenter(t,i)}getDepth(){return this.getUnscaledDepth()*this.getScaleZ()}setDepth(t){const i=this.getUnscaledDepth();if(i===0)return;const e=t/i;this._innerArea&&this._isInnerAreaFollowingParentSize?(this._innerArea.min[2]*=e,this._innerArea.max[2]*=e):this.setScaleZ(e)}setScale(t){super.setScale(t),this.setScaleZ(t)}setScaleZ(t){this._innerArea&&this._isInnerAreaFollowingParentSize||(t<0&&(t=0),t!==Math.abs(this._scaleZ)&&(this._scaleZ=t*(this._flippedZ?-1:1),this.getRenderer().updateSize()))}getScale(){const t=this.getScaleX(),i=this.getScaleY(),e=this.getScaleZ();return t===i&&t===e?t:Math.pow(t*i*e,1/3)}getScaleZ(){return Math.abs(this._scaleZ)}flipZ(t){t!==this._flippedZ&&(this._flippedZ=t,this.getRenderer().updateSize())}isFlippedZ(){return this._flippedZ}}n._temporaryVector=new THREE.Vector3,r.CustomRuntimeObject3D=n})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=CustomRuntimeObject3D.js.map
|
Extensions/3D/CustomRuntimeObject3DRenderer.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(a){class u{constructor(e,t,i){this._isContainerDirty=!0;this._object=e,this._instanceContainer=t,this._threeGroup=new THREE.Group,this._threeGroup.rotation.order="ZYX";const r=i.getLayer("");r&&r.getRenderer().add3DRendererObject(this._threeGroup)}get3DRendererObject(){return this._threeGroup}getRendererObject(){return null}reinitialize(e,t){this._object=e,this._isContainerDirty=!0;const i=t.getLayer("");i&&i.getRenderer().add3DRendererObject(this._threeGroup)}_updateThreeGroup(){const e=this.get3DRendererObject(),t=this._object.getScaleX(),i=this._object.getScaleY(),r=this._object.getScaleZ(),n=this._object.getUnscaledCenterX()*t,s=this._object.getUnscaledCenterY()*i,o=this._object.getUnscaledCenterZ()*r;e.rotation.set(a.toRad(this._object.getRotationX()),a.toRad(this._object.getRotationY()),a.toRad(this._object.angle)),e.position.set(this._object.isFlippedX()?n:-n,this._object.isFlippedY()?s:-s,this._object.isFlippedZ()?o:-o),e.position.applyEuler(e.rotation),e.position.x+=this._object.getX()+n,e.position.y+=this._object.getY()+s,e.position.z+=this._object.getZ()+o,e.scale.set(this._object.isFlippedX()?-t:t,this._object.isFlippedY()?-i:i,this._object.isFlippedZ()?-r:r),e.visible=!this._object.hidden,this._isContainerDirty=!1}ensureUpToDate(){this._isContainerDirty&&this._updateThreeGroup()}update(){this._isContainerDirty=!0}updateX(){this._isContainerDirty=!0}updateY(){this._isContainerDirty=!0}updateAngle(){this._isContainerDirty=!0}updatePosition(){this._isContainerDirty=!0}updateRotation(){this._isContainerDirty=!0}updateSize(){this._isContainerDirty=!0}updateVisibility(){this._threeGroup.visible=!this._object.hidden}updateOpacity(){}setLayerIndex(e,t){}static getAnimationFrameTextureManager(e){return e._threeAnimationFrameTextureManager||(e._threeAnimationFrameTextureManager=new c(e)),e._threeAnimationFrameTextureManager}}a.CustomRuntimeObject3DRenderer=u;class c{constructor(e){this._imageManager=e}getAnimationFrameTexture(e){return this._imageManager.getThreeMaterial(e,{useTransparentTexture:!0,forceBasicMaterial:!0})}getAnimationFrameWidth(e){const t=e.map;return t?t.image.width:0}getAnimationFrameHeight(e){const t=e.map;return t?t.image.height:0}}})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=CustomRuntimeObject3DRenderer.js.map
|
Extensions/3D/HemisphereLight.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
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())}getDoubleParameter(t){return t==="intensity"?this.light.intensity:t==="elevation"?this.elevation:t==="rotation"?this.rotation:0}updateStringParameter(t,e){t==="skyColor"&&(this.light.color=new THREE.Color(i.rgbOrHexStringToNumber(e))),t==="groundColor"&&(this.light.groundColor=new THREE.Color(i.rgbOrHexStringToNumber(e))),t==="top"&&(this.top=e,this.updateRotation())}updateColorParameter(t,e){t==="skyColor"&&this.light.color.setHex(e),t==="groundColor"&&this.light.groundColor.setHex(e)}getColorParameter(t){return t==="skyColor"?this.light.color.getHex():t==="groundColor"?this.light.groundColor.getHex():0}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))}getNetworkSyncData(){return{i:this.light.intensity,sc:this.light.color.getHex(),gc:this.light.groundColor.getHex(),e:this.elevation,r:this.rotation,t:this.top}}updateFromNetworkSyncData(t){this.light.intensity=t.i,this.light.color.setHex(t.sc),this.light.groundColor.setHex(t.gc),this.elevation=t.e,this.rotation=t.r,this.top=t.t,this.updateRotation()}}}})})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=HemisphereLight.js.map
|
Extensions/3D/Model3DRuntimeObject.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
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(e,t){super(e,t);this._materialType=n.Model3DRuntimeObject.MaterialType.Basic;this._currentAnimationIndex=0;this._animationSpeedScale=1;this._animationPaused=!1;this._modelResourceName=t.content.modelResourceName,this._animations=t.content.animations,this._originPoint=o(t.content.originLocation),this._centerPoint=o(t.content.centerLocation),this._renderer=new n.Model3DRuntimeObjectRenderer(this,e),this._materialType=this._convertMaterialType(t.content.materialType),this.onModelChanged(t),this.onCreated()}onModelChanged(e){this._updateModel(e),this._animations.length>0&&this._renderer.playAnimation(this._animations[0].source,this._animations[0].loop)}updateFromObjectData(e,t){return super.updateFromObjectData(e,t),e.content.materialType!==t.content.materialType&&(this._materialType=this._convertMaterialType(t.content.materialType)),e.content.modelResourceName!==t.content.modelResourceName?this._reloadModel(t):(e.content.width!==t.content.width||e.content.height!==t.content.height||e.content.depth!==t.content.depth||e.content.rotationX!==t.content.rotationX||e.content.rotationY!==t.content.rotationY||e.content.rotationZ!==t.content.rotationZ||e.content.keepAspectRatio!==t.content.keepAspectRatio||e.content.materialType!==t.content.materialType)&&this._updateModel(t),e.content.originLocation!==t.content.originLocation&&(this._originPoint=o(t.content.originLocation)),e.content.centerLocation!==t.content.centerLocation&&(this._centerPoint=o(t.content.centerLocation)),!0}getNetworkSyncData(){return{...super.getNetworkSyncData(),mt:this._materialType,op:this._originPoint,cp:this._centerPoint,anis:this._animations,ai:this._currentAnimationIndex,ass:this._animationSpeedScale,ap:this._animationPaused}}updateFromNetworkSyncData(e){super.updateFromNetworkSyncData(e),e.mt!==void 0&&(this._materialType=e.mt),e.op!==void 0&&(this._originPoint=e.op),e.cp!==void 0&&(this._centerPoint=e.cp),e.anis!==void 0&&(this._animations=e.anis),e.ai!==void 0&&this.setAnimationIndex(e.ai),e.ass!==void 0&&this.setAnimationSpeedScale(e.ass),e.ap!==void 0&&e.ap!==this.isAnimationPaused()&&(e.ap?this.pauseAnimation():this.resumeAnimation())}_reloadModel(e){this._modelResourceName=e.content.modelResourceName,this._renderer._reloadModel(this,this._runtimeScene),this.onModelChanged(e)}_updateModel(e){const t=e.content.rotationX||0,a=e.content.rotationY||0,d=e.content.rotationZ||0,i=e.content.keepAspectRatio;this._renderer._updateModel(t,a,d,this._getOriginalWidth(),this._getOriginalHeight(),this._getOriginalDepth(),i)}getRenderer(){return this._renderer}_convertMaterialType(e){return e==="KeepOriginal"?n.Model3DRuntimeObject.MaterialType.KeepOriginal:e==="StandardWithoutMetalness"?n.Model3DRuntimeObject.MaterialType.StandardWithoutMetalness:n.Model3DRuntimeObject.MaterialType.Basic}update(e){const t=this.getElapsedTime()/1e3;this._renderer.updateAnimation(t*this._animationSpeedScale)}getAnimationIndex(){return this._currentAnimationIndex}setAnimationIndex(e){if(e=e|0,e<this._animations.length&&this._currentAnimationIndex!==e&&e>=0){const t=this._animations[e];this._currentAnimationIndex=e,this._renderer.playAnimation(t.source,t.loop),this._animationPaused&&this._renderer.pauseAnimation()}}getAnimationName(){return this._currentAnimationIndex>=this._animations.length?"":this._animations[this._currentAnimationIndex].name}setAnimationName(e){if(!e)return;const t=this._animations.findIndex(a=>a.name===e);t>=0&&this.setAnimationIndex(t)}isCurrentAnimationName(e){return this.getAnimationName()===e}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(e){this._animationSpeedScale=e}getAnimationElapsedTime(){return this._renderer.getAnimationElapsedTime()}setAnimationElapsedTime(e){this._renderer.setAnimationElapsedTime(e),this._animationPaused||this._renderer.resumeAnimation()}getAnimationDuration(){return this._renderer.getAnimationDuration(this._animations[this._currentAnimationIndex].source)}getCenterX(){const e=this._renderer.getCenterPoint();return this.getWidth()*e[0]}getCenterY(){const e=this._renderer.getCenterPoint();return this.getHeight()*e[1]}getCenterZ(){const e=this._renderer.getCenterPoint();return this.getDepth()*e[2]}getDrawableX(){const e=this._renderer.getOriginPoint();return this.getX()-this.getWidth()*e[0]}getDrawableY(){const e=this._renderer.getOriginPoint();return this.getY()-this.getHeight()*e[1]}getDrawableZ(){const e=this._renderer.getOriginPoint();return this.getZ()-this.getDepth()*e[2]}}n.Model3DRuntimeObject=s,function(e){let r;(function(i){i[i.Basic=0]="Basic",i[i.StandardWithoutMetalness=1]="StandardWithoutMetalness",i[i.KeepOriginal=2]="KeepOriginal"})(r=e.MaterialType||(e.MaterialType={}))}(s=n.Model3DRuntimeObject||(n.Model3DRuntimeObject={})),n.registerObject("Scene3D::Model3DObject",n.Model3DRuntimeObject)})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=Model3DRuntimeObject.js.map
|
Extensions/3D/Model3DRuntimeObject3DRenderer.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(o){const a=1/(1<<16),g=i=>{i.metalness&&(i.metalness=0)},T=i=>{const t=i;if(!!t.material)if(Array.isArray(t.material))for(let e=0;e<t.material.length;e++)g(t.material[e]);else g(t.material)},f=i=>i.traverse(T),M=i=>{const t=new THREE.MeshBasicMaterial;return i.color&&(t.color=i.color),i.map&&(t.map=i.map),t},b=i=>{const t=i;if(!!t.material)if(Array.isArray(t.material))for(let e=0;e<t.material.length;e++)t.material[e]=M(t.material[e]);else t.material=M(t.material)},D=i=>i.traverse(b);class j extends o.RuntimeObject3DRenderer{constructor(t,e){const s=e.getGame().getModel3DManager().getModel(t._modelResourceName),r=new THREE.Group,h=new THREE.Group;h.rotation.order="ZYX",h.add(r);super(t,e,h);this._model3DRuntimeObject=t,this._threeObject=r,this._originalModel=s,this._modelOriginPoint=[0,0,0],this.updateSize(),this.updatePosition(),this.updateRotation(),this._animationMixer=new THREE.AnimationMixer(r),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,s,r,h,R,p,l){t.rotation.set(o.toRad(e),o.toRad(s),o.toRad(r)),t.updateMatrixWorld(!0);const n=new THREE.Box3().setFromObject(t);!this._model3DRuntimeObject._originPoint&&n.expandByPoint(new THREE.Vector3(0,0,0));const m=n.max.x-n.min.x,c=n.max.y-n.min.y,d=n.max.z-n.min.z;this._modelOriginPoint[0]=m<a?0:-n.min.x/m,this._modelOriginPoint[1]=c<a?0:-n.min.y/c,this._modelOriginPoint[2]=d<a?0:-n.min.z/d,this._modelOriginPoint[1]=1-this._modelOriginPoint[1];const u=this._model3DRuntimeObject._centerPoint;u&&t.position.set(-(n.min.x+m*u[0]),-(n.min.y+c*(1-u[1])),-(n.min.z+d*u[2])),t.scale.set(1,1,1),t.rotation.set(o.toRad(e),o.toRad(s),o.toRad(r));const x=m<a?1:1/m,H=c<a?1:1/c,P=d<a?1:1/d,O=new THREE.Matrix4;if(O.makeScale(x,-H,P),t.updateMatrix(),t.applyMatrix4(O),l){const A=m<a?Number.POSITIVE_INFINITY:h/m,I=c<a?Number.POSITIVE_INFINITY:R/c,v=d<a?Number.POSITIVE_INFINITY:p/d;let _=Math.min(A,I,v);Number.isFinite(_)||(_=1),this._object._setOriginalWidth(_*m),this._object._setOriginalHeight(_*c),this._object._setOriginalDepth(_*d)}}_reloadModel(t,e){this._originalModel=e.getGame().getModel3DManager().getModel(t._modelResourceName)}_updateModel(t,e,s,r,h,R,p){const l=new THREE.Group;l.rotation.order="ZYX";const n=THREE_ADDONS.SkeletonUtils.clone(this._originalModel.scene);l.add(n),this._replaceMaterials(l),this._updateDefaultTransformation(l,t,e,s,r,h,R,p),this.get3DRendererObject().remove(this._threeObject),this.get3DRendererObject().add(l),this._threeObject=l,this._animationMixer=new THREE.AnimationMixer(n);const E=this._model3DRuntimeObject.isAnimationPaused();this._model3DRuntimeObject.setAnimationIndex(this._model3DRuntimeObject.getAnimationIndex()),E&&this.pauseAnimation()}_replaceMaterials(t){this._model3DRuntimeObject._materialType===o.Model3DRuntimeObject.MaterialType.StandardWithoutMetalness?f(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 s=THREE.AnimationClip.findByName(this._originalModel.animations,t);if(!s){console.error(`The GLB file: ${this._model3DRuntimeObject._modelResourceName} doesn't have any animation named: ${t}`);return}this._action=this._animationMixer.clipAction(s),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=j})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=Model3DRuntimeObject3DRenderer.js.map
|
Extensions/3D/Scene3DTools.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(c){let R;(function(y){const m=45;let d;(function(g){g.getCameraZ=(t,r,a)=>{const o=t.getLayer(r),e=o.getRenderer().getThreeCamera(),n=e?e instanceof THREE.OrthographicCamera?null:e.fov:m;return o.getCameraZ(n,a)},g.setCameraZ=(t,r,a,o)=>{const s=t.getLayer(a),n=s.getRenderer().getThreeCamera(),i=n?n instanceof THREE.OrthographicCamera?null:n.fov:m;s.setCameraZ(r,i,o)},g.getCameraRotationX=(t,r,a)=>{const e=t.getLayer(r).getRenderer().getThreeCamera();return e?c.toDegrees(e.rotation.x):0},g.setCameraRotationX=(t,r,a,o)=>{const n=t.getLayer(a).getRenderer().getThreeCamera();!n||(n.rotation.x=c.toRad(r))},g.getCameraRotationY=(t,r,a)=>{const e=t.getLayer(r).getRenderer().getThreeCamera();return e?c.toDegrees(e.rotation.y):0},g.setCameraRotationY=(t,r,a,o)=>{const n=t.getLayer(a).getRenderer().getThreeCamera();!n||(n.rotation.y=c.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(c.toDegrees(-i.rotation.z)))},g.turnCameraTowardPosition=(t,r,a,o,s,e,n)=>{const i=t.getLayer(s),l=i.getRenderer().getThreeCamera();!l||(n?l.up.set(0,1,0):l.up.set(0,0,1),l.lookAt(r,-a,o),i.setCameraRotation(c.toDegrees(-l.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 instanceof THREE.OrthographicCamera?0:e.fov:m},g.setFov=(t,r,a,o)=>{const e=t.getLayer(a).getRenderer(),n=e.getThreeCamera();!n||n instanceof THREE.OrthographicCamera||(n.fov=Math.min(Math.max(r,0),180),e.setThreeCameraDirty(!0))}})(d=y.camera||(y.camera={}))})(R=c.scene3d||(c.scene3d={}))})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=Scene3DTools.js.map
|
Extensions/Effects/adjustment-pixi-filter.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(i){i.PixiFiltersTools.registerFilterCreator("Adjustment",new class extends i.PixiFiltersTools.PixiFilterCreator{makePIXIFilter(r,t){return new PIXI.filters.AdjustmentFilter}updatePreRender(r,t){}updateDoubleParameter(r,t,e){const n=r;t==="gamma"?n.gamma=e:t==="saturation"?n.saturation=e:t==="contrast"?n.contrast=e:t==="brightness"?n.brightness=e:t==="red"?n.red=e:t==="green"?n.green=e:t==="blue"?n.blue=e:t==="alpha"&&(n.alpha=e)}getDoubleParameter(r,t){const e=r;return t==="gamma"?e.gamma:t==="saturation"?e.saturation:t==="contrast"?e.contrast:t==="brightness"?e.brightness:t==="red"?e.red:t==="green"?e.green:t==="blue"?e.blue:t==="alpha"?e.alpha:0}updateStringParameter(r,t,e){}updateColorParameter(r,t,e){}getColorParameter(r,t){return 0}updateBooleanParameter(r,t,e){}getNetworkSyncData(r){const t=r;return{ga:t.gamma,sa:t.saturation,co:t.contrast,br:t.brightness,r:t.red,g:t.green,b:t.blue,a:t.alpha}}updateFromNetworkSyncData(r,t){const e=r;e.gamma=t.ga,e.saturation=t.sa,e.contrast=t.co,e.brightness=t.br,e.red=t.r,e.green=t.g,e.blue=t.b,e.alpha=t.a}})})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=adjustment-pixi-filter.js.map
|
Extensions/Effects/pixi-filters/filter-adjustment.js
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* @pixi/filter-adjustment - v5.1.1
|
3 |
+
* Compiled Thu, 31 Aug 2023 09:18:38 UTC
|
4 |
+
*
|
5 |
+
* @pixi/filter-adjustment is licensed under the MIT License.
|
6 |
+
* http://www.opensource.org/licenses/mit-license
|
7 |
+
*/var __filters=function(t,r){"use strict";var i=`attribute vec2 aVertexPosition;
|
8 |
+
attribute vec2 aTextureCoord;
|
9 |
+
|
10 |
+
uniform mat3 projectionMatrix;
|
11 |
+
|
12 |
+
varying vec2 vTextureCoord;
|
13 |
+
|
14 |
+
void main(void)
|
15 |
+
{
|
16 |
+
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
17 |
+
vTextureCoord = aTextureCoord;
|
18 |
+
}`,e=`varying vec2 vTextureCoord;
|
19 |
+
uniform sampler2D uSampler;
|
20 |
+
|
21 |
+
uniform float gamma;
|
22 |
+
uniform float contrast;
|
23 |
+
uniform float saturation;
|
24 |
+
uniform float brightness;
|
25 |
+
uniform float red;
|
26 |
+
uniform float green;
|
27 |
+
uniform float blue;
|
28 |
+
uniform float alpha;
|
29 |
+
|
30 |
+
void main(void)
|
31 |
+
{
|
32 |
+
vec4 c = texture2D(uSampler, vTextureCoord);
|
33 |
+
|
34 |
+
if (c.a > 0.0) {
|
35 |
+
c.rgb /= c.a;
|
36 |
+
|
37 |
+
vec3 rgb = pow(c.rgb, vec3(1. / gamma));
|
38 |
+
rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);
|
39 |
+
rgb.r *= red;
|
40 |
+
rgb.g *= green;
|
41 |
+
rgb.b *= blue;
|
42 |
+
c.rgb = rgb * brightness;
|
43 |
+
|
44 |
+
c.rgb *= c.a;
|
45 |
+
}
|
46 |
+
|
47 |
+
gl_FragColor = c * alpha;
|
48 |
+
}
|
49 |
+
`;class a extends r.Filter{constructor(n){super(i,e),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,n)}apply(n,s,o,u){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,n.applyFilter(this,s,o,u)}}return t.AdjustmentFilter=a,Object.defineProperty(t,"__esModule",{value:!0}),t}({},PIXI);Object.assign(PIXI.filters,__filters);
|
Extensions/LinkedObjects/linkedobjects.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(r){const R=new r.Logger("LinkedObjects");class o{constructor(){this._links=new Map}static getManager(e){return e.linkedObjectsManager||(e.linkedObjectsManager=new r.LinksManager),e.linkedObjectsManager}_getMapOfObjectsLinkedWith(e){return this._links.has(e.id)||this._links.set(e.id,new k),this._links.get(e.id).linkedObjectMap}getObjectsLinkedWith(e){return this._links.has(e.id)||this._links.set(e.id,new k),this._links.get(e.id)}getObjectsLinkedWithAndNamed(e,t){let n=this._getMapOfObjectsLinkedWith(e).get(t);return n||(n=r.staticArray(o.prototype.getObjectsLinkedWithAndNamed)),n}linkObjects(e,t){const n=this._getMapOfObjectsLinkedWith(e);n.has(t.getName())||n.set(t.getName(),[]);const i=n.get(t.getName());i.indexOf(t)===-1&&i.push(t);const s=this._getMapOfObjectsLinkedWith(t);s.has(e.getName())||s.set(e.getName(),[]);const g=s.get(e.getName());g.indexOf(e)===-1&&g.push(e)}removeAllLinksOf(e){const t=this._links.get(e.id);if(!!t){for(const n of t.linkedObjectMap.values())for(let i=0;i<n.length;i++){const s=n[i];if(this._links.has(s.id)){const g=this._links.get(s.id).linkedObjectMap.get(e.getName());if(!g){R.error(`Can't find link from ${s.id} (${s.name}) to ${e.id} (${e.name})`);return}const a=g.indexOf(e);a!==-1&&g.splice(a,1)}}this._links.delete(e.id)}}removeLinkBetween(e,t){if(this._links.has(e.id)){const n=this._links.get(e.id).linkedObjectMap;if(n.has(t.getName())){const i=n.get(t.getName()),s=i.indexOf(t);s!==-1&&i.splice(s,1)}}if(this._links.has(t.id)){const n=this._links.get(t.id).linkedObjectMap;if(n.has(e.getName())){const i=n.get(e.getName()),s=i.indexOf(e);s!==-1&&i.splice(s,1)}}}}r.LinksManager=o;const h=class{constructor(){this.linkedObjectMap=new Map}[Symbol.iterator](){let e=this.linkedObjectMap.values(),t=h.emptyItr;return{next:()=>{let n=t.next();for(;n.done;){const i=e.next();if(i.done)return n;t=i.value[Symbol.iterator](),n=t.next()}return n}}}};let k=h;k.emptyItr={next:()=>({value:void 0,done:!0})};let x;(function(e){let L;(function(g){r.registerObjectDeletedFromSceneCallback(function(a,c){o.getManager(a).removeAllLinksOf(c)}),g.linkObjects=function(a,c,u){c===null||u===null||o.getManager(a).linkObjects(c,u)},g.removeLinkBetween=function(a,c,u){c===null||u===null||o.getManager(a).removeLinkBetween(c,u)},g.removeAllLinksOf=function(a,c){c!==null&&o.getManager(a).removeAllLinksOf(c)},g.pickObjectsLinkedTo=function(a,c,u,N){if(u===null)return!1;const j=o.getManager(a)._getMapOfObjectsLinkedWith(u);let f=!1;for(const p in c.items)if(c.containsKey(p)){const d=c.items[p];if(d.length===0)continue;const O=r.staticArray2(r.evtTools.linkedObjects.pickObjectsLinkedTo);if(O.length=0,N)for(const l of d)O.indexOf(l.getName())<0&&O.push(l.getName());else O.push(p);let b=0;for(const l of O)b+=a.getObjects(l).length;if(d.length===b){d.length=0;for(const l of O)if(j.has(l)){const m=j.get(l);f=f||m.length>0,d.push.apply(d,m)}}else{const l=r.staticArray(r.evtTools.linkedObjects.pickObjectsLinkedTo);l.length=0;for(const m of O)if(j.has(m)){const _=j.get(m);for(const M of _)d.indexOf(M)>=0&&l.push(M)}f=f||l.length>0,d.length=0,d.push.apply(d,l),l.length=0}O.length=0}return f}})(L=e.linkedObjects||(e.linkedObjects={}))})(x=r.evtTools||(r.evtTools={}))})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=linkedobjects.js.map
|
Extensions/TextObject/textruntimeobject-pixi-renderer.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(i){class s{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._isOutlineEnabled?this._object._outlineThickness:0,t.dropShadow=this._object._shadow,t.dropShadowColor=i.rgbToHexNumber(this._object._shadowColor[0],this._object._shadowColor[1],this._object._shadowColor[2]),t.dropShadowAlpha=this._object._shadowOpacity/255,t.dropShadowBlur=this._object._shadowBlur,t.dropShadowAngle=i.toRad(this._object._shadowAngle),t.dropShadowDistance=this._object._shadowDistance;const o=t.dropShadow?t.dropShadowDistance+t.dropShadowBlur:0;t.padding=Math.ceil(this._object._padding+o),t.miterLimit=3,this.updatePosition(),this._text.dirty=!0}updatePosition(){if(this._object.isWrapping()){const t=this._object._textAlign==="right"?1:this._object._textAlign==="center"?.5:0,o=this._object.getWrappingWidth(),h=(o-this._text.width)*(t-.5);this._text.position.x=this._object.x+o/2,this._text.anchor.x=.5-h/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;const e=this._object._verticalTextAlignment==="bottom"?1:this._object._verticalTextAlignment==="center"?.5:0;this._text.position.y=this._object.y+this._text.height*(.5-e),this._text.anchor.y=.5}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=s})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=textruntimeobject-pixi-renderer.js.map
|
Extensions/TextObject/textruntimeobject.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(r){class d extends r.RuntimeObject{constructor(t,s){super(t,s);this._useGradient=!1;this._gradient=[];this._gradientType="";this.opacity=255;this._wrapping=!1;this._wrappingWidth=100;this._padding=5;this._scaleX=1;this._scaleY=1;const e=s.content;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=r.rgbOrHexToRGBColor(e.color),this._str=e.text,this._textAlign=e.textAlignment||"left",this._verticalTextAlignment=e.verticalTextAlignment||"top",this._isOutlineEnabled=e.isOutlineEnabled,this._outlineThickness=e.outlineThickness,this._outlineColor=r.rgbOrHexToRGBColor(e.outlineColor),this._shadow=e.isShadowEnabled,this._shadowColor=r.rgbOrHexToRGBColor(e.shadowColor),this._shadowOpacity=e.shadowOpacity,this._shadowDistance=e.shadowDistance,this._shadowBlur=e.shadowBlurRadius,this._shadowAngle=e.shadowAngle,this._renderer=new r.TextRuntimeObjectRenderer(this,t),this.onCreated()}updateFromObjectData(t,s){const e=t.content,i=s.content;return e.characterSize!==i.characterSize&&this.setCharacterSize(i.characterSize),e.font!==i.font&&this.setFontName(i.font),e.bold!==i.bold&&this.setBold(i.bold),e.italic!==i.italic&&this.setItalic(i.italic),e.color!==i.color&&this.setColor(i.color),e.text!==i.text&&this.setText(i.text),e.underlined!==i.underlined?!1:(e.textAlignment!==i.textAlignment&&this.setTextAlignment(i.textAlignment),e.verticalTextAlignment!==i.verticalTextAlignment&&this.setVerticalTextAlignment(i.verticalTextAlignment),e.isOutlineEnabled!==i.isOutlineEnabled&&this.setOutlineEnabled(i.isOutlineEnabled),e.outlineThickness!==i.outlineThickness&&this.setOutlineThickness(i.outlineThickness),e.outlineColor!==i.outlineColor&&this.setOutlineColor(i.outlineColor),e.isShadowEnabled!==i.isShadowEnabled&&this.showShadow(i.isShadowEnabled),e.shadowColor!==i.shadowColor&&this.setShadowColor(i.shadowColor),e.shadowOpacity!==i.shadowOpacity&&this.setShadowOpacity(i.shadowOpacity),e.shadowDistance!==i.shadowDistance&&this.setShadowDistance(i.shadowDistance),e.shadowAngle!==i.shadowAngle&&this.setShadowAngle(i.shadowAngle),e.shadowBlurRadius!==i.shadowBlurRadius&&this.setShadowBlurRadius(i.shadowBlurRadius),!0)}getNetworkSyncData(){return{...super.getNetworkSyncData(),str:this._str,o:this.opacity,cs:this._characterSize,fn:this._fontName,b:this._bold,i:this._italic,u:this._underlined,c:this._color,scale:this.getScale(),ta:this._textAlign,wrap:this._wrapping,wrapw:this._wrappingWidth,oena:this._isOutlineEnabled,ot:this._outlineThickness,oc:this._outlineColor,sh:this._shadow,shc:this._shadowColor,sho:this._shadowOpacity,shd:this._shadowDistance,sha:this._shadowAngle,shb:this._shadowBlur,pad:this._padding}}updateFromNetworkSyncData(t){super.updateFromNetworkSyncData(t),t.str!==void 0&&this.setText(t.str),t.o!==void 0&&this.setOpacity(t.o),t.cs!==void 0&&this.setCharacterSize(t.cs),t.fn!==void 0&&this.setFontName(t.fn),t.b!==void 0&&this.setBold(t.b),t.i!==void 0&&this.setItalic(t.i),t.u!==void 0&&(this._underlined=t.u),t.c!==void 0&&(this._color=t.c),t.scale!==void 0&&this.setScale(t.scale),t.ta!==void 0&&this.setTextAlignment(t.ta),t.ta!==void 0&&this.setVerticalTextAlignment(t.ta),t.wrap!==void 0&&this.setWrapping(t.wrap),t.wrapw!==void 0&&this.setWrappingWidth(t.wrapw),t.oena!==void 0&&this.setOutlineEnabled(t.oena),t.ot!==void 0&&this.setOutlineThickness(t.ot),t.oc!==void 0&&(this._outlineColor=t.oc),t.sh!==void 0&&this.showShadow(t.sh),t.shc!==void 0&&(this._shadowColor=t.shc),t.sho!==void 0&&this.setShadowOpacity(t.sho),t.shd!==void 0&&this.setShadowDistance(t.shd),t.sha!==void 0&&this.setShadowAngle(t.sha),t.shb!==void 0&&this.setShadowBlurRadius(t.shb),t.pad!==void 0&&this.setPadding(t.pad)}getRendererObject(){return this._renderer.getRendererObject()}update(t){this._renderer.ensureUpToDate()}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}extraInitializationFromInitialInstance(t){t.customSize?(this.setWrappingWidth(t.width),this.setWrapping(!0)):this.setWrapping(!1),t.opacity!==void 0&&this.setOpacity(t.opacity)}_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),s=Math.abs(this._scaleY);return t===s?t:Math.sqrt(t*s)}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 s=t.split(";");s.length<3||(this._color[0]=parseInt(s[0],10),this._color[1]=parseInt(s[1],10),this._color[2]=parseInt(s[2],10),this._useGradient=!1,this._renderer.updateStyle())}getColor(){return this._color[0]+";"+this._color[1]+";"+this._color[2]}setVerticalTextAlignment(t){this._verticalTextAlignment=t,this._renderer.updateStyle()}getVerticalTextAlignment(){return this._verticalTextAlignment}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._wrapping&&(this._renderer.updateStyle(),this.invalidateHitboxes()))}setWidth(t){this.setWrappingWidth(t)}getDrawableY(){return this.getY()-(this._verticalTextAlignment==="center"?this.getHeight()/2:this._verticalTextAlignment==="bottom"?this.getHeight():0)}setOutline(t,s){const e=t.split(";");e.length<3||(this._outlineColor[0]=parseInt(e[0],10),this._outlineColor[1]=parseInt(e[1],10),this._outlineColor[2]=parseInt(e[2],10),this._outlineThickness=s,this._renderer.updateStyle())}isOutlineEnabled(){return this._isOutlineEnabled}setOutlineEnabled(t){this._isOutlineEnabled=t,this._renderer.updateStyle()}getOutlineThickness(){return this._outlineThickness}setOutlineThickness(t){this._outlineThickness=t,this._renderer.updateStyle()}setOutlineColor(t){this._outlineColor=r.rgbOrHexToRGBColor(t),this._renderer.updateStyle()}setShadow(t,s,e,i){const n=t.split(";");n.length<3||(this._shadowColor[0]=parseInt(n[0],10),this._shadowColor[1]=parseInt(n[1],10),this._shadowColor[2]=parseInt(n[2],10),this._shadowDistance=s,this._shadowBlur=e,this._shadowAngle=i,this._shadow=!0,this._renderer.updateStyle())}isShadowEnabled(){return this._shadow}showShadow(t){this._shadow=t,this._renderer.updateStyle()}getShadowOpacity(){return this._shadowOpacity}setShadowOpacity(t){this._shadowOpacity=t,this._renderer.updateStyle()}getShadowDistance(){return this._shadowDistance}setShadowDistance(t){this._shadowDistance=t,this._renderer.updateStyle()}getShadowAngle(){return this._shadowAngle}setShadowAngle(t){this._shadowAngle=t,this._renderer.updateStyle()}getShadowBlurRadius(){return this._shadowBlur}setShadowBlurRadius(t){this._shadowBlur=t,this._renderer.updateStyle()}setShadowColor(t){this._shadowColor=r.rgbOrHexToRGBColor(t),this._renderer.updateStyle()}setGradient(t,s,e,i,n){const o=s.split(";"),a=e.split(";"),h=i.split(";"),l=n.split(";");this._gradient=[],o.length==3&&this._gradient.push([parseInt(o[0],10),parseInt(o[1],10),parseInt(o[2],10)]),a.length==3&&this._gradient.push([parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)]),h.length==3&&this._gradient.push([parseInt(h[0],10),parseInt(h[1],10),parseInt(h[2],10)]),l.length==3&&this._gradient.push([parseInt(l[0],10),parseInt(l[1],10),parseInt(l[2],10)]),this._gradientType=t,this._useGradient=this._gradient.length>1,this._renderer.updateStyle()}getPadding(){return this._padding}setPadding(t){this._padding=t,this._renderer.updateStyle()}}r.TextRuntimeObject=d,r.registerObject("TextObject::Text",r.TextRuntimeObject)})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=textruntimeobject.js.map
|
Extensions/TopDownMovementBehavior/topdownmovementruntimebehavior.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(l){class p extends l.RuntimeBehavior{constructor(t,e,d){super(t,e,d);this._angle=0;this._xVelocity=0;this._yVelocity=0;this._angularSpeed=0;this._leftKey=!1;this._rightKey=!1;this._upKey=!1;this._downKey=!1;this._leftKeyPressedDuration=0;this._rightKeyPressedDuration=0;this._upKeyPressedDuration=0;this._downKeyPressedDuration=0;this._wasStickUsed=!1;this._stickAngle=0;this._stickForce=0;this._dontClearInputsBetweenFrames=!1;this._ignoreDefaultControlsAsSyncedByNetwork=!1;this._wasLeftKeyPressed=!1;this._wasRightKeyPressed=!1;this._wasUpKeyPressed=!1;this._wasDownKeyPressed=!1;this._temporaryPointForTransformations=[0,0];this._topDownMovementHooks=[];this._allowDiagonals=e.allowDiagonals,this._acceleration=e.acceleration,this._deceleration=e.deceleration,this._maxSpeed=e.maxSpeed,this._angularMaxSpeed=e.angularMaxSpeed,this._rotateObject=e.rotateObject,this._angleOffset=e.angleOffset,this._ignoreDefaultControls=e.ignoreDefaultControls,this.setViewpoint(e.viewpoint,e.customIsometryAngle),this._movementAngleOffset=e.movementAngleOffset||0}getNetworkSyncData(){return this._dontClearInputsBetweenFrames=!1,this._ignoreDefaultControlsAsSyncedByNetwork=!1,{...super.getNetworkSyncData(),props:{a:this._angle,xv:this._xVelocity,yv:this._yVelocity,as:this._angularSpeed,lk:this._wasLeftKeyPressed,rk:this._wasRightKeyPressed,uk:this._wasUpKeyPressed,dk:this._wasDownKeyPressed,wsu:this._wasStickUsed,sa:this._stickAngle,sf:this._stickForce}}}updateFromNetworkSyncData(t){super.updateFromNetworkSyncData(t);const e=t.props;e.a!==void 0&&(this._angle=e.a),e.xv!==void 0&&(this._xVelocity=e.xv),e.yv!==void 0&&(this._yVelocity=e.yv),e.as!==void 0&&(this._angularSpeed=e.as),e.lk!==void 0&&(this._leftKey=e.lk),e.rk!==void 0&&(this._rightKey=e.rk),e.uk!==void 0&&(this._upKey=e.uk),e.dk!==void 0&&(this._downKey=e.dk),e.wsu!==void 0&&(this._wasStickUsed=e.wsu),e.sa!==void 0&&(this._stickAngle=e.sa),e.sf!==void 0&&(this._stickForce=e.sf),this._dontClearInputsBetweenFrames=!0,this._ignoreDefaultControlsAsSyncedByNetwork=!0}updateFromBehaviorData(t,e){return t.allowDiagonals!==e.allowDiagonals&&(this._allowDiagonals=e.allowDiagonals),t.acceleration!==e.acceleration&&(this._acceleration=e.acceleration),t.deceleration!==e.deceleration&&(this._deceleration=e.deceleration),t.maxSpeed!==e.maxSpeed&&(this._maxSpeed=e.maxSpeed),t.angularMaxSpeed!==e.angularMaxSpeed&&(this._angularMaxSpeed=e.angularMaxSpeed),t.rotateObject!==e.rotateObject&&(this._rotateObject=e.rotateObject),t.angleOffset!==e.angleOffset&&(this._angleOffset=e.angleOffset),t.ignoreDefaultControls!==e.ignoreDefaultControls&&(this._ignoreDefaultControls=e.ignoreDefaultControls),(t.platformType!==e.platformType||t.customIsometryAngle!==e.customIsometryAngle)&&this.setViewpoint(e.platformType,e.customIsometryAngle),t.movementAngleOffset!==e.movementAngleOffset&&(this._movementAngleOffset=e.movementAngleOffset),!0}setViewpoint(t,e){t==="PixelIsometry"?this._basisTransformation=new l.TopDownMovementRuntimeBehavior.IsometryTransformation(Math.atan(.5)):t==="TrueIsometry"?this._basisTransformation=new l.TopDownMovementRuntimeBehavior.IsometryTransformation(Math.PI/6):t==="CustomIsometry"?this._basisTransformation=new l.TopDownMovementRuntimeBehavior.IsometryTransformation(e*Math.PI/180):this._basisTransformation=null}setAcceleration(t){this._acceleration=t}getAcceleration(){return this._acceleration}setDeceleration(t){this._deceleration=t}getDeceleration(){return this._deceleration}setMaxSpeed(t){this._maxSpeed=t}getMaxSpeed(){return this._maxSpeed}setAngularMaxSpeed(t){this._angularMaxSpeed=t}getAngularMaxSpeed(){return this._angularMaxSpeed}setAngleOffset(t){this._angleOffset=t}getAngleOffset(){return this._angleOffset}allowDiagonals(t){this._allowDiagonals=t}diagonalsAllowed(){return this._allowDiagonals}setRotateObject(t){this._rotateObject=t}isObjectRotated(){return this._rotateObject}isMoving(){return this._xVelocity!==0||this._yVelocity!==0}getSpeed(){return Math.sqrt(this._xVelocity*this._xVelocity+this._yVelocity*this._yVelocity)}getXVelocity(){return this._xVelocity}setXVelocity(t){this._xVelocity=t}getYVelocity(){return this._yVelocity}setYVelocity(t){this._yVelocity=t}getAngle(){return this._angle}isMovementAngleAround(t,e){return Math.abs(l.evtTools.common.angleDifference(this._angle,t))<=e}setMovementAngleOffset(t){this._movementAngleOffset=t}getMovementAngleOffset(){return this._movementAngleOffset}doStepPreEvents(t){const e=37,d=38,u=39,r=40;this._leftKey||(this._leftKey=!this.shouldIgnoreDefaultControls()&&t.getGame().getInputManager().isKeyPressed(e)),this._rightKey||(this._rightKey=!this.shouldIgnoreDefaultControls()&&t.getGame().getInputManager().isKeyPressed(u)),this._downKey||(this._downKey=!this.shouldIgnoreDefaultControls()&&t.getGame().getInputManager().isKeyPressed(r)),this._upKey||(this._upKey=!this.shouldIgnoreDefaultControls()&&t.getGame().getInputManager().isKeyPressed(d));const _=this.owner.getElapsedTime();this._leftKey?this._leftKeyPressedDuration+=_:this._leftKeyPressedDuration=0,this._rightKey?this._rightKeyPressedDuration+=_:this._rightKeyPressedDuration=0,this._downKey?this._downKeyPressedDuration+=_:this._downKeyPressedDuration=0,this._upKey?this._upKeyPressedDuration+=_:this._upKeyPressedDuration=0;let s=-1;this._allowDiagonals?this._upKey&&!this._downKey?this._leftKey&&!this._rightKey?s=5:!this._leftKey&&this._rightKey?s=7:s=6:!this._upKey&&this._downKey?this._leftKey&&!this._rightKey?s=3:!this._leftKey&&this._rightKey?s=1:s=2:this._leftKey&&!this._rightKey?s=4:!this._leftKey&&this._rightKey&&(s=0):(this._upKey&&!this._downKey?s=6:!this._upKey&&this._downKey&&(s=2),this._leftKey&&!this._rightKey&&(this._upKey===this._downKey||this._upKey&&this._leftKeyPressedDuration<this._upKeyPressedDuration||this._downKey&&this._leftKeyPressedDuration<this._downKeyPressedDuration)?s=4:this._rightKey&&!this._leftKey&&(this._upKey===this._downKey||this._upKey&&this._rightKeyPressedDuration<this._upKeyPressedDuration||this._downKey&&this._rightKeyPressedDuration<this._downKeyPressedDuration)&&(s=0));const h=l.TopDownMovementRuntimeBehavior._topDownMovementHookContext;for(const o of this._topDownMovementHooks)h._setDirection(s),s=o.overrideDirection(h);h._setDirection(s);for(const o of this._topDownMovementHooks)o.beforeSpeedUpdate(h);const a=this.owner,y=this.owner.getElapsedTime()/1e3,w=this._xVelocity,v=this._yVelocity;this._wasStickUsed=!1;let f=0,c=0,i=1,n=0;if(s!==-1)f=(s+this._movementAngleOffset/45)*Math.PI/4,c=s*45+this._movementAngleOffset,i=Math.cos(f),n=Math.sin(f),(i===-1||i===1)&&(n=0),(n===-1||n===1)&&(i=0),this._xVelocity+=this._acceleration*y*i,this._yVelocity+=this._acceleration*y*n;else if(this._stickForce!==0){this._allowDiagonals||(this._stickAngle=90*Math.floor((this._stickAngle+45)/90)),c=this._stickAngle+this._movementAngleOffset,f=c*Math.PI/180;const o=this._acceleration*y*this._stickForce;i=Math.cos(f),n=Math.sin(f),(i===-1||i===1)&&(n=0),(n===-1||n===1)&&(i=0),this._xVelocity+=o*i,this._yVelocity+=o*n,this._wasStickUsed=!0,this._stickForce=0}else if(this._yVelocity!==0||this._xVelocity!==0){f=Math.atan2(this._yVelocity,this._xVelocity),c=f*180/Math.PI;const o=this._xVelocity>=0,M=this._yVelocity>=0;i=Math.cos(f),n=Math.sin(f),(i===-1||i===1)&&(n=0),(n===-1||n===1)&&(i=0),this._xVelocity-=this._deceleration*y*i,this._yVelocity-=this._deceleration*y*n,this._xVelocity>0!==o&&(this._xVelocity=0),this._yVelocity>0!==M&&(this._yVelocity=0)}this._xVelocity*this._xVelocity+this._yVelocity*this._yVelocity>this._maxSpeed*this._maxSpeed&&(this._xVelocity=this._maxSpeed*i,this._yVelocity=this._maxSpeed*n),this._angularSpeed=this._angularMaxSpeed;for(const o of this._topDownMovementHooks)o.beforePositionUpdate(h);const g=(w+this._xVelocity)/2*y,m=(v+this._yVelocity)/2*y;if(this._basisTransformation===null)a.setX(a.getX()+g),a.setY(a.getY()+m);else{const o=this._temporaryPointForTransformations;o[0]=g,o[1]=m,this._basisTransformation.toScreen(o,o),a.setX(a.getX()+o[0]),a.setY(a.getY()+o[1])}(this._xVelocity!==0||this._yVelocity!==0)&&(this._angle=c,this._rotateObject&&a.rotateTowardAngle(c+this._angleOffset,this._angularSpeed)),this._wasLeftKeyPressed=this._leftKey,this._wasRightKeyPressed=this._rightKey,this._wasUpKeyPressed=this._upKey,this._wasDownKeyPressed=this._downKey,this._dontClearInputsBetweenFrames||(this._leftKey=!1,this._rightKey=!1,this._upKey=!1,this._downKey=!1)}simulateControl(t){t==="Left"?this._leftKey=!0:t==="Right"?this._rightKey=!0:t==="Up"?this._upKey=!0:t==="Down"&&(this._downKey=!0)}ignoreDefaultControls(t){this._ignoreDefaultControls=t}shouldIgnoreDefaultControls(){return this._ignoreDefaultControls||this._ignoreDefaultControlsAsSyncedByNetwork}simulateLeftKey(){this._leftKey=!0}simulateRightKey(){this._rightKey=!0}simulateUpKey(){this._upKey=!0}simulateDownKey(){this._downKey=!0}simulateStick(t,e){this._stickAngle=t%360,this._stickForce=Math.max(0,Math.min(1,e))}isUsingControl(t){return t==="Left"?this._leftKeyPressedDuration>0:t==="Right"?this._rightKeyPressedDuration>0:t==="Up"?this._upKeyPressedDuration>0:t==="Down"?this._downKeyPressedDuration>0:t==="Stick"?this._wasStickUsed:!1}getLastStickInputAngle(){return this._stickAngle}registerHook(t){this._topDownMovementHooks.push(t)}}l.TopDownMovementRuntimeBehavior=p,function(d){class K{constructor(){this.direction=-1}getDirection(){return this.direction}_setDirection(r){this.direction=r}}d.TopDownMovementHookContext=K,d._topDownMovementHookContext=new l.TopDownMovementRuntimeBehavior.TopDownMovementHookContext;class e{constructor(r){if(r<=0||r>=Math.PI/4)throw new RangeError("An isometry angle must be in ]0; pi/4] but was: "+r);const _=Math.asin(Math.tan(r)),s=Math.sin(_),h=Math.cos(Math.PI/4),a=h;this._screen=[[h,-a],[s*a,s*h]]}toScreen(r,_){const s=this._screen[0][0]*r[0]+this._screen[0][1]*r[1],h=this._screen[1][0]*r[0]+this._screen[1][1]*r[1];_[0]=s,_[1]=h}}d.IsometryTransformation=e}(p=l.TopDownMovementRuntimeBehavior||(l.TopDownMovementRuntimeBehavior={})),l.registerBehavior("TopDownMovementBehavior::TopDownMovementBehavior",l.TopDownMovementRuntimeBehavior)})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=topdownmovementruntimebehavior.js.map
|
Extensions/TweenBehavior/TweenManager.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(d){let b;(function(f){let v;(function(l){class p{constructor(){this._tweens=new Map;this._activeTweens=new Array}step(){let t=0;for(let n=0;n<this._activeTweens.length;n++){const a=this._activeTweens[n];a.step(),a.hasFinished()||(this._activeTweens[t]=a,t++)}this._activeTweens.length=t}addSimpleTween(t,n,a,r,i,s,u,o,m){const h=l.easingFunctions[r];if(!h)return;this.removeTween(t);const c=new M(n,a,h,i,s,u,o,m);this._tweens.set(t,c),this._addActiveTween(c)}addMultiTween(t,n,a,r,i,s,u,o,m){const h=l.easingFunctions[r];if(!h)return;this.removeTween(t);const c=new I(n,a,h,i,s,u,o,m);this._tweens.set(t,c),this._addActiveTween(c)}exists(t){return this._tweens.has(t)}isPlaying(t){const n=this._tweens.get(t);return!!n&&n.isPlaying()}hasFinished(t){const n=this._tweens.get(t);return!!n&&n.hasFinished()}pauseTween(t){const n=this._tweens.get(t);!n||!n.isPlaying()||n.hasFinished()||(this._removeActiveTween(n),n.pause())}resumeTween(t){const n=this._tweens.get(t);!n||n.isPlaying()||n.hasFinished()||(this._addActiveTween(n),n.resume())}stopTween(t,n){const a=this._tweens.get(t);!a||a.hasFinished()||(a.isPlaying()&&this._removeActiveTween(a),a.stop(n))}removeTween(t){const n=this._tweens.get(t);!n||(n.isPlaying()&&this._removeActiveTween(n),this._tweens.delete(t))}_addActiveTween(t){this._activeTweens.push(t)}_removeActiveTween(t){const n=this._activeTweens.findIndex(a=>a===t);this._activeTweens.splice(n,1)}getProgress(t){const n=this._tweens.get(t);return n?n.getProgress():0}getValue(t){const n=this._tweens.get(t);return n?n.getValue():0}}l.TweenManager=p;const T=()=>{};class w{constructor(t,n,a,r,i){this.isPaused=!1;this.timeSource=t,this.totalDuration=n,this.easing=a,this.interpolate=r,this.elapsedTime=0,this.onFinish=i||T}step(){!this.isPlaying()||(this.elapsedTime=Math.min(this.elapsedTime+this.timeSource.getElapsedTime()/1e3,this.totalDuration),this._updateValue())}isPlaying(){return!this.isPaused&&!this.hasFinished()}hasFinished(){return this.elapsedTime===this.totalDuration}stop(t){this.elapsedTime=this.totalDuration,t&&this._updateValue()}resume(){this.isPaused=!1}pause(){this.isPaused=!0}getProgress(){return this.elapsedTime/this.totalDuration}}l.AbstractTweenInstance=w;class M extends w{constructor(t,n,a,r,i,s,u,o){super(t,n,a,r,o);this.initialValue=i,this.currentValue=i,this.targetedValue=s,this.setValue=u}_updateValue(){const t=this.easing(this.getProgress()),n=this.interpolate(this.initialValue,this.targetedValue,t);this.currentValue=n,this.setValue(n),this.hasFinished()&&this.onFinish()}getValue(){return this.currentValue}}l.SimpleTweenInstance=M;class I extends w{constructor(t,n,a,r,i,s,u,o){super(t,n,a,r,o);this.currentValues=new Array;this.initialValue=i,this.targetedValue=s,this.setValue=u}_updateValue(){const t=this.easing(this.getProgress()),n=this.initialValue.length;this.currentValues.length=n;for(let a=0;a<n;a++)this.currentValues[a]=this.interpolate(this.initialValue[a],this.targetedValue[a],t);this.setValue(this.currentValues),this.hasFinished()&&this.onFinish()}getValue(){return 0}}l.MultiTweenInstance=I,l.rgbToHsl=(e,t,n)=>{e/=255,t/=255,n/=255;let a=Math.max(e,t,n),r=a-Math.min(e,t,n),i=1-Math.abs(a+a-r-1),s=r&&(a===e?(t-n)/r:a===t?2+(n-e)/r:4+(e-t)/r);return[Math.round(60*(s<0?s+6:s)),Math.round((i?r/i:0)*100),Math.round((a+a-r)/2*100)]},l.hslToRgb=(e,t,n)=>{e=e%=360,e<0&&(e+=360),t=t/100,n=n/100;const a=t*Math.min(n,1-n),r=(i=0,s=(i+e/30)%12)=>n-a*Math.max(Math.min(s-3,9-s,1),-1);return[Math.round(r(0)*255),Math.round(r(8)*255),Math.round(r(4)*255)]},l.ease=(e,t,n,a)=>{const r=d.evtTools.tween.easingFunctions,i=r.hasOwnProperty(e)?r[e]:r.linear;return t+(n-t)*i(a)};/*!
|
2 |
+
* All equations are adapted from Thomas Fuchs'
|
3 |
+
* [Scripty2](https://github.com/madrobby/scripty2/blob/master/src/effects/transitions/penner.js).
|
4 |
+
*
|
5 |
+
* Based on Easing Equations (c) 2003 [Robert
|
6 |
+
* Penner](http://www.robertpenner.com/), all rights reserved. This work is
|
7 |
+
* [subject to terms](http://www.robertpenner.com/easing_terms_of_use.html).
|
8 |
+
*//*!
|
9 |
+
* TERMS OF USE - EASING EQUATIONS
|
10 |
+
* Open source under the BSD License.
|
11 |
+
* Easing Equations (c) 2003 Robert Penner, all rights reserved.
|
12 |
+
*//*! Shifty 3.0.3 - https://github.com/jeremyckahn/shifty */l.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 t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:e=>{const t=1.70158;return(e=e-1)*e*((t+1)*e+t)+1},easeInOutBack:e=>{let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},elastic:e=>-1*Math.pow(4,-8*e)*Math.sin((e*6-1)*(2*Math.PI)/2)+1,swingFromTo:e=>{let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},swingFrom:e=>{const t=1.70158;return e*e*((t+1)*e-t)},swingTo:e=>{const t=1.70158;return(e-=1)*e*((t+1)*e+t)+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)}})(v=f.tween||(f.tween={}))})(b=d.evtTools||(d.evtTools={}))})(gdjs||(gdjs={}));
|
13 |
+
//# sourceMappingURL=TweenManager.js.map
|
Extensions/TweenBehavior/tweenruntimebehavior.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(w){const p=new w.Logger("Tween");function O(h){return h.setScaleX&&h.setScaleY&&h.getScaleX&&h.getScaleY}function R(h){return h.setOpacity&&h.getOpacity}function S(h){return h.getZ&&h.setZ}function C(h){return h.setColor&&h.getColor}function F(h){return h.setCharacterSize&&h.getCharacterSize}const g=w.evtTools.common.lerp,m=w.evtTools.common.exponentialInterpolation;class X extends w.RuntimeBehavior{constructor(e,t,n){super(e,t,n);this._tweens=new w.evtTools.tween.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,o,i,s,r){this._tweens.addSimpleTween(e,this.owner.getRuntimeScene(),s/1e3,i,g,n,o,a=>t.setNumber(a),r?()=>this._deleteFromScene():null)}addVariableTween2(e,t,n,o,i,s){this._addVariableTween(e,t,n,o,i/1e3,s,this.owner.getRuntimeScene())}addVariableTween3(e,t,n,o,i,s){this._addVariableTween(e,t,n,o,i,s,this.owner)}_addVariableTween(e,t,n,o,i,s,r){t.getType()==="number"&&this._tweens.addSimpleTween(e,r,i,o,g,t.getValue(),n,a=>t.setNumber(a),s?()=>this._deleteFromScene():null)}addValueTween(e,t,n,o,i,s,r){this._tweens.addSimpleTween(e,this.owner,i,o,s?m:g,t,n,a=>{},r?()=>this._deleteFromScene():null)}addObjectPositionTween(e,t,n,o,i,s){this._addObjectPositionTween(e,t,n,o,i/1e3,s,this.owner.getRuntimeScene())}addObjectPositionTween2(e,t,n,o,i,s){this._addObjectPositionTween(e,t,n,o,i,s,this.owner)}_addObjectPositionTween(e,t,n,o,i,s,r){this._tweens.addMultiTween(e,r,i,o,g,[this.owner.getX(),this.owner.getY()],[t,n],([a,l])=>this.owner.setPosition(a,l),s?()=>this._deleteFromScene():null)}addObjectPositionXTween(e,t,n,o,i){this._addObjectPositionXTween(e,t,n,o/1e3,i,this.owner.getRuntimeScene())}addObjectPositionXTween2(e,t,n,o,i){this._addObjectPositionXTween(e,t,n,o,i,this.owner)}_addObjectPositionXTween(e,t,n,o,i,s){this._tweens.addSimpleTween(e,s,o,n,g,this.owner.getX(),t,r=>this.owner.setX(r),i?()=>this._deleteFromScene():null)}addObjectPositionYTween(e,t,n,o,i){this._addObjectPositionYTween(e,t,n,o/1e3,i,this.owner.getRuntimeScene())}addObjectPositionYTween2(e,t,n,o,i){this._addObjectPositionYTween(e,t,n,o,i,this.owner)}_addObjectPositionYTween(e,t,n,o,i,s){this._tweens.addSimpleTween(e,s,o,n,g,this.owner.getY(),t,r=>this.owner.setY(r),i?()=>this._deleteFromScene():null)}addObjectPositionZTween(e,t,n,o,i){this._addObjectPositionZTween(e,t,n,o/1e3,i,this.owner.getRuntimeScene())}addObjectPositionZTween2(e,t,n,o,i,s){this._addObjectPositionZTween(t,n,o,i,s,this.owner)}_addObjectPositionZTween(e,t,n,o,i,s){const{owner:r}=this;!S(r)||this._tweens.addSimpleTween(e,s,o,n,g,r.getZ(),t,a=>r.setZ(a),i?()=>this._deleteFromScene():null)}addObjectAngleTween(e,t,n,o,i){this._addObjectAngleTween(e,t,n,o/1e3,i,this.owner.getRuntimeScene())}addObjectAngleTween2(e,t,n,o,i){this._addObjectAngleTween(e,t,n,o,i,this.owner)}_addObjectAngleTween(e,t,n,o,i,s){this._tweens.addSimpleTween(e,s,o,n,g,this.owner.getAngle(),t,r=>this.owner.setAngle(r),i?()=>this._deleteFromScene():null)}addObjectRotationXTween(e,t,n,o,i,s){const{owner:r}=this;!S(r)||this._tweens.addSimpleTween(t,this.owner,i,o,g,r.getRotationX(),n,a=>r.setRotationX(a),s?()=>this._deleteFromScene():null)}addObjectRotationYTween(e,t,n,o,i,s){const{owner:r}=this;!S(r)||this._tweens.addSimpleTween(t,this.owner,i,o,g,r.getRotationY(),n,a=>r.setRotationY(a),s?()=>this._deleteFromScene():null)}addObjectScaleTween(e,t,n,o,i,s,r){this._addObjectScaleTween(e,t,n,o,i/1e3,s,r,this.owner.getRuntimeScene(),g)}addObjectScaleTween2(e,t,n,o,i,s,r){this._addObjectScaleTween(e,t,n,o,i,s,r,this.owner,m)}_addObjectScaleTween(e,t,n,o,i,s,r,a,l){const d=this.owner;if(!O(d))return;t<0&&(t=0),n<0&&(n=0);const c=r?([b,T])=>{const f=d.getCenterXInScene(),u=d.getCenterYInScene();d.setScaleX(b),d.setScaleY(T),d.setCenterPositionInScene(f,u)}:([b,T])=>{d.setScaleX(b),d.setScaleY(T)};this._tweens.addMultiTween(e,a,i,o,l,[d.getScaleX(),d.getScaleY()],[t,n],c,s?()=>this._deleteFromScene():null)}addObjectScaleTween3(e,t,n,o,i,s){this._addObjectScaleXTween(e,t,n,o,i,s,this.owner,m);const r=this.owner;if(!O(r))return;const a=S(r)?r:null,l=s?d=>{const c=r.getCenterXInScene(),b=r.getCenterYInScene(),T=a?a.getCenterZInScene():0;r.setScale(d),r.setCenterXInScene(c),r.setCenterYInScene(b),a&&a.setCenterZInScene(T)}:d=>r.setScale(d);this._tweens.addSimpleTween(e,this.owner,o,n,m,r.getScale(),t,l,i?()=>this._deleteFromScene():null)}addObjectScaleXTween(e,t,n,o,i,s){this._addObjectScaleXTween(e,t,n,o/1e3,i,s,this.owner.getRuntimeScene(),g)}addObjectScaleXTween2(e,t,n,o,i,s){this._addObjectScaleXTween(e,t,n,o,i,s,this.owner,m)}_addObjectScaleXTween(e,t,n,o,i,s,r,a){const l=this.owner;if(!O(l))return;const d=s?c=>{const b=l.getCenterXInScene();l.setScaleX(c),l.setCenterXInScene(b)}:c=>l.setScaleX(c);this._tweens.addSimpleTween(e,r,o,n,a,l.getScaleX(),t,d,i?()=>this._deleteFromScene():null)}addObjectScaleYTween(e,t,n,o,i,s){this._addObjectScaleYTween(e,t,n,o/1e3,i,s,this.owner.getRuntimeScene(),g)}addObjectScaleYTween2(e,t,n,o,i,s){this._addObjectScaleYTween(e,t,n,o,i,s,this.owner,m)}_addObjectScaleYTween(e,t,n,o,i,s,r,a){const l=this.owner;if(!O(l))return;const d=s?c=>{const b=l.getCenterYInScene();l.setScaleY(c),l.setCenterYInScene(b)}:c=>l.setScaleY(c);this._tweens.addSimpleTween(e,r,o,n,a,l.getScaleY(),t,d,i?()=>this._deleteFromScene():null)}addObjectOpacityTween(e,t,n,o,i){this._addObjectOpacityTween(e,t,n,o/1e3,i,this.owner.getRuntimeScene())}addObjectOpacityTween2(e,t,n,o,i){this._addObjectOpacityTween(e,t,n,o,i,this.owner)}_addObjectOpacityTween(e,t,n,o,i,s){const r=this.owner;!R(r)||this._tweens.addSimpleTween(e,s,o,n,g,r.getOpacity(),t,a=>r.setOpacity(a),i?()=>this._deleteFromScene():null)}addNumberEffectPropertyTween(e,t,n,o,i,s,r,a){const l=this.owner.getRendererEffects()[o];l||p.error(`The object "${this.owner.name}" doesn't have any effect called "${o}"`),this._tweens.addSimpleTween(t,this.owner,r,s,g,l?l.getDoubleParameter(i):0,n,d=>{l&&l.updateDoubleParameter(i,d)},a?()=>this._deleteFromScene():null)}addColorEffectPropertyTween(e,t,n,o,i,s,r,a){const l=this.owner.getRendererEffects()[o];l||p.error(`The object "${this.owner.name}" doesn't have any effect called "${o}"`);const d=w.hexNumberToRGB(l?l.getColorParameter(i):0),c=w.rgbOrHexToRGBColor(n);this._tweens.addMultiTween(t,this.owner,r,s,g,w.evtTools.tween.rgbToHsl(d.r,d.g,d.b),w.evtTools.tween.rgbToHsl(c[0],c[1],c[2]),([b,T,f])=>{if(l){const u=w.evtTools.tween.hslToRgb(b,T,f);l.updateColorParameter(i,w.rgbToHexNumber(u[0],u[1],u[2]))}},a?()=>this._deleteFromScene():null)}addObjectColorTween(e,t,n,o,i,s){this._addObjectColorTween(e,t,n,o/1e3,i,s,this.owner.getRuntimeScene())}addObjectColorTween2(e,t,n,o,i,s=!0){this._addObjectColorTween(e,t,n,o,i,s,this.owner)}_addObjectColorTween(e,t,n,o,i,s,r){const a=this.owner;if(!C(a))return;const l=w.rgbOrHexToRGBColor(a.getColor()),d=w.rgbOrHexToRGBColor(t);let c,b,T;s?(c=w.evtTools.tween.rgbToHsl(l[0],l[1],l[2]),b=w.evtTools.tween.rgbToHsl(d[0],d[1],d[2]),T=([f,u,j])=>{const _=w.evtTools.tween.hslToRgb(f,u,j);a.setColor(Math.floor(_[0])+";"+Math.floor(_[1])+";"+Math.floor(_[2]))}):(c=l,b=d,T=([f,u,j])=>{a.setColor(Math.floor(f)+";"+Math.floor(u)+";"+Math.floor(j))}),this._tweens.addMultiTween(e,r,o,n,g,c,b,T,i?()=>this._deleteFromScene():null)}addObjectColorHSLTween(e,t,n,o,i,s,r,a){this._addObjectColorHSLTween(e,t,n,o,i,s,r/1e3,a,this.owner.getRuntimeScene())}addObjectColorHSLTween2(e,t,n,o,i,s,r,a){this._addObjectColorHSLTween(e,t,n,o,i,s,r,a,this.owner)}_addObjectColorHSLTween(e,t,n,o,i,s,r,a,l){if(!C(this.owner))return;const d=this.owner,c=d.getColor().split(";");if(c.length<3)return;const b=w.evtTools.tween.rgbToHsl(parseFloat(c[0]),parseFloat(c[1]),parseFloat(c[2])),T=n?t:b[0],f=o===-1?b[1]:Math.min(Math.max(o,0),100),u=i===-1?b[2]:Math.min(Math.max(i,0),100);this._tweens.addMultiTween(e,l,r,s,g,b,[T,f,u],([j,_,P])=>{const v=w.evtTools.tween.hslToRgb(j,_,P);d.setColor(Math.floor(v[0])+";"+Math.floor(v[1])+";"+Math.floor(v[2]))},a?()=>this._deleteFromScene():null)}addTextObjectCharacterSizeTween(e,t,n,o,i){this._addTextObjectCharacterSizeTween(e,t,n,o/1e3,i,this.owner.getRuntimeScene(),g)}addTextObjectCharacterSizeTween2(e,t,n,o,i){this._addTextObjectCharacterSizeTween(e,t,n,o,i,this.owner,m)}_addTextObjectCharacterSizeTween(e,t,n,o,i,s,r){const a=this.owner;!F(a)||this._tweens.addSimpleTween(e,s,o,n,r,a.getCharacterSize(),t,l=>a.setCharacterSize(l),i?()=>this._deleteFromScene():null)}addObjectWidthTween(e,t,n,o,i){this._addObjectWidthTween(e,t,n,o/1e3,i,this.owner.getRuntimeScene())}addObjectWidthTween2(e,t,n,o,i){this._addObjectWidthTween(e,t,n,o,i,this.owner)}_addObjectWidthTween(e,t,n,o,i,s){this._tweens.addSimpleTween(e,s,o,n,g,this.owner.getWidth(),t,r=>this.owner.setWidth(r),i?()=>this._deleteFromScene():null)}addObjectHeightTween(e,t,n,o,i){this._addObjectHeightTween(e,t,n,o/1e3,i,this.owner.getRuntimeScene())}addObjectHeightTween2(e,t,n,o,i){this._addObjectHeightTween(e,t,n,o,i,this.owner)}_addObjectHeightTween(e,t,n,o,i,s){this._tweens.addSimpleTween(e,s,o,n,g,this.owner.getHeight(),t,r=>this.owner.setHeight(r),i?()=>this._deleteFromScene():null)}addObjectDepthTween(e,t,n,o,i){this._addObjectDepthTween(e,t,n,o/1e3,i,this.owner.getRuntimeScene())}addObjectDepthTween2(e,t,n,o,i,s){this._addObjectDepthTween(t,n,o,i,s,this.owner)}_addObjectDepthTween(e,t,n,o,i,s){const{owner:r}=this;!S(r)||this._tweens.addSimpleTween(e,s,o,n,g,r.getDepth(),t,a=>r.setDepth(a),i?()=>this._deleteFromScene():null)}isPlaying(e){return this._tweens.isPlaying(e)}exists(e){return this._tweens.exists(e)}hasFinished(e){return this._tweens.hasFinished(e)}pauseTween(e){this._isActive&&this._tweens.pauseTween(e)}stopTween(e,t){this._isActive&&this._tweens.stopTween(e,t)}resumeTween(e){this._isActive&&this._tweens.resumeTween(e)}removeTween(e){this._tweens.removeTween(e)}getProgress(e){return this._tweens.getProgress(e)}getValue(e){return this._tweens.getValue(e)}onDeActivate(){this._isActive=!1}onActivate(){this._isActive=!0}}w.TweenRuntimeBehavior=X,w.registerBehavior("Tween::TweenBehavior",w.TweenRuntimeBehavior)})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=tweenruntimebehavior.js.map
|
FlammeBonus.png
ADDED
![]() |
FlashyRock.glb
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:92f95539bbc335ba09ab12adfc6deadbd6d4584c96b08d0c4d11071e1a0a4261
|
3 |
+
size 5492
|
GreyBlock.glb
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:87e7b442ee5b5cd84a974881db35c86f3487c50af24139279d5dda760f5fec29
|
3 |
+
size 19156
|
JoueurSelectionMask.png
ADDED
![]() |
LICENSE.GDevelop.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
Part of this app is using the GDevelop game engine, which is licensed under the MIT license.
|
2 |
+
Find more information on https://gdevelop.io/.
|
Model3DManager.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
var gdjs;(function(d){const a=new d.Logger("Model3DManager"),i=["model3D"];class l{constructor(r){this._loadedThreeModels=new d.ResourceCache;this._downloadedArrayBuffers=new d.ResourceCache;this._loader=null;this._dracoLoader=null;if(this._resourceLoader=r,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 e=new THREE.Group;e.add(new THREE.Mesh(new THREE.BoxGeometry(1,1,1),new THREE.MeshBasicMaterial({color:"#ff00ff"}))),this._invalidModel={scene:e,animations:[],cameras:[],scenes:[],asset:{},userData:{},parser:null}}}getResourceKinds(){return i}async processResource(r){const e=this._resourceLoader.getResource(r);if(!e){a.warn('Unable to find texture for resource "'+r+'".');return}const t=this._loader;if(!t)return;const s=this._downloadedArrayBuffers.get(e);if(!!s){this._downloadedArrayBuffers.delete(e);try{const o=await t.parseAsync(s,"");this._loadedThreeModels.set(e,o)}catch(o){a.error("Can't fetch the 3D model file "+e.file+", error: "+o)}}}async loadResource(r){const e=this._resourceLoader.getResource(r);if(!e){a.warn('Unable to find texture for resource "'+r+'".');return}if(!this._loader||this._loadedThreeModels.get(e))return;const s=this._resourceLoader.getFullUrl(e.file);try{const o=await fetch(s,{credentials:this._resourceLoader.checkIfCredentialsRequired(s)?"include":"omit"});if(!o.ok)throw new Error("Network response was not ok");const n=await o.arrayBuffer();this._downloadedArrayBuffers.set(e,n)}catch(o){a.error("Can't fetch the 3D model file "+e.file+", error: "+o)}}getModel(r){return this._loadedThreeModels.getFromName(r)||this._invalidModel}dispose(){this._loadedThreeModels.clear(),this._downloadedArrayBuffers.clear(),this._loader=null,this._dracoLoader=null,this._invalidModel&&(this._invalidModel.cameras=[],this._invalidModel.animations=[],this._invalidModel.scenes=[],this._invalidModel.userData={},this._invalidModel.asset={},this._invalidModel.scene.clear())}}d.Model3DManager=l})(gdjs||(gdjs={}));
|
2 |
+
//# sourceMappingURL=Model3DManager.js.map
|
New image.png
ADDED
![]() |
NewObject.png
ADDED
![]() |
NewSprite.png
ADDED
![]() |
Orange.png
ADDED
![]() |
OrangeBunny.glb
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5190b37364448c7909c84a2ac1d43f6eca5e929d5df2e9d8d5b7aadb247793b8
|
3 |
+
size 1108668
|
OrangeBunnyIcon.png
ADDED
![]() |
Pink.png
ADDED
![]() |
PinkBunny.glb
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:22287ec25bd5edf7818fa35d56b11acc6f992a3ae7be64b58571dfc1bc2d9b13
|
3 |
+
size 1108668
|
PinkBunnyIcon.png
ADDED
![]() |
Purple.png
ADDED
![]() |
PurpleBunny.glb
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4ba129bd4c18d171c5c276076beff41c56dfe0fd1e118c89f7aed96325d7007e
|
3 |
+
size 1108672
|