朋友们,我需要你们的帮助,三个.js中的以下代码,在这一行都返回null:
_上下文 || _canvas.getContext('webgl', 属性) || _canvas.getContext('experimental-webgl', 属性);
function initGL() {
try {
var attributes = {
alpha: _alpha,
depth: _depth,
stencil: _stencil,
antialias: _antialias,
premultipliedAlpha: _premultipliedAlpha,
preserveDrawingBuffer: _preserveDrawingBuffer
};
_gl = _context || _canvas.getContext( 'webgl', attributes ) || _canvas.getContext( 'experimental-webgl', attributes );
if ( _gl === null ) {
throw 'Error creating WebGL context.';
}
} catch ( error ) {
console.error( error );
}
_glExtensionTextureFloat = _gl.getExtension( 'OES_texture_float' );
属性值:
这是画布:
非常感谢!
〜罗松