MCPcopy Create free account
hub / github.com/Kitware/VTK / onDirectoryChanged

Function onDirectoryChanged

Examples/Emscripten/Cxx/GeometryViewer/web/index.js:132–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130}
131
132async function onDirectoryChanged() {
133 if (!wasmModule || !viewer) return;
134 if (pendingCompositeFileName) {
135 let directoryFiles = await openDirectory();
136 for (let file of directoryFiles) {
137 let ptr = await writeFileToWASMMemory(file);
138 await viewer.writeDataFileToVirtualFS(file.directoryHandle.name + "/" + file.name, ptr, file.size);
139 wasmModule._free(ptr);
140 }
141 await loadFileByName(pendingCompositeFileName);
142 }
143}
144
145async function setupUI() {
146 // FPS counter

Callers

nothing calls this directly

Calls 3

openDirectoryFunction · 0.90
writeFileToWASMMemoryFunction · 0.85
loadFileByNameFunction · 0.85

Tested by

no test coverage detected