Pārlūkot izejas kodu

renamed some enumerations to be more meaningful

Vicente Penades 6 gadi atpakaļ
vecāks
revīzija
a8c14e97ad

+ 3 - 3
build/SharpGLTF.CodeGen/Program.cs

@@ -212,9 +212,9 @@ namespace SharpGLTF
 
 
             // newEmitter.SetRuntimeName("Sampler", "TextureSampler");
             // newEmitter.SetRuntimeName("Sampler", "TextureSampler");
 
 
-            newEmitter.SetRuntimeName("UNSIGNED_BYTE-UNSIGNED_INT-UNSIGNED_SHORT", "IndexType");            
-            newEmitter.SetRuntimeName("BYTE-FLOAT-SHORT-UNSIGNED_BYTE-UNSIGNED_INT-UNSIGNED_SHORT", "ComponentType");            
-            newEmitter.SetRuntimeName("MAT2-MAT3-MAT4-SCALAR-VEC2-VEC3-VEC4", "ElementType");
+            newEmitter.SetRuntimeName("UNSIGNED_BYTE-UNSIGNED_INT-UNSIGNED_SHORT", "IndexEncodingType");            
+            newEmitter.SetRuntimeName("BYTE-FLOAT-SHORT-UNSIGNED_BYTE-UNSIGNED_INT-UNSIGNED_SHORT", "EncodingType");            
+            newEmitter.SetRuntimeName("MAT2-MAT3-MAT4-SCALAR-VEC2-VEC3-VEC4", "DimensionType");
             newEmitter.SetRuntimeName("rotation-scale-translation-weights", "PathType");
             newEmitter.SetRuntimeName("rotation-scale-translation-weights", "PathType");
             newEmitter.SetRuntimeName("ARRAY_BUFFER-ELEMENT_ARRAY_BUFFER", "BufferMode");
             newEmitter.SetRuntimeName("ARRAY_BUFFER-ELEMENT_ARRAY_BUFFER", "BufferMode");
             newEmitter.SetRuntimeName("orthographic-perspective", "CameraType");
             newEmitter.SetRuntimeName("orthographic-perspective", "CameraType");

+ 3 - 3
src/SharpGLTF.Toolkit/Geometry/VertexTypes/Attributes.cs

@@ -14,11 +14,11 @@ namespace SharpGLTF.Geometry.VertexTypes
         public VertexAttributeAttribute(string attributeName)
         public VertexAttributeAttribute(string attributeName)
         {
         {
             this.Name = attributeName;
             this.Name = attributeName;
-            this.Encoding = Schema2.ComponentType.FLOAT;
+            this.Encoding = Schema2.EncodingType.FLOAT;
             this.Normalized = false;
             this.Normalized = false;
         }
         }
 
 
-        public VertexAttributeAttribute(string attributeName, Schema2.ComponentType encoding, Boolean normalized)
+        public VertexAttributeAttribute(string attributeName, Schema2.EncodingType encoding, Boolean normalized)
         {
         {
             this.Name = attributeName;
             this.Name = attributeName;
             this.Encoding = encoding;
             this.Encoding = encoding;
@@ -31,7 +31,7 @@ namespace SharpGLTF.Geometry.VertexTypes
 
 
         public string Name { get; private set; }
         public string Name { get; private set; }
 
 
-        public Schema2.ComponentType Encoding { get; private set; }
+        public Schema2.EncodingType Encoding { get; private set; }
 
 
         public Boolean Normalized { get; private set; }
         public Boolean Normalized { get; private set; }
 
 

+ 2 - 2
src/SharpGLTF.Toolkit/Geometry/VertexTypes/SkinnedVertices.cs

@@ -24,10 +24,10 @@ namespace SharpGLTF.Geometry.VertexTypes
         [VertexAttribute("POSITION")]
         [VertexAttribute("POSITION")]
         public Vector3 Position;
         public Vector3 Position;
 
 
-        [VertexAttribute("JOINTS_0", Schema2.ComponentType.UNSIGNED_BYTE, false)]
+        [VertexAttribute("JOINTS_0", Schema2.EncodingType.UNSIGNED_BYTE, false)]
         public Vector4 Joints_0;
         public Vector4 Joints_0;
 
 
-        [VertexAttribute("WEIGHTS_0", Schema2.ComponentType.UNSIGNED_BYTE, true)]
+        [VertexAttribute("WEIGHTS_0", Schema2.EncodingType.UNSIGNED_BYTE, true)]
         public Vector4 Weights_0;
         public Vector4 Weights_0;
     }
     }
 }
 }

+ 8 - 8
src/SharpGLTF.Toolkit/Geometry/VertexTypes/VertexUtils.cs

@@ -52,14 +52,14 @@ namespace SharpGLTF.Geometry.VertexTypes
 
 
             if (attribute == null) return null;
             if (attribute == null) return null;
 
 
-            var dimensions = (Schema2.ElementType?)null;
-
-            if (finfo.FieldType == typeof(Single)) dimensions = Schema2.ElementType.SCALAR;
-            if (finfo.FieldType == typeof(Vector2)) dimensions = Schema2.ElementType.VEC2;
-            if (finfo.FieldType == typeof(Vector3)) dimensions = Schema2.ElementType.VEC3;
-            if (finfo.FieldType == typeof(Vector4)) dimensions = Schema2.ElementType.VEC4;
-            if (finfo.FieldType == typeof(Quaternion)) dimensions = Schema2.ElementType.VEC4;
-            if (finfo.FieldType == typeof(Matrix4x4)) dimensions = Schema2.ElementType.MAT4;
+            var dimensions = (Schema2.DimensionType?)null;
+
+            if (finfo.FieldType == typeof(Single)) dimensions = Schema2.DimensionType.SCALAR;
+            if (finfo.FieldType == typeof(Vector2)) dimensions = Schema2.DimensionType.VEC2;
+            if (finfo.FieldType == typeof(Vector3)) dimensions = Schema2.DimensionType.VEC3;
+            if (finfo.FieldType == typeof(Vector4)) dimensions = Schema2.DimensionType.VEC4;
+            if (finfo.FieldType == typeof(Quaternion)) dimensions = Schema2.DimensionType.VEC4;
+            if (finfo.FieldType == typeof(Matrix4x4)) dimensions = Schema2.DimensionType.MAT4;
 
 
             if (dimensions == null) throw new ArgumentException($"invalid type {finfo.FieldType}");
             if (dimensions == null) throw new ArgumentException($"invalid type {finfo.FieldType}");
 
 

