@nice2dev/game-engine 1.3.13 → 1.3.15
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/CHANGELOG.md +8 -0
- package/package.json +2 -2
- package/dist/types/accessibility/index.d.ts +0 -1
- package/dist/types/ai/index.d.ts +0 -1
- package/dist/types/animation/index.d.ts +0 -1
- package/dist/types/audio/HRTFAudio.d.ts +0 -180
- package/dist/types/audio/index.d.ts +0 -2
- package/dist/types/community/Community.d.ts +0 -112
- package/dist/types/community/index.d.ts +0 -1
- package/dist/types/core/TypeSafety.d.ts +0 -190
- package/dist/types/core/index.d.ts +0 -7
- package/dist/types/devtools/AssetStore.d.ts +0 -133
- package/dist/types/devtools/index.d.ts +0 -3
- package/dist/types/dialogue/index.d.ts +0 -2
- package/dist/types/docs/APIPlayground.d.ts +0 -26
- package/dist/types/docs/Cookbook.d.ts +0 -18
- package/dist/types/docs/Guides.d.ts +0 -18
- package/dist/types/docs/index.d.ts +0 -4
- package/dist/types/ecs/ECSOptimized.d.ts +0 -131
- package/dist/types/ecs/index.d.ts +0 -2
- package/dist/types/editor/NiceAnimationTimeline.d.ts +0 -114
- package/dist/types/editor/NiceLevelEditor.d.ts +0 -232
- package/dist/types/editor/NiceMaterialEditor.d.ts +0 -105
- package/dist/types/editor/NiceNodeGraph.d.ts +0 -87
- package/dist/types/editor/NiceParticleEditor.d.ts +0 -127
- package/dist/types/editor/behavior-tree/BTDebugPanel.d.ts +0 -102
- package/dist/types/editor/behavior-tree/BTEditorCanvas.d.ts +0 -79
- package/dist/types/editor/behavior-tree/BTEditorNode.d.ts +0 -58
- package/dist/types/editor/behavior-tree/BTEditorToolbar.d.ts +0 -75
- package/dist/types/editor/behavior-tree/BTNodePalette.d.ts +0 -72
- package/dist/types/editor/behavior-tree/BTPropertyPanel.d.ts +0 -66
- package/dist/types/editor/behavior-tree/BehaviorTreeEditor.d.ts +0 -186
- package/dist/types/editor/behavior-tree/index.d.ts +0 -14
- package/dist/types/editor/behavior-tree/serialization.d.ts +0 -30
- package/dist/types/editor/behavior-tree/types.d.ts +0 -299
- package/dist/types/editor/index.d.ts +0 -20
- package/dist/types/editor/state-machine/SMEditorCanvas.d.ts +0 -61
- package/dist/types/editor/state-machine/StateMachineEditor.d.ts +0 -139
- package/dist/types/editor/state-machine/index.d.ts +0 -11
- package/dist/types/editor/state-machine/serialization.d.ts +0 -23
- package/dist/types/editor/state-machine/types.d.ts +0 -241
- package/dist/types/engine/index.d.ts +0 -2
- package/dist/types/enterprise/index.d.ts +0 -1
- package/dist/types/epic/index.d.ts +0 -10
- package/dist/types/i18n/index.d.ts +0 -2
- package/dist/types/input/index.d.ts +0 -3
- package/dist/types/kids/index.d.ts +0 -2
- package/dist/types/legendary/index.d.ts +0 -57
- package/dist/types/monetization/index.d.ts +0 -1
- package/dist/types/multiplayer/NiceNetcode.d.ts +0 -434
- package/dist/types/multiplayer/index.d.ts +0 -5
- package/dist/types/network/index.d.ts +0 -2
- package/dist/types/pathfinding/index.d.ts +0 -1
- package/dist/types/performance/AssetCompression.d.ts +0 -137
- package/dist/types/performance/WASMModules.d.ts +0 -65
- package/dist/types/performance/WebGPUCompute.d.ts +0 -71
- package/dist/types/performance/index.d.ts +0 -1
- package/dist/types/physics/RapierIntegration.d.ts +0 -404
- package/dist/types/physics/index.d.ts +0 -2
- package/dist/types/plugins/index.d.ts +0 -2
- package/dist/types/procedural/index.d.ts +0 -2
- package/dist/types/release/index.d.ts +0 -1
- package/dist/types/rendering/WebGPUv2.d.ts +0 -173
- package/dist/types/rendering/index.d.ts +0 -3
- package/dist/types/runtime3d/index.d.ts +0 -2
- package/dist/types/scene/index.d.ts +0 -2
- package/dist/types/scripting/WasmCompiler.d.ts +0 -182
- package/dist/types/scripting/index.d.ts +0 -19
- package/dist/types/social/index.d.ts +0 -1
- package/dist/types/systems/NiceAI.d.ts +0 -637
- package/dist/types/systems/NiceAbility.d.ts +0 -225
- package/dist/types/systems/NiceAccessibility.d.ts +0 -230
- package/dist/types/systems/NiceAchievement.d.ts +0 -153
- package/dist/types/systems/NiceAchievementUI.d.ts +0 -196
- package/dist/types/systems/NiceAchievements.d.ts +0 -230
- package/dist/types/systems/NiceAction.d.ts +0 -81
- package/dist/types/systems/NiceAlchemy.d.ts +0 -195
- package/dist/types/systems/NiceAnalytics.d.ts +0 -493
- package/dist/types/systems/NiceAnimation.d.ts +0 -350
- package/dist/types/systems/NiceArena.d.ts +0 -215
- package/dist/types/systems/NiceAssetLoader.d.ts +0 -136
- package/dist/types/systems/NiceAuction.d.ts +0 -157
- package/dist/types/systems/NiceAudio.d.ts +0 -224
- package/dist/types/systems/NiceAugment.d.ts +0 -187
- package/dist/types/systems/NiceAura.d.ts +0 -193
- package/dist/types/systems/NiceBank.d.ts +0 -158
- package/dist/types/systems/NiceBattlePass.d.ts +0 -150
- package/dist/types/systems/NiceBehavior.d.ts +0 -160
- package/dist/types/systems/NiceBinding.d.ts +0 -96
- package/dist/types/systems/NiceBlacksmith.d.ts +0 -221
- package/dist/types/systems/NiceBuff.d.ts +0 -177
- package/dist/types/systems/NiceBuilding.d.ts +0 -207
- package/dist/types/systems/NiceBullet.d.ts +0 -167
- package/dist/types/systems/NiceCamera.d.ts +0 -252
- package/dist/types/systems/NiceCard.d.ts +0 -171
- package/dist/types/systems/NiceChat.d.ts +0 -148
- package/dist/types/systems/NiceCheat.d.ts +0 -375
- package/dist/types/systems/NiceClimbing.d.ts +0 -186
- package/dist/types/systems/NiceCloud.d.ts +0 -422
- package/dist/types/systems/NiceCollision.d.ts +0 -238
- package/dist/types/systems/NiceCombo.d.ts +0 -131
- package/dist/types/systems/NiceCommand.d.ts +0 -112
- package/dist/types/systems/NiceCompanion.d.ts +0 -182
- package/dist/types/systems/NiceController.d.ts +0 -144
- package/dist/types/systems/NiceCooking.d.ts +0 -193
- package/dist/types/systems/NiceCoroutine.d.ts +0 -101
- package/dist/types/systems/NiceCrafting.d.ts +0 -228
- package/dist/types/systems/NiceCutscene.d.ts +0 -437
- package/dist/types/systems/NiceDaily.d.ts +0 -133
- package/dist/types/systems/NiceDamage.d.ts +0 -271
- package/dist/types/systems/NiceDayNight.d.ts +0 -126
- package/dist/types/systems/NiceDebug.d.ts +0 -255
- package/dist/types/systems/NiceDestructible.d.ts +0 -150
- package/dist/types/systems/NiceDialogue.d.ts +0 -629
- package/dist/types/systems/NiceDungeon.d.ts +0 -202
- package/dist/types/systems/NiceECS.d.ts +0 -151
- package/dist/types/systems/NiceEnchant.d.ts +0 -148
- package/dist/types/systems/NiceEntityPool.d.ts +0 -127
- package/dist/types/systems/NiceEquipment.d.ts +0 -137
- package/dist/types/systems/NiceEvent.d.ts +0 -202
- package/dist/types/systems/NiceEventBus.d.ts +0 -164
- package/dist/types/systems/NiceFaction.d.ts +0 -173
- package/dist/types/systems/NiceFarming.d.ts +0 -163
- package/dist/types/systems/NiceFishing.d.ts +0 -196
- package/dist/types/systems/NiceFlocking.d.ts +0 -156
- package/dist/types/systems/NiceFog.d.ts +0 -137
- package/dist/types/systems/NiceFormation.d.ts +0 -140
- package/dist/types/systems/NiceGacha.d.ts +0 -134
- package/dist/types/systems/NiceGambling.d.ts +0 -175
- package/dist/types/systems/NiceGem.d.ts +0 -165
- package/dist/types/systems/NiceGesture.d.ts +0 -502
- package/dist/types/systems/NiceGrappling.d.ts +0 -154
- package/dist/types/systems/NiceGrid.d.ts +0 -142
- package/dist/types/systems/NiceGuild.d.ts +0 -162
- package/dist/types/systems/NiceHaptics.d.ts +0 -112
- package/dist/types/systems/NiceHousing.d.ts +0 -197
- package/dist/types/systems/NiceInput.d.ts +0 -280
- package/dist/types/systems/NiceInventory.d.ts +0 -534
- package/dist/types/systems/NiceLOD.d.ts +0 -144
- package/dist/types/systems/NiceLeaderboard.d.ts +0 -191
- package/dist/types/systems/NiceLevel.d.ts +0 -304
- package/dist/types/systems/NiceLighting.d.ts +0 -214
- package/dist/types/systems/NiceLocalization.d.ts +0 -148
- package/dist/types/systems/NiceLocomotion.d.ts +0 -398
- package/dist/types/systems/NiceLogger.d.ts +0 -117
- package/dist/types/systems/NiceLoot.d.ts +0 -176
- package/dist/types/systems/NiceMail.d.ts +0 -164
- package/dist/types/systems/NiceMap.d.ts +0 -234
- package/dist/types/systems/NiceMarriage.d.ts +0 -150
- package/dist/types/systems/NiceMastery.d.ts +0 -171
- package/dist/types/systems/NiceMatch.d.ts +0 -196
- package/dist/types/systems/NiceMatch3.d.ts +0 -118
- package/dist/types/systems/NiceMessageBus.d.ts +0 -115
- package/dist/types/systems/NiceMinimap.d.ts +0 -258
- package/dist/types/systems/NiceMining.d.ts +0 -175
- package/dist/types/systems/NiceModding.d.ts +0 -452
- package/dist/types/systems/NiceMount.d.ts +0 -152
- package/dist/types/systems/NiceNavigation.d.ts +0 -307
- package/dist/types/systems/NiceNetwork.d.ts +0 -568
- package/dist/types/systems/NiceNotification.d.ts +0 -438
- package/dist/types/systems/NiceObjective.d.ts +0 -395
- package/dist/types/systems/NiceParticle.d.ts +0 -639
- package/dist/types/systems/NiceParty.d.ts +0 -168
- package/dist/types/systems/NicePerformance.d.ts +0 -144
- package/dist/types/systems/NicePet.d.ts +0 -167
- package/dist/types/systems/NicePhotoMode.d.ts +0 -270
- package/dist/types/systems/NicePhysics.d.ts +0 -326
- package/dist/types/systems/NicePlatformer.d.ts +0 -158
- package/dist/types/systems/NicePool.d.ts +0 -128
- package/dist/types/systems/NicePortal.d.ts +0 -178
- package/dist/types/systems/NicePostProcess.d.ts +0 -254
- package/dist/types/systems/NiceProcedural.d.ts +0 -202
- package/dist/types/systems/NiceProfile.d.ts +0 -223
- package/dist/types/systems/NiceProjectile.d.ts +0 -157
- package/dist/types/systems/NicePvP.d.ts +0 -199
- package/dist/types/systems/NiceQTE.d.ts +0 -160
- package/dist/types/systems/NiceQuest.d.ts +0 -620
- package/dist/types/systems/NiceRaid.d.ts +0 -215
- package/dist/types/systems/NiceRanking.d.ts +0 -399
- package/dist/types/systems/NiceReplay.d.ts +0 -180
- package/dist/types/systems/NiceReputation.d.ts +0 -151
- package/dist/types/systems/NiceResource.d.ts +0 -200
- package/dist/types/systems/NiceRhythm.d.ts +0 -148
- package/dist/types/systems/NiceRoguelike.d.ts +0 -276
- package/dist/types/systems/NiceRune.d.ts +0 -202
- package/dist/types/systems/NiceSaveSystem.d.ts +0 -194
- package/dist/types/systems/NiceSceneManager.d.ts +0 -112
- package/dist/types/systems/NiceScore.d.ts +0 -186
- package/dist/types/systems/NiceScreenFX.d.ts +0 -235
- package/dist/types/systems/NiceScreenshot.d.ts +0 -443
- package/dist/types/systems/NiceScribe.d.ts +0 -239
- package/dist/types/systems/NiceSeason.d.ts +0 -176
- package/dist/types/systems/NiceSerialization.d.ts +0 -89
- package/dist/types/systems/NiceServiceLocator.d.ts +0 -94
- package/dist/types/systems/NiceShop.d.ts +0 -528
- package/dist/types/systems/NiceSignal.d.ts +0 -112
- package/dist/types/systems/NiceSkillTree.d.ts +0 -237
- package/dist/types/systems/NiceSocial.d.ts +0 -580
- package/dist/types/systems/NiceSpawner.d.ts +0 -237
- package/dist/types/systems/NiceSpell.d.ts +0 -216
- package/dist/types/systems/NiceState.d.ts +0 -224
- package/dist/types/systems/NiceStateMachine.d.ts +0 -108
- package/dist/types/systems/NiceStatus.d.ts +0 -116
- package/dist/types/systems/NiceStealth.d.ts +0 -204
- package/dist/types/systems/NiceSteam.d.ts +0 -255
- package/dist/types/systems/NiceStreaming.d.ts +0 -173
- package/dist/types/systems/NiceSwimming.d.ts +0 -166
- package/dist/types/systems/NiceTalent.d.ts +0 -154
- package/dist/types/systems/NiceTarget.d.ts +0 -121
- package/dist/types/systems/NiceTerrain.d.ts +0 -143
- package/dist/types/systems/NiceTilemap.d.ts +0 -218
- package/dist/types/systems/NiceTimer.d.ts +0 -153
- package/dist/types/systems/NiceTournament.d.ts +0 -190
- package/dist/types/systems/NiceTrading.d.ts +0 -238
- package/dist/types/systems/NiceTransmog.d.ts +0 -142
- package/dist/types/systems/NiceTutorial.d.ts +0 -248
- package/dist/types/systems/NiceTween.d.ts +0 -164
- package/dist/types/systems/NiceUI.d.ts +0 -364
- package/dist/types/systems/NiceVFX.d.ts +0 -333
- package/dist/types/systems/NiceVehicle.d.ts +0 -176
- package/dist/types/systems/NiceVoice.d.ts +0 -502
- package/dist/types/systems/NiceWater.d.ts +0 -162
- package/dist/types/systems/NiceWave.d.ts +0 -174
- package/dist/types/systems/NiceWaypoint.d.ts +0 -165
- package/dist/types/systems/NiceWeather.d.ts +0 -225
- package/dist/types/systems/NiceXR.d.ts +0 -187
- package/dist/types/systems/index.d.ts +0 -182
- package/dist/types/templates/index.d.ts +0 -2
- package/dist/types/tilemap/index.d.ts +0 -1
- package/dist/types/tutorials/TutorialEditor.d.ts +0 -43
- package/dist/types/tutorials/VoiceNarration.d.ts +0 -75
- package/dist/types/tutorials/content/Tutorials_T04.d.ts +0 -3
- package/dist/types/tutorials/content/UITutorials.d.ts +0 -14
- package/dist/types/tutorials/content/index.d.ts +0 -5
- package/dist/types/tutorials/index.d.ts +0 -6
- package/dist/types/ui/index.d.ts +0 -2
- package/dist/types/visual-scripting/VisualScriptDebugger.d.ts +0 -145
- package/dist/types/visual-scripting/VisualScriptExecutor.d.ts +0 -100
- package/dist/types/visual-scripting/VisualScriptGraph.d.ts +0 -173
- package/dist/types/visual-scripting/VisualScriptNode.d.ts +0 -157
- package/dist/types/visual-scripting/index.d.ts +0 -6
- package/dist/types/visual-scripting/nodes/ActionNodes.d.ts +0 -152
- package/dist/types/visual-scripting/nodes/EventNodes.d.ts +0 -95
- package/dist/types/visual-scripting/nodes/FlowControlNodes.d.ts +0 -134
- package/dist/types/visual-scripting/nodes/LogicNodes.d.ts +0 -122
- package/dist/types/visual-scripting/nodes/MathNodes.d.ts +0 -170
- package/dist/types/visual-scripting/nodes/UtilityNodes.d.ts +0 -131
- package/dist/types/visual-scripting/nodes/VariableNodes.d.ts +0 -107
- package/dist/types/visual-scripting/nodes/index.d.ts +0 -21
- package/dist/types/visual-scripting/nodes/registerNodes.d.ts +0 -29
- package/dist/types/visual-scripting/types.d.ts +0 -402
- package/dist/types/xr/WebXRLayers.d.ts +0 -319
- package/dist/types/xr/index.d.ts +0 -2
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Behavior Tree Editor - Main Editor
|
|
3
|
-
* @description Main editor class for graphical Behavior Tree editing
|
|
4
|
-
* PRO-1.4: Professional Editor Features
|
|
5
|
-
*
|
|
6
|
-
* Features:
|
|
7
|
-
* - Visual node-based editing
|
|
8
|
-
* - Real-time preview and debugging
|
|
9
|
-
* - Undo/Redo support
|
|
10
|
-
* - Copy/Paste/Duplicate
|
|
11
|
-
* - Auto-layout
|
|
12
|
-
* - Validation
|
|
13
|
-
* - Export/Import
|
|
14
|
-
*/
|
|
15
|
-
import type { BTNodeType, BTNodeDefinition as _BTNodeDefinition, BehaviorTree } from '../../ai/BehaviorTree';
|
|
16
|
-
import { BTNodeRegistry } from '../../ai/BehaviorTree';
|
|
17
|
-
import type { Vec2 } from '../../core/types';
|
|
18
|
-
import type { BTEditorConfig, BTEditorMode, BTSelection, BTClipboard, BTViewport as _BTViewport, BTEditorHistory, BTEditorNodeData, BTConnectionData, BTPendingConnection as _BTPendingConnection, BTDebugState, BTValidationResult, BTEditorEventType, BTEditorEventHandler, BTSearchOptions, BTFilterOptions } from './types';
|
|
19
|
-
export declare class BehaviorTreeEditor {
|
|
20
|
-
config: BTEditorConfig;
|
|
21
|
-
mode: BTEditorMode;
|
|
22
|
-
nodes: Map<string, BTEditorNodeData>;
|
|
23
|
-
connections: Map<string, BTConnectionData>;
|
|
24
|
-
selection: BTSelection;
|
|
25
|
-
viewport: _BTViewport;
|
|
26
|
-
clipboard: BTClipboard | null;
|
|
27
|
-
pendingConnection: _BTPendingConnection | null;
|
|
28
|
-
history: BTEditorHistory;
|
|
29
|
-
tree: BehaviorTree | null;
|
|
30
|
-
registry: BTNodeRegistry;
|
|
31
|
-
debugState: BTDebugState;
|
|
32
|
-
name: string;
|
|
33
|
-
description: string;
|
|
34
|
-
author: string;
|
|
35
|
-
rootNodeId: string | null;
|
|
36
|
-
modified: boolean;
|
|
37
|
-
private eventListeners;
|
|
38
|
-
constructor(config?: Partial<BTEditorConfig>);
|
|
39
|
-
private createInitialDebugState;
|
|
40
|
-
/** Initialize with a new empty tree */
|
|
41
|
-
createNew(name?: string): void;
|
|
42
|
-
/** Clear all state */
|
|
43
|
-
clear(): void;
|
|
44
|
-
/** Add a new node */
|
|
45
|
-
addNode(type: string, position: Vec2, properties?: Record<string, unknown>): BTEditorNodeData;
|
|
46
|
-
/** Delete node(s) */
|
|
47
|
-
deleteNodes(nodeIds: string[]): void;
|
|
48
|
-
/** Duplicate node(s) */
|
|
49
|
-
duplicateNodes(nodeIds: string[]): BTEditorNodeData[];
|
|
50
|
-
/** Move node(s) */
|
|
51
|
-
moveNodes(nodeIds: string[], delta: Vec2): void;
|
|
52
|
-
/** Update node property */
|
|
53
|
-
setNodeProperty(nodeId: string, property: string, value: unknown): void;
|
|
54
|
-
/** Rename node */
|
|
55
|
-
renameNode(nodeId: string, name: string): void;
|
|
56
|
-
/** Set node comment */
|
|
57
|
-
setNodeComment(nodeId: string, comment: string): void;
|
|
58
|
-
/** Toggle node collapse */
|
|
59
|
-
toggleNodeCollapse(nodeId: string): void;
|
|
60
|
-
/** Add a connection between nodes */
|
|
61
|
-
addConnection(sourceNodeId: string, targetNodeId: string): BTConnectionData | null;
|
|
62
|
-
/** Delete connection(s) */
|
|
63
|
-
deleteConnections(connectionIds: string[]): void;
|
|
64
|
-
/** Check if connection is valid */
|
|
65
|
-
canConnect(sourceNodeId: string, targetNodeId: string): boolean;
|
|
66
|
-
/** Check if adding connection would create a cycle */
|
|
67
|
-
private wouldCreateCycle;
|
|
68
|
-
/** Reorder children of a node */
|
|
69
|
-
reorderChildren(parentNodeId: string, childOrder: string[]): void;
|
|
70
|
-
/** Get connections from parent to children */
|
|
71
|
-
getChildConnections(nodeId: string): BTConnectionData[];
|
|
72
|
-
/** Get parent connection */
|
|
73
|
-
getParentConnection(nodeId: string): BTConnectionData | null;
|
|
74
|
-
/** Select node(s) */
|
|
75
|
-
selectNodes(nodeIds: string[], addToSelection?: boolean): void;
|
|
76
|
-
/** Select connection(s) */
|
|
77
|
-
selectConnections(connectionIds: string[], addToSelection?: boolean): void;
|
|
78
|
-
/** Clear selection */
|
|
79
|
-
clearSelection(): void;
|
|
80
|
-
/** Select all nodes */
|
|
81
|
-
selectAll(): void;
|
|
82
|
-
/** Box select nodes in rect */
|
|
83
|
-
boxSelect(rect: {
|
|
84
|
-
x: number;
|
|
85
|
-
y: number;
|
|
86
|
-
width: number;
|
|
87
|
-
height: number;
|
|
88
|
-
}, addToSelection?: boolean): void;
|
|
89
|
-
private rectContainsNode;
|
|
90
|
-
/** Copy selected nodes */
|
|
91
|
-
copy(): void;
|
|
92
|
-
/** Cut selected nodes */
|
|
93
|
-
cut(): void;
|
|
94
|
-
/** Paste from clipboard */
|
|
95
|
-
paste(position?: Vec2): BTEditorNodeData[];
|
|
96
|
-
/** Record an action for undo */
|
|
97
|
-
private recordAction;
|
|
98
|
-
/** Undo last action */
|
|
99
|
-
undo(): void;
|
|
100
|
-
/** Redo last undone action */
|
|
101
|
-
redo(): void;
|
|
102
|
-
private applyUndo;
|
|
103
|
-
private applyRedo;
|
|
104
|
-
/** Check if can undo */
|
|
105
|
-
canUndo(): boolean;
|
|
106
|
-
/** Check if can redo */
|
|
107
|
-
canRedo(): boolean;
|
|
108
|
-
/** Pan viewport */
|
|
109
|
-
pan(delta: Vec2): void;
|
|
110
|
-
/** Set pan position */
|
|
111
|
-
setPan(pan: Vec2): void;
|
|
112
|
-
/** Zoom viewport */
|
|
113
|
-
zoom(delta: number, center?: Vec2): void;
|
|
114
|
-
/** Set zoom level */
|
|
115
|
-
setZoom(zoom: number): void;
|
|
116
|
-
/** Reset viewport */
|
|
117
|
-
resetViewport(): void;
|
|
118
|
-
/** Fit content in viewport */
|
|
119
|
-
fitContent(): void;
|
|
120
|
-
/** Center on node */
|
|
121
|
-
centerOnNode(nodeId: string): void;
|
|
122
|
-
/** Validate the tree */
|
|
123
|
-
validate(): BTValidationResult;
|
|
124
|
-
/** Get all nodes connected to root */
|
|
125
|
-
private getConnectedNodes;
|
|
126
|
-
/** Search nodes */
|
|
127
|
-
searchNodes(options: BTSearchOptions): BTEditorNodeData[];
|
|
128
|
-
/** Filter nodes */
|
|
129
|
-
filterNodes(options: BTFilterOptions): BTEditorNodeData[];
|
|
130
|
-
/** Auto-layout the tree */
|
|
131
|
-
autoLayout(): void;
|
|
132
|
-
/** Calculate layout positions */
|
|
133
|
-
private calculateLayout;
|
|
134
|
-
private buildLayoutTree;
|
|
135
|
-
private layoutSubtree;
|
|
136
|
-
private extractPositions;
|
|
137
|
-
/** Start debugging */
|
|
138
|
-
startDebug(): void;
|
|
139
|
-
/** Stop debugging */
|
|
140
|
-
stopDebug(): void;
|
|
141
|
-
/** Step execution */
|
|
142
|
-
stepDebug(): void;
|
|
143
|
-
/** Pause debugging */
|
|
144
|
-
pauseDebug(): void;
|
|
145
|
-
/** Resume debugging */
|
|
146
|
-
resumeDebug(): void;
|
|
147
|
-
/** Add breakpoint */
|
|
148
|
-
addBreakpoint(nodeId: string): void;
|
|
149
|
-
/** Remove breakpoint */
|
|
150
|
-
removeBreakpoint(nodeId: string): void;
|
|
151
|
-
/** Toggle breakpoint */
|
|
152
|
-
toggleBreakpoint(nodeId: string): void;
|
|
153
|
-
private createDebugContext;
|
|
154
|
-
private updateNodeStatuses;
|
|
155
|
-
/** Build runtime BehaviorTree from editor data */
|
|
156
|
-
private buildRuntimeTree;
|
|
157
|
-
/** Generate unique ID */
|
|
158
|
-
private generateId;
|
|
159
|
-
/** Snap position to grid */
|
|
160
|
-
private snapToGrid;
|
|
161
|
-
/** Get content bounds */
|
|
162
|
-
getContentBounds(): {
|
|
163
|
-
minX: number;
|
|
164
|
-
minY: number;
|
|
165
|
-
maxX: number;
|
|
166
|
-
maxY: number;
|
|
167
|
-
};
|
|
168
|
-
/** Convert canvas position to screen position */
|
|
169
|
-
canvasToScreen(position: Vec2): Vec2;
|
|
170
|
-
/** Convert screen position to canvas position */
|
|
171
|
-
screenToCanvas(position: Vec2): Vec2;
|
|
172
|
-
/** Add event listener */
|
|
173
|
-
on<T>(type: BTEditorEventType, handler: BTEditorEventHandler<T>): () => void;
|
|
174
|
-
/** Remove event listener */
|
|
175
|
-
off<T>(type: BTEditorEventType, handler: BTEditorEventHandler<T>): void;
|
|
176
|
-
/** Emit event */
|
|
177
|
-
private emitEvent;
|
|
178
|
-
/** Get node definitions */
|
|
179
|
-
getNodeDefinitions(): _BTNodeDefinition[];
|
|
180
|
-
/** Get definitions by category */
|
|
181
|
-
getNodeDefinitionsByCategory(category: BTNodeType): _BTNodeDefinition[];
|
|
182
|
-
/** Register custom node */
|
|
183
|
-
registerNode(definition: _BTNodeDefinition): void;
|
|
184
|
-
}
|
|
185
|
-
/** Create a new Behavior Tree Editor */
|
|
186
|
-
export declare function createBehaviorTreeEditor(config?: Partial<BTEditorConfig>): BehaviorTreeEditor;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Behavior Tree Editor - Index
|
|
3
|
-
* @description Exports for the graphical Behavior Tree Editor
|
|
4
|
-
* PRO-1.4: Professional Editor Features
|
|
5
|
-
*/
|
|
6
|
-
export * from './types';
|
|
7
|
-
export * from './BehaviorTreeEditor';
|
|
8
|
-
export * from './BTEditorNode';
|
|
9
|
-
export * from './BTEditorCanvas';
|
|
10
|
-
export * from './BTNodePalette';
|
|
11
|
-
export * from './BTPropertyPanel';
|
|
12
|
-
export * from './BTDebugPanel';
|
|
13
|
-
export * from './BTEditorToolbar';
|
|
14
|
-
export * from './serialization';
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Behavior Tree Editor - Serialization
|
|
3
|
-
* @description Import/Export utilities for behavior trees
|
|
4
|
-
* PRO-1.4: Professional Editor Features
|
|
5
|
-
*/
|
|
6
|
-
import type { BehaviorTree } from '../../ai/BehaviorTree';
|
|
7
|
-
import type { BehaviorTreeEditor } from './BehaviorTreeEditor';
|
|
8
|
-
import type { BTTreeData } from './types';
|
|
9
|
-
/** Serialize editor state to JSON */
|
|
10
|
-
export declare function serializeBehaviorTree(editor: BehaviorTreeEditor): BTTreeData;
|
|
11
|
-
/** Deserialize JSON to editor */
|
|
12
|
-
export declare function deserializeBehaviorTree(editor: BehaviorTreeEditor, data: BTTreeData): void;
|
|
13
|
-
export interface BTExportOptions {
|
|
14
|
-
format: 'json' | 'yaml' | 'xml' | 'typescript';
|
|
15
|
-
pretty: boolean;
|
|
16
|
-
includeComments: boolean;
|
|
17
|
-
includeMetadata: boolean;
|
|
18
|
-
}
|
|
19
|
-
/** Export behavior tree to string */
|
|
20
|
-
export declare function exportBehaviorTree(editor: BehaviorTreeEditor, options?: Partial<BTExportOptions>): string;
|
|
21
|
-
/** Import behavior tree from string */
|
|
22
|
-
export declare function importBehaviorTree(editor: BehaviorTreeEditor, content: string, format?: string): void;
|
|
23
|
-
/** Download behavior tree as file */
|
|
24
|
-
export declare function downloadBehaviorTree(editor: BehaviorTreeEditor, options?: Partial<BTExportOptions>): void;
|
|
25
|
-
/** Open file picker and import */
|
|
26
|
-
export declare function openBehaviorTreeFile(editor: BehaviorTreeEditor): Promise<void>;
|
|
27
|
-
/** Convert editor tree to runtime BehaviorTree */
|
|
28
|
-
export declare function toRuntimeTree(editor: BehaviorTreeEditor): BehaviorTree | null;
|
|
29
|
-
/** Convert runtime BehaviorTree to editor format */
|
|
30
|
-
export declare function fromRuntimeTree(editor: BehaviorTreeEditor, tree: BehaviorTree): void;
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Behavior Tree Editor - Types
|
|
3
|
-
* @description Type definitions for the graphical Behavior Tree Editor
|
|
4
|
-
* PRO-1.4: Professional Editor Features
|
|
5
|
-
*/
|
|
6
|
-
import type { BTNodeType, BTNodeDefinition as _BTNodeDefinition, BTStatus as _BTStatus, BTVisualStatus } from '../../ai/BehaviorTree';
|
|
7
|
-
import type { Vec2 } from '../../core/types';
|
|
8
|
-
/** Editor mode */
|
|
9
|
-
export type BTEditorMode = 'edit' | 'debug' | 'preview' | 'readonly';
|
|
10
|
-
/** Selection state */
|
|
11
|
-
export interface BTSelection {
|
|
12
|
-
type: 'node' | 'connection' | 'none';
|
|
13
|
-
ids: string[];
|
|
14
|
-
}
|
|
15
|
-
/** Clipboard for copy/paste */
|
|
16
|
-
export interface BTClipboard {
|
|
17
|
-
nodes: BTEditorNodeData[];
|
|
18
|
-
connections: BTConnectionData[];
|
|
19
|
-
offset: Vec2;
|
|
20
|
-
}
|
|
21
|
-
/** Editor viewport state */
|
|
22
|
-
export interface BTViewport {
|
|
23
|
-
pan: Vec2;
|
|
24
|
-
zoom: number;
|
|
25
|
-
minZoom: number;
|
|
26
|
-
maxZoom: number;
|
|
27
|
-
}
|
|
28
|
-
/** Undo/Redo action */
|
|
29
|
-
export interface BTEditorAction {
|
|
30
|
-
type: string;
|
|
31
|
-
description: string;
|
|
32
|
-
data: unknown;
|
|
33
|
-
timestamp: number;
|
|
34
|
-
}
|
|
35
|
-
/** Editor history for undo/redo */
|
|
36
|
-
export interface BTEditorHistory {
|
|
37
|
-
undoStack: BTEditorAction[];
|
|
38
|
-
redoStack: BTEditorAction[];
|
|
39
|
-
maxSize: number;
|
|
40
|
-
}
|
|
41
|
-
/** Node visual state in editor */
|
|
42
|
-
export interface BTEditorNodeData {
|
|
43
|
-
id: string;
|
|
44
|
-
type: string;
|
|
45
|
-
category: BTNodeType;
|
|
46
|
-
name: string;
|
|
47
|
-
/** Position in canvas space */
|
|
48
|
-
position: Vec2;
|
|
49
|
-
/** Size for layout */
|
|
50
|
-
size: {
|
|
51
|
-
width: number;
|
|
52
|
-
height: number;
|
|
53
|
-
};
|
|
54
|
-
/** Custom properties */
|
|
55
|
-
properties: Record<string, unknown>;
|
|
56
|
-
/** Comment/documentation */
|
|
57
|
-
comment?: string;
|
|
58
|
-
/** Is collapsed (hide children) */
|
|
59
|
-
collapsed: boolean;
|
|
60
|
-
/** Is selected */
|
|
61
|
-
selected: boolean;
|
|
62
|
-
/** Is dragging */
|
|
63
|
-
dragging: boolean;
|
|
64
|
-
/** Runtime status (from debugger) */
|
|
65
|
-
runtimeStatus: BTVisualStatus;
|
|
66
|
-
/** Last execution time in ms */
|
|
67
|
-
executionTime?: number;
|
|
68
|
-
/** Validation errors */
|
|
69
|
-
errors: string[];
|
|
70
|
-
/** Validation warnings */
|
|
71
|
-
warnings: string[];
|
|
72
|
-
}
|
|
73
|
-
/** Connection between nodes */
|
|
74
|
-
export interface BTConnectionData {
|
|
75
|
-
id: string;
|
|
76
|
-
sourceNodeId: string;
|
|
77
|
-
targetNodeId: string;
|
|
78
|
-
/** Connection path points for rendering */
|
|
79
|
-
points?: Vec2[];
|
|
80
|
-
/** Is selected */
|
|
81
|
-
selected: boolean;
|
|
82
|
-
/** Runtime status */
|
|
83
|
-
active: boolean;
|
|
84
|
-
/** Child index (for ordering in composites) */
|
|
85
|
-
childIndex: number;
|
|
86
|
-
}
|
|
87
|
-
/** Pending connection while dragging */
|
|
88
|
-
export interface BTPendingConnection {
|
|
89
|
-
sourceNodeId: string;
|
|
90
|
-
startPosition: Vec2;
|
|
91
|
-
currentPosition: Vec2;
|
|
92
|
-
type: 'output' | 'input';
|
|
93
|
-
}
|
|
94
|
-
/** Editor configuration */
|
|
95
|
-
export interface BTEditorConfig {
|
|
96
|
-
/** Canvas settings */
|
|
97
|
-
canvas: {
|
|
98
|
-
backgroundColor: string;
|
|
99
|
-
gridSize: number;
|
|
100
|
-
gridColor: string;
|
|
101
|
-
gridSubdivisions: number;
|
|
102
|
-
snapToGrid: boolean;
|
|
103
|
-
showGrid: boolean;
|
|
104
|
-
showMinimap: boolean;
|
|
105
|
-
minimapScale: number;
|
|
106
|
-
};
|
|
107
|
-
/** Node settings */
|
|
108
|
-
nodes: {
|
|
109
|
-
defaultWidth: number;
|
|
110
|
-
defaultHeight: number;
|
|
111
|
-
headerHeight: number;
|
|
112
|
-
borderRadius: number;
|
|
113
|
-
fontSize: number;
|
|
114
|
-
padding: number;
|
|
115
|
-
spacing: number;
|
|
116
|
-
showIcons: boolean;
|
|
117
|
-
showStatus: boolean;
|
|
118
|
-
showExecutionTime: boolean;
|
|
119
|
-
};
|
|
120
|
-
/** Connection settings */
|
|
121
|
-
connections: {
|
|
122
|
-
lineWidth: number;
|
|
123
|
-
curveOffset: number;
|
|
124
|
-
arrowSize: number;
|
|
125
|
-
hitTolerance: number;
|
|
126
|
-
animateActive: boolean;
|
|
127
|
-
};
|
|
128
|
-
/** Debug settings */
|
|
129
|
-
debug: {
|
|
130
|
-
highlightActive: boolean;
|
|
131
|
-
showBlackboard: boolean;
|
|
132
|
-
showStatistics: boolean;
|
|
133
|
-
stepDelay: number;
|
|
134
|
-
};
|
|
135
|
-
/** Interaction settings */
|
|
136
|
-
interaction: {
|
|
137
|
-
multiSelect: boolean;
|
|
138
|
-
boxSelect: boolean;
|
|
139
|
-
dragThreshold: number;
|
|
140
|
-
doubleClickTime: number;
|
|
141
|
-
zoomSensitivity: number;
|
|
142
|
-
};
|
|
143
|
-
/** Auto-layout settings */
|
|
144
|
-
layout: {
|
|
145
|
-
enabled: boolean;
|
|
146
|
-
direction: 'horizontal' | 'vertical';
|
|
147
|
-
nodeSpacingX: number;
|
|
148
|
-
nodeSpacingY: number;
|
|
149
|
-
levelSpacing: number;
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
/** Default editor configuration */
|
|
153
|
-
export declare const DEFAULT_BT_EDITOR_CONFIG: BTEditorConfig;
|
|
154
|
-
export declare const BT_NODE_COLORS: Record<BTNodeType, {
|
|
155
|
-
background: string;
|
|
156
|
-
border: string;
|
|
157
|
-
text: string;
|
|
158
|
-
}>;
|
|
159
|
-
/** Status colors */
|
|
160
|
-
export declare const BT_STATUS_COLORS: Record<BTVisualStatus, string>;
|
|
161
|
-
export type BTEditorEventType = 'node:select' | 'node:deselect' | 'node:move' | 'node:add' | 'node:delete' | 'node:duplicate' | 'node:property-change' | 'connection:add' | 'connection:delete' | 'selection:change' | 'viewport:pan' | 'viewport:zoom' | 'history:undo' | 'history:redo' | 'tree:save' | 'tree:load' | 'debug:start' | 'debug:stop' | 'debug:step' | 'debug:breakpoint-hit';
|
|
162
|
-
export interface BTEditorEvent<T = unknown> {
|
|
163
|
-
type: BTEditorEventType;
|
|
164
|
-
data: T;
|
|
165
|
-
timestamp: number;
|
|
166
|
-
}
|
|
167
|
-
export type BTEditorEventHandler<T = unknown> = (event: BTEditorEvent<T>) => void;
|
|
168
|
-
export interface BTPaletteCategory {
|
|
169
|
-
id: BTNodeType;
|
|
170
|
-
name: string;
|
|
171
|
-
icon: string;
|
|
172
|
-
color: string;
|
|
173
|
-
expanded: boolean;
|
|
174
|
-
nodes: BTPaletteNode[];
|
|
175
|
-
}
|
|
176
|
-
export interface BTPaletteNode {
|
|
177
|
-
type: string;
|
|
178
|
-
definition: _BTNodeDefinition;
|
|
179
|
-
searchTerms: string[];
|
|
180
|
-
favorite: boolean;
|
|
181
|
-
recentlyUsed: boolean;
|
|
182
|
-
}
|
|
183
|
-
export interface BTValidationResult {
|
|
184
|
-
valid: boolean;
|
|
185
|
-
errors: BTValidationMessage[];
|
|
186
|
-
warnings: BTValidationMessage[];
|
|
187
|
-
}
|
|
188
|
-
export interface BTValidationMessage {
|
|
189
|
-
nodeId?: string;
|
|
190
|
-
connectionId?: string;
|
|
191
|
-
severity: 'error' | 'warning' | 'info';
|
|
192
|
-
code: string;
|
|
193
|
-
message: string;
|
|
194
|
-
}
|
|
195
|
-
/** Validation rule */
|
|
196
|
-
export interface BTValidationRule {
|
|
197
|
-
id: string;
|
|
198
|
-
name: string;
|
|
199
|
-
description: string;
|
|
200
|
-
severity: 'error' | 'warning' | 'info';
|
|
201
|
-
validate: (nodes: BTEditorNodeData[], connections: BTConnectionData[]) => BTValidationMessage[];
|
|
202
|
-
}
|
|
203
|
-
export interface BTTreeData {
|
|
204
|
-
version: string;
|
|
205
|
-
name: string;
|
|
206
|
-
description?: string;
|
|
207
|
-
author?: string;
|
|
208
|
-
created: string;
|
|
209
|
-
modified: string;
|
|
210
|
-
nodes: BTEditorNodeData[];
|
|
211
|
-
connections: BTConnectionData[];
|
|
212
|
-
rootNodeId?: string;
|
|
213
|
-
blackboardKeys: BTBlackboardKeyDef[];
|
|
214
|
-
variables: BTVariableDef[];
|
|
215
|
-
metadata?: Record<string, unknown>;
|
|
216
|
-
}
|
|
217
|
-
export interface BTBlackboardKeyDef {
|
|
218
|
-
name: string;
|
|
219
|
-
type: string;
|
|
220
|
-
defaultValue?: unknown;
|
|
221
|
-
description?: string;
|
|
222
|
-
}
|
|
223
|
-
export interface BTVariableDef {
|
|
224
|
-
name: string;
|
|
225
|
-
type: string;
|
|
226
|
-
value: unknown;
|
|
227
|
-
scope: 'local' | 'tree' | 'global';
|
|
228
|
-
}
|
|
229
|
-
export interface BTDebugState {
|
|
230
|
-
isDebugging: boolean;
|
|
231
|
-
isPaused: boolean;
|
|
232
|
-
currentNodeId?: string;
|
|
233
|
-
breakpoints: Set<string>;
|
|
234
|
-
watchExpressions: BTWatchExpression[];
|
|
235
|
-
blackboardSnapshot: Record<string, unknown>;
|
|
236
|
-
executionHistory: BTExecutionStep[];
|
|
237
|
-
statistics: BTDebugStatistics;
|
|
238
|
-
}
|
|
239
|
-
export interface BTWatchExpression {
|
|
240
|
-
id: string;
|
|
241
|
-
expression: string;
|
|
242
|
-
value: unknown;
|
|
243
|
-
error?: string;
|
|
244
|
-
}
|
|
245
|
-
export interface BTExecutionStep {
|
|
246
|
-
nodeId: string;
|
|
247
|
-
nodeName: string;
|
|
248
|
-
status: _BTStatus;
|
|
249
|
-
timestamp: number;
|
|
250
|
-
duration: number;
|
|
251
|
-
blackboardChanges?: Record<string, {
|
|
252
|
-
old: unknown;
|
|
253
|
-
new: unknown;
|
|
254
|
-
}>;
|
|
255
|
-
}
|
|
256
|
-
export interface BTDebugStatistics {
|
|
257
|
-
totalTicks: number;
|
|
258
|
-
averageTickTime: number;
|
|
259
|
-
nodeExecutionCounts: Map<string, number>;
|
|
260
|
-
nodeFailureCounts: Map<string, number>;
|
|
261
|
-
uptime: number;
|
|
262
|
-
}
|
|
263
|
-
export interface BTLayoutNode {
|
|
264
|
-
id: string;
|
|
265
|
-
x: number;
|
|
266
|
-
y: number;
|
|
267
|
-
width: number;
|
|
268
|
-
height: number;
|
|
269
|
-
children: BTLayoutNode[];
|
|
270
|
-
parent?: BTLayoutNode;
|
|
271
|
-
depth: number;
|
|
272
|
-
offset: number;
|
|
273
|
-
thread?: BTLayoutNode;
|
|
274
|
-
}
|
|
275
|
-
export interface BTLayoutResult {
|
|
276
|
-
nodes: Map<string, Vec2>;
|
|
277
|
-
bounds: {
|
|
278
|
-
minX: number;
|
|
279
|
-
minY: number;
|
|
280
|
-
maxX: number;
|
|
281
|
-
maxY: number;
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
export interface BTSearchOptions {
|
|
285
|
-
query: string;
|
|
286
|
-
searchInNames: boolean;
|
|
287
|
-
searchInTypes: boolean;
|
|
288
|
-
searchInComments: boolean;
|
|
289
|
-
searchInProperties: boolean;
|
|
290
|
-
caseSensitive: boolean;
|
|
291
|
-
useRegex: boolean;
|
|
292
|
-
}
|
|
293
|
-
export interface BTFilterOptions {
|
|
294
|
-
categories: BTNodeType[];
|
|
295
|
-
statuses: BTVisualStatus[];
|
|
296
|
-
hasErrors: boolean | null;
|
|
297
|
-
hasWarnings: boolean | null;
|
|
298
|
-
hasBreakpoint: boolean | null;
|
|
299
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export { NiceGameEditor, UndoStack, useEditor, serializeProject, deserializeProject, } from './NiceGameEditor';
|
|
2
|
-
export type { NiceGameEditorProps, EditorContextValue, EditorState, EditorTool, EditorMode, EditorPanel, UndoEntry, } from './NiceGameEditor';
|
|
3
|
-
export { createGizmoState, getSelectionRect, entitiesInRect, snapToGrid, snapVec2ToGrid, renderGrid, renderTranslateGizmo, renderRotateGizmo, renderScaleGizmo, hitTestGizmoAxis, pickEntityAt, copyEntities, pasteEntities, } from './SceneEditor';
|
|
4
|
-
export type { GizmoMode, GizmoAxis, GizmoState, SelectionBox, ClipboardEntry } from './SceneEditor';
|
|
5
|
-
export { AssetManager } from './AssetManager';
|
|
6
|
-
export type { AssetMetadata, AssetFolder } from './AssetManager';
|
|
7
|
-
export { Profiler, FPSCounter, ConsoleLogger, snapshotEntity, snapshotWorld, renderCollisionDebug, getMemoryStats, } from './DebugTools';
|
|
8
|
-
export type { ProfilerSample, ProfilerFrame, LogLevel, LogEntry, EntitySnapshot, MemoryStats, } from './DebugTools';
|
|
9
|
-
export * from './behavior-tree';
|
|
10
|
-
export * from './state-machine';
|
|
11
|
-
export { NiceNodeGraph } from './NiceNodeGraph';
|
|
12
|
-
export type { NiceNodeGraphProps, NiceNodeGraphRef } from './NiceNodeGraph';
|
|
13
|
-
export { NiceAnimationTimeline } from './NiceAnimationTimeline';
|
|
14
|
-
export type { NiceAnimationTimelineProps, NiceAnimationTimelineRef, AnimationTimelineTheme, KeyframeValue, Keyframe, EasingType, AnimationTrack, AnimationLayer, AnimationClipData, AnimationEvent, } from './NiceAnimationTimeline';
|
|
15
|
-
export { NiceMaterialEditor } from './NiceMaterialEditor';
|
|
16
|
-
export type { NiceMaterialEditorProps, NiceMaterialEditorRef, MaterialEditorTheme, ShaderNodeType, ShaderPin, ShaderNode, ShaderConnection, MaterialData, MaterialParameter, MaterialTexture, RenderState, } from './NiceMaterialEditor';
|
|
17
|
-
export { NiceParticleEditor } from './NiceParticleEditor';
|
|
18
|
-
export type { NiceParticleEditorProps, NiceParticleEditorRef, ParticleEditorTheme, ParticleCurve, ParticleGradient, EmitterShape, ParticleModule, ParticleModuleType, ParticleSystemData, } from './NiceParticleEditor';
|
|
19
|
-
export { NiceLevelEditor } from './NiceLevelEditor';
|
|
20
|
-
export type { NiceLevelEditorProps, NiceLevelEditorRef, LevelEditorTheme, LevelLayer, LevelObject, TerrainData, TerrainLayer, TreeInstance, DetailInstance, SplineData, SplinePoint, StreamingZone, LevelData, LightmapSettings, NavmeshSettings, EnvironmentSettings, LevelTool, } from './NiceLevelEditor';
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file state-machine/SMEditorCanvas.ts
|
|
3
|
-
* @description Canvas rendering and interaction for State Machine Editor
|
|
4
|
-
* PRO-1.4: Professional Editor Features
|
|
5
|
-
*/
|
|
6
|
-
import type { Vec2 } from '../../core/types';
|
|
7
|
-
import type { StateMachineEditor } from './StateMachineEditor';
|
|
8
|
-
import { SMBoxSelection } from './types';
|
|
9
|
-
export interface SMEditorCanvasState {
|
|
10
|
-
isDragging: boolean;
|
|
11
|
-
isPanning: boolean;
|
|
12
|
-
isBoxSelecting: boolean;
|
|
13
|
-
boxSelection: SMBoxSelection;
|
|
14
|
-
lastMousePos: Vec2;
|
|
15
|
-
dragStartPos: Vec2;
|
|
16
|
-
hoveredStateId: string | null;
|
|
17
|
-
hoveredTransitionId: string | null;
|
|
18
|
-
}
|
|
19
|
-
export declare class SMEditorCanvas {
|
|
20
|
-
private editor;
|
|
21
|
-
private canvas;
|
|
22
|
-
private ctx;
|
|
23
|
-
private state;
|
|
24
|
-
private animationFrameId;
|
|
25
|
-
private resizeObserver;
|
|
26
|
-
constructor(editor: StateMachineEditor);
|
|
27
|
-
attach(canvas: HTMLCanvasElement): void;
|
|
28
|
-
detach(): void;
|
|
29
|
-
private handleResize;
|
|
30
|
-
private startRenderLoop;
|
|
31
|
-
private stopRenderLoop;
|
|
32
|
-
private handleMouseDown;
|
|
33
|
-
private handleMouseMove;
|
|
34
|
-
private handleMouseUp;
|
|
35
|
-
private handleMouseLeave;
|
|
36
|
-
private handleWheel;
|
|
37
|
-
private handleDoubleClick;
|
|
38
|
-
private handleContextMenu;
|
|
39
|
-
private handleKeyDown;
|
|
40
|
-
private handleKeyUp;
|
|
41
|
-
private hitTest;
|
|
42
|
-
private isPointInState;
|
|
43
|
-
private isPointNearTransition;
|
|
44
|
-
private distanceToLineSegment;
|
|
45
|
-
private render;
|
|
46
|
-
private drawGrid;
|
|
47
|
-
private drawState;
|
|
48
|
-
private drawStateTypeIndicator;
|
|
49
|
-
private drawTransition;
|
|
50
|
-
private drawSelfLoop;
|
|
51
|
-
private drawPendingConnection;
|
|
52
|
-
private drawArrow;
|
|
53
|
-
private drawBoxSelection;
|
|
54
|
-
private drawMinimap;
|
|
55
|
-
private getMousePosition;
|
|
56
|
-
private getStateCenter;
|
|
57
|
-
private getStateEdgePoint;
|
|
58
|
-
private getBoxSelectionRect;
|
|
59
|
-
private roundRect;
|
|
60
|
-
}
|
|
61
|
-
export declare function createSMEditorCanvas(editor: StateMachineEditor): SMEditorCanvas;
|