From f72166f9b6852af3243f90f96c83b885d4e5172c Mon Sep 17 00:00:00 2001 From: thatcosmonaut Date: Thu, 12 Dec 2019 12:09:00 -0800 Subject: [PATCH] change animation metadata def --- app/Interfaces/IFrame.ts | 4 ++-- app/Interfaces/IFramePinData.ts | 6 ------ app/Interfaces/IPositionData.ts | 4 ++++ app/canvas_handler.ts | 1 - app/frame_handler.ts | 1 - app/page.ts | 6 +++--- webpack/dev.config.js | 4 ++-- 7 files changed, 11 insertions(+), 15 deletions(-) delete mode 100644 app/Interfaces/IFramePinData.ts create mode 100644 app/Interfaces/IPositionData.ts diff --git a/app/Interfaces/IFrame.ts b/app/Interfaces/IFrame.ts index a2fc666..5eaebc2 100644 --- a/app/Interfaces/IFrame.ts +++ b/app/Interfaces/IFrame.ts @@ -1,6 +1,6 @@ -import { IFramePinData } from './IFramePinData'; +import { IPositionData } from './IPositionData'; export interface IFrame { filename: string; - pinData: IFramePinData; + pinData: IPositionData[]; } diff --git a/app/Interfaces/IFramePinData.ts b/app/Interfaces/IFramePinData.ts deleted file mode 100644 index a2b9431..0000000 --- a/app/Interfaces/IFramePinData.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface IFramePinData { - [id: number]: { - x: number; - y: number; - }; -} diff --git a/app/Interfaces/IPositionData.ts b/app/Interfaces/IPositionData.ts new file mode 100644 index 0000000..b01a663 --- /dev/null +++ b/app/Interfaces/IPositionData.ts @@ -0,0 +1,4 @@ +export interface IPositionData { + x: number; + y: number; +} diff --git a/app/canvas_handler.ts b/app/canvas_handler.ts index 3cbd665..4453006 100644 --- a/app/canvas_handler.ts +++ b/app/canvas_handler.ts @@ -1,5 +1,4 @@ import { IAnimationData } from './Interfaces/IAnimationData'; -import { IFramePinData } from './Interfaces/IFramePinData'; import { IProjectData } from './Interfaces/IProjectData'; // I display the canvas and am clickable diff --git a/app/frame_handler.ts b/app/frame_handler.ts index aadd20a..bc2d0e1 100644 --- a/app/frame_handler.ts +++ b/app/frame_handler.ts @@ -1,5 +1,4 @@ import { IAnimationData } from './Interfaces/IAnimationData'; -import { IFramePinData } from './Interfaces/IFramePinData'; import { IProjectData } from './Interfaces/IProjectData'; export class FrameHandler { diff --git a/app/page.ts b/app/page.ts index 1d8d331..b86b022 100644 --- a/app/page.ts +++ b/app/page.ts @@ -45,7 +45,7 @@ export class Page { frames: [ { filename: '', - pinData: {} + pinData: [] } ], loop: true, @@ -316,7 +316,7 @@ export class Page { for (let i = 0; i < originalFilenames.length; i++) { newFrames.push({ filename: originalFilenames[i].toString(), - pinData: {} + pinData: [] }); } @@ -341,7 +341,7 @@ export class Page { this.animationData.originY = null; this.animationData.frameRate = 30; this.animationData.loop = true; - this.animationData.frames = [ { filename: '', pinData: {} } ]; + this.animationData.frames = [ { filename: '', pinData: [] } ]; // blank slate canvas data this.projectData.currentFrame = 0; diff --git a/webpack/dev.config.js b/webpack/dev.config.js index 5669c14..c3f8b12 100644 --- a/webpack/dev.config.js +++ b/webpack/dev.config.js @@ -8,7 +8,7 @@ module.exports = { main: [ './index.ts' ] }, output: { - filename: 'exporter/bundle.js' + filename: 'bundle.js' }, resolve: { // Add `.ts` and `.tsx` as a resolvable extension. @@ -16,7 +16,7 @@ module.exports = { }, plugins: [ new MiniCssExtractPlugin({ - filename: 'exporter/main.css' + filename: 'main.css' }) ], module: {