Laitool v3.0.1-preview.1
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user