loadTexture static method

Future<Texture?> loadTexture(
  1. String path, {
  2. bool flipY = false,
})

Replaces THREE.TextureLoader().fromAsset(path).

Implementation

static Future<THREE.Texture?> loadTexture(String path, {bool flipY = false}) async {
  final loader = THREE.TextureLoader(flipY: flipY);
  final b = await packedBytes(path);
  return b != null ? loader.fromBytes(b) : loader.fromAsset(path);
}