@needle-tools/engine 2.67.10-pre → 2.67.11-pre

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/CHANGELOG.md CHANGED
@@ -4,6 +4,9 @@ All notable changes to this package will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [2.67.11-pre] - 2023-04-08
8
+ - Add: some checks for WebGPURenderer
9
+
7
10
  ## [2.67.10-pre] - 2023-04-06
8
11
  - Add vite copy files build plugin
9
12
  - Fix: PostProcessing not applying effects when enabled for the second time as well as removing earlier hack
@@ -21866,11 +21866,14 @@ function NO(i) {
21866
21866
  const g = i.mainCamera;
21867
21867
  if (g) {
21868
21868
  cf && console.log("prewarm", A.length, "objects", [...A]);
21869
- const I = i.renderer, e = i.scene;
21870
- I.compile(e, g), gM ?? (gM = new WD(64)), IM ?? (IM = new Ny(1e-3, 9999999, gM)), IM.update(I, e);
21871
- for (const t of A)
21872
- t[vF] = !0, t[Ef] = !1;
21873
- A.length = 0, cf && console.log("prewarm done");
21869
+ const I = i.renderer;
21870
+ if (I.compile) {
21871
+ const e = i.scene;
21872
+ I.compile(e, g), gM ?? (gM = new WD(64)), IM ?? (IM = new Ny(1e-3, 9999999, gM)), IM.update(I, e);
21873
+ for (const t of A)
21874
+ t[vF] = !0, t[Ef] = !1;
21875
+ A.length = 0, cf && console.log("prewarm done");
21876
+ }
21874
21877
  }
21875
21878
  }
21876
21879
  const KO = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
@@ -41346,11 +41349,11 @@ const He = class {
41346
41349
  }
41347
41350
  // private _requestSizeUpdate : boolean = false;
41348
41351
  updateSize() {
41349
- var A, g;
41350
- if (!this.isManagedExternally && !this.renderer.xr.isPresenting) {
41352
+ var A, g, I;
41353
+ if (!this.isManagedExternally && ((A = this.renderer.xr) == null ? void 0 : A.isPresenting) === !1) {
41351
41354
  this._sizeChanged = !1;
41352
- const I = this.resolutionScaleFactor, e = this.domWidth * I, t = this.domHeight * I, C = this.mainCamera;
41353
- this.updateAspect(C), this.renderer.setSize(e, t), this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.domElement.style.width = "100%", this.renderer.domElement.style.height = "100%", this.composer && ((A = this.composer.setSize) == null || A.call(this.composer, e, t), "setPixelRatio" in this.composer && typeof this.composer.setPixelRatio == "function" && ((g = this.composer.setPixelRatio) == null || g.call(this.composer, window.devicePixelRatio)));
41355
+ const e = this.resolutionScaleFactor, t = this.domWidth * e, C = this.domHeight * e, o = this.mainCamera;
41356
+ this.updateAspect(o), this.renderer.setSize(t, C), this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.domElement.style.width = "100%", this.renderer.domElement.style.height = "100%", this.composer && ((g = this.composer.setSize) == null || g.call(this.composer, t, C), "setPixelRatio" in this.composer && typeof this.composer.setPixelRatio == "function" && ((I = this.composer.setPixelRatio) == null || I.call(this.composer, window.devicePixelRatio)));
41354
41357
  }
41355
41358
  }
41356
41359
  updateAspect(A, g, I) {
@@ -49225,7 +49228,7 @@ function fh(i) {
49225
49228
  }
49226
49229
  function rJ(i, A, g) {
49227
49230
  const I = i.matrix, e = i.geometry, t = i.material, C = i.camera, o = i.name, s = EJ(I);
49228
- if (I.determinant() < 0 && console.warn("THREE.USDZExporter: USDZ does not support negative scales", path), e ? A.beginBlock(`def Xform "${o}" (prepend references = @./geometries/Geometry_${e.id}.usd@</Geometry>)`) : C ? A.beginBlock(`def Camera "${o}"`) : A.beginBlock(`def Xform "${o}"`), t && A.appendLine(`rel material:binding = </Materials/Material_${t.id}>`), A.appendLine(`matrix4d xformOp:transform = ${s}`), A.appendLine('uniform token[] xformOpOrder = ["xformOp:transform"]'), C && (C.isOrthographicCamera ? (A.appendLine(`float2 clippingRange = (${C.near}, ${C.far})`), A.appendLine(`float horizontalAperture = ${((Math.abs(C.left) + Math.abs(C.right)) * 10).toPrecision(Ki)}`), A.appendLine(`float verticalAperture = ${((Math.abs(C.top) + Math.abs(C.bottom)) * 10).toPrecision(Ki)}`), A.appendLine('token projection = "orthographic"')) : (A.appendLine(`float2 clippingRange = (${C.near.toPrecision(Ki)}, ${C.far.toPrecision(Ki)})`), A.appendLine(`float focalLength = ${C.getFocalLength().toPrecision(Ki)}`), A.appendLine(`float focusDistance = ${C.focus.toPrecision(Ki)}`), A.appendLine(`float horizontalAperture = ${C.getFilmWidth().toPrecision(Ki)}`), A.appendLine('token projection = "perspective"'), A.appendLine(`float verticalAperture = ${C.getFilmHeight().toPrecision(Ki)}`))), i.onSerialize && i.onSerialize(A, g), i.children) {
49231
+ if (I.determinant() < 0 && console.warn("THREE.USDZExporter: USDZ does not support negative scales", o), e ? A.beginBlock(`def Xform "${o}" (prepend references = @./geometries/Geometry_${e.id}.usd@</Geometry>)`) : C ? A.beginBlock(`def Camera "${o}"`) : A.beginBlock(`def Xform "${o}"`), t && A.appendLine(`rel material:binding = </Materials/Material_${t.id}>`), A.appendLine(`matrix4d xformOp:transform = ${s}`), A.appendLine('uniform token[] xformOpOrder = ["xformOp:transform"]'), C && (C.isOrthographicCamera ? (A.appendLine(`float2 clippingRange = (${C.near}, ${C.far})`), A.appendLine(`float horizontalAperture = ${((Math.abs(C.left) + Math.abs(C.right)) * 10).toPrecision(Ki)}`), A.appendLine(`float verticalAperture = ${((Math.abs(C.top) + Math.abs(C.bottom)) * 10).toPrecision(Ki)}`), A.appendLine('token projection = "orthographic"')) : (A.appendLine(`float2 clippingRange = (${C.near.toPrecision(Ki)}, ${C.far.toPrecision(Ki)})`), A.appendLine(`float focalLength = ${C.getFocalLength().toPrecision(Ki)}`), A.appendLine(`float focusDistance = ${C.focus.toPrecision(Ki)}`), A.appendLine(`float horizontalAperture = ${C.getFilmWidth().toPrecision(Ki)}`), A.appendLine('token projection = "perspective"'), A.appendLine(`float verticalAperture = ${C.getFilmHeight().toPrecision(Ki)}`))), i.onSerialize && i.onSerialize(A, g), i.children) {
49229
49232
  A.appendLine();
49230
49233
  for (const n of i.children)
49231
49234
  rJ(n, A, g);