MCPcopy Create free account
hub / github.com/CesiumGS/cesium-native / loadExtension

Method loadExtension

tools/generate-classes/SchemaCache.js:46–57  ·  view source on GitHub ↗
(schemaName, extensionName)

Source from the content-addressed store, hash-verified

44 }
45
46 loadExtension(schemaName, extensionName) {
47 const searchPaths = this.extensionSchemaPaths.map((path) =>
48 this.resolvePath(path, schemaName)
49 );
50 // Prioritize paths that contain the extension name because multiple extensions may have the same schema name.
51 searchPaths.sort((pathA, pathB) => {
52 const resultA = pathA.indexOf(extensionName) === -1 ? 0 : 1;
53 const resultB = pathB.indexOf(extensionName) === -1 ? 0 : 1;
54 return resultB - resultA;
55 });
56 return this.loadFromSearchPaths(schemaName, searchPaths);
57 }
58
59 loadFromSearchPaths(name, paths) {
60 let jsonString;

Callers 1

index.jsFile · 0.80

Calls 2

resolvePathMethod · 0.95
loadFromSearchPathsMethod · 0.95

Tested by

no test coverage detected