|
@@ -4,6 +4,8 @@ import { GlobalState } from '../../globalState';
|
|
import { LineContainerComponent } from '../../sharedComponents/lineContainerComponent';
|
|
import { LineContainerComponent } from '../../sharedComponents/lineContainerComponent';
|
|
import { DraggableLineComponent } from '../../sharedComponents/draggableLineComponent';
|
|
import { DraggableLineComponent } from '../../sharedComponents/draggableLineComponent';
|
|
import { NodeMaterialModes } from 'babylonjs/Materials/Node/Enums/nodeMaterialModes';
|
|
import { NodeMaterialModes } from 'babylonjs/Materials/Node/Enums/nodeMaterialModes';
|
|
|
|
+import { Observer } from 'babylonjs/Misc/observable';
|
|
|
|
+import { Nullable } from 'babylonjs/types';
|
|
|
|
|
|
require("./nodeList.scss");
|
|
require("./nodeList.scss");
|
|
|
|
|
|
@@ -13,6 +15,8 @@ interface INodeListComponentProps {
|
|
|
|
|
|
export class NodeListComponent extends React.Component<INodeListComponentProps, {filter: string}> {
|
|
export class NodeListComponent extends React.Component<INodeListComponentProps, {filter: string}> {
|
|
|
|
|
|
|
|
+ private _onResetRequiredObserver: Nullable<Observer<void>>;
|
|
|
|
+
|
|
private static _Tooltips: {[key: string]: string} = {
|
|
private static _Tooltips: {[key: string]: string} = {
|
|
"BonesBlock": "Provides a world matrix for each vertex, based on skeletal (bone/joint) animation",
|
|
"BonesBlock": "Provides a world matrix for each vertex, based on skeletal (bone/joint) animation",
|
|
"MorphTargetsBlock": "Provides the final positions, normals, tangents, and uvs based on morph targets in a mesh",
|
|
"MorphTargetsBlock": "Provides the final positions, normals, tangents, and uvs based on morph targets in a mesh",
|
|
@@ -135,23 +139,18 @@ export class NodeListComponent extends React.Component<INodeListComponentProps,
|
|
super(props);
|
|
super(props);
|
|
|
|
|
|
this.state = { filter: "" };
|
|
this.state = { filter: "" };
|
|
- }
|
|
|
|
-
|
|
|
|
- filterContent(filter: string) {
|
|
|
|
- this.setState({ filter: filter });
|
|
|
|
- }
|
|
|
|
|
|
|
|
- eventNMERefresh() {
|
|
|
|
- this.forceUpdate();
|
|
|
|
|
|
+ this._onResetRequiredObserver = this.props.globalState.onResetRequiredObservable.add(() => {
|
|
|
|
+ this.forceUpdate();
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
- componentDidMount() {
|
|
|
|
- this.eventNMERefresh = this.eventNMERefresh.bind(this);
|
|
|
|
- window.addEventListener("nme_refresh", this.eventNMERefresh);
|
|
|
|
|
|
+ componentWillUnmount() {
|
|
|
|
+ this.props.globalState.onResetRequiredObservable.remove(this._onResetRequiredObserver);
|
|
}
|
|
}
|
|
|
|
|
|
- componentWillUnmount() {
|
|
|
|
- window.removeEventListener('nme_refresh', this.eventNMERefresh);
|
|
|
|
|
|
+ filterContent(filter: string) {
|
|
|
|
+ this.setState({ filter: filter });
|
|
}
|
|
}
|
|
|
|
|
|
render() {
|
|
render() {
|