Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5cc5cf0

Browse files
committed
HTML rebuild with autoplay disabled
1 parent 9c8e9c9 commit 5cc5cf0

File tree

2 files changed

+34
-37
lines changed

2 files changed

+34
-37
lines changed

book.html

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h2 class="subtitle" id="copyright-c-2018-nicolas-p-rougier-nicolas-rougier-inri
1919
<img alt="images/sa.large.png" src="images/sa.large.png" style="width: 32px;" />
2020
<img alt="images/nc.large.png" src="images/nc.large.png" style="width: 32px;" />
2121
<div class="line-block">
22-
<div class="line">Latest version - September 2018</div>
22+
<div class="line">Latest version - October 2018</div>
2323
<div class="line"><a class="reference external" href="http://www.labri.fr/perso/nrougier/python-opengl">www.labri.fr/perso/nrougier/python-opengl</a></div>
2424
</div>
2525
</div>
@@ -1441,7 +1441,6 @@ <h3><a class="toc-backref" href="#id7">Varying color</a></h3>
14411441

14421442
.. figure:: movies/chapter-03/quad-scale.mp4
14431443
:loop:
1444-
:autoplay:
14451444
:controls:
14461445
:figwidth: 35%
14471446

@@ -1494,7 +1493,7 @@ <h2><a class="toc-backref" href="#id7">Exercises</a></h2>
14941493
taste in the three exercises below but we'll see much more powerful shader
14951494
tricks in the next chapters.</p>
14961495
<div class="right figure" id="figure-movies/chapter-03/quad-scale.mp4" style="width: 35%">
1497-
<video autoplay="True" controls="True" loop="True">
1496+
<video controls="True" loop="True">
14981497
<source src="movies/chapter-03/quad-scale.mp4"></source>
14991498
</video>
15001499
<p class="caption">Figure</p>
@@ -1511,7 +1510,7 @@ <h2><a class="toc-backref" href="#id7">Exercises</a></h2>
15111510
<p>Solution: <a class="reference external" href="code/chapter-03/quad-scale.py">code/chapter-03/quad-scale.py</a></p>
15121511
<hr class="docutils" />
15131512
<div class="right figure" id="figure-movies/chapter-03/quad-rotate.mp4" style="width: 35%">
1514-
<video autoplay="True" controls="True" loop="True">
1513+
<video controls="True" loop="True">
15151514
<source src="movies/chapter-03/quad-rotate.mp4"></source>
15161515
</video>
15171516
<p class="caption">Figure</p>
@@ -2095,7 +2094,7 @@ <h2><a class="toc-backref" href="#id15">Scene setup</a></h2>
20952094
<div class="section" id="actual-rendering">
20962095
<h2><a class="toc-backref" href="#id15">Actual rendering</a></h2>
20972096
<div class="right figure" id="figure-movies/chapter-05/solid-cube.mp4" style="width: 35%">
2098-
<video autoplay="True" controls="True" loop="True">
2097+
<video controls="True" loop="True">
20992098
<source src="movies/chapter-05/solid-cube.mp4"></source>
21002099
</video>
21012100
<p class="caption">Figure</p>
@@ -2161,7 +2160,7 @@ <h3><a class="toc-backref" href="#id15">Colored cube</a></h3>
21612160
<span class="punctuation">}</span> <span class="error">&quot;&quot;&quot;</span>
21622161
</pre>
21632162
<div class="right figure" id="figure-movies/chapter-05/color-cube.mp4" style="width: 35%">
2164-
<video autoplay="True" controls="True" loop="True">
2163+
<video controls="True" loop="True">
21652164
<source src="movies/chapter-05/color-cube.mp4"></source>
21662165
</video>
21672166
<p class="caption">Figure</p>
@@ -2185,7 +2184,7 @@ <h3><a class="toc-backref" href="#id15">Colored cube</a></h3>
21852184
<div class="section" id="outlined-cube">
21862185
<h3><a class="toc-backref" href="#id15">Outlined cube</a></h3>
21872186
<div class="right figure" id="figure-movies/chapter-05/outline-cube.mp4" style="width: 35%">
2188-
<video autoplay="True" controls="True" loop="True">
2187+
<video controls="True" loop="True">
21892188
<source src="movies/chapter-05/outline-cube.mp4"></source>
21902189
</video>
21912190
<p class="caption">Figure</p>
@@ -2246,7 +2245,7 @@ <h3><a class="toc-backref" href="#id15">Outlined cube</a></h3>
22462245
<div class="section" id="textured-cube">
22472246
<h3><a class="toc-backref" href="#id15">Textured cube</a></h3>
22482247
<div class="right figure" id="figure-movies/chapter-05/texture-cube.mp4" style="width: 35%">
2249-
<video autoplay="True" controls="True" loop="True">
2248+
<video controls="True" loop="True">
22502249
<source src="movies/chapter-05/texture-cube.mp4"></source>
22512250
</video>
22522251
<p class="caption">Figure</p>
@@ -2334,7 +2333,7 @@ <h3><a class="toc-backref" href="#id15">Textured cube</a></h3>
23342333
<div class="section" id="id16">
23352334
<h2><a class="toc-backref" href="#id15">Exercises</a></h2>
23362335
<div class="right figure" id="figure-movies/chapter-05/color-border-cube-1.mp4" style="width: 35%">
2337-
<video autoplay="True" controls="True" loop="True">
2336+
<video controls="True" loop="True">
23382337
<source src="movies/chapter-05/color-border-cube-1.mp4"></source>
23392338
</video>
23402339
<p class="caption">Figure</p>
@@ -2353,7 +2352,7 @@ <h2><a class="toc-backref" href="#id15">Exercises</a></h2>
23532352
<p><strong>Solution</strong>: <a class="reference external" href="code/chapter-05/border-cube.py">code/chapter-05/border-cube.py</a></p>
23542353
<hr class="docutils" />
23552354
<div class="right figure" id="figure-movies/chapter-05/color-border-cube-2.mp4" style="width: 35%">
2356-
<video autoplay="True" controls="True" loop="True">
2355+
<video controls="True" loop="True">
23572356
<source src="movies/chapter-05/color-border-cube-2.mp4"></source>
23582357
</video>
23592358
<p class="caption">Figure</p>
@@ -2577,7 +2576,7 @@ <h3><a class="toc-backref" href="#id25">Signed distance function</a></h3>
25772576
outside the circle.</p>
25782577
<p>Now, let's check if OpenGL is consistent with our maths. We'll write a fragment
25792578
shader that compute the color according to the distance to the shape. We'll use
2580-
the red color outside the circle, blue color inside and white color on the
2579+
the blue color outside the circle, red color inside and white color on the
25812580
border (with some tolerance or we won't see anything).</p>
25822581
<pre class="code glsl literal-block">
25832582
<span class="keyword">float</span> <span class="name">distance</span><span class="punctuation">(</span><span class="keyword">vec2</span> <span class="name">P</span><span class="punctuation">,</span> <span class="keyword">vec2</span> <span class="name">center</span><span class="punctuation">,</span> <span class="keyword">float</span> <span class="name">radius</span><span class="punctuation">)</span>
@@ -2631,7 +2630,7 @@ <h3><a class="toc-backref" href="#id25">Geometrical primitives</a></h3>
26312630
<h4>Circle</h4>
26322631
<p>Distance to a circle is the easiest to compute.</p>
26332632
<div class="right figure" id="figure-movies/chapter-06/SDF-circle.mp4" style="width: 25%">
2634-
<video autoplay="True" controls="True" loop="True">
2633+
<video controls="True" loop="True">
26352634
<source src="movies/chapter-06/SDF-circle.mp4"></source>
26362635
</video>
26372636
<p class="caption">Figure</p>
@@ -2650,7 +2649,7 @@ <h4>Plane</h4>
26502649
<p>The distance from a point P to a plane (line in 2d) is the distance from P to
26512650
the projection of P onto the place.</p>
26522651
<div class="right figure" id="figure-movies/chapter-06/SDF-plane.mp4" style="width: 25%">
2653-
<video autoplay="True" controls="True" loop="True">
2652+
<video controls="True" loop="True">
26542653
<source src="movies/chapter-06/SDF-plane.mp4"></source>
26552654
</video>
26562655
<p class="caption">Figure</p>
@@ -2671,7 +2670,7 @@ <h4>True Box</h4>
26712670
<p>When computing distance to a box, one has to take care of the distance to the
26722671
vertices defining the box.</p>
26732672
<div class="right figure" id="figure-movies/chapter-06/SDF-box.mp4" style="width: 25%">
2674-
<video autoplay="True" controls="True" loop="True">
2673+
<video controls="True" loop="True">
26752674
<source src="movies/chapter-06/SDF-box.mp4"></source>
26762675
</video>
26772676
<p class="caption">Figure</p>
@@ -2691,7 +2690,7 @@ <h4>True Box</h4>
26912690
<div class="section" id="rounded-box">
26922691
<h4>Rounded Box</h4>
26932692
<div class="right figure" id="figure-movies/chapter-06/SDF-round-box.mp4" style="width: 25%">
2694-
<video autoplay="True" controls="True" loop="True">
2693+
<video controls="True" loop="True">
26952694
<source src="movies/chapter-06/SDF-round-box.mp4"></source>
26962695
</video>
26972696
<p class="caption">Figure</p>
@@ -2712,7 +2711,7 @@ <h4>Rounded Box</h4>
27122711
<div class="section" id="fake-box">
27132712
<h4>Fake Box</h4>
27142713
<div class="right figure" id="figure-movies/chapter-06/SDF-fake-box.mp4" style="width: 25%">
2715-
<video autoplay="True" controls="True" loop="True">
2714+
<video controls="True" loop="True">
27162715
<source src="movies/chapter-06/SDF-fake-box.mp4"></source>
27172716
</video>
27182717
<p class="caption">Figure</p>
@@ -2732,7 +2731,7 @@ <h4>Fake Box</h4>
27322731
<div class="section" id="true-triangle">
27332732
<h4>True triangle</h4>
27342733
<div class="right figure" id="figure-movies/chapter-06/SDF-triangle.mp4" style="width: 25%">
2735-
<video autoplay="True" controls="True" loop="True">
2734+
<video controls="True" loop="True">
27362735
<source src="movies/chapter-06/SDF-triangle.mp4"></source>
27372736
</video>
27382737
<p class="caption">Figure</p>
@@ -2772,7 +2771,7 @@ <h4>True triangle</h4>
27722771
<div class="section" id="round-triangle">
27732772
<h4>Round triangle</h4>
27742773
<div class="right figure" id="figure-movies/chapter-06/SDF-round-triangle.mp4" style="width: 25%">
2775-
<video autoplay="True" controls="True" loop="True">
2774+
<video controls="True" loop="True">
27762775
<source src="movies/chapter-06/SDF-round-triangle.mp4"></source>
27772776
</video>
27782777
<p class="caption">Figure</p>
@@ -2794,7 +2793,7 @@ <h4>Round triangle</h4>
27942793
<div class="section" id="fake-triangle">
27952794
<h4>Fake triangle</h4>
27962795
<div class="right figure" id="figure-movies/chapter-06/SDF-fake-triangle.mp4" style="width: 25%">
2797-
<video autoplay="True" controls="True" loop="True">
2796+
<video controls="True" loop="True">
27982797
<source src="movies/chapter-06/SDF-fake-triangle.mp4"></source>
27992798
</video>
28002799
<p class="caption">Figure</p>
@@ -2827,7 +2826,7 @@ <h4>Fake triangle</h4>
28272826
<div class="section" id="true-ellipse">
28282827
<h4>True ellipse</h4>
28292828
<div class="right figure" id="figure-movies/chapter-06/SDF-ellipse.mp4" style="width: 25%">
2830-
<video autoplay="True" controls="True" loop="True">
2829+
<video controls="True" loop="True">
28312830
<source src="movies/chapter-06/SDF-ellipse.mp4"></source>
28322831
</video>
28332832
<p class="caption">Figure</p>
@@ -2887,7 +2886,7 @@ <h4>True ellipse</h4>
28872886
<div class="section" id="fake-but-fast-ellipse">
28882887
<h4>Fake (but fast) ellipse</h4>
28892888
<div class="right figure" id="figure-movies/chapter-06/SDF-fake-ellipse.mp4" style="width: 25%">
2890-
<video autoplay="True" controls="True" loop="True">
2889+
<video controls="True" loop="True">
28912890
<source src="movies/chapter-06/SDF-fake-ellipse.mp4"></source>
28922891
</video>
28932892
<p class="caption">Figure</p>
@@ -3142,7 +3141,7 @@ <h3><a class="toc-backref" href="#id27">Antialiased points</a></h3>
31423141
<div class="section" id="ellipses">
31433142
<h2><a class="toc-backref" href="#id27">Ellipses</a></h2>
31443143
<div class="right figure" id="figure-movies/chapter-07/ellipses.mp4" style="width: 30%">
3145-
<video autoplay="True" controls="True" loop="True">
3144+
<video controls="True" loop="True">
31463145
<source src="movies/chapter-07/ellipses.mp4"></source>
31473146
</video>
31483147
<p class="caption">Figure</p>
@@ -3350,7 +3349,7 @@ <h3><a class="toc-backref" href="#id27">Tiny discs</a></h3>
33503349
<div class="section" id="antialiased-triangles">
33513350
<h3><a class="toc-backref" href="#id27">Antialiased triangles</a></h3>
33523351
<div class="right figure" id="figure-movies/chapter-07/triangles.mp4" style="width: 30%">
3353-
<video autoplay="True" controls="True" loop="True">
3352+
<video controls="True" loop="True">
33543353
<source src="movies/chapter-07/triangles.mp4"></source>
33553354
</video>
33563355
<p class="caption">Figure</p>
@@ -3776,7 +3775,7 @@ <h2><a class="toc-backref" href="#id29">Texture based</a></h2>
37763775
to say that the precision of the distance is directly correlated with the size
37773776
of your texture...</p>
37783777
<div class="right figure" id="figure-movies/chapter-08/texture-marker.mp4" style="width: 30%">
3779-
<video autoplay="True" controls="True" loop="True">
3778+
<video controls="True" loop="True">
37803779
<source src="movies/chapter-08/texture-marker.mp4"></source>
37813780
</video>
37823781
<p class="caption">Figure</p>
@@ -3824,7 +3823,7 @@ <h3><a class="toc-backref" href="#id29">Quiver plot</a></h3>
38243823
<div class="section" id="light-and-shadows">
38253824
<h3><a class="toc-backref" href="#id29">Light and shadows</a></h3>
38263825
<div class="right figure" id="figure-movies/chapter-08/SDF-light-shadow.mp4" style="width: 50%">
3827-
<video autoplay="True" controls="True" loop="True">
3826+
<video controls="True" loop="True">
38283827
<source src="movies/chapter-08/SDF-light-shadow.mp4"></source>
38293828
</video>
38303829
<p class="caption">Figure</p>
@@ -4220,7 +4219,7 @@ <h3><a class="toc-backref" href="#id39">Broken lines</a></h3>
42204219
if a given fragment is inside the joint area or not. This requires a specific
42214220
parameterization that relies on having a different tesselation with 4×n
42224221
vertices instead of 2×n. I won't explain all the details here but only provide
4223-
the final result that you can found in <a class="reference external" href="code/chapter-09/geom.path.py">geom-path.py</a>.</p>
4222+
the final result that you can found in <a class="reference external" href="code/chapter-09/geom_path.py">geom-path.py</a>.</p>
42244223
<p>If you look at the sources, you'll see I'm using a geometry shader, which is a
42254224
new type of shader that is not officially available in GL ES 2.0 but which is
42264225
nonetheless available on a wide number of implementations. This geometry shader
@@ -4252,7 +4251,7 @@ <h3><a class="toc-backref" href="#id39">Broken lines</a></h3>
42524251
<p class="caption">Figure</p>
42534252
<div class="legend">
42544253
Different line joints using a geometry shader. See
4255-
<a class="reference external" href="code/chapter-09/geom.path.py">geom-path.py</a>.</div>
4254+
<a class="reference external" href="code/chapter-09/geom_path.py">geom-path.py</a>.</div>
42564255
</div>
42574256
</div>
42584257
<div class="section" id="bezier-curves">
@@ -4316,7 +4315,7 @@ <h2><a class="toc-backref" href="#id39">Patterns</a></h2>
43164315
<div class="section" id="simple-dotted-pattern">
43174316
<h3><a class="toc-backref" href="#id39">Simple dotted pattern</a></h3>
43184317
<div class="right figure" id="figure-movies/chapter-09/linestrip-dotted.mp4" style="width: 35%">
4319-
<video autoplay="True" controls="True" loop="True">
4318+
<video controls="True" loop="True">
43204319
<source src="movies/chapter-09/linestrip-dotted.mp4"></source>
43214320
</video>
43224321
<p class="caption">Figure</p>
@@ -4361,7 +4360,7 @@ <h3><a class="toc-backref" href="#id39">Simple dotted pattern</a></h3>
43614360
<span class="punctuation">...</span>
43624361
</pre>
43634362
<div class="right figure" id="figure-movies/chapter-09/linestrip-spaded.mp4" style="width: 35%">
4364-
<video autoplay="True" controls="True" loop="True">
4363+
<video controls="True" loop="True">
43654364
<source src="movies/chapter-09/linestrip-spaded.mp4"></source>
43664365
</video>
43674366
<p class="caption">Figure</p>
@@ -4387,19 +4386,19 @@ <h3><a class="toc-backref" href="#id39">Arbitrary dash patterns</a></h3>
43874386
<a class="reference external" href="http://jcgt.org/published/0002/02/08/code.zip">Python implementation</a>. The
43884387
result is illustrated on the movies below.</p>
43894388
<div class="left figure" id="figure-movies/chapter-09/stars.mp4" style="width: 30%">
4390-
<video autoplay="True" controls="True" loop="True">
4389+
<video controls="True" loop="True">
43914390
<source src="movies/chapter-09/stars.mp4"></source>
43924391
</video>
43934392
<p class="caption">Figure</p>
43944393
</div>
43954394
<div class="left figure" id="figure-movies/chapter-09/sphere.mp4" style="width: 30%">
4396-
<video autoplay="True" controls="True" loop="True">
4395+
<video controls="True" loop="True">
43974396
<source src="movies/chapter-09/sphere.mp4"></source>
43984397
</video>
43994398
<p class="caption">Figure</p>
44004399
</div>
44014400
<div class="left figure" id="figure-movies/chapter-09/tiger.mp4" style="width: 30%">
4402-
<video autoplay="True" controls="True" loop="True">
4401+
<video controls="True" loop="True">
44034402
<source src="movies/chapter-09/tiger.mp4"></source>
44044403
</video>
44054404
<p class="caption">Figure</p>
@@ -4412,7 +4411,7 @@ <h3><a class="toc-backref" href="#id39">Arbitrary dash patterns</a></h3>
44124411
<div class="section" id="d-lines">
44134412
<h2><a class="toc-backref" href="#id39">3D lines</a></h2>
44144413
<div class="right figure" id="figure-movies/chapter-09/linestrip-3d.mp4" style="width: 35%">
4415-
<video autoplay="True" controls="True" loop="True">
4414+
<video controls="True" loop="True">
44164415
<source src="movies/chapter-09/linestrip-3d.mp4"></source>
44174416
</video>
44184417
<p class="caption">Figure</p>
@@ -4491,7 +4490,7 @@ <h3><a class="toc-backref" href="#id39">Fixed apparent thickness</a></h3>
44914490
<div class="section" id="varying-apparent-thickness">
44924491
<h3><a class="toc-backref" href="#id39">Varying apparent thickness</a></h3>
44934492
<div class="right figure" id="figure-movies/chapter-09/linestrip-3d-better.mp4" style="width: 35%">
4494-
<video autoplay="True" controls="True" loop="True">
4493+
<video controls="True" loop="True">
44954494
<source src="movies/chapter-09/linestrip-3d-better.mp4"></source>
44964495
</video>
44974496
<p class="caption">Figure</p>
@@ -4962,7 +4961,6 @@ <h1><a class="toc-backref" href="#contents">Rendering a mesh</a></h1>
49624961
.. figure:: movies/chapter-11/boy.mp4
49634962
:figclass: right
49644963
:loop:
4965-
:autoplay:
49664964
:controls:
49674965
:figwidth: 35%
49684966

@@ -5069,7 +5067,6 @@ <h1><a class="toc-backref" href="#contents">Special techniques</a></h1>
50695067

50705068
.. figure:: data/quad-grid.mp4
50715069
:loop:
5072-
:autoplay:
50735070
:controls:
50745071
:figwidth: 35%
50755072
:figclass: left

rst2html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def html_visit_video(self, node):
189189
if 'loop' in node:
190190
atts['loop'] = True
191191
if 'autoplay' in node:
192-
atts['autoplay'] = True
192+
atts['autoplay'] = False
193193
if 'width' in node:
194194
atts['width'] = node['width']
195195
if 'height' in node:

0 commit comments

Comments
 (0)