随笔分类 - WebGL
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Draw a po
阅读全文
摘要:WebGL:笛卡尔坐标系 面向屏幕时:右手坐标系 <canvas>坐标系 attribute变量,传输和顶点相关的变量 在顶点着色器中声明attribute 将attribute变量赋值给gl_Position变量 想attribute传输数据 var VSHADER_SOURCE= 'attrib
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Clear can
阅读全文
摘要:function main() { // Retrieve <canvas> element var canvas = document.getElementById('example'); if (!canvas) { console.log('Failed to retrieve the <ca
阅读全文