lythreeframe 1.0.48 → 1.0.50
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 +13 -12
- package/dist/bundle.esm.js +13 -12
- package/dist/lythreeframe/Frame/Controller.d.ts +2 -1
- package/dist/lythreeframe/Frame/Parameters/AppParameter.d.ts +2 -2
- 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 +1 -1
- package/dist/lythreeframe/Object/Components/2D/2DComponent.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/MeshComponent.d.ts +2 -2
- 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 -1
- package/dist/lythreeframe/Object/Components/Mesh/Sprite/SpriteComponent.d.ts +1 -1
- package/dist/lythreeframe/Object/Components/SceneComponent.d.ts +1 -1
- package/dist/lythreeframe/Object/Components/Sky/SkyComponent.d.ts +1 -1
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -1980,13 +1980,13 @@ class Orbital extends Pawn {
|
|
|
1980
1980
|
|
|
1981
1981
|
class Controller {
|
|
1982
1982
|
get camera() {
|
|
1983
|
-
return this.
|
|
1983
|
+
return this._app.camera;
|
|
1984
1984
|
}
|
|
1985
1985
|
get world() {
|
|
1986
|
-
return this.
|
|
1986
|
+
return this._app.world;
|
|
1987
1987
|
}
|
|
1988
1988
|
get viewPort() {
|
|
1989
|
-
return this.
|
|
1989
|
+
return this._app.viewport;
|
|
1990
1990
|
}
|
|
1991
1991
|
get pawn() {
|
|
1992
1992
|
if (!this._pawn) {
|
|
@@ -1994,6 +1994,9 @@ class Controller {
|
|
|
1994
1994
|
}
|
|
1995
1995
|
return this._pawn;
|
|
1996
1996
|
}
|
|
1997
|
+
get app() {
|
|
1998
|
+
return this.app;
|
|
1999
|
+
}
|
|
1997
2000
|
get onClickNothingDelegate() {
|
|
1998
2001
|
return this._onClickNothingDelegate;
|
|
1999
2002
|
}
|
|
@@ -2012,18 +2015,17 @@ class Controller {
|
|
|
2012
2015
|
this.hoveringComponent = null;
|
|
2013
2016
|
this._pointButtonIsDown = new Set();
|
|
2014
2017
|
this._onClickNothingDelegate = new Delegate();
|
|
2015
|
-
this.
|
|
2018
|
+
this._app = app;
|
|
2016
2019
|
this._pawn = new Orbital(this);
|
|
2017
2020
|
this.pawn.possess();
|
|
2018
2021
|
this.raycaster = new webgpu.Raycaster();
|
|
2019
|
-
if (
|
|
2020
|
-
|
|
2022
|
+
if (this.viewPort.canvas) {
|
|
2023
|
+
this.viewPort.canvas.addEventListener("pointermove", this.onPointerMove);
|
|
2024
|
+
this.viewPort.canvas.addEventListener("pointerenter", this.onPointerEnter);
|
|
2025
|
+
this.viewPort.canvas.addEventListener("pointerleave", this.onPointerLeave);
|
|
2026
|
+
this.viewPort.canvas.addEventListener("pointerup", this.onPointerUp);
|
|
2027
|
+
this.viewPort.canvas.addEventListener("pointerdown", this.onPointerDown);
|
|
2021
2028
|
}
|
|
2022
|
-
this.viewPort.canvas.addEventListener("pointermove", this.onPointerMove);
|
|
2023
|
-
this.viewPort.canvas.addEventListener("pointerenter", this.onPointerEnter);
|
|
2024
|
-
this.viewPort.canvas.addEventListener("pointerleave", this.onPointerLeave);
|
|
2025
|
-
this.viewPort.canvas.addEventListener("pointerup", this.onPointerUp);
|
|
2026
|
-
this.viewPort.canvas.addEventListener("pointerdown", this.onPointerDown);
|
|
2027
2029
|
}
|
|
2028
2030
|
init() {
|
|
2029
2031
|
}
|
|
@@ -2105,7 +2107,6 @@ class Controller {
|
|
|
2105
2107
|
}
|
|
2106
2108
|
}
|
|
2107
2109
|
else {
|
|
2108
|
-
console.log("up 2, ", this.prepareClickComponent);
|
|
2109
2110
|
window.clearTimeout(this.leftClickTimer);
|
|
2110
2111
|
this.leftClickTimer = null;
|
|
2111
2112
|
if (this.prepareClickComponent) {
|
package/dist/bundle.esm.js
CHANGED
|
@@ -1978,13 +1978,13 @@ class Orbital extends Pawn {
|
|
|
1978
1978
|
|
|
1979
1979
|
class Controller {
|
|
1980
1980
|
get camera() {
|
|
1981
|
-
return this.
|
|
1981
|
+
return this._app.camera;
|
|
1982
1982
|
}
|
|
1983
1983
|
get world() {
|
|
1984
|
-
return this.
|
|
1984
|
+
return this._app.world;
|
|
1985
1985
|
}
|
|
1986
1986
|
get viewPort() {
|
|
1987
|
-
return this.
|
|
1987
|
+
return this._app.viewport;
|
|
1988
1988
|
}
|
|
1989
1989
|
get pawn() {
|
|
1990
1990
|
if (!this._pawn) {
|
|
@@ -1992,6 +1992,9 @@ class Controller {
|
|
|
1992
1992
|
}
|
|
1993
1993
|
return this._pawn;
|
|
1994
1994
|
}
|
|
1995
|
+
get app() {
|
|
1996
|
+
return this.app;
|
|
1997
|
+
}
|
|
1995
1998
|
get onClickNothingDelegate() {
|
|
1996
1999
|
return this._onClickNothingDelegate;
|
|
1997
2000
|
}
|
|
@@ -2010,18 +2013,17 @@ class Controller {
|
|
|
2010
2013
|
this.hoveringComponent = null;
|
|
2011
2014
|
this._pointButtonIsDown = new Set();
|
|
2012
2015
|
this._onClickNothingDelegate = new Delegate();
|
|
2013
|
-
this.
|
|
2016
|
+
this._app = app;
|
|
2014
2017
|
this._pawn = new Orbital(this);
|
|
2015
2018
|
this.pawn.possess();
|
|
2016
2019
|
this.raycaster = new Raycaster();
|
|
2017
|
-
if (
|
|
2018
|
-
|
|
2020
|
+
if (this.viewPort.canvas) {
|
|
2021
|
+
this.viewPort.canvas.addEventListener("pointermove", this.onPointerMove);
|
|
2022
|
+
this.viewPort.canvas.addEventListener("pointerenter", this.onPointerEnter);
|
|
2023
|
+
this.viewPort.canvas.addEventListener("pointerleave", this.onPointerLeave);
|
|
2024
|
+
this.viewPort.canvas.addEventListener("pointerup", this.onPointerUp);
|
|
2025
|
+
this.viewPort.canvas.addEventListener("pointerdown", this.onPointerDown);
|
|
2019
2026
|
}
|
|
2020
|
-
this.viewPort.canvas.addEventListener("pointermove", this.onPointerMove);
|
|
2021
|
-
this.viewPort.canvas.addEventListener("pointerenter", this.onPointerEnter);
|
|
2022
|
-
this.viewPort.canvas.addEventListener("pointerleave", this.onPointerLeave);
|
|
2023
|
-
this.viewPort.canvas.addEventListener("pointerup", this.onPointerUp);
|
|
2024
|
-
this.viewPort.canvas.addEventListener("pointerdown", this.onPointerDown);
|
|
2025
2027
|
}
|
|
2026
2028
|
init() {
|
|
2027
2029
|
}
|
|
@@ -2103,7 +2105,6 @@ class Controller {
|
|
|
2103
2105
|
}
|
|
2104
2106
|
}
|
|
2105
2107
|
else {
|
|
2106
|
-
console.log("up 2, ", this.prepareClickComponent);
|
|
2107
2108
|
window.clearTimeout(this.leftClickTimer);
|
|
2108
2109
|
this.leftClickTimer = null;
|
|
2109
2110
|
if (this.prepareClickComponent) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { WebGPURendererParameters } from "three/src/renderers/webgpu/WebGPURenderer";
|
|
2
2
|
import { CameraParam } from "./CameraParameter";
|
|
3
|
-
import { PostProcessParam } from "@/lythreeframe/PostProcess/PostProcessParam";
|
|
4
3
|
import { WorldParam } from "./WorldParameter";
|
|
5
|
-
import { AssetManager } from "@/lythreeframe/AssetManagement/AssetManager";
|
|
6
4
|
import { Controller } from "../Controller";
|
|
7
5
|
import { World } from "../World";
|
|
8
6
|
import { Viewport } from "../Viewport";
|
|
9
7
|
import { ViewportParam } from "./ViewportParameters";
|
|
8
|
+
import { AssetManager } from "../../AssetManagement/AssetManager";
|
|
9
|
+
import { PostProcessParam } from "../../PostProcess/PostProcessParam";
|
|
10
10
|
export interface AppClass {
|
|
11
11
|
assetManagerClass: typeof AssetManager;
|
|
12
12
|
controllerClass: typeof Controller;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColorRepresentation } from "three/webgpu";
|
|
2
2
|
import { Actor } from "../../Actor";
|
|
3
3
|
import { DirectionalLightComponent } from "../../Components/Light/DirectionalLight/DirectionalLightComponent";
|
|
4
|
-
import { ThreeJsApp } from "
|
|
4
|
+
import { ThreeJsApp } from "../../../ThreeJsApp";
|
|
5
5
|
export declare class DirectionalLightActor extends Actor {
|
|
6
6
|
protected lightComponent: DirectionalLightComponent | null;
|
|
7
7
|
constructor(app: ThreeJsApp, color?: ColorRepresentation, intensity?: number);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Material } from "three/webgpu";
|
|
2
2
|
import { Actor } from "../../Actor";
|
|
3
|
-
import { ThreeJsApp } from "
|
|
3
|
+
import { ThreeJsApp } from "../../../ThreeJsApp";
|
|
4
4
|
export declare class BoxActor extends Actor {
|
|
5
5
|
constructor(app: ThreeJsApp, width?: number, height?: number, depth?: number, widthSegments?: number, heightSegments?: number, depthSegments?: number, material?: Material);
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Material } from "three/webgpu";
|
|
2
2
|
import { Actor } from "../../Actor";
|
|
3
3
|
import { PlaneComponent } from "../../Components/Mesh/Shape/PlaneComponent";
|
|
4
|
-
import { ThreeJsApp } from "
|
|
4
|
+
import { ThreeJsApp } from "../../../ThreeJsApp";
|
|
5
5
|
export declare class PlaneActor extends Actor {
|
|
6
6
|
get planeComponent(): PlaneComponent | null;
|
|
7
7
|
private _planeComponent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSS2DObject } from "three/examples/jsm/renderers/CSS2DRenderer.js";
|
|
2
2
|
import { SceneComponent } from "../SceneComponent";
|
|
3
|
-
import { ThreeJsApp } from "
|
|
3
|
+
import { ThreeJsApp } from "../../../ThreeJsApp";
|
|
4
4
|
export declare class LabelComponent extends SceneComponent {
|
|
5
5
|
get threeObject(): CSS2DObject;
|
|
6
6
|
set threeObject(newThreeObject: CSS2DObject);
|
package/dist/lythreeframe/Object/Components/Light/DirectionalLight/DirectionalLightComponent.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LightComponent } from "../LightComponent";
|
|
2
2
|
import { ColorRepresentation, DirectionalLight, Vector3 } from "three/webgpu";
|
|
3
3
|
import { World } from "../../../../Frame/World";
|
|
4
|
-
import { ThreeJsApp } from "
|
|
4
|
+
import { ThreeJsApp } from "../../../../ThreeJsApp";
|
|
5
5
|
export declare class DirectionalLightComponent extends LightComponent {
|
|
6
6
|
get threeObject(): DirectionalLight;
|
|
7
7
|
set threeObject(newThreeObject: DirectionalLight);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ColorRepresentation, Light } from "three/webgpu";
|
|
2
2
|
import { SceneComponent } from "../SceneComponent";
|
|
3
|
-
import { ThreeJsApp } from "
|
|
3
|
+
import { ThreeJsApp } from "../../../ThreeJsApp";
|
|
4
4
|
export declare abstract class LightComponent extends SceneComponent {
|
|
5
5
|
get threeObject(): Light;
|
|
6
6
|
set threeObject(newThreeObject: Light);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BufferGeometry, Material, Mesh, Vector3 } from "three/webgpu";
|
|
2
2
|
import { SceneComponent } from "../SceneComponent";
|
|
3
|
-
import { TAssetPointer } from "
|
|
4
|
-
import { ThreeJsApp } from "
|
|
3
|
+
import { TAssetPointer } from "../../../AssetManagement/AssetPointer/AssetPointer";
|
|
4
|
+
import { ThreeJsApp } from "../../../ThreeJsApp";
|
|
5
5
|
export declare class MeshComponent extends SceneComponent {
|
|
6
6
|
get threeObject(): Mesh | null;
|
|
7
7
|
set threeObject(newThreeObject: Mesh);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Material } from "three/webgpu";
|
|
2
2
|
import { MeshComponent } from "../MeshComponent";
|
|
3
|
-
import { ThreeJsApp } from "
|
|
3
|
+
import { ThreeJsApp } from "../../../../ThreeJsApp";
|
|
4
4
|
export declare class BoxComponent extends MeshComponent {
|
|
5
5
|
constructor(app: ThreeJsApp, width?: number, height?: number, depth?: number, widthSegments?: number, heightSegments?: number, depthSegments?: number, material?: Material);
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Material } from "three/webgpu";
|
|
2
2
|
import { MeshComponent } from "../MeshComponent";
|
|
3
|
-
import { ThreeJsApp } from "
|
|
3
|
+
import { ThreeJsApp } from "../../../../ThreeJsApp";
|
|
4
4
|
export declare class PlaneComponent extends MeshComponent {
|
|
5
5
|
constructor(app: ThreeJsApp, width: number, height: number, material: Material, widthSegments?: number, heightSegments?: number);
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MeshComponent } from "../MeshComponent";
|
|
2
|
-
import { ThreeJsApp } from "
|
|
2
|
+
import { ThreeJsApp } from "../../../../ThreeJsApp";
|
|
3
3
|
export declare class SphereComponent extends MeshComponent {
|
|
4
4
|
constructor(app: ThreeJsApp, radius: number, material?: any, widthSegments?: number, heightSegments?: number);
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Sprite, Texture } from "three/webgpu";
|
|
2
2
|
import { SceneComponent } from "../../SceneComponent";
|
|
3
|
-
import { ThreeJsApp } from "
|
|
3
|
+
import { ThreeJsApp } from "../../../../ThreeJsApp";
|
|
4
4
|
export declare class SpriteComponent extends SceneComponent {
|
|
5
5
|
get threeObject(): Sprite;
|
|
6
6
|
set threeObject(newThreeObject: Sprite);
|
|
@@ -3,7 +3,7 @@ import { Box3, Euler, Matrix4, Object3D, Quaternion, Vector3 } from "three/webgp
|
|
|
3
3
|
import { Component } from "./Component";
|
|
4
4
|
import { World } from "../../Frame/World";
|
|
5
5
|
import { AttachmentRules } from "../../Defines";
|
|
6
|
-
import { ThreeJsApp } from "
|
|
6
|
+
import { ThreeJsApp } from "../../ThreeJsApp";
|
|
7
7
|
export declare class SceneComponent extends Component {
|
|
8
8
|
set parentActor(value: Actor | null);
|
|
9
9
|
get parentActor(): Actor | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SkyMesh } from "three/examples/jsm/objects/SkyMesh.js";
|
|
2
2
|
import { SceneComponent } from "../SceneComponent";
|
|
3
|
-
import { ThreeJsApp } from "
|
|
3
|
+
import { ThreeJsApp } from "../../../ThreeJsApp";
|
|
4
4
|
export interface SkyComponentParam {
|
|
5
5
|
turbidity: number;
|
|
6
6
|
rayleigh: number;
|