PropMap.d.ts 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. import type Component from './Component';
  2. import type { propType } from '../Controller/Decorators';
  3. import type * as THREE from 'three';
  4. import type { Prefab } from './Prefab';
  5. type PropMapValue = string | number | boolean | THREE.Material | THREE.Object3D | THREE.AnimationClip | THREE.Audio | THREE.PositionalAudio | THREE.Color | THREE.Texture | THREE.Vector2 | THREE.Vector3 | Prefab;
  6. export declare class PropMap {
  7. config: {
  8. name: string;
  9. component: Component;
  10. isReadOnly: boolean;
  11. propTypes: propType[] | undefined;
  12. };
  13. elems: {
  14. [key: string]: PropMapValue;
  15. };
  16. constructor(component: Component, name: string, propTypes?: propType[]);
  17. get(key: string): any;
  18. get<T extends string>(key: string): T;
  19. get<T extends number>(key: string): T;
  20. get<T extends boolean>(key: string): T;
  21. get<T extends THREE.Material>(key: string): T;
  22. get<T extends THREE.Object3D>(key: string): T;
  23. get<T extends THREE.AnimationClip>(key: string): T;
  24. get<T extends THREE.Audio>(key: string): T;
  25. get<T extends THREE.PositionalAudio>(key: string): T;
  26. get<T extends THREE.Color>(key: string): T;
  27. get<T extends THREE.Texture>(key: string): T;
  28. get<T extends THREE.Vector2>(key: string): T;
  29. get<T extends THREE.Vector3>(key: string): T;
  30. }
  31. export {};