03 2020 档案
摘要:WebGL:笛卡尔坐标系 面向屏幕时:右手坐标系 <canvas>坐标系 attribute变量,传输和顶点相关的变量 在顶点着色器中声明attribute 将attribute变量赋值给gl_Position变量 想attribute传输数据 var VSHADER_SOURCE= 'attrib
阅读全文
摘要:module BaseFunc Version="0.0.1" def V return Version end def add(a,b) return a+b end def self.showVersion return Version end #将V方法定义为静态方法 module_funct
阅读全文
摘要:class Game def initialize(id,title,price) @id=id @title=title @price=price end def showGame puts @id+" "+@title+","+@price._to_s end def self.toStr pu
阅读全文
摘要:#字符转数值 FG="50" P3="40" FT="90" puts FG+P3+FT puts FG.to_i+P3.to_i+FT.to_i puts (FG.to_i+P3.to_i+FT.to_i).to_s+"俱乐部" puts FG.to_i puts FG.to_i.to_f put
阅读全文
摘要:#键值对 mvp_rank={ "curry"=>28.1, "harden"=>30.3, "lebron"=>26 } puts mvp_rank puts mvp_rank["harden"] player={ name:"harden", age:28, point:30.3 } puts
阅读全文
摘要:1.函数 def sayHello(name="Levi") puts "hello #{name}." end sayHello 结果如下 2.类 class Player def initialize(name="levi")#构造函数 @name=name end def show() put
阅读全文
摘要:<!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
阅读全文