Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Joel Webber
committed
Dec 14, 2011
1 parent
6a0c967
commit af2c5ed
Showing
6 changed files
with
43,432 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |
Oops, something went wrong.