VRTexture class

Texture for mapping images onto mesh surfaces.

Constructors

VRTexture({String name = 'texture', TextureWrap wrapS = TextureWrap.repeat, TextureWrap wrapT = TextureWrap.repeat, TextureFilter filter = TextureFilter.linear, double repeatU = 1.0, double repeatV = 1.0})

Properties

filter ↔ TextureFilter
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
height → int
no setter
image → Image?
no setter
isLoaded → bool
no setter
name → String
final
repeatU ↔ double
How many times the image repeats across the mesh's U and V range (1 = once). A 20 m floor plane with a 2 m tile uses repeatU = 10.
getter/setter pair
repeatV ↔ double
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
width → int
no setter
wrapS ↔ TextureWrap
getter/setter pair
wrapT ↔ TextureWrap
getter/setter pair

Methods

dispose() → void
fromBytes(Uint8List rgba, int width, int height) → Future<void>
Creates texture from raw RGBA bytes.
fromColor(Color color) → Future<void>
Creates a 1x1 solid color texture.
loadAsset(String assetPath) → Future<void>
Loads texture from asset path.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sample(double u, double v) → Color
Samples UV coordinate (0-1) and returns approximate color.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited