three-usd-robot 0.8.0 → 0.9.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 +23 -3
- package/dist/{ThreeUsdRobot-CsjraHqP.d.ts → ThreeUsdRobot-BAh-48DD.d.ts} +26 -6
- package/dist/{ThreeUsdRobotLoader-CxOGRLXH.d.ts → ThreeUsdRobotLoader-DYtvelif.d.ts} +13 -3
- package/dist/{buildKinematicTree-D4R0hEtN.d.ts → buildKinematicTree-DQ4Vr4sJ.d.ts} +164 -1
- package/dist/{chunk-PHHMWMCA.js → chunk-2UD32EGU.js} +11 -2
- package/dist/chunk-2UD32EGU.js.map +1 -0
- package/dist/{chunk-P6CHTMGW.js → chunk-TE4MPP5Q.js} +3 -3
- package/dist/{chunk-P6CHTMGW.js.map → chunk-TE4MPP5Q.js.map} +1 -1
- package/dist/{chunk-3CANZKP3.js → chunk-WROYLUSS.js} +24 -5
- package/dist/chunk-WROYLUSS.js.map +1 -0
- package/dist/{chunk-YX5GIEMT.js → chunk-XEXFGL7R.js} +30 -9
- package/dist/chunk-XEXFGL7R.js.map +1 -0
- package/dist/core.d.ts +3 -160
- package/dist/core.js +2 -2
- package/dist/extras.d.ts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/helpers.js +1 -1
- package/dist/index.d.ts +13 -10
- package/dist/index.js +6 -6
- package/dist/react.d.ts +3 -3
- package/dist/react.js +3 -3
- package/package.json +3 -3
- package/dist/chunk-3CANZKP3.js.map +0 -1
- package/dist/chunk-PHHMWMCA.js.map +0 -1
- package/dist/chunk-YX5GIEMT.js.map +0 -1
package/README.md
CHANGED
|
@@ -97,6 +97,25 @@ and `parseRobotDescription(data)` returns the Three.js-independent IR. Pass a
|
|
|
97
97
|
`baseUrl` as the second `parse` argument if the layer has relative references
|
|
98
98
|
or texture paths to resolve.
|
|
99
99
|
|
|
100
|
+
### World up-axis & units
|
|
101
|
+
|
|
102
|
+
Stages load normalized: `metersPerUnit` scales the root, and the authored
|
|
103
|
+
`upAxis` (`"Y"` or `"Z"`) is rotated into your world convention via `worldUp`:
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
new ThreeUsdRobotLoader(); // default: "Y" — upright in a stock three.js scene
|
|
107
|
+
new ThreeUsdRobotLoader({ worldUp: "Z" }); // robotics-style Z-up world
|
|
108
|
+
new ThreeUsdRobotLoader({ worldUp: "keep" }); // leave the authored orientation
|
|
109
|
+
|
|
110
|
+
robot.upAxis; // authored stage value ("Y" | "Z"), independent of normalization
|
|
111
|
+
robot.metersPerUnit; // authored stage scale (already applied to the root)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Isaac Sim assets are Z-up, so the default makes them stand upright in a plain
|
|
115
|
+
three.js scene; a Z-up app (ROS-style) passes `worldUp: "Z"` once instead of
|
|
116
|
+
counter-rotating per asset. The M9 option `upAxisConversion` remains as a
|
|
117
|
+
deprecated alias (`"auto"` ≡ `worldUp: "Y"`, `"none"` ≡ `"keep"`).
|
|
118
|
+
|
|
100
119
|
### Stable addressing (naming contract)
|
|
101
120
|
|
|
102
121
|
Joints and links are keyed by their prim's **leaf name** while it is unique
|
|
@@ -284,9 +303,10 @@ and `.usdz` packages to ASCII USDA.
|
|
|
284
303
|
|
|
285
304
|
[`examples/`](./examples) holds runnable Vite demos:
|
|
286
305
|
|
|
287
|
-
- **`vite-
|
|
288
|
-
vanilla Three.js + `lil-gui`, with a robot picker,
|
|
289
|
-
|
|
306
|
+
- **`vite-usd-inspector`** — the [live demo](https://three-usd-robot.vercel.app):
|
|
307
|
+
vanilla Three.js + `lil-gui`, with a robot picker, a USD structure panel
|
|
308
|
+
(prim tree + attribute inspector), a transform gizmo, joint sliders,
|
|
309
|
+
animation playback and USD export.
|
|
290
310
|
- **`vite-basic-viewer`** — the same thing through React Three Fiber.
|
|
291
311
|
|
|
292
312
|
Both take `?asset=<url>` for any asset, or `?isaac=<path under Isaac/>` to pull
|
|
@@ -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 } 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-DQ4Vr4sJ.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The articulated "motion" node of a joint, inserted between the joint's two
|
|
@@ -41,15 +41,25 @@ declare class LinkObject extends THREE.Object3D {
|
|
|
41
41
|
constructor(link: LinkDescription);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/** Target world up-axis: normalize to Y-up / Z-up, or keep the authored orientation. */
|
|
45
|
+
type WorldUpAxis = "Y" | "Z" | "keep";
|
|
44
46
|
type ThreeUsdRobotOptions = {
|
|
45
47
|
/** Clamp `setJointValue` to authored limits (default `true`). */
|
|
46
48
|
clampJointLimits?: boolean;
|
|
47
49
|
/** Size of the built-in joint-axis / link-frame helpers (stage units, default `0.15`). */
|
|
48
50
|
helperSize?: number;
|
|
49
51
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
52
|
+
* Target world up-axis. The root is rotated so the stage's authored `upAxis`
|
|
53
|
+
* lands in that convention: `"Y"` for a standard three.js scene, `"Z"` for a
|
|
54
|
+
* robotics-style Z-up world, `"keep"` for no correction. Takes precedence
|
|
55
|
+
* over the deprecated {@link ThreeUsdRobotOptions.upAxisConversion}.
|
|
56
|
+
*/
|
|
57
|
+
worldUp?: WorldUpAxis;
|
|
58
|
+
/**
|
|
59
|
+
* Legacy up-axis correction: `"auto"` ≡ `worldUp: "Y"`, `"Y"` / `"none"` ≡
|
|
60
|
+
* `worldUp: "keep"`, and `"Z"` forces the Z-up→Y-up rotation regardless of
|
|
61
|
+
* stage metadata. Default `"none"` (the loader defaults to `"auto"`).
|
|
62
|
+
* @deprecated Use {@link ThreeUsdRobotOptions.worldUp}.
|
|
53
63
|
*/
|
|
54
64
|
upAxisConversion?: "auto" | "Y" | "Z" | "none";
|
|
55
65
|
/** Extra uniform scale multiplied with the stage `metersPerUnit` (default `1`). */
|
|
@@ -77,6 +87,12 @@ declare class ThreeUsdRobot extends THREE.Object3D {
|
|
|
77
87
|
readonly robot: RobotDescription;
|
|
78
88
|
readonly tree: KinematicTree;
|
|
79
89
|
readonly clampJointLimits: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* The composed USD stage this robot was built from — the full prim tree, for
|
|
92
|
+
* inspection tooling (structure panels, attribute browsers). Attached by
|
|
93
|
+
* {@link ThreeUsdRobotLoader}; `undefined` for programmatically-built robots.
|
|
94
|
+
*/
|
|
95
|
+
stage?: Stage;
|
|
80
96
|
private readonly linkObjects;
|
|
81
97
|
private readonly jointObjects;
|
|
82
98
|
private readonly linkKeyByPath;
|
|
@@ -90,7 +106,7 @@ declare class ThreeUsdRobot extends THREE.Object3D {
|
|
|
90
106
|
private jointAxesHelpers;
|
|
91
107
|
private linkFrameHelpers;
|
|
92
108
|
constructor(robot: RobotDescription, tree: KinematicTree, options?: ThreeUsdRobotOptions);
|
|
93
|
-
/** Orient (
|
|
109
|
+
/** Orient (authored upAxis → target world up) and scale (metersPerUnit × unitScale) the root. */
|
|
94
110
|
private applyStageNormalization;
|
|
95
111
|
/** Apply each joint's authored initial value, if any. */
|
|
96
112
|
private applyInitialPose;
|
|
@@ -137,6 +153,10 @@ declare class ThreeUsdRobot extends THREE.Object3D {
|
|
|
137
153
|
getJointNames(): string[];
|
|
138
154
|
getLinkNames(): string[];
|
|
139
155
|
getKinematicTree(): KinematicTree;
|
|
156
|
+
/** Authored stage up-axis (`"Y"` or `"Z"`) — unaffected by `worldUp` normalization. */
|
|
157
|
+
get upAxis(): "Y" | "Z";
|
|
158
|
+
/** Authored stage scale in meters per unit (already applied to the root). */
|
|
159
|
+
get metersPerUnit(): number;
|
|
140
160
|
/** Playback rate in time codes per second (from the stage; default 24). */
|
|
141
161
|
getTimeCodesPerSecond(): number;
|
|
142
162
|
/** Whether any joint has a time-sampled trajectory. */
|
|
@@ -162,4 +182,4 @@ declare class ThreeUsdRobot extends THREE.Object3D {
|
|
|
162
182
|
private setKindVisibility;
|
|
163
183
|
}
|
|
164
184
|
|
|
165
|
-
export { JointObject as J, LinkObject as L, ThreeUsdRobot as T, type ThreeUsdRobotOptions as a };
|
|
185
|
+
export { JointObject as J, LinkObject as L, ThreeUsdRobot as T, type WorldUpAxis as W, type ThreeUsdRobotOptions as a };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { R as RobotDescription } from './buildKinematicTree-
|
|
1
|
+
import { R as RobotDescription } from './buildKinematicTree-DQ4Vr4sJ.js';
|
|
2
2
|
import { A as AssetResolver, U as UsdSource, B as BinarySource } from './bytes-MOJ2oN-u.js';
|
|
3
|
-
import { T as ThreeUsdRobot } from './ThreeUsdRobot-
|
|
3
|
+
import { W as WorldUpAxis, T as ThreeUsdRobot } from './ThreeUsdRobot-BAh-48DD.js';
|
|
4
4
|
|
|
5
5
|
type ThreeUsdRobotLoaderOptions = {
|
|
6
6
|
/** Resolver for references / payloads / sublayers (default {@link DefaultAssetResolver}). */
|
|
@@ -18,7 +18,17 @@ type ThreeUsdRobotLoaderOptions = {
|
|
|
18
18
|
loadSceneGeometry?: boolean;
|
|
19
19
|
/** Load diffuse textures referenced by materials (default `true`). */
|
|
20
20
|
loadTextures?: boolean;
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Target world up-axis. Any stage (Y-up or Z-up) is normalized into this
|
|
23
|
+
* convention: `"Y"` for a standard three.js scene (the default behavior),
|
|
24
|
+
* `"Z"` for a robotics-style Z-up world, `"keep"` to leave the authored
|
|
25
|
+
* orientation. Takes precedence over {@link upAxisConversion}.
|
|
26
|
+
*/
|
|
27
|
+
worldUp?: WorldUpAxis;
|
|
28
|
+
/**
|
|
29
|
+
* Legacy up-axis correction (M9). Default `"auto"` ≡ `worldUp: "Y"`.
|
|
30
|
+
* @deprecated Use {@link worldUp}.
|
|
31
|
+
*/
|
|
22
32
|
upAxisConversion?: "auto" | "Y" | "Z" | "none";
|
|
23
33
|
/** Extra uniform scale multiplied with `metersPerUnit` (M9). */
|
|
24
34
|
unitScale?: number;
|
|
@@ -317,6 +317,169 @@ type JointDriveDescription = {
|
|
|
317
317
|
maxForce?: number;
|
|
318
318
|
};
|
|
319
319
|
|
|
320
|
+
/** A parsed USDA layer (`SdfLayer`-like, read-only). */
|
|
321
|
+
declare class Layer {
|
|
322
|
+
private readonly _file;
|
|
323
|
+
constructor(_file: UsdaFile);
|
|
324
|
+
/** Serialize this layer back to USDA text (`SdfLayer::ExportToString`-like). */
|
|
325
|
+
ExportToString(): string;
|
|
326
|
+
GetVersion(): string;
|
|
327
|
+
GetPseudoRootMetadata(): MetadataMap;
|
|
328
|
+
GetMetadata(key: string): UsdValue | undefined;
|
|
329
|
+
GetDefaultPrimName(): string | undefined;
|
|
330
|
+
GetRootPrimSpecs(): PrimSpec[];
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* A typed attribute on a prim (`UsdAttribute`-like).
|
|
335
|
+
*
|
|
336
|
+
* Mirrors the pxr USD API: `GetAttribute` always returns an `Attribute` object;
|
|
337
|
+
* call {@link Attribute.IsValid} to check whether the attribute is actually
|
|
338
|
+
* authored on the prim.
|
|
339
|
+
*/
|
|
340
|
+
declare class Attribute {
|
|
341
|
+
private readonly _prim;
|
|
342
|
+
private readonly _name;
|
|
343
|
+
private readonly _spec;
|
|
344
|
+
constructor(_prim: Prim, _name: string, _spec: AttributeSpec | null);
|
|
345
|
+
IsValid(): boolean;
|
|
346
|
+
GetPrim(): Prim;
|
|
347
|
+
GetName(): string;
|
|
348
|
+
GetBaseName(): string;
|
|
349
|
+
GetNamespace(): string;
|
|
350
|
+
/** Scalar type name (without the `[]` suffix); pair with {@link IsArray}. */
|
|
351
|
+
GetTypeName(): string;
|
|
352
|
+
IsArray(): boolean;
|
|
353
|
+
GetVariability(): Variability;
|
|
354
|
+
IsCustom(): boolean;
|
|
355
|
+
/** True if a default value or any time sample is authored. */
|
|
356
|
+
HasValue(): boolean;
|
|
357
|
+
HasAuthoredValue(): boolean;
|
|
358
|
+
/**
|
|
359
|
+
* Resolve the attribute value. With no `time`, returns the default value (or
|
|
360
|
+
* the earliest time sample if only samples are authored). With a `time`,
|
|
361
|
+
* returns the exact sample if present, else the default, else the earliest
|
|
362
|
+
* sample. Returns `undefined` when nothing is authored.
|
|
363
|
+
*/
|
|
364
|
+
Get(time?: number): UsdValue | undefined;
|
|
365
|
+
GetTimeSamples(): Map<number, UsdValue>;
|
|
366
|
+
GetConnections(): SdfPath[];
|
|
367
|
+
}
|
|
368
|
+
/** A relationship on a prim (`UsdRelationship`-like). */
|
|
369
|
+
declare class Relationship {
|
|
370
|
+
private readonly _prim;
|
|
371
|
+
private readonly _name;
|
|
372
|
+
private readonly _spec;
|
|
373
|
+
constructor(_prim: Prim, _name: string, _spec: RelationshipSpec | null);
|
|
374
|
+
IsValid(): boolean;
|
|
375
|
+
GetPrim(): Prim;
|
|
376
|
+
GetName(): string;
|
|
377
|
+
GetBaseName(): string;
|
|
378
|
+
GetNamespace(): string;
|
|
379
|
+
IsCustom(): boolean;
|
|
380
|
+
GetTargets(): SdfPath[];
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* A composed prim on a {@link Stage} (`UsdPrim`-like).
|
|
385
|
+
*
|
|
386
|
+
* The pseudo-root (path `/`) is represented by a Prim with a `null` spec; its
|
|
387
|
+
* children are the stage's root prims.
|
|
388
|
+
*/
|
|
389
|
+
declare class Prim {
|
|
390
|
+
private readonly _stage;
|
|
391
|
+
private readonly _spec;
|
|
392
|
+
private readonly _path;
|
|
393
|
+
private readonly _parent;
|
|
394
|
+
private readonly _children;
|
|
395
|
+
private _attributes?;
|
|
396
|
+
private _relationships?;
|
|
397
|
+
constructor(_stage: Stage, _spec: PrimSpec | null, _path: string, _parent: Prim | null);
|
|
398
|
+
/** @internal Used by {@link Stage} while building the prim tree. */
|
|
399
|
+
_addChild(child: Prim): void;
|
|
400
|
+
GetStage(): Stage;
|
|
401
|
+
IsValid(): boolean;
|
|
402
|
+
IsPseudoRoot(): boolean;
|
|
403
|
+
GetName(): string;
|
|
404
|
+
GetPath(): string;
|
|
405
|
+
GetTypeName(): string;
|
|
406
|
+
GetSpecifier(): Specifier | null;
|
|
407
|
+
GetParent(): Prim | null;
|
|
408
|
+
GetChildren(): Prim[];
|
|
409
|
+
GetChild(name: string): Prim | null;
|
|
410
|
+
private attrMap;
|
|
411
|
+
/** Always returns an Attribute; check {@link Attribute.IsValid}. */
|
|
412
|
+
GetAttribute(name: string): Attribute;
|
|
413
|
+
HasAttribute(name: string): boolean;
|
|
414
|
+
GetAttributes(): Attribute[];
|
|
415
|
+
private relMap;
|
|
416
|
+
/** Always returns a Relationship; check {@link Relationship.IsValid}. */
|
|
417
|
+
GetRelationship(name: string): Relationship;
|
|
418
|
+
HasRelationship(name: string): boolean;
|
|
419
|
+
GetRelationships(): Relationship[];
|
|
420
|
+
GetMetadata(key: string): UsdValue | undefined;
|
|
421
|
+
GetAllMetadata(): MetadataMap;
|
|
422
|
+
/**
|
|
423
|
+
* Model-hierarchy kind from the `kind` metadata — `"component"`, `"group"`,
|
|
424
|
+
* `"assembly"`, `"subcomponent"`, … — or `""` when unauthored. The standard
|
|
425
|
+
* signal for selection granularity (usdview's "select by kind").
|
|
426
|
+
*/
|
|
427
|
+
GetKind(): string;
|
|
428
|
+
/** Applied API schema names from `apiSchemas` (e.g. `PhysicsArticulationRootAPI`). */
|
|
429
|
+
GetAppliedSchemas(): string[];
|
|
430
|
+
/**
|
|
431
|
+
* Whether the given API schema is applied. Matches the bare schema name as
|
|
432
|
+
* well as multi-apply instances (e.g. `HasAPI("PhysicsDriveAPI")` is true for
|
|
433
|
+
* an applied `PhysicsDriveAPI:angular`).
|
|
434
|
+
*/
|
|
435
|
+
HasAPI(schemaName: string): boolean;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/** OpenUSD's fallback stage linear unit when `metersPerUnit` is unauthored. */
|
|
439
|
+
declare const DEFAULT_METERS_PER_UNIT = 0.01;
|
|
440
|
+
type UpAxis = "Y" | "Z";
|
|
441
|
+
/**
|
|
442
|
+
* A composed USD stage (`UsdStage`-like) backed by a single in-memory USDA
|
|
443
|
+
* layer. Multi-layer composition (sublayers / references / payloads) arrives in
|
|
444
|
+
* M8; for now a stage wraps exactly one parsed layer.
|
|
445
|
+
*/
|
|
446
|
+
declare class Stage {
|
|
447
|
+
private readonly _layer;
|
|
448
|
+
private readonly _byPath;
|
|
449
|
+
private readonly _pseudoRoot;
|
|
450
|
+
private constructor();
|
|
451
|
+
/** Parse and open a stage from USDA source text. */
|
|
452
|
+
static OpenFromString(usda: string): Stage;
|
|
453
|
+
/** Open a stage from an already-parsed layer. */
|
|
454
|
+
static OpenFromFile(file: UsdaFile): Stage;
|
|
455
|
+
private buildPrim;
|
|
456
|
+
GetRootLayer(): Layer;
|
|
457
|
+
/**
|
|
458
|
+
* Serialize the stage's backing layer to USDA text. Loader-built stages wrap
|
|
459
|
+
* the fully composed layer, so this is a flattened (`usdcat --flatten`-like)
|
|
460
|
+
* export of everything that was read — including binary-crate sources.
|
|
461
|
+
*/
|
|
462
|
+
ExportToString(): string;
|
|
463
|
+
GetPseudoRoot(): Prim;
|
|
464
|
+
/** Returns the prim at the absolute path, or `null` if none exists. */
|
|
465
|
+
GetPrimAtPath(path: string): Prim | null;
|
|
466
|
+
/** The stage's default prim (from layer `defaultPrim` metadata), if any. */
|
|
467
|
+
GetDefaultPrim(): Prim | null;
|
|
468
|
+
/** Depth-first traversal of all prims (excludes the pseudo-root). */
|
|
469
|
+
Traverse(): Prim[];
|
|
470
|
+
GetMetadata(key: string): UsdValue | undefined;
|
|
471
|
+
/** Stage up axis (`upAxis` metadata); defaults to `"Y"` per OpenUSD. */
|
|
472
|
+
GetUpAxis(): UpAxis;
|
|
473
|
+
/** Stage linear unit (`metersPerUnit` metadata); defaults to {@link DEFAULT_METERS_PER_UNIT}. */
|
|
474
|
+
GetMetersPerUnit(): number;
|
|
475
|
+
/** Animation start time code, if authored. */
|
|
476
|
+
GetStartTimeCode(): number | undefined;
|
|
477
|
+
/** Animation end time code, if authored. */
|
|
478
|
+
GetEndTimeCode(): number | undefined;
|
|
479
|
+
/** Time codes per second for playback; defaults to 24. */
|
|
480
|
+
GetTimeCodesPerSecond(): number;
|
|
481
|
+
}
|
|
482
|
+
|
|
320
483
|
/**
|
|
321
484
|
* Builds a kinematic spanning tree from a {@link RobotDescription}.
|
|
322
485
|
*
|
|
@@ -361,4 +524,4 @@ type BuildTreeOptions = {
|
|
|
361
524
|
};
|
|
362
525
|
declare function buildKinematicTree(robot: RobotDescription, options?: BuildTreeOptions): KinematicTree;
|
|
363
526
|
|
|
364
|
-
export { type Axis as A, type BuildTreeOptions as B, type CompositionArc as C,
|
|
527
|
+
export { makeRotationZ as $, type Axis as A, type BuildTreeOptions as B, type CompositionArc as C, DEFAULT_METERS_PER_UNIT as D, buildKinematicTree as E, channelFromSamples as F, decomposeRigid as G, fromUsdMatrix as H, getTranslation as I, type JointType as J, type KinematicTree as K, type LinkDescription as L, type Mat4 as M, identity4 as N, interpolate as O, Prim as P, Quat as Q, type RobotDescription as R, Stage as S, type TreeEdge as T, type UsdaFile as U, type Vec2 as V, invert as W, makeEuler as X, makeRotationFromQuat as Y, makeRotationX as Z, makeRotationY as _, type JointDescription as a, makeScale as a0, makeTranslation as a1, multiply as a2, multiplyAll as a3, toUsdMatrix as a4, type Vec3 as b, type JointDriveDescription as c, type LinkInertialDescription as d, AssetPath as e, Attribute as f, type AttributeSpec as g, DEG2RAD as h, type KinematicNode as i, Layer as j, type ListOp as k, type MetadataMap as l, type PrimSpec as m, type PropertySpec as n, RAD2DEG as o, Relationship as p, type RelationshipSpec as q, type SampleChannel as r, type SdfPath as s, type Specifier as t, type UpAxis as u, type UsdDictionary as v, UsdMatrix as w, type UsdValue as x, type Variability as y, type Vec4 as z };
|
|
@@ -1907,6 +1907,15 @@ var Prim = class {
|
|
|
1907
1907
|
GetAllMetadata() {
|
|
1908
1908
|
return this._spec?.metadata ?? {};
|
|
1909
1909
|
}
|
|
1910
|
+
/**
|
|
1911
|
+
* Model-hierarchy kind from the `kind` metadata — `"component"`, `"group"`,
|
|
1912
|
+
* `"assembly"`, `"subcomponent"`, … — or `""` when unauthored. The standard
|
|
1913
|
+
* signal for selection granularity (usdview's "select by kind").
|
|
1914
|
+
*/
|
|
1915
|
+
GetKind() {
|
|
1916
|
+
const kind = this._spec?.metadata.kind;
|
|
1917
|
+
return typeof kind === "string" ? kind : "";
|
|
1918
|
+
}
|
|
1910
1919
|
/** Applied API schema names from `apiSchemas` (e.g. `PhysicsArticulationRootAPI`). */
|
|
1911
1920
|
GetAppliedSchemas() {
|
|
1912
1921
|
const raw = this._spec?.metadata.apiSchemas;
|
|
@@ -3210,5 +3219,5 @@ function openUsdz(bytes) {
|
|
|
3210
3219
|
}
|
|
3211
3220
|
|
|
3212
3221
|
export { ARTICULATION_ROOT_API, Attribute, COLLISION_API, CrateReader, DEFAULT_METERS_PER_UNIT, DefaultAssetResolver, Layer, MASS_API, MESH_COLLISION_API, PHYSICS_MATERIAL_API, ParseError, Prim, RIGID_BODY_API, Relationship, Stage, TokenizeError, buildKinematicTree, composeFile, composeLayer, computeLocalTransform, computeWorldTransform, crateToUsdaFile, createMemoryResolver, driveKindFor, extractRobotDescription, gatherGprimDescendants, gatherMeshDescendants, getJointAxis, getJointBodies, getJointDrive, getJointLimits, getJointLocalFrame, getJointStatePosition, getJointType, getMassProperties, getMaterialSubsets, hasArticulationRootAPI, hasCollisionAPI, hasRigidBodyAPI, isMesh, isNonVisualPurpose, isRenderableGprim, isScope, isSolidGprim, isXform, isZip, iterDescendants, joinPosix, jointValueFromSI, jointValueToSI, normalizeJointLimits, openUsdz, parseOpType, parseUsda, refineJointType, resolveBoundMaterial, serializeUsda, toBytes, tokenize };
|
|
3213
|
-
//# sourceMappingURL=chunk-
|
|
3214
|
-
//# sourceMappingURL=chunk-
|
|
3222
|
+
//# sourceMappingURL=chunk-2UD32EGU.js.map
|
|
3223
|
+
//# sourceMappingURL=chunk-2UD32EGU.js.map
|