ice-render 1.2.0 → 1.3.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.
@@ -42,6 +42,8 @@ declare abstract class ICEComponent extends ICEEventTarget {
42
42
  /** 可见性缓存(代际号 + 值):见 `isEffectivelyVisible` 的说明。 */
43
43
  private __visEpoch;
44
44
  private __visValue;
45
+ /** 本帧是否因为子树不透明度过 ctx.globalAlpha(见 __renderCore / __resetLeakyCtxState)。 */
46
+ private __opacityApplied;
45
47
  /** 声明式渐变缓存:按描述对象引用判定,`refreshParams()` 里失效(setState 必然触发它)。 */
46
48
  private __gradCache;
47
49
  /**
@@ -299,6 +301,12 @@ declare abstract class ICEComponent extends ICEEventTarget {
299
301
  * 顶层组件直接 O(1) 返回。
300
302
  */
301
303
  hasClippingAncestor(): boolean;
304
+ /**
305
+ * 有效不透明度 = 自身 `state.opacity` × 所有祖先的 `state.opacity`(默认 1)。
306
+ *
307
+ * 顶层组件直接返回(绝大多数组件没有祖先,热路径上不做遍历);非法值按 1 处理。
308
+ */
309
+ private __effectiveOpacity;
302
310
  /**
303
311
  * 世界坐标点是否落在某个「裁剪祖先」的盒子之外。
304
312
  *
@@ -42,6 +42,8 @@ declare abstract class ICEComponent extends ICEEventTarget {
42
42
  /** 可见性缓存(代际号 + 值):见 `isEffectivelyVisible` 的说明。 */
43
43
  private __visEpoch;
44
44
  private __visValue;
45
+ /** 本帧是否因为子树不透明度过 ctx.globalAlpha(见 __renderCore / __resetLeakyCtxState)。 */
46
+ private __opacityApplied;
45
47
  /** 声明式渐变缓存:按描述对象引用判定,`refreshParams()` 里失效(setState 必然触发它)。 */
46
48
  private __gradCache;
47
49
  /**
@@ -299,6 +301,12 @@ declare abstract class ICEComponent extends ICEEventTarget {
299
301
  * 顶层组件直接 O(1) 返回。
300
302
  */
301
303
  hasClippingAncestor(): boolean;
304
+ /**
305
+ * 有效不透明度 = 自身 `state.opacity` × 所有祖先的 `state.opacity`(默认 1)。
306
+ *
307
+ * 顶层组件直接返回(绝大多数组件没有祖先,热路径上不做遍历);非法值按 1 处理。
308
+ */
309
+ private __effectiveOpacity;
302
310
  /**
303
311
  * 世界坐标点是否落在某个「裁剪祖先」的盒子之外。
304
312
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "大漠穷秋",
3
3
  "name": "ice-render",
4
- "version": "1.2.0",
4
+ "version": "1.3.0",
5
5
  "description": "A canvas engine for interactive graphics.",
6
6
  "repository": {
7
7
  "type": "git",