ldr 0.24.1 → 0.25.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 +4 -1
- package/dist/cli.js +63 -23
- package/dist/cull.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +207 -52
- package/dist/load-worker.gen.d.ts +1 -1
- package/dist/model.d.ts +10 -0
- package/dist/node/index.js +224 -62
- package/dist/render.d.ts +3 -1
- package/dist/scene.d.ts +1 -1
- package/package.json +1 -1
package/dist/render.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { decodePack, type Pack } from './pack-io.js';
|
|
3
|
-
import { type ColourSurface } from './model.js';
|
|
3
|
+
import { type ColourSurface, type LDrawColor } from './model.js';
|
|
4
4
|
export { decodePack, type Pack };
|
|
5
5
|
/** `edges`: LDraw edge lines, welded + indexed and sharing each batch's instance matrices (`'idx'` is the same as `true`).
|
|
6
6
|
* `cond`: draw type-5 conditional lines when the pack carries them (pack v2, built with `cond: true`) and edges are on. Default true.
|
|
7
7
|
* `condStuds`: also draw them on stud batches (stud silhouettes). Default true. Uncertified (no BFC) parts are always double-sided. */
|
|
8
8
|
export type LdrParams = {
|
|
9
9
|
cull?: CullResult;
|
|
10
|
+
/** Colours of instance colour keys that aren't table codes: model-level `0 !COLOUR` definitions (see `sceneInstances`). */
|
|
11
|
+
localColours?: Map<string, LDrawColor>;
|
|
10
12
|
cullStuds: boolean;
|
|
11
13
|
cullUnder: boolean;
|
|
12
14
|
edges?: boolean | 'idx';
|
package/dist/scene.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as THREE from "three";
|
|
2
2
|
import { type Pack } from "./render.js";
|
|
3
3
|
import { type CullResult } from "./cull.js";
|
|
4
|
-
import type
|
|
4
|
+
import { type PartInstance, type LDrawColor } from "./model.js";
|
|
5
5
|
import type { StepView } from "./spec.js";
|
|
6
6
|
export type ColorSource = Map<number, string | LDrawColor> | Record<number | string, string | LDrawColor> | ((code: number) => THREE.ColorRepresentation | undefined);
|
|
7
7
|
export interface LdrObjectOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ldr",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "High-performance LEGO (LDraw) rendering for three.js: instanced parts packs, hidden stud/tube culling, low-detail studs, indexed edges, build steps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan Bacon",
|