ComponentsManager.d.ts 1.8 KB

123456789101112131415161718192021222324252627
  1. import { Object3D, Scene } from 'three';
  2. import Component from '../Model/Component';
  3. export declare let components: {
  4. [objectId: string]: Component[];
  5. };
  6. export declare let editorComponents: {
  7. [objectId: string]: Component[];
  8. };
  9. export declare function getComponentPrototypes(): {
  10. [className: string]: typeof Component;
  11. };
  12. export declare function clearComponents(): void;
  13. export declare function registerComponent<T extends Component>(ComponentClass: new (...args: any[]) => T): void;
  14. export declare const initComponents: (scene: Scene, componentsToLoad?: Object | undefined) => void;
  15. export declare const initEditorComponents: (scene: Scene) => void;
  16. export declare function traverseComponents(fn: (component: Component, objectUUID: string, index: number) => void): void;
  17. export declare const loadComponents: (object: Object3D, objectComponents: Component[]) => void;
  18. export declare const setSerializedComponents: (componentsJSON: any) => void;
  19. export declare const serializeComponents: () => {};
  20. export declare const addComponent: (component: Component) => void;
  21. export declare function copyObjectComponents(object: Object3D, target: Object3D): void;
  22. export declare const removeComponent: (component: Component) => boolean | undefined;
  23. export declare const removeComponents: (object3d: Object3D, recursive?: boolean | undefined) => void;
  24. export declare function getComponentByName(name: string, object3d?: Object3D): Component | undefined;
  25. export declare const getComponent: <T extends Component>(ComponentClass: new (...args: any[]) => T, object3d?: Object3D<import("three").Event> | undefined) => T | undefined;
  26. export declare const getComponents: <T extends Component>(ComponentClass: new (...args: any[]) => T) => T[];
  27. export declare const getObjectComponents: (object3d: Object3D) => Component[];