@@ -21,13 +21,9 @@ class TAnnotation3DPainter extends TTextPainter {
21
21
22
22
if ( fp ?. mode3d && ! this . use_2d ) {
23
23
const mesh = build3dlatex ( text , '' , this , fp ) ;
24
-
25
24
mesh . traverse ( o => o . geometry ?. rotateX ( Math . PI / 2 ) ) ;
26
- mesh . position . x = fp . grx ( text . fX ) ;
27
- mesh . position . y = fp . gry ( text . fY ) ;
28
- mesh . position . z = fp . grz ( text . fZ ) ;
29
- mesh . rotation . z = getRotation ( fp . camera , mesh ) ;
30
-
25
+ mesh . position . set ( fp . grx ( text . fX ) , fp . gry ( text . fY ) , fp . grz ( text . fZ ) ) ;
26
+ mesh . rotation . set ( 0 , 0 , getRotation ( fp . camera , mesh ) ) ;
31
27
fp . processRender3D = true ;
32
28
fp . add3DMesh ( mesh , this , true ) ;
33
29
fp . render3D ( 100 ) ;
@@ -60,7 +56,9 @@ class TAnnotation3DPainter extends TTextPainter {
60
56
new_y = this . axisToSvg ( 'y' , pos . y , true ) ;
61
57
makeTranslate ( this . getG ( ) , new_x - this . pos_x , new_y - this . pos_y ) ;
62
58
} else
63
- fp . get3DMeshes ( this ) . forEach ( mesh => { mesh . rotation . z = getRotation ( fp . camera , mesh ) ; } ) ;
59
+ fp . get3DMeshes ( this ) . forEach ( mesh => {
60
+ mesh . rotation . set ( 0 , 0 , getRotation ( fp . camera , mesh ) ) ;
61
+ } ) ;
64
62
}
65
63
66
64
/** @summary draw TAnnotation3D object */
0 commit comments