Uncaught TypeError: Object # <WebGLRenderingContext> does not have a method 'getShaderPrecisionFormat'
I use ThreeJS for an application that I develop at work, in particular for rendering WebGL. It worked fine about a year and a half ago, but when I got back to work today, I get this error when trying to launch my application in Chrome:
Uncaught TypeError: Object # does not have a method 'getShaderPrecisionFormat'
I debugged my application in Chrome and it looks like WebGLRenderingContext does not have a method of 'getShaderPrecisionFormat'; Any suggestions as to what could happen to this?
Thanks!
+4
2 answers
This should be fixed in r56 +. (And maybe in r55, but I don't have a version to check)
See https://github.com/mrdoob/three.js/blob/master/src/renderers/WebGLRenderer.js#L7478
if ( _gl.getShaderPrecisionFormat === undefined ) { _gl.getShaderPrecisionFormat = function() { return { "rangeMin" : 1, "rangeMax" : 1, "precision" : 1 }; } } +1