summaryrefslogtreecommitdiff
path: root/template.html
diff options
context:
space:
mode:
Diffstat (limited to 'template.html')
-rw-r--r--template.html13
1 files changed, 10 insertions, 3 deletions
diff --git a/template.html b/template.html
index 882d683..7eb17ef 100644
--- a/template.html
+++ b/template.html
@@ -4,7 +4,9 @@
<title>Physics Simulation</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
-
+<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
+<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/p5.min.js"></script>
<script type="text/javascript" src="${JS}"></script>
@@ -42,7 +44,7 @@
<div class="col">
<div class="container">
<div class="row">
- <div class="col">
+ <div class="col" id="app">
${CONTENT}
</div>
</div>
@@ -52,7 +54,12 @@
</div>
<script type="text/javascript">
- let p=new p5(${project_name},"canvas")
+ var p5_instance=null
+ p5Load=function(){
+ if(p5_instance != null){p5_instance.remove()}
+ p5_instance=new p5(${project_name},"canvas")
+ }
+ project_init()
</script>
</body>
</html>