提交 063515b2 编写于 作者: Y yomotsu

use camera.is*** for its type detection

上级 2ab6388f
......@@ -348,11 +348,11 @@ var files = {
],
"css3d": [
"css3d_molecules",
"css3d_orthographic",
"css3d_panorama",
"css3d_panorama_deviceorientation",
"css3d_periodictable",
"css3d_sandbox",
"css3d_orthographic",
"css3d_sprites",
"css3d_youtube"
],
......
......@@ -262,7 +262,7 @@ THREE.CSS3DRenderer = function () {
if ( cache.camera.fov !== fov ) {
if ( camera.type === 'PerspectiveCamera' ) {
if ( camera.isPerspectiveCamera ) {
domElement.style.WebkitPerspective = fov + 'px';
domElement.style.perspective = fov + 'px';
......@@ -277,7 +277,7 @@ THREE.CSS3DRenderer = function () {
if ( camera.parent === null ) camera.updateMatrixWorld();
var cameraCSSMatrix = camera.type === 'OrthographicCamera' ?
var cameraCSSMatrix = camera.isOrthographicCamera ?
'scale(' + fov + ')' + getCameraCSSMatrix( camera.matrixWorldInverse ) :
'translateZ(' + fov + 'px)' + getCameraCSSMatrix( camera.matrixWorldInverse );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册