summaryrefslogtreecommitdiff
path: root/guide-src/development/js-features.html
blob: ea8ac97cd7e5e2d551fe407c52f67bca423426e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- modern JavaScript features

<p>
pugl has no dependencies, and i'd like to keep it that way.
</p>

<p>
i've been pretty liberal about using modern javascript;
even though this could in theory run on IE it doesn't
(in particular it's very nice to have template literals).
that said, try to only use features that have at least as much
support as webgl2 (i.e. &gt;94%).
</p>

<p>
we use webgl2 because:
<ul>
 <li>having non-constant loops in shaders is nice</li>
 <li>there aren't that many browsers that support webgl and ES6 but not webgl2 (looking at caniuse.com, they probably
  make up around 2% of browser usage)</li>
</ul>
</p>