MCPcopy Create free account
hub / github.com/Easy-Editor/EasyEditor / destroy

Function destroy

packages/core/src/engine/engine.ts:73–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71}
72
73export 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
89export { event, hotkey, logger, materials, plugins, project, setters }

Callers 1

initFunction · 0.85

Calls 4

removeDocumentMethod · 0.80
infoMethod · 0.80
destroyMethod · 0.65
forEachMethod · 0.45

Tested by

no test coverage detected