ProjectedMaterial.fromMap constructor
ProjectedMaterial.fromMap([])
Implementation
ProjectedMaterial.fromMap([
Map<String,dynamic>? map,
image,
Map<String,dynamic>? options
]):super.fromMap(options){
final camera = Camera.fromJson(map?['camera'] ?? {},{});
final texture = Texture.fromJson(map?['texture'], image);
final textureScale = map?['textureScale'] as double? ?? 1;
final textureOffsetList = map?['textureOffset'] as List<dynamic>?;
final textureOffset = textureOffsetList != null
? Vector2(textureOffsetList[0] as double, textureOffsetList[1] as double)
: null;
final backgroundOpacity = map?['backgroundOpacity'] as double? ?? 1;
final cover = map?['cover'] as bool? ?? false;
_init(
camera,
texture,
textureScale,
textureOffset,
backgroundOpacity,
cover,
options
);
}