loadSkyboxFromAsset method

Future<bool> loadSkyboxFromAsset(
  1. String assetPath
)

Loads a skybox image from assetPath and applies it to model-viewer.

Reads the file from the Flutter asset bundle, encodes it as a base-64 data URI, and injects it into the page via JavaScript.

Returns true on success, false if the asset could not be loaded.

Implementation

Future<bool> loadSkyboxFromAsset(String assetPath) {
  return _loadAssetAsAttribute(assetPath, 'skybox-image');
}