lythreeframe 1.0.21 → 1.0.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.
- package/dist/bundle.cjs.js +109 -109
- package/dist/bundle.esm.js +7 -6
- package/dist/index.d.ts +5 -3
- package/dist/lythreeframe/AssetManagement/AssetManager.d.ts +1 -1
- package/dist/lythreeframe/AssetManagement/AssetPointer/AssetPointer.d.ts +1 -1
- package/dist/lythreeframe/Factory/CameraFactory.d.ts +3 -17
- package/dist/lythreeframe/Frame/Controller.d.ts +1 -1
- package/dist/lythreeframe/Frame/Parameters/AppParameter.d.ts +12 -0
- package/dist/lythreeframe/Frame/Parameters/CameraParameter.d.ts +16 -0
- package/dist/lythreeframe/Frame/Parameters/WorldParameter.d.ts +2 -0
- package/dist/lythreeframe/Frame/World.d.ts +1 -1
- package/dist/lythreeframe/Geometry/PlaneGeometry.d.ts +1 -1
- package/dist/lythreeframe/Geometry/TriangleGeometry.d.ts +1 -1
- package/dist/lythreeframe/Library/Math.d.ts +5 -5
- package/dist/lythreeframe/Library/ResourceLibrary.d.ts +1 -1
- package/dist/lythreeframe/Object/Actor.d.ts +5 -5
- package/dist/lythreeframe/Object/Actors/Light/DirectionalLightActor.d.ts +1 -1
- package/dist/lythreeframe/Object/Actors/Shape/BoxActor.d.ts +1 -1
- package/dist/lythreeframe/Object/Actors/Shape/PlaneActor.d.ts +1 -1
- package/dist/lythreeframe/Object/Actors/Sky/SkyActor.d.ts +8 -0
- package/dist/lythreeframe/Object/Components/2D/2DComponent.d.ts +1 -2
- package/dist/lythreeframe/Object/Components/Camera/CameraComponent.d.ts +1 -1
- package/dist/lythreeframe/Object/Components/Component.d.ts +1 -1
- package/dist/lythreeframe/Object/Components/Light/DirectionalLight/DirectionalLightComponent.d.ts +1 -1
- package/dist/lythreeframe/Object/Components/Light/LightComponent.d.ts +1 -1
- package/dist/lythreeframe/Object/Components/Mesh/InstanceMesh/InstanceMeshComponent.d.ts +1 -1
- package/dist/lythreeframe/Object/Components/Mesh/InstanceMesh/MultiInstanceMeshComponent.d.ts +1 -1
- package/dist/lythreeframe/Object/Components/Mesh/MeshComponent.d.ts +6 -7
- package/dist/lythreeframe/Object/Components/Mesh/Shape/BoxComponent.d.ts +1 -1
- package/dist/lythreeframe/Object/Components/Mesh/Shape/PlaneComponent.d.ts +1 -1
- package/dist/lythreeframe/Object/Components/Mesh/Shape/SphereComponent.d.ts +1 -2
- package/dist/lythreeframe/Object/Components/Mesh/Sprite/SpriteComponent.d.ts +1 -1
- package/dist/lythreeframe/Object/Components/SceneComponent.d.ts +13 -13
- package/dist/lythreeframe/Object/Components/Sky/SkyComponent.d.ts +20 -0
- package/dist/lythreeframe/Object/PawnV2/Oribital.d.ts +2 -2
- package/dist/lythreeframe/Object/PawnV2/Pawn.d.ts +2 -2
- package/dist/lythreeframe/Object/PawnV2/TransformControl.d.ts +1 -1
- package/dist/lythreeframe/PostProcess/Param/Outline.d.ts +1 -1
- package/dist/lythreeframe/PostProcess/Param/ToneMapping.d.ts +1 -1
- package/dist/lythreeframe/PostProcess/WebGPUPostProcessFactory.d.ts +1 -1
- package/dist/lythreeframe/ThreeJsApp.d.ts +3 -12
- package/package.json +5 -5
package/dist/bundle.esm.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { MathUtils, Group, Vector3, Box3, Quaternion, Euler, Matrix4, Mesh, BufferGeometry, Material, Texture, LoadingManager, FileLoader, Scene, NoToneMapping, LinearToneMapping, ReinhardToneMapping, CineonToneMapping, ACESFilmicToneMapping, AgXToneMapping, NeutralToneMapping, Vector2, Raycaster, PerspectiveCamera, OrthographicCamera, Clock, DirectionalLight, MeshStandardMaterial, BoxGeometry, MeshBasicMaterial, PlaneGeometry, SphereGeometry, Object3D } from 'three';
|
|
1
|
+
import { MathUtils, Group, Vector3, Box3, Quaternion, Euler, Matrix4, Mesh, BufferGeometry, Material, Texture, LoadingManager, FileLoader, Scene, NoToneMapping, LinearToneMapping, ReinhardToneMapping, CineonToneMapping, ACESFilmicToneMapping, AgXToneMapping, NeutralToneMapping, WebGPURenderer, PostProcessing, Color, Vector2, Raycaster, PerspectiveCamera, OrthographicCamera, Clock, DirectionalLight, MeshStandardMaterial, BoxGeometry, MeshBasicMaterial, PlaneGeometry, SphereGeometry, Object3D } from 'three/webgpu';
|
|
2
2
|
import { GLTFLoader, DRACOLoader, CSS2DRenderer, OrbitControls } from 'three/examples/jsm/Addons.js';
|
|
3
3
|
import { pass, mrt, output, uniform, velocity, metalness, transformedNormalView, blendColor, time, oscSine } from 'three/tsl';
|
|
4
|
-
import { WebGPURenderer, PostProcessing, Color } from 'three/webgpu';
|
|
5
4
|
import { bloom } from 'three/examples/jsm/tsl/display/BloomNode.js';
|
|
6
5
|
import { denoise } from 'three/examples/jsm/tsl/display/DenoiseNode.js';
|
|
7
6
|
import { dof } from 'three/examples/jsm/tsl/display/DepthOfFieldNode.js';
|
|
@@ -2048,9 +2047,6 @@ class CameraFactory {
|
|
|
2048
2047
|
}
|
|
2049
2048
|
}
|
|
2050
2049
|
|
|
2051
|
-
const DefaultRenderParam = {
|
|
2052
|
-
antialias: true,
|
|
2053
|
-
};
|
|
2054
2050
|
const DefaultCameraParam = {
|
|
2055
2051
|
near: 0.1,
|
|
2056
2052
|
far: 1000,
|
|
@@ -2059,11 +2055,16 @@ const DefaultCameraParam = {
|
|
|
2059
2055
|
aspect: 1,
|
|
2060
2056
|
}
|
|
2061
2057
|
};
|
|
2058
|
+
|
|
2059
|
+
const DefaultRenderParam = {
|
|
2060
|
+
antialias: true,
|
|
2061
|
+
};
|
|
2062
2062
|
const DefaultAppParam = {
|
|
2063
2063
|
renderParam: DefaultRenderParam,
|
|
2064
2064
|
cameraParam: DefaultCameraParam,
|
|
2065
2065
|
postProcessParam: DefaultPostProcessParam,
|
|
2066
2066
|
};
|
|
2067
|
+
|
|
2067
2068
|
class ThreeJsApp {
|
|
2068
2069
|
get camera() {
|
|
2069
2070
|
return this._camera;
|
|
@@ -2899,4 +2900,4 @@ class TransformGizmo extends Pawn {
|
|
|
2899
2900
|
}
|
|
2900
2901
|
}
|
|
2901
2902
|
|
|
2902
|
-
export { Actor, AttachmentRules, BoxActor, BoxComponent, Controller, DefaultAppParam, DefaultBloomParam,
|
|
2903
|
+
export { Actor, AttachmentRules, BoxActor, BoxComponent, Controller, DefaultAppParam, DefaultBloomParam, DefaultDOFParam, DefaultDenoiseParam, DefaultGTAOParam, DefaultOutlineParams, DefaultPostProcessParam, DefaultRenderParam, DefaultSSRParam, DefaultToneMappingParams, Delegate, DirectionalLightActor, DirectionalLightComponent, FirstPerson, LYAssetManager, LYLoadTask, LabelComponent, MeshComponent, Orbital, PlaneActor, PlaneComponent, SceneComponent, SphereComponent, ThreeJsApp, ThreeObjectLibrary, ToneMappingOptions, TransformGizmo, Viewport, WebGPUPostProcessFactory, World };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,12 +2,14 @@ export { LYLoadTask } from "./lythreeframe/AssetManagement/Task/Task";
|
|
|
2
2
|
export { LYAssetManager } from "./lythreeframe/AssetManagement/AssetManager";
|
|
3
3
|
export { AttachmentRules } from "./lythreeframe/Defines";
|
|
4
4
|
export { Delegate } from "./lythreeframe/Delegate";
|
|
5
|
-
export { ThreeJsApp,
|
|
6
|
-
export type { AppParam } from "./lythreeframe/ThreeJsApp";
|
|
5
|
+
export { ThreeJsApp, } from "./lythreeframe/ThreeJsApp";
|
|
7
6
|
export { Controller } from "./lythreeframe/Frame/Controller";
|
|
8
7
|
export { Viewport } from "./lythreeframe/Frame/Viewport";
|
|
9
8
|
export { World } from "./lythreeframe/Frame/World";
|
|
10
|
-
export type { CameraParam } from
|
|
9
|
+
export type { CameraParam } from './lythreeframe/Frame/Parameters/CameraParameter';
|
|
10
|
+
export type { DefaultCameraParam } from './lythreeframe/Frame/Parameters/CameraParameter';
|
|
11
|
+
export type { AppParam } from "./lythreeframe/Frame/Parameters/AppParameter";
|
|
12
|
+
export { DefaultRenderParam, DefaultAppParam } from "./lythreeframe/Frame/Parameters/AppParameter";
|
|
11
13
|
export { Actor } from "./lythreeframe/Object/Actor";
|
|
12
14
|
export { DirectionalLightActor } from "./lythreeframe/Object/Actors/Light/DirectionalLightActor";
|
|
13
15
|
export { BoxActor } from "./lythreeframe/Object/Actors/Shape/BoxActor";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BufferGeometry, LoadingManager, Material, Mesh, Texture } from
|
|
1
|
+
import { BufferGeometry, LoadingManager, Material, Mesh, Texture } from "three/webgpu";
|
|
2
2
|
import { SceneComponent } from "../Object/Components/SceneComponent";
|
|
3
3
|
import { LYLoadTask } from "./Task/Task";
|
|
4
4
|
import { TAssetPointer } from "./AssetPointer/AssetPointer";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BufferGeometry, Material, Texture } from "three";
|
|
1
|
+
import { BufferGeometry, Material, Texture } from "three/webgpu";
|
|
2
2
|
import { TSmartPointer } from "../../Container/SmartPointer";
|
|
3
3
|
export declare class TAssetPointer<T extends BufferGeometry | Texture | Material> extends TSmartPointer<T> {
|
|
4
4
|
get uuid(): string;
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
import { OrthographicCamera, PerspectiveCamera } from "three";
|
|
2
|
-
|
|
3
|
-
near: number;
|
|
4
|
-
far: number;
|
|
5
|
-
param: PerspectiveCameraParam | OrthographicCameraParam;
|
|
6
|
-
}
|
|
7
|
-
export interface PerspectiveCameraParam {
|
|
8
|
-
fov: number;
|
|
9
|
-
aspect: number;
|
|
10
|
-
}
|
|
11
|
-
export interface OrthographicCameraParam {
|
|
12
|
-
left: number;
|
|
13
|
-
right: number;
|
|
14
|
-
top: number;
|
|
15
|
-
bottom: number;
|
|
16
|
-
}
|
|
1
|
+
import { OrthographicCamera, PerspectiveCamera } from "three/webgpu";
|
|
2
|
+
import { CameraParam } from "../Frame/Parameters/CameraParameter";
|
|
17
3
|
export declare class CameraFactory {
|
|
18
|
-
static createCamera(param: CameraParam):
|
|
4
|
+
static createCamera(param: CameraParam): any;
|
|
19
5
|
static updataCamera(param: CameraParam, camera: PerspectiveCamera | OrthographicCamera): PerspectiveCamera | OrthographicCamera;
|
|
20
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ThreeJsApp } from "../ThreeJsApp";
|
|
2
|
-
import { Euler, Intersection, OrthographicCamera, PerspectiveCamera, Quaternion, Vector3 } from "three";
|
|
2
|
+
import { Euler, Intersection, OrthographicCamera, PerspectiveCamera, Quaternion, Vector3 } from "three/webgpu";
|
|
3
3
|
import { World } from "./World";
|
|
4
4
|
import { Viewport } from "./Viewport";
|
|
5
5
|
import { Pawn } from "../Object/PawnV2/Pawn";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WebGPURendererParameters } from "three/src/renderers/webgpu/WebGPURenderer";
|
|
2
|
+
import { CameraParam } from "./CameraParameter";
|
|
3
|
+
import { PostProcessParam } from "@/lythreeframe/PostProcess/PostProcessParam";
|
|
4
|
+
import { WorldParam } from "./WorldParameter";
|
|
5
|
+
export interface AppParam {
|
|
6
|
+
renderParam?: WebGPURendererParameters;
|
|
7
|
+
cameraParam?: CameraParam;
|
|
8
|
+
postProcessParam?: PostProcessParam;
|
|
9
|
+
worldParam?: WorldParam;
|
|
10
|
+
}
|
|
11
|
+
export declare const DefaultRenderParam: WebGPURendererParameters;
|
|
12
|
+
export declare const DefaultAppParam: AppParam;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface CameraParam {
|
|
2
|
+
near: number;
|
|
3
|
+
far: number;
|
|
4
|
+
param: PerspectiveCameraParam | OrthographicCameraParam;
|
|
5
|
+
}
|
|
6
|
+
export interface PerspectiveCameraParam {
|
|
7
|
+
fov: number;
|
|
8
|
+
aspect: number;
|
|
9
|
+
}
|
|
10
|
+
export interface OrthographicCameraParam {
|
|
11
|
+
left: number;
|
|
12
|
+
right: number;
|
|
13
|
+
top: number;
|
|
14
|
+
bottom: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const DefaultCameraParam: CameraParam;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Vector3, Quaternion, Object3D, Box3,
|
|
1
|
+
import { Vector3, Quaternion, Object3D, Box3, Euler } from "three/webgpu";
|
|
2
2
|
export interface Segment {
|
|
3
3
|
pointA: Vector3;
|
|
4
4
|
pointB: Vector3;
|
|
@@ -11,8 +11,8 @@ export declare class LYMath {
|
|
|
11
11
|
y: number;
|
|
12
12
|
z: number;
|
|
13
13
|
};
|
|
14
|
-
static getQuatFromAxis(forwardVector: Vector3, upVector?: Vector3):
|
|
15
|
-
static MaxVector(v1: Vector3, v2: Vector3):
|
|
14
|
+
static getQuatFromAxis(forwardVector: Vector3, upVector?: Vector3): any;
|
|
15
|
+
static MaxVector(v1: Vector3, v2: Vector3): any;
|
|
16
16
|
static clamp(value: number, min: number, max: number): number;
|
|
17
17
|
static getPlaneConstantFromPointAndNormal(point: Vector3, normal: Vector3): number;
|
|
18
18
|
static getSizeAndCenterOfObject3D(object: Object3D): {
|
|
@@ -22,6 +22,6 @@ export declare class LYMath {
|
|
|
22
22
|
};
|
|
23
23
|
static SegmentsIntersection(segmentA: Segment, segmentB: Segment): Vector3 | null;
|
|
24
24
|
static getCenterPointInPoints(points: Vector3[]): Vector3;
|
|
25
|
-
static contructPlane(dirction: Vector3, position: Vector3, quaternion: Quaternion, scale: Vector3):
|
|
26
|
-
static intersectRayPlane(rayOrigin: Vector3, rayDirection: Vector3, planeNormal: Vector3, planePoint: Vector3):
|
|
25
|
+
static contructPlane(dirction: Vector3, position: Vector3, quaternion: Quaternion, scale: Vector3): any;
|
|
26
|
+
static intersectRayPlane(rayOrigin: Vector3, rayDirection: Vector3, planeNormal: Vector3, planePoint: Vector3): any;
|
|
27
27
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Vector3, Quaternion, Euler, Matrix4, Object3D } from "three";
|
|
1
|
+
import { Vector3, Quaternion, Euler, Matrix4, Object3D } from "three/webgpu";
|
|
2
2
|
import { BaseObject } from "./BaseObject";
|
|
3
3
|
import { AttachmentRules } from "../Defines";
|
|
4
4
|
import { SceneComponent } from "./Components/SceneComponent";
|
|
@@ -22,10 +22,10 @@ export declare class Actor extends BaseObject {
|
|
|
22
22
|
protected onHoverEndEvent: ((component?: SceneComponent) => void)[];
|
|
23
23
|
constructor(myThreeObject?: Object3D | null);
|
|
24
24
|
protected constructRootComponent(myThreeObject?: Object3D | null): void;
|
|
25
|
-
getBoundsCenterPosition(bInWorldSpace?: boolean):
|
|
26
|
-
getBoundsTopCenterPosition(bInWorldSpace?: boolean):
|
|
27
|
-
getBoundsBottomCenterPosition(bInWorldSpace?: boolean):
|
|
28
|
-
getBounds():
|
|
25
|
+
getBoundsCenterPosition(bInWorldSpace?: boolean): any;
|
|
26
|
+
getBoundsTopCenterPosition(bInWorldSpace?: boolean): any;
|
|
27
|
+
getBoundsBottomCenterPosition(bInWorldSpace?: boolean): any;
|
|
28
|
+
getBounds(): Box3;
|
|
29
29
|
destroy(): void;
|
|
30
30
|
setVisible(bVisible: boolean): void;
|
|
31
31
|
setLayers(layer: number, bAffectChildActor?: boolean): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColorRepresentation } from "three";
|
|
1
|
+
import { ColorRepresentation } from "three/webgpu";
|
|
2
2
|
import { Actor } from "../../Actor";
|
|
3
3
|
import { DirectionalLightComponent } from "../../Components/Light/DirectionalLight/DirectionalLightComponent";
|
|
4
4
|
export declare class DirectionalLightActor extends Actor {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Material } from "three";
|
|
1
|
+
import { Material } from "three/webgpu";
|
|
2
2
|
import { Actor } from "../../Actor";
|
|
3
3
|
export declare class BoxActor extends Actor {
|
|
4
4
|
constructor(width?: number, height?: number, depth?: number, widthSegments?: number, heightSegments?: number, depthSegments?: number, material?: Material);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EditorSkyComponent } from "@editor/Object/Components/Sky/EditorSkyComponent";
|
|
2
|
+
import { EditorActor } from "../EditorActor";
|
|
3
|
+
export declare class EditorSkyActor extends EditorActor {
|
|
4
|
+
protected _name: string;
|
|
5
|
+
protected skyComponent: EditorSkyComponent | null;
|
|
6
|
+
constructor();
|
|
7
|
+
protected constructRootComponent(): void;
|
|
8
|
+
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { CSS2DObject } from "three/examples/jsm/renderers/CSS2DRenderer.js";
|
|
2
|
-
import { Vector2 } from "three";
|
|
3
2
|
import { SceneComponent } from "../SceneComponent";
|
|
4
3
|
export declare class LabelComponent extends SceneComponent {
|
|
5
4
|
get threeObject(): CSS2DObject;
|
|
6
5
|
set threeObject(newThreeObject: CSS2DObject);
|
|
7
6
|
protected obj: CSS2DObject;
|
|
8
|
-
constructor(domElement: HTMLElement, center?:
|
|
7
|
+
constructor(domElement: HTMLElement, center?: any);
|
|
9
8
|
set isHoverEnabled(bCanHorver: boolean);
|
|
10
9
|
set isClickEnabled(bCanClick: boolean);
|
|
11
10
|
setVisible(bVisible: boolean): void;
|
package/dist/lythreeframe/Object/Components/Light/DirectionalLight/DirectionalLightComponent.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LightComponent } from "../LightComponent";
|
|
2
|
-
import { ColorRepresentation, DirectionalLight, Vector3 } from "three";
|
|
2
|
+
import { ColorRepresentation, DirectionalLight, Vector3 } from "three/webgpu";
|
|
3
3
|
import { World } from "../../../../Frame/World";
|
|
4
4
|
export declare class DirectionalLightComponent extends LightComponent {
|
|
5
5
|
get threeObject(): DirectionalLight;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BufferGeometry, Material, Matrix4 } from "three";
|
|
1
|
+
import { BufferGeometry, Material, Matrix4 } from "three/webgpu";
|
|
2
2
|
import { MeshComponent } from "../MeshComponent";
|
|
3
3
|
export declare class LYInstanceMeshComponent extends MeshComponent {
|
|
4
4
|
constructor(geometry: BufferGeometry, material: Material | Material[], matrices: Matrix4[]);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BufferGeometry, Material, Mesh } from
|
|
2
|
-
import { Vector3 } from "three";
|
|
1
|
+
import { BufferGeometry, Material, Mesh } from "three/webgpu";
|
|
3
2
|
import { SceneComponent } from "../SceneComponent";
|
|
4
3
|
export declare class MeshComponent extends SceneComponent {
|
|
5
4
|
get threeObject(): Mesh | null;
|
|
@@ -13,10 +12,10 @@ export declare class MeshComponent extends SceneComponent {
|
|
|
13
12
|
constructor(geometry: BufferGeometry, material: Material | Material[] | null);
|
|
14
13
|
set castShadow(bCast: boolean);
|
|
15
14
|
get castShadow(): boolean;
|
|
16
|
-
set receiveShadow(bReceive:
|
|
17
|
-
get receiveShadow():
|
|
18
|
-
getBoundsCenterPosition():
|
|
19
|
-
getBoundsTopCenterPosition():
|
|
20
|
-
getBoundsBottomCenterPosition():
|
|
15
|
+
set receiveShadow(bReceive: any);
|
|
16
|
+
get receiveShadow(): any;
|
|
17
|
+
getBoundsCenterPosition(): any;
|
|
18
|
+
getBoundsTopCenterPosition(): any;
|
|
19
|
+
getBoundsBottomCenterPosition(): any;
|
|
21
20
|
destroyObject(): void;
|
|
22
21
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Material } from "three";
|
|
1
|
+
import { Material } from "three/webgpu";
|
|
2
2
|
import { MeshComponent } from "../MeshComponent";
|
|
3
3
|
export declare class BoxComponent extends MeshComponent {
|
|
4
4
|
constructor(width?: number, height?: number, depth?: number, widthSegments?: number, heightSegments?: number, depthSegments?: number, material?: Material);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Material } from "three";
|
|
1
|
+
import { Material } from "three/webgpu";
|
|
2
2
|
import { MeshComponent } from "../MeshComponent";
|
|
3
3
|
export declare class PlaneComponent extends MeshComponent {
|
|
4
4
|
constructor(width: number, height: number, material: Material, widthSegments?: number, heightSegments?: number);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { MeshBasicMaterial } from "three";
|
|
2
1
|
import { MeshComponent } from "../MeshComponent";
|
|
3
2
|
export declare class SphereComponent extends MeshComponent {
|
|
4
|
-
constructor(radius: number, material?:
|
|
3
|
+
constructor(radius: number, material?: any, widthSegments?: number, heightSegments?: number);
|
|
5
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Actor } from "../Actor";
|
|
2
|
-
import { Box3, Euler, Matrix4, Object3D, Quaternion, Vector3 } from "three";
|
|
2
|
+
import { Box3, Euler, Matrix4, Object3D, Quaternion, Vector3 } from "three/webgpu";
|
|
3
3
|
import { Component } from "./Component";
|
|
4
4
|
import { World } from "../../Frame/World";
|
|
5
5
|
import { AttachmentRules } from "../../Defines";
|
|
@@ -23,29 +23,29 @@ export declare class SceneComponent extends Component {
|
|
|
23
23
|
onAddedToWorld(world: World): void;
|
|
24
24
|
destroy(): void;
|
|
25
25
|
destroyObject(): void;
|
|
26
|
-
getPosition():
|
|
26
|
+
getPosition(): any;
|
|
27
27
|
setPosition(position: Vector3): void;
|
|
28
28
|
setPosition(x: number, y: number, z: number): void;
|
|
29
|
-
getRotation():
|
|
29
|
+
getRotation(): any;
|
|
30
30
|
setRotation(rotation: Euler): void;
|
|
31
31
|
setRotation(x: number, y: number, z: number): void;
|
|
32
|
-
getQuaternion():
|
|
32
|
+
getQuaternion(): any;
|
|
33
33
|
setQuaternion(quat: Quaternion): void;
|
|
34
34
|
setQuaternion(x: number, y: number, z: number, w: number): void;
|
|
35
|
-
getScale():
|
|
35
|
+
getScale(): any;
|
|
36
36
|
setScale(position: Vector3): void;
|
|
37
37
|
setScale(x: number, y: number, z: number): void;
|
|
38
38
|
getMatrix(): Matrix4;
|
|
39
39
|
setMatrix(matrix: Matrix4): void;
|
|
40
|
-
getWorldPosition():
|
|
41
|
-
getWorldRotation():
|
|
42
|
-
getWorldQuaternion():
|
|
43
|
-
getWorldScale():
|
|
44
|
-
getWorldMatrix():
|
|
40
|
+
getWorldPosition(): any;
|
|
41
|
+
getWorldRotation(): any;
|
|
42
|
+
getWorldQuaternion(): any;
|
|
43
|
+
getWorldScale(): any;
|
|
44
|
+
getWorldMatrix(): any;
|
|
45
45
|
setWorldMatrix(newMatrix: Matrix4): void;
|
|
46
|
-
getWorldForwardDirection():
|
|
47
|
-
getWorldUpDirection():
|
|
48
|
-
getWorldRightDirection():
|
|
46
|
+
getWorldForwardDirection(): any;
|
|
47
|
+
getWorldUpDirection(): any;
|
|
48
|
+
getWorldRightDirection(): any;
|
|
49
49
|
worldToLocal(vec: Vector3): Vector3;
|
|
50
50
|
localToWorld(vec: Vector3): Vector3;
|
|
51
51
|
attachComponent(newComponent: SceneComponent): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SkyMesh } from "three/examples/jsm/objects/SkyMesh.js";
|
|
2
|
+
import { SceneComponent } from "../SceneComponent";
|
|
3
|
+
export interface SkyComponentParam {
|
|
4
|
+
turbidity: number;
|
|
5
|
+
rayleigh: number;
|
|
6
|
+
mieCoefficient: number;
|
|
7
|
+
mieDirectionalG: number;
|
|
8
|
+
elevation: number;
|
|
9
|
+
azimuth: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const DefaultSkyParam: SkyComponentParam;
|
|
12
|
+
export declare class SkyComponent extends SceneComponent {
|
|
13
|
+
get threeObject(): SkyMesh;
|
|
14
|
+
set threeObject(newThreeObject: SkyMesh);
|
|
15
|
+
protected obj: SkyMesh | null;
|
|
16
|
+
private skyParam;
|
|
17
|
+
private sunPosition;
|
|
18
|
+
constructor(skyparam?: SkyComponentParam);
|
|
19
|
+
private updateSky;
|
|
20
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Pawn } from "./Pawn";
|
|
2
2
|
import { Controller } from "../../Frame/Controller";
|
|
3
3
|
import { OrbitControls } from "three/examples/jsm/Addons.js";
|
|
4
|
-
import { Euler, Quaternion, Vector3 } from "three";
|
|
4
|
+
import { Euler, Quaternion, Vector3 } from "three/webgpu";
|
|
5
5
|
export declare class Orbital extends Pawn {
|
|
6
6
|
private anim;
|
|
7
7
|
get control(): OrbitControls;
|
|
8
8
|
protected _control: OrbitControls;
|
|
9
9
|
protected changeEvent: () => void;
|
|
10
|
-
get camera():
|
|
10
|
+
get camera(): any;
|
|
11
11
|
constructor(controller: Controller);
|
|
12
12
|
possess(): void;
|
|
13
13
|
unpossess(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Euler, Quaternion, Vector3 } from "three";
|
|
1
|
+
import { Euler, Quaternion, Vector3 } from "three/webgpu";
|
|
2
2
|
import { Controller } from "../../Frame/Controller";
|
|
3
3
|
export declare abstract class Pawn {
|
|
4
|
-
get camera():
|
|
4
|
+
get camera(): any;
|
|
5
5
|
set enabled(value: boolean);
|
|
6
6
|
get control(): any;
|
|
7
7
|
protected _control: any | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Pawn } from "./Pawn";
|
|
2
|
-
import { Matrix4 } from "three";
|
|
2
|
+
import { Matrix4 } from "three/webgpu";
|
|
3
3
|
import { TransformControls } from "three/examples/jsm/controls/TransformControls.js";
|
|
4
4
|
import { Controller } from "../../Frame/Controller";
|
|
5
5
|
export interface TransformType {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OutlineParams } from './Param/Outline';
|
|
2
|
-
import { Scene, Camera, Object3D } from "three";
|
|
2
|
+
import { Scene, Camera, Object3D } from "three/webgpu";
|
|
3
3
|
import BloomNode from "three/examples/jsm/tsl/display/BloomNode.js";
|
|
4
4
|
import DenoiseNode from "three/examples/jsm/tsl/display/DenoiseNode.js";
|
|
5
5
|
import DepthOfFieldNode from "three/examples/jsm/tsl/display/DepthOfFieldNode.js";
|
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
import { PostProcessParam } from './PostProcess/PostProcessParam';
|
|
2
1
|
import { World } from "./Frame/World";
|
|
3
2
|
import { Viewport } from "./Frame/Viewport";
|
|
4
3
|
import { Controller } from "./Frame/Controller";
|
|
5
|
-
import { Clock, OrthographicCamera, PerspectiveCamera } from "three";
|
|
6
|
-
import { CameraParam } from "./Factory/CameraFactory";
|
|
7
|
-
import { WebGPURendererParameters } from 'three/src/renderers/webgpu/WebGPURenderer.js';
|
|
4
|
+
import { Clock, OrthographicCamera, PerspectiveCamera } from "three/webgpu";
|
|
8
5
|
import { Delegate } from './Delegate';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
cameraParam?: CameraParam;
|
|
12
|
-
postProcessParam?: PostProcessParam;
|
|
13
|
-
}
|
|
14
|
-
export declare const DefaultRenderParam: WebGPURendererParameters;
|
|
15
|
-
export declare const DefaultCameraParam: CameraParam;
|
|
16
|
-
export declare const DefaultAppParam: AppParam;
|
|
6
|
+
import { CameraParam } from './Frame/Parameters/CameraParameter';
|
|
7
|
+
import { AppParam } from './Frame/Parameters/AppParameter';
|
|
17
8
|
export declare class ThreeJsApp {
|
|
18
9
|
get camera(): PerspectiveCamera | OrthographicCamera;
|
|
19
10
|
get clock(): Clock;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lythreeframe",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"description": "Three.js 封装",
|
|
5
5
|
"main": "dist/bundle.cjs.js",
|
|
6
6
|
"module": "dist/bundle.esm.js",
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
14
|
"gsap": "^3.12.2",
|
|
15
|
-
"three": "^0.
|
|
16
|
-
"@types/three": "^0.
|
|
15
|
+
"three": "^0.174.0",
|
|
16
|
+
"@types/three": "^0.174.0"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist"
|
|
20
20
|
],
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
23
|
-
"@types/three": "^0.
|
|
23
|
+
"@types/three": "^0.174.0",
|
|
24
24
|
"gsap": "^3.12.2",
|
|
25
25
|
"rollup": "^4.35.0",
|
|
26
|
-
"three": "^0.
|
|
26
|
+
"three": "^0.174.0",
|
|
27
27
|
"tslib": "^2.8.1",
|
|
28
28
|
"typescript": "^5.8.2"
|
|
29
29
|
},
|