@qy_better_lib/hooks 0.2.21 → 0.2.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.
@@ -533,8 +533,8 @@ function use_renderer(current_three) {
533
533
  render_action();
534
534
  hasCustomRender = true;
535
535
  }
536
+ current_three.css2Renderer?.render(current_three.scene, current_three.camera);
536
537
  if (!hasCustomRender) {
537
- current_three.css2Renderer?.render(current_three.scene, current_three.camera);
538
538
  current_three.renderer.render(current_three.scene, current_three.camera);
539
539
  }
540
540
  }
@@ -550,9 +550,15 @@ function use_renderer(current_three) {
550
550
  if (current_three.renderer?.xr.enabled) {
551
551
  current_three.renderer.setAnimationLoop(() => {
552
552
  if (is_rendering) {
553
- render_action && render_action();
553
+ let hasCustomRender = false;
554
+ if (render_action) {
555
+ render_action();
556
+ hasCustomRender = true;
557
+ }
554
558
  current_three.css2Renderer?.render(current_three.scene, current_three.camera);
555
- current_three.renderer?.render(current_three.scene, current_three.camera);
559
+ if (!hasCustomRender) {
560
+ current_three.renderer?.render(current_three.scene, current_three.camera);
561
+ }
556
562
  }
557
563
  });
558
564
  } else {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qy_better_lib/hooks",
3
3
  "private": false,
4
- "version": "0.2.21",
4
+ "version": "0.2.23",
5
5
  "description": "qy better lib hooks",
6
6
  "author": "luhuiming",
7
7
  "license": "MIT",