mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 08:57:54 +00:00
Fixed camera loading by setting layer and updated the proxy scene. (#265)
Updated camera layer on line 499 to fix P1 Loading in a scene bugs out the camera view in trello. Fixed loading because load_glb does not exist anymore and was replaced with loadGlbWithPlaceholderso that is now updated fixed points creation when loading and added rotation and scale. also updated the parimitive loading because it returns an object and we need a UUID
This commit is contained in:
1 parent
24cb2906c6
commit
45bbdaf89c
2 files changed
+5
-2
No files matched your search
@@ -496,6 +496,7 @@ class Editor {
|
||||
);
|
||||
await proxyScene.loadFromSceneJson(scene_json["scene"]);
|
||||
this.cam_obj = this.activeScene.get_object_by_name(this.camera_name);
|
||||
this.cam_obj?.layers.set(1);
|
||||
|
||||
const proxyTimeline = new StoryTellerProxyTimeline(
|
||||
this.version,
|
||||
|
||||
@@ -69,7 +69,7 @@ export class StoryTellerProxyScene {
|
||||
let obj;
|
||||
switch (token) {
|
||||
case "Parim":
|
||||
let prim_uuid = this.scene.instantiate(json_object.object_name);
|
||||
let prim_uuid = this.scene.instantiate(json_object.object_name).uuid;
|
||||
obj = this.scene.get_object_by_uuid(prim_uuid);
|
||||
break;
|
||||
case "DirectionalLight":
|
||||
@@ -77,10 +77,12 @@ export class StoryTellerProxyScene {
|
||||
break;
|
||||
default:
|
||||
if (token.includes("m_")) {
|
||||
obj = await this.scene.load_glb(token);
|
||||
obj = await this.scene.loadGlbWithPlaceholder(token, json_object.object_name);
|
||||
} else if (token.includes("Point::")) {
|
||||
let keyframe_uuid = token.replace("Point::", "");
|
||||
obj = this.scene.createPoint(
|
||||
new THREE.Vector3(0, 0, 0),
|
||||
new THREE.Vector3(0, 0, 0),
|
||||
new THREE.Vector3(0, 0, 0),
|
||||
keyframe_uuid,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user