├── .gitattributes
├── 9781484238639.jpg
├── Contributing.md
├── LICENSE.txt
├── README.md
├── ch01
└── html5logoscale.html
├── ch02
├── collagebaseV2muted.html
├── collagedataV2.js
├── danielAndAnnika.JPG
├── monkeyMar18.mp4
├── monkeyMar18.ogv
├── monkeyMar18.webm
└── threePlusDog.jpg
├── ch03
├── joshuahomerun.mp4video.mp4
├── joshuahomerun.theora.ogv
├── joshuahomerun.webmvp8.webm
├── videobounceC.html
└── videobounceEwithClipPath.html
├── ch04
├── bx1.png
├── mapspotlight.html
└── rx1.png
├── ch05
├── bx1.png
├── esther.jpg
├── estherT.mp3
├── estherT.ogv
├── estherT.wav
├── mapmediaquiz.html
├── maze.mp4
├── maze.theora.ogv
├── maze.webmvp8.webm
├── mediaquizcontent.js
├── miyajima0.JPG
├── rx1.png
├── sfire3.mp4
├── sfire3.theora.ogv
├── sfire3.webmvp8.webm
└── x1.png
├── ch06
├── AddTo!5andTicTacToe.docx
└── addTo15JSplain.html
├── ch07
├── cleftlip.jpg
├── frog.jpg
├── origamifish.html
├── origamifrog.html
├── sink.mp4video.mp4
├── sink.theora.ogv
├── sink.webmvp8.webm
├── talk.mp4video.mp4
├── talk.theora.ogv
├── talk.webmvp8.webm
├── throat1.jpg
└── throat2.jpg
├── ch08
├── barsbase.png
├── jigsawBars8c.html
├── monkeybars.mp4
├── monkeybars.ogv
└── monkeybars.webm
├── ch09
├── alabama.gif
├── alaska.gif
├── arizona.gif
├── arkansas.gif
├── california.gif
├── colorado.gif
├── connecticut.gif
├── delaware.gif
├── florida.gif
├── georgia.gif
├── hawaii.gif
├── idaho.gif
├── illinois.gif
├── indiana.gif
├── iowa.gif
├── kansas.gif
├── kentucky.gif
├── louisiana.gif
├── maine.gif
├── maryland.gif
├── massachusetts.gif
├── michigan.gif
├── minnesota.gif
├── mississippi.gif
├── missouri.gif
├── montana.gif
├── nebraska.gif
├── nevada.gif
├── newhampshire.gif
├── newjersey.gif
├── newmexico.gif
├── newyork.gif
├── northcarolina.gif
├── northdakota.gif
├── ohio.gif
├── oklahoma.gif
├── oregon.gif
├── pennsylvania.gif
├── rhodeisland.gif
├── rhodeislandbig.gif
├── southcarolina.gif
├── southdakota.gif
├── statesgame.html
├── tennessee.gif
├── texas.gif
├── utah.gif
├── vermont.gif
├── virginia.gif
├── washington.gif
├── westvirginia.gif
├── wisconsin.gif
└── wyoming.gif
├── ch10
├── barsbase.png
├── jigsawBars8.html
├── monkeybars.mp4
├── monkeybars.ogv
├── monkeybars.webm
├── noodles1.JPG
├── noodles2.JPG
├── noodles3.jpg
├── noodles4.jpg
├── quizTabs.html
├── sfire3.mp4
├── sfire3.theora.ogv
├── sfire3.webmvp8.webm
└── uncoverNoodles.html
└── errata.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/9781484238639.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/9781484238639.jpg
--------------------------------------------------------------------------------
/Contributing.md:
--------------------------------------------------------------------------------
1 | # Contributing to Apress Source Code
2 |
3 | Copyright for Apress source code belongs to the author(s). However, under fair use you are encouraged to fork and contribute minor corrections and updates for the benefit of the author(s) and other readers.
4 |
5 | ## How to Contribute
6 |
7 | 1. Make sure you have a GitHub account.
8 | 2. Fork the repository for the relevant book.
9 | 3. Create a new branch on which to make your change, e.g.
10 | `git checkout -b my_code_contribution`
11 | 4. Commit your change. Include a commit message describing the correction. Please note that if your commit message is not clear, the correction will not be accepted.
12 | 5. Submit a pull request.
13 |
14 | Thank you for your contribution!
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Freeware License, some rights reserved
2 |
3 | Copyright (c) 2018 Jeanine Meyer
4 |
5 | Permission is hereby granted, free of charge, to anyone obtaining a copy
6 | of this software and associated documentation files (the "Software"),
7 | to work with the Software within the limits of freeware distribution and fair use.
8 | This includes the rights to use, copy, and modify the Software for personal use.
9 | Users are also allowed and encouraged to submit corrections and modifications
10 | to the Software for the benefit of other users.
11 |
12 | It is not allowed to reuse, modify, or redistribute the Software for
13 | commercial use in any way, or for a user’s educational materials such as books
14 | or blog articles without prior permission from the copyright holder.
15 |
16 | The above copyright notice and this permission notice need to be included
17 | in all copies or substantial portions of the software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 | SOFTWARE.
26 |
27 |
28 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Apress Source Code
2 |
3 | This repository accompanies [*HTML5 and JavaScript Projects*](http://www.apress.com/9781484238639) by Jeanine Meyer (Apress, 2018).
4 |
5 | [comment]: #cover
6 | 
7 |
8 | Download the files as a zip using the green button, or clone the repository to your machine using Git.
9 |
10 | ## Releases
11 |
12 | Release v1.0 corresponds to the code in the published book, without corrections or updates.
13 |
14 | ## Contributions
15 |
16 | See the file Contributing.md for more information on how you can contribute to this repository.
--------------------------------------------------------------------------------
/ch01/html5logoscale.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | HTML5 Logo
5 |
6 |
10 |
110 |
111 |
112 |
115 |
116 | Scale percentage:
117 | Note: slider treated as text field in some browsers.
118 |
119 | Built on work by Daniel Davis, et al, but don't blame them for the fonts. Check out the use of font-family in the style element and the fontfamily variable in the script element for safe ways to do fonts. I did the scaling. Note also use of semantic elements.
120 |
122 |
123 |
124 |
--------------------------------------------------------------------------------
/ch02/collagebaseV2muted.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Collage, with video
5 |
6 |
12 |
13 |
462 |
463 |
464 |
465 | Mouse down, move and mouse up to move objects. Double click for make a copy of any object.
466 |
467 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
--------------------------------------------------------------------------------
/ch02/collagedataV2.js:
--------------------------------------------------------------------------------
1 | /*
2 | Information on videos, other objects used in collagebase.html
3 | You need to produce 3 video files for each video, type mp4,ogg,webm, with names as indicated in the videoinfo array.
4 | The first element of each subarray indicates the type of object, that is, 'video', 'heart', 'picture', 'oval','rectangle'.
5 | The elements for video objects are
6 | "video", basename of video files, angle in radians, source x, source y, destination on canvas x, destination y, width, height, scale factor (x and y), volume level (0 to 1)
7 | The angle can be used to change the orientation for clips shot on iPhone or iPads.
8 | The source x and y, with the width and height, allows you to use only some of the source video.
9 |
10 | The elements for 'picture' are
11 | 'picture',x,y,w,h,imagename.
12 |
13 | The elements for heart are
14 | 'heart',x,y,h,drx,color
15 |
16 | The elements for oval are
17 | 'oval',x,y,r,horizontal scaling, vertical scaling, color
18 |
19 | The elements for rectangle are
20 | 'rect',x,y, w,h,color
21 |
22 | The element for video are
23 | 'video',videoname, angle, sourcex, sourcey, x, y, width, height, scale, volume
24 | Note: the width and height are before scaling.
25 |
26 | */
27 |
28 | var mediainfo=
29 | [
30 | ['heart', 300,40,100,30,'red'],
31 |
32 | ['rect',620,400,100,150,"purple"],
33 |
34 | ['oval',600,50,30,2,1,'green'],
35 |
36 | ['oval',80, 500, 30, 2, 1, 'blue'],
37 |
38 | ['video','monkeyMar18',0,0,0,1000,800,896,1198,.25,1],
39 |
40 | ['picture',5,150, 150 , 200 ,'danielAndAnnika.jpg'],
41 |
42 | ['picture',500,150,280,210,'threePlusDog.jpg']
43 |
44 |
45 | ];
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/ch02/danielAndAnnika.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch02/danielAndAnnika.JPG
--------------------------------------------------------------------------------
/ch02/monkeyMar18.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch02/monkeyMar18.mp4
--------------------------------------------------------------------------------
/ch02/monkeyMar18.ogv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch02/monkeyMar18.ogv
--------------------------------------------------------------------------------
/ch02/monkeyMar18.webm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch02/monkeyMar18.webm
--------------------------------------------------------------------------------
/ch02/threePlusDog.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch02/threePlusDog.jpg
--------------------------------------------------------------------------------
/ch03/joshuahomerun.mp4video.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch03/joshuahomerun.mp4video.mp4
--------------------------------------------------------------------------------
/ch03/joshuahomerun.theora.ogv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch03/joshuahomerun.theora.ogv
--------------------------------------------------------------------------------
/ch03/joshuahomerun.webmvp8.webm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch03/joshuahomerun.webmvp8.webm
--------------------------------------------------------------------------------
/ch03/videobounceC.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Video frames bounce
5 |
6 |
14 |
139 |
140 |
141 |
142 |
143 |
150 |
151 |
152 |
155 |
156 |
157 |
158 |
--------------------------------------------------------------------------------
/ch03/videobounceEwithClipPath.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Video element bounce
5 |
6 |
14 |
114 |
115 |
116 |
117 |
118 |
126 |
127 |
128 |
131 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/ch04/bx1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch04/bx1.png
--------------------------------------------------------------------------------
/ch04/mapspotlight.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Spotlight
5 |
6 |
14 |
16 |
17 |
216 |
217 |
218 | Base location (small red x)
219 |
220 |
221 |
222 |
223 | Change base location:
224 |
231 |
232 |
233 |
--------------------------------------------------------------------------------
/ch04/rx1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch04/rx1.png
--------------------------------------------------------------------------------
/ch05/bx1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch05/bx1.png
--------------------------------------------------------------------------------
/ch05/esther.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch05/esther.jpg
--------------------------------------------------------------------------------
/ch05/estherT.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch05/estherT.mp3
--------------------------------------------------------------------------------
/ch05/estherT.ogv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch05/estherT.ogv
--------------------------------------------------------------------------------
/ch05/estherT.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch05/estherT.wav
--------------------------------------------------------------------------------
/ch05/mapmediaquiz.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Map Quiz
5 |
6 |
18 |
19 |
20 |
258 |
259 |
260 | Click
261 |
262 |
263 |
264 |
172 |
173 | This is a quiz for matching country and capital. There are 4 countries and 4 capitals.
174 | Click (or tab and then press enter) to pick a country or capital and then click (or tab and then press enter) on corresponding capital or country. There will be a video (with sound)
175 | if you match all 4.
176 |
177 | You can tab through everything repeated times.
178 |
179 | Reload for new game.
180 |
181 |
182 |
186 |
187 |
188 |
189 |
196 |
197 |
--------------------------------------------------------------------------------
/ch10/sfire3.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch10/sfire3.mp4
--------------------------------------------------------------------------------
/ch10/sfire3.theora.ogv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch10/sfire3.theora.ogv
--------------------------------------------------------------------------------
/ch10/sfire3.webmvp8.webm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Apress/html-js-projs/48a8379562ead04933093ebb335d804a8d37b40f/ch10/sfire3.webmvp8.webm
--------------------------------------------------------------------------------
/ch10/uncoverNoodles.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Reveal next
5 |
7 |
8 |
16 |
17 |
234 |
235 |
236 | Mouse/touch down, slowly drag mouse/finger down or up the photo, then mouse/touch up.
237 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
--------------------------------------------------------------------------------
/errata.md:
--------------------------------------------------------------------------------
1 | # Errata for *Book Title*
2 |
3 | On **page xx** [Summary of error]:
4 |
5 | Details of error here. Highlight key pieces in **bold**.
6 |
7 | ***
8 |
9 | On **page xx** [Summary of error]:
10 |
11 | Details of error here. Highlight key pieces in **bold**.
12 |
13 | ***
--------------------------------------------------------------------------------