Ok added some console logs for the drag and drop and fixed errors

This commit is contained in:
Michael Chung committed 2024-04-07 17:23:50 -04:00
1 parent c3b434c4b0
commit 6b94519062
3 files changed
+18 -18

No files matched your search

@@ -24,6 +24,8 @@ export const TrackProvider = ({ children }: Props) => {
// cross group functions
const dropClip = useCallback(() => {
console.log(`${canDrop.value} ${dragItem.value} ${dragItem.value.type}`)
if (canDrop.value && dragItem.value) {
if (dragItem.value.type === AssetType.ANIMATION) {
addCharacterAnimation({
@@ -44,6 +46,18 @@ export const TrackProvider = ({ children }: Props) => {
offset: dropOffset.value,
});
}
if (dragItem.value.type === AssetType.CHARACTER) {
console.log("Dragged In Character Type")
}
if (dragItem.value.type === AssetType.CAMERA) {
console.log("Dragged In Camera Type")
}
if (dragItem.value.type === AssetType.OBJECT) {
console.log("Dragged In Object Type")
}
if (dragItem.value.type === AssetType.SHAPE) {
console.log("Dragged In Shape Type")
}
}
endDrag();
}, [endDrag]);
+2 -16
View File
@@ -15,7 +15,7 @@ import { BokehPass } from "three/addons/postprocessing/BokehPass.js";
import { createFFmpeg, fetchFile, FFmpeg } from "@ffmpeg/ffmpeg";
import AudioEngine from "./audio_engine.js";
import TransformEngine from "./transform_engine.js";
import { TimeLine, TimelineDataState } from "./timeline.js";
import { TimeLine } from "./timeline.js";
import { ClipUI } from "../datastructures/clips/clip_ui.js";
import { LipSyncEngine } from "./lip_sync_engine.js";
import { AnimationEngine } from "./animation_engine.js";
@@ -28,21 +28,7 @@ import { XYZ } from "../datastructures/common";
import { StoryTellerProxyScene } from "../proxy/storyteller_proxy_scene";
import { StoryTellerProxyTimeline } from "../proxy/storyteller_proxy_timeline";
class EditorState {
// {
// action: "ShowLoadingIndicator"
// source: "Editor"
// data: { "message" : "saving scene" }
// }
selected_object: THREE.Object3D | undefined;
is_loading: boolean;
constructor() {
this.selected_object;
this.is_loading = false;
}
}
// Main editor class that will call everything else all you need to call is " initialize() ".
class Editor {
version: number;
@@ -1154,7 +1140,7 @@ class Editor {
this.raycaster.setFromCamera(this.mouse, this.camera);
const interactable: any[] = [];
this.activeScene.scene.children.forEach((child: THREE.Object3D) => {
console.log(child);
// console.log(child);
if (child.name != "") {
if (child.type == "Mesh" || child.type == "Object3D") {
interactable.push(child);
+2 -2
View File
@@ -77,14 +77,14 @@ export const audioItems = signal<MediaItem[]>([
export const cameraItems = signal<MediaItem[]>([
{
version: 1,
media_id: "m_w5nn3kjh1fbkmjrdac5b2qaba0pmyt",
media_id: uuid.v4(),
type: AssetType.CAMERA,
name: "Portrait Zoom Out",
thumbnail: "resources/placeholders/placeholder.png",
},
{
version: 1,
media_id: "m_w5nn3kjh1fbkmjrdac5b2qaba0pmyt",
media_id: uuid.v4(),
type: AssetType.CAMERA,
name: "Pan Left and Right",
thumbnail: "resources/placeholders/placeholder.png",