babylonjs-addons 9.0.0 → 9.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/babylonjs.addons.d.ts +19 -15
- package/babylonjs.addons.js +1 -1
- package/babylonjs.addons.min.js +1 -1
- package/babylonjs.addons.min.js.map +1 -1
- package/babylonjs.addons.module.d.ts +37 -29
- package/package.json +2 -2
- package/readme.md +12 -0
- package/tsconfig.build.json +3 -2
- package/tsconfig.json +1 -1
- package/webpack.config.js +20 -20
|
@@ -882,7 +882,7 @@ import { Mesh } from "babylonjs/Meshes/mesh";
|
|
|
882
882
|
import { INavMeshParametersV2 } from "babylonjs-addons/navigation/types";
|
|
883
883
|
/**
|
|
884
884
|
* Builds a any and any from meshes using provided parameters.
|
|
885
|
-
* @param meshes The array of meshes used to create the any
|
|
885
|
+
* @param meshes The array of meshes used to create the any.
|
|
886
886
|
* @param parameters The parameters used to configure the any generation.
|
|
887
887
|
* @param workerOptions Options for the worker, including a completion callback and the worker instance.
|
|
888
888
|
* @throws Error if the any data is invalid or cannot be deserialized.
|
|
@@ -890,8 +890,8 @@ import { INavMeshParametersV2 } from "babylonjs-addons/navigation/types";
|
|
|
890
890
|
export function GenerateNavMeshWithWorker(meshes: Array<Mesh>, parameters: INavMeshParametersV2, workerOptions: {
|
|
891
891
|
/**
|
|
892
892
|
* Completion callback that is called when the any generation is complete.
|
|
893
|
-
* @param navMesh The generated any
|
|
894
|
-
* @param navMeshQuery The any associated with the generated any
|
|
893
|
+
* @param navMesh The generated any.
|
|
894
|
+
* @param navMeshQuery The any associated with the generated any.
|
|
895
895
|
* @param tileCache Optional any if tile cache generation was used.
|
|
896
896
|
*/
|
|
897
897
|
completion: (navMesh: any, navMeshQuery: any, tileCache?: any) => void;
|
|
@@ -1103,8 +1103,8 @@ export class NavigationDebugger {
|
|
|
1103
1103
|
* * You can modify this property to include or exclude specific primitive types based on your debugging needs.
|
|
1104
1104
|
* @returns An array of primitive types that the debug drawer will render.
|
|
1105
1105
|
*/
|
|
1106
|
-
get primitiveTypes(): any;
|
|
1107
|
-
set primitiveTypes(value: any);
|
|
1106
|
+
get primitiveTypes(): any[];
|
|
1107
|
+
set primitiveTypes(value: any[]);
|
|
1108
1108
|
private _lineMaterialOptions;
|
|
1109
1109
|
private _pointMesh;
|
|
1110
1110
|
private _debugDrawerUtils;
|
|
@@ -1113,7 +1113,7 @@ export class NavigationDebugger {
|
|
|
1113
1113
|
parent?: {
|
|
1114
1114
|
node?: TransformNode | string;
|
|
1115
1115
|
};
|
|
1116
|
-
primitiveTypes?: any;
|
|
1116
|
+
primitiveTypes?: any[];
|
|
1117
1117
|
materials?: {
|
|
1118
1118
|
triMaterial?: StandardMaterial;
|
|
1119
1119
|
pointMaterial?: StandardMaterial;
|
|
@@ -1139,7 +1139,7 @@ export class NavigationDebugger {
|
|
|
1139
1139
|
* @param primitives An array of debug drawer primitives to be drawn.
|
|
1140
1140
|
* @param options Optional parameters to control the drawing behavior, such as whether to join meshes.
|
|
1141
1141
|
*/
|
|
1142
|
-
drawPrimitives(primitives: any, options?: {
|
|
1142
|
+
drawPrimitives(primitives: any[], options?: {
|
|
1143
1143
|
joinMeshes?: boolean;
|
|
1144
1144
|
}): void;
|
|
1145
1145
|
/**
|
|
@@ -1254,11 +1254,11 @@ export class NavigationDebugger {
|
|
|
1254
1254
|
* @returns An object containing lists of heightfields, compact heightfields, contour sets
|
|
1255
1255
|
*/
|
|
1256
1256
|
getIntermediates: (intermediates: GeneratorIntermediates) => {
|
|
1257
|
-
heightfieldList: any;
|
|
1258
|
-
compactHeightfieldList: any;
|
|
1259
|
-
contourSetList: any;
|
|
1260
|
-
polyMeshList: any;
|
|
1261
|
-
polyMeshDetailList: any;
|
|
1257
|
+
heightfieldList: any[];
|
|
1258
|
+
compactHeightfieldList: any[];
|
|
1259
|
+
contourSetList: any[];
|
|
1260
|
+
polyMeshList: any[];
|
|
1261
|
+
polyMeshDetailList: any[];
|
|
1262
1262
|
};
|
|
1263
1263
|
/**
|
|
1264
1264
|
* Draw debug information based on the selected option
|
|
@@ -1310,7 +1310,7 @@ declare module "babylonjs-addons/navigation/common/tile-cache" {
|
|
|
1310
1310
|
* @param flags the flags to be set for each poly
|
|
1311
1311
|
* @returns the tile cache mesh process function
|
|
1312
1312
|
*/
|
|
1313
|
-
export function CreateDefaultTileCacheMeshProcess(offMeshConnections?: any, area?: number, flags?: number): any;
|
|
1313
|
+
export function CreateDefaultTileCacheMeshProcess(offMeshConnections?: any[], area?: number, flags?: number): any;
|
|
1314
1314
|
/**
|
|
1315
1315
|
* Waits until the tile cache is fully updated
|
|
1316
1316
|
* @param navMesh The any
|
|
@@ -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
|
|
@@ -1679,7 +1683,7 @@ export const msdfPixelShader: {
|
|
|
1679
1683
|
}
|
|
1680
1684
|
declare module "babylonjs-addons/msdfText/sdf/paragraph" {
|
|
1681
1685
|
import { FontAsset } from "babylonjs-addons/msdfText/fontAsset";
|
|
1682
|
-
import {
|
|
1686
|
+
import { ParagraphOptions } from "babylonjs-addons/msdfText/paragraphOptions";
|
|
1683
1687
|
import { SdfGlyph } from "babylonjs-addons/msdfText/sdf/glyph";
|
|
1684
1688
|
import { SdfTextLine } from "babylonjs-addons/msdfText/sdf/line";
|
|
1685
1689
|
/** @internal */
|
|
@@ -3596,7 +3600,7 @@ declare module "babylonjs-addons" {
|
|
|
3596
3600
|
}
|
|
3597
3601
|
|
|
3598
3602
|
|
|
3599
|
-
declare
|
|
3603
|
+
declare namespace ADDONS {
|
|
3600
3604
|
|
|
3601
3605
|
|
|
3602
3606
|
/**
|
|
@@ -4430,7 +4434,7 @@ declare module ADDONS {
|
|
|
4430
4434
|
*/
|
|
4431
4435
|
/**
|
|
4432
4436
|
* Builds a any and any from meshes using provided parameters.
|
|
4433
|
-
* @param meshes The array of meshes used to create the any
|
|
4437
|
+
* @param meshes The array of meshes used to create the any.
|
|
4434
4438
|
* @param parameters The parameters used to configure the any generation.
|
|
4435
4439
|
* @param workerOptions Options for the worker, including a completion callback and the worker instance.
|
|
4436
4440
|
* @throws Error if the any data is invalid or cannot be deserialized.
|
|
@@ -4438,8 +4442,8 @@ declare module ADDONS {
|
|
|
4438
4442
|
export function GenerateNavMeshWithWorker(meshes: Array<BABYLON.Mesh>, parameters: INavMeshParametersV2, workerOptions: {
|
|
4439
4443
|
/**
|
|
4440
4444
|
* Completion callback that is called when the any generation is complete.
|
|
4441
|
-
* @param navMesh The generated any
|
|
4442
|
-
* @param navMeshQuery The any associated with the generated any
|
|
4445
|
+
* @param navMesh The generated any.
|
|
4446
|
+
* @param navMeshQuery The any associated with the generated any.
|
|
4443
4447
|
* @param tileCache Optional any if tile cache generation was used.
|
|
4444
4448
|
*/
|
|
4445
4449
|
completion: (navMesh: any, navMeshQuery: any, tileCache?: any) => void;
|
|
@@ -4621,8 +4625,8 @@ declare module ADDONS {
|
|
|
4621
4625
|
* * You can modify this property to include or exclude specific primitive types based on your debugging needs.
|
|
4622
4626
|
* @returns An array of primitive types that the debug drawer will render.
|
|
4623
4627
|
*/
|
|
4624
|
-
get primitiveTypes(): any;
|
|
4625
|
-
set primitiveTypes(value: any);
|
|
4628
|
+
get primitiveTypes(): any[];
|
|
4629
|
+
set primitiveTypes(value: any[]);
|
|
4626
4630
|
private _lineMaterialOptions;
|
|
4627
4631
|
private _pointMesh;
|
|
4628
4632
|
private _debugDrawerUtils;
|
|
@@ -4631,7 +4635,7 @@ declare module ADDONS {
|
|
|
4631
4635
|
parent?: {
|
|
4632
4636
|
node?: BABYLON.TransformNode | string;
|
|
4633
4637
|
};
|
|
4634
|
-
primitiveTypes?: any;
|
|
4638
|
+
primitiveTypes?: any[];
|
|
4635
4639
|
materials?: {
|
|
4636
4640
|
triMaterial?: BABYLON.StandardMaterial;
|
|
4637
4641
|
pointMaterial?: BABYLON.StandardMaterial;
|
|
@@ -4657,7 +4661,7 @@ declare module ADDONS {
|
|
|
4657
4661
|
* @param primitives An array of debug drawer primitives to be drawn.
|
|
4658
4662
|
* @param options Optional parameters to control the drawing behavior, such as whether to join meshes.
|
|
4659
4663
|
*/
|
|
4660
|
-
drawPrimitives(primitives: any, options?: {
|
|
4664
|
+
drawPrimitives(primitives: any[], options?: {
|
|
4661
4665
|
joinMeshes?: boolean;
|
|
4662
4666
|
}): void;
|
|
4663
4667
|
/**
|
|
@@ -4772,11 +4776,11 @@ declare module ADDONS {
|
|
|
4772
4776
|
* @returns An object containing lists of heightfields, compact heightfields, contour sets
|
|
4773
4777
|
*/
|
|
4774
4778
|
getIntermediates: (intermediates: GeneratorIntermediates) => {
|
|
4775
|
-
heightfieldList: any;
|
|
4776
|
-
compactHeightfieldList: any;
|
|
4777
|
-
contourSetList: any;
|
|
4778
|
-
polyMeshList: any;
|
|
4779
|
-
polyMeshDetailList: any;
|
|
4779
|
+
heightfieldList: any[];
|
|
4780
|
+
compactHeightfieldList: any[];
|
|
4781
|
+
contourSetList: any[];
|
|
4782
|
+
polyMeshList: any[];
|
|
4783
|
+
polyMeshDetailList: any[];
|
|
4780
4784
|
};
|
|
4781
4785
|
/**
|
|
4782
4786
|
* Draw debug information based on the selected option
|
|
@@ -4823,7 +4827,7 @@ declare module ADDONS {
|
|
|
4823
4827
|
* @param flags the flags to be set for each poly
|
|
4824
4828
|
* @returns the tile cache mesh process function
|
|
4825
4829
|
*/
|
|
4826
|
-
export function CreateDefaultTileCacheMeshProcess(offMeshConnections?: any, area?: number, flags?: number): any;
|
|
4830
|
+
export function CreateDefaultTileCacheMeshProcess(offMeshConnections?: any[], area?: number, flags?: number): any;
|
|
4827
4831
|
/**
|
|
4828
4832
|
* Waits until the tile cache is fully updated
|
|
4829
4833
|
* @param navMesh The any
|
|
@@ -5029,6 +5033,10 @@ declare module 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
|
|
@@ -5411,7 +5419,7 @@ declare module ADDONS {
|
|
|
5411
5419
|
interface Window {
|
|
5412
5420
|
"pointer-events-capture-debug": boolean | null;
|
|
5413
5421
|
}
|
|
5414
|
-
declare
|
|
5422
|
+
declare namespace ADDONS {
|
|
5415
5423
|
|
|
5416
5424
|
|
|
5417
5425
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-addons",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.1",
|
|
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.
|
|
18
|
+
"babylonjs": "9.2.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@dev/addons": "1.0.0",
|
package/readme.md
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
1
|
# Babylon.js Addons Library
|
|
2
|
+
|
|
3
|
+
> We recommend using the [ES6 package `@babylonjs/addons`](https://www.npmjs.com/package/@babylonjs/addons) for new projects.
|
|
4
|
+
|
|
5
|
+
A collection of addons and extensions for Babylon.js.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
To install using npm:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install babylonjs babylonjs-addons
|
|
13
|
+
```
|
package/tsconfig.build.json
CHANGED
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
"compilerOptions": {
|
|
5
5
|
"outDir": "./dist",
|
|
6
6
|
"target": "ES5",
|
|
7
|
+
"ignoreDeprecations": "6.0",
|
|
7
8
|
"rootDir": "../../../",
|
|
8
9
|
"declaration": false,
|
|
9
10
|
"importHelpers": true,
|
|
10
11
|
"paths": {
|
|
11
|
-
"core/*": ["dev/core/dist/*"],
|
|
12
|
-
"addons/*": ["dev/addons/src/*"]
|
|
12
|
+
"core/*": ["../../../dev/core/dist/*"],
|
|
13
|
+
"addons/*": ["../../../dev/addons/src/*"]
|
|
13
14
|
}
|
|
14
15
|
},
|
|
15
16
|
"include": ["./src/**/*", "../../../dev/addons/src/**/*"]
|
package/tsconfig.json
CHANGED
package/webpack.config.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
const commonConfigGenerator = require("@dev/build-tools").webpackTools.commonUMDWebpackConfiguration;
|
|
2
|
-
const path = require("path");
|
|
3
|
-
module.exports = (env) => {
|
|
4
|
-
const commonConfig = commonConfigGenerator({
|
|
5
|
-
mode: env.production ? "production" : "development",
|
|
6
|
-
devPackageName: "addons",
|
|
7
|
-
outputPath: path.resolve(__dirname),
|
|
8
|
-
entryPoints: {
|
|
9
|
-
addons: "./src/index.ts",
|
|
10
|
-
},
|
|
11
|
-
alias: {
|
|
12
|
-
addons: path.resolve(__dirname, "../../../dev/addons/src"),
|
|
13
|
-
},
|
|
14
|
-
overrideFilename: () => {
|
|
15
|
-
return `babylonjs.[name]${env.production ? ".min" : ""}.js`;
|
|
16
|
-
},
|
|
17
|
-
minToMax: true,
|
|
18
|
-
});
|
|
19
|
-
return commonConfig;
|
|
20
|
-
};
|
|
1
|
+
const commonConfigGenerator = require("@dev/build-tools").webpackTools.commonUMDWebpackConfiguration;
|
|
2
|
+
const path = require("path");
|
|
3
|
+
module.exports = (env) => {
|
|
4
|
+
const commonConfig = commonConfigGenerator({
|
|
5
|
+
mode: env.production ? "production" : "development",
|
|
6
|
+
devPackageName: "addons",
|
|
7
|
+
outputPath: path.resolve(__dirname),
|
|
8
|
+
entryPoints: {
|
|
9
|
+
addons: "./src/index.ts",
|
|
10
|
+
},
|
|
11
|
+
alias: {
|
|
12
|
+
addons: path.resolve(__dirname, "../../../dev/addons/src"),
|
|
13
|
+
},
|
|
14
|
+
overrideFilename: () => {
|
|
15
|
+
return `babylonjs.[name]${env.production ? ".min" : ""}.js`;
|
|
16
|
+
},
|
|
17
|
+
minToMax: true,
|
|
18
|
+
});
|
|
19
|
+
return commonConfig;
|
|
20
|
+
};
|