Alternative index.html
This commit is contained in:
@@ -22,6 +22,7 @@ dist: $(EXE)
|
||||
|
||||
$(EXE): $(OBJS)
|
||||
$(CXX) -o $@ $(OBJS) $(LDFLAGS)
|
||||
cp index.template.html $(EXE)
|
||||
|
||||
.cpp.o:
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Create the canvas that the C++ code will draw into -->
|
||||
<canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas>
|
||||
|
||||
<!-- Allow the C++ to access the canvas element -->
|
||||
<script type='text/javascript'>
|
||||
var Module = {
|
||||
canvas: (function() { return document.getElementById('canvas'); })()
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- Add the javascript glue code (index.js) as generated by Emscripten -->
|
||||
<script src="eulamadness.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user