change animation metadata def
parent
583844b880
commit
f72166f9b6
|
@ -1,6 +1,6 @@
|
||||||
import { IFramePinData } from './IFramePinData';
|
import { IPositionData } from './IPositionData';
|
||||||
|
|
||||||
export interface IFrame {
|
export interface IFrame {
|
||||||
filename: string;
|
filename: string;
|
||||||
pinData: IFramePinData;
|
pinData: IPositionData[];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
export interface IFramePinData {
|
|
||||||
[id: number]: {
|
|
||||||
x: number;
|
|
||||||
y: number;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
export interface IPositionData {
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
import { IAnimationData } from './Interfaces/IAnimationData';
|
import { IAnimationData } from './Interfaces/IAnimationData';
|
||||||
import { IFramePinData } from './Interfaces/IFramePinData';
|
|
||||||
import { IProjectData } from './Interfaces/IProjectData';
|
import { IProjectData } from './Interfaces/IProjectData';
|
||||||
|
|
||||||
// I display the canvas and am clickable
|
// I display the canvas and am clickable
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { IAnimationData } from './Interfaces/IAnimationData';
|
import { IAnimationData } from './Interfaces/IAnimationData';
|
||||||
import { IFramePinData } from './Interfaces/IFramePinData';
|
|
||||||
import { IProjectData } from './Interfaces/IProjectData';
|
import { IProjectData } from './Interfaces/IProjectData';
|
||||||
|
|
||||||
export class FrameHandler {
|
export class FrameHandler {
|
||||||
|
|
|
@ -45,7 +45,7 @@ export class Page {
|
||||||
frames: [
|
frames: [
|
||||||
{
|
{
|
||||||
filename: '',
|
filename: '',
|
||||||
pinData: {}
|
pinData: []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
loop: true,
|
loop: true,
|
||||||
|
@ -316,7 +316,7 @@ export class Page {
|
||||||
for (let i = 0; i < originalFilenames.length; i++) {
|
for (let i = 0; i < originalFilenames.length; i++) {
|
||||||
newFrames.push({
|
newFrames.push({
|
||||||
filename: originalFilenames[i].toString(),
|
filename: originalFilenames[i].toString(),
|
||||||
pinData: {}
|
pinData: []
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,7 +341,7 @@ export class Page {
|
||||||
this.animationData.originY = null;
|
this.animationData.originY = null;
|
||||||
this.animationData.frameRate = 30;
|
this.animationData.frameRate = 30;
|
||||||
this.animationData.loop = true;
|
this.animationData.loop = true;
|
||||||
this.animationData.frames = [ { filename: '', pinData: {} } ];
|
this.animationData.frames = [ { filename: '', pinData: [] } ];
|
||||||
|
|
||||||
// blank slate canvas data
|
// blank slate canvas data
|
||||||
this.projectData.currentFrame = 0;
|
this.projectData.currentFrame = 0;
|
||||||
|
|
|
@ -8,7 +8,7 @@ module.exports = {
|
||||||
main: [ './index.ts' ]
|
main: [ './index.ts' ]
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: 'exporter/bundle.js'
|
filename: 'bundle.js'
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
// Add `.ts` and `.tsx` as a resolvable extension.
|
// Add `.ts` and `.tsx` as a resolvable extension.
|
||||||
|
@ -16,7 +16,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: 'exporter/main.css'
|
filename: 'main.css'
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
module: {
|
module: {
|
||||||
|
|
Loading…
Reference in New Issue