// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Utilities.Gltf.Schema { /// /// Image data used to create a texture. Image can be referenced by URI or /// `bufferView` index. `mimeType` is required in the latter case. /// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/schema/image.schema.json /// [Serializable] public class GltfImage : GltfChildOfRootProperty { #region Serialized Fields /// /// The uri of the image. Relative paths are relative to the .gltf file. /// Instead of referencing an external file, the uri can also be a data-uri. /// The image format must be jpg, png, bmp, or gif. /// public string uri; /// /// The image's MIME type. /// 1 /// public string mimeType; /// /// The index of the bufferView that contains the image. /// Use this instead of the image's uri property. /// public int bufferView; #endregion Serialized Fields /// /// Unity Texture2D wrapper for the GltfImage /// public Texture2D Texture { get; internal set; } } }