@nice2dev/game-engine 1.0.2 → 1.0.3
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/cjs/ai/BehaviorTree.js +1215 -0
- package/dist/cjs/ai/BehaviorTree.js.map +1 -0
- package/dist/cjs/ai/StateMachine.js +783 -0
- package/dist/cjs/ai/StateMachine.js.map +1 -0
- package/dist/cjs/editor/ShaderGraph.js +1616 -0
- package/dist/cjs/editor/ShaderGraph.js.map +1 -0
- package/dist/cjs/editor/TimelineEditor.js +819 -0
- package/dist/cjs/editor/TimelineEditor.js.map +1 -0
- package/dist/cjs/export/GodotExporter.js +1102 -0
- package/dist/cjs/export/GodotExporter.js.map +1 -0
- package/dist/cjs/export/PlatformExporter.js +236 -0
- package/dist/cjs/export/PlatformExporter.js.map +1 -0
- package/dist/cjs/export/ThreeJSExporter.js +1116 -0
- package/dist/cjs/export/ThreeJSExporter.js.map +1 -0
- package/dist/cjs/export/UnityExporter.js +1193 -0
- package/dist/cjs/export/UnityExporter.js.map +1 -0
- package/dist/cjs/export/WebExporter.js +1036 -0
- package/dist/cjs/export/WebExporter.js.map +1 -0
- package/dist/cjs/export/index.js +58 -0
- package/dist/cjs/export/index.js.map +1 -0
- package/dist/cjs/import/AsepriteImporter.js +761 -0
- package/dist/cjs/import/AsepriteImporter.js.map +1 -0
- package/dist/cjs/import/DragonBonesImporter.js +499 -0
- package/dist/cjs/import/DragonBonesImporter.js.map +1 -0
- package/dist/cjs/import/GameMakerImporter.js +559 -0
- package/dist/cjs/import/GameMakerImporter.js.map +1 -0
- package/dist/cjs/import/GodotSceneImporter.js +824 -0
- package/dist/cjs/import/GodotSceneImporter.js.map +1 -0
- package/dist/cjs/import/LDtkImporter.js +481 -0
- package/dist/cjs/import/LDtkImporter.js.map +1 -0
- package/dist/cjs/import/Live2DImporter.js +553 -0
- package/dist/cjs/import/Live2DImporter.js.map +1 -0
- package/dist/cjs/import/NdgFormat.js +499 -0
- package/dist/cjs/import/NdgFormat.js.map +1 -0
- package/dist/cjs/import/OgmoImporter.js +529 -0
- package/dist/cjs/import/OgmoImporter.js.map +1 -0
- package/dist/cjs/import/RPGMakerImporter.js +520 -0
- package/dist/cjs/import/RPGMakerImporter.js.map +1 -0
- package/dist/cjs/import/SceneImporter.js +449 -0
- package/dist/cjs/import/SceneImporter.js.map +1 -0
- package/dist/cjs/import/SpineImporter.js +583 -0
- package/dist/cjs/import/SpineImporter.js.map +1 -0
- package/dist/cjs/import/SpriterImporter.js +652 -0
- package/dist/cjs/import/SpriterImporter.js.map +1 -0
- package/dist/cjs/import/TiledMapImporter.js +859 -0
- package/dist/cjs/import/TiledMapImporter.js.map +1 -0
- package/dist/cjs/import/UnitySceneImporter.js +732 -0
- package/dist/cjs/import/UnitySceneImporter.js.map +1 -0
- package/dist/cjs/import/index.js +305 -0
- package/dist/cjs/import/index.js.map +1 -0
- package/dist/cjs/index.js +201 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/scripting/GraphToAST.js +567 -0
- package/dist/cjs/scripting/GraphToAST.js.map +1 -0
- package/dist/cjs/scripting/LanguageExporter.js +321 -0
- package/dist/cjs/scripting/LanguageExporter.js.map +1 -0
- package/dist/cjs/scripting/ScriptAST.js +67 -0
- package/dist/cjs/scripting/ScriptAST.js.map +1 -0
- package/dist/cjs/scripting/VisualScripting2.js +1140 -0
- package/dist/cjs/scripting/VisualScripting2.js.map +1 -0
- package/dist/cjs/scripting/exporters/CSharpExporter.js +503 -0
- package/dist/cjs/scripting/exporters/CSharpExporter.js.map +1 -0
- package/dist/cjs/scripting/exporters/GDScriptExporter.js +452 -0
- package/dist/cjs/scripting/exporters/GDScriptExporter.js.map +1 -0
- package/dist/cjs/scripting/exporters/LuaExporter.js +457 -0
- package/dist/cjs/scripting/exporters/LuaExporter.js.map +1 -0
- package/dist/cjs/scripting/exporters/PythonExporter.js +565 -0
- package/dist/cjs/scripting/exporters/PythonExporter.js.map +1 -0
- package/dist/cjs/scripting/exporters/RustExporter.js +525 -0
- package/dist/cjs/scripting/exporters/RustExporter.js.map +1 -0
- package/dist/cjs/scripting/exporters/TypeScriptExporter.js +570 -0
- package/dist/cjs/scripting/exporters/TypeScriptExporter.js.map +1 -0
- package/dist/cjs/systems/ParticleSystem2.js +1478 -0
- package/dist/cjs/systems/ParticleSystem2.js.map +1 -0
- package/dist/esm/ai/BehaviorTree.js +1186 -0
- package/dist/esm/ai/BehaviorTree.js.map +1 -0
- package/dist/esm/ai/StateMachine.js +767 -0
- package/dist/esm/ai/StateMachine.js.map +1 -0
- package/dist/esm/editor/ShaderGraph.js +1606 -0
- package/dist/esm/editor/ShaderGraph.js.map +1 -0
- package/dist/esm/editor/TimelineEditor.js +800 -0
- package/dist/esm/editor/TimelineEditor.js.map +1 -0
- package/dist/esm/export/GodotExporter.js +1100 -0
- package/dist/esm/export/GodotExporter.js.map +1 -0
- package/dist/esm/export/PlatformExporter.js +230 -0
- package/dist/esm/export/PlatformExporter.js.map +1 -0
- package/dist/esm/export/ThreeJSExporter.js +1114 -0
- package/dist/esm/export/ThreeJSExporter.js.map +1 -0
- package/dist/esm/export/UnityExporter.js +1191 -0
- package/dist/esm/export/UnityExporter.js.map +1 -0
- package/dist/esm/export/WebExporter.js +1033 -0
- package/dist/esm/export/WebExporter.js.map +1 -0
- package/dist/esm/export/index.js +44 -0
- package/dist/esm/export/index.js.map +1 -0
- package/dist/esm/import/AsepriteImporter.js +759 -0
- package/dist/esm/import/AsepriteImporter.js.map +1 -0
- package/dist/esm/import/DragonBonesImporter.js +496 -0
- package/dist/esm/import/DragonBonesImporter.js.map +1 -0
- package/dist/esm/import/GameMakerImporter.js +556 -0
- package/dist/esm/import/GameMakerImporter.js.map +1 -0
- package/dist/esm/import/GodotSceneImporter.js +822 -0
- package/dist/esm/import/GodotSceneImporter.js.map +1 -0
- package/dist/esm/import/LDtkImporter.js +479 -0
- package/dist/esm/import/LDtkImporter.js.map +1 -0
- package/dist/esm/import/Live2DImporter.js +550 -0
- package/dist/esm/import/Live2DImporter.js.map +1 -0
- package/dist/esm/import/NdgFormat.js +490 -0
- package/dist/esm/import/NdgFormat.js.map +1 -0
- package/dist/esm/import/OgmoImporter.js +526 -0
- package/dist/esm/import/OgmoImporter.js.map +1 -0
- package/dist/esm/import/RPGMakerImporter.js +517 -0
- package/dist/esm/import/RPGMakerImporter.js.map +1 -0
- package/dist/esm/import/SceneImporter.js +441 -0
- package/dist/esm/import/SceneImporter.js.map +1 -0
- package/dist/esm/import/SpineImporter.js +580 -0
- package/dist/esm/import/SpineImporter.js.map +1 -0
- package/dist/esm/import/SpriterImporter.js +649 -0
- package/dist/esm/import/SpriterImporter.js.map +1 -0
- package/dist/esm/import/TiledMapImporter.js +857 -0
- package/dist/esm/import/TiledMapImporter.js.map +1 -0
- package/dist/esm/import/UnitySceneImporter.js +730 -0
- package/dist/esm/import/UnitySceneImporter.js.map +1 -0
- package/dist/esm/import/index.js +279 -0
- package/dist/esm/import/index.js.map +1 -0
- package/dist/esm/index.js +36 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/scripting/GraphToAST.js +564 -0
- package/dist/esm/scripting/GraphToAST.js.map +1 -0
- package/dist/esm/scripting/LanguageExporter.js +311 -0
- package/dist/esm/scripting/LanguageExporter.js.map +1 -0
- package/dist/esm/scripting/ScriptAST.js +52 -0
- package/dist/esm/scripting/ScriptAST.js.map +1 -0
- package/dist/esm/scripting/VisualScripting2.js +1130 -0
- package/dist/esm/scripting/VisualScripting2.js.map +1 -0
- package/dist/esm/scripting/exporters/CSharpExporter.js +501 -0
- package/dist/esm/scripting/exporters/CSharpExporter.js.map +1 -0
- package/dist/esm/scripting/exporters/GDScriptExporter.js +450 -0
- package/dist/esm/scripting/exporters/GDScriptExporter.js.map +1 -0
- package/dist/esm/scripting/exporters/LuaExporter.js +455 -0
- package/dist/esm/scripting/exporters/LuaExporter.js.map +1 -0
- package/dist/esm/scripting/exporters/PythonExporter.js +563 -0
- package/dist/esm/scripting/exporters/PythonExporter.js.map +1 -0
- package/dist/esm/scripting/exporters/RustExporter.js +523 -0
- package/dist/esm/scripting/exporters/RustExporter.js.map +1 -0
- package/dist/esm/scripting/exporters/TypeScriptExporter.js +568 -0
- package/dist/esm/scripting/exporters/TypeScriptExporter.js.map +1 -0
- package/dist/esm/systems/ParticleSystem2.js +1471 -0
- package/dist/esm/systems/ParticleSystem2.js.map +1 -0
- package/dist/types/ai/BehaviorTree.d.ts +375 -0
- package/dist/types/ai/StateMachine.d.ts +296 -0
- package/dist/types/editor/ShaderGraph.d.ts +207 -0
- package/dist/types/editor/TimelineEditor.d.ts +393 -0
- package/dist/types/export/GodotExporter.d.ts +56 -0
- package/dist/types/export/PlatformExporter.d.ts +201 -0
- package/dist/types/export/ThreeJSExporter.d.ts +40 -0
- package/dist/types/export/UnityExporter.d.ts +69 -0
- package/dist/types/export/WebExporter.d.ts +58 -0
- package/dist/types/export/index.d.ts +19 -0
- package/dist/types/import/AsepriteImporter.d.ts +46 -0
- package/dist/types/import/DragonBonesImporter.d.ts +331 -0
- package/dist/types/import/GameMakerImporter.d.ts +375 -0
- package/dist/types/import/GodotSceneImporter.d.ts +34 -0
- package/dist/types/import/LDtkImporter.d.ts +177 -0
- package/dist/types/import/Live2DImporter.d.ts +237 -0
- package/dist/types/import/NdgFormat.d.ts +387 -0
- package/dist/types/import/OgmoImporter.d.ts +237 -0
- package/dist/types/import/RPGMakerImporter.d.ts +186 -0
- package/dist/types/import/SceneImporter.d.ts +276 -0
- package/dist/types/import/SpineImporter.d.ts +372 -0
- package/dist/types/import/SpriterImporter.d.ts +230 -0
- package/dist/types/import/TiledMapImporter.d.ts +57 -0
- package/dist/types/import/UnitySceneImporter.d.ts +87 -0
- package/dist/types/import/index.d.ts +59 -0
- package/dist/types/index.d.ts +29 -17
- package/dist/types/scripting/GraphToAST.d.ts +55 -0
- package/dist/types/scripting/LanguageExporter.d.ts +136 -0
- package/dist/types/scripting/ScriptAST.d.ts +312 -0
- package/dist/types/scripting/VisualScripting2.d.ts +353 -0
- package/dist/types/scripting/exporters/CSharpExporter.d.ts +44 -0
- package/dist/types/scripting/exporters/GDScriptExporter.d.ts +46 -0
- package/dist/types/scripting/exporters/LuaExporter.d.ts +46 -0
- package/dist/types/scripting/exporters/PythonExporter.d.ts +49 -0
- package/dist/types/scripting/exporters/RustExporter.d.ts +46 -0
- package/dist/types/scripting/exporters/TypeScriptExporter.d.ts +48 -0
- package/dist/types/scripting/exporters/index.d.ts +8 -0
- package/dist/types/scripting/index.d.ts +11 -0
- package/dist/types/systems/ParticleSystem2.d.ts +646 -0
- package/package.json +2 -2
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
export type ASTDataType = 'void' | 'bool' | 'int' | 'float' | 'string' | 'vector2' | 'vector3' | 'color' | 'entity' | 'array' | 'dictionary' | 'any' | 'custom';
|
|
2
|
+
export interface ASTTypeInfo {
|
|
3
|
+
type: ASTDataType;
|
|
4
|
+
/** For array/dictionary/custom types */
|
|
5
|
+
genericArgs?: ASTTypeInfo[];
|
|
6
|
+
/** Custom type name for 'custom' type */
|
|
7
|
+
customName?: string;
|
|
8
|
+
/** Whether the type is nullable */
|
|
9
|
+
nullable?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export type ASTExpression = ASTLiteral | ASTIdentifier | ASTBinaryOp | ASTUnaryOp | ASTCall | ASTMethodCall | ASTPropertyAccess | ASTIndexAccess | ASTConditional | ASTArrayLiteral | ASTDictionaryLiteral | ASTCast | ASTLambda | ASTNew;
|
|
12
|
+
export interface ASTNodeBase {
|
|
13
|
+
kind: string;
|
|
14
|
+
/** Source node ID for debugging/mapping */
|
|
15
|
+
sourceNodeId?: string;
|
|
16
|
+
/** Line comment to emit */
|
|
17
|
+
comment?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ASTLiteral extends ASTNodeBase {
|
|
20
|
+
kind: 'literal';
|
|
21
|
+
valueType: ASTDataType;
|
|
22
|
+
value: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface ASTIdentifier extends ASTNodeBase {
|
|
25
|
+
kind: 'identifier';
|
|
26
|
+
name: string;
|
|
27
|
+
dataType?: ASTTypeInfo;
|
|
28
|
+
}
|
|
29
|
+
export interface ASTBinaryOp extends ASTNodeBase {
|
|
30
|
+
kind: 'binaryOp';
|
|
31
|
+
operator: '+' | '-' | '*' | '/' | '%' | '==' | '!=' | '<' | '>' | '<=' | '>=' | '&&' | '||' | '&' | '|' | '^' | '<<' | '>>';
|
|
32
|
+
left: ASTExpression;
|
|
33
|
+
right: ASTExpression;
|
|
34
|
+
}
|
|
35
|
+
export interface ASTUnaryOp extends ASTNodeBase {
|
|
36
|
+
kind: 'unaryOp';
|
|
37
|
+
operator: '!' | '-' | '~' | '++' | '--';
|
|
38
|
+
operand: ASTExpression;
|
|
39
|
+
prefix: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface ASTCall extends ASTNodeBase {
|
|
42
|
+
kind: 'call';
|
|
43
|
+
callee: string;
|
|
44
|
+
args: ASTExpression[];
|
|
45
|
+
/** Generic type arguments for the call */
|
|
46
|
+
typeArgs?: ASTTypeInfo[];
|
|
47
|
+
}
|
|
48
|
+
export interface ASTMethodCall extends ASTNodeBase {
|
|
49
|
+
kind: 'methodCall';
|
|
50
|
+
object: ASTExpression;
|
|
51
|
+
method: string;
|
|
52
|
+
args: ASTExpression[];
|
|
53
|
+
}
|
|
54
|
+
export interface ASTPropertyAccess extends ASTNodeBase {
|
|
55
|
+
kind: 'propertyAccess';
|
|
56
|
+
object: ASTExpression;
|
|
57
|
+
property: string;
|
|
58
|
+
}
|
|
59
|
+
export interface ASTIndexAccess extends ASTNodeBase {
|
|
60
|
+
kind: 'indexAccess';
|
|
61
|
+
object: ASTExpression;
|
|
62
|
+
index: ASTExpression;
|
|
63
|
+
}
|
|
64
|
+
export interface ASTConditional extends ASTNodeBase {
|
|
65
|
+
kind: 'conditional';
|
|
66
|
+
condition: ASTExpression;
|
|
67
|
+
ifTrue: ASTExpression;
|
|
68
|
+
ifFalse: ASTExpression;
|
|
69
|
+
}
|
|
70
|
+
export interface ASTArrayLiteral extends ASTNodeBase {
|
|
71
|
+
kind: 'arrayLiteral';
|
|
72
|
+
elements: ASTExpression[];
|
|
73
|
+
elementType?: ASTTypeInfo;
|
|
74
|
+
}
|
|
75
|
+
export interface ASTDictionaryLiteral extends ASTNodeBase {
|
|
76
|
+
kind: 'dictionaryLiteral';
|
|
77
|
+
entries: Array<{
|
|
78
|
+
key: ASTExpression;
|
|
79
|
+
value: ASTExpression;
|
|
80
|
+
}>;
|
|
81
|
+
}
|
|
82
|
+
export interface ASTCast extends ASTNodeBase {
|
|
83
|
+
kind: 'cast';
|
|
84
|
+
expression: ASTExpression;
|
|
85
|
+
targetType: ASTTypeInfo;
|
|
86
|
+
}
|
|
87
|
+
export interface ASTLambda extends ASTNodeBase {
|
|
88
|
+
kind: 'lambda';
|
|
89
|
+
params: ASTParameter[];
|
|
90
|
+
body: ASTStatement[] | ASTExpression;
|
|
91
|
+
returnType?: ASTTypeInfo;
|
|
92
|
+
}
|
|
93
|
+
export interface ASTNew extends ASTNodeBase {
|
|
94
|
+
kind: 'new';
|
|
95
|
+
typeName: string;
|
|
96
|
+
args: ASTExpression[];
|
|
97
|
+
}
|
|
98
|
+
export type ASTStatement = ASTVarDecl | ASTAssignment | ASTIf | ASTWhile | ASTFor | ASTForEach | ASTReturn | ASTBreak | ASTContinue | ASTExpressionStatement | ASTBlock | ASTSwitch | ASTTry | ASTYield | ASTAwait | ASTMatch | ASTSignalEmit;
|
|
99
|
+
export interface ASTVarDecl extends ASTNodeBase {
|
|
100
|
+
kind: 'varDecl';
|
|
101
|
+
name: string;
|
|
102
|
+
varType?: ASTTypeInfo;
|
|
103
|
+
initializer?: ASTExpression;
|
|
104
|
+
isConst?: boolean;
|
|
105
|
+
/** Export for Godot @export, [SerializeField] for Unity */
|
|
106
|
+
isExported?: boolean;
|
|
107
|
+
}
|
|
108
|
+
export interface ASTAssignment extends ASTNodeBase {
|
|
109
|
+
kind: 'assignment';
|
|
110
|
+
target: ASTExpression;
|
|
111
|
+
operator: '=' | '+=' | '-=' | '*=' | '/=' | '%=';
|
|
112
|
+
value: ASTExpression;
|
|
113
|
+
}
|
|
114
|
+
export interface ASTIf extends ASTNodeBase {
|
|
115
|
+
kind: 'if';
|
|
116
|
+
condition: ASTExpression;
|
|
117
|
+
thenBranch: ASTStatement[];
|
|
118
|
+
elseBranch?: ASTStatement[];
|
|
119
|
+
elseIfs?: Array<{
|
|
120
|
+
condition: ASTExpression;
|
|
121
|
+
body: ASTStatement[];
|
|
122
|
+
}>;
|
|
123
|
+
}
|
|
124
|
+
export interface ASTWhile extends ASTNodeBase {
|
|
125
|
+
kind: 'while';
|
|
126
|
+
condition: ASTExpression;
|
|
127
|
+
body: ASTStatement[];
|
|
128
|
+
}
|
|
129
|
+
export interface ASTFor extends ASTNodeBase {
|
|
130
|
+
kind: 'for';
|
|
131
|
+
init?: ASTStatement;
|
|
132
|
+
condition?: ASTExpression;
|
|
133
|
+
update?: ASTExpression;
|
|
134
|
+
body: ASTStatement[];
|
|
135
|
+
}
|
|
136
|
+
export interface ASTForEach extends ASTNodeBase {
|
|
137
|
+
kind: 'forEach';
|
|
138
|
+
variable: string;
|
|
139
|
+
iterable: ASTExpression;
|
|
140
|
+
body: ASTStatement[];
|
|
141
|
+
}
|
|
142
|
+
export interface ASTReturn extends ASTNodeBase {
|
|
143
|
+
kind: 'return';
|
|
144
|
+
value?: ASTExpression;
|
|
145
|
+
}
|
|
146
|
+
export interface ASTBreak extends ASTNodeBase {
|
|
147
|
+
kind: 'break';
|
|
148
|
+
}
|
|
149
|
+
export interface ASTContinue extends ASTNodeBase {
|
|
150
|
+
kind: 'continue';
|
|
151
|
+
}
|
|
152
|
+
export interface ASTExpressionStatement extends ASTNodeBase {
|
|
153
|
+
kind: 'expressionStatement';
|
|
154
|
+
expression: ASTExpression;
|
|
155
|
+
}
|
|
156
|
+
export interface ASTBlock extends ASTNodeBase {
|
|
157
|
+
kind: 'block';
|
|
158
|
+
statements: ASTStatement[];
|
|
159
|
+
}
|
|
160
|
+
export interface ASTSwitch extends ASTNodeBase {
|
|
161
|
+
kind: 'switch';
|
|
162
|
+
expression: ASTExpression;
|
|
163
|
+
cases: Array<{
|
|
164
|
+
value: ASTExpression;
|
|
165
|
+
body: ASTStatement[];
|
|
166
|
+
}>;
|
|
167
|
+
defaultCase?: ASTStatement[];
|
|
168
|
+
}
|
|
169
|
+
export interface ASTTry extends ASTNodeBase {
|
|
170
|
+
kind: 'try';
|
|
171
|
+
tryBlock: ASTStatement[];
|
|
172
|
+
catchBlocks?: Array<{
|
|
173
|
+
errorType?: string;
|
|
174
|
+
errorVar?: string;
|
|
175
|
+
body: ASTStatement[];
|
|
176
|
+
}>;
|
|
177
|
+
finallyBlock?: ASTStatement[];
|
|
178
|
+
}
|
|
179
|
+
export interface ASTYield extends ASTNodeBase {
|
|
180
|
+
kind: 'yield';
|
|
181
|
+
value?: ASTExpression;
|
|
182
|
+
}
|
|
183
|
+
export interface ASTAwait extends ASTNodeBase {
|
|
184
|
+
kind: 'await';
|
|
185
|
+
expression: ASTExpression;
|
|
186
|
+
}
|
|
187
|
+
export interface ASTMatch extends ASTNodeBase {
|
|
188
|
+
kind: 'match';
|
|
189
|
+
expression: ASTExpression;
|
|
190
|
+
arms: Array<{
|
|
191
|
+
pattern: ASTExpression;
|
|
192
|
+
guard?: ASTExpression;
|
|
193
|
+
body: ASTStatement[];
|
|
194
|
+
}>;
|
|
195
|
+
}
|
|
196
|
+
export interface ASTSignalEmit extends ASTNodeBase {
|
|
197
|
+
kind: 'signalEmit';
|
|
198
|
+
signalName: string;
|
|
199
|
+
args: ASTExpression[];
|
|
200
|
+
}
|
|
201
|
+
export interface ASTParameter {
|
|
202
|
+
name: string;
|
|
203
|
+
paramType: ASTTypeInfo;
|
|
204
|
+
defaultValue?: ASTExpression;
|
|
205
|
+
/** Variadic parameter (...args) */
|
|
206
|
+
isVariadic?: boolean;
|
|
207
|
+
}
|
|
208
|
+
export interface ASTFunction extends ASTNodeBase {
|
|
209
|
+
kind: 'function';
|
|
210
|
+
name: string;
|
|
211
|
+
params: ASTParameter[];
|
|
212
|
+
returnType: ASTTypeInfo;
|
|
213
|
+
body: ASTStatement[];
|
|
214
|
+
isAsync?: boolean;
|
|
215
|
+
isStatic?: boolean;
|
|
216
|
+
visibility?: 'public' | 'private' | 'protected' | 'internal';
|
|
217
|
+
/** Virtual/override for inheritance */
|
|
218
|
+
isVirtual?: boolean;
|
|
219
|
+
isOverride?: boolean;
|
|
220
|
+
isAbstract?: boolean;
|
|
221
|
+
/** Coroutine for Unity/Godot yields */
|
|
222
|
+
isCoroutine?: boolean;
|
|
223
|
+
/** Attributes/decorators */
|
|
224
|
+
attributes?: string[];
|
|
225
|
+
}
|
|
226
|
+
export interface ASTField {
|
|
227
|
+
name: string;
|
|
228
|
+
fieldType: ASTTypeInfo;
|
|
229
|
+
initializer?: ASTExpression;
|
|
230
|
+
visibility?: 'public' | 'private' | 'protected' | 'internal';
|
|
231
|
+
isStatic?: boolean;
|
|
232
|
+
isConst?: boolean;
|
|
233
|
+
isReadonly?: boolean;
|
|
234
|
+
isExported?: boolean;
|
|
235
|
+
attributes?: string[];
|
|
236
|
+
comment?: string;
|
|
237
|
+
}
|
|
238
|
+
export interface ASTProperty {
|
|
239
|
+
name: string;
|
|
240
|
+
propType: ASTTypeInfo;
|
|
241
|
+
getter?: ASTStatement[];
|
|
242
|
+
setter?: ASTStatement[];
|
|
243
|
+
visibility?: 'public' | 'private' | 'protected' | 'internal';
|
|
244
|
+
isStatic?: boolean;
|
|
245
|
+
attributes?: string[];
|
|
246
|
+
}
|
|
247
|
+
export interface ASTSignalDef {
|
|
248
|
+
name: string;
|
|
249
|
+
params: ASTParameter[];
|
|
250
|
+
}
|
|
251
|
+
export interface ASTEnumMember {
|
|
252
|
+
name: string;
|
|
253
|
+
value?: number | string;
|
|
254
|
+
}
|
|
255
|
+
export interface ASTEnum {
|
|
256
|
+
name: string;
|
|
257
|
+
members: ASTEnumMember[];
|
|
258
|
+
}
|
|
259
|
+
export interface ASTClass extends ASTNodeBase {
|
|
260
|
+
kind: 'class';
|
|
261
|
+
name: string;
|
|
262
|
+
baseClass?: string;
|
|
263
|
+
interfaces?: string[];
|
|
264
|
+
fields: ASTField[];
|
|
265
|
+
properties?: ASTProperty[];
|
|
266
|
+
methods: ASTFunction[];
|
|
267
|
+
signals?: ASTSignalDef[];
|
|
268
|
+
enums?: ASTEnum[];
|
|
269
|
+
nestedClasses?: ASTClass[];
|
|
270
|
+
isAbstract?: boolean;
|
|
271
|
+
isSealed?: boolean;
|
|
272
|
+
isPartial?: boolean;
|
|
273
|
+
attributes?: string[];
|
|
274
|
+
comment?: string;
|
|
275
|
+
}
|
|
276
|
+
export interface ASTImport {
|
|
277
|
+
module: string;
|
|
278
|
+
/** Named imports */
|
|
279
|
+
names?: string[];
|
|
280
|
+
/** Import all: import * as X */
|
|
281
|
+
alias?: string;
|
|
282
|
+
/** Default import */
|
|
283
|
+
defaultImport?: string;
|
|
284
|
+
}
|
|
285
|
+
export interface ASTScript {
|
|
286
|
+
/** Script/file name without extension */
|
|
287
|
+
name: string;
|
|
288
|
+
imports: ASTImport[];
|
|
289
|
+
classes: ASTClass[];
|
|
290
|
+
/** Top-level functions (for languages that support it) */
|
|
291
|
+
functions?: ASTFunction[];
|
|
292
|
+
/** Top-level statements (for scripting languages) */
|
|
293
|
+
topLevel?: ASTStatement[];
|
|
294
|
+
/** Module-level enums */
|
|
295
|
+
enums?: ASTEnum[];
|
|
296
|
+
/** File header comment */
|
|
297
|
+
headerComment?: string;
|
|
298
|
+
}
|
|
299
|
+
export declare function createLiteral(value: unknown, valueType?: ASTDataType): ASTLiteral;
|
|
300
|
+
export declare function createIdentifier(name: string, dataType?: ASTTypeInfo): ASTIdentifier;
|
|
301
|
+
export declare function createBinaryOp(operator: ASTBinaryOp['operator'], left: ASTExpression, right: ASTExpression): ASTBinaryOp;
|
|
302
|
+
export declare function createCall(callee: string, args: ASTExpression[]): ASTCall;
|
|
303
|
+
export declare function createMethodCall(object: ASTExpression, method: string, args: ASTExpression[]): ASTMethodCall;
|
|
304
|
+
export declare function createPropertyAccess(object: ASTExpression, property: string): ASTPropertyAccess;
|
|
305
|
+
export declare function createAssignment(target: ASTExpression, value: ASTExpression, operator?: ASTAssignment['operator']): ASTAssignment;
|
|
306
|
+
export declare function createVarDecl(name: string, varType?: ASTTypeInfo, initializer?: ASTExpression): ASTVarDecl;
|
|
307
|
+
export declare function createIf(condition: ASTExpression, thenBranch: ASTStatement[], elseBranch?: ASTStatement[]): ASTIf;
|
|
308
|
+
export declare function createReturn(value?: ASTExpression): ASTReturn;
|
|
309
|
+
export declare function createExprStatement(expression: ASTExpression): ASTExpressionStatement;
|
|
310
|
+
export declare function createType(type: ASTDataType, nullable?: boolean): ASTTypeInfo;
|
|
311
|
+
export declare function createArrayType(elementType: ASTTypeInfo): ASTTypeInfo;
|
|
312
|
+
export declare function createCustomType(name: string, nullable?: boolean): ASTTypeInfo;
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file VisualScripting2.ts
|
|
3
|
+
* @description Visual Scripting 2.0 — Node-based Scripting System with Debugger
|
|
4
|
+
* PRO-1.4: Professional Editor Features
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Node-based visual programming (like Unreal Blueprints)
|
|
8
|
+
* - Real-time debugger with breakpoints
|
|
9
|
+
* - Step-by-step execution
|
|
10
|
+
* - Watch expressions
|
|
11
|
+
* - Variable inspection
|
|
12
|
+
* - Call stack visualization
|
|
13
|
+
* - Live preview in editor
|
|
14
|
+
*/
|
|
15
|
+
import type { EntityId, Vec2 } from '../core/types';
|
|
16
|
+
import type { EventBus } from '../core/EventBus';
|
|
17
|
+
/** Extended data types for visual scripting */
|
|
18
|
+
export type VSDataType = 'flow' | 'bool' | 'int' | 'float' | 'string' | 'vec2' | 'vec3' | 'color' | 'entity' | 'component' | 'asset' | 'array' | 'map' | 'struct' | 'object' | 'enum' | 'delegate' | 'wildcard';
|
|
19
|
+
/** Type color mapping for visual identification */
|
|
20
|
+
export declare const VS_TYPE_COLORS: Record<VSDataType, string>;
|
|
21
|
+
export interface VSPort {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
direction: 'input' | 'output';
|
|
25
|
+
type: VSDataType;
|
|
26
|
+
subType?: VSDataType;
|
|
27
|
+
structDef?: string;
|
|
28
|
+
enumDef?: string;
|
|
29
|
+
defaultValue?: unknown;
|
|
30
|
+
description?: string;
|
|
31
|
+
/** Multiple connections allowed (outputs only) */
|
|
32
|
+
multi?: boolean;
|
|
33
|
+
/** Optional execution flow port */
|
|
34
|
+
optional?: boolean;
|
|
35
|
+
/** Hidden in compact mode */
|
|
36
|
+
advanced?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export type VSNodeCategory = 'event' | 'flow' | 'math' | 'logic' | 'string' | 'array' | 'entity' | 'component' | 'physics' | 'audio' | 'animation' | 'input' | 'ui' | 'time' | 'transform' | 'debug' | 'variable' | 'function' | 'macro' | 'comment' | 'reroute' | 'custom';
|
|
39
|
+
export interface VSNodeDefinition {
|
|
40
|
+
type: string;
|
|
41
|
+
name: string;
|
|
42
|
+
category: VSNodeCategory;
|
|
43
|
+
description: string;
|
|
44
|
+
keywords?: string[];
|
|
45
|
+
icon?: string;
|
|
46
|
+
color?: string;
|
|
47
|
+
ports: VSPort[];
|
|
48
|
+
/** Is this a pure node (no side effects, can be cached)? */
|
|
49
|
+
pure?: boolean;
|
|
50
|
+
/** Is this a latent node (async, takes multiple frames)? */
|
|
51
|
+
latent?: boolean;
|
|
52
|
+
/** Is this node deprecated? */
|
|
53
|
+
deprecated?: boolean;
|
|
54
|
+
/** Compact display (single-line) */
|
|
55
|
+
compact?: boolean;
|
|
56
|
+
/** Minimum required license tier */
|
|
57
|
+
licenseTier?: 'free' | 'pro' | 'enterprise';
|
|
58
|
+
/** Execute function */
|
|
59
|
+
execute: (inputs: Record<string, unknown>, context: VSExecutionContext) => Record<string, unknown> | Promise<Record<string, unknown>> | void;
|
|
60
|
+
/** Validate node configuration */
|
|
61
|
+
validate?: (node: VSNodeInstance) => VSValidationResult[];
|
|
62
|
+
/** Custom rendering callback */
|
|
63
|
+
renderCustom?: (node: VSNodeInstance, ctx: CanvasRenderingContext2D) => void;
|
|
64
|
+
}
|
|
65
|
+
export interface VSValidationResult {
|
|
66
|
+
severity: 'error' | 'warning' | 'info';
|
|
67
|
+
message: string;
|
|
68
|
+
portId?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface VSNodeInstance {
|
|
71
|
+
id: string;
|
|
72
|
+
type: string;
|
|
73
|
+
position: Vec2;
|
|
74
|
+
size?: Vec2;
|
|
75
|
+
/** Input port values (overrides defaults) */
|
|
76
|
+
inputs: Record<string, unknown>;
|
|
77
|
+
/** Cached output values */
|
|
78
|
+
outputs: Record<string, unknown>;
|
|
79
|
+
/** User comment */
|
|
80
|
+
comment?: string;
|
|
81
|
+
/** Is node collapsed? */
|
|
82
|
+
collapsed?: boolean;
|
|
83
|
+
/** Is node disabled? */
|
|
84
|
+
disabled?: boolean;
|
|
85
|
+
/** Breakpoint set on this node */
|
|
86
|
+
breakpoint?: VSBreakpoint;
|
|
87
|
+
/** Custom data for specific node types */
|
|
88
|
+
customData?: Record<string, unknown>;
|
|
89
|
+
}
|
|
90
|
+
export interface VSConnection {
|
|
91
|
+
id: string;
|
|
92
|
+
fromNode: string;
|
|
93
|
+
fromPort: string;
|
|
94
|
+
toNode: string;
|
|
95
|
+
toPort: string;
|
|
96
|
+
/** Connection style */
|
|
97
|
+
style?: 'bezier' | 'linear' | 'stepped';
|
|
98
|
+
/** Reroute points for wire organization */
|
|
99
|
+
reroutePoints?: Vec2[];
|
|
100
|
+
}
|
|
101
|
+
export interface VSVariable {
|
|
102
|
+
id: string;
|
|
103
|
+
name: string;
|
|
104
|
+
type: VSDataType;
|
|
105
|
+
subType?: VSDataType;
|
|
106
|
+
structDef?: string;
|
|
107
|
+
enumDef?: string;
|
|
108
|
+
value: unknown;
|
|
109
|
+
defaultValue: unknown;
|
|
110
|
+
/** Variable scope */
|
|
111
|
+
scope: 'local' | 'graph' | 'instance' | 'global';
|
|
112
|
+
/** Is this variable exposed to editor? */
|
|
113
|
+
exposed?: boolean;
|
|
114
|
+
/** Category for organization */
|
|
115
|
+
category?: string;
|
|
116
|
+
/** Description */
|
|
117
|
+
description?: string;
|
|
118
|
+
/** Replicated in multiplayer */
|
|
119
|
+
replicated?: boolean;
|
|
120
|
+
/** Save in game save */
|
|
121
|
+
savedGame?: boolean;
|
|
122
|
+
}
|
|
123
|
+
export interface VSFunction {
|
|
124
|
+
id: string;
|
|
125
|
+
name: string;
|
|
126
|
+
description?: string;
|
|
127
|
+
category?: string;
|
|
128
|
+
/** Input parameters */
|
|
129
|
+
inputs: VSPort[];
|
|
130
|
+
/** Output values */
|
|
131
|
+
outputs: VSPort[];
|
|
132
|
+
/** Local variables */
|
|
133
|
+
localVariables: VSVariable[];
|
|
134
|
+
/** Is this a pure function? */
|
|
135
|
+
pure?: boolean;
|
|
136
|
+
/** Function graph */
|
|
137
|
+
graph: VSGraph;
|
|
138
|
+
}
|
|
139
|
+
export interface VSMacro {
|
|
140
|
+
id: string;
|
|
141
|
+
name: string;
|
|
142
|
+
description?: string;
|
|
143
|
+
/** Input tunnels */
|
|
144
|
+
inputs: VSPort[];
|
|
145
|
+
/** Output tunnels */
|
|
146
|
+
outputs: VSPort[];
|
|
147
|
+
/** Contained graph */
|
|
148
|
+
graph: VSGraph;
|
|
149
|
+
/** Instance color */
|
|
150
|
+
color?: string;
|
|
151
|
+
}
|
|
152
|
+
export interface VSGraph {
|
|
153
|
+
id: string;
|
|
154
|
+
name: string;
|
|
155
|
+
description?: string;
|
|
156
|
+
nodes: VSNodeInstance[];
|
|
157
|
+
connections: VSConnection[];
|
|
158
|
+
variables: VSVariable[];
|
|
159
|
+
functions: VSFunction[];
|
|
160
|
+
macros: VSMacro[];
|
|
161
|
+
/** Graph-level parameters (for subgraph use) */
|
|
162
|
+
parameters: VSPort[];
|
|
163
|
+
/** Graph type */
|
|
164
|
+
graphType: 'blueprint' | 'function' | 'macro' | 'animgraph' | 'statemachine';
|
|
165
|
+
/** Parent entity/component this graph is attached to */
|
|
166
|
+
parentEntity?: EntityId;
|
|
167
|
+
parentComponent?: string;
|
|
168
|
+
/** Metadata */
|
|
169
|
+
metadata?: {
|
|
170
|
+
author?: string;
|
|
171
|
+
version?: string;
|
|
172
|
+
created?: number;
|
|
173
|
+
modified?: number;
|
|
174
|
+
tags?: string[];
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
export interface VSStructDefinition {
|
|
178
|
+
name: string;
|
|
179
|
+
description?: string;
|
|
180
|
+
fields: Array<{
|
|
181
|
+
name: string;
|
|
182
|
+
type: VSDataType;
|
|
183
|
+
defaultValue?: unknown;
|
|
184
|
+
}>;
|
|
185
|
+
}
|
|
186
|
+
export interface VSEnumDefinition {
|
|
187
|
+
name: string;
|
|
188
|
+
description?: string;
|
|
189
|
+
values: Array<{
|
|
190
|
+
name: string;
|
|
191
|
+
displayName?: string;
|
|
192
|
+
value?: number;
|
|
193
|
+
}>;
|
|
194
|
+
}
|
|
195
|
+
export interface VSExecutionContext {
|
|
196
|
+
/** Current entity */
|
|
197
|
+
entityId: EntityId | null;
|
|
198
|
+
/** Delta time */
|
|
199
|
+
dt: number;
|
|
200
|
+
/** Total elapsed time */
|
|
201
|
+
time: number;
|
|
202
|
+
/** World reference */
|
|
203
|
+
world: unknown;
|
|
204
|
+
/** Event bus */
|
|
205
|
+
events: EventBus;
|
|
206
|
+
/** Graph variables */
|
|
207
|
+
variables: Map<string, unknown>;
|
|
208
|
+
/** Global variables */
|
|
209
|
+
globals: Map<string, unknown>;
|
|
210
|
+
/** Service locator */
|
|
211
|
+
services: Map<string, unknown>;
|
|
212
|
+
/** Trigger flow output */
|
|
213
|
+
triggerFlow: (portId: string) => void;
|
|
214
|
+
/** Get component */
|
|
215
|
+
getComponent: <T>(entityId: EntityId, componentType: string) => T | null;
|
|
216
|
+
/** Set component data */
|
|
217
|
+
setComponent: (entityId: EntityId, componentType: string, data: unknown) => void;
|
|
218
|
+
/** Spawn entity */
|
|
219
|
+
spawnEntity: (prefab: string, position: Vec2) => EntityId;
|
|
220
|
+
/** Destroy entity */
|
|
221
|
+
destroyEntity: (entityId: EntityId) => void;
|
|
222
|
+
/** Find entities */
|
|
223
|
+
findEntities: (tag: string) => EntityId[];
|
|
224
|
+
/** Log message */
|
|
225
|
+
log: (level: 'info' | 'warn' | 'error', message: string) => void;
|
|
226
|
+
/** Print to screen */
|
|
227
|
+
print: (message: string, duration?: number, color?: string) => void;
|
|
228
|
+
}
|
|
229
|
+
export interface VSBreakpoint {
|
|
230
|
+
id: string;
|
|
231
|
+
nodeId: string;
|
|
232
|
+
enabled: boolean;
|
|
233
|
+
condition?: string;
|
|
234
|
+
hitCount?: number;
|
|
235
|
+
logMessage?: string;
|
|
236
|
+
temporary?: boolean;
|
|
237
|
+
}
|
|
238
|
+
export interface VSWatchExpression {
|
|
239
|
+
id: string;
|
|
240
|
+
expression: string;
|
|
241
|
+
value: unknown;
|
|
242
|
+
type: VSDataType;
|
|
243
|
+
error?: string;
|
|
244
|
+
}
|
|
245
|
+
export interface VSCallStackFrame {
|
|
246
|
+
nodeId: string;
|
|
247
|
+
nodeName: string;
|
|
248
|
+
graphId: string;
|
|
249
|
+
graphName: string;
|
|
250
|
+
functionName?: string;
|
|
251
|
+
variables: Map<string, unknown>;
|
|
252
|
+
}
|
|
253
|
+
export type VSDebuggerState = 'running' | 'paused' | 'stepping' | 'stopped';
|
|
254
|
+
export interface VSDebuggerSession {
|
|
255
|
+
state: VSDebuggerState;
|
|
256
|
+
/** Current execution position */
|
|
257
|
+
currentNode: string | null;
|
|
258
|
+
currentGraph: string | null;
|
|
259
|
+
/** Call stack */
|
|
260
|
+
callStack: VSCallStackFrame[];
|
|
261
|
+
/** Breakpoints */
|
|
262
|
+
breakpoints: Map<string, VSBreakpoint>;
|
|
263
|
+
/** Watch expressions */
|
|
264
|
+
watches: VSWatchExpression[];
|
|
265
|
+
/** Execution history for step-back */
|
|
266
|
+
history: VSExecutionSnapshot[];
|
|
267
|
+
historyIndex: number;
|
|
268
|
+
/** Profiling data */
|
|
269
|
+
profiling: VSProfilingData;
|
|
270
|
+
}
|
|
271
|
+
export interface VSExecutionSnapshot {
|
|
272
|
+
timestamp: number;
|
|
273
|
+
nodeId: string;
|
|
274
|
+
inputs: Record<string, unknown>;
|
|
275
|
+
outputs: Record<string, unknown>;
|
|
276
|
+
variables: Map<string, unknown>;
|
|
277
|
+
}
|
|
278
|
+
export interface VSProfilingData {
|
|
279
|
+
enabled: boolean;
|
|
280
|
+
nodeExecutionTimes: Map<string, number[]>;
|
|
281
|
+
totalFrameTime: number;
|
|
282
|
+
frameCount: number;
|
|
283
|
+
}
|
|
284
|
+
export type VSDebuggerEventType = 'breakpoint-hit' | 'step-completed' | 'execution-error' | 'variable-changed' | 'node-executed' | 'graph-started' | 'graph-completed';
|
|
285
|
+
export interface VSDebuggerEvent {
|
|
286
|
+
type: VSDebuggerEventType;
|
|
287
|
+
timestamp: number;
|
|
288
|
+
data: unknown;
|
|
289
|
+
}
|
|
290
|
+
export declare class VSDebugger {
|
|
291
|
+
private session;
|
|
292
|
+
private eventListeners;
|
|
293
|
+
constructor();
|
|
294
|
+
private createSession;
|
|
295
|
+
start(): void;
|
|
296
|
+
pause(): void;
|
|
297
|
+
resume(): void;
|
|
298
|
+
stop(): void;
|
|
299
|
+
getState(): VSDebuggerState;
|
|
300
|
+
stepOver(): void;
|
|
301
|
+
stepInto(): void;
|
|
302
|
+
stepOut(): void;
|
|
303
|
+
stepBack(): void;
|
|
304
|
+
addBreakpoint(nodeId: string, options?: Partial<VSBreakpoint>): VSBreakpoint;
|
|
305
|
+
removeBreakpoint(breakpointId: string): void;
|
|
306
|
+
toggleBreakpoint(nodeId: string): VSBreakpoint | null;
|
|
307
|
+
setBreakpointCondition(breakpointId: string, condition: string): void;
|
|
308
|
+
enableBreakpoint(breakpointId: string, enabled: boolean): void;
|
|
309
|
+
getBreakpoints(): VSBreakpoint[];
|
|
310
|
+
addWatch(expression: string): VSWatchExpression;
|
|
311
|
+
removeWatch(watchId: string): void;
|
|
312
|
+
updateWatches(context: VSExecutionContext): void;
|
|
313
|
+
getWatches(): VSWatchExpression[];
|
|
314
|
+
pushStack(frame: VSCallStackFrame): void;
|
|
315
|
+
popStack(): VSCallStackFrame | undefined;
|
|
316
|
+
getCallStack(): VSCallStackFrame[];
|
|
317
|
+
getCurrentFrame(): VSCallStackFrame | null;
|
|
318
|
+
recordSnapshot(snapshot: VSExecutionSnapshot): void;
|
|
319
|
+
getHistory(): VSExecutionSnapshot[];
|
|
320
|
+
enableProfiling(enabled: boolean): void;
|
|
321
|
+
recordNodeTime(nodeId: string, timeMs: number): void;
|
|
322
|
+
getNodeAverageTime(nodeId: string): number;
|
|
323
|
+
getProfilingData(): VSProfilingData;
|
|
324
|
+
evaluateExpression(expr: string, context: VSExecutionContext): unknown;
|
|
325
|
+
private getNestedValue;
|
|
326
|
+
on(event: VSDebuggerEventType, listener: (event: VSDebuggerEvent) => void): void;
|
|
327
|
+
off(event: VSDebuggerEventType, listener: (event: VSDebuggerEvent) => void): void;
|
|
328
|
+
private emit;
|
|
329
|
+
onNodeStartExecution(nodeId: string, inputs: Record<string, unknown>): boolean;
|
|
330
|
+
onNodeCompleteExecution(nodeId: string, outputs: Record<string, unknown>, timeMs: number): void;
|
|
331
|
+
}
|
|
332
|
+
export declare class VSGraphExecutor {
|
|
333
|
+
private nodeLibrary;
|
|
334
|
+
private debugger;
|
|
335
|
+
private executionQueue;
|
|
336
|
+
constructor(debuggerInstance?: VSDebugger);
|
|
337
|
+
registerNode(definition: VSNodeDefinition): void;
|
|
338
|
+
registerNodes(definitions: VSNodeDefinition[]): void;
|
|
339
|
+
getNodeDefinition(type: string): VSNodeDefinition | undefined;
|
|
340
|
+
getAllNodeDefinitions(): VSNodeDefinition[];
|
|
341
|
+
searchNodes(query: string): VSNodeDefinition[];
|
|
342
|
+
execute(graph: VSGraph, entryType: string, context: VSExecutionContext): void;
|
|
343
|
+
executeNode(graph: VSGraph, node: VSNodeInstance, context: VSExecutionContext): void;
|
|
344
|
+
private followFlowConnections;
|
|
345
|
+
getDebugger(): VSDebugger;
|
|
346
|
+
resumeExecution(): void;
|
|
347
|
+
}
|
|
348
|
+
export declare function createBuiltInNodes(): VSNodeDefinition[];
|
|
349
|
+
export declare function createVSGraph(name: string): VSGraph;
|
|
350
|
+
export declare function createVSNode(type: string, position: Vec2): VSNodeInstance;
|
|
351
|
+
export declare function createVSConnection(fromNode: string, fromPort: string, toNode: string, toPort: string): VSConnection;
|
|
352
|
+
export declare function createVSDebugger(): VSDebugger;
|
|
353
|
+
export declare function createVSExecutor(debuggerInstance?: VSDebugger): VSGraphExecutor;
|