|
45 | 45 | import com.jme3.scene.control.Control; |
46 | 46 | import com.jme3.scene.debug.custom.ArmatureDebugAppState; |
47 | 47 | import com.jme3.scene.plugins.gltf.GltfModelKey; |
| 48 | + |
48 | 49 | import jme3test.model.anim.EraseTimer; |
49 | 50 |
|
50 | 51 | import java.util.*; |
@@ -134,8 +135,65 @@ public void simpleInitApp() { |
134 | 135 | //loadModel("Models/gltf/crab/scene.gltf", Vector3f.ZERO, 1); |
135 | 136 | //loadModel("Models/gltf/manta/scene.gltf", Vector3f.ZERO, 0.2f); |
136 | 137 | //loadModel("Models/gltf/bone/scene.gltf", Vector3f.ZERO, 0.1f); |
137 | | -// loadModel("Models/gltf/box/box.gltf", Vector3f.ZERO, 1); |
138 | | - loadModel("Models/gltf/duck/Duck.gltf", new Vector3f(0, 1, 0), 1); |
| 138 | + //loadModel("Models/gltf/box/box.gltf", Vector3f.ZERO, 1); |
| 139 | + //loadModel("Models/gltf/duck/Duck.gltf", new Vector3f(0, 1, 0), 1); |
| 140 | + |
| 141 | + |
| 142 | + // =================================================================== |
| 143 | + // TODO_DRACO Draco test start |
| 144 | + // The following test assumes that the "Models" directory from |
| 145 | + // https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models |
| 146 | + // is copied into the |
| 147 | + // jme3-testdata\src\main\resources\Models\gltf\ |
| 148 | + // directory (or at least the following list of models) |
| 149 | + |
| 150 | + // Comment in/out the model to test |
| 151 | + String dracoTestModel = null; |
| 152 | + //dracoTestModel = "Avocado"; |
| 153 | + //dracoTestModel = "BarramundiFish"; |
| 154 | + dracoTestModel = "BoomBox"; |
| 155 | + //dracoTestModel = "BrainStem"; |
| 156 | + //dracoTestModel = "CesiumMan"; |
| 157 | + //dracoTestModel = "CesiumMilkTruck"; |
| 158 | + //dracoTestModel = "Corset"; |
| 159 | + //dracoTestModel = "Lantern"; |
| 160 | + //dracoTestModel = "MorphPrimitivesTest"; |
| 161 | + //dracoTestModel = "RiggedFigure"; |
| 162 | + //dracoTestModel = "RiggedSimple"; |
| 163 | + //dracoTestModel = "SunglassesKhronos"; |
| 164 | + //dracoTestModel = "VirtualCity"; |
| 165 | + //dracoTestModel = "WaterBottle"; |
| 166 | + |
| 167 | + boolean testDraco = true; |
| 168 | + // Uncomment this to not load the Draco-compressed |
| 169 | + // version, but the glTF-Binary version of the model |
| 170 | + //testDraco = false; |
| 171 | + String dracoTestFlavor = null; |
| 172 | + String dracoTestExtension = null; |
| 173 | + if (testDraco) |
| 174 | + { |
| 175 | + dracoTestFlavor = "glTF-Draco"; |
| 176 | + dracoTestExtension = "gltf"; |
| 177 | + } |
| 178 | + else |
| 179 | + { |
| 180 | + dracoTestFlavor = "glTF-Binary"; |
| 181 | + dracoTestExtension = "glb"; |
| 182 | + } |
| 183 | + // Assemble a path like |
| 184 | + // "Models/gltf/Models/BoomBox/glTF-Draco/BoomBox.gltf" |
| 185 | + String dracoTestPath = "Models/gltf/Models/" + dracoTestModel + "/" + dracoTestFlavor + "/" + dracoTestModel + "." + dracoTestExtension; |
| 186 | + |
| 187 | + System.out.println("Running Draco test with "+dracoTestPath); |
| 188 | + loadModel(dracoTestPath, new Vector3f(0, 0, 0), 20.0f); |
| 189 | + |
| 190 | + // TODO_DRACO Draco test end |
| 191 | + // =================================================================== |
| 192 | + |
| 193 | + |
| 194 | + //loadModel("Models/gltf/BoomBox/glTF-Draco/BoomBox.gltf", new Vector3f(0, 0, 0), 20); |
| 195 | + //loadModel("Models/gltf/BoomBox/glTF-Binary/BoomBox.glb", new Vector3f(0, 0, 0), 1); |
| 196 | + |
139 | 197 | // loadModel("Models/gltf/DamagedHelmet/glTF/DamagedHelmet.gltf", Vector3f.ZERO, 1); |
140 | 198 | // loadModel("Models/gltf/hornet/scene.gltf", new Vector3f(0, -0.5f, 0), 0.4f); |
141 | 199 | //// loadModel("Models/gltf/adamHead/adamHead.gltf", Vector3f.ZERO, 0.6f); |
|
0 commit comments