@netless/slide 1.4.22-alpha.0 → 1.4.23

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
@@ -4,6 +4,19 @@
4
4
 
5
5
  ## changelog
6
6
 
7
+ ### 1.4.23 (2025-5-8)
8
+ * 添加 skipActionWhenFrozen 参数, 控制冻结时是否跳过动作, 默认为 false
9
+ * 修复 frozen / release 多次重复调用后 frozen 不生效问题
10
+
11
+ ### 1.4.22 (2025-5-8)
12
+ * 添加 transitionResolutionLevel 参数, 控制切页动画截图分辨率, 默认为 2
13
+ * [0] 640 * 360
14
+ * [1] 960 * 540;
15
+ * [2] Normal 1280 * 720; --- default setting for mobile devices.
16
+ * [3] HD 1920 * 1080;
17
+ * [4] 3K 3200 × 1800, greater than 4 is calculated as 4; --- default setting for PC devices.
18
+ * 添加 preloadResource 方法, 只加载 json 和 图片资源, 不加载音视频资源, 不生成纹理
19
+
7
20
  ### 1.4.21 (2025-4-24)
8
21
  * 增加缓存指定页码参数
9
22
 
@@ -11,14 +11,14 @@ var FrozenTaskManager = /** @class */ (function () {
11
11
  task.status = "running";
12
12
  task.fn.apply(null).then(function () {
13
13
  if (_this.tasks.length > 0) {
14
- window.requestAnimationFrame(_this.schedule);
14
+ setTimeout(_this.schedule);
15
15
  }
16
16
  else {
17
17
  _this.isScheduling = false;
18
18
  }
19
19
  }).catch(function () {
20
20
  if (_this.tasks.length > 0) {
21
- window.requestAnimationFrame(_this.schedule);
21
+ setTimeout(_this.schedule);
22
22
  }
23
23
  else {
24
24
  _this.isScheduling = false;
package/lib/Slide.d.ts CHANGED
@@ -166,6 +166,15 @@ export interface ISlideRenderOptions {
166
166
  * it will use different logic to play page transition animations without screen flickering, but the response time for page transitions will be slower by 200 to 1000 ms.
167
167
  */
168
168
  enableNvidiaDetect?: boolean;
169
+ /**
170
+ * 切页动画截图分辨率等级
171
+ * [0] 640 * 360
172
+ * [1] 960 * 540;
173
+ * [2] Normal 1280 * 720; --- default setting for mobile devices.
174
+ * [3] HD 1920 * 1080;
175
+ * [4] 3K 3200 × 1800, greater than 4 is calculated as 4; --- default setting for PC devices.
176
+ */
177
+ transitionResolutionLevel?: number;
169
178
  }
170
179
  export interface INavigatorDelegate {
171
180
  gotoPage?: (index: number) => void;
@@ -256,6 +265,7 @@ export interface ISlideConfig {
256
265
  */
257
266
  enableTracking?: boolean;
258
267
  enableWebAudio?: boolean;
268
+ skipActionWhenFrozen?: boolean;
259
269
  }
260
270
  interface MediaState {
261
271
  type: "pause" | "play";
@@ -636,6 +646,7 @@ export declare class Slide extends Slide_base {
636
646
  private _doDestroy;
637
647
  private waitLoadEnd;
638
648
  preload(index: number): Promise<void>;
649
+ preloadResource(index: number): Promise<void>;
639
650
  /**
640
651
  * Destruction method.
641
652
  */