未验证 提交 83f29e73 编写于 作者: Y ycw 提交者: GitHub

ReflectorForSSRPass: expose .color (#21388)

* fixed illegal feedback

* x === true .. over Boolean(x)

* toggle reflector externally

* rm comments

* add empty lines

* expose `.color` on reflector

* use accessor for `.color`

* fixed illegal feedback

* toggle reflector externally

* rm comments

* add empty lines

* expose `.color` on reflector

* use accessor for `.color`
上级 27def9d2
......@@ -43,6 +43,15 @@ var Reflector = function ( geometry, options ) {
scope.maxDistance = Reflector.ReflectorShader.uniforms.maxDistance.value
scope.opacity = Reflector.ReflectorShader.uniforms.opacity.value
Object.defineProperty(scope, 'color', {
get() {
return scope.material.uniforms[ 'color' ].value;
},
set(val) {
scope.material.uniforms[ 'color' ].value = new Color( val );
}
});
scope._isDistanceAttenuation = Reflector.ReflectorShader.defines.isDistanceAttenuation
Object.defineProperty(scope, 'isDistanceAttenuation', {
get() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册