@onerjs/core 8.52.3 → 8.52.4

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.
@@ -139,6 +139,10 @@ declare class _InternalAbstractMeshDataInfo {
139
139
  * Defines if should auto render shadows with lights
140
140
  */
141
141
  _doNotRenderShadows: boolean;
142
+ _isolatedShadowMaps: boolean;
143
+ _isolatedShadowMapsSizes: number;
144
+ _materialEnabled: boolean;
145
+ _doNotRenderMaterialCameraUniqueIds: number[];
142
146
  }
143
147
  /**
144
148
  * Class used to store all common mesh properties
@@ -370,11 +374,13 @@ export declare abstract class AbstractMesh extends TransformNode implements IDis
370
374
  /**
371
375
  * Control if the material should be rendered
372
376
  */
373
- materialEnabled: boolean;
377
+ get materialEnabled(): boolean;
378
+ set materialEnabled(enabled: boolean);
374
379
  /**
375
380
  * Control if the camera should render material
376
381
  */
377
- doNotRenderMaterialCameraUniqueIds: number[];
382
+ get doNotRenderMaterialCameraUniqueIds(): number[];
383
+ set doNotRenderMaterialCameraUniqueIds(ids: number[]);
378
384
  /** Gets or sets current material */
379
385
  get material(): Nullable<Material>;
380
386
  set material(value: Nullable<Material>);
@@ -403,6 +409,19 @@ export declare abstract class AbstractMesh extends TransformNode implements IDis
403
409
  */
404
410
  get doNotRenderShadows(): boolean;
405
411
  set doNotRenderShadows(value: boolean);
412
+ /**
413
+ * Returns a boolean indicating whether the shadow maps for this mesh are isolated.
414
+ * Isolated shadow maps can be useful for reducing light bleeding and improving shadow quality
415
+ * by ensuring that each shadow map is rendered with its own set of objects, rather than sharing
416
+ * a single shadow map with other lights.
417
+ */
418
+ get isolatedShadowMaps(): boolean;
419
+ set isolatedShadowMaps(value: boolean);
420
+ /**
421
+ * Retrieves the sizes of the isolated shadow maps.
422
+ */
423
+ get isolatedShadowMapsSizes(): number;
424
+ set isolatedShadowMapsSizes(size: number);
406
425
  /** Defines color to use when rendering outline */
407
426
  outlineColor: Color3;
408
427
  /** Define width to use when rendering outline */
@@ -157,6 +157,10 @@ class _InternalAbstractMeshDataInfo {
157
157
  * Defines if should auto render shadows with lights
158
158
  */
159
159
  this._doNotRenderShadows = true;
160
+ this._isolatedShadowMaps = false;
161
+ this._isolatedShadowMapsSizes = 1024;
162
+ this._materialEnabled = true;
163
+ this._doNotRenderMaterialCameraUniqueIds = [];
160
164
  }
161
165
  }
162
166
  /**
@@ -361,6 +365,30 @@ export class AbstractMesh extends TransformNode {
361
365
  set renderingGroupId(value) {
362
366
  this._internalAbstractMeshDataInfo._renderingGroupId = value;
363
367
  }
368
+ /**
369
+ * Control if the material should be rendered
370
+ */
371
+ get materialEnabled() {
372
+ return this._internalAbstractMeshDataInfo._materialEnabled;
373
+ }
374
+ set materialEnabled(enabled) {
375
+ if (this._internalAbstractMeshDataInfo._materialEnabled === enabled) {
376
+ return;
377
+ }
378
+ this._internalAbstractMeshDataInfo._materialEnabled = enabled;
379
+ }
380
+ /**
381
+ * Control if the camera should render material
382
+ */
383
+ get doNotRenderMaterialCameraUniqueIds() {
384
+ return this._internalAbstractMeshDataInfo._doNotRenderMaterialCameraUniqueIds;
385
+ }
386
+ set doNotRenderMaterialCameraUniqueIds(ids) {
387
+ if (this._internalAbstractMeshDataInfo._doNotRenderMaterialCameraUniqueIds === ids) {
388
+ return;
389
+ }
390
+ this._internalAbstractMeshDataInfo._doNotRenderMaterialCameraUniqueIds = ids;
391
+ }
364
392
  /** Gets or sets current material */
365
393
  get material() {
366
394
  return this._internalAbstractMeshDataInfo._material;
@@ -443,6 +471,33 @@ export class AbstractMesh extends TransformNode {
443
471
  }
444
472
  this._internalAbstractMeshDataInfo._doNotRenderShadows = value;
445
473
  }
474
+ /**
475
+ * Returns a boolean indicating whether the shadow maps for this mesh are isolated.
476
+ * Isolated shadow maps can be useful for reducing light bleeding and improving shadow quality
477
+ * by ensuring that each shadow map is rendered with its own set of objects, rather than sharing
478
+ * a single shadow map with other lights.
479
+ */
480
+ get isolatedShadowMaps() {
481
+ return this._internalAbstractMeshDataInfo._isolatedShadowMaps;
482
+ }
483
+ set isolatedShadowMaps(value) {
484
+ if (this._internalAbstractMeshDataInfo._isolatedShadowMaps === value) {
485
+ return;
486
+ }
487
+ this._internalAbstractMeshDataInfo._isolatedShadowMaps = value;
488
+ }
489
+ /**
490
+ * Retrieves the sizes of the isolated shadow maps.
491
+ */
492
+ get isolatedShadowMapsSizes() {
493
+ return this._internalAbstractMeshDataInfo._isolatedShadowMapsSizes;
494
+ }
495
+ set isolatedShadowMapsSizes(size) {
496
+ if (this._internalAbstractMeshDataInfo._isolatedShadowMapsSizes === size) {
497
+ return;
498
+ }
499
+ this._internalAbstractMeshDataInfo._isolatedShadowMapsSizes = size;
500
+ }
446
501
  /**
447
502
  * Gets or sets a boolean indicating that this mesh needs to use vertex alpha data to render.
448
503
  * This property is misnamed and should be `useVertexAlpha`. Note that the mesh will be rendered
@@ -686,14 +741,6 @@ export class AbstractMesh extends TransformNode {
686
741
  * Gets or sets a boolean indicating that pointer move events must be supported on this mesh (false by default)
687
742
  */
688
743
  this.enablePointerMoveEvents = false;
689
- /**
690
- * Control if the material should be rendered
691
- */
692
- this.materialEnabled = true;
693
- /**
694
- * Control if the camera should render material
695
- */
696
- this.doNotRenderMaterialCameraUniqueIds = [];
697
744
  /** Defines color to use when rendering outline */
698
745
  this.outlineColor = Color3.Red();
699
746
  /** Define width to use when rendering outline */