lythreeframe 1.0.22 → 1.0.24
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 +217 -141
- package/dist/bundle.esm.js +112 -39
- package/dist/index.d.ts +11 -7
- 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 +2 -2
- package/dist/lythreeframe/Frame/Controller.d.ts +1 -1
- 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 +3 -2
- 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 +1 -1
- 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';
|
|
@@ -13,6 +12,7 @@ import { motionBlur } from 'three/examples/jsm/tsl/display/MotionBlur.js';
|
|
|
13
12
|
import { fxaa } from 'three/examples/jsm/tsl/display/FXAANode.js';
|
|
14
13
|
import { smaa } from 'three/examples/jsm/tsl/display/SMAANode.js';
|
|
15
14
|
import { gsap } from 'gsap';
|
|
15
|
+
import { SkyMesh } from 'three/examples/jsm/objects/SkyMesh.js';
|
|
16
16
|
import { CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer.js';
|
|
17
17
|
import { PointerLockControls } from 'three/examples/jsm/controls/PointerLockControls';
|
|
18
18
|
import { TransformControls } from 'three/examples/jsm/controls/TransformControls.js';
|
|
@@ -2612,9 +2612,19 @@ class DirectionalLightComponent extends LightComponent {
|
|
|
2612
2612
|
class DirectionalLightActor extends Actor {
|
|
2613
2613
|
constructor(color = 0xffffff, intensity = 1) {
|
|
2614
2614
|
super();
|
|
2615
|
-
this.lightComponent =
|
|
2615
|
+
this.lightComponent = null;
|
|
2616
|
+
this.lightComponent = this.rootComponent;
|
|
2617
|
+
if (this.lightComponent) {
|
|
2618
|
+
this.lightComponent.color = color;
|
|
2619
|
+
this.lightComponent.intensity = intensity;
|
|
2620
|
+
}
|
|
2621
|
+
this.lightComponent.castShadow = true;
|
|
2622
|
+
}
|
|
2623
|
+
constructRootComponent() {
|
|
2624
|
+
this.lightComponent = new DirectionalLightComponent();
|
|
2616
2625
|
this.rootComponent = this.lightComponent;
|
|
2617
2626
|
this.lightComponent.castShadow = true;
|
|
2627
|
+
this.rootComponent.parentActor = this;
|
|
2618
2628
|
}
|
|
2619
2629
|
}
|
|
2620
2630
|
|
|
@@ -2631,6 +2641,69 @@ class BoxActor extends Actor {
|
|
|
2631
2641
|
}
|
|
2632
2642
|
}
|
|
2633
2643
|
|
|
2644
|
+
const DefaultSkyParam = {
|
|
2645
|
+
turbidity: 10,
|
|
2646
|
+
rayleigh: 2,
|
|
2647
|
+
mieCoefficient: 0.005,
|
|
2648
|
+
mieDirectionalG: 0.8,
|
|
2649
|
+
elevation: 23.44,
|
|
2650
|
+
azimuth: 135,
|
|
2651
|
+
};
|
|
2652
|
+
class SkyComponent extends SceneComponent {
|
|
2653
|
+
get threeObject() {
|
|
2654
|
+
if (!this.obj) {
|
|
2655
|
+
throw Error("three object is invalid");
|
|
2656
|
+
}
|
|
2657
|
+
return this.obj;
|
|
2658
|
+
}
|
|
2659
|
+
set threeObject(newThreeObject) {
|
|
2660
|
+
this.obj = newThreeObject;
|
|
2661
|
+
if (this.obj) {
|
|
2662
|
+
this.obj.userData["LYObject"] = this;
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2665
|
+
constructor(skyparam) {
|
|
2666
|
+
let obj = new SkyMesh();
|
|
2667
|
+
super(obj);
|
|
2668
|
+
this.skyParam = DefaultSkyParam;
|
|
2669
|
+
this.sunPosition = new Vector3();
|
|
2670
|
+
this.obj = obj;
|
|
2671
|
+
this.name = "SkyComponent";
|
|
2672
|
+
if (skyparam) {
|
|
2673
|
+
this.skyParam = skyparam;
|
|
2674
|
+
}
|
|
2675
|
+
this.updateSky();
|
|
2676
|
+
}
|
|
2677
|
+
updateSky() {
|
|
2678
|
+
var _a, _b;
|
|
2679
|
+
this.threeObject.turbidity.value = this.skyParam.turbidity;
|
|
2680
|
+
this.threeObject.rayleigh.value = this.skyParam.rayleigh;
|
|
2681
|
+
this.threeObject.mieCoefficient.value = this.skyParam.mieCoefficient;
|
|
2682
|
+
this.threeObject.mieDirectionalG.value = this.skyParam.mieDirectionalG;
|
|
2683
|
+
const phi = MathUtils.degToRad(90 - this.skyParam.elevation);
|
|
2684
|
+
const theta = MathUtils.degToRad(this.skyParam.azimuth);
|
|
2685
|
+
this.sunPosition.setFromSphericalCoords(1, phi, theta);
|
|
2686
|
+
this.threeObject.sunPosition.value.copy(this.sunPosition);
|
|
2687
|
+
(_b = (_a = this.world) === null || _a === void 0 ? void 0 : _a.viewport) === null || _b === void 0 ? void 0 : _b.markRenderStateDirty();
|
|
2688
|
+
}
|
|
2689
|
+
}
|
|
2690
|
+
|
|
2691
|
+
class SkyActor extends Actor {
|
|
2692
|
+
constructor() {
|
|
2693
|
+
super();
|
|
2694
|
+
this._name = "SkyActor";
|
|
2695
|
+
this.skyComponent = null;
|
|
2696
|
+
this.name = "DirectionalLightActor";
|
|
2697
|
+
this.skyComponent = this.rootComponent;
|
|
2698
|
+
this.rootComponent.name = `${this.rootComponent.name}(Root)`;
|
|
2699
|
+
}
|
|
2700
|
+
constructRootComponent() {
|
|
2701
|
+
this.skyComponent = new SkyComponent();
|
|
2702
|
+
this.rootComponent = this.skyComponent;
|
|
2703
|
+
this.rootComponent.parentActor = this;
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2634
2707
|
class PlaneComponent extends MeshComponent {
|
|
2635
2708
|
constructor(width, height, material, widthSegments = 1, heightSegments = 1) {
|
|
2636
2709
|
super(new PlaneGeometry(width, height, widthSegments, heightSegments), material);
|
|
@@ -2656,41 +2729,6 @@ class PlaneActor extends Actor {
|
|
|
2656
2729
|
}
|
|
2657
2730
|
}
|
|
2658
2731
|
|
|
2659
|
-
const DefaultBloomParam = {
|
|
2660
|
-
threshold: 0,
|
|
2661
|
-
strength: 1,
|
|
2662
|
-
radius: 0,
|
|
2663
|
-
};
|
|
2664
|
-
|
|
2665
|
-
const DefaultDenoiseParam = {
|
|
2666
|
-
denoiseRadius: 5,
|
|
2667
|
-
lumaPhi: 5,
|
|
2668
|
-
depthPhi: 5,
|
|
2669
|
-
normalPhi: 5
|
|
2670
|
-
};
|
|
2671
|
-
|
|
2672
|
-
const DefaultDOFParam = {
|
|
2673
|
-
focus: 500.0,
|
|
2674
|
-
aperture: 5,
|
|
2675
|
-
maxblur: 0.01
|
|
2676
|
-
};
|
|
2677
|
-
|
|
2678
|
-
const DefaultGTAOParam = {
|
|
2679
|
-
distanceExponent: 1,
|
|
2680
|
-
distanceFallOff: 1,
|
|
2681
|
-
radius: 0.25,
|
|
2682
|
-
scale: 1,
|
|
2683
|
-
thickness: 1,
|
|
2684
|
-
denoised: true,
|
|
2685
|
-
denoiseParam: DefaultDenoiseParam,
|
|
2686
|
-
};
|
|
2687
|
-
|
|
2688
|
-
const DefaultSSRParam = {
|
|
2689
|
-
maxDistance: 0.5,
|
|
2690
|
-
opacity: 1,
|
|
2691
|
-
thickness: 0.015,
|
|
2692
|
-
};
|
|
2693
|
-
|
|
2694
2732
|
class SphereComponent extends MeshComponent {
|
|
2695
2733
|
constructor(radius, material = new MeshBasicMaterial(), widthSegments = 32, heightSegments = 16) {
|
|
2696
2734
|
super(new SphereGeometry(radius, widthSegments, heightSegments), material);
|
|
@@ -2740,6 +2778,41 @@ class LabelComponent extends SceneComponent {
|
|
|
2740
2778
|
// labelStyle.style.fontSize = "10px";
|
|
2741
2779
|
// labelStyle.style.pointerEvents = 'auto';
|
|
2742
2780
|
|
|
2781
|
+
const DefaultBloomParam = {
|
|
2782
|
+
threshold: 0,
|
|
2783
|
+
strength: 1,
|
|
2784
|
+
radius: 0,
|
|
2785
|
+
};
|
|
2786
|
+
|
|
2787
|
+
const DefaultDenoiseParam = {
|
|
2788
|
+
denoiseRadius: 5,
|
|
2789
|
+
lumaPhi: 5,
|
|
2790
|
+
depthPhi: 5,
|
|
2791
|
+
normalPhi: 5
|
|
2792
|
+
};
|
|
2793
|
+
|
|
2794
|
+
const DefaultDOFParam = {
|
|
2795
|
+
focus: 500.0,
|
|
2796
|
+
aperture: 5,
|
|
2797
|
+
maxblur: 0.01
|
|
2798
|
+
};
|
|
2799
|
+
|
|
2800
|
+
const DefaultGTAOParam = {
|
|
2801
|
+
distanceExponent: 1,
|
|
2802
|
+
distanceFallOff: 1,
|
|
2803
|
+
radius: 0.25,
|
|
2804
|
+
scale: 1,
|
|
2805
|
+
thickness: 1,
|
|
2806
|
+
denoised: true,
|
|
2807
|
+
denoiseParam: DefaultDenoiseParam,
|
|
2808
|
+
};
|
|
2809
|
+
|
|
2810
|
+
const DefaultSSRParam = {
|
|
2811
|
+
maxDistance: 0.5,
|
|
2812
|
+
opacity: 1,
|
|
2813
|
+
thickness: 0.015,
|
|
2814
|
+
};
|
|
2815
|
+
|
|
2743
2816
|
class FirstPerson extends Pawn {
|
|
2744
2817
|
constructor(controller) {
|
|
2745
2818
|
super(controller);
|
|
@@ -2901,4 +2974,4 @@ class TransformGizmo extends Pawn {
|
|
|
2901
2974
|
}
|
|
2902
2975
|
}
|
|
2903
2976
|
|
|
2904
|
-
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 };
|
|
2977
|
+
export { Actor, AttachmentRules, BoxActor, BoxComponent, Controller, DefaultAppParam, DefaultBloomParam, DefaultDOFParam, DefaultDenoiseParam, DefaultGTAOParam, DefaultOutlineParams, DefaultPostProcessParam, DefaultRenderParam, DefaultSSRParam, DefaultSkyParam, DefaultToneMappingParams, Delegate, DirectionalLightActor, DirectionalLightComponent, FirstPerson, LYAssetManager, LYLoadTask, LabelComponent, MeshComponent, Orbital, PlaneActor, PlaneComponent, SceneComponent, SkyActor, SkyComponent, SphereComponent, ThreeJsApp, ThreeObjectLibrary, ToneMappingOptions, TransformGizmo, Viewport, WebGPUPostProcessFactory, World };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,18 @@ export { DefaultRenderParam, DefaultAppParam } from "./lythreeframe/Frame/Parame
|
|
|
13
13
|
export { Actor } from "./lythreeframe/Object/Actor";
|
|
14
14
|
export { DirectionalLightActor } from "./lythreeframe/Object/Actors/Light/DirectionalLightActor";
|
|
15
15
|
export { BoxActor } from "./lythreeframe/Object/Actors/Shape/BoxActor";
|
|
16
|
+
export { SkyActor } from "./lythreeframe/Object/Actors/Sky/SkyActor";
|
|
16
17
|
export { PlaneActor } from "./lythreeframe/Object/Actors/Shape/PlaneActor";
|
|
18
|
+
export { SceneComponent } from "./lythreeframe/Object/Components/SceneComponent";
|
|
19
|
+
export { MeshComponent } from "./lythreeframe/Object/Components/Mesh/MeshComponent";
|
|
20
|
+
export { BoxComponent } from "./lythreeframe/Object/Components/Mesh/Shape/BoxComponent";
|
|
21
|
+
export { PlaneComponent } from "./lythreeframe/Object/Components/Mesh/Shape/PlaneComponent";
|
|
22
|
+
export { SphereComponent } from "./lythreeframe/Object/Components/Mesh/Shape/SphereComponent";
|
|
23
|
+
export { DirectionalLightComponent } from "./lythreeframe/Object/Components/Light/DirectionalLight/DirectionalLightComponent";
|
|
24
|
+
export { LabelComponent } from "./lythreeframe/Object/Components/2D/2DComponent";
|
|
25
|
+
export { SkyComponent } from "./lythreeframe/Object/Components/Sky/SkyComponent";
|
|
26
|
+
export type { SkyComponentParam } from "./lythreeframe/Object/Components/Sky/SkyComponent";
|
|
27
|
+
export { DefaultSkyParam } from "./lythreeframe/Object/Components/Sky/SkyComponent";
|
|
17
28
|
export { WebGPUPostProcessFactory } from "./lythreeframe/PostProcess/WebGPUPostProcessFactory";
|
|
18
29
|
export { DefaultPostProcessParam } from "./lythreeframe/PostProcess/PostProcessParam";
|
|
19
30
|
export type { PostProcessParam } from "./lythreeframe/PostProcess/PostProcessParam";
|
|
@@ -31,13 +42,6 @@ export { DefaultSSRParam } from "./lythreeframe/PostProcess/Param/SSR";
|
|
|
31
42
|
export type { SSRParam } from "./lythreeframe/PostProcess/Param/SSR";
|
|
32
43
|
export { DefaultToneMappingParams, ToneMappingOptions } from "./lythreeframe/PostProcess/Param/ToneMapping";
|
|
33
44
|
export type { ToneMappingParams } from "./lythreeframe/PostProcess/Param/ToneMapping";
|
|
34
|
-
export { SceneComponent } from "./lythreeframe/Object/Components/SceneComponent";
|
|
35
|
-
export { MeshComponent } from "./lythreeframe/Object/Components/Mesh/MeshComponent";
|
|
36
|
-
export { BoxComponent } from "./lythreeframe/Object/Components/Mesh/Shape/BoxComponent";
|
|
37
|
-
export { PlaneComponent } from "./lythreeframe/Object/Components/Mesh/Shape/PlaneComponent";
|
|
38
|
-
export { SphereComponent } from "./lythreeframe/Object/Components/Mesh/Shape/SphereComponent";
|
|
39
|
-
export { DirectionalLightComponent } from "./lythreeframe/Object/Components/Light/DirectionalLight/DirectionalLightComponent";
|
|
40
|
-
export { LabelComponent } from "./lythreeframe/Object/Components/2D/2DComponent";
|
|
41
45
|
export { Orbital } from "./lythreeframe/Object/PawnV2/Oribital";
|
|
42
46
|
export { FirstPerson } from "./lythreeframe/Object/PawnV2/FirstPerson";
|
|
43
47
|
export type { ITransforming } from "./lythreeframe/Object/PawnV2/TransformControl";
|
|
@@ -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,6 +1,6 @@
|
|
|
1
|
-
import { OrthographicCamera, PerspectiveCamera } from "three";
|
|
1
|
+
import { OrthographicCamera, PerspectiveCamera } from "three/webgpu";
|
|
2
2
|
import { CameraParam } from "../Frame/Parameters/CameraParameter";
|
|
3
3
|
export declare class CameraFactory {
|
|
4
|
-
static createCamera(param: CameraParam):
|
|
4
|
+
static createCamera(param: CameraParam): any;
|
|
5
5
|
static updataCamera(param: CameraParam, camera: PerspectiveCamera | OrthographicCamera): PerspectiveCamera | OrthographicCamera;
|
|
6
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";
|
|
@@ -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,7 +1,8 @@
|
|
|
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 {
|
|
5
|
-
protected lightComponent: DirectionalLightComponent;
|
|
5
|
+
protected lightComponent: DirectionalLightComponent | null;
|
|
6
6
|
constructor(color?: ColorRepresentation, intensity?: number);
|
|
7
|
+
protected constructRootComponent(): void;
|
|
7
8
|
}
|
|
@@ -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 { Actor } from "../../Actor";
|
|
2
|
+
import { SkyComponent } from "../../Components/Sky/SkyComponent";
|
|
3
|
+
export declare class SkyActor extends Actor {
|
|
4
|
+
protected _name: string;
|
|
5
|
+
protected skyComponent: SkyComponent | 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,7 +1,7 @@
|
|
|
1
1
|
import { World } from "./Frame/World";
|
|
2
2
|
import { Viewport } from "./Frame/Viewport";
|
|
3
3
|
import { Controller } from "./Frame/Controller";
|
|
4
|
-
import { Clock, OrthographicCamera, PerspectiveCamera } from "three";
|
|
4
|
+
import { Clock, OrthographicCamera, PerspectiveCamera } from "three/webgpu";
|
|
5
5
|
import { Delegate } from './Delegate';
|
|
6
6
|
import { CameraParam } from './Frame/Parameters/CameraParameter';
|
|
7
7
|
import { AppParam } from './Frame/Parameters/AppParameter';
|