three-usd-robot 0.9.0 → 0.10.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 +16 -6
- package/dist/{ThreeUsdRobot-BAh-48DD.d.ts → ThreeUsdRobot-B7Z4oORO.d.ts} +1 -1
- package/dist/{ThreeUsdRobotLoader-DYtvelif.d.ts → ThreeUsdRobotLoader-NdFAVN96.d.ts} +9 -2
- package/dist/{buildKinematicTree-DQ4Vr4sJ.d.ts → buildKinematicTree-BCySuZZn.d.ts} +4 -0
- package/dist/chunk-CDQPWWMQ.js +951 -0
- package/dist/chunk-CDQPWWMQ.js.map +1 -0
- package/dist/{chunk-2UD32EGU.js → chunk-NFKK5LJK.js} +451 -49
- package/dist/chunk-NFKK5LJK.js.map +1 -0
- package/dist/{chunk-TE4MPP5Q.js → chunk-SSSDVLUK.js} +3 -3
- package/dist/{chunk-TE4MPP5Q.js.map → chunk-SSSDVLUK.js.map} +1 -1
- package/dist/core.d.ts +47 -5
- package/dist/core.js +2 -2
- package/dist/extras.d.ts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/index.d.ts +73 -13
- package/dist/index.js +5 -5
- package/dist/react.d.ts +3 -3
- package/dist/react.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-2UD32EGU.js.map +0 -1
- package/dist/chunk-XEXFGL7R.js +0 -529
- package/dist/chunk-XEXFGL7R.js.map +0 -1
package/README.md
CHANGED
|
@@ -23,10 +23,13 @@ exported back to `.usda` / `.usdz` in the browser.
|
|
|
23
23
|
instanceable prims are composed for you.
|
|
24
24
|
- **Robots** — links, joints (fixed / revolute / continuous / prismatic), limits,
|
|
25
25
|
drives and the initial pose become a `setJointValue`-able hierarchy.
|
|
26
|
-
- **Rendering** — meshes
|
|
27
|
-
`Capsule` / `Cone`)
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
- **Rendering** — meshes, solid gprims (`Cube` / `Sphere` / `Cylinder` /
|
|
27
|
+
`Capsule` / `Cone`), point clouds (`Points`) and curves (`BasisCurves`:
|
|
28
|
+
linear / bezier / bspline / catmullRom, periodic wrap, and an opt-in
|
|
29
|
+
`curveTubes` mode that turns authored widths into tube meshes) with
|
|
30
|
+
`UsdShade` materials (UsdPreviewSurface / OmniPBR) and textures; up-axis
|
|
31
|
+
and units normalized automatically. Articulation-free stages load as
|
|
32
|
+
static scenes.
|
|
30
33
|
- **Animation** — plays back time-sampled joint trajectories.
|
|
31
34
|
- **Export** — write robots and whole cells back to `.usda` / `.usdz`,
|
|
32
35
|
simulation-ready for Isaac Sim.
|
|
@@ -50,8 +53,15 @@ The CDN is public and CORS-enabled, so this works in the browser too. Try
|
|
|
50
53
|
FK check, and a re-export to one self-contained file), or open the Vite example
|
|
51
54
|
and pick a robot from the preset list.
|
|
52
55
|
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
Materials target **UsdPreviewSurface fidelity plus an OmniPBR mapping**:
|
|
57
|
+
constant and textured inputs, faceVarying / indexed UVs, multiple UV sets,
|
|
58
|
+
per-vertex display colors, physical extensions (`ior` / `clearcoat` /
|
|
59
|
+
specular workflow → `MeshPhysicalMaterial`), packed ORM maps,
|
|
60
|
+
`sourceColorSpace`, and purpose/strength-aware bindings. Executing MDL or
|
|
61
|
+
MaterialX shader graphs is out of scope. Not yet supported:
|
|
62
|
+
collection-based material bindings, and the exotic curve schemas
|
|
63
|
+
(`NurbsCurves`, `HermiteCurves`, `NurbsPatch`) which load with a warning and
|
|
64
|
+
are skipped.
|
|
55
65
|
|
|
56
66
|
## Install
|
|
57
67
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { J as JointType, A as Axis, a as JointDescription, L as LinkDescription, R as RobotDescription, K as KinematicTree, S as Stage } from './buildKinematicTree-
|
|
2
|
+
import { J as JointType, A as Axis, a as JointDescription, L as LinkDescription, R as RobotDescription, K as KinematicTree, S as Stage } from './buildKinematicTree-BCySuZZn.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The articulated "motion" node of a joint, inserted between the joint's two
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { R as RobotDescription } from './buildKinematicTree-
|
|
1
|
+
import { R as RobotDescription } from './buildKinematicTree-BCySuZZn.js';
|
|
2
2
|
import { A as AssetResolver, U as UsdSource, B as BinarySource } from './bytes-MOJ2oN-u.js';
|
|
3
|
-
import { W as WorldUpAxis, T as ThreeUsdRobot } from './ThreeUsdRobot-
|
|
3
|
+
import { W as WorldUpAxis, T as ThreeUsdRobot } from './ThreeUsdRobot-B7Z4oORO.js';
|
|
4
4
|
|
|
5
5
|
type ThreeUsdRobotLoaderOptions = {
|
|
6
6
|
/** Resolver for references / payloads / sublayers (default {@link DefaultAssetResolver}). */
|
|
@@ -18,6 +18,11 @@ type ThreeUsdRobotLoaderOptions = {
|
|
|
18
18
|
loadSceneGeometry?: boolean;
|
|
19
19
|
/** Load diffuse textures referenced by materials (default `true`). */
|
|
20
20
|
loadTextures?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Render `BasisCurves` that author `widths` as tube meshes instead of
|
|
23
|
+
* 1-px lines (default `false`, M18).
|
|
24
|
+
*/
|
|
25
|
+
curveTubes?: boolean;
|
|
21
26
|
/**
|
|
22
27
|
* Target world up-axis. Any stage (Y-up or Z-up) is normalized into this
|
|
23
28
|
* convention: `"Y"` for a standard three.js scene (the default behavior),
|
|
@@ -82,6 +87,8 @@ declare class ThreeUsdRobotLoader {
|
|
|
82
87
|
private openSource;
|
|
83
88
|
private openUsdzStage;
|
|
84
89
|
private buildFromStage;
|
|
90
|
+
/** Surface recognized-but-unrenderable gprim schemas instead of silence (M18). */
|
|
91
|
+
private warnUnsupportedGprims;
|
|
85
92
|
private composeStage;
|
|
86
93
|
/** Compose a layer from raw bytes, sniffing binary crate vs USDA text. */
|
|
87
94
|
private composeStageFromBytes;
|
|
@@ -364,6 +364,8 @@ declare class Attribute {
|
|
|
364
364
|
Get(time?: number): UsdValue | undefined;
|
|
365
365
|
GetTimeSamples(): Map<number, UsdValue>;
|
|
366
366
|
GetConnections(): SdfPath[];
|
|
367
|
+
/** Authored attribute metadata (`interpolation`, `elementSize`, …). */
|
|
368
|
+
GetMetadata(key: string): UsdValue | undefined;
|
|
367
369
|
}
|
|
368
370
|
/** A relationship on a prim (`UsdRelationship`-like). */
|
|
369
371
|
declare class Relationship {
|
|
@@ -378,6 +380,8 @@ declare class Relationship {
|
|
|
378
380
|
GetNamespace(): string;
|
|
379
381
|
IsCustom(): boolean;
|
|
380
382
|
GetTargets(): SdfPath[];
|
|
383
|
+
/** Authored relationship metadata (`bindMaterialAs`, …). */
|
|
384
|
+
GetMetadata(key: string): UsdValue | undefined;
|
|
381
385
|
}
|
|
382
386
|
|
|
383
387
|
/**
|