提交 3c2db270 编写于 作者: P Patrick

Update CSS3DRenderer.js

feat(size): adds method to return the renderers size
上级 f73593b0
...@@ -88,6 +88,15 @@ THREE.CSS3DRenderer = function () { ...@@ -88,6 +88,15 @@ THREE.CSS3DRenderer = function () {
cameraElement.style.height = height + 'px'; 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 ) { var epsilon = function ( value ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册