提交 d68a1985 编写于 作者: L Luigi De Rosa

Add comment explain event listener before the context

上级 a9bc9fdc
......@@ -41,6 +41,8 @@ function WebGL2Renderer( parameters ) {
powerPreference: _powerPreference
};
// event listeners must be registered before WebGL context is created, see #12753
_canvas.addEventListener( 'webglcontextlost', onContextLost, false );
_canvas.addEventListener( 'webglcontextrestored', function () { } );
......
......@@ -204,6 +204,8 @@ function WebGLRenderer( parameters ) {
powerPreference: _powerPreference
};
// event listeners must be registered before WebGL context is created, see #12753
_canvas.addEventListener( 'webglcontextlost', onContextLost, false );
_canvas.addEventListener( 'webglcontextrestored', onContextRestore, false );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册