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
language: node_js | |
node_js: | |
- "8.9.3" | |
cache: | |
directories: | |
- "node_modules" | |
sudo: required | |
addons: |
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
cd ~ | |
git clone https://github.com/creationix/nvm.git ~/.nvm | |
source ~/.nvm/nvm.sh | |
nvm install v8.9.3 | |
nvm alias default v8.9.3 |
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
mypage_index: # /mypage/index |
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
$configLoader = new \PhalconConfig\Loader(); | |
return $configLoader | |
->setIgnore(["routing"]) // ignore yml names | |
->setEnvironment("stg") // default dev | |
->setBasePath(realpath(dirname(__FILE__) . '/../..')) | |
->load(); // @return \Phalcon\Config |
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
var _x2 = x2 + Math.cos(angle2 * Math.PI / 180) * lw / 2; | |
var _y2 = y2 + Math.sin(angle2 * Math.PI / 180) * lw / 2 * -1; | |
var _x3 = x3 + Math.cos(angle2 * Math.PI / 180) * lw / 2; | |
var _y3 = y3 + Math.sin(angle2 * Math.PI / 180) * lw / 2 * -1; |
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
var rl = (lineWidth / 2) / Math.cos(45 * Math.PI / 180); |
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
// 外積から交差座標をセット | |
var xc1 = cx + Math.cos((angle1 + a1) * Math.PI / 180) * lw / 2; | |
var yc1 = cy + Math.sin((angle1 + a1) * Math.PI / 180) * lw / 2 * -1; | |
var xc2 = cx + Math.cos((angle2 - a1) * Math.PI / 180) * lw / 2; | |
var yc2 = cy + Math.sin((angle2 - a1) * Math.PI / 180) * lw / 2 * -1; | |
// 外積 | |
var S1 = ((xc2 - x2) * (y1 - y2) - (yc2 - y2) * (x1 - x2)) / 2; | |
var S2 = ((xc2 - x2) * (y2 - yc1) - (yc2 - y2) * (x2 - xc1)) / 2; |
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
var vertex = gl.getAttribLocation(program, "vertex"); | |
gl.enableVertexAttribArray(vertex); | |
gl.vertexAttribPointer(vertex, 2, gl.FLOAT, false, 0, 0); |
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
var x1 = dx + Math.cos((angle + 90) * Math.PI / 180) * rl; | |
var y1 = dy + Math.sin((angle + 90) * Math.PI / 180) * rl * -1; | |
var x2 = dx + Math.cos((angle + 180) * Math.PI / 180) * rl; | |
var y2 = dy + Math.sin((angle + 180) * Math.PI / 180) * rl * -1; | |
var x3 = dx + Math.cos((angle + 270) * Math.PI / 180) * rl; | |
var y3 = dy + Math.sin((angle + 270) * Math.PI / 180) * rl * -1; |
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
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.DYNAMIC_DRAW); | |
gl.drawArrays(gl.TRIANGLE_STRIP, 0, vertices.length/2); |
NewerOlder