change animation metadata def

pull/2/head
thatcosmonaut 2019-12-12 12:09:00 -08:00
parent 583844b880
commit f72166f9b6
7 changed files with 11 additions and 15 deletions

View File

@ -1,6 +1,6 @@
import { IFramePinData } from './IFramePinData';
import { IPositionData } from './IPositionData';
export interface IFrame {
filename: string;
pinData: IFramePinData;
pinData: IPositionData[];
}

View File

@ -1,6 +0,0 @@
export interface IFramePinData {
[id: number]: {
x: number;
y: number;
};
}

View File

@ -0,0 +1,4 @@
export interface IPositionData {
x: number;
y: number;
}

View File

@ -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

View File

@ -1,5 +1,4 @@
import { IAnimationData } from './Interfaces/IAnimationData';
import { IFramePinData } from './Interfaces/IFramePinData';
import { IProjectData } from './Interfaces/IProjectData';
export class FrameHandler {

View File

@ -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;

View File

@ -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: {