game objects module
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import decompress from "decompress";
|
||||
import sharp from 'sharp';
|
||||
sharp.cache({ files : 0 });
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
@@ -111,6 +113,7 @@ class GameObjectsManager{
|
||||
let result = await decompress(src, def);
|
||||
object.asset.list = result.map(f=>f.path);
|
||||
object.asset.type = 'bundle';
|
||||
object.asset.name = `${object.id}/` + result.find(f=>f.path.endsWith('.gltf'))?.path;
|
||||
}else{
|
||||
object.asset.type = 'single';
|
||||
await fs.promises.copyFile(src, def + ext);
|
||||
|
||||
Reference in New Issue
Block a user