提交 fca5866e 编写于 作者: M Mr.doob

SVGRenderer: Reverted lost changes and using getStyle() instead.

上级 19dc7769
......@@ -26,6 +26,7 @@ THREE.SVGRenderer = function () {
_w, // z-buffer to w-buffer
_vector3 = new THREE.Vector3(), // Needed for PointLight
_centroid = new THREE.Vector3(),
_svgPathPool = [], _svgLinePool = [], _svgRectPool = [],
_svgNode, _pathCount = 0, _lineCount = 0, _rectCount = 0,
......@@ -96,7 +97,7 @@ THREE.SVGRenderer = function () {
}
_svg.style.backgroundColor = "#" + _clearColor.getHexString();
_svg.style.backgroundColor = _clearColor.getStyle();
};
......@@ -125,7 +126,7 @@ THREE.SVGRenderer = function () {
var element = _elements[ e ];
var material = element.material;
if ( material === undefined || material.visible === false ) continue;
if ( material === undefined || material.opacity === 0 ) continue;
_elemBox.makeEmpty();
......@@ -332,7 +333,9 @@ THREE.SVGRenderer = function () {
_color.copy( _ambientLight );
calculateLight( _lights, element.centroidModel, element.normalModel, _color );
_centroid.copy( v1.positionWorld ).add( v2.positionWorld ).add( v3.positionWorld ).divideScalar( 3 );
calculateLight( _lights, _centroid, element.normalModel, _color );
_color.multiply( _diffuseColor ).add( material.emissive );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册