mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 17:58:55 +00:00
Remove noise from logging while keeping other noise out of the loop (#633)
This commit is contained in:
1 parent
ff4c583d0a
commit
00c697f0ff
11 files changed
+41
-35
No files matched your search
@@ -25,7 +25,7 @@ export const OpenDialog: Story = {
|
||||
label: "Open Dialog",
|
||||
description: "Desc 1",
|
||||
onDialogOpen: () => {
|
||||
console.log("Opened Dialog");
|
||||
//console.log("Opened Dialog");
|
||||
},
|
||||
dialogProps: {
|
||||
title: "Dialog Title",
|
||||
@@ -34,7 +34,7 @@ export const OpenDialog: Story = {
|
||||
label: "Create",
|
||||
disabled: false,
|
||||
onClick: () => {
|
||||
console.log("Action on Dialog");
|
||||
//console.log("Action on Dialog");
|
||||
},
|
||||
},
|
||||
closeButtonProps: {
|
||||
@@ -42,7 +42,7 @@ export const OpenDialog: Story = {
|
||||
},
|
||||
showClose: true,
|
||||
onClose: () => {
|
||||
console.log("Closed Dialog");
|
||||
//console.log("Closed Dialog");
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -66,7 +66,7 @@ export const ClickEvent: Story = {
|
||||
label: "Click Event",
|
||||
description: "Desc",
|
||||
onClick: () => {
|
||||
console.log("Clicked");
|
||||
//console.log("Clicked");
|
||||
},
|
||||
},
|
||||
]}
|
||||
|
||||
@@ -273,7 +273,7 @@ export class APIManager {
|
||||
throw new APIManagerResponseError("Upload Media Failed to send file");
|
||||
} else {
|
||||
const json_data = await response.json();
|
||||
console.log(`uploadMedia: ${JSON.stringify(json_data)}`);
|
||||
//console.log(`uploadMedia: ${JSON.stringify(json_data)}`);
|
||||
return json_data;
|
||||
}
|
||||
}
|
||||
@@ -326,7 +326,7 @@ export class APIManager {
|
||||
throw new APIManagerResponseError("Upload Media Failed to send file");
|
||||
} else {
|
||||
const json_data = await response.json();
|
||||
console.log(`uploadMedia: ${JSON.stringify(json_data)}`);
|
||||
//console.log(`uploadMedia: ${JSON.stringify(json_data)}`);
|
||||
return json_data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ class Editor {
|
||||
this.control.setScaleSnap(0.01);
|
||||
this.control.setTranslationSnap(0.01);
|
||||
this.control.setRotationSnap(0.01);
|
||||
console.log("Control Sensitivity:", this.control.sensitivity);
|
||||
//console.log("Control Sensitivity:", this.control.sensitivity);
|
||||
|
||||
// Base control and debug stuff remove debug in prod.
|
||||
if (this.control == undefined) {
|
||||
@@ -895,7 +895,7 @@ class Editor {
|
||||
} else if (this.renderer && this.render_camera && !this.rendering) {
|
||||
this.renderer.setSize(this.render_width, this.render_height);
|
||||
this.renderer.render(this.activeScene.scene, this.render_camera);
|
||||
} else if (this.rendering && this.renderer){
|
||||
} else if (this.rendering && this.renderer) {
|
||||
this.renderer.setSize(this.render_width, this.render_height);
|
||||
}
|
||||
|
||||
@@ -1116,7 +1116,7 @@ class Editor {
|
||||
|
||||
// This initializes the generation of a video render scene is where the core work happens
|
||||
generateVideo() {
|
||||
console.log("Generating video...", this.frame_buffer);
|
||||
console.log("Generating Video", this.frame_buffer);
|
||||
|
||||
this.timeline.is_playing = false;
|
||||
this.timeline.scrubber_frame_position = 0;
|
||||
|
||||
@@ -55,7 +55,7 @@ export class Utils {
|
||||
}
|
||||
return object.userData["locked"];
|
||||
}
|
||||
console.log("No object found.");
|
||||
//console.log("No object found.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ export class Utils {
|
||||
|
||||
return object.userData["locked"];
|
||||
}
|
||||
console.log("No object found.");
|
||||
//console.log("No object found.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -152,10 +152,16 @@ export class Utils {
|
||||
});
|
||||
}
|
||||
|
||||
// Make a better solution later but for now this is so that in camera mode when you right click it does not bring up the context menu and allows you to pan.
|
||||
setTimeout( () => document.getElementById("letterbox")?.addEventListener("contextmenu", function (event) {
|
||||
event.preventDefault();
|
||||
}), 250);
|
||||
// Make a better solution later but for now this is so that in camera mode when you right click it does not bring up the context menu and allows you to pan.
|
||||
setTimeout(
|
||||
() =>
|
||||
document
|
||||
.getElementById("letterbox")
|
||||
?.addEventListener("contextmenu", function (event) {
|
||||
event.preventDefault();
|
||||
}),
|
||||
250,
|
||||
);
|
||||
} else if (this.editor.camera) {
|
||||
this.editor.camera.position.copy(this.editor.last_cam_pos);
|
||||
this.editor.camera.rotation.copy(this.editor.last_cam_rot);
|
||||
|
||||
@@ -178,7 +178,7 @@ export class TimeLine {
|
||||
const result = this.editorEngine.sceneManager?.render_outliner(
|
||||
this.characters,
|
||||
);
|
||||
console.log(result);
|
||||
//console.log(result);
|
||||
if (result) outlinerState.items.value = result.items;
|
||||
break;
|
||||
}
|
||||
@@ -635,7 +635,7 @@ export class TimeLine {
|
||||
|
||||
// should play from the clip that is closest to the to scrubber
|
||||
public async play(): Promise<void> {
|
||||
console.log(`Starting Timeline`);
|
||||
console.log(`Play - Starting Timeline`);
|
||||
this.is_playing = true;
|
||||
}
|
||||
|
||||
@@ -806,7 +806,7 @@ export class TimeLine {
|
||||
private async stop(): Promise<void> {
|
||||
await this.resetScene();
|
||||
this.is_playing = false;
|
||||
console.log(`Stopping Timeline`);
|
||||
console.log(`Stop - Stopping Timeline`);
|
||||
this.current_time = 0;
|
||||
this.pushEvent(fromEngineActions.UPDATE_TIME, {
|
||||
currentTime: this.current_time,
|
||||
|
||||
@@ -344,7 +344,7 @@ export class VideoGeneration {
|
||||
immutable_media_token = response.data;
|
||||
}
|
||||
} else {
|
||||
console.log("ERROR:");
|
||||
//console.log("ERROR:");
|
||||
console.log(response.errorMessage);
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ export class VideoGeneration {
|
||||
}
|
||||
|
||||
await this.sleep(2000); // TODO: REMOVE THIS WHEN TOO MANY REQUESTS ERROR IS SOLVED.
|
||||
console.log("Waiting for server to catch up...");
|
||||
//console.log("Waiting for server to catch up...");
|
||||
}
|
||||
|
||||
this.editor.onWindowResize();
|
||||
@@ -386,10 +386,10 @@ export class VideoGeneration {
|
||||
console.log(upload_tokens);
|
||||
this.editor.setColorMap();
|
||||
|
||||
console.log("https://storyteller.ai/media/" + upload_tokens.color);
|
||||
console.log("https://storyteller.ai/media/" + upload_tokens.normal);
|
||||
console.log("https://storyteller.ai/media/" + upload_tokens.depth);
|
||||
console.log("https://storyteller.ai/media/" + upload_tokens.outline);
|
||||
// console.log("https://storyteller.ai/media/" + upload_tokens.color);
|
||||
// console.log("https://storyteller.ai/media/" + upload_tokens.normal);
|
||||
// console.log("https://storyteller.ai/media/" + upload_tokens.depth);
|
||||
// console.log("https://storyteller.ai/media/" + upload_tokens.outline);
|
||||
|
||||
await this.editor.api_manager
|
||||
.stylizeVideo({
|
||||
@@ -443,7 +443,6 @@ export class VideoGeneration {
|
||||
});
|
||||
this.editor._configurePostProcessingRaw();
|
||||
|
||||
|
||||
this.editor.activeScene.renderMode(false);
|
||||
|
||||
this.editor.switchEdit();
|
||||
|
||||
@@ -13,7 +13,7 @@ export const TestFeaturesButtons = ({ debug }: { debug: boolean }) => {
|
||||
};
|
||||
const testStylizeRequest = () => {
|
||||
// editorEngine?.testStylizeRequest();
|
||||
console.log("editorEnging does not have testStylizeRequest");
|
||||
//console.log("editorEnging does not have testStylizeRequest");
|
||||
};
|
||||
const handleButtonRender = () => {
|
||||
editorEngine?.generateVideo();
|
||||
@@ -21,12 +21,13 @@ export const TestFeaturesButtons = ({ debug }: { debug: boolean }) => {
|
||||
|
||||
const handleButtonTakeFrame = () => {
|
||||
// editorEngine?.take_timeline_cam_clip();
|
||||
console.log("editorEnging does not have take_timeline_cam_clip");
|
||||
//console.log("editorEnging does not have take_timeline_cam_clip");
|
||||
};
|
||||
|
||||
const handleButtonSingleFrame = () => {
|
||||
editorEngine?.generateFrame();
|
||||
};
|
||||
|
||||
const handleButtonPlayBack = () => {
|
||||
editorEngine?.togglePlayback();
|
||||
};
|
||||
|
||||
@@ -38,13 +38,13 @@ const OutlinerItem = ({ item }: { item: SceneObject }) => {
|
||||
// Delete object logic here
|
||||
const handleDeleteKeyPress = (event: React.KeyboardEvent<HTMLDivElement>) => {
|
||||
if (event.key === "Delete") {
|
||||
console.log("Delete key pressed for item:", item.id);
|
||||
//console.log("Delete key pressed for item:", item.id);
|
||||
}
|
||||
};
|
||||
|
||||
// Double click logic here
|
||||
const handleDoubleClick = () => {
|
||||
console.log("Item double clicked:", item.id);
|
||||
//console.log("Item double clicked:", item.id);
|
||||
editorEngine?.sceneManager?.double_click();
|
||||
};
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@ export class AudioClip {
|
||||
const api_base_url = environmentVariables.values.BASE_API;
|
||||
const url = `${api_base_url}/v1/media_files/file/${this.media_id}`;
|
||||
|
||||
console.log(`API BASE URL? ${api_base_url}`);
|
||||
console.log(`CALLED URL? ${url}`);
|
||||
//console.log(`API BASE URL? ${api_base_url}`);
|
||||
//console.log(`CALLED URL? ${url}`);
|
||||
const response = await fetch(url);
|
||||
const json = await JSON.parse(await response.text());
|
||||
const bucketPath = json["media_file"]["public_bucket_path"];
|
||||
|
||||
@@ -27,8 +27,8 @@ export class EmotionClip {
|
||||
const api_base_url = environmentVariables.values.BASE_API;
|
||||
const url = `${api_base_url}/v1/media_files/file/${this.media_id}`;
|
||||
|
||||
console.log(`API BASE URL? ${api_base_url}`);
|
||||
console.log(`CALLED URL? ${url}`);
|
||||
//console.log(`API BASE URL? ${api_base_url}`);
|
||||
//console.log(`CALLED URL? ${url}`);
|
||||
|
||||
const response = await fetch(url);
|
||||
const json = await JSON.parse(await response.text());
|
||||
|
||||
@@ -44,7 +44,7 @@ export function useQueueHandler() {
|
||||
|
||||
const handleFromEngineActions = useCallback(
|
||||
({ action, data }: QueueSubscribeType) => {
|
||||
console.log("FROM ENGINE", action, data);
|
||||
//console.log("FROM ENGINE", action, data);
|
||||
switch (action) {
|
||||
case fromEngineActions.ADD_OBJECT: {
|
||||
// this could be an object or character
|
||||
@@ -99,7 +99,7 @@ export function useQueueHandler() {
|
||||
|
||||
const handleToTimelineActions = useCallback(
|
||||
({ action, data }: QueueSubscribeType) => {
|
||||
console.log("TO TIMELINE", action, data);
|
||||
//console.log("TO TIMELINE", action, data);
|
||||
switch (action) {
|
||||
case toTimelineActions.ADD_KEYFRAME:
|
||||
addKeyframe(data as QueueKeyframe, currentTime.value);
|
||||
|
||||
Reference in new issue
Block a user