@babylonjs/inspector 8.33.1-preview → 8.33.2-preview

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/lib/index.d.ts CHANGED
@@ -59038,9 +59038,20 @@ interface AbstractEngineOptions {
59038
59038
  */
59039
59039
  doNotHandleTouchAction?: boolean;
59040
59040
  /**
59041
- * Make the matrix computations to be performed in 64 bits instead of 32 bits. False by default
59041
+ * Make the matrix computations to be performed in 64 bits instead of 32 bits. False by default.
59042
+ * Note that setting useLargeWorldRendering will also set high precision matrices
59042
59043
  */
59043
59044
  useHighPrecisionMatrix?: boolean;
59045
+ /**
59046
+ * @experimental
59047
+ * LargeWorldRendering helps avoid floating point imprecision of rendering large worlds by
59048
+ * 1. Forcing highPrecisionMatrices (matrix computations in 64 bits instead of 32)
59049
+ * 2. Enabling floatingOriginMode in all scenes -- offsetting position-related uniform and attribute values before passing to shader so that active camera is centered at origin and world is offset by active camera position
59050
+ *
59051
+ * NOTE that if this mode is set during engineCreation, all scenes will have floatingOrigin offset and you do not need to send floatingOriginMode option to each scene creation.
59052
+ * If you'd like to have only specific scenes using the offset logic, you can set the flag on those scenes directly -- however, to achieve proper large world rendering, you must also set the useHighPrecisionMatrix option on engine.
59053
+ */
59054
+ readonly useLargeWorldRendering?: boolean;
59044
59055
  /**
59045
59056
  * Defines whether to adapt to the device's viewport characteristics (default: false)
59046
59057
  */
@@ -59980,6 +59991,7 @@ declare abstract class AbstractEngine {
59980
59991
  protected _creationOptions: AbstractEngineOptions;
59981
59992
  /**
59982
59993
  * Gets the options used for engine creation
59994
+ * NOTE that modifying the object after engine creation will have no effect
59983
59995
  * @returns EngineOptions object
59984
59996
  */
59985
59997
  getCreationOptions(): AbstractEngineOptions;
@@ -66812,15 +66824,17 @@ interface SceneOptions {
66812
66824
  * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
66813
66825
  */
66814
66826
  useClonedMeshMap?: boolean;
66815
- /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
66816
- virtual?: boolean;
66817
66827
  /**
66818
66828
  * @experimental
66819
- * FloatingOriginMode helps avoid floating point imprecision of rendering large worlds by
66820
- * 1. Forcing the engine to use doublePrecision mode
66821
- * 2. Offsetting uniform values before passing to shader so that camera is centered at origin and world is offset by camera position
66829
+ * When enabled, the scene can handle large world coordinate rendering without jittering caused by floating point imprecision on the GPU.
66830
+ * This mode offsets matrices and position-related attribute values before passing to shaders, centering camera at origin and offsetting other scene objects by camera active position.
66831
+ *
66832
+ * IMPORTANT: Only use this scene-level option if you intend to enable floating origin on a per-scene basis. Must use in conjunction with engine creation option 'useHighPrecisionMatrix' to fix CPU-side floating point imprecision.
66833
+ * HOWEVER if you want largeWorldRendering on ALL scenes, set the useLargeWorldRendering flag on the engine instead of this scene-level flag. Doing so will automatically set useHighPrecisionMatrix on the engine as well.
66822
66834
  */
66823
- floatingOriginMode?: boolean;
66835
+ useFloatingOrigin?: boolean;
66836
+ /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
66837
+ virtual?: boolean;
66824
66838
  }
66825
66839
  /**
66826
66840
  * Define how the scene should favor performance over ease of use
@@ -66891,6 +66905,7 @@ declare class Scene implements IAnimatable, IClipPlanesHolder, IAssetContainer {
66891
66905
  */
66892
66906
  autoClearDepthAndStencil: boolean;
66893
66907
  private _clearColor;
66908
+ private _tempVect4;
66894
66909
  /**
66895
66910
  * Observable triggered when the performance priority is changed
66896
66911
  */
@@ -68316,12 +68331,11 @@ declare class Scene implements IAnimatable, IClipPlanesHolder, IAssetContainer {
68316
68331
  * @param ubo the ubo to set for the scene
68317
68332
  */
68318
68333
  setSceneUniformBuffer(ubo: UniformBuffer): void;
68319
- private _floatingOriginMode;
68334
+ private _floatingOriginScene;
68320
68335
  /**
68321
68336
  * @experimental
68322
- * When true, enables floatingOriginMode which helps avoid floating point imprecision when using huge coordinate system by
68323
- * 1. Forcing the engine to use doublePrecision mode
68324
- * 2. Offsetting uniform values before passing to shader so that camera is centered at origin and world is offset by camera position
68337
+ * True if floatingOriginMode was passed to engine or this scene creation otions.
68338
+ * This mode avoids floating point imprecision in huge coordinate system by offsetting uniform values before passing to shader, centering camera at origin and displacing rest of scene by camera position
68325
68339
  */
68326
68340
  get floatingOriginMode(): boolean;
68327
68341
  private _floatingOriginOffsetDefault;
@@ -68975,6 +68989,7 @@ declare class Scene implements IAnimatable, IClipPlanesHolder, IAssetContainer {
68975
68989
  * @internal
68976
68990
  */
68977
68991
  _renderRenderTarget(renderTarget: RenderTargetTexture, activeCamera: Nullable<Camera>, useCameraPostProcess?: boolean, dumpForDebug?: boolean): void;
68992
+ private _getFloatingOriginScene;
68978
68993
  /**
68979
68994
  * Render the scene
68980
68995
  * @param updateCameras defines a boolean indicating if cameras must update according to their inputs (true by default)
package/lib/index.js CHANGED
@@ -4752,6 +4752,9 @@ const QuaternionPropertyLine = (props) => {
4752
4752
  const min = props.useDegrees ? 0 : undefined;
4753
4753
  const max = props.useDegrees ? 360 : undefined;
4754
4754
  const [quat, setQuat] = useState(props.value);
4755
+ useEffect(() => {
4756
+ setQuat(props.value);
4757
+ }, [props.value]);
4755
4758
  // Extract only the properties that exist on QuaternionPropertyLineProps
4756
4759
  const { useDegrees, ...restProps } = props;
4757
4760
  const onQuatChange = (val) => {
@@ -4760,10 +4763,9 @@ const QuaternionPropertyLine = (props) => {
4760
4763
  };
4761
4764
  const onEulerChange = (val) => {
4762
4765
  const quat = Quaternion.FromEulerAngles(val.x, val.y, val.z);
4763
- setQuat(quat);
4764
- props.onChange(quat);
4766
+ onQuatChange(quat);
4765
4767
  };
4766
- return useDegrees ? (jsx(Vector3PropertyLine, { ...restProps, nullable: false, ignoreNullable: false, value: quat.toEulerAngles(), valueConverter: ToDegreesConverter, min: min, max: max, onChange: onEulerChange, unit: "deg" })) : (jsx(QuaternionPropertyLineInternal, { ...props, unit: "rad", nullable: false, value: quat, min: min, max: max, onChange: onQuatChange }));
4768
+ return useDegrees ? (jsx(Vector3PropertyLine, { ...restProps, nullable: false, ignoreNullable: false, value: quat.toEulerAngles(), valueConverter: ToDegreesConverter, min: min, max: max, onChange: onEulerChange, unit: "deg" })) : (jsx(QuaternionPropertyLineInternal, { ...props, nullable: false, value: quat, min: min, max: max, onChange: onQuatChange }));
4767
4769
  };
4768
4770
  const Vector2PropertyLine = TensorPropertyLine;
4769
4771
  const Vector3PropertyLine = TensorPropertyLine;