@babylonjs/inspector 5.35.0 → 5.36.0
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.
@@ -53219,7 +53219,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
53219
53219
|
/* harmony import */ var _propertyGrids_renderGridPropertyGridComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./propertyGrids/renderGridPropertyGridComponent */ "../../../dev/inspector/dist/components/actionTabs/tabs/propertyGrids/renderGridPropertyGridComponent.js");
|
53220
53220
|
/* harmony import */ var core_Debug_physicsViewer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core/Debug/physicsViewer */ "core/Debug/physicsViewer");
|
53221
53221
|
/* harmony import */ var core_Debug_physicsViewer__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_Debug_physicsViewer__WEBPACK_IMPORTED_MODULE_5__);
|
53222
|
-
/* harmony import */ var core_Materials_standardMaterial__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core/Physics/physicsEngineComponent */ "core/Misc/observable");
|
53222
|
+
/* harmony import */ var core_Materials_standardMaterial__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core/Physics/v1/physicsEngineComponent */ "core/Misc/observable");
|
53223
53223
|
/* harmony import */ var core_Materials_standardMaterial__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_Materials_standardMaterial__WEBPACK_IMPORTED_MODULE_6__);
|
53224
53224
|
|
53225
53225
|
|
@@ -53229,6 +53229,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
53229
53229
|
|
53230
53230
|
|
53231
53231
|
|
53232
|
+
|
53233
|
+
|
53232
53234
|
class DebugTabComponent extends _paneComponent__WEBPACK_IMPORTED_MODULE_1__.PaneComponent {
|
53233
53235
|
constructor(props) {
|
53234
53236
|
super(props);
|
@@ -54115,11 +54117,13 @@ class AnimationGroupGridComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
54115
54117
|
super(props);
|
54116
54118
|
const animationGroup = this.props.animationGroup;
|
54117
54119
|
this.state = { playButtonText: animationGroup.isPlaying ? "Pause" : "Play", currentFrame: 0 };
|
54120
|
+
this._timelineRef = react__WEBPACK_IMPORTED_MODULE_1__.createRef();
|
54121
|
+
}
|
54122
|
+
componentDidMount() {
|
54118
54123
|
this.connect(this.props.animationGroup);
|
54119
54124
|
this._onBeforeRenderObserver = this.props.scene.onBeforeRenderObservable.add(() => {
|
54120
54125
|
this.updateCurrentFrame(this.props.animationGroup);
|
54121
54126
|
});
|
54122
|
-
this._timelineRef = react__WEBPACK_IMPORTED_MODULE_1__.createRef();
|
54123
54127
|
}
|
54124
54128
|
disconnect(animationGroup) {
|
54125
54129
|
if (this._onAnimationGroupPlayObserver) {
|
@@ -54143,9 +54147,9 @@ class AnimationGroupGridComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
54143
54147
|
updateCurrentFrame(animationGroup) {
|
54144
54148
|
const targetedAnimations = animationGroup.targetedAnimations;
|
54145
54149
|
if (targetedAnimations.length > 0) {
|
54146
|
-
const
|
54147
|
-
if (
|
54148
|
-
this.setState({ currentFrame:
|
54150
|
+
const runtimeAnimation = targetedAnimations[0].animation.runtimeAnimations.find((rA) => rA.target === targetedAnimations[0].target);
|
54151
|
+
if (runtimeAnimation) {
|
54152
|
+
this.setState({ currentFrame: runtimeAnimation.currentFrame });
|
54149
54153
|
}
|
54150
54154
|
else {
|
54151
54155
|
this.setState({ currentFrame: 0 });
|
@@ -54174,7 +54178,6 @@ class AnimationGroupGridComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
54174
54178
|
}
|
54175
54179
|
else {
|
54176
54180
|
this.setState({ playButtonText: "Pause" });
|
54177
|
-
this.props.scene.animationGroups.forEach((grp) => grp.pause());
|
54178
54181
|
animationGroup.play(true);
|
54179
54182
|
}
|
54180
54183
|
}
|
@@ -58378,6 +58381,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
58378
58381
|
class TargetedAnimationGridComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
58379
58382
|
constructor(props) {
|
58380
58383
|
super(props);
|
58384
|
+
this.findAnimationGroup = () => {
|
58385
|
+
this._animationGroup = this.props.scene.animationGroups.find((ag) => {
|
58386
|
+
const ta = ag.targetedAnimations.find((ta) => ta === this.props.targetedAnimation);
|
58387
|
+
return ta !== undefined;
|
58388
|
+
});
|
58389
|
+
};
|
58381
58390
|
this.playOrPause = () => {
|
58382
58391
|
if (this._animationGroup) {
|
58383
58392
|
if (this._animationGroup.isPlaying) {
|
@@ -58402,15 +58411,10 @@ class TargetedAnimationGridComponent extends react__WEBPACK_IMPORTED_MODULE_1__.
|
|
58402
58411
|
}
|
58403
58412
|
}
|
58404
58413
|
};
|
58405
|
-
this.
|
58406
|
-
|
58407
|
-
|
58408
|
-
|
58409
|
-
}
|
58410
|
-
render() {
|
58411
|
-
const targetedAnimation = this.props.targetedAnimation;
|
58412
|
-
if (!this._animationCurveEditorContext) {
|
58413
|
-
this._animationCurveEditorContext = new _curveEditor_context__WEBPACK_IMPORTED_MODULE_7__.Context();
|
58414
|
+
this.updateContextFromProps = () => {
|
58415
|
+
if (!this._animationCurveEditorContext) {
|
58416
|
+
this._animationCurveEditorContext = new _curveEditor_context__WEBPACK_IMPORTED_MODULE_7__.Context();
|
58417
|
+
}
|
58414
58418
|
this._animationCurveEditorContext.title = this.props.targetedAnimation.target.name || "";
|
58415
58419
|
this._animationCurveEditorContext.animations = [this.props.targetedAnimation.animation];
|
58416
58420
|
this._animationCurveEditorContext.target = this.props.targetedAnimation.target;
|
@@ -58418,8 +58422,21 @@ class TargetedAnimationGridComponent extends react__WEBPACK_IMPORTED_MODULE_1__.
|
|
58418
58422
|
if (this._animationGroup) {
|
58419
58423
|
this._animationCurveEditorContext.rootAnimationGroup = this._animationGroup;
|
58420
58424
|
}
|
58425
|
+
};
|
58426
|
+
}
|
58427
|
+
componentDidMount() {
|
58428
|
+
this.findAnimationGroup();
|
58429
|
+
this.updateContextFromProps();
|
58430
|
+
}
|
58431
|
+
componentDidUpdate(prevProps, prevState, snapshot) {
|
58432
|
+
if (prevProps.targetedAnimation !== this.props.targetedAnimation) {
|
58433
|
+
this.findAnimationGroup();
|
58434
|
+
this.updateContextFromProps();
|
58421
58435
|
}
|
58422
|
-
|
58436
|
+
}
|
58437
|
+
render() {
|
58438
|
+
const targetedAnimation = this.props.targetedAnimation;
|
58439
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "pane", children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(shared_ui_components_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_3__.LineContainerComponent, { title: "GENERAL", selection: this.props.globalState, children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_4__.TextLineComponent, { label: "Class", value: targetedAnimation.getClassName() }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_5__.TextInputLineComponent, { lockObject: this.props.lockObject, label: "Name", target: targetedAnimation.animation, propertyName: "name", onPropertyChangedObservable: this.props.onPropertyChangedObservable }), targetedAnimation.target.name && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_4__.TextLineComponent, { label: "Target", value: targetedAnimation.target.name, onLink: () => this.props.globalState.onSelectionChangedObservable.notifyObservers(targetedAnimation) })), this._animationCurveEditorContext && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_curveEditor_animationCurveEditorComponent__WEBPACK_IMPORTED_MODULE_6__.AnimationCurveEditorComponent, { globalState: this.props.globalState, context: this._animationCurveEditorContext }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_2__.ButtonLineComponent, { label: "Dispose", onClick: this.deleteAnimation })] }) }));
|
58423
58440
|
}
|
58424
58441
|
}
|
58425
58442
|
|
@@ -61823,6 +61840,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
61823
61840
|
|
61824
61841
|
|
61825
61842
|
|
61843
|
+
|
61844
|
+
|
61826
61845
|
|
61827
61846
|
|
61828
61847
|
|
@@ -63703,7 +63722,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
63703
63722
|
/* harmony export */ });
|
63704
63723
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
63705
63724
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
63706
|
-
/* harmony import */ var core_Misc_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/Physics/physicsEngineComponent */ "core/Misc/observable");
|
63725
|
+
/* harmony import */ var core_Misc_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/Physics/v1/physicsEngineComponent */ "core/Misc/observable");
|
63707
63726
|
/* harmony import */ var core_Misc_observable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_Misc_observable__WEBPACK_IMPORTED_MODULE_2__);
|
63708
63727
|
/* harmony import */ var shared_ui_components_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! shared-ui-components/lines/lineContainerComponent */ "../../../dev/sharedUiComponents/dist/lines/lineContainerComponent.js");
|
63709
63728
|
/* harmony import */ var shared_ui_components_lines_radioLineComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! shared-ui-components/lines/radioLineComponent */ "../../../dev/sharedUiComponents/dist/lines/radioLineComponent.js");
|
@@ -63736,6 +63755,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
63736
63755
|
|
63737
63756
|
|
63738
63757
|
|
63758
|
+
|
63759
|
+
|
63739
63760
|
|
63740
63761
|
|
63741
63762
|
class ScenePropertyGridComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
@@ -71299,6 +71320,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
71299
71320
|
|
71300
71321
|
|
71301
71322
|
|
71323
|
+
let throttleTimerId = -1;
|
71302
71324
|
class TextInputLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
71303
71325
|
constructor(props) {
|
71304
71326
|
super(props);
|
@@ -71394,7 +71416,17 @@ class TextInputLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Componen
|
|
71394
71416
|
if (this.props.propertyName && !this.props.delayInput) {
|
71395
71417
|
this.props.target[this.props.propertyName] = value;
|
71396
71418
|
}
|
71397
|
-
this.
|
71419
|
+
if (this.props.throttlePropertyChangedNotification) {
|
71420
|
+
if (throttleTimerId >= 0) {
|
71421
|
+
window.clearTimeout(throttleTimerId);
|
71422
|
+
}
|
71423
|
+
throttleTimerId = window.setTimeout(() => {
|
71424
|
+
this.raiseOnPropertyChanged(value, store);
|
71425
|
+
}, this.props.throttlePropertyChangedNotificationDelay ?? 200);
|
71426
|
+
}
|
71427
|
+
else {
|
71428
|
+
this.raiseOnPropertyChanged(value, store);
|
71429
|
+
}
|
71398
71430
|
}
|
71399
71431
|
incrementValue(amount) {
|
71400
71432
|
if (this.props.step) {
|