提交 51ac0084 编写于 作者: P Peter Varga

Added support for offset (non-centered) frustum in CSS3DRenderer

上级 c0dbf052
......@@ -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 +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册