0

When resizing an X3DOM element I'm currently facing the problem that the ratio of the displayed nodes is not correct (objects get streched or compressed).

Resizing is currently done via manipulation of the style attributes of the x3d dom node and the child canvas object as shown here: http://www.x3dom.org/x3dom/test/functional/cssIntegration.html

This works well as long width & height both get increased about the same amount, but for my project I need to ensure that I can also just adjust width OR height.

Is there any way to make X3DOM correct the ratio?

Timetrick
  • 186
  • 1
  • 9

1 Answers1

0

Was able to solve this with the following method (though i do not know if this intended use):

  • Remove <scene> dom element from x3d element
  • Insert <scene> element at old position

This seems to fix this.

Timetrick
  • 186
  • 1
  • 9