@igneosoft/forge 0.1.1
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/index.cjs +33463 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +503 -0
- package/dist/index.d.ts +503 -0
- package/dist/index.js +33401 -0
- package/dist/index.js.map +1 -0
- package/package.json +41 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export { THREE };
|
|
3
|
+
|
|
4
|
+
declare class Engine {
|
|
5
|
+
private renderer;
|
|
6
|
+
private scene;
|
|
7
|
+
private camera;
|
|
8
|
+
private player;
|
|
9
|
+
private input;
|
|
10
|
+
private sceneManager;
|
|
11
|
+
private animationFrameId;
|
|
12
|
+
private clock;
|
|
13
|
+
constructor(canvas: HTMLCanvasElement);
|
|
14
|
+
start(): void;
|
|
15
|
+
stop(): void;
|
|
16
|
+
private loop;
|
|
17
|
+
private handleResize;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare function createIsometricCamera(width: number, height: number): THREE.OrthographicCamera;
|
|
21
|
+
declare function updateCameraTarget(camera: THREE.OrthographicCamera, target: THREE.Vector3): void;
|
|
22
|
+
|
|
23
|
+
interface EntityState {
|
|
24
|
+
id: string;
|
|
25
|
+
type: string;
|
|
26
|
+
position: {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
z: number;
|
|
30
|
+
};
|
|
31
|
+
dead?: boolean;
|
|
32
|
+
hp?: number;
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
interface SceneStateData {
|
|
36
|
+
entities: EntityState[];
|
|
37
|
+
visited: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface SpawnPoint$1 {
|
|
41
|
+
x: number;
|
|
42
|
+
z: number;
|
|
43
|
+
}
|
|
44
|
+
declare abstract class GameScene {
|
|
45
|
+
readonly id: string;
|
|
46
|
+
protected objects: THREE.Object3D[];
|
|
47
|
+
constructor(id: string);
|
|
48
|
+
abstract buildInitialState(): SceneStateData;
|
|
49
|
+
abstract populate(threeScene: THREE.Scene, state: SceneStateData): void;
|
|
50
|
+
abstract update(delta: number): void;
|
|
51
|
+
abstract getSpawnPoint(fromSceneId?: string): SpawnPoint$1;
|
|
52
|
+
saveState(): SceneStateData | null;
|
|
53
|
+
clear(threeScene: THREE.Scene): void;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare class SceneManager {
|
|
57
|
+
private scenes;
|
|
58
|
+
private states;
|
|
59
|
+
private threeScene;
|
|
60
|
+
private _current;
|
|
61
|
+
constructor(threeScene: THREE.Scene);
|
|
62
|
+
get current(): GameScene | null;
|
|
63
|
+
register(scene: GameScene): void;
|
|
64
|
+
load(sceneId: string, fromSceneId?: string): SpawnPoint$1;
|
|
65
|
+
getState(sceneId: string): SceneStateData | undefined;
|
|
66
|
+
getAllStates(): Record<string, SceneStateData>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
interface TileData {
|
|
70
|
+
color: string;
|
|
71
|
+
walkable: boolean;
|
|
72
|
+
height: number;
|
|
73
|
+
}
|
|
74
|
+
interface MapObject {
|
|
75
|
+
id: string;
|
|
76
|
+
type: string;
|
|
77
|
+
x: number;
|
|
78
|
+
z: number;
|
|
79
|
+
color: string;
|
|
80
|
+
height: number;
|
|
81
|
+
solid: boolean;
|
|
82
|
+
}
|
|
83
|
+
interface Portal {
|
|
84
|
+
x: number;
|
|
85
|
+
z: number;
|
|
86
|
+
targetScene: string;
|
|
87
|
+
targetSpawn: string;
|
|
88
|
+
}
|
|
89
|
+
interface SpawnPoint {
|
|
90
|
+
x: number;
|
|
91
|
+
z: number;
|
|
92
|
+
}
|
|
93
|
+
interface MapData {
|
|
94
|
+
id: string;
|
|
95
|
+
name: string;
|
|
96
|
+
width: number;
|
|
97
|
+
height: number;
|
|
98
|
+
tileSize: number;
|
|
99
|
+
tiles: TileData[][];
|
|
100
|
+
objects: MapObject[];
|
|
101
|
+
portals: Portal[];
|
|
102
|
+
spawns: Record<string, SpawnPoint>;
|
|
103
|
+
}
|
|
104
|
+
declare function createEmptyMap(id: string, width: number, height: number, name?: string, baseColor?: string): MapData;
|
|
105
|
+
|
|
106
|
+
declare class MapRenderer {
|
|
107
|
+
private group;
|
|
108
|
+
private tileMeshes;
|
|
109
|
+
private gridLines;
|
|
110
|
+
private currentWidth;
|
|
111
|
+
private currentHeight;
|
|
112
|
+
getGroup(): THREE.Group;
|
|
113
|
+
render(mapData: MapData): THREE.Group;
|
|
114
|
+
syncTiles(mapData: MapData): void;
|
|
115
|
+
needsFullRebuildForHeight(mapData: MapData): boolean;
|
|
116
|
+
needsFullRebuild(mapData: MapData): boolean;
|
|
117
|
+
needsGeometryUpdate(mapData: MapData): boolean;
|
|
118
|
+
private renderObjects;
|
|
119
|
+
private buildHeightWalls;
|
|
120
|
+
private buildGrid;
|
|
121
|
+
dispose(): void;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
declare class CollisionMap {
|
|
125
|
+
private walkable;
|
|
126
|
+
private heights;
|
|
127
|
+
private solidObjects;
|
|
128
|
+
private width;
|
|
129
|
+
private height;
|
|
130
|
+
private tileSize;
|
|
131
|
+
constructor(mapData: MapData);
|
|
132
|
+
canWalk(worldX: number, worldZ: number, fromWorldX?: number, fromWorldZ?: number): boolean;
|
|
133
|
+
getTileHeight(worldX: number, worldZ: number): number;
|
|
134
|
+
isWater(worldX: number, worldZ: number): boolean;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
declare function createWorldGrid(cols: number, rows: number, tileSize?: number): THREE.Group;
|
|
138
|
+
|
|
139
|
+
declare class FieldScene extends GameScene {
|
|
140
|
+
constructor();
|
|
141
|
+
buildInitialState(): SceneStateData;
|
|
142
|
+
populate(threeScene: THREE.Scene, _state: SceneStateData): void;
|
|
143
|
+
update(_delta: number): void;
|
|
144
|
+
getSpawnPoint(_fromSceneId?: string): SpawnPoint$1;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare class InputManager {
|
|
148
|
+
private keys;
|
|
149
|
+
private onKeyDown;
|
|
150
|
+
private onKeyUp;
|
|
151
|
+
attach(): void;
|
|
152
|
+
detach(): void;
|
|
153
|
+
getDirection(): {
|
|
154
|
+
x: number;
|
|
155
|
+
z: number;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
interface ColorPalette {
|
|
160
|
+
skin: string;
|
|
161
|
+
primary: string;
|
|
162
|
+
secondary: string;
|
|
163
|
+
accent: string;
|
|
164
|
+
}
|
|
165
|
+
type PartFactory = (palette: ColorPalette) => THREE.Mesh;
|
|
166
|
+
type SlotName = 'head' | 'torso' | 'armL' | 'armR' | 'forearmL' | 'forearmR' | 'legL' | 'legR' | 'shinL' | 'shinR' | 'weapon';
|
|
167
|
+
interface CharacterConfig {
|
|
168
|
+
id: string;
|
|
169
|
+
palette: ColorPalette;
|
|
170
|
+
head: PartFactory;
|
|
171
|
+
torso: PartFactory;
|
|
172
|
+
armL: PartFactory;
|
|
173
|
+
armR: PartFactory;
|
|
174
|
+
forearmL: PartFactory;
|
|
175
|
+
forearmR: PartFactory;
|
|
176
|
+
legL: PartFactory;
|
|
177
|
+
legR: PartFactory;
|
|
178
|
+
shinL: PartFactory;
|
|
179
|
+
shinR: PartFactory;
|
|
180
|
+
weapon?: PartFactory;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
declare class CharacterEntity {
|
|
184
|
+
readonly root: THREE.Group;
|
|
185
|
+
private bones;
|
|
186
|
+
private mixer;
|
|
187
|
+
private actions;
|
|
188
|
+
private currentAction;
|
|
189
|
+
private parts;
|
|
190
|
+
private palette;
|
|
191
|
+
constructor(config: CharacterConfig);
|
|
192
|
+
/** Play an animation by name. Crossfades from current. */
|
|
193
|
+
play(name: string, crossFadeDuration?: number): void;
|
|
194
|
+
/** Swap a body part at runtime (e.g., equip new armor) */
|
|
195
|
+
swapPart(slot: SlotName, factory: PartFactory): void;
|
|
196
|
+
/** Must be called every frame with delta time */
|
|
197
|
+
update(delta: number): void;
|
|
198
|
+
/** Cleanup GPU resources */
|
|
199
|
+
dispose(): void;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare class Player {
|
|
203
|
+
readonly entity: CharacterEntity;
|
|
204
|
+
readonly mesh: THREE.Group;
|
|
205
|
+
private targetPosition;
|
|
206
|
+
private collisionMap;
|
|
207
|
+
private wasMoving;
|
|
208
|
+
constructor(config?: CharacterConfig);
|
|
209
|
+
get position(): THREE.Vector3;
|
|
210
|
+
setPosition(x: number, z: number): void;
|
|
211
|
+
setCollisionMap(collisionMap: CollisionMap | null): void;
|
|
212
|
+
update(delta: number, direction: {
|
|
213
|
+
x: number;
|
|
214
|
+
z: number;
|
|
215
|
+
}): void;
|
|
216
|
+
dispose(): void;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
interface Vec3 {
|
|
220
|
+
x: number;
|
|
221
|
+
y: number;
|
|
222
|
+
z: number;
|
|
223
|
+
}
|
|
224
|
+
interface PivotAxes {
|
|
225
|
+
x: boolean;
|
|
226
|
+
y: boolean;
|
|
227
|
+
z: boolean;
|
|
228
|
+
}
|
|
229
|
+
interface RotationConstraints {
|
|
230
|
+
axes: PivotAxes;
|
|
231
|
+
min: Vec3;
|
|
232
|
+
max: Vec3;
|
|
233
|
+
}
|
|
234
|
+
interface InternalPivot {
|
|
235
|
+
name: string;
|
|
236
|
+
position: Vec3;
|
|
237
|
+
constraints: RotationConstraints;
|
|
238
|
+
}
|
|
239
|
+
interface Connector {
|
|
240
|
+
name: string;
|
|
241
|
+
position: Vec3;
|
|
242
|
+
}
|
|
243
|
+
interface BoneDefinition {
|
|
244
|
+
start: Vec3;
|
|
245
|
+
end: Vec3;
|
|
246
|
+
pivots: InternalPivot[];
|
|
247
|
+
connectors: Connector[];
|
|
248
|
+
}
|
|
249
|
+
interface Attachment {
|
|
250
|
+
parentPart: string;
|
|
251
|
+
parentConnector: string;
|
|
252
|
+
constraints: RotationConstraints;
|
|
253
|
+
}
|
|
254
|
+
interface BodyPartDefinition {
|
|
255
|
+
name: string;
|
|
256
|
+
size: Vec3;
|
|
257
|
+
bone: BoneDefinition;
|
|
258
|
+
attachment: Attachment | null;
|
|
259
|
+
}
|
|
260
|
+
interface MorphologyData {
|
|
261
|
+
_id?: string;
|
|
262
|
+
name: string;
|
|
263
|
+
bodyParts: BodyPartDefinition[];
|
|
264
|
+
}
|
|
265
|
+
declare const humanoidMorphology: MorphologyData;
|
|
266
|
+
|
|
267
|
+
type MorphologyScene = {
|
|
268
|
+
root: THREE.Group;
|
|
269
|
+
groups: Record<string, THREE.Group>;
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* Builds a THREE.Group hierarchy from the new bodyParts-based MorphologyData.
|
|
273
|
+
* Each bodyPart becomes a group. Internal pivots become sub-groups.
|
|
274
|
+
* Returns the root group + a map of all groups by name.
|
|
275
|
+
*/
|
|
276
|
+
declare function buildFromMorphology(data: MorphologyData): MorphologyScene;
|
|
277
|
+
interface BoneRefs {
|
|
278
|
+
root: THREE.Group;
|
|
279
|
+
hips: THREE.Group;
|
|
280
|
+
spine: THREE.Group;
|
|
281
|
+
neck: THREE.Group;
|
|
282
|
+
shoulderL: THREE.Group;
|
|
283
|
+
armL: THREE.Group;
|
|
284
|
+
forearmL: THREE.Group;
|
|
285
|
+
shoulderR: THREE.Group;
|
|
286
|
+
armR: THREE.Group;
|
|
287
|
+
forearmR: THREE.Group;
|
|
288
|
+
weaponMount: THREE.Group;
|
|
289
|
+
hipL: THREE.Group;
|
|
290
|
+
legL: THREE.Group;
|
|
291
|
+
shinL: THREE.Group;
|
|
292
|
+
hipR: THREE.Group;
|
|
293
|
+
legR: THREE.Group;
|
|
294
|
+
shinR: THREE.Group;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Manual skeleton builder — maintains exact same hierarchy as the original.
|
|
298
|
+
* Used by CharacterEntity, CharacterAssembler, Player, and animations.
|
|
299
|
+
* Does NOT depend on MorphologyData.
|
|
300
|
+
*/
|
|
301
|
+
declare function createSkeleton(): BoneRefs;
|
|
302
|
+
|
|
303
|
+
declare class CharacterAssembler {
|
|
304
|
+
/** Attach all parts from config to bones. Returns map of slot -> mesh for tracking. */
|
|
305
|
+
static assemble(bones: BoneRefs, config: CharacterConfig, parts: Map<SlotName, THREE.Object3D>): void;
|
|
306
|
+
/** Swap a single part. Disposes the old mesh. */
|
|
307
|
+
static swapPart(bones: BoneRefs, parts: Map<SlotName, THREE.Object3D>, slot: SlotName, factory: PartFactory, palette: ColorPalette): void;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Data-driven character definition.
|
|
312
|
+
* Links a morphology with voxel parts and a color palette.
|
|
313
|
+
* Stored in MongoDB, loaded by the editor and game.
|
|
314
|
+
*/
|
|
315
|
+
interface CharacterDefinition {
|
|
316
|
+
_id?: string;
|
|
317
|
+
name: string;
|
|
318
|
+
morphologyId: string;
|
|
319
|
+
palette: ColorPalette;
|
|
320
|
+
/** Maps body part name → voxel part id */
|
|
321
|
+
parts: Record<string, string>;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
interface Voxel {
|
|
325
|
+
x: number;
|
|
326
|
+
y: number;
|
|
327
|
+
z: number;
|
|
328
|
+
color: string;
|
|
329
|
+
}
|
|
330
|
+
interface VoxelPartData {
|
|
331
|
+
_id?: string;
|
|
332
|
+
name: string;
|
|
333
|
+
slot: string;
|
|
334
|
+
morphologyId: string;
|
|
335
|
+
size: {
|
|
336
|
+
x: number;
|
|
337
|
+
y: number;
|
|
338
|
+
z: number;
|
|
339
|
+
};
|
|
340
|
+
voxelSize: number;
|
|
341
|
+
origin: {
|
|
342
|
+
x: number;
|
|
343
|
+
y: number;
|
|
344
|
+
z: number;
|
|
345
|
+
};
|
|
346
|
+
voxels: Voxel[];
|
|
347
|
+
paletteMapping?: Record<string, 'skin' | 'primary' | 'secondary' | 'accent'>;
|
|
348
|
+
}
|
|
349
|
+
interface VoxelEditorMesh {
|
|
350
|
+
mesh: THREE.InstancedMesh;
|
|
351
|
+
/** Maps instanceId → voxel index in the voxels array */
|
|
352
|
+
instanceToVoxel: Map<number, number>;
|
|
353
|
+
/** Maps "x,y,z" → instanceId */
|
|
354
|
+
positionToInstance: Map<string, number>;
|
|
355
|
+
}
|
|
356
|
+
declare function buildEditorMesh(data: VoxelPartData): VoxelEditorMesh;
|
|
357
|
+
declare function buildRuntimeMesh(data: VoxelPartData, palette?: Record<string, string>): THREE.Mesh;
|
|
358
|
+
/** Get the face normal and adjacent position for placing a new voxel */
|
|
359
|
+
declare function getAdjacentPosition(_face: THREE.Face | null, intersect: THREE.Intersection, voxelSize: number, origin: {
|
|
360
|
+
x: number;
|
|
361
|
+
y: number;
|
|
362
|
+
z: number;
|
|
363
|
+
}): {
|
|
364
|
+
x: number;
|
|
365
|
+
y: number;
|
|
366
|
+
z: number;
|
|
367
|
+
} | null;
|
|
368
|
+
/** Get the voxel position that was clicked (for remove/paint) */
|
|
369
|
+
declare function getClickedVoxelPosition(intersect: THREE.Intersection, voxelSize: number, origin: {
|
|
370
|
+
x: number;
|
|
371
|
+
y: number;
|
|
372
|
+
z: number;
|
|
373
|
+
}): {
|
|
374
|
+
x: number;
|
|
375
|
+
y: number;
|
|
376
|
+
z: number;
|
|
377
|
+
} | null;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* A single armor piece that overlays a body part.
|
|
381
|
+
* Uses the same voxel data format but rendered slightly larger
|
|
382
|
+
* on top of the base body part mesh.
|
|
383
|
+
*/
|
|
384
|
+
interface ArmorPieceData {
|
|
385
|
+
_id?: string;
|
|
386
|
+
name: string;
|
|
387
|
+
slot: string;
|
|
388
|
+
morphologyId: string;
|
|
389
|
+
scaleOffset: number;
|
|
390
|
+
voxelData: VoxelPartData;
|
|
391
|
+
}
|
|
392
|
+
interface ArmorSetData {
|
|
393
|
+
_id?: string;
|
|
394
|
+
name: string;
|
|
395
|
+
morphologyId: string;
|
|
396
|
+
pieceIds: string[];
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/** Standard humanoid head */
|
|
400
|
+
declare const humanHead: PartFactory;
|
|
401
|
+
/** Skull */
|
|
402
|
+
declare const skullHead: PartFactory;
|
|
403
|
+
/** Helmet */
|
|
404
|
+
declare const helmetHead: PartFactory;
|
|
405
|
+
/** Hood */
|
|
406
|
+
declare const hoodHead: PartFactory;
|
|
407
|
+
|
|
408
|
+
/** Basic tunic/shirt */
|
|
409
|
+
declare const tunicTorso: PartFactory;
|
|
410
|
+
/** Skeleton ribcage */
|
|
411
|
+
declare const ribcageTorso: PartFactory;
|
|
412
|
+
/** Armored torso */
|
|
413
|
+
declare const armorTorso: PartFactory;
|
|
414
|
+
/** Rags */
|
|
415
|
+
declare const ragsTorso: PartFactory;
|
|
416
|
+
/** Robe with skirt */
|
|
417
|
+
declare const robeTorso: PartFactory;
|
|
418
|
+
|
|
419
|
+
declare const humanArm: PartFactory;
|
|
420
|
+
declare const boneArm: PartFactory;
|
|
421
|
+
declare const armorArm: PartFactory;
|
|
422
|
+
declare const robeArm: PartFactory;
|
|
423
|
+
declare const humanForearm: PartFactory;
|
|
424
|
+
declare const boneForearm: PartFactory;
|
|
425
|
+
declare const armorForearm: PartFactory;
|
|
426
|
+
declare const robeForearm: PartFactory;
|
|
427
|
+
|
|
428
|
+
declare const humanLeg: PartFactory;
|
|
429
|
+
declare const boneLeg: PartFactory;
|
|
430
|
+
declare const armorLeg: PartFactory;
|
|
431
|
+
declare const robeLeg: PartFactory;
|
|
432
|
+
declare const humanShin: PartFactory;
|
|
433
|
+
declare const boneShin: PartFactory;
|
|
434
|
+
declare const armorShin: PartFactory;
|
|
435
|
+
declare const robeShin: PartFactory;
|
|
436
|
+
|
|
437
|
+
/** Short sword */
|
|
438
|
+
declare const sword: PartFactory;
|
|
439
|
+
/** Battle axe */
|
|
440
|
+
declare const axe: PartFactory;
|
|
441
|
+
/** Staff */
|
|
442
|
+
declare const staff: PartFactory;
|
|
443
|
+
|
|
444
|
+
declare const playerConfig: CharacterConfig;
|
|
445
|
+
declare const skeletonConfig: CharacterConfig;
|
|
446
|
+
declare const zombieConfig: CharacterConfig;
|
|
447
|
+
declare const warriorConfig: CharacterConfig;
|
|
448
|
+
declare const mageConfig: CharacterConfig;
|
|
449
|
+
|
|
450
|
+
declare function register(clip: THREE.AnimationClip): void;
|
|
451
|
+
declare const AnimationLibrary: {
|
|
452
|
+
get(name: string): THREE.AnimationClip;
|
|
453
|
+
getAll(): THREE.AnimationClip[];
|
|
454
|
+
register: typeof register;
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Serializable animation format for data-driven animations.
|
|
459
|
+
* Stored in MongoDB, exported via .igneokit, editable in the animation editor.
|
|
460
|
+
*/
|
|
461
|
+
interface BonePose {
|
|
462
|
+
boneName: string;
|
|
463
|
+
rotation: {
|
|
464
|
+
x: number;
|
|
465
|
+
y: number;
|
|
466
|
+
z: number;
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
interface Keyframe {
|
|
470
|
+
time: number;
|
|
471
|
+
poses: BonePose[];
|
|
472
|
+
}
|
|
473
|
+
interface AnimationData {
|
|
474
|
+
_id?: string;
|
|
475
|
+
name: string;
|
|
476
|
+
duration: number;
|
|
477
|
+
loop: boolean;
|
|
478
|
+
morphologyId: string;
|
|
479
|
+
keyframes: Keyframe[];
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Builds a THREE.AnimationClip from serializable AnimationData.
|
|
484
|
+
* Uses the morphology's bone hierarchy to build dot-notation track paths
|
|
485
|
+
* compatible with THREE's property binding system.
|
|
486
|
+
*/
|
|
487
|
+
declare function buildAnimationClip(data: AnimationData, morphology?: MorphologyData): THREE.AnimationClip;
|
|
488
|
+
/**
|
|
489
|
+
* Converts an existing hardcoded AnimationClip to AnimationData format.
|
|
490
|
+
* Useful for migrating existing animations.
|
|
491
|
+
*/
|
|
492
|
+
declare function clipToAnimationData(clip: THREE.AnimationClip, morphologyId: string, loop?: boolean): AnimationData;
|
|
493
|
+
|
|
494
|
+
/** Subtle breathing/bobbing animation */
|
|
495
|
+
declare function createIdleClip(): THREE.AnimationClip;
|
|
496
|
+
|
|
497
|
+
/** Walk cycle - arms and legs swing opposite */
|
|
498
|
+
declare function createWalkClip(): THREE.AnimationClip;
|
|
499
|
+
|
|
500
|
+
/** Single attack swing with right arm */
|
|
501
|
+
declare function createAttackClip(): THREE.AnimationClip;
|
|
502
|
+
|
|
503
|
+
export { type AnimationData, AnimationLibrary, type ArmorPieceData, type ArmorSetData, type Attachment, type BodyPartDefinition, type BoneDefinition, type BonePose, type BoneRefs, CharacterAssembler, type CharacterConfig, type CharacterDefinition, CharacterEntity, CollisionMap, type ColorPalette, type Connector, Engine, type EntityState, FieldScene, GameScene, InputManager, type InternalPivot, type Keyframe, type MapData, type MapObject, MapRenderer, type MorphologyData, type MorphologyScene, type PartFactory, type PivotAxes, Player, type Portal, type RotationConstraints, SceneManager, type SceneStateData, type SlotName, type SpawnPoint$1 as SpawnPoint, type TileData, type Vec3, type Voxel, type VoxelEditorMesh, type VoxelPartData, armorArm, armorForearm, armorLeg, armorShin, armorTorso, axe, boneArm, boneForearm, boneLeg, boneShin, buildAnimationClip, buildEditorMesh, buildFromMorphology, buildRuntimeMesh, clipToAnimationData, createAttackClip, createEmptyMap, createIdleClip, createIsometricCamera, createSkeleton, createWalkClip, createWorldGrid, getAdjacentPosition, getClickedVoxelPosition, helmetHead, hoodHead, humanArm, humanForearm, humanHead, humanLeg, humanShin, humanoidMorphology, mageConfig, playerConfig, ragsTorso, ribcageTorso, robeArm, robeForearm, robeLeg, robeShin, robeTorso, skeletonConfig, skullHead, staff, sword, tunicTorso, updateCameraTarget, warriorConfig, zombieConfig };
|