Laitool v3.0.1-preview.1

This commit is contained in:
2024-08-03 12:46:12 +08:00
parent c8a46d59fb
commit 7312053a20
196 changed files with 19822 additions and 8733 deletions
+3 -5
View File
@@ -11,7 +11,7 @@ import { cloneDeep } from "lodash";
const compressing = require("compressing");
export class ClipDraft {
constructor(global, value) {
constructor(global, value, draftName = null) {
this.speedId = null;
this.canvasesId = null;
this.soundChannelId = null;
@@ -33,10 +33,11 @@ export class ClipDraft {
this.global = global;
this.value = value;
this.pm = new PublicMethod(global);
this.draft_name = draftName;
}
async InitData() {
this.draft_name = this.global.config.project_name + '_' + this.value[0];
this.draft_name = this.draft_name ? this.draft_name : this.global.config.project_name + '_' + this.value[0];
let draft_path = path.join(this.global.config.draft_path, this.draft_name);
await fspromises.rm(draft_path, { recursive: true, force: true });
await compressing.zip.uncompress(define.draft_temp_path, path.join(this.global.config.draft_path, this.global.config.project_name + '_' + this.value[0]));
@@ -124,9 +125,6 @@ export class ClipDraft {
materialVideoTmpJson.id = materialId;
// 获取输入的图片宽高
// let image = await Jimp.read(imagePath);
// let width = image.bitmap.width;
// let height = image.bitmap.height;
materialVideoTmpJson.width = 1000;
materialVideoTmpJson.height = 1000;