Skip to content

Commit

Permalink
Adding Mandreel-compiled output.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Webber committed Dec 14, 2011
1 parent 6a0c967 commit af2c5ed
Show file tree
Hide file tree
Showing 6 changed files with 43,432 additions and 0 deletions.
20 changes: 20 additions & 0 deletions c/bench2d_mandreel.html
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>Bench2d, Mandreel Edition!</title>
<meta charset="utf-8">
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/mandreelapp.js"></script>
<script type="text/javascript" src="js/webgl-utils.js"></script>
</head>
<body onload="startApp()">
<div id="wrapper">
<div id="loading"></div>
<div id="FlashDiv"></div>
<div id="FlashDivSockets"></div>
<div id="canvasDiv" tabindex="0"><canvas id="canvas"></canvas></div>
</div>
</body>
</html>

62 changes: 62 additions & 0 deletions c/mandreel/js/main.js
@@ -0,0 +1,62 @@
////////////////////////////////////////////
function startApp(_platform)
{
// Start mandreel
var params =
{
platform : _platform,
width : 1024,
height : 768,
webglCanvas : "canvas",
flashCanvas : "FlashDiv",
workingFolderFlash : "data/as3/",
workingFolderWebgl : "data/js/",
swfFlash : "mandreel.swf",
log : true
};
mandreelAppStart(appStartState,params);
}

////////////////////////////////////////////
function appStartState(state,param)
{
// mandreel.js program is been loaded
if ( state == "loadingScript" )
{
}

// mandreel.js program has been loaded
if ( state == "scriptLoaded" )
{
}

// Audio system is been started
if ( state == "loadingAudio" )
{
}

// Audio system is ready and the default audio preloading has been done
if ( state == "audioLoaded" )
{
}

// Mandreel has been started, render will start automatically
if ( state == "ready" )
{
// Hide loading image
var canvasElement = document.getElementById('loading');
if ( canvasElement != null )
canvasElement.style.visibility = "hidden";
}

// An error has been produced during the start process and the app must quit
if ( state == "error" )
{
if ( param == "webgl_not_found" )
{
window.location = "http://get.webgl.org";
return;
}
alert(param);
}
}

0 comments on commit af2c5ed

Please sign in to comment.