setSource
Allows a Texture to be constructed from Uri. Construction will be asynchronous.
Return
Builder for chaining setup calls.
Parameters
Sets a remote Uri or android resource Uri. The texture will be added to the registry using the Uri A previously registered texture with the same Uri will be re-used.
Sets the Context used to resolve sourceUri
Allows a Texture to be constructed via callable function.
Return
Builder for chaining setup calls.
Parameters
Supplies an InputStream with the Texture data.
Allows a Texture to be constructed from resource. Construction will be asynchronous.
Return
Builder for chaining setup calls.
Parameters
an android resource with raw type. A previously registered texture with the same resource id will be re-used.
Context used for resolution
Allows a Texture to be constructed from a Bitmap. Construction will be immediate.
The Bitmap must meet the following conditions to be used by Sceneform:
- getConfig must be ARGB_8888.
- isPremultiplied must be true.
- The width and height must be smaller than 4096 pixels.
Parameters
Bitmap source of texture data
Throws
if the bitmap isn't valid