mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 01:18:34 +00:00
REmoved uuids for clips
This commit is contained in:
1 parent
a5f9a3eb3f
commit
fd15dd2eec
5 files changed
+45
-50
No files matched your search
@@ -1,41 +1,43 @@
|
||||
export interface AnimationTrackClip {
|
||||
version: number;
|
||||
uuid: number;
|
||||
media_id: number; // comes from the server
|
||||
type: "animation";
|
||||
speed: number;
|
||||
length: number;
|
||||
clip_name: string;
|
||||
}
|
||||
version: number;
|
||||
media_id: number; // comes from the server
|
||||
type: "animation";
|
||||
speed: number;
|
||||
length: number;
|
||||
clip_name: string;
|
||||
}
|
||||
|
||||
export class AnimationTrackClip implements AnimationTrackClip {
|
||||
version: number;
|
||||
uuid: number;
|
||||
media_id: number; // comes from the server
|
||||
type: "animation";
|
||||
speed: number;
|
||||
length: number;
|
||||
clip_name: string;
|
||||
|
||||
constructor(version: number, uuid: number, media_id: number, speed: number, length: number, clip_name: string) {
|
||||
this.version = version;
|
||||
this.uuid = uuid;
|
||||
this.media_id = media_id;
|
||||
this.type = "animation";
|
||||
this.speed = speed;
|
||||
this.length = length;
|
||||
this.clip_name = clip_name;
|
||||
}
|
||||
|
||||
toJSON(): string {
|
||||
return JSON.stringify({
|
||||
version: this.version,
|
||||
uuid: this.uuid,
|
||||
media_id: this.media_id,
|
||||
type: this.type,
|
||||
speed: this.speed,
|
||||
length: this.length,
|
||||
clip_name: this.clip_name,
|
||||
});
|
||||
}
|
||||
}
|
||||
version: number;
|
||||
media_id: number; // comes from the server
|
||||
type: "animation";
|
||||
speed: number;
|
||||
length: number;
|
||||
clip_name: string;
|
||||
|
||||
constructor(
|
||||
version: number,
|
||||
media_id: number,
|
||||
speed: number,
|
||||
length: number,
|
||||
clip_name: string,
|
||||
) {
|
||||
this.version = version;
|
||||
this.media_id = media_id;
|
||||
this.type = "animation";
|
||||
this.speed = speed;
|
||||
this.length = length;
|
||||
this.clip_name = clip_name;
|
||||
}
|
||||
|
||||
toJSON(): string {
|
||||
return JSON.stringify({
|
||||
version: this.version,
|
||||
media_id: this.media_id,
|
||||
type: this.type,
|
||||
speed: this.speed,
|
||||
length: this.length,
|
||||
clip_name: this.clip_name,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
export interface AudioTrackClip {
|
||||
version: number;
|
||||
uuid: number;
|
||||
media_id: number;
|
||||
type: "audio";
|
||||
volume: number;
|
||||
@@ -8,14 +7,12 @@ export interface AudioTrackClip {
|
||||
|
||||
export class AudioTrackClipClass implements AudioTrackClip {
|
||||
version: number;
|
||||
uuid: number;
|
||||
media_id: number;
|
||||
type: "audio";
|
||||
volume: number;
|
||||
|
||||
constructor(version: number, uuid: number, media_id: number, volume: number) {
|
||||
constructor(version: number, media_id: number, volume: number) {
|
||||
this.version = version;
|
||||
this.uuid = uuid;
|
||||
this.media_id = media_id;
|
||||
this.type = "audio";
|
||||
this.volume = volume;
|
||||
@@ -24,7 +21,6 @@ export class AudioTrackClipClass implements AudioTrackClip {
|
||||
toJSON(): string {
|
||||
return JSON.stringify({
|
||||
version: this.version,
|
||||
uuid: this.uuid,
|
||||
media_id: this.media_id,
|
||||
type: this.type,
|
||||
volume: this.volume,
|
||||
|
||||
@@ -6,7 +6,6 @@ export interface Vector3 {
|
||||
|
||||
export interface TransformTrackClip {
|
||||
version: number;
|
||||
uuid: number;
|
||||
media_id: number;
|
||||
type: "transform";
|
||||
position: Vector3[];
|
||||
@@ -16,16 +15,14 @@ export interface TransformTrackClip {
|
||||
|
||||
export class TransformTrackClipClass implements TransformTrackClip {
|
||||
version: number;
|
||||
uuid: number;
|
||||
media_id: number;
|
||||
type: "transform";
|
||||
position: Vector3[];
|
||||
rotation: Vector3[];
|
||||
scale: Vector3[];
|
||||
|
||||
constructor(version: number, uuid: number, media_id: number, position: Vector3[], rotation: Vector3[], scale: Vector3[]) {
|
||||
constructor(version: number, media_id: number, position: Vector3[], rotation: Vector3[], scale: Vector3[]) {
|
||||
this.version = version;
|
||||
this.uuid = uuid;
|
||||
this.media_id = media_id;
|
||||
this.type = "transform";
|
||||
this.position = position;
|
||||
@@ -36,7 +33,6 @@ export class TransformTrackClipClass implements TransformTrackClip {
|
||||
toJSON(): string {
|
||||
return JSON.stringify({
|
||||
version: this.version,
|
||||
uuid: this.uuid,
|
||||
media_id: this.media_id,
|
||||
type: this.type,
|
||||
position: this.position,
|
||||
|
||||
@@ -96,8 +96,6 @@ export class Timeline implements Timeline {
|
||||
toJSON(): string {
|
||||
return JSON.stringify(this);
|
||||
}
|
||||
|
||||
|
||||
// For testing purposes
|
||||
static generateMockJson(): string {
|
||||
const mock = {
|
||||
|
||||
@@ -14,6 +14,9 @@ class MediaUploadManager {
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
|
||||
// two core functions to upload things to the server and get id's
|
||||
async uploadMedia(blob:any, fileName:string):Promise<string> {
|
||||
const url = `${this.baseUrl}/v1/media_uploads/upload`;
|
||||
let uuid = uuidv4();
|
||||
|
||||
Reference in new issue
Block a user