lythreeframe 1.2.0 → 1.2.1
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 +8 -7
- package/dist/bundle.esm.js +8 -7
- package/dist/lythreeframe/Frame/Parameters/AppParameter.d.ts +1 -1
- package/dist/lythreeframe/Object/Actors/Shape/BoxActor.d.ts +2 -1
- package/dist/lythreeframe/Object/Components/Mesh/Sprite/SpriteComponent.d.ts +2 -2
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -17,7 +17,7 @@ var gsap = require('gsap');
|
|
|
17
17
|
var three = require('three');
|
|
18
18
|
var SkyMesh_js = require('three/examples/jsm/objects/SkyMesh.js');
|
|
19
19
|
var CSS2DRenderer_js = require('three/examples/jsm/renderers/CSS2DRenderer.js');
|
|
20
|
-
var
|
|
20
|
+
var PointerLockControls_js = require('three/examples/jsm/controls/PointerLockControls.js');
|
|
21
21
|
var TransformControls_js = require('three/examples/jsm/controls/TransformControls.js');
|
|
22
22
|
|
|
23
23
|
/*
|
|
@@ -929,7 +929,8 @@ class MaterialAssetPointer extends TAssetPointer {
|
|
|
929
929
|
}
|
|
930
930
|
try {
|
|
931
931
|
this.textures.set(name, texturePtr);
|
|
932
|
-
|
|
932
|
+
const matAny = mat;
|
|
933
|
+
matAny[name] = texture;
|
|
933
934
|
texturePtr.addRef();
|
|
934
935
|
mat.needsUpdate = true;
|
|
935
936
|
}
|
|
@@ -1159,8 +1160,9 @@ class AssetManager {
|
|
|
1159
1160
|
if (!pointer) {
|
|
1160
1161
|
let textureMap = new Map();
|
|
1161
1162
|
for (let k in asset) {
|
|
1162
|
-
|
|
1163
|
-
|
|
1163
|
+
const value = asset[k];
|
|
1164
|
+
if (value instanceof webgpu.Texture) {
|
|
1165
|
+
let ptr = this.addTextureAsset(value, 1);
|
|
1164
1166
|
textureMap.set(k, ptr);
|
|
1165
1167
|
}
|
|
1166
1168
|
}
|
|
@@ -1740,7 +1742,6 @@ class Viewport {
|
|
|
1740
1742
|
this.smaaPass = null;
|
|
1741
1743
|
}
|
|
1742
1744
|
}
|
|
1743
|
-
console.log(this.postProcessParam, "sssssssssssssssssssss");
|
|
1744
1745
|
this.postProcessing.outputNode = finalNode;
|
|
1745
1746
|
this.markRenderStateDirty();
|
|
1746
1747
|
}
|
|
@@ -2973,7 +2974,7 @@ class BoxActor extends Actor {
|
|
|
2973
2974
|
super(app, uuid);
|
|
2974
2975
|
}
|
|
2975
2976
|
constructRootComponent() {
|
|
2976
|
-
this.
|
|
2977
|
+
return new BoxComponent(this.app, 1, 1, 1, 1, 1, 1, new webgpu.MeshBasicMaterial(), this.uuid);
|
|
2977
2978
|
}
|
|
2978
2979
|
}
|
|
2979
2980
|
|
|
@@ -3149,7 +3150,7 @@ const DefaultSSRParam = {
|
|
|
3149
3150
|
class FirstPerson extends Pawn {
|
|
3150
3151
|
constructor(controller) {
|
|
3151
3152
|
super(controller);
|
|
3152
|
-
this._control = new
|
|
3153
|
+
this._control = new PointerLockControls_js.PointerLockControls(controller.camera, controller.viewPort.canvas);
|
|
3153
3154
|
}
|
|
3154
3155
|
}
|
|
3155
3156
|
|
package/dist/bundle.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MathUtils, Object3D, Vector3, Box3, Quaternion, Euler, Matrix4, Mesh, LoadingManager, BufferGeometry, Texture, FileLoader, Material, NoToneMapping, LinearToneMapping, ReinhardToneMapping, CineonToneMapping, ACESFilmicToneMapping, AgXToneMapping, NeutralToneMapping, WebGPURenderer, PostProcessing, Color, Vector2, Raycaster, PerspectiveCamera, OrthographicCamera, Clock, DirectionalLight, MeshStandardMaterial, BoxGeometry,
|
|
1
|
+
import { MathUtils, Object3D, Vector3, Box3, Quaternion, Euler, Matrix4, Mesh, LoadingManager, BufferGeometry, Texture, FileLoader, Material, NoToneMapping, LinearToneMapping, ReinhardToneMapping, CineonToneMapping, ACESFilmicToneMapping, AgXToneMapping, NeutralToneMapping, WebGPURenderer, PostProcessing, Color, Vector2, Raycaster, PerspectiveCamera, OrthographicCamera, Clock, DirectionalLight, MeshStandardMaterial, BoxGeometry, MeshBasicMaterial, PlaneGeometry, SphereGeometry } 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
4
|
import { bloom } from 'three/examples/jsm/tsl/display/BloomNode.js';
|
|
@@ -15,7 +15,7 @@ import { gsap } from 'gsap';
|
|
|
15
15
|
import { Scene } from 'three';
|
|
16
16
|
import { SkyMesh } from 'three/examples/jsm/objects/SkyMesh.js';
|
|
17
17
|
import { CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer.js';
|
|
18
|
-
import { PointerLockControls } from 'three/examples/jsm/controls/PointerLockControls';
|
|
18
|
+
import { PointerLockControls } from 'three/examples/jsm/controls/PointerLockControls.js';
|
|
19
19
|
import { TransformControls } from 'three/examples/jsm/controls/TransformControls.js';
|
|
20
20
|
|
|
21
21
|
/*
|
|
@@ -927,7 +927,8 @@ class MaterialAssetPointer extends TAssetPointer {
|
|
|
927
927
|
}
|
|
928
928
|
try {
|
|
929
929
|
this.textures.set(name, texturePtr);
|
|
930
|
-
|
|
930
|
+
const matAny = mat;
|
|
931
|
+
matAny[name] = texture;
|
|
931
932
|
texturePtr.addRef();
|
|
932
933
|
mat.needsUpdate = true;
|
|
933
934
|
}
|
|
@@ -1157,8 +1158,9 @@ class AssetManager {
|
|
|
1157
1158
|
if (!pointer) {
|
|
1158
1159
|
let textureMap = new Map();
|
|
1159
1160
|
for (let k in asset) {
|
|
1160
|
-
|
|
1161
|
-
|
|
1161
|
+
const value = asset[k];
|
|
1162
|
+
if (value instanceof Texture) {
|
|
1163
|
+
let ptr = this.addTextureAsset(value, 1);
|
|
1162
1164
|
textureMap.set(k, ptr);
|
|
1163
1165
|
}
|
|
1164
1166
|
}
|
|
@@ -1738,7 +1740,6 @@ class Viewport {
|
|
|
1738
1740
|
this.smaaPass = null;
|
|
1739
1741
|
}
|
|
1740
1742
|
}
|
|
1741
|
-
console.log(this.postProcessParam, "sssssssssssssssssssss");
|
|
1742
1743
|
this.postProcessing.outputNode = finalNode;
|
|
1743
1744
|
this.markRenderStateDirty();
|
|
1744
1745
|
}
|
|
@@ -2971,7 +2972,7 @@ class BoxActor extends Actor {
|
|
|
2971
2972
|
super(app, uuid);
|
|
2972
2973
|
}
|
|
2973
2974
|
constructRootComponent() {
|
|
2974
|
-
this.
|
|
2975
|
+
return new BoxComponent(this.app, 1, 1, 1, 1, 1, 1, new MeshBasicMaterial(), this.uuid);
|
|
2975
2976
|
}
|
|
2976
2977
|
}
|
|
2977
2978
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { WebGPURendererParameters } from "three/src/renderers/webgpu/WebGPURenderer";
|
|
2
1
|
import { CameraParam } from "./CameraParameter";
|
|
3
2
|
import { WorldParam } from "./WorldParameter";
|
|
4
3
|
import { Controller } from "../Controller";
|
|
@@ -7,6 +6,7 @@ import { Viewport } from "../Viewport";
|
|
|
7
6
|
import { ViewportParam } from "./ViewportParameters";
|
|
8
7
|
import { AssetManager } from "../../AssetManagement/AssetManager";
|
|
9
8
|
import { PostProcessParam } from "../../PostProcess/PostProcessParam";
|
|
9
|
+
import { WebGPURendererParameters } from "three/src/renderers/webgpu/WebGPURenderer.js";
|
|
10
10
|
export interface AppClass {
|
|
11
11
|
assetManagerClass: typeof AssetManager;
|
|
12
12
|
controllerClass: typeof Controller;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Actor } from "../../Actor";
|
|
2
|
+
import { BoxComponent } from "../../Components/Mesh/Shape/BoxComponent";
|
|
2
3
|
import { ThreeJsApp } from "../../../ThreeJsApp";
|
|
3
4
|
export declare class BoxActor extends Actor {
|
|
4
5
|
constructor(app: ThreeJsApp, uuid?: string);
|
|
5
|
-
protected constructRootComponent():
|
|
6
|
+
protected constructRootComponent(): BoxComponent;
|
|
6
7
|
}
|
|
@@ -4,6 +4,6 @@ import { ThreeJsApp } from "../../../../ThreeJsApp";
|
|
|
4
4
|
export declare class SpriteComponent extends SceneComponent {
|
|
5
5
|
get threeObject(): Sprite;
|
|
6
6
|
set threeObject(newThreeObject: Sprite);
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
constructor(app: ThreeJsApp, texture: Texture, uuid?: string);
|
|
8
|
+
protected createDefaultObject(): Sprite;
|
|
9
9
|
}
|