@babylonjs/inspector 5.0.0-rc.11 → 5.0.0-rc.12
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/dist/babylon.inspector.bundle.js +1 -1
- package/dist/babylon.inspector.bundle.js.map +1 -1
- package/dist/babylon.inspector.bundle.max.js +44 -33
- package/dist/babylon.inspector.bundle.max.js.map +1 -1
- package/dist/babylon.inspector.module.d.ts +2 -3
- package/license.md +71 -0
- package/package.json +26 -8
@@ -64891,7 +64891,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
64891
64891
|
/* harmony import */ var _paneComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../paneComponent */ "../../../dev/inspector/dist/components/actionTabs/paneComponent.js");
|
64892
64892
|
/* harmony import */ var shared_ui_components_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! shared-ui-components/lines/lineContainerComponent */ "../../../dev/sharedUiComponents/dist/lines/lineContainerComponent.js");
|
64893
64893
|
/* harmony import */ var shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! shared-ui-components/lines/buttonLineComponent */ "../../../dev/sharedUiComponents/dist/lines/buttonLineComponent.js");
|
64894
|
-
/* harmony import */ var core_Misc_videoRecorder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/
|
64894
|
+
/* harmony import */ var core_Misc_videoRecorder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/Lights/light */ "core/Misc/observable");
|
64895
64895
|
/* harmony import */ var core_Misc_videoRecorder__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_Misc_videoRecorder__WEBPACK_IMPORTED_MODULE_1__);
|
64896
64896
|
/* harmony import */ var _tools_gltfComponent__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./tools/gltfComponent */ "../../../dev/inspector/dist/components/actionTabs/tabs/tools/gltfComponent.js");
|
64897
64897
|
/* harmony import */ var serializers_glTF_2_0_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! serializers/glTF/2.0/index */ "serializers/glTF/2.0/index");
|
@@ -64933,6 +64933,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
64933
64933
|
|
64934
64934
|
|
64935
64935
|
|
64936
|
+
|
64937
|
+
|
64936
64938
|
|
64937
64939
|
|
64938
64940
|
|
@@ -64947,7 +64949,8 @@ class ToolsTabComponent extends _paneComponent__WEBPACK_IMPORTED_MODULE_4__.Pane
|
|
64947
64949
|
this._screenShotSize = { precision: 1 };
|
64948
64950
|
this._gifOptions = { width: 512, frequency: 200 };
|
64949
64951
|
this._useWidthHeight = false;
|
64950
|
-
this.
|
64952
|
+
this._isExportingGltf = false;
|
64953
|
+
this._gltfExportOptions = { exportDisabledNodes: false, exportSkyboxes: false, exportCameras: false, exportLights: false };
|
64951
64954
|
this._crunchingGIF = false;
|
64952
64955
|
this._reflectorHostname = "localhost";
|
64953
64956
|
this._reflectorPort = 1234;
|
@@ -65081,37 +65084,45 @@ class ToolsTabComponent extends _paneComponent__WEBPACK_IMPORTED_MODULE_4__.Pane
|
|
65081
65084
|
const filesInputAnimation = new core_Misc_videoRecorder__WEBPACK_IMPORTED_MODULE_1__.FilesInput(scene.getEngine(), scene, () => { }, () => { }, () => { }, () => { }, () => { }, reload, () => { });
|
65082
65085
|
filesInputAnimation.loadFiles(event);
|
65083
65086
|
}
|
65084
|
-
shouldExport(node) {
|
65085
|
-
// Exclude disabled
|
65086
|
-
if (!node.isEnabled()) {
|
65087
|
-
return false;
|
65088
|
-
}
|
65089
|
-
// Exclude skybox
|
65090
|
-
if (node instanceof core_Misc_videoRecorder__WEBPACK_IMPORTED_MODULE_1__.Mesh) {
|
65091
|
-
if (node.material) {
|
65092
|
-
const material = node.material;
|
65093
|
-
const reflectionTexture = material.reflectionTexture;
|
65094
|
-
if (reflectionTexture && reflectionTexture.coordinatesMode === core_Misc_videoRecorder__WEBPACK_IMPORTED_MODULE_1__.Texture.SKYBOX_MODE) {
|
65095
|
-
return false;
|
65096
|
-
}
|
65097
|
-
}
|
65098
|
-
}
|
65099
|
-
return true;
|
65100
|
-
}
|
65101
65087
|
exportGLTF() {
|
65102
65088
|
const scene = this.props.scene;
|
65103
|
-
this.
|
65089
|
+
this._isExportingGltf = true;
|
65104
65090
|
this.forceUpdate();
|
65105
|
-
|
65106
|
-
|
65107
|
-
|
65108
|
-
|
65109
|
-
|
65110
|
-
|
65091
|
+
const shouldExport = (node) => {
|
65092
|
+
if (!this._gltfExportOptions.exportDisabledNodes) {
|
65093
|
+
if (!node.isEnabled()) {
|
65094
|
+
return false;
|
65095
|
+
}
|
65096
|
+
}
|
65097
|
+
if (!this._gltfExportOptions.exportSkyboxes) {
|
65098
|
+
if (node instanceof core_Misc_videoRecorder__WEBPACK_IMPORTED_MODULE_1__.Mesh) {
|
65099
|
+
if (node.material) {
|
65100
|
+
const material = node.material;
|
65101
|
+
const reflectionTexture = material.reflectionTexture;
|
65102
|
+
if (reflectionTexture && reflectionTexture.coordinatesMode === core_Misc_videoRecorder__WEBPACK_IMPORTED_MODULE_1__.Texture.SKYBOX_MODE) {
|
65103
|
+
return false;
|
65104
|
+
}
|
65105
|
+
}
|
65106
|
+
}
|
65107
|
+
}
|
65108
|
+
if (!this._gltfExportOptions.exportCameras) {
|
65109
|
+
if (node instanceof core_Misc_videoRecorder__WEBPACK_IMPORTED_MODULE_1__.Camera) {
|
65110
|
+
return false;
|
65111
|
+
}
|
65112
|
+
}
|
65113
|
+
if (!this._gltfExportOptions.exportLights) {
|
65114
|
+
if (node instanceof core_Misc_videoRecorder__WEBPACK_IMPORTED_MODULE_1__.Light) {
|
65115
|
+
return false;
|
65116
|
+
}
|
65117
|
+
}
|
65118
|
+
return true;
|
65119
|
+
};
|
65120
|
+
serializers_glTF_2_0_index__WEBPACK_IMPORTED_MODULE_2__.GLTF2Export.GLBAsync(scene, "scene", { shouldExportNode: (node) => shouldExport(node) }).then((glb) => {
|
65121
|
+
this._isExportingGltf = false;
|
65111
65122
|
this.forceUpdate();
|
65112
|
-
|
65113
|
-
|
65114
|
-
this.
|
65123
|
+
glb.downloadFiles();
|
65124
|
+
}, () => {
|
65125
|
+
this._isExportingGltf = false;
|
65115
65126
|
this.forceUpdate();
|
65116
65127
|
});
|
65117
65128
|
}
|
@@ -65174,9 +65185,9 @@ class ToolsTabComponent extends _paneComponent__WEBPACK_IMPORTED_MODULE_4__.Pane
|
|
65174
65185
|
}, isSelected: () => this._useWidthHeight }), this._useWidthHeight && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_10__.NumericInputComponent, { label: "Width", precision: 0, step: 1, value: this._screenShotSize.width ? this._screenShotSize.width : 512, onChange: (value) => (this._screenShotSize.width = value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_10__.NumericInputComponent, { label: "Height", precision: 0, step: 1, value: this._screenShotSize.height ? this._screenShotSize.height : 512, onChange: (value) => (this._screenShotSize.height = value) })] })))] }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(shared_ui_components_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_6__.LineContainerComponent, Object.assign({ title: "GIF", selection: this.props.globalState }, { children: [this._crunchingGIF && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_messageLineComponent__WEBPACK_IMPORTED_MODULE_11__.MessageLineComponent, { text: "Creating the GIF file..." }), !this._crunchingGIF && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_7__.ButtonLineComponent, { label: this._gifRecorder ? "Stop" : "Record", onClick: () => this.recordGIF() }), !this._crunchingGIF && !this._gifRecorder && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_8__.FloatLineComponent, { label: "Resolution", isInteger: true, target: this._gifOptions, propertyName: "width" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_8__.FloatLineComponent, { label: "Frequency (ms)", isInteger: true, target: this._gifOptions, propertyName: "frequency" })] }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(shared_ui_components_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_6__.LineContainerComponent, Object.assign({ title: "REPLAY", selection: this.props.globalState }, { children: [!this.props.globalState.recorder.isRecording && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_7__.ButtonLineComponent, { label: "Start recording", onClick: () => this.startRecording() }), this.props.globalState.recorder.isRecording && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_indentedTextLineComponent__WEBPACK_IMPORTED_MODULE_12__.IndentedTextLineComponent, { value: "Record in progress" }), this.props.globalState.recorder.isRecording && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_7__.ButtonLineComponent, { label: "Generate delta file", onClick: () => this.exportReplay() }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_fileButtonLineComponent__WEBPACK_IMPORTED_MODULE_13__.FileButtonLineComponent, { label: `Apply delta file`, onClick: (file) => this.applyDelta(file), accept: ".json" })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(shared_ui_components_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_6__.LineContainerComponent, Object.assign({ title: "SCENE IMPORT", selection: this.props.globalState }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_fileMultipleButtonLineComponent__WEBPACK_IMPORTED_MODULE_14__.FileMultipleButtonLineComponent, { label: "Import animations", accept: "gltf", onClick: (evt) => this.importAnimations(evt) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_9__.CheckBoxLineComponent, { label: "Overwrite animations", target: sceneImportDefaults, propertyName: "overwriteAnimations", onSelect: (value) => {
|
65175
65186
|
sceneImportDefaults["overwriteAnimations"] = value;
|
65176
65187
|
this.forceUpdate();
|
65177
|
-
} }), sceneImportDefaults["overwriteAnimations"] === false && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_15__.OptionsLineComponent, { label: "Animation merge mode", options: animationGroupLoadingModes, target: sceneImportDefaults, propertyName: "animationGroupLoadingMode" }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(shared_ui_components_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_6__.LineContainerComponent, Object.assign({ title: "SCENE EXPORT", selection: this.props.globalState }, { children: [
|
65178
|
-
|
65179
|
-
|
65188
|
+
} }), sceneImportDefaults["overwriteAnimations"] === false && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_15__.OptionsLineComponent, { label: "Animation merge mode", options: animationGroupLoadingModes, target: sceneImportDefaults, propertyName: "animationGroupLoadingMode" }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(shared_ui_components_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_6__.LineContainerComponent, Object.assign({ title: "SCENE EXPORT", selection: this.props.globalState }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_7__.ButtonLineComponent, { label: "Export to Babylon", onClick: () => this.exportBabylon() }), !scene.getEngine().premultipliedAlpha && scene.environmentTexture && scene.environmentTexture._prefiltered && scene.activeCamera && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_7__.ButtonLineComponent, { label: "Generate .env texture", onClick: () => this.createEnvTexture() }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_15__.OptionsLineComponent, { label: "Image type", options: envExportImageTypes, target: this._envOptions, propertyName: "imageTypeIndex", onSelect: () => {
|
65189
|
+
this.forceUpdate();
|
65190
|
+
} }), this._envOptions.imageTypeIndex > 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_8__.FloatLineComponent, { label: "Quality", isInteger: false, min: 0, max: 1, target: this._envOptions, propertyName: "imageQuality" }))] }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(shared_ui_components_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_6__.LineContainerComponent, Object.assign({ title: "GLTF EXPORT", selection: this.props.globalState }, { children: [this._isExportingGltf && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_16__.TextLineComponent, { label: "Please wait..exporting", ignoreValue: true }), !this._isExportingGltf && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_9__.CheckBoxLineComponent, { label: "Export Disabled Nodes", isSelected: () => this._gltfExportOptions.exportDisabledNodes, onSelect: (value) => (this._gltfExportOptions.exportDisabledNodes = value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_9__.CheckBoxLineComponent, { label: "Export Skybox", isSelected: () => this._gltfExportOptions.exportSkyboxes, onSelect: (value) => (this._gltfExportOptions.exportSkyboxes = value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_9__.CheckBoxLineComponent, { label: "Export Cameras", isSelected: () => this._gltfExportOptions.exportCameras, onSelect: (value) => (this._gltfExportOptions.exportCameras = value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_9__.CheckBoxLineComponent, { label: "Export Lights", isSelected: () => this._gltfExportOptions.exportLights, onSelect: (value) => (this._gltfExportOptions.exportLights = value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_7__.ButtonLineComponent, { label: "Export to GLB", onClick: () => this.exportGLTF() })] }))] })), BABYLON.GLTFFileLoader && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tools_gltfComponent__WEBPACK_IMPORTED_MODULE_17__.GLTFComponent, { scene: scene, globalState: this.props.globalState }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(shared_ui_components_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_6__.LineContainerComponent, Object.assign({ title: "REFLECTOR", selection: this.props.globalState }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_18__.TextInputLineComponent, { lockObject: this._lockObject, label: "Hostname", target: this, propertyName: "_reflectorHostname" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_8__.FloatLineComponent, { lockObject: this._lockObject, label: "Port", target: this, propertyName: "_reflectorPort", isInteger: true }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_7__.ButtonLineComponent, { label: "Connect", onClick: () => this.connectReflector() })] }))] })));
|
65180
65191
|
}
|
65181
65192
|
}
|
65182
65193
|
//# sourceMappingURL=toolsTabComponent.js.map
|
@@ -69553,7 +69564,7 @@ const globalObject = typeof __webpack_require__.g !== "undefined" ? __webpack_re
|
|
69553
69564
|
if (typeof globalObject !== "undefined") {
|
69554
69565
|
globalObject.BABYLON = globalObject.BABYLON || {};
|
69555
69566
|
globalObject.BABYLON.Inspector = _index__WEBPACK_IMPORTED_MODULE_0__.Inspector;
|
69556
|
-
globalObject.INSPECTOR =
|
69567
|
+
globalObject.INSPECTOR = _index__WEBPACK_IMPORTED_MODULE_1__;
|
69557
69568
|
}
|
69558
69569
|
|
69559
69570
|
//# sourceMappingURL=legacy.js.map
|