@tomvandig/mosaic 0.0.0-stage → 0.2.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/README.md +50 -2
- package/dist/mosaic.cjs +97629 -0
- package/package.json +54 -4
package/README.md
CHANGED
|
@@ -1,3 +1,51 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @tomvandig/mosaic
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The command line for [Mosaic](https://tomvandig.github.io/mosaic/dist/docs/), a file format for
|
|
4
|
+
incremental collaboration on geometric, structured data.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
npx @tomvandig/mosaic help
|
|
8
|
+
|
|
9
|
+
# convert a glTF model, straight from a URL
|
|
10
|
+
npx @tomvandig/mosaic pack https://tomvandig.github.io/mosaic/dist/docs/models/DamagedHelmet.glb
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or install it, and the command is `mosaic`:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g @tomvandig/mosaic
|
|
17
|
+
mosaic help
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Needs Node.js 24 or later.
|
|
21
|
+
|
|
22
|
+
## Commands
|
|
23
|
+
|
|
24
|
+
| Command | |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| `mosaic pack <input> [output.tsr] [flags]` | Pack into a `.tsr` archive, by extension: a source document (`.json`), glTF (`.gltf`, `.glb`, or a URL), IFC (`.ifc`) or SVG (`.svg`) |
|
|
27
|
+
| `mosaic gltf <input.gltf\|.glb\|url> [output.mosaic.json] [--stable-ids]` | Convert glTF into an editable source document |
|
|
28
|
+
| `mosaic ifc <input.ifc> [output.mosaic.json] [--center] [--no-geometry] [--seed=<text>]` | Convert an IFC model into an editable source document |
|
|
29
|
+
| `mosaic compose <input.tsr\|.duckdb> [output.glb]` | Compose an archive and its imports into a `.glb` |
|
|
30
|
+
| `mosaic serve <database.duckdb> [--port <n>] [--host <name>]` | Serve the Mosaic API, and a viewer, over a database |
|
|
31
|
+
| `mosaic codegen <input_dir> <output_dir> <ts\|cs>` | Generate typed classes from component schemas |
|
|
32
|
+
|
|
33
|
+
See [the documentation](https://tomvandig.github.io/mosaic/dist/docs/tools/) for each.
|
|
34
|
+
|
|
35
|
+
## DuckDB
|
|
36
|
+
|
|
37
|
+
The commands that read or write a database (`compose` given a `.duckdb`, and `serve`) need
|
|
38
|
+
[DuckDB](https://duckdb.org). It isn't installed with the CLI, because its native binary is large
|
|
39
|
+
and no other command uses it. If it's missing, the CLI says so and gives the exact command, for
|
|
40
|
+
example:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm install @duckdb/node-api@1.5.5-r.4
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Run it in the directory you run `mosaic` from, or set `MOSAIC_DUCKDB` to a directory where it is
|
|
47
|
+
installed.
|
|
48
|
+
|
|
49
|
+
## Status
|
|
50
|
+
|
|
51
|
+
Mosaic is pre-1.0. Expect breaking changes.
|