Vicente Penades 6 yıl önce
ebeveyn
işleme
fb515dd08a

+ 21 - 0
src/SharpGLTF/Schema2/gltf.MaterialsFactory.cs

@@ -10,6 +10,11 @@ namespace SharpGLTF.Schema2
     {
         #region API
 
+        /// <summary>
+        /// Initializes this <see cref="Material"/> instance with default material attributes.
+        /// </summary>
+        /// <param name="diffuseColor">A <see cref="Vector4"/> color where X=Red, Y=Green, Z=Blue, W=Alpha.</param>
+        /// <returns>This <see cref="Material"/> instance.</returns>
         public Material WithDefault(Vector4 diffuseColor)
         {
             this.WithPBRMetallicRoughness()
@@ -19,11 +24,19 @@ namespace SharpGLTF.Schema2
             return this;
         }
 
+        /// <summary>
+        /// Initializes this <see cref="Material"/> instance with default material attributes.
+        /// </summary>
+        /// <returns>This <see cref="Material"/> instance.</returns>
         public Material WithDefault()
         {
             return this.WithPBRMetallicRoughness();
         }
 
+        /// <summary>
+        /// Initializes this <see cref="Material"/> instance with PBR Metallic Roughness attributes.
+        /// </summary>
+        /// <returns>This <see cref="Material"/> instance.</returns>
         public Material WithPBRMetallicRoughness()
         {
             this._pbrMetallicRoughness = new MaterialPBRMetallicRoughness();
@@ -34,6 +47,10 @@ namespace SharpGLTF.Schema2
             return this;
         }
 
+        /// <summary>
+        /// Initializes this <see cref="Material"/> instance with PBR Specular Glossiness attributes.
+        /// </summary>
+        /// <returns>This <see cref="Material"/> instance.</returns>
         public Material WithPBRSpecularGlossiness()
         {
             this.RemoveExtensions<MaterialUnlit_KHR>();
@@ -42,6 +59,10 @@ namespace SharpGLTF.Schema2
             return this;
         }
 
+        /// <summary>
+        /// Initializes this <see cref="Material"/> instance with Unlit attributes.
+        /// </summary>
+        /// <returns>This <see cref="Material"/> instance.</returns>
         public Material WithUnlit()
         {
             this.RemoveExtensions<MaterialPBRSpecularGlossiness_KHR>();

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

@@ -366,7 +366,7 @@ namespace SharpGLTF.Schema2
         /// </summary>
         /// <param name="name">The name of the instance.</param>
         /// <returns>A <see cref="Node"/> instance.</returns>
-        public Node CreateNode(String name)
+        public Node CreateNode(String name = null)
         {
             return this.LogicalParent._CreateLogicalNode(this._nodes);
         }