@vived/app 4.19.0 → 4.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,8 +2,8 @@ import { AppObject, AppObjectEntityRepo, AppObjectRepo } from "../../../AppObjec
|
|
|
2
2
|
import { GlbModelEntity } from "./GlbModelEntity";
|
|
3
3
|
export declare abstract class GlbModelRepo extends AppObjectEntityRepo<GlbModelEntity> {
|
|
4
4
|
static type: string;
|
|
5
|
-
abstract
|
|
6
|
-
abstract
|
|
5
|
+
abstract glbModelFactory(id: string): GlbModelEntity;
|
|
6
|
+
abstract createGlbModel(id?: string): GlbModelEntity;
|
|
7
7
|
static get(appObjects: AppObjectRepo): GlbModelRepo | undefined;
|
|
8
8
|
}
|
|
9
9
|
export declare function makeGlbModelRepo(appObject: AppObject): GlbModelRepo;
|
|
@@ -18,13 +18,13 @@ exports.makeGlbModelRepo = makeGlbModelRepo;
|
|
|
18
18
|
class GlbModelRepoImp extends GlbModelRepo {
|
|
19
19
|
constructor(appObject) {
|
|
20
20
|
super(appObject, GlbModelRepo.type);
|
|
21
|
-
this.
|
|
21
|
+
this.glbModelFactory = (id) => {
|
|
22
22
|
const ao = this.appObjects.getOrCreate(id);
|
|
23
23
|
return GlbModelEntity_1.makeGlbModelEntity(ao);
|
|
24
24
|
};
|
|
25
|
-
this.
|
|
25
|
+
this.createGlbModel = (id) => {
|
|
26
26
|
const idToUse = id !== null && id !== void 0 ? id : Utilities_1.generateUniqueID();
|
|
27
|
-
const object = this.
|
|
27
|
+
const object = this.glbModelFactory(idToUse);
|
|
28
28
|
this.add(object);
|
|
29
29
|
return object;
|
|
30
30
|
};
|