@xviewer.js/core 1.0.4-alpha.1 → 1.0.4-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.js CHANGED
@@ -439,11 +439,11 @@ class SVGLoader extends Loader {
439
439
  SVGLoader.Primitive = SVGLoader$1;
440
440
 
441
441
  class KTX2Loader extends Loader {
442
- load({ url, path, resourcePath, manager, texSettings, onLoad, onProgress, onError }) {
442
+ load({ url, path, resourcePath, transcoderPath, manager, texSettings, onLoad, onProgress, onError }) {
443
443
  let loader = this._loader;
444
444
  if (loader === undefined) {
445
445
  loader = this._loader = new KTX2Loader$1();
446
- loader.setTranscoderPath("three/examples/js/libs/basis/");
446
+ loader.setTranscoderPath(transcoderPath);
447
447
  loader.detectSupport(this.viewer.renderer);
448
448
  }
449
449
  loader.manager = manager;
@@ -4391,19 +4391,15 @@ class ResourceManager {
4391
4391
  }
4392
4392
  return loader;
4393
4393
  }
4394
- loadAsset({ url, buffer, ext, path, resourcePath, dracoPath, manager, onProgress, ...props }) {
4394
+ loadAsset({ url, ext, onProgress, ...props }) {
4395
4395
  return new Promise((resolve, reject)=>{
4396
4396
  const sel = ext || url && ResourceManager.extension(url) || "";
4397
4397
  const texSettings = ResourceManager._splitTextureSettings(props);
4398
4398
  if (this._loaders.has(sel)) {
4399
4399
  this._loaders.get(sel).load({
4400
4400
  url,
4401
- buffer,
4402
4401
  texSettings,
4403
- path,
4404
- resourcePath,
4405
- dracoPath,
4406
- manager,
4402
+ ...props,
4407
4403
  onProgress,
4408
4404
  onLoad: resolve,
4409
4405
  onError: (err)=>{
@@ -4991,7 +4987,7 @@ class Viewer extends EventEmitter {
4991
4987
  near: 0.1,
4992
4988
  far: 1000,
4993
4989
  position: new Vector3(0, 0, 4)
4994
- }, targetFrameRate = -1, fixedFrameTime = false, colorSpace = SRGBColorSpace, toneMapping = LinearToneMapping, toneMappingExposure = 1, maxDPR = 1.5, path = "", resourcePath = "", dracoPath = "https://www.gstatic.com/draco/v1/decoders/", orientation = Orientation.AUTO, loader = {}, tasker = {}, ...webglOpts } = {}){
4990
+ }, targetFrameRate = -1, fixedFrameTime = false, colorSpace = SRGBColorSpace, toneMapping = LinearToneMapping, toneMappingExposure = 1, maxDPR = 1.5, path = "", resourcePath = "", dracoPath = "https://www.gstatic.com/draco/v1/decoders/", transcoderPath = "three/examples/js/libs/basis/", orientation = Orientation.AUTO, loader = {}, tasker = {}, ...webglOpts } = {}){
4995
4991
  super(), this._instanceId = Viewer.instanceCount++, this._dpr = 1, this._width = 1, this._height = 1, this._viewport = {
4996
4992
  width: 1,
4997
4993
  height: 1,
@@ -5049,6 +5045,7 @@ class Viewer extends EventEmitter {
5049
5045
  path,
5050
5046
  resourcePath,
5051
5047
  dracoPath,
5048
+ transcoderPath,
5052
5049
  manager: this._loadingManager
5053
5050
  };
5054
5051
  this._mount = applyProps(new Object3D(), {