Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
remove Live2D
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryPowman committed Aug 14, 2020
1 parent 1ba2d03 commit e04152a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
1 change: 0 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
],
"styles": ["src/styles.scss"],
"scripts": [
"src/app/common/live2d/lib/live2d.min.js",
"node_modules/jquery/dist/jquery.min.js"
]
},
Expand Down
9 changes: 5 additions & 4 deletions src/engine/core/graphics/sprite-animate-director.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as gsap from "gsap";
import { Sprite } from "./sprite";
import { Sprite, AnimatedPropertyKeys } from "./sprite";
import { Scene } from "./scene";
import { isNullOrUndefined } from "../utils";
import { SpriteFilter } from "engine/data/sprite-renderer";
Expand All @@ -14,15 +14,15 @@ export enum AnimateTargetType {

class MacroFrame {
duration?: number = 0;
ease?: gsap.Ease;
[key: string]: any;
}

class SpriteMacroFrame extends MacroFrame {
[key: string]: any;
filters?: SpriteFilter[] = [];
}

class CSSMacroFrame extends MacroFrame {
[key: string]: any;
}

class CameraMacroFrame extends MacroFrame {
Expand Down Expand Up @@ -198,7 +198,8 @@ export class SpriteAnimateDirector {
let duration = (frame.duration || 1) / 1000;

const { ...vars } = frame;
vars.ease = vars.ease || gsap.Power0.easeNone;

vars.ease = vars.ease || gsap.Power0.ease;

// 把相关属性直接设置到 target(sprite)
timeline.add(
Expand Down
2 changes: 1 addition & 1 deletion src/engine/core/graphics/sprite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export enum ResizeMode {
Custom // 自定义大小
}

type AnimatedPropertyKeys =
export type AnimatedPropertyKeys =
| "scale"
| "scaleX"
| "scaleY"
Expand Down
3 changes: 2 additions & 1 deletion src/engine/core/graphics/world.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ class World {
this.app = new PIXI.Application({
width,
height,
antialias: false,
forceFXAA: true,
antialias: true,
preserveDrawingBuffer: true,
transparent: true,
backgroundColor: 0,
Expand Down
4 changes: 2 additions & 2 deletions src/engine/data/sprite-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export class AVGSpriteRenderer {
);

// 修正 X, Y
this.x = +this._position.left;
this.y = +this._position.right;
this.x = +this._position.left
this.y = +this._position.right
}

public get position() {
Expand Down

0 comments on commit e04152a

Please sign in to comment.