This file contains hidden or 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
ddaWalk(x, y, endX, endY) { | |
//DDA Algorithm https://lodev.org/cgtutor/raycasting.html | |
//https://www.youtube.com/watch?v=NbSee-XM7WA | |
//https://github.com/OneLoneCoder/olcPixelGameEngine | |
const Vector = Matter.Vector; //Replace with whatever Vector class you use | |
let mapSize = Vector.create(100, 100); //Grid size in cell size |
This file contains hidden or 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
//For Gist: https://gist.github.com/im4aLL/548c11c56dbc7267a2fe96bda6ed348b | |
preg_match('/Event::trigger\(((\'|\").*)(,|\',) \[(.*)]\)/', $line, $matches); | |
if(count($matches)>0) { | |
var_dump($matches); | |
/*array(5) { | |
[0]=> | |
string(40) "Event::trigger('get_cp_menu', [&$menus])" | |
[1]=> | |
string(13) "'get_cp_menu'" | |
[2]=> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<body> | |
<canvas id="myCanvas" width="800" height="800" style="border:1px solid #d3d3d3;"> | |
Your browser does not support the HTML5 canvas tag.</canvas> | |
<script> |