Add glb in scene3d-model-example 95/289295/2
authorseungho baek <sbsh.baek@samsung.com>
Mon, 6 Mar 2023 04:27:04 +0000 (13:27 +0900)
committerseungho baek <sbsh.baek@samsung.com>
Mon, 6 Mar 2023 05:08:21 +0000 (14:08 +0900)
Change-Id: I68225fe93327a3d15767b4b58122c2c2e1b9efe1
Signed-off-by: seungho baek <sbsh.baek@samsung.com>
examples/scene3d-model/scene3d-model-example.cpp
resources/models/BoxAnimated.glb [new file with mode: 0644]
resources/models/DamagedHelmet.glb [new file with mode: 0644]

index 1a08850..bb2079f 100644 (file)
@@ -49,11 +49,11 @@ static constexpr int32_t NUM_OF_GLTF_MODELS = 7;
 const char* gltf_list[7] =
   {
     /**
-     * For the BoxAnimated.gltf and its Assets
+     * For the BoxAnimated.glb
      * Donated by Cesium for glTF testing.
      * Take from https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated
      */
-    "BoxAnimated.gltf",
+    "BoxAnimated.glb",
     /**
      * For the Lantern.gltf and its Assets
      * Donated by Microsoft for glTF testing
@@ -69,12 +69,12 @@ const char* gltf_list[7] =
      */
     "BoomBox.gltf",
     /**
-     * For the DamagedHelmet.gltf and its Assets
+     * For the DamagedHelmet.glb
      * Battle Damaged Sci-fi Helmet - PBR by theblueturtle_, published under a
      * Creative Commons Attribution-NonCommercial license
      * https://sketchfab.com/models/b81008d513954189a063ff901f7abfe4
      */
-    "DamagedHelmet.gltf",
+    "DamagedHelmet.glb",
     /**
      * For the microphone.gltf and its Assets
      * Microphone GXL 066 Bafhcteks by Gistold, published under a
@@ -295,7 +295,7 @@ public:
     mReadyToLoad = true;
     if(mModel.GetAnimationCount() > 0)
     {
-      Animation animation = (mCurrentGlTF == 0u) ? mModel.GetAnimation(0u) : mModel.GetAnimation("idleToSquatClip_0");
+      Animation animation = (std::string("exercise_model.dli") == gltf_list[mCurrentGlTF]) ? mModel.GetAnimation("idleToSquatClip_0") : mModel.GetAnimation(0u);
       animation.Play();
       animation.SetLoopCount(0);
     }
diff --git a/resources/models/BoxAnimated.glb b/resources/models/BoxAnimated.glb
new file mode 100644 (file)
index 0000000..69481ec
Binary files /dev/null and b/resources/models/BoxAnimated.glb differ
diff --git a/resources/models/DamagedHelmet.glb b/resources/models/DamagedHelmet.glb
new file mode 100644 (file)
index 0000000..2cee76d
Binary files /dev/null and b/resources/models/DamagedHelmet.glb differ