Browse Source

updated readme

Vicente Penades 6 years ago
parent
commit
9208dd1f40
1 changed files with 14 additions and 5 deletions
  1. 14 5
      src/SharpGLTF.DOM/README.md

+ 14 - 5
src/SharpGLTF.DOM/README.md

@@ -1,12 +1,12 @@
-# glTF2 Sharp
-
+
 #### Development
 
 The bulk of the code is generated from the schema using the SharpGLTF.CodeGen tools.
 
 All generated classes are declared by default as non public, and its fields private.
-The public API functionality is provided with hand coded partial classes. Since this
-is a work in progress, not all the features might be publicly available yet.
+The public API functionality is provided with hand coded partial classes.
+
+Since this is a work in progress, not all the features might be publicly available yet.
 
 Internally, the ModelRoot object store almost all the model elements in plain lists,
 and cross referencing is done by integer indices. The public API implentation tries
@@ -25,6 +25,15 @@ var model = Schema2.ModelRoot.Load("model.gltf");
 Loading a gltf and saving it as glb:
 ```c#
 var model = Schema2.ModelRoot.Load("model.gltf");
-model.MergeBuffers(); // this is required since glb only supports a single binary buffer.
+model.MergeBuffers(); // ensure there's only one buffer, which is required by GLB
 model.SaveGLB("model.glb");
 ```
+
+Creating a new gltf model:
+```c#
+var model = ModelRoot.CreateModel();
+var scene = model.UseScene("Default Scene");
+var node = scene.AddVisualNode("Node1");
+```
+
+