@openusd-wasm/pxr 0.0.4 → 0.0.5
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 +7 -5
- package/dist/openusd_pxr.d.ts +40 -2
- package/dist/openusd_pxr.js +42 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ const pxr = await createPxr({
|
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
The returned namespace exposes `Gf`, `Sdf`, `Usd`, `UsdGeom`, `UsdPhysics`,
|
|
40
|
-
`UsdShade`, `UsdUtils`, and `FS` helpers for the virtual filesystem.
|
|
40
|
+
`UsdSkel`, `UsdShade`, `UsdUtils`, and `FS` helpers for the virtual filesystem.
|
|
41
41
|
|
|
42
42
|
## API shape
|
|
43
43
|
|
|
@@ -71,9 +71,11 @@ surface includes:
|
|
|
71
71
|
`PrimvarsAPI`, stage metrics/up-axis helpers, tokens, and `BBoxCache`.
|
|
72
72
|
- `UsdShade`: materials, shaders, inputs, outputs, connectable APIs, material
|
|
73
73
|
binding, source asset helpers, shader IDs, and tokens.
|
|
74
|
-
- `UsdPhysics`: collision
|
|
75
|
-
prismatic/spherical/distance joints, limits,
|
|
76
|
-
frames, and `DriveAPI`.
|
|
74
|
+
- `UsdPhysics`: collision, mesh collision, rigid-body, mass, and material APIs,
|
|
75
|
+
joint schemas, fixed/revolute/prismatic/spherical/distance joints, limits,
|
|
76
|
+
body relationships, local joint frames, and `DriveAPI`.
|
|
77
|
+
- `UsdSkel`: skeleton roots, skeletons, skel animations, binding API accessors,
|
|
78
|
+
joint transforms, and skinning primvars.
|
|
77
79
|
- `UsdUtils`: external reference/dependency extraction, USDZ packaging,
|
|
78
80
|
localization, and asset path modification helpers.
|
|
79
81
|
|
|
@@ -112,7 +114,7 @@ The following areas still need JS-safe wrappers or schema-driven expansion.
|
|
|
112
114
|
- NodeGraph, shader registry, shader definition parsing, and deeper
|
|
113
115
|
connectable-interface utilities are deferred to the next shading expansion.
|
|
114
116
|
|
|
115
|
-
### UsdLux,
|
|
117
|
+
### UsdLux, UsdRender, UsdVol, and related modules
|
|
116
118
|
|
|
117
119
|
- These modules are not exposed yet. They need module resources, schema type
|
|
118
120
|
registration, C++ wrappers, and TypeScript namespace mappings.
|
package/dist/openusd_pxr.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ type PxrFunction = (...args: any[]) => any;
|
|
|
36
36
|
type PxrBindingObject = Record<string, any>;
|
|
37
37
|
type PxrNamespaceValue = PxrClass | PxrFunction | PxrBindingObject;
|
|
38
38
|
type PxrNamespace = Record<string, PxrNamespaceValue>;
|
|
39
|
-
type PxrModuleName = 'Gf' | 'Sdf' | 'Usd' | 'UsdGeom' | 'UsdPhysics' | 'UsdShade' | 'UsdUtils';
|
|
39
|
+
type PxrModuleName = 'Gf' | 'Sdf' | 'Usd' | 'UsdGeom' | 'UsdPhysics' | 'UsdSkel' | 'UsdShade' | 'UsdUtils';
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/modules/gf.d.ts
|
|
42
42
|
interface PxrGfNamespace {
|
|
@@ -72,12 +72,17 @@ interface PxrSdfNamespace {
|
|
|
72
72
|
PrimSpec: PxrClass;
|
|
73
73
|
ValueTypeName: PxrClass;
|
|
74
74
|
ValueTypeNames: PxrBindingObject;
|
|
75
|
+
ZipFile: PxrClass;
|
|
76
|
+
ZipFileInfo: PxrClass;
|
|
77
|
+
ZipFileWriter: PxrClass;
|
|
75
78
|
}
|
|
76
79
|
//#endregion
|
|
77
80
|
//#region src/modules/usd.d.ts
|
|
78
81
|
interface PxrUsdNamespace {
|
|
79
82
|
Stage: PxrClass;
|
|
80
83
|
Prim: PxrClass;
|
|
84
|
+
VariantSets: PxrClass;
|
|
85
|
+
VariantSet: PxrClass;
|
|
81
86
|
Attribute: PxrClass;
|
|
82
87
|
Relationship: PxrClass;
|
|
83
88
|
References: PxrClass;
|
|
@@ -90,6 +95,8 @@ interface PxrUsdGeomNamespace {
|
|
|
90
95
|
Xform: PxrClass;
|
|
91
96
|
Sphere: PxrClass;
|
|
92
97
|
Cube: PxrClass;
|
|
98
|
+
Cylinder: PxrClass;
|
|
99
|
+
Camera: PxrClass;
|
|
93
100
|
Mesh: PxrClass;
|
|
94
101
|
Xformable: PxrClass;
|
|
95
102
|
XformOp: PxrClass;
|
|
@@ -99,20 +106,42 @@ interface PxrUsdGeomNamespace {
|
|
|
99
106
|
SetStageMetersPerUnit: PxrFunction;
|
|
100
107
|
SetStageUpAxis: PxrFunction;
|
|
101
108
|
GetStageUpAxis: PxrFunction;
|
|
109
|
+
ComputeXformAnimationInfo: PxrFunction;
|
|
102
110
|
Tokens: PxrBindingObject;
|
|
103
111
|
}
|
|
104
112
|
//#endregion
|
|
105
113
|
//#region src/modules/usdPhysics.d.ts
|
|
106
114
|
interface PxrUsdPhysicsNamespace {
|
|
107
115
|
CollisionAPI: PxrClass;
|
|
116
|
+
MeshCollisionAPI: PxrClass;
|
|
108
117
|
RigidBodyAPI: PxrClass;
|
|
118
|
+
MassAPI: PxrClass;
|
|
119
|
+
MaterialAPI: PxrClass;
|
|
120
|
+
Scene: PxrClass;
|
|
121
|
+
ArticulationRootAPI: PxrClass;
|
|
109
122
|
Joint: PxrClass;
|
|
110
123
|
FixedJoint: PxrClass;
|
|
111
124
|
RevoluteJoint: PxrClass;
|
|
112
125
|
PrismaticJoint: PxrClass;
|
|
113
126
|
SphericalJoint: PxrClass;
|
|
114
127
|
DistanceJoint: PxrClass;
|
|
128
|
+
LimitAPI: PxrClass;
|
|
115
129
|
DriveAPI: PxrClass;
|
|
130
|
+
ComputeModelJoints: PxrFunction;
|
|
131
|
+
ComputeModelPhysics: PxrFunction;
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/modules/usdSkel.d.ts
|
|
135
|
+
interface PxrUsdSkelNamespace {
|
|
136
|
+
Root: PxrClass;
|
|
137
|
+
Skeleton: PxrClass;
|
|
138
|
+
SkeletonQuery: PxrClass;
|
|
139
|
+
SkinningQuery: PxrClass;
|
|
140
|
+
Cache: PxrClass;
|
|
141
|
+
Animation: PxrClass;
|
|
142
|
+
BindingAPI: PxrClass;
|
|
143
|
+
ComputeModelSkels: PxrFunction;
|
|
144
|
+
Tokens: PxrBindingObject;
|
|
116
145
|
}
|
|
117
146
|
//#endregion
|
|
118
147
|
//#region src/modules/usdShade.d.ts
|
|
@@ -123,6 +152,10 @@ interface PxrUsdShadeNamespace {
|
|
|
123
152
|
Output: PxrClass;
|
|
124
153
|
ConnectableAPI: PxrClass;
|
|
125
154
|
MaterialBindingAPI: PxrClass;
|
|
155
|
+
ComputeBoundMaterialPath: PxrFunction;
|
|
156
|
+
ComputeMaterialInfo: PxrFunction;
|
|
157
|
+
ComputeMaterialTextureInfo: PxrFunction;
|
|
158
|
+
ComputeGeomSubsetMaterialFallback: PxrFunction;
|
|
126
159
|
Tokens: PxrBindingObject;
|
|
127
160
|
}
|
|
128
161
|
//#endregion
|
|
@@ -130,7 +163,11 @@ interface PxrUsdShadeNamespace {
|
|
|
130
163
|
interface PxrUsdUtilsNamespace {
|
|
131
164
|
ExtractExternalReferencesParams: PxrClass;
|
|
132
165
|
ExtractExternalReferences: PxrFunction;
|
|
166
|
+
ExtractSanitizedExternalReferences: PxrFunction;
|
|
133
167
|
ComputeAllDependencies: PxrFunction;
|
|
168
|
+
ExtractUsdzPackage: PxrFunction;
|
|
169
|
+
GetPackageEntries: PxrFunction;
|
|
170
|
+
FindPackageRootLayer: PxrFunction;
|
|
134
171
|
CreateNewUsdzPackage: PxrFunction;
|
|
135
172
|
CreateNewARKitUsdzPackage: PxrFunction;
|
|
136
173
|
LocalizeAsset: PxrFunction;
|
|
@@ -144,6 +181,7 @@ interface PxrModuleMap {
|
|
|
144
181
|
Usd: PxrUsdNamespace;
|
|
145
182
|
UsdGeom: PxrUsdGeomNamespace;
|
|
146
183
|
UsdPhysics: PxrUsdPhysicsNamespace;
|
|
184
|
+
UsdSkel: PxrUsdSkelNamespace;
|
|
147
185
|
UsdShade: PxrUsdShadeNamespace;
|
|
148
186
|
UsdUtils: PxrUsdUtilsNamespace;
|
|
149
187
|
}
|
|
@@ -213,4 +251,4 @@ type CreatePxrFromCoreOptions = Omit<CreatePxrOptions, 'core' | 'coreURL' | 'was
|
|
|
213
251
|
declare function createPxr(options: CreatePxrOptions): Promise<Pxr>;
|
|
214
252
|
declare function createPxrFromCore(core: PxrCoreAssets, options?: CreatePxrFromCoreOptions): Promise<Pxr>;
|
|
215
253
|
//#endregion
|
|
216
|
-
export { CreatePxrFromCoreOptions, CreatePxrOptions, type EmscriptenFs, Pxr, type PxrBindingObject, type PxrClass, PxrCoreAssets, PxrCoreFactory, type PxrDisposable, PxrFsHelpers, PxrFsListEntry, type PxrFunction, type PxrGfNamespace, type PxrInstance, type PxrModuleMap, type PxrModuleName, type PxrNamespace, type PxrNamespaceValue, PxrResourceURL, type PxrSdfNamespace, type PxrUsdGeomNamespace, type PxrUsdNamespace, type PxrUsdPhysicsNamespace, type PxrUsdUtilsNamespace, PxrWasmFactory, PxrWasmFactoryModule, type WasmModule, createPxr, createPxr as default, createPxrFromCore };
|
|
254
|
+
export { CreatePxrFromCoreOptions, CreatePxrOptions, type EmscriptenFs, Pxr, type PxrBindingObject, type PxrClass, PxrCoreAssets, PxrCoreFactory, type PxrDisposable, PxrFsHelpers, PxrFsListEntry, type PxrFunction, type PxrGfNamespace, type PxrInstance, type PxrModuleMap, type PxrModuleName, type PxrNamespace, type PxrNamespaceValue, PxrResourceURL, type PxrSdfNamespace, type PxrUsdGeomNamespace, type PxrUsdNamespace, type PxrUsdPhysicsNamespace, type PxrUsdSkelNamespace, type PxrUsdUtilsNamespace, PxrWasmFactory, PxrWasmFactoryModule, type WasmModule, createPxr, createPxr as default, createPxrFromCore };
|
package/dist/openusd_pxr.js
CHANGED
|
@@ -93,7 +93,10 @@ function buildSdfNamespace(module) {
|
|
|
93
93
|
Layer: bindClass(module, "Sdf", "Layer"),
|
|
94
94
|
PrimSpec: bindClass(module, "Sdf", "PrimSpec"),
|
|
95
95
|
ValueTypeName: bindClass(module, "Sdf", "ValueTypeName"),
|
|
96
|
-
ValueTypeNames: bindObject(module, "Sdf", "ValueTypeNames")
|
|
96
|
+
ValueTypeNames: bindObject(module, "Sdf", "ValueTypeNames"),
|
|
97
|
+
ZipFile: bindClass(module, "Sdf", "ZipFile"),
|
|
98
|
+
ZipFileInfo: bindClass(module, "Sdf", "ZipFileInfo"),
|
|
99
|
+
ZipFileWriter: bindClass(module, "Sdf", "ZipFileWriter")
|
|
97
100
|
};
|
|
98
101
|
}
|
|
99
102
|
//#endregion
|
|
@@ -102,6 +105,8 @@ function buildUsdNamespace(module) {
|
|
|
102
105
|
return {
|
|
103
106
|
Stage: bindClass(module, "Usd", "Stage"),
|
|
104
107
|
Prim: bindClass(module, "Usd", "Prim"),
|
|
108
|
+
VariantSets: bindClass(module, "Usd", "VariantSets"),
|
|
109
|
+
VariantSet: bindClass(module, "Usd", "VariantSet"),
|
|
105
110
|
Attribute: bindClass(module, "Usd", "Attribute"),
|
|
106
111
|
Relationship: bindClass(module, "Usd", "Relationship"),
|
|
107
112
|
References: bindClass(module, "Usd", "References"),
|
|
@@ -116,6 +121,8 @@ function buildUsdGeomNamespace(module) {
|
|
|
116
121
|
Xform: bindClass(module, "UsdGeom", "Xform"),
|
|
117
122
|
Sphere: bindClass(module, "UsdGeom", "Sphere"),
|
|
118
123
|
Cube: bindClass(module, "UsdGeom", "Cube"),
|
|
124
|
+
Cylinder: bindClass(module, "UsdGeom", "Cylinder"),
|
|
125
|
+
Camera: bindClass(module, "UsdGeom", "Camera"),
|
|
119
126
|
Mesh: bindClass(module, "UsdGeom", "Mesh"),
|
|
120
127
|
Xformable: bindClass(module, "UsdGeom", "Xformable"),
|
|
121
128
|
XformOp: bindClass(module, "UsdGeom", "XformOp"),
|
|
@@ -125,6 +132,7 @@ function buildUsdGeomNamespace(module) {
|
|
|
125
132
|
SetStageMetersPerUnit: bindFunction(module, "UsdGeom", "SetStageMetersPerUnit"),
|
|
126
133
|
SetStageUpAxis: bindFunction(module, "UsdGeom", "SetStageUpAxis"),
|
|
127
134
|
GetStageUpAxis: bindFunction(module, "UsdGeom", "GetStageUpAxis"),
|
|
135
|
+
ComputeXformAnimationInfo: bindFunction(module, "UsdGeom", "ComputeXformAnimationInfo"),
|
|
128
136
|
Tokens: bindObject(module, "UsdGeom", "Tokens")
|
|
129
137
|
};
|
|
130
138
|
}
|
|
@@ -133,14 +141,37 @@ function buildUsdGeomNamespace(module) {
|
|
|
133
141
|
function buildUsdPhysicsNamespace(module) {
|
|
134
142
|
return {
|
|
135
143
|
CollisionAPI: bindClass(module, "UsdPhysics", "CollisionAPI"),
|
|
144
|
+
MeshCollisionAPI: bindClass(module, "UsdPhysics", "MeshCollisionAPI"),
|
|
136
145
|
RigidBodyAPI: bindClass(module, "UsdPhysics", "RigidBodyAPI"),
|
|
146
|
+
MassAPI: bindClass(module, "UsdPhysics", "MassAPI"),
|
|
147
|
+
MaterialAPI: bindClass(module, "UsdPhysics", "MaterialAPI"),
|
|
148
|
+
Scene: bindClass(module, "UsdPhysics", "Scene"),
|
|
149
|
+
ArticulationRootAPI: bindClass(module, "UsdPhysics", "ArticulationRootAPI"),
|
|
137
150
|
Joint: bindClass(module, "UsdPhysics", "Joint"),
|
|
138
151
|
FixedJoint: bindClass(module, "UsdPhysics", "FixedJoint"),
|
|
139
152
|
RevoluteJoint: bindClass(module, "UsdPhysics", "RevoluteJoint"),
|
|
140
153
|
PrismaticJoint: bindClass(module, "UsdPhysics", "PrismaticJoint"),
|
|
141
154
|
SphericalJoint: bindClass(module, "UsdPhysics", "SphericalJoint"),
|
|
142
155
|
DistanceJoint: bindClass(module, "UsdPhysics", "DistanceJoint"),
|
|
143
|
-
|
|
156
|
+
LimitAPI: bindClass(module, "UsdPhysics", "LimitAPI"),
|
|
157
|
+
DriveAPI: bindClass(module, "UsdPhysics", "DriveAPI"),
|
|
158
|
+
ComputeModelJoints: bindFunction(module, "UsdPhysics", "ComputeModelJoints"),
|
|
159
|
+
ComputeModelPhysics: bindFunction(module, "UsdPhysics", "ComputeModelPhysics")
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/modules/usdSkel.ts
|
|
164
|
+
function buildUsdSkelNamespace(module) {
|
|
165
|
+
return {
|
|
166
|
+
Root: bindClass(module, "UsdSkel", "Root"),
|
|
167
|
+
Skeleton: bindClass(module, "UsdSkel", "Skeleton"),
|
|
168
|
+
SkeletonQuery: bindClass(module, "UsdSkel", "SkeletonQuery"),
|
|
169
|
+
SkinningQuery: bindClass(module, "UsdSkel", "SkinningQuery"),
|
|
170
|
+
Cache: bindClass(module, "UsdSkel", "Cache"),
|
|
171
|
+
Animation: bindClass(module, "UsdSkel", "Animation"),
|
|
172
|
+
BindingAPI: bindClass(module, "UsdSkel", "BindingAPI"),
|
|
173
|
+
ComputeModelSkels: bindFunction(module, "UsdSkel", "ComputeModelSkels"),
|
|
174
|
+
Tokens: bindObject(module, "UsdSkel", "Tokens")
|
|
144
175
|
};
|
|
145
176
|
}
|
|
146
177
|
//#endregion
|
|
@@ -153,6 +184,10 @@ function buildUsdShadeNamespace(module) {
|
|
|
153
184
|
Output: bindClass(module, "UsdShade", "Output"),
|
|
154
185
|
ConnectableAPI: bindClass(module, "UsdShade", "ConnectableAPI"),
|
|
155
186
|
MaterialBindingAPI: bindClass(module, "UsdShade", "MaterialBindingAPI"),
|
|
187
|
+
ComputeBoundMaterialPath: bindFunction(module, "UsdShade", "ComputeBoundMaterialPath"),
|
|
188
|
+
ComputeMaterialInfo: bindFunction(module, "UsdShade", "ComputeMaterialInfo"),
|
|
189
|
+
ComputeMaterialTextureInfo: bindFunction(module, "UsdShade", "ComputeMaterialTextureInfo"),
|
|
190
|
+
ComputeGeomSubsetMaterialFallback: bindFunction(module, "UsdShade", "ComputeGeomSubsetMaterialFallback"),
|
|
156
191
|
Tokens: bindObject(module, "UsdShade", "Tokens")
|
|
157
192
|
};
|
|
158
193
|
}
|
|
@@ -162,7 +197,11 @@ function buildUsdUtilsNamespace(module) {
|
|
|
162
197
|
return {
|
|
163
198
|
ExtractExternalReferencesParams: bindClass(module, "UsdUtils", "ExtractExternalReferencesParams"),
|
|
164
199
|
ExtractExternalReferences: bindFunction(module, "UsdUtils", "ExtractExternalReferences"),
|
|
200
|
+
ExtractSanitizedExternalReferences: bindFunction(module, "UsdUtils", "ExtractSanitizedExternalReferences"),
|
|
165
201
|
ComputeAllDependencies: bindFunction(module, "UsdUtils", "ComputeAllDependencies"),
|
|
202
|
+
ExtractUsdzPackage: bindFunction(module, "UsdUtils", "ExtractUsdzPackage"),
|
|
203
|
+
GetPackageEntries: bindFunction(module, "UsdUtils", "GetPackageEntries"),
|
|
204
|
+
FindPackageRootLayer: bindFunction(module, "UsdUtils", "FindPackageRootLayer"),
|
|
166
205
|
CreateNewUsdzPackage: bindFunction(module, "UsdUtils", "CreateNewUsdzPackage"),
|
|
167
206
|
CreateNewARKitUsdzPackage: bindFunction(module, "UsdUtils", "CreateNewARKitUsdzPackage"),
|
|
168
207
|
LocalizeAsset: bindFunction(module, "UsdUtils", "LocalizeAsset"),
|
|
@@ -178,6 +217,7 @@ function buildPxrModules(module) {
|
|
|
178
217
|
Usd: buildUsdNamespace(module),
|
|
179
218
|
UsdGeom: buildUsdGeomNamespace(module),
|
|
180
219
|
UsdPhysics: buildUsdPhysicsNamespace(module),
|
|
220
|
+
UsdSkel: buildUsdSkelNamespace(module),
|
|
181
221
|
UsdShade: buildUsdShadeNamespace(module),
|
|
182
222
|
UsdUtils: buildUsdUtilsNamespace(module)
|
|
183
223
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openusd-wasm/pxr",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"description": "Community TypeScript facade for OpenUSD pxr WebAssembly bindings.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/openusd-wasm/openusd-pxr-wasm",
|