@qy_better_lib/hooks 0.2.17 → 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.
- package/lib/use-three/index.mjs +7 -9
- package/package.json +1 -1
package/lib/use-three/index.mjs
CHANGED
|
@@ -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("
|
|
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
|
|
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
|
|
1004
|
+
console.error("Composer未初始化");
|
|
1005
1005
|
return null;
|
|
1006
1006
|
}
|
|
1007
1007
|
const { width, height } = get_container_size();
|
|
@@ -1019,7 +1019,7 @@ function use_effect_composer(current_three) {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
function enable_outline(composer) {
|
|
1021
1021
|
if (!composer || !current_three.scene || !current_three.camera) {
|
|
1022
|
-
console.error("Composer
|
|
1022
|
+
console.error("Composer,场景、相机未初始化");
|
|
1023
1023
|
return null;
|
|
1024
1024
|
}
|
|
1025
1025
|
const { width, height } = get_container_size();
|
|
@@ -1033,7 +1033,7 @@ function use_effect_composer(current_three) {
|
|
|
1033
1033
|
}
|
|
1034
1034
|
function set_out_line(outline_pass, objects, out_line_options = {}) {
|
|
1035
1035
|
if (!outline_pass) {
|
|
1036
|
-
console.error("
|
|
1036
|
+
console.error("轮廓高亮Pass未初始化");
|
|
1037
1037
|
return;
|
|
1038
1038
|
}
|
|
1039
1039
|
const default_options = {
|
|
@@ -1068,7 +1068,7 @@ function use_effect_composer(current_three) {
|
|
|
1068
1068
|
}
|
|
1069
1069
|
function enable_film_effect(composer, options = {}) {
|
|
1070
1070
|
if (!composer) {
|
|
1071
|
-
console.error("Composer
|
|
1071
|
+
console.error("Composer未初始化");
|
|
1072
1072
|
return null;
|
|
1073
1073
|
}
|
|
1074
1074
|
const default_options = {
|
|
@@ -1085,17 +1085,15 @@ function use_effect_composer(current_three) {
|
|
|
1085
1085
|
grayscale
|
|
1086
1086
|
// 灰度模式
|
|
1087
1087
|
);
|
|
1088
|
-
film_pass.renderToScreen = true;
|
|
1089
1088
|
composer.addPass(film_pass);
|
|
1090
1089
|
return film_pass;
|
|
1091
1090
|
}
|
|
1092
1091
|
function enable_grayscale(composer) {
|
|
1093
1092
|
if (!composer) {
|
|
1094
|
-
console.error("Composer
|
|
1093
|
+
console.error("Composer未初始化");
|
|
1095
1094
|
return null;
|
|
1096
1095
|
}
|
|
1097
1096
|
const grayscale_pass = new ShaderPass(LuminosityShader);
|
|
1098
|
-
grayscale_pass.renderToScreen = true;
|
|
1099
1097
|
composer.addPass(grayscale_pass);
|
|
1100
1098
|
return grayscale_pass;
|
|
1101
1099
|
}
|