babylonjs-addons 9.1.0 → 9.2.2

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.
@@ -1543,6 +1543,10 @@ export class TextRenderer implements IDisposable {
1543
1543
  * @param worldMatrix define the world matrix to use for the paragraph (optional)
1544
1544
  */
1545
1545
  addParagraph(text: string, options?: Partial<ParagraphOptions>, worldMatrix?: IMatrixLike): void;
1546
+ /**
1547
+ * Clear all paragraphs from the renderer to allow adding new ones from scratch
1548
+ */
1549
+ clearParagraphs(): void;
1546
1550
  /**
1547
1551
  * Render the text using the provided view and projection matrices
1548
1552
  * @param viewMatrix define the view matrix to use
@@ -2290,10 +2294,10 @@ import { IColor4Like } from "babylonjs/Maths/math.like";
2290
2294
  * @param heightPx - The height of the texture in texels.
2291
2295
  * @param data - The texture data to sample.
2292
2296
  * @param result - The color to store the sample.
2293
- * @param normalizeFunc - The function to normalize the texel values. Default is to divide by 255.
2297
+ * @param normalizeFunc - The function to normalize the texel values. Default is to divide by 255. Pass null for no normalization.
2294
2298
  * @returns The result color.
2295
2299
  */
2296
- export function Sample2DRgbaToRef<T extends IColor4Like>(u: number, v: number, widthPx: number, heightPx: number, data: Uint8Array | Uint16Array | Float32Array, result: T, normalizeFunc?: (value: number) => number): T;
2300
+ export function Sample2DRgbaToRef<T extends IColor4Like>(u: number, v: number, widthPx: number, heightPx: number, data: Uint8Array | Uint16Array | Float32Array, result: T, normalizeFunc?: ((value: number) => number) | null): T;
2297
2301
 
2298
2302
  }
2299
2303
  declare module "babylonjs-addons/atmosphere/index" {
@@ -5029,6 +5033,10 @@ declare namespace ADDONS {
5029
5033
  * @param worldMatrix define the world matrix to use for the paragraph (optional)
5030
5034
  */
5031
5035
  addParagraph(text: string, options?: Partial<ParagraphOptions>, worldMatrix?: BABYLON.IMatrixLike): void;
5036
+ /**
5037
+ * Clear all paragraphs from the renderer to allow adding new ones from scratch
5038
+ */
5039
+ clearParagraphs(): void;
5032
5040
  /**
5033
5041
  * Render the text using the provided view and projection matrices
5034
5042
  * @param viewMatrix define the view matrix to use
@@ -5706,10 +5714,10 @@ declare namespace ADDONS {
5706
5714
  * @param heightPx - The height of the texture in texels.
5707
5715
  * @param data - The texture data to sample.
5708
5716
  * @param result - The color to store the sample.
5709
- * @param normalizeFunc - The function to normalize the texel values. Default is to divide by 255.
5717
+ * @param normalizeFunc - The function to normalize the texel values. Default is to divide by 255. Pass null for no normalization.
5710
5718
  * @returns The result color.
5711
5719
  */
5712
- export function Sample2DRgbaToRef<T extends BABYLON.IColor4Like>(u: number, v: number, widthPx: number, heightPx: number, data: Uint8Array | Uint16Array | Float32Array, result: T, normalizeFunc?: (value: number) => number): T;
5720
+ export function Sample2DRgbaToRef<T extends BABYLON.IColor4Like>(u: number, v: number, widthPx: number, heightPx: number, data: Uint8Array | Uint16Array | Float32Array, result: T, normalizeFunc?: ((value: number) => number) | null): T;
5713
5721
 
5714
5722
 
5715
5723
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-addons",
3
- "version": "9.1.0",
3
+ "version": "9.2.2",
4
4
  "main": "babylonjs.addons.min.js",
5
5
  "types": "babylonjs.addons.module.d.ts",
6
6
  "files": [
@@ -15,7 +15,7 @@
15
15
  "test:escheck": "es-check es6 ./babylonjs.addons.js"
16
16
  },
17
17
  "dependencies": {
18
- "babylonjs": "9.1.0"
18
+ "babylonjs": "9.2.2"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@dev/addons": "1.0.0",