Professional WebGL Programming by Andreas Anyuru

Professional WebGL Programming by Andreas Anyuru

Author:Andreas Anyuru
Language: eng
Format: epub
Publisher: Wiley
Published: 2012-04-01T16:00:00+00:00

What is worth commenting on again in the code is the order in which the view transformation and the model transformation are set up. First you set up the view transformation with mat4.lookAt(). Then you add the model transformation for the different objects to the modelview matrix. In this way, the vertices of your objects can be transformed as if they were multiplied with the model transformation first and then the view transformation. This is according to what you learned about the WebGL transformation pipeline earlier in this chapter.

One way that might help you to really master transformations is to be a bit old fashioned and use a pen and paper. Imagine an object, for example, a small cube, that you want to position and orient so you can look at it from different directions. Write down the transformations that you need to do. Then try it out in code by, for example, editing Listing 4-4. Perform the exercise over and over again until you feel comfortable with the transformations.


Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Popular ebooks
Deep Learning with Python by Fran├žois Chollet(9093)
Hello! Python by Anthony Briggs(7053)
Dependency Injection in .NET by Mark Seemann(6860)
The Mikado Method by Ola Ellnestam Daniel Brolund(6843)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(5716)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(4966)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(4868)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(4079)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(3619)
Functional Programming in JavaScript by Mantyla Dan(2909)
Audition by Ryu Murakami(2569)
Kotlin in Action by Dmitry Jemerov(2461)
Learning React: Functional Web Development with React and Redux by Banks Alex & Porcello Eve(1965)
Architecting Modern Java EE Applications: Designing lightweight, business-oriented enterprise applications in the age of cloud, containers, and Java EE 8 by Daschner Sebastian(1654)
Writing for the Web: Creating Compelling Web Content Using Words, Pictures and Sound (Eva Spring's Library) by Lynda Felder(1560)
PHP 7 Data Structures and Algorithms by Mizanur Rahman(1475)
React Native - Building Mobile Apps with JavaScript by Novick Vladimir(1460)
SEO 2018: Learn search engine optimization with smart internet marketing strategies by Adam Clarke(1403)
JavaScript by Example by S Dani Akash(1363)
Learning Angular - Second Edition by Christoffer Noring(1221)