three-base 2.0.129 → 2.0.134
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/ApngTexture.d.ts +13 -13
- package/ApngTexture.js +61 -61
- package/ApngTextureManage.d.ts +18 -18
- package/ApngTextureManage.js +87 -87
- package/DirectionalLight.d.ts +6 -0
- package/DirectionalLight.js +68 -0
- package/EventMesh.d.ts +18 -18
- package/EventMesh.js +59 -59
- package/ExtrudeMesh.d.ts +112 -112
- package/ExtrudeMesh.js +366 -366
- package/FPScontrol.d.ts +71 -50
- package/FPScontrol.js +505 -232
- package/Fire/Fire.d.ts +28 -28
- package/Fire/Fire.js +79 -79
- package/Fire/FireGromtry.d.ts +9 -9
- package/Fire/FireGromtry.js +40 -40
- package/Fire/FireMaterial.d.ts +28 -28
- package/Fire/FireMaterial.js +32 -32
- package/Fire/index.d.ts +1 -1
- package/Fire/index.js +1 -1
- package/Grass/Grass.d.ts +8 -8
- package/Grass/Grass.js +38 -38
- package/Grass/index.d.ts +1 -1
- package/Grass/index.js +1 -1
- package/Ground1/Ground1.d.ts +11 -11
- package/Ground1/Ground1.js +54 -54
- package/Ground1/index.d.ts +1 -1
- package/Ground1/index.js +1 -1
- package/InstancedMeshBase.d.ts +39 -39
- package/InstancedMeshBase.js +293 -293
- package/KeyFrameAnimation.d.ts +25 -25
- package/KeyFrameAnimation.js +78 -78
- package/MeshBase.d.ts +35 -35
- package/MeshBase.js +223 -223
- package/Mirror.d.ts +25 -25
- package/Mirror.js +139 -139
- package/PipeMesh/PathGeometry.d.ts +44 -44
- package/PipeMesh/PathGeometry.js +300 -300
- package/PipeMesh/PathPoint.d.ts +17 -17
- package/PipeMesh/PathPoint.js +31 -31
- package/PipeMesh/PathPointList.d.ts +31 -31
- package/PipeMesh/PathPointList.js +208 -208
- package/PipeMesh/PathTubeGeometry.d.ts +25 -25
- package/PipeMesh/PathTubeGeometry.js +130 -130
- package/PipeMesh/PipeMesh.d.ts +25 -25
- package/PipeMesh/PipeMesh.js +63 -63
- package/PipeMesh/index.d.ts +1 -1
- package/PipeMesh/index.js +1 -1
- package/PlaneModal1/PlaneModal1.d.ts +31 -31
- package/PlaneModal1/PlaneModal1.js +105 -105
- package/PlaneModal1/index.d.ts +1 -1
- package/PlaneModal1/index.js +1 -1
- package/PlaneText.d.ts +39 -39
- package/PlaneText.js +30 -30
- package/PlaneWithHtml.d.ts +11 -11
- package/PlaneWithHtml.js +63 -68
- package/PointLight/PointLight.d.ts +14 -13
- package/PointLight/PointLight.js +70 -64
- package/PointLight/index.d.ts +1 -1
- package/PointLight/index.js +1 -1
- package/Sky/Sky.d.ts +9 -9
- package/Sky/Sky.js +22 -22
- package/Sky/index.d.ts +1 -1
- package/Sky/index.js +1 -1
- package/SpotLight.d.ts +6 -0
- package/SpotLight.js +72 -0
- package/SpriteModal1/SpriteModal1.d.ts +30 -30
- package/SpriteModal1/SpriteModal1.js +110 -110
- package/SpriteModal1/index.d.ts +1 -1
- package/SpriteModal1/index.js +1 -1
- package/SpriteText.d.ts +45 -45
- package/SpriteText.js +163 -163
- package/SpriteText2.d.ts +47 -47
- package/SpriteText2.js +198 -198
- package/SpriteWithHtml.d.ts +7 -7
- package/SpriteWithHtml.js +44 -49
- package/Text3D/Text3D.d.ts +20 -20
- package/Text3D/Text3D.js +62 -62
- package/Text3D/fontController.d.ts +59 -59
- package/Text3D/fontController.js +199 -199
- package/Text3D/index.d.ts +1 -1
- package/Text3D/index.js +1 -1
- package/ThreeBase.d.ts +97 -81
- package/ThreeBase.js +613 -559
- package/ThreeMouse.d.ts +40 -40
- package/ThreeMouse.js +407 -409
- package/Transition.d.ts +40 -40
- package/Transition.js +210 -207
- package/Water/Water.d.ts +5 -0
- package/Water/Water.js +26 -0
- package/Water/waternormals.jpg +0 -0
- package/declare.d.ts +167 -0
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/keyContorls.d.ts +25 -25
- package/keyContorls.js +98 -98
- package/package.json +1 -1
- package/pass/bloom_pass.d.ts +2 -2
- package/pass/bloom_pass.js +99 -99
- package/pass/cover_pass.d.ts +2 -2
- package/pass/cover_pass.js +95 -95
- package/pass/frosted_glass_pass.d.ts +2 -0
- package/pass/frosted_glass_pass.js +275 -0
- package/pass/fsQuad.d.ts +9 -9
- package/pass/fsQuad.js +28 -28
- package/pass/glow_pass.d.ts +2 -2
- package/pass/glow_pass.js +310 -254
- package/pass/ssao_pass.d.ts +11 -0
- package/pass/ssao_pass.js +294 -0
- package/pass/stroke_pass.d.ts +2 -2
- package/pass/stroke_pass.js +199 -199
- package/shaders/FXAAShaderMaterial.d.ts +3 -3
- package/shaders/FXAAShaderMaterial.js +21 -21
- package/shaders/baseTextureToRenderShader.d.ts +2 -2
- package/shaders/baseTextureToRenderShader.js +14 -14
- package/shaders/copyShader.d.ts +3 -3
- package/shaders/copyShader.js +14 -14
- package/shaders.d.ts +5 -5
- package/shaders.js +42 -42
- package/threeLoader.d.ts +34 -34
- package/threeLoader.js +527 -527
- package/threeUtils.d.ts +52 -52
- package/threeUtils.js +330 -330
package/FPScontrol.d.ts
CHANGED
|
@@ -1,50 +1,71 @@
|
|
|
1
|
-
import { Camera, Clock, EventDispatcher,
|
|
2
|
-
import { Capsule } from "three/examples/jsm/math/Capsule";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
import { Camera, Clock, EventDispatcher, Scene, Vector3 } from "three";
|
|
2
|
+
import { Capsule } from "three/examples/jsm/math/Capsule";
|
|
3
|
+
/** 第一/三人称控制器(6 射线 + 迭代推离,userData.fpsCollision 标记碰撞体) */
|
|
4
|
+
export default class FPScontrol extends EventDispatcher {
|
|
5
|
+
canvas: HTMLCanvasElement;
|
|
6
|
+
/**
|
|
7
|
+
* @param camera 相机
|
|
8
|
+
* @param canvas canvas 元素
|
|
9
|
+
* @param scene 场景,用于射线碰撞检测(会递归检测所有子对象)
|
|
10
|
+
*/
|
|
11
|
+
constructor(camera: Camera, canvas: HTMLCanvasElement, scene: Scene);
|
|
12
|
+
enable: boolean;
|
|
13
|
+
GRAVITY: number;
|
|
14
|
+
STEPS_PER_FRAME: number;
|
|
15
|
+
speed: number;
|
|
16
|
+
camera: Camera;
|
|
17
|
+
inertia: boolean;
|
|
18
|
+
scene: Scene;
|
|
19
|
+
dev: boolean;
|
|
20
|
+
thirdPerson: boolean;
|
|
21
|
+
thirdPersonDistance: number;
|
|
22
|
+
thirdPersonHeight: number;
|
|
23
|
+
private _thirdPersonAngleY;
|
|
24
|
+
private _thirdPersonAngleX;
|
|
25
|
+
private _prevThirdPerson;
|
|
26
|
+
COLLIDE_VOLUME: number;
|
|
27
|
+
private readonly PUSH_DISTANCE;
|
|
28
|
+
private readonly MAX_ITERATIONS;
|
|
29
|
+
private _raycaster;
|
|
30
|
+
private _tempVec;
|
|
31
|
+
private _tempVec2;
|
|
32
|
+
private _tempVec3;
|
|
33
|
+
private _tempVec4;
|
|
34
|
+
private readonly HORIZONTAL_RAY_DIRECTIONS;
|
|
35
|
+
private readonly VERTICAL_DOWN;
|
|
36
|
+
private readonly VERTICAL_UP;
|
|
37
|
+
private _colliders;
|
|
38
|
+
private _getColliders;
|
|
39
|
+
playerCollider: Capsule;
|
|
40
|
+
clock: Clock;
|
|
41
|
+
prePlayerVelocity: Vector3;
|
|
42
|
+
playerVelocity: Vector3;
|
|
43
|
+
jumping: boolean;
|
|
44
|
+
playerDirection: Vector3;
|
|
45
|
+
prePlayerOnFloor: boolean;
|
|
46
|
+
playerOnFloor: boolean;
|
|
47
|
+
mouseTime: number;
|
|
48
|
+
isMousedown: boolean;
|
|
49
|
+
keyStates: {
|
|
50
|
+
[key: string]: boolean;
|
|
51
|
+
};
|
|
52
|
+
private _debugRayGroup;
|
|
53
|
+
private _debugLines;
|
|
54
|
+
private _initDebugLines;
|
|
55
|
+
private _updateDebugLine;
|
|
56
|
+
private _disposeDebugLines;
|
|
57
|
+
init(canvas: HTMLCanvasElement): void;
|
|
58
|
+
keydown: (event: KeyboardEvent) => void;
|
|
59
|
+
keyup: (event: KeyboardEvent) => void;
|
|
60
|
+
mousedown: () => void;
|
|
61
|
+
mouseup: () => void;
|
|
62
|
+
mousemove: (event: MouseEvent) => void;
|
|
63
|
+
getForwardVector: () => Vector3;
|
|
64
|
+
getSideVector: () => Vector3;
|
|
65
|
+
controls: (deltaTime: number) => void;
|
|
66
|
+
updatePlayer: (deltaTime: number) => void;
|
|
67
|
+
playerCollisions(): void;
|
|
68
|
+
teleportPlayerIfOob: () => void;
|
|
69
|
+
update(): void;
|
|
70
|
+
disposer(): void;
|
|
71
|
+
}
|