babylonjs-editor-tools 0.0.8 → 0.0.10
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/build/index.node.js +1451 -0
- package/build/src/cinematic/events/apply-impulse.js +25 -0
- package/build/src/cinematic/events/set-enabled.js +5 -0
- package/build/src/cinematic/generate.js +149 -0
- package/build/src/cinematic/parse.js +99 -0
- package/build/src/cinematic/tools.js +66 -0
- package/build/src/cinematic/typings.js +2 -0
- package/build/src/decorators/apply.js +71 -0
- package/build/{decorators → src/decorators}/gui.js +1 -5
- package/build/src/decorators/inspector.js +131 -0
- package/build/src/decorators/particle-systems.js +15 -0
- package/build/{decorators → src/decorators}/scene.js +16 -7
- package/build/{decorators → src/decorators}/sound.js +1 -5
- package/build/src/index.js +20 -0
- package/build/src/loading/loader.js +59 -0
- package/build/src/loading/physics.js +36 -0
- package/build/src/loading/rendering.js +30 -0
- package/build/src/loading/script.js +35 -0
- package/build/src/loading/sound.js +14 -0
- package/build/{texture.js → src/loading/texture.js} +9 -11
- package/build/{rendering → src/rendering}/default-pipeline.js +40 -15
- package/build/src/rendering/motion-blur.js +42 -0
- package/build/{rendering → src/rendering}/ssao.js +11 -15
- package/build/{rendering → src/rendering}/ssr.js +11 -15
- package/build/src/rendering/tools.js +51 -0
- package/build/src/rendering/vls.js +57 -0
- package/build/src/script.js +2 -0
- package/build/src/tools/guards.js +125 -0
- package/build/src/tools/light.js +25 -0
- package/build/src/tools/mesh.js +2 -0
- package/build/src/tools/scalar.js +8 -0
- package/build/src/tools/sound.js +19 -0
- package/build/src/tools/texture.js +16 -0
- package/package.json +24 -6
- package/build/decorators/apply.js +0 -42
- package/build/decorators/apply.js.map +0 -1
- package/build/decorators/gui.js.map +0 -1
- package/build/decorators/scene.js.map +0 -1
- package/build/decorators/sound.js.map +0 -1
- package/build/guards.js +0 -33
- package/build/guards.js.map +0 -1
- package/build/index.js +0 -26
- package/build/index.js.map +0 -1
- package/build/light.js +0 -30
- package/build/light.js.map +0 -1
- package/build/loader.js +0 -87
- package/build/loader.js.map +0 -1
- package/build/physics.js +0 -33
- package/build/physics.js.map +0 -1
- package/build/rendering/default-pipeline.js.map +0 -1
- package/build/rendering/motion-blur.js +0 -46
- package/build/rendering/motion-blur.js.map +0 -1
- package/build/rendering/ssao.js.map +0 -1
- package/build/rendering/ssr.js.map +0 -1
- package/build/script.js +0 -3
- package/build/script.js.map +0 -1
- package/build/texture.js.map +0 -1
- package/build/tools/scalar.js +0 -12
- package/build/tools/scalar.js.map +0 -1
- package/declaration/decorators/apply.d.ts +0 -23
- package/declaration/decorators/gui.d.ts +0 -12
- package/declaration/decorators/scene.d.ts +0 -17
- package/declaration/decorators/sound.d.ts +0 -8
- package/declaration/guards.d.ts +0 -18
- package/declaration/index.d.ts +0 -9
- package/declaration/light.d.ts +0 -3
- package/declaration/loader.d.ts +0 -31
- package/declaration/physics.d.ts +0 -6
- package/declaration/rendering/default-pipeline.d.ts +0 -11
- package/declaration/rendering/motion-blur.d.ts +0 -8
- package/declaration/rendering/ssao.d.ts +0 -8
- package/declaration/rendering/ssr.d.ts +0 -8
- package/declaration/script.d.ts +0 -13
- package/declaration/texture.d.ts +0 -1
- package/declaration/tools/scalar.d.ts +0 -1
package/build/tools/scalar.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPowerOfTwoUntil = void 0;
|
|
4
|
-
function getPowerOfTwoUntil(limit) {
|
|
5
|
-
let size = 1;
|
|
6
|
-
while (size <= limit) {
|
|
7
|
-
size <<= 1;
|
|
8
|
-
}
|
|
9
|
-
return size >> 1;
|
|
10
|
-
}
|
|
11
|
-
exports.getPowerOfTwoUntil = getPowerOfTwoUntil;
|
|
12
|
-
//# sourceMappingURL=scalar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scalar.js","sourceRoot":"","sources":["../../src/tools/scalar.ts"],"names":[],"mappings":";;;AAAA,SAAgB,kBAAkB,CAAC,KAAa;IAC5C,IAAI,IAAI,GAAG,CAAC,CAAC;IAEb,OAAO,IAAI,IAAI,KAAK,EAAE,CAAC;QACnB,IAAI,KAAK,CAAC,CAAC;IACf,CAAC;IAED,OAAO,IAAI,IAAI,CAAC,CAAC;AACrB,CAAC;AARD,gDAQC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
-
import { AdvancedDynamicTexture } from "@babylonjs/gui/2D/advancedDynamicTexture";
|
|
3
|
-
export interface ISceneDecoratorData {
|
|
4
|
-
_NodesFromScene: {
|
|
5
|
-
nodeName: string;
|
|
6
|
-
propertyKey: string | Symbol;
|
|
7
|
-
}[];
|
|
8
|
-
_NodesFromDescendants: {
|
|
9
|
-
nodeName: string;
|
|
10
|
-
propertyKey: string | Symbol;
|
|
11
|
-
directDescendantsOnly: boolean;
|
|
12
|
-
}[];
|
|
13
|
-
_SoundsFromScene: {
|
|
14
|
-
soundName: string;
|
|
15
|
-
propertyKey: string | Symbol;
|
|
16
|
-
}[];
|
|
17
|
-
_GuiFromAsset: {
|
|
18
|
-
pathInAssets: string;
|
|
19
|
-
onGuiCreated?: (instance: unknown, gui: AdvancedDynamicTexture) => unknown;
|
|
20
|
-
propertyKey: string | Symbol;
|
|
21
|
-
}[];
|
|
22
|
-
}
|
|
23
|
-
export declare function applyDecorators(scene: Scene, object: any, instance: any, rootUrl: string): void;
|
|
@@ -1,12 +0,0 @@
|
|
|
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;
|
|
@@ -1,17 +0,0 @@
|
|
|
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;
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
package/declaration/guards.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Mesh } from "@babylonjs/core/Meshes/mesh";
|
|
2
|
-
import { GroundMesh } from "@babylonjs/core/Meshes/groundMesh";
|
|
3
|
-
import { Texture } from "@babylonjs/core/Materials/Textures/texture";
|
|
4
|
-
/**
|
|
5
|
-
* Returns wether or not the given object is a Mesh.
|
|
6
|
-
* @param object defines the reference to the object to test its class name.
|
|
7
|
-
*/
|
|
8
|
-
export declare function isMesh(object: any): object is Mesh;
|
|
9
|
-
/**
|
|
10
|
-
* Returns wether or not the given object is a GroundMesh.
|
|
11
|
-
* @param object defines the reference to the object to test its class name.
|
|
12
|
-
*/
|
|
13
|
-
export declare function isGroundMesh(object: any): object is GroundMesh;
|
|
14
|
-
/**
|
|
15
|
-
* Returns wether or not the given object is a Texture.
|
|
16
|
-
* @param object defines the reference to the object to test its class name.
|
|
17
|
-
*/
|
|
18
|
-
export declare function isTexture(object: any): object is Texture;
|
package/declaration/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from "./loader";
|
|
2
|
-
export * from "./rendering/ssao";
|
|
3
|
-
export * from "./rendering/ssr";
|
|
4
|
-
export * from "./rendering/motion-blur";
|
|
5
|
-
export * from "./rendering/default-pipeline";
|
|
6
|
-
export * from "./decorators/scene";
|
|
7
|
-
export * from "./decorators/gui";
|
|
8
|
-
export * from "./decorators/sound";
|
|
9
|
-
export * from "./script";
|
package/declaration/light.d.ts
DELETED
package/declaration/loader.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
-
import "./texture";
|
|
3
|
-
/**
|
|
4
|
-
* Defines the possible output type of a script.
|
|
5
|
-
* `default` is a class that will be instantiated with the object as parameter.
|
|
6
|
-
* `onStart` is a function that will be called once before the first render passing the reference to the object the script is attached to.
|
|
7
|
-
* `onUpdate` is a function that will be called every frame passing the reference to the object the script is attached to
|
|
8
|
-
*/
|
|
9
|
-
export type ScriptMap = Record<string, {
|
|
10
|
-
default?: new (object: any) => {
|
|
11
|
-
onStart?(): void;
|
|
12
|
-
onUpdate?(): void;
|
|
13
|
-
};
|
|
14
|
-
onStart?: (object: any) => void;
|
|
15
|
-
onUpdate?: (object: any) => void;
|
|
16
|
-
}>;
|
|
17
|
-
/**
|
|
18
|
-
* Defines the overall desired quality of the scene.
|
|
19
|
-
* In other words, defines the quality of textures that will be loaded in terms of dimensions.
|
|
20
|
-
* The editor computes automatic "hight (untouched)", "medium (half)", and "low (quarter)" quality levels for textures.
|
|
21
|
-
* Using "medium" or "low" quality levels will reduce the memory usage and improve the performance of the scene
|
|
22
|
-
* especially on mobiles where memory is limited.
|
|
23
|
-
*/
|
|
24
|
-
export type SceneLoaderQualitySelector = "low" | "medium" | "high";
|
|
25
|
-
declare module "@babylonjs/core/scene" {
|
|
26
|
-
interface Scene {
|
|
27
|
-
loadingQuality: SceneLoaderQualitySelector;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export declare function loadScene(rootUrl: string, sceneFilename: string, scene: Scene, scriptsMap: ScriptMap, quality?: SceneLoaderQualitySelector): Promise<void>;
|
|
31
|
-
export declare function loadScriptsFor(scene: Scene, object: any, scriptsMap: ScriptMap, rootUrl: string): void;
|
package/declaration/physics.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
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(mesh: AbstractMesh): void;
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
* Returns the reference to the default rendering pipeline if exists.
|
|
6
|
-
*/
|
|
7
|
-
export declare function getDefaultRenderingPipeline(): DefaultRenderingPipeline | null;
|
|
8
|
-
export declare function disposeDefaultRenderingPipeline(): void;
|
|
9
|
-
export declare function createDefaultRenderingPipeline(scene: Scene, camera: Camera): DefaultRenderingPipeline;
|
|
10
|
-
export declare function serializeDefaultRenderingPipeline(): any;
|
|
11
|
-
export declare function parseDefaultRenderingPipeline(scene: Scene, camera: Camera, data: any): DefaultRenderingPipeline;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
-
import { Camera } from "@babylonjs/core/Cameras/camera";
|
|
3
|
-
import { MotionBlurPostProcess } from "@babylonjs/core/PostProcesses/motionBlurPostProcess";
|
|
4
|
-
export declare function getMotionBlurPostProcess(): MotionBlurPostProcess | null;
|
|
5
|
-
export declare function disposeMotionBlurPostProcess(): void;
|
|
6
|
-
export declare function createMotionBlurPostProcess(scene: Scene, camera: Camera): MotionBlurPostProcess;
|
|
7
|
-
export declare function serializeMotionBlurPostProcess(): any;
|
|
8
|
-
export declare function parseMotionBlurPostProcess(scene: Scene, camera: Camera, data: any): MotionBlurPostProcess;
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
export declare function getSSAO2RenderingPipeline(): SSAO2RenderingPipeline | null;
|
|
5
|
-
export declare function disposeSSAO2RenderingPipeline(): void;
|
|
6
|
-
export declare function createSSAO2RenderingPipeline(scene: Scene, camera: Camera): SSAO2RenderingPipeline;
|
|
7
|
-
export declare function serializeSSAO2RenderingPipeline(): any;
|
|
8
|
-
export declare function parseSSAO2RenderingPipeline(scene: Scene, camera: Camera, data: any): SSAO2RenderingPipeline;
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
export declare function getSSRRenderingPipeline(): SSRRenderingPipeline | null;
|
|
5
|
-
export declare function disposeSSRRenderingPipeline(): void;
|
|
6
|
-
export declare function createSSRRenderingPipeline(scene: Scene, camera: Camera): SSRRenderingPipeline;
|
|
7
|
-
export declare function serializeSSRRenderingPipeline(): any;
|
|
8
|
-
export declare function parseSSRRenderingPipeline(scene: Scene, camera: Camera, data: any): SSRRenderingPipeline;
|
package/declaration/script.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
}
|
package/declaration/texture.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getPowerOfTwoUntil(limit: number): number;
|