Metadata Int64 - noData value not used


I’ve a glTF 2.0 model with Ext_Structural_Metadata with a scalar property ‘int64’ with nodata set to 10.


When setting the attribute to 10 I expect CesiumJS (113) does not show the property, but it does:

Live demo:

For the other types I don’t see this issue so far (checked uint8/int8/int16/uint16/int32/uint32)

Update: I see this only for scalar types int64 and uint64.

I’ll have to check some details, and maybe create an own example for this, but to quickly confirm: When you do the same thing with componentType: INT32, then it behaves as expected?

(I.e. clicking the triangle does … not show anything or show something like “noData” (I’d have to check what CesiumJS does there exactly)?)

yes, tested with uint8/int8/int16/uint16/int32/uint32/float32/float64/string , then when attribute = nodata nothing shows up (as expected).
With Vector3 there is something else going wrong, I’ll make another issue for that.

This is an issue in CesiumJS. It compares the incoming value, which is of type bigint, to the noData value that was read from the schema, which is always of type number.

I opened Metadata `noData` values are not recognized for `int64` · Issue #11796 · CesiumGS/cesium · GitHub

It should be an easy fix (in doubt, just removing a single =, maybe…), but some possible corner cases should be thought through.

(The obvious “corner” case would be that someone tries to define a noData value in the schema that does not fit into number - but … that’s broken on the level of JavaScript JSON parsing, and there is no reasonable way to avoid that…)