Moved to type script for the main editor

This commit is contained in:
Michael Chung committed 2024-03-27 18:35:54 -04:00
1 parent e7df8148c3
commit 9d78b550b8
2 files changed
+8 -7

No files matched your search

+1 -1
View File
@@ -61,7 +61,7 @@ class APIManager {
return new APIManagerResponseSuccess("Scene Saved")
}
public async loadSceneState(scene_media_file_token: string): Promise<THREE.Scene> {
public async loadSceneState(scene_media_file_token: string | null): Promise<THREE.Scene> {
const api_base_url = "https://api.fakeyou.com"
const url = `${api_base_url}/v1/media_files/file/${scene_media_file_token}`
const response = await fetch(url)
+7 -6
View File
@@ -52,7 +52,7 @@ class Editor {
outlinePass: OutlinePass | undefined;
last_cam_pos: THREE.Vector3 | undefined;
saoPass: SAOPass | undefined;
outputPass: OutlinePass | undefined;
outputPass: OutputPass | undefined;
bloomPass: UnrealBloomPass | undefined;
smaaPass: SMAAPass | undefined;
bokehPass: BokehPass | undefined;
@@ -170,10 +170,10 @@ class Editor {
// Initializes the main scene and ThreeJS essentials.
initialize(config:any) {
console.log(
"Calling Initialize",
);
if (this.can_initialize == false) {
console.log(
"Editor Already Initialized",
);
return;
}
this.can_initialize = false;
@@ -194,6 +194,7 @@ class Editor {
canvas: this.canvReference,
preserveDrawingBuffer: true,
});
this.renderer.shadowMap.enabled = true;
this.clock = new THREE.Clock();
// Resizes the renderer.
@@ -465,8 +466,8 @@ class Editor {
this.composer.addPass(this.smaaPass);
this.composer.addPass(this.bokehPass);
//this.outputPass = new OutputPass()
//this.composer.addPass(this.outputPass)
this.outputPass = new OutputPass()
this.composer.addPass(this.outputPass)
}
create_parim(name: string) {