@babylonjs/inspector 8.39.2-preview → 8.39.3-preview
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/lib/{captureService-Drl3-xpS.js → captureService-Cof9AWXe.js} +5 -2
- package/lib/{captureService-Drl3-xpS.js.map → captureService-Cof9AWXe.js.map} +1 -1
- package/lib/{exportService-BtAoouDO.js → exportService-CQxYkya9.js} +5 -2
- package/lib/{exportService-BtAoouDO.js.map → exportService-CQxYkya9.js.map} +1 -1
- package/lib/{extensionsListService-C7fWebOE.js → extensionsListService-DlCVAAQD.js} +5 -2
- package/lib/{extensionsListService-C7fWebOE.js.map → extensionsListService-DlCVAAQD.js.map} +1 -1
- package/lib/{importService-BhIQoWkj.js → importService-BJpgs_sD.js} +5 -2
- package/lib/{importService-BhIQoWkj.js.map → importService-BJpgs_sD.js.map} +1 -1
- package/lib/{index-B1xdfROw.js → index-Dsv2BDui.js} +110 -17
- package/lib/index-Dsv2BDui.js.map +1 -0
- package/lib/index.d.ts +28 -5
- package/lib/index.js +4 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/lib/index-B1xdfROw.js.map +0 -1
|
@@ -81,7 +81,7 @@ import { RenderingManager } from '@babylonjs/core/Rendering/renderingManager.js'
|
|
|
81
81
|
import '@babylonjs/core/Rendering/edgesRenderer.js';
|
|
82
82
|
import '@babylonjs/core/Rendering/outlineRenderer.js';
|
|
83
83
|
import { GaussianSplattingMesh } from '@babylonjs/core/Meshes/GaussianSplatting/gaussianSplattingMesh.js';
|
|
84
|
-
import { FactorGradient,
|
|
84
|
+
import { FactorGradient, ColorGradient, Color3Gradient } from '@babylonjs/core/Misc/gradients.js';
|
|
85
85
|
import { GradientBlockColorStep } from '@babylonjs/core/Materials/Node/Blocks/gradientBlock.js';
|
|
86
86
|
import { Attractor } from '@babylonjs/core/Particles/attractor.js';
|
|
87
87
|
import { CreateSphere } from '@babylonjs/core/Meshes/Builders/sphereBuilder.js';
|
|
@@ -99,6 +99,7 @@ import { MultiRenderTarget } from '@babylonjs/core/Materials/Textures/multiRende
|
|
|
99
99
|
import { RenderTargetTexture } from '@babylonjs/core/Materials/Textures/renderTargetTexture.js';
|
|
100
100
|
import { ThinTexture } from '@babylonjs/core/Materials/Textures/thinTexture.js';
|
|
101
101
|
import { WhenTextureReadyAsync, GetTextureDataAsync } from '@babylonjs/core/Misc/textureTools.js';
|
|
102
|
+
import { ClusteredLightContainer } from '@babylonjs/core/Lights/Clustered.js';
|
|
102
103
|
import '@babylonjs/core/Rendering/boundingBoxRenderer.js';
|
|
103
104
|
import '@babylonjs/core/PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent.js';
|
|
104
105
|
import '@babylonjs/core/Sprites/spriteSceneComponent.js';
|
|
@@ -106,6 +107,8 @@ import { DynamicTexture } from '@babylonjs/core/Materials/Textures/dynamicTextur
|
|
|
106
107
|
import { PointerEventTypes } from '@babylonjs/core/Events/pointerEvents.js';
|
|
107
108
|
import { EngineStore } from '@babylonjs/core/Engines/engineStore.js';
|
|
108
109
|
import { UniqueIdGenerator } from '@babylonjs/core/Misc/uniqueIdGenerator.js';
|
|
110
|
+
import { DebugLayer } from '@babylonjs/core/Debug/debugLayer.js';
|
|
111
|
+
import { Lazy } from '@babylonjs/core/Misc/lazy.js';
|
|
109
112
|
|
|
110
113
|
const PropertyContext = createContext(undefined);
|
|
111
114
|
function usePropertyChangedNotifier() {
|
|
@@ -3660,7 +3663,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
|
|
|
3660
3663
|
keywords: ["export", "gltf", "glb", "babylon", "exporter", "tools"],
|
|
3661
3664
|
...BabylonWebResources,
|
|
3662
3665
|
author: { name: "Alex Chuber", forumUserName: "alexchuber" },
|
|
3663
|
-
getExtensionModuleAsync: async () => await import('./exportService-
|
|
3666
|
+
getExtensionModuleAsync: async () => await import('./exportService-CQxYkya9.js'),
|
|
3664
3667
|
},
|
|
3665
3668
|
{
|
|
3666
3669
|
name: "Capture Tools",
|
|
@@ -3668,7 +3671,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
|
|
|
3668
3671
|
keywords: ["capture", "screenshot", "gif", "video", "tools"],
|
|
3669
3672
|
...BabylonWebResources,
|
|
3670
3673
|
author: { name: "Alex Chuber", forumUserName: "alexchuber" },
|
|
3671
|
-
getExtensionModuleAsync: async () => await import('./captureService-
|
|
3674
|
+
getExtensionModuleAsync: async () => await import('./captureService-Cof9AWXe.js'),
|
|
3672
3675
|
},
|
|
3673
3676
|
{
|
|
3674
3677
|
name: "Import Tools",
|
|
@@ -3676,7 +3679,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
|
|
|
3676
3679
|
keywords: ["import", "tools"],
|
|
3677
3680
|
...BabylonWebResources,
|
|
3678
3681
|
author: { name: "Alex Chuber", forumUserName: "alexchuber" },
|
|
3679
|
-
getExtensionModuleAsync: async () => await import('./importService-
|
|
3682
|
+
getExtensionModuleAsync: async () => await import('./importService-BJpgs_sD.js'),
|
|
3680
3683
|
},
|
|
3681
3684
|
]);
|
|
3682
3685
|
|
|
@@ -4784,7 +4787,7 @@ function MakeModularTool(options) {
|
|
|
4784
4787
|
});
|
|
4785
4788
|
// Register the extension list service (for browsing/installing extensions) if extension feeds are provided.
|
|
4786
4789
|
if (extensionFeeds.length > 0) {
|
|
4787
|
-
const { ExtensionListServiceDefinition } = await import('./extensionsListService-
|
|
4790
|
+
const { ExtensionListServiceDefinition } = await import('./extensionsListService-DlCVAAQD.js');
|
|
4788
4791
|
await serviceContainer.addServiceAsync(ExtensionListServiceDefinition);
|
|
4789
4792
|
}
|
|
4790
4793
|
// Register the theme selector service (for selecting the theme) if theming is configured.
|
|
@@ -8841,7 +8844,33 @@ const NodeExplorerServiceDefinition = {
|
|
|
8841
8844
|
const sectionRegistration = sceneExplorerService.addSection({
|
|
8842
8845
|
displayName: "Nodes",
|
|
8843
8846
|
order: 100 /* DefaultSectionsOrder.Nodes */,
|
|
8844
|
-
getRootEntities: () =>
|
|
8847
|
+
getRootEntities: () => {
|
|
8848
|
+
const rootNodes = [...scene.rootNodes];
|
|
8849
|
+
// If any non-root node has a parent and that parent is not one of the node types shown in the Nodes section,
|
|
8850
|
+
// then we should treat it as a root node, otherwise it won't show up anywhere in scene explorer.
|
|
8851
|
+
// An example of this is when a Mesh or a TransformNode is parented under a Bone.
|
|
8852
|
+
for (const node of [...scene.meshes, ...scene.transformNodes, ...scene.cameras, ...scene.lights]) {
|
|
8853
|
+
if (node.parent &&
|
|
8854
|
+
!(node.parent instanceof AbstractMesh) &&
|
|
8855
|
+
!(node.parent instanceof TransformNode) &&
|
|
8856
|
+
!(node.parent instanceof Camera) &&
|
|
8857
|
+
!(node.parent instanceof Light)) {
|
|
8858
|
+
rootNodes.push(node);
|
|
8859
|
+
}
|
|
8860
|
+
}
|
|
8861
|
+
// Lights within a clustered light container are not included in Scene.lights or Scene.rootNodes.
|
|
8862
|
+
// If they also have no parent, then they won't show up anywhere, so show them as root nodes.
|
|
8863
|
+
for (const light of scene.lights) {
|
|
8864
|
+
if (light instanceof ClusteredLightContainer) {
|
|
8865
|
+
for (const childLight of light.lights) {
|
|
8866
|
+
if (!childLight.parent && !rootNodes.includes(childLight)) {
|
|
8867
|
+
rootNodes.push(childLight);
|
|
8868
|
+
}
|
|
8869
|
+
}
|
|
8870
|
+
}
|
|
8871
|
+
}
|
|
8872
|
+
return rootNodes;
|
|
8873
|
+
},
|
|
8845
8874
|
getEntityChildren: (node) => node.getChildren(),
|
|
8846
8875
|
getEntityDisplayInfo: (node) => {
|
|
8847
8876
|
const onChangeObservable = new Observable();
|
|
@@ -9534,22 +9563,14 @@ function ShowInspector(scene, options = {}) {
|
|
|
9534
9563
|
friendlyName: "Canvas Injector",
|
|
9535
9564
|
consumes: [ShellServiceIdentity],
|
|
9536
9565
|
factory: (shellService) => {
|
|
9537
|
-
const useStyles = makeStyles({
|
|
9538
|
-
canvasContainer: {
|
|
9539
|
-
display: canvasContainerDisplay,
|
|
9540
|
-
width: "100%",
|
|
9541
|
-
height: "100%",
|
|
9542
|
-
},
|
|
9543
|
-
});
|
|
9544
9566
|
const registration = shellService.addCentralContent({
|
|
9545
9567
|
key: "Canvas Injector",
|
|
9546
9568
|
component: () => {
|
|
9547
|
-
const classes = useStyles();
|
|
9548
9569
|
const canvasContainerRef = useRef(null);
|
|
9549
9570
|
useEffect(() => {
|
|
9550
9571
|
canvasContainerRef.current?.replaceChildren(...canvasContainerChildren);
|
|
9551
9572
|
}, []);
|
|
9552
|
-
return jsx("div", { ref: canvasContainerRef,
|
|
9573
|
+
return jsx("div", { ref: canvasContainerRef, style: { display: canvasContainerDisplay, width: "100%", height: "100%" } });
|
|
9553
9574
|
},
|
|
9554
9575
|
});
|
|
9555
9576
|
return {
|
|
@@ -10152,6 +10173,74 @@ Inspector._SidePaneOpenCounter = null;
|
|
|
10152
10173
|
Inspector.OnSelectionChangeObservable = new Observable();
|
|
10153
10174
|
Inspector.OnPropertyChangedObservable = new Observable();
|
|
10154
10175
|
|
|
10176
|
+
var inspector = /*#__PURE__*/Object.freeze({
|
|
10177
|
+
__proto__: null,
|
|
10178
|
+
ConvertOptions: ConvertOptions,
|
|
10179
|
+
Inspector: Inspector
|
|
10180
|
+
});
|
|
10181
|
+
|
|
10182
|
+
const LazyInspectorModule = new Lazy(async () => await Promise.resolve().then(function () { return inspector; }));
|
|
10183
|
+
class DebugLayerEx extends DebugLayer {
|
|
10184
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
10185
|
+
async show(config) {
|
|
10186
|
+
// If a custom inspector URL is not provided, default to a lazy dynamic import of the inspector module.
|
|
10187
|
+
if (!config?.inspectorURL) {
|
|
10188
|
+
this.BJSINSPECTOR = await LazyInspectorModule.value;
|
|
10189
|
+
}
|
|
10190
|
+
return await super.show(config);
|
|
10191
|
+
}
|
|
10192
|
+
}
|
|
10193
|
+
let CachedDebugLayerDescriptor;
|
|
10194
|
+
const DebugLayerExKey = Symbol("DebugLayerEx");
|
|
10195
|
+
const DebugLayerExDescriptor = {
|
|
10196
|
+
get: function () {
|
|
10197
|
+
// NOTE: We don't replace the _debugLayer property because we want to leave it
|
|
10198
|
+
// intact so we can dynamically switch back to v1. Eventually when v1 is fully
|
|
10199
|
+
// deprecated we can have just a single _debugLayer property.
|
|
10200
|
+
// If there is no DebugLayerEx yet, create it.
|
|
10201
|
+
if (!this[DebugLayerExKey]) {
|
|
10202
|
+
this[DebugLayerExKey] = new DebugLayerEx(this);
|
|
10203
|
+
}
|
|
10204
|
+
return this[DebugLayerExKey];
|
|
10205
|
+
},
|
|
10206
|
+
enumerable: true,
|
|
10207
|
+
configurable: true,
|
|
10208
|
+
};
|
|
10209
|
+
/**
|
|
10210
|
+
* Attaches Inspector v2 to Scene.debugLayer.
|
|
10211
|
+
*/
|
|
10212
|
+
function AttachDebugLayer() {
|
|
10213
|
+
const currentPropertyDescriptor = Reflect.getOwnPropertyDescriptor(Scene.prototype, "debugLayer");
|
|
10214
|
+
// Check if Inspector v2 is already attached, but don't compare the property descriptors directly
|
|
10215
|
+
// as getOwnPropertyDescriptor returns a new object instance each time.
|
|
10216
|
+
// Instead, check the get function.
|
|
10217
|
+
if (currentPropertyDescriptor?.get !== DebugLayerExDescriptor.get) {
|
|
10218
|
+
// Cache the property descriptor so we can restore it if/when Inspector v2 is detached from Scene._debugLayer.
|
|
10219
|
+
CachedDebugLayerDescriptor = currentPropertyDescriptor;
|
|
10220
|
+
// Define the debugLayer property to return our extended DebugLayerEx (Inspector v2).
|
|
10221
|
+
Reflect.defineProperty(Scene.prototype, "debugLayer", DebugLayerExDescriptor);
|
|
10222
|
+
}
|
|
10223
|
+
}
|
|
10224
|
+
/**
|
|
10225
|
+
* Detaches Inspector v2 from Scene.debugLayer.
|
|
10226
|
+
*/
|
|
10227
|
+
function DetachDebugLayer() {
|
|
10228
|
+
const currentPropertyDescriptor = Reflect.getOwnPropertyDescriptor(Scene.prototype, "debugLayer");
|
|
10229
|
+
// Check if Inspector v2 is already attached, but don't compare the property descriptors directly
|
|
10230
|
+
// as getOwnPropertyDescriptor returns a new object instance each time.
|
|
10231
|
+
// Instead, check the get function.
|
|
10232
|
+
if (currentPropertyDescriptor?.get === DebugLayerExDescriptor.get) {
|
|
10233
|
+
// Revert the debugLayer property descriptor.
|
|
10234
|
+
if (CachedDebugLayerDescriptor) {
|
|
10235
|
+
Reflect.defineProperty(Scene.prototype, "debugLayer", CachedDebugLayerDescriptor);
|
|
10236
|
+
CachedDebugLayerDescriptor = undefined;
|
|
10237
|
+
}
|
|
10238
|
+
else {
|
|
10239
|
+
Reflect.deleteProperty(Scene.prototype, "debugLayer");
|
|
10240
|
+
}
|
|
10241
|
+
}
|
|
10242
|
+
}
|
|
10243
|
+
|
|
10155
10244
|
const useStyles$2 = makeStyles({
|
|
10156
10245
|
root: {
|
|
10157
10246
|
// Stack the label above the field with a gap
|
|
@@ -10407,5 +10496,9 @@ const TextAreaPropertyLine = (props) => {
|
|
|
10407
10496
|
return (jsx(PropertyLine, { ...props, children: jsx(Textarea, { ...props }) }));
|
|
10408
10497
|
};
|
|
10409
10498
|
|
|
10410
|
-
|
|
10411
|
-
|
|
10499
|
+
// Export the parts of inspector that are intended to be part of the public API.
|
|
10500
|
+
// Attach Inspector v2 to Scene.debugLayer as a side effect for back compat.
|
|
10501
|
+
AttachDebugLayer();
|
|
10502
|
+
|
|
10503
|
+
export { SelectionServiceIdentity as $, AttachDebugLayer as A, ButtonLine as B, Collapse as C, DebugServiceIdentity as D, ExtensibleAccordion as E, FileUploadLine as F, useResource as G, useAsyncResource as H, Inspector as I, useCompactMode as J, useSidePaneDockOverrides as K, Link as L, MakeLazyComponent as M, NumberDropdownPropertyLine as N, useAngleConverters as O, PropertiesServiceIdentity as P, MakeTeachingMoment as Q, MakeDialogTeachingMoment as R, SwitchPropertyLine as S, ToolsServiceIdentity as T, InterceptFunction as U, GetPropertyDescriptor as V, IsPropertyReadonly as W, InterceptProperty as X, ObservableCollection as Y, ConstructorFactory as Z, SceneContextIdentity as _, SyncedSliderPropertyLine as a, SelectionServiceDefinition as a0, SettingsContextIdentity as a1, ShowInspector as a2, AccordionSection as a3, Accordion as a4, Button as a5, Checkbox as a6, ColorPickerPopup as a7, InputHexField as a8, InputHsvField as a9, CheckboxPropertyLine as aA, Color3PropertyLine as aB, Color4PropertyLine as aC, HexPropertyLine as aD, TextInputPropertyLine as aE, NumberInputPropertyLine as aF, LinkPropertyLine as aG, PropertyLine as aH, LineContainer as aI, PlaceholderPropertyLine as aJ, SpinButtonPropertyLine as aK, StringifiedPropertyLine as aL, TextAreaPropertyLine as aM, TextPropertyLine as aN, RotationVectorPropertyLine as aO, QuaternionPropertyLine as aP, Vector2PropertyLine as aQ, Vector3PropertyLine as aR, Vector4PropertyLine as aS, ComboBox as aa, DraggableLine as ab, Dropdown as ac, NumberDropdown as ad, StringDropdown as ae, FactorGradientComponent as af, Color3GradientComponent as ag, Color4GradientComponent as ah, ColorStepGradientComponent as ai, InfoLabel as aj, List as ak, MessageBar as al, PositionedPopover as am, SearchBar as an, SearchBox as ao, SpinButton as ap, Switch as aq, SyncedSliderInput as ar, Textarea as as, TextInput as at, ToggleButton as au, FactorGradientList as av, Color3GradientList as aw, Color4GradientList as ax, Pane as ay, BooleanBadgePropertyLine as az, ShellServiceIdentity as b, MakePopoverTeachingMoment as c, TeachingMoment as d, SidePaneContainer as e, SceneExplorerServiceIdentity as f, SettingsServiceIdentity as g, StatsServiceIdentity as h, DetachDebugLayer as i, StringDropdownPropertyLine as j, BoundProperty as k, LinkToEntityPropertyLine as l, BuiltInsExtensionFeed as m, useProperty as n, useVector3Property as o, useColor3Property as p, useColor4Property as q, useQuaternionProperty as r, MakePropertyHook as s, useInterceptObservable as t, useExtensionManager as u, useEventfulState as v, useObservableState as w, useObservableCollection as x, useOrderedObservableCollection as y, usePollingObservable as z };
|
|
10504
|
+
//# sourceMappingURL=index-Dsv2BDui.js.map
|