/c.js-V3

Version 3.0 of creative javaScript

Primary LanguageJavaScriptMIT LicenseMIT

Creative javaScript v3.0

A game engine for stupid people
Insparation from 24a2 by, jamesroutley

View the other versions!

Getting Started

Download the cjsV3.js file
Create a index.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 a createCanvas() 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();

Porting old cjs projects

  1. Remove all cjs. as well as class initilization functions.
  2. 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

Credits

A game engine designed by, ClassicMC

Insparation from 24a2 by, jamesroutley

Other ideas from my family