浏览代码

Merge branch 'patch-1' of https://github.com/wzr1337/three.js into dev

Mr.doob 10 年之前
父节点
当前提交
efc969aa95
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      examples/js/renderers/CSS3DRenderer.js

+ 9 - 0
examples/js/renderers/CSS3DRenderer.js

@@ -88,6 +88,15 @@ THREE.CSS3DRenderer = function () {
 		cameraElement.style.height = height + 'px';
 
 	};
+	
+	/**
+	 * Returns the renderers pixel size as descriptive object
+	 * 
+	 * @returns {Object} The size object with keys 'width' and 'height'
+	 */
+	this.getSize = function() {
+		return {width: _width, height: _height};
+	};
 
 	var epsilon = function ( value ) {