blessing-skin-server/resources/assets/tests/__mocks__/skinview3d.ts

54 lines
998 B
TypeScript
Raw Normal View History

2019-03-18 09:55:24 +08:00
/* eslint-disable max-params */
2019-03-15 11:42:41 +08:00
/* eslint-disable max-classes-per-file */
2020-05-16 22:05:16 +08:00
import { PlayerObject, SkinObject, CapeObject } from 'skinview3d'
2019-03-15 11:42:41 +08:00
2018-07-27 09:54:23 +08:00
export class SkinViewer {
2019-03-18 09:55:24 +08:00
disposed: boolean
skinUrl: string
capeUrl: string
animationPaused: boolean
camera: { position: { z: number } }
2019-03-31 16:31:42 +08:00
playerObject: PlayerObject
2019-03-15 11:42:41 +08:00
constructor() {
2019-03-18 09:55:24 +08:00
this.skinUrl = ''
this.capeUrl = ''
this.disposed = false
2019-03-15 11:42:41 +08:00
this.animationPaused = false
this.camera = {
2019-03-18 09:55:24 +08:00
position: {
z: 0,
},
2018-07-27 09:54:23 +08:00
}
2019-03-31 16:31:42 +08:00
this.playerObject = {
skin: {} as SkinObject,
cape: {} as CapeObject,
2020-01-13 17:19:34 +08:00
} as PlayerObject
2019-03-15 11:42:41 +08:00
}
2018-07-27 09:54:23 +08:00
2019-03-15 11:42:41 +08:00
dispose() {
this.disposed = true
}
2018-07-27 09:54:23 +08:00
}
export class CompositeAnimation {
2019-03-18 09:55:24 +08:00
add(animation: any) {
2019-03-15 11:42:41 +08:00
return animation
}
2018-07-27 09:54:23 +08:00
}
export function createOrbitControls() {}
2019-03-15 11:42:41 +08:00
export const WalkingAnimation = { paused: false }
export const RunningAnimation = { paused: false }
export const RotatingAnimation = { paused: false }
export function isSlimSkin() {
return false
}