Initial commit of Splash, a programming language aimed at kids. This was all done over the course of a 2 hour bus ride, and is currently only half working. Feel free to browse, keep checking back for a fully working build (scripts currently compile but do nothing in the browser)
This commit is contained in:
commit
4e973d0b0f
11 changed files with 607 additions and 0 deletions
32
lib/app_base/scripts/splash.js
Normal file
32
lib/app_base/scripts/splash.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/* splash.js
|
||||
*
|
||||
* Core javascript file for a compiled "Splash" app. Note: This is a template, replacement
|
||||
* occurs at compile time. Certain functions defined below are only referenced on page load
|
||||
* to knock together a working frame for the app to run in.
|
||||
*
|
||||
* @Author: Ryan McGrath (ryan@venodesigns.net)
|
||||
* @Requires: jQuery 1.3.2 or greater (preferably 1.4.2, I make no guarantee for anything else, but it should work)
|
||||
*/
|
||||
|
||||
var splash_reserved = {};
|
||||
|
||||
var game_on = function(json) {
|
||||
if(/App Code/.test(json)) return;
|
||||
};
|
||||
|
||||
if(typeof debug === "undefined")
|
||||
var debug = function(msg) {
|
||||
/* TODO: Support debugging in other annoying consoles (Opera, I'm looking at you) */
|
||||
if(typeof console !== "undefined" && typeof console.log === "function") console.log(msg);
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
splash_reserved.wrapper = $("#splash_app_wrapper");
|
||||
|
||||
/* Rough guesstimation for now on desired height, finagle later. Wait until the frame is our desired height before
|
||||
* "running" our program.
|
||||
*/
|
||||
splash_reserved.wrapper.animate({"height": $(window).height() - 50}, 800, function() {
|
||||
main();
|
||||
});
|
||||
});
|
||||
Reference in a new issue