@markandre13/usd.js 0.0.3 → 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/dist/compression/compress.js +5 -2
- package/dist/compression/compress.js.map +1 -1
- package/dist/compression/integers.js +11 -0
- package/dist/compression/integers.js.map +1 -1
- package/dist/compression/lz4.d.ts +18 -1
- package/dist/compression/lz4.js +100 -17
- package/dist/compression/lz4.js.map +1 -1
- package/dist/crate/BootStrap.js +2 -0
- package/dist/crate/BootStrap.js.map +1 -1
- package/dist/crate/Crate.d.ts +8 -1
- package/dist/crate/Crate.js +49 -4
- package/dist/crate/Crate.js.map +1 -1
- package/dist/crate/Fields.d.ts +1 -1
- package/dist/crate/Fields.js +26 -1
- package/dist/crate/Fields.js.map +1 -1
- package/dist/crate/Paths.d.ts +1 -1
- package/dist/crate/Paths.js +16 -2
- package/dist/crate/Paths.js.map +1 -1
- package/dist/crate/Reader.js +3 -3
- package/dist/crate/Reader.js.map +1 -1
- package/dist/crate/SpecType.d.ts +3 -3
- package/dist/crate/SpecType.js +2 -0
- package/dist/crate/SpecType.js.map +1 -1
- package/dist/crate/Specifier.d.ts +1 -1
- package/dist/crate/Specs.js +1 -0
- package/dist/crate/Specs.js.map +1 -1
- package/dist/crate/Stage.d.ts +1 -1
- package/dist/crate/Stage.js +1 -0
- package/dist/crate/Stage.js.map +1 -1
- package/dist/crate/Strings.js +5 -0
- package/dist/crate/Strings.js.map +1 -1
- package/dist/crate/Tokens.js +47 -1
- package/dist/crate/Tokens.js.map +1 -1
- package/dist/crate/ValueRep.d.ts +1 -1
- package/dist/crate/ValueRep.js +27 -3
- package/dist/crate/ValueRep.js.map +1 -1
- package/dist/crate/Variability.d.ts +1 -1
- package/dist/crate/Writer.d.ts +3 -0
- package/dist/crate/Writer.js +26 -1
- package/dist/crate/Writer.js.map +1 -1
- package/dist/detail/hexdump.js +1 -0
- package/dist/detail/hexdump.js.map +1 -1
- package/dist/nodes/attributes/AssetPathAttr.d.ts +1 -1
- package/dist/nodes/attributes/AssetPathAttr.js +1 -1
- package/dist/nodes/attributes/AssetPathAttr.js.map +1 -1
- package/dist/nodes/attributes/Attribute.d.ts +1 -1
- package/dist/nodes/attributes/Attribute.js +1 -1
- package/dist/nodes/attributes/Attribute.js.map +1 -1
- package/dist/nodes/attributes/BooleanAttr.d.ts +1 -1
- package/dist/nodes/attributes/BooleanAttr.js +1 -1
- package/dist/nodes/attributes/BooleanAttr.js.map +1 -1
- package/dist/nodes/attributes/Color3fAttr.d.ts +3 -3
- package/dist/nodes/attributes/Color3fAttr.js +1 -1
- package/dist/nodes/attributes/Color3fAttr.js.map +1 -1
- package/dist/nodes/attributes/FloatAttr.d.ts +1 -1
- package/dist/nodes/attributes/FloatAttr.js +1 -1
- package/dist/nodes/attributes/FloatAttr.js.map +1 -1
- package/dist/nodes/attributes/IntArrayAttr.d.ts +1 -1
- package/dist/nodes/attributes/IntArrayAttr.js +1 -1
- package/dist/nodes/attributes/IntArrayAttr.js.map +1 -1
- package/dist/nodes/attributes/Relationship.d.ts +1 -1
- package/dist/nodes/attributes/Relationship.js +1 -1
- package/dist/nodes/attributes/Relationship.js.map +1 -1
- package/dist/nodes/attributes/StringAttr.d.ts +1 -1
- package/dist/nodes/attributes/StringAttr.js +1 -1
- package/dist/nodes/attributes/StringAttr.js.map +1 -1
- package/dist/nodes/attributes/TokenAttr.d.ts +1 -1
- package/dist/nodes/attributes/TokenAttr.js +1 -1
- package/dist/nodes/attributes/TokenAttr.js.map +1 -1
- package/dist/nodes/attributes/VariabilityAttr.d.ts +1 -1
- package/dist/nodes/attributes/VariabilityAttr.js +1 -1
- package/dist/nodes/attributes/VariabilityAttr.js.map +1 -1
- package/dist/nodes/attributes/Vec2fArrayAttr.d.ts +1 -1
- package/dist/nodes/attributes/Vec2fArrayAttr.js +1 -1
- package/dist/nodes/attributes/Vec2fArrayAttr.js.map +1 -1
- package/dist/nodes/attributes/Vec3fArrayAttr.d.ts +1 -1
- package/dist/nodes/attributes/Vec3fArrayAttr.js +1 -1
- package/dist/nodes/attributes/Vec3fArrayAttr.js.map +1 -1
- package/dist/nodes/geometry/Boundable.d.ts +6 -0
- package/dist/nodes/geometry/Boundable.js +6 -0
- package/dist/nodes/geometry/Boundable.js.map +1 -1
- package/dist/nodes/geometry/Camera.d.ts +7 -2
- package/dist/nodes/geometry/Camera.js +36 -0
- package/dist/nodes/geometry/Camera.js.map +1 -1
- package/dist/nodes/geometry/GeomSubset.d.ts +1 -1
- package/dist/nodes/geometry/GeomSubset.js +1 -1
- package/dist/nodes/geometry/GeomSubset.js.map +1 -1
- package/dist/nodes/geometry/Gprim.d.ts +28 -0
- package/dist/nodes/geometry/Gprim.js +30 -0
- package/dist/nodes/geometry/Gprim.js.map +1 -1
- package/dist/nodes/geometry/Imageable.d.ts +9 -0
- package/dist/nodes/geometry/Imageable.js +9 -0
- package/dist/nodes/geometry/Imageable.js.map +1 -1
- package/dist/nodes/geometry/Mesh.d.ts +69 -7
- package/dist/nodes/geometry/Mesh.js +100 -10
- package/dist/nodes/geometry/Mesh.js.map +1 -1
- package/dist/nodes/geometry/PointBased.d.ts +19 -2
- package/dist/nodes/geometry/PointBased.js +24 -12
- package/dist/nodes/geometry/PointBased.js.map +1 -1
- package/dist/nodes/geometry/Scope.d.ts +9 -1
- package/dist/nodes/geometry/Scope.js +8 -0
- package/dist/nodes/geometry/Scope.js.map +1 -1
- package/dist/nodes/geometry/SkelBindingAPI.d.ts +53 -0
- package/dist/nodes/geometry/SkelBindingAPI.js +2 -0
- package/dist/nodes/geometry/SkelBindingAPI.js.map +1 -0
- package/dist/nodes/geometry/Xform.d.ts +6 -1
- package/dist/nodes/geometry/Xform.js +5 -0
- package/dist/nodes/geometry/Xform.js.map +1 -1
- package/dist/nodes/geometry/Xformable.d.ts +9 -3
- package/dist/nodes/geometry/Xformable.js +6 -0
- package/dist/nodes/geometry/Xformable.js.map +1 -1
- package/dist/nodes/lux/BoundableLightBase.d.ts +8 -0
- package/dist/nodes/lux/BoundableLightBase.js +8 -0
- package/dist/nodes/lux/BoundableLightBase.js.map +1 -1
- package/dist/nodes/lux/DomeLight.d.ts +11 -1
- package/dist/nodes/lux/DomeLight.js +10 -0
- package/dist/nodes/lux/DomeLight.js.map +1 -1
- package/dist/nodes/lux/NonboundableLightBase.d.ts +1 -1
- package/dist/nodes/lux/NonboundableLightBase.js +10 -1
- package/dist/nodes/lux/NonboundableLightBase.js.map +1 -1
- package/dist/nodes/lux/SphereLight.d.ts +9 -1
- package/dist/nodes/lux/SphereLight.js +8 -0
- package/dist/nodes/lux/SphereLight.js.map +1 -1
- package/dist/nodes/shader/Material.d.ts +7 -1
- package/dist/nodes/shader/Material.js +6 -0
- package/dist/nodes/shader/Material.js.map +1 -1
- package/dist/nodes/shader/NodeGraph.d.ts +7 -0
- package/dist/nodes/shader/NodeGraph.js +7 -0
- package/dist/nodes/shader/NodeGraph.js.map +1 -1
- package/dist/nodes/shader/Shader.d.ts +9 -1
- package/dist/nodes/shader/Shader.js +8 -0
- package/dist/nodes/shader/Shader.js.map +1 -1
- package/dist/nodes/skeleton/SkelRoot.d.ts +6 -1
- package/dist/nodes/skeleton/SkelRoot.js +5 -0
- package/dist/nodes/skeleton/SkelRoot.js.map +1 -1
- package/dist/nodes/skeleton/Skeleton.d.ts +41 -4
- package/dist/nodes/skeleton/Skeleton.js +37 -0
- package/dist/nodes/skeleton/Skeleton.js.map +1 -1
- package/dist/nodes/usd/PseudoRoot.d.ts +1 -1
- package/dist/nodes/usd/PseudoRoot.js +21 -1
- package/dist/nodes/usd/PseudoRoot.js.map +1 -1
- package/dist/nodes/usd/SchemaBase.d.ts +1 -1
- package/dist/nodes/usd/SchemaBase.js +1 -1
- package/dist/nodes/usd/SchemaBase.js.map +1 -1
- package/dist/nodes/usd/Typed.d.ts +10 -0
- package/dist/nodes/usd/Typed.js +10 -0
- package/dist/nodes/usd/Typed.js.map +1 -1
- package/dist/{crate → nodes/usd}/UsdNode.d.ts +18 -9
- package/dist/{crate → nodes/usd}/UsdNode.js +35 -2
- package/dist/nodes/usd/UsdNode.js.map +1 -0
- package/package.json +8 -7
- package/dist/crate/UsdNode.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -3,6 +3,11 @@ import { SpecType } from "../../crate/SpecType";
|
|
|
3
3
|
import { Attribute } from "../attributes/Attribute";
|
|
4
4
|
import { StringAttr } from "../attributes/StringAttr";
|
|
5
5
|
import { Boundable } from "./Boundable";
|
|
6
|
+
/**
|
|
7
|
+
* Transformable camera.
|
|
8
|
+
*
|
|
9
|
+
* defined in pxr/usd/usdGeom/schema.usda
|
|
10
|
+
*/
|
|
6
11
|
export class Camera extends Boundable {
|
|
7
12
|
constructor(parent, name) {
|
|
8
13
|
super(parent.crate, parent, -1, name, true);
|
|
@@ -10,6 +15,9 @@ export class Camera extends Boundable {
|
|
|
10
15
|
this.specifier = Specifier.Def;
|
|
11
16
|
this.typeName = "Camera";
|
|
12
17
|
}
|
|
18
|
+
//
|
|
19
|
+
// Viewing Frustum
|
|
20
|
+
//
|
|
13
21
|
set projection(value) {
|
|
14
22
|
this.deleteChild("projection");
|
|
15
23
|
new Attribute(this, "projection", (node) => {
|
|
@@ -31,6 +39,8 @@ export class Camera extends Boundable {
|
|
|
31
39
|
node.setFloat("default", value);
|
|
32
40
|
});
|
|
33
41
|
}
|
|
42
|
+
// horizontalApertureOffset
|
|
43
|
+
// verticalApertureOffset
|
|
34
44
|
set focalLength(value) {
|
|
35
45
|
this.deleteChild("focalLength");
|
|
36
46
|
new Attribute(this, "focalLength", (node) => {
|
|
@@ -45,6 +55,32 @@ export class Camera extends Boundable {
|
|
|
45
55
|
node.setVec2f("default", value);
|
|
46
56
|
});
|
|
47
57
|
}
|
|
58
|
+
// clippingPlanes
|
|
59
|
+
//
|
|
60
|
+
// Depth of Field
|
|
61
|
+
//
|
|
62
|
+
// fStop
|
|
63
|
+
// focusDistance
|
|
64
|
+
//
|
|
65
|
+
// Stereoscopic 3D
|
|
66
|
+
//
|
|
67
|
+
// stereoRole
|
|
68
|
+
//
|
|
69
|
+
// Parameters for Motion Blur
|
|
70
|
+
//
|
|
71
|
+
// shutter:open
|
|
72
|
+
// shutter:close
|
|
73
|
+
//
|
|
74
|
+
// Exposure Adjustment
|
|
75
|
+
//
|
|
76
|
+
// exposure
|
|
77
|
+
//
|
|
78
|
+
// Exposure Controls
|
|
79
|
+
//
|
|
80
|
+
// exposure:iso
|
|
81
|
+
// exposure:time
|
|
82
|
+
// exposure:fStop
|
|
83
|
+
// exposure:responsivity
|
|
48
84
|
set blenderDataName(value) {
|
|
49
85
|
this.deleteChild("userProperties:blender:data_name");
|
|
50
86
|
if (value !== undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Camera.js","sourceRoot":"","sources":["../../../src/nodes/geometry/Camera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"Camera.js","sourceRoot":"","sources":["../../../src/nodes/geometry/Camera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;;;GAIG;AACH,MAAM,OAAO,MAAO,SAAQ,SAAS;IACjC,YAAY,MAAe,EAAE,IAAY;QACrC,KAAK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AC;CACJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Specifier } from "../../crate/Specifier";
|
|
2
2
|
import { SpecType } from "../../crate/SpecType";
|
|
3
|
-
import { UsdNode } from "
|
|
3
|
+
import { UsdNode } from "../usd/UsdNode";
|
|
4
4
|
export class GeomSubset extends UsdNode {
|
|
5
5
|
constructor(parent, name) {
|
|
6
6
|
super(parent.crate, parent, -1, name, false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeomSubset.js","sourceRoot":"","sources":["../../../src/nodes/geometry/GeomSubset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"GeomSubset.js","sourceRoot":"","sources":["../../../src/nodes/geometry/GeomSubset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAExC,MAAM,OAAO,UAAW,SAAQ,OAAO;IACnC,YAAY,MAAe,EAAE,IAAY;QACrC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;QAC5C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAA;IAClC,CAAC;IACQ,YAAY;QACjB,KAAK,CAAC,YAAY,EAAE,CAAA;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;QAExB,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,IAAI,CACjC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG,CAAC,CACxD,CAAA;QACD,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,IAAI,CACjC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAC,CAClD,CAAA;QAED,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,IAAI,CACjC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,YAAY,EAAE;YACtC,OAAO,EAAE,CAAC,oBAAoB,CAAC;SAClC,CAAC,CACL,CAAA;IACL,CAAC;CACJ"}
|
|
@@ -1,4 +1,32 @@
|
|
|
1
1
|
import { Boundable } from "./Boundable";
|
|
2
|
+
/**
|
|
3
|
+
* Base class for all geometric primitives.
|
|
4
|
+
*
|
|
5
|
+
* Gprim encodes basic graphical properties such as _doubleSided_ and
|
|
6
|
+
* _orientation_, and provides primvars for "display color" and "display
|
|
7
|
+
* opacity" that travel with geometry to be used as shader overrides.
|
|
8
|
+
*
|
|
9
|
+
* defined in pxr/usd/usdGeom/schema.usda
|
|
10
|
+
*/
|
|
2
11
|
export declare class Gprim extends Boundable {
|
|
12
|
+
/**
|
|
13
|
+
* Although some renderers treat all parametric or polygonal
|
|
14
|
+
* surfaces as if they were effectively laminae with outward-facing
|
|
15
|
+
* normals on both sides, some renderers derive significant optimizations
|
|
16
|
+
* by considering these surfaces to have only a single outward side,
|
|
17
|
+
* typically determined by control-point winding order and/or
|
|
18
|
+
* \\em orientation. By doing so they can perform "backface culling" to
|
|
19
|
+
* avoid drawing the many polygons of most closed surfaces that face away
|
|
20
|
+
* from the viewer.
|
|
21
|
+
*
|
|
22
|
+
* However, it is often advantageous to model thin objects such as paper
|
|
23
|
+
* and cloth as single, open surfaces that must be viewable from both
|
|
24
|
+
* sides, always. Setting a gprim's \\em doubleSided attribute to
|
|
25
|
+
* \\c true instructs all renderers to disable optimizations such as
|
|
26
|
+
* backface culling for the gprim, and attempt (not all renderers are able
|
|
27
|
+
* to do so, but the USD reference GL renderer always will) to provide
|
|
28
|
+
* forward-facing normals on each side of the surface for lighting
|
|
29
|
+
* calculations.
|
|
30
|
+
*/
|
|
3
31
|
set doubleSided(value: boolean | undefined);
|
|
4
32
|
}
|
|
@@ -1,7 +1,37 @@
|
|
|
1
1
|
import { Variability } from "../../crate/Variability";
|
|
2
2
|
import { BooleanAttr } from "../attributes/BooleanAttr";
|
|
3
3
|
import { Boundable } from "./Boundable";
|
|
4
|
+
/**
|
|
5
|
+
* Base class for all geometric primitives.
|
|
6
|
+
*
|
|
7
|
+
* Gprim encodes basic graphical properties such as _doubleSided_ and
|
|
8
|
+
* _orientation_, and provides primvars for "display color" and "display
|
|
9
|
+
* opacity" that travel with geometry to be used as shader overrides.
|
|
10
|
+
*
|
|
11
|
+
* defined in pxr/usd/usdGeom/schema.usda
|
|
12
|
+
*/
|
|
4
13
|
export class Gprim extends Boundable {
|
|
14
|
+
// color3f[] primvars:displayColor
|
|
15
|
+
// float[] primvars:displayOpacity
|
|
16
|
+
/**
|
|
17
|
+
* Although some renderers treat all parametric or polygonal
|
|
18
|
+
* surfaces as if they were effectively laminae with outward-facing
|
|
19
|
+
* normals on both sides, some renderers derive significant optimizations
|
|
20
|
+
* by considering these surfaces to have only a single outward side,
|
|
21
|
+
* typically determined by control-point winding order and/or
|
|
22
|
+
* \\em orientation. By doing so they can perform "backface culling" to
|
|
23
|
+
* avoid drawing the many polygons of most closed surfaces that face away
|
|
24
|
+
* from the viewer.
|
|
25
|
+
*
|
|
26
|
+
* However, it is often advantageous to model thin objects such as paper
|
|
27
|
+
* and cloth as single, open surfaces that must be viewable from both
|
|
28
|
+
* sides, always. Setting a gprim's \\em doubleSided attribute to
|
|
29
|
+
* \\c true instructs all renderers to disable optimizations such as
|
|
30
|
+
* backface culling for the gprim, and attempt (not all renderers are able
|
|
31
|
+
* to do so, but the USD reference GL renderer always will) to provide
|
|
32
|
+
* forward-facing normals on each side of the surface for lighting
|
|
33
|
+
* calculations.
|
|
34
|
+
*/
|
|
5
35
|
set doubleSided(value) {
|
|
6
36
|
this.deleteChild("doubleSided");
|
|
7
37
|
if (value !== undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gprim.js","sourceRoot":"","sources":["../../../src/nodes/geometry/Gprim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"Gprim.js","sourceRoot":"","sources":["../../../src/nodes/geometry/Gprim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;;;;;;;GAQG;AACH,MAAM,OAAO,KAAM,SAAQ,SAAS;IAChC,kCAAkC;IAClC,kCAAkC;IAElC;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,WAAW,CAAC,KAA0B;QACtC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAA;QAC/B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACtB,IAAI,WAAW,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,EAAC,WAAW,EAAE,WAAW,CAAC,OAAO,EAAC,CAAC,CAAA;QACnF,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import { Typed } from "../usd/Typed";
|
|
2
|
+
/**
|
|
3
|
+
* Base class for all prims that may require rendering or
|
|
4
|
+
* visualization of some sort. The primary attributes of Imageable
|
|
5
|
+
* are _visibility_ and _purpose_, which each provide instructions for
|
|
6
|
+
* what geometry should be included for processing by rendering and other
|
|
7
|
+
* computations.
|
|
8
|
+
*
|
|
9
|
+
* defined in pxr/usd/usdGeom/schema.usda
|
|
10
|
+
*/
|
|
2
11
|
export declare class Imageable extends Typed {
|
|
3
12
|
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { Typed } from "../usd/Typed";
|
|
2
|
+
/**
|
|
3
|
+
* Base class for all prims that may require rendering or
|
|
4
|
+
* visualization of some sort. The primary attributes of Imageable
|
|
5
|
+
* are _visibility_ and _purpose_, which each provide instructions for
|
|
6
|
+
* what geometry should be included for processing by rendering and other
|
|
7
|
+
* computations.
|
|
8
|
+
*
|
|
9
|
+
* defined in pxr/usd/usdGeom/schema.usda
|
|
10
|
+
*/
|
|
2
11
|
export class Imageable extends Typed {
|
|
3
12
|
}
|
|
4
13
|
//# sourceMappingURL=Imageable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Imageable.js","sourceRoot":"","sources":["../../../src/nodes/geometry/Imageable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"Imageable.js","sourceRoot":"","sources":["../../../src/nodes/geometry/Imageable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC;;;;;;;;GAQG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;CAAI"}
|
|
@@ -1,25 +1,87 @@
|
|
|
1
1
|
import type { ListOp } from "../../crate/Fields";
|
|
2
|
-
import type { UsdNode } from "
|
|
2
|
+
import type { UsdNode } from "../usd/UsdNode";
|
|
3
3
|
import type { Skeleton } from "../skeleton/Skeleton";
|
|
4
|
-
import { PointBased } from "./PointBased";
|
|
5
|
-
|
|
4
|
+
import { PointBased, SubdivisionScheme } from "./PointBased";
|
|
5
|
+
import { SkelBindingAPI } from "./SkelBindingAPI";
|
|
6
|
+
/**
|
|
7
|
+
* Encodes a mesh with optional subdivision properties and features.
|
|
8
|
+
*
|
|
9
|
+
* As a point-based primitive, meshes are defined in terms of points that
|
|
10
|
+
* are connected into edges and faces. Many references to meshes use the
|
|
11
|
+
* term 'vertex' in place of or interchangeably with 'points', while some
|
|
12
|
+
* use 'vertex' to refer to the 'face-vertices' that define a face. To
|
|
13
|
+
* avoid confusion, the term 'vertex' is intentionally avoided in favor of
|
|
14
|
+
* 'points' or 'face-vertices'.
|
|
15
|
+
*
|
|
16
|
+
* The connectivity between points, edges and faces is encoded using a
|
|
17
|
+
* common minimal topological description of the faces of the mesh. Each
|
|
18
|
+
* face is defined by a set of face-vertices using indices into the Mesh's
|
|
19
|
+
* _points_ array (inherited from UsdGeomPointBased) and laid out in a
|
|
20
|
+
* single linear _faceVertexIndices_ array for efficiency. A companion
|
|
21
|
+
* _faceVertexCounts_ array provides, for each face, the number of
|
|
22
|
+
* consecutive face-vertices in _faceVertexIndices_ that define the face.
|
|
23
|
+
* No additional connectivity information is required or constructed, so
|
|
24
|
+
* no adjacency or neighborhood queries are available.
|
|
25
|
+
*
|
|
26
|
+
* A key property of this mesh schema is that it encodes both subdivision
|
|
27
|
+
* surfaces and simpler polygonal meshes. This is achieved by varying the
|
|
28
|
+
* _subdivisionScheme_ attribute, which is set to specify Catmull-Clark
|
|
29
|
+
* subdivision by default, so polygonal meshes must always be explicitly
|
|
30
|
+
*declared. The available subdivision schemes and additional subdivision
|
|
31
|
+
* features encoded in optional attributes conform to the feature set of
|
|
32
|
+
* [OpenSubdiv](https://graphics.pixar.com/opensubdiv/docs/subdivision_surfaces.html).
|
|
33
|
+
*/
|
|
34
|
+
export declare class Mesh extends PointBased implements SkelBindingAPI {
|
|
6
35
|
constructor(parent: UsdNode, name: string);
|
|
7
36
|
encodeFields(): void;
|
|
8
37
|
private apiSchemas?;
|
|
9
38
|
protected prependApiSchema(name: string): void;
|
|
10
39
|
set blenderDataName(value: string | undefined);
|
|
40
|
+
/**
|
|
41
|
+
* Flat list of the index (into the _points_ attribute) of each
|
|
42
|
+
* vertex of each face in the mesh. If this attribute has more than
|
|
43
|
+
* one timeSample, the mesh is considered to be topologically varying.
|
|
44
|
+
*/
|
|
11
45
|
set faceVertexIndices(value: ArrayLike<number> | undefined);
|
|
46
|
+
/**
|
|
47
|
+
* Provides the number of vertices in each face of the mesh,
|
|
48
|
+
* which is also the number of consecutive indices in _faceVertexIndices_
|
|
49
|
+
* that define the face. The length of this attribute is the number of
|
|
50
|
+
* faces in the mesh. If this attribute has more than
|
|
51
|
+
* one timeSample, the mesh is considered to be topologically varying.
|
|
52
|
+
*/
|
|
12
53
|
set faceVertexCounts(value: ArrayLike<number> | undefined);
|
|
54
|
+
/**
|
|
55
|
+
* The subdivision scheme to be applied to the surface.
|
|
56
|
+
* Valid values are:
|
|
57
|
+
*
|
|
58
|
+
* - __catmullClark__: The default, Catmull-Clark subdivision; preferred
|
|
59
|
+
* for quad-dominant meshes (generalizes B-splines); interpolation
|
|
60
|
+
* of point data is smooth (non-linear)
|
|
61
|
+
* - __loop__: Loop subdivision; preferred for purely triangular meshes;
|
|
62
|
+
* interpolation of point data is smooth (non-linear)
|
|
63
|
+
* - __bilinear__: Subdivision reduces all faces to quads (topologically
|
|
64
|
+
* similar to "catmullClark"); interpolation of point data is bilinear
|
|
65
|
+
* - __none__: No subdivision, i.e. a simple polygonal mesh; interpolation
|
|
66
|
+
* of point data is linear
|
|
67
|
+
*
|
|
68
|
+
* Polygonal meshes are typically lighter weight and faster to render,
|
|
69
|
+
* depending on renderer and render mode. Use of "bilinear" will produce
|
|
70
|
+
* a similar shape to a polygonal mesh and may offer additional guarantees
|
|
71
|
+
* of watertightness and additional subdivision features (e.g. holes) but
|
|
72
|
+
* may also not respect authored normals.
|
|
73
|
+
*/
|
|
74
|
+
set subdivisionScheme(value: SubdivisionScheme | undefined);
|
|
13
75
|
set materialBinding(value: ListOp<UsdNode> | undefined);
|
|
14
76
|
set familyType(value: "partition" | "nonOverlapping" | "unrestricted" | undefined);
|
|
15
|
-
set
|
|
77
|
+
set skeleton(value: Skeleton | undefined);
|
|
78
|
+
set geomBindTransform(value: ArrayLike<number> | undefined);
|
|
16
79
|
set jointIndices(value: {
|
|
17
80
|
elementSize: number;
|
|
18
|
-
indices: number
|
|
81
|
+
indices: ArrayLike<number>;
|
|
19
82
|
} | undefined);
|
|
20
83
|
set jointWeights(value: {
|
|
21
84
|
elementSize: number;
|
|
22
|
-
indices: number
|
|
85
|
+
indices: ArrayLike<number>;
|
|
23
86
|
} | undefined);
|
|
24
|
-
set skeleton(value: Skeleton | undefined);
|
|
25
87
|
}
|
|
@@ -7,6 +7,34 @@ import { VariabilityAttr } from "../attributes/VariabilityAttr";
|
|
|
7
7
|
import { Relationship } from "../attributes/Relationship";
|
|
8
8
|
import { StringAttr } from "../attributes/StringAttr";
|
|
9
9
|
import { PointBased } from "./PointBased";
|
|
10
|
+
/**
|
|
11
|
+
* Encodes a mesh with optional subdivision properties and features.
|
|
12
|
+
*
|
|
13
|
+
* As a point-based primitive, meshes are defined in terms of points that
|
|
14
|
+
* are connected into edges and faces. Many references to meshes use the
|
|
15
|
+
* term 'vertex' in place of or interchangeably with 'points', while some
|
|
16
|
+
* use 'vertex' to refer to the 'face-vertices' that define a face. To
|
|
17
|
+
* avoid confusion, the term 'vertex' is intentionally avoided in favor of
|
|
18
|
+
* 'points' or 'face-vertices'.
|
|
19
|
+
*
|
|
20
|
+
* The connectivity between points, edges and faces is encoded using a
|
|
21
|
+
* common minimal topological description of the faces of the mesh. Each
|
|
22
|
+
* face is defined by a set of face-vertices using indices into the Mesh's
|
|
23
|
+
* _points_ array (inherited from UsdGeomPointBased) and laid out in a
|
|
24
|
+
* single linear _faceVertexIndices_ array for efficiency. A companion
|
|
25
|
+
* _faceVertexCounts_ array provides, for each face, the number of
|
|
26
|
+
* consecutive face-vertices in _faceVertexIndices_ that define the face.
|
|
27
|
+
* No additional connectivity information is required or constructed, so
|
|
28
|
+
* no adjacency or neighborhood queries are available.
|
|
29
|
+
*
|
|
30
|
+
* A key property of this mesh schema is that it encodes both subdivision
|
|
31
|
+
* surfaces and simpler polygonal meshes. This is achieved by varying the
|
|
32
|
+
* _subdivisionScheme_ attribute, which is set to specify Catmull-Clark
|
|
33
|
+
* subdivision by default, so polygonal meshes must always be explicitly
|
|
34
|
+
*declared. The available subdivision schemes and additional subdivision
|
|
35
|
+
* features encoded in optional attributes conform to the feature set of
|
|
36
|
+
* [OpenSubdiv](https://graphics.pixar.com/opensubdiv/docs/subdivision_surfaces.html).
|
|
37
|
+
*/
|
|
10
38
|
export class Mesh extends PointBased {
|
|
11
39
|
constructor(parent, name) {
|
|
12
40
|
super(parent.crate, parent, -1, name, true);
|
|
@@ -30,24 +58,80 @@ export class Mesh extends PointBased {
|
|
|
30
58
|
this.apiSchemas.prepend.push(name);
|
|
31
59
|
}
|
|
32
60
|
}
|
|
61
|
+
// also in Material
|
|
33
62
|
set blenderDataName(value) {
|
|
34
63
|
this.deleteChild("userProperties:blender:data_name");
|
|
35
64
|
if (value !== undefined) {
|
|
36
65
|
new StringAttr(this, "userProperties:blender:data_name", value, { custom: true });
|
|
37
66
|
}
|
|
38
67
|
}
|
|
68
|
+
//
|
|
69
|
+
// Common Properties
|
|
70
|
+
//
|
|
71
|
+
/**
|
|
72
|
+
* Flat list of the index (into the _points_ attribute) of each
|
|
73
|
+
* vertex of each face in the mesh. If this attribute has more than
|
|
74
|
+
* one timeSample, the mesh is considered to be topologically varying.
|
|
75
|
+
*/
|
|
39
76
|
set faceVertexIndices(value) {
|
|
40
77
|
this.deleteChild("faceVertexIndices");
|
|
41
78
|
if (value !== undefined) {
|
|
42
79
|
new IntArrayAttr(this, "faceVertexIndices", value);
|
|
43
80
|
}
|
|
44
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Provides the number of vertices in each face of the mesh,
|
|
84
|
+
* which is also the number of consecutive indices in _faceVertexIndices_
|
|
85
|
+
* that define the face. The length of this attribute is the number of
|
|
86
|
+
* faces in the mesh. If this attribute has more than
|
|
87
|
+
* one timeSample, the mesh is considered to be topologically varying.
|
|
88
|
+
*/
|
|
45
89
|
set faceVertexCounts(value) {
|
|
46
90
|
this.deleteChild("faceVertexCounts");
|
|
47
91
|
if (value !== undefined) {
|
|
48
92
|
new IntArrayAttr(this, "faceVertexCounts", value);
|
|
49
93
|
}
|
|
50
94
|
}
|
|
95
|
+
//
|
|
96
|
+
// Subdiv Properties
|
|
97
|
+
//
|
|
98
|
+
/**
|
|
99
|
+
* The subdivision scheme to be applied to the surface.
|
|
100
|
+
* Valid values are:
|
|
101
|
+
*
|
|
102
|
+
* - __catmullClark__: The default, Catmull-Clark subdivision; preferred
|
|
103
|
+
* for quad-dominant meshes (generalizes B-splines); interpolation
|
|
104
|
+
* of point data is smooth (non-linear)
|
|
105
|
+
* - __loop__: Loop subdivision; preferred for purely triangular meshes;
|
|
106
|
+
* interpolation of point data is smooth (non-linear)
|
|
107
|
+
* - __bilinear__: Subdivision reduces all faces to quads (topologically
|
|
108
|
+
* similar to "catmullClark"); interpolation of point data is bilinear
|
|
109
|
+
* - __none__: No subdivision, i.e. a simple polygonal mesh; interpolation
|
|
110
|
+
* of point data is linear
|
|
111
|
+
*
|
|
112
|
+
* Polygonal meshes are typically lighter weight and faster to render,
|
|
113
|
+
* depending on renderer and render mode. Use of "bilinear" will produce
|
|
114
|
+
* a similar shape to a polygonal mesh and may offer additional guarantees
|
|
115
|
+
* of watertightness and additional subdivision features (e.g. holes) but
|
|
116
|
+
* may also not respect authored normals.
|
|
117
|
+
*/
|
|
118
|
+
set subdivisionScheme(value) {
|
|
119
|
+
this.deleteChild("subdivisionScheme");
|
|
120
|
+
if (value !== undefined) {
|
|
121
|
+
new VariabilityAttr(this, "subdivisionScheme", Variability.Uniform, value);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// interpolateBoundary
|
|
125
|
+
// faceVaryingLinearInterpolation
|
|
126
|
+
// triangleSubdivisionRule
|
|
127
|
+
// holeIndices
|
|
128
|
+
// cornerIndices
|
|
129
|
+
// cornerSharpnesses
|
|
130
|
+
// creaseIndices
|
|
131
|
+
// creaseLengths
|
|
132
|
+
// creaseSharpnesses
|
|
133
|
+
// MaterialBindingAPI: material:binding
|
|
134
|
+
// pxr/usd/usdShade/schema.usda
|
|
51
135
|
set materialBinding(value) {
|
|
52
136
|
this.deleteChild("material:binding");
|
|
53
137
|
if (value !== undefined) {
|
|
@@ -55,12 +139,28 @@ export class Mesh extends PointBased {
|
|
|
55
139
|
new Relationship(this, "material:binding", value);
|
|
56
140
|
}
|
|
57
141
|
}
|
|
142
|
+
//
|
|
143
|
+
// GeomSubset
|
|
144
|
+
//
|
|
58
145
|
set familyType(value) {
|
|
59
146
|
this.deleteChild("subsetFamily:materialBind:familyType");
|
|
60
147
|
if (value !== undefined) {
|
|
61
148
|
new VariabilityAttr(this, "subsetFamily:materialBind:familyType", Variability.Uniform, value);
|
|
62
149
|
}
|
|
63
150
|
}
|
|
151
|
+
//
|
|
152
|
+
// SkelBindingAPI
|
|
153
|
+
//
|
|
154
|
+
set skeleton(value) {
|
|
155
|
+
this.deleteChild("skel:skeleton");
|
|
156
|
+
if (value !== undefined) {
|
|
157
|
+
this.prependApiSchema("SkelBindingAPI");
|
|
158
|
+
new Relationship(this, "skel:skeleton", {
|
|
159
|
+
isExplicit: true,
|
|
160
|
+
explicit: [value]
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
64
164
|
set geomBindTransform(value) {
|
|
65
165
|
this.deleteChild("primvars:skel:geomBindTransform");
|
|
66
166
|
if (value !== undefined) {
|
|
@@ -95,15 +195,5 @@ export class Mesh extends PointBased {
|
|
|
95
195
|
});
|
|
96
196
|
}
|
|
97
197
|
}
|
|
98
|
-
set skeleton(value) {
|
|
99
|
-
this.deleteChild("skel:skeleton");
|
|
100
|
-
if (value !== undefined) {
|
|
101
|
-
this.prependApiSchema("SkelBindingAPI");
|
|
102
|
-
new Relationship(this, "skel:skeleton", {
|
|
103
|
-
isExplicit: true,
|
|
104
|
-
explicit: [value]
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
198
|
}
|
|
109
199
|
//# sourceMappingURL=Mesh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Mesh.js","sourceRoot":"","sources":["../../../src/nodes/geometry/Mesh.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAGrD,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"Mesh.js","sourceRoot":"","sources":["../../../src/nodes/geometry/Mesh.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAGrD,OAAO,EAAE,UAAU,EAAqB,MAAM,cAAc,CAAA;AAG5D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,OAAO,IAAK,SAAQ,UAAU;IAChC,YAAY,MAAe,EAAE,IAAY;QACrC,KAAK,CAAC,MAAM,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AI,EAAE,4BAA4B,EAAE,IAAI,CAAC,EAAE;gBACrD,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;gBAClC,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAA;gBACxC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;gBAC7C,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;YAC9C,CAAC,CAAC,CAAA;QACN,CAAC;IACL,CAAC;IAED,IAAI,YAAY,CAAC,KAGJ;QACT,IAAI,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAA;QAC9C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACtB,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;YACvC,IAAI,SAAS,CAAC,IAAI,EAAE,4BAA4B,EAAE,IAAI,CAAC,EAAE;gBACrD,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,CAAA;gBACpC,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAA;gBACxC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;gBAC7C,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;YAChD,CAAC,CAAC,CAAA;QACN,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -2,11 +2,28 @@ import { Gprim } from "./Gprim";
|
|
|
2
2
|
export type SubdivisionScheme = "catmullClark" | "loop" | "bilinear" | "none";
|
|
3
3
|
export type InterpolateBoundary = "none" | "edgeOnly" | "edgeAndCorner";
|
|
4
4
|
export type FaceVaryingLinearInterpolation = "none" | "cornersOnly" | "cornersPlus1" | "cornersPlus2" | "boundaries" | "all";
|
|
5
|
+
/**
|
|
6
|
+
* Base class for all UsdGeomGprims that possess points,
|
|
7
|
+
* providing common attributes such as normals and velocities.
|
|
8
|
+
*/
|
|
5
9
|
export declare class PointBased extends Gprim {
|
|
10
|
+
/**
|
|
11
|
+
* The primary geometry attribute for all PointBased
|
|
12
|
+
* primitives, describes points in (local) space.
|
|
13
|
+
*/
|
|
6
14
|
set points(value: ArrayLike<number> | undefined);
|
|
7
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Provide an object-space orientation for individual points,
|
|
17
|
+
* which, depending on subclass, may define a surface, curve, or free
|
|
18
|
+
* points. Note that 'normals' should not be authored on any Mesh that
|
|
19
|
+
* is subdivided, since the subdivision algorithm will define its own
|
|
20
|
+
* normals. 'normals' is not a generic primvar, but the number of elements
|
|
21
|
+
* in this attribute will be determined by its 'interpolation'. See
|
|
22
|
+
* \\ref SetNormalsInterpolation() . If 'normals' and 'primvars:normals'
|
|
23
|
+
* are both specified, the latter has precedence.
|
|
24
|
+
*/
|
|
8
25
|
set normals(value: ArrayLike<number> | undefined);
|
|
9
|
-
set
|
|
26
|
+
set texCoords(value: ArrayLike<number> | undefined);
|
|
10
27
|
interpolateBoundary: InterpolateBoundary;
|
|
11
28
|
faceVaryingLinearInterpolation: FaceVaryingLinearInterpolation;
|
|
12
29
|
}
|
|
@@ -1,27 +1,38 @@
|
|
|
1
|
-
import { Variability } from "../../crate/Variability";
|
|
2
1
|
import { Vec2fArrayAttr } from "../attributes/Vec2fArrayAttr";
|
|
3
2
|
import { Vec3fArrayAttr } from "../attributes/Vec3fArrayAttr";
|
|
4
|
-
import { VariabilityAttr } from "../attributes/VariabilityAttr";
|
|
5
3
|
import { Gprim } from "./Gprim";
|
|
4
|
+
/**
|
|
5
|
+
* Base class for all UsdGeomGprims that possess points,
|
|
6
|
+
* providing common attributes such as normals and velocities.
|
|
7
|
+
*/
|
|
6
8
|
export class PointBased extends Gprim {
|
|
7
9
|
constructor() {
|
|
8
10
|
super(...arguments);
|
|
9
11
|
this.interpolateBoundary = "edgeAndCorner";
|
|
10
12
|
this.faceVaryingLinearInterpolation = "cornersPlus1";
|
|
11
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* The primary geometry attribute for all PointBased
|
|
16
|
+
* primitives, describes points in (local) space.
|
|
17
|
+
*/
|
|
12
18
|
set points(value) {
|
|
13
19
|
this.deleteChild("points");
|
|
14
20
|
if (value !== undefined) {
|
|
15
21
|
new Vec3fArrayAttr(this, "points", value, "point3f[]");
|
|
16
22
|
}
|
|
17
23
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
// vector3f[] velocities
|
|
25
|
+
// vector3f[] accelerations
|
|
26
|
+
/**
|
|
27
|
+
* Provide an object-space orientation for individual points,
|
|
28
|
+
* which, depending on subclass, may define a surface, curve, or free
|
|
29
|
+
* points. Note that 'normals' should not be authored on any Mesh that
|
|
30
|
+
* is subdivided, since the subdivision algorithm will define its own
|
|
31
|
+
* normals. 'normals' is not a generic primvar, but the number of elements
|
|
32
|
+
* in this attribute will be determined by its 'interpolation'. See
|
|
33
|
+
* \\ref SetNormalsInterpolation() . If 'normals' and 'primvars:normals'
|
|
34
|
+
* are both specified, the latter has precedence.
|
|
35
|
+
*/
|
|
25
36
|
set normals(value) {
|
|
26
37
|
this.deleteChild("normals");
|
|
27
38
|
if (value !== undefined) {
|
|
@@ -29,10 +40,11 @@ export class PointBased extends Gprim {
|
|
|
29
40
|
attr.interpolation = "faceVarying";
|
|
30
41
|
}
|
|
31
42
|
}
|
|
32
|
-
set
|
|
33
|
-
this.deleteChild("
|
|
43
|
+
set texCoords(value) {
|
|
44
|
+
this.deleteChild("primvars:st");
|
|
34
45
|
if (value !== undefined) {
|
|
35
|
-
new
|
|
46
|
+
const attr = new Vec2fArrayAttr(this.crate, this, "primvars:st", value, "texCoord2f[]");
|
|
47
|
+
attr.interpolation = "faceVarying";
|
|
36
48
|
}
|
|
37
49
|
}
|
|
38
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PointBased.js","sourceRoot":"","sources":["../../../src/nodes/geometry/PointBased.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PointBased.js","sourceRoot":"","sources":["../../../src/nodes/geometry/PointBased.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAE7D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAe/B;;;GAGG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK;IAArC;;QAqCI,wBAAmB,GAAwB,eAAe,CAAC;QAC3D,mCAA8B,GAAmC,cAAc,CAAC;IACpF,CAAC;IAtCG;;;OAGG;IACH,IAAI,MAAM,CAAC,KAAoC;QAC3C,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;QAC1B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACtB,IAAI,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,CAAA;QAC1D,CAAC;IACL,CAAC;IACD,wBAAwB;IACxB,2BAA2B;IAC3B;;;;;;;;;OASG;IACH,IAAI,OAAO,CAAC,KAAoC;QAC5C,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;QAC3B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACtB,MAAM,IAAI,GAAG,IAAI,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,CAAC,CAAA;YACrE,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QACtC,CAAC;IACL,CAAC;IACD,IAAI,SAAS,CAAC,KAAoC;QAC9C,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAA;QAC/B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACtB,MAAM,IAAI,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,cAAc,CAAC,CAAA;YACvF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QACtC,CAAC;IACL,CAAC;CAGJ"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import type { UsdNode } from "
|
|
1
|
+
import type { UsdNode } from "../usd/UsdNode";
|
|
2
2
|
import { Imageable } from "./Imageable";
|
|
3
|
+
/**
|
|
4
|
+
* Scope is the simplest grouping primitive, and does not carry the
|
|
5
|
+
* baggage of transformability. Note that transforms should inherit down
|
|
6
|
+
* through a Scope successfully - it is just a guaranteed no-op from a
|
|
7
|
+
* transformability perspective.
|
|
8
|
+
*
|
|
9
|
+
* defined in pxr/usd/usdGeom/schema.usda
|
|
10
|
+
*/
|
|
3
11
|
export declare class Scope extends Imageable {
|
|
4
12
|
constructor(parent: UsdNode, name: string);
|
|
5
13
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { Specifier } from "../../crate/Specifier";
|
|
2
2
|
import { SpecType } from "../../crate/SpecType";
|
|
3
3
|
import { Imageable } from "./Imageable";
|
|
4
|
+
/**
|
|
5
|
+
* Scope is the simplest grouping primitive, and does not carry the
|
|
6
|
+
* baggage of transformability. Note that transforms should inherit down
|
|
7
|
+
* through a Scope successfully - it is just a guaranteed no-op from a
|
|
8
|
+
* transformability perspective.
|
|
9
|
+
*
|
|
10
|
+
* defined in pxr/usd/usdGeom/schema.usda
|
|
11
|
+
*/
|
|
4
12
|
export class Scope extends Imageable {
|
|
5
13
|
constructor(parent, name) {
|
|
6
14
|
super(parent.crate, parent, -1, name, true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scope.js","sourceRoot":"","sources":["../../../src/nodes/geometry/Scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"Scope.js","sourceRoot":"","sources":["../../../src/nodes/geometry/Scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;;;;;;GAOG;AACH,MAAM,OAAO,KAAM,SAAQ,SAAS;IAChC,YAAY,MAAe,EAAE,IAAY;QACrC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QAC3C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAA;QAC9B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,CAAA;QAC9B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;IAC3B,CAAC;CACJ"}
|