Kompakkt / Viewer

Kompakkt - the web based 3D viewer and 3D annotation system.
https://kompakkt.de
GNU Affero General Public License v3.0
17 stars 2 forks source link

Fix: Vector3 referencePoint and referenceNormal being loaded incorrectly in AnnotationService due to changed saving of Vector3 #34

Closed HeyItsBATMAN closed 2 years ago

HeyItsBATMAN commented 2 years ago

In older annotations, the Vector3 referencePoint and referenceNormal were saved using the x,y and z properties of the Vector3. At some point, either due to BabylonJS changes or due to a programming oversight, instead of the x, y and z properties instead the _x, _y and _z properties were saved. This created an issue when attempting to load the saved Vector3's in the AnnotationService, always loading them as (0, 0, 0).

This pull request inserts a function to differentiate between the different versions of saved Vector3 and load it correctly.