lythreeframe 1.2.18 → 1.2.20

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.
@@ -1575,7 +1575,7 @@ class Viewport {
1575
1575
  // private motionBlurPass: ShaderNodeObject<Node> | null = null;
1576
1576
  // private denoiseOutlinePass: ShaderNodeObject<DenoiseNode> | null = null;
1577
1577
  this.outlineObjects = [];
1578
- this.postProcessParam = postProcessParam;
1578
+ this.postProcessParam = Object.assign({}, postProcessParam);
1579
1579
  this._app = app;
1580
1580
  let element = null;
1581
1581
  if (viewportParam.elementId) {
@@ -1685,24 +1685,6 @@ class Viewport {
1685
1685
  this.dofPass = null;
1686
1686
  }
1687
1687
  }
1688
- // motion blur
1689
- // if (this.postProcessParam.motionBlur)
1690
- // {
1691
- // if (!this.motionBlurPass)
1692
- // {
1693
- // this.motionBlurPass = WebGPUPostProcessFactory.constructMotionBlurPass(finalNode, this.scenePass, this.postProcessParam.motionBlur);
1694
- // }
1695
- // const vignette = screenUV.distance(.5).remap(.6, 1).mul(2).clamp().oneMinus();
1696
- // finalNode = mix(this.motionBlurPass, this.scenePass.getTextureNode("velocity"), 0).mul(vignette);
1697
- // }
1698
- // else
1699
- // {
1700
- // if (this.motionBlurPass)
1701
- // {
1702
- // this.motionBlurPass.dispose();
1703
- // this.motionBlurPass = null;
1704
- // }
1705
- // }
1706
1688
  // ssr
1707
1689
  if (isSSREnabled) {
1708
1690
  if (!this.ssrPass) {
@@ -1801,23 +1783,27 @@ class Viewport {
1801
1783
  this.markRenderStateDirty();
1802
1784
  }
1803
1785
  updateBloomPass(params) {
1804
- this.postProcessParam.bloom = params;
1786
+ this.postProcessParam.bloom = Object.assign({}, params);
1805
1787
  this.setupPostProcess();
1806
1788
  }
1807
1789
  updateGTAOParam(params) {
1808
- this.postProcessParam.gtao = params;
1790
+ this.postProcessParam.gtao = Object.assign({}, params);
1809
1791
  this.setupPostProcess();
1810
1792
  }
1811
1793
  updateDOFParam(params) {
1812
- this.postProcessParam.dof = params;
1794
+ this.postProcessParam.dof = Object.assign({}, params);
1813
1795
  this.setupPostProcess();
1814
1796
  }
1815
1797
  updateSSRParam(params) {
1816
- this.postProcessParam.ssr = params;
1798
+ this.postProcessParam.ssr = Object.assign({}, params);
1817
1799
  this.setupPostProcess();
1818
1800
  }
1819
1801
  updateOutlineParam(params) {
1820
- this.postProcessParam.outline = params;
1802
+ this.postProcessParam.outline = Object.assign({}, params);
1803
+ this.setupPostProcess();
1804
+ }
1805
+ updateAAParam(params) {
1806
+ this.postProcessParam.aa = Object.assign({}, params);
1821
1807
  this.setupPostProcess();
1822
1808
  }
1823
1809
  addOutlineObject(obj) {
@@ -3434,6 +3420,7 @@ exports.AssetManager = AssetManager;
3434
3420
  exports.BoxActor = BoxActor;
3435
3421
  exports.BoxComponent = BoxComponent;
3436
3422
  exports.Controller = Controller;
3423
+ exports.DefaultAAParams = DefaultAAParams;
3437
3424
  exports.DefaultAppParam = DefaultAppParam;
3438
3425
  exports.DefaultBloomParam = DefaultBloomParam;
3439
3426
  exports.DefaultCameraParam = DefaultCameraParam;
@@ -1573,7 +1573,7 @@ class Viewport {
1573
1573
  // private motionBlurPass: ShaderNodeObject<Node> | null = null;
1574
1574
  // private denoiseOutlinePass: ShaderNodeObject<DenoiseNode> | null = null;
1575
1575
  this.outlineObjects = [];
1576
- this.postProcessParam = postProcessParam;
1576
+ this.postProcessParam = Object.assign({}, postProcessParam);
1577
1577
  this._app = app;
1578
1578
  let element = null;
1579
1579
  if (viewportParam.elementId) {
@@ -1683,24 +1683,6 @@ class Viewport {
1683
1683
  this.dofPass = null;
1684
1684
  }
1685
1685
  }
1686
- // motion blur
1687
- // if (this.postProcessParam.motionBlur)
1688
- // {
1689
- // if (!this.motionBlurPass)
1690
- // {
1691
- // this.motionBlurPass = WebGPUPostProcessFactory.constructMotionBlurPass(finalNode, this.scenePass, this.postProcessParam.motionBlur);
1692
- // }
1693
- // const vignette = screenUV.distance(.5).remap(.6, 1).mul(2).clamp().oneMinus();
1694
- // finalNode = mix(this.motionBlurPass, this.scenePass.getTextureNode("velocity"), 0).mul(vignette);
1695
- // }
1696
- // else
1697
- // {
1698
- // if (this.motionBlurPass)
1699
- // {
1700
- // this.motionBlurPass.dispose();
1701
- // this.motionBlurPass = null;
1702
- // }
1703
- // }
1704
1686
  // ssr
1705
1687
  if (isSSREnabled) {
1706
1688
  if (!this.ssrPass) {
@@ -1799,23 +1781,27 @@ class Viewport {
1799
1781
  this.markRenderStateDirty();
1800
1782
  }
1801
1783
  updateBloomPass(params) {
1802
- this.postProcessParam.bloom = params;
1784
+ this.postProcessParam.bloom = Object.assign({}, params);
1803
1785
  this.setupPostProcess();
1804
1786
  }
1805
1787
  updateGTAOParam(params) {
1806
- this.postProcessParam.gtao = params;
1788
+ this.postProcessParam.gtao = Object.assign({}, params);
1807
1789
  this.setupPostProcess();
1808
1790
  }
1809
1791
  updateDOFParam(params) {
1810
- this.postProcessParam.dof = params;
1792
+ this.postProcessParam.dof = Object.assign({}, params);
1811
1793
  this.setupPostProcess();
1812
1794
  }
1813
1795
  updateSSRParam(params) {
1814
- this.postProcessParam.ssr = params;
1796
+ this.postProcessParam.ssr = Object.assign({}, params);
1815
1797
  this.setupPostProcess();
1816
1798
  }
1817
1799
  updateOutlineParam(params) {
1818
- this.postProcessParam.outline = params;
1800
+ this.postProcessParam.outline = Object.assign({}, params);
1801
+ this.setupPostProcess();
1802
+ }
1803
+ updateAAParam(params) {
1804
+ this.postProcessParam.aa = Object.assign({}, params);
1819
1805
  this.setupPostProcess();
1820
1806
  }
1821
1807
  addOutlineObject(obj) {
@@ -3427,4 +3413,4 @@ class TransformGizmo extends Pawn {
3427
3413
  }
3428
3414
  }
3429
3415
 
3430
- export { Actor, AssetManager, AttachmentRules, BoxActor, BoxComponent, Controller, DefaultAppParam, DefaultBloomParam, DefaultCameraParam, DefaultDOFParam, DefaultDenoiseParam, DefaultGTAOParam, DefaultOutlineParams, DefaultPostProcessParam, DefaultRendererParameters, DefaultSSRParam, DefaultSkyParam, DefaultViewportParam, DefaultWorldParam, Delegate, DirectionalLightActor, DirectionalLightComponent, FirstPerson, GeometryAssetPointer, LabelComponent, LevelActor, LevelComponent, MaterialAssetPointer, MeshComponent, Orbital, PlaneActor, PlaneComponent, SceneComponent, SkyActor, SkyComponent, SphereComponent, TAssetPointer, TSmartPointer, TextureAssetPointer, ThreeJsApp, ThreeObjectLibrary, TransformGizmo, Viewport, WebGPUPostProcessFactory, World };
3416
+ export { Actor, AssetManager, AttachmentRules, BoxActor, BoxComponent, Controller, DefaultAAParams, DefaultAppParam, DefaultBloomParam, DefaultCameraParam, DefaultDOFParam, DefaultDenoiseParam, DefaultGTAOParam, DefaultOutlineParams, DefaultPostProcessParam, DefaultRendererParameters, DefaultSSRParam, DefaultSkyParam, DefaultViewportParam, DefaultWorldParam, Delegate, DirectionalLightActor, DirectionalLightComponent, FirstPerson, GeometryAssetPointer, LabelComponent, LevelActor, LevelComponent, MaterialAssetPointer, MeshComponent, Orbital, PlaneActor, PlaneComponent, SceneComponent, SkyActor, SkyComponent, SphereComponent, TAssetPointer, TSmartPointer, TextureAssetPointer, ThreeJsApp, ThreeObjectLibrary, TransformGizmo, Viewport, WebGPUPostProcessFactory, World };
package/dist/index.d.ts CHANGED
@@ -52,8 +52,8 @@ export { DefaultOutlineParams } from "./lythreeframe/PostProcess/Param/Outline";
52
52
  export type { OutlineParams } from "./lythreeframe/PostProcess/Param/Outline";
53
53
  export { DefaultSSRParam } from "./lythreeframe/PostProcess/Param/SSR";
54
54
  export type { SSRParam } from "./lythreeframe/PostProcess/Param/SSR";
55
- export { AAParams } from "./lythreeframe/PostProcess/Param/AAParam";
56
- export type { DefaultAAParams } from "./lythreeframe/PostProcess/Param/AAParam";
55
+ export { DefaultAAParams } from "./lythreeframe/PostProcess/Param/AAParam";
56
+ export type { AAParams } from "./lythreeframe/PostProcess/Param/AAParam";
57
57
  export { Orbital } from "./lythreeframe/Object/PawnV2/Oribital";
58
58
  export { FirstPerson } from "./lythreeframe/Object/PawnV2/FirstPerson";
59
59
  export type { ITransforming } from "./lythreeframe/Object/PawnV2/TransformControl";
@@ -9,6 +9,7 @@ import { ThreeJsApp } from "../ThreeJsApp";
9
9
  import { PostProcessParam } from './../PostProcess/PostProcessParam';
10
10
  import { RendererParameters } from './Parameters/RendererParameters';
11
11
  import { ViewportParam } from './Parameters/ViewportParameters';
12
+ import { AAParams } from "../PostProcess/Param/AAParam";
12
13
  export declare class Viewport {
13
14
  get canvas(): HTMLElement | null;
14
15
  get renderer(): WebGPURenderer;
@@ -39,6 +40,7 @@ export declare class Viewport {
39
40
  updateDOFParam(params: DOFParam): void;
40
41
  updateSSRParam(params: SSRParam): void;
41
42
  updateOutlineParam(params: OutlineParams): void;
43
+ updateAAParam(params: AAParams): void;
42
44
  addOutlineObject(obj: Object3D): void;
43
45
  setOutlineObjects(objects: Object3D[]): void;
44
46
  removeOutlineObject(obj: Object3D): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lythreeframe",
3
- "version": "1.2.18",
3
+ "version": "1.2.20",
4
4
  "description": "Three.js 封装",
5
5
  "main": "dist/bundle.cjs.js",
6
6
  "module": "dist/bundle.esm.js",