MD2Character.d.ts 838 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import {
  2. Object3D,
  3. Mesh,
  4. Texture,
  5. AnimationMixer
  6. } from '../../../src/Three';
  7. export interface MD2PartsConfig {
  8. baseUrl: string,
  9. body: string,
  10. skins: string[],
  11. weapons: [string, string][],
  12. }
  13. export class MD2Character {
  14. constructor();
  15. scale: number;
  16. animationFPS: number;
  17. root: Object3D;
  18. meshBody: Mesh | null;
  19. meshWeapon: Mesh | null;
  20. skinsBody: Texture[];
  21. skinsWeapon: Texture[];
  22. weapons: Mesh[];
  23. activeAnimation: string | null;
  24. mixer: AnimationMixer | null;
  25. loadCounter: number;
  26. onLoadComplete(): void;
  27. loadParts( config: MD2PartsConfig ): void;
  28. setPlaybackRate( rate: number ): void;
  29. setWireframe( wireframeEnabled: boolean ): void;
  30. setSkin( index: number ): void;
  31. setWeapon( index: number ): void;
  32. setAnimation( clipName: string ): void;
  33. syncWeaponAnimation(): void;
  34. update( delta: number ): void;
  35. }