import { Entity } from "./Entity" ; import { Component } from "./Component" ; export interface TranslatedEntityReferences { [ entityId ] : { [ componentType ] : { [ propertyName ] : any ; } ; } ; } export interface IEntityUtils { preserveWorldPosition : ( entity : Entity , newParent : Entity ) => void ; updateLayoutMatrixIfNecessary : ( entity : Entity ) => void ; dirtifyWorldMatrixIfNecessary : ( entity : Entity ) => void ; translateReferences : ( entity : Entity , oldIdToNewId : { } , translatedRefs ? : TranslatedEntityReferences ) => void ; sortComponents : ( components : Component [ ] ) => Component [ ] ; } namespace Private { export let instance ; } hidden export class IEntityUtilsInternal { static set instance ( instance ) { Private . instance = instance ; } static get instance ( ) { return Private . instance ; } }