@qy_better_lib/hooks 0.2.18 → 0.2.19

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.
@@ -964,7 +964,7 @@ function use_effect_composer(current_three) {
964
964
  }
965
965
  function enable_effect(use_ssao = true, ssao_options) {
966
966
  if (!current_three.renderer) {
967
- console.error("Renderer is not initialized");
967
+ console.error("渲染器未初始化");
968
968
  return null;
969
969
  }
970
970
  const composer = new EffectComposer(current_three.renderer);
@@ -987,7 +987,7 @@ function use_effect_composer(current_three) {
987
987
  }
988
988
  function enable_fxaa(composer) {
989
989
  if (!composer || !current_three.renderer) {
990
- console.error("Composer or renderer is not initialized");
990
+ console.error("Composer或渲染器未初始化");
991
991
  return;
992
992
  }
993
993
  const { width, height } = get_container_size();
@@ -1001,7 +1001,7 @@ function use_effect_composer(current_three) {
1001
1001
  }
1002
1002
  function enable_unreal_bloom(composer, strength = 0.4, radius = 1.5, threshold = 0.2) {
1003
1003
  if (!composer) {
1004
- console.error("Composer is not initialized");
1004
+ console.error("Composer未初始化");
1005
1005
  return null;
1006
1006
  }
1007
1007
  const { width, height } = get_container_size();
@@ -1014,13 +1014,12 @@ function use_effect_composer(current_three) {
1014
1014
  threshold
1015
1015
  // 阈值:亮度达到多少时触发光晕
1016
1016
  );
1017
- bloom_pass.renderToScreen = true;
1018
1017
  composer.addPass(bloom_pass);
1019
1018
  return bloom_pass;
1020
1019
  }
1021
1020
  function enable_outline(composer) {
1022
1021
  if (!composer || !current_three.scene || !current_three.camera) {
1023
- console.error("Composer, scene or camera is not initialized");
1022
+ console.error("Composer,场景、相机未初始化");
1024
1023
  return null;
1025
1024
  }
1026
1025
  const { width, height } = get_container_size();
@@ -1029,13 +1028,12 @@ function use_effect_composer(current_three) {
1029
1028
  current_three.scene,
1030
1029
  current_three.camera
1031
1030
  );
1032
- outline_pass.renderToScreen = true;
1033
1031
  composer.addPass(outline_pass);
1034
1032
  return outline_pass;
1035
1033
  }
1036
1034
  function set_out_line(outline_pass, objects, out_line_options = {}) {
1037
1035
  if (!outline_pass) {
1038
- console.error("OutlinePass is not initialized");
1036
+ console.error("轮廓高亮Pass未初始化");
1039
1037
  return;
1040
1038
  }
1041
1039
  const default_options = {
@@ -1070,7 +1068,7 @@ function use_effect_composer(current_three) {
1070
1068
  }
1071
1069
  function enable_film_effect(composer, options = {}) {
1072
1070
  if (!composer) {
1073
- console.error("Composer is not initialized");
1071
+ console.error("Composer未初始化");
1074
1072
  return null;
1075
1073
  }
1076
1074
  const default_options = {
@@ -1087,17 +1085,15 @@ function use_effect_composer(current_three) {
1087
1085
  grayscale
1088
1086
  // 灰度模式
1089
1087
  );
1090
- film_pass.renderToScreen = true;
1091
1088
  composer.addPass(film_pass);
1092
1089
  return film_pass;
1093
1090
  }
1094
1091
  function enable_grayscale(composer) {
1095
1092
  if (!composer) {
1096
- console.error("Composer is not initialized");
1093
+ console.error("Composer未初始化");
1097
1094
  return null;
1098
1095
  }
1099
1096
  const grayscale_pass = new ShaderPass(LuminosityShader);
1100
- grayscale_pass.renderToScreen = true;
1101
1097
  composer.addPass(grayscale_pass);
1102
1098
  return grayscale_pass;
1103
1099
  }
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.18",
4
+ "version": "0.2.19",
5
5
  "description": "qy better lib hooks",
6
6
  "author": "luhuiming",
7
7
  "license": "MIT",