Open kfarr opened 1 month ago
I also found a case where an unsupported streetmix segment will result in an entity that has NaN for height.
How does this happen?
(1) Example1: https://3dstreet.app/#/scenes/0aeddcc9-f207-492b-9671-93334e07a61c.json
For drainage channel, the elevation is set to -2. JSON code from streetmix:
{
"id": "dF30-wNArqiOxXyqvXlYF",
"type": "drainage-channel",
"variantString": "slanted",
"width": 1,
"elevation": -2
},
This results in NaN
for height value in the function createSegmentElement
: https://github.com/3DStreet/3dstreet/blob/main/src/aframe-streetmix-parsers.js#L916
(2) Example2: x position for ground lot is NaN
How does this happen? If there is incorrect value length
, streetWidth
or sideMultiplier
here:
const groundPositionX = (length / 4 + streetWidth / 2) * sideMultiplier;
in https://github.com/3DStreet/3dstreet/blob/main/src/aframe-streetmix-parsers.js#L916
https://3dstreet.app/#/scenes/d1f54dc8-2aa1-4de9-8349-677d67b334ee.json
This street has an invalid value for position that includes NaN for
x
value:When using transform controls this raises an error repeatedly when dragging: