MCPcopy
hub / github.com/mrdoob/three.js / getScript

Function getScript

manual/examples/resources/editor.js:226–238  ·  view source on GitHub ↗
( url, scriptInfos )

Source from the content-addressed store, hash-verified

224 }
225
226 async function getScript( url, scriptInfos ) {
227
228 // check it's an example script, not some other lib
229 if ( ! scriptInfos[ url ].source ) {
230
231 const source = await getHTML( url );
232 const fixedSource = fixSourceLinks( url, source );
233 const { text } = await getWorkerScripts( fixedSource, url, scriptInfos );
234 scriptInfos[ url ].source = text;
235
236 }
237
238 }
239
240 /**
241 * @typedef {Object} ScriptInfo

Callers 1

getWorkerScriptsFunction · 0.70

Calls 3

getHTMLFunction · 0.85
fixSourceLinksFunction · 0.85
getWorkerScriptsFunction · 0.85

Tested by

no test coverage detected