@almadar/ui 2.13.3 → 2.15.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/dist/{chunk-UNDQO6DL.js → chunk-4KP6IZEQ.js} +3 -3
- package/dist/chunk-4N3BAPDB.js +1667 -0
- package/dist/{chunk-PERGHHON.js → chunk-IRIGCHP4.js} +2 -12
- package/dist/{chunk-Y7IHEYYE.js → chunk-QU2X55WH.js} +11 -1
- package/dist/{chunk-4ZBSL37D.js → chunk-XL7WB2O5.js} +415 -58
- package/dist/{chunk-MSLMORZK.js → chunk-YPY74G7F.js} +13434 -2264
- package/dist/components/atoms/AnimatedCounter.d.ts +20 -0
- package/dist/components/atoms/Avatar.d.ts +58 -0
- package/dist/components/atoms/Badge.d.ts +14 -0
- package/dist/components/atoms/Box.d.ts +57 -0
- package/dist/components/atoms/Button.d.ts +24 -0
- package/dist/components/atoms/Card.d.ts +18 -0
- package/dist/components/atoms/Center.d.ts +33 -0
- package/dist/components/atoms/Checkbox.d.ts +9 -0
- package/dist/components/atoms/ConditionalWrapper.d.ts +68 -0
- package/dist/components/atoms/ConfettiEffect.d.ts +19 -0
- package/dist/components/atoms/DayCell.d.ts +21 -0
- package/dist/components/atoms/Divider.d.ts +29 -0
- package/dist/components/atoms/FlipContainer.d.ts +21 -0
- package/dist/components/atoms/Icon.d.ts +39 -0
- package/dist/components/atoms/InfiniteScrollSentinel.d.ts +23 -0
- package/dist/components/atoms/Input.d.ts +26 -0
- package/dist/components/atoms/Label.d.ts +5 -0
- package/dist/components/atoms/LawReferenceTooltip.d.ts +48 -0
- package/dist/components/atoms/Overlay.d.ts +16 -0
- package/dist/components/atoms/ProgressBar.d.ts +63 -0
- package/dist/components/atoms/Radio.d.ts +26 -0
- package/dist/components/atoms/RangeSlider.d.ts +31 -0
- package/dist/components/atoms/Select.d.ts +12 -0
- package/dist/components/atoms/Spacer.d.ts +25 -0
- package/dist/components/atoms/Spinner.d.ts +6 -0
- package/dist/components/atoms/Stack.d.ts +66 -0
- package/dist/components/atoms/StatusDot.d.ts +14 -0
- package/dist/components/atoms/Switch.d.ts +12 -0
- package/dist/components/atoms/TextHighlight.d.ts +53 -0
- package/dist/components/atoms/Textarea.d.ts +5 -0
- package/dist/components/atoms/ThemeSelector.d.ts +21 -0
- package/dist/components/atoms/ThemeToggle.d.ts +33 -0
- package/dist/components/atoms/TimeSlotCell.d.ts +23 -0
- package/dist/components/atoms/TrendIndicator.d.ts +18 -0
- package/dist/components/atoms/TypewriterText.d.ts +20 -0
- package/dist/components/atoms/Typography.d.ts +57 -0
- package/dist/components/atoms/game/ActionButton.d.ts +25 -0
- package/dist/components/atoms/game/ChoiceButton.d.ts +18 -0
- package/dist/components/atoms/game/ComboCounter.d.ts +16 -0
- package/dist/components/atoms/game/ControlButton.d.ts +31 -0
- package/dist/components/atoms/game/DamageNumber.d.ts +14 -0
- package/dist/components/atoms/game/DialogueBubble.d.ts +16 -0
- package/dist/components/atoms/game/HealthBar.d.ts +18 -0
- package/dist/components/atoms/game/ItemSlot.d.ts +25 -0
- package/dist/components/atoms/game/MiniMap.d.ts +36 -0
- package/dist/components/atoms/game/ResourceCounter.d.ts +21 -0
- package/dist/components/atoms/game/ScoreDisplay.d.ts +21 -0
- package/dist/components/atoms/game/Sprite.d.ts +63 -0
- package/dist/components/atoms/game/StateIndicator.d.ts +31 -0
- package/dist/components/atoms/game/StatusEffect.d.ts +21 -0
- package/dist/components/atoms/game/TimerDisplay.d.ts +18 -0
- package/dist/components/atoms/game/TurnIndicator.d.ts +18 -0
- package/dist/components/atoms/game/WaypointMarker.d.ts +19 -0
- package/dist/components/atoms/game/XPBar.d.ts +20 -0
- package/dist/components/atoms/game/index.d.ts +25 -0
- package/dist/components/atoms/index.d.ts +37 -0
- package/dist/components/index.css +508 -0
- package/dist/components/index.d.ts +6 -9788
- package/dist/components/index.js +769 -11187
- package/dist/components/molecules/Accordion.d.ts +67 -0
- package/dist/components/molecules/Alert.d.ts +24 -0
- package/dist/components/molecules/Breadcrumb.d.ts +55 -0
- package/dist/components/molecules/ButtonGroup.d.ts +67 -0
- package/dist/components/molecules/CalendarGrid.d.ts +43 -0
- package/dist/components/molecules/Card.d.ts +56 -0
- package/dist/components/molecules/Carousel.d.ts +31 -0
- package/dist/components/molecules/ChartLegend.d.ts +20 -0
- package/dist/components/molecules/Container.d.ts +30 -0
- package/dist/components/molecules/DataGrid.d.ts +75 -0
- package/dist/components/molecules/DataList.d.ts +95 -0
- package/dist/components/molecules/DateRangeSelector.d.ts +22 -0
- package/dist/components/molecules/Drawer.d.ts +46 -0
- package/dist/components/molecules/EmptyState.d.ts +25 -0
- package/dist/components/molecules/ErrorBoundary.d.ts +55 -0
- package/dist/components/molecules/ErrorState.d.ts +13 -0
- package/dist/components/molecules/FilterGroup.d.ts +54 -0
- package/dist/components/molecules/Flex.d.ts +43 -0
- package/dist/components/molecules/FlipCard.d.ts +25 -0
- package/dist/components/molecules/FloatingActionButton.d.ts +69 -0
- package/dist/components/molecules/FormField.d.ts +16 -0
- package/dist/components/molecules/FormSectionHeader.d.ts +30 -0
- package/dist/components/molecules/GraphView.d.ts +45 -0
- package/dist/components/molecules/Grid.d.ts +54 -0
- package/dist/components/molecules/InputGroup.d.ts +24 -0
- package/dist/components/molecules/Lightbox.d.ts +25 -0
- package/dist/components/molecules/LineChart.d.ts +33 -0
- package/dist/components/molecules/LoadingState.d.ts +7 -0
- package/dist/components/molecules/MapView.d.ts +40 -0
- package/dist/components/molecules/Menu.d.ts +40 -0
- package/dist/components/molecules/Meter.d.ts +51 -0
- package/dist/components/molecules/Modal.d.ts +28 -0
- package/dist/components/molecules/NumberStepper.d.ts +27 -0
- package/dist/components/molecules/Pagination.d.ts +66 -0
- package/dist/components/molecules/Popover.d.ts +39 -0
- package/dist/components/molecules/ProgressDots.d.ts +24 -0
- package/dist/components/molecules/PullToRefresh.d.ts +21 -0
- package/dist/components/molecules/QuizBlock.d.ts +20 -0
- package/dist/components/molecules/RelationSelect.d.ts +48 -0
- package/dist/components/molecules/RepeatableFormSection.d.ts +58 -0
- package/dist/components/molecules/ScaledDiagram.d.ts +20 -0
- package/dist/components/molecules/SearchInput.d.ts +60 -0
- package/dist/components/molecules/SidePanel.d.ts +47 -0
- package/dist/components/molecules/SimpleGrid.d.ts +27 -0
- package/dist/components/molecules/Skeleton.d.ts +35 -0
- package/dist/components/molecules/SortableList.d.ts +17 -0
- package/dist/components/molecules/StarRating.d.ts +26 -0
- package/dist/components/molecules/StatDisplay.d.ts +37 -0
- package/dist/components/molecules/SwipeableRow.d.ts +24 -0
- package/dist/components/molecules/Tabs.d.ts +45 -0
- package/dist/components/molecules/Toast.d.ts +35 -0
- package/dist/components/molecules/Tooltip.d.ts +25 -0
- package/dist/components/molecules/UploadDropZone.d.ts +26 -0
- package/dist/components/molecules/ViolationAlert.d.ts +49 -0
- package/dist/components/molecules/WizardNavigation.d.ts +51 -0
- package/dist/components/molecules/WizardProgress.d.ts +42 -0
- package/dist/components/molecules/game/ActionButtons.d.ts +34 -0
- package/dist/components/molecules/game/CombatLog.d.ts +30 -0
- package/dist/components/molecules/game/CraftingRecipe.d.ts +33 -0
- package/dist/components/molecules/game/DPad.d.ts +22 -0
- package/dist/components/molecules/game/DialogueBox.d.ts +78 -0
- package/dist/components/molecules/game/EnemyPlate.d.ts +27 -0
- package/dist/components/molecules/game/GameCanvas2D.d.ts +18 -0
- package/dist/components/molecules/game/GameHud.d.ts +49 -0
- package/dist/components/molecules/game/GameMenu.d.ts +43 -0
- package/dist/components/molecules/game/GameOverScreen.d.ts +56 -0
- package/dist/components/molecules/game/HealthPanel.d.ts +27 -0
- package/dist/components/molecules/game/InventoryGrid.d.ts +30 -0
- package/dist/components/molecules/game/InventoryPanel.d.ts +67 -0
- package/dist/components/molecules/game/IsometricCanvas.d.ts +127 -0
- package/dist/components/molecules/game/PlatformerCanvas.d.ts +52 -0
- package/dist/components/molecules/game/PowerupSlots.d.ts +23 -0
- package/dist/components/molecules/game/QuestTracker.d.ts +20 -0
- package/dist/components/molecules/game/ResourceBar.d.ts +23 -0
- package/dist/components/molecules/game/ScoreBoard.d.ts +18 -0
- package/dist/components/molecules/game/StatBadge.d.ts +27 -0
- package/dist/components/molecules/game/TurnPanel.d.ts +29 -0
- package/dist/components/molecules/game/UnitCommandBar.d.ts +25 -0
- package/dist/components/molecules/game/index.d.ts +30 -0
- package/dist/components/molecules/index.d.ts +59 -0
- package/dist/components/molecules/markdown/CodeBlock.d.ts +25 -0
- package/dist/components/molecules/markdown/MarkdownContent.d.ts +26 -0
- package/dist/components/molecules/markdown/index.d.ts +2 -0
- package/dist/components/organisms/CardGrid.d.ts +80 -0
- package/dist/components/organisms/Chart.d.ts +59 -0
- package/dist/components/organisms/CodeViewer.d.ts +67 -0
- package/dist/components/organisms/ComponentPatterns.d.ts +453 -0
- package/dist/components/organisms/ConfirmDialog.d.ts +50 -0
- package/dist/components/organisms/ContentRenderer.d.ts +23 -0
- package/dist/components/organisms/CustomPattern.d.ts +104 -0
- package/dist/components/organisms/DataTable.d.ts +67 -0
- package/dist/components/organisms/DetailPanel.d.ts +78 -0
- package/dist/components/organisms/DocumentViewer.d.ts +60 -0
- package/dist/components/organisms/DrawerSlot.d.ts +39 -0
- package/dist/components/organisms/Form.d.ts +206 -0
- package/dist/components/organisms/FormSection.d.ts +41 -0
- package/dist/components/organisms/GraphCanvas.d.ts +69 -0
- package/dist/components/organisms/Header.d.ts +110 -0
- package/dist/components/organisms/JazariStateMachine.d.ts +60 -0
- package/dist/components/organisms/LayoutPatterns.d.ts +181 -0
- package/dist/components/organisms/List.d.ts +78 -0
- package/dist/components/organisms/MasterDetail.d.ts +32 -0
- package/dist/components/organisms/MediaGallery.d.ts +57 -0
- package/dist/components/organisms/Meter.d.ts +58 -0
- package/dist/components/organisms/ModalSlot.d.ts +35 -0
- package/dist/components/organisms/Navigation.d.ts +68 -0
- package/dist/components/organisms/NotifyListener.d.ts +15 -0
- package/dist/components/organisms/OrbitalVisualization.d.ts +48 -0
- package/dist/components/organisms/PageHeader.d.ts +59 -0
- package/dist/components/organisms/Section.d.ts +44 -0
- package/dist/components/organisms/Sidebar.d.ts +63 -0
- package/dist/components/organisms/SignaturePad.d.ts +44 -0
- package/dist/components/organisms/Split.d.ts +42 -0
- package/dist/components/organisms/StatCard.d.ts +62 -0
- package/dist/components/organisms/StateMachineView.d.ts +36 -0
- package/dist/components/organisms/Table.d.ts +99 -0
- package/dist/components/organisms/Timeline.d.ts +49 -0
- package/dist/components/organisms/ToastSlot.d.ts +38 -0
- package/dist/components/organisms/UISlotRenderer.d.ts +112 -0
- package/dist/components/organisms/WizardContainer.d.ts +160 -0
- package/dist/components/organisms/book/BookChapterView.d.ts +17 -0
- package/dist/components/organisms/book/BookCoverPage.d.ts +20 -0
- package/dist/components/organisms/book/BookNavBar.d.ts +19 -0
- package/dist/components/organisms/book/BookTableOfContents.d.ts +18 -0
- package/dist/components/organisms/book/BookViewer.d.ts +28 -0
- package/dist/components/organisms/book/index.d.ts +7 -0
- package/dist/components/organisms/book/types.d.ts +77 -0
- package/dist/components/organisms/component-registry.generated.d.ts +9 -0
- package/dist/components/organisms/debug/RuntimeDebugger.d.ts +19 -0
- package/dist/components/organisms/debug/hooks/useDebugData.d.ts +25 -0
- package/dist/components/organisms/debug/index.d.ts +13 -0
- package/dist/components/organisms/debug/tabs/EntitiesTab.d.ts +13 -0
- package/dist/components/organisms/debug/tabs/EventDispatcherTab.d.ts +16 -0
- package/dist/components/organisms/debug/tabs/EventFlowTab.d.ts +9 -0
- package/dist/components/organisms/debug/tabs/GuardsPanel.d.ts +9 -0
- package/dist/components/organisms/debug/tabs/ServerBridgeTab.d.ts +9 -0
- package/dist/components/organisms/debug/tabs/TicksTab.d.ts +13 -0
- package/dist/components/organisms/debug/tabs/TraitsTab.d.ts +13 -0
- package/dist/components/organisms/debug/tabs/TransitionTimeline.d.ts +9 -0
- package/dist/components/organisms/debug/tabs/VerificationTab.d.ts +10 -0
- package/dist/components/organisms/game/BattleBoard.d.ts +175 -0
- package/dist/components/organisms/game/CanvasEffect.d.ts +68 -0
- package/dist/components/organisms/game/CastleBoard.d.ts +85 -0
- package/dist/components/organisms/game/CombatLog.d.ts +2 -0
- package/dist/components/organisms/game/DialogueBox.d.ts +2 -0
- package/dist/components/organisms/game/GameAudioProvider.d.ts +47 -0
- package/dist/components/organisms/game/GameAudioToggle.d.ts +28 -0
- package/dist/components/organisms/game/GameCanvas3D.d.ts +181 -0
- package/dist/components/organisms/game/GameHud.d.ts +2 -0
- package/dist/components/organisms/game/GameMenu.d.ts +2 -0
- package/dist/components/organisms/game/GameOverScreen.d.ts +2 -0
- package/dist/components/organisms/game/InventoryPanel.d.ts +2 -0
- package/dist/components/organisms/game/IsometricCanvas.d.ts +3 -0
- package/dist/components/organisms/game/PlatformerCanvas.d.ts +2 -0
- package/dist/components/organisms/game/TraitSlot.d.ts +90 -0
- package/dist/components/organisms/game/TraitStateViewer.d.ts +53 -0
- package/dist/components/organisms/game/UncontrolledBattleBoard.d.ts +26 -0
- package/dist/components/organisms/game/WorldMapBoard.d.ts +156 -0
- package/dist/components/organisms/game/editor/editorUtils.d.ts +109 -0
- package/dist/components/organisms/game/editor/index.d.ts +9 -0
- package/dist/components/organisms/game/hooks/useBattleState.d.ts +35 -0
- package/dist/components/organisms/game/hooks/useCamera.d.ts +41 -0
- package/dist/components/organisms/game/hooks/useGameAudio.d.ts +47 -0
- package/dist/components/organisms/game/hooks/useImageCache.d.ts +16 -0
- package/dist/components/organisms/game/hooks/usePhysics2D.d.ts +45 -0
- package/dist/components/organisms/game/hooks/useSpriteAnimations.d.ts +43 -0
- package/dist/components/organisms/game/index.d.ts +52 -0
- package/dist/components/organisms/game/managers/PhysicsManager.d.ts +103 -0
- package/dist/components/organisms/game/physics-sim/SimulationCanvas.d.ts +20 -0
- package/dist/components/organisms/game/physics-sim/SimulationControls.d.ts +28 -0
- package/dist/components/organisms/game/physics-sim/SimulationGraph.d.ts +25 -0
- package/dist/components/organisms/game/physics-sim/index.d.ts +7 -0
- package/dist/components/organisms/game/physics-sim/presets/index.d.ts +4 -0
- package/dist/components/organisms/game/physics-sim/presets/mechanics.d.ts +4 -0
- package/dist/components/organisms/game/physics-sim/presets/types.d.ts +43 -0
- package/dist/components/organisms/game/puzzles/builder/BuilderBoard.d.ts +52 -0
- package/dist/components/organisms/game/puzzles/builder/index.d.ts +2 -0
- package/dist/components/organisms/game/puzzles/classifier/ClassifierBoard.d.ts +53 -0
- package/dist/components/organisms/game/puzzles/classifier/index.d.ts +2 -0
- package/dist/components/organisms/game/puzzles/debugger/DebuggerBoard.d.ts +45 -0
- package/dist/components/organisms/game/puzzles/debugger/index.d.ts +2 -0
- package/dist/components/organisms/game/puzzles/event-handler/EventHandlerBoard.d.ts +55 -0
- package/dist/components/organisms/game/puzzles/event-handler/EventLog.d.ts +31 -0
- package/dist/components/organisms/game/puzzles/event-handler/ObjectRulePanel.d.ts +45 -0
- package/dist/components/organisms/game/puzzles/event-handler/RuleEditor.d.ts +41 -0
- package/dist/components/organisms/game/puzzles/event-handler/index.d.ts +8 -0
- package/dist/components/organisms/game/puzzles/negotiator/NegotiatorBoard.d.ts +54 -0
- package/dist/components/organisms/game/puzzles/negotiator/index.d.ts +2 -0
- package/dist/components/organisms/game/puzzles/sequencer/ActionPalette.d.ts +34 -0
- package/dist/components/organisms/game/puzzles/sequencer/ActionTile.d.ts +30 -0
- package/dist/components/organisms/game/puzzles/sequencer/SequenceBar.d.ts +41 -0
- package/dist/components/organisms/game/puzzles/sequencer/SequencerBoard.d.ts +72 -0
- package/dist/components/organisms/game/puzzles/sequencer/index.d.ts +8 -0
- package/dist/components/organisms/game/puzzles/simulator/SimulatorBoard.d.ts +54 -0
- package/dist/components/organisms/game/puzzles/simulator/index.d.ts +2 -0
- package/dist/components/organisms/game/puzzles/state-architect/CodeView.d.ts +24 -0
- package/dist/components/organisms/game/puzzles/state-architect/StateArchitectBoard.d.ts +76 -0
- package/dist/components/organisms/game/puzzles/state-architect/StateNode.d.ts +33 -0
- package/dist/components/organisms/game/puzzles/state-architect/TransitionArrow.d.ts +36 -0
- package/dist/components/organisms/game/puzzles/state-architect/VariablePanel.d.ts +28 -0
- package/dist/components/organisms/game/puzzles/state-architect/index.d.ts +10 -0
- package/dist/components/organisms/game/three/Camera3D.d.ts +60 -0
- package/dist/components/organisms/game/three/Lighting3D.d.ts +47 -0
- package/dist/components/organisms/game/three/Scene3D.d.ts +37 -0
- package/dist/components/organisms/game/three/components/Canvas3DErrorBoundary.d.ts +51 -0
- package/dist/components/organisms/game/three/components/Canvas3DLoadingState.d.ts +44 -0
- package/dist/components/organisms/game/three/components/ModelLoader.d.ts +44 -0
- package/dist/components/organisms/game/three/components/PhysicsObject3D.d.ts +74 -0
- package/dist/components/organisms/game/three/components/index.d.ts +10 -0
- package/dist/components/organisms/game/three/hooks/useAssetLoader.d.ts +58 -0
- package/dist/components/organisms/game/three/hooks/useGameCanvas3DEvents.d.ts +79 -0
- package/dist/components/organisms/game/three/hooks/useRaycaster.d.ts +86 -0
- package/dist/components/organisms/game/three/hooks/useSceneGraph.d.ts +66 -0
- package/dist/components/organisms/game/three/hooks/useThree.d.ts +58 -0
- package/dist/components/organisms/game/three/index.d.ts +18 -1228
- package/dist/components/organisms/game/three/index.js +49 -1709
- package/dist/components/organisms/game/three/loaders/AssetLoader.d.ts +80 -0
- package/dist/components/organisms/game/three/renderers/FeatureRenderer.d.ts +44 -0
- package/dist/components/organisms/game/three/renderers/FeatureRenderer3D.d.ts +44 -0
- package/dist/components/organisms/game/three/renderers/TileRenderer.d.ts +57 -0
- package/dist/components/organisms/game/three/renderers/UnitRenderer.d.ts +46 -0
- package/dist/components/organisms/game/three/renderers/index.d.ts +11 -0
- package/dist/components/organisms/game/three/utils/culling.d.ts +134 -0
- package/dist/components/organisms/game/three/utils/grid3D.d.ts +154 -0
- package/dist/components/organisms/game/types/effects.d.ts +253 -0
- package/dist/components/organisms/game/types/game.d.ts +92 -0
- package/dist/{isometric-ynNHVPZx.d.ts → components/organisms/game/types/isometric.d.ts} +4 -6
- package/dist/components/organisms/game/types/spriteAnimation.d.ts +73 -0
- package/dist/components/organisms/game/useCanvasEffects.d.ts +26 -0
- package/dist/components/organisms/game/utils/canvasEffects.d.ts +50 -0
- package/dist/components/organisms/game/utils/combatEffects.d.ts +64 -0
- package/dist/components/organisms/game/utils/combatPresets.d.ts +15 -0
- package/dist/components/organisms/game/utils/isometric.d.ts +61 -0
- package/dist/components/organisms/game/utils/spriteAnimation.d.ts +57 -0
- package/dist/components/organisms/game/utils/spriteSheetConstants.d.ts +16 -0
- package/dist/components/organisms/index.d.ts +38 -0
- package/dist/components/organisms/layout/DashboardGrid.d.ts +35 -0
- package/dist/components/organisms/layout/MasterDetail.d.ts +32 -0
- package/dist/components/organisms/layout/SplitPane.d.ts +34 -0
- package/dist/components/organisms/layout/TabbedContainer.d.ts +42 -0
- package/dist/components/organisms/layout/index.d.ts +9 -0
- package/dist/components/organisms/types.d.ts +63 -0
- package/dist/components/templates/AuthLayout.d.ts +14 -0
- package/dist/components/templates/BattleTemplate.d.ts +25 -0
- package/dist/components/templates/CastleTemplate.d.ts +23 -0
- package/dist/components/templates/CounterTemplate.d.ts +44 -0
- package/dist/components/templates/DashboardLayout.d.ts +34 -0
- package/dist/components/templates/GameCanvas3DBattleTemplate.d.ts +96 -0
- package/dist/components/templates/GameCanvas3DCastleTemplate.d.ts +90 -0
- package/dist/components/templates/GameCanvas3DWorldMapTemplate.d.ts +96 -0
- package/dist/components/templates/GameShell.d.ts +34 -0
- package/dist/components/templates/GameTemplate.d.ts +36 -0
- package/dist/components/templates/GenericAppTemplate.d.ts +30 -0
- package/dist/components/templates/WorldMapTemplate.d.ts +29 -0
- package/dist/components/templates/index.d.ts +10 -0
- package/dist/components/templates/types.d.ts +22 -0
- package/dist/context/DesignThemeContext.d.ts +21 -0
- package/dist/{ThemeContext-D9xUORq5.d.ts → context/ThemeContext.d.ts} +15 -16
- package/dist/context/UISlotContext.d.ts +75 -0
- package/dist/context/UserContext.d.ts +111 -0
- package/dist/context/index.d.ts +6 -206
- package/dist/{event-bus-types-CjJduURa.d.ts → hooks/event-bus-types.d.ts} +4 -6
- package/dist/hooks/index.d.ts +30 -1220
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/useAgentChat.d.ts +104 -0
- package/dist/hooks/useAuthContext.d.ts +25 -0
- package/dist/hooks/useCompile.d.ts +22 -0
- package/dist/hooks/useDeepAgentGeneration.d.ts +46 -0
- package/dist/hooks/useDragReorder.d.ts +26 -0
- package/dist/hooks/useEntities.d.ts +52 -0
- package/dist/hooks/useEntityData.d.ts +155 -0
- package/dist/hooks/useEntityMutations.d.ts +80 -0
- package/dist/hooks/useEventBus.d.ts +96 -0
- package/dist/hooks/useExtensions.d.ts +32 -0
- package/dist/hooks/useFileEditor.d.ts +32 -0
- package/dist/hooks/useFileSystem.d.ts +40 -0
- package/dist/hooks/useGitHub.d.ts +58 -0
- package/dist/hooks/useInfiniteScroll.d.ts +13 -0
- package/dist/hooks/useLongPress.d.ts +16 -0
- package/dist/hooks/useOrbitalHistory.d.ts +39 -0
- package/dist/hooks/useOrbitalMutations.d.ts +95 -0
- package/dist/hooks/usePinchZoom.d.ts +22 -0
- package/dist/hooks/usePreview.d.ts +57 -0
- package/dist/hooks/usePullToRefresh.d.ts +25 -0
- package/dist/hooks/useQuerySingleton.d.ts +78 -0
- package/dist/hooks/useResolvedEntity.d.ts +32 -0
- package/dist/hooks/useSwipeGesture.d.ts +26 -0
- package/dist/hooks/useTranslate.d.ts +35 -0
- package/dist/hooks/useUIEvents.d.ts +35 -0
- package/dist/{useUISlots-BBjNvQtb.d.ts → hooks/useUISlots.d.ts} +8 -9
- package/dist/hooks/useValidation.d.ts +46 -0
- package/dist/lib/api-client.d.ts +42 -0
- package/dist/lib/cn.d.ts +6 -0
- package/dist/lib/debug.d.ts +43 -0
- package/dist/lib/debugRegistry.d.ts +29 -0
- package/dist/lib/debugUtils.d.ts +27 -0
- package/dist/lib/entityDebug.d.ts +38 -0
- package/dist/lib/getNestedValue.d.ts +33 -0
- package/dist/lib/guardRegistry.d.ts +32 -0
- package/dist/lib/index.d.ts +17 -319
- package/dist/lib/index.js +1 -3
- package/dist/lib/jazari/index.d.ts +5 -0
- package/dist/lib/jazari/layout.d.ts +30 -0
- package/dist/lib/jazari/svg-paths.d.ts +61 -0
- package/dist/lib/jazari/types.d.ts +91 -0
- package/dist/lib/parseContentSegments.d.ts +41 -0
- package/dist/lib/tickRegistry.d.ts +40 -0
- package/dist/lib/traitRegistry.d.ts +34 -0
- package/dist/lib/verificationRegistry.d.ts +138 -0
- package/dist/lib/visualizer/browser.d.ts +47 -0
- package/dist/lib/visualizer/index.d.ts +143 -0
- package/dist/locales/index.d.ts +5 -7
- package/dist/providers/EventBusProvider.d.ts +60 -0
- package/dist/providers/FetchedDataProvider.d.ts +105 -0
- package/dist/providers/OfflineModeProvider.d.ts +79 -0
- package/dist/providers/OrbitalProvider.d.ts +101 -0
- package/dist/providers/SelectionProvider.d.ts +81 -0
- package/dist/providers/VerificationProvider.d.ts +63 -0
- package/dist/providers/index.css +599 -0
- package/dist/providers/index.d.ts +16 -464
- package/dist/providers/index.js +5 -4
- package/dist/renderer/client-effect-executor.d.ts +68 -0
- package/dist/renderer/data-resolver.d.ts +68 -0
- package/dist/renderer/index.d.ts +22 -519
- package/dist/renderer/init.d.ts +14 -0
- package/dist/renderer/navigation.d.ts +142 -0
- package/dist/{offline-executor-CHr4uAhf.d.ts → renderer/offline-executor.d.ts} +9 -172
- package/dist/renderer/pattern-resolver.d.ts +91 -0
- package/dist/renderer/slot-definitions.d.ts +45 -0
- package/dist/renderer/types.d.ts +160 -0
- package/dist/renderer/useClientEffects.d.ts +88 -0
- package/dist/runtime/EntitySchemaContext.d.ts +40 -0
- package/dist/runtime/TraitProvider.d.ts +52 -0
- package/dist/runtime/createClientEffectHandlers.d.ts +23 -0
- package/dist/runtime/index.css +599 -0
- package/dist/runtime/index.d.ts +10 -275
- package/dist/runtime/index.js +6 -6
- package/dist/runtime/types.d.ts +10 -0
- package/dist/runtime/ui/SlotsContext.d.ts +71 -0
- package/dist/runtime/useResolvedSchema.d.ts +45 -0
- package/dist/runtime/useTraitStateMachine.d.ts +48 -0
- package/dist/scripts/generate-design-system.d.ts +29 -0
- package/dist/scripts/generate-theme-from-schema.d.ts +10 -0
- package/dist/scripts/generate.d.ts +12 -0
- package/dist/scripts/suggest-components.d.ts +31 -0
- package/dist/scripts/types.d.ts +129 -0
- package/dist/stores/entityStore.d.ts +99 -0
- package/dist/stores/filtering.d.ts +51 -0
- package/dist/stores/index.d.ts +4 -148
- package/dist/tsup.config.d.ts +2 -0
- package/dist/vitest.config.d.ts +2 -0
- package/package.json +5 -4
- package/dist/chunk-42YQ6JVR.js +0 -48
- package/dist/chunk-WCTZ7WZX.js +0 -311
- package/dist/cn-C_ATNPvi.d.ts +0 -332
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AssetLoader
|
|
3
|
+
*
|
|
4
|
+
* Three.js asset loading manager for 3D models and textures.
|
|
5
|
+
* Supports GLB/GLTF (primary), OBJ (fallback), and texture loading.
|
|
6
|
+
* Implements caching for performance.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
import * as THREE from 'three';
|
|
11
|
+
export interface LoadedModel {
|
|
12
|
+
scene: THREE.Group;
|
|
13
|
+
animations: THREE.AnimationClip[];
|
|
14
|
+
}
|
|
15
|
+
export declare class AssetLoader {
|
|
16
|
+
private objLoader;
|
|
17
|
+
private textureLoader;
|
|
18
|
+
private modelCache;
|
|
19
|
+
private textureCache;
|
|
20
|
+
private loadingPromises;
|
|
21
|
+
constructor();
|
|
22
|
+
/**
|
|
23
|
+
* Load a GLB/GLTF model
|
|
24
|
+
* @param url - URL to the .glb or .gltf file
|
|
25
|
+
* @returns Promise with loaded model scene and animations
|
|
26
|
+
*/
|
|
27
|
+
loadModel(url: string): Promise<LoadedModel>;
|
|
28
|
+
/**
|
|
29
|
+
* Load an OBJ model (fallback for non-GLB assets)
|
|
30
|
+
* @param url - URL to the .obj file
|
|
31
|
+
* @returns Promise with loaded object group
|
|
32
|
+
*/
|
|
33
|
+
loadOBJ(url: string): Promise<THREE.Group>;
|
|
34
|
+
/**
|
|
35
|
+
* Load a texture
|
|
36
|
+
* @param url - URL to the texture image
|
|
37
|
+
* @returns Promise with loaded texture
|
|
38
|
+
*/
|
|
39
|
+
loadTexture(url: string): Promise<THREE.Texture>;
|
|
40
|
+
/**
|
|
41
|
+
* Preload multiple assets
|
|
42
|
+
* @param urls - Array of asset URLs to preload
|
|
43
|
+
* @returns Promise that resolves when all assets are loaded
|
|
44
|
+
*/
|
|
45
|
+
preload(urls: string[]): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Check if a model is cached
|
|
48
|
+
* @param url - Model URL
|
|
49
|
+
*/
|
|
50
|
+
hasModel(url: string): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Check if a texture is cached
|
|
53
|
+
* @param url - Texture URL
|
|
54
|
+
*/
|
|
55
|
+
hasTexture(url: string): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Get cached model (throws if not cached)
|
|
58
|
+
* @param url - Model URL
|
|
59
|
+
*/
|
|
60
|
+
getModel(url: string): LoadedModel;
|
|
61
|
+
/**
|
|
62
|
+
* Get cached texture (throws if not cached)
|
|
63
|
+
* @param url - Texture URL
|
|
64
|
+
*/
|
|
65
|
+
getTexture(url: string): THREE.Texture;
|
|
66
|
+
/**
|
|
67
|
+
* Clear all caches
|
|
68
|
+
*/
|
|
69
|
+
clearCache(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Get cache statistics
|
|
72
|
+
*/
|
|
73
|
+
getStats(): {
|
|
74
|
+
models: number;
|
|
75
|
+
textures: number;
|
|
76
|
+
loading: number;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export declare const assetLoader: AssetLoader;
|
|
80
|
+
export default AssetLoader;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FeatureRenderer
|
|
3
|
+
*
|
|
4
|
+
* Renders static features (trees, rocks, buildings) in the 3D scene.
|
|
5
|
+
* Supports different feature types and selection states.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import type { IsometricFeature } from '../../types/isometric';
|
|
11
|
+
export interface FeatureRendererProps {
|
|
12
|
+
/** Array of features to render */
|
|
13
|
+
features: IsometricFeature[];
|
|
14
|
+
/** Grid cell size */
|
|
15
|
+
cellSize?: number;
|
|
16
|
+
/** Grid offset X */
|
|
17
|
+
offsetX?: number;
|
|
18
|
+
/** Grid offset Z */
|
|
19
|
+
offsetZ?: number;
|
|
20
|
+
/** Called when feature is clicked */
|
|
21
|
+
onFeatureClick?: (feature: IsometricFeature) => void;
|
|
22
|
+
/** Called when feature is hovered */
|
|
23
|
+
onFeatureHover?: (feature: IsometricFeature | null) => void;
|
|
24
|
+
/** Selected feature IDs */
|
|
25
|
+
selectedFeatureIds?: string[];
|
|
26
|
+
/** Feature color overrides */
|
|
27
|
+
featureColors?: Record<string, string>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* FeatureRenderer Component
|
|
31
|
+
*
|
|
32
|
+
* Renders all features in the scene.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <FeatureRenderer
|
|
37
|
+
* features={features}
|
|
38
|
+
* cellSize={1}
|
|
39
|
+
* onFeatureClick={handleFeatureClick}
|
|
40
|
+
* />
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function FeatureRenderer({ features, cellSize, offsetX, offsetZ, onFeatureClick, onFeatureHover, selectedFeatureIds, featureColors, }: FeatureRendererProps): React.JSX.Element;
|
|
44
|
+
export default FeatureRenderer;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FeatureRenderer3D
|
|
3
|
+
*
|
|
4
|
+
* Renders 3D features with GLB model loading from CDN.
|
|
5
|
+
* Supports assetUrl property on features for external model loading.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import type { IsometricFeature } from '../../types/isometric';
|
|
11
|
+
export interface FeatureRenderer3DProps {
|
|
12
|
+
/** Array of features to render */
|
|
13
|
+
features: IsometricFeature[];
|
|
14
|
+
/** Grid cell size */
|
|
15
|
+
cellSize?: number;
|
|
16
|
+
/** Grid offset X */
|
|
17
|
+
offsetX?: number;
|
|
18
|
+
/** Grid offset Z */
|
|
19
|
+
offsetZ?: number;
|
|
20
|
+
/** Called when feature is clicked */
|
|
21
|
+
onFeatureClick?: (feature: IsometricFeature) => void;
|
|
22
|
+
/** Called when feature is hovered */
|
|
23
|
+
onFeatureHover?: (feature: IsometricFeature | null) => void;
|
|
24
|
+
/** Selected feature IDs */
|
|
25
|
+
selectedFeatureIds?: string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* FeatureRenderer3D Component
|
|
29
|
+
*
|
|
30
|
+
* Renders 3D features with GLB model loading support.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <FeatureRenderer3D
|
|
35
|
+
* features={[
|
|
36
|
+
* { id: 'gate', x: 0, y: 0, type: 'gate', assetUrl: 'https://.../gate.glb' }
|
|
37
|
+
* ]}
|
|
38
|
+
* cellSize={1}
|
|
39
|
+
* />
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function FeatureRenderer3D({ features, cellSize, offsetX, offsetZ, onFeatureClick, onFeatureHover, selectedFeatureIds, }: FeatureRenderer3DProps): React.JSX.Element;
|
|
43
|
+
export default FeatureRenderer3D;
|
|
44
|
+
export declare function preloadFeatures(urls: string[]): void;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TileRenderer
|
|
3
|
+
*
|
|
4
|
+
* Renders isometric tiles using Three.js InstancedMesh for performance.
|
|
5
|
+
* Supports texture mapping and custom tile geometries.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import type { IsometricTile } from '../../types/isometric';
|
|
11
|
+
export interface TileRendererProps {
|
|
12
|
+
/** Array of tiles to render */
|
|
13
|
+
tiles: IsometricTile[];
|
|
14
|
+
/** Grid cell size */
|
|
15
|
+
cellSize?: number;
|
|
16
|
+
/** Grid offset X */
|
|
17
|
+
offsetX?: number;
|
|
18
|
+
/** Grid offset Z */
|
|
19
|
+
offsetZ?: number;
|
|
20
|
+
/** Use instancing for performance */
|
|
21
|
+
useInstancing?: boolean;
|
|
22
|
+
/** Terrain color mapping */
|
|
23
|
+
terrainColors?: Record<string, string>;
|
|
24
|
+
/** Called when tile is clicked */
|
|
25
|
+
onTileClick?: (tile: IsometricTile) => void;
|
|
26
|
+
/** Called when tile is hovered */
|
|
27
|
+
onTileHover?: (tile: IsometricTile | null) => void;
|
|
28
|
+
/** Selected tile IDs */
|
|
29
|
+
selectedTileIds?: string[];
|
|
30
|
+
/** Valid move tile coordinates */
|
|
31
|
+
validMoves?: Array<{
|
|
32
|
+
x: number;
|
|
33
|
+
z: number;
|
|
34
|
+
}>;
|
|
35
|
+
/** Attack target coordinates */
|
|
36
|
+
attackTargets?: Array<{
|
|
37
|
+
x: number;
|
|
38
|
+
z: number;
|
|
39
|
+
}>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* TileRenderer Component
|
|
43
|
+
*
|
|
44
|
+
* Renders grid tiles with instancing for optimal performance.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* <TileRenderer
|
|
49
|
+
* tiles={tiles}
|
|
50
|
+
* cellSize={1}
|
|
51
|
+
* onTileClick={handleTileClick}
|
|
52
|
+
* validMoves={[{ x: 1, z: 1 }]}
|
|
53
|
+
* />
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare function TileRenderer({ tiles, cellSize, offsetX, offsetZ, useInstancing, terrainColors, onTileClick, onTileHover, selectedTileIds, validMoves, attackTargets, }: TileRendererProps): React.JSX.Element;
|
|
57
|
+
export default TileRenderer;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UnitRenderer
|
|
3
|
+
*
|
|
4
|
+
* Renders animated units in the 3D scene.
|
|
5
|
+
* Supports skeletal animations, health bars, and selection indicators.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import type { IsometricUnit } from '../../types/isometric';
|
|
11
|
+
export type UnitAnimationState = 'idle' | 'walk' | 'attack' | 'hurt' | 'die';
|
|
12
|
+
export interface UnitRendererProps {
|
|
13
|
+
/** Array of units to render */
|
|
14
|
+
units: IsometricUnit[];
|
|
15
|
+
/** Grid cell size */
|
|
16
|
+
cellSize?: number;
|
|
17
|
+
/** Grid offset X */
|
|
18
|
+
offsetX?: number;
|
|
19
|
+
/** Grid offset Z */
|
|
20
|
+
offsetZ?: number;
|
|
21
|
+
/** Currently selected unit ID */
|
|
22
|
+
selectedUnitId?: string | null;
|
|
23
|
+
/** Called when unit is clicked */
|
|
24
|
+
onUnitClick?: (unit: IsometricUnit) => void;
|
|
25
|
+
/** Called when unit animation state changes */
|
|
26
|
+
onAnimationStateChange?: (unitId: string, state: UnitAnimationState) => void;
|
|
27
|
+
/** Animation speed multiplier */
|
|
28
|
+
animationSpeed?: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* UnitRenderer Component
|
|
32
|
+
*
|
|
33
|
+
* Renders all units in the scene.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <UnitRenderer
|
|
38
|
+
* units={units}
|
|
39
|
+
* cellSize={1}
|
|
40
|
+
* selectedUnitId="unit-1"
|
|
41
|
+
* onUnitClick={handleUnitClick}
|
|
42
|
+
* />
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare function UnitRenderer({ units, cellSize, offsetX, offsetZ, selectedUnitId, onUnitClick, onAnimationStateChange, animationSpeed, }: UnitRendererProps): React.JSX.Element;
|
|
46
|
+
export default UnitRenderer;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 3D Renderers
|
|
3
|
+
*
|
|
4
|
+
* Specialized renderers for tiles, units, and features in the 3D scene.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
export { TileRenderer, type TileRendererProps, } from './TileRenderer';
|
|
9
|
+
export { UnitRenderer, type UnitRendererProps, type UnitAnimationState, } from './UnitRenderer';
|
|
10
|
+
export { FeatureRenderer, type FeatureRendererProps, } from './FeatureRenderer';
|
|
11
|
+
export { FeatureRenderer3D, preloadFeatures, type FeatureRenderer3DProps, } from './FeatureRenderer3D';
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Culling Utilities
|
|
3
|
+
*
|
|
4
|
+
* Frustum culling and LOD (Level of Detail) management for 3D scene optimization.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
import * as THREE from 'three';
|
|
9
|
+
export interface CullingOptions {
|
|
10
|
+
/** Camera frustum for culling */
|
|
11
|
+
camera: THREE.Camera;
|
|
12
|
+
/** Optional padding around frustum */
|
|
13
|
+
padding?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface LODLevel {
|
|
16
|
+
/** Distance threshold for this LOD level */
|
|
17
|
+
distance: number;
|
|
18
|
+
/** Geometry or mesh for this level */
|
|
19
|
+
geometry?: THREE.BufferGeometry;
|
|
20
|
+
/** Scale multiplier for this level */
|
|
21
|
+
scale?: number;
|
|
22
|
+
/** Whether to use simplified material */
|
|
23
|
+
simpleMaterial?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface LODConfig {
|
|
26
|
+
/** LOD levels from closest to farthest */
|
|
27
|
+
levels: LODLevel[];
|
|
28
|
+
/** Transition smoothness (0-1) */
|
|
29
|
+
transitionSmoothness?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Frustum culling check for a position
|
|
33
|
+
* @param position - World position to check
|
|
34
|
+
* @param camera - Camera to check against
|
|
35
|
+
* @param padding - Optional padding in world units
|
|
36
|
+
* @returns Whether the position is within the frustum
|
|
37
|
+
*/
|
|
38
|
+
export declare function isInFrustum(position: THREE.Vector3, camera: THREE.Camera, padding?: number): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Filter an array of positions to only those within the frustum
|
|
41
|
+
* @param positions - Array of world positions
|
|
42
|
+
* @param camera - Camera to check against
|
|
43
|
+
* @param padding - Optional padding in world units
|
|
44
|
+
* @returns Array of positions within frustum
|
|
45
|
+
*/
|
|
46
|
+
export declare function filterByFrustum(positions: THREE.Vector3[], camera: THREE.Camera, padding?: number): THREE.Vector3[];
|
|
47
|
+
/**
|
|
48
|
+
* Get indices of visible items from an array
|
|
49
|
+
* @param positions - Array of world positions
|
|
50
|
+
* @param camera - Camera to check against
|
|
51
|
+
* @param padding - Optional padding in world units
|
|
52
|
+
* @returns Set of visible indices
|
|
53
|
+
*/
|
|
54
|
+
export declare function getVisibleIndices(positions: THREE.Vector3[], camera: THREE.Camera, padding?: number): Set<number>;
|
|
55
|
+
/**
|
|
56
|
+
* Calculate LOD level based on distance from camera
|
|
57
|
+
* @param position - Object position
|
|
58
|
+
* @param camera - Camera position
|
|
59
|
+
* @param lodLevels - Array of distance thresholds (sorted closest to farthest)
|
|
60
|
+
* @returns Index of the LOD level to use
|
|
61
|
+
*/
|
|
62
|
+
export declare function calculateLODLevel(position: THREE.Vector3, camera: THREE.Camera, lodLevels: number[]): number;
|
|
63
|
+
/**
|
|
64
|
+
* Create a distance-based LOD system for an instanced mesh
|
|
65
|
+
* @param instancedMesh - The instanced mesh to manage
|
|
66
|
+
* @param positions - Array of instance positions
|
|
67
|
+
* @param camera - Camera to calculate distances from
|
|
68
|
+
* @param lodDistances - Distance thresholds for LOD levels
|
|
69
|
+
* @returns Array of LOD indices for each instance
|
|
70
|
+
*/
|
|
71
|
+
export declare function updateInstanceLOD(instancedMesh: THREE.InstancedMesh, positions: THREE.Vector3[], camera: THREE.Camera, lodDistances: number[]): Uint8Array;
|
|
72
|
+
/**
|
|
73
|
+
* Create visibility data for instanced mesh culling
|
|
74
|
+
* Updates the instance matrix to hide/show instances
|
|
75
|
+
* @param instancedMesh - The instanced mesh
|
|
76
|
+
* @param positions - Array of instance positions
|
|
77
|
+
* @param visibleIndices - Set of visible indices
|
|
78
|
+
* @returns Updated count of visible instances
|
|
79
|
+
*/
|
|
80
|
+
export declare function cullInstancedMesh(instancedMesh: THREE.InstancedMesh, positions: THREE.Vector3[], visibleIndices: Set<number>): number;
|
|
81
|
+
/**
|
|
82
|
+
* Spatial hash grid for efficient object queries
|
|
83
|
+
*/
|
|
84
|
+
export declare class SpatialHashGrid {
|
|
85
|
+
private cellSize;
|
|
86
|
+
private cells;
|
|
87
|
+
private objectPositions;
|
|
88
|
+
constructor(cellSize?: number);
|
|
89
|
+
/**
|
|
90
|
+
* Get cell key for a position
|
|
91
|
+
*/
|
|
92
|
+
private getCellKey;
|
|
93
|
+
/**
|
|
94
|
+
* Insert an object into the grid
|
|
95
|
+
*/
|
|
96
|
+
insert(id: string, position: THREE.Vector3): void;
|
|
97
|
+
/**
|
|
98
|
+
* Remove an object from the grid
|
|
99
|
+
*/
|
|
100
|
+
remove(id: string): void;
|
|
101
|
+
/**
|
|
102
|
+
* Update an object's position
|
|
103
|
+
*/
|
|
104
|
+
update(id: string, newPosition: THREE.Vector3): void;
|
|
105
|
+
/**
|
|
106
|
+
* Query objects within a radius of a position
|
|
107
|
+
*/
|
|
108
|
+
queryRadius(center: THREE.Vector3, radius: number): string[];
|
|
109
|
+
/**
|
|
110
|
+
* Query objects within a bounding box
|
|
111
|
+
*/
|
|
112
|
+
queryBox(minX: number, maxX: number, minZ: number, maxZ: number): string[];
|
|
113
|
+
/**
|
|
114
|
+
* Clear all objects from the grid
|
|
115
|
+
*/
|
|
116
|
+
clear(): void;
|
|
117
|
+
/**
|
|
118
|
+
* Get statistics about the grid
|
|
119
|
+
*/
|
|
120
|
+
getStats(): {
|
|
121
|
+
objects: number;
|
|
122
|
+
cells: number;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
declare const _default: {
|
|
126
|
+
isInFrustum: typeof isInFrustum;
|
|
127
|
+
filterByFrustum: typeof filterByFrustum;
|
|
128
|
+
getVisibleIndices: typeof getVisibleIndices;
|
|
129
|
+
calculateLODLevel: typeof calculateLODLevel;
|
|
130
|
+
updateInstanceLOD: typeof updateInstanceLOD;
|
|
131
|
+
cullInstancedMesh: typeof cullInstancedMesh;
|
|
132
|
+
SpatialHashGrid: typeof SpatialHashGrid;
|
|
133
|
+
};
|
|
134
|
+
export default _default;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grid 3D Utilities
|
|
3
|
+
*
|
|
4
|
+
* Utility functions for 3D grid coordinate transformations,
|
|
5
|
+
* raycasting, and spatial calculations for GameCanvas3D.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import * as THREE from 'three';
|
|
10
|
+
export interface Grid3DConfig {
|
|
11
|
+
/** Size of each grid cell */
|
|
12
|
+
cellSize: number;
|
|
13
|
+
/** Grid offset X */
|
|
14
|
+
offsetX?: number;
|
|
15
|
+
/** Grid offset Z */
|
|
16
|
+
offsetZ?: number;
|
|
17
|
+
/** Grid Y height (elevation) */
|
|
18
|
+
elevation?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface GridCoordinate {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
z: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Convert grid coordinates to world position
|
|
27
|
+
* @param gridX - Grid X coordinate
|
|
28
|
+
* @param gridZ - Grid Z coordinate
|
|
29
|
+
* @param config - Grid configuration
|
|
30
|
+
* @returns World position vector
|
|
31
|
+
*/
|
|
32
|
+
export declare function gridToWorld(gridX: number, gridZ: number, config?: Grid3DConfig): THREE.Vector3;
|
|
33
|
+
/**
|
|
34
|
+
* Convert world position to grid coordinates
|
|
35
|
+
* @param worldX - World X position
|
|
36
|
+
* @param worldZ - World Z position
|
|
37
|
+
* @param config - Grid configuration
|
|
38
|
+
* @returns Grid coordinates
|
|
39
|
+
*/
|
|
40
|
+
export declare function worldToGrid(worldX: number, worldZ: number, config?: Grid3DConfig): {
|
|
41
|
+
x: number;
|
|
42
|
+
z: number;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Raycast from camera through mouse position to find grid intersection
|
|
46
|
+
* @param camera - Three.js camera
|
|
47
|
+
* @param mouseX - Mouse X position (normalized -1 to 1)
|
|
48
|
+
* @param mouseY - Mouse Y position (normalized -1 to 1)
|
|
49
|
+
* @param planeY - Y height of the intersection plane (default: 0)
|
|
50
|
+
* @returns Intersection point or null
|
|
51
|
+
*/
|
|
52
|
+
export declare function raycastToPlane(camera: THREE.Camera, mouseX: number, mouseY: number, planeY?: number): THREE.Vector3 | null;
|
|
53
|
+
/**
|
|
54
|
+
* Raycast from camera through mouse position against a set of objects
|
|
55
|
+
* @param camera - Three.js camera
|
|
56
|
+
* @param mouseX - Mouse X position (normalized -1 to 1)
|
|
57
|
+
* @param mouseY - Mouse Y position (normalized -1 to 1)
|
|
58
|
+
* @param objects - Array of objects to test
|
|
59
|
+
* @returns First intersection or null
|
|
60
|
+
*/
|
|
61
|
+
export declare function raycastToObjects(camera: THREE.Camera, mouseX: number, mouseY: number, objects: THREE.Object3D[]): THREE.Intersection | null;
|
|
62
|
+
/**
|
|
63
|
+
* Calculate distance between two grid coordinates
|
|
64
|
+
* @param a - First grid coordinate
|
|
65
|
+
* @param b - Second grid coordinate
|
|
66
|
+
* @returns Distance in grid units
|
|
67
|
+
*/
|
|
68
|
+
export declare function gridDistance(a: {
|
|
69
|
+
x: number;
|
|
70
|
+
z: number;
|
|
71
|
+
}, b: {
|
|
72
|
+
x: number;
|
|
73
|
+
z: number;
|
|
74
|
+
}): number;
|
|
75
|
+
/**
|
|
76
|
+
* Calculate Manhattan distance between two grid coordinates
|
|
77
|
+
* @param a - First grid coordinate
|
|
78
|
+
* @param b - Second grid coordinate
|
|
79
|
+
* @returns Manhattan distance
|
|
80
|
+
*/
|
|
81
|
+
export declare function gridManhattanDistance(a: {
|
|
82
|
+
x: number;
|
|
83
|
+
z: number;
|
|
84
|
+
}, b: {
|
|
85
|
+
x: number;
|
|
86
|
+
z: number;
|
|
87
|
+
}): number;
|
|
88
|
+
/**
|
|
89
|
+
* Get neighboring grid cells
|
|
90
|
+
* @param x - Center X coordinate
|
|
91
|
+
* @param z - Center Z coordinate
|
|
92
|
+
* @param includeDiagonal - Whether to include diagonal neighbors
|
|
93
|
+
* @returns Array of neighbor coordinates
|
|
94
|
+
*/
|
|
95
|
+
export declare function getNeighbors(x: number, z: number, includeDiagonal?: boolean): {
|
|
96
|
+
x: number;
|
|
97
|
+
z: number;
|
|
98
|
+
}[];
|
|
99
|
+
/**
|
|
100
|
+
* Check if a grid coordinate is within bounds
|
|
101
|
+
* @param x - X coordinate
|
|
102
|
+
* @param z - Z coordinate
|
|
103
|
+
* @param bounds - Bounds object
|
|
104
|
+
* @returns Whether the coordinate is within bounds
|
|
105
|
+
*/
|
|
106
|
+
export declare function isInBounds(x: number, z: number, bounds: {
|
|
107
|
+
minX: number;
|
|
108
|
+
maxX: number;
|
|
109
|
+
minZ: number;
|
|
110
|
+
maxZ: number;
|
|
111
|
+
}): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Get all grid cells within a circular radius
|
|
114
|
+
* @param centerX - Center X coordinate
|
|
115
|
+
* @param centerZ - Center Z coordinate
|
|
116
|
+
* @param radius - Radius in grid units
|
|
117
|
+
* @returns Array of coordinates within radius
|
|
118
|
+
*/
|
|
119
|
+
export declare function getCellsInRadius(centerX: number, centerZ: number, radius: number): {
|
|
120
|
+
x: number;
|
|
121
|
+
z: number;
|
|
122
|
+
}[];
|
|
123
|
+
/**
|
|
124
|
+
* Create a highlight mesh for grid cells
|
|
125
|
+
* @param color - Highlight color
|
|
126
|
+
* @param opacity - Opacity (0-1)
|
|
127
|
+
* @returns Mesh that can be positioned at grid cells
|
|
128
|
+
*/
|
|
129
|
+
export declare function createGridHighlight(color?: number, opacity?: number): THREE.Mesh;
|
|
130
|
+
/**
|
|
131
|
+
* Normalize mouse coordinates to NDC (-1 to 1)
|
|
132
|
+
* @param clientX - Mouse client X
|
|
133
|
+
* @param clientY - Mouse client Y
|
|
134
|
+
* @param element - Canvas element
|
|
135
|
+
* @returns Normalized coordinates
|
|
136
|
+
*/
|
|
137
|
+
export declare function normalizeMouseCoordinates(clientX: number, clientY: number, element: HTMLElement): {
|
|
138
|
+
x: number;
|
|
139
|
+
y: number;
|
|
140
|
+
};
|
|
141
|
+
declare const _default: {
|
|
142
|
+
gridToWorld: typeof gridToWorld;
|
|
143
|
+
worldToGrid: typeof worldToGrid;
|
|
144
|
+
raycastToPlane: typeof raycastToPlane;
|
|
145
|
+
raycastToObjects: typeof raycastToObjects;
|
|
146
|
+
gridDistance: typeof gridDistance;
|
|
147
|
+
gridManhattanDistance: typeof gridManhattanDistance;
|
|
148
|
+
getNeighbors: typeof getNeighbors;
|
|
149
|
+
isInBounds: typeof isInBounds;
|
|
150
|
+
getCellsInRadius: typeof getCellsInRadius;
|
|
151
|
+
createGridHighlight: typeof createGridHighlight;
|
|
152
|
+
normalizeMouseCoordinates: typeof normalizeMouseCoordinates;
|
|
153
|
+
};
|
|
154
|
+
export default _default;
|