3D Game Programming

(C. Jardin) #1

Index


SYMBOLS
! character, 39 , 73
() characters
errors, 19 , 56
grouping math with, 70
* character, multiplication
with, 62 , 70
+ character
addition with, 69
joining strings with, 73


  • character, subtraction with,
    69
    . character, method chaining,
    84
    / character, division with, 70
    // notation, commenting with,
    69
    ; character
    and functions, 54
    errors, 19
    = character, defined, 38 , 74
    == notation, defined, 38 , 74
    [] characters, listing with, 77
    {} characters
    function notation, 54–55
    JavaScript objects, 160
    π, 71


DIGITS
2D
collisions, 95
orthographic camera and,
91 , 167
3D
camera perspective and,
7 , 90
components, 4

lights and, 187
river-rafting game, 185–
205 , 265–272
tilt-a-board game, 145–
157 , 249–253

A
aboutMe(), 160–164
absolute value, 170
abstractions, 207
acrobatics() function, 61
addAvatar(), 141
addBackground(), 155
addBall(), 148
addBoard(), 150
addControls(), 152
addFruitPowerUp(), 203
addGround(), 136
addLid(), 193
addLights(), 148
addRaft(), 195
addRiver(), 189
addScoreboard(), 138 , 188
addSunlight(), 187
addWater(), 193
addition, 69
ambient attribute, 113
ambient color and light
about, 113
solar-system project, 118
tilt-a-board game, 148
amplitude, wave, 193
angles and rotation, 81
angular factor, 137 , 169
animateFruit(), 106

animations
avatar movement, 35–47
cartwheel, 32–33, 39 , 44 ,
61 , 66
cave-puzzle game, 165–
184
flipping, 32 , 34 , 44 , 61 ,
66
fruit in fruit-hunt game,
105
jumping in fruit-hunt
game, 104
moving hands and feet,
59–66
pausing, 129–130, 175 ,
198
phases of the moon, 125–
132
purple fruit monster
game, 138
river-rafting game, 185–
205
rotating avatar, 82–84
solar-system project,
119–123
spinning donut, 115
spinning shapes, 14
starting and stopping, 39
tilt-a-board game, 151
walking, 61–66
wiggling in fruit-hunt
game, 102
appendChild(), 88
applyCentralForce(), 198
arguments, function, 54 , 56
arrow keys
avatar movement, 37–40,
46 , 140
cartwheels and flips, 66
cave-puzzle game, 169

Prepared exclusively for Michael Powell

Free download pdf