1
0

optimize-lots-of-objects-animated.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. <!DOCTYPE html><html lang="en"><head>
  2. <meta charset="utf-8">
  3. <title>Optimize Lots of Objects Animated</title>
  4. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  5. <meta name="twitter:card" content="summary_large_image">
  6. <meta name="twitter:site" content="@threejs">
  7. <meta name="twitter:title" content="Three.js – Optimize Lots of Objects Animated">
  8. <meta property="og:image" content="https://threejs.org/files/share.png">
  9. <link rel="shortcut icon" href="../../files/favicon_white.ico" media="(prefers-color-scheme: dark)">
  10. <link rel="shortcut icon" href="../../files/favicon.ico" media="(prefers-color-scheme: light)">
  11. <link rel="stylesheet" href="../resources/lesson.css">
  12. <link rel="stylesheet" href="../resources/lang.css">
  13. <script type="importmap">
  14. {
  15. "imports": {
  16. "three": "../../build/three.module.js"
  17. }
  18. }
  19. </script>
  20. </head>
  21. <body>
  22. <div class="container">
  23. <div class="lesson-title">
  24. <h1>Optimize Lots of Objects Animated</h1>
  25. </div>
  26. <div class="lesson">
  27. <div class="lesson-main">
  28. <p>This article is a continuation of <a href="optimize-lots-of-objects.html">an article about optimizing lots of objects
  29. </a>. If you haven't read that
  30. yet please read it before proceeding. </p>
  31. <p>In the previous article we merged around 19000 cubes into a
  32. single geometry. This had the advantage that it optimized our drawing
  33. of 19000 cubes but it had the disadvantage of make it harder to
  34. move any individual cube.</p>
  35. <p>Depending on what we are trying to accomplish there are different solutions.
  36. In this case let's graph multiple sets of data and animate between the sets.</p>
  37. <p>The first thing we need to do is get multiple sets of data. Ideally we'd
  38. probably pre-process data offline but in this case let's load 2 sets of
  39. data and generate 2 more</p>
  40. <p>Here's our old loading code</p>
  41. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">loadFile('resources/data/gpw/gpw_v4_basic_demographic_characteristics_rev10_a000_014mt_2010_cntm_1_deg.asc')
  42. .then(parseData)
  43. .then(addBoxes)
  44. .then(render);
  45. </pre>
  46. <p>Let's change it to something like this</p>
  47. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">async function loadData(info) {
  48. const text = await loadFile(info.url);
  49. info.file = parseData(text);
  50. }
  51. async function loadAll() {
  52. const fileInfos = [
  53. {name: 'men', hueRange: [0.7, 0.3], url: 'resources/data/gpw/gpw_v4_basic_demographic_characteristics_rev10_a000_014mt_2010_cntm_1_deg.asc' },
  54. {name: 'women', hueRange: [0.9, 1.1], url: 'resources/data/gpw/gpw_v4_basic_demographic_characteristics_rev10_a000_014ft_2010_cntm_1_deg.asc' },
  55. ];
  56. await Promise.all(fileInfos.map(loadData));
  57. ...
  58. }
  59. loadAll();
  60. </pre>
  61. <p>The code above will load all the files in <code class="notranslate" translate="no">fileInfos</code> and when done each object
  62. in <code class="notranslate" translate="no">fileInfos</code> will have a <code class="notranslate" translate="no">file</code> property with the loaded file. <code class="notranslate" translate="no">name</code> and <code class="notranslate" translate="no">hueRange</code>
  63. we'll use later. <code class="notranslate" translate="no">name</code> will be for a UI field. <code class="notranslate" translate="no">hueRange</code> will be used to
  64. choose a range of hues to map over.</p>
  65. <p>The two files above are apparently the number of men per area and the number of
  66. women per area as of 2010. Note, I have no idea if this data is correct but
  67. it's not important really. The important part is showing different sets
  68. of data.</p>
  69. <p>Let's generate 2 more sets of data. One being the places where the number
  70. men are greater than the number of women and visa versa, the places where
  71. the number of women are greater than the number of men. </p>
  72. <p>The first thing let's write a function that given a 2 dimensional array
  73. of arrays like we had before will map over it to generate a new 2 dimensional
  74. array of arrays</p>
  75. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">function mapValues(data, fn) {
  76. return data.map((row, rowNdx) =&gt; {
  77. return row.map((value, colNdx) =&gt; {
  78. return fn(value, rowNdx, colNdx);
  79. });
  80. });
  81. }
  82. </pre>
  83. <p>Like the normal <code class="notranslate" translate="no">Array.map</code> function the <code class="notranslate" translate="no">mapValues</code> function calls a function
  84. <code class="notranslate" translate="no">fn</code> for each value in the array of arrays. It passes it the value and both the
  85. row and column indices.</p>
  86. <p>Now let's make some code to generate a new file that is a comparison between 2
  87. files</p>
  88. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">function makeDiffFile(baseFile, otherFile, compareFn) {
  89. let min;
  90. let max;
  91. const baseData = baseFile.data;
  92. const otherData = otherFile.data;
  93. const data = mapValues(baseData, (base, rowNdx, colNdx) =&gt; {
  94. const other = otherData[rowNdx][colNdx];
  95. if (base === undefined || other === undefined) {
  96. return undefined;
  97. }
  98. const value = compareFn(base, other);
  99. min = Math.min(min === undefined ? value : min, value);
  100. max = Math.max(max === undefined ? value : max, value);
  101. return value;
  102. });
  103. // make a copy of baseFile and replace min, max, and data
  104. // with the new data
  105. return {...baseFile, min, max, data};
  106. }
  107. </pre>
  108. <p>The code above uses <code class="notranslate" translate="no">mapValues</code> to generate a new set of data that is
  109. a comparison based on the <code class="notranslate" translate="no">compareFn</code> function passed in. It also tracks
  110. the <code class="notranslate" translate="no">min</code> and <code class="notranslate" translate="no">max</code> comparison results. Finally it makes a new file with
  111. all the same properties as <code class="notranslate" translate="no">baseFile</code> except with a new <code class="notranslate" translate="no">min</code>, <code class="notranslate" translate="no">max</code> and <code class="notranslate" translate="no">data</code>.</p>
  112. <p>Then let's use that to make 2 new sets of data</p>
  113. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">{
  114. const menInfo = fileInfos[0];
  115. const womenInfo = fileInfos[1];
  116. const menFile = menInfo.file;
  117. const womenFile = womenInfo.file;
  118. function amountGreaterThan(a, b) {
  119. return Math.max(a - b, 0);
  120. }
  121. fileInfos.push({
  122. name: '&gt;50%men',
  123. hueRange: [0.6, 1.1],
  124. file: makeDiffFile(menFile, womenFile, (men, women) =&gt; {
  125. return amountGreaterThan(men, women);
  126. }),
  127. });
  128. fileInfos.push({
  129. name: '&gt;50% women',
  130. hueRange: [0.0, 0.4],
  131. file: makeDiffFile(womenFile, menFile, (women, men) =&gt; {
  132. return amountGreaterThan(women, men);
  133. }),
  134. });
  135. }
  136. </pre>
  137. <p>Now let's generate a UI to select between these sets of data. First we need
  138. some UI html</p>
  139. <pre class="prettyprint showlinemods notranslate lang-html" translate="no">&lt;body&gt;
  140. &lt;canvas id="c"&gt;&lt;/canvas&gt;
  141. + &lt;div id="ui"&gt;&lt;/div&gt;
  142. &lt;/body&gt;
  143. </pre>
  144. <p>and some CSS to make it appear in the top left area</p>
  145. <pre class="prettyprint showlinemods notranslate lang-css" translate="no">#ui {
  146. position: absolute;
  147. left: 1em;
  148. top: 1em;
  149. }
  150. #ui&gt;div {
  151. font-size: 20pt;
  152. padding: 1em;
  153. display: inline-block;
  154. }
  155. #ui&gt;div.selected {
  156. color: red;
  157. }
  158. </pre>
  159. <p>Then we can go over each file and generate a set of merged boxes per
  160. set of data and an element which when hovered over will show that set
  161. and hide all others.</p>
  162. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">// show the selected data, hide the rest
  163. function showFileInfo(fileInfos, fileInfo) {
  164. fileInfos.forEach((info) =&gt; {
  165. const visible = fileInfo === info;
  166. info.root.visible = visible;
  167. info.elem.className = visible ? 'selected' : '';
  168. });
  169. requestRenderIfNotRequested();
  170. }
  171. const uiElem = document.querySelector('#ui');
  172. fileInfos.forEach((info) =&gt; {
  173. const boxes = addBoxes(info.file, info.hueRange);
  174. info.root = boxes;
  175. const div = document.createElement('div');
  176. info.elem = div;
  177. div.textContent = info.name;
  178. uiElem.appendChild(div);
  179. div.addEventListener('mouseover', () =&gt; {
  180. showFileInfo(fileInfos, info);
  181. });
  182. });
  183. // show the first set of data
  184. showFileInfo(fileInfos, fileInfos[0]);
  185. </pre>
  186. <p>The one more change we need from the previous example is we need to make
  187. <code class="notranslate" translate="no">addBoxes</code> take a <code class="notranslate" translate="no">hueRange</code></p>
  188. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">-function addBoxes(file) {
  189. +function addBoxes(file, hueRange) {
  190. ...
  191. // compute a color
  192. - const hue = THREE.MathUtils.lerp(0.7, 0.3, amount);
  193. + const hue = THREE.MathUtils.lerp(...hueRange, amount);
  194. ...
  195. </pre>
  196. <p>and with that we should be able to show 4 sets of data. Hover the mouse over the labels
  197. or touch them to switch sets</p>
  198. <p></p><div translate="no" class="threejs_example_container notranslate">
  199. <div><iframe class="threejs_example notranslate" translate="no" style=" " src="/manual/examples/resources/editor.html?url=/manual/examples/lots-of-objects-multiple-data-sets.html"></iframe></div>
  200. <a class="threejs_center" href="/manual/examples/lots-of-objects-multiple-data-sets.html" target="_blank">click here to open in a separate window</a>
  201. </div>
  202. <p></p>
  203. <p>Note, there are a few strange data points that really stick out. I wonder what's up
  204. with those!??! In any case how do we animate between these 4 sets of data.</p>
  205. <p>Lots of ideas.</p>
  206. <ul>
  207. <li><p>Just fade between them using <a href="/docs/#api/en/materials/Material.opacity"><code class="notranslate" translate="no">Material.opacity</code></a></p>
  208. <p>The problem with this solution is the cubes perfectly overlap which
  209. means there will be z-fighting issues. It's possible we could fix
  210. that by changing the depth function and using blending. We should
  211. probably look into it.</p>
  212. </li>
  213. <li><p>Scale up the set we want to see and scale down the other sets</p>
  214. <p>Because all the boxes have their origin at the center of the planet
  215. if we scale them below 1.0 they will sink into the planet. At first that
  216. sounds like a good idea but the issue is all the low height boxes
  217. will disappear almost immediately and not be replaced until the new
  218. data set scales up to 1.0. This makes the transition not very pleasant.
  219. We could maybe fix that with a fancy custom shader.</p>
  220. </li>
  221. <li><p>Use Morphtargets</p>
  222. <p>Morphtargets are a way were we supply multiple values for each vertex
  223. in the geometry and <em>morph</em> or lerp (linear interpolate) between them.
  224. Morphtargets are most commonly used for facial animation of 3D characters
  225. but that's not their only use.</p>
  226. </li>
  227. </ul>
  228. <p>Let's try morphtargets.</p>
  229. <p>We'll still make a geometry for each set of data but we'll then extract
  230. the <code class="notranslate" translate="no">position</code> attribute from each one and use them as morphtargets.</p>
  231. <p>First let's change <code class="notranslate" translate="no">addBoxes</code> to just make and return the merged geometry.</p>
  232. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">-function addBoxes(file, hueRange) {
  233. +function makeBoxes(file, hueRange) {
  234. const {min, max, data} = file;
  235. const range = max - min;
  236. ...
  237. - const mergedGeometry = BufferGeometryUtils.mergeGeometries(
  238. - geometries, false);
  239. - const material = new THREE.MeshBasicMaterial({
  240. - vertexColors: true,
  241. - });
  242. - const mesh = new THREE.Mesh(mergedGeometry, material);
  243. - scene.add(mesh);
  244. - return mesh;
  245. + return BufferGeometryUtils.mergeGeometries(
  246. + geometries, false);
  247. }
  248. </pre>
  249. <p>There's one more thing we need to do here though. Morphtargets are required to
  250. all have exactly the same number of vertices. Vertex #123 in one target needs
  251. have a corresponding Vertex #123 in all other targets. But, as it is now
  252. different data sets might have some data points with no data so no box will be
  253. generated for that point which would mean no corresponding vertices for another
  254. set. So, we need to check across all data sets and either always generate
  255. something if there is data in any set or, generate nothing if there is data
  256. missing in any set. Let's do the latter.</p>
  257. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">+function dataMissingInAnySet(fileInfos, latNdx, lonNdx) {
  258. + for (const fileInfo of fileInfos) {
  259. + if (fileInfo.file.data[latNdx][lonNdx] === undefined) {
  260. + return true;
  261. + }
  262. + }
  263. + return false;
  264. +}
  265. -function makeBoxes(file, hueRange) {
  266. +function makeBoxes(file, hueRange, fileInfos) {
  267. const {min, max, data} = file;
  268. const range = max - min;
  269. ...
  270. const geometries = [];
  271. data.forEach((row, latNdx) =&gt; {
  272. row.forEach((value, lonNdx) =&gt; {
  273. + if (dataMissingInAnySet(fileInfos, latNdx, lonNdx)) {
  274. + return;
  275. + }
  276. const amount = (value - min) / range;
  277. ...
  278. </pre>
  279. <p>Now we'll change the code that was calling <code class="notranslate" translate="no">addBoxes</code> to use <code class="notranslate" translate="no">makeBoxes</code>
  280. and setup morphtargets</p>
  281. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">+// make geometry for each data set
  282. +const geometries = fileInfos.map((info) =&gt; {
  283. + return makeBoxes(info.file, info.hueRange, fileInfos);
  284. +});
  285. +
  286. +// use the first geometry as the base
  287. +// and add all the geometries as morphtargets
  288. +const baseGeometry = geometries[0];
  289. +baseGeometry.morphAttributes.position = geometries.map((geometry, ndx) =&gt; {
  290. + const attribute = geometry.getAttribute('position');
  291. + const name = `target${ndx}`;
  292. + attribute.name = name;
  293. + return attribute;
  294. +});
  295. +baseGeometry.morphAttributes.color = geometries.map((geometry, ndx) =&gt; {
  296. + const attribute = geometry.getAttribute('color');
  297. + const name = `target${ndx}`;
  298. + attribute.name = name;
  299. + return attribute;
  300. +});
  301. +const material = new THREE.MeshBasicMaterial({
  302. + vertexColors: true,
  303. +});
  304. +const mesh = new THREE.Mesh(baseGeometry, material);
  305. +scene.add(mesh);
  306. const uiElem = document.querySelector('#ui');
  307. fileInfos.forEach((info) =&gt; {
  308. - const boxes = addBoxes(info.file, info.hueRange);
  309. - info.root = boxes;
  310. const div = document.createElement('div');
  311. info.elem = div;
  312. div.textContent = info.name;
  313. uiElem.appendChild(div);
  314. function show() {
  315. showFileInfo(fileInfos, info);
  316. }
  317. div.addEventListener('mouseover', show);
  318. div.addEventListener('touchstart', show);
  319. });
  320. // show the first set of data
  321. showFileInfo(fileInfos, fileInfos[0]);
  322. </pre>
  323. <p>Above we make geometry for each data set, use the first one as the base,
  324. then get a <code class="notranslate" translate="no">position</code> attribute from each geometry and add it as
  325. a morphtarget to the base geometry for <code class="notranslate" translate="no">position</code>.</p>
  326. <p>Now we need to change how we're showing and hiding the various data sets.
  327. Instead of showing or hiding a mesh we need to change the influence of the
  328. morphtargets. For the data set we want to see we need to have an influence of 1
  329. and for all the ones we don't want to see to we need to have an influence of 0.</p>
  330. <p>We could just set them to 0 or 1 directly but if we did that we wouldn't see any
  331. animation, it would just snap which would be no different than what we already
  332. have. We could also write some custom animation code which would be easy but
  333. because the original webgl globe uses
  334. <a href="https://github.com/tweenjs/tween.js/">an animation library</a> let's use the same one here.</p>
  335. <p>We need to include the library</p>
  336. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">import * as THREE from 'three';
  337. import * as BufferGeometryUtils from 'three/addons/utils/BufferGeometryUtils.js';
  338. import {OrbitControls} from 'three/addons/controls/OrbitControls.js';
  339. +import TWEEN from 'three/addons/libs/tween.module.js';
  340. </pre>
  341. <p>And then create a <code class="notranslate" translate="no">Tween</code> to animate the influences.</p>
  342. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">// show the selected data, hide the rest
  343. function showFileInfo(fileInfos, fileInfo) {
  344. + const targets = {};
  345. - fileInfos.forEach((info) =&gt; {
  346. + fileInfos.forEach((info, i) =&gt; {
  347. const visible = fileInfo === info;
  348. - info.root.visible = visible;
  349. info.elem.className = visible ? 'selected' : '';
  350. + targets[i] = visible ? 1 : 0;
  351. });
  352. + const durationInMs = 1000;
  353. + new TWEEN.Tween(mesh.morphTargetInfluences)
  354. + .to(targets, durationInMs)
  355. + .start();
  356. requestRenderIfNotRequested();
  357. }
  358. </pre>
  359. <p>We're also suppose to call <code class="notranslate" translate="no">TWEEN.update</code> every frame inside our render loop
  360. but that points out a problem. "tween.js" is designed for continuous rendering
  361. but we are <a href="rendering-on-demand.html">rendering on demand</a>. We could
  362. switch to continuous rendering but it's sometimes nice to only render on demand
  363. as it well stop using the user's power when nothing is happening
  364. so let's see if we can make it animate on demand.</p>
  365. <p>We'll make a <code class="notranslate" translate="no">TweenManager</code> to help. We'll use it to create the <code class="notranslate" translate="no">Tween</code>s and
  366. track them. It will have an <code class="notranslate" translate="no">update</code> method that will return <code class="notranslate" translate="no">true</code>
  367. if we need to call it again and <code class="notranslate" translate="no">false</code> if all the animations are finished.</p>
  368. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">class TweenManger {
  369. constructor() {
  370. this.numTweensRunning = 0;
  371. }
  372. _handleComplete() {
  373. --this.numTweensRunning;
  374. console.assert(this.numTweensRunning &gt;= 0);
  375. }
  376. createTween(targetObject) {
  377. const self = this;
  378. ++this.numTweensRunning;
  379. let userCompleteFn = () =&gt; {};
  380. // create a new tween and install our own onComplete callback
  381. const tween = new TWEEN.Tween(targetObject).onComplete(function(...args) {
  382. self._handleComplete();
  383. userCompleteFn.call(this, ...args);
  384. });
  385. // replace the tween's onComplete function with our own
  386. // so we can call the user's callback if they supply one.
  387. tween.onComplete = (fn) =&gt; {
  388. userCompleteFn = fn;
  389. return tween;
  390. };
  391. return tween;
  392. }
  393. update() {
  394. TWEEN.update();
  395. return this.numTweensRunning &gt; 0;
  396. }
  397. }
  398. </pre>
  399. <p>To use it we'll create one </p>
  400. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">function main() {
  401. const canvas = document.querySelector('#c');
  402. const renderer = new THREE.WebGLRenderer({antialias: true, canvas});
  403. + const tweenManager = new TweenManger();
  404. ...
  405. </pre>
  406. <p>We'll use it to create our <code class="notranslate" translate="no">Tween</code>s.</p>
  407. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">// show the selected data, hide the rest
  408. function showFileInfo(fileInfos, fileInfo) {
  409. const targets = {};
  410. fileInfos.forEach((info, i) =&gt; {
  411. const visible = fileInfo === info;
  412. info.elem.className = visible ? 'selected' : '';
  413. targets[i] = visible ? 1 : 0;
  414. });
  415. const durationInMs = 1000;
  416. - new TWEEN.Tween(mesh.morphTargetInfluences)
  417. + tweenManager.createTween(mesh.morphTargetInfluences)
  418. .to(targets, durationInMs)
  419. .start();
  420. requestRenderIfNotRequested();
  421. }
  422. </pre>
  423. <p>Then we'll update our render loop to update the tweens and keep rendering
  424. if there are still animations running.</p>
  425. <pre class="prettyprint showlinemods notranslate lang-js" translate="no">function render() {
  426. renderRequested = false;
  427. if (resizeRendererToDisplaySize(renderer)) {
  428. const canvas = renderer.domElement;
  429. camera.aspect = canvas.clientWidth / canvas.clientHeight;
  430. camera.updateProjectionMatrix();
  431. }
  432. + if (tweenManager.update()) {
  433. + requestRenderIfNotRequested();
  434. + }
  435. controls.update();
  436. renderer.render(scene, camera);
  437. }
  438. render();
  439. </pre>
  440. <p>And with that we should be animating between data sets.</p>
  441. <p></p><div translate="no" class="threejs_example_container notranslate">
  442. <div><iframe class="threejs_example notranslate" translate="no" style=" " src="/manual/examples/resources/editor.html?url=/manual/examples/lots-of-objects-morphtargets.html"></iframe></div>
  443. <a class="threejs_center" href="/manual/examples/lots-of-objects-morphtargets.html" target="_blank">click here to open in a separate window</a>
  444. </div>
  445. <p></p>
  446. <p>I hope going through this was helpful. Using morphtargets is a common technique to
  447. move lots of objects. As an example we could give every cube a random place in
  448. another target and morph from that to their first positions on the globe. That
  449. might be a cool way to introduce the globe.</p>
  450. <p>Next you might be interested in adding labels to a globe which is covered
  451. in <a href="align-html-elements-to-3d.html">Aligning HTML Elements to 3D</a>.</p>
  452. <p>Note: We could try to just graph percent of men or percent of women or the raw
  453. difference but based on how we are displaying the info, cubes that grow from the
  454. surface of the earth, we'd prefer most cubes to be low. If we used one of these
  455. other comparisons most cubes would be about 1/2 their maximum height which would
  456. not make a good visualization. Feel free to change the <code class="notranslate" translate="no">amountGreaterThan</code> from
  457. <a href="/docs/#api/en/math/Math.max(a - b, 0)"><code class="notranslate" translate="no">Math.max(a - b, 0)</code></a> to something like <code class="notranslate" translate="no">(a - b)</code> "raw difference" or <code class="notranslate" translate="no">a / (a +
  458. b)</code> "percent" and you'll see what I mean.</p>
  459. </div>
  460. </div>
  461. </div>
  462. <script src="../resources/prettify.js"></script>
  463. <script src="../resources/lesson.js"></script>
  464. </body></html>