ice3 0.2.2 → 0.2.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/README.md CHANGED
@@ -58,6 +58,6 @@ WebGL2 兼容别名。拾取使用 `await engine.pick(point)`。
58
58
  [ICE3 Studio](https://github.com/ice-3d/ice3-studio/blob/main/README.md)
59
59
  完成 Source Import、Prepare、验证、partition、LOD 和 Tileset 发布。当前生产链见
60
60
  [Studio Asset Pipeline](https://github.com/ice-3d/ice3-studio/blob/main/docs/reference/asset-pipeline.md)。
61
- 公开 package 的当前版本为 `0.2.2`。
61
+ 公开 package 的当前版本为 `0.2.3`。
62
62
 
63
63
  本项目采用 MIT License。
@@ -13,7 +13,11 @@ export declare class WebGL2RendererBackend implements ICERendererBackend {
13
13
  private program;
14
14
  private clipPlane;
15
15
  private shadowMap;
16
- /** 方向光阴影开关:默认关闭,由 `initialize({ shadows })` 或页面地址 `?shadows=` 打开。 */
16
+ /**
17
+ * 方向光阴影开关。默认开启:没有影子的厂区看起来像浮在地上,
18
+ * 而多一次全场景深度 pass 的代价远小于这个观感损失。
19
+ * 要关掉用 `initialize({ shadows: false })` 或页面地址 `?shadows=0`。
20
+ */
17
21
  private shadowEnabled;
18
22
  /** `?shadowdebug=1` 输出遮蔽判定,`=2` 输出深度图;排查阴影问题的唯一可信手段。 */
19
23
  private shadowDebug;
@@ -51,7 +51,7 @@ export interface ICERendererBackend {
51
51
  readonly onError?: (error: ICEEngineError) => void;
52
52
  /** A deferred GPU upload (for example a base-colour texture) just landed. */
53
53
  readonly onUploadReady?: () => void;
54
- /** Directional-light shadows. Off by default: it costs a full extra scene pass. */
54
+ /** Directional-light shadows. On by default; pass false to skip the extra scene pass. */
55
55
  readonly shadows?: boolean;
56
56
  }): void;
57
57
  resize(viewport: ICEViewport, dpr: number): void;
package/dist/index.js CHANGED
@@ -3073,7 +3073,11 @@ var WebGL2RendererBackend = class {
3073
3073
  program = null;
3074
3074
  clipPlane = [0, 0, 0, 0];
3075
3075
  shadowMap = null;
3076
- /** 方向光阴影开关:默认关闭,由 `initialize({ shadows })` 或页面地址 `?shadows=` 打开。 */
3076
+ /**
3077
+ * 方向光阴影开关。默认开启:没有影子的厂区看起来像浮在地上,
3078
+ * 而多一次全场景深度 pass 的代价远小于这个观感损失。
3079
+ * 要关掉用 `initialize({ shadows: false })` 或页面地址 `?shadows=0`。
3080
+ */
3077
3081
  shadowEnabled = false;
3078
3082
  /** `?shadowdebug=1` 输出遮蔽判定,`=2` 输出深度图;排查阴影问题的唯一可信手段。 */
3079
3083
  shadowDebug = 0;
@@ -3251,7 +3255,7 @@ var WebGL2RendererBackend = class {
3251
3255
  this.ensureTextureCache();
3252
3256
  this.sceneDepth = new WebGL2SceneDepth(gl);
3253
3257
  this.readOcclusionOverride();
3254
- this.shadowEnabled = options.shadows ?? false;
3258
+ this.shadowEnabled = options.shadows ?? true;
3255
3259
  this.readShadowOverride();
3256
3260
  this.canvas.addEventListener("webglcontextlost", this.handleContextLost);
3257
3261
  this.canvas.addEventListener("webglcontextrestored", this.handleContextRestored);