Wes Mantooth is a hobby project. It's a framework designed to automate some of the graphical aspects of visual Javascript programming, including game development.
Getting Started
Wes Mantooth uses an alias $w similar to jQuery
<script>/path/to/wes.mantooth.js</script> <script> window.onload = function(){ $w.init.canvas(); } </script>
log -> {Void}
sends a string to the browsers console
Name | Type | Description |
---|---|---|
text | String |
The log file is deactivated by default. It can be activated in the initialization of the class or (preferably) overridden in a program $w.boolLog = true; |
slocation -> {String}
returns the URI path to the base script. Useful for includes, etc...
makeFPS -> {Void}
creates an HTMl element to hold the FPS (frames per second) variable for display
Name | Type | Description |
---|---|---|
s | Boolean | if true display the FPS variable |
upFPS -> {Void}
updates the visual FPS value
Name | Type | Description |
---|---|---|
$t | Object | The target DOM node to draw the FPS |
loop -> {Void}
loops through the game objects and preforms the loop function for each object added using add_object
This will be modified in the future to be required. it will also have multiple functions to run as per how it is done in Game Maker.
-
create
-
start loop
-
loop
-
end loop
-
destruction
-
function
add_object -> {Void}
creates and instance of an object and canvas, initializes it and returns an ID
Name | Type | Description |
---|---|---|
r | Integer | the number of new objects of this type to add |
o | Function | the object to duplicate |
p | Object | parameters to pass to the function |
$t | Object | target object to attach the canvas DOM node |