@almadar/ui 5.107.0 → 5.108.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/avl/index.cjs +1427 -2828
- package/dist/avl/index.js +525 -1926
- package/dist/components/{game → core}/atoms/GameIcon.d.ts +1 -1
- package/dist/components/core/atoms/index.d.ts +1 -0
- package/dist/components/core/templates/index.d.ts +0 -1
- package/dist/components/game/molecules/index.d.ts +8 -28
- package/dist/components/index.cjs +223 -1691
- package/dist/components/index.js +213 -1671
- package/dist/lib/drawable/projector.d.ts +1 -1
- package/dist/{components/game/three/molecules/GameCanvas3D.d.ts → lib/drawable/three/Canvas3DHost.d.ts} +12 -9
- package/dist/lib/drawable/{Drawable3D.d.ts → three/Drawable3D.d.ts} +2 -2
- package/dist/lib/drawable/three/GameCamera3D.d.ts +16 -0
- package/dist/lib/drawable/three/game3dTheme.d.ts +14 -0
- package/dist/{components/game → lib/drawable}/three/hooks/useGameCanvas3DEvents.d.ts +1 -1
- package/dist/{components/game → lib/drawable}/three/index.cjs +2019 -2020
- package/dist/{components/game → lib/drawable}/three/index.css +3 -3
- package/dist/lib/drawable/three/index.d.ts +39 -0
- package/dist/{components/game → lib/drawable}/three/index.js +1932 -1934
- package/dist/lib/drawable/{mesh3d.d.ts → three/mesh3d.d.ts} +4 -4
- package/dist/{components/game/lib → lib}/puzzleObject.d.ts +11 -2
- package/dist/{components/game/providers → providers}/GameAudioProvider.d.ts +1 -1
- package/dist/providers/index.cjs +1619 -2690
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.js +827 -1902
- package/dist/runtime/index.cjs +1288 -2689
- package/dist/runtime/index.js +505 -1906
- package/package.json +7 -7
- package/dist/components/game/atoms/ActionButton.d.ts +0 -31
- package/dist/components/game/atoms/ComboCounter.d.ts +0 -20
- package/dist/components/game/atoms/DamageNumber.d.ts +0 -18
- package/dist/components/game/atoms/GameCard.d.ts +0 -34
- package/dist/components/game/atoms/ItemSlot.d.ts +0 -31
- package/dist/components/game/atoms/ResourceCounter.d.ts +0 -26
- package/dist/components/game/atoms/Sprite.d.ts +0 -52
- package/dist/components/game/atoms/StatusEffect.d.ts +0 -25
- package/dist/components/game/atoms/TurnIndicator.d.ts +0 -22
- package/dist/components/game/atoms/WaypointMarker.d.ts +0 -23
- package/dist/components/game/molecules/EventLog.d.ts +0 -31
- package/dist/components/game/molecules/InventoryGrid.d.ts +0 -35
- package/dist/components/game/molecules/ObjectRulePanel.d.ts +0 -32
- package/dist/components/game/molecules/ResourceBar.d.ts +0 -26
- package/dist/components/game/molecules/RuleEditor.d.ts +0 -39
- package/dist/components/game/molecules/VariablePanel.d.ts +0 -28
- package/dist/components/game/templates/GameTemplate.d.ts +0 -35
- package/dist/components/game/three/atoms/SpriteBillboard3D.d.ts +0 -18
- package/dist/components/game/three/game3dTheme.d.ts +0 -55
- package/dist/components/game/three/index.d.ts +0 -12
- package/dist/components/game/three/lib/game3dAssetManifest.d.ts +0 -48
- package/dist/components/game/three/molecules/GameCamera3D.d.ts +0 -35
- package/dist/components/game/three/molecules/index.d.ts +0 -32
- package/dist/components/game/three/patterns.d.ts +0 -16
- /package/dist/{components/game/hooks → hooks}/useCamera.d.ts +0 -0
- /package/dist/{components/game/hooks → hooks}/useGameAudio.d.ts +0 -0
- /package/dist/{components/game/hooks → hooks}/useImageCache.d.ts +0 -0
- /package/dist/{components/game/hooks → hooks}/useUnitSpriteAtlas.d.ts +0 -0
- /package/dist/{components/game/lib → lib}/boardEntity.d.ts +0 -0
- /package/dist/{components/game/three/molecules → lib/drawable/three}/Camera3D.d.ts +0 -0
- /package/dist/{components/game/three/molecules → lib/drawable/three}/Canvas3DErrorBoundary.d.ts +0 -0
- /package/dist/{components/game/three/molecules → lib/drawable/three}/Canvas3DLoadingState.d.ts +0 -0
- /package/dist/{components/game/three/molecules → lib/drawable/three}/Lighting3D.d.ts +0 -0
- /package/dist/{components/game/three/molecules → lib/drawable/three}/ModelLoader.d.ts +0 -0
- /package/dist/{components/game/three/molecules → lib/drawable/three}/Scene3D.d.ts +0 -0
- /package/dist/{components/game → lib/drawable}/three/hooks/useAssetLoader.d.ts +0 -0
- /package/dist/{components/game → lib/drawable}/three/hooks/useRaycaster.d.ts +0 -0
- /package/dist/{components/game → lib/drawable}/three/hooks/useSceneGraph.d.ts +0 -0
- /package/dist/{components/game → lib/drawable}/three/hooks/useThree.d.ts +0 -0
- /package/dist/{components/game → lib/drawable}/three/lib/AssetLoader.d.ts +0 -0
- /package/dist/{components/game → lib/drawable}/three/lib/culling.d.ts +0 -0
- /package/dist/{components/game → lib/drawable}/three/lib/grid3D.d.ts +0 -0
- /package/dist/{components/game/lib → lib}/editorUtils.d.ts +0 -0
- /package/dist/{components/game/lib → lib}/game.d.ts +0 -0
- /package/dist/{components/game/lib/index.d.ts → lib/gameShared.d.ts} +0 -0
- /package/dist/{components/game/lib → lib}/isometric.d.ts +0 -0
- /package/dist/{components/game/lib → lib}/isometricTypes.d.ts +0 -0
- /package/dist/{components/game/lib → lib}/makeAsset.d.ts +0 -0
- /package/dist/{components/game/lib → lib}/mechanics.d.ts +0 -0
- /package/dist/{components/game/lib → lib}/physicsPresets.d.ts +0 -0
- /package/dist/{components/game/lib → lib}/physicsTypes.d.ts +0 -0
- /package/dist/{components/game/lib → lib}/spriteAnimation.d.ts +0 -0
- /package/dist/{components/game/lib → lib}/spriteAnimationTypes.d.ts +0 -0
- /package/dist/{components/game/lib → lib}/spriteSheetConstants.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Projector } from './contract';
|
|
2
|
-
import { type TileLayout } from '
|
|
2
|
+
import { type TileLayout } from '../isometric';
|
|
3
3
|
/** Projection modes the 2D host supports. `side` is handled by the side host, not here. */
|
|
4
4
|
export type Projection2D = TileLayout | 'free';
|
|
5
5
|
export interface Projector2DOptions {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Canvas3DHost — the thin 3D draw-host: the `canvas` host's 3D painter backend
|
|
3
|
+
* (the R3F "vessel" behind the neutral drawables), the exact 3D analogue of the
|
|
4
|
+
* 2D `Painter2D` seam. Reached only via the lazy `@almadar/ui/.../game/three`
|
|
5
|
+
* subpath so three.js never enters a 2D bundle.
|
|
3
6
|
*
|
|
4
7
|
* The 3D twin of Canvas2D: the board authors a `drawables` list (the neutral
|
|
5
8
|
* `draw-*` children) and this host maps each descriptor through `Drawable3D` to a
|
|
@@ -23,9 +26,9 @@
|
|
|
23
26
|
import React from 'react';
|
|
24
27
|
import type { EventEmit, Asset, ScenePos } from '@almadar/core';
|
|
25
28
|
import * as THREE from 'three';
|
|
26
|
-
import type { DrawableNode } from '
|
|
27
|
-
import type { IsometricTile, IsometricUnit, IsometricFeature } from '../../
|
|
28
|
-
import './
|
|
29
|
+
import type { DrawableNode } from '../paintDispatch';
|
|
30
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from '../../isometricTypes';
|
|
31
|
+
import './Canvas3DHost.css';
|
|
29
32
|
export type { IsometricTile, IsometricUnit, IsometricFeature };
|
|
30
33
|
/** Camera mode for 3D view.
|
|
31
34
|
* - `follow` tracks `followTarget` (the neutral `Camera.target`) from a fixed offset.
|
|
@@ -44,7 +47,7 @@ export type MapOrientation = 'standard' | 'rotated';
|
|
|
44
47
|
/** Overlay control */
|
|
45
48
|
export type OverlayControl = 'default' | 'hidden' | 'minimap';
|
|
46
49
|
/** Props for GameCanvas3D component */
|
|
47
|
-
export interface
|
|
50
|
+
export interface Canvas3DHostProps {
|
|
48
51
|
/** Additional CSS classes */
|
|
49
52
|
className?: string;
|
|
50
53
|
/** Children to render inside the 3D canvas (e.g., physics objects, custom meshes) */
|
|
@@ -156,7 +159,7 @@ export interface GameCanvas3DProps {
|
|
|
156
159
|
pixelsPerUnit?: number;
|
|
157
160
|
}
|
|
158
161
|
/** Imperative handle for GameCanvas3D */
|
|
159
|
-
export interface
|
|
162
|
+
export interface Canvas3DHostHandle {
|
|
160
163
|
/** Get current camera position */
|
|
161
164
|
getCameraPosition: () => THREE.Vector3 | null;
|
|
162
165
|
/** Set camera position */
|
|
@@ -169,7 +172,7 @@ export interface GameCanvas3DHandle {
|
|
|
169
172
|
screenshot: () => string | null;
|
|
170
173
|
}
|
|
171
174
|
/**
|
|
172
|
-
*
|
|
175
|
+
* Canvas3DHost — thin 3D draw-host. Walks `drawables` through `Drawable3D`.
|
|
173
176
|
*/
|
|
174
|
-
export declare const
|
|
175
|
-
export default
|
|
177
|
+
export declare const Canvas3DHost: React.ForwardRefExoticComponent<Canvas3DHostProps & React.RefAttributes<Canvas3DHostHandle>>;
|
|
178
|
+
export default Canvas3DHost;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* interface.
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import type { Projector3D } from '
|
|
14
|
-
import type { DrawableNode } from '
|
|
13
|
+
import type { Projector3D } from '../projector3d';
|
|
14
|
+
import type { DrawableNode } from '../paintDispatch';
|
|
15
15
|
export interface Drawable3DProps {
|
|
16
16
|
node: DrawableNode;
|
|
17
17
|
projector: Projector3D;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Reports the live camera position on every change (imperative handle integration). */
|
|
2
|
+
export declare function CameraController3D({ onCameraChange, }: {
|
|
3
|
+
onCameraChange?: (pos: {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
z: number;
|
|
7
|
+
}) => void;
|
|
8
|
+
}): null;
|
|
9
|
+
/**
|
|
10
|
+
* Camera that smooth-tracks a world-space target (side-view player or selected unit).
|
|
11
|
+
* OrbitControls is disabled while following — the camera is authoritative.
|
|
12
|
+
*/
|
|
13
|
+
export declare function FollowCamera3D({ target, offset, }: {
|
|
14
|
+
target: [number, number, number];
|
|
15
|
+
offset: [number, number, number];
|
|
16
|
+
}): null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* game3dTheme — DEFAULT palette constants for the 3D draw-host (`Canvas3DHost`).
|
|
3
|
+
* No React deps — pure constants. Only the grid + background defaults remain live;
|
|
4
|
+
* every per-item color/size comes from the drawable descriptors that `.lolo` computes.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
/** Grid line colors for the drei `<Grid>`. */
|
|
9
|
+
export declare const GRID_COLORS_3D: {
|
|
10
|
+
cell: string;
|
|
11
|
+
section: string;
|
|
12
|
+
};
|
|
13
|
+
/** Default scene background (Canvas3DHostProps.backgroundColor default). */
|
|
14
|
+
export declare const DEFAULT_BACKGROUND_3D = "#1a1a2e";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EventEmit } from '@almadar/core';
|
|
2
|
-
import type { IsometricTile, IsometricUnit, IsometricFeature } from '
|
|
2
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from '../../../isometricTypes';
|
|
3
3
|
export interface GameCanvas3DEventConfig {
|
|
4
4
|
/** Event name for tile clicks. `tileId` is optional — the neutral draw-host emits
|
|
5
5
|
* only the scene coordinate `{ x, z }` (the FSM keys off the cell, not an id). */
|