()
| 71 | } |
| 72 | |
| 73 | export const destroy = async () => { |
| 74 | if (!isInit) return |
| 75 | |
| 76 | // remove all documents |
| 77 | const { documents } = project |
| 78 | if (Array.isArray(documents) && documents.length > 0) { |
| 79 | documents.forEach(doc => project.removeDocument(doc)) |
| 80 | } |
| 81 | |
| 82 | logger.info('plugins destroying...') |
| 83 | await plugins.destroy() |
| 84 | |
| 85 | isInit = false |
| 86 | logger.info('Engine destruction successfully') |
| 87 | } |
| 88 | |
| 89 | export { event, hotkey, logger, materials, plugins, project, setters } |
no test coverage detected