@@ -141,6 +141,27 @@ Then in JavaScript we can look that up
141
141
142
142
var canvas = document.querySelector("#c");
143
143
144
+ > Note: These lessons were started in 2011, long before modern
145
+ > JavaScript. Back then, there was
146
+ > no [ ` import ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import ) ,
147
+ > no [ ` async ` /` await ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function ) ,
148
+ > no [ ` Promise ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise ) ,
149
+ > no [ spread syntax] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax ) ,
150
+ > no [ rest parameters] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters ) ,
151
+ > no [ optional chaining] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining ) ,
152
+ > no [ nullish coalescing operator] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing ) ,
153
+ > no [ destructuring assignment] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment ) ,
154
+ > no [ Map] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map )
155
+ > and no [ Set] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set ) .
156
+ > In in particular, ` var ` was all there was and
157
+ > [ ` let ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let ) and
158
+ > [ ` const ` ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const )
159
+ > did not exist.
160
+ >
161
+ > So, please forgive the oldskool JavaScript. The lessons are still valid
162
+ > but you'll have to translate them to more modern JavaScript on your own.
163
+ > For more info [ see this issue] ( https://github.com/gfxfundamentals/webgl-fundamentals/issues/450 ) .
164
+
144
165
Now we can create a WebGLRenderingContext
145
166
146
167
var gl = canvas.getContext("webgl");
0 commit comments