babylonjs-node-editor 7.23.1 → 7.25.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.
- package/babylon.nodeEditor.d.ts +48 -0
- package/babylon.nodeEditor.js +1 -1
- package/babylon.nodeEditor.js.map +1 -1
- package/babylon.nodeEditor.max.js +2894 -11
- package/babylon.nodeEditor.module.d.ts +100 -1
- package/package.json +3 -3
|
@@ -57,10 +57,57 @@ export class NodeEditor {
|
|
|
57
57
|
declare module "babylonjs-node-editor/index" {
|
|
58
58
|
export * from "babylonjs-node-editor/nodeEditor";
|
|
59
59
|
|
|
60
|
+
}
|
|
61
|
+
declare module "babylonjs-node-editor/historyStack" {
|
|
62
|
+
import { GlobalState } from "babylonjs-node-editor/globalState";
|
|
63
|
+
import { IDisposable } from "babylonjs/scene";
|
|
64
|
+
/**
|
|
65
|
+
* Class handling undo / redo operations
|
|
66
|
+
*/
|
|
67
|
+
export class HistoryStack implements IDisposable {
|
|
68
|
+
/**
|
|
69
|
+
* Url to use to load the fflate library (for zip decompression)
|
|
70
|
+
*/
|
|
71
|
+
private _onUpdateRequiredObserver;
|
|
72
|
+
private _onClearUndoStackObserver;
|
|
73
|
+
private _onRebuildRequiredObserver;
|
|
74
|
+
private _onNodeMovedObserver;
|
|
75
|
+
private _onNodeAddedObserver;
|
|
76
|
+
private _globalState;
|
|
77
|
+
private _nodeMaterial;
|
|
78
|
+
private _history;
|
|
79
|
+
private _redoStack;
|
|
80
|
+
private readonly _maxHistoryLength;
|
|
81
|
+
private _locked;
|
|
82
|
+
/**
|
|
83
|
+
* Constructor
|
|
84
|
+
* @param globalState defines the hosting global state
|
|
85
|
+
*/
|
|
86
|
+
constructor(globalState: GlobalState);
|
|
87
|
+
/**
|
|
88
|
+
* Resets the stack
|
|
89
|
+
*/
|
|
90
|
+
reset(): void;
|
|
91
|
+
private _compress;
|
|
92
|
+
private _decompress;
|
|
93
|
+
private _store;
|
|
94
|
+
/**
|
|
95
|
+
* Undo the latest operation
|
|
96
|
+
*/
|
|
97
|
+
undo(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Redo the latest undo operation
|
|
100
|
+
*/
|
|
101
|
+
redo(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Disposes the stack
|
|
104
|
+
*/
|
|
105
|
+
dispose(): void;
|
|
106
|
+
}
|
|
107
|
+
|
|
60
108
|
}
|
|
61
109
|
declare module "babylonjs-node-editor/graphEditor" {
|
|
62
110
|
import * as React from "react";
|
|
63
|
-
import { GlobalState } from "babylonjs-node-editor/globalState";
|
|
64
111
|
import { NodeMaterialBlock } from "babylonjs/Materials/Node/nodeMaterialBlock";
|
|
65
112
|
import { Nullable } from "babylonjs/types";
|
|
66
113
|
import { IInspectorOptions } from "babylonjs/Debug/debugLayer";
|
|
@@ -68,6 +115,7 @@ import "babylonjs-node-editor/main.scss";
|
|
|
68
115
|
import { GraphNode } from "babylonjs-node-editor/nodeGraphSystem/graphNode";
|
|
69
116
|
import { IEditorData } from "babylonjs-node-editor/nodeGraphSystem/interfaces/nodeLocationInfo";
|
|
70
117
|
import { INodeData } from "babylonjs-node-editor/nodeGraphSystem/interfaces/nodeData";
|
|
118
|
+
import { GlobalState } from "babylonjs-node-editor/globalState";
|
|
71
119
|
interface IGraphEditorProps {
|
|
72
120
|
globalState: GlobalState;
|
|
73
121
|
}
|
|
@@ -92,6 +140,7 @@ export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditor
|
|
|
92
140
|
private _moveInProgress;
|
|
93
141
|
private _leftWidth;
|
|
94
142
|
private _rightWidth;
|
|
143
|
+
private _historyStack;
|
|
95
144
|
private _previewManager;
|
|
96
145
|
private _mouseLocationX;
|
|
97
146
|
private _mouseLocationY;
|
|
@@ -151,6 +200,7 @@ export class GlobalState {
|
|
|
151
200
|
stateManager: StateManager;
|
|
152
201
|
onBuiltObservable: Observable<void>;
|
|
153
202
|
onResetRequiredObservable: Observable<boolean>;
|
|
203
|
+
onClearUndoStack: Observable<void>;
|
|
154
204
|
onZoomToFitRequiredObservable: Observable<void>;
|
|
155
205
|
onReOrganizedRequiredObservable: Observable<void>;
|
|
156
206
|
onLogRequiredObservable: Observable<LogEntry>;
|
|
@@ -1812,6 +1862,7 @@ export class StateManager {
|
|
|
1812
1862
|
onCandidatePortSelectedObservable: Observable<Nullable<FrameNodePort | NodePort>>;
|
|
1813
1863
|
onNewNodeCreatedObservable: Observable<GraphNode>;
|
|
1814
1864
|
onRebuildRequiredObservable: Observable<void>;
|
|
1865
|
+
onNodeMovedObservable: Observable<GraphNode>;
|
|
1815
1866
|
onErrorMessageDialogRequiredObservable: Observable<string>;
|
|
1816
1867
|
onExposePortOnFrameObservable: Observable<GraphNode>;
|
|
1817
1868
|
onGridSizeChanged: Observable<void>;
|
|
@@ -4550,6 +4601,51 @@ declare module BABYLON.NodeEditor {
|
|
|
4550
4601
|
|
|
4551
4602
|
|
|
4552
4603
|
|
|
4604
|
+
/**
|
|
4605
|
+
* Class handling undo / redo operations
|
|
4606
|
+
*/
|
|
4607
|
+
export class HistoryStack implements BABYLON.IDisposable {
|
|
4608
|
+
/**
|
|
4609
|
+
* Url to use to load the fflate library (for zip decompression)
|
|
4610
|
+
*/
|
|
4611
|
+
private _onUpdateRequiredObserver;
|
|
4612
|
+
private _onClearUndoStackObserver;
|
|
4613
|
+
private _onRebuildRequiredObserver;
|
|
4614
|
+
private _onNodeMovedObserver;
|
|
4615
|
+
private _onNodeAddedObserver;
|
|
4616
|
+
private _globalState;
|
|
4617
|
+
private _nodeMaterial;
|
|
4618
|
+
private _history;
|
|
4619
|
+
private _redoStack;
|
|
4620
|
+
private readonly _maxHistoryLength;
|
|
4621
|
+
private _locked;
|
|
4622
|
+
/**
|
|
4623
|
+
* Constructor
|
|
4624
|
+
* @param globalState defines the hosting global state
|
|
4625
|
+
*/
|
|
4626
|
+
constructor(globalState: GlobalState);
|
|
4627
|
+
/**
|
|
4628
|
+
* Resets the stack
|
|
4629
|
+
*/
|
|
4630
|
+
reset(): void;
|
|
4631
|
+
private _compress;
|
|
4632
|
+
private _decompress;
|
|
4633
|
+
private _store;
|
|
4634
|
+
/**
|
|
4635
|
+
* Undo the latest operation
|
|
4636
|
+
*/
|
|
4637
|
+
undo(): void;
|
|
4638
|
+
/**
|
|
4639
|
+
* Redo the latest undo operation
|
|
4640
|
+
*/
|
|
4641
|
+
redo(): void;
|
|
4642
|
+
/**
|
|
4643
|
+
* Disposes the stack
|
|
4644
|
+
*/
|
|
4645
|
+
dispose(): void;
|
|
4646
|
+
}
|
|
4647
|
+
|
|
4648
|
+
|
|
4553
4649
|
interface IGraphEditorProps {
|
|
4554
4650
|
globalState: GlobalState;
|
|
4555
4651
|
}
|
|
@@ -4574,6 +4670,7 @@ declare module BABYLON.NodeEditor {
|
|
|
4574
4670
|
private _moveInProgress;
|
|
4575
4671
|
private _leftWidth;
|
|
4576
4672
|
private _rightWidth;
|
|
4673
|
+
private _historyStack;
|
|
4577
4674
|
private _previewManager;
|
|
4578
4675
|
private _mouseLocationX;
|
|
4579
4676
|
private _mouseLocationY;
|
|
@@ -4618,6 +4715,7 @@ declare module BABYLON.NodeEditor {
|
|
|
4618
4715
|
stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager;
|
|
4619
4716
|
onBuiltObservable: BABYLON.Observable<void>;
|
|
4620
4717
|
onResetRequiredObservable: BABYLON.Observable<boolean>;
|
|
4718
|
+
onClearUndoStack: BABYLON.Observable<void>;
|
|
4621
4719
|
onZoomToFitRequiredObservable: BABYLON.Observable<void>;
|
|
4622
4720
|
onReOrganizedRequiredObservable: BABYLON.Observable<void>;
|
|
4623
4721
|
onLogRequiredObservable: BABYLON.Observable<LogEntry>;
|
|
@@ -5934,6 +6032,7 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
|
|
|
5934
6032
|
onCandidatePortSelectedObservable: BABYLON.Observable<BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.FrameNodePort | BABYLON.NodeEditor.SharedUIComponents.NodePort>>;
|
|
5935
6033
|
onNewNodeCreatedObservable: BABYLON.Observable<BABYLON.NodeEditor.SharedUIComponents.GraphNode>;
|
|
5936
6034
|
onRebuildRequiredObservable: BABYLON.Observable<void>;
|
|
6035
|
+
onNodeMovedObservable: BABYLON.Observable<BABYLON.NodeEditor.SharedUIComponents.GraphNode>;
|
|
5937
6036
|
onErrorMessageDialogRequiredObservable: BABYLON.Observable<string>;
|
|
5938
6037
|
onExposePortOnFrameObservable: BABYLON.Observable<BABYLON.NodeEditor.SharedUIComponents.GraphNode>;
|
|
5939
6038
|
onGridSizeChanged: BABYLON.Observable<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-node-editor",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.25.0",
|
|
4
4
|
"main": "babylon.nodeEditor.js",
|
|
5
5
|
"types": "babylon.nodeEditor.module.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"build:dev": "webpack --env development",
|
|
12
12
|
"build:prod": "webpack --env production",
|
|
13
13
|
"build:declaration": "build-tools -c pud --config ./config.json",
|
|
14
|
-
"clean": "rimraf dist && rimraf babylon*.*"
|
|
14
|
+
"clean": "rimraf dist && rimraf babylon*.* -g"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"babylonjs": "^7.
|
|
17
|
+
"babylonjs": "^7.25.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@dev/build-tools": "1.0.0",
|