Cargando…

WebGL game development : gain insights into game development by rendering complex 3D objects using WebGL /

This book is set-by-step, example-based tutorial that provides details on gaming logic using Web GL. If you are a programmer who wants to transform the skill of blending imagination and throughput in games, this is the book for you. You need to have a good understanding of object-oriented programmin...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Arora, Sumeet (Autor)
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham, UK : Packt Publishing, 2014.
Colección:Community experience distilled.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Getting Started with WebGL Game Development; Understanding WebGL; Differentiating WebGL from the game engine; Understanding basic 3D mathematics; Vectors; Matrices; Understanding transformations; Classifying into linear and affine transformations; Understanding transformations required to render 3D objects; Learning the basics of 3D graphics; Understanding mesh, polygon, and vertices; Using indices to save memory; Understanding WebGL's rendering pipeline; Framebuffers
  • A walkthrough of the WebGL APIInitializing the WebGL context; Vertex buffer objects
  • uploading data to GPU; Index buffer objects; Shaders; The vertex shader; The fragment shader; Shader variable qualifiers; Attributes; Uniforms; The Varying qualifier; Compiling and linking shaders; Associating buffer objects with shader attributes; Drawing our primitive; Drawing using vertex buffer objects; Drawing using index buffer objects; Debugging a WebGL application; Summary; Chapter 2: Colors and Shading Languages; Understanding colors; Coloring our square; Coloring using the vertex color
  • Learning more about colorsUnderstanding surface normals for lighting calculations; Different types of lights used in games; Understanding object materials; Rendering 3D objects; Exporting a 3D object from Blender; Understanding and loading the Wavefront (OBJ) format; Understanding the material file format (MTL); Converting the OBJ file to the JSON file format; Loading the JSON model; Rendering without light; Understanding the illumination/reflection model; Lambertian reflectance/diffuse reflection; The Blinn-Phong model; Understanding shading/interpolation models; Flat shading
  • Gouraud shadingPhong shading; Differentiating the shading models; Implementing Gouraud shading on a Lambertian reflection model; Implementing Gouraud shading
  • Blinn-Phong reflection; Implementing Phong shading
  • Blinn-Phong reflection; Summary; Chapter 3: Loading the Game Scene; Supporting multiple objects; Implementing Face.js; Implementing Geometry.js; Implementing parseJSON.js; Implementing StageObject.js; Implementing Stage.js; Using the architectural updates; Understanding the main code; Understanding WebGL
  • a state machine; Using mvMatrix states; Understanding request animation frames
  • Loading the sceneUnderstanding positional lights; Lighting up the scene with lamps; The vertex shader; The fragment shader; Understanding the main code; Multiple lights and shaders; Adding multiple lamps; The vertex shader; The fragment shader; Implementing Light.js; Applying Lights.js; Understanding the main code; Summary; Chapter 4: Applying Textures; Texturing basics; Understanding 2D textures and texture mapping; Comprehending texture filtering; Loading textures; New data type
  • sampler; Applying a texture to the square; The vertex shader; The fragment shader; Texture wrapping