forked from phetsims/energy-skate-park-basics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
energy-skate-park-basics_en.html
80 lines (69 loc) · 3.17 KB
/
energy-skate-park-basics_en.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
<!DOCTYPE HTML>
<!-- Top-level HTML file for energy-skate-park-basics generated by 'grunt generate-development-html' -->
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="phet-sim-level" content="development">
<title>energy-skate-park-basics</title>
</head>
<!-- body is only made black for the loading phase so that the splash screen is black -->
<body style="background-color:black;">
<script type="text/javascript">
// Identify the brand (assume generated brand if not provided with query parameters)
const brandMatch = location.search.match( /brand=([^&]+)/ );
const brand = brandMatch ? decodeURIComponent( brandMatch[ 1 ] ) : 'adapted-from-phet';
// Cache busting is applied by default, but can be disabled via ?cacheBust=false, see initialize-globals.js
const isCacheBustDisabled = /(^|\?|&)cacheBust=false/.test( location.search );
const queryAppend = isCacheBustDisabled ? '' : `?bust=${Date.now()}`;
// Preloads, with more included for phet-io brand
let preloads = [
'../sherpa/lib/mdn-array-from-polyfill.js',
'../joist/js/splash.js',
'../sherpa/lib/jquery-2.1.0.js',
'../sherpa/lib/lodash-4.17.4.js',
'../sherpa/lib/FileSaver-b8054a2.js',
'../sherpa/lib/himalaya-0.2.7.js',
'../sherpa/lib/he-1.1.1.js',
'../assert/js/assert.js',
'../query-string-machine/js/QueryStringMachine.js',
'../chipper/js/initialize-globals.js',
'../phet-core/js/copyWithSortedKeys.js',
'../sherpa/lib/seedrandom-2.4.2.js',
'../sherpa/lib/game-up-camera-1.0.0.js',
'../sherpa/lib/base64-js-1.2.0.js',
'../sherpa/lib/TextEncoderLite-3c9f6f0.js',
'../tandem/js/PhetioIDUtils.js',
'../chipper/js/SimVersion.js',
'../sherpa/lib/numeric-1.2.6.js'
];
if ( brand === 'phet-io' ) {
preloads = preloads.concat( [
'../phet-io/js/phet-io-initialize-globals.js',
'../energy-skate-park-basics/js/phet-io/energy-skate-park-basics-phet-io-elements-baseline.js',
'../energy-skate-park-basics/js/phet-io/energy-skate-park-basics-phet-io-elements-overrides.js',
'../energy-skate-park-basics/js/phet-io/energy-skate-park-basics-phet-io-types.js'
] );
}
// Loads a synchronously-executed asynchronously-downloaded script tag, with optional data-main parameter.
// See http://www.html5rocks.com/en/tutorials/speed/script-loading/ for more about script loading. It helps to
// load all of the scripts with this method, so they are treated the same (and placed in the correct execution
// order).
const loadURL = ( preloadURL, main ) => {
const script = document.createElement( 'script' );
if ( typeof main === 'string' ) {
script.setAttribute( 'data-main', main );
}
script.type = 'text/javascript';
script.src = preloadURL + queryAppend;
script.async = false;
document.head.appendChild( script );
};
// Queue all of the preloads to be loaded.
preloads.forEach( loadURL );
loadURL( '../sherpa/lib/require-2.3.6.js', 'js/energy-skate-park-basics-config.js' );
</script>
</body>
</html>