This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# main view の左端にコミットIDを表示する | |
set main-view = id date author:email-user commit-title:graph=yes,refs=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// minMatrix.jsを用いた行列関連処理 | |
// matIVオブジェクトを生成 | |
var m = new matIV(); | |
// 各種行列の生成と初期化 | |
var mMatrix = m.identity(m.create()); | |
var vMatrix = m.identity(m.create()); | |
var pMatrix = m.identity(m.create()); | |
var tmpMatrix = m.identity(m.create()); | |
var mvpMatrix = m.identity(m.create()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onload = function() { | |
// canvasエレメントを取得 | |
var c = document.getElementById('canvas'); | |
c.width = 300; | |
c.height = 300; | |
// webglコンテキストを取得 | |
var gl = c.getContext('webgl') || c.getContext('experimental-webgl'); | |
// canvasを初期化する色を設定する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>WebGL TEST</title> | |
<script src="script.js" type="text/javascript"></script> | |
<script src="/Users/toru_nakandakari/wgld/minMatrix.js" type="text/javascript"></script> | |
<script id="vs" type="x-shader/x-vertex"> | |
attribute vec3 position; | |
attribute vec4 color; | |
uniform mat4 mvpMatrix; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>WebGL TEST</title> | |
<script src="script.js" type="text/javascript"></script> | |
<script src="minMatrix.js" type="text/javascript"></script> | |
<script id="vs" type="x-shader/x-vertex"> | |
attribute vec3 position; | |
uniform mat4 mvpMatrix; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onload = function() { | |
// canvasエレメントを取得 | |
var c = document.getElementById('canvas'); | |
c.width = 300; | |
c.height = 300; | |
// webglコンテキストを取得 | |
var gl = c.getContext('webgl') || c.getContext('experimental-webgl'); | |
// canvasを初期化する色を設定する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// VBOを生成するメソッド | |
function create_vbo(data) { | |
// バッファオブジェクトの生成 | |
var vbo = gl.createBuffer(); | |
// バッファをバインドする | |
gl.bindBuffer(gl.ARRAY_BUFFER, vbo); | |
// バッファにデータをセットする | |
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STATIC_DRAW); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// プログラムオブジェクトの生成とシェーダのリンクを行う関数 | |
function create_program(vs, fs) { | |
// プログラムオブジェクトの生成 | |
var program = gl.createProgram(); | |
// プログラムオブジェクトにシェーダを割り当てる | |
gl.attachShader(program, vs); | |
gl.attachShader(program, fs); | |
// シェーダをリンク |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// シェーダの生成とコンパイルをする | |
function create_shader(id) { | |
// シェーダを格納する変数 | |
var shader; | |
// HTMlからscriptタグへの参照を取得 | |
var scriptElement = document.getElementById(id); | |
// scriptタグが存在しない場合は抜ける | |
if (!scriptElement) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# Language | |
export LANG=ja_JP.UTF-8 | |
# add PATH | |
PATH=/usr/local/bin:$PATH | |
# help how to use each commands | |
autoload -U compinit # supplement |
NewerOlder