| 1 | # Test behavior of files with invalid indexes |
| 2 | |
| 3 | The `castle.bin` is **invalid file**. It contains invalid indexes. |
| 4 | |
| 5 | In CGE, `TShapeNode.GenerateTangents` will encounter these invalid indexes. It should not crash, instead show a proper warning/error. |
| 6 | |
| 7 | ## History |
| 8 | |
| 9 | This testcase comes from old mistake: |
| 10 | |
| 11 | https://github.com/castle-engine/demo-models/blob/master/castle/castle.gltf?raw=true |
| 12 | |
| 13 | gives you proper glTF, but |
| 14 | |
| 15 | https://github.com/castle-engine/demo-models/blob/master/castle/castle.bin |
| 16 | |
| 17 | gives you HTML (not raw data of `castle.bin`). |
| 18 | |
| 19 | The right solution is in `demo-models/x3d/needs_download_network_resources.x3dv`, one should use |
| 20 | |
| 21 | https://raw.githubusercontent.com/castle-engine/demo-models/master/castle/castle.gltf |
| 22 | |
| 23 | and then relative URL is correct bin file: |
| 24 | |
| 25 | https://raw.githubusercontent.com/castle-engine/demo-models/master/castle/castle.bin |
| 26 |