babylonjs-editor-tools 0.0.10 → 0.0.11
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/declaration/src/cinematic/events/apply-impulse.d.ts +8 -0
- package/declaration/src/cinematic/events/set-enabled.d.ts +6 -0
- package/declaration/src/cinematic/generate.d.ts +9 -0
- package/declaration/src/cinematic/parse.d.ts +15 -0
- package/declaration/src/cinematic/tools.d.ts +15 -0
- package/declaration/src/cinematic/typings.d.ts +44 -0
- package/declaration/src/decorators/apply.d.ts +37 -0
- package/declaration/src/decorators/gui.d.ts +12 -0
- package/declaration/src/decorators/inspector.d.ts +82 -0
- package/declaration/src/decorators/particle-systems.d.ts +8 -0
- package/declaration/src/decorators/scene.d.ts +25 -0
- package/declaration/src/decorators/sound.d.ts +8 -0
- package/declaration/src/index.d.ts +19 -0
- package/declaration/src/loading/loader.d.ts +35 -0
- package/declaration/src/loading/physics.d.ts +6 -0
- package/declaration/src/loading/rendering.d.ts +2 -0
- package/declaration/src/loading/script.d.ts +3 -0
- package/declaration/src/loading/sound.d.ts +1 -0
- package/declaration/src/loading/texture.d.ts +1 -0
- package/declaration/src/rendering/default-pipeline.d.ts +15 -0
- package/declaration/src/rendering/motion-blur.d.ts +12 -0
- package/declaration/src/rendering/ssao.d.ts +12 -0
- package/declaration/src/rendering/ssr.d.ts +12 -0
- package/declaration/src/rendering/tools.d.ts +14 -0
- package/declaration/src/rendering/vls.d.ts +13 -0
- package/declaration/src/script.d.ts +13 -0
- package/declaration/src/tools/guards.d.ts +83 -0
- package/declaration/src/tools/light.d.ts +3 -0
- package/declaration/src/tools/mesh.d.ts +6 -0
- package/declaration/src/tools/scalar.d.ts +1 -0
- package/declaration/src/tools/sound.d.ts +13 -0
- package/declaration/src/tools/texture.d.ts +8 -0
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
+
export type SetEnabledEventType = {
|
|
3
|
+
mesh: string;
|
|
4
|
+
radius: number;
|
|
5
|
+
force: number[];
|
|
6
|
+
contactPoint: number[];
|
|
7
|
+
};
|
|
8
|
+
export declare function handleApplyImpulseEvent(scene: Scene, config: SetEnabledEventType): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
+
import { AnimationGroup } from "@babylonjs/core/Animations/animationGroup";
|
|
3
|
+
import { ICinematic } from "./typings";
|
|
4
|
+
/**
|
|
5
|
+
* Parses the given cinematic object and generates a new playable animation group.
|
|
6
|
+
* @param cinematic defines the cinematic object to parse that was previously loaded.
|
|
7
|
+
* @param scene defines the reference to the scene where to retrieve the animated objects.
|
|
8
|
+
*/
|
|
9
|
+
export declare function generateCinematicAnimationGroup(cinematic: ICinematic, scene: Scene): AnimationGroup;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
+
import { ICinematic } from "./typings";
|
|
3
|
+
/**
|
|
4
|
+
* Parses the given JSON data and returns a new cinematic object.
|
|
5
|
+
* @param data defines the JSON data of the cinematic to parse.
|
|
6
|
+
* @param scene defines the reference to the scene used to retrieve cinematic's data.
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseCinematic(data: ICinematic, scene: Scene): ICinematic;
|
|
9
|
+
/**
|
|
10
|
+
* Parses the given value and returns the reference to the right value to be animated.
|
|
11
|
+
* @param value defines the raw value to parse (ie. number or array for vectors).
|
|
12
|
+
* @param type defines the type of the property animated.
|
|
13
|
+
* @example [0, 0, 0] with type Animation.ANIMATIONTYPE_VECTOR3 will return a new Vector3(0, 0, 0) object.
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseCinematicKeyValue(value: any, type: number): any;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IAnimationKey } from "@babylonjs/core/Animations/animationKey";
|
|
2
|
+
export declare function cloneKey(dataType: number, key: IAnimationKey): IAnimationKey;
|
|
3
|
+
/**
|
|
4
|
+
* Returns the animation type according to the given animated property type.
|
|
5
|
+
* @param effectiveProperty defines the reference to the animated property to get its animation type.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getAnimationTypeForObject(effectiveProperty: any): number | null;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the current value of the given property of the given object.
|
|
10
|
+
* @param object defines the root object where to parse the property and return its value.
|
|
11
|
+
* @param property defines the path of the property to get its value.
|
|
12
|
+
* @example getPropertyValue(scene, "ambientColor");
|
|
13
|
+
* @example getPropertyValue(scene, "ambientColor.r");
|
|
14
|
+
*/
|
|
15
|
+
export declare function getPropertyValue(object: any, property: string): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IAnimationKey } from "@babylonjs/core/Animations/animationKey";
|
|
2
|
+
export interface ICinematic {
|
|
3
|
+
name: string;
|
|
4
|
+
framesPerSecond: number;
|
|
5
|
+
tracks: ICinematicTrack[];
|
|
6
|
+
outputFramesPerSecond: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ICinematicTrack {
|
|
9
|
+
animationGroup?: any;
|
|
10
|
+
animationGroups?: ICinematicAnimationGroup[];
|
|
11
|
+
node?: any;
|
|
12
|
+
defaultRenderingPipeline?: boolean;
|
|
13
|
+
sound?: any;
|
|
14
|
+
sounds?: ICinematicSound[];
|
|
15
|
+
propertyPath?: string;
|
|
16
|
+
keyFrameAnimations?: (ICinematicKey | ICinematicKeyCut)[];
|
|
17
|
+
keyFrameEvents?: ICinematicKeyEvent[];
|
|
18
|
+
}
|
|
19
|
+
export interface ICinematicAnimationGroup {
|
|
20
|
+
type: "group";
|
|
21
|
+
frame: number;
|
|
22
|
+
speed: number;
|
|
23
|
+
startFrame: number;
|
|
24
|
+
endFrame: number;
|
|
25
|
+
}
|
|
26
|
+
export interface ICinematicKey extends IAnimationKey {
|
|
27
|
+
type: "key" | "cut";
|
|
28
|
+
}
|
|
29
|
+
export interface ICinematicKeyCut {
|
|
30
|
+
type: "cut";
|
|
31
|
+
key1: IAnimationKey;
|
|
32
|
+
key2: IAnimationKey;
|
|
33
|
+
}
|
|
34
|
+
export interface ICinematicSound {
|
|
35
|
+
type: "sound";
|
|
36
|
+
frame: number;
|
|
37
|
+
startFrame: number;
|
|
38
|
+
endFrame: number;
|
|
39
|
+
}
|
|
40
|
+
export interface ICinematicKeyEvent {
|
|
41
|
+
type: "event";
|
|
42
|
+
frame: number;
|
|
43
|
+
data?: any;
|
|
44
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
+
import { AdvancedDynamicTexture } from "@babylonjs/gui/2D/advancedDynamicTexture";
|
|
3
|
+
import { VisibleInInspectorDecoratorConfiguration } from "./inspector";
|
|
4
|
+
export interface ISceneDecoratorData {
|
|
5
|
+
_NodesFromScene: {
|
|
6
|
+
nodeName: string;
|
|
7
|
+
propertyKey: string | Symbol;
|
|
8
|
+
}[];
|
|
9
|
+
_NodesFromDescendants: {
|
|
10
|
+
nodeName: string;
|
|
11
|
+
propertyKey: string | Symbol;
|
|
12
|
+
directDescendantsOnly: boolean;
|
|
13
|
+
}[];
|
|
14
|
+
_AnimationGroups: {
|
|
15
|
+
animationGroupName: string;
|
|
16
|
+
propertyKey: string | Symbol;
|
|
17
|
+
}[];
|
|
18
|
+
_SoundsFromScene: {
|
|
19
|
+
soundName: string;
|
|
20
|
+
propertyKey: string | Symbol;
|
|
21
|
+
}[];
|
|
22
|
+
_GuiFromAsset: {
|
|
23
|
+
pathInAssets: string;
|
|
24
|
+
onGuiCreated?: (instance: unknown, gui: AdvancedDynamicTexture) => unknown;
|
|
25
|
+
propertyKey: string | Symbol;
|
|
26
|
+
}[];
|
|
27
|
+
_ParticleSystemsFromScene: {
|
|
28
|
+
particleSystemName: string;
|
|
29
|
+
propertyKey: string | Symbol;
|
|
30
|
+
}[];
|
|
31
|
+
_VisibleInInspector: {
|
|
32
|
+
label?: string;
|
|
33
|
+
propertyKey: string | Symbol;
|
|
34
|
+
configuration: VisibleInInspectorDecoratorConfiguration;
|
|
35
|
+
}[];
|
|
36
|
+
}
|
|
37
|
+
export declare function applyDecorators(scene: Scene, object: any, script: any, instance: any, rootUrl: string): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AdvancedDynamicTexture } from "@babylonjs/gui/2D/advancedDynamicTexture";
|
|
2
|
+
/**
|
|
3
|
+
* Makes the decorated property linked to the GUI created from the given asset file.
|
|
4
|
+
* Once the script is instantiated, the reference to the gui texture is created from the asset file
|
|
5
|
+
* and assigned to the property. Gui link cant' be used in constructor and its creation is asynchronous.
|
|
6
|
+
* @param pathInAssets defines the relative path (as it is in the assets browser in the editor) to the .gui file.
|
|
7
|
+
* @param onGuiCreated defines the optional callback that is called when the GUI is created.
|
|
8
|
+
* @example
|
|
9
|
+
* @guiFromAsset<MyScriptClass>("ui.gui", (instance, gui) => instance._onGuiLoaded(gui))
|
|
10
|
+
* private _ui!: AdvancedDynamicTexture;
|
|
11
|
+
*/
|
|
12
|
+
export declare function guiFromAsset<T>(pathInAssets: string, onGuiCreated?: (instance: T, gui: AdvancedDynamicTexture) => unknown): (target: any, propertyKey: string | Symbol) => void;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export type VisibleInInspectorDecoratorType = "number" | "boolean" | "vector2" | "vector3" | "color3" | "color4";
|
|
2
|
+
export type VisibleInInspectorDecoratorConfiguration = {
|
|
3
|
+
type: VisibleInInspectorDecoratorType;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Makes the decorated property visible in the editor inspector as a boolean.
|
|
7
|
+
* The property can be customized per object in the editor and the custom value is applied
|
|
8
|
+
* once the script is invoked at runtime in the game/application.
|
|
9
|
+
* This can be used only by scripts using Classes.
|
|
10
|
+
* @param label defines the optional label displayed in the inspector in the editor.
|
|
11
|
+
*/
|
|
12
|
+
export declare function visibleAsBoolean(label?: string): (target: any, propertyKey: string | Symbol) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Makes the decorated property visible in the editor inspector as a number.
|
|
15
|
+
* The property can be customized per object in the editor and the custom value is applied
|
|
16
|
+
* once the script is invoked at runtime in the game/application.
|
|
17
|
+
* This can be used only by scripts using Classes.
|
|
18
|
+
* @param label defines the optional label displayed in the inspector in the editor.
|
|
19
|
+
* @param configuration defines the optional configuration for the field in the inspector (min, max, etc.).
|
|
20
|
+
*/
|
|
21
|
+
export declare function visibleAsNumber(label?: string, configuration?: Omit<VisibleInInspectorDecoratorNumberConfiguration, "type">): (target: any, propertyKey: string | Symbol) => void;
|
|
22
|
+
export type VisibleInInspectorDecoratorNumberConfiguration = VisibleInInspectorDecoratorConfiguration & {
|
|
23
|
+
min?: number;
|
|
24
|
+
max?: number;
|
|
25
|
+
step?: number;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Makes the decorated property visible in the editor inspector as a vector2.
|
|
29
|
+
* The property can be customized per object in the editor and the custom value is applied
|
|
30
|
+
* once the script is invoked at runtime in the game/application.
|
|
31
|
+
* This can be used only by scripts using Classes.
|
|
32
|
+
* @param label defines the optional label displayed in the inspector in the editor.
|
|
33
|
+
* @param configuration defines the optional configuration for the field in the inspector (min, max, etc.).
|
|
34
|
+
*/
|
|
35
|
+
export declare function visibleAsVector2(label?: string, configuration?: Omit<VisibleInInspectorDecoratorVector2Configuration, "type">): (target: any, propertyKey: string | Symbol) => void;
|
|
36
|
+
export type VisibleInInspectorDecoratorVector2Configuration = VisibleInInspectorDecoratorConfiguration & {
|
|
37
|
+
min?: number;
|
|
38
|
+
max?: number;
|
|
39
|
+
step?: number;
|
|
40
|
+
asDegrees?: boolean;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Makes the decorated property visible in the editor inspector as a vector3.
|
|
44
|
+
* The property can be customized per object in the editor and the custom value is applied
|
|
45
|
+
* once the script is invoked at runtime in the game/application.
|
|
46
|
+
* This can be used only by scripts using Classes.
|
|
47
|
+
* @param label defines the optional label displayed in the inspector in the editor.
|
|
48
|
+
* @param configuration defines the optional configuration for the field in the inspector (min, max, etc.).
|
|
49
|
+
*/
|
|
50
|
+
export declare function visibleAsVector3(label?: string, configuration?: Omit<VisibleInInspectorDecoratorVector3Configuration, "type">): (target: any, propertyKey: string | Symbol) => void;
|
|
51
|
+
export type VisibleInInspectorDecoratorVector3Configuration = VisibleInInspectorDecoratorConfiguration & {
|
|
52
|
+
min?: number;
|
|
53
|
+
max?: number;
|
|
54
|
+
step?: number;
|
|
55
|
+
asDegrees?: boolean;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Makes the decorated property visible in the editor inspector as a color3.
|
|
59
|
+
* The property can be customized per object in the editor and the custom value is applied
|
|
60
|
+
* once the script is invoked at runtime in the game/application.
|
|
61
|
+
* This can be used only by scripts using Classes.
|
|
62
|
+
* @param label defines the optional label displayed in the inspector in the editor.
|
|
63
|
+
* @param configuration defines the optional configuration for the field in the inspector (min, max, etc.).
|
|
64
|
+
*/
|
|
65
|
+
export declare function visibleAsColor3(label?: string, configuration?: Omit<VisibleInInspectorDecoratorColor3Configuration, "type">): (target: any, propertyKey: string | Symbol) => void;
|
|
66
|
+
export type VisibleInInspectorDecoratorColor3Configuration = VisibleInInspectorDecoratorConfiguration & {
|
|
67
|
+
noClamp?: boolean;
|
|
68
|
+
noColorPicker?: boolean;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Makes the decorated property visible in the editor inspector as a color4.
|
|
72
|
+
* The property can be customized per object in the editor and the custom value is applied
|
|
73
|
+
* once the script is invoked at runtime in the game/application.
|
|
74
|
+
* This can be used only by scripts using Classes.
|
|
75
|
+
* @param label defines the optional label displayed in the inspector in the editor.
|
|
76
|
+
* @param configuration defines the optional configuration for the field in the inspector (min, max, etc.).
|
|
77
|
+
*/
|
|
78
|
+
export declare function visibleAsColor4(label?: string, configuration?: Omit<VisibleInInspectorDecoratorColor4Configuration, "type">): (target: any, propertyKey: string | Symbol) => void;
|
|
79
|
+
export type VisibleInInspectorDecoratorColor4Configuration = VisibleInInspectorDecoratorConfiguration & {
|
|
80
|
+
noClamp?: boolean;
|
|
81
|
+
noColorPicker?: boolean;
|
|
82
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Makes the decorated property linked to the particle system that has the given name.
|
|
3
|
+
* Once the script is instantiated, the reference to the particle system is retrieved
|
|
4
|
+
* from the scene and assigned to the property. Node link cant' be used in constructor.
|
|
5
|
+
* This can be used only by scripts using Classes.
|
|
6
|
+
* @param particleSystemName defines the name of the sound to retrieve in scene.
|
|
7
|
+
*/
|
|
8
|
+
export declare function particleSystemFromScene(particleSystemName: string): (target: any, propertyKey: string | Symbol) => void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Makes the decorated property linked to the node that has the given name.
|
|
3
|
+
* Once the script is instantiated, the reference to the node is retrieved from the scene
|
|
4
|
+
* and assigned to the property. Node link cant' be used in constructor.
|
|
5
|
+
* This can be used only by scripts using Classes.
|
|
6
|
+
* @param nodeName defines the name of the node to retrieve in scene.
|
|
7
|
+
*/
|
|
8
|
+
export declare function nodeFromScene(nodeName: string): (target: any, propertyKey: string | Symbol) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Makes the decorated property linked to the node that has the given name.
|
|
11
|
+
* Once the script is instantiated, the reference to the node is retrieved from the descendants
|
|
12
|
+
* of the current node and assigned to the property. Node link cant' be used in constructor.
|
|
13
|
+
* This can be used only by scripts using Classes.
|
|
14
|
+
* @param nodeName defines the name of the node to retrieve in scene.
|
|
15
|
+
* @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered.
|
|
16
|
+
*/
|
|
17
|
+
export declare function nodeFromDescendants(nodeName: string, directDescendantsOnly?: boolean): (target: any, propertyKey: string | Symbol) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Makes the decorated property linked to an animation group that has the given name.
|
|
20
|
+
* Once the script is instantiated, the reference to the animation group is retrieved from the scene
|
|
21
|
+
* and assigned to the property. Animation group link cant' be used in constructor.
|
|
22
|
+
* This can be used only by scripts using Classes.
|
|
23
|
+
* @param animationGroupName defines the name of the animation group to retrieve in scene.
|
|
24
|
+
*/
|
|
25
|
+
export declare function animationGroupFromScene(animationGroupName: string): (target: any, propertyKey: string | Symbol) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Makes the decorated property linked to the sound that has the given name.
|
|
3
|
+
* Once the script is instantiated, the reference to the sound is retrieved from the scene
|
|
4
|
+
* and assigned to the property. Node link cant' be used in constructor.
|
|
5
|
+
* This can be used only by scripts using Classes.
|
|
6
|
+
* @param soundName defines the name of the sound to retrieve in scene.
|
|
7
|
+
*/
|
|
8
|
+
export declare function soundFromScene(soundName: string): (target: any, propertyKey: string | Symbol) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from "./loading/loader";
|
|
2
|
+
export * from "./tools/guards";
|
|
3
|
+
export * from "./tools/texture";
|
|
4
|
+
export * from "./tools/light";
|
|
5
|
+
export * from "./tools/scalar";
|
|
6
|
+
export * from "./rendering/ssao";
|
|
7
|
+
export * from "./rendering/ssr";
|
|
8
|
+
export * from "./rendering/motion-blur";
|
|
9
|
+
export * from "./rendering/default-pipeline";
|
|
10
|
+
export * from "./rendering/vls";
|
|
11
|
+
export * from "./decorators/scene";
|
|
12
|
+
export * from "./decorators/gui";
|
|
13
|
+
export * from "./decorators/sound";
|
|
14
|
+
export * from "./decorators/particle-systems";
|
|
15
|
+
export * from "./decorators/inspector";
|
|
16
|
+
export * from "./script";
|
|
17
|
+
export * from "./cinematic/parse";
|
|
18
|
+
export * from "./cinematic/typings";
|
|
19
|
+
export * from "./cinematic/generate";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
+
import "./sound";
|
|
3
|
+
import "./texture";
|
|
4
|
+
/**
|
|
5
|
+
* Defines the possible output type of a script.
|
|
6
|
+
* `default` is a class that will be instantiated with the object as parameter.
|
|
7
|
+
* `onStart` is a function that will be called once before the first render passing the reference to the object the script is attached to.
|
|
8
|
+
* `onUpdate` is a function that will be called every frame passing the reference to the object the script is attached to
|
|
9
|
+
*/
|
|
10
|
+
export type ScriptMap = Record<string, {
|
|
11
|
+
default?: new (object: any) => {
|
|
12
|
+
onStart?(): void;
|
|
13
|
+
onUpdate?(): void;
|
|
14
|
+
};
|
|
15
|
+
onStart?: (object: any) => void;
|
|
16
|
+
onUpdate?: (object: any) => void;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Defines the overall desired quality of the scene.
|
|
20
|
+
* In other words, defines the quality of textures that will be loaded in terms of dimensions.
|
|
21
|
+
* The editor computes automatic "hight (untouched)", "medium (half)", and "low (quarter)" quality levels for textures.
|
|
22
|
+
* Using "medium" or "low" quality levels will reduce the memory usage and improve the performance of the scene
|
|
23
|
+
* especially on mobiles where memory is limited.
|
|
24
|
+
*/
|
|
25
|
+
export type SceneLoaderQualitySelector = "low" | "medium" | "high";
|
|
26
|
+
export type SceneLoaderOptions = {
|
|
27
|
+
quality?: SceneLoaderQualitySelector;
|
|
28
|
+
onProgress?: (value: number) => void;
|
|
29
|
+
};
|
|
30
|
+
declare module "@babylonjs/core/scene" {
|
|
31
|
+
interface Scene {
|
|
32
|
+
loadingQuality: SceneLoaderQualitySelector;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export declare function loadScene(rootUrl: any, sceneFilename: string, scene: Scene, scriptsMap: ScriptMap, options?: SceneLoaderOptions): Promise<void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh";
|
|
2
|
+
/**
|
|
3
|
+
* Parses and loads the physics aggregate data for the given mesh.
|
|
4
|
+
* @param mesh defines the reference to the mesh object.
|
|
5
|
+
*/
|
|
6
|
+
export declare function configurePhysicsAggregate(transformNode: AbstractMesh): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
+
import { Camera } from "@babylonjs/core/Cameras/camera";
|
|
3
|
+
import { DefaultRenderingPipeline } from "@babylonjs/core/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline";
|
|
4
|
+
/**
|
|
5
|
+
* Defines the configuration of the default rendering pipeline per camera.
|
|
6
|
+
*/
|
|
7
|
+
export declare const defaultPipelineCameraConfigurations: Map<Camera, any>;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the reference to the default rendering pipeline if exists.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getDefaultRenderingPipeline(): DefaultRenderingPipeline | null;
|
|
12
|
+
export declare function disposeDefaultRenderingPipeline(): void;
|
|
13
|
+
export declare function createDefaultRenderingPipeline(scene: Scene, camera: Camera): DefaultRenderingPipeline;
|
|
14
|
+
export declare function serializeDefaultRenderingPipeline(): any;
|
|
15
|
+
export declare function parseDefaultRenderingPipeline(scene: Scene, camera: Camera, data: any): DefaultRenderingPipeline;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
+
import { Camera } from "@babylonjs/core/Cameras/camera";
|
|
3
|
+
import { MotionBlurPostProcess } from "@babylonjs/core/PostProcesses/motionBlurPostProcess";
|
|
4
|
+
/**
|
|
5
|
+
* Defines the configuration of the motion blur post-process per camera.
|
|
6
|
+
*/
|
|
7
|
+
export declare const motionBlurPostProcessCameraConfigurations: Map<Camera, any>;
|
|
8
|
+
export declare function getMotionBlurPostProcess(): MotionBlurPostProcess | null;
|
|
9
|
+
export declare function disposeMotionBlurPostProcess(): void;
|
|
10
|
+
export declare function createMotionBlurPostProcess(scene: Scene, camera: Camera): MotionBlurPostProcess;
|
|
11
|
+
export declare function serializeMotionBlurPostProcess(): any;
|
|
12
|
+
export declare function parseMotionBlurPostProcess(scene: Scene, camera: Camera, data: any): MotionBlurPostProcess;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
+
import { Camera } from "@babylonjs/core/Cameras/camera";
|
|
3
|
+
import { SSAO2RenderingPipeline } from "@babylonjs/core/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline";
|
|
4
|
+
/**
|
|
5
|
+
* Defines the configuration of the SSAO rendering pipeline per camera.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ssaoRenderingPipelineCameraConfigurations: Map<Camera, any>;
|
|
8
|
+
export declare function getSSAO2RenderingPipeline(): SSAO2RenderingPipeline | null;
|
|
9
|
+
export declare function disposeSSAO2RenderingPipeline(): void;
|
|
10
|
+
export declare function createSSAO2RenderingPipeline(scene: Scene, camera: Camera): SSAO2RenderingPipeline;
|
|
11
|
+
export declare function serializeSSAO2RenderingPipeline(): any;
|
|
12
|
+
export declare function parseSSAO2RenderingPipeline(scene: Scene, camera: Camera, data: any): SSAO2RenderingPipeline;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
+
import { Camera } from "@babylonjs/core/Cameras/camera";
|
|
3
|
+
import { SSRRenderingPipeline } from "@babylonjs/core/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline";
|
|
4
|
+
/**
|
|
5
|
+
* Defines the configuration of the ssr rendering pipeline per camera.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ssrRenderingPipelineCameraConfigurations: Map<Camera, any>;
|
|
8
|
+
export declare function getSSRRenderingPipeline(): SSRRenderingPipeline | null;
|
|
9
|
+
export declare function disposeSSRRenderingPipeline(): void;
|
|
10
|
+
export declare function createSSRRenderingPipeline(scene: Scene, camera: Camera): SSRRenderingPipeline;
|
|
11
|
+
export declare function serializeSSRRenderingPipeline(): any;
|
|
12
|
+
export declare function parseSSRRenderingPipeline(scene: Scene, camera: Camera, data: any): SSRRenderingPipeline;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Camera } from "@babylonjs/core/Cameras/camera";
|
|
2
|
+
/**
|
|
3
|
+
* Saves the rendering configurations for the given camera. This is useful to restore the rendering configurations
|
|
4
|
+
* when the camera is re-activated (typically using the preview panel toolbar).
|
|
5
|
+
* @param camera defines the reference to the camera to save its rendering configurations.
|
|
6
|
+
*/
|
|
7
|
+
export declare function saveRenderingConfigurationForCamera(camera: Camera): void;
|
|
8
|
+
/**
|
|
9
|
+
* Applies the post-processes configurations for the given camera. Rendering configurations (motion blur, ssao, etc.) are
|
|
10
|
+
* saved per-camera and can be applied on demand using this function.
|
|
11
|
+
* Previous post-processes configurations are disposed before applying the new ones.
|
|
12
|
+
* @param camera defines the reference to the camera to apply its rendering configurations.
|
|
13
|
+
*/
|
|
14
|
+
export declare function applyRenderingConfigurationForCamera(camera: Camera): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
+
import { Mesh } from "@babylonjs/core/Meshes/mesh";
|
|
3
|
+
import { Camera } from "@babylonjs/core/Cameras/camera";
|
|
4
|
+
import { VolumetricLightScatteringPostProcess } from "@babylonjs/core/PostProcesses/volumetricLightScatteringPostProcess";
|
|
5
|
+
/**
|
|
6
|
+
* Defines the configuration of the motion blur post-process per camera.
|
|
7
|
+
*/
|
|
8
|
+
export declare const vlsPostProcessCameraConfigurations: Map<Camera, any>;
|
|
9
|
+
export declare function getVLSPostProcess(): VolumetricLightScatteringPostProcess | null;
|
|
10
|
+
export declare function disposeVLSPostProcess(scene: Scene): void;
|
|
11
|
+
export declare function createVLSPostProcess(scene: Scene, mesh?: Mesh | null): VolumetricLightScatteringPostProcess;
|
|
12
|
+
export declare function serializeVLSPostProcess(): any;
|
|
13
|
+
export declare function parseVLSPostProcess(scene: Scene, data: any): VolumetricLightScatteringPostProcess;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the interface that can be implemented by scripts attached to nodes in the editor.
|
|
3
|
+
*/
|
|
4
|
+
export interface IScript {
|
|
5
|
+
/**
|
|
6
|
+
* Method called when the script starts. This method is called only once.
|
|
7
|
+
*/
|
|
8
|
+
onStart?(): void;
|
|
9
|
+
/**
|
|
10
|
+
* Method called on each frame.
|
|
11
|
+
*/
|
|
12
|
+
onUpdate?(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Bone } from "@babylonjs/core/Bones/bone";
|
|
2
|
+
import { Mesh } from "@babylonjs/core/Meshes/mesh";
|
|
3
|
+
import { GroundMesh } from "@babylonjs/core/Meshes/groundMesh";
|
|
4
|
+
import { InstancedMesh } from "@babylonjs/core/Meshes/instancedMesh";
|
|
5
|
+
import { TransformNode } from "@babylonjs/core/Meshes/transformNode";
|
|
6
|
+
import { Texture } from "@babylonjs/core/Materials/Textures/texture";
|
|
7
|
+
import { Camera } from "@babylonjs/core/Cameras/camera";
|
|
8
|
+
import { FreeCamera } from "@babylonjs/core/Cameras/freeCamera";
|
|
9
|
+
import { ArcRotateCamera } from "@babylonjs/core/Cameras/arcRotateCamera";
|
|
10
|
+
import { SpotLight } from "@babylonjs/core/Lights/spotLight";
|
|
11
|
+
import { PointLight } from "@babylonjs/core/Lights/pointLight";
|
|
12
|
+
import { HemisphericLight } from "@babylonjs/core/Lights/hemisphericLight";
|
|
13
|
+
import { DirectionalLight } from "@babylonjs/core/Lights/directionalLight";
|
|
14
|
+
/**
|
|
15
|
+
* Returns wether or not the given object is an AbstractMesh.
|
|
16
|
+
* @param object defines the reference to the object to test its class name.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isAbstractMesh(object: any): object is Mesh;
|
|
19
|
+
/**
|
|
20
|
+
* Returns wether or not the given object is a Mesh.
|
|
21
|
+
* @param object defines the reference to the object to test its class name.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isMesh(object: any): object is Mesh;
|
|
24
|
+
/**
|
|
25
|
+
* Returns wether or not the given object is a InstancedMesh.
|
|
26
|
+
* @param object defines the reference to the object to test its class name.
|
|
27
|
+
*/
|
|
28
|
+
export declare function isInstancedMesh(object: any): object is InstancedMesh;
|
|
29
|
+
/**
|
|
30
|
+
* Returns wether or not the given object is a Bone.
|
|
31
|
+
* @param object defines the reference to the object to test its class name.
|
|
32
|
+
*/
|
|
33
|
+
export declare function isBone(object: any): object is Bone;
|
|
34
|
+
/**
|
|
35
|
+
* Returns wether or not the given object is a GroundMesh.
|
|
36
|
+
* @param object defines the reference to the object to test its class name.
|
|
37
|
+
*/
|
|
38
|
+
export declare function isGroundMesh(object: any): object is GroundMesh;
|
|
39
|
+
/**
|
|
40
|
+
* Returns wether or not the given object is a TransformNode.
|
|
41
|
+
* @param object defines the reference to the object to test its class name.
|
|
42
|
+
*/
|
|
43
|
+
export declare function isTransformNode(object: any): object is TransformNode;
|
|
44
|
+
/**
|
|
45
|
+
* Returns wether or not the given object is a Texture.
|
|
46
|
+
* @param object defines the reference to the object to test its class name.
|
|
47
|
+
*/
|
|
48
|
+
export declare function isTexture(object: any): object is Texture;
|
|
49
|
+
/**
|
|
50
|
+
* Returns wether or not the given object is a Camera.
|
|
51
|
+
* @param object defines the reference to the object to test its class name.
|
|
52
|
+
*/
|
|
53
|
+
export declare function isCamera(object: any): object is Camera;
|
|
54
|
+
/**
|
|
55
|
+
* Returns wether or not the given object is a FreeCamera.
|
|
56
|
+
* @param object defines the reference to the object to test its class name.
|
|
57
|
+
*/
|
|
58
|
+
export declare function isFreeCamera(object: any): object is FreeCamera;
|
|
59
|
+
/**
|
|
60
|
+
* Returns wether or not the given object is a ArcRotateCamera.
|
|
61
|
+
* @param object defines the reference to the object to test its class name.
|
|
62
|
+
*/
|
|
63
|
+
export declare function isArcRotateCamera(object: any): object is ArcRotateCamera;
|
|
64
|
+
/**
|
|
65
|
+
* Returns wether or not the given object is a PointLight.
|
|
66
|
+
* @param object defines the reference to the object to test its class name.
|
|
67
|
+
*/
|
|
68
|
+
export declare function isPointLight(object: any): object is PointLight;
|
|
69
|
+
/**
|
|
70
|
+
* Returns wether or not the given object is a DirectionalLight.
|
|
71
|
+
* @param object defines the reference to the object to test its class name.
|
|
72
|
+
*/
|
|
73
|
+
export declare function isDirectionalLight(object: any): object is DirectionalLight;
|
|
74
|
+
/**
|
|
75
|
+
* Returns wether or not the given object is a SpotLight.
|
|
76
|
+
* @param object defines the reference to the object to test its class name.
|
|
77
|
+
*/
|
|
78
|
+
export declare function isSpotLight(object: any): object is SpotLight;
|
|
79
|
+
/**
|
|
80
|
+
* Returns wether or not the given object is a HemisphericLight.
|
|
81
|
+
* @param object defines the reference to the object to test its class name.
|
|
82
|
+
*/
|
|
83
|
+
export declare function isHemisphericLight(object: any): object is HemisphericLight;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getPowerOfTwoUntil(limit: number): number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
+
declare module "@babylonjs/core/Audio/sound" {
|
|
3
|
+
interface Sound {
|
|
4
|
+
id: string;
|
|
5
|
+
uniqueId: number;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Searches for a sound by its id in the scene by traversing all soundtracks.
|
|
10
|
+
* @param id defines the id of the sound to retrieve.
|
|
11
|
+
* @param scene defines the reference to the scene where to find the instantiated sound.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getSoundById(id: string, scene: Scene): import("@babylonjs/core").Sound | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Engine } from "@babylonjs/core/Engines/engine";
|
|
2
|
+
/**
|
|
3
|
+
* Set the compressed texture format to use, based on the formats you have, and the formats
|
|
4
|
+
* supported by the hardware / browser.
|
|
5
|
+
* @param engine defines the reference to the engine to configure the texture format to use.
|
|
6
|
+
* @see `@babylonjs/core/Engines/Extensions/engine.textureSelector.d.ts` for more information.
|
|
7
|
+
*/
|
|
8
|
+
export declare function configureEngineToUseCompressedTextures(engine: Engine): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-editor-tools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Babylon.js Editor Tools is a set of tools to help you create, edit and manage your Babylon.js scenes made using the Babylon.JS Editor",
|
|
5
5
|
"productName": "Babylon.js Editor Tools",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"require": "./build/index.node.js"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
|
-
"typings": "declaration/index.ts",
|
|
20
|
+
"typings": "declaration/src/index.ts",
|
|
21
21
|
"license": "(Apache-2.0)",
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@babel/core": "^7.26.10",
|