未验证 提交 ea13c99d 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #15187 from WestLangley/dev-background_code_injection

WebGLBackground: enable code injection
......@@ -67,6 +67,17 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
};
// enable code injection for non-built-in material
Object.defineProperty( boxMesh.material, 'envMap', {
get: function () {
return this.uniforms.tCube.value;
}
} );
objects.update( boxMesh );
}
......@@ -97,6 +108,17 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
planeMesh.geometry.removeAttribute( 'normal' );
// enable code injection for non-built-in material
Object.defineProperty( planeMesh.material, 'map', {
get: function () {
return this.uniforms.t2D.value;
}
} );
objects.update( planeMesh );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册