API reference
API reference
Select your platform
No SDKs available
No versions available

Material

Material

class Material : ComponentBase
Material is a component that describes the material properties of an object. Details can be find Filament Materials Guide: https://google.github.io/filament/Materials.html

Constructors

NameSummary
Material
constructor()

Types

NameSummary
Companion
object Companion : ComponentCompanion

Properties

NameSummary
alphaMode
var alphaMode: Int
: alpha mode of the material
baseColor
var baseColor: Color4
: base color of the material
baseColorInternal
var baseColorInternal: Vector4
: base color internal of the material
baseTextureAndroidResourceId
var baseTextureAndroidResourceId: Int
: base texture of the material
cachable
val cachable: Boolean = false
creationTime
var creationTime: Long
isDirty
var isDirty: Boolean
metallic
var metallic: Float
: metallic of the material
metallicInternal
var metallicInternal: Float
: metallic internal of the material
offsetU
var offsetU: Float
: offset u of the material
offsetV
var offsetV: Float
: offset v of the material
recycled
var recycled: Boolean
repeatU
var repeatU: Float
: repeat u of the material
repeatV
var repeatV: Float
: repeat v of the material
roughness
var roughness: Float
: roughness of the material
roughnessInternal
var roughnessInternal: Float
: roughness internal of the material
shader
var shader: String
: shader of the material
unlit
var unlit: Boolean
: whether the material is unlit

Functions

NameSummary
generateSceneMaterial
fun generateSceneMaterial(entity: Entity, ctx: <Error class: unknown class>): SceneMaterial
getComponentDataAttributeType
fun getComponentDataAttributeType(key: Int): AttributeType?
fun getComponentDataAttributeType(keyString: String): AttributeType?
getComponentDataKey
fun getComponentDataKey(key: String): Int?
getComponentDataValue
fun getComponentDataValue(key: Int): Any?
fun getComponentDataValue(keyString: String): Any?
getEnumClass
fun getEnumClass(key: String): Class<out Enum<*>>?
hasComponentData
fun hasComponentData(key: Int): Boolean
fun hasComponentData(keyString: String): Boolean
read
fun read(e: Entity, cachable: Boolean)
recycle
fun recycle()
reset
open fun reset()
setComponentDataValue
fun setComponentDataValue(key: Int, value: Any?): Boolean
fun setComponentDataValue(keyString: String, value: Any?): Boolean
setPool
fun setPool(pool: ComponentPool<*>)
toString
open override fun toString(): String
typeID
open override fun typeID(): Int
write
fun write(e: Entity)

Companion

object Companion : ComponentCompanion

Properties

NameSummary
createDefaultInstance
open override val createDefaultInstance: () -> Material
id
open override val id: <Error class: unknown class>
sceneTextureCache
val sceneTextureCache: <Error class: unknown class><Int, SceneTexture>

Functions

NameSummary
dependents
open override fun dependents(): IntArray
Did you find this page helpful?
Thumbs up icon
Thumbs down icon