AttributeGroupSpec
Classes
Describes a set of data attributes. A good analogy would be "all data associated with geometry vertex"
Constants
- RESERVED_HASH :
number
AttributeGroupSpec
Describes a set of data attributes. A good analogy would be "all data associated with geometry vertex"
Kind: global class
- AttributeGroupSpec
- new exports.AttributeGroupSpec()
- instance
- .attributes :
Array.<AttributeSpec> - .isAttributeGroupSpec :
boolean - .getAttributeByName(name) ⇒
AttributeSpec|undefined - .getAttributeIndexByName(name) ⇒
number - .addMany(attributes)
- .add(attribute) ⇒
AttributeGroupSpec - .setAttributes(attributes)
- .equals(other) ⇒
boolean - .getByteSize() ⇒
number
- .attributes :
- static
new exports.AttributeGroupSpec()
Example
"uv","position" and "normal" attributes of geometry vertices
attributeGroupSpec.attributes : Array.<AttributeSpec>
Kind: instance property of AttributeGroupSpec
Read only: true
attributeGroupSpec.isAttributeGroupSpec : boolean
Kind: instance property of AttributeGroupSpec
Read only: true
attributeGroupSpec.getAttributeByName(name) ⇒ AttributeSpec | undefined
Kind: instance method of AttributeGroupSpec
| Param | Type |
|---|---|
| name | string |
attributeGroupSpec.getAttributeIndexByName(name) ⇒ number
Kind: instance method of AttributeGroupSpec
Returns: number - -1 if not found
| Param | Type |
|---|---|
| name | string |
attributeGroupSpec.addMany(attributes)
Kind: instance method of AttributeGroupSpec
Throws:
Errorif any there are any name collisions
| Param | Type |
|---|---|
| attributes | Array.<AttributeSpec> |
attributeGroupSpec.add(attribute) ⇒ AttributeGroupSpec
Kind: instance method of AttributeGroupSpec
Throws:
Errorif attribute with that name is already present
| Param | Type |
|---|---|
| attribute | AttributeSpec |
attributeGroupSpec.setAttributes(attributes)
Replace existing attributes
Kind: instance method of AttributeGroupSpec
| Param | Type |
|---|---|
| attributes | Array.<AttributeSpec> |
attributeGroupSpec.equals(other) ⇒ boolean
Kind: instance method of AttributeGroupSpec
| Param | Type |
|---|---|
| other | AttributeGroupSpec |
attributeGroupSpec.getByteSize() ⇒ number
Size of a single element of all attributes.
Kind: instance method of AttributeGroupSpec
Example
2 attributes float32 and uin8 will produce result of 5 ( = (32 + 8) / 8 )
AttributeGroupSpec.from(...attributes) ⇒ AttributeGroupSpec
Kind: static method of AttributeGroupSpec
| Param | Type |
|---|---|
| ...attributes | AttributeSpec |
RESERVED_HASH : number
Kind: global constant
Read only: true