ldr 0.32.0 → 0.33.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/README.md +3 -3
- package/dist/cli.js +114 -55
- package/dist/index.js +106 -15
- package/dist/node/compile.d.ts +21 -0
- package/dist/node/index.js +251 -88
- package/dist/render.d.ts +1 -1
- package/dist/scene.d.ts +1 -1
- package/package.json +1 -1
package/dist/render.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type LdrParams = {
|
|
|
17
17
|
condStuds?: boolean;
|
|
18
18
|
/** Draw textured (!TEXMAP) parts with their PNGs when the pack carries them (pack v2 "tex", `ldr pack --textures`). Default true. */
|
|
19
19
|
tex?: boolean;
|
|
20
|
-
/** Distance LOD: spatial clusters per part, simplified meshes from `lod` packs, studs as full → flat disc → dropped, edges hidden once sub-pixel. Default true. */
|
|
20
|
+
/** Distance LOD: spatial clusters per part, simplified meshes from `lod` packs, studs as full → square stud → flat disc → dropped, edges hidden once sub-pixel. Default true. */
|
|
21
21
|
lod?: boolean;
|
|
22
22
|
/** LOD: max screen-space error in pixels (default 0.5). */
|
|
23
23
|
lodPx?: number;
|
package/dist/scene.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface LdrObjectOptions {
|
|
|
38
38
|
step?: number;
|
|
39
39
|
/** Distance LOD, re-selected for each camera you render with. Default true. Batches are split into spatial clusters (so off-screen
|
|
40
40
|
* ones are frustum-culled); each cluster draws the coarsest simplified mesh (from `lod` packs, the `buildPack` default) whose error
|
|
41
|
-
* stays under `lodPx`, swaps studs to a flat disc then drops them once under `lodPx`, and hides edge lines where a stud spans under
|
|
41
|
+
* stays under `lodPx`, swaps closed studs to a 10-triangle square stud, then a flat disc, then drops them once under `lodPx`, and hides edge lines where a stud spans under
|
|
42
42
|
* `lodEdgePx`. Datsville 100k on an M4 Pro: 22 -> 4.3 ms per frame (57 -> 6.2 ms with edges); <=1.5% of pixels differ without edges. */
|
|
43
43
|
lod?: boolean;
|
|
44
44
|
/** LOD: max screen-space error in pixels. Default 0.5. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ldr",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.1",
|
|
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",
|