Compare commits
No commits in common. "develop" and "v3.8.2-1" have entirely different histories.
|
|
@ -84,8 +84,7 @@ if(USE_SE_V8)
|
||||||
IMPORTED_LOCATION ${platform_spec_path}/v8/libinspector.a
|
IMPORTED_LOCATION ${platform_spec_path}/v8/libinspector.a
|
||||||
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/v8
|
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/v8
|
||||||
)
|
)
|
||||||
set(se_libs_name v8_monolith)
|
set(se_libs_name v8_monolith v8_inspector)
|
||||||
set(se_libs_include ${platform_spec_path}/include/v8)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_WEBSOCKET_SERVER)
|
if(USE_WEBSOCKET_SERVER)
|
||||||
|
|
@ -161,9 +160,7 @@ endif()
|
||||||
|
|
||||||
set(ZLIB z)
|
set(ZLIB z)
|
||||||
if(NOT USE_MODULES)
|
if(NOT USE_MODULES)
|
||||||
list(APPEND CC_EXTERNAL_LIBS ${ZLIB}
|
list(APPEND CC_EXTERNAL_LIBS ${ZLIB} ${se_libs_name})
|
||||||
${se_libs_name}
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,6 @@ declare namespace B2 {
|
||||||
GetFilterData(): Filter;
|
GetFilterData(): Filter;
|
||||||
Refilter(): void;
|
Refilter(): void;
|
||||||
GetBody(): Body;
|
GetBody(): Body;
|
||||||
GetNext(): Fixture;
|
|
||||||
TestPoint(p: Vec2): boolean;
|
TestPoint(p: Vec2): boolean;
|
||||||
RayCast(output: RayCastOutput, input: RayCastInput, childIndex: number): boolean;
|
RayCast(output: RayCastOutput, input: RayCastInput, childIndex: number): boolean;
|
||||||
GetMassData(massData: MassData): void;
|
GetMassData(massData: MassData): void;
|
||||||
|
|
@ -273,8 +272,6 @@ declare namespace B2 {
|
||||||
IsEnabled(): boolean;
|
IsEnabled(): boolean;
|
||||||
SetFixedRotation(flag: boolean): void;
|
SetFixedRotation(flag: boolean): void;
|
||||||
IsFixedRotation(): boolean;
|
IsFixedRotation(): boolean;
|
||||||
GetFixtureList(): Fixture;
|
|
||||||
GetJointList(): number;
|
|
||||||
GetWorld(): World;
|
GetWorld(): World;
|
||||||
Dump(): void;
|
Dump(): void;
|
||||||
}
|
}
|
||||||
|
|
@ -575,10 +572,4 @@ declare namespace B2 {
|
||||||
function ContactImpulseGetNormalImpulse(contactImpulsePtr: number, index: number): number;
|
function ContactImpulseGetNormalImpulse(contactImpulsePtr: number, index: number): number;
|
||||||
function ContactImpulseGetTangentImpulse(contactImpulsePtr: number, index: number): number;
|
function ContactImpulseGetTangentImpulse(contactImpulsePtr: number, index: number): number;
|
||||||
function ContactImpulseGetCount(contactImpulsePtr: number): number;
|
function ContactImpulseGetCount(contactImpulsePtr: number): number;
|
||||||
|
|
||||||
//JointEdge
|
|
||||||
function JointEdgeGetOther(jointEdgePtr: number): number;
|
|
||||||
function JointEdgeGetJoint(jointEdgePtr: number): number;
|
|
||||||
function JointEdgeGetPrev(jointEdgePtr: number): number;
|
|
||||||
function JointEdgeGetNext(jointEdgePtr: number): number;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
|
@ -1,47 +1,116 @@
|
||||||
|
var Module = (function() {
|
||||||
var Module = (() => {
|
|
||||||
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
|
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
function(Module) {
|
function(Module) {
|
||||||
Module = Module || {};
|
Module = Module || {};
|
||||||
|
|
||||||
|
var c;c||(c=typeof Module !== 'undefined' ? Module : {});
|
||||||
var c;c||(c=typeof Module !== 'undefined' ? Module : {});var r,t;c.ready=new Promise(function(b,d){r=b;t=d});
|
c.compileGLSLZeroCopy=function(a,b,d,e){d=!!d;switch(b){case "vertex":var g=0;break;case "fragment":g=4;break;case "compute":g=5;break;default:throw Error("shader_stage must be 'vertex', 'fragment', or 'compute'.");}switch(e||"1.0"){case "1.0":var f=65536;break;case "1.1":f=65792;break;case "1.2":f=66048;break;case "1.3":f=66304;break;case "1.4":f=66560;break;case "1.5":f=66816;break;default:throw Error("spirv_version must be '1.0' ~ '1.5'.");}e=c._malloc(4);b=c._malloc(4);var h=aa([a,g,d,f,e,b]);
|
||||||
c.compileGLSLZeroCopy=function(b,d,e,f){e=!!e;switch(d){case "vertex":var h=0;break;case "fragment":h=4;break;case "compute":h=5;break;default:throw Error("shader_stage must be 'vertex', 'fragment', or 'compute'.");}switch(f||"1.0"){case "1.0":var g=65536;break;case "1.1":g=65792;break;case "1.2":g=66048;break;case "1.3":g=66304;break;case "1.4":g=66560;break;case "1.5":g=66816;break;default:throw Error("spirv_version must be '1.0' ~ '1.5'.");}f=c._malloc(4);d=c._malloc(4);var m=aa([b,h,e,g,f,d]);
|
d=k(e);a=k(b);c._free(e);c._free(b);if(0===h)throw Error("GLSL compilation failed");e={};d/=4;e.data=c.HEAPU32.subarray(d,d+a);e.free=function(){c._destroy_output_buffer(h)};return e};c.compileGLSL=function(a,b,d,e){a=c.compileGLSLZeroCopy(a,b,d,e);b=a.data.slice();a.free();return b};var p={},q;for(q in c)c.hasOwnProperty(q)&&(p[q]=c[q]);var r="./this.program",t=!1,u=!1;t="object"===typeof window;u="function"===typeof importScripts;var v="",w;
|
||||||
e=u(f);b=u(d);c._free(f);c._free(d);if(0===m)throw Error("GLSL compilation failed");f={};e/=4;f.data=c.HEAPU32.subarray(e,e+b);f.free=function(){c._destroy_output_buffer(m)};return f};c.compileGLSL=function(b,d,e,f){b=c.compileGLSLZeroCopy(b,d,e,f);d=b.data.slice();b.free();return d};var v=Object.assign({},c),x="./this.program",y="object"==typeof window,z="function"==typeof importScripts,B="",C;
|
if(t||u)u?v=self.location.href:document.currentScript&&(v=document.currentScript.src),_scriptDir&&(v=_scriptDir),0!==v.indexOf("blob:")?v=v.substr(0,v.lastIndexOf("/")+1):v="",u&&(w=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});var x=c.print||console.log.bind(console),y=c.printErr||console.warn.bind(console);for(q in p)p.hasOwnProperty(q)&&(c[q]=p[q]);p=null;c.thisProgram&&(r=c.thisProgram);var A;
|
||||||
if(y||z)z?B=self.location.href:"undefined"!=typeof document&&document.currentScript&&(B=document.currentScript.src),_scriptDir&&(B=_scriptDir),0!==B.indexOf("blob:")?B=B.substr(0,B.replace(/[?#].*/,"").lastIndexOf("/")+1):B="",z&&(C=b=>{var d=new XMLHttpRequest;d.open("GET",b,!1);d.responseType="arraybuffer";d.send(null);return new Uint8Array(d.response)});var ba=c.print||console.log.bind(console),D=c.printErr||console.warn.bind(console);Object.assign(c,v);v=null;c.thisProgram&&(x=c.thisProgram);
|
c.wasmBinary&&(A=c.wasmBinary);"object"!==typeof WebAssembly&&y("no native wasm support detected");function k(a){var b="i32";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return B[a>>0];case "i8":return B[a>>0];case "i16":return ba[a>>1];case "i32":return C[a>>2];case "i64":return C[a>>2];case "float":return ca[a>>2];case "double":return da[a>>3];default:D("invalid type for getValue: "+b)}return null}var E,ea=new WebAssembly.Table({initial:859,maximum:859,element:"anyfunc"}),fa=!1;
|
||||||
var E;c.wasmBinary&&(E=c.wasmBinary);var noExitRuntime=c.noExitRuntime||!0;"object"!=typeof WebAssembly&&F("no native wasm support detected");var G,H=!1,I="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;
|
function ha(){var a=c._convert_glsl_to_spirv;a||D("Assertion failed: Cannot call unknown function convert_glsl_to_spirv, make sure it is exported");return a}
|
||||||
function J(b,d){for(var e=d+NaN,f=d;b[f]&&!(f>=e);)++f;if(16<f-d&&b.buffer&&I)return I.decode(b.subarray(d,f));for(e="";d<f;){var h=b[d++];if(h&128){var g=b[d++]&63;if(192==(h&224))e+=String.fromCharCode((h&31)<<6|g);else{var m=b[d++]&63;h=224==(h&240)?(h&15)<<12|g<<6|m:(h&7)<<18|g<<12|m<<6|b[d++]&63;65536>h?e+=String.fromCharCode(h):(h-=65536,e+=String.fromCharCode(55296|h>>10,56320|h&1023))}}else e+=String.fromCharCode(h)}return e}
|
function aa(a){var b="string number boolean number number number".split(" "),d={string:function(a){var b=0;if(null!==a&&void 0!==a&&0!==a){var d=(a.length<<2)+1;b=G(d);ia(a,H,b,d)}return b},array:function(a){var b=G(a.length);B.set(a,b);return b}},e=ha(),g=[],f=0;if(a)for(var h=0;h<a.length;h++){var n=d[b[h]];n?(0===f&&(f=ja()),g[h]=n(a[h])):g[h]=a[h]}a=e.apply(null,g);0!==f&&ka(f);return a}var la="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;
|
||||||
function K(b,d,e,f){if(0<f){f=e+f-1;for(var h=0;h<b.length;++h){var g=b.charCodeAt(h);if(55296<=g&&57343>=g){var m=b.charCodeAt(++h);g=65536+((g&1023)<<10)|m&1023}if(127>=g){if(e>=f)break;d[e++]=g}else{if(2047>=g){if(e+1>=f)break;d[e++]=192|g>>6}else{if(65535>=g){if(e+2>=f)break;d[e++]=224|g>>12}else{if(e+3>=f)break;d[e++]=240|g>>18;d[e++]=128|g>>12&63}d[e++]=128|g>>6&63}d[e++]=128|g&63}}d[e]=0}}var L,M,N,ca,O,P,da,ea;
|
function I(a,b,d){var e=b+d;for(d=b;a[d]&&!(d>=e);)++d;if(16<d-b&&a.subarray&&la)return la.decode(a.subarray(b,d));for(e="";b<d;){var g=a[b++];if(g&128){var f=a[b++]&63;if(192==(g&224))e+=String.fromCharCode((g&31)<<6|f);else{var h=a[b++]&63;g=224==(g&240)?(g&15)<<12|f<<6|h:(g&7)<<18|f<<12|h<<6|a[b++]&63;65536>g?e+=String.fromCharCode(g):(g-=65536,e+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else e+=String.fromCharCode(g)}return e}
|
||||||
function fa(){var b=G.buffer;L=b;c.HEAP8=M=new Int8Array(b);c.HEAP16=ca=new Int16Array(b);c.HEAP32=O=new Int32Array(b);c.HEAPU8=N=new Uint8Array(b);c.HEAPU16=new Uint16Array(b);c.HEAPU32=P=new Uint32Array(b);c.HEAPF32=da=new Float32Array(b);c.HEAPF64=ea=new Float64Array(b)}var ha=[],ia=[],ja=[];function ka(){var b=c.preRun.shift();ha.unshift(b)}var Q=0,R=null,S=null;
|
function ia(a,b,d,e){if(0<e){e=d+e-1;for(var g=0;g<a.length;++g){var f=a.charCodeAt(g);if(55296<=f&&57343>=f){var h=a.charCodeAt(++g);f=65536+((f&1023)<<10)|h&1023}if(127>=f){if(d>=e)break;b[d++]=f}else{if(2047>=f){if(d+1>=e)break;b[d++]=192|f>>6}else{if(65535>=f){if(d+2>=e)break;b[d++]=224|f>>12}else{if(d+3>=e)break;b[d++]=240|f>>18;b[d++]=128|f>>12&63}b[d++]=128|f>>6&63}b[d++]=128|f&63}}b[d]=0}}"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");var J,B,H,ba,C,ca,da;
|
||||||
function F(b){if(c.onAbort)c.onAbort(b);b="Aborted("+b+")";D(b);H=!0;b=new WebAssembly.RuntimeError(b+". Build with -sASSERTIONS for more info.");t(b);throw b;}function la(){return T.startsWith("data:application/octet-stream;base64,")}var T;T="glslang.wasm";if(!la()){var ma=T;T=c.locateFile?c.locateFile(ma,B):B+ma}function na(){var b=T;try{if(b==T&&E)return new Uint8Array(E);if(C)return C(b);throw"both async and sync fetching of the wasm failed";}catch(d){F(d)}}
|
function ma(a){J=a;c.HEAP8=B=new Int8Array(a);c.HEAP16=ba=new Int16Array(a);c.HEAP32=C=new Int32Array(a);c.HEAPU8=H=new Uint8Array(a);c.HEAPU16=new Uint16Array(a);c.HEAPU32=new Uint32Array(a);c.HEAPF32=ca=new Float32Array(a);c.HEAPF64=da=new Float64Array(a)}var na=c.TOTAL_MEMORY||16777216;c.wasmMemory?E=c.wasmMemory:E=new WebAssembly.Memory({initial:na/65536});E&&(J=E.buffer);na=J.byteLength;ma(J);C[84916]=5582704;
|
||||||
function ra(){return E||!y&&!z||"function"!=typeof fetch?Promise.resolve().then(function(){return na()}):fetch(T,{credentials:"same-origin"}).then(function(b){if(!b.ok)throw"failed to load wasm binary file at '"+T+"'";return b.arrayBuffer()}).catch(function(){return na()})}function U(b){for(;0<b.length;)b.shift()(c)}
|
function K(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b();else{var d=b.J;"number"===typeof d?void 0===b.H?c.dynCall_v(d):c.dynCall_vi(d,b.H):d(void 0===b.H?null:b.H)}}}var oa=[],pa=[],qa=[],ra=[];function sa(){var a=c.preRun.shift();oa.unshift(a)}var L=0,M=null,N=null;c.preloadedImages={};c.preloadedAudios={};function D(a){if(c.onAbort)c.onAbort(a);x(a);y(a);fa=!0;throw new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");}
|
||||||
function u(b){var d="i32";d.endsWith("*")&&(d="*");switch(d){case "i1":return M[b>>0];case "i8":return M[b>>0];case "i16":return ca[b>>1];case "i32":return O[b>>2];case "i64":return O[b>>2];case "float":return da[b>>2];case "double":return ea[b>>3];case "*":return P[b>>2];default:F("invalid type for getValue: "+d)}return null}var V={};
|
function ta(){var a=O;return String.prototype.startsWith?a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}var O="glslang.wasm";if(!ta()){var ua=O;O=c.locateFile?c.locateFile(ua,v):v+ua}function wa(){try{if(A)return new Uint8Array(A);if(w)return w(O);throw"both async and sync fetching of the wasm failed";}catch(a){D(a)}}
|
||||||
function sa(){if(!W){var b={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:x||"./this.program"},d;for(d in V)void 0===V[d]?delete b[d]:b[d]=V[d];var e=[];for(d in b)e.push(d+"="+b[d]);W=e}return W}var W,ta=[null,[],[]];function X(b){return 0===b%4&&(0!==b%100||0===b%400)}var ua=[31,29,31,30,31,30,31,31,30,31,30,31],va=[31,28,31,30,31,30,31,31,30,31,30,31];
|
function xa(){return A||!t&&!u||"function"!==typeof fetch?new Promise(function(a){a(wa())}):fetch(O,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+O+"'";return a.arrayBuffer()}).catch(function(){return wa()})}pa.push({J:function(){ya()}});var za=[null,[],[]],P=0;function Aa(){P+=4;return C[P-4>>2]}var Q={},Ba={};
|
||||||
function wa(b){for(var d=0,e=0;e<b.length;++e){var f=b.charCodeAt(e);127>=f?d++:2047>=f?d+=2:55296<=f&&57343>=f?(d+=4,++e):d+=3}d=Array(d+1);K(b,d,0,d.length);return d}
|
function Ca(){if(!R){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:r},b;for(b in Ba)a[b]=Ba[b];var d=[];for(b in a)d.push(b+"="+a[b]);R=d}return R}var R;function S(a){return 0===a%4&&(0!==a%100||0===a%400)}function T(a,b){for(var d=0,e=0;e<=b;d+=a[e++]);return d}var U=[31,29,31,30,31,30,31,31,30,31,30,31],W=[31,28,31,30,31,30,31,31,30,31,30,31];
|
||||||
function xa(b,d,e,f){function h(a,k,l){for(a="number"==typeof a?a.toString():a||"";a.length<k;)a=l[0]+a;return a}function g(a,k){return h(a,k,"0")}function m(a,k){function l(oa){return 0>oa?-1:0<oa?1:0}var A;0===(A=l(a.getFullYear()-k.getFullYear()))&&0===(A=l(a.getMonth()-k.getMonth()))&&(A=l(a.getDate()-k.getDate()));return A}function w(a){switch(a.getDay()){case 0:return new Date(a.getFullYear()-1,11,29);case 1:return a;case 2:return new Date(a.getFullYear(),0,3);case 3:return new Date(a.getFullYear(),
|
function X(a,b){for(a=new Date(a.getTime());0<b;){var d=a.getMonth(),e=(S(a.getFullYear())?U:W)[d];if(b>e-a.getDate())b-=e-a.getDate()+1,a.setDate(1),11>d?a.setMonth(d+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a}
|
||||||
0,2);case 4:return new Date(a.getFullYear(),0,1);case 5:return new Date(a.getFullYear()-1,11,31);case 6:return new Date(a.getFullYear()-1,11,30)}}function p(a){var k=a.v;for(a=new Date((new Date(a.A+1900,0,1)).getTime());0<k;){var l=a.getMonth(),A=(X(a.getFullYear())?ua:va)[l];if(k>A-a.getDate())k-=A-a.getDate()+1,a.setDate(1),11>l?a.setMonth(l+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+k);break}}l=new Date(a.getFullYear()+1,0,4);k=w(new Date(a.getFullYear(),0,
|
function Da(a,b,d,e){function g(a,b,d){for(a="number"===typeof a?a.toString():a||"";a.length<b;)a=d[0]+a;return a}function f(a,b){return g(a,b,"0")}function h(a,b){function V(a){return 0>a?-1:0<a?1:0}var d;0===(d=V(a.getFullYear()-b.getFullYear()))&&0===(d=V(a.getMonth()-b.getMonth()))&&(d=V(a.getDate()-b.getDate()));return d}function n(a){switch(a.getDay()){case 0:return new Date(a.getFullYear()-1,11,29);case 1:return a;case 2:return new Date(a.getFullYear(),0,3);case 3:return new Date(a.getFullYear(),
|
||||||
4));l=w(l);return 0>=m(k,a)?0>=m(l,a)?a.getFullYear()+1:a.getFullYear():a.getFullYear()-1}var n=O[f+40>>2];f={H:O[f>>2],G:O[f+4>>2],B:O[f+8>>2],D:O[f+12>>2],C:O[f+16>>2],A:O[f+20>>2],u:O[f+24>>2],v:O[f+28>>2],J:O[f+32>>2],F:O[f+36>>2],I:n?n?J(N,n):"":""};e=e?J(N,e):"";n={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d",
|
0,2);case 4:return new Date(a.getFullYear(),0,1);case 5:return new Date(a.getFullYear()-1,11,31);case 6:return new Date(a.getFullYear()-1,11,30)}}function z(a){a=X(new Date(a.A+1900,0,1),a.G);var b=n(new Date(a.getFullYear()+1,0,4));return 0>=h(n(new Date(a.getFullYear(),0,4)),a)?0>=h(b,a)?a.getFullYear()+1:a.getFullYear():a.getFullYear()-1}var m=C[e+40>>2];e={N:C[e>>2],M:C[e+4>>2],D:C[e+8>>2],C:C[e+12>>2],B:C[e+16>>2],A:C[e+20>>2],F:C[e+24>>2],G:C[e+28>>2],X:C[e+32>>2],L:C[e+36>>2],O:m?m?I(H,m,void 0):
|
||||||
"%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var q in n)e=e.replace(new RegExp(q,"g"),n[q]);var pa="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),qa="January February March April May June July August September October November December".split(" ");n={"%a":function(a){return pa[a.u].substring(0,3)},"%A":function(a){return pa[a.u]},"%b":function(a){return qa[a.C].substring(0,3)},"%B":function(a){return qa[a.C]},
|
"":""};d=d?I(H,d,void 0):"";m={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in m)d=d.replace(new RegExp(l,"g"),m[l]);var F="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
|
||||||
"%C":function(a){return g((a.A+1900)/100|0,2)},"%d":function(a){return g(a.D,2)},"%e":function(a){return h(a.D,2," ")},"%g":function(a){return p(a).toString().substring(2)},"%G":function(a){return p(a)},"%H":function(a){return g(a.B,2)},"%I":function(a){a=a.B;0==a?a=12:12<a&&(a-=12);return g(a,2)},"%j":function(a){for(var k=0,l=0;l<=a.C-1;k+=(X(a.A+1900)?ua:va)[l++]);return g(a.D+k,3)},"%m":function(a){return g(a.C+1,2)},"%M":function(a){return g(a.G,2)},"%n":function(){return"\n"},"%p":function(a){return 0<=
|
va="January February March April May June July August September October November December".split(" ");m={"%a":function(a){return F[a.F].substring(0,3)},"%A":function(a){return F[a.F]},"%b":function(a){return va[a.B].substring(0,3)},"%B":function(a){return va[a.B]},"%C":function(a){return f((a.A+1900)/100|0,2)},"%d":function(a){return f(a.C,2)},"%e":function(a){return g(a.C,2," ")},"%g":function(a){return z(a).toString().substring(2)},"%G":function(a){return z(a)},"%H":function(a){return f(a.D,2)},
|
||||||
a.B&&12>a.B?"AM":"PM"},"%S":function(a){return g(a.H,2)},"%t":function(){return"\t"},"%u":function(a){return a.u||7},"%U":function(a){return g(Math.floor((a.v+7-a.u)/7),2)},"%V":function(a){var k=Math.floor((a.v+7-(a.u+6)%7)/7);2>=(a.u+371-a.v-2)%7&&k++;if(k)53==k&&(l=(a.u+371-a.v)%7,4==l||3==l&&X(a.A)||(k=1));else{k=52;var l=(a.u+7-a.v-1)%7;(4==l||5==l&&X(a.A%400-1))&&k++}return g(k,2)},"%w":function(a){return a.u},"%W":function(a){return g(Math.floor((a.v+7-(a.u+6)%7)/7),2)},"%y":function(a){return(a.A+
|
"%I":function(a){a=a.D;0==a?a=12:12<a&&(a-=12);return f(a,2)},"%j":function(a){return f(a.C+T(S(a.A+1900)?U:W,a.B-1),3)},"%m":function(a){return f(a.B+1,2)},"%M":function(a){return f(a.M,2)},"%n":function(){return"\n"},"%p":function(a){return 0<=a.D&&12>a.D?"AM":"PM"},"%S":function(a){return f(a.N,2)},"%t":function(){return"\t"},"%u":function(a){return a.F||7},"%U":function(a){var b=new Date(a.A+1900,0,1),d=0===b.getDay()?b:X(b,7-b.getDay());a=new Date(a.A+1900,a.B,a.C);return 0>h(d,a)?f(Math.ceil((31-
|
||||||
1900).toString().substring(2)},"%Y":function(a){return a.A+1900},"%z":function(a){a=a.F;var k=0<=a;a=Math.abs(a)/60;return(k?"+":"-")+String("0000"+(a/60*100+a%60)).slice(-4)},"%Z":function(a){return a.I},"%%":function(){return"%"}};e=e.replace(/%%/g,"\x00\x00");for(q in n)e.includes(q)&&(e=e.replace(new RegExp(q,"g"),n[q](f)));e=e.replace(/\0\0/g,"%");q=wa(e);if(q.length>d)return 0;M.set(q,b);return q.length-1}
|
d.getDate()+(T(S(a.getFullYear())?U:W,a.getMonth()-1)-31)+a.getDate())/7),2):0===h(d,b)?"01":"00"},"%V":function(a){var b=n(new Date(a.A+1900,0,4)),d=n(new Date(a.A+1901,0,4)),e=X(new Date(a.A+1900,0,1),a.G);return 0>h(e,b)?"53":0>=h(d,e)?"01":f(Math.ceil((b.getFullYear()<a.A+1900?a.G+32-b.getDate():a.G+1-b.getDate())/7),2)},"%w":function(a){return a.F},"%W":function(a){var b=new Date(a.A,0,1),d=1===b.getDay()?b:X(b,0===b.getDay()?1:7-b.getDay()+1);a=new Date(a.A+1900,a.B,a.C);return 0>h(d,a)?f(Math.ceil((31-
|
||||||
function aa(b){var d="string number boolean number number number".split(" "),e={string:p=>{var n=0;if(null!==p&&void 0!==p&&0!==p){var q=(p.length<<2)+1;n=Y(q);K(p,N,n,q)}return n},array:p=>{var n=Y(p.length);M.set(p,n);return n}},f=c._convert_glsl_to_spirv,h=[],g=0;if(b)for(var m=0;m<b.length;m++){var w=e[d[m]];w?(0===g&&(g=ya()),h[m]=w(b[m])):h[m]=b[m]}b=f.apply(null,h);return b=function(p){0!==g&&za(g);return p}(b)}
|
d.getDate()+(T(S(a.getFullYear())?U:W,a.getMonth()-1)-31)+a.getDate())/7),2):0===h(d,b)?"01":"00"},"%y":function(a){return(a.A+1900).toString().substring(2)},"%Y":function(a){return a.A+1900},"%z":function(a){a=a.L;var b=0<=a;a=Math.abs(a)/60;return(b?"+":"-")+String("0000"+(a/60*100+a%60)).slice(-4)},"%Z":function(a){return a.O},"%%":function(){return"%"}};for(l in m)0<=d.indexOf(l)&&(d=d.replace(new RegExp(l,"g"),m[l](e)));l=Ea(d);if(l.length>b)return 0;B.set(l,a);return l.length-1}
|
||||||
var Aa={b:function(){F("")},i:function(b,d,e){N.copyWithin(b,d,d+e)},g:function(b){var d=N.length;b>>>=0;if(2147483648<b)return!1;for(var e=1;4>=e;e*=2){var f=d*(1+.2/e);f=Math.min(f,b+100663296);var h=Math;f=Math.max(b,f);h=h.min.call(h,2147483648,f+(65536-f%65536)%65536);a:{try{G.grow(h-L.byteLength+65535>>>16);fa();var g=1;break a}catch(m){}g=void 0}if(g)return!0}return!1},e:function(b,d){var e=0;sa().forEach(function(f,h){var g=d+e;h=P[b+4*h>>2]=g;for(g=0;g<f.length;++g)M[h++>>0]=f.charCodeAt(g);
|
function Ea(a){for(var b=0,d=0;d<a.length;++d){var e=a.charCodeAt(d);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++d)&1023);127>=e?++b:b=2047>=e?b+2:65535>=e?b+3:b+4}b=Array(b+1);ia(a,b,0,b.length);return b}
|
||||||
M[h>>0]=0;e+=f.length+1});return 0},f:function(b,d){var e=sa();P[b>>2]=e.length;var f=0;e.forEach(function(h){f+=h.length+1});P[d>>2]=f;return 0},h:function(){return 52},c:function(){return 70},a:function(b,d,e,f){for(var h=0,g=0;g<e;g++){var m=P[d>>2],w=P[d+4>>2];d+=8;for(var p=0;p<w;p++){var n=N[m+p],q=ta[b];0===n||10===n?((1===b?ba:D)(J(q,0)),q.length=0):q.push(n)}h+=w}P[f>>2]=h;return 0},d:function(b,d,e,f){return xa(b,d,e,f)}};
|
var Ga={f:function(){},c:function(){c.___errno_location&&(C[c.___errno_location()>>2]=63);return-1},n:function(a,b){P=b;try{var d=Aa();var e=Aa();if(-1===d||0===e)var g=-28;else{var f=Q.K[d];if(f&&e===f.U){var h=(void 0).T(f.S);Q.R(d,h,e,f.flags,f.offset);(void 0).W(h);Q.K[d]=null;f.P&&Fa(f.V)}g=0}return g}catch(n){return D(n),-n.I}},a:function(){},b:function(){D()},k:function(a,b,d){H.set(H.subarray(b,b+d),a)},l:function(a){var b=B.length;if(2147418112<a)return!1;for(var d=1;4>=d;d*=2){var e=b*(1+
|
||||||
(function(){function b(h){c.asm=h.exports;G=c.asm.j;fa();ia.unshift(c.asm.k);Q--;c.monitorRunDependencies&&c.monitorRunDependencies(Q);0==Q&&(null!==R&&(clearInterval(R),R=null),S&&(h=S,S=null,h()))}function d(h){b(h.instance)}function e(h){return ra().then(function(g){return WebAssembly.instantiate(g,f)}).then(function(g){return g}).then(h,function(g){D("failed to asynchronously prepare wasm: "+g);F(g)})}var f={a:Aa};Q++;c.monitorRunDependencies&&c.monitorRunDependencies(Q);if(c.instantiateWasm)try{return c.instantiateWasm(f,
|
.2/d);e=Math.min(e,a+100663296);e=Math.max(16777216,a,e);0<e%65536&&(e+=65536-e%65536);a:{try{E.grow(Math.min(2147418112,e)-J.byteLength+65535>>16);ma(E.buffer);var g=1;break a}catch(f){}g=void 0}if(g)return!0}return!1},d:function(a,b){var d=0;Ca().forEach(function(e,g){var f=b+d;g=C[a+4*g>>2]=f;for(f=0;f<e.length;++f)B[g++>>0]=e.charCodeAt(f);B[g>>0]=0;d+=e.length+1});return 0},e:function(a,b){var d=Ca();C[a>>2]=d.length;var e=0;d.forEach(function(a){e+=a.length+1});C[b>>2]=e;return 0},h:function(){return 0},
|
||||||
b)}catch(h){return D("Module.instantiateWasm callback failed with error: "+h),!1}(function(){return E||"function"!=typeof WebAssembly.instantiateStreaming||la()||"function"!=typeof fetch?e(d):fetch(T,{credentials:"same-origin"}).then(function(h){return WebAssembly.instantiateStreaming(h,f).then(d,function(g){D("wasm streaming compile failed: "+g);D("falling back to ArrayBuffer instantiation");return e(d)})})})().catch(t);return{}})();
|
j:function(){return 0},g:function(a,b,d,e){try{for(var g=0,f=0;f<d;f++){for(var h=C[b+8*f>>2],n=C[b+(8*f+4)>>2],z=0;z<n;z++){var m=H[h+z],l=za[a];0===m||10===m?((1===a?x:y)(I(l,0)),l.length=0):l.push(m)}g+=n}C[e>>2]=g;return 0}catch(F){return D(F),F.I}},memory:E,o:function(){},i:function(){},m:function(a,b,d,e){return Da(a,b,d,e)},table:ea},Ha=function(){function a(a){c.asm=a.exports;L--;c.monitorRunDependencies&&c.monitorRunDependencies(L);0==L&&(null!==M&&(clearInterval(M),M=null),N&&(a=N,N=null,
|
||||||
c.___wasm_call_ctors=function(){return(c.___wasm_call_ctors=c.asm.k).apply(null,arguments)};c._convert_glsl_to_spirv=function(){return(c._convert_glsl_to_spirv=c.asm.l).apply(null,arguments)};c._destroy_output_buffer=function(){return(c._destroy_output_buffer=c.asm.m).apply(null,arguments)};c._malloc=function(){return(c._malloc=c.asm.o).apply(null,arguments)};c._free=function(){return(c._free=c.asm.p).apply(null,arguments)};
|
a()))}function b(b){a(b.instance)}function d(a){return xa().then(function(a){return WebAssembly.instantiate(a,e)}).then(a,function(a){y("failed to asynchronously prepare wasm: "+a);D(a)})}var e={env:Ga,wasi_snapshot_preview1:Ga};L++;c.monitorRunDependencies&&c.monitorRunDependencies(L);if(c.instantiateWasm)try{return c.instantiateWasm(e,a)}catch(g){return y("Module.instantiateWasm callback failed with error: "+g),!1}(function(){if(A||"function"!==typeof WebAssembly.instantiateStreaming||ta()||"function"!==
|
||||||
var ya=c.stackSave=function(){return(ya=c.stackSave=c.asm.q).apply(null,arguments)},za=c.stackRestore=function(){return(za=c.stackRestore=c.asm.r).apply(null,arguments)},Y=c.stackAlloc=function(){return(Y=c.stackAlloc=c.asm.s).apply(null,arguments)},Z;S=function Ba(){Z||Ca();Z||(S=Ba)};
|
typeof fetch)return d(b);fetch(O,{credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,e).then(b,function(a){y("wasm streaming compile failed: "+a);y("falling back to ArrayBuffer instantiation");d(b)})})})();return{}}();c.asm=Ha;var ya=c.___wasm_call_ctors=function(){return(ya=c.___wasm_call_ctors=c.asm.p).apply(null,arguments)};c._convert_glsl_to_spirv=function(){return(c._convert_glsl_to_spirv=c.asm.q).apply(null,arguments)};
|
||||||
function Ca(){function b(){if(!Z&&(Z=!0,c.calledRun=!0,!H)){U(ia);r(c);if(c.onRuntimeInitialized)c.onRuntimeInitialized();if(c.postRun)for("function"==typeof c.postRun&&(c.postRun=[c.postRun]);c.postRun.length;){var d=c.postRun.shift();ja.unshift(d)}U(ja)}}if(!(0<Q)){if(c.preRun)for("function"==typeof c.preRun&&(c.preRun=[c.preRun]);c.preRun.length;)ka();U(ha);0<Q||(c.setStatus?(c.setStatus("Running..."),setTimeout(function(){setTimeout(function(){c.setStatus("")},1);b()},1)):b())}}
|
c._destroy_output_buffer=function(){return(c._destroy_output_buffer=c.asm.r).apply(null,arguments)};c._malloc=function(){return(c._malloc=c.asm.s).apply(null,arguments)};var Fa=c._free=function(){return(Fa=c._free=c.asm.t).apply(null,arguments)},ja=c.stackSave=function(){return(ja=c.stackSave=c.asm.u).apply(null,arguments)},G=c.stackAlloc=function(){return(G=c.stackAlloc=c.asm.v).apply(null,arguments)},ka=c.stackRestore=function(){return(ka=c.stackRestore=c.asm.w).apply(null,arguments)};
|
||||||
if(c.preInit)for("function"==typeof c.preInit&&(c.preInit=[c.preInit]);0<c.preInit.length;)c.preInit.pop()();Ca();
|
c.dynCall_vi=function(){return(c.dynCall_vi=c.asm.x).apply(null,arguments)};c.dynCall_v=function(){return(c.dynCall_v=c.asm.y).apply(null,arguments)};c.asm=Ha;var Y;c.then=function(a){if(Y)a(c);else{var b=c.onRuntimeInitialized;c.onRuntimeInitialized=function(){b&&b();a(c)}}return c};N=function Ia(){Y||Z();Y||(N=Ia)};
|
||||||
|
function Z(){function a(){if(!Y&&(Y=!0,!fa)){K(pa);K(qa);if(c.onRuntimeInitialized)c.onRuntimeInitialized();if(c.postRun)for("function"==typeof c.postRun&&(c.postRun=[c.postRun]);c.postRun.length;){var a=c.postRun.shift();ra.unshift(a)}K(ra)}}if(!(0<L)){if(c.preRun)for("function"==typeof c.preRun&&(c.preRun=[c.preRun]);c.preRun.length;)sa();K(oa);0<L||(c.setStatus?(c.setStatus("Running..."),setTimeout(function(){setTimeout(function(){c.setStatus("")},1);a()},1)):a())}}c.run=Z;
|
||||||
|
if(c.preInit)for("function"==typeof c.preInit&&(c.preInit=[c.preInit]);0<c.preInit.length;)c.preInit.pop()();Z();
|
||||||
|
|
||||||
|
|
||||||
return Module.ready
|
return Module
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
})();
|
})();
|
||||||
|
// if (typeof exports === 'object' && typeof module === 'object')
|
||||||
|
// module.exports = Module;
|
||||||
|
// else if (typeof define === 'function' && define['amd'])
|
||||||
|
// define([], function() { return Module; });
|
||||||
|
// else if (typeof exports === 'object')
|
||||||
|
// exports["Module"] = Module;
|
||||||
|
// export default (() => {
|
||||||
|
// const initialize = () => {
|
||||||
|
// return new Promise(resolve => {
|
||||||
|
// Module({
|
||||||
|
// locateFile() {
|
||||||
|
// const i = import.meta.url.lastIndexOf('/')
|
||||||
|
// return import.meta.url.substring(0, i) + '/glslang.wasm';
|
||||||
|
// },
|
||||||
|
// onRuntimeInitialized() {
|
||||||
|
// resolve({
|
||||||
|
// compileGLSLZeroCopy: this.compileGLSLZeroCopy,
|
||||||
|
// compileGLSL: this.compileGLSL,
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
|
||||||
|
// let instance;
|
||||||
|
// return () => {
|
||||||
|
// if (!instance) {
|
||||||
|
// instance = initialize();
|
||||||
|
// }
|
||||||
|
// return instance;
|
||||||
|
// };
|
||||||
|
// })();
|
||||||
|
// (function tryToExport(root, factory) {
|
||||||
|
// if (typeof exports === 'object' && typeof module === 'object')
|
||||||
|
// module.exports = factory();
|
||||||
|
// else if (typeof define === 'function' && define.amd)
|
||||||
|
// define("glslang", [], factory);
|
||||||
|
// else if (typeof exports === 'object')
|
||||||
|
// exports["glslang"] = factory();
|
||||||
|
// else
|
||||||
|
// root["glslang"] = factory();
|
||||||
|
// })(typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this, () => {
|
||||||
|
// const initialize = (wasmPath) => {
|
||||||
|
// wasmPath = 'http://localhost:7456/glslang.wasm'
|
||||||
|
// return new Promise(resolve => {
|
||||||
|
// Module({
|
||||||
|
// locateFile() {
|
||||||
|
// return wasmPath;
|
||||||
|
// },
|
||||||
|
// onRuntimeInitialized() {
|
||||||
|
// resolve({
|
||||||
|
// compileGLSLZeroCopy: this.compileGLSLZeroCopy,
|
||||||
|
// compileGLSL: this.compileGLSL,
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
|
||||||
|
// let instance;
|
||||||
|
// return (wasmPath) => {
|
||||||
|
// if (!instance) {
|
||||||
|
// instance = initialize(wasmPath);
|
||||||
|
// }
|
||||||
|
// return instance;
|
||||||
|
// };
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
const initialize = (wasmPath) => {
|
const initialize = (wasmPath) => {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
|
|
||||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -7,8 +7,3 @@ declare module 'external:emscripten/webgpu/glslang.js' {
|
||||||
function factory (wasmUrl: string): Promise<any>;
|
function factory (wasmUrl: string): Promise<any>;
|
||||||
export default factory;
|
export default factory;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'external:emscripten/webgpu/twgsl.js' {
|
|
||||||
function factory (gfx: any): Promise<any>;
|
|
||||||
export default factory;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
|
@ -22,10 +22,3 @@
|
||||||
|
|
||||||
#define %module_macro(m) %feature("module_macro","m")
|
#define %module_macro(m) %feature("module_macro","m")
|
||||||
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
|
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
|
||||||
|
|
||||||
%define %virtual_inherit(klass)
|
|
||||||
%feature("virtual_inherit", "1") klass;
|
|
||||||
%typemap(in) klass *self
|
|
||||||
%{ $1 = SE_THIS_OBJECT_VIRTUAL<$*ltype, cc::VirtualInheritBase>(s);
|
|
||||||
if (nullptr == $1) return true;%}
|
|
||||||
%enddef
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
$js_check_arg_count
|
$js_check_arg_count
|
||||||
$jslocals
|
$jslocals
|
||||||
$jscode
|
$jscode
|
||||||
$js_set_private_object
|
auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
|
||||||
|
s.thisObject()->setPrivateObject(ptr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
|
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
|
||||||
|
|
@ -61,7 +62,8 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
CC_UNUSED bool ok = true;
|
CC_UNUSED bool ok = true;
|
||||||
$jslocals
|
$jslocals
|
||||||
$jscode
|
$jscode
|
||||||
$js_set_private_object
|
auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
|
||||||
|
s.thisObject()->setPrivateObject(ptr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
@ -84,20 +86,19 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* js_dtor: template for a destructor wrapper
|
* js_dtor: template for a destructor wrapper
|
||||||
* - $classname_mangled: mangled class name
|
* - $jsmangledname: mangled class name
|
||||||
* - $jstype: class type
|
* - $jstype: class type
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
%fragment ("js_dtor", "templates")
|
%fragment ("js_dtor", "templates")
|
||||||
%{
|
%{
|
||||||
static bool $jswrapper(se::State& s) {
|
static bool $jswrapper(se::State& s) {
|
||||||
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* js_dtor: template for a destructor wrapper
|
* js_dtor: template for a destructor wrapper
|
||||||
* - $classname_mangled: mangled class name
|
* - $jsmangledname: mangled class name
|
||||||
* - $jstype: class type
|
* - $jstype: class type
|
||||||
* - ${destructor_action}: The custom destructor action to invoke.
|
* - ${destructor_action}: The custom destructor action to invoke.
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
@ -105,7 +106,6 @@ SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
%{
|
%{
|
||||||
static bool $jswrapper(se::State& s)
|
static bool $jswrapper(se::State& s)
|
||||||
{
|
{
|
||||||
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ set_target_properties(GLESv2 PROPERTIES
|
||||||
|
|
||||||
add_library(SDL2 SHARED IMPORTED GLOBAL)
|
add_library(SDL2 SHARED IMPORTED GLOBAL)
|
||||||
set_target_properties(SDL2 PROPERTIES
|
set_target_properties(SDL2 PROPERTIES
|
||||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/libSDL2.a
|
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/libSDL2-2.0.0.dylib
|
||||||
)
|
)
|
||||||
|
|
||||||
set(se_libs_name)
|
set(se_libs_name)
|
||||||
|
|
@ -211,9 +211,6 @@ list(APPEND CC_EXTERNAL_LIBS
|
||||||
webp
|
webp
|
||||||
curl
|
curl
|
||||||
SDL2
|
SDL2
|
||||||
# sdl2 depends on the following two libraries.
|
|
||||||
"-framework IOKit"
|
|
||||||
"-framework Carbon"
|
|
||||||
${glslang_libs_name}
|
${glslang_libs_name}
|
||||||
${spirv-cross_libs_name}
|
${spirv-cross_libs_name}
|
||||||
${tbb_libs_name}
|
${tbb_libs_name}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -22,10 +22,3 @@
|
||||||
|
|
||||||
#define %module_macro(m) %feature("module_macro","m")
|
#define %module_macro(m) %feature("module_macro","m")
|
||||||
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
|
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
|
||||||
|
|
||||||
%define %virtual_inherit(klass)
|
|
||||||
%feature("virtual_inherit", "1") klass;
|
|
||||||
%typemap(in) klass *self
|
|
||||||
%{ $1 = SE_THIS_OBJECT_VIRTUAL<$*ltype, cc::VirtualInheritBase>(s);
|
|
||||||
if (nullptr == $1) return true;%}
|
|
||||||
%enddef
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
$js_check_arg_count
|
$js_check_arg_count
|
||||||
$jslocals
|
$jslocals
|
||||||
$jscode
|
$jscode
|
||||||
$js_set_private_object
|
auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
|
||||||
|
s.thisObject()->setPrivateObject(ptr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
|
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
|
||||||
|
|
@ -61,7 +62,8 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
CC_UNUSED bool ok = true;
|
CC_UNUSED bool ok = true;
|
||||||
$jslocals
|
$jslocals
|
||||||
$jscode
|
$jscode
|
||||||
$js_set_private_object
|
auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
|
||||||
|
s.thisObject()->setPrivateObject(ptr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
@ -84,20 +86,19 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* js_dtor: template for a destructor wrapper
|
* js_dtor: template for a destructor wrapper
|
||||||
* - $classname_mangled: mangled class name
|
* - $jsmangledname: mangled class name
|
||||||
* - $jstype: class type
|
* - $jstype: class type
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
%fragment ("js_dtor", "templates")
|
%fragment ("js_dtor", "templates")
|
||||||
%{
|
%{
|
||||||
static bool $jswrapper(se::State& s) {
|
static bool $jswrapper(se::State& s) {
|
||||||
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* js_dtor: template for a destructor wrapper
|
* js_dtor: template for a destructor wrapper
|
||||||
* - $classname_mangled: mangled class name
|
* - $jsmangledname: mangled class name
|
||||||
* - $jstype: class type
|
* - $jstype: class type
|
||||||
* - ${destructor_action}: The custom destructor action to invoke.
|
* - ${destructor_action}: The custom destructor action to invoke.
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
@ -105,7 +106,6 @@ SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
%{
|
%{
|
||||||
static bool $jswrapper(se::State& s)
|
static bool $jswrapper(se::State& s)
|
||||||
{
|
{
|
||||||
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -46,7 +46,7 @@ if(NOT USE_MODULES)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# add dependent boost libs
|
# add dependent boost libs
|
||||||
if((NOT NX) AND (NOT EMSCRIPTEN))
|
if(NOT NX)
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/boost-source/boost.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/boost-source/boost.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
@ -61,7 +61,7 @@ add_definitions(-DCC_SWAPPY_ENABLED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(ANDROID AND (NOT SURFACE_LESS_SERVICE))
|
if(ANDROID)
|
||||||
set(CC_GAME_ACTIVITY_SOURCES
|
set(CC_GAME_ACTIVITY_SOURCES
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android-gamesdk/GameActivity/game-activity/include/game-activity/GameActivity.cpp
|
${CMAKE_CURRENT_LIST_DIR}/android-gamesdk/GameActivity/game-activity/include/game-activity/GameActivity.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android-gamesdk/GameActivity/game-activity/include/game-activity/system_utils.cpp
|
${CMAKE_CURRENT_LIST_DIR}/android-gamesdk/GameActivity/game-activity/include/game-activity/system_utils.cpp
|
||||||
|
|
|
||||||
|
|
@ -139,5 +139,7 @@ glslang (Built using https://github.com/YunHsiao/glslang/tree/build)
|
||||||
linux: 11.5.0
|
linux: 11.5.0
|
||||||
openharmony:11.5.0 (commit: 1978c76)
|
openharmony:11.5.0 (commit: 1978c76)
|
||||||
|
|
||||||
swig ( Built using https://github.com/cocos/swig/tree/cocos-se, executable files are downloaded from https://github.com/cocos/swig/releases/tag/cocos-v1.1.7 )
|
swig ( Built using https://github.com/cocos/swig/tree/cocos-se, executable files are downloaded from https://github.com/cocos/swig/releases/tag/cocos-v1.1.6 )
|
||||||
all: cocos-v1.1.7 (commit: 7969da2)
|
win64: cocos-v1.1.6 (commit: f52be17)
|
||||||
|
mac: cocos-v1.1.6 (commit: f52be17)
|
||||||
|
linux: cocos-v1.1.6 (commit: f52be17)
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -22,10 +22,3 @@
|
||||||
|
|
||||||
#define %module_macro(m) %feature("module_macro","m")
|
#define %module_macro(m) %feature("module_macro","m")
|
||||||
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
|
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
|
||||||
|
|
||||||
%define %virtual_inherit(klass)
|
|
||||||
%feature("virtual_inherit", "1") klass;
|
|
||||||
%typemap(in) klass *self
|
|
||||||
%{ $1 = SE_THIS_OBJECT_VIRTUAL<$*ltype, cc::VirtualInheritBase>(s);
|
|
||||||
if (nullptr == $1) return true;%}
|
|
||||||
%enddef
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
$js_check_arg_count
|
$js_check_arg_count
|
||||||
$jslocals
|
$jslocals
|
||||||
$jscode
|
$jscode
|
||||||
$js_set_private_object
|
auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
|
||||||
|
s.thisObject()->setPrivateObject(ptr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
|
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
|
||||||
|
|
@ -61,7 +62,8 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
CC_UNUSED bool ok = true;
|
CC_UNUSED bool ok = true;
|
||||||
$jslocals
|
$jslocals
|
||||||
$jscode
|
$jscode
|
||||||
$js_set_private_object
|
auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
|
||||||
|
s.thisObject()->setPrivateObject(ptr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
@ -84,20 +86,19 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* js_dtor: template for a destructor wrapper
|
* js_dtor: template for a destructor wrapper
|
||||||
* - $classname_mangled: mangled class name
|
* - $jsmangledname: mangled class name
|
||||||
* - $jstype: class type
|
* - $jstype: class type
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
%fragment ("js_dtor", "templates")
|
%fragment ("js_dtor", "templates")
|
||||||
%{
|
%{
|
||||||
static bool $jswrapper(se::State& s) {
|
static bool $jswrapper(se::State& s) {
|
||||||
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* js_dtor: template for a destructor wrapper
|
* js_dtor: template for a destructor wrapper
|
||||||
* - $classname_mangled: mangled class name
|
* - $jsmangledname: mangled class name
|
||||||
* - $jstype: class type
|
* - $jstype: class type
|
||||||
* - ${destructor_action}: The custom destructor action to invoke.
|
* - ${destructor_action}: The custom destructor action to invoke.
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
@ -105,7 +106,6 @@ SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
%{
|
%{
|
||||||
static bool $jswrapper(se::State& s)
|
static bool $jswrapper(se::State& s)
|
||||||
{
|
{
|
||||||
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue