Compare commits

..
30 Commits
Author SHA1 Message Date
minggoandGitHub 7983e5d777 Merge pull request #387 from minggo/develop-merge-v3.8.1
Develop merge v3.8.1
2023-07-13 14:12:52 +08:00
minggo 109587f1dd Merge branch 'v3.8.1' into develop-merge-v3.8.1 2023-07-13 11:59:22 +08:00
minggoandGitHub 4063971d00 Merge pull request #385 from cocos/v3.8.0
V3.8.0
2023-07-12 15:16:03 +08:00
Santy-WangandGitHub 80ca0b1f3c update spine wasm for changing skin (#384) 2023-07-11 18:22:53 +08:00
Santy-WangandGitHub 5fc3b6118c update spine wasm (#381) 2023-07-11 13:45:30 +08:00
江战andGitHub 60b1792049 Merge pull request #380 from Canvasfull/v3.8.0-spine-15
update spine wasm & asm fix interface.
2023-07-07 16:51:41 +08:00
Canvas e24d2a019b update spine wasm & asm fix interface. 2023-07-07 16:31:43 +08:00
James ChenandGitHub 53b03aa1de Update spine, build it on Mac to resolve low FPS (#379) 2023-07-06 17:32:33 +08:00
Ling ZhanandGitHub 4296d772c0 bullet wasm update (#378) 2023-07-04 18:31:15 +08:00
minggoandGitHub 8bfff93881 Merge pull request #377 from cocos/v3.8.0
V3.8.0
2023-07-03 14:29:57 +08:00
CanvasandGitHub 40df568df1 fix spine animation editor display exception. (#376) 2023-07-02 20:19:36 +08:00
zhakesiandGitHub 2a80c4c6db update spine wasm (#375) 2023-06-30 14:59:08 +08:00
zhakesiandGitHub 6e292f061a update spine wasm (#374) 2023-06-30 14:45:08 +08:00
James ChenandGitHub e1ee5ad00a Update swig to v1.1.5, fix https://github.com/cocos/cocos-engine/issues/15583 (#373) 2023-06-30 10:36:46 +08:00
minggoandGitHub 161b2ca59a Merge pull request #372 from cocos/v3.8.0
V3.8.0
2023-06-27 11:02:50 +08:00
Ling ZhanandGitHub d47e2cb22c [fix] physx wasm remove new function (#371) 2023-06-27 09:35:19 +08:00
James ChenandGitHub 7dfba29388 Rebuild spine.wasm with -s MIN_SAFARI_VERSION=110000 (#370)
* Rebuild spine.wasm with -s MIN_SAFARI_VERSION=110000

* Remove execute permission
2023-06-21 19:40:31 +08:00
PPandGitHub 680cd32d00 add wasm.fallback module (#369) 2023-06-21 16:09:53 +08:00
zhakesiandGitHub dbc64aaa87 fix spine wasm with bad performance (#368) 2023-06-19 23:26:31 +08:00
PPandGitHub 246787c1e7 Revert "compress spine.asm.js for Taobao platform (#366)" (#367)
This reverts commit c96e5cf50d.
2023-06-19 15:32:02 +08:00
PPandGitHub c96e5cf50d compress spine.asm.js for Taobao platform (#366) 2023-06-19 15:09:48 +08:00
PPandGitHub 8e867c50ca remove spine.js (#365) 2023-06-19 14:46:45 +08:00
PPandGitHub 9d201cd6d3 add spine js mem (#364)
update
2023-06-16 14:14:17 +08:00
qiuguohuaandGitHub 712e10655a Fix harmonyos platform compilation failure. (#356) (#363) 2023-06-14 10:28:03 +08:00
minggoandGitHub 998ab5a93c Merge pull request #362 from cocos/v3.8.0
V3.8.0
2023-06-13 10:08:14 +08:00
zhakesiandGitHub 19a1c59135 update spine wasm files (#361) 2023-06-09 11:27:54 +08:00
zhakesiandGitHub 04d8e0f33b support spine wasm (#359) 2023-06-07 18:42:17 +08:00
YiwenandGitHub 9bd15d56cb update bullet package (#360) 2023-06-07 18:03:14 +08:00
qiuguohuaandGitHub bc4dcfbabe Fix harmonyos platform compilation failure. (#356) 2023-06-02 14:55:25 +08:00
YiwenandGitHub 11b4056e55 tune bullet asm,wasm library performance (#355) 2023-05-24 18:06:46 +08:00
20 changed files with 1538248 additions and 1266134 deletions
File diff suppressed because one or more lines are too long
+1
View File
@@ -255,6 +255,7 @@ declare namespace Bullet {
// CharacterController // CharacterController
ControllerHitReport_new(): ptr; ControllerHitReport_new(): ptr;
CharacterController_getGhostObject(ptrCCT: ptr): ptr; CharacterController_getGhostObject(ptrCCT: ptr): ptr;
CharacterController_getCollisionShape(ptrCCT: ptr): ptr;
ControllerHit_getCurrentController(p: ptr): ptr; ControllerHit_getCurrentController(p: ptr): ptr;
ControllerHit_getHitWorldPos(p: ptr): ptr; ControllerHit_getHitWorldPos(p: ptr): ptr;
ControllerHit_getHitWorldNormal(p: ptr): ptr; ControllerHit_getHitWorldNormal(p: ptr): ptr;
Binary file not shown.
+17 -1
View File
@@ -1,7 +1,23 @@
declare module 'external:emscripten/*.wasm' { declare module 'external:emscripten/*.wasm' {
/** /**
* This is a url relative from build output chunk. * This is a wasm url relative from build output chunk.
*/ */
const wasmPath: string; const wasmPath: string;
export default wasmPath; export default wasmPath;
} }
declare module 'external:emscripten/*.wasm.fallback' {
/**
* This is a wasm fallback url relative from build output chunk.
*/
const wasmFallbackPath: string;
export default wasmFallbackPath;
}
declare module 'external:emscripten/*.js.mem' {
/**
* This is a js.mem url relative from build output chunk.
*/
const jsMemPath: string;
export default jsMemPath;
}
+1538069 -1190811
View File
File diff suppressed because one or more lines are too long
+75 -125
View File
@@ -575,8 +575,8 @@ var wasmMemory;
// In the wasm backend, we polyfill the WebAssembly object, // In the wasm backend, we polyfill the WebAssembly object,
// so this creates a (non-native-wasm) table for us. // so this creates a (non-native-wasm) table for us.
var wasmTable = new WebAssembly.Table({ var wasmTable = new WebAssembly.Table({
'initial': 5437, 'initial': 5439,
'maximum': 5437 + 0, 'maximum': 5439 + 0,
'element': 'anyfunc' 'element': 'anyfunc'
}); });
@@ -1198,11 +1198,11 @@ function updateGlobalBufferAndViews(buf) {
} }
var STATIC_BASE = 1024, var STATIC_BASE = 1024,
STACK_BASE = 5608208, STACK_BASE = 5618720,
STACKTOP = STACK_BASE, STACKTOP = STACK_BASE,
STACK_MAX = 365328, STACK_MAX = 375840,
DYNAMIC_BASE = 5608208, DYNAMIC_BASE = 5618720,
DYNAMICTOP_PTR = 365168; DYNAMICTOP_PTR = 375680;
@@ -1678,7 +1678,7 @@ var ASM_CONSTS = {
// STATICTOP = STATIC_BASE + 364304; // STATICTOP = STATIC_BASE + 374816;
/* global initializers */ __ATINIT__.push({ func: function() { ___wasm_call_ctors() } }); /* global initializers */ __ATINIT__.push({ func: function() { ___wasm_call_ctors() } });
@@ -1751,14 +1751,10 @@ var ASM_CONSTS = {
} }
}function createNamedFunction(name, body) { }function createNamedFunction(name, body) {
name = makeLegalFunctionName(name); name = makeLegalFunctionName(name);
/*jshint evil:true*/ return function() {
return new Function( "use strict";
"body", return body.apply(this, arguments);
"return function " + name + "() {\n" + };
" \"use strict\";" +
" return body.apply(this, arguments);\n" +
"};\n"
)(body);
} }
@@ -2763,17 +2759,14 @@ var ASM_CONSTS = {
signature = readLatin1String(signature); signature = readLatin1String(signature);
function makeDynCaller(dynCall) { function makeDynCaller(dynCall) {
var args = []; var argCache = [rawFunction];
for (var i = 1; i < signature.length; ++i) { return function() {
args.push('a' + i); argCache.length = arguments.length + 1;
} for (var i = 0; i < arguments.length; i++) {
argCache[i + 1] = arguments[i];
var name = 'dynCall_' + signature + '_' + rawFunction; }
var body = 'return function ' + name + '(' + args.join(', ') + ') {\n'; return dynCall.apply(null, argCache);
body += ' return dynCall(rawFunction' + (args.length ? ', ' : '') + args.join(', ') + ');\n'; };
body += '};\n';
return (new Function('dynCall', 'rawFunction', body))(dynCall, rawFunction);
} }
var dc = Module['dynCall_' + signature]; var dc = Module['dynCall_' + signature];
@@ -2921,6 +2914,9 @@ var ASM_CONSTS = {
if (!(constructor instanceof Function)) { if (!(constructor instanceof Function)) {
throw new TypeError('new_ called with constructor type ' + typeof(constructor) + " which is not a function"); throw new TypeError('new_ called with constructor type ' + typeof(constructor) + " which is not a function");
} }
if (constructor === Function) {
throw new Error('new_ cannot create a new Function with DYNAMIC_EXECUTION == 0.');
}
/* /*
* Previously, the following line was just: * Previously, the following line was just:
@@ -2975,71 +2971,47 @@ var ASM_CONSTS = {
var returns = (argTypes[0].name !== "void"); var returns = (argTypes[0].name !== "void");
var argsList = ""; var expectedArgCount = argCount - 2;
var argsListWired = ""; var argsWired = new Array(expectedArgCount);
for(var i = 0; i < argCount - 2; ++i) { var invokerFuncArgs = [];
argsList += (i!==0?", ":"")+"arg"+i; var destructors = [];
argsListWired += (i!==0?", ":"")+"arg"+i+"Wired"; return function() {
} if (arguments.length !== expectedArgCount) {
throwBindingError('function ' + humanName + ' called with ' +
arguments.length + ' arguments, expected ' + expectedArgCount +
' args!');
}
destructors.length = 0;
var thisWired;
invokerFuncArgs.length = isClassMethodFunc ? 2 : 1;
invokerFuncArgs[0] = cppTargetFunc;
if (isClassMethodFunc) {
thisWired = argTypes[1].toWireType(destructors, this);
invokerFuncArgs[1] = thisWired;
}
for (var i = 0; i < expectedArgCount; ++i) {
argsWired[i] = argTypes[i + 2].toWireType(destructors, arguments[i]);
invokerFuncArgs.push(argsWired[i]);
}
var invokerFnBody = var rv = cppInvokerFunc.apply(null, invokerFuncArgs);
"return function "+makeLegalFunctionName(humanName)+"("+argsList+") {\n" +
"if (arguments.length !== "+(argCount - 2)+") {\n" +
"throwBindingError('function "+humanName+" called with ' + arguments.length + ' arguments, expected "+(argCount - 2)+" args!');\n" +
"}\n";
if (needsDestructorStack) {
if (needsDestructorStack) { runDestructors(destructors);
invokerFnBody += } else {
"var destructors = [];\n"; for (var i = isClassMethodFunc ? 1 : 2; i < argTypes.length; i++) {
} var param = i === 1 ? thisWired : argsWired[i - 2];
if (argTypes[i].destructorFunction !== null) {
var dtorStack = needsDestructorStack ? "destructors" : "null"; argTypes[i].destructorFunction(param);
var args1 = ["throwBindingError", "invoker", "fn", "runDestructors", "retType", "classParam"]; }
var args2 = [throwBindingError, cppInvokerFunc, cppTargetFunc, runDestructors, argTypes[0], argTypes[1]];
if (isClassMethodFunc) {
invokerFnBody += "var thisWired = classParam.toWireType("+dtorStack+", this);\n";
}
for(var i = 0; i < argCount - 2; ++i) {
invokerFnBody += "var arg"+i+"Wired = argType"+i+".toWireType("+dtorStack+", arg"+i+"); // "+argTypes[i+2].name+"\n";
args1.push("argType"+i);
args2.push(argTypes[i+2]);
}
if (isClassMethodFunc) {
argsListWired = "thisWired" + (argsListWired.length > 0 ? ", " : "") + argsListWired;
}
invokerFnBody +=
(returns?"var rv = ":"") + "invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";
if (needsDestructorStack) {
invokerFnBody += "runDestructors(destructors);\n";
} else {
for(var i = isClassMethodFunc?1:2; i < argTypes.length; ++i) { // Skip return value at index 0 - it's not deleted here. Also skip class type if not a method.
var paramName = (i === 1 ? "thisWired" : ("arg"+(i - 2)+"Wired"));
if (argTypes[i].destructorFunction !== null) {
invokerFnBody += paramName+"_dtor("+paramName+"); // "+argTypes[i].name+"\n";
args1.push(paramName+"_dtor");
args2.push(argTypes[i].destructorFunction);
}
} }
} }
if (returns) {
invokerFnBody += "var ret = retType.fromWireType(rv);\n" +
"return ret;\n";
} else {
}
invokerFnBody += "}\n";
args1.push(invokerFnBody); if (returns) {
return argTypes[0].fromWireType(rv);
var invokerFunction = new_(Function, args1).apply(null, args2); }
return invokerFunction; };
} }
function heap32VectorToArray(count, firstElement) { function heap32VectorToArray(count, firstElement) {
@@ -3811,45 +3783,23 @@ var ASM_CONSTS = {
var types = __emval_lookupTypes(argCount, argTypes); var types = __emval_lookupTypes(argCount, argTypes);
var retType = types[0]; var retType = types[0];
var signatureName = retType.name + "_$" + types.slice(1).map(function (t) { return t.name; }).join("_") + "$"; var argN = new Array(argCount - 1);
var invokerFunction = function(handle, name, destructors, args) {
var params = ["retType"]; var offset = 0;
var args = [retType]; for (var i = 0; i < argCount - 1; ++i) {
argN[i] = types[i + 1].readValueFromPointer(args + offset);
var argsList = ""; // 'arg0, arg1, arg2, ... , argN' offset += types[i + 1].argPackAdvance;
for (var i = 0; i < argCount - 1; ++i) { }
argsList += (i !== 0 ? ", " : "") + "arg" + i; var rv = handle[name].apply(handle, argN);
params.push("argType" + i); for (var i = 0; i < argCount - 1; ++i) {
args.push(types[1 + i]); if (types[i + 1].deleteObject) {
} types[i + 1].deleteObject(argN[i]);
var functionName = makeLegalFunctionName("methodCaller_" + signatureName);
var functionBody =
"return function " + functionName + "(handle, name, destructors, args) {\n";
var offset = 0;
for (var i = 0; i < argCount - 1; ++i) {
functionBody +=
" var arg" + i + " = argType" + i + ".readValueFromPointer(args" + (offset ? ("+"+offset) : "") + ");\n";
offset += types[i + 1]['argPackAdvance'];
}
functionBody +=
" var rv = handle[name](" + argsList + ");\n";
for (var i = 0; i < argCount - 1; ++i) {
if (types[i + 1]['deleteObject']) {
functionBody +=
" argType" + i + ".deleteObject(arg" + i + ");\n";
} }
} }
if (!retType.isVoid) { if (!retType.isVoid) {
functionBody += return retType.toWireType(destructors, rv);
" return retType.toWireType(destructors, rv);\n"; }
} };
functionBody +=
"};\n";
params.push(functionBody);
var invokerFunction = new_(Function, params).apply(null, args);
return __emval_addMethodCaller(invokerFunction); return __emval_addMethodCaller(invokerFunction);
} }
@@ -3903,7 +3853,7 @@ var ASM_CONSTS = {
} }
function _emscripten_get_sbrk_ptr() { function _emscripten_get_sbrk_ptr() {
return 365168; return 375680;
} }
function _emscripten_memcpy_big(dest, src, num) { function _emscripten_memcpy_big(dest, src, num) {
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
+7 -36
View File
@@ -2,45 +2,16 @@ declare module 'external:emscripten/spine/spine.asm.js' {
export default SpineWasm; export default SpineWasm;
} }
declare module 'external:emscripten/spine/spine.wasm.js' {
export default SpineWasm;
}
// tslint:disable
declare function SpineWasm (moduleOptions?: any): Promise<void>; declare function SpineWasm (moduleOptions?: any): Promise<void>;
declare namespace SpineWasm { declare namespace SpineWasm {
type ptr = number;
interface instance { interface instance {
spineWasmInstanceInit(): number; spineWasmInit(): void;
spineWasmInstanceDestroy(): number; spineWasmDestroy(): void;
queryStoreMemory(): ptr;
createSkeletonObject (): ptr;
setSkeletonData(objPtr: ptr, datPtr: ptr);
setAnimation(objPtr: ptr, length: number, trackIndex: number, loop: boolean): boolean;
clearTrack(objPtr: ptr, trackIndex: number): void;
clearTracks(objPtr: ptr): void;
setToSetupPose(objPtr: ptr): void;
setSlotsToSetupPose(objPtr: ptr): void;
setBonesToSetupPose(objPtr: ptr): void;
setTimeScale(objPtr: ptr, timeScale: number): number;
setSkin(objPtr: ptr, length: number): number;
updateAnimation(objPtr: ptr, dltTime: number): number;
setMix(objPtr: ptr, start: number, fromLength: number, toLength: number, duration: number);
setAttachment(objPtr: ptr, start: number, length1: number, length2: number);
updateRenderData(objPtr: ptr): number;
getDrawOrderSize(objPtr: ptr): number;
getSlotNameByOrder(objPtr: ptr, index: number): number;
getBoneMatrix(objPtr: ptr, index: number): number;
queryMemory(size: number): number;
freeMemory(data: ptr);
setDefaultScale(objPtr: ptr, scale: number): boolean;
setVertexEffect(objPtr: ptr, effect: number, effectType: number);
setPremultipliedAlpha(objPtr: ptr, premultipliedAlpha: boolean);
setColor(objPtr: ptr, r: number, g: number, b: number, a: number);
destroyInstance(objPtr: ptr);
retainSkeletonDataByUUID(length: number): number;
initSkeletonData(length: number, isJosn: boolean): number;
recordSkeletonDataUUID(length: number, datPtr: number);
createJitterVertexEffect(x: number, y: number): number;
updateJitterParameters(handle: number, x: number, y: number);
createSwirlVertexEffect(radius: number, power: number, usePowerOut: boolean): number;
updateSwirlParameters(handle: number, centerX: number, centerY: number, radius: number, angle: number);
memory: any;
} }
} }
Binary file not shown.
Regular → Executable
BIN
View File
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
+4 -2
View File
@@ -143,7 +143,8 @@ add_library(glslang-default-resource-limits STATIC IMPORTED GLOBAL)
set_target_properties(glslang-default-resource-limits PROPERTIES set_target_properties(glslang-default-resource-limits PROPERTIES
IMPORTED_LOCATION ${ohos_lib_dir}/libglslang-default-resource-limits.a IMPORTED_LOCATION ${ohos_lib_dir}/libglslang-default-resource-limits.a
) )
set(glslang_libs_name glslang OGLCompiler OSDependent SPIRV glslang-default-resource-limits MachineIndependent GenericCodeGen) # Unable to link MachineIndependent with GenericCodeGen
set(glslang_libs_name glslang OGLCompiler OSDependent SPIRV glslang-default-resource-limits)
if(USE_PHYSICS_PHYSX) if(USE_PHYSICS_PHYSX)
set(PhysXSDK PhysXCooking PhysXCharacterKinematic PhysXVehicle PhysXExtensions PhysX PhysXPvdSDK PhysXCommon PhysXFoundation) set(PhysXSDK PhysXCooking PhysXCharacterKinematic PhysXVehicle PhysXExtensions PhysX PhysXPvdSDK PhysXCommon PhysXFoundation)
@@ -214,7 +215,8 @@ list(APPEND CC_EXTERNAL_INCLUDES
${platform_spec_path}/include/v8 ${platform_spec_path}/include/v8
${platform_spec_path}/include/sqlite ${platform_spec_path}/include/sqlite
${platform_spec_path}/include/png16 ${platform_spec_path}/include/png16
${platform_spec_path}/include/uv # Will conflict with the header file of harmonyos' standard library (error.h).
# ${platform_spec_path}/include/uv
) )
#TODO: remove in future version #TODO: remove in future version
+4 -4
View File
@@ -139,7 +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.4 ) 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.5 )
win64: cocos-v1.1.4 (commit: 9807544) win64: cocos-v1.1.5 (commit: 42543c0)
mac: cocos-v1.1.4 (commit: 9807544) mac: cocos-v1.1.5 (commit: 42543c0)
linux: cocos-v1.1.4 (commit: 9807544) linux: cocos-v1.1.5 (commit: 42543c0)
Binary file not shown.