rayzee 7.12.1 → 7.13.0
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/rayzee.es.js +13 -3
- package/dist/rayzee.es.js.map +1 -1
- package/dist/rayzee.umd.js +1 -1
- package/dist/rayzee.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/PathTracerApp.js +38 -0
package/dist/rayzee.es.js
CHANGED
|
@@ -16142,7 +16142,7 @@ var Yf = {
|
|
|
16142
16142
|
} catch (e) {
|
|
16143
16143
|
console.warn("PathTracerApp: prior canvas owner dispose failed", e);
|
|
16144
16144
|
}
|
|
16145
|
-
rp.set(e, this), this.canvas = e, this._autoResize = t.autoResize !== !1, this._container = t.container || null, this.settings = new cf(X), this.renderer = null, this.scene = null, this.meshScene = null, this._sceneHelpers = null, this.assetLoader = null, this._sdf = null, this._animRefitInFlight = !1, this._maxTextureSize = X.maxTextureSize, this.pipeline = null, this.stages = {}, this.cameraManager = null, this.lightManager = null, this.goboManager = null, this.iesManager = null, this.denoisingManager = null, this.overlayManager = null, this.interactionManager = null, this.transformManager = null, this.animationManager = new tp(), this.environmentManager = null, this.isInitialized = !1, this.pauseRendering = !1, this.pathTracerEnabled = !0, this.animationManagerId = null, this.needsReset = !1, this._loadingInProgress = !1, this._needsDisplayRefresh = !1, this._paused = !1, this.completion = new Sd(), this._resizeDebounceTimer = null, this._trackedListeners = [], this._disposed = !1, this._deviceLost = !1;
|
|
16145
|
+
rp.set(e, this), this.canvas = e, this._autoResize = t.autoResize !== !1, this._container = t.container || null, this.settings = new cf(X), this.renderer = null, this.scene = null, this.meshScene = null, this._sceneHelpers = null, this.assetLoader = null, this._sdf = null, this._animRefitInFlight = !1, this._maxTextureSize = X.maxTextureSize, this.pipeline = null, this.stages = {}, this.cameraManager = null, this.lightManager = null, this.goboManager = null, this.iesManager = null, this.denoisingManager = null, this.overlayManager = null, this.interactionManager = null, this.transformManager = null, this.animationManager = new tp(), this.environmentManager = null, this.isInitialized = !1, this.pauseRendering = !1, this.pathTracerEnabled = !0, this.animationManagerId = null, this.needsReset = !1, this._loadingInProgress = !1, this._needsDisplayRefresh = !1, this._paused = !1, this._emissiveSamplingUserSet = !1, this.completion = new Sd(), this._resizeDebounceTimer = null, this._trackedListeners = [], this._disposed = !1, this._deviceLost = !1;
|
|
16146
16146
|
}
|
|
16147
16147
|
_addTrackedListener(e, t, n) {
|
|
16148
16148
|
e && (e.addEventListener(t, n), this._trackedListeners.push({
|
|
@@ -16306,7 +16306,7 @@ var Yf = {
|
|
|
16306
16306
|
if (this._loadingInProgress) throw Error("PathTracerApp: another load is already in progress");
|
|
16307
16307
|
this._loadingInProgress = !0;
|
|
16308
16308
|
try {
|
|
16309
|
-
await e(), this._clearAppendedModels(), this._syncControlsAfterLoad(), await this.loadSceneData(), this.pipeline?.eventBus.emit("autoexposure:resetHistory"), this.reset(), this.cameraManager.currentCameraIndex = 0, this.dispatchEvent(t), this.dispatchEvent({
|
|
16309
|
+
await e(), this._emissiveSamplingUserSet = !1, this._clearAppendedModels(), this._syncControlsAfterLoad(), await this.loadSceneData(), this.pipeline?.eventBus.emit("autoexposure:resetHistory"), this.reset(), this.cameraManager.currentCameraIndex = 0, this.dispatchEvent(t), this.dispatchEvent({
|
|
16310
16310
|
type: "CamerasUpdated",
|
|
16311
16311
|
cameras: this.cameraManager.cameras,
|
|
16312
16312
|
cameraNames: this.cameraManager.getCameraNames()
|
|
@@ -16336,7 +16336,11 @@ var Yf = {
|
|
|
16336
16336
|
progress: 95
|
|
16337
16337
|
}), await n, this.stages.pathTracer.environment.applyCDFResults());
|
|
16338
16338
|
let r = this.getSceneMinY();
|
|
16339
|
-
|
|
16339
|
+
if (this.settings.set("groundProjectionLevel", r, { reset: !1 }), this.settings.set("groundCatcherHeight", r, { reset: !1 }), !this._emissiveSamplingUserSet) {
|
|
16340
|
+
let e = (this._sdf?.emissiveTriangleCount ?? 0) > 0;
|
|
16341
|
+
this.settings.set("enableEmissiveTriangleSampling", e, { reset: !1 });
|
|
16342
|
+
}
|
|
16343
|
+
return e.start("Apply settings"), this.settings.applyAll(), this.stages.compositor.setTransparentBackground(this.settings.get("transparentBackground")), e.end("Apply settings"), e.print(), rr(), this._initAnimationAndTransforms(), this.dispatchEvent({ type: "SceneRebuild" }), !0;
|
|
16340
16344
|
}
|
|
16341
16345
|
_tagPrimarySceneObject() {
|
|
16342
16346
|
let e = this.assetLoader?.targetModel;
|
|
@@ -16517,6 +16521,12 @@ var Yf = {
|
|
|
16517
16521
|
}
|
|
16518
16522
|
this.reset();
|
|
16519
16523
|
}
|
|
16524
|
+
setEmissiveTriangleSampling(e) {
|
|
16525
|
+
this._emissiveSamplingUserSet = !0, this.settings.set("enableEmissiveTriangleSampling", e);
|
|
16526
|
+
}
|
|
16527
|
+
hasEmissiveGeometry() {
|
|
16528
|
+
return (this._sdf?.emissiveTriangleCount ?? 0) > 0;
|
|
16529
|
+
}
|
|
16520
16530
|
setMeshVisibility(e, t) {
|
|
16521
16531
|
this.stages.pathTracer?.updateMeshVisibility(e, t), this.reset();
|
|
16522
16532
|
}
|