Interface: Material
Extends
PointerHolder
Properties
isValid
readonly
isValid:boolean
Get if the refernce to the native pointer is still valid and strong.
If this is false
, this object has been manually released with
release
() and all other methods on this object will throw an Error.
Inherited from
PointerHolder.isValid
Defined in
name
readonly
name:string
Defined in
Methods
createInstance()
createInstance():
MaterialInstance
Returns
Defined in
getDefaultInstance()
getDefaultInstance():
MaterialInstance
Returns
Defined in
release()
release():
void
Manually release this reference to the native pointer. This will ensure that JS will no longer hold a strong reference, and memory can be safely cleaned up.
If the native pointer is still referenced elsewhere in native code, the underlying memory will not be deleted unless the other references are also released.
If this is not called, the memory will only be cleaned once the JS gabage collector decides to delete this object, which might be at any point in the future.
Calling release()
is not required as the GC will destroy this
object eventually anyways, but it is recommended to optimize
memory usage.
After manually releasing a pointer, all future methods on this object will throw an Error.
Returns
void
Inherited from
PointerHolder.release
Defined in
setDefaultFloat3Parameter()
setDefaultFloat3Parameter(
name
,vector
):void
Parameters
• name: string
• vector: Float3
Returns
void
Defined in
setDefaultFloat4Parameter()
setDefaultFloat4Parameter(
name
,vector
):void
Changes the base color of the material. Assumes linear (0-1) linear sRGB color space.
Parameters
• name: string
• vector: Float4
Returns
void
Defined in
setDefaultFloatParameter()
setDefaultFloatParameter(
name
,value
):void
Parameters
• name: string
• value: number
Returns
void
Defined in
setDefaultIntParameter()
setDefaultIntParameter(
name
,value
):void
Parameters
• name: string
• value: number
Returns
void
Defined in
setDefaultMat3fParameter()
setDefaultMat3fParameter(
name
,value
):void
Parameters
• name: string
• value: Mat3f
Returns
void
Defined in
setDefaultTextureParameter()
setDefaultTextureParameter(
renderableManager
,name
,textureBuffer
,textureFlags
):TextureInfo
Parameters
• renderableManager: RenderableManager
• name: string
• textureBuffer: FilamentBuffer
• textureFlags: TextureFlags