CesiumGS / 3d-tiles-samples-generator

Apache License 2.0
12 stars 8 forks source link

Generate proper extensionsUsed/Required declarations #7

Closed javagl closed 1 year ago

javagl commented 1 year ago

The current state generated the following for tilesets that used extensions:

{
  "asset": {
    "version": "1.0"
  },
  "extensions": {
    "extensionsRequired": [
      "3DTILES_draco_point_compression"
    ],
    "extensionsUsed": [
      "3DTILES_draco_point_compression"
    ]
  },
  "extensionsRequired": [
    "3DTILES_draco_point_compression"
  ],
  "geometricError": 17.32,
...

For a moment I was stumped by the validator message "The extension 'extensionsUsed' was used, but is not supported" (and considered a bug in the validator), but that's indeed what's in the input...

This PR fixes these declarations.

NOTE: There are some unknowns about this repository on my side. Despite occasional fixes, it's unfortunately not guaranteed that the generated output matches the current CesiumJS spec data 1:1. Any differences can probably only be analyzed and resolved iteratively - like with this PR.