MCPcopy
hub / github.com/sparkjsdev/spark / call

Method call

src/SplatWorker.ts:67–81  ·  view source on GitHub ↗
(
    name: string,
    args: unknown,
    options: { onStatus?: (data: unknown) => void } = {},
  )

Source from the content-addressed store, hash-verified

65 }
66
67 async call(
68 name: string,
69 args: unknown,
70 options: { onStatus?: (data: unknown) => void } = {},
71 ): Promise<unknown> {
72 const id = ++SplatWorker.currentId;
73 const promise = new Promise((resolve, reject) => {
74 this.messages[id] = { resolve, reject, onStatus: options.onStatus };
75 });
76 this.worker.postMessage(
77 { id, name, args },
78 { transfer: getTransferable(args) },
79 );
80 return await promise;
81 }
82
83 dispose() {
84 this.worker.terminate();

Callers 14

createLodSplatsMethod · 0.45
sortUpdateMethod · 0.45
onStatusMethod · 0.45
loadInternalMethod · 0.45
unpackSplatsFunction · 0.45
transcodeSpzFunction · 0.45
driveSortMethod · 0.45
driveLodMethod · 0.45
initLodTreeMethod · 0.45
updateLodInstancesMethod · 0.45
cleanupLodTreesMethod · 0.45
getLodTreeLevelMethod · 0.45

Calls 1

getTransferableFunction · 0.90

Tested by

no test coverage detected