viral-viewer-2 4.4.6 → 4.4.8

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.
@@ -13536,10 +13536,8 @@ function workerFunction() {
13536
13536
  instancingColor: IS_INSTANCEDMESH && object.instanceColor !== null,
13537
13537
  supportsVertexTextures: SUPPORTS_VERTEX_TEXTURES,
13538
13538
  outputColorSpace: currentRenderTarget === null ?
13539
- renderer.outputColorSpace :
13540
- currentRenderTarget.isXRRenderTarget === true ?
13541
- currentRenderTarget.texture.colorSpace :
13542
- LinearSRGBColorSpace,
13539
+ renderer.outputColorSpace : currentRenderTarget.isXRRenderTarget === true ?
13540
+ currentRenderTarget.texture.colorSpace : LinearSRGBColorSpace,
13543
13541
  map: HAS_MAP,
13544
13542
  matcap: HAS_MATCAP,
13545
13543
  envMap: HAS_ENVMAP,
@@ -14647,9 +14645,7 @@ function workerFunction() {
14647
14645
  }
14648
14646
  }
14649
14647
  if (shadow.map === null || toVSM === true || fromVSM === true) {
14650
- const pars = this.type !== VSMShadowMap ?
14651
- { minFilter: NearestFilter, magFilter: NearestFilter } :
14652
- {};
14648
+ const pars = this.type !== VSMShadowMap ? { minFilter: NearestFilter, magFilter: NearestFilter } : {};
14653
14649
  if (shadow.map !== null) {
14654
14650
  shadow.map.dispose();
14655
14651
  }
@@ -16517,8 +16513,7 @@ function workerFunction() {
16517
16513
  }
16518
16514
  else {
16519
16515
  const textures = renderTarget.isWebGLMultipleRenderTargets === true ?
16520
- renderTarget.texture :
16521
- [renderTarget.texture];
16516
+ renderTarget.texture : [renderTarget.texture];
16522
16517
  for (let i = 0; i < textures.length; i++) {
16523
16518
  const texture = textures[i];
16524
16519
  const glFormat = utils.convert(texture.format, texture.colorSpace);
@@ -16741,8 +16736,7 @@ function workerFunction() {
16741
16736
  function updateRenderTargetMipmap(renderTarget) {
16742
16737
  const supportsMips = isPowerOfTwo$1(renderTarget) || isWebGL2;
16743
16738
  const textures = renderTarget.isWebGLMultipleRenderTargets === true ?
16744
- renderTarget.texture :
16745
- [renderTarget.texture];
16739
+ renderTarget.texture : [renderTarget.texture];
16746
16740
  for (let i = 0, il = textures.length; i < il; i++) {
16747
16741
  const texture = textures[i];
16748
16742
  if (textureNeedsGenerateMipmaps(texture, supportsMips)) {
@@ -16761,8 +16755,7 @@ function workerFunction() {
16761
16755
  renderTarget.samples > 0 &&
16762
16756
  useMultisampledRTT(renderTarget) === false) {
16763
16757
  const textures = renderTarget.isWebGLMultipleRenderTargets ?
16764
- renderTarget.texture :
16765
- [renderTarget.texture];
16758
+ renderTarget.texture : [renderTarget.texture];
16766
16759
  const width = renderTarget.width;
16767
16760
  const height = renderTarget.height;
16768
16761
  let mask = _gl.COLOR_BUFFER_BIT;
@@ -17571,8 +17564,7 @@ function workerFunction() {
17571
17564
  renderer.capabilities.isWebGL2 === false) {
17572
17565
  const layerInit = {
17573
17566
  antialias: session.renderState.layers === undefined ?
17574
- attributes.antialias :
17575
- true,
17567
+ attributes.antialias : true,
17576
17568
  alpha: true,
17577
17569
  depth: attributes.depth,
17578
17570
  stencil: attributes.stencil,
@@ -18303,8 +18295,7 @@ function workerFunction() {
18303
18295
  if (hasUniformChanged(uniform, i, cache) === true) {
18304
18296
  const offset = uniform.__offset;
18305
18297
  const values = Array.isArray(uniform.value) ?
18306
- uniform.value :
18307
- [uniform.value];
18298
+ uniform.value : [uniform.value];
18308
18299
  let arrayOffset = 0;
18309
18300
  for (let i = 0; i < values.length; i++) {
18310
18301
  const value = values[i];
@@ -18365,8 +18356,7 @@ function workerFunction() {
18365
18356
  }
18366
18357
  else {
18367
18358
  const cachedObjects = Array.isArray(cache[index]) ?
18368
- cache[index] :
18369
- [cache[index]];
18359
+ cache[index] : [cache[index]];
18370
18360
  const values = Array.isArray(value) ? value : [value];
18371
18361
  for (let i = 0; i < cachedObjects.length; i++) {
18372
18362
  const cachedObject = cachedObjects[i];
@@ -18393,8 +18383,7 @@ function workerFunction() {
18393
18383
  storage: 0, // bytes
18394
18384
  };
18395
18385
  const values = Array.isArray(uniform.value) ?
18396
- uniform.value :
18397
- [uniform.value];
18386
+ uniform.value : [uniform.value];
18398
18387
  for (let j = 0, jl = values.length; j < jl; j++) {
18399
18388
  const value = values[j];
18400
18389
  const info = getUniformSize(value);
@@ -19230,8 +19219,7 @@ function workerFunction() {
19230
19219
  _transmissionRenderTarget = new WebGLRenderTarget(1024, 1024, {
19231
19220
  generateMipmaps: true,
19232
19221
  type: extensions.has("EXT_color_buffer_half_float") ?
19233
- HalfFloatType :
19234
- UnsignedByteType,
19222
+ HalfFloatType : UnsignedByteType,
19235
19223
  minFilter: LinearMipmapLinearFilter,
19236
19224
  samples: isWebGL2 && antialias === true ? 4 : 0,
19237
19225
  });
@@ -34076,10 +34064,10 @@ which can be placed in CurveUtils.
34076
34064
  let materialJsons = event.data.Materials;
34077
34065
  //get materials first
34078
34066
  let materials = [];
34079
- let objectLoader = new ObjectLoader();
34067
+ let materialLoader = new MaterialLoader();
34080
34068
  for (let index = 0; index < materialJsons.length; index++) {
34081
34069
  const json = materialJsons[index];
34082
- let material = objectLoader.parseObject(json);
34070
+ let material = materialLoader.parse(json);
34083
34071
  materials.push(material);
34084
34072
  }
34085
34073
  let mainMesh = new Mesh();