xeokit / xeokit-sdk

Open source JavaScript SDK for viewing high-detail, full-precision 3D BIM and AEC models in the Web browser.
https://xeokit.io
Other
714 stars 286 forks source link

Accuracy loss when rotating model with distant coordinates #1007

Open ohadgilboa888 opened 1 year ago

ohadgilboa888 commented 1 year ago

Describe the bug when loading a model with rotation, the model will be distorted

To Reproduce Steps to reproduce the behavior:

  1. load a model with the loader plugin with rotation: loader.load({...model, rotation: [0,90,0]})
  2. view the model

Expected behavior the model should be rotated as a unit with the same form

Screenshots If applicable, add screenshots to help explain your problem. the initial model - top view

image

the model with 90deg clockwise rotation - top view

image

Desktop:

Additional context

  1. using XKTLoaderPlugin, models are in XKT format
  2. only 1 model was loaded
  3. rotation was set to [0,90,0]
eishay commented 1 year ago

/sub

tmarti commented 1 year ago

@xeolabs looks like the rotation is applied to the objects individually instead of to the model-matrix?