|
@@ -291,8 +291,15 @@ THREE.CSS3DRenderer = function () {
|
|
|
|
|
|
if ( camera.parent === null ) camera.updateMatrixWorld();
|
|
|
|
|
|
+ if ( camera.isOrthographicCamera ) {
|
|
|
+
|
|
|
+ var tx = - ( camera.right + camera.left ) / 2;
|
|
|
+ var ty = ( camera.top + camera.bottom ) / 2;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
var cameraCSSMatrix = camera.isOrthographicCamera ?
|
|
|
- 'scale(' + fov + ')' + getCameraCSSMatrix( camera.matrixWorldInverse ) :
|
|
|
+ 'scale(' + fov + ')' + 'translate(' + epsilon( tx ) + 'px,' + epsilon( ty ) + 'px)' + getCameraCSSMatrix( camera.matrixWorldInverse ) :
|
|
|
'translateZ(' + fov + 'px)' + getCameraCSSMatrix( camera.matrixWorldInverse );
|
|
|
|
|
|
var style = cameraCSSMatrix +
|