A game engine for stupid people
Insparation from 24a2 by, jamesroutley
View the other versions!
Download the
cjsV3.js
file
Create aindex.html
file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>cjsV3Tutorial</title>
</head>
<body>
<canvas id="myCanvas"></canvas>
<script src="./cjsV3.js"></script>
<script src="./yourProject.js"></script>
</body>
</html>
Inside of
yourProject.js
include acreateCanvas()
funciton
createCanvas(length,height,blockWidth,blockHeight);
The
setDot()
function will set a colored dot at a position
setDot(x,y,color);
The
clear()
function resets the screen
clear();
- Remove all cjs. as well as class initilization functions.
- The
createOriginalCanvas()
function will draw the original canvas from v1.0
// Nothing goes inside of the function
createOriginalCanvas();
To clear the original canvas use
clearOriginalCanvas()
clearOriginalCanvas();
The
setDot()
function works with OriginalCanvas