-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
104 lines (69 loc) · 3.07 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!--
// Created: 2022/03/07 16:13:00
// Last modified: "2022/05/12 15:06:33"
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PC - p5js Ctrler - by leizingyiu</title>
<link rel="stylesheet" type="text/css" href="./style/style.css">
<script src="./libraries/audioworklet-polyfill.js">
/*
https://unpkg.com/@free-side/audioworklet-polyfill/dist/audioworklet-polyfill.js
如果出现sound库在https可以加载,http不能加载,就用这个解决
If the sound library can be loaded at https but cannot be loaded at http, use this solution
https://discourse.processing.org/t/p5-sound-on-google-chrome-p5-sound-js-3191-uncaught-in-promise-typeerror-cannot-read-property-addmodule-of-undefined/29939
https://github.com/processing/p5.js-sound/issues/454
https://github.com/processing/p5.js-sound/issues/409
*/
</script>
<script src="./libraries/p5.min.js"></script>
<script src="./libraries/p5.sound.min.js"></script>
<script>
enMdPath = './doc/README_en.md',
cnMdPath = './doc/README_cn.md',
mdtempletsPath = './doc/mdTemplets',
mdtempletsHrefPrefix = '';
</script>
</head>
<body style="min-height:100vh;">
<!-- <p id="readme" class="markdown-body" data-mdFile='./README_en.md'></p> -->
<script src="./util/util.js"></script>
<script src="./PC.js"></script>
<!-- <script type="module" src="./PC.js"></script> -->
<script type='module' src="./PC_addons.js"></script>
<script type='module' src="./sketch.js"></script>
<link rel="stylesheet" href="./libraries/markdown.css">
<!-- <script type="text/javascript" src="//cdn.jsdelivr.net/npm/marked/marked.min.js"></script> -->
<script type="text/javascript" src="./libraries/marked.min.js"></script>
<!-- <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/atom-one-light.min.css"> -->
<link rel="stylesheet" href="./libraries/atom-one-light.min.css">
<!-- <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.0/highlight.min.js"></script> -->
<script src="./libraries/highlight.min.js"></script>
<script src="./util/loadMarkdownFile.js"></script>
<script type="module">
import { sketch } from './sketch.js'
let p = new p5(sketch, document.body);
// import {PC} from '/PC.js';
let _pc = new PC({
ctrler_width: 400,
updateWithUrlBoo: false,
updateWithCookieBoo: false,
showToolsBoo: false
}, p);
_pc.radio('script_type', ['normal', 'module'], (e) => {
if (script_type == 'normal' && (!String(window.location).match('index_none_module.html'))) {
window.location.href = './index_none_module.html';
} else if (script_type == 'module' && (String(window.location).match('index_none_module.html'))) {
window.location.href = './index.html';
}
});
_pc.update('script_type', 'module');
_pc.a('moduleTypeSource', './sketch.js', 'script in module type')
_pc.stick('top');
</script>
<script>loadReadmeFile();</script>
</body>
</html>