Texture.parse constructor

Texture.parse(
  1. GltfRoot root,
  2. Map<String, Object?> map
)

Implementation

Texture.parse(
  GltfRoot root,
  Map<String, Object?> map,
) : this(
        root: root,
        format: TextureFormat.parse(map, 'format') ?? TextureFormat.rgba,
        internalFormat:
            TextureFormat.parse(map, 'internalFormat') ?? TextureFormat.rgba,
        sampler: Parser.ref<Sampler>(root, map, 'sampler'),
        source: Parser.ref<Image>(root, map, 'source')!,
        target: TextureTarget.parse(map, 'target') ?? TextureTarget.texture2d,
        type: TextureType.parse(map, 'type') ?? TextureType.unsignedByte,
      );