javascript - How to get OES_texture_float_linear support for any browser? -
i have been working on webgl more 3 months , earlier rendering .obj
, .mtl
objmtlloader.js. it's not rendering properly. rendering .obj
file, not .mtl
file.
so searched web , found objmtlloader.js no longer in use. , instead use mtlloader.js , objloader.js.
the code this:
var onprogress = function (xhr) { if (xhr.lengthcomputable) { var percentcomplete = xhr.loaded / xhr.total * 100; console.log(math.round(percentcomplete, 2) + '% downloaded'); } }; var onerror = function (xhr) { console.log(xhr); }; three.loader.handlers.add(/\.dds$/i, new three.ddsloader()); var mtlloader = new three.mtlloader(); if (mtljs) { (var = 0; < mtljs.length; i++) { mtlloader.setpath(mtljs[i].substr(0, mtljs[i].lastindexof("/") + 1)); mtlloader.load(mtljs[i], function (materials) { materials.preload(); var objloader = new three.objloader(); if (objjs) { (var j = 0; j < objjs.length; j++) { objloader.setmaterials(materials); objloader.setpath(objjs[i].substr(0, objjs[i].lastindexof("/") + 1)); objloader.load(objjs[i], function (object) { object.position.y = -33; scene.add(object); }, onprogress, onerror); } } }, onprogress, onerror); } } mtlloader.castshadow = true; mtlloader.receiveshadow = true; renderer = detector.webgl ? new three.webglrenderer() : new three.canvasrenderer(); renderer.setclearcolor(0xffffff, true); renderer.setpixelratio(window.devicepixelratio); renderer.setsize(windowhalfx, windowhalfy); renderer.shadowmap.enabled = true; renderer.shadowmap.type = three.pcfsoftshadowmap; container.appendchild(renderer.domelement); controls = new three.orbitcontrols(camera, renderer.domelement); window.addeventlistener('resize', onwindowresize, false);
now, code not giving error. giving warning
three.webglrenderer: oes_texture_float_linear extension not supported
i want know why happening , solution on this? if don't need use oes_texture_float_linear
extension, or find alternative same?
Comments
Post a Comment