thejohnhoffer / viaWebGL

GLSL Shaders on OpenSeadragon zoomable tiles or any other image viaWebGL
MIT License
36 stars 5 forks source link

ES6 (ECMAScript 2015) Javascript support #2

Open zbackscatter opened 7 years ago

zbackscatter commented 7 years ago

We are experiencing great difficulty running the latest OpenSeaDragonGL on Windows 7 and Visual Studio 2015 as it requires ES6 javascript. OpenSeaDragon runs fine but we would like to introduce OpenSeaDragonGL. Is there a version of OpenSeaDragonGL demo that does not depend on the new standard ES6?

Thanks, Tim

thejohnhoffer commented 7 years ago

Thanks for opening the issue! I didn't realize Visual Studio doesn't support the aspects of ES6 that I used. Let me look at the source code of openseadragongl.js to see which bits rely on ES6.

thejohnhoffer commented 7 years ago

Here's the relevant ES6 javascript feature used in openseadragongl.js. This is syntactic sugar.

In line 58 of merger:

for (var key of this.and(this.viaGL)) {

In line 65 of adder:

for (var key of this.and(this.defaults)) {