AttributeSpec
AttributeSpec
Describes data structure of a single data attribute, such as a scalar, or a vector This structure is designed to map well to GPU shader formats and is intended for larger datasets, such as meshes or particle clouds
Kind: global class
- AttributeSpec
- instance
- .name :
string
- .type :
BinaryDataType
- .itemSize :
number
- .normalized :
boolean
- .isAttributeSpec :
boolean
- .equals(other) ⇒
boolean
- .copy(other)
- .getByteSize() ⇒
number
- .name :
- static
- .byName(a, b) ⇒
number
- .byName(a, b) ⇒
- instance
attributeSpec.name : string
Typically unique within a given set, used to identify the attribute
Kind: instance property of AttributeSpec
attributeSpec.type : BinaryDataType
How the attribute is stored in memory and interpreted
Kind: instance property of AttributeSpec
attributeSpec.itemSize : number
How many elements the attribute uses. This is cardinality of a vector. 1 means the attribute is a scalar must be greater or equal to 1
Kind: instance property of AttributeSpec
attributeSpec.normalized : boolean
Normalized values will be automatically converted to float32 in the shader This gives good optimization opportunities for things like normal vectors Applies to integer types only
Kind: instance property of AttributeSpec
attributeSpec.isAttributeSpec : boolean
Kind: instance property of AttributeSpec
Read only: true
attributeSpec.equals(other) ⇒ boolean
Kind: instance method of AttributeSpec
Param | Type |
---|---|
other | AttributeSpec |
attributeSpec.copy(other)
Kind: instance method of AttributeSpec
Param | Type |
---|---|
other | AttributeSpec |
attributeSpec.getByteSize() ⇒ number
How much space a single attribute value takes up
Kind: instance method of AttributeSpec
Returns: number
- in bytes
AttributeSpec.byName(a, b) ⇒ number
Sorting comparator
Kind: static method of AttributeSpec
Param | Type |
---|---|
a | AttributeSpec |
b | AttributeSpec |