Skip to content

Instantly share code, notes, and snippets.

View yacafx's full-sized avatar
💭
Coding... 👽👾💻🕹

Sergio Brito yacafx

💭
Coding... 👽👾💻🕹
View GitHub Profile
@yacafx
yacafx / html5-boilerplate.sublime-snippet
Created August 24, 2014 04:34
Snippet for HTML5 boilerplate for Sublime Text 2 or 3. Save the file on *OS X: ~/Library/Application Support/Sublime Text 3/Packages/User/ *Windows: %APPDATA%\Sublime Text 3\Packages\User\ *Linux: ~/.config/sublime-text-3/Packages/User/
<snippet>
<content><![CDATA[
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page Title</title>
<link rel="stylesheet" href="">
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Collision 3D</title>
<link rel="stylesheet" href="../include/style.css">
</head>
<body>
<canvas id="canvas" width="400" height="400"></canvas>
function Tree () {
this.x = 0;
this.y = 0;
this.xpos = 0;
this.ypos = 0;
this.zpos = 0;
this.scaleX = 1;
this.scaleY = 1;
this.color = "#ffffff";
this.alpha = 1;
function Ball3d (radius, color) {
if (radius === undefined) { radius = 40; }
if (color === undefined) { color = "#ff0000"; }
this.x = 0;
this.y = 0;
this.xpos = 0;
this.ypos = 0;
this.zpos = 0;
this.radius = radius;
this.vx = 0;
@yacafx
yacafx / Walker.html
Last active December 19, 2015 07:19
Walker!
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Real Walk</title>
</head>
<body>
<canvas id="canvas" width="400" height="400"></canvas>
@yacafx
yacafx / Slider.js
Created July 3, 2013 13:29
Slider.js
function Slider (min, max, value) {
this.min = (min === undefined) ? 0 : min;
this.max = (max === undefined) ? 100 : max;
this.value = (value === undefined) ? 100 : value;
this.onchange = null;
this.x = 0;
this.y = 0;
this.width = 16;
this.height = 100;
/**
* Normalize the browser animation API across implementations. This requests
* the browser to schedule a repaint of the window for the next animation frame.
* Checks for cross-browser support, and, failing to find it, falls back to setTimeout.
* @param {function} callback Function to call when it's time to update your animation for the next repaint.
* @param {HTMLElement} element Optional parameter specifying the element that visually bounds the entire animation.
* @return {number} Animation frame request.
*/
if (!window.requestAnimationFrame) {
window.requestAnimationFrame = (window.webkitRequestAnimationFrame ||
@yacafx
yacafx / .gitignore
Created June 23, 2013 22:09
GitIgnore for cascades projects
# GitIgnore for Cascades Proyects #
###################
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o