@margoengine/voxel-edit 0.0.0-stage → 0.1.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/LICENSE +201 -0
- package/NOTICE +4 -0
- package/README.md +446 -3
- package/dist/animation.d.ts +50 -0
- package/dist/animation.js +88 -0
- package/dist/assist.d.ts +24 -0
- package/dist/assist.js +52 -0
- package/dist/brush-gpu.d.ts +62 -0
- package/dist/bytes.d.ts +55 -0
- package/dist/collab.d.ts +77 -0
- package/dist/collab.js +159 -0
- package/dist/edit.d.ts +30 -0
- package/dist/edit.js +361 -0
- package/dist/export.d.ts +58 -0
- package/dist/export.js +52 -0
- package/dist/file-colors-DHT5vrzW.js +55 -0
- package/dist/file-colors.d.ts +16 -0
- package/dist/format-plist.d.ts +4 -0
- package/dist/formats-extra.d.ts +20 -0
- package/dist/formats-extra.js +335 -0
- package/dist/formats.d.ts +96 -0
- package/dist/formats.js +924 -0
- package/dist/generate.d.ts +63 -0
- package/dist/generate.js +103 -0
- package/dist/gox.d.ts +60 -0
- package/dist/gpu.d.ts +74 -0
- package/dist/gpu.js +167 -0
- package/dist/grid-B2V0TGLV.js +120 -0
- package/dist/grid.d.ts +75 -0
- package/dist/history.d.ts +65 -0
- package/dist/history.js +75 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +631 -0
- package/dist/layout.d.ts +76 -0
- package/dist/library.d.ts +50 -0
- package/dist/library.js +89 -0
- package/dist/mesh.d.ts +127 -0
- package/dist/mesh.js +365 -0
- package/dist/model.d.ts +173 -0
- package/dist/pick.d.ts +34 -0
- package/dist/pick.js +122 -0
- package/dist/raster.d.ts +89 -0
- package/dist/rig.d.ts +88 -0
- package/dist/rig.js +216 -0
- package/dist/select.d.ts +50 -0
- package/dist/select.js +94 -0
- package/dist/shaders-CcSeamtF.js +234 -0
- package/dist/shaders.d.ts +116 -0
- package/dist/shaders.js +1 -0
- package/dist/slices.d.ts +75 -0
- package/dist/smooth.d.ts +43 -0
- package/dist/smooth.js +212 -0
- package/dist/sparse.d.ts +239 -0
- package/dist/sparse.js +646 -0
- package/dist/stamp.d.ts +88 -0
- package/dist/vmax.d.ts +48 -0
- package/dist/vox-resolve.d.ts +64 -0
- package/dist/vox-scene.d.ts +51 -0
- package/dist/vox.d.ts +30 -0
- package/dist/vox.js +684 -0
- package/dist/voxelize.d.ts +70 -0
- package/dist/voxelize.js +249 -0
- package/dist/vxm.d.ts +54 -0
- package/package.json +132 -6
package/dist/stamp.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Vec3 } from '@margoengine/math';
|
|
2
|
+
import { type GridEdit, type GridLimits, type VoxelGrid } from './grid.js';
|
|
3
|
+
import { type SparseEdit, SparseGrid } from './sparse.js';
|
|
4
|
+
/** Options of {@link mirrorCells}. */
|
|
5
|
+
export interface MirrorOptions extends GridLimits {
|
|
6
|
+
/** Size of the grid the samples land in; mirroring maps cell `c` to `size - 1 - c` on a mirrored axis. */
|
|
7
|
+
size: Vec3;
|
|
8
|
+
/** Whether to mirror across the centre plane of x, y and z. */
|
|
9
|
+
mirror: readonly [boolean, boolean, boolean];
|
|
10
|
+
/** Edge of the cubic brush stamped at each sample, 1 to 255: offsets `-floor((side - 1) / 2)` on. Default 1. */
|
|
11
|
+
side?: number;
|
|
12
|
+
}
|
|
13
|
+
/** Mirror-expanded brush cells ({@link mirrorCells}). */
|
|
14
|
+
export interface MirrorStamp {
|
|
15
|
+
/** Cell indexes inside the grid, each once, in stamping order (its first occurrence). */
|
|
16
|
+
cells: Float64Array;
|
|
17
|
+
/** Per cell, the index of the last sample that reached it; only when samples carry an index. */
|
|
18
|
+
values?: Uint8Array;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Expands brush samples through principal-axis mirrors: each sample `[x, y, z]` (or `[x, y, z, index]`) stamps a
|
|
22
|
+
* cubic brush of `side` cells, and every brush cell is repeated at its mirror images, x outermost, then y, then z.
|
|
23
|
+
* Cells outside the grid are dropped and a cell reached twice (a sample on a centre plane, overlapping brushes) is
|
|
24
|
+
* kept once at its first position; with indexed samples the last sample reaching a cell sets its value.
|
|
25
|
+
*/
|
|
26
|
+
export declare function mirrorCells(samples: Iterable<readonly number[]>, options: MirrorOptions): MirrorStamp;
|
|
27
|
+
/** Options of {@link stampCells}. */
|
|
28
|
+
export interface StampOptions {
|
|
29
|
+
/** `'fill'` writes every cell, `'paint'` only filled ones, `'erase'` empties them. */
|
|
30
|
+
operation: 'fill' | 'paint' | 'erase';
|
|
31
|
+
/** Palette index written by fill and paint, 1-255; without it fill and paint write `values`. */
|
|
32
|
+
color?: number;
|
|
33
|
+
/** Per cell of the stamp, the index fill or paint writes (a {@link MirrorStamp}'s values); 0 empties the cell. */
|
|
34
|
+
values?: Uint8Array;
|
|
35
|
+
/** When given, only cells listed here (cell indexes) change. */
|
|
36
|
+
selection?: {
|
|
37
|
+
has(index: number): boolean;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** Writes a stamp into a dense grid as one edit; the input grid is unchanged. */
|
|
41
|
+
export declare function stampCells(target: VoxelGrid, cells: ArrayLike<number>, options: StampOptions): GridEdit;
|
|
42
|
+
/** Writes a stamp into a sparse grid as one undoable edit; nothing is kept when a check fails. */
|
|
43
|
+
export declare function stampCells(target: SparseGrid, cells: ArrayLike<number>, options: StampOptions): SparseEdit;
|
|
44
|
+
/** Options of {@link pasteCells}. */
|
|
45
|
+
export interface PasteOptions extends GridLimits {
|
|
46
|
+
/** Where clip cell (0, 0, 0) lands in the target, in whole cells. */
|
|
47
|
+
offset: Vec3;
|
|
48
|
+
/** 256 identity strings of the target's palette slots (colour plus material, say); equal strings mean equal slots. */
|
|
49
|
+
targetKeys: readonly string[];
|
|
50
|
+
/** 256 identity strings of the clip's palette slots. */
|
|
51
|
+
clipKeys: readonly string[];
|
|
52
|
+
}
|
|
53
|
+
/** A paste that fit ({@link pasteCells}); the grid fields come from the dense or sparse edit. */
|
|
54
|
+
export interface PastePlan {
|
|
55
|
+
status: 'pasted';
|
|
56
|
+
/** Target palette index of each clip index the paste used; 0 elsewhere. */
|
|
57
|
+
paletteMap: Uint8Array;
|
|
58
|
+
/** Clip indexes given a new target slot, in first-use order: copy the clip's palette and material entry there. */
|
|
59
|
+
assignments: {
|
|
60
|
+
from: number;
|
|
61
|
+
to: number;
|
|
62
|
+
}[];
|
|
63
|
+
/** Target cell indexes written, each once, in clip order: the pasted selection. */
|
|
64
|
+
selection: Float64Array;
|
|
65
|
+
/** Clip cells that fell outside the target. */
|
|
66
|
+
clipped: number;
|
|
67
|
+
}
|
|
68
|
+
/** A paste refused because the target palette is full; nothing changed. */
|
|
69
|
+
export interface PasteOverflow {
|
|
70
|
+
status: 'overflow';
|
|
71
|
+
/** Clip identities the target has no slot for. */
|
|
72
|
+
needed: number;
|
|
73
|
+
/** Target slots that were free for them. */
|
|
74
|
+
free: number;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Pastes clip cells `[x, y, z, index]` (index 1-255, clip palette) into a dense grid at `offset`, as one edit or not
|
|
78
|
+
* at all. See the sparse overload for the palette rules.
|
|
79
|
+
*/
|
|
80
|
+
export declare function pasteCells(target: VoxelGrid, clip: Iterable<readonly number[]>, options: PasteOptions): (PastePlan & GridEdit) | PasteOverflow;
|
|
81
|
+
/**
|
|
82
|
+
* Pastes clip cells into a sparse grid as one undoable edit, or not at all. Each clip index used keeps its own target
|
|
83
|
+
* slot when that slot already has the same identity, else takes the first target slot (1-255) with that identity,
|
|
84
|
+
* else the lowest slot no remaining target cell or earlier mapping uses (its entry must then be copied, see
|
|
85
|
+
* `assignments`). Equal-looking slots therefore stay distinct where the saved slot numbers match. When the target
|
|
86
|
+
* has no slot left the result is `'overflow'` and nothing changes; colours are never approximated.
|
|
87
|
+
*/
|
|
88
|
+
export declare function pasteCells(target: SparseGrid, clip: Iterable<readonly number[]>, options: PasteOptions): (PastePlan & SparseEdit) | PasteOverflow;
|
package/dist/vmax.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { VoxelFile, VoxelFileModel } from './formats.js';
|
|
2
|
+
import { type GridLimits } from './grid.js';
|
|
3
|
+
/** Archive and decoded-payload budgets of {@link parseVMAX}. */
|
|
4
|
+
export interface VMAXOptions extends GridLimits {
|
|
5
|
+
/** Maximum total extracted bytes plus decoded plist bytes. Default 256 MiB. */
|
|
6
|
+
maxBytes?: number;
|
|
7
|
+
/** Maximum archive entries. Default 10,000. */
|
|
8
|
+
maxEntries?: number;
|
|
9
|
+
/** Cancels archive reads and checks between objects and compressed blocks. */
|
|
10
|
+
signal?: AbortSignal;
|
|
11
|
+
}
|
|
12
|
+
/** A VMAX object or group, retaining its hierarchy and local and world transforms. */
|
|
13
|
+
export interface VMAXNode {
|
|
14
|
+
id: string;
|
|
15
|
+
parentId?: string;
|
|
16
|
+
name: string;
|
|
17
|
+
/** The node's own hidden flag; ancestor flags remain available through parentId. */
|
|
18
|
+
hidden: boolean;
|
|
19
|
+
/** Column-major local TRS matrix in the file's Y-up axes. */
|
|
20
|
+
matrix: Float64Array;
|
|
21
|
+
/** Parent-composed matrix in file scene units. */
|
|
22
|
+
worldMatrix: Float64Array;
|
|
23
|
+
/** Original scene fields, including bounds, center and editor metadata. */
|
|
24
|
+
metadata: Readonly<Record<string, unknown>>;
|
|
25
|
+
}
|
|
26
|
+
/** A voxel object. Apply gridToWorld to grid corner coordinates to place it in the scene. */
|
|
27
|
+
export interface VMAXModel extends VoxelFileModel {
|
|
28
|
+
node: VMAXNode;
|
|
29
|
+
gridToWorld: Float64Array;
|
|
30
|
+
/** One material slot per grid cell, 0 for air; original material byte is retained. */
|
|
31
|
+
materialSlots: Uint8Array;
|
|
32
|
+
/** Original material palette settings, if present. */
|
|
33
|
+
settings?: Readonly<Record<string, unknown>>;
|
|
34
|
+
}
|
|
35
|
+
/** Decoded voxel geometry, colour palette and scene hierarchy. */
|
|
36
|
+
export interface VMAXFile extends VoxelFile {
|
|
37
|
+
models: VMAXModel[];
|
|
38
|
+
groups: VMAXNode[];
|
|
39
|
+
/** Original scene.json fields, including cameras and render settings. */
|
|
40
|
+
scene: Readonly<Record<string, unknown>>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Reads a ZIP-packaged VMAX scene (stored or deflated entries), all voxel objects,
|
|
44
|
+
* current snapshots and legacy chunks. Last snapshot per chunk wins. Geometry is
|
|
45
|
+
* cropped to occupied bounds, with full placement retained by gridToWorld. Undo
|
|
46
|
+
* history and previews are not loaded; original scene and material metadata remain.
|
|
47
|
+
*/
|
|
48
|
+
export declare function parseVMAX(input: Uint8Array | ArrayBuffer, options?: VMAXOptions): Promise<VMAXFile>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { MutableVec3 } from '@margoengine/math';
|
|
2
|
+
import type { VoxScene } from '@margoengine/voxel/vox';
|
|
3
|
+
/**
|
|
4
|
+
* Where a model's box lands on its transform's translation `t` (all in .vox's Z-up cells, after the composed rotation
|
|
5
|
+
* R, a signed axis permutation). For each world axis, let `s` be the model's size along the source axis R maps onto it.
|
|
6
|
+
*
|
|
7
|
+
* - `'box-v1'`: the turned box spans `t - floor(s / 2)` to `t - floor(s / 2) + s` on every axis, whichever way R
|
|
8
|
+
* points; a flip mirrors the cells inside that span. This is `@margoengine/voxel/vox` `pasteVoxModel`'s placement
|
|
9
|
+
* and Margo Voxel Studio's saved placement.
|
|
10
|
+
* - `'pivot-v1'`: the model turns about its own corner `floor(size / 2)`, which lands on `t`, so a flipped axis of odd
|
|
11
|
+
* size spans one cell lower than under `'box-v1'`. This is `@margoengine/voxel-pathtracer` `magicaVoxelMatrix`.
|
|
12
|
+
*
|
|
13
|
+
* Both agree whenever every flipped axis has an even size. A new convention gets a new name; these never change.
|
|
14
|
+
*/
|
|
15
|
+
export type VoxCentering = 'box-v1' | 'pivot-v1';
|
|
16
|
+
/** Options of {@link resolveVoxScene}. */
|
|
17
|
+
export interface VoxResolveOptions {
|
|
18
|
+
/** The frame whose keys are in force, a whole number from 0. Default 0. */
|
|
19
|
+
frame?: number;
|
|
20
|
+
/** The box-centering convention of {@link VoxInstance.matrix}; required, so saved placements never move silently. */
|
|
21
|
+
centering: VoxCentering;
|
|
22
|
+
}
|
|
23
|
+
/** One shape node placed at a frame ({@link resolveVoxScene}). */
|
|
24
|
+
export interface VoxInstance {
|
|
25
|
+
/** Id of the shape node. */
|
|
26
|
+
shapeId: number;
|
|
27
|
+
/** Index into `scene.models` of the model the shape shows at the frame. */
|
|
28
|
+
model: number;
|
|
29
|
+
/** The shape's own name, else the nearest named node above it; undefined when none is named. */
|
|
30
|
+
name?: string;
|
|
31
|
+
/** False when the shape, a node above it or the layer of a transform above it is hidden. */
|
|
32
|
+
visible: boolean;
|
|
33
|
+
/** Ids of the transforms above the shape, root first. */
|
|
34
|
+
transformIds: number[];
|
|
35
|
+
/** Layer ids of those transforms, root first, each once; -1 (no layer) left out. */
|
|
36
|
+
layerIds: number[];
|
|
37
|
+
/** The composed rotation in .vox's Z-up axes: row-major 3 x 3 signed axis permutation. */
|
|
38
|
+
rotation: number[];
|
|
39
|
+
/** The composed translation in .vox's Z-up cells. */
|
|
40
|
+
translation: MutableVec3;
|
|
41
|
+
/**
|
|
42
|
+
* Column-major 4 x 4 placement under {@link VoxResolveOptions.centering}: corner coordinates of the model's
|
|
43
|
+
* `gridFromVox` grid (cells, Y up) to world cells, Y up (.vox z becomes y and .vox y becomes -z). For a mesh whose
|
|
44
|
+
* vertices are grid corners minus a pivot, multiply by a translation by that pivot on the right.
|
|
45
|
+
*/
|
|
46
|
+
matrix: number[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Every shape instance of a .vox scene at one frame, in depth-first order (roots in file order, group children in
|
|
50
|
+
* order): the model shown, its composed rotation and translation, visibility, name, transforms and layers, and its
|
|
51
|
+
* placement matrix under the chosen centering. Each transform and shape uses the key in force at the frame (the
|
|
52
|
+
* latest at or before it, else its earliest; among keys of the same frame the first listed). The scene is read,
|
|
53
|
+
* never changed; a scene without nodes (version 150) has no instances. Untrusted input is fine: links, keys and model
|
|
54
|
+
* sizes are checked first.
|
|
55
|
+
* @throws TypeError when the scene is not parseVox-shaped or the centering is unknown.
|
|
56
|
+
* @throws RangeError for a bad frame, a missing or shared node, a cycle, an empty or malformed key, or a model size
|
|
57
|
+
* outside 1 to 256.
|
|
58
|
+
*/
|
|
59
|
+
export declare function resolveVoxScene(scene: VoxScene, options: VoxResolveOptions): VoxInstance[];
|
|
60
|
+
/** The first and last key frame of any transform or shape in the scene, or undefined when it has no keys. */
|
|
61
|
+
export declare function voxFrameRange(scene: VoxScene): {
|
|
62
|
+
startFrame: number;
|
|
63
|
+
endFrame: number;
|
|
64
|
+
} | undefined;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type Vec3 } from '@margoengine/math';
|
|
2
|
+
import type { VoxScene } from '@margoengine/voxel/vox';
|
|
3
|
+
/** Name and visibility of a layer or node. */
|
|
4
|
+
export interface VoxNodePatch {
|
|
5
|
+
/** 1 to 200 characters (trimmed). */
|
|
6
|
+
name?: string;
|
|
7
|
+
hidden?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** One transform key, in .vox's Z-up local cells. */
|
|
10
|
+
export interface VoxTransformPatch {
|
|
11
|
+
/** Whole-cell translation, each within int32. */
|
|
12
|
+
translation?: Vec3;
|
|
13
|
+
/** Row-major 3 x 3 signed axis permutation (each row and column one +1 or -1). */
|
|
14
|
+
rotation?: readonly number[];
|
|
15
|
+
}
|
|
16
|
+
/** Adds a visible layer named `name` with the next free id. */
|
|
17
|
+
export declare function addVoxLayer(scene: VoxScene, name: string): VoxScene;
|
|
18
|
+
/** Renames or shows / hides a layer. */
|
|
19
|
+
export declare function updateVoxLayer(scene: VoxScene, id: number, patch: VoxNodePatch): VoxScene;
|
|
20
|
+
/** Renames or shows / hides one node (and so its subtree); models stay shared. */
|
|
21
|
+
export declare function updateVoxNode(scene: VoxScene, id: number, patch: VoxNodePatch): VoxScene;
|
|
22
|
+
/** Puts a transform node on layer `layerId`, or on none with -1. */
|
|
23
|
+
export declare function setVoxNodeLayer(scene: VoxScene, transformId: number, layerId: number): VoxScene;
|
|
24
|
+
/** Sets or adds the transform key at `frame`; fields left out keep the key in force at that frame. */
|
|
25
|
+
export declare function setVoxTransformKey(scene: VoxScene, transformId: number, frame: number, patch: VoxTransformPatch): VoxScene;
|
|
26
|
+
/** Deletes the transform key at `frame` (nothing when there is none); the last key cannot go. */
|
|
27
|
+
export declare function deleteVoxTransformKey(scene: VoxScene, transformId: number, frame: number): VoxScene;
|
|
28
|
+
/** Sets or adds the shape key at `frame` to show model `model` (an index into `scene.models`). */
|
|
29
|
+
export declare function setVoxShapeKey(scene: VoxScene, shapeId: number, frame: number, model: number): VoxScene;
|
|
30
|
+
/** Deletes the shape key at `frame` (nothing when there is none); the model itself stays. The last key cannot go. */
|
|
31
|
+
export declare function deleteVoxShapeKey(scene: VoxScene, shapeId: number, frame: number): VoxScene;
|
|
32
|
+
/** Adds an empty group (under a new identity transform) to group `parentId`; returns the scene and both new ids. */
|
|
33
|
+
export declare function addVoxGroup(scene: VoxScene, parentId: number, name: string): {
|
|
34
|
+
scene: VoxScene;
|
|
35
|
+
transformId: number;
|
|
36
|
+
groupId: number;
|
|
37
|
+
};
|
|
38
|
+
/** Adds a placed copy of model `model` to group `parentId`; the voxels are shared, not copied. */
|
|
39
|
+
export declare function addVoxInstance(scene: VoxScene, parentId: number, model: number, name: string): {
|
|
40
|
+
scene: VoxScene;
|
|
41
|
+
transformId: number;
|
|
42
|
+
shapeId: number;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Moves transform `transformId` (and its subtree) into group `parentId`, rewriting its keys so it stays where it was
|
|
46
|
+
* in the world at every key frame of its old and new ancestors. Refused when that needs a non-axis rotation or a
|
|
47
|
+
* fractional translation, when it would hide a visible node, or when the target is inside the moved subtree.
|
|
48
|
+
*/
|
|
49
|
+
export declare function moveVoxNode(scene: VoxScene, transformId: number, parentId: number): VoxScene;
|
|
50
|
+
/** Deletes transform `transformId` and its subtree; models, palettes and everything else stay. The root cannot go. */
|
|
51
|
+
export declare function deleteVoxNode(scene: VoxScene, transformId: number): VoxScene;
|
package/dist/vox.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { VoxModel } from '@margoengine/voxel/vox';
|
|
2
|
+
import { type GridLimits, type VoxelGrid } from './grid.js';
|
|
3
|
+
import { type GridWindow, SparseGrid } from './sparse.js';
|
|
4
|
+
export * from './vox-resolve.js';
|
|
5
|
+
export * from './vox-scene.js';
|
|
6
|
+
/**
|
|
7
|
+
* A grid from a .vox model (`parseVox(bytes).models[i]`), turned from MagicaVoxel's Z up to Y up: .vox cell
|
|
8
|
+
* (x, y, z) becomes grid cell (x, z, sizeY - 1 - y). When a cell is listed twice the later entry wins.
|
|
9
|
+
*/
|
|
10
|
+
export declare function gridFromVox(model: VoxModel, limits?: GridLimits): VoxelGrid;
|
|
11
|
+
/**
|
|
12
|
+
* A .vox model from a dense or sparse grid (each axis 1 to 256), the inverse turn of {@link gridFromVox}. When
|
|
13
|
+
* `original` holds the same cells it is returned as it is, so an unedited model keeps its record order and duplicates.
|
|
14
|
+
*/
|
|
15
|
+
export declare function voxFromGrid(source: VoxelGrid | SparseGrid, original?: VoxModel, limits?: GridLimits): VoxModel;
|
|
16
|
+
/** Options of {@link voxTiles}. */
|
|
17
|
+
export interface VoxTileOptions extends GridLimits {
|
|
18
|
+
/** Tile edge in cells, 1 to 256 (the .vox limit). Default 256. */
|
|
19
|
+
tileSize?: number;
|
|
20
|
+
/** Most tiles, 1 to 65,536. Default 4,096. */
|
|
21
|
+
maxTiles?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Splits a dense or sparse grid into `.vox`-sized models: the filled cells of each `tileSize`-cell box (boxes aligned
|
|
25
|
+
* at cell 0) cropped to their own bounds, sorted by lower corner (y, then z, then x). Each tile is a Y-up window
|
|
26
|
+
* whose `origin` is its exact offset in `source` cells; no axis is turned, so `voxFromGrid(tile)` gives the model and
|
|
27
|
+
* the caller places it. Empty boxes give no tile; an empty grid gives none. A sparse grid is read through its filled
|
|
28
|
+
* cells only. Counts are checked before any tile is allocated: `maxTiles` tiles and `maxCells` cells in all.
|
|
29
|
+
*/
|
|
30
|
+
export declare function voxTiles(source: VoxelGrid | SparseGrid, options?: VoxTileOptions): GridWindow[];
|