class Mesh(mesh: <Error class: unknown class> = Uri.EMPTY, hittable: MeshCollision = MeshCollision.LineTest, defaultShaderOverride: String = "", defaultSceneOverride: Int = 0) : ComponentBase
Entity.create(listOf(Mesh(Uri.parse("environment.glb")), SupportsLocomotion(), Transform())) // From assets folder
Entity.create(listOf(Mesh(Uri.parse("https://github.com/KhronosGroup/glTF-Sample-Models/raw/refs/heads/main/2.0/Duck/glTF-Binary/Duck.glb)), Transform())) // From network
Mesh(Uri.parse("mesh://plane")) // creates a flat plane
Mesh(Uri.parse("mesh://sphere")) // creates a sphere
Mesh(Uri.parse("mesh://box")) // creates a cube
Mesh(Uri.parse("mesh://roundedbox")) // creates a rounded cube
Mesh(Uri.parse("mesh://dome")) // creates a half-sphere
Mesh(Uri.parse("mesh://axis")) // creates an axis for debugging
Mesh(Uri.parse("mesh://skybox")) // creates a skybox
Mesh(Uri.parse("mesh://quad")) // creates a quad
| Name | Summary |
|---|---|
Mesh | constructor(mesh: <Error class: unknown class> = Uri.EMPTY, hittable: MeshCollision = MeshCollision.LineTest, defaultShaderOverride: String = "", defaultSceneOverride: Int = 0) |
| Name | Summary |
|---|---|
Companion | object Companion : ComponentCompanion |
| Name | Summary |
|---|---|
cachable | open override var cachable: <Error class: unknown class> |
defaultSceneOverride | var defaultSceneOverride: Int Int of the default scene to be used for the mesh |
defaultShaderOverride | var defaultShaderOverride: String String of the default shader to be used for the mesh |
entID | var entID: Long |
hittable | |
isDirty | var isDirty: Boolean |
mesh | var mesh: <Error class: unknown class> Uri of the mesh to be rendered |
recycled | var recycled: Boolean |
timeStamp | var timeStamp: Long |
| Name | Summary |
|---|---|
companion | |
getComponentDataAttributeType | fun getComponentDataAttributeType(key: Int): AttributePrimitive? Gets the attribute type for the specified key. fun getComponentDataAttributeType(keyString: String): AttributePrimitive? Gets the attribute type for the specified string key. |
getComponentDataKey | fun getComponentDataKey(key: String): Int? Gets the integer key associated with the specified string key. |
getComponentDataValue | fun getComponentDataValue(key: Int): Any? Gets the value for the specified key. fun getComponentDataValue(keyString: String): Any? Gets the value for the specified string key. |
getEnumClass | fun getEnumClass(key: String): Class<out Enum<*>>? Gets the enum class associated with the specified string key. |
hasComponentData | fun hasComponentData(key: Int): Boolean Checks if this component has data for the specified key. fun hasComponentData(keyString: String): Boolean Checks if this component has data for the specified string key. |
read | |
recycle | fun recycle() Recycles this component by returning it to its pool. |
reset | open fun reset() Resets the component to its default state. |
setComponentDataValue | fun setComponentDataValue(key: Int, value: Any): Boolean Sets the value for the specified key. fun setComponentDataValue(keyString: String, value: Any): Boolean Sets the value for the specified string key. |
setPool | fun setPool(pool: ComponentPool<*>, entID: Long) Sets the component pool and entity ID for this component. |
toString | open override fun toString(): String |
typeID | open override fun typeID(): Int Returns the unique type ID of this component. |
write |
object Companion : ComponentCompanion
| Name | Summary |
|---|---|
attributeKeys_ | val attributeKeys_: IntArray |
attributeTypeCounts_ | val attributeTypeCounts_: IntArray |
attributeTypes_ | val attributeTypes_: IntArray |
attrMetaData_ | val attrMetaData_: Map<Int, <Error class: unknown class><RegisteredAttributeType, String>> |
createDefaultInstance | open override val createDefaultInstance: () -> Mesh |
defaultSceneOverrideData | val defaultSceneOverrideData: IntAttributeData |
defaultSceneOverrideId | val defaultSceneOverrideId: <Error class: unknown class> |
defaultShaderOverrideData | val defaultShaderOverrideData: StringAttributeData |
defaultShaderOverrideId | val defaultShaderOverrideId: <Error class: unknown class> |
enumClassesMap_ | val enumClassesMap_: Map<Int, Class<out Enum<*>>> |
hittableData | val hittableData: EnumAttributeData |
hittableId | val hittableId: <Error class: unknown class> |
id | open override val id: <Error class: unknown class> |
keyStringToKeyIntMap_ | val keyStringToKeyIntMap_: Map<String, Int> |
meshData | val meshData: URIAttributeData |
meshId | val meshId: <Error class: unknown class> |
| Name | Summary |
|---|---|
attributeKeys | open override fun attributeKeys(): IntArray |
attributeMetaData | open override fun attributeMetaData(): Map<Int, <Error class: unknown class><RegisteredAttributeType, String>> |
attributeTypeCountAvailable | open override fun attributeTypeCountAvailable(): Boolean |
attributeTypeCounts | open override fun attributeTypeCounts(): IntArray |
attributeTypes | open override fun attributeTypes(): IntArray |
dependents | open fun dependents(): IntArray |
enumClassesMap | open override fun enumClassesMap(): Map<Int, Class<out Enum<*>>> |
keyStringToKeyIntMap | open override fun keyStringToKeyIntMap(keyString: String): Int? |