开发:优化api打包流程脚本

pull/2388/head
ChenX 1 year ago
parent 66555d40ce
commit d608ce85a7

@ -2,7 +2,7 @@
"compilerOptions": {
"sourceMap": true,
"module": "CommonJS",
"target": "ES2019",
"target": "esnext",
"noLib": false,
"moduleResolution": "node",
"skipLibCheck": true,
@ -23,9 +23,9 @@
"experimentalDecorators": true
},
"include": [
"./src/**/*"
"./src/ueapi.ts"
],
"exclude": [
"./src/Add-on/*"
"./src/Add-on/**/*"
]
}

@ -0,0 +1,31 @@
{
"compilerOptions": {
"sourceMap": true,
"module": "CommonJS",
"target": "esnext",
"noLib": false,
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowJs": true,
"outDir": "./dist",
"lib": [
"esnext",
"dom"
],
"types": [
"node",
"webpack-env",
"webpack-dev-server",
"jest"
],
"jsx": "react",
"experimentalDecorators": true
},
"include": [
"./src/api.ts"
],
"exclude": [
"./src/Add-on/**/*"
]
}

@ -12,7 +12,7 @@
"build": "webpack --config ./config/webpack.prod.ts && ts-node ./utils/log.ts && ts-node ./utils/publish.ts",
"api-test": "webpack --config ./config/webcadapi.umd.config.ts --display-modules",
"api": "ts-node ./utils/gen_api_core.ts && rollup --config ./config/api.rollup.config.js && ts-node ./utils/replace_api_file.ts",
"apid": "tsc --declaration --emitDeclarationOnly --declarationMap --declarationDir ./api/types --project apitsconfig.json",
"apid": "tsc --declaration --emitDeclarationOnly --declarationMap --declarationDir ./api/types --project mes_apitsconfig.json",
"rollup_api": "rollup --config ./config/ue4_api.rollup.config.js",
"rollup_api_d": "tsc --declaration --emitDeclarationOnly --declarationMap --declarationDir ./ue4_api/types --project apitsconfig.json",
"ue4": "rollup --config ./config/ue4_api.rollup.config.js && tsc --declaration --emitDeclarationOnly --declarationMap --declarationDir ./ue4_api/types --project apitsconfig.json && ts-node ./utils/replace_api_file.ts",

@ -247,7 +247,9 @@ export class ExtrudeSolid extends Entity
}
//由于修改矩阵会导致矩阵错误
//del_exp_start
this.csg = undefined;
//del_exp_end
this.AutoUpdate = updateBak;
let te = m.elements;
@ -681,6 +683,7 @@ export class ExtrudeSolid extends Entity
*/
Subtract(extrudes: ExtrudeSolid[], output: ExtrudeSolid[] = undefined, checkIntersect = true): boolean
{
//del_exp_start
if (checkIntersect)
{
let box = this.BoundingBox;
@ -724,6 +727,7 @@ export class ExtrudeSolid extends Entity
}
return true;
}
//del_exp_end
return false;
}
@ -2067,7 +2071,9 @@ export class ExtrudeSolid extends Entity
UpdateDrawGeometry()
{
//del_exp_start
this.csg = undefined;
//del_exp_end
if (this._EdgeGeometry)
this._EdgeGeometry.dispose();
this._EdgeGeometry = undefined;

@ -7,8 +7,8 @@ export class RectAreaLightHelper extends Line
{
light: TRectAreaLight;
color: Color;
material: LineBasicMaterial;
children: [Mesh];
declare material: LineBasicMaterial;
declare children: [Mesh];
BarnDoorLength: number;
BarnDoorAngle: number;

@ -7,9 +7,10 @@ async function main()
fs.rmSync(dir + "types", { recursive: true });
fs.copySync(resolve(__dirname, "../ue4_api"), dir, { overwrite: true, recursive: true });
dir = "E:\\UE_Project\\ArtistRenderer\\node_modules\\webcad_ue4_api\\";
fs.rmSync(dir + "types", { recursive: true });
fs.copySync(resolve(__dirname, "../ue4_api"), dir, { overwrite: true, recursive: true });
// 弃用 使用link:
// dir = "E:\\UE_Project\\ArtistRenderer\\node_modules\\webcad_ue4_api\\";
// fs.rmSync(dir + "types", { recursive: true });
// fs.copySync(resolve(__dirname, "../ue4_api"), dir, { overwrite: true, recursive: true });
}
main();

Loading…
Cancel
Save