babylonjs-editor-tools 0.0.7 → 0.0.9
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 +1318 -0
- package/build/src/cinematic/events/apply-impulse.js +12 -0
- package/build/src/cinematic/events/set-enabled.js +5 -0
- package/build/src/cinematic/generate.js +134 -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/src/decorators/gui.js +18 -0
- 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/src/decorators/sound.js +15 -0
- package/build/src/index.js +17 -0
- package/build/src/loading/loader.js +55 -0
- package/build/src/loading/physics.js +28 -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 +27 -0
- package/build/src/tools/light.js +25 -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 -4
- package/build/decorators/apply.js +0 -20
- package/build/guards.js +0 -20
- package/build/index.js +0 -23
- package/build/light.js +0 -30
- package/build/loader.js +0 -73
- package/build/rendering/motion-blur.js +0 -46
- package/build/tools/scalar.js +0 -12
- package/declaration/decorators/apply.d.ts +0 -13
- package/declaration/decorators/scene.d.ts +0 -17
- package/declaration/guards.d.ts +0 -12
- package/declaration/index.d.ts +0 -6
- package/declaration/light.d.ts +0 -3
- package/declaration/loader.d.ts +0 -31
- 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/texture.d.ts +0 -1
- package/declaration/tools/scalar.d.ts +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Searches for a sound by its id in the scene by traversing all soundtracks.
|
|
3
|
+
* @param id defines the id of the sound to retrieve.
|
|
4
|
+
* @param scene defines the reference to the scene where to find the instantiated sound.
|
|
5
|
+
*/
|
|
6
|
+
export function getSoundById(id, scene) {
|
|
7
|
+
const soundTracks = scene.soundTracks ?? [];
|
|
8
|
+
if (!soundTracks.length) {
|
|
9
|
+
soundTracks.push(scene.mainSoundTrack);
|
|
10
|
+
}
|
|
11
|
+
for (let i = 0, len = soundTracks.length; i < len; i++) {
|
|
12
|
+
const sound = soundTracks[i].soundCollection.find((s) => s.id === id);
|
|
13
|
+
if (sound) {
|
|
14
|
+
return sound;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=sound.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set the compressed texture format to use, based on the formats you have, and the formats
|
|
3
|
+
* supported by the hardware / browser.
|
|
4
|
+
* @param engine defines the reference to the engine to configure the texture format to use.
|
|
5
|
+
* @see `@babylonjs/core/Engines/Extensions/engine.textureSelector.d.ts` for more information.
|
|
6
|
+
*/
|
|
7
|
+
export function configureEngineToUseCompressedTextures(engine) {
|
|
8
|
+
engine.setTextureFormatToUse([
|
|
9
|
+
"-dxt.ktx",
|
|
10
|
+
"-astc.ktx",
|
|
11
|
+
"-pvrtc.ktx",
|
|
12
|
+
"-etc1.ktx",
|
|
13
|
+
"-etc2.ktx",
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=texture.js.map
|
package/package.json
CHANGED
|
@@ -1,17 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-editor-tools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
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": {
|
|
7
|
-
"
|
|
7
|
+
"build": "tsc -p . && node esbuild.mjs",
|
|
8
|
+
"watch": "concurrently \"tsc -p . --watch\" \"node esbuild.mjs --watch\"",
|
|
9
|
+
"test": "jest test/*",
|
|
10
|
+
"coverage": "jest test/* --coverage"
|
|
8
11
|
},
|
|
9
12
|
"main": "build/index.js",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./declaration/src/index.d.ts",
|
|
16
|
+
"import": "./build/src/index.js",
|
|
17
|
+
"require": "./build/index.node.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
10
20
|
"typings": "declaration/index.ts",
|
|
11
21
|
"license": "(Apache-2.0)",
|
|
12
22
|
"devDependencies": {
|
|
13
|
-
"@
|
|
14
|
-
"
|
|
23
|
+
"@babel/core": "^7.26.10",
|
|
24
|
+
"@babel/preset-env": "^7.26.9",
|
|
25
|
+
"@babel/preset-typescript": "^7.27.0",
|
|
26
|
+
"@babylonjs/core": "8.6.1",
|
|
27
|
+
"@babylonjs/gui": "8.6.1",
|
|
28
|
+
"@types/jest": "^29.5.14",
|
|
29
|
+
"babel-jest": "^29.7.0",
|
|
30
|
+
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
31
|
+
"babel-plugin-transform-decorators-legacy": "^1.3.5",
|
|
32
|
+
"esbuild": "^0.25.0",
|
|
33
|
+
"jest": "^29.7.0",
|
|
34
|
+
"typescript": "5.4.5"
|
|
15
35
|
},
|
|
16
36
|
"dependencies": {}
|
|
17
37
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.applyDecorators = void 0;
|
|
4
|
-
function applyDecorators(scene, object, instance) {
|
|
5
|
-
const ctor = instance.constructor;
|
|
6
|
-
if (!ctor) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
// @nodeFromScene
|
|
10
|
-
ctor._NodesFromScene?.forEach((params) => {
|
|
11
|
-
instance[params.propertyKey.toString()] = scene.getNodeByName(params.nodeName);
|
|
12
|
-
});
|
|
13
|
-
// @nodeFromDescendants
|
|
14
|
-
ctor._NodesFromDescendants?.forEach((params) => {
|
|
15
|
-
const descendant = object.getDescendants?.(params.directDescendantsOnly, (node) => node.name === params.nodeName)[0];
|
|
16
|
-
instance[params.propertyKey.toString()] = descendant ?? null;
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
exports.applyDecorators = applyDecorators;
|
|
20
|
-
//# sourceMappingURL=apply.js.map
|
package/build/guards.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTexture = exports.isMesh = void 0;
|
|
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
|
-
function isMesh(object) {
|
|
9
|
-
return object.getClassName?.() === "Mesh";
|
|
10
|
-
}
|
|
11
|
-
exports.isMesh = isMesh;
|
|
12
|
-
/**
|
|
13
|
-
* Returns wether or not the given object is a Texture.
|
|
14
|
-
* @param object defines the reference to the object to test its class name.
|
|
15
|
-
*/
|
|
16
|
-
function isTexture(object) {
|
|
17
|
-
return object?.getClassName?.() === "Texture";
|
|
18
|
-
}
|
|
19
|
-
exports.isTexture = isTexture;
|
|
20
|
-
//# sourceMappingURL=guards.js.map
|
package/build/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./loader"), exports);
|
|
18
|
-
__exportStar(require("./rendering/ssao"), exports);
|
|
19
|
-
__exportStar(require("./rendering/ssr"), exports);
|
|
20
|
-
__exportStar(require("./rendering/motion-blur"), exports);
|
|
21
|
-
__exportStar(require("./rendering/default-pipeline"), exports);
|
|
22
|
-
__exportStar(require("./decorators/scene"), exports);
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
package/build/light.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.configureShadowMapRefreshRate = exports.configureShadowMapRenderListPredicate = void 0;
|
|
4
|
-
const math_vector_1 = require("@babylonjs/core/Maths/math.vector");
|
|
5
|
-
const renderTargetTexture_1 = require("@babylonjs/core/Materials/Textures/renderTargetTexture");
|
|
6
|
-
function configureShadowMapRenderListPredicate(scene) {
|
|
7
|
-
scene.lights.forEach((light) => {
|
|
8
|
-
const shadowMap = light.getShadowGenerator()?.getShadowMap();
|
|
9
|
-
if (!shadowMap) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
shadowMap.renderListPredicate = (mesh) => {
|
|
13
|
-
const distance = math_vector_1.Vector3.Distance(mesh.getAbsolutePosition(), light.getAbsolutePosition());
|
|
14
|
-
return distance <= light.range;
|
|
15
|
-
};
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
exports.configureShadowMapRenderListPredicate = configureShadowMapRenderListPredicate;
|
|
19
|
-
async function configureShadowMapRefreshRate(scene) {
|
|
20
|
-
scene.executeWhenReady(() => {
|
|
21
|
-
scene.lights.forEach((light) => {
|
|
22
|
-
const shadowMap = light.getShadowGenerator()?.getShadowMap();
|
|
23
|
-
if (shadowMap) {
|
|
24
|
-
shadowMap.refreshRate = light.metadata?.refreshRate ?? renderTargetTexture_1.RenderTargetTexture.REFRESHRATE_RENDER_ONEVERYFRAME;
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
exports.configureShadowMapRefreshRate = configureShadowMapRefreshRate;
|
|
30
|
-
//# sourceMappingURL=light.js.map
|
package/build/loader.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadScriptsFor = exports.loadScene = void 0;
|
|
4
|
-
const sceneLoader_1 = require("@babylonjs/core/Loading/sceneLoader");
|
|
5
|
-
const ssr_1 = require("./rendering/ssr");
|
|
6
|
-
const ssao_1 = require("./rendering/ssao");
|
|
7
|
-
const motion_blur_1 = require("./rendering/motion-blur");
|
|
8
|
-
const default_pipeline_1 = require("./rendering/default-pipeline");
|
|
9
|
-
const apply_1 = require("./decorators/apply");
|
|
10
|
-
const light_1 = require("./light");
|
|
11
|
-
require("./texture");
|
|
12
|
-
async function loadScene(rootUrl, sceneFilename, scene, scriptsMap, quality = "high") {
|
|
13
|
-
scene.loadingQuality = quality;
|
|
14
|
-
await sceneLoader_1.SceneLoader.AppendAsync(rootUrl, sceneFilename, scene, null, ".babylon");
|
|
15
|
-
(0, light_1.configureShadowMapRenderListPredicate)(scene);
|
|
16
|
-
(0, light_1.configureShadowMapRefreshRate)(scene);
|
|
17
|
-
if (scene.metadata?.rendering) {
|
|
18
|
-
const camera = scene.activeCamera ?? scene.cameras[0];
|
|
19
|
-
if (scene.metadata.rendering.ssao2RenderingPipeline) {
|
|
20
|
-
(0, ssao_1.parseSSAO2RenderingPipeline)(scene, camera, scene.metadata.rendering.ssao2RenderingPipeline);
|
|
21
|
-
}
|
|
22
|
-
if (scene.metadata.rendering.ssrRenderingPipeline) {
|
|
23
|
-
(0, ssr_1.parseSSRRenderingPipeline)(scene, camera, scene.metadata.rendering.ssrRenderingPipeline);
|
|
24
|
-
}
|
|
25
|
-
if (scene.metadata.rendering.motionBlurPostProcess) {
|
|
26
|
-
(0, motion_blur_1.parseMotionBlurPostProcess)(scene, camera, scene.metadata.rendering.motionBlurPostProcess);
|
|
27
|
-
}
|
|
28
|
-
if (scene.metadata.rendering.defaultRenderingPipeline) {
|
|
29
|
-
(0, default_pipeline_1.parseDefaultRenderingPipeline)(scene, camera, scene.metadata.rendering.defaultRenderingPipeline);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
loadScriptsFor(scene, scene, scriptsMap);
|
|
33
|
-
scene.transformNodes.forEach((transformNode) => loadScriptsFor(scene, transformNode, scriptsMap));
|
|
34
|
-
scene.meshes.forEach((mesh) => loadScriptsFor(scene, mesh, scriptsMap));
|
|
35
|
-
scene.lights.forEach((light) => loadScriptsFor(scene, light, scriptsMap));
|
|
36
|
-
scene.cameras.forEach((camera) => loadScriptsFor(scene, camera, scriptsMap));
|
|
37
|
-
}
|
|
38
|
-
exports.loadScene = loadScene;
|
|
39
|
-
function loadScriptsFor(scene, object, scriptsMap) {
|
|
40
|
-
if (!object.metadata) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
object.metadata.scripts?.forEach((script) => {
|
|
44
|
-
if (!script.enabled) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
const exports = scriptsMap[script.key];
|
|
48
|
-
if (!exports) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
if (exports.default) {
|
|
52
|
-
const instance = new exports.default(object);
|
|
53
|
-
(0, apply_1.applyDecorators)(scene, object, instance);
|
|
54
|
-
if (instance.onStart) {
|
|
55
|
-
scene.onBeforeRenderObservable.addOnce(() => instance.onStart());
|
|
56
|
-
}
|
|
57
|
-
if (instance.onUpdate) {
|
|
58
|
-
scene.onBeforeRenderObservable.add(() => instance.onUpdate());
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
if (exports.onStart) {
|
|
63
|
-
scene.onBeforeRenderObservable.addOnce(() => exports.onStart(object));
|
|
64
|
-
}
|
|
65
|
-
if (exports.onUpdate) {
|
|
66
|
-
scene.onBeforeRenderObservable.add(() => exports.onUpdate(object));
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
object.metadata.scripts = undefined;
|
|
71
|
-
}
|
|
72
|
-
exports.loadScriptsFor = loadScriptsFor;
|
|
73
|
-
//# sourceMappingURL=loader.js.map
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseMotionBlurPostProcess = exports.serializeMotionBlurPostProcess = exports.createMotionBlurPostProcess = exports.disposeMotionBlurPostProcess = exports.getMotionBlurPostProcess = void 0;
|
|
4
|
-
const motionBlurPostProcess_1 = require("@babylonjs/core/PostProcesses/motionBlurPostProcess");
|
|
5
|
-
let motionBlurPostProcess = null;
|
|
6
|
-
function getMotionBlurPostProcess() {
|
|
7
|
-
return motionBlurPostProcess;
|
|
8
|
-
}
|
|
9
|
-
exports.getMotionBlurPostProcess = getMotionBlurPostProcess;
|
|
10
|
-
function disposeMotionBlurPostProcess() {
|
|
11
|
-
if (motionBlurPostProcess) {
|
|
12
|
-
motionBlurPostProcess.dispose();
|
|
13
|
-
motionBlurPostProcess = null;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.disposeMotionBlurPostProcess = disposeMotionBlurPostProcess;
|
|
17
|
-
function createMotionBlurPostProcess(scene, camera) {
|
|
18
|
-
motionBlurPostProcess = new motionBlurPostProcess_1.MotionBlurPostProcess("MotionBlurPostProcess", scene, 1.0, camera);
|
|
19
|
-
motionBlurPostProcess.motionStrength = 1.0;
|
|
20
|
-
motionBlurPostProcess.isObjectBased = true;
|
|
21
|
-
return motionBlurPostProcess;
|
|
22
|
-
}
|
|
23
|
-
exports.createMotionBlurPostProcess = createMotionBlurPostProcess;
|
|
24
|
-
function serializeMotionBlurPostProcess() {
|
|
25
|
-
if (!motionBlurPostProcess) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
isObjectBased: motionBlurPostProcess.isObjectBased,
|
|
30
|
-
motionStrength: motionBlurPostProcess.motionStrength,
|
|
31
|
-
motionBlurSamples: motionBlurPostProcess.motionBlurSamples,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
exports.serializeMotionBlurPostProcess = serializeMotionBlurPostProcess;
|
|
35
|
-
function parseMotionBlurPostProcess(scene, camera, data) {
|
|
36
|
-
if (motionBlurPostProcess) {
|
|
37
|
-
return motionBlurPostProcess;
|
|
38
|
-
}
|
|
39
|
-
const postProcess = createMotionBlurPostProcess(scene, camera);
|
|
40
|
-
postProcess.isObjectBased = data.isObjectBased;
|
|
41
|
-
postProcess.motionStrength = data.motionStrength;
|
|
42
|
-
postProcess.motionBlurSamples = data.motionBlurSamples;
|
|
43
|
-
return postProcess;
|
|
44
|
-
}
|
|
45
|
-
exports.parseMotionBlurPostProcess = parseMotionBlurPostProcess;
|
|
46
|
-
//# sourceMappingURL=motion-blur.js.map
|
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,13 +0,0 @@
|
|
|
1
|
-
import { Scene } from "@babylonjs/core/scene";
|
|
2
|
-
export interface ISceneDecoratorData {
|
|
3
|
-
_NodesFromScene: {
|
|
4
|
-
nodeName: string;
|
|
5
|
-
propertyKey: string | Symbol;
|
|
6
|
-
}[];
|
|
7
|
-
_NodesFromDescendants: {
|
|
8
|
-
nodeName: string;
|
|
9
|
-
propertyKey: string | Symbol;
|
|
10
|
-
directDescendantsOnly: boolean;
|
|
11
|
-
}[];
|
|
12
|
-
}
|
|
13
|
-
export declare function applyDecorators(scene: Scene, object: any, instance: any): 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;
|
package/declaration/guards.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Mesh } from "@babylonjs/core/Meshes/mesh";
|
|
2
|
-
import { Texture } from "@babylonjs/core/Materials/Textures/texture";
|
|
3
|
-
/**
|
|
4
|
-
* Returns wether or not the given object is a Mesh.
|
|
5
|
-
* @param object defines the reference to the object to test its class name.
|
|
6
|
-
*/
|
|
7
|
-
export declare function isMesh(object: any): object is Mesh;
|
|
8
|
-
/**
|
|
9
|
-
* Returns wether or not the given object is a Texture.
|
|
10
|
-
* @param object defines the reference to the object to test its class name.
|
|
11
|
-
*/
|
|
12
|
-
export declare function isTexture(object: any): object is Texture;
|
package/declaration/index.d.ts
DELETED
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): 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/texture.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getPowerOfTwoUntil(limit: number): number;
|