@qy_better_lib/hooks 0.2.12 → 0.2.13
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
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { onMounted, onBeforeUnmount } from "vue";
|
|
2
2
|
import { Box3, Vector3, AxesHelper, OrthographicCamera, PerspectiveCamera, PCFSoftShadowMap, SpotLight, PointLight, DirectionalLight, AmbientLight, WebGLRenderer, Vector2, Raycaster, Cache, BoxHelper, Object3D, Scene, Color } from "three";
|
|
3
3
|
import { VRButton } from "three/examples/jsm/webxr/VRButton";
|
|
4
|
-
import { CSS2DObject } from "three/examples/jsm/renderers/CSS2DRenderer
|
|
4
|
+
import { CSS2DObject, CSS2DRenderer } from "three/examples/jsm/renderers/CSS2DRenderer";
|
|
5
5
|
import { on, off } from "@qy_better_lib/core";
|
|
6
6
|
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";
|
|
7
|
-
import { CSS2DRenderer } from "three/examples/jsm/renderers/CSS2DRenderer";
|
|
8
7
|
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
|
|
9
8
|
import { MTLLoader } from "three/examples/jsm/loaders/MTLLoader";
|
|
10
9
|
import { OBJLoader } from "three/examples/jsm/loaders/OBJLoader";
|
|
@@ -17,7 +16,7 @@ import { UnrealBloomPass } from "three/examples/jsm/postprocessing/UnrealBloomPa
|
|
|
17
16
|
import { SSAOPass } from "three/examples/jsm/postprocessing/SSAOPass";
|
|
18
17
|
import { FilmPass } from "three/examples/jsm/postprocessing/FilmPass";
|
|
19
18
|
import { FXAAShader } from "three/examples/jsm/shaders/FXAAShader";
|
|
20
|
-
import {
|
|
19
|
+
import { LuminosityShader } from "three/examples/jsm/shaders/LuminosityShader";
|
|
21
20
|
class ObjectToolTip {
|
|
22
21
|
/**
|
|
23
22
|
* 关联的3D对象
|
|
@@ -1073,7 +1072,7 @@ function use_effect_composer(current_three) {
|
|
|
1073
1072
|
console.error("Composer is not initialized");
|
|
1074
1073
|
return null;
|
|
1075
1074
|
}
|
|
1076
|
-
const grayscale_pass = new ShaderPass(
|
|
1075
|
+
const grayscale_pass = new ShaderPass(LuminosityShader);
|
|
1077
1076
|
grayscale_pass.renderToScreen = true;
|
|
1078
1077
|
composer.addPass(grayscale_pass);
|
|
1079
1078
|
return grayscale_pass;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ThreeTarget } from '../shared/type';
|
|
2
|
-
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader
|
|
3
|
-
import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer
|
|
4
|
-
import { OutlinePass } from 'three/examples/jsm/postprocessing/OutlinePass
|
|
5
|
-
import { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass
|
|
2
|
+
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
|
|
3
|
+
import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer';
|
|
4
|
+
import { OutlinePass } from 'three/examples/jsm/postprocessing/OutlinePass';
|
|
5
|
+
import { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass';
|
|
6
6
|
import { BoxHelper, Object3D } from 'three';
|
|
7
7
|
import { ObjectToolTip, ToolTipOptions } from './toolTip';
|
|
8
8
|
import { OutLineOptions } from './type';
|