rayzee 4.8.13 → 4.8.14

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/README.md CHANGED
@@ -178,6 +178,7 @@ const engine = new PathTracerApp(canvas, options?)
178
178
  |---|---|---|
179
179
  | `canvas` | `HTMLCanvasElement` | Rendering target |
180
180
  | `options.autoResize` | `boolean` | Auto-resize on window resize (default: `true`) |
181
+ | `options.showStats` | `boolean` | Show the performance stats panel (default: `true`) |
181
182
  | `options.statsContainer` | `HTMLElement` | DOM element to append the stats panel to (defaults to `document.body`) |
182
183
 
183
184
  #### Lifecycle
@@ -233,6 +234,7 @@ Key settings:
233
234
  | `focalLength` | `number` | 50 | DOF focal length (mm) |
234
235
  | `adaptiveSampling` | `boolean` | false | Variance-guided sample distribution |
235
236
  | `transparentBackground` | `boolean` | false | Transparent canvas background |
237
+ | `interactionModeEnabled` | `boolean` | true | Lower quality during camera movement for smoother navigation |
236
238
  | `debugMode` | `number` | 0 | Debug visualization mode (0 = off) |
237
239
  | `environmentMode` | `string` | 'hdri' | Sky mode: `'hdri'` \| `'procedural'` \| `'gradient'` \| `'color'` |
238
240
 
package/dist/rayzee.es.js CHANGED
@@ -11398,6 +11398,10 @@ var oc = class extends fn {
11398
11398
  uniform: "adaptiveSamplingMax",
11399
11399
  reset: !0
11400
11400
  },
11401
+ interactionModeEnabled: {
11402
+ handler: "handleInteractionModeEnabled",
11403
+ reset: !1
11404
+ },
11401
11405
  maxSamples: {
11402
11406
  handler: "handleMaxSamples",
11403
11407
  reset: !1
@@ -12842,7 +12846,7 @@ var Wc = new Float32Array(3), Gc = {
12842
12846
  }
12843
12847
  }, nl = class extends E {
12844
12848
  constructor(e, t = {}) {
12845
- super(), this.canvas = e, this.denoiserCanvas = null, this._autoResize = t.autoResize !== !1, this._statsContainer = t.statsContainer || null, this.settings = new Tc(Z), this.renderer = null, this._camera = null, this.scene = null, this.meshScene = null, this._sceneHelpers = null, this._controls = null, this.assetLoader = null, this._sdf = null, this.animationManager = new Qc(), this._animRefitInFlight = !1, this.pipeline = null, this.stages = {}, this.cameraManager = null, this.lightManager = null, this.denoisingManager = null, this.overlayManager = null, this.isInitialized = !1, this.pauseRendering = !1, this.pathTracerEnabled = !0, this.animationId = null, this.needsReset = !1, this._renderCompleteDispatched = !1, this._loadingInProgress = !1, this._needsDisplayRefresh = !1, this._paused = !1, this.lastResetTime = performance.now(), this.timeElapsed = 0, this._lastRenderWidth = 0, this._lastRenderHeight = 0, this._resizeDebounceTimer = null, this._outputAPI = null, this._lightsAPI = null, this._animationAPI = null, this._selectionAPI = null, this._transformAPI = null, this._cameraAPI = null, this._environmentAPI = null, this._materialsAPI = null, this._denoisingAPI = null;
12849
+ super(), this.canvas = e, this.denoiserCanvas = null, this._autoResize = t.autoResize !== !1, this._showStats = t.showStats !== !1, this._statsContainer = t.statsContainer || null, this.settings = new Tc(Z), this.renderer = null, this._camera = null, this.scene = null, this.meshScene = null, this._sceneHelpers = null, this._controls = null, this.assetLoader = null, this._sdf = null, this.animationManager = new Qc(), this._animRefitInFlight = !1, this.pipeline = null, this.stages = {}, this.cameraManager = null, this.lightManager = null, this.denoisingManager = null, this.overlayManager = null, this.isInitialized = !1, this.pauseRendering = !1, this.pathTracerEnabled = !0, this.animationId = null, this.needsReset = !1, this._renderCompleteDispatched = !1, this._loadingInProgress = !1, this._needsDisplayRefresh = !1, this._paused = !1, this.lastResetTime = performance.now(), this.timeElapsed = 0, this._lastRenderWidth = 0, this._lastRenderHeight = 0, this._resizeDebounceTimer = null, this._outputAPI = null, this._lightsAPI = null, this._animationAPI = null, this._selectionAPI = null, this._transformAPI = null, this._cameraAPI = null, this._environmentAPI = null, this._materialsAPI = null, this._denoisingAPI = null;
12846
12850
  }
12847
12851
  set(e, t, n) {
12848
12852
  this.settings.set(e, t, n);
@@ -12954,7 +12958,7 @@ var Wc = new Float32Array(3), Gc = {
12954
12958
  }, this.assetLoader.addEventListener("load", this._onAssetLoaded), this.assetLoader.addEventListener("modelProcessed", (e) => {
12955
12959
  let t = [this._camera, ...e.cameras || []];
12956
12960
  this.cameraManager.setCameras(t), this._floorPlane = this.assetLoader.floorPlane, this._interactionManager && (this._interactionManager.floorPlane = this._floorPlane);
12957
- }), this.stages.pathTracer.setTriangleData(new Float32Array(32), 0), this.stages.pathTracer.setBVHData(new Float32Array(16)), this.stages.pathTracer.materialData.setMaterialData(new Float32Array(16)), this.stages.pathTracer.setupMaterial(), this._initStats(), this.isInitialized = !0, console.log("WebGPU Path Tracer App initialized"), this;
12961
+ }), this.stages.pathTracer.setTriangleData(new Float32Array(32), 0), this.stages.pathTracer.setBVHData(new Float32Array(16)), this.stages.pathTracer.materialData.setMaterialData(new Float32Array(16)), this.stages.pathTracer.setupMaterial(), this._showStats && this._initStats(), this.isInitialized = !0, console.log("WebGPU Path Tracer App initialized"), this;
12958
12962
  }
12959
12963
  animate() {
12960
12964
  if (this.animationId = requestAnimationFrame(() => this.animate()), this._loadingInProgress || this._sdf?.isProcessing) {
@@ -13498,6 +13502,9 @@ var Wc = new Float32Array(3), Gc = {
13498
13502
  },
13499
13503
  handleEnvironmentRotation: (e) => {
13500
13504
  this.stages.pathTracer?.environment.setEnvironmentRotation(e);
13505
+ },
13506
+ handleInteractionModeEnabled: (e) => {
13507
+ this.setInteractionModeEnabled(e);
13501
13508
  }
13502
13509
  };
13503
13510
  }