Skip to content

Commit 36ecec2

Browse files
committed
CSS3DRenderer: fixed bug in billboard matrix creation.
This was causing vortex-looking bug when panning camera with TrackballControls on right click drag.
1 parent aef696a commit 36ecec2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

examples/js/renderers/CSS3DRenderer.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ THREE.CSS3DRenderer = function () {
165165
_tmpMatrix.transpose();
166166
_tmpMatrix.extractPosition( object.matrixWorld );
167167

168+
_tmpMatrix.elements[ 3 ] = 0;
169+
_tmpMatrix.elements[ 7 ] = 0;
170+
_tmpMatrix.elements[ 11 ] = 0;
171+
_tmpMatrix.elements[ 15 ] = 1;
172+
168173
style = getObjectCSSMatrix( _tmpMatrix );
169174

170175
} else {

0 commit comments

Comments
 (0)