idk
This commit is contained in:
1 parent
23795bd826
commit
1cf1d1988e
198 files changed
+28801
No files matched your search
@@ -0,0 +1,2 @@
|
||||
(function(){var yJ=function(){var Jt=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename!="undefined"&&(Jt=Jt||__filename),function(St){St=St||{};var t;t||(t=typeof St!="undefined"?St:{});var ae;t.ready=new Promise(function(e){ae=e});var Tt={},Ct;for(Ct in t)t.hasOwnProperty(Ct)&&(Tt[Ct]=t[Ct]);var zt=!1,xt=!1,Yt=!1,le=!1;zt=typeof window=="object",xt=typeof importScripts=="function",Yt=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",le=!zt&&!Yt&&!xt;var ft="",Nt,Lt,$t,Qt;Yt?(ft=xt?require("path").dirname(ft)+"/":__dirname+"/",Nt=function(e,n){return $t||($t=require("fs")),Qt||(Qt=require("path")),e=Qt.normalize(e),$t.readFileSync(e,n?null:"utf8")},Lt=function(e){return e=Nt(e,!0),e.buffer||(e=new Uint8Array(e)),Kt(e.buffer),e},1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),process.on("uncaughtException",function(e){throw e}),process.on("unhandledRejection",Ot),t.inspect=function(){return"[Emscripten Module object]"}):le?(typeof read!="undefined"&&(Nt=function(e){return read(e)}),Lt=function(e){return typeof readbuffer=="function"?new Uint8Array(readbuffer(e)):(e=read(e,"binary"),Kt(typeof e=="object"),e)},typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)):(zt||xt)&&(xt?ft=self.location.href:document.currentScript&&(ft=document.currentScript.src),Jt&&(ft=Jt),ft=ft.indexOf("blob:")!==0?ft.substr(0,ft.lastIndexOf("/")+1):"",Nt=function(e){var n=new XMLHttpRequest;return n.open("GET",e,!1),n.send(null),n.responseText},xt&&(Lt=function(e){var n=new XMLHttpRequest;return n.open("GET",e,!1),n.responseType="arraybuffer",n.send(null),new Uint8Array(n.response)}));var ye=t.print||console.log.bind(console),Mt=t.printErr||console.warn.bind(console);for(Ct in Tt)Tt.hasOwnProperty(Ct)&&(t[Ct]=Tt[Ct]);Tt=null;var It;t.wasmBinary&&(It=t.wasmBinary);var me;t.noExitRuntime&&(me=t.noExitRuntime),typeof WebAssembly!="object"&&Mt("no native wasm support detected");var qt,mJ=new WebAssembly.Table({initial:210,maximum:230,element:"anyfunc"}),fe=!1;function Kt(e,n){e||Ot("Assertion failed: "+n)}var de=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function be(e,n,o){var _=n+o;for(o=n;e[o]&&!(o>=_);)++o;if(16<o-n&&e.subarray&&de)return de.decode(e.subarray(n,o));for(_="";n<o;){var U=e[n++];if(U&128){var st=e[n++]&63;if((U&224)==192)_+=String.fromCharCode((U&31)<<6|st);else{var Ut=e[n++]&63;U=(U&240)==224?(U&15)<<12|st<<6|Ut:(U&7)<<18|st<<12|Ut<<6|e[n++]&63,65536>U?_+=String.fromCharCode(U):(U-=65536,_+=String.fromCharCode(55296|U>>10,56320|U&1023))}}else _+=String.fromCharCode(U)}return _}function te(e){return e?be(wt,e,void 0):""}var Vt,wt,Wt,ge;function he(e){Vt=e,t.HEAP8=new Int8Array(e),t.HEAP16=new Int16Array(e),t.HEAP32=Wt=new Int32Array(e),t.HEAPU8=wt=new Uint8Array(e),t.HEAPU16=new Uint16Array(e),t.HEAPU32=new Uint32Array(e),t.HEAPF32=new Float32Array(e),t.HEAPF64=ge=new Float64Array(e)}var Ue=t.INITIAL_MEMORY||16777216;(qt=t.wasmMemory?t.wasmMemory:new WebAssembly.Memory({initial:Ue/65536,maximum:32768}))&&(Vt=qt.buffer),Ue=Vt.byteLength,he(Vt),Wt[6512]=5269088;function Ht(e){for(;0<e.length;){var n=e.shift();if(typeof n=="function")n(t);else{var o=n.ev;typeof o=="number"?n.Au===void 0?t.dynCall_v(o):t.dynCall_vi(o,n.Au):o(n.Au===void 0?null:n.Au)}}}var Je=[],De=[],ve=[],je=[],Ge=!1;function fJ(){var e=t.preRun.shift();Je.unshift(e)}var Rt=0,ee=null,kt=null;t.preloadedImages={},t.preloadedAudios={};function Ot(e){throw t.onAbort&&t.onAbort(e),e+="",ye(e),Mt(e),fe=!0,new WebAssembly.RuntimeError("abort("+e+"). Build with -s ASSERTIONS=1 for more info.")}function ne(e){var n=Ft;return String.prototype.startsWith?n.startsWith(e):n.indexOf(e)===0}function Ae(){return ne("data:application/octet-stream;base64,")}var Ft="Box2D_v2.3.1_min.wasm.wasm";if(!Ae()){var Se=Ft;Ft=t.locateFile?t.locateFile(Se,ft):ft+Se}function Ce(){try{if(It)return new Uint8Array(It);if(Lt)return Lt(Ft);throw"both async and sync fetching of the wasm failed"}catch(e){Ot(e)}}function dJ(){return It||!zt&&!xt||typeof fetch!="function"||ne("file://")?new Promise(function(e){e(Ce())}):fetch(Ft,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+Ft+"'";return e.arrayBuffer()}).catch(function(){return Ce()})}var Be={1156:function(e,n){if(e=t.getCache(t.JSDestructionListener)[e],!e.hasOwnProperty("SayGoodbyeJoint"))throw"a JSImplementation must implement all functions, you forgot JSDestructionListener::SayGoodbyeJoint.";e.SayGoodbyeJoint(n)},1414:function(e,n){if(e=t.getCache(t.JSDestructionListener)[e],!e.hasOwnProperty("SayGoodbyeFixture"))throw"a JSImplementation must implement all functions, you forgot JSDestructionListener::SayGoodbyeFixture.";e.SayGoodbyeFixture(n)},1840:function(e,n){if(e=t.getCache(t.JSQueryCallback)[e],!e.hasOwnProperty("ReLine truncated
|
||||
//# sourceMappingURL=Box2D_v2.3.1_min.wasm.js.map
|
||||
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
var gdjs;(function(l){class m{constructor(e,t){this.frameTime=0;this.stepped=!1;this.timeScale=1;this._nextJointId=1;this.joints={};this._registeredBehaviors=new Set,this.gravityX=t.gravityX,this.gravityY=t.gravityY,this.scaleX=t.scaleX===0?100:t.scaleX,this.scaleY=t.scaleY===0?100:t.scaleY,this.invScaleX=1/this.scaleX,this.invScaleY=1/this.scaleY,this.timeStep=1/60,this.world=new Box2D.b2World(new Box2D.b2Vec2(this.gravityX,this.gravityY)),this.world.SetAutoClearForces(!1),this.staticBody=this.world.CreateBody(new Box2D.b2BodyDef),this.contactListener=new Box2D.JSContactListener,this.contactListener.BeginContact=function(i){const o=Box2D.wrapPointer(i,Box2D.b2Contact);if(o.GetFixtureA().GetBody()===null||o.GetFixtureB().GetBody()===null)return;const s=o.GetFixtureA().GetBody().gdjsAssociatedBehavior,n=o.GetFixtureB().GetBody().gdjsAssociatedBehavior;!s||!n||(s.onContactBegin(n),n.onContactBegin(s))},this.contactListener.EndContact=function(i){const o=Box2D.wrapPointer(i,Box2D.b2Contact);if(o.GetFixtureA().GetBody()===null||o.GetFixtureB().GetBody()===null)return;const s=o.GetFixtureA().GetBody().gdjsAssociatedBehavior,n=o.GetFixtureB().GetBody().gdjsAssociatedBehavior;!s||!n||(s.onContactEnd(n),n.onContactEnd(s))},this.contactListener.PreSolve=function(){},this.contactListener.PostSolve=function(){},this.world.SetContactListener(this.contactListener)}static getSharedData(e,t){if(!e.physics2SharedData){const i=e.getInitialSharedDataForBehavior(t);e.physics2SharedData=new l.Physics2SharedData(e,i)}return e.physics2SharedData}addToBehaviorsList(e){this._registeredBehaviors.add(e)}removeFromBehaviorsList(e){this._registeredBehaviors.delete(e)}resetStartedAndEndedCollisions(){for(const e of this._registeredBehaviors)e.contactsStartedThisFrame.length=0,e.contactsEndedThisFrame.length=0}updateBodiesFromObjects(){for(const e of this._registeredBehaviors)e.updateBodyFromObject()}step(e){this.frameTime+=e;let t=Math.max(0,Math.round(this.frameTime/this.timeStep));this.frameTime-=t*this.timeStep,t>5&&(t=5);for(let i=0;i<t;i++)this.world.Step(this.timeStep*this.timeScale,8,10);this.world.ClearForces(),this.stepped=!0}clearBodyJoints(e){for(const t in this.joints)this.joints.hasOwnProperty(t)&&(this.joints[t].GetBodyA()===e||this.joints[t].GetBodyB()===e)&&this.removeJoint(t)}addJoint(e){return this.joints[this._nextJointId.toString(10)]=e,this._nextJointId++}getJoint(e){return e=e.toString(10),this.joints.hasOwnProperty(e)?this.joints[e]:null}getJointId(e){for(const t in this.joints)if(this.joints.hasOwnProperty(t)&&this.joints[t]===e)return parseInt(t,10);return 0}removeJoint(e){if(e=e.toString(10),this.joints.hasOwnProperty(e)){const t=this.joints[e];if(t.GetType()===Box2D.e_revoluteJoint||t.GetType()===Box2D.e_prismaticJoint)for(const i in this.joints)this.joints.hasOwnProperty(i)&&this.joints[i].GetType()===Box2D.e_gearJoint&&(Box2D.getPointer(this.joints[i].GetJoint1())===Box2D.getPointer(t)||Box2D.getPointer(this.joints[i].GetJoint2())===Box2D.getPointer(t))&&this.removeJoint(parseInt(i,10));this.world.DestroyJoint(t),delete this.joints[e]}}}l.Physics2SharedData=m,l.registerRuntimeSceneUnloadedCallback(function(J){J.physics2SharedData&&J.physics2SharedData.world&&Box2D.destroy(J.physics2SharedData.world)});const B=class extends l.RuntimeBehavior{constructor(e,t,i){super(e,t,i);this.shapeScale=1;this._body=null;this._objectOldX=0;this._objectOldY=0;this._objectOldAngle=0;this._objectOldWidth=0;this._objectOldHeight=0;this._verticesBuffer=0;this.bodyType=t.bodyType,this.bullet=t.bullet,this.fixedRotation=t.fixedRotation,this.canSleep=t.canSleep,this.shape=t.shape,this.shapeDimensionA=t.shapeDimensionA,this.shapeDimensionB=t.shapeDimensionB,this.shapeOffsetX=t.shapeOffsetX,this.shapeOffsetY=t.shapeOffsetY,this.polygonOrigin=t.polygonOrigin,this.polygon=this.shape==="Polygon"?B.getPolygon(t.vertices):null,this.density=t.density,this.friction=t.friction,this.restitution=t.restitution,this.linearDamping=t.linearDamping,this.angularDamping=t.angularDamping,this.gravityScale=t.gravityScale,this.layers=t.layers,this.masks=t.masks,this.contactsStartedThisFrame=[],this.contactsEndedThisFrame=[],this.currentContacts=[],this.currentContacts.length=0,this.destroyedDuringFrameLogic=!1,this._sharedData=m.getSharedData(e.getScene(),t.name),this._tempb2Vec2=new Box2D.b2Vec2,this._tempb2Vec2Sec=new Box2D.b2Vec2,this._sharedData.addToBehaviorsList(this)}b2Vec2(e,t){return this._tempb2Vec2.set_x(e),this._tempb2Vec2.set_y(t),this._tempb2Vec2}b2Vec2Sec(e,t){return this._tempb2Vec2Sec.set_x(e),this._tempb2Vec2Sec.set_y(t),this._tempb2Vec2Sec}updateFromBehaviorData(e,t){return e.bullet!==t.bullet&&this.setBullet(t.bullet),e.fixedRotation!==t.fixedRotation&&this.setFixedRotation(t.fixedRotation),e.canSleep!==t.canSleep&&this.setSleepingAllowed(t.canSleep),e.shapeDimensionA!==t.shapeDimensionA&&(this.shapeDimensionA=t.shapeDimensionA,this.recreateShape()),e.shapeDimensionB!==t.shapeDimensionB&&(this.shapeDimensionB=t.shapeDimensionB,thisLine truncated
|
||||
//# sourceMappingURL=physics2runtimebehavior.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
var gdjs;(function(e){let c;(function(i){i.objectsCollide=function(o,s,n,t){return e.evtTools.object.twoListsTest(e.Physics2RuntimeBehavior.areObjectsColliding,o,n,t,s)},i.haveObjectsStartedColliding=function(o,s,n,t){return e.evtTools.object.twoListsTest(e.Physics2RuntimeBehavior.hasCollisionStartedBetween,o,n,t,s)},i.haveObjectsStoppedColliding=function(o,s,n,t){return e.evtTools.object.twoListsTest(e.Physics2RuntimeBehavior.hasCollisionStoppedBetween,o,n,t,s)},i.setTimeScale=function(o,s,n){const t=e.staticArray(e.physics2.setTimeScale);o.values(t);for(let a=0,b=t.length;a<b;a++){const l=t[a];for(let r=0,j=l.length;r<j;r++){e.Physics2RuntimeBehavior.setTimeScaleFromObject(l[r],s,n);return}}}})(c=e.physics2||(e.physics2={}))})(gdjs||(gdjs={}));
|
||||
//# sourceMappingURL=physics2tools.js.map
|
||||
Reference in new issue
Block a user