catch(e){} //Ifwedon'thaveaGLcontext,giveupnow if(!gl){ alert("UnabletoinitializeWebGL.Yourbrowsermaynotsupportit."); } } 這個(gè)方法很簡單,就是獲取WebGL的繪制環(huán)境,需要把參數(shù)"webgl"傳給canvas.getContext方法就行了,但是由于目前WebGL的標(biāo)準(zhǔn)沒有最終定型,所以實(shí)驗(yàn)階段用的參數(shù)都是"experimental-webgl...
www.dbjr.com.cn/html5/723...html 2025-6-9