Skip to content

Instantly share code, notes, and snippets.

View gmisail's full-sized avatar

Graham Misail gmisail

View GitHub Profile
package flux;
import openfl.display.*;
import openfl.events.*;
import openfl.*;
import openfl.ui.Keyboard;
import flux.util.*;
class Game extends Sprite{
@gmisail
gmisail / canvas.js
Last active December 11, 2016 16:56
/* Example A*/
/* HTML */
<canvas id='view' width=800 height=600></canvas>
/* JS */
var canvas = document.getElementById('view').getContext('2d');
/* Example B*/
var canvas = document.getElementById("view");
var context = canvas.getContext("2d");
var canvas = document.getElementById("view");
var context = canvas.getContext("2d");
context.fillStyle = "black";
context.fillRect(0, 0, 32, 32);
@gmisail
gmisail / index.js
Last active January 29, 2018 18:27
var canvas = document.getElementById("view"); // get the canvas context from our webpage
var context = canvas.getContext("2d"); // get the 2d context from our canvas. our canvas has several contexts, however we want to get the 2D context.
var x = 0; // x variable that is equal to 0
var y = 0; // y variable that is equal to 0
function drawRectangle(){ // function called drawRectangle that draws a rectangle for us
context.fillStyle = "black"; // set the context state to "black." Everything in canvas is drawn using this state. If you don't change it, then it will forever have these properties.
context.fillRect(x, y, 16, 16); // fill a rectangle with our x and y positions.
}
---
title: Home
date: 20000909
---
<p>Hello!</p>
<html>
<body>
<h1>{{title}}</h1>
{{{body}}}
</body>
</html>
0→T
(B-A)/N→D
Prompt A,B,N
Menu("Select Method:","Left Riemann",LR,"Right Riemann",RR,"Midpoint Riemann",MR)
Lbl LR
For(G,A,B-D,D
Y₁(G)+T→T
---
title: About Me
---
<p>
Let me tell you about myself...
</p>
Disp "V1: "
Input "X: ",A
Input "Y: ",B
Input "Z: ",C
Disp "V2: "
Input "X: ",D
Input "Y: ",E
Input "Z: ",F
Input "DOT (0) OR CROSS (1)? ",T