/**
 * Created by rockyl on 2019-01-04.
 *
 * 缩放组件
 */

import {Vector2D} from "scilla";
import Translation from "./Translation";

export default class Zoom extends Translation {
	fromScale = new Vector2D(0, 0);
	toScale = new Vector2D(1, 1);

	protected getFromProp(): any {
		return {
			scale: this.fromScale ? this.fromScale.toObj() : null
		};
	}

	protected getToProp(): any {
		return {
			scale: this.toScale ? this.toScale.toObj() : null
		};
	}
}