+ 6 - 6
src/SharpGLTF/Debug/DebugViews.cs

@@ -57,17 +57,17 @@ namespace SharpGLTF.Debug
 
 
         public Schema2.BufferView Source => _Value.SourceBufferView;
         public Schema2.BufferView Source => _Value.SourceBufferView;
 
 
-        public (Schema2.ElementType, Schema2.ComponentType, bool) Format => (_Value.Dimensions, _Value.Encoding, _Value.Normalized);
+        public (Schema2.DimensionType, Schema2.EncodingType, bool) Format => (_Value.Dimensions, _Value.Encoding, _Value.Normalized);
 
 
         public Object[] Items
         public Object[] Items
         {
         {
             get
             get
             {
             {
-                if (_Value.Dimensions == Schema2.ElementType.SCALAR) return _Value.AsScalarArray().Cast<Object>().ToArray();
-                if (_Value.Dimensions == Schema2.ElementType.VEC2) return _Value.AsVector2Array().Cast<Object>().ToArray();
-                if (_Value.Dimensions == Schema2.ElementType.VEC3) return _Value.AsVector3Array().Cast<Object>().ToArray();
-                if (_Value.Dimensions == Schema2.ElementType.VEC4) return _Value.AsVector4Array().Cast<Object>().ToArray();
-                if (_Value.Dimensions == Schema2.ElementType.MAT4) return _Value.AsMatrix4x4Array().Cast<Object>().ToArray();
+                if (_Value.Dimensions == Schema2.DimensionType.SCALAR) return _Value.AsScalarArray().Cast<Object>().ToArray();
+                if (_Value.Dimensions == Schema2.DimensionType.VEC2) return _Value.AsVector2Array().Cast<Object>().ToArray();
+                if (_Value.Dimensions == Schema2.DimensionType.VEC3) return _Value.AsVector3Array().Cast<Object>().ToArray();
+                if (_Value.Dimensions == Schema2.DimensionType.VEC4) return _Value.AsVector4Array().Cast<Object>().ToArray();
+                if (_Value.Dimensions == Schema2.DimensionType.MAT4) return _Value.AsMatrix4x4Array().Cast<Object>().ToArray();
 
 
                 var itemSize = _Value.ItemByteSize;
                 var itemSize = _Value.ItemByteSize;
                 var byteStride = Math.Max(_Value.SourceBufferView.ByteStride, itemSize);
                 var byteStride = Math.Max(_Value.SourceBufferView.ByteStride, itemSize);

+ 2 - 2
src/SharpGLTF/Geometry/MemoryAccessor.cs

@@ -8,8 +8,8 @@ namespace SharpGLTF.Geometry
 {
 {
     using Memory;
     using Memory;
 
 
-    using DIMENSIONS = Schema2.ElementType;
-    using ENCODING = Schema2.ComponentType;
+    using DIMENSIONS = Schema2.DimensionType;
+    using ENCODING = Schema2.EncodingType;
 
 
     /// <summary>
     /// <summary>
     /// Defines the pattern in which a <see cref="ArraySegment{Byte}"/> is accessed and decoded to meaningful values.
     /// Defines the pattern in which a <see cref="ArraySegment{Byte}"/> is accessed and decoded to meaningful values.

+ 1 - 1
src/SharpGLTF/Memory/Arrays.cs

@@ -67,7 +67,7 @@ namespace SharpGLTF.Memory
     {
     {
         public static IntegerArray IndicesRange(int start, int count)
         public static IntegerArray IndicesRange(int start, int count)
         {
         {
-            var array = new IntegerArray( new ArraySegment<Byte>(new Byte[count * 4]), Schema2.IndexType.UNSIGNED_INT);
+            var array = new IntegerArray( new ArraySegment<Byte>(new Byte[count * 4]), Schema2.IndexEncodingType.UNSIGNED_INT);
 
 
             for (int i = 0; i < count; ++i)
             for (int i = 0; i < count; ++i)
             {
             {

+ 1 - 1
src/SharpGLTF/Memory/FloatingArrays.cs

@@ -9,7 +9,7 @@ namespace SharpGLTF.Memory
 {
 {
     using BYTES = ArraySegment<Byte>;
     using BYTES = ArraySegment<Byte>;
 
 
-    using ENCODING = Schema2.ComponentType;
+    using ENCODING = Schema2.EncodingType;
 
 
     /// <summary>
     /// <summary>
     /// Wraps a <see cref="ArraySegment{Byte}"/> containing encoded <see cref="Single"/> values
     /// Wraps a <see cref="ArraySegment{Byte}"/> containing encoded <see cref="Single"/> values

+ 1 - 1
src/SharpGLTF/Memory/IntegerArrays.cs

@@ -8,7 +8,7 @@ namespace SharpGLTF.Memory
 {
 {
     using BYTES = ArraySegment<Byte>;
     using BYTES = ArraySegment<Byte>;
 
 
-    using ENCODING = Schema2.IndexType;
+    using ENCODING = Schema2.IndexEncodingType;
 
 
     /// <summary>
     /// <summary>
     /// Wraps an encoded <see cref="BYTES"/> and exposes it as an array of <see cref="UInt32"/> values
     /// Wraps an encoded <see cref="BYTES"/> and exposes it as an array of <see cref="UInt32"/> values

+ 12 - 12
src/SharpGLTF/Schema2/Generated/gltf.g.cs

@@ -28,7 +28,7 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// The indices data type.
 	/// The indices data type.
 	/// </summary>
 	/// </summary>
-	public enum IndexType
+	public enum IndexEncodingType
 	{
 	{
 		UNSIGNED_BYTE = 5121,
 		UNSIGNED_BYTE = 5121,
 		UNSIGNED_SHORT = 5123,
 		UNSIGNED_SHORT = 5123,
@@ -39,7 +39,7 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// The datatype of components in the attribute.
 	/// The datatype of components in the attribute.
 	/// </summary>
 	/// </summary>
-	public enum ComponentType
+	public enum EncodingType
 	{
 	{
 		BYTE = 5120,
 		BYTE = 5120,
 		UNSIGNED_BYTE = 5121,
 		UNSIGNED_BYTE = 5121,
@@ -53,7 +53,7 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// Specifies if the attribute is a scalar, vector, or matrix.
 	/// Specifies if the attribute is a scalar, vector, or matrix.
 	/// </summary>
 	/// </summary>
-	public enum ElementType
+	public enum DimensionType
 	{
 	{
 		SCALAR,
 		SCALAR,
 		VEC2,
 		VEC2,
@@ -206,7 +206,7 @@ namespace SharpGLTF.Schema2
 		private const Int32 _byteOffsetMinimum = 0;
 		private const Int32 _byteOffsetMinimum = 0;
 		private Int32? _byteOffset = _byteOffsetDefault;
 		private Int32? _byteOffset = _byteOffsetDefault;
 		
 		
-		private IndexType _componentType;
+		private IndexEncodingType _componentType;
 		
 		
 	
 	
 		/// <inheritdoc />
 		/// <inheritdoc />
@@ -215,7 +215,7 @@ namespace SharpGLTF.Schema2
 			base.SerializeProperties(writer);
 			base.SerializeProperties(writer);
 			SerializeProperty(writer, "bufferView", _bufferView);
 			SerializeProperty(writer, "bufferView", _bufferView);
 			SerializeProperty(writer, "byteOffset", _byteOffset, _byteOffsetDefault);
 			SerializeProperty(writer, "byteOffset", _byteOffset, _byteOffsetDefault);
-			SerializePropertyEnumValue<IndexType>(writer, "componentType", _componentType);
+			SerializePropertyEnumValue<IndexEncodingType>(writer, "componentType", _componentType);
 		}
 		}
 	
 	
 		/// <inheritdoc />
 		/// <inheritdoc />
@@ -225,7 +225,7 @@ namespace SharpGLTF.Schema2
 			{
 			{
 				case "bufferView": _bufferView = DeserializeValue<Int32>(reader); break;
 				case "bufferView": _bufferView = DeserializeValue<Int32>(reader); break;
 				case "byteOffset": _byteOffset = DeserializeValue<Int32?>(reader); break;
 				case "byteOffset": _byteOffset = DeserializeValue<Int32?>(reader); break;
-				case "componentType": _componentType = DeserializeValue<IndexType>(reader); break;
+				case "componentType": _componentType = DeserializeValue<IndexEncodingType>(reader); break;
 				default: base.DeserializeProperty(reader, property); break;
 				default: base.DeserializeProperty(reader, property); break;
 			}
 			}
 		}
 		}
@@ -317,7 +317,7 @@ namespace SharpGLTF.Schema2
 		private const Int32 _byteOffsetMinimum = 0;
 		private const Int32 _byteOffsetMinimum = 0;
 		private Int32? _byteOffset = _byteOffsetDefault;
 		private Int32? _byteOffset = _byteOffsetDefault;
 		
 		
-		private ComponentType _componentType;
+		private EncodingType _componentType;
 		
 		
 		private const Int32 _countMinimum = 1;
 		private const Int32 _countMinimum = 1;
 		private Int32 _count;
 		private Int32 _count;
@@ -335,7 +335,7 @@ namespace SharpGLTF.Schema2
 		
 		
 		private AccessorSparse _sparse;
 		private AccessorSparse _sparse;
 		
 		
-		private ElementType _type;
+		private DimensionType _type;
 		
 		
 	
 	
 		/// <inheritdoc />
 		/// <inheritdoc />
@@ -344,13 +344,13 @@ namespace SharpGLTF.Schema2
 			base.SerializeProperties(writer);
 			base.SerializeProperties(writer);
 			SerializeProperty(writer, "bufferView", _bufferView);
 			SerializeProperty(writer, "bufferView", _bufferView);
 			SerializeProperty(writer, "byteOffset", _byteOffset, _byteOffsetDefault);
 			SerializeProperty(writer, "byteOffset", _byteOffset, _byteOffsetDefault);
-			SerializePropertyEnumValue<ComponentType>(writer, "componentType", _componentType);
+			SerializePropertyEnumValue<EncodingType>(writer, "componentType", _componentType);
 			SerializeProperty(writer, "count", _count);
 			SerializeProperty(writer, "count", _count);
 			SerializeProperty(writer, "max", _max, _maxMinItems);
 			SerializeProperty(writer, "max", _max, _maxMinItems);
 			SerializeProperty(writer, "min", _min, _minMinItems);
 			SerializeProperty(writer, "min", _min, _minMinItems);
 			SerializeProperty(writer, "normalized", _normalized, _normalizedDefault);
 			SerializeProperty(writer, "normalized", _normalized, _normalizedDefault);
 			SerializePropertyObject(writer, "sparse", _sparse);
 			SerializePropertyObject(writer, "sparse", _sparse);
-			SerializePropertyEnumSymbol<ElementType>(writer, "type", _type);
+			SerializePropertyEnumSymbol<DimensionType>(writer, "type", _type);
 		}
 		}
 	
 	
 		/// <inheritdoc />
 		/// <inheritdoc />
@@ -360,13 +360,13 @@ namespace SharpGLTF.Schema2
 			{
 			{
 				case "bufferView": _bufferView = DeserializeValue<Int32?>(reader); break;
 				case "bufferView": _bufferView = DeserializeValue<Int32?>(reader); break;
 				case "byteOffset": _byteOffset = DeserializeValue<Int32?>(reader); break;
 				case "byteOffset": _byteOffset = DeserializeValue<Int32?>(reader); break;
-				case "componentType": _componentType = DeserializeValue<ComponentType>(reader); break;
+				case "componentType": _componentType = DeserializeValue<EncodingType>(reader); break;
 				case "count": _count = DeserializeValue<Int32>(reader); break;
 				case "count": _count = DeserializeValue<Int32>(reader); break;
 				case "max": DeserializeList<Double>(reader, _max); break;
 				case "max": DeserializeList<Double>(reader, _max); break;
 				case "min": DeserializeList<Double>(reader, _min); break;
 				case "min": DeserializeList<Double>(reader, _min); break;
 				case "normalized": _normalized = DeserializeValue<Boolean?>(reader); break;
 				case "normalized": _normalized = DeserializeValue<Boolean?>(reader); break;
 				case "sparse": _sparse = DeserializeValue<AccessorSparse>(reader); break;
 				case "sparse": _sparse = DeserializeValue<AccessorSparse>(reader); break;
-				case "type": _type = DeserializeValue<ElementType>(reader); break;
+				case "type": _type = DeserializeValue<DimensionType>(reader); break;
 				default: base.DeserializeProperty(reader, property); break;
 				default: base.DeserializeProperty(reader, property); break;
 			}
 			}
 		}
 		}

+ 2 - 2
src/SharpGLTF/Schema2/gltf.AccessorSparse.cs

@@ -29,7 +29,7 @@ namespace SharpGLTF.Schema2
             return base.GetLogicalChildren().Concat(_indices, _values);
             return base.GetLogicalChildren().Concat(_indices, _values);
         }
         }
 
 
-        internal AccessorSparse(BufferView indices, int indicesOffset, IndexType indicesEncoding, BufferView values, int valuesOffset, int count)
+        internal AccessorSparse(BufferView indices, int indicesOffset, IndexEncodingType indicesEncoding, BufferView values, int valuesOffset, int count)
         {
         {
             Guard.NotNull(indices, nameof(indices));
             Guard.NotNull(indices, nameof(indices));
             Guard.NotNull(values, nameof(values));
             Guard.NotNull(values, nameof(values));
@@ -55,7 +55,7 @@ namespace SharpGLTF.Schema2
     {
     {
         internal AccessorSparseIndices() { }
         internal AccessorSparseIndices() { }
 
 
-        internal AccessorSparseIndices(BufferView bv, int byteOffset, IndexType encoding)
+        internal AccessorSparseIndices(BufferView bv, int byteOffset, IndexEncodingType encoding)
         {
         {
             Guard.NotNull(bv, nameof(bv));
             Guard.NotNull(bv, nameof(bv));
             Guard.MustBeGreaterThanOrEqualTo(byteOffset, _byteOffsetMinimum, nameof(byteOffset));
             Guard.MustBeGreaterThanOrEqualTo(byteOffset, _byteOffsetMinimum, nameof(byteOffset));

+ 24 - 24
src/SharpGLTF/Schema2/gltf.Accessors.cs

@@ -52,9 +52,9 @@ namespace SharpGLTF.Schema2
 
 
         public int ByteOffset                   => this._byteOffset.AsValue(0);
         public int ByteOffset                   => this._byteOffset.AsValue(0);
 
 
-        public ElementType Dimensions           => this._type;
+        public DimensionType Dimensions           => this._type;
 
 
-        public ComponentType Encoding           => this._componentType;
+        public EncodingType Encoding           => this._componentType;
 
 
         public Boolean Normalized               => this._normalized.AsValue(false);
         public Boolean Normalized               => this._normalized.AsValue(false);
 
 
@@ -97,7 +97,7 @@ namespace SharpGLTF.Schema2
 
 
         #region Data Buffer API
         #region Data Buffer API
 
 
-        public Accessor WithData(BufferView buffer, int byteOffset, int itemCount, ElementType dimensions, ComponentType encoding, Boolean normalized)
+        public Accessor WithData(BufferView buffer, int byteOffset, int itemCount, DimensionType dimensions, EncodingType encoding, Boolean normalized)
         {
         {
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
 
 
@@ -132,7 +132,7 @@ namespace SharpGLTF.Schema2
             return this.WithIndexData(bv, src.Attribute.ByteOffset, src.Attribute.ItemsCount, src.Attribute.Encoding.ToIndex());
             return this.WithIndexData(bv, src.Attribute.ByteOffset, src.Attribute.ItemsCount, src.Attribute.Encoding.ToIndex());
         }
         }
 
 
-        public Accessor WithIndexData(BufferView buffer, int byteOffset, IReadOnlyList<Int32> items, IndexType encoding = IndexType.UNSIGNED_INT)
+        public Accessor WithIndexData(BufferView buffer, int byteOffset, IReadOnlyList<Int32> items, IndexEncodingType encoding = IndexEncodingType.UNSIGNED_INT)
         {
         {
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
 
 
@@ -145,7 +145,7 @@ namespace SharpGLTF.Schema2
             return this;
             return this;
         }
         }
 
 
-        public Accessor WithIndexData(BufferView buffer, int byteOffset, IReadOnlyList<UInt32> items, IndexType encoding = IndexType.UNSIGNED_INT)
+        public Accessor WithIndexData(BufferView buffer, int byteOffset, IReadOnlyList<UInt32> items, IndexEncodingType encoding = IndexEncodingType.UNSIGNED_INT)
         {
         {
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
 
 
@@ -158,20 +158,20 @@ namespace SharpGLTF.Schema2
             return this;
             return this;
         }
         }
 
 
-        public Accessor WithIndexData(BufferView buffer, int byteOffset, int itemCount, IndexType encoding)
+        public Accessor WithIndexData(BufferView buffer, int byteOffset, int itemCount, IndexEncodingType encoding)
         {
         {
             Guard.NotNull(buffer, nameof(buffer));
             Guard.NotNull(buffer, nameof(buffer));
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
 
 
             if (buffer.DeviceBufferTarget.HasValue) Guard.IsTrue(buffer.DeviceBufferTarget.Value == BufferMode.ELEMENT_ARRAY_BUFFER, nameof(buffer));
             if (buffer.DeviceBufferTarget.HasValue) Guard.IsTrue(buffer.DeviceBufferTarget.Value == BufferMode.ELEMENT_ARRAY_BUFFER, nameof(buffer));
 
 
-            return WithData(buffer, byteOffset, itemCount, ElementType.SCALAR, encoding.ToComponent(), false);
+            return WithData(buffer, byteOffset, itemCount, DimensionType.SCALAR, encoding.ToComponent(), false);
         }
         }
 
 
         public Memory.IntegerArray AsIndicesArray()
         public Memory.IntegerArray AsIndicesArray()
         {
         {
             Guard.IsFalse(this.IsSparse, nameof(IsSparse));
             Guard.IsFalse(this.IsSparse, nameof(IsSparse));
-            Guard.IsTrue(this.Dimensions == ElementType.SCALAR, nameof(Dimensions));
+            Guard.IsTrue(this.Dimensions == DimensionType.SCALAR, nameof(Dimensions));
 
 
             return new Memory.IntegerArray(SourceBufferView.Content, this.ByteOffset, this._count, this.Encoding.ToIndex());
             return new Memory.IntegerArray(SourceBufferView.Content, this.ByteOffset, this._count, this.Encoding.ToIndex());
         }
         }
@@ -186,12 +186,12 @@ namespace SharpGLTF.Schema2
             return this.WithVertexData(bv, src.Attribute.ByteOffset, src.Attribute.ItemsCount, src.Attribute.Dimensions, src.Attribute.Encoding, src.Attribute.Normalized);
             return this.WithVertexData(bv, src.Attribute.ByteOffset, src.Attribute.ItemsCount, src.Attribute.Dimensions, src.Attribute.Encoding, src.Attribute.Normalized);
         }
         }
 
 
-        public Accessor WithVertexData(BufferView buffer, int bufferByteOffset, IReadOnlyList<Single> items, ComponentType encoding = ComponentType.FLOAT, Boolean normalized = false)
+        public Accessor WithVertexData(BufferView buffer, int bufferByteOffset, IReadOnlyList<Single> items, EncodingType encoding = EncodingType.FLOAT, Boolean normalized = false)
         {
         {
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
-            Guard.MustBePositiveAndMultipleOf(ElementType.SCALAR.DimCount() * encoding.ByteLength(), 4, nameof(encoding));
+            Guard.MustBePositiveAndMultipleOf(DimensionType.SCALAR.DimCount() * encoding.ByteLength(), 4, nameof(encoding));
 
 
-            WithVertexData(buffer, bufferByteOffset, items.Count, ElementType.SCALAR, encoding, normalized)
+            WithVertexData(buffer, bufferByteOffset, items.Count, DimensionType.SCALAR, encoding, normalized)
                 .AsScalarArray()
                 .AsScalarArray()
                 .FillFrom(0, items);
                 .FillFrom(0, items);
 
 
@@ -200,12 +200,12 @@ namespace SharpGLTF.Schema2
             return this;
             return this;
         }
         }
 
 
-        public Accessor WithVertexData(BufferView buffer, int bufferByteOffset, IReadOnlyList<Vector2> items, ComponentType encoding = ComponentType.FLOAT, Boolean normalized = false)
+        public Accessor WithVertexData(BufferView buffer, int bufferByteOffset, IReadOnlyList<Vector2> items, EncodingType encoding = EncodingType.FLOAT, Boolean normalized = false)
         {
         {
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
-            Guard.MustBePositiveAndMultipleOf(ElementType.VEC2.DimCount() * encoding.ByteLength(), 4, nameof(encoding));
+            Guard.MustBePositiveAndMultipleOf(DimensionType.VEC2.DimCount() * encoding.ByteLength(), 4, nameof(encoding));
 
 
-            WithVertexData(buffer, bufferByteOffset, items.Count, ElementType.VEC2, encoding, normalized)
+            WithVertexData(buffer, bufferByteOffset, items.Count, DimensionType.VEC2, encoding, normalized)
                 .AsVector2Array()
                 .AsVector2Array()
                 .FillFrom(0, items);
                 .FillFrom(0, items);
 
 
@@ -214,12 +214,12 @@ namespace SharpGLTF.Schema2
             return this;
             return this;
         }
         }
 
 
-        public Accessor WithVertexData(BufferView buffer, int bufferByteOffset, IReadOnlyList<Vector3> items, ComponentType encoding = ComponentType.FLOAT, Boolean normalized = false)
+        public Accessor WithVertexData(BufferView buffer, int bufferByteOffset, IReadOnlyList<Vector3> items, EncodingType encoding = EncodingType.FLOAT, Boolean normalized = false)
         {
         {
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
-            Guard.MustBePositiveAndMultipleOf(ElementType.VEC3.DimCount() * encoding.ByteLength(), 4, nameof(encoding));
+            Guard.MustBePositiveAndMultipleOf(DimensionType.VEC3.DimCount() * encoding.ByteLength(), 4, nameof(encoding));
 
 
-            WithVertexData(buffer, bufferByteOffset, items.Count, ElementType.VEC3, encoding, normalized)
+            WithVertexData(buffer, bufferByteOffset, items.Count, DimensionType.VEC3, encoding, normalized)
                 .AsVector3Array()
                 .AsVector3Array()
                 .FillFrom(0, items);
                 .FillFrom(0, items);
 
 
@@ -228,12 +228,12 @@ namespace SharpGLTF.Schema2
             return this;
             return this;
         }
         }
 
 
-        public Accessor WithVertexData(BufferView buffer, int bufferByteOffset, IReadOnlyList<Vector4> items, ComponentType encoding = ComponentType.FLOAT, Boolean normalized = false)
+        public Accessor WithVertexData(BufferView buffer, int bufferByteOffset, IReadOnlyList<Vector4> items, EncodingType encoding = EncodingType.FLOAT, Boolean normalized = false)
         {
         {
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
-            Guard.MustBePositiveAndMultipleOf(ElementType.VEC4.DimCount() * encoding.ByteLength(), 4, nameof(encoding));
+            Guard.MustBePositiveAndMultipleOf(DimensionType.VEC4.DimCount() * encoding.ByteLength(), 4, nameof(encoding));
 
 
-            WithVertexData(buffer, bufferByteOffset, items.Count, ElementType.VEC4, encoding, normalized)
+            WithVertexData(buffer, bufferByteOffset, items.Count, DimensionType.VEC4, encoding, normalized)
                 .AsVector4Array()
                 .AsVector4Array()
                 .FillFrom(0, items);
                 .FillFrom(0, items);
 
 
@@ -242,12 +242,12 @@ namespace SharpGLTF.Schema2
             return this;
             return this;
         }
         }
 
 
-        public Accessor WithVertexData(BufferView buffer, int bufferByteOffset, IReadOnlyList<Quaternion> items, ComponentType encoding = ComponentType.FLOAT, Boolean normalized = false)
+        public Accessor WithVertexData(BufferView buffer, int bufferByteOffset, IReadOnlyList<Quaternion> items, EncodingType encoding = EncodingType.FLOAT, Boolean normalized = false)
         {
         {
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
-            Guard.MustBePositiveAndMultipleOf(ElementType.VEC4.DimCount() * encoding.ByteLength(), 4, nameof(encoding));
+            Guard.MustBePositiveAndMultipleOf(DimensionType.VEC4.DimCount() * encoding.ByteLength(), 4, nameof(encoding));
 
 
-            WithVertexData(buffer, bufferByteOffset, items.Count, ElementType.VEC4, encoding, normalized)
+            WithVertexData(buffer, bufferByteOffset, items.Count, DimensionType.VEC4, encoding, normalized)
                 .AsQuaternionArray()
                 .AsQuaternionArray()
                 .FillFrom(0, items);
                 .FillFrom(0, items);
 
 
@@ -256,7 +256,7 @@ namespace SharpGLTF.Schema2
             return this;
             return this;
         }
         }
 
 
-        public Accessor WithVertexData(BufferView buffer, int bufferByteOffset, int itemCount, ElementType dimensions = ElementType.VEC3, ComponentType encoding = ComponentType.FLOAT, Boolean normalized = false)
+        public Accessor WithVertexData(BufferView buffer, int bufferByteOffset, int itemCount, DimensionType dimensions = DimensionType.VEC3, EncodingType encoding = EncodingType.FLOAT, Boolean normalized = false)
         {
         {
             Guard.NotNull(buffer, nameof(buffer));
             Guard.NotNull(buffer, nameof(buffer));
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));
             Guard.MustShareLogicalParent(this, buffer, nameof(buffer));

+ 3 - 3
src/SharpGLTF/Schema2/gltf.Animations.cs

@@ -292,7 +292,7 @@ namespace SharpGLTF.Schema2
 
 
             var buffer = root.UseBufferView(new Byte[input.Count * 4]);
             var buffer = root.UseBufferView(new Byte[input.Count * 4]);
             var accessor = root.CreateAccessor("Animation.Input")
             var accessor = root.CreateAccessor("Animation.Input")
-                .WithData(buffer, 0, input.Count, ElementType.SCALAR, ComponentType.FLOAT, false);
+                .WithData(buffer, 0, input.Count, DimensionType.SCALAR, EncodingType.FLOAT, false);
 
 
             Memory.EncodedArrayUtils.FillFrom(accessor.AsScalarArray(), 0, input);
             Memory.EncodedArrayUtils.FillFrom(accessor.AsScalarArray(), 0, input);
 
 
@@ -310,7 +310,7 @@ namespace SharpGLTF.Schema2
             System.Diagnostics.Debug.Assert(buffer.ByteStride == 0);
             System.Diagnostics.Debug.Assert(buffer.ByteStride == 0);
 
 
             var accessor = root.CreateAccessor("Animation.Output")
             var accessor = root.CreateAccessor("Animation.Output")
-                .WithData(buffer, 0, output.Count, ElementType.VEC3, ComponentType.FLOAT, false);
+                .WithData(buffer, 0, output.Count, DimensionType.VEC3, EncodingType.FLOAT, false);
 
 
             Memory.EncodedArrayUtils.FillFrom(accessor.AsVector3Array(), 0, output);
             Memory.EncodedArrayUtils.FillFrom(accessor.AsVector3Array(), 0, output);
 
 
@@ -325,7 +325,7 @@ namespace SharpGLTF.Schema2
 
 
             var buffer = root.UseBufferView(new Byte[output.Count * 4 * 4]);
             var buffer = root.UseBufferView(new Byte[output.Count * 4 * 4]);
             var accessor = root.CreateAccessor("Animation.Output")
             var accessor = root.CreateAccessor("Animation.Output")
-                .WithData(buffer, 0, output.Count, ElementType.VEC4, ComponentType.FLOAT, false);
+                .WithData(buffer, 0, output.Count, DimensionType.VEC4, EncodingType.FLOAT, false);
 
 
             Memory.EncodedArrayUtils.FillFrom(accessor.AsQuaternionArray(), 0, output);
             Memory.EncodedArrayUtils.FillFrom(accessor.AsQuaternionArray(), 0, output);
 
 

+ 1 - 1
src/SharpGLTF/Schema2/gltf.BufferView.cs

@@ -8,7 +8,7 @@ namespace SharpGLTF.Schema2
 {
 {
     using BYTES = ArraySegment<Byte>;
     using BYTES = ArraySegment<Byte>;
 
 
-    using ENCODING = ComponentType;
+    using ENCODING = EncodingType;
 
 
     [System.Diagnostics.DebuggerTypeProxy(typeof(Debug._BufferDebugProxy))]
     [System.Diagnostics.DebuggerTypeProxy(typeof(Debug._BufferDebugProxy))]
     public sealed partial class BufferView
     public sealed partial class BufferView

+ 2 - 2
src/SharpGLTF/Schema2/gltf.Skin.cs

@@ -163,12 +163,12 @@ namespace SharpGLTF.Schema2
 
 
             var data = new Byte[joints.Length * 16 * 4];
             var data = new Byte[joints.Length * 16 * 4];
 
 
-            var matrices = new Memory.Matrix4x4Array(data.Slice(0), 0, ComponentType.FLOAT, false);
+            var matrices = new Memory.Matrix4x4Array(data.Slice(0), 0, EncodingType.FLOAT, false);
             Memory.EncodedArrayUtils.FillFrom(matrices, 0, joints.Select(item => item.Value));
             Memory.EncodedArrayUtils.FillFrom(matrices, 0, joints.Select(item => item.Value));
 
 
             var accessor = LogicalParent
             var accessor = LogicalParent
                 .CreateAccessor("Bind Matrices")
                 .CreateAccessor("Bind Matrices")
-                .WithData( LogicalParent.UseBufferView(data), 0, joints.Length, ElementType.MAT4, ComponentType.FLOAT, false);
+                .WithData( LogicalParent.UseBufferView(data), 0, joints.Length, DimensionType.MAT4, EncodingType.FLOAT, false);
 
 
             this._inverseBindMatrices = accessor.LogicalIndex;
             this._inverseBindMatrices = accessor.LogicalIndex;
 
 

+ 34 - 34
src/SharpGLTF/_Extensions.cs

@@ -275,84 +275,84 @@ namespace SharpGLTF
 
 
         #region vertex & index accessors
         #region vertex & index accessors
 
 
-        public static int ByteLength(this IndexType encoding)
+        public static int ByteLength(this IndexEncodingType encoding)
         {
         {
             switch (encoding)
             switch (encoding)
             {
             {
-                case IndexType.UNSIGNED_BYTE: return 1;
-                case IndexType.UNSIGNED_SHORT: return 2;
-                case IndexType.UNSIGNED_INT: return 4;
+                case IndexEncodingType.UNSIGNED_BYTE: return 1;
+                case IndexEncodingType.UNSIGNED_SHORT: return 2;
+                case IndexEncodingType.UNSIGNED_INT: return 4;
 
 
                 default: throw new NotImplementedException();
                 default: throw new NotImplementedException();
             }
             }
         }
         }
 
 
-        public static int ByteLength(this ComponentType encoding)
+        public static int ByteLength(this EncodingType encoding)
         {
         {
             switch (encoding)
             switch (encoding)
             {
             {
-                case ComponentType.BYTE: return 1;
-                case ComponentType.SHORT: return 2;
-                case ComponentType.FLOAT: return 4;
+                case EncodingType.BYTE: return 1;
+                case EncodingType.SHORT: return 2;
+                case EncodingType.FLOAT: return 4;
 
 
-                case ComponentType.UNSIGNED_BYTE: return 1;
-                case ComponentType.UNSIGNED_SHORT: return 2;
-                case ComponentType.UNSIGNED_INT: return 4;
+                case EncodingType.UNSIGNED_BYTE: return 1;
+                case EncodingType.UNSIGNED_SHORT: return 2;
+                case EncodingType.UNSIGNED_INT: return 4;
 
 
                 default: throw new NotImplementedException();
                 default: throw new NotImplementedException();
             }
             }
         }
         }
 
 
-        public static ComponentType ToComponent(this IndexType t)
+        public static EncodingType ToComponent(this IndexEncodingType t)
         {
         {
             switch (t)
             switch (t)
             {
             {
-                case IndexType.UNSIGNED_BYTE: return ComponentType.UNSIGNED_BYTE;
-                case IndexType.UNSIGNED_SHORT: return ComponentType.UNSIGNED_SHORT;
-                case IndexType.UNSIGNED_INT: return ComponentType.UNSIGNED_INT;
+                case IndexEncodingType.UNSIGNED_BYTE: return EncodingType.UNSIGNED_BYTE;
+                case IndexEncodingType.UNSIGNED_SHORT: return EncodingType.UNSIGNED_SHORT;
+                case IndexEncodingType.UNSIGNED_INT: return EncodingType.UNSIGNED_INT;
 
 
                 default: throw new NotImplementedException();
                 default: throw new NotImplementedException();
             }
             }
         }
         }
 
 
-        public static IndexType ToIndex(this ComponentType t)
+        public static IndexEncodingType ToIndex(this EncodingType t)
         {
         {
             switch (t)
             switch (t)
             {
             {
-                case ComponentType.UNSIGNED_BYTE: return IndexType.UNSIGNED_BYTE;
-                case ComponentType.UNSIGNED_SHORT: return IndexType.UNSIGNED_SHORT;
-                case ComponentType.UNSIGNED_INT: return IndexType.UNSIGNED_INT;
+                case EncodingType.UNSIGNED_BYTE: return IndexEncodingType.UNSIGNED_BYTE;
+                case EncodingType.UNSIGNED_SHORT: return IndexEncodingType.UNSIGNED_SHORT;
+                case EncodingType.UNSIGNED_INT: return IndexEncodingType.UNSIGNED_INT;
 
 
                 default: throw new NotImplementedException();
                 default: throw new NotImplementedException();
             }
             }
         }
         }
 
 
-        public static int DimCount(this ElementType dimension)
+        public static int DimCount(this DimensionType dimension)
         {
         {
             switch (dimension)
             switch (dimension)
             {
             {
-                case ElementType.SCALAR: return 1;
-                case ElementType.VEC2: return 2;
-                case ElementType.VEC3: return 3;
-                case ElementType.VEC4: return 4;
-                case ElementType.MAT2: return 4;
-                case ElementType.MAT3: return 9;
-                case ElementType.MAT4: return 16;
+                case DimensionType.SCALAR: return 1;
+                case DimensionType.VEC2: return 2;
+                case DimensionType.VEC3: return 3;
+                case DimensionType.VEC4: return 4;
+                case DimensionType.MAT2: return 4;
+                case DimensionType.MAT3: return 9;
+                case DimensionType.MAT4: return 16;
                 default: throw new NotImplementedException();
                 default: throw new NotImplementedException();
             }
             }
         }
         }
 
 
-        internal static ElementType ToDimension(this int l)
+        internal static DimensionType ToDimension(this int l)
         {
         {
             switch (l)
             switch (l)
             {
             {
-                case 1: return ElementType.SCALAR;
-                case 2: return ElementType.VEC2;
-                case 3: return ElementType.VEC3;
-                case 4: return ElementType.VEC4;
+                case 1: return DimensionType.SCALAR;
+                case 2: return DimensionType.VEC2;
+                case 3: return DimensionType.VEC3;
+                case 4: return DimensionType.VEC4;
                 // case 4: return ElementType.MAT2;
                 // case 4: return ElementType.MAT2;
-                case 9: return ElementType.MAT3;
-                case 16: return ElementType.MAT4;
+                case 9: return DimensionType.MAT3;
+                case 16: return DimensionType.MAT4;
                 default: throw new NotImplementedException();
                 default: throw new NotImplementedException();
             }
             }
         }
         }

+ 18 - 18
tests/SharpGLTF.Tests/Memory/MemoryArrayTests.cs

@@ -14,25 +14,25 @@ namespace SharpGLTF.Memory
         [Test]
         [Test]
         public void TestFloatingArray()
         public void TestFloatingArray()
         {
         {
-            Assert.AreEqual(17, _CreateFloatingAccessor(new Byte[] { 17 }, Schema2.ComponentType.UNSIGNED_BYTE, false)[0]);
-            Assert.AreEqual(17, _CreateFloatingAccessor(new Byte[] { 17, 0 }, Schema2.ComponentType.UNSIGNED_SHORT, false)[0]);            
+            Assert.AreEqual(17, _CreateFloatingAccessor(new Byte[] { 17 }, Schema2.EncodingType.UNSIGNED_BYTE, false)[0]);
+            Assert.AreEqual(17, _CreateFloatingAccessor(new Byte[] { 17, 0 }, Schema2.EncodingType.UNSIGNED_SHORT, false)[0]);            
 
 
-            Assert.AreEqual(17, _CreateFloatingAccessor(new Byte[] { 17 }, Schema2.ComponentType.BYTE, false)[0]);
-            Assert.AreEqual(17, _CreateFloatingAccessor(new Byte[] { 17, 0 }, Schema2.ComponentType.SHORT, false)[0]);
+            Assert.AreEqual(17, _CreateFloatingAccessor(new Byte[] { 17 }, Schema2.EncodingType.BYTE, false)[0]);
+            Assert.AreEqual(17, _CreateFloatingAccessor(new Byte[] { 17, 0 }, Schema2.EncodingType.SHORT, false)[0]);
 
 
-            Assert.AreEqual(1, _CreateFloatingAccessor(new Byte[] { 255 }, Schema2.ComponentType.UNSIGNED_BYTE, true)[0]);
-            Assert.AreEqual(1, _CreateFloatingAccessor(new Byte[] { 127 }, Schema2.ComponentType.BYTE, true)[0]);
-            Assert.AreEqual(-1, _CreateFloatingAccessor(new Byte[] { 128 }, Schema2.ComponentType.BYTE, true)[0]);
+            Assert.AreEqual(1, _CreateFloatingAccessor(new Byte[] { 255 }, Schema2.EncodingType.UNSIGNED_BYTE, true)[0]);
+            Assert.AreEqual(1, _CreateFloatingAccessor(new Byte[] { 127 }, Schema2.EncodingType.BYTE, true)[0]);
+            Assert.AreEqual(-1, _CreateFloatingAccessor(new Byte[] { 128 }, Schema2.EncodingType.BYTE, true)[0]);
 
 
-            Assert.AreEqual(1, _CreateFloatingAccessor(new Byte[] { 255, 255 }, Schema2.ComponentType.UNSIGNED_SHORT, true)[0]);
-            Assert.AreEqual(1, _CreateFloatingAccessor(new Byte[] { 255, 127 }, Schema2.ComponentType.SHORT, true)[0]);
-            Assert.AreEqual(-1, _CreateFloatingAccessor(new Byte[] { 0,  128 }, Schema2.ComponentType.SHORT, true)[0]);
+            Assert.AreEqual(1, _CreateFloatingAccessor(new Byte[] { 255, 255 }, Schema2.EncodingType.UNSIGNED_SHORT, true)[0]);
+            Assert.AreEqual(1, _CreateFloatingAccessor(new Byte[] { 255, 127 }, Schema2.EncodingType.SHORT, true)[0]);
+            Assert.AreEqual(-1, _CreateFloatingAccessor(new Byte[] { 0,  128 }, Schema2.EncodingType.SHORT, true)[0]);
 
 
-            Assert.AreEqual(17, _CreateFloatingAccessor(new Byte[] { 17, 0, 0, 0 }, Schema2.ComponentType.UNSIGNED_INT, false)[0]);
-            Assert.AreEqual(1, _CreateFloatingAccessor(new Byte[] { 0,0, 0x80, 0x3f }, Schema2.ComponentType.FLOAT, false)[0]);
+            Assert.AreEqual(17, _CreateFloatingAccessor(new Byte[] { 17, 0, 0, 0 }, Schema2.EncodingType.UNSIGNED_INT, false)[0]);
+            Assert.AreEqual(1, _CreateFloatingAccessor(new Byte[] { 0,0, 0x80, 0x3f }, Schema2.EncodingType.FLOAT, false)[0]);
         }
         }
 
 
-        private static FloatingAccessor _CreateFloatingAccessor(byte[] data, Schema2.ComponentType encoding, bool normalized)
+        private static FloatingAccessor _CreateFloatingAccessor(byte[] data, Schema2.EncodingType encoding, bool normalized)
         {
         {
             return new FloatingAccessor(new ArraySegment<byte>(data), 0, int.MaxValue, 0, 1, encoding, normalized);
             return new FloatingAccessor(new ArraySegment<byte>(data), 0, int.MaxValue, 0, 1, encoding, normalized);
         }
         }
@@ -42,7 +42,7 @@ namespace SharpGLTF.Memory
         {
         {
             var buffer = new Byte[] { 1, 52, 43, 6, 23, 234 };
             var buffer = new Byte[] { 1, 52, 43, 6, 23, 234 };
 
 
-            var accessor = new Vector2Array(buffer, 0, Schema2.ComponentType.BYTE, true);
+            var accessor = new Vector2Array(buffer, 0, Schema2.EncodingType.BYTE, true);
 
 
             var result = accessor.ToArray();
             var result = accessor.ToArray();
 
 
@@ -57,11 +57,11 @@ namespace SharpGLTF.Memory
 
 
             var bytes = new Byte[256];
             var bytes = new Byte[256];
 
 
-            var v4n = new Vector4Array(bytes.Slice(0), 0, Schema2.ComponentType.UNSIGNED_BYTE, true);
+            var v4n = new Vector4Array(bytes.Slice(0), 0, Schema2.EncodingType.UNSIGNED_BYTE, true);
             v4n[1] = v1;
             v4n[1] = v1;
             VectorAssert.AreEqual(v4n[1], v1, 0.1f);
             VectorAssert.AreEqual(v4n[1], v1, 0.1f);
 
 
-            var v4u = new Vector4Array(bytes.Slice(0), 0, Schema2.ComponentType.UNSIGNED_BYTE, false);
+            var v4u = new Vector4Array(bytes.Slice(0), 0, Schema2.EncodingType.UNSIGNED_BYTE, false);
             v4u[1] = v2;
             v4u[1] = v2;
             VectorAssert.AreEqual(v4u[1], v2);
             VectorAssert.AreEqual(v4u[1], v2);
         }
         }
@@ -74,8 +74,8 @@ namespace SharpGLTF.Memory
 
 
             var bytes = new Byte[256];
             var bytes = new Byte[256];
 
 
-            var v4n = new Vector4Array(bytes.Slice(0), 0, 5, 8, Schema2.ComponentType.UNSIGNED_BYTE, true);
-            var v4u = new Vector4Array(bytes.Slice(0), 4, 5, 8, Schema2.ComponentType.UNSIGNED_BYTE, false);
+            var v4n = new Vector4Array(bytes.Slice(0), 0, 5, 8, Schema2.EncodingType.UNSIGNED_BYTE, true);
+            var v4u = new Vector4Array(bytes.Slice(0), 4, 5, 8, Schema2.EncodingType.UNSIGNED_BYTE, false);
 
 
             v4n[1] = v1;
             v4n[1] = v1;
             VectorAssert.AreEqual(v4n[1], v1, 0.1f);
             VectorAssert.AreEqual(v4n[1], v1, 0.1f);

+ 2 - 2
tests/SharpGLTF.Tests/Schema2/Authoring/CreateModelTests.cs

@@ -114,12 +114,12 @@ namespace SharpGLTF.Schema2.Authoring
             // create a positions accessor
             // create a positions accessor
             var positionsAccessor = model
             var positionsAccessor = model
                 .CreateAccessor()
                 .CreateAccessor()
-                .WithVertexData(positionsView, 0, 3, ElementType.VEC3, ComponentType.FLOAT, false);
+                .WithVertexData(positionsView, 0, 3, DimensionType.VEC3, EncodingType.FLOAT, false);
 
 
             // create an indices accessor
             // create an indices accessor
             var indicesAccessor = model
             var indicesAccessor = model
                 .CreateAccessor()
                 .CreateAccessor()
-                .WithIndexData(indicesView, 0, 3, IndexType.UNSIGNED_INT);
+                .WithIndexData(indicesView, 0, 3, IndexEncodingType.UNSIGNED_INT);
             
             
             // create mesh primitive
             // create mesh primitive
             var primitive = rmesh.CreatePrimitive();
             var primitive = rmesh.CreatePrimitive();