diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc39eebef38..3bb75498d2b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -162,6 +162,23 @@ npm run schema **IMPORTANT:** please do not change and commit any files in the "dist" folder +#### Step 9: REGL - Review & commit potential changes to precompiled regl shaders + +If you are implementing a new feature that involves regl shaders, or if you are +making changes that affect the usage of regl shaders, you would need to run + +```bash +npm run regl-codegen +``` + +to regenerate the regl code. This opens a browser window, runs through all +traces with 'regl' in the tags, and stores the captured code into +[src/generated/regl-codegen](https://github.com/plotly/plotly.js/blob/master/src/generated/regl-codegen). If no updates are necessary, it would be a no-op, but +if there are changes, you would need to commit them. + +This is needed because regl performs codegen in runtime which breaks CSP +compliance, and so for strict builds we pre-generate regl shader code here. + #### Other npm scripts that may be of interest in development - `npm run preprocess`: pre-processes the css and svg source file in js. This diff --git a/devtools/regl_codegen/devtools.js b/devtools/regl_codegen/devtools.js new file mode 100644 index 00000000000..f1519f64bd8 --- /dev/null +++ b/devtools/regl_codegen/devtools.js @@ -0,0 +1,160 @@ +'use strict'; + +/* global Plotly:false */ + +var mocks = require('../../build/test_dashboard_mocks.json'); +var reglTraces = require('../../build/regl_traces.json'); +var Lib = require('@src/lib'); + +// Our gracious testing object +var Tabs = { + + // Return the specified plot container (or default one) + getGraph: function(id) { + id = id || 'graph'; + return document.getElementById(id); + }, + + // Create a new plot container + fresh: function(id) { + id = id || 'graph'; + + var graphDiv = Tabs.getGraph(id); + + if(graphDiv) { + graphDiv.parentNode.removeChild(graphDiv); + } + + graphDiv = document.createElement('div'); + graphDiv.className = 'dashboard-plot'; + graphDiv.id = id; + + var plotArea = document.getElementById('plots'); + plotArea.appendChild(graphDiv); + + return graphDiv; + }, + + // Plot a mock by name (without .json) to the default or specified container + plotMock: function(mockName, id) { + return new Promise(function(res) { + var mockURL = '/test/image/mocks/' + mockName + '.json'; + + console.warn('Plotting:', mockURL); + + var request = new XMLHttpRequest(); + request.open('GET', mockURL, true); + request.responseType = ''; + request.send(); + + request.onreadystatechange = function() { + if(this.readyState === 4) { + if(this.status === 200) { + var fig = JSON.parse(this.responseText); + var graphDiv = Tabs.fresh(id); + + Plotly.newPlot(graphDiv, fig); + + graphDiv.on('plotly_afterplot', function() { + res(graphDiv); + }); + } else { + console.error(this.statusText); + } + } + }; + }); + }, +}; + + +// Bind things to the window +window.Tabs = Tabs; +window.Lib = Lib; +window.onload = handleOnLoad; +setInterval(function() { + window.gd = Tabs.getGraph() || Tabs.fresh(); + window.fullLayout = window.gd._fullLayout; + window.fullData = window.gd._fullData; +}, 1000); + +var mocksList = document.getElementById('mocks-list'); + +function handleOnLoad() { + var mocksByReglTrace = {}; + + reglTraces.forEach(function(trace) { + mocksByReglTrace[trace] = []; + mocks.forEach(function(mock) { + if(mock.keywords.indexOf(trace) !== -1) { + mocksByReglTrace[trace].push(mock); + } + }); + }); + + Object.keys(mocksByReglTrace).forEach(function(trace) { + var thisMocks = mocksByReglTrace[trace]; + var div = document.createElement('div'); + div.className = 'mock-group'; + div.innerHTML = '

' + trace + '

'; + mocksList.appendChild(div); + thisMocks.forEach(function(mock) { + var a = document.createElement('a'); + a.className = 'mock-link'; + a.innerHTML = mock.name; + a.href = '#' + mock.name; + a.onclick = function() { + Tabs.plotMock(this.innerHTML); + }; + div.appendChild(a); + div.appendChild(document.createElement('br')); + }); + }); + + // visit the mocks one by one. + return Object.keys(mocksByReglTrace).reduce(function(p, trace) { + return p.then(function() { + var thisMocks = mocksByReglTrace[trace]; + var generated = {}; + + return thisMocks.reduce(function(p, mock) { + return p.then(function() { + return Tabs.plotMock(mock.name).then(function(gd) { + var fullLayout = gd._fullLayout; + fullLayout._glcanvas.each(function(d) { + if(d.regl) { + console.log('found regl', d.regl); + var cachedCode = d.regl.getCachedCode(); + Object.entries(cachedCode).forEach(function(kv) { + generated[kv[0]] = kv[1].toString(); + }); + console.log('merging entries', Object.keys(cachedCode)); + } + }); + }); + }); + }, Promise.resolve()) + .then(function() { + console.log(window.__regl_codegen_cache); + var body = JSON.stringify({ + generated: generated, + trace: trace + }); + window.__regl_codegen_cache = {}; + return fetch('/api/submit-code', { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + body: body + }); + }); + }); + }, Promise.resolve()) + .then(function() { + return fetch('/api/codegen-done'); + }) + .then(function() { + window.close(); + }); +} diff --git a/devtools/regl_codegen/index.html b/devtools/regl_codegen/index.html new file mode 100644 index 00000000000..24b360419d6 --- /dev/null +++ b/devtools/regl_codegen/index.html @@ -0,0 +1,19 @@ + + + + REGL Codegen + + + + +
+
+
+
+
+ + + + + + diff --git a/devtools/regl_codegen/server.js b/devtools/regl_codegen/server.js new file mode 100644 index 00000000000..53823b32d0f --- /dev/null +++ b/devtools/regl_codegen/server.js @@ -0,0 +1,253 @@ +var fs = require('fs'); +var path = require('path'); +var http = require('http'); +var ecstatic = require('ecstatic'); +var open = require('open'); +var browserify = require('browserify'); +var minimist = require('minimist'); + +var constants = require('../../tasks/util/constants'); +var makeWatchifiedBundle = require('../../tasks/util/watchified_bundle'); +var shortcutPaths = require('../../tasks/util/shortcut_paths'); + +var args = minimist(process.argv.slice(2), {}); +var PORT = args.port || 3000; +var strict = args.strict; + +// Create server +var static = ecstatic({ + root: constants.pathToRoot, + cache: 0, + gzip: true, + cors: true +}); + +var tracesReceived = []; + +var server = http.createServer(function(req, res) { + if(req.method === 'POST' && req.url === '/api/submit-code') { + var body = ''; + req.on('data', function(data) { + body += data; + }); + req.on('end', function() { + var data = JSON.parse(body); + + tracesReceived.push(data.trace); + handleCodegen(data); + res.statusCode = 200; + res.end(); + }); + } else if(req.method === 'GET' && req.url === '/api/codegen-done') { + console.log('Codegen complete'); + console.log('Traces received:', tracesReceived); + + res.statusCode = 200; + res.end(); + setTimeout(process.exit, 1000); + } else { + static(req, res); + } +}); + + +// Make watchified bundle for plotly.js +var bundlePlotly = makeWatchifiedBundle(strict, function() { + // open up browser window on first bundle callback + open('http://localhost:' + PORT + '/devtools/regl_codegen/index' + (strict ? '-strict' : '') + '.html'); +}); + +// Bundle devtools code +var devtoolsPath = path.join(constants.pathToRoot, 'devtools/regl_codegen'); +var devtools = browserify(path.join(devtoolsPath, 'devtools.js'), { + transform: [shortcutPaths] +}); + +// Start the server up! +server.listen(PORT); + +var reglTraceList = getReglTraces(); +purgeGeneratedCode(reglTraceList); + +// Build and bundle all the things! +getMockFiles() + .then(readFiles) + .then(createMocksList) + .then(saveMockListToFile) + .then(saveReglTracesToFile.bind(null, reglTraceList)) + .then(bundleDevtools) + .then(bundlePlotly); + + +function getMockFiles() { + return new Promise(function(resolve, reject) { + fs.readdir(constants.pathToTestImageMocks, function(err, files) { + if(err) { + reject(err); + } else { + resolve(files); + } + }); + }); +} + +function getReglTraces() { + return constants.allTraces.filter(function(trace) { + var indexPath = constants.pathToSrc + '/traces/' + trace + '/index.js'; + + // get categories + var indexContents = fs.readFileSync(indexPath, 'utf8'); + var categories = indexContents.match(/^\s*categories:\s*\[([^\]]+)\]/m); + if(categories) { + categories = categories[1].split(',').map(function(c) { + return c.trim().replace(/^['"]|['"]$/g, ''); + }); + } + + if(categories && categories.indexOf('regl') !== -1) { + return true; + } + }); +} + +function readFiles(files) { + var promises = files.map(function(file) { + var filePath = path.join(constants.pathToTestImageMocks, file); + return readFilePromise(filePath); + }); + + return Promise.all(promises); +} + +function createMocksList(files) { + // eliminate pollutants (e.g .DS_Store) that can accumulate in the mock directory + var jsonFiles = files.filter(function(file) { + return file.name.substr(-5) === '.json'; + }); + + var mocksList = jsonFiles.map(function(file) { + var contents = JSON.parse(file.contents); + + // get plot type keywords from mocks + var types = contents.data.map(function(trace) { + return trace.type || 'scatter'; + }).reduce(function(acc, type, i, arr) { + if(arr.lastIndexOf(type) === i) { + acc.push(type); + } + return acc; + }, []); + + var filename = file.name.split(path.sep).pop(); + + return { + name: filename.slice(0, -5), + file: filename, + keywords: types.join(', ') + }; + }); + + return mocksList; +} + +function saveMockListToFile(mocksList) { + var filePath = path.join(constants.pathToBuild, 'test_dashboard_mocks.json'); + var content = JSON.stringify(mocksList, null, 4); + + return writeFilePromise(filePath, content); +} + +function saveReglTracesToFile(traces) { + var filePath = path.join(constants.pathToBuild, 'regl_traces.json'); + var content = JSON.stringify(traces, null, 4); + + return writeFilePromise(filePath, content); +} + +function readFilePromise(file) { + return new Promise(function(resolve, reject) { + fs.readFile(file, { encoding: 'utf-8' }, function(err, contents) { + if(err) { + reject(err); + } else { + resolve({ + name: file, + contents: contents + }); + } + }); + }); +} + +function writeFilePromise(path, contents) { + return new Promise(function(resolve, reject) { + fs.writeFile(path, contents, function(err) { + if(err) { + reject(err); + } else { + resolve(path); + } + }); + }); +} + +function bundleDevtools() { + return new Promise(function(resolve, reject) { + devtools.bundle(function(err) { + if(err) { + console.error('Error while bundling!', JSON.stringify(String(err))); + return reject(err); + } else { + return resolve(); + } + }).pipe(fs.createWriteStream(constants.pathToReglCodegenBundle)); + }); +} + +function handleCodegen(data) { + var trace = data.trace; + var generated = data.generated; + + var pathToReglCodegenSrc = constants.pathToReglCodegenSrc; + var pathToReglPrecompiledSrc = path.join(constants.pathToSrc, 'traces', trace, 'regl_precompiled.js'); + + var header = '\'use strict\';\n'; + var imports = ''; + var exports = '\nmodule.exports = {\n'; + var varId = 0; + + Object.entries(generated).forEach(function(kv) { + var key = kv[0]; + var value = kv[1]; + var filePath = path.join(pathToReglCodegenSrc, key); + fs.writeFileSync(filePath, 'module.exports = ' + value); + + imports += 'var v' + varId + ' = require(\'../../' + path.join(constants.reglCodegenSubdir, key) + '\');\n'; + exports += ' \'' + key + '\': v' + varId + ',\n'; + varId++; + }); + + if(varId > 0) { + exports = exports.slice(0, -2) + '\n};\n'; + } else { + exports = 'module.exports = {};\n'; + } + + var precompiled = header + imports + exports; + fs.writeFileSync(pathToReglPrecompiledSrc, precompiled); +} + + +function purgeGeneratedCode(traces) { + var pathToReglCodegenSrc = constants.pathToReglCodegenSrc; + + var files = fs.readdirSync(pathToReglCodegenSrc); + files.forEach(function(file) { + fs.unlinkSync(path.join(pathToReglCodegenSrc, file)); + }); + + traces.forEach(function(trace) { + var pathToReglPrecompiledSrc = path.join(constants.pathToSrc, 'traces', trace, 'regl_precompiled.js'); + fs.writeFileSync(pathToReglPrecompiledSrc, 'module.exports = {};\n'); + }); +} diff --git a/draftlogs/6083_add.md b/draftlogs/6083_add.md new file mode 100644 index 00000000000..25048320e72 --- /dev/null +++ b/draftlogs/6083_add.md @@ -0,0 +1 @@ + - Add regl-based traces `parcoords`, `splom`, `scattergl`, `scatterpolargl` to the "strict" bundle [[#6083](https://github.com/plotly/plotly.js/pull/6083)] diff --git a/draftlogs/6135_add.md b/draftlogs/6135_add.md new file mode 100644 index 00000000000..a32e9409864 --- /dev/null +++ b/draftlogs/6135_add.md @@ -0,0 +1 @@ + - Add `scattersmith` trace to the "strict" bundle [[#6135](https://github.com/plotly/plotly.js/pull/6135)] diff --git a/draftlogs/6135_fix.md b/draftlogs/6135_fix.md deleted file mode 100644 index 68396c02b20..00000000000 --- a/draftlogs/6135_fix.md +++ /dev/null @@ -1 +0,0 @@ - - Provide missing `scattersmith` trace in the "strict" bundle [[#6135](https://github.com/plotly/plotly.js/pull/6135)] diff --git a/lib/index-strict.js b/lib/index-strict.js index 58e5eb12af7..e73072ef9c8 100644 --- a/lib/index-strict.js +++ b/lib/index-strict.js @@ -30,8 +30,11 @@ Plotly.register([ require('./streamtube'), require('./scattergeo'), require('./choropleth'), + require('../src/traces/scattergl/strict'), + require('../src/traces/splom/strict'), require('./pointcloud'), require('./heatmapgl'), + require('../src/traces/parcoords/strict'), require('./parcats'), require('./scattermapbox'), require('./choroplethmapbox'), @@ -45,6 +48,7 @@ Plotly.register([ require('./ohlc'), require('./candlestick'), require('./scatterpolar'), + require('../src/traces/scatterpolargl/strict'), require('./barpolar'), require('./scattersmith'), diff --git a/package-lock.json b/package-lock.json index 8bb0893c1b7..363faf56a8b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "parse-svg-path": "^0.1.2", "polybooljs": "^1.2.0", "probe-image-size": "^7.2.3", - "regl": "^2.1.0", + "regl": "npm:@plotly/regl@^2.1.1", "regl-error2d": "^2.0.12", "regl-line2d": "^3.1.2", "regl-scatter2d": "^3.2.8", @@ -8336,9 +8336,10 @@ } }, "node_modules/regl": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/regl/-/regl-2.1.0.tgz", - "integrity": "sha512-oWUce/aVoEvW5l2V0LK7O5KJMzUSKeiOwFuJehzpSFd43dO5spP9r+sSUfhKtsky4u6MCqWJaRL+abzExynfTg==" + "name": "@plotly/regl", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@plotly/regl/-/regl-2.1.1.tgz", + "integrity": "sha512-srKD8UCOQGwf1QSH/sUpK6R2TzYQdK/WRHc+LM22fTIDMnAvZiQR6DnWiOknsWkDGEmspCT6wrxMXEUiPfEZbQ==" }, "node_modules/regl-error2d": { "version": "2.0.12", @@ -17358,9 +17359,9 @@ } }, "regl": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/regl/-/regl-2.1.0.tgz", - "integrity": "sha512-oWUce/aVoEvW5l2V0LK7O5KJMzUSKeiOwFuJehzpSFd43dO5spP9r+sSUfhKtsky4u6MCqWJaRL+abzExynfTg==" + "version": "npm:@plotly/regl@2.1.1", + "resolved": "https://registry.npmjs.org/@plotly/regl/-/regl-2.1.1.tgz", + "integrity": "sha512-srKD8UCOQGwf1QSH/sUpK6R2TzYQdK/WRHc+LM22fTIDMnAvZiQR6DnWiOknsWkDGEmspCT6wrxMXEUiPfEZbQ==" }, "regl-error2d": { "version": "2.0.12", diff --git a/package.json b/package.json index 030cd7f2881..a1c0d049623 100644 --- a/package.json +++ b/package.json @@ -32,13 +32,14 @@ "use-draftlogs": "node tasks/use_draftlogs.js", "empty-draftlogs": "node tasks/empty_draftlogs.js", "empty-dist": "node tasks/empty_dist.js", - "build": "npm run empty-dist && npm run preprocess && npm run find-strings && npm run bundle && npm run extra-bundles basic && npm run extra-bundles cartesian && npm run extra-bundles geo && npm run extra-bundles gl2d && npm run extra-bundles gl3d && npm run extra-bundles mapbox && npm run extra-bundles finance && npm run extra-bundles strict && npm run locales && npm run schema dist && npm run stats", + "build": "npm run empty-dist && npm run preprocess && npm run find-strings && npm run bundle && npm run extra-bundles basic && npm run extra-bundles cartesian && npm run extra-bundles geo && npm run extra-bundles gl2d && npm run extra-bundles gl3d && npm run extra-bundles mapbox && npm run extra-bundles finance && npm run locales && npm run schema dist && npm run stats", + "regl-codegen": "node devtools/regl_codegen/server.js", "cibuild": "npm run empty-dist && npm run preprocess && node tasks/cibundle.js", "watch": "node tasks/watch.js", "lint": "eslint --version && eslint .", "lint-fix": "eslint . --fix || true", "log-new-func": "eslint --no-ignore --no-eslintrc --no-inline-config --rule '{no-new-func: error}' dist/plotly.js 2>&1 | ./tasks/show_eval_lines.sh", - "no-new-func": "eslint --no-ignore --no-eslintrc --no-inline-config --rule '{no-new-func: error}' $(find dist -type f -iname '*.js' | grep -v plotly-gl2d* | grep -v plotly-with-meta.* | grep -v plotly.js | grep -v plotly.min.js)", + "no-new-func": "eslint --no-ignore --no-eslintrc --no-inline-config --rule '{no-new-func: error}' $(find dist -type f -iname '*.js' | grep -v plotly-gl2d* | grep -v plotly-with-meta.* | grep -v plotly.js | grep -v plotly.min.js | grep -v plotly-strict.js | grep -v plotly-strict.min.js)", "no-bad-char": "eslint --no-ignore --no-eslintrc --no-inline-config --rule '{no-misleading-character-class: error}' $(find dist -type f -iname '*.js' | grep plotly)", "no-dup-keys": "eslint --no-ignore --no-eslintrc --no-inline-config --rule '{no-dupe-keys: error}' $(find dist -type f -iname '*.js' | grep plotly)", "no-es6-dist": "node tasks/no_es6_dist.js", @@ -106,7 +107,7 @@ "parse-svg-path": "^0.1.2", "polybooljs": "^1.2.0", "probe-image-size": "^7.2.3", - "regl": "^2.1.0", + "regl": "npm:@plotly/regl@^2.1.1", "regl-error2d": "^2.0.12", "regl-line2d": "^3.1.2", "regl-scatter2d": "^3.2.8", diff --git a/src/generated/regl-codegen/0919c57b995304312da30a5af7873a319bfb7b7e22ff6b4fa203ecbd5774ebfc b/src/generated/regl-codegen/0919c57b995304312da30a5af7873a319bfb7b7e22ff6b4fa203ecbd5774ebfc new file mode 100644 index 00000000000..ee5063f01d1 --- /dev/null +++ b/src/generated/regl-codegen/0919c57b995304312da30a5af7873a319bfb7b7e22ff6b4fa203ecbd5774ebfc @@ -0,0 +1,1462 @@ +module.exports = function anonymous(g0,g18,g19,g52,g90,g97,g98,g100,g105,g106,g109,g112,g126,g131,g145,g149,g151,g156,g158,g159,g161,g162,g164,g167,g169,g172,g174,g177,g179,g182,g186,g188,g201,g203,g205,g207,g209,g211,g213,g215,g217,g219,g221,g223,g234,g236,g244,g248,g251,g254,g257,g260,g263,g266,g269,g272,g274,g276,g292,g319,g332,g334,g370,g371,g372,g373 +) { +"use strict"; +var v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v53,v54; +v1=g0.gl; +v2=g0.context; +v3=g0.strings; +v4=g0.next; +v5=g0.current; +v6=g0.draw; +v7=g0.elements; +v8=g0.buffer; +v9=g0.shader; +v10=g0.attributes; +v11=g0.vao; +v12=g0.uniforms; +v13=g0.framebuffer; +v14=g0.extensions; +v15=g0.timer; +v16=g0.isBufferArgs; +v17=g0.isArrayLike; +v20=v4.blend_color; +v21=v5.blend_color; +v22=v4.blend_equation; +v23=v5.blend_equation; +v24=v4.blend_func; +v25=v5.blend_func; +v26=v4.depth_range; +v27=v5.depth_range; +v28=v4.colorMask; +v29=v5.colorMask; +v30=v4.polygonOffset_offset; +v31=v5.polygonOffset_offset; +v32=v4.sample_coverage; +v33=v5.sample_coverage; +v34=v4.stencil_func; +v35=v5.stencil_func; +v36=v4.stencil_opFront; +v37=v5.stencil_opFront; +v38=v4.stencil_opBack; +v39=v5.stencil_opBack; +v40=v4.scissor_box; +v41=v5.scissor_box; +v42=v4.viewport; +v43=v5.viewport; +v44={ +"points":0,"point":0,"lines":1,"line":1,"triangles":4,"triangle":4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6} +; +v45={ +"never":512,"less":513,"<":513,"equal":514,"=":514,"==":514,"===":514,"lequal":515,"<=":515,"greater":516,">":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +v53={ +} +; +v53.stride=8; +v53.offset=8; +v54={ +} +; +v54.stride=8; +v54.offset=8; +return { +"draw":function(a0){ +var v55,v56,v89,v91,v92,v93,v94,v95,v96,v99,v101,v102,v103,v104,v107,v108,v110,v111,v113,v114,v115,v116,v117,v118,v119,v120,v121,v122,v123,v124,v125,v127,v128,v129,v130,v132,v133,v134,v135,v136,v137,v138,v139,v140,v141,v142,v143,v144,v146,v147,v148,v150,v152,v153,v154,v155,v157,v160,v163,v165,v166,v168,v170,v171,v173,v175,v176,v178,v180,v181,v183,v184,v185,v187,v189; +v55=v14.angle_instanced_arrays; +v56=v13.next; +if(v56!==v13.cur){ +if(v56){ +v1.bindFramebuffer(36160,v56.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v56; +} +if(v5.dirty){ +var v57,v58,v59,v60,v61,v62,v63,v64,v65,v66,v67,v68,v69,v70,v71,v72,v73,v74,v75,v76,v77,v78,v79,v80,v81,v82,v83,v84,v85,v86,v87,v88; +v57=v4.dither; +if(v57!==v5.dither){ +if(v57){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v57; +} +v58=v4.depth_func; +if(v58!==v5.depth_func){ +v1.depthFunc(v58); +v5.depth_func=v58; +} +v59=v26[0]; +v60=v26[1]; +if(v59!==v27[0]||v60!==v27[1]){ +v1.depthRange(v59,v60); +v27[0]=v59; +v27[1]=v60; +} +v61=v4.depth_mask; +if(v61!==v5.depth_mask){ +v1.depthMask(v61); +v5.depth_mask=v61; +} +v62=v28[0]; +v63=v28[1]; +v64=v28[2]; +v65=v28[3]; +if(v62!==v29[0]||v63!==v29[1]||v64!==v29[2]||v65!==v29[3]){ +v1.colorMask(v62,v63,v64,v65); +v29[0]=v62; +v29[1]=v63; +v29[2]=v64; +v29[3]=v65; +} +v66=v4.cull_enable; +if(v66!==v5.cull_enable){ +if(v66){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v66; +} +v67=v4.cull_face; +if(v67!==v5.cull_face){ +v1.cullFace(v67); +v5.cull_face=v67; +} +v68=v4.frontFace; +if(v68!==v5.frontFace){ +v1.frontFace(v68); +v5.frontFace=v68; +} +v69=v4.lineWidth; +if(v69!==v5.lineWidth){ +v1.lineWidth(v69); +v5.lineWidth=v69; +} +v70=v4.polygonOffset_enable; +if(v70!==v5.polygonOffset_enable){ +if(v70){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v70; +} +v71=v30[0]; +v72=v30[1]; +if(v71!==v31[0]||v72!==v31[1]){ +v1.polygonOffset(v71,v72); +v31[0]=v71; +v31[1]=v72; +} +v73=v4.sample_alpha; +if(v73!==v5.sample_alpha){ +if(v73){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v73; +} +v74=v4.sample_enable; +if(v74!==v5.sample_enable){ +if(v74){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v74; +} +v75=v32[0]; +v76=v32[1]; +if(v75!==v33[0]||v76!==v33[1]){ +v1.sampleCoverage(v75,v76); +v33[0]=v75; +v33[1]=v76; +} +v77=v4.stencil_mask; +if(v77!==v5.stencil_mask){ +v1.stencilMask(v77); +v5.stencil_mask=v77; +} +v78=v34[0]; +v79=v34[1]; +v80=v34[2]; +if(v78!==v35[0]||v79!==v35[1]||v80!==v35[2]){ +v1.stencilFunc(v78,v79,v80); +v35[0]=v78; +v35[1]=v79; +v35[2]=v80; +} +v81=v36[0]; +v82=v36[1]; +v83=v36[2]; +v84=v36[3]; +if(v81!==v37[0]||v82!==v37[1]||v83!==v37[2]||v84!==v37[3]){ +v1.stencilOpSeparate(v81,v82,v83,v84); +v37[0]=v81; +v37[1]=v82; +v37[2]=v83; +v37[3]=v84; +} +v85=v38[0]; +v86=v38[1]; +v87=v38[2]; +v88=v38[3]; +if(v85!==v39[0]||v86!==v39[1]||v87!==v39[2]||v88!==v39[3]){ +v1.stencilOpSeparate(v85,v86,v87,v88); +v39[0]=v85; +v39[1]=v86; +v39[2]=v87; +v39[3]=v88; +} +} +v89=a0["viewport"]; +if(!(v89&&typeof v89==="object"))g18.commandRaise(g90,g19); +v91=v89.x|0; +v92=v89.y|0; +v93="width" in v89?v89.width|0:(v2.framebufferWidth-v91); +v94="height" in v89?v89.height|0:(v2.framebufferHeight-v92); +if(!(v93>=0&&v94>=0))g18.commandRaise(g90,g19); +v95=v2.viewportWidth; +v2.viewportWidth=v93; +v96=v2.viewportHeight; +v2.viewportHeight=v94; +v1.viewport(v91,v92,v93,v94); +v43[0]=v91; +v43[1]=v92; +v43[2]=v93; +v43[3]=v94; +v1.blendColor(0,0,0,0); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=0; +if(g97){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g97; +v1.blendEquationSeparate(32774,32774); +v23[0]=32774; +v23[1]=32774; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +if(g98){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=g98; +v99=a0["viewport"]; +if(!(v99&&typeof v99==="object"))g18.commandRaise(g100,g19); +v101=v99.x|0; +v102=v99.y|0; +v103="width" in v99?v99.width|0:(v2.framebufferWidth-v101); +v104="height" in v99?v99.height|0:(v2.framebufferHeight-v102); +if(!(v103>=0&&v104>=0))g18.commandRaise(g100,g19); +v1.scissor(v101,v102,v103,v104); +v41[0]=v101; +v41[1]=v102; +v41[2]=v103; +v41[3]=v104; +if(g105){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g105; +if(g106){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=g106; +v107=v5.profile; +if(v107){ +v108=performance.now(); +g52.count++; +} +v1.useProgram(g109.program); +v110=v14.angle_instanced_arrays; +v11.setVAO(null); +v111=a0["positionBuffer"]; +v53.buffer=v111; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g112,g19); +v113=false; +v114=1; +v115=0; +v116=0; +v117=0; +v118=0; +v119=null; +v120=0; +v121=false; +v122=5126; +v123=0; +v124=0; +v125=0; +if(v16(v53)){ +v113=true; +v119=v8.createStream(34962,v53); +v122=v119.dtype; +} +else{ +v119=v8.getBuffer(v53); +if(v119){ +v122=v119.dtype; +} +else if("constant" in v53){ +v114=2; +if(typeof v53.constant === "number"){ +v115=v53.constant; +v116=v117=v118=0; +} +else{ +v115=v53.constant.length>0?v53.constant[0]:0; +v116=v53.constant.length>1?v53.constant[1]:0; +v117=v53.constant.length>2?v53.constant[2]:0; +v118=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v119=v8.createStream(34962,v53.buffer); +} +else{ +v119=v8.getBuffer(v53.buffer); +} +v122="type" in v53?v49[v53.type]:v119.dtype; +v121=!!v53.normalized; +v120=v53.size|0; +v123=v53.offset|0; +v124=v53.stride|0; +v125=v53.divisor|0; +} +} +v127=g126.location; +v128=v10[v127]; +if(v114===1){ +if(!v128.buffer){ +v1.enableVertexAttribArray(v127); +} +v129=v120||2; +if(v128.type!==v122||v128.size!==v129||v128.buffer!==v119||v128.normalized!==v121||v128.offset!==v123||v128.stride!==v124){ +v1.bindBuffer(34962,v119.buffer); +v1.vertexAttribPointer(v127,v129,v122,v121,v124,v123); +v128.type=v122; +v128.size=v129; +v128.buffer=v119; +v128.normalized=v121; +v128.offset=v123; +v128.stride=v124; +} +if(v128.divisor!==v125){ +v110.vertexAttribDivisorANGLE(v127,v125); +v128.divisor=v125; +} +} +else{ +if(v128.buffer){ +v1.disableVertexAttribArray(v127); +v128.buffer=null; +} +if(v128.x!==v115||v128.y!==v116||v128.z!==v117||v128.w!==v118){ +v1.vertexAttrib4f(v127,v115,v116,v117,v118); +v128.x=v115; +v128.y=v116; +v128.z=v117; +v128.w=v118; +} +} +v130=a0["positionFractBuffer"]; +v54.buffer=v130; +if(!(v54&&(typeof v54==="object"||typeof v54==="function")&&(v16(v54)||v8.getBuffer(v54)||v8.getBuffer(v54.buffer)||v16(v54.buffer)||("constant" in v54&&(typeof v54.constant==="number"||v17(v54.constant))))))g18.commandRaise(g131,g19); +v132=false; +v133=1; +v134=0; +v135=0; +v136=0; +v137=0; +v138=null; +v139=0; +v140=false; +v141=5126; +v142=0; +v143=0; +v144=0; +if(v16(v54)){ +v132=true; +v138=v8.createStream(34962,v54); +v141=v138.dtype; +} +else{ +v138=v8.getBuffer(v54); +if(v138){ +v141=v138.dtype; +} +else if("constant" in v54){ +v133=2; +if(typeof v54.constant === "number"){ +v134=v54.constant; +v135=v136=v137=0; +} +else{ +v134=v54.constant.length>0?v54.constant[0]:0; +v135=v54.constant.length>1?v54.constant[1]:0; +v136=v54.constant.length>2?v54.constant[2]:0; +v137=v54.constant.length>3?v54.constant[3]:0; +} +} +else{ +if(v16(v54.buffer)){ +v138=v8.createStream(34962,v54.buffer); +} +else{ +v138=v8.getBuffer(v54.buffer); +} +v141="type" in v54?v49[v54.type]:v138.dtype; +v140=!!v54.normalized; +v139=v54.size|0; +v142=v54.offset|0; +v143=v54.stride|0; +v144=v54.divisor|0; +} +} +v146=g145.location; +v147=v10[v146]; +if(v133===1){ +if(!v147.buffer){ +v1.enableVertexAttribArray(v146); +} +v148=v139||2; +if(v147.type!==v141||v147.size!==v148||v147.buffer!==v138||v147.normalized!==v140||v147.offset!==v142||v147.stride!==v143){ +v1.bindBuffer(34962,v138.buffer); +v1.vertexAttribPointer(v146,v148,v141,v140,v143,v142); +v147.type=v141; +v147.size=v148; +v147.buffer=v138; +v147.normalized=v140; +v147.offset=v142; +v147.stride=v143; +} +if(v147.divisor!==v144){ +v110.vertexAttribDivisorANGLE(v146,v144); +v147.divisor=v144; +} +} +else{ +if(v147.buffer){ +v1.disableVertexAttribArray(v146); +v147.buffer=null; +} +if(v147.x!==v134||v147.y!==v135||v147.z!==v136||v147.w!==v137){ +v1.vertexAttrib4f(v146,v134,v135,v136,v137); +v147.x=v134; +v147.y=v135; +v147.z=v136; +v147.w=v137; +} +} +v150=a0["fill"]; +if(!(v17(v150)&&v150.length===4))g18.commandRaise(g151,g19); +v152=v150[0]; +v153=v150[1]; +v154=v150[2]; +v155=v150[3]; +v1.uniform4f(g149.location,v152,v153,v154,v155); +v157=a0["id"]; +if(!(typeof v157==="number"))g18.commandRaise(g158,g19); +v1.uniform1f(g156.location,v157); +v160=a0["opacity"]; +if(!(typeof v160==="number"))g18.commandRaise(g161,g19); +v1.uniform1f(g159.location,v160); +v163=a0["scale"]; +if(!(v17(v163)&&v163.length===2))g18.commandRaise(g164,g19); +v165=v163[0]; +v166=v163[1]; +v1.uniform2f(g162.location,v165,v166); +v168=a0["scaleFract"]; +if(!(v17(v168)&&v168.length===2))g18.commandRaise(g169,g19); +v170=v168[0]; +v171=v168[1]; +v1.uniform2f(g167.location,v170,v171); +v173=a0["translate"]; +if(!(v17(v173)&&v173.length===2))g18.commandRaise(g174,g19); +v175=v173[0]; +v176=v173[1]; +v1.uniform2f(g172.location,v175,v176); +v178=a0["translateFract"]; +if(!(v17(v178)&&v178.length===2))g18.commandRaise(g179,g19); +v180=v178[0]; +v181=v178[1]; +v1.uniform2f(g177.location,v180,v181); +v183=g182.call(this,v2,a0,0); +v184=null; +v185=v16(v183); +if(v185){ +v184=v7.createStream(v183); +} +else{ +v184=v7.getElements(v183); +if(!(!v183||v184))g18.commandRaise(g186,g19); +} +if(v184)v1.bindBuffer(34963,v184.buffer.buffer); +v187=v184?v184.vertCount:-1; +if(!(v187>=0))g18.commandRaise(g188,g19); +if(v187){ +v189=v6.instances; +if(v189>0){ +if(v184){ +v110.drawElementsInstancedANGLE(4,v187,v184.type,0<<((v184.type-5121)>>1),v189); +} +else{ +v110.drawArraysInstancedANGLE(4,0,v187,v189); +} +} +else if(v189<0){ +if(v184){ +v1.drawElements(4,v187,v184.type,0<<((v184.type-5121)>>1)); +} +else{ +v1.drawArrays(4,0,v187); +} +} +v5.dirty=true; +v11.setVAO(null); +v2.viewportWidth=v95; +v2.viewportHeight=v96; +if(v107){ +g52.cpuTime+=performance.now()-v108; +} +if(v113){ +v8.destroyStream(v119); +} +if(v132){ +v8.destroyStream(v138); +} +if(v185){ +v7.destroyStream(v184); +} +} +} +,"scope":function(a0,a1,a2){ +var v190,v191,v192,v193,v194,v195,v196,v197,v198,v199,v200,v202,v204,v206,v208,v210,v212,v214,v216,v218,v220,v222,v224,v225,v226,v227,v228,v229,v230,v231,v232,v233,v235,v237,v238,v239,v240,v241,v242,v243,v245,v246,v247,v249,v250,v252,v253,v255,v256,v258,v259,v261,v262,v264,v265,v267,v268,v270,v271,v273,v275,v277,v278,v279,v280,v281,v282,v283,v284,v285,v286,v287,v288,v289,v290,v291,v293,v294,v295,v296,v297,v298,v299,v300,v301,v302,v303,v304,v305,v306,v307,v308,v309,v310,v311,v312,v313,v314,v315,v316,v317,v318,v320,v321,v322,v323,v324,v325,v326,v327,v328,v329,v330,v331,v333,v335; +v190=a0["viewport"]; +if(!(v190&&typeof v190==="object"))g18.commandRaise(g90,g19); +v191=v190.x|0; +v192=v190.y|0; +v193="width" in v190?v190.width|0:(v2.framebufferWidth-v191); +v194="height" in v190?v190.height|0:(v2.framebufferHeight-v192); +if(!(v193>=0&&v194>=0))g18.commandRaise(g90,g19); +v195=v2.viewportWidth; +v2.viewportWidth=v193; +v196=v2.viewportHeight; +v2.viewportHeight=v194; +v197=v42[0]; +v42[0]=v191; +v198=v42[1]; +v42[1]=v192; +v199=v42[2]; +v42[2]=v193; +v200=v42[3]; +v42[3]=v194; +v202=v20[0]; +v20[0]=g201; +v204=v20[1]; +v20[1]=g203; +v206=v20[2]; +v20[2]=g205; +v208=v20[3]; +v20[3]=g207; +v210=v4.blend_enable; +v4.blend_enable=g209; +v212=v22[0]; +v22[0]=g211; +v214=v22[1]; +v22[1]=g213; +v216=v24[0]; +v24[0]=g215; +v218=v24[1]; +v24[1]=g217; +v220=v24[2]; +v24[2]=g219; +v222=v24[3]; +v24[3]=g221; +v224=v4.depth_enable; +v4.depth_enable=g223; +v225=a0["viewport"]; +if(!(v225&&typeof v225==="object"))g18.commandRaise(g100,g19); +v226=v225.x|0; +v227=v225.y|0; +v228="width" in v225?v225.width|0:(v2.framebufferWidth-v226); +v229="height" in v225?v225.height|0:(v2.framebufferHeight-v227); +if(!(v228>=0&&v229>=0))g18.commandRaise(g100,g19); +v230=v40[0]; +v40[0]=v226; +v231=v40[1]; +v40[1]=v227; +v232=v40[2]; +v40[2]=v228; +v233=v40[3]; +v40[3]=v229; +v235=v4.scissor_enable; +v4.scissor_enable=g234; +v237=v4.stencil_enable; +v4.stencil_enable=g236; +v238=v5.profile; +if(v238){ +v239=performance.now(); +g52.count++; +} +v240=g182.call(this,v2,a0,a2); +v241=null; +v242=v16(v240); +if(v242){ +v241=v7.createStream(v240); +} +else{ +v241=v7.getElements(v240); +if(!(!v240||v241))g18.commandRaise(g186,g19); +} +v243=v6.elements; +v6.elements=v241; +v245=v6.offset; +v6.offset=g244; +v246=v241?v241.vertCount:-1; +v247=v6.count; +v6.count=v246; +v249=v6.primitive; +v6.primitive=g248; +v250=a0["scale"]; +v252=v12[g251]; +v12[g251]=v250; +v253=a0["fill"]; +v255=v12[g254]; +v12[g254]=v253; +v256=a0["scaleFract"]; +v258=v12[g257]; +v12[g257]=v256; +v259=a0["translateFract"]; +v261=v12[g260]; +v12[g260]=v259; +v262=a0["translate"]; +v264=v12[g263]; +v12[g263]=v262; +v265=a0["opacity"]; +v267=v12[g266]; +v12[g266]=v265; +v268=v2["pixelRatio"]; +v270=v12[g269]; +v12[g269]=v268; +v271=a0["id"]; +v273=v12[g272]; +v12[g272]=v271; +v275=g274.call(this,v2,a0,a2); +v277=v12[g276]; +v12[g276]=v275; +v278=a0["positionBuffer"]; +v53.buffer=v278; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g112,g19); +v279=false; +v280=1; +v281=0; +v282=0; +v283=0; +v284=0; +v285=null; +v286=0; +v287=false; +v288=5126; +v289=0; +v290=0; +v291=0; +if(v16(v53)){ +v279=true; +v285=v8.createStream(34962,v53); +v288=v285.dtype; +} +else{ +v285=v8.getBuffer(v53); +if(v285){ +v288=v285.dtype; +} +else if("constant" in v53){ +v280=2; +if(typeof v53.constant === "number"){ +v281=v53.constant; +v282=v283=v284=0; +} +else{ +v281=v53.constant.length>0?v53.constant[0]:0; +v282=v53.constant.length>1?v53.constant[1]:0; +v283=v53.constant.length>2?v53.constant[2]:0; +v284=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v285=v8.createStream(34962,v53.buffer); +} +else{ +v285=v8.getBuffer(v53.buffer); +} +v288="type" in v53?v49[v53.type]:v285.dtype; +v287=!!v53.normalized; +v286=v53.size|0; +v289=v53.offset|0; +v290=v53.stride|0; +v291=v53.divisor|0; +} +} +v293=g292.state; +g292.state=v280; +v294=g292.x; +g292.x=v281; +v295=g292.y; +g292.y=v282; +v296=g292.z; +g292.z=v283; +v297=g292.w; +g292.w=v284; +v298=g292.buffer; +g292.buffer=v285; +v299=g292.size; +g292.size=v286; +v300=g292.normalized; +g292.normalized=v287; +v301=g292.type; +g292.type=v288; +v302=g292.offset; +g292.offset=v289; +v303=g292.stride; +g292.stride=v290; +v304=g292.divisor; +g292.divisor=v291; +v305=a0["positionFractBuffer"]; +v54.buffer=v305; +if(!(v54&&(typeof v54==="object"||typeof v54==="function")&&(v16(v54)||v8.getBuffer(v54)||v8.getBuffer(v54.buffer)||v16(v54.buffer)||("constant" in v54&&(typeof v54.constant==="number"||v17(v54.constant))))))g18.commandRaise(g131,g19); +v306=false; +v307=1; +v308=0; +v309=0; +v310=0; +v311=0; +v312=null; +v313=0; +v314=false; +v315=5126; +v316=0; +v317=0; +v318=0; +if(v16(v54)){ +v306=true; +v312=v8.createStream(34962,v54); +v315=v312.dtype; +} +else{ +v312=v8.getBuffer(v54); +if(v312){ +v315=v312.dtype; +} +else if("constant" in v54){ +v307=2; +if(typeof v54.constant === "number"){ +v308=v54.constant; +v309=v310=v311=0; +} +else{ +v308=v54.constant.length>0?v54.constant[0]:0; +v309=v54.constant.length>1?v54.constant[1]:0; +v310=v54.constant.length>2?v54.constant[2]:0; +v311=v54.constant.length>3?v54.constant[3]:0; +} +} +else{ +if(v16(v54.buffer)){ +v312=v8.createStream(34962,v54.buffer); +} +else{ +v312=v8.getBuffer(v54.buffer); +} +v315="type" in v54?v49[v54.type]:v312.dtype; +v314=!!v54.normalized; +v313=v54.size|0; +v316=v54.offset|0; +v317=v54.stride|0; +v318=v54.divisor|0; +} +} +v320=g319.state; +g319.state=v307; +v321=g319.x; +g319.x=v308; +v322=g319.y; +g319.y=v309; +v323=g319.z; +g319.z=v310; +v324=g319.w; +g319.w=v311; +v325=g319.buffer; +g319.buffer=v312; +v326=g319.size; +g319.size=v313; +v327=g319.normalized; +g319.normalized=v314; +v328=g319.type; +g319.type=v315; +v329=g319.offset; +g319.offset=v316; +v330=g319.stride; +g319.stride=v317; +v331=g319.divisor; +g319.divisor=v318; +v333=v9.vert; +v9.vert=g332; +v335=v9.frag; +v9.frag=g334; +v5.dirty=true; +a1(v2,a0,a2); +v2.viewportWidth=v195; +v2.viewportHeight=v196; +v42[0]=v197; +v42[1]=v198; +v42[2]=v199; +v42[3]=v200; +v20[0]=v202; +v20[1]=v204; +v20[2]=v206; +v20[3]=v208; +v4.blend_enable=v210; +v22[0]=v212; +v22[1]=v214; +v24[0]=v216; +v24[1]=v218; +v24[2]=v220; +v24[3]=v222; +v4.depth_enable=v224; +v40[0]=v230; +v40[1]=v231; +v40[2]=v232; +v40[3]=v233; +v4.scissor_enable=v235; +v4.stencil_enable=v237; +if(v238){ +g52.cpuTime+=performance.now()-v239; +} +if(v242){ +v7.destroyStream(v241); +} +v6.elements=v243; +v6.offset=v245; +v6.count=v247; +v6.primitive=v249; +v12[g251]=v252; +v12[g254]=v255; +v12[g257]=v258; +v12[g260]=v261; +v12[g263]=v264; +v12[g266]=v267; +v12[g269]=v270; +v12[g272]=v273; +v12[g276]=v277; +if(v279){ +v8.destroyStream(v285); +} +g292.state=v293; +g292.x=v294; +g292.y=v295; +g292.z=v296; +g292.w=v297; +g292.buffer=v298; +g292.size=v299; +g292.normalized=v300; +g292.type=v301; +g292.offset=v302; +g292.stride=v303; +g292.divisor=v304; +if(v306){ +v8.destroyStream(v312); +} +g319.state=v320; +g319.x=v321; +g319.y=v322; +g319.z=v323; +g319.w=v324; +g319.buffer=v325; +g319.size=v326; +g319.normalized=v327; +g319.type=v328; +g319.offset=v329; +g319.stride=v330; +g319.divisor=v331; +v9.vert=v333; +v9.frag=v335; +v5.dirty=true; +} +,"batch":function(a0,a1){ +var v336,v337,v374,v375,v376,v377,v378; +v336=v14.angle_instanced_arrays; +v337=v13.next; +if(v337!==v13.cur){ +if(v337){ +v1.bindFramebuffer(36160,v337.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v337; +} +if(v5.dirty){ +var v338,v339,v340,v341,v342,v343,v344,v345,v346,v347,v348,v349,v350,v351,v352,v353,v354,v355,v356,v357,v358,v359,v360,v361,v362,v363,v364,v365,v366,v367,v368,v369; +v338=v4.dither; +if(v338!==v5.dither){ +if(v338){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v338; +} +v339=v4.depth_func; +if(v339!==v5.depth_func){ +v1.depthFunc(v339); +v5.depth_func=v339; +} +v340=v26[0]; +v341=v26[1]; +if(v340!==v27[0]||v341!==v27[1]){ +v1.depthRange(v340,v341); +v27[0]=v340; +v27[1]=v341; +} +v342=v4.depth_mask; +if(v342!==v5.depth_mask){ +v1.depthMask(v342); +v5.depth_mask=v342; +} +v343=v28[0]; +v344=v28[1]; +v345=v28[2]; +v346=v28[3]; +if(v343!==v29[0]||v344!==v29[1]||v345!==v29[2]||v346!==v29[3]){ +v1.colorMask(v343,v344,v345,v346); +v29[0]=v343; +v29[1]=v344; +v29[2]=v345; +v29[3]=v346; +} +v347=v4.cull_enable; +if(v347!==v5.cull_enable){ +if(v347){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v347; +} +v348=v4.cull_face; +if(v348!==v5.cull_face){ +v1.cullFace(v348); +v5.cull_face=v348; +} +v349=v4.frontFace; +if(v349!==v5.frontFace){ +v1.frontFace(v349); +v5.frontFace=v349; +} +v350=v4.lineWidth; +if(v350!==v5.lineWidth){ +v1.lineWidth(v350); +v5.lineWidth=v350; +} +v351=v4.polygonOffset_enable; +if(v351!==v5.polygonOffset_enable){ +if(v351){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v351; +} +v352=v30[0]; +v353=v30[1]; +if(v352!==v31[0]||v353!==v31[1]){ +v1.polygonOffset(v352,v353); +v31[0]=v352; +v31[1]=v353; +} +v354=v4.sample_alpha; +if(v354!==v5.sample_alpha){ +if(v354){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v354; +} +v355=v4.sample_enable; +if(v355!==v5.sample_enable){ +if(v355){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v355; +} +v356=v32[0]; +v357=v32[1]; +if(v356!==v33[0]||v357!==v33[1]){ +v1.sampleCoverage(v356,v357); +v33[0]=v356; +v33[1]=v357; +} +v358=v4.stencil_mask; +if(v358!==v5.stencil_mask){ +v1.stencilMask(v358); +v5.stencil_mask=v358; +} +v359=v34[0]; +v360=v34[1]; +v361=v34[2]; +if(v359!==v35[0]||v360!==v35[1]||v361!==v35[2]){ +v1.stencilFunc(v359,v360,v361); +v35[0]=v359; +v35[1]=v360; +v35[2]=v361; +} +v362=v36[0]; +v363=v36[1]; +v364=v36[2]; +v365=v36[3]; +if(v362!==v37[0]||v363!==v37[1]||v364!==v37[2]||v365!==v37[3]){ +v1.stencilOpSeparate(v362,v363,v364,v365); +v37[0]=v362; +v37[1]=v363; +v37[2]=v364; +v37[3]=v365; +} +v366=v38[0]; +v367=v38[1]; +v368=v38[2]; +v369=v38[3]; +if(v366!==v39[0]||v367!==v39[1]||v368!==v39[2]||v369!==v39[3]){ +v1.stencilOpSeparate(v366,v367,v368,v369); +v39[0]=v366; +v39[1]=v367; +v39[2]=v368; +v39[3]=v369; +} +} +v1.blendColor(0,0,0,0); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=0; +if(g370){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g370; +v1.blendEquationSeparate(32774,32774); +v23[0]=32774; +v23[1]=32774; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +if(g371){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=g371; +if(g372){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g372; +if(g373){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=g373; +v374=v5.profile; +if(v374){ +v375=performance.now(); +g52.count+=a1; +} +v1.useProgram(g109.program); +v376=v14.angle_instanced_arrays; +var v462; +v11.setVAO(null); +v462=v6.instances; +for(v377=0; +v377=0&&v383>=0))g18.commandRaise(g90,g19); +v384=v2.viewportWidth; +v2.viewportWidth=v382; +v385=v2.viewportHeight; +v2.viewportHeight=v383; +v1.viewport(v380,v381,v382,v383); +v43[0]=v380; +v43[1]=v381; +v43[2]=v382; +v43[3]=v383; +v386=v378["viewport"]; +if(!(v386&&typeof v386==="object"))g18.commandRaise(g100,g19); +v387=v386.x|0; +v388=v386.y|0; +v389="width" in v386?v386.width|0:(v2.framebufferWidth-v387); +v390="height" in v386?v386.height|0:(v2.framebufferHeight-v388); +if(!(v389>=0&&v390>=0))g18.commandRaise(g100,g19); +v1.scissor(v387,v388,v389,v390); +v41[0]=v387; +v41[1]=v388; +v41[2]=v389; +v41[3]=v390; +v391=v378["positionBuffer"]; +v53.buffer=v391; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g112,g19); +v392=false; +v393=1; +v394=0; +v395=0; +v396=0; +v397=0; +v398=null; +v399=0; +v400=false; +v401=5126; +v402=0; +v403=0; +v404=0; +if(v16(v53)){ +v392=true; +v398=v8.createStream(34962,v53); +v401=v398.dtype; +} +else{ +v398=v8.getBuffer(v53); +if(v398){ +v401=v398.dtype; +} +else if("constant" in v53){ +v393=2; +if(typeof v53.constant === "number"){ +v394=v53.constant; +v395=v396=v397=0; +} +else{ +v394=v53.constant.length>0?v53.constant[0]:0; +v395=v53.constant.length>1?v53.constant[1]:0; +v396=v53.constant.length>2?v53.constant[2]:0; +v397=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v398=v8.createStream(34962,v53.buffer); +} +else{ +v398=v8.getBuffer(v53.buffer); +} +v401="type" in v53?v49[v53.type]:v398.dtype; +v400=!!v53.normalized; +v399=v53.size|0; +v402=v53.offset|0; +v403=v53.stride|0; +v404=v53.divisor|0; +} +} +v405=g126.location; +v406=v10[v405]; +if(v393===1){ +if(!v406.buffer){ +v1.enableVertexAttribArray(v405); +} +v407=v399||2; +if(v406.type!==v401||v406.size!==v407||v406.buffer!==v398||v406.normalized!==v400||v406.offset!==v402||v406.stride!==v403){ +v1.bindBuffer(34962,v398.buffer); +v1.vertexAttribPointer(v405,v407,v401,v400,v403,v402); +v406.type=v401; +v406.size=v407; +v406.buffer=v398; +v406.normalized=v400; +v406.offset=v402; +v406.stride=v403; +} +if(v406.divisor!==v404){ +v376.vertexAttribDivisorANGLE(v405,v404); +v406.divisor=v404; +} +} +else{ +if(v406.buffer){ +v1.disableVertexAttribArray(v405); +v406.buffer=null; +} +if(v406.x!==v394||v406.y!==v395||v406.z!==v396||v406.w!==v397){ +v1.vertexAttrib4f(v405,v394,v395,v396,v397); +v406.x=v394; +v406.y=v395; +v406.z=v396; +v406.w=v397; +} +} +v408=v378["positionFractBuffer"]; +v54.buffer=v408; +if(!(v54&&(typeof v54==="object"||typeof v54==="function")&&(v16(v54)||v8.getBuffer(v54)||v8.getBuffer(v54.buffer)||v16(v54.buffer)||("constant" in v54&&(typeof v54.constant==="number"||v17(v54.constant))))))g18.commandRaise(g131,g19); +v409=false; +v410=1; +v411=0; +v412=0; +v413=0; +v414=0; +v415=null; +v416=0; +v417=false; +v418=5126; +v419=0; +v420=0; +v421=0; +if(v16(v54)){ +v409=true; +v415=v8.createStream(34962,v54); +v418=v415.dtype; +} +else{ +v415=v8.getBuffer(v54); +if(v415){ +v418=v415.dtype; +} +else if("constant" in v54){ +v410=2; +if(typeof v54.constant === "number"){ +v411=v54.constant; +v412=v413=v414=0; +} +else{ +v411=v54.constant.length>0?v54.constant[0]:0; +v412=v54.constant.length>1?v54.constant[1]:0; +v413=v54.constant.length>2?v54.constant[2]:0; +v414=v54.constant.length>3?v54.constant[3]:0; +} +} +else{ +if(v16(v54.buffer)){ +v415=v8.createStream(34962,v54.buffer); +} +else{ +v415=v8.getBuffer(v54.buffer); +} +v418="type" in v54?v49[v54.type]:v415.dtype; +v417=!!v54.normalized; +v416=v54.size|0; +v419=v54.offset|0; +v420=v54.stride|0; +v421=v54.divisor|0; +} +} +v422=g145.location; +v423=v10[v422]; +if(v410===1){ +if(!v423.buffer){ +v1.enableVertexAttribArray(v422); +} +v424=v416||2; +if(v423.type!==v418||v423.size!==v424||v423.buffer!==v415||v423.normalized!==v417||v423.offset!==v419||v423.stride!==v420){ +v1.bindBuffer(34962,v415.buffer); +v1.vertexAttribPointer(v422,v424,v418,v417,v420,v419); +v423.type=v418; +v423.size=v424; +v423.buffer=v415; +v423.normalized=v417; +v423.offset=v419; +v423.stride=v420; +} +if(v423.divisor!==v421){ +v376.vertexAttribDivisorANGLE(v422,v421); +v423.divisor=v421; +} +} +else{ +if(v423.buffer){ +v1.disableVertexAttribArray(v422); +v423.buffer=null; +} +if(v423.x!==v411||v423.y!==v412||v423.z!==v413||v423.w!==v414){ +v1.vertexAttrib4f(v422,v411,v412,v413,v414); +v423.x=v411; +v423.y=v412; +v423.z=v413; +v423.w=v414; +} +} +v425=v378["fill"]; +if(!(v17(v425)&&v425.length===4))g18.commandRaise(g151,g19); +v426=v425[0]; +v428=v425[1]; +v430=v425[2]; +v432=v425[3]; +if(!v377||v427!==v426||v429!==v428||v431!==v430||v433!==v432){ +v427=v426; +v429=v428; +v431=v430; +v433=v432; +v1.uniform4f(g149.location,v426,v428,v430,v432); +} +v434=v378["id"]; +if(!(typeof v434==="number"))g18.commandRaise(g158,g19); +if(!v377||v435!==v434){ +v435=v434; +v1.uniform1f(g156.location,v434); +} +v436=v378["opacity"]; +if(!(typeof v436==="number"))g18.commandRaise(g161,g19); +if(!v377||v437!==v436){ +v437=v436; +v1.uniform1f(g159.location,v436); +} +v438=v378["scale"]; +if(!(v17(v438)&&v438.length===2))g18.commandRaise(g164,g19); +v439=v438[0]; +v441=v438[1]; +if(!v377||v440!==v439||v442!==v441){ +v440=v439; +v442=v441; +v1.uniform2f(g162.location,v439,v441); +} +v443=v378["scaleFract"]; +if(!(v17(v443)&&v443.length===2))g18.commandRaise(g169,g19); +v444=v443[0]; +v446=v443[1]; +if(!v377||v445!==v444||v447!==v446){ +v445=v444; +v447=v446; +v1.uniform2f(g167.location,v444,v446); +} +v448=v378["translate"]; +if(!(v17(v448)&&v448.length===2))g18.commandRaise(g174,g19); +v449=v448[0]; +v451=v448[1]; +if(!v377||v450!==v449||v452!==v451){ +v450=v449; +v452=v451; +v1.uniform2f(g172.location,v449,v451); +} +v453=v378["translateFract"]; +if(!(v17(v453)&&v453.length===2))g18.commandRaise(g179,g19); +v454=v453[0]; +v456=v453[1]; +if(!v377||v455!==v454||v457!==v456){ +v455=v454; +v457=v456; +v1.uniform2f(g177.location,v454,v456); +} +v458=g182.call(this,v2,v378,v377); +v459=null; +v460=v16(v458); +if(v460){ +v459=v7.createStream(v458); +} +else{ +v459=v7.getElements(v458); +if(!(!v458||v459))g18.commandRaise(g186,g19); +} +if(v459)v1.bindBuffer(34963,v459.buffer.buffer); +v461=v459?v459.vertCount:-1; +if(!(v461>=0))g18.commandRaise(g188,g19); +if(v461){ +if(v462>0){ +if(v459){ +v376.drawElementsInstancedANGLE(4,v461,v459.type,0<<((v459.type-5121)>>1),v462); +} +else{ +v376.drawArraysInstancedANGLE(4,0,v461,v462); +} +} +else if(v462<0){ +if(v459){ +v1.drawElements(4,v461,v459.type,0<<((v459.type-5121)>>1)); +} +else{ +v1.drawArrays(4,0,v461); +} +} +v2.viewportWidth=v384; +v2.viewportHeight=v385; +if(v392){ +v8.destroyStream(v398); +} +if(v409){ +v8.destroyStream(v415); +} +if(v460){ +v7.destroyStream(v459); +} +} +} +v5.dirty=true; +v11.setVAO(null); +if(v374){ +g52.cpuTime+=performance.now()-v375; +} +} +,} + +} \ No newline at end of file diff --git a/src/generated/regl-codegen/13c0ae156483f2bcbd7ff29404f0abfd8689ff43f41791a6c7469868690a4260 b/src/generated/regl-codegen/13c0ae156483f2bcbd7ff29404f0abfd8689ff43f41791a6c7469868690a4260 new file mode 100644 index 00000000000..d671018df2b --- /dev/null +++ b/src/generated/regl-codegen/13c0ae156483f2bcbd7ff29404f0abfd8689ff43f41791a6c7469868690a4260 @@ -0,0 +1,3391 @@ +module.exports = function anonymous(g0,g18,g19,g52,g90,g97,g98,g100,g105,g106,g109,g111,g113,g127,g131,g133,g147,g151,g153,g167,g171,g173,g187,g191,g193,g207,g211,g213,g227,g231,g233,g247,g251,g253,g267,g271,g273,g287,g291,g292,g294,g296,g298,g299,g300,g302,g305,g306,g307,g309,g310,g312,g315,g317,g320,g322,g325,g327,g333,g335,g337,g350,g352,g354,g356,g358,g360,g362,g364,g366,g368,g379,g381,g393,g395,g397,g398,g401,g404,g407,g410,g413,g416,g419,g422,g438,g465,g492,g519,g546,g573,g600,g627,g654,g667,g669,g707,g708,g709,g710 +) { +"use strict"; +var v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51; +v1=g0.gl; +v2=g0.context; +v3=g0.strings; +v4=g0.next; +v5=g0.current; +v6=g0.draw; +v7=g0.elements; +v8=g0.buffer; +v9=g0.shader; +v10=g0.attributes; +v11=g0.vao; +v12=g0.uniforms; +v13=g0.framebuffer; +v14=g0.extensions; +v15=g0.timer; +v16=g0.isBufferArgs; +v17=g0.isArrayLike; +v20=v4.blend_color; +v21=v5.blend_color; +v22=v4.blend_equation; +v23=v5.blend_equation; +v24=v4.blend_func; +v25=v5.blend_func; +v26=v4.depth_range; +v27=v5.depth_range; +v28=v4.colorMask; +v29=v5.colorMask; +v30=v4.polygonOffset_offset; +v31=v5.polygonOffset_offset; +v32=v4.sample_coverage; +v33=v5.sample_coverage; +v34=v4.stencil_func; +v35=v5.stencil_func; +v36=v4.stencil_opFront; +v37=v5.stencil_opFront; +v38=v4.stencil_opBack; +v39=v5.stencil_opBack; +v40=v4.scissor_box; +v41=v5.scissor_box; +v42=v4.viewport; +v43=v5.viewport; +v44={ +"points":0,"point":0,"lines":1,"line":1,"triangles":4,"triangle":4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6} +; +v45={ +"never":512,"less":513,"<":513,"equal":514,"=":514,"==":514,"===":514,"lequal":515,"<=":515,"greater":516,">":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +return { +"draw":function(a0){ +var v53,v54,v89,v91,v92,v93,v94,v95,v96,v99,v101,v102,v103,v104,v107,v108,v110,v112,v114,v115,v116,v117,v118,v119,v120,v121,v122,v123,v124,v125,v126,v128,v129,v130,v132,v134,v135,v136,v137,v138,v139,v140,v141,v142,v143,v144,v145,v146,v148,v149,v150,v152,v154,v155,v156,v157,v158,v159,v160,v161,v162,v163,v164,v165,v166,v168,v169,v170,v172,v174,v175,v176,v177,v178,v179,v180,v181,v182,v183,v184,v185,v186,v188,v189,v190,v192,v194,v195,v196,v197,v198,v199,v200,v201,v202,v203,v204,v205,v206,v208,v209,v210,v212,v214,v215,v216,v217,v218,v219,v220,v221,v222,v223,v224,v225,v226,v228,v229,v230,v232,v234,v235,v236,v237,v238,v239,v240,v241,v242,v243,v244,v245,v246,v248,v249,v250,v252,v254,v255,v256,v257,v258,v259,v260,v261,v262,v263,v264,v265,v266,v268,v269,v270,v272,v274,v275,v276,v277,v278,v279,v280,v281,v282,v283,v284,v285,v286,v288,v289,v290,v293,v295,v297,v301,v303,v304,v308,v311,v313,v314,v316,v318,v319,v321,v323,v324,v326,v328,v329,v330,v331,v332,v334,v336,v338; +v53=v14.angle_instanced_arrays; +v54=v13.next; +if(v54!==v13.cur){ +if(v54){ +v1.bindFramebuffer(36160,v54.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v54; +} +if(v5.dirty){ +var v55,v56,v57,v58,v59,v60,v61,v62,v63,v64,v65,v66,v67,v68,v69,v70,v71,v72,v73,v74,v75,v76,v77,v78,v79,v80,v81,v82,v83,v84,v85,v86,v87,v88; +v55=v4.dither; +if(v55!==v5.dither){ +if(v55){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v55; +} +v56=v22[0]; +v57=v22[1]; +if(v56!==v23[0]||v57!==v23[1]){ +v1.blendEquationSeparate(v56,v57); +v23[0]=v56; +v23[1]=v57; +} +v58=v4.depth_func; +if(v58!==v5.depth_func){ +v1.depthFunc(v58); +v5.depth_func=v58; +} +v59=v26[0]; +v60=v26[1]; +if(v59!==v27[0]||v60!==v27[1]){ +v1.depthRange(v59,v60); +v27[0]=v59; +v27[1]=v60; +} +v61=v4.depth_mask; +if(v61!==v5.depth_mask){ +v1.depthMask(v61); +v5.depth_mask=v61; +} +v62=v28[0]; +v63=v28[1]; +v64=v28[2]; +v65=v28[3]; +if(v62!==v29[0]||v63!==v29[1]||v64!==v29[2]||v65!==v29[3]){ +v1.colorMask(v62,v63,v64,v65); +v29[0]=v62; +v29[1]=v63; +v29[2]=v64; +v29[3]=v65; +} +v66=v4.cull_enable; +if(v66!==v5.cull_enable){ +if(v66){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v66; +} +v67=v4.cull_face; +if(v67!==v5.cull_face){ +v1.cullFace(v67); +v5.cull_face=v67; +} +v68=v4.frontFace; +if(v68!==v5.frontFace){ +v1.frontFace(v68); +v5.frontFace=v68; +} +v69=v4.lineWidth; +if(v69!==v5.lineWidth){ +v1.lineWidth(v69); +v5.lineWidth=v69; +} +v70=v4.polygonOffset_enable; +if(v70!==v5.polygonOffset_enable){ +if(v70){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v70; +} +v71=v30[0]; +v72=v30[1]; +if(v71!==v31[0]||v72!==v31[1]){ +v1.polygonOffset(v71,v72); +v31[0]=v71; +v31[1]=v72; +} +v73=v4.sample_alpha; +if(v73!==v5.sample_alpha){ +if(v73){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v73; +} +v74=v4.sample_enable; +if(v74!==v5.sample_enable){ +if(v74){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v74; +} +v75=v32[0]; +v76=v32[1]; +if(v75!==v33[0]||v76!==v33[1]){ +v1.sampleCoverage(v75,v76); +v33[0]=v75; +v33[1]=v76; +} +v77=v4.stencil_mask; +if(v77!==v5.stencil_mask){ +v1.stencilMask(v77); +v5.stencil_mask=v77; +} +v78=v34[0]; +v79=v34[1]; +v80=v34[2]; +if(v78!==v35[0]||v79!==v35[1]||v80!==v35[2]){ +v1.stencilFunc(v78,v79,v80); +v35[0]=v78; +v35[1]=v79; +v35[2]=v80; +} +v81=v36[0]; +v82=v36[1]; +v83=v36[2]; +v84=v36[3]; +if(v81!==v37[0]||v82!==v37[1]||v83!==v37[2]||v84!==v37[3]){ +v1.stencilOpSeparate(v81,v82,v83,v84); +v37[0]=v81; +v37[1]=v82; +v37[2]=v83; +v37[3]=v84; +} +v85=v38[0]; +v86=v38[1]; +v87=v38[2]; +v88=v38[3]; +if(v85!==v39[0]||v86!==v39[1]||v87!==v39[2]||v88!==v39[3]){ +v1.stencilOpSeparate(v85,v86,v87,v88); +v39[0]=v85; +v39[1]=v86; +v39[2]=v87; +v39[3]=v88; +} +} +v89=a0["viewport"]; +if(!(v89&&typeof v89==="object"))g18.commandRaise(g90,g19); +v91=v89.x|0; +v92=v89.y|0; +v93="width" in v89?v89.width|0:(v2.framebufferWidth-v91); +v94="height" in v89?v89.height|0:(v2.framebufferHeight-v92); +if(!(v93>=0&&v94>=0))g18.commandRaise(g90,g19); +v95=v2.viewportWidth; +v2.viewportWidth=v93; +v96=v2.viewportHeight; +v2.viewportHeight=v94; +v1.viewport(v91,v92,v93,v94); +v43[0]=v91; +v43[1]=v92; +v43[2]=v93; +v43[3]=v94; +v1.blendColor(0,0,0,1); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=1; +if(g97){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g97; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +if(g98){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=g98; +v99=a0["viewport"]; +if(!(v99&&typeof v99==="object"))g18.commandRaise(g100,g19); +v101=v99.x|0; +v102=v99.y|0; +v103="width" in v99?v99.width|0:(v2.framebufferWidth-v101); +v104="height" in v99?v99.height|0:(v2.framebufferHeight-v102); +if(!(v103>=0&&v104>=0))g18.commandRaise(g100,g19); +v1.scissor(v101,v102,v103,v104); +v41[0]=v101; +v41[1]=v102; +v41[2]=v103; +v41[3]=v104; +if(g105){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g105; +if(g106){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=g106; +v107=v5.profile; +if(v107){ +v108=performance.now(); +g52.count++; +} +v1.useProgram(g109.program); +v110=v14.angle_instanced_arrays; +v11.setVAO(null); +v112=g111.call(this,v2,a0,0); +if(!(v112&&(typeof v112==="object"||typeof v112==="function")&&(v16(v112)||v8.getBuffer(v112)||v8.getBuffer(v112.buffer)||v16(v112.buffer)||("constant" in v112&&(typeof v112.constant==="number"||v17(v112.constant))))))g18.commandRaise(g113,g19); +v114=false; +v115=1; +v116=0; +v117=0; +v118=0; +v119=0; +v120=null; +v121=0; +v122=false; +v123=5126; +v124=0; +v125=0; +v126=0; +if(v16(v112)){ +v114=true; +v120=v8.createStream(34962,v112); +v123=v120.dtype; +} +else{ +v120=v8.getBuffer(v112); +if(v120){ +v123=v120.dtype; +} +else if("constant" in v112){ +v115=2; +if(typeof v112.constant === "number"){ +v116=v112.constant; +v117=v118=v119=0; +} +else{ +v116=v112.constant.length>0?v112.constant[0]:0; +v117=v112.constant.length>1?v112.constant[1]:0; +v118=v112.constant.length>2?v112.constant[2]:0; +v119=v112.constant.length>3?v112.constant[3]:0; +} +} +else{ +if(v16(v112.buffer)){ +v120=v8.createStream(34962,v112.buffer); +} +else{ +v120=v8.getBuffer(v112.buffer); +} +v123="type" in v112?v49[v112.type]:v120.dtype; +v122=!!v112.normalized; +v121=v112.size|0; +v124=v112.offset|0; +v125=v112.stride|0; +v126=v112.divisor|0; +} +} +v128=g127.location; +v129=v10[v128]; +if(v115===1){ +if(!v129.buffer){ +v1.enableVertexAttribArray(v128); +} +v130=v121||4; +if(v129.type!==v123||v129.size!==v130||v129.buffer!==v120||v129.normalized!==v122||v129.offset!==v124||v129.stride!==v125){ +v1.bindBuffer(34962,v120.buffer); +v1.vertexAttribPointer(v128,v130,v123,v122,v125,v124); +v129.type=v123; +v129.size=v130; +v129.buffer=v120; +v129.normalized=v122; +v129.offset=v124; +v129.stride=v125; +} +if(v129.divisor!==v126){ +v110.vertexAttribDivisorANGLE(v128,v126); +v129.divisor=v126; +} +} +else{ +if(v129.buffer){ +v1.disableVertexAttribArray(v128); +v129.buffer=null; +} +if(v129.x!==v116||v129.y!==v117||v129.z!==v118||v129.w!==v119){ +v1.vertexAttrib4f(v128,v116,v117,v118,v119); +v129.x=v116; +v129.y=v117; +v129.z=v118; +v129.w=v119; +} +} +v132=g131.call(this,v2,a0,0); +if(!(v132&&(typeof v132==="object"||typeof v132==="function")&&(v16(v132)||v8.getBuffer(v132)||v8.getBuffer(v132.buffer)||v16(v132.buffer)||("constant" in v132&&(typeof v132.constant==="number"||v17(v132.constant))))))g18.commandRaise(g133,g19); +v134=false; +v135=1; +v136=0; +v137=0; +v138=0; +v139=0; +v140=null; +v141=0; +v142=false; +v143=5126; +v144=0; +v145=0; +v146=0; +if(v16(v132)){ +v134=true; +v140=v8.createStream(34962,v132); +v143=v140.dtype; +} +else{ +v140=v8.getBuffer(v132); +if(v140){ +v143=v140.dtype; +} +else if("constant" in v132){ +v135=2; +if(typeof v132.constant === "number"){ +v136=v132.constant; +v137=v138=v139=0; +} +else{ +v136=v132.constant.length>0?v132.constant[0]:0; +v137=v132.constant.length>1?v132.constant[1]:0; +v138=v132.constant.length>2?v132.constant[2]:0; +v139=v132.constant.length>3?v132.constant[3]:0; +} +} +else{ +if(v16(v132.buffer)){ +v140=v8.createStream(34962,v132.buffer); +} +else{ +v140=v8.getBuffer(v132.buffer); +} +v143="type" in v132?v49[v132.type]:v140.dtype; +v142=!!v132.normalized; +v141=v132.size|0; +v144=v132.offset|0; +v145=v132.stride|0; +v146=v132.divisor|0; +} +} +v148=g147.location; +v149=v10[v148]; +if(v135===1){ +if(!v149.buffer){ +v1.enableVertexAttribArray(v148); +} +v150=v141||1; +if(v149.type!==v143||v149.size!==v150||v149.buffer!==v140||v149.normalized!==v142||v149.offset!==v144||v149.stride!==v145){ +v1.bindBuffer(34962,v140.buffer); +v1.vertexAttribPointer(v148,v150,v143,v142,v145,v144); +v149.type=v143; +v149.size=v150; +v149.buffer=v140; +v149.normalized=v142; +v149.offset=v144; +v149.stride=v145; +} +if(v149.divisor!==v146){ +v110.vertexAttribDivisorANGLE(v148,v146); +v149.divisor=v146; +} +} +else{ +if(v149.buffer){ +v1.disableVertexAttribArray(v148); +v149.buffer=null; +} +if(v149.x!==v136||v149.y!==v137||v149.z!==v138||v149.w!==v139){ +v1.vertexAttrib4f(v148,v136,v137,v138,v139); +v149.x=v136; +v149.y=v137; +v149.z=v138; +v149.w=v139; +} +} +v152=g151.call(this,v2,a0,0); +if(!(v152&&(typeof v152==="object"||typeof v152==="function")&&(v16(v152)||v8.getBuffer(v152)||v8.getBuffer(v152.buffer)||v16(v152.buffer)||("constant" in v152&&(typeof v152.constant==="number"||v17(v152.constant))))))g18.commandRaise(g153,g19); +v154=false; +v155=1; +v156=0; +v157=0; +v158=0; +v159=0; +v160=null; +v161=0; +v162=false; +v163=5126; +v164=0; +v165=0; +v166=0; +if(v16(v152)){ +v154=true; +v160=v8.createStream(34962,v152); +v163=v160.dtype; +} +else{ +v160=v8.getBuffer(v152); +if(v160){ +v163=v160.dtype; +} +else if("constant" in v152){ +v155=2; +if(typeof v152.constant === "number"){ +v156=v152.constant; +v157=v158=v159=0; +} +else{ +v156=v152.constant.length>0?v152.constant[0]:0; +v157=v152.constant.length>1?v152.constant[1]:0; +v158=v152.constant.length>2?v152.constant[2]:0; +v159=v152.constant.length>3?v152.constant[3]:0; +} +} +else{ +if(v16(v152.buffer)){ +v160=v8.createStream(34962,v152.buffer); +} +else{ +v160=v8.getBuffer(v152.buffer); +} +v163="type" in v152?v49[v152.type]:v160.dtype; +v162=!!v152.normalized; +v161=v152.size|0; +v164=v152.offset|0; +v165=v152.stride|0; +v166=v152.divisor|0; +} +} +v168=g167.location; +v169=v10[v168]; +if(v155===1){ +if(!v169.buffer){ +v1.enableVertexAttribArray(v168); +} +v170=v161||4; +if(v169.type!==v163||v169.size!==v170||v169.buffer!==v160||v169.normalized!==v162||v169.offset!==v164||v169.stride!==v165){ +v1.bindBuffer(34962,v160.buffer); +v1.vertexAttribPointer(v168,v170,v163,v162,v165,v164); +v169.type=v163; +v169.size=v170; +v169.buffer=v160; +v169.normalized=v162; +v169.offset=v164; +v169.stride=v165; +} +if(v169.divisor!==v166){ +v110.vertexAttribDivisorANGLE(v168,v166); +v169.divisor=v166; +} +} +else{ +if(v169.buffer){ +v1.disableVertexAttribArray(v168); +v169.buffer=null; +} +if(v169.x!==v156||v169.y!==v157||v169.z!==v158||v169.w!==v159){ +v1.vertexAttrib4f(v168,v156,v157,v158,v159); +v169.x=v156; +v169.y=v157; +v169.z=v158; +v169.w=v159; +} +} +v172=g171.call(this,v2,a0,0); +if(!(v172&&(typeof v172==="object"||typeof v172==="function")&&(v16(v172)||v8.getBuffer(v172)||v8.getBuffer(v172.buffer)||v16(v172.buffer)||("constant" in v172&&(typeof v172.constant==="number"||v17(v172.constant))))))g18.commandRaise(g173,g19); +v174=false; +v175=1; +v176=0; +v177=0; +v178=0; +v179=0; +v180=null; +v181=0; +v182=false; +v183=5126; +v184=0; +v185=0; +v186=0; +if(v16(v172)){ +v174=true; +v180=v8.createStream(34962,v172); +v183=v180.dtype; +} +else{ +v180=v8.getBuffer(v172); +if(v180){ +v183=v180.dtype; +} +else if("constant" in v172){ +v175=2; +if(typeof v172.constant === "number"){ +v176=v172.constant; +v177=v178=v179=0; +} +else{ +v176=v172.constant.length>0?v172.constant[0]:0; +v177=v172.constant.length>1?v172.constant[1]:0; +v178=v172.constant.length>2?v172.constant[2]:0; +v179=v172.constant.length>3?v172.constant[3]:0; +} +} +else{ +if(v16(v172.buffer)){ +v180=v8.createStream(34962,v172.buffer); +} +else{ +v180=v8.getBuffer(v172.buffer); +} +v183="type" in v172?v49[v172.type]:v180.dtype; +v182=!!v172.normalized; +v181=v172.size|0; +v184=v172.offset|0; +v185=v172.stride|0; +v186=v172.divisor|0; +} +} +v188=g187.location; +v189=v10[v188]; +if(v175===1){ +if(!v189.buffer){ +v1.enableVertexAttribArray(v188); +} +v190=v181||1; +if(v189.type!==v183||v189.size!==v190||v189.buffer!==v180||v189.normalized!==v182||v189.offset!==v184||v189.stride!==v185){ +v1.bindBuffer(34962,v180.buffer); +v1.vertexAttribPointer(v188,v190,v183,v182,v185,v184); +v189.type=v183; +v189.size=v190; +v189.buffer=v180; +v189.normalized=v182; +v189.offset=v184; +v189.stride=v185; +} +if(v189.divisor!==v186){ +v110.vertexAttribDivisorANGLE(v188,v186); +v189.divisor=v186; +} +} +else{ +if(v189.buffer){ +v1.disableVertexAttribArray(v188); +v189.buffer=null; +} +if(v189.x!==v176||v189.y!==v177||v189.z!==v178||v189.w!==v179){ +v1.vertexAttrib4f(v188,v176,v177,v178,v179); +v189.x=v176; +v189.y=v177; +v189.z=v178; +v189.w=v179; +} +} +v192=g191.call(this,v2,a0,0); +if(!(v192&&(typeof v192==="object"||typeof v192==="function")&&(v16(v192)||v8.getBuffer(v192)||v8.getBuffer(v192.buffer)||v16(v192.buffer)||("constant" in v192&&(typeof v192.constant==="number"||v17(v192.constant))))))g18.commandRaise(g193,g19); +v194=false; +v195=1; +v196=0; +v197=0; +v198=0; +v199=0; +v200=null; +v201=0; +v202=false; +v203=5126; +v204=0; +v205=0; +v206=0; +if(v16(v192)){ +v194=true; +v200=v8.createStream(34962,v192); +v203=v200.dtype; +} +else{ +v200=v8.getBuffer(v192); +if(v200){ +v203=v200.dtype; +} +else if("constant" in v192){ +v195=2; +if(typeof v192.constant === "number"){ +v196=v192.constant; +v197=v198=v199=0; +} +else{ +v196=v192.constant.length>0?v192.constant[0]:0; +v197=v192.constant.length>1?v192.constant[1]:0; +v198=v192.constant.length>2?v192.constant[2]:0; +v199=v192.constant.length>3?v192.constant[3]:0; +} +} +else{ +if(v16(v192.buffer)){ +v200=v8.createStream(34962,v192.buffer); +} +else{ +v200=v8.getBuffer(v192.buffer); +} +v203="type" in v192?v49[v192.type]:v200.dtype; +v202=!!v192.normalized; +v201=v192.size|0; +v204=v192.offset|0; +v205=v192.stride|0; +v206=v192.divisor|0; +} +} +v208=g207.location; +v209=v10[v208]; +if(v195===1){ +if(!v209.buffer){ +v1.enableVertexAttribArray(v208); +} +v210=v201||1; +if(v209.type!==v203||v209.size!==v210||v209.buffer!==v200||v209.normalized!==v202||v209.offset!==v204||v209.stride!==v205){ +v1.bindBuffer(34962,v200.buffer); +v1.vertexAttribPointer(v208,v210,v203,v202,v205,v204); +v209.type=v203; +v209.size=v210; +v209.buffer=v200; +v209.normalized=v202; +v209.offset=v204; +v209.stride=v205; +} +if(v209.divisor!==v206){ +v110.vertexAttribDivisorANGLE(v208,v206); +v209.divisor=v206; +} +} +else{ +if(v209.buffer){ +v1.disableVertexAttribArray(v208); +v209.buffer=null; +} +if(v209.x!==v196||v209.y!==v197||v209.z!==v198||v209.w!==v199){ +v1.vertexAttrib4f(v208,v196,v197,v198,v199); +v209.x=v196; +v209.y=v197; +v209.z=v198; +v209.w=v199; +} +} +v212=g211.call(this,v2,a0,0); +if(!(v212&&(typeof v212==="object"||typeof v212==="function")&&(v16(v212)||v8.getBuffer(v212)||v8.getBuffer(v212.buffer)||v16(v212.buffer)||("constant" in v212&&(typeof v212.constant==="number"||v17(v212.constant))))))g18.commandRaise(g213,g19); +v214=false; +v215=1; +v216=0; +v217=0; +v218=0; +v219=0; +v220=null; +v221=0; +v222=false; +v223=5126; +v224=0; +v225=0; +v226=0; +if(v16(v212)){ +v214=true; +v220=v8.createStream(34962,v212); +v223=v220.dtype; +} +else{ +v220=v8.getBuffer(v212); +if(v220){ +v223=v220.dtype; +} +else if("constant" in v212){ +v215=2; +if(typeof v212.constant === "number"){ +v216=v212.constant; +v217=v218=v219=0; +} +else{ +v216=v212.constant.length>0?v212.constant[0]:0; +v217=v212.constant.length>1?v212.constant[1]:0; +v218=v212.constant.length>2?v212.constant[2]:0; +v219=v212.constant.length>3?v212.constant[3]:0; +} +} +else{ +if(v16(v212.buffer)){ +v220=v8.createStream(34962,v212.buffer); +} +else{ +v220=v8.getBuffer(v212.buffer); +} +v223="type" in v212?v49[v212.type]:v220.dtype; +v222=!!v212.normalized; +v221=v212.size|0; +v224=v212.offset|0; +v225=v212.stride|0; +v226=v212.divisor|0; +} +} +v228=g227.location; +v229=v10[v228]; +if(v215===1){ +if(!v229.buffer){ +v1.enableVertexAttribArray(v228); +} +v230=v221||1; +if(v229.type!==v223||v229.size!==v230||v229.buffer!==v220||v229.normalized!==v222||v229.offset!==v224||v229.stride!==v225){ +v1.bindBuffer(34962,v220.buffer); +v1.vertexAttribPointer(v228,v230,v223,v222,v225,v224); +v229.type=v223; +v229.size=v230; +v229.buffer=v220; +v229.normalized=v222; +v229.offset=v224; +v229.stride=v225; +} +if(v229.divisor!==v226){ +v110.vertexAttribDivisorANGLE(v228,v226); +v229.divisor=v226; +} +} +else{ +if(v229.buffer){ +v1.disableVertexAttribArray(v228); +v229.buffer=null; +} +if(v229.x!==v216||v229.y!==v217||v229.z!==v218||v229.w!==v219){ +v1.vertexAttrib4f(v228,v216,v217,v218,v219); +v229.x=v216; +v229.y=v217; +v229.z=v218; +v229.w=v219; +} +} +v232=g231.call(this,v2,a0,0); +if(!(v232&&(typeof v232==="object"||typeof v232==="function")&&(v16(v232)||v8.getBuffer(v232)||v8.getBuffer(v232.buffer)||v16(v232.buffer)||("constant" in v232&&(typeof v232.constant==="number"||v17(v232.constant))))))g18.commandRaise(g233,g19); +v234=false; +v235=1; +v236=0; +v237=0; +v238=0; +v239=0; +v240=null; +v241=0; +v242=false; +v243=5126; +v244=0; +v245=0; +v246=0; +if(v16(v232)){ +v234=true; +v240=v8.createStream(34962,v232); +v243=v240.dtype; +} +else{ +v240=v8.getBuffer(v232); +if(v240){ +v243=v240.dtype; +} +else if("constant" in v232){ +v235=2; +if(typeof v232.constant === "number"){ +v236=v232.constant; +v237=v238=v239=0; +} +else{ +v236=v232.constant.length>0?v232.constant[0]:0; +v237=v232.constant.length>1?v232.constant[1]:0; +v238=v232.constant.length>2?v232.constant[2]:0; +v239=v232.constant.length>3?v232.constant[3]:0; +} +} +else{ +if(v16(v232.buffer)){ +v240=v8.createStream(34962,v232.buffer); +} +else{ +v240=v8.getBuffer(v232.buffer); +} +v243="type" in v232?v49[v232.type]:v240.dtype; +v242=!!v232.normalized; +v241=v232.size|0; +v244=v232.offset|0; +v245=v232.stride|0; +v246=v232.divisor|0; +} +} +v248=g247.location; +v249=v10[v248]; +if(v235===1){ +if(!v249.buffer){ +v1.enableVertexAttribArray(v248); +} +v250=v241||1; +if(v249.type!==v243||v249.size!==v250||v249.buffer!==v240||v249.normalized!==v242||v249.offset!==v244||v249.stride!==v245){ +v1.bindBuffer(34962,v240.buffer); +v1.vertexAttribPointer(v248,v250,v243,v242,v245,v244); +v249.type=v243; +v249.size=v250; +v249.buffer=v240; +v249.normalized=v242; +v249.offset=v244; +v249.stride=v245; +} +if(v249.divisor!==v246){ +v110.vertexAttribDivisorANGLE(v248,v246); +v249.divisor=v246; +} +} +else{ +if(v249.buffer){ +v1.disableVertexAttribArray(v248); +v249.buffer=null; +} +if(v249.x!==v236||v249.y!==v237||v249.z!==v238||v249.w!==v239){ +v1.vertexAttrib4f(v248,v236,v237,v238,v239); +v249.x=v236; +v249.y=v237; +v249.z=v238; +v249.w=v239; +} +} +v252=g251.call(this,v2,a0,0); +if(!(v252&&(typeof v252==="object"||typeof v252==="function")&&(v16(v252)||v8.getBuffer(v252)||v8.getBuffer(v252.buffer)||v16(v252.buffer)||("constant" in v252&&(typeof v252.constant==="number"||v17(v252.constant))))))g18.commandRaise(g253,g19); +v254=false; +v255=1; +v256=0; +v257=0; +v258=0; +v259=0; +v260=null; +v261=0; +v262=false; +v263=5126; +v264=0; +v265=0; +v266=0; +if(v16(v252)){ +v254=true; +v260=v8.createStream(34962,v252); +v263=v260.dtype; +} +else{ +v260=v8.getBuffer(v252); +if(v260){ +v263=v260.dtype; +} +else if("constant" in v252){ +v255=2; +if(typeof v252.constant === "number"){ +v256=v252.constant; +v257=v258=v259=0; +} +else{ +v256=v252.constant.length>0?v252.constant[0]:0; +v257=v252.constant.length>1?v252.constant[1]:0; +v258=v252.constant.length>2?v252.constant[2]:0; +v259=v252.constant.length>3?v252.constant[3]:0; +} +} +else{ +if(v16(v252.buffer)){ +v260=v8.createStream(34962,v252.buffer); +} +else{ +v260=v8.getBuffer(v252.buffer); +} +v263="type" in v252?v49[v252.type]:v260.dtype; +v262=!!v252.normalized; +v261=v252.size|0; +v264=v252.offset|0; +v265=v252.stride|0; +v266=v252.divisor|0; +} +} +v268=g267.location; +v269=v10[v268]; +if(v255===1){ +if(!v269.buffer){ +v1.enableVertexAttribArray(v268); +} +v270=v261||1; +if(v269.type!==v263||v269.size!==v270||v269.buffer!==v260||v269.normalized!==v262||v269.offset!==v264||v269.stride!==v265){ +v1.bindBuffer(34962,v260.buffer); +v1.vertexAttribPointer(v268,v270,v263,v262,v265,v264); +v269.type=v263; +v269.size=v270; +v269.buffer=v260; +v269.normalized=v262; +v269.offset=v264; +v269.stride=v265; +} +if(v269.divisor!==v266){ +v110.vertexAttribDivisorANGLE(v268,v266); +v269.divisor=v266; +} +} +else{ +if(v269.buffer){ +v1.disableVertexAttribArray(v268); +v269.buffer=null; +} +if(v269.x!==v256||v269.y!==v257||v269.z!==v258||v269.w!==v259){ +v1.vertexAttrib4f(v268,v256,v257,v258,v259); +v269.x=v256; +v269.y=v257; +v269.z=v258; +v269.w=v259; +} +} +v272=g271.call(this,v2,a0,0); +if(!(v272&&(typeof v272==="object"||typeof v272==="function")&&(v16(v272)||v8.getBuffer(v272)||v8.getBuffer(v272.buffer)||v16(v272.buffer)||("constant" in v272&&(typeof v272.constant==="number"||v17(v272.constant))))))g18.commandRaise(g273,g19); +v274=false; +v275=1; +v276=0; +v277=0; +v278=0; +v279=0; +v280=null; +v281=0; +v282=false; +v283=5126; +v284=0; +v285=0; +v286=0; +if(v16(v272)){ +v274=true; +v280=v8.createStream(34962,v272); +v283=v280.dtype; +} +else{ +v280=v8.getBuffer(v272); +if(v280){ +v283=v280.dtype; +} +else if("constant" in v272){ +v275=2; +if(typeof v272.constant === "number"){ +v276=v272.constant; +v277=v278=v279=0; +} +else{ +v276=v272.constant.length>0?v272.constant[0]:0; +v277=v272.constant.length>1?v272.constant[1]:0; +v278=v272.constant.length>2?v272.constant[2]:0; +v279=v272.constant.length>3?v272.constant[3]:0; +} +} +else{ +if(v16(v272.buffer)){ +v280=v8.createStream(34962,v272.buffer); +} +else{ +v280=v8.getBuffer(v272.buffer); +} +v283="type" in v272?v49[v272.type]:v280.dtype; +v282=!!v272.normalized; +v281=v272.size|0; +v284=v272.offset|0; +v285=v272.stride|0; +v286=v272.divisor|0; +} +} +v288=g287.location; +v289=v10[v288]; +if(v275===1){ +if(!v289.buffer){ +v1.enableVertexAttribArray(v288); +} +v290=v281||1; +if(v289.type!==v283||v289.size!==v290||v289.buffer!==v280||v289.normalized!==v282||v289.offset!==v284||v289.stride!==v285){ +v1.bindBuffer(34962,v280.buffer); +v1.vertexAttribPointer(v288,v290,v283,v282,v285,v284); +v289.type=v283; +v289.size=v290; +v289.buffer=v280; +v289.normalized=v282; +v289.offset=v284; +v289.stride=v285; +} +if(v289.divisor!==v286){ +v110.vertexAttribDivisorANGLE(v288,v286); +v289.divisor=v286; +} +} +else{ +if(v289.buffer){ +v1.disableVertexAttribArray(v288); +v289.buffer=null; +} +if(v289.x!==v276||v289.y!==v277||v289.z!==v278||v289.w!==v279){ +v1.vertexAttrib4f(v288,v276,v277,v278,v279); +v289.x=v276; +v289.y=v277; +v289.z=v278; +v289.w=v279; +} +} +v1.uniform1i(g291.location,false); +v293=a0["markerTexture"]; +if(v293&&v293._reglType==="framebuffer"){ +v293=v293.color[0]; +} +if(!(typeof v293==="function"&&v293._reglType==="texture2d"))g18.commandRaise(g294,g19); +v295=v293._texture; +v1.uniform1i(g292.location,v295.bind()); +v297=a0["opacity"]; +if(!(typeof v297==="number"))g18.commandRaise(g298,g19); +v1.uniform1f(g296.location,v297); +v301=g300.call(this,v2,a0,0); +if(!(v17(v301)&&v301.length===2))g18.commandRaise(g302,g19); +v303=v301[0]; +v304=v301[1]; +v1.uniform2f(g299.location,v303,v304); +v1.uniform1i(g305.location,g306.bind()); +v308=v2["pixelRatio"]; +if(!(typeof v308==="number"))g18.commandRaise(g309,g19); +v1.uniform1f(g307.location,v308); +v311=a0["scale"]; +if(!(v17(v311)&&v311.length===2))g18.commandRaise(g312,g19); +v313=v311[0]; +v314=v311[1]; +v1.uniform2f(g310.location,v313,v314); +v316=a0["scaleFract"]; +if(!(v17(v316)&&v316.length===2))g18.commandRaise(g317,g19); +v318=v316[0]; +v319=v316[1]; +v1.uniform2f(g315.location,v318,v319); +v321=a0["translate"]; +if(!(v17(v321)&&v321.length===2))g18.commandRaise(g322,g19); +v323=v321[0]; +v324=v321[1]; +v1.uniform2f(g320.location,v323,v324); +v326=a0["translateFract"]; +if(!(v17(v326)&&v326.length===2))g18.commandRaise(g327,g19); +v328=v326[0]; +v329=v326[1]; +v1.uniform2f(g325.location,v328,v329); +v330=a0["elements"]; +v331=null; +v332=v16(v330); +if(v332){ +v331=v7.createStream(v330); +} +else{ +v331=v7.getElements(v330); +if(!(!v330||v331))g18.commandRaise(g333,g19); +} +if(v331)v1.bindBuffer(34963,v331.buffer.buffer); +v334=a0["offset"]; +if(!(v334>=0))g18.commandRaise(g335,g19); +v336=a0["count"]; +if(!(typeof v336==="number"&&v336>=0&&v336===(v336|0)))g18.commandRaise(g337,g19); +if(v336){ +v338=v6.instances; +if(v338>0){ +if(v331){ +v110.drawElementsInstancedANGLE(0,v336,v331.type,v334<<((v331.type-5121)>>1),v338); +} +else{ +v110.drawArraysInstancedANGLE(0,v334,v336,v338); +} +} +else if(v338<0){ +if(v331){ +v1.drawElements(0,v336,v331.type,v334<<((v331.type-5121)>>1)); +} +else{ +v1.drawArrays(0,v334,v336); +} +} +v5.dirty=true; +v11.setVAO(null); +v2.viewportWidth=v95; +v2.viewportHeight=v96; +if(v107){ +g52.cpuTime+=performance.now()-v108; +} +if(v114){ +v8.destroyStream(v120); +} +if(v134){ +v8.destroyStream(v140); +} +if(v154){ +v8.destroyStream(v160); +} +if(v174){ +v8.destroyStream(v180); +} +if(v194){ +v8.destroyStream(v200); +} +if(v214){ +v8.destroyStream(v220); +} +if(v234){ +v8.destroyStream(v240); +} +if(v254){ +v8.destroyStream(v260); +} +if(v274){ +v8.destroyStream(v280); +} +v295.unbind(); +g306.unbind(); +if(v332){ +v7.destroyStream(v331); +} +} +} +,"scope":function(a0,a1,a2){ +var v339,v340,v341,v342,v343,v344,v345,v346,v347,v348,v349,v351,v353,v355,v357,v359,v361,v363,v365,v367,v369,v370,v371,v372,v373,v374,v375,v376,v377,v378,v380,v382,v383,v384,v385,v386,v387,v388,v389,v390,v391,v392,v394,v396,v399,v400,v402,v403,v405,v406,v408,v409,v411,v412,v414,v415,v417,v418,v420,v421,v423,v424,v425,v426,v427,v428,v429,v430,v431,v432,v433,v434,v435,v436,v437,v439,v440,v441,v442,v443,v444,v445,v446,v447,v448,v449,v450,v451,v452,v453,v454,v455,v456,v457,v458,v459,v460,v461,v462,v463,v464,v466,v467,v468,v469,v470,v471,v472,v473,v474,v475,v476,v477,v478,v479,v480,v481,v482,v483,v484,v485,v486,v487,v488,v489,v490,v491,v493,v494,v495,v496,v497,v498,v499,v500,v501,v502,v503,v504,v505,v506,v507,v508,v509,v510,v511,v512,v513,v514,v515,v516,v517,v518,v520,v521,v522,v523,v524,v525,v526,v527,v528,v529,v530,v531,v532,v533,v534,v535,v536,v537,v538,v539,v540,v541,v542,v543,v544,v545,v547,v548,v549,v550,v551,v552,v553,v554,v555,v556,v557,v558,v559,v560,v561,v562,v563,v564,v565,v566,v567,v568,v569,v570,v571,v572,v574,v575,v576,v577,v578,v579,v580,v581,v582,v583,v584,v585,v586,v587,v588,v589,v590,v591,v592,v593,v594,v595,v596,v597,v598,v599,v601,v602,v603,v604,v605,v606,v607,v608,v609,v610,v611,v612,v613,v614,v615,v616,v617,v618,v619,v620,v621,v622,v623,v624,v625,v626,v628,v629,v630,v631,v632,v633,v634,v635,v636,v637,v638,v639,v640,v641,v642,v643,v644,v645,v646,v647,v648,v649,v650,v651,v652,v653,v655,v656,v657,v658,v659,v660,v661,v662,v663,v664,v665,v666,v668,v670; +v339=a0["viewport"]; +if(!(v339&&typeof v339==="object"))g18.commandRaise(g90,g19); +v340=v339.x|0; +v341=v339.y|0; +v342="width" in v339?v339.width|0:(v2.framebufferWidth-v340); +v343="height" in v339?v339.height|0:(v2.framebufferHeight-v341); +if(!(v342>=0&&v343>=0))g18.commandRaise(g90,g19); +v344=v2.viewportWidth; +v2.viewportWidth=v342; +v345=v2.viewportHeight; +v2.viewportHeight=v343; +v346=v42[0]; +v42[0]=v340; +v347=v42[1]; +v42[1]=v341; +v348=v42[2]; +v42[2]=v342; +v349=v42[3]; +v42[3]=v343; +v351=v20[0]; +v20[0]=g350; +v353=v20[1]; +v20[1]=g352; +v355=v20[2]; +v20[2]=g354; +v357=v20[3]; +v20[3]=g356; +v359=v4.blend_enable; +v4.blend_enable=g358; +v361=v24[0]; +v24[0]=g360; +v363=v24[1]; +v24[1]=g362; +v365=v24[2]; +v24[2]=g364; +v367=v24[3]; +v24[3]=g366; +v369=v4.depth_enable; +v4.depth_enable=g368; +v370=a0["viewport"]; +if(!(v370&&typeof v370==="object"))g18.commandRaise(g100,g19); +v371=v370.x|0; +v372=v370.y|0; +v373="width" in v370?v370.width|0:(v2.framebufferWidth-v371); +v374="height" in v370?v370.height|0:(v2.framebufferHeight-v372); +if(!(v373>=0&&v374>=0))g18.commandRaise(g100,g19); +v375=v40[0]; +v40[0]=v371; +v376=v40[1]; +v40[1]=v372; +v377=v40[2]; +v40[2]=v373; +v378=v40[3]; +v40[3]=v374; +v380=v4.scissor_enable; +v4.scissor_enable=g379; +v382=v4.stencil_enable; +v4.stencil_enable=g381; +v383=v5.profile; +if(v383){ +v384=performance.now(); +g52.count++; +} +v385=a0["elements"]; +v386=null; +v387=v16(v385); +if(v387){ +v386=v7.createStream(v385); +} +else{ +v386=v7.getElements(v385); +if(!(!v385||v386))g18.commandRaise(g333,g19); +} +v388=v6.elements; +v6.elements=v386; +v389=a0["offset"]; +if(!(v389>=0))g18.commandRaise(g335,g19); +v390=v6.offset; +v6.offset=v389; +v391=a0["count"]; +if(!(typeof v391==="number"&&v391>=0&&v391===(v391|0)))g18.commandRaise(g337,g19); +v392=v6.count; +v6.count=v391; +v394=v6.primitive; +v6.primitive=g393; +v396=v12[g395]; +v12[g395]=false; +v399=v12[g398]; +v12[g398]=g397; +v400=a0["opacity"]; +v402=v12[g401]; +v12[g401]=v400; +v403=g300.call(this,v2,a0,a2); +v405=v12[g404]; +v12[g404]=v403; +v406=v2["pixelRatio"]; +v408=v12[g407]; +v12[g407]=v406; +v409=a0["scale"]; +v411=v12[g410]; +v12[g410]=v409; +v412=a0["scaleFract"]; +v414=v12[g413]; +v12[g413]=v412; +v415=a0["translate"]; +v417=v12[g416]; +v12[g416]=v415; +v418=a0["translateFract"]; +v420=v12[g419]; +v12[g419]=v418; +v421=a0["markerTexture"]; +v423=v12[g422]; +v12[g422]=v421; +v424=g211.call(this,v2,a0,a2); +if(!(v424&&(typeof v424==="object"||typeof v424==="function")&&(v16(v424)||v8.getBuffer(v424)||v8.getBuffer(v424.buffer)||v16(v424.buffer)||("constant" in v424&&(typeof v424.constant==="number"||v17(v424.constant))))))g18.commandRaise(g213,g19); +v425=false; +v426=1; +v427=0; +v428=0; +v429=0; +v430=0; +v431=null; +v432=0; +v433=false; +v434=5126; +v435=0; +v436=0; +v437=0; +if(v16(v424)){ +v425=true; +v431=v8.createStream(34962,v424); +v434=v431.dtype; +} +else{ +v431=v8.getBuffer(v424); +if(v431){ +v434=v431.dtype; +} +else if("constant" in v424){ +v426=2; +if(typeof v424.constant === "number"){ +v427=v424.constant; +v428=v429=v430=0; +} +else{ +v427=v424.constant.length>0?v424.constant[0]:0; +v428=v424.constant.length>1?v424.constant[1]:0; +v429=v424.constant.length>2?v424.constant[2]:0; +v430=v424.constant.length>3?v424.constant[3]:0; +} +} +else{ +if(v16(v424.buffer)){ +v431=v8.createStream(34962,v424.buffer); +} +else{ +v431=v8.getBuffer(v424.buffer); +} +v434="type" in v424?v49[v424.type]:v431.dtype; +v433=!!v424.normalized; +v432=v424.size|0; +v435=v424.offset|0; +v436=v424.stride|0; +v437=v424.divisor|0; +} +} +v439=g438.state; +g438.state=v426; +v440=g438.x; +g438.x=v427; +v441=g438.y; +g438.y=v428; +v442=g438.z; +g438.z=v429; +v443=g438.w; +g438.w=v430; +v444=g438.buffer; +g438.buffer=v431; +v445=g438.size; +g438.size=v432; +v446=g438.normalized; +g438.normalized=v433; +v447=g438.type; +g438.type=v434; +v448=g438.offset; +g438.offset=v435; +v449=g438.stride; +g438.stride=v436; +v450=g438.divisor; +g438.divisor=v437; +v451=g251.call(this,v2,a0,a2); +if(!(v451&&(typeof v451==="object"||typeof v451==="function")&&(v16(v451)||v8.getBuffer(v451)||v8.getBuffer(v451.buffer)||v16(v451.buffer)||("constant" in v451&&(typeof v451.constant==="number"||v17(v451.constant))))))g18.commandRaise(g253,g19); +v452=false; +v453=1; +v454=0; +v455=0; +v456=0; +v457=0; +v458=null; +v459=0; +v460=false; +v461=5126; +v462=0; +v463=0; +v464=0; +if(v16(v451)){ +v452=true; +v458=v8.createStream(34962,v451); +v461=v458.dtype; +} +else{ +v458=v8.getBuffer(v451); +if(v458){ +v461=v458.dtype; +} +else if("constant" in v451){ +v453=2; +if(typeof v451.constant === "number"){ +v454=v451.constant; +v455=v456=v457=0; +} +else{ +v454=v451.constant.length>0?v451.constant[0]:0; +v455=v451.constant.length>1?v451.constant[1]:0; +v456=v451.constant.length>2?v451.constant[2]:0; +v457=v451.constant.length>3?v451.constant[3]:0; +} +} +else{ +if(v16(v451.buffer)){ +v458=v8.createStream(34962,v451.buffer); +} +else{ +v458=v8.getBuffer(v451.buffer); +} +v461="type" in v451?v49[v451.type]:v458.dtype; +v460=!!v451.normalized; +v459=v451.size|0; +v462=v451.offset|0; +v463=v451.stride|0; +v464=v451.divisor|0; +} +} +v466=g465.state; +g465.state=v453; +v467=g465.x; +g465.x=v454; +v468=g465.y; +g465.y=v455; +v469=g465.z; +g465.z=v456; +v470=g465.w; +g465.w=v457; +v471=g465.buffer; +g465.buffer=v458; +v472=g465.size; +g465.size=v459; +v473=g465.normalized; +g465.normalized=v460; +v474=g465.type; +g465.type=v461; +v475=g465.offset; +g465.offset=v462; +v476=g465.stride; +g465.stride=v463; +v477=g465.divisor; +g465.divisor=v464; +v478=g231.call(this,v2,a0,a2); +if(!(v478&&(typeof v478==="object"||typeof v478==="function")&&(v16(v478)||v8.getBuffer(v478)||v8.getBuffer(v478.buffer)||v16(v478.buffer)||("constant" in v478&&(typeof v478.constant==="number"||v17(v478.constant))))))g18.commandRaise(g233,g19); +v479=false; +v480=1; +v481=0; +v482=0; +v483=0; +v484=0; +v485=null; +v486=0; +v487=false; +v488=5126; +v489=0; +v490=0; +v491=0; +if(v16(v478)){ +v479=true; +v485=v8.createStream(34962,v478); +v488=v485.dtype; +} +else{ +v485=v8.getBuffer(v478); +if(v485){ +v488=v485.dtype; +} +else if("constant" in v478){ +v480=2; +if(typeof v478.constant === "number"){ +v481=v478.constant; +v482=v483=v484=0; +} +else{ +v481=v478.constant.length>0?v478.constant[0]:0; +v482=v478.constant.length>1?v478.constant[1]:0; +v483=v478.constant.length>2?v478.constant[2]:0; +v484=v478.constant.length>3?v478.constant[3]:0; +} +} +else{ +if(v16(v478.buffer)){ +v485=v8.createStream(34962,v478.buffer); +} +else{ +v485=v8.getBuffer(v478.buffer); +} +v488="type" in v478?v49[v478.type]:v485.dtype; +v487=!!v478.normalized; +v486=v478.size|0; +v489=v478.offset|0; +v490=v478.stride|0; +v491=v478.divisor|0; +} +} +v493=g492.state; +g492.state=v480; +v494=g492.x; +g492.x=v481; +v495=g492.y; +g492.y=v482; +v496=g492.z; +g492.z=v483; +v497=g492.w; +g492.w=v484; +v498=g492.buffer; +g492.buffer=v485; +v499=g492.size; +g492.size=v486; +v500=g492.normalized; +g492.normalized=v487; +v501=g492.type; +g492.type=v488; +v502=g492.offset; +g492.offset=v489; +v503=g492.stride; +g492.stride=v490; +v504=g492.divisor; +g492.divisor=v491; +v505=g271.call(this,v2,a0,a2); +if(!(v505&&(typeof v505==="object"||typeof v505==="function")&&(v16(v505)||v8.getBuffer(v505)||v8.getBuffer(v505.buffer)||v16(v505.buffer)||("constant" in v505&&(typeof v505.constant==="number"||v17(v505.constant))))))g18.commandRaise(g273,g19); +v506=false; +v507=1; +v508=0; +v509=0; +v510=0; +v511=0; +v512=null; +v513=0; +v514=false; +v515=5126; +v516=0; +v517=0; +v518=0; +if(v16(v505)){ +v506=true; +v512=v8.createStream(34962,v505); +v515=v512.dtype; +} +else{ +v512=v8.getBuffer(v505); +if(v512){ +v515=v512.dtype; +} +else if("constant" in v505){ +v507=2; +if(typeof v505.constant === "number"){ +v508=v505.constant; +v509=v510=v511=0; +} +else{ +v508=v505.constant.length>0?v505.constant[0]:0; +v509=v505.constant.length>1?v505.constant[1]:0; +v510=v505.constant.length>2?v505.constant[2]:0; +v511=v505.constant.length>3?v505.constant[3]:0; +} +} +else{ +if(v16(v505.buffer)){ +v512=v8.createStream(34962,v505.buffer); +} +else{ +v512=v8.getBuffer(v505.buffer); +} +v515="type" in v505?v49[v505.type]:v512.dtype; +v514=!!v505.normalized; +v513=v505.size|0; +v516=v505.offset|0; +v517=v505.stride|0; +v518=v505.divisor|0; +} +} +v520=g519.state; +g519.state=v507; +v521=g519.x; +g519.x=v508; +v522=g519.y; +g519.y=v509; +v523=g519.z; +g519.z=v510; +v524=g519.w; +g519.w=v511; +v525=g519.buffer; +g519.buffer=v512; +v526=g519.size; +g519.size=v513; +v527=g519.normalized; +g519.normalized=v514; +v528=g519.type; +g519.type=v515; +v529=g519.offset; +g519.offset=v516; +v530=g519.stride; +g519.stride=v517; +v531=g519.divisor; +g519.divisor=v518; +v532=g191.call(this,v2,a0,a2); +if(!(v532&&(typeof v532==="object"||typeof v532==="function")&&(v16(v532)||v8.getBuffer(v532)||v8.getBuffer(v532.buffer)||v16(v532.buffer)||("constant" in v532&&(typeof v532.constant==="number"||v17(v532.constant))))))g18.commandRaise(g193,g19); +v533=false; +v534=1; +v535=0; +v536=0; +v537=0; +v538=0; +v539=null; +v540=0; +v541=false; +v542=5126; +v543=0; +v544=0; +v545=0; +if(v16(v532)){ +v533=true; +v539=v8.createStream(34962,v532); +v542=v539.dtype; +} +else{ +v539=v8.getBuffer(v532); +if(v539){ +v542=v539.dtype; +} +else if("constant" in v532){ +v534=2; +if(typeof v532.constant === "number"){ +v535=v532.constant; +v536=v537=v538=0; +} +else{ +v535=v532.constant.length>0?v532.constant[0]:0; +v536=v532.constant.length>1?v532.constant[1]:0; +v537=v532.constant.length>2?v532.constant[2]:0; +v538=v532.constant.length>3?v532.constant[3]:0; +} +} +else{ +if(v16(v532.buffer)){ +v539=v8.createStream(34962,v532.buffer); +} +else{ +v539=v8.getBuffer(v532.buffer); +} +v542="type" in v532?v49[v532.type]:v539.dtype; +v541=!!v532.normalized; +v540=v532.size|0; +v543=v532.offset|0; +v544=v532.stride|0; +v545=v532.divisor|0; +} +} +v547=g546.state; +g546.state=v534; +v548=g546.x; +g546.x=v535; +v549=g546.y; +g546.y=v536; +v550=g546.z; +g546.z=v537; +v551=g546.w; +g546.w=v538; +v552=g546.buffer; +g546.buffer=v539; +v553=g546.size; +g546.size=v540; +v554=g546.normalized; +g546.normalized=v541; +v555=g546.type; +g546.type=v542; +v556=g546.offset; +g546.offset=v543; +v557=g546.stride; +g546.stride=v544; +v558=g546.divisor; +g546.divisor=v545; +v559=g131.call(this,v2,a0,a2); +if(!(v559&&(typeof v559==="object"||typeof v559==="function")&&(v16(v559)||v8.getBuffer(v559)||v8.getBuffer(v559.buffer)||v16(v559.buffer)||("constant" in v559&&(typeof v559.constant==="number"||v17(v559.constant))))))g18.commandRaise(g133,g19); +v560=false; +v561=1; +v562=0; +v563=0; +v564=0; +v565=0; +v566=null; +v567=0; +v568=false; +v569=5126; +v570=0; +v571=0; +v572=0; +if(v16(v559)){ +v560=true; +v566=v8.createStream(34962,v559); +v569=v566.dtype; +} +else{ +v566=v8.getBuffer(v559); +if(v566){ +v569=v566.dtype; +} +else if("constant" in v559){ +v561=2; +if(typeof v559.constant === "number"){ +v562=v559.constant; +v563=v564=v565=0; +} +else{ +v562=v559.constant.length>0?v559.constant[0]:0; +v563=v559.constant.length>1?v559.constant[1]:0; +v564=v559.constant.length>2?v559.constant[2]:0; +v565=v559.constant.length>3?v559.constant[3]:0; +} +} +else{ +if(v16(v559.buffer)){ +v566=v8.createStream(34962,v559.buffer); +} +else{ +v566=v8.getBuffer(v559.buffer); +} +v569="type" in v559?v49[v559.type]:v566.dtype; +v568=!!v559.normalized; +v567=v559.size|0; +v570=v559.offset|0; +v571=v559.stride|0; +v572=v559.divisor|0; +} +} +v574=g573.state; +g573.state=v561; +v575=g573.x; +g573.x=v562; +v576=g573.y; +g573.y=v563; +v577=g573.z; +g573.z=v564; +v578=g573.w; +g573.w=v565; +v579=g573.buffer; +g573.buffer=v566; +v580=g573.size; +g573.size=v567; +v581=g573.normalized; +g573.normalized=v568; +v582=g573.type; +g573.type=v569; +v583=g573.offset; +g573.offset=v570; +v584=g573.stride; +g573.stride=v571; +v585=g573.divisor; +g573.divisor=v572; +v586=g151.call(this,v2,a0,a2); +if(!(v586&&(typeof v586==="object"||typeof v586==="function")&&(v16(v586)||v8.getBuffer(v586)||v8.getBuffer(v586.buffer)||v16(v586.buffer)||("constant" in v586&&(typeof v586.constant==="number"||v17(v586.constant))))))g18.commandRaise(g153,g19); +v587=false; +v588=1; +v589=0; +v590=0; +v591=0; +v592=0; +v593=null; +v594=0; +v595=false; +v596=5126; +v597=0; +v598=0; +v599=0; +if(v16(v586)){ +v587=true; +v593=v8.createStream(34962,v586); +v596=v593.dtype; +} +else{ +v593=v8.getBuffer(v586); +if(v593){ +v596=v593.dtype; +} +else if("constant" in v586){ +v588=2; +if(typeof v586.constant === "number"){ +v589=v586.constant; +v590=v591=v592=0; +} +else{ +v589=v586.constant.length>0?v586.constant[0]:0; +v590=v586.constant.length>1?v586.constant[1]:0; +v591=v586.constant.length>2?v586.constant[2]:0; +v592=v586.constant.length>3?v586.constant[3]:0; +} +} +else{ +if(v16(v586.buffer)){ +v593=v8.createStream(34962,v586.buffer); +} +else{ +v593=v8.getBuffer(v586.buffer); +} +v596="type" in v586?v49[v586.type]:v593.dtype; +v595=!!v586.normalized; +v594=v586.size|0; +v597=v586.offset|0; +v598=v586.stride|0; +v599=v586.divisor|0; +} +} +v601=g600.state; +g600.state=v588; +v602=g600.x; +g600.x=v589; +v603=g600.y; +g600.y=v590; +v604=g600.z; +g600.z=v591; +v605=g600.w; +g600.w=v592; +v606=g600.buffer; +g600.buffer=v593; +v607=g600.size; +g600.size=v594; +v608=g600.normalized; +g600.normalized=v595; +v609=g600.type; +g600.type=v596; +v610=g600.offset; +g600.offset=v597; +v611=g600.stride; +g600.stride=v598; +v612=g600.divisor; +g600.divisor=v599; +v613=g111.call(this,v2,a0,a2); +if(!(v613&&(typeof v613==="object"||typeof v613==="function")&&(v16(v613)||v8.getBuffer(v613)||v8.getBuffer(v613.buffer)||v16(v613.buffer)||("constant" in v613&&(typeof v613.constant==="number"||v17(v613.constant))))))g18.commandRaise(g113,g19); +v614=false; +v615=1; +v616=0; +v617=0; +v618=0; +v619=0; +v620=null; +v621=0; +v622=false; +v623=5126; +v624=0; +v625=0; +v626=0; +if(v16(v613)){ +v614=true; +v620=v8.createStream(34962,v613); +v623=v620.dtype; +} +else{ +v620=v8.getBuffer(v613); +if(v620){ +v623=v620.dtype; +} +else if("constant" in v613){ +v615=2; +if(typeof v613.constant === "number"){ +v616=v613.constant; +v617=v618=v619=0; +} +else{ +v616=v613.constant.length>0?v613.constant[0]:0; +v617=v613.constant.length>1?v613.constant[1]:0; +v618=v613.constant.length>2?v613.constant[2]:0; +v619=v613.constant.length>3?v613.constant[3]:0; +} +} +else{ +if(v16(v613.buffer)){ +v620=v8.createStream(34962,v613.buffer); +} +else{ +v620=v8.getBuffer(v613.buffer); +} +v623="type" in v613?v49[v613.type]:v620.dtype; +v622=!!v613.normalized; +v621=v613.size|0; +v624=v613.offset|0; +v625=v613.stride|0; +v626=v613.divisor|0; +} +} +v628=g627.state; +g627.state=v615; +v629=g627.x; +g627.x=v616; +v630=g627.y; +g627.y=v617; +v631=g627.z; +g627.z=v618; +v632=g627.w; +g627.w=v619; +v633=g627.buffer; +g627.buffer=v620; +v634=g627.size; +g627.size=v621; +v635=g627.normalized; +g627.normalized=v622; +v636=g627.type; +g627.type=v623; +v637=g627.offset; +g627.offset=v624; +v638=g627.stride; +g627.stride=v625; +v639=g627.divisor; +g627.divisor=v626; +v640=g171.call(this,v2,a0,a2); +if(!(v640&&(typeof v640==="object"||typeof v640==="function")&&(v16(v640)||v8.getBuffer(v640)||v8.getBuffer(v640.buffer)||v16(v640.buffer)||("constant" in v640&&(typeof v640.constant==="number"||v17(v640.constant))))))g18.commandRaise(g173,g19); +v641=false; +v642=1; +v643=0; +v644=0; +v645=0; +v646=0; +v647=null; +v648=0; +v649=false; +v650=5126; +v651=0; +v652=0; +v653=0; +if(v16(v640)){ +v641=true; +v647=v8.createStream(34962,v640); +v650=v647.dtype; +} +else{ +v647=v8.getBuffer(v640); +if(v647){ +v650=v647.dtype; +} +else if("constant" in v640){ +v642=2; +if(typeof v640.constant === "number"){ +v643=v640.constant; +v644=v645=v646=0; +} +else{ +v643=v640.constant.length>0?v640.constant[0]:0; +v644=v640.constant.length>1?v640.constant[1]:0; +v645=v640.constant.length>2?v640.constant[2]:0; +v646=v640.constant.length>3?v640.constant[3]:0; +} +} +else{ +if(v16(v640.buffer)){ +v647=v8.createStream(34962,v640.buffer); +} +else{ +v647=v8.getBuffer(v640.buffer); +} +v650="type" in v640?v49[v640.type]:v647.dtype; +v649=!!v640.normalized; +v648=v640.size|0; +v651=v640.offset|0; +v652=v640.stride|0; +v653=v640.divisor|0; +} +} +v655=g654.state; +g654.state=v642; +v656=g654.x; +g654.x=v643; +v657=g654.y; +g654.y=v644; +v658=g654.z; +g654.z=v645; +v659=g654.w; +g654.w=v646; +v660=g654.buffer; +g654.buffer=v647; +v661=g654.size; +g654.size=v648; +v662=g654.normalized; +g654.normalized=v649; +v663=g654.type; +g654.type=v650; +v664=g654.offset; +g654.offset=v651; +v665=g654.stride; +g654.stride=v652; +v666=g654.divisor; +g654.divisor=v653; +v668=v9.vert; +v9.vert=g667; +v670=v9.frag; +v9.frag=g669; +v5.dirty=true; +a1(v2,a0,a2); +v2.viewportWidth=v344; +v2.viewportHeight=v345; +v42[0]=v346; +v42[1]=v347; +v42[2]=v348; +v42[3]=v349; +v20[0]=v351; +v20[1]=v353; +v20[2]=v355; +v20[3]=v357; +v4.blend_enable=v359; +v24[0]=v361; +v24[1]=v363; +v24[2]=v365; +v24[3]=v367; +v4.depth_enable=v369; +v40[0]=v375; +v40[1]=v376; +v40[2]=v377; +v40[3]=v378; +v4.scissor_enable=v380; +v4.stencil_enable=v382; +if(v383){ +g52.cpuTime+=performance.now()-v384; +} +if(v387){ +v7.destroyStream(v386); +} +v6.elements=v388; +v6.offset=v390; +v6.count=v392; +v6.primitive=v394; +v12[g395]=v396; +v12[g398]=v399; +v12[g401]=v402; +v12[g404]=v405; +v12[g407]=v408; +v12[g410]=v411; +v12[g413]=v414; +v12[g416]=v417; +v12[g419]=v420; +v12[g422]=v423; +if(v425){ +v8.destroyStream(v431); +} +g438.state=v439; +g438.x=v440; +g438.y=v441; +g438.z=v442; +g438.w=v443; +g438.buffer=v444; +g438.size=v445; +g438.normalized=v446; +g438.type=v447; +g438.offset=v448; +g438.stride=v449; +g438.divisor=v450; +if(v452){ +v8.destroyStream(v458); +} +g465.state=v466; +g465.x=v467; +g465.y=v468; +g465.z=v469; +g465.w=v470; +g465.buffer=v471; +g465.size=v472; +g465.normalized=v473; +g465.type=v474; +g465.offset=v475; +g465.stride=v476; +g465.divisor=v477; +if(v479){ +v8.destroyStream(v485); +} +g492.state=v493; +g492.x=v494; +g492.y=v495; +g492.z=v496; +g492.w=v497; +g492.buffer=v498; +g492.size=v499; +g492.normalized=v500; +g492.type=v501; +g492.offset=v502; +g492.stride=v503; +g492.divisor=v504; +if(v506){ +v8.destroyStream(v512); +} +g519.state=v520; +g519.x=v521; +g519.y=v522; +g519.z=v523; +g519.w=v524; +g519.buffer=v525; +g519.size=v526; +g519.normalized=v527; +g519.type=v528; +g519.offset=v529; +g519.stride=v530; +g519.divisor=v531; +if(v533){ +v8.destroyStream(v539); +} +g546.state=v547; +g546.x=v548; +g546.y=v549; +g546.z=v550; +g546.w=v551; +g546.buffer=v552; +g546.size=v553; +g546.normalized=v554; +g546.type=v555; +g546.offset=v556; +g546.stride=v557; +g546.divisor=v558; +if(v560){ +v8.destroyStream(v566); +} +g573.state=v574; +g573.x=v575; +g573.y=v576; +g573.z=v577; +g573.w=v578; +g573.buffer=v579; +g573.size=v580; +g573.normalized=v581; +g573.type=v582; +g573.offset=v583; +g573.stride=v584; +g573.divisor=v585; +if(v587){ +v8.destroyStream(v593); +} +g600.state=v601; +g600.x=v602; +g600.y=v603; +g600.z=v604; +g600.w=v605; +g600.buffer=v606; +g600.size=v607; +g600.normalized=v608; +g600.type=v609; +g600.offset=v610; +g600.stride=v611; +g600.divisor=v612; +if(v614){ +v8.destroyStream(v620); +} +g627.state=v628; +g627.x=v629; +g627.y=v630; +g627.z=v631; +g627.w=v632; +g627.buffer=v633; +g627.size=v634; +g627.normalized=v635; +g627.type=v636; +g627.offset=v637; +g627.stride=v638; +g627.divisor=v639; +if(v641){ +v8.destroyStream(v647); +} +g654.state=v655; +g654.x=v656; +g654.y=v657; +g654.z=v658; +g654.w=v659; +g654.buffer=v660; +g654.size=v661; +g654.normalized=v662; +g654.type=v663; +g654.offset=v664; +g654.stride=v665; +g654.divisor=v666; +v9.vert=v668; +v9.frag=v670; +v5.dirty=true; +} +,"batch":function(a0,a1){ +var v671,v672,v711,v712,v713,v714,v715; +v671=v14.angle_instanced_arrays; +v672=v13.next; +if(v672!==v13.cur){ +if(v672){ +v1.bindFramebuffer(36160,v672.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v672; +} +if(v5.dirty){ +var v673,v674,v675,v676,v677,v678,v679,v680,v681,v682,v683,v684,v685,v686,v687,v688,v689,v690,v691,v692,v693,v694,v695,v696,v697,v698,v699,v700,v701,v702,v703,v704,v705,v706; +v673=v4.dither; +if(v673!==v5.dither){ +if(v673){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v673; +} +v674=v22[0]; +v675=v22[1]; +if(v674!==v23[0]||v675!==v23[1]){ +v1.blendEquationSeparate(v674,v675); +v23[0]=v674; +v23[1]=v675; +} +v676=v4.depth_func; +if(v676!==v5.depth_func){ +v1.depthFunc(v676); +v5.depth_func=v676; +} +v677=v26[0]; +v678=v26[1]; +if(v677!==v27[0]||v678!==v27[1]){ +v1.depthRange(v677,v678); +v27[0]=v677; +v27[1]=v678; +} +v679=v4.depth_mask; +if(v679!==v5.depth_mask){ +v1.depthMask(v679); +v5.depth_mask=v679; +} +v680=v28[0]; +v681=v28[1]; +v682=v28[2]; +v683=v28[3]; +if(v680!==v29[0]||v681!==v29[1]||v682!==v29[2]||v683!==v29[3]){ +v1.colorMask(v680,v681,v682,v683); +v29[0]=v680; +v29[1]=v681; +v29[2]=v682; +v29[3]=v683; +} +v684=v4.cull_enable; +if(v684!==v5.cull_enable){ +if(v684){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v684; +} +v685=v4.cull_face; +if(v685!==v5.cull_face){ +v1.cullFace(v685); +v5.cull_face=v685; +} +v686=v4.frontFace; +if(v686!==v5.frontFace){ +v1.frontFace(v686); +v5.frontFace=v686; +} +v687=v4.lineWidth; +if(v687!==v5.lineWidth){ +v1.lineWidth(v687); +v5.lineWidth=v687; +} +v688=v4.polygonOffset_enable; +if(v688!==v5.polygonOffset_enable){ +if(v688){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v688; +} +v689=v30[0]; +v690=v30[1]; +if(v689!==v31[0]||v690!==v31[1]){ +v1.polygonOffset(v689,v690); +v31[0]=v689; +v31[1]=v690; +} +v691=v4.sample_alpha; +if(v691!==v5.sample_alpha){ +if(v691){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v691; +} +v692=v4.sample_enable; +if(v692!==v5.sample_enable){ +if(v692){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v692; +} +v693=v32[0]; +v694=v32[1]; +if(v693!==v33[0]||v694!==v33[1]){ +v1.sampleCoverage(v693,v694); +v33[0]=v693; +v33[1]=v694; +} +v695=v4.stencil_mask; +if(v695!==v5.stencil_mask){ +v1.stencilMask(v695); +v5.stencil_mask=v695; +} +v696=v34[0]; +v697=v34[1]; +v698=v34[2]; +if(v696!==v35[0]||v697!==v35[1]||v698!==v35[2]){ +v1.stencilFunc(v696,v697,v698); +v35[0]=v696; +v35[1]=v697; +v35[2]=v698; +} +v699=v36[0]; +v700=v36[1]; +v701=v36[2]; +v702=v36[3]; +if(v699!==v37[0]||v700!==v37[1]||v701!==v37[2]||v702!==v37[3]){ +v1.stencilOpSeparate(v699,v700,v701,v702); +v37[0]=v699; +v37[1]=v700; +v37[2]=v701; +v37[3]=v702; +} +v703=v38[0]; +v704=v38[1]; +v705=v38[2]; +v706=v38[3]; +if(v703!==v39[0]||v704!==v39[1]||v705!==v39[2]||v706!==v39[3]){ +v1.stencilOpSeparate(v703,v704,v705,v706); +v39[0]=v703; +v39[1]=v704; +v39[2]=v705; +v39[3]=v706; +} +} +v1.blendColor(0,0,0,1); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=1; +if(g707){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g707; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +if(g708){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=g708; +if(g709){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g709; +if(g710){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=g710; +v711=v5.profile; +if(v711){ +v712=performance.now(); +g52.count+=a1; +} +v1.useProgram(g109.program); +v713=v14.angle_instanced_arrays; +var v917; +v11.setVAO(null); +v1.uniform1i(g291.location,false); +v1.uniform1i(g305.location,g306.bind()); +v917=v6.instances; +for(v714=0; +v714=0&&v720>=0))g18.commandRaise(g90,g19); +v721=v2.viewportWidth; +v2.viewportWidth=v719; +v722=v2.viewportHeight; +v2.viewportHeight=v720; +v1.viewport(v717,v718,v719,v720); +v43[0]=v717; +v43[1]=v718; +v43[2]=v719; +v43[3]=v720; +v723=v715["viewport"]; +if(!(v723&&typeof v723==="object"))g18.commandRaise(g100,g19); +v724=v723.x|0; +v725=v723.y|0; +v726="width" in v723?v723.width|0:(v2.framebufferWidth-v724); +v727="height" in v723?v723.height|0:(v2.framebufferHeight-v725); +if(!(v726>=0&&v727>=0))g18.commandRaise(g100,g19); +v1.scissor(v724,v725,v726,v727); +v41[0]=v724; +v41[1]=v725; +v41[2]=v726; +v41[3]=v727; +v728=g111.call(this,v2,v715,v714); +if(!(v728&&(typeof v728==="object"||typeof v728==="function")&&(v16(v728)||v8.getBuffer(v728)||v8.getBuffer(v728.buffer)||v16(v728.buffer)||("constant" in v728&&(typeof v728.constant==="number"||v17(v728.constant))))))g18.commandRaise(g113,g19); +v729=false; +v730=1; +v731=0; +v732=0; +v733=0; +v734=0; +v735=null; +v736=0; +v737=false; +v738=5126; +v739=0; +v740=0; +v741=0; +if(v16(v728)){ +v729=true; +v735=v8.createStream(34962,v728); +v738=v735.dtype; +} +else{ +v735=v8.getBuffer(v728); +if(v735){ +v738=v735.dtype; +} +else if("constant" in v728){ +v730=2; +if(typeof v728.constant === "number"){ +v731=v728.constant; +v732=v733=v734=0; +} +else{ +v731=v728.constant.length>0?v728.constant[0]:0; +v732=v728.constant.length>1?v728.constant[1]:0; +v733=v728.constant.length>2?v728.constant[2]:0; +v734=v728.constant.length>3?v728.constant[3]:0; +} +} +else{ +if(v16(v728.buffer)){ +v735=v8.createStream(34962,v728.buffer); +} +else{ +v735=v8.getBuffer(v728.buffer); +} +v738="type" in v728?v49[v728.type]:v735.dtype; +v737=!!v728.normalized; +v736=v728.size|0; +v739=v728.offset|0; +v740=v728.stride|0; +v741=v728.divisor|0; +} +} +v742=g127.location; +v743=v10[v742]; +if(v730===1){ +if(!v743.buffer){ +v1.enableVertexAttribArray(v742); +} +v744=v736||4; +if(v743.type!==v738||v743.size!==v744||v743.buffer!==v735||v743.normalized!==v737||v743.offset!==v739||v743.stride!==v740){ +v1.bindBuffer(34962,v735.buffer); +v1.vertexAttribPointer(v742,v744,v738,v737,v740,v739); +v743.type=v738; +v743.size=v744; +v743.buffer=v735; +v743.normalized=v737; +v743.offset=v739; +v743.stride=v740; +} +if(v743.divisor!==v741){ +v713.vertexAttribDivisorANGLE(v742,v741); +v743.divisor=v741; +} +} +else{ +if(v743.buffer){ +v1.disableVertexAttribArray(v742); +v743.buffer=null; +} +if(v743.x!==v731||v743.y!==v732||v743.z!==v733||v743.w!==v734){ +v1.vertexAttrib4f(v742,v731,v732,v733,v734); +v743.x=v731; +v743.y=v732; +v743.z=v733; +v743.w=v734; +} +} +v745=g131.call(this,v2,v715,v714); +if(!(v745&&(typeof v745==="object"||typeof v745==="function")&&(v16(v745)||v8.getBuffer(v745)||v8.getBuffer(v745.buffer)||v16(v745.buffer)||("constant" in v745&&(typeof v745.constant==="number"||v17(v745.constant))))))g18.commandRaise(g133,g19); +v746=false; +v747=1; +v748=0; +v749=0; +v750=0; +v751=0; +v752=null; +v753=0; +v754=false; +v755=5126; +v756=0; +v757=0; +v758=0; +if(v16(v745)){ +v746=true; +v752=v8.createStream(34962,v745); +v755=v752.dtype; +} +else{ +v752=v8.getBuffer(v745); +if(v752){ +v755=v752.dtype; +} +else if("constant" in v745){ +v747=2; +if(typeof v745.constant === "number"){ +v748=v745.constant; +v749=v750=v751=0; +} +else{ +v748=v745.constant.length>0?v745.constant[0]:0; +v749=v745.constant.length>1?v745.constant[1]:0; +v750=v745.constant.length>2?v745.constant[2]:0; +v751=v745.constant.length>3?v745.constant[3]:0; +} +} +else{ +if(v16(v745.buffer)){ +v752=v8.createStream(34962,v745.buffer); +} +else{ +v752=v8.getBuffer(v745.buffer); +} +v755="type" in v745?v49[v745.type]:v752.dtype; +v754=!!v745.normalized; +v753=v745.size|0; +v756=v745.offset|0; +v757=v745.stride|0; +v758=v745.divisor|0; +} +} +v759=g147.location; +v760=v10[v759]; +if(v747===1){ +if(!v760.buffer){ +v1.enableVertexAttribArray(v759); +} +v761=v753||1; +if(v760.type!==v755||v760.size!==v761||v760.buffer!==v752||v760.normalized!==v754||v760.offset!==v756||v760.stride!==v757){ +v1.bindBuffer(34962,v752.buffer); +v1.vertexAttribPointer(v759,v761,v755,v754,v757,v756); +v760.type=v755; +v760.size=v761; +v760.buffer=v752; +v760.normalized=v754; +v760.offset=v756; +v760.stride=v757; +} +if(v760.divisor!==v758){ +v713.vertexAttribDivisorANGLE(v759,v758); +v760.divisor=v758; +} +} +else{ +if(v760.buffer){ +v1.disableVertexAttribArray(v759); +v760.buffer=null; +} +if(v760.x!==v748||v760.y!==v749||v760.z!==v750||v760.w!==v751){ +v1.vertexAttrib4f(v759,v748,v749,v750,v751); +v760.x=v748; +v760.y=v749; +v760.z=v750; +v760.w=v751; +} +} +v762=g151.call(this,v2,v715,v714); +if(!(v762&&(typeof v762==="object"||typeof v762==="function")&&(v16(v762)||v8.getBuffer(v762)||v8.getBuffer(v762.buffer)||v16(v762.buffer)||("constant" in v762&&(typeof v762.constant==="number"||v17(v762.constant))))))g18.commandRaise(g153,g19); +v763=false; +v764=1; +v765=0; +v766=0; +v767=0; +v768=0; +v769=null; +v770=0; +v771=false; +v772=5126; +v773=0; +v774=0; +v775=0; +if(v16(v762)){ +v763=true; +v769=v8.createStream(34962,v762); +v772=v769.dtype; +} +else{ +v769=v8.getBuffer(v762); +if(v769){ +v772=v769.dtype; +} +else if("constant" in v762){ +v764=2; +if(typeof v762.constant === "number"){ +v765=v762.constant; +v766=v767=v768=0; +} +else{ +v765=v762.constant.length>0?v762.constant[0]:0; +v766=v762.constant.length>1?v762.constant[1]:0; +v767=v762.constant.length>2?v762.constant[2]:0; +v768=v762.constant.length>3?v762.constant[3]:0; +} +} +else{ +if(v16(v762.buffer)){ +v769=v8.createStream(34962,v762.buffer); +} +else{ +v769=v8.getBuffer(v762.buffer); +} +v772="type" in v762?v49[v762.type]:v769.dtype; +v771=!!v762.normalized; +v770=v762.size|0; +v773=v762.offset|0; +v774=v762.stride|0; +v775=v762.divisor|0; +} +} +v776=g167.location; +v777=v10[v776]; +if(v764===1){ +if(!v777.buffer){ +v1.enableVertexAttribArray(v776); +} +v778=v770||4; +if(v777.type!==v772||v777.size!==v778||v777.buffer!==v769||v777.normalized!==v771||v777.offset!==v773||v777.stride!==v774){ +v1.bindBuffer(34962,v769.buffer); +v1.vertexAttribPointer(v776,v778,v772,v771,v774,v773); +v777.type=v772; +v777.size=v778; +v777.buffer=v769; +v777.normalized=v771; +v777.offset=v773; +v777.stride=v774; +} +if(v777.divisor!==v775){ +v713.vertexAttribDivisorANGLE(v776,v775); +v777.divisor=v775; +} +} +else{ +if(v777.buffer){ +v1.disableVertexAttribArray(v776); +v777.buffer=null; +} +if(v777.x!==v765||v777.y!==v766||v777.z!==v767||v777.w!==v768){ +v1.vertexAttrib4f(v776,v765,v766,v767,v768); +v777.x=v765; +v777.y=v766; +v777.z=v767; +v777.w=v768; +} +} +v779=g171.call(this,v2,v715,v714); +if(!(v779&&(typeof v779==="object"||typeof v779==="function")&&(v16(v779)||v8.getBuffer(v779)||v8.getBuffer(v779.buffer)||v16(v779.buffer)||("constant" in v779&&(typeof v779.constant==="number"||v17(v779.constant))))))g18.commandRaise(g173,g19); +v780=false; +v781=1; +v782=0; +v783=0; +v784=0; +v785=0; +v786=null; +v787=0; +v788=false; +v789=5126; +v790=0; +v791=0; +v792=0; +if(v16(v779)){ +v780=true; +v786=v8.createStream(34962,v779); +v789=v786.dtype; +} +else{ +v786=v8.getBuffer(v779); +if(v786){ +v789=v786.dtype; +} +else if("constant" in v779){ +v781=2; +if(typeof v779.constant === "number"){ +v782=v779.constant; +v783=v784=v785=0; +} +else{ +v782=v779.constant.length>0?v779.constant[0]:0; +v783=v779.constant.length>1?v779.constant[1]:0; +v784=v779.constant.length>2?v779.constant[2]:0; +v785=v779.constant.length>3?v779.constant[3]:0; +} +} +else{ +if(v16(v779.buffer)){ +v786=v8.createStream(34962,v779.buffer); +} +else{ +v786=v8.getBuffer(v779.buffer); +} +v789="type" in v779?v49[v779.type]:v786.dtype; +v788=!!v779.normalized; +v787=v779.size|0; +v790=v779.offset|0; +v791=v779.stride|0; +v792=v779.divisor|0; +} +} +v793=g187.location; +v794=v10[v793]; +if(v781===1){ +if(!v794.buffer){ +v1.enableVertexAttribArray(v793); +} +v795=v787||1; +if(v794.type!==v789||v794.size!==v795||v794.buffer!==v786||v794.normalized!==v788||v794.offset!==v790||v794.stride!==v791){ +v1.bindBuffer(34962,v786.buffer); +v1.vertexAttribPointer(v793,v795,v789,v788,v791,v790); +v794.type=v789; +v794.size=v795; +v794.buffer=v786; +v794.normalized=v788; +v794.offset=v790; +v794.stride=v791; +} +if(v794.divisor!==v792){ +v713.vertexAttribDivisorANGLE(v793,v792); +v794.divisor=v792; +} +} +else{ +if(v794.buffer){ +v1.disableVertexAttribArray(v793); +v794.buffer=null; +} +if(v794.x!==v782||v794.y!==v783||v794.z!==v784||v794.w!==v785){ +v1.vertexAttrib4f(v793,v782,v783,v784,v785); +v794.x=v782; +v794.y=v783; +v794.z=v784; +v794.w=v785; +} +} +v796=g191.call(this,v2,v715,v714); +if(!(v796&&(typeof v796==="object"||typeof v796==="function")&&(v16(v796)||v8.getBuffer(v796)||v8.getBuffer(v796.buffer)||v16(v796.buffer)||("constant" in v796&&(typeof v796.constant==="number"||v17(v796.constant))))))g18.commandRaise(g193,g19); +v797=false; +v798=1; +v799=0; +v800=0; +v801=0; +v802=0; +v803=null; +v804=0; +v805=false; +v806=5126; +v807=0; +v808=0; +v809=0; +if(v16(v796)){ +v797=true; +v803=v8.createStream(34962,v796); +v806=v803.dtype; +} +else{ +v803=v8.getBuffer(v796); +if(v803){ +v806=v803.dtype; +} +else if("constant" in v796){ +v798=2; +if(typeof v796.constant === "number"){ +v799=v796.constant; +v800=v801=v802=0; +} +else{ +v799=v796.constant.length>0?v796.constant[0]:0; +v800=v796.constant.length>1?v796.constant[1]:0; +v801=v796.constant.length>2?v796.constant[2]:0; +v802=v796.constant.length>3?v796.constant[3]:0; +} +} +else{ +if(v16(v796.buffer)){ +v803=v8.createStream(34962,v796.buffer); +} +else{ +v803=v8.getBuffer(v796.buffer); +} +v806="type" in v796?v49[v796.type]:v803.dtype; +v805=!!v796.normalized; +v804=v796.size|0; +v807=v796.offset|0; +v808=v796.stride|0; +v809=v796.divisor|0; +} +} +v810=g207.location; +v811=v10[v810]; +if(v798===1){ +if(!v811.buffer){ +v1.enableVertexAttribArray(v810); +} +v812=v804||1; +if(v811.type!==v806||v811.size!==v812||v811.buffer!==v803||v811.normalized!==v805||v811.offset!==v807||v811.stride!==v808){ +v1.bindBuffer(34962,v803.buffer); +v1.vertexAttribPointer(v810,v812,v806,v805,v808,v807); +v811.type=v806; +v811.size=v812; +v811.buffer=v803; +v811.normalized=v805; +v811.offset=v807; +v811.stride=v808; +} +if(v811.divisor!==v809){ +v713.vertexAttribDivisorANGLE(v810,v809); +v811.divisor=v809; +} +} +else{ +if(v811.buffer){ +v1.disableVertexAttribArray(v810); +v811.buffer=null; +} +if(v811.x!==v799||v811.y!==v800||v811.z!==v801||v811.w!==v802){ +v1.vertexAttrib4f(v810,v799,v800,v801,v802); +v811.x=v799; +v811.y=v800; +v811.z=v801; +v811.w=v802; +} +} +v813=g211.call(this,v2,v715,v714); +if(!(v813&&(typeof v813==="object"||typeof v813==="function")&&(v16(v813)||v8.getBuffer(v813)||v8.getBuffer(v813.buffer)||v16(v813.buffer)||("constant" in v813&&(typeof v813.constant==="number"||v17(v813.constant))))))g18.commandRaise(g213,g19); +v814=false; +v815=1; +v816=0; +v817=0; +v818=0; +v819=0; +v820=null; +v821=0; +v822=false; +v823=5126; +v824=0; +v825=0; +v826=0; +if(v16(v813)){ +v814=true; +v820=v8.createStream(34962,v813); +v823=v820.dtype; +} +else{ +v820=v8.getBuffer(v813); +if(v820){ +v823=v820.dtype; +} +else if("constant" in v813){ +v815=2; +if(typeof v813.constant === "number"){ +v816=v813.constant; +v817=v818=v819=0; +} +else{ +v816=v813.constant.length>0?v813.constant[0]:0; +v817=v813.constant.length>1?v813.constant[1]:0; +v818=v813.constant.length>2?v813.constant[2]:0; +v819=v813.constant.length>3?v813.constant[3]:0; +} +} +else{ +if(v16(v813.buffer)){ +v820=v8.createStream(34962,v813.buffer); +} +else{ +v820=v8.getBuffer(v813.buffer); +} +v823="type" in v813?v49[v813.type]:v820.dtype; +v822=!!v813.normalized; +v821=v813.size|0; +v824=v813.offset|0; +v825=v813.stride|0; +v826=v813.divisor|0; +} +} +v827=g227.location; +v828=v10[v827]; +if(v815===1){ +if(!v828.buffer){ +v1.enableVertexAttribArray(v827); +} +v829=v821||1; +if(v828.type!==v823||v828.size!==v829||v828.buffer!==v820||v828.normalized!==v822||v828.offset!==v824||v828.stride!==v825){ +v1.bindBuffer(34962,v820.buffer); +v1.vertexAttribPointer(v827,v829,v823,v822,v825,v824); +v828.type=v823; +v828.size=v829; +v828.buffer=v820; +v828.normalized=v822; +v828.offset=v824; +v828.stride=v825; +} +if(v828.divisor!==v826){ +v713.vertexAttribDivisorANGLE(v827,v826); +v828.divisor=v826; +} +} +else{ +if(v828.buffer){ +v1.disableVertexAttribArray(v827); +v828.buffer=null; +} +if(v828.x!==v816||v828.y!==v817||v828.z!==v818||v828.w!==v819){ +v1.vertexAttrib4f(v827,v816,v817,v818,v819); +v828.x=v816; +v828.y=v817; +v828.z=v818; +v828.w=v819; +} +} +v830=g231.call(this,v2,v715,v714); +if(!(v830&&(typeof v830==="object"||typeof v830==="function")&&(v16(v830)||v8.getBuffer(v830)||v8.getBuffer(v830.buffer)||v16(v830.buffer)||("constant" in v830&&(typeof v830.constant==="number"||v17(v830.constant))))))g18.commandRaise(g233,g19); +v831=false; +v832=1; +v833=0; +v834=0; +v835=0; +v836=0; +v837=null; +v838=0; +v839=false; +v840=5126; +v841=0; +v842=0; +v843=0; +if(v16(v830)){ +v831=true; +v837=v8.createStream(34962,v830); +v840=v837.dtype; +} +else{ +v837=v8.getBuffer(v830); +if(v837){ +v840=v837.dtype; +} +else if("constant" in v830){ +v832=2; +if(typeof v830.constant === "number"){ +v833=v830.constant; +v834=v835=v836=0; +} +else{ +v833=v830.constant.length>0?v830.constant[0]:0; +v834=v830.constant.length>1?v830.constant[1]:0; +v835=v830.constant.length>2?v830.constant[2]:0; +v836=v830.constant.length>3?v830.constant[3]:0; +} +} +else{ +if(v16(v830.buffer)){ +v837=v8.createStream(34962,v830.buffer); +} +else{ +v837=v8.getBuffer(v830.buffer); +} +v840="type" in v830?v49[v830.type]:v837.dtype; +v839=!!v830.normalized; +v838=v830.size|0; +v841=v830.offset|0; +v842=v830.stride|0; +v843=v830.divisor|0; +} +} +v844=g247.location; +v845=v10[v844]; +if(v832===1){ +if(!v845.buffer){ +v1.enableVertexAttribArray(v844); +} +v846=v838||1; +if(v845.type!==v840||v845.size!==v846||v845.buffer!==v837||v845.normalized!==v839||v845.offset!==v841||v845.stride!==v842){ +v1.bindBuffer(34962,v837.buffer); +v1.vertexAttribPointer(v844,v846,v840,v839,v842,v841); +v845.type=v840; +v845.size=v846; +v845.buffer=v837; +v845.normalized=v839; +v845.offset=v841; +v845.stride=v842; +} +if(v845.divisor!==v843){ +v713.vertexAttribDivisorANGLE(v844,v843); +v845.divisor=v843; +} +} +else{ +if(v845.buffer){ +v1.disableVertexAttribArray(v844); +v845.buffer=null; +} +if(v845.x!==v833||v845.y!==v834||v845.z!==v835||v845.w!==v836){ +v1.vertexAttrib4f(v844,v833,v834,v835,v836); +v845.x=v833; +v845.y=v834; +v845.z=v835; +v845.w=v836; +} +} +v847=g251.call(this,v2,v715,v714); +if(!(v847&&(typeof v847==="object"||typeof v847==="function")&&(v16(v847)||v8.getBuffer(v847)||v8.getBuffer(v847.buffer)||v16(v847.buffer)||("constant" in v847&&(typeof v847.constant==="number"||v17(v847.constant))))))g18.commandRaise(g253,g19); +v848=false; +v849=1; +v850=0; +v851=0; +v852=0; +v853=0; +v854=null; +v855=0; +v856=false; +v857=5126; +v858=0; +v859=0; +v860=0; +if(v16(v847)){ +v848=true; +v854=v8.createStream(34962,v847); +v857=v854.dtype; +} +else{ +v854=v8.getBuffer(v847); +if(v854){ +v857=v854.dtype; +} +else if("constant" in v847){ +v849=2; +if(typeof v847.constant === "number"){ +v850=v847.constant; +v851=v852=v853=0; +} +else{ +v850=v847.constant.length>0?v847.constant[0]:0; +v851=v847.constant.length>1?v847.constant[1]:0; +v852=v847.constant.length>2?v847.constant[2]:0; +v853=v847.constant.length>3?v847.constant[3]:0; +} +} +else{ +if(v16(v847.buffer)){ +v854=v8.createStream(34962,v847.buffer); +} +else{ +v854=v8.getBuffer(v847.buffer); +} +v857="type" in v847?v49[v847.type]:v854.dtype; +v856=!!v847.normalized; +v855=v847.size|0; +v858=v847.offset|0; +v859=v847.stride|0; +v860=v847.divisor|0; +} +} +v861=g267.location; +v862=v10[v861]; +if(v849===1){ +if(!v862.buffer){ +v1.enableVertexAttribArray(v861); +} +v863=v855||1; +if(v862.type!==v857||v862.size!==v863||v862.buffer!==v854||v862.normalized!==v856||v862.offset!==v858||v862.stride!==v859){ +v1.bindBuffer(34962,v854.buffer); +v1.vertexAttribPointer(v861,v863,v857,v856,v859,v858); +v862.type=v857; +v862.size=v863; +v862.buffer=v854; +v862.normalized=v856; +v862.offset=v858; +v862.stride=v859; +} +if(v862.divisor!==v860){ +v713.vertexAttribDivisorANGLE(v861,v860); +v862.divisor=v860; +} +} +else{ +if(v862.buffer){ +v1.disableVertexAttribArray(v861); +v862.buffer=null; +} +if(v862.x!==v850||v862.y!==v851||v862.z!==v852||v862.w!==v853){ +v1.vertexAttrib4f(v861,v850,v851,v852,v853); +v862.x=v850; +v862.y=v851; +v862.z=v852; +v862.w=v853; +} +} +v864=g271.call(this,v2,v715,v714); +if(!(v864&&(typeof v864==="object"||typeof v864==="function")&&(v16(v864)||v8.getBuffer(v864)||v8.getBuffer(v864.buffer)||v16(v864.buffer)||("constant" in v864&&(typeof v864.constant==="number"||v17(v864.constant))))))g18.commandRaise(g273,g19); +v865=false; +v866=1; +v867=0; +v868=0; +v869=0; +v870=0; +v871=null; +v872=0; +v873=false; +v874=5126; +v875=0; +v876=0; +v877=0; +if(v16(v864)){ +v865=true; +v871=v8.createStream(34962,v864); +v874=v871.dtype; +} +else{ +v871=v8.getBuffer(v864); +if(v871){ +v874=v871.dtype; +} +else if("constant" in v864){ +v866=2; +if(typeof v864.constant === "number"){ +v867=v864.constant; +v868=v869=v870=0; +} +else{ +v867=v864.constant.length>0?v864.constant[0]:0; +v868=v864.constant.length>1?v864.constant[1]:0; +v869=v864.constant.length>2?v864.constant[2]:0; +v870=v864.constant.length>3?v864.constant[3]:0; +} +} +else{ +if(v16(v864.buffer)){ +v871=v8.createStream(34962,v864.buffer); +} +else{ +v871=v8.getBuffer(v864.buffer); +} +v874="type" in v864?v49[v864.type]:v871.dtype; +v873=!!v864.normalized; +v872=v864.size|0; +v875=v864.offset|0; +v876=v864.stride|0; +v877=v864.divisor|0; +} +} +v878=g287.location; +v879=v10[v878]; +if(v866===1){ +if(!v879.buffer){ +v1.enableVertexAttribArray(v878); +} +v880=v872||1; +if(v879.type!==v874||v879.size!==v880||v879.buffer!==v871||v879.normalized!==v873||v879.offset!==v875||v879.stride!==v876){ +v1.bindBuffer(34962,v871.buffer); +v1.vertexAttribPointer(v878,v880,v874,v873,v876,v875); +v879.type=v874; +v879.size=v880; +v879.buffer=v871; +v879.normalized=v873; +v879.offset=v875; +v879.stride=v876; +} +if(v879.divisor!==v877){ +v713.vertexAttribDivisorANGLE(v878,v877); +v879.divisor=v877; +} +} +else{ +if(v879.buffer){ +v1.disableVertexAttribArray(v878); +v879.buffer=null; +} +if(v879.x!==v867||v879.y!==v868||v879.z!==v869||v879.w!==v870){ +v1.vertexAttrib4f(v878,v867,v868,v869,v870); +v879.x=v867; +v879.y=v868; +v879.z=v869; +v879.w=v870; +} +} +v881=v715["markerTexture"]; +if(v881&&v881._reglType==="framebuffer"){ +v881=v881.color[0]; +} +if(!(typeof v881==="function"&&v881._reglType==="texture2d"))g18.commandRaise(g294,g19); +v882=v881._texture; +v1.uniform1i(g292.location,v882.bind()); +v883=v715["opacity"]; +if(!(typeof v883==="number"))g18.commandRaise(g298,g19); +if(!v714||v884!==v883){ +v884=v883; +v1.uniform1f(g296.location,v883); +} +v885=g300.call(this,v2,v715,v714); +if(!(v17(v885)&&v885.length===2))g18.commandRaise(g302,g19); +v886=v885[0]; +v888=v885[1]; +if(!v714||v887!==v886||v889!==v888){ +v887=v886; +v889=v888; +v1.uniform2f(g299.location,v886,v888); +} +v890=v2["pixelRatio"]; +if(!(typeof v890==="number"))g18.commandRaise(g309,g19); +if(!v714||v891!==v890){ +v891=v890; +v1.uniform1f(g307.location,v890); +} +v892=v715["scale"]; +if(!(v17(v892)&&v892.length===2))g18.commandRaise(g312,g19); +v893=v892[0]; +v895=v892[1]; +if(!v714||v894!==v893||v896!==v895){ +v894=v893; +v896=v895; +v1.uniform2f(g310.location,v893,v895); +} +v897=v715["scaleFract"]; +if(!(v17(v897)&&v897.length===2))g18.commandRaise(g317,g19); +v898=v897[0]; +v900=v897[1]; +if(!v714||v899!==v898||v901!==v900){ +v899=v898; +v901=v900; +v1.uniform2f(g315.location,v898,v900); +} +v902=v715["translate"]; +if(!(v17(v902)&&v902.length===2))g18.commandRaise(g322,g19); +v903=v902[0]; +v905=v902[1]; +if(!v714||v904!==v903||v906!==v905){ +v904=v903; +v906=v905; +v1.uniform2f(g320.location,v903,v905); +} +v907=v715["translateFract"]; +if(!(v17(v907)&&v907.length===2))g18.commandRaise(g327,g19); +v908=v907[0]; +v910=v907[1]; +if(!v714||v909!==v908||v911!==v910){ +v909=v908; +v911=v910; +v1.uniform2f(g325.location,v908,v910); +} +v912=v715["elements"]; +v913=null; +v914=v16(v912); +if(v914){ +v913=v7.createStream(v912); +} +else{ +v913=v7.getElements(v912); +if(!(!v912||v913))g18.commandRaise(g333,g19); +} +if(v913)v1.bindBuffer(34963,v913.buffer.buffer); +v915=v715["offset"]; +if(!(v915>=0))g18.commandRaise(g335,g19); +v916=v715["count"]; +if(!(typeof v916==="number"&&v916>=0&&v916===(v916|0)))g18.commandRaise(g337,g19); +if(v916){ +if(v917>0){ +if(v913){ +v713.drawElementsInstancedANGLE(0,v916,v913.type,v915<<((v913.type-5121)>>1),v917); +} +else{ +v713.drawArraysInstancedANGLE(0,v915,v916,v917); +} +} +else if(v917<0){ +if(v913){ +v1.drawElements(0,v916,v913.type,v915<<((v913.type-5121)>>1)); +} +else{ +v1.drawArrays(0,v915,v916); +} +} +v2.viewportWidth=v721; +v2.viewportHeight=v722; +if(v729){ +v8.destroyStream(v735); +} +if(v746){ +v8.destroyStream(v752); +} +if(v763){ +v8.destroyStream(v769); +} +if(v780){ +v8.destroyStream(v786); +} +if(v797){ +v8.destroyStream(v803); +} +if(v814){ +v8.destroyStream(v820); +} +if(v831){ +v8.destroyStream(v837); +} +if(v848){ +v8.destroyStream(v854); +} +if(v865){ +v8.destroyStream(v871); +} +v882.unbind(); +if(v914){ +v7.destroyStream(v913); +} +} +} +g306.unbind(); +v5.dirty=true; +v11.setVAO(null); +if(v711){ +g52.cpuTime+=performance.now()-v712; +} +} +,} + +} \ No newline at end of file diff --git a/src/generated/regl-codegen/19769c875db736c08a744c0a6aabe28276ed06aa24fdb7c36506a9f4c1f56f13 b/src/generated/regl-codegen/19769c875db736c08a744c0a6aabe28276ed06aa24fdb7c36506a9f4c1f56f13 new file mode 100644 index 00000000000..4d7949eb5a6 --- /dev/null +++ b/src/generated/regl-codegen/19769c875db736c08a744c0a6aabe28276ed06aa24fdb7c36506a9f4c1f56f13 @@ -0,0 +1,3375 @@ +module.exports = function anonymous(g0,g18,g19,g52,g90,g97,g98,g100,g105,g106,g109,g111,g113,g127,g131,g133,g147,g151,g153,g167,g171,g173,g187,g191,g193,g207,g211,g213,g227,g231,g233,g247,g251,g253,g267,g271,g273,g287,g291,g292,g294,g295,g296,g298,g301,g302,g303,g305,g306,g308,g311,g313,g316,g318,g321,g323,g329,g331,g333,g346,g348,g350,g352,g354,g356,g358,g360,g362,g364,g375,g377,g389,g391,g393,g394,g397,g400,g403,g406,g409,g412,g415,g418,g434,g461,g488,g515,g542,g569,g596,g623,g650,g663,g665,g703,g704,g705,g706 +) { +"use strict"; +var v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51; +v1=g0.gl; +v2=g0.context; +v3=g0.strings; +v4=g0.next; +v5=g0.current; +v6=g0.draw; +v7=g0.elements; +v8=g0.buffer; +v9=g0.shader; +v10=g0.attributes; +v11=g0.vao; +v12=g0.uniforms; +v13=g0.framebuffer; +v14=g0.extensions; +v15=g0.timer; +v16=g0.isBufferArgs; +v17=g0.isArrayLike; +v20=v4.blend_color; +v21=v5.blend_color; +v22=v4.blend_equation; +v23=v5.blend_equation; +v24=v4.blend_func; +v25=v5.blend_func; +v26=v4.depth_range; +v27=v5.depth_range; +v28=v4.colorMask; +v29=v5.colorMask; +v30=v4.polygonOffset_offset; +v31=v5.polygonOffset_offset; +v32=v4.sample_coverage; +v33=v5.sample_coverage; +v34=v4.stencil_func; +v35=v5.stencil_func; +v36=v4.stencil_opFront; +v37=v5.stencil_opFront; +v38=v4.stencil_opBack; +v39=v5.stencil_opBack; +v40=v4.scissor_box; +v41=v5.scissor_box; +v42=v4.viewport; +v43=v5.viewport; +v44={ +"points":0,"point":0,"lines":1,"line":1,"triangles":4,"triangle":4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6} +; +v45={ +"never":512,"less":513,"<":513,"equal":514,"=":514,"==":514,"===":514,"lequal":515,"<=":515,"greater":516,">":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +return { +"draw":function(a0){ +var v53,v54,v89,v91,v92,v93,v94,v95,v96,v99,v101,v102,v103,v104,v107,v108,v110,v112,v114,v115,v116,v117,v118,v119,v120,v121,v122,v123,v124,v125,v126,v128,v129,v130,v132,v134,v135,v136,v137,v138,v139,v140,v141,v142,v143,v144,v145,v146,v148,v149,v150,v152,v154,v155,v156,v157,v158,v159,v160,v161,v162,v163,v164,v165,v166,v168,v169,v170,v172,v174,v175,v176,v177,v178,v179,v180,v181,v182,v183,v184,v185,v186,v188,v189,v190,v192,v194,v195,v196,v197,v198,v199,v200,v201,v202,v203,v204,v205,v206,v208,v209,v210,v212,v214,v215,v216,v217,v218,v219,v220,v221,v222,v223,v224,v225,v226,v228,v229,v230,v232,v234,v235,v236,v237,v238,v239,v240,v241,v242,v243,v244,v245,v246,v248,v249,v250,v252,v254,v255,v256,v257,v258,v259,v260,v261,v262,v263,v264,v265,v266,v268,v269,v270,v272,v274,v275,v276,v277,v278,v279,v280,v281,v282,v283,v284,v285,v286,v288,v289,v290,v293,v297,v299,v300,v304,v307,v309,v310,v312,v314,v315,v317,v319,v320,v322,v324,v325,v326,v327,v328,v330,v332,v334; +v53=v14.angle_instanced_arrays; +v54=v13.next; +if(v54!==v13.cur){ +if(v54){ +v1.bindFramebuffer(36160,v54.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v54; +} +if(v5.dirty){ +var v55,v56,v57,v58,v59,v60,v61,v62,v63,v64,v65,v66,v67,v68,v69,v70,v71,v72,v73,v74,v75,v76,v77,v78,v79,v80,v81,v82,v83,v84,v85,v86,v87,v88; +v55=v4.dither; +if(v55!==v5.dither){ +if(v55){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v55; +} +v56=v22[0]; +v57=v22[1]; +if(v56!==v23[0]||v57!==v23[1]){ +v1.blendEquationSeparate(v56,v57); +v23[0]=v56; +v23[1]=v57; +} +v58=v4.depth_func; +if(v58!==v5.depth_func){ +v1.depthFunc(v58); +v5.depth_func=v58; +} +v59=v26[0]; +v60=v26[1]; +if(v59!==v27[0]||v60!==v27[1]){ +v1.depthRange(v59,v60); +v27[0]=v59; +v27[1]=v60; +} +v61=v4.depth_mask; +if(v61!==v5.depth_mask){ +v1.depthMask(v61); +v5.depth_mask=v61; +} +v62=v28[0]; +v63=v28[1]; +v64=v28[2]; +v65=v28[3]; +if(v62!==v29[0]||v63!==v29[1]||v64!==v29[2]||v65!==v29[3]){ +v1.colorMask(v62,v63,v64,v65); +v29[0]=v62; +v29[1]=v63; +v29[2]=v64; +v29[3]=v65; +} +v66=v4.cull_enable; +if(v66!==v5.cull_enable){ +if(v66){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v66; +} +v67=v4.cull_face; +if(v67!==v5.cull_face){ +v1.cullFace(v67); +v5.cull_face=v67; +} +v68=v4.frontFace; +if(v68!==v5.frontFace){ +v1.frontFace(v68); +v5.frontFace=v68; +} +v69=v4.lineWidth; +if(v69!==v5.lineWidth){ +v1.lineWidth(v69); +v5.lineWidth=v69; +} +v70=v4.polygonOffset_enable; +if(v70!==v5.polygonOffset_enable){ +if(v70){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v70; +} +v71=v30[0]; +v72=v30[1]; +if(v71!==v31[0]||v72!==v31[1]){ +v1.polygonOffset(v71,v72); +v31[0]=v71; +v31[1]=v72; +} +v73=v4.sample_alpha; +if(v73!==v5.sample_alpha){ +if(v73){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v73; +} +v74=v4.sample_enable; +if(v74!==v5.sample_enable){ +if(v74){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v74; +} +v75=v32[0]; +v76=v32[1]; +if(v75!==v33[0]||v76!==v33[1]){ +v1.sampleCoverage(v75,v76); +v33[0]=v75; +v33[1]=v76; +} +v77=v4.stencil_mask; +if(v77!==v5.stencil_mask){ +v1.stencilMask(v77); +v5.stencil_mask=v77; +} +v78=v34[0]; +v79=v34[1]; +v80=v34[2]; +if(v78!==v35[0]||v79!==v35[1]||v80!==v35[2]){ +v1.stencilFunc(v78,v79,v80); +v35[0]=v78; +v35[1]=v79; +v35[2]=v80; +} +v81=v36[0]; +v82=v36[1]; +v83=v36[2]; +v84=v36[3]; +if(v81!==v37[0]||v82!==v37[1]||v83!==v37[2]||v84!==v37[3]){ +v1.stencilOpSeparate(v81,v82,v83,v84); +v37[0]=v81; +v37[1]=v82; +v37[2]=v83; +v37[3]=v84; +} +v85=v38[0]; +v86=v38[1]; +v87=v38[2]; +v88=v38[3]; +if(v85!==v39[0]||v86!==v39[1]||v87!==v39[2]||v88!==v39[3]){ +v1.stencilOpSeparate(v85,v86,v87,v88); +v39[0]=v85; +v39[1]=v86; +v39[2]=v87; +v39[3]=v88; +} +} +v89=a0["viewport"]; +if(!(v89&&typeof v89==="object"))g18.commandRaise(g90,g19); +v91=v89.x|0; +v92=v89.y|0; +v93="width" in v89?v89.width|0:(v2.framebufferWidth-v91); +v94="height" in v89?v89.height|0:(v2.framebufferHeight-v92); +if(!(v93>=0&&v94>=0))g18.commandRaise(g90,g19); +v95=v2.viewportWidth; +v2.viewportWidth=v93; +v96=v2.viewportHeight; +v2.viewportHeight=v94; +v1.viewport(v91,v92,v93,v94); +v43[0]=v91; +v43[1]=v92; +v43[2]=v93; +v43[3]=v94; +v1.blendColor(0,0,0,1); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=1; +if(g97){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g97; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +if(g98){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=g98; +v99=a0["viewport"]; +if(!(v99&&typeof v99==="object"))g18.commandRaise(g100,g19); +v101=v99.x|0; +v102=v99.y|0; +v103="width" in v99?v99.width|0:(v2.framebufferWidth-v101); +v104="height" in v99?v99.height|0:(v2.framebufferHeight-v102); +if(!(v103>=0&&v104>=0))g18.commandRaise(g100,g19); +v1.scissor(v101,v102,v103,v104); +v41[0]=v101; +v41[1]=v102; +v41[2]=v103; +v41[3]=v104; +if(g105){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g105; +if(g106){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=g106; +v107=v5.profile; +if(v107){ +v108=performance.now(); +g52.count++; +} +v1.useProgram(g109.program); +v110=v14.angle_instanced_arrays; +v11.setVAO(null); +v112=g111.call(this,v2,a0,0); +if(!(v112&&(typeof v112==="object"||typeof v112==="function")&&(v16(v112)||v8.getBuffer(v112)||v8.getBuffer(v112.buffer)||v16(v112.buffer)||("constant" in v112&&(typeof v112.constant==="number"||v17(v112.constant))))))g18.commandRaise(g113,g19); +v114=false; +v115=1; +v116=0; +v117=0; +v118=0; +v119=0; +v120=null; +v121=0; +v122=false; +v123=5126; +v124=0; +v125=0; +v126=0; +if(v16(v112)){ +v114=true; +v120=v8.createStream(34962,v112); +v123=v120.dtype; +} +else{ +v120=v8.getBuffer(v112); +if(v120){ +v123=v120.dtype; +} +else if("constant" in v112){ +v115=2; +if(typeof v112.constant === "number"){ +v116=v112.constant; +v117=v118=v119=0; +} +else{ +v116=v112.constant.length>0?v112.constant[0]:0; +v117=v112.constant.length>1?v112.constant[1]:0; +v118=v112.constant.length>2?v112.constant[2]:0; +v119=v112.constant.length>3?v112.constant[3]:0; +} +} +else{ +if(v16(v112.buffer)){ +v120=v8.createStream(34962,v112.buffer); +} +else{ +v120=v8.getBuffer(v112.buffer); +} +v123="type" in v112?v49[v112.type]:v120.dtype; +v122=!!v112.normalized; +v121=v112.size|0; +v124=v112.offset|0; +v125=v112.stride|0; +v126=v112.divisor|0; +} +} +v128=g127.location; +v129=v10[v128]; +if(v115===1){ +if(!v129.buffer){ +v1.enableVertexAttribArray(v128); +} +v130=v121||4; +if(v129.type!==v123||v129.size!==v130||v129.buffer!==v120||v129.normalized!==v122||v129.offset!==v124||v129.stride!==v125){ +v1.bindBuffer(34962,v120.buffer); +v1.vertexAttribPointer(v128,v130,v123,v122,v125,v124); +v129.type=v123; +v129.size=v130; +v129.buffer=v120; +v129.normalized=v122; +v129.offset=v124; +v129.stride=v125; +} +if(v129.divisor!==v126){ +v110.vertexAttribDivisorANGLE(v128,v126); +v129.divisor=v126; +} +} +else{ +if(v129.buffer){ +v1.disableVertexAttribArray(v128); +v129.buffer=null; +} +if(v129.x!==v116||v129.y!==v117||v129.z!==v118||v129.w!==v119){ +v1.vertexAttrib4f(v128,v116,v117,v118,v119); +v129.x=v116; +v129.y=v117; +v129.z=v118; +v129.w=v119; +} +} +v132=g131.call(this,v2,a0,0); +if(!(v132&&(typeof v132==="object"||typeof v132==="function")&&(v16(v132)||v8.getBuffer(v132)||v8.getBuffer(v132.buffer)||v16(v132.buffer)||("constant" in v132&&(typeof v132.constant==="number"||v17(v132.constant))))))g18.commandRaise(g133,g19); +v134=false; +v135=1; +v136=0; +v137=0; +v138=0; +v139=0; +v140=null; +v141=0; +v142=false; +v143=5126; +v144=0; +v145=0; +v146=0; +if(v16(v132)){ +v134=true; +v140=v8.createStream(34962,v132); +v143=v140.dtype; +} +else{ +v140=v8.getBuffer(v132); +if(v140){ +v143=v140.dtype; +} +else if("constant" in v132){ +v135=2; +if(typeof v132.constant === "number"){ +v136=v132.constant; +v137=v138=v139=0; +} +else{ +v136=v132.constant.length>0?v132.constant[0]:0; +v137=v132.constant.length>1?v132.constant[1]:0; +v138=v132.constant.length>2?v132.constant[2]:0; +v139=v132.constant.length>3?v132.constant[3]:0; +} +} +else{ +if(v16(v132.buffer)){ +v140=v8.createStream(34962,v132.buffer); +} +else{ +v140=v8.getBuffer(v132.buffer); +} +v143="type" in v132?v49[v132.type]:v140.dtype; +v142=!!v132.normalized; +v141=v132.size|0; +v144=v132.offset|0; +v145=v132.stride|0; +v146=v132.divisor|0; +} +} +v148=g147.location; +v149=v10[v148]; +if(v135===1){ +if(!v149.buffer){ +v1.enableVertexAttribArray(v148); +} +v150=v141||1; +if(v149.type!==v143||v149.size!==v150||v149.buffer!==v140||v149.normalized!==v142||v149.offset!==v144||v149.stride!==v145){ +v1.bindBuffer(34962,v140.buffer); +v1.vertexAttribPointer(v148,v150,v143,v142,v145,v144); +v149.type=v143; +v149.size=v150; +v149.buffer=v140; +v149.normalized=v142; +v149.offset=v144; +v149.stride=v145; +} +if(v149.divisor!==v146){ +v110.vertexAttribDivisorANGLE(v148,v146); +v149.divisor=v146; +} +} +else{ +if(v149.buffer){ +v1.disableVertexAttribArray(v148); +v149.buffer=null; +} +if(v149.x!==v136||v149.y!==v137||v149.z!==v138||v149.w!==v139){ +v1.vertexAttrib4f(v148,v136,v137,v138,v139); +v149.x=v136; +v149.y=v137; +v149.z=v138; +v149.w=v139; +} +} +v152=g151.call(this,v2,a0,0); +if(!(v152&&(typeof v152==="object"||typeof v152==="function")&&(v16(v152)||v8.getBuffer(v152)||v8.getBuffer(v152.buffer)||v16(v152.buffer)||("constant" in v152&&(typeof v152.constant==="number"||v17(v152.constant))))))g18.commandRaise(g153,g19); +v154=false; +v155=1; +v156=0; +v157=0; +v158=0; +v159=0; +v160=null; +v161=0; +v162=false; +v163=5126; +v164=0; +v165=0; +v166=0; +if(v16(v152)){ +v154=true; +v160=v8.createStream(34962,v152); +v163=v160.dtype; +} +else{ +v160=v8.getBuffer(v152); +if(v160){ +v163=v160.dtype; +} +else if("constant" in v152){ +v155=2; +if(typeof v152.constant === "number"){ +v156=v152.constant; +v157=v158=v159=0; +} +else{ +v156=v152.constant.length>0?v152.constant[0]:0; +v157=v152.constant.length>1?v152.constant[1]:0; +v158=v152.constant.length>2?v152.constant[2]:0; +v159=v152.constant.length>3?v152.constant[3]:0; +} +} +else{ +if(v16(v152.buffer)){ +v160=v8.createStream(34962,v152.buffer); +} +else{ +v160=v8.getBuffer(v152.buffer); +} +v163="type" in v152?v49[v152.type]:v160.dtype; +v162=!!v152.normalized; +v161=v152.size|0; +v164=v152.offset|0; +v165=v152.stride|0; +v166=v152.divisor|0; +} +} +v168=g167.location; +v169=v10[v168]; +if(v155===1){ +if(!v169.buffer){ +v1.enableVertexAttribArray(v168); +} +v170=v161||4; +if(v169.type!==v163||v169.size!==v170||v169.buffer!==v160||v169.normalized!==v162||v169.offset!==v164||v169.stride!==v165){ +v1.bindBuffer(34962,v160.buffer); +v1.vertexAttribPointer(v168,v170,v163,v162,v165,v164); +v169.type=v163; +v169.size=v170; +v169.buffer=v160; +v169.normalized=v162; +v169.offset=v164; +v169.stride=v165; +} +if(v169.divisor!==v166){ +v110.vertexAttribDivisorANGLE(v168,v166); +v169.divisor=v166; +} +} +else{ +if(v169.buffer){ +v1.disableVertexAttribArray(v168); +v169.buffer=null; +} +if(v169.x!==v156||v169.y!==v157||v169.z!==v158||v169.w!==v159){ +v1.vertexAttrib4f(v168,v156,v157,v158,v159); +v169.x=v156; +v169.y=v157; +v169.z=v158; +v169.w=v159; +} +} +v172=g171.call(this,v2,a0,0); +if(!(v172&&(typeof v172==="object"||typeof v172==="function")&&(v16(v172)||v8.getBuffer(v172)||v8.getBuffer(v172.buffer)||v16(v172.buffer)||("constant" in v172&&(typeof v172.constant==="number"||v17(v172.constant))))))g18.commandRaise(g173,g19); +v174=false; +v175=1; +v176=0; +v177=0; +v178=0; +v179=0; +v180=null; +v181=0; +v182=false; +v183=5126; +v184=0; +v185=0; +v186=0; +if(v16(v172)){ +v174=true; +v180=v8.createStream(34962,v172); +v183=v180.dtype; +} +else{ +v180=v8.getBuffer(v172); +if(v180){ +v183=v180.dtype; +} +else if("constant" in v172){ +v175=2; +if(typeof v172.constant === "number"){ +v176=v172.constant; +v177=v178=v179=0; +} +else{ +v176=v172.constant.length>0?v172.constant[0]:0; +v177=v172.constant.length>1?v172.constant[1]:0; +v178=v172.constant.length>2?v172.constant[2]:0; +v179=v172.constant.length>3?v172.constant[3]:0; +} +} +else{ +if(v16(v172.buffer)){ +v180=v8.createStream(34962,v172.buffer); +} +else{ +v180=v8.getBuffer(v172.buffer); +} +v183="type" in v172?v49[v172.type]:v180.dtype; +v182=!!v172.normalized; +v181=v172.size|0; +v184=v172.offset|0; +v185=v172.stride|0; +v186=v172.divisor|0; +} +} +v188=g187.location; +v189=v10[v188]; +if(v175===1){ +if(!v189.buffer){ +v1.enableVertexAttribArray(v188); +} +v190=v181||1; +if(v189.type!==v183||v189.size!==v190||v189.buffer!==v180||v189.normalized!==v182||v189.offset!==v184||v189.stride!==v185){ +v1.bindBuffer(34962,v180.buffer); +v1.vertexAttribPointer(v188,v190,v183,v182,v185,v184); +v189.type=v183; +v189.size=v190; +v189.buffer=v180; +v189.normalized=v182; +v189.offset=v184; +v189.stride=v185; +} +if(v189.divisor!==v186){ +v110.vertexAttribDivisorANGLE(v188,v186); +v189.divisor=v186; +} +} +else{ +if(v189.buffer){ +v1.disableVertexAttribArray(v188); +v189.buffer=null; +} +if(v189.x!==v176||v189.y!==v177||v189.z!==v178||v189.w!==v179){ +v1.vertexAttrib4f(v188,v176,v177,v178,v179); +v189.x=v176; +v189.y=v177; +v189.z=v178; +v189.w=v179; +} +} +v192=g191.call(this,v2,a0,0); +if(!(v192&&(typeof v192==="object"||typeof v192==="function")&&(v16(v192)||v8.getBuffer(v192)||v8.getBuffer(v192.buffer)||v16(v192.buffer)||("constant" in v192&&(typeof v192.constant==="number"||v17(v192.constant))))))g18.commandRaise(g193,g19); +v194=false; +v195=1; +v196=0; +v197=0; +v198=0; +v199=0; +v200=null; +v201=0; +v202=false; +v203=5126; +v204=0; +v205=0; +v206=0; +if(v16(v192)){ +v194=true; +v200=v8.createStream(34962,v192); +v203=v200.dtype; +} +else{ +v200=v8.getBuffer(v192); +if(v200){ +v203=v200.dtype; +} +else if("constant" in v192){ +v195=2; +if(typeof v192.constant === "number"){ +v196=v192.constant; +v197=v198=v199=0; +} +else{ +v196=v192.constant.length>0?v192.constant[0]:0; +v197=v192.constant.length>1?v192.constant[1]:0; +v198=v192.constant.length>2?v192.constant[2]:0; +v199=v192.constant.length>3?v192.constant[3]:0; +} +} +else{ +if(v16(v192.buffer)){ +v200=v8.createStream(34962,v192.buffer); +} +else{ +v200=v8.getBuffer(v192.buffer); +} +v203="type" in v192?v49[v192.type]:v200.dtype; +v202=!!v192.normalized; +v201=v192.size|0; +v204=v192.offset|0; +v205=v192.stride|0; +v206=v192.divisor|0; +} +} +v208=g207.location; +v209=v10[v208]; +if(v195===1){ +if(!v209.buffer){ +v1.enableVertexAttribArray(v208); +} +v210=v201||1; +if(v209.type!==v203||v209.size!==v210||v209.buffer!==v200||v209.normalized!==v202||v209.offset!==v204||v209.stride!==v205){ +v1.bindBuffer(34962,v200.buffer); +v1.vertexAttribPointer(v208,v210,v203,v202,v205,v204); +v209.type=v203; +v209.size=v210; +v209.buffer=v200; +v209.normalized=v202; +v209.offset=v204; +v209.stride=v205; +} +if(v209.divisor!==v206){ +v110.vertexAttribDivisorANGLE(v208,v206); +v209.divisor=v206; +} +} +else{ +if(v209.buffer){ +v1.disableVertexAttribArray(v208); +v209.buffer=null; +} +if(v209.x!==v196||v209.y!==v197||v209.z!==v198||v209.w!==v199){ +v1.vertexAttrib4f(v208,v196,v197,v198,v199); +v209.x=v196; +v209.y=v197; +v209.z=v198; +v209.w=v199; +} +} +v212=g211.call(this,v2,a0,0); +if(!(v212&&(typeof v212==="object"||typeof v212==="function")&&(v16(v212)||v8.getBuffer(v212)||v8.getBuffer(v212.buffer)||v16(v212.buffer)||("constant" in v212&&(typeof v212.constant==="number"||v17(v212.constant))))))g18.commandRaise(g213,g19); +v214=false; +v215=1; +v216=0; +v217=0; +v218=0; +v219=0; +v220=null; +v221=0; +v222=false; +v223=5126; +v224=0; +v225=0; +v226=0; +if(v16(v212)){ +v214=true; +v220=v8.createStream(34962,v212); +v223=v220.dtype; +} +else{ +v220=v8.getBuffer(v212); +if(v220){ +v223=v220.dtype; +} +else if("constant" in v212){ +v215=2; +if(typeof v212.constant === "number"){ +v216=v212.constant; +v217=v218=v219=0; +} +else{ +v216=v212.constant.length>0?v212.constant[0]:0; +v217=v212.constant.length>1?v212.constant[1]:0; +v218=v212.constant.length>2?v212.constant[2]:0; +v219=v212.constant.length>3?v212.constant[3]:0; +} +} +else{ +if(v16(v212.buffer)){ +v220=v8.createStream(34962,v212.buffer); +} +else{ +v220=v8.getBuffer(v212.buffer); +} +v223="type" in v212?v49[v212.type]:v220.dtype; +v222=!!v212.normalized; +v221=v212.size|0; +v224=v212.offset|0; +v225=v212.stride|0; +v226=v212.divisor|0; +} +} +v228=g227.location; +v229=v10[v228]; +if(v215===1){ +if(!v229.buffer){ +v1.enableVertexAttribArray(v228); +} +v230=v221||1; +if(v229.type!==v223||v229.size!==v230||v229.buffer!==v220||v229.normalized!==v222||v229.offset!==v224||v229.stride!==v225){ +v1.bindBuffer(34962,v220.buffer); +v1.vertexAttribPointer(v228,v230,v223,v222,v225,v224); +v229.type=v223; +v229.size=v230; +v229.buffer=v220; +v229.normalized=v222; +v229.offset=v224; +v229.stride=v225; +} +if(v229.divisor!==v226){ +v110.vertexAttribDivisorANGLE(v228,v226); +v229.divisor=v226; +} +} +else{ +if(v229.buffer){ +v1.disableVertexAttribArray(v228); +v229.buffer=null; +} +if(v229.x!==v216||v229.y!==v217||v229.z!==v218||v229.w!==v219){ +v1.vertexAttrib4f(v228,v216,v217,v218,v219); +v229.x=v216; +v229.y=v217; +v229.z=v218; +v229.w=v219; +} +} +v232=g231.call(this,v2,a0,0); +if(!(v232&&(typeof v232==="object"||typeof v232==="function")&&(v16(v232)||v8.getBuffer(v232)||v8.getBuffer(v232.buffer)||v16(v232.buffer)||("constant" in v232&&(typeof v232.constant==="number"||v17(v232.constant))))))g18.commandRaise(g233,g19); +v234=false; +v235=1; +v236=0; +v237=0; +v238=0; +v239=0; +v240=null; +v241=0; +v242=false; +v243=5126; +v244=0; +v245=0; +v246=0; +if(v16(v232)){ +v234=true; +v240=v8.createStream(34962,v232); +v243=v240.dtype; +} +else{ +v240=v8.getBuffer(v232); +if(v240){ +v243=v240.dtype; +} +else if("constant" in v232){ +v235=2; +if(typeof v232.constant === "number"){ +v236=v232.constant; +v237=v238=v239=0; +} +else{ +v236=v232.constant.length>0?v232.constant[0]:0; +v237=v232.constant.length>1?v232.constant[1]:0; +v238=v232.constant.length>2?v232.constant[2]:0; +v239=v232.constant.length>3?v232.constant[3]:0; +} +} +else{ +if(v16(v232.buffer)){ +v240=v8.createStream(34962,v232.buffer); +} +else{ +v240=v8.getBuffer(v232.buffer); +} +v243="type" in v232?v49[v232.type]:v240.dtype; +v242=!!v232.normalized; +v241=v232.size|0; +v244=v232.offset|0; +v245=v232.stride|0; +v246=v232.divisor|0; +} +} +v248=g247.location; +v249=v10[v248]; +if(v235===1){ +if(!v249.buffer){ +v1.enableVertexAttribArray(v248); +} +v250=v241||1; +if(v249.type!==v243||v249.size!==v250||v249.buffer!==v240||v249.normalized!==v242||v249.offset!==v244||v249.stride!==v245){ +v1.bindBuffer(34962,v240.buffer); +v1.vertexAttribPointer(v248,v250,v243,v242,v245,v244); +v249.type=v243; +v249.size=v250; +v249.buffer=v240; +v249.normalized=v242; +v249.offset=v244; +v249.stride=v245; +} +if(v249.divisor!==v246){ +v110.vertexAttribDivisorANGLE(v248,v246); +v249.divisor=v246; +} +} +else{ +if(v249.buffer){ +v1.disableVertexAttribArray(v248); +v249.buffer=null; +} +if(v249.x!==v236||v249.y!==v237||v249.z!==v238||v249.w!==v239){ +v1.vertexAttrib4f(v248,v236,v237,v238,v239); +v249.x=v236; +v249.y=v237; +v249.z=v238; +v249.w=v239; +} +} +v252=g251.call(this,v2,a0,0); +if(!(v252&&(typeof v252==="object"||typeof v252==="function")&&(v16(v252)||v8.getBuffer(v252)||v8.getBuffer(v252.buffer)||v16(v252.buffer)||("constant" in v252&&(typeof v252.constant==="number"||v17(v252.constant))))))g18.commandRaise(g253,g19); +v254=false; +v255=1; +v256=0; +v257=0; +v258=0; +v259=0; +v260=null; +v261=0; +v262=false; +v263=5126; +v264=0; +v265=0; +v266=0; +if(v16(v252)){ +v254=true; +v260=v8.createStream(34962,v252); +v263=v260.dtype; +} +else{ +v260=v8.getBuffer(v252); +if(v260){ +v263=v260.dtype; +} +else if("constant" in v252){ +v255=2; +if(typeof v252.constant === "number"){ +v256=v252.constant; +v257=v258=v259=0; +} +else{ +v256=v252.constant.length>0?v252.constant[0]:0; +v257=v252.constant.length>1?v252.constant[1]:0; +v258=v252.constant.length>2?v252.constant[2]:0; +v259=v252.constant.length>3?v252.constant[3]:0; +} +} +else{ +if(v16(v252.buffer)){ +v260=v8.createStream(34962,v252.buffer); +} +else{ +v260=v8.getBuffer(v252.buffer); +} +v263="type" in v252?v49[v252.type]:v260.dtype; +v262=!!v252.normalized; +v261=v252.size|0; +v264=v252.offset|0; +v265=v252.stride|0; +v266=v252.divisor|0; +} +} +v268=g267.location; +v269=v10[v268]; +if(v255===1){ +if(!v269.buffer){ +v1.enableVertexAttribArray(v268); +} +v270=v261||1; +if(v269.type!==v263||v269.size!==v270||v269.buffer!==v260||v269.normalized!==v262||v269.offset!==v264||v269.stride!==v265){ +v1.bindBuffer(34962,v260.buffer); +v1.vertexAttribPointer(v268,v270,v263,v262,v265,v264); +v269.type=v263; +v269.size=v270; +v269.buffer=v260; +v269.normalized=v262; +v269.offset=v264; +v269.stride=v265; +} +if(v269.divisor!==v266){ +v110.vertexAttribDivisorANGLE(v268,v266); +v269.divisor=v266; +} +} +else{ +if(v269.buffer){ +v1.disableVertexAttribArray(v268); +v269.buffer=null; +} +if(v269.x!==v256||v269.y!==v257||v269.z!==v258||v269.w!==v259){ +v1.vertexAttrib4f(v268,v256,v257,v258,v259); +v269.x=v256; +v269.y=v257; +v269.z=v258; +v269.w=v259; +} +} +v272=g271.call(this,v2,a0,0); +if(!(v272&&(typeof v272==="object"||typeof v272==="function")&&(v16(v272)||v8.getBuffer(v272)||v8.getBuffer(v272.buffer)||v16(v272.buffer)||("constant" in v272&&(typeof v272.constant==="number"||v17(v272.constant))))))g18.commandRaise(g273,g19); +v274=false; +v275=1; +v276=0; +v277=0; +v278=0; +v279=0; +v280=null; +v281=0; +v282=false; +v283=5126; +v284=0; +v285=0; +v286=0; +if(v16(v272)){ +v274=true; +v280=v8.createStream(34962,v272); +v283=v280.dtype; +} +else{ +v280=v8.getBuffer(v272); +if(v280){ +v283=v280.dtype; +} +else if("constant" in v272){ +v275=2; +if(typeof v272.constant === "number"){ +v276=v272.constant; +v277=v278=v279=0; +} +else{ +v276=v272.constant.length>0?v272.constant[0]:0; +v277=v272.constant.length>1?v272.constant[1]:0; +v278=v272.constant.length>2?v272.constant[2]:0; +v279=v272.constant.length>3?v272.constant[3]:0; +} +} +else{ +if(v16(v272.buffer)){ +v280=v8.createStream(34962,v272.buffer); +} +else{ +v280=v8.getBuffer(v272.buffer); +} +v283="type" in v272?v49[v272.type]:v280.dtype; +v282=!!v272.normalized; +v281=v272.size|0; +v284=v272.offset|0; +v285=v272.stride|0; +v286=v272.divisor|0; +} +} +v288=g287.location; +v289=v10[v288]; +if(v275===1){ +if(!v289.buffer){ +v1.enableVertexAttribArray(v288); +} +v290=v281||1; +if(v289.type!==v283||v289.size!==v290||v289.buffer!==v280||v289.normalized!==v282||v289.offset!==v284||v289.stride!==v285){ +v1.bindBuffer(34962,v280.buffer); +v1.vertexAttribPointer(v288,v290,v283,v282,v285,v284); +v289.type=v283; +v289.size=v290; +v289.buffer=v280; +v289.normalized=v282; +v289.offset=v284; +v289.stride=v285; +} +if(v289.divisor!==v286){ +v110.vertexAttribDivisorANGLE(v288,v286); +v289.divisor=v286; +} +} +else{ +if(v289.buffer){ +v1.disableVertexAttribArray(v288); +v289.buffer=null; +} +if(v289.x!==v276||v289.y!==v277||v289.z!==v278||v289.w!==v279){ +v1.vertexAttrib4f(v288,v276,v277,v278,v279); +v289.x=v276; +v289.y=v277; +v289.z=v278; +v289.w=v279; +} +} +v1.uniform1i(g291.location,false); +v293=a0["opacity"]; +if(!(typeof v293==="number"))g18.commandRaise(g294,g19); +v1.uniform1f(g292.location,v293); +v297=g296.call(this,v2,a0,0); +if(!(v17(v297)&&v297.length===2))g18.commandRaise(g298,g19); +v299=v297[0]; +v300=v297[1]; +v1.uniform2f(g295.location,v299,v300); +v1.uniform1i(g301.location,g302.bind()); +v304=v2["pixelRatio"]; +if(!(typeof v304==="number"))g18.commandRaise(g305,g19); +v1.uniform1f(g303.location,v304); +v307=a0["scale"]; +if(!(v17(v307)&&v307.length===2))g18.commandRaise(g308,g19); +v309=v307[0]; +v310=v307[1]; +v1.uniform2f(g306.location,v309,v310); +v312=a0["scaleFract"]; +if(!(v17(v312)&&v312.length===2))g18.commandRaise(g313,g19); +v314=v312[0]; +v315=v312[1]; +v1.uniform2f(g311.location,v314,v315); +v317=a0["translate"]; +if(!(v17(v317)&&v317.length===2))g18.commandRaise(g318,g19); +v319=v317[0]; +v320=v317[1]; +v1.uniform2f(g316.location,v319,v320); +v322=a0["translateFract"]; +if(!(v17(v322)&&v322.length===2))g18.commandRaise(g323,g19); +v324=v322[0]; +v325=v322[1]; +v1.uniform2f(g321.location,v324,v325); +v326=a0["elements"]; +v327=null; +v328=v16(v326); +if(v328){ +v327=v7.createStream(v326); +} +else{ +v327=v7.getElements(v326); +if(!(!v326||v327))g18.commandRaise(g329,g19); +} +if(v327)v1.bindBuffer(34963,v327.buffer.buffer); +v330=a0["offset"]; +if(!(v330>=0))g18.commandRaise(g331,g19); +v332=a0["count"]; +if(!(typeof v332==="number"&&v332>=0&&v332===(v332|0)))g18.commandRaise(g333,g19); +if(v332){ +v334=v6.instances; +if(v334>0){ +if(v327){ +v110.drawElementsInstancedANGLE(0,v332,v327.type,v330<<((v327.type-5121)>>1),v334); +} +else{ +v110.drawArraysInstancedANGLE(0,v330,v332,v334); +} +} +else if(v334<0){ +if(v327){ +v1.drawElements(0,v332,v327.type,v330<<((v327.type-5121)>>1)); +} +else{ +v1.drawArrays(0,v330,v332); +} +} +v5.dirty=true; +v11.setVAO(null); +v2.viewportWidth=v95; +v2.viewportHeight=v96; +if(v107){ +g52.cpuTime+=performance.now()-v108; +} +if(v114){ +v8.destroyStream(v120); +} +if(v134){ +v8.destroyStream(v140); +} +if(v154){ +v8.destroyStream(v160); +} +if(v174){ +v8.destroyStream(v180); +} +if(v194){ +v8.destroyStream(v200); +} +if(v214){ +v8.destroyStream(v220); +} +if(v234){ +v8.destroyStream(v240); +} +if(v254){ +v8.destroyStream(v260); +} +if(v274){ +v8.destroyStream(v280); +} +g302.unbind(); +if(v328){ +v7.destroyStream(v327); +} +} +} +,"scope":function(a0,a1,a2){ +var v335,v336,v337,v338,v339,v340,v341,v342,v343,v344,v345,v347,v349,v351,v353,v355,v357,v359,v361,v363,v365,v366,v367,v368,v369,v370,v371,v372,v373,v374,v376,v378,v379,v380,v381,v382,v383,v384,v385,v386,v387,v388,v390,v392,v395,v396,v398,v399,v401,v402,v404,v405,v407,v408,v410,v411,v413,v414,v416,v417,v419,v420,v421,v422,v423,v424,v425,v426,v427,v428,v429,v430,v431,v432,v433,v435,v436,v437,v438,v439,v440,v441,v442,v443,v444,v445,v446,v447,v448,v449,v450,v451,v452,v453,v454,v455,v456,v457,v458,v459,v460,v462,v463,v464,v465,v466,v467,v468,v469,v470,v471,v472,v473,v474,v475,v476,v477,v478,v479,v480,v481,v482,v483,v484,v485,v486,v487,v489,v490,v491,v492,v493,v494,v495,v496,v497,v498,v499,v500,v501,v502,v503,v504,v505,v506,v507,v508,v509,v510,v511,v512,v513,v514,v516,v517,v518,v519,v520,v521,v522,v523,v524,v525,v526,v527,v528,v529,v530,v531,v532,v533,v534,v535,v536,v537,v538,v539,v540,v541,v543,v544,v545,v546,v547,v548,v549,v550,v551,v552,v553,v554,v555,v556,v557,v558,v559,v560,v561,v562,v563,v564,v565,v566,v567,v568,v570,v571,v572,v573,v574,v575,v576,v577,v578,v579,v580,v581,v582,v583,v584,v585,v586,v587,v588,v589,v590,v591,v592,v593,v594,v595,v597,v598,v599,v600,v601,v602,v603,v604,v605,v606,v607,v608,v609,v610,v611,v612,v613,v614,v615,v616,v617,v618,v619,v620,v621,v622,v624,v625,v626,v627,v628,v629,v630,v631,v632,v633,v634,v635,v636,v637,v638,v639,v640,v641,v642,v643,v644,v645,v646,v647,v648,v649,v651,v652,v653,v654,v655,v656,v657,v658,v659,v660,v661,v662,v664,v666; +v335=a0["viewport"]; +if(!(v335&&typeof v335==="object"))g18.commandRaise(g90,g19); +v336=v335.x|0; +v337=v335.y|0; +v338="width" in v335?v335.width|0:(v2.framebufferWidth-v336); +v339="height" in v335?v335.height|0:(v2.framebufferHeight-v337); +if(!(v338>=0&&v339>=0))g18.commandRaise(g90,g19); +v340=v2.viewportWidth; +v2.viewportWidth=v338; +v341=v2.viewportHeight; +v2.viewportHeight=v339; +v342=v42[0]; +v42[0]=v336; +v343=v42[1]; +v42[1]=v337; +v344=v42[2]; +v42[2]=v338; +v345=v42[3]; +v42[3]=v339; +v347=v20[0]; +v20[0]=g346; +v349=v20[1]; +v20[1]=g348; +v351=v20[2]; +v20[2]=g350; +v353=v20[3]; +v20[3]=g352; +v355=v4.blend_enable; +v4.blend_enable=g354; +v357=v24[0]; +v24[0]=g356; +v359=v24[1]; +v24[1]=g358; +v361=v24[2]; +v24[2]=g360; +v363=v24[3]; +v24[3]=g362; +v365=v4.depth_enable; +v4.depth_enable=g364; +v366=a0["viewport"]; +if(!(v366&&typeof v366==="object"))g18.commandRaise(g100,g19); +v367=v366.x|0; +v368=v366.y|0; +v369="width" in v366?v366.width|0:(v2.framebufferWidth-v367); +v370="height" in v366?v366.height|0:(v2.framebufferHeight-v368); +if(!(v369>=0&&v370>=0))g18.commandRaise(g100,g19); +v371=v40[0]; +v40[0]=v367; +v372=v40[1]; +v40[1]=v368; +v373=v40[2]; +v40[2]=v369; +v374=v40[3]; +v40[3]=v370; +v376=v4.scissor_enable; +v4.scissor_enable=g375; +v378=v4.stencil_enable; +v4.stencil_enable=g377; +v379=v5.profile; +if(v379){ +v380=performance.now(); +g52.count++; +} +v381=a0["elements"]; +v382=null; +v383=v16(v381); +if(v383){ +v382=v7.createStream(v381); +} +else{ +v382=v7.getElements(v381); +if(!(!v381||v382))g18.commandRaise(g329,g19); +} +v384=v6.elements; +v6.elements=v382; +v385=a0["offset"]; +if(!(v385>=0))g18.commandRaise(g331,g19); +v386=v6.offset; +v6.offset=v385; +v387=a0["count"]; +if(!(typeof v387==="number"&&v387>=0&&v387===(v387|0)))g18.commandRaise(g333,g19); +v388=v6.count; +v6.count=v387; +v390=v6.primitive; +v6.primitive=g389; +v392=v12[g391]; +v12[g391]=false; +v395=v12[g394]; +v12[g394]=g393; +v396=a0["opacity"]; +v398=v12[g397]; +v12[g397]=v396; +v399=g296.call(this,v2,a0,a2); +v401=v12[g400]; +v12[g400]=v399; +v402=v2["pixelRatio"]; +v404=v12[g403]; +v12[g403]=v402; +v405=a0["scale"]; +v407=v12[g406]; +v12[g406]=v405; +v408=a0["scaleFract"]; +v410=v12[g409]; +v12[g409]=v408; +v411=a0["translate"]; +v413=v12[g412]; +v12[g412]=v411; +v414=a0["translateFract"]; +v416=v12[g415]; +v12[g415]=v414; +v417=a0["markerTexture"]; +v419=v12[g418]; +v12[g418]=v417; +v420=g211.call(this,v2,a0,a2); +if(!(v420&&(typeof v420==="object"||typeof v420==="function")&&(v16(v420)||v8.getBuffer(v420)||v8.getBuffer(v420.buffer)||v16(v420.buffer)||("constant" in v420&&(typeof v420.constant==="number"||v17(v420.constant))))))g18.commandRaise(g213,g19); +v421=false; +v422=1; +v423=0; +v424=0; +v425=0; +v426=0; +v427=null; +v428=0; +v429=false; +v430=5126; +v431=0; +v432=0; +v433=0; +if(v16(v420)){ +v421=true; +v427=v8.createStream(34962,v420); +v430=v427.dtype; +} +else{ +v427=v8.getBuffer(v420); +if(v427){ +v430=v427.dtype; +} +else if("constant" in v420){ +v422=2; +if(typeof v420.constant === "number"){ +v423=v420.constant; +v424=v425=v426=0; +} +else{ +v423=v420.constant.length>0?v420.constant[0]:0; +v424=v420.constant.length>1?v420.constant[1]:0; +v425=v420.constant.length>2?v420.constant[2]:0; +v426=v420.constant.length>3?v420.constant[3]:0; +} +} +else{ +if(v16(v420.buffer)){ +v427=v8.createStream(34962,v420.buffer); +} +else{ +v427=v8.getBuffer(v420.buffer); +} +v430="type" in v420?v49[v420.type]:v427.dtype; +v429=!!v420.normalized; +v428=v420.size|0; +v431=v420.offset|0; +v432=v420.stride|0; +v433=v420.divisor|0; +} +} +v435=g434.state; +g434.state=v422; +v436=g434.x; +g434.x=v423; +v437=g434.y; +g434.y=v424; +v438=g434.z; +g434.z=v425; +v439=g434.w; +g434.w=v426; +v440=g434.buffer; +g434.buffer=v427; +v441=g434.size; +g434.size=v428; +v442=g434.normalized; +g434.normalized=v429; +v443=g434.type; +g434.type=v430; +v444=g434.offset; +g434.offset=v431; +v445=g434.stride; +g434.stride=v432; +v446=g434.divisor; +g434.divisor=v433; +v447=g251.call(this,v2,a0,a2); +if(!(v447&&(typeof v447==="object"||typeof v447==="function")&&(v16(v447)||v8.getBuffer(v447)||v8.getBuffer(v447.buffer)||v16(v447.buffer)||("constant" in v447&&(typeof v447.constant==="number"||v17(v447.constant))))))g18.commandRaise(g253,g19); +v448=false; +v449=1; +v450=0; +v451=0; +v452=0; +v453=0; +v454=null; +v455=0; +v456=false; +v457=5126; +v458=0; +v459=0; +v460=0; +if(v16(v447)){ +v448=true; +v454=v8.createStream(34962,v447); +v457=v454.dtype; +} +else{ +v454=v8.getBuffer(v447); +if(v454){ +v457=v454.dtype; +} +else if("constant" in v447){ +v449=2; +if(typeof v447.constant === "number"){ +v450=v447.constant; +v451=v452=v453=0; +} +else{ +v450=v447.constant.length>0?v447.constant[0]:0; +v451=v447.constant.length>1?v447.constant[1]:0; +v452=v447.constant.length>2?v447.constant[2]:0; +v453=v447.constant.length>3?v447.constant[3]:0; +} +} +else{ +if(v16(v447.buffer)){ +v454=v8.createStream(34962,v447.buffer); +} +else{ +v454=v8.getBuffer(v447.buffer); +} +v457="type" in v447?v49[v447.type]:v454.dtype; +v456=!!v447.normalized; +v455=v447.size|0; +v458=v447.offset|0; +v459=v447.stride|0; +v460=v447.divisor|0; +} +} +v462=g461.state; +g461.state=v449; +v463=g461.x; +g461.x=v450; +v464=g461.y; +g461.y=v451; +v465=g461.z; +g461.z=v452; +v466=g461.w; +g461.w=v453; +v467=g461.buffer; +g461.buffer=v454; +v468=g461.size; +g461.size=v455; +v469=g461.normalized; +g461.normalized=v456; +v470=g461.type; +g461.type=v457; +v471=g461.offset; +g461.offset=v458; +v472=g461.stride; +g461.stride=v459; +v473=g461.divisor; +g461.divisor=v460; +v474=g231.call(this,v2,a0,a2); +if(!(v474&&(typeof v474==="object"||typeof v474==="function")&&(v16(v474)||v8.getBuffer(v474)||v8.getBuffer(v474.buffer)||v16(v474.buffer)||("constant" in v474&&(typeof v474.constant==="number"||v17(v474.constant))))))g18.commandRaise(g233,g19); +v475=false; +v476=1; +v477=0; +v478=0; +v479=0; +v480=0; +v481=null; +v482=0; +v483=false; +v484=5126; +v485=0; +v486=0; +v487=0; +if(v16(v474)){ +v475=true; +v481=v8.createStream(34962,v474); +v484=v481.dtype; +} +else{ +v481=v8.getBuffer(v474); +if(v481){ +v484=v481.dtype; +} +else if("constant" in v474){ +v476=2; +if(typeof v474.constant === "number"){ +v477=v474.constant; +v478=v479=v480=0; +} +else{ +v477=v474.constant.length>0?v474.constant[0]:0; +v478=v474.constant.length>1?v474.constant[1]:0; +v479=v474.constant.length>2?v474.constant[2]:0; +v480=v474.constant.length>3?v474.constant[3]:0; +} +} +else{ +if(v16(v474.buffer)){ +v481=v8.createStream(34962,v474.buffer); +} +else{ +v481=v8.getBuffer(v474.buffer); +} +v484="type" in v474?v49[v474.type]:v481.dtype; +v483=!!v474.normalized; +v482=v474.size|0; +v485=v474.offset|0; +v486=v474.stride|0; +v487=v474.divisor|0; +} +} +v489=g488.state; +g488.state=v476; +v490=g488.x; +g488.x=v477; +v491=g488.y; +g488.y=v478; +v492=g488.z; +g488.z=v479; +v493=g488.w; +g488.w=v480; +v494=g488.buffer; +g488.buffer=v481; +v495=g488.size; +g488.size=v482; +v496=g488.normalized; +g488.normalized=v483; +v497=g488.type; +g488.type=v484; +v498=g488.offset; +g488.offset=v485; +v499=g488.stride; +g488.stride=v486; +v500=g488.divisor; +g488.divisor=v487; +v501=g271.call(this,v2,a0,a2); +if(!(v501&&(typeof v501==="object"||typeof v501==="function")&&(v16(v501)||v8.getBuffer(v501)||v8.getBuffer(v501.buffer)||v16(v501.buffer)||("constant" in v501&&(typeof v501.constant==="number"||v17(v501.constant))))))g18.commandRaise(g273,g19); +v502=false; +v503=1; +v504=0; +v505=0; +v506=0; +v507=0; +v508=null; +v509=0; +v510=false; +v511=5126; +v512=0; +v513=0; +v514=0; +if(v16(v501)){ +v502=true; +v508=v8.createStream(34962,v501); +v511=v508.dtype; +} +else{ +v508=v8.getBuffer(v501); +if(v508){ +v511=v508.dtype; +} +else if("constant" in v501){ +v503=2; +if(typeof v501.constant === "number"){ +v504=v501.constant; +v505=v506=v507=0; +} +else{ +v504=v501.constant.length>0?v501.constant[0]:0; +v505=v501.constant.length>1?v501.constant[1]:0; +v506=v501.constant.length>2?v501.constant[2]:0; +v507=v501.constant.length>3?v501.constant[3]:0; +} +} +else{ +if(v16(v501.buffer)){ +v508=v8.createStream(34962,v501.buffer); +} +else{ +v508=v8.getBuffer(v501.buffer); +} +v511="type" in v501?v49[v501.type]:v508.dtype; +v510=!!v501.normalized; +v509=v501.size|0; +v512=v501.offset|0; +v513=v501.stride|0; +v514=v501.divisor|0; +} +} +v516=g515.state; +g515.state=v503; +v517=g515.x; +g515.x=v504; +v518=g515.y; +g515.y=v505; +v519=g515.z; +g515.z=v506; +v520=g515.w; +g515.w=v507; +v521=g515.buffer; +g515.buffer=v508; +v522=g515.size; +g515.size=v509; +v523=g515.normalized; +g515.normalized=v510; +v524=g515.type; +g515.type=v511; +v525=g515.offset; +g515.offset=v512; +v526=g515.stride; +g515.stride=v513; +v527=g515.divisor; +g515.divisor=v514; +v528=g191.call(this,v2,a0,a2); +if(!(v528&&(typeof v528==="object"||typeof v528==="function")&&(v16(v528)||v8.getBuffer(v528)||v8.getBuffer(v528.buffer)||v16(v528.buffer)||("constant" in v528&&(typeof v528.constant==="number"||v17(v528.constant))))))g18.commandRaise(g193,g19); +v529=false; +v530=1; +v531=0; +v532=0; +v533=0; +v534=0; +v535=null; +v536=0; +v537=false; +v538=5126; +v539=0; +v540=0; +v541=0; +if(v16(v528)){ +v529=true; +v535=v8.createStream(34962,v528); +v538=v535.dtype; +} +else{ +v535=v8.getBuffer(v528); +if(v535){ +v538=v535.dtype; +} +else if("constant" in v528){ +v530=2; +if(typeof v528.constant === "number"){ +v531=v528.constant; +v532=v533=v534=0; +} +else{ +v531=v528.constant.length>0?v528.constant[0]:0; +v532=v528.constant.length>1?v528.constant[1]:0; +v533=v528.constant.length>2?v528.constant[2]:0; +v534=v528.constant.length>3?v528.constant[3]:0; +} +} +else{ +if(v16(v528.buffer)){ +v535=v8.createStream(34962,v528.buffer); +} +else{ +v535=v8.getBuffer(v528.buffer); +} +v538="type" in v528?v49[v528.type]:v535.dtype; +v537=!!v528.normalized; +v536=v528.size|0; +v539=v528.offset|0; +v540=v528.stride|0; +v541=v528.divisor|0; +} +} +v543=g542.state; +g542.state=v530; +v544=g542.x; +g542.x=v531; +v545=g542.y; +g542.y=v532; +v546=g542.z; +g542.z=v533; +v547=g542.w; +g542.w=v534; +v548=g542.buffer; +g542.buffer=v535; +v549=g542.size; +g542.size=v536; +v550=g542.normalized; +g542.normalized=v537; +v551=g542.type; +g542.type=v538; +v552=g542.offset; +g542.offset=v539; +v553=g542.stride; +g542.stride=v540; +v554=g542.divisor; +g542.divisor=v541; +v555=g131.call(this,v2,a0,a2); +if(!(v555&&(typeof v555==="object"||typeof v555==="function")&&(v16(v555)||v8.getBuffer(v555)||v8.getBuffer(v555.buffer)||v16(v555.buffer)||("constant" in v555&&(typeof v555.constant==="number"||v17(v555.constant))))))g18.commandRaise(g133,g19); +v556=false; +v557=1; +v558=0; +v559=0; +v560=0; +v561=0; +v562=null; +v563=0; +v564=false; +v565=5126; +v566=0; +v567=0; +v568=0; +if(v16(v555)){ +v556=true; +v562=v8.createStream(34962,v555); +v565=v562.dtype; +} +else{ +v562=v8.getBuffer(v555); +if(v562){ +v565=v562.dtype; +} +else if("constant" in v555){ +v557=2; +if(typeof v555.constant === "number"){ +v558=v555.constant; +v559=v560=v561=0; +} +else{ +v558=v555.constant.length>0?v555.constant[0]:0; +v559=v555.constant.length>1?v555.constant[1]:0; +v560=v555.constant.length>2?v555.constant[2]:0; +v561=v555.constant.length>3?v555.constant[3]:0; +} +} +else{ +if(v16(v555.buffer)){ +v562=v8.createStream(34962,v555.buffer); +} +else{ +v562=v8.getBuffer(v555.buffer); +} +v565="type" in v555?v49[v555.type]:v562.dtype; +v564=!!v555.normalized; +v563=v555.size|0; +v566=v555.offset|0; +v567=v555.stride|0; +v568=v555.divisor|0; +} +} +v570=g569.state; +g569.state=v557; +v571=g569.x; +g569.x=v558; +v572=g569.y; +g569.y=v559; +v573=g569.z; +g569.z=v560; +v574=g569.w; +g569.w=v561; +v575=g569.buffer; +g569.buffer=v562; +v576=g569.size; +g569.size=v563; +v577=g569.normalized; +g569.normalized=v564; +v578=g569.type; +g569.type=v565; +v579=g569.offset; +g569.offset=v566; +v580=g569.stride; +g569.stride=v567; +v581=g569.divisor; +g569.divisor=v568; +v582=g151.call(this,v2,a0,a2); +if(!(v582&&(typeof v582==="object"||typeof v582==="function")&&(v16(v582)||v8.getBuffer(v582)||v8.getBuffer(v582.buffer)||v16(v582.buffer)||("constant" in v582&&(typeof v582.constant==="number"||v17(v582.constant))))))g18.commandRaise(g153,g19); +v583=false; +v584=1; +v585=0; +v586=0; +v587=0; +v588=0; +v589=null; +v590=0; +v591=false; +v592=5126; +v593=0; +v594=0; +v595=0; +if(v16(v582)){ +v583=true; +v589=v8.createStream(34962,v582); +v592=v589.dtype; +} +else{ +v589=v8.getBuffer(v582); +if(v589){ +v592=v589.dtype; +} +else if("constant" in v582){ +v584=2; +if(typeof v582.constant === "number"){ +v585=v582.constant; +v586=v587=v588=0; +} +else{ +v585=v582.constant.length>0?v582.constant[0]:0; +v586=v582.constant.length>1?v582.constant[1]:0; +v587=v582.constant.length>2?v582.constant[2]:0; +v588=v582.constant.length>3?v582.constant[3]:0; +} +} +else{ +if(v16(v582.buffer)){ +v589=v8.createStream(34962,v582.buffer); +} +else{ +v589=v8.getBuffer(v582.buffer); +} +v592="type" in v582?v49[v582.type]:v589.dtype; +v591=!!v582.normalized; +v590=v582.size|0; +v593=v582.offset|0; +v594=v582.stride|0; +v595=v582.divisor|0; +} +} +v597=g596.state; +g596.state=v584; +v598=g596.x; +g596.x=v585; +v599=g596.y; +g596.y=v586; +v600=g596.z; +g596.z=v587; +v601=g596.w; +g596.w=v588; +v602=g596.buffer; +g596.buffer=v589; +v603=g596.size; +g596.size=v590; +v604=g596.normalized; +g596.normalized=v591; +v605=g596.type; +g596.type=v592; +v606=g596.offset; +g596.offset=v593; +v607=g596.stride; +g596.stride=v594; +v608=g596.divisor; +g596.divisor=v595; +v609=g111.call(this,v2,a0,a2); +if(!(v609&&(typeof v609==="object"||typeof v609==="function")&&(v16(v609)||v8.getBuffer(v609)||v8.getBuffer(v609.buffer)||v16(v609.buffer)||("constant" in v609&&(typeof v609.constant==="number"||v17(v609.constant))))))g18.commandRaise(g113,g19); +v610=false; +v611=1; +v612=0; +v613=0; +v614=0; +v615=0; +v616=null; +v617=0; +v618=false; +v619=5126; +v620=0; +v621=0; +v622=0; +if(v16(v609)){ +v610=true; +v616=v8.createStream(34962,v609); +v619=v616.dtype; +} +else{ +v616=v8.getBuffer(v609); +if(v616){ +v619=v616.dtype; +} +else if("constant" in v609){ +v611=2; +if(typeof v609.constant === "number"){ +v612=v609.constant; +v613=v614=v615=0; +} +else{ +v612=v609.constant.length>0?v609.constant[0]:0; +v613=v609.constant.length>1?v609.constant[1]:0; +v614=v609.constant.length>2?v609.constant[2]:0; +v615=v609.constant.length>3?v609.constant[3]:0; +} +} +else{ +if(v16(v609.buffer)){ +v616=v8.createStream(34962,v609.buffer); +} +else{ +v616=v8.getBuffer(v609.buffer); +} +v619="type" in v609?v49[v609.type]:v616.dtype; +v618=!!v609.normalized; +v617=v609.size|0; +v620=v609.offset|0; +v621=v609.stride|0; +v622=v609.divisor|0; +} +} +v624=g623.state; +g623.state=v611; +v625=g623.x; +g623.x=v612; +v626=g623.y; +g623.y=v613; +v627=g623.z; +g623.z=v614; +v628=g623.w; +g623.w=v615; +v629=g623.buffer; +g623.buffer=v616; +v630=g623.size; +g623.size=v617; +v631=g623.normalized; +g623.normalized=v618; +v632=g623.type; +g623.type=v619; +v633=g623.offset; +g623.offset=v620; +v634=g623.stride; +g623.stride=v621; +v635=g623.divisor; +g623.divisor=v622; +v636=g171.call(this,v2,a0,a2); +if(!(v636&&(typeof v636==="object"||typeof v636==="function")&&(v16(v636)||v8.getBuffer(v636)||v8.getBuffer(v636.buffer)||v16(v636.buffer)||("constant" in v636&&(typeof v636.constant==="number"||v17(v636.constant))))))g18.commandRaise(g173,g19); +v637=false; +v638=1; +v639=0; +v640=0; +v641=0; +v642=0; +v643=null; +v644=0; +v645=false; +v646=5126; +v647=0; +v648=0; +v649=0; +if(v16(v636)){ +v637=true; +v643=v8.createStream(34962,v636); +v646=v643.dtype; +} +else{ +v643=v8.getBuffer(v636); +if(v643){ +v646=v643.dtype; +} +else if("constant" in v636){ +v638=2; +if(typeof v636.constant === "number"){ +v639=v636.constant; +v640=v641=v642=0; +} +else{ +v639=v636.constant.length>0?v636.constant[0]:0; +v640=v636.constant.length>1?v636.constant[1]:0; +v641=v636.constant.length>2?v636.constant[2]:0; +v642=v636.constant.length>3?v636.constant[3]:0; +} +} +else{ +if(v16(v636.buffer)){ +v643=v8.createStream(34962,v636.buffer); +} +else{ +v643=v8.getBuffer(v636.buffer); +} +v646="type" in v636?v49[v636.type]:v643.dtype; +v645=!!v636.normalized; +v644=v636.size|0; +v647=v636.offset|0; +v648=v636.stride|0; +v649=v636.divisor|0; +} +} +v651=g650.state; +g650.state=v638; +v652=g650.x; +g650.x=v639; +v653=g650.y; +g650.y=v640; +v654=g650.z; +g650.z=v641; +v655=g650.w; +g650.w=v642; +v656=g650.buffer; +g650.buffer=v643; +v657=g650.size; +g650.size=v644; +v658=g650.normalized; +g650.normalized=v645; +v659=g650.type; +g650.type=v646; +v660=g650.offset; +g650.offset=v647; +v661=g650.stride; +g650.stride=v648; +v662=g650.divisor; +g650.divisor=v649; +v664=v9.vert; +v9.vert=g663; +v666=v9.frag; +v9.frag=g665; +v5.dirty=true; +a1(v2,a0,a2); +v2.viewportWidth=v340; +v2.viewportHeight=v341; +v42[0]=v342; +v42[1]=v343; +v42[2]=v344; +v42[3]=v345; +v20[0]=v347; +v20[1]=v349; +v20[2]=v351; +v20[3]=v353; +v4.blend_enable=v355; +v24[0]=v357; +v24[1]=v359; +v24[2]=v361; +v24[3]=v363; +v4.depth_enable=v365; +v40[0]=v371; +v40[1]=v372; +v40[2]=v373; +v40[3]=v374; +v4.scissor_enable=v376; +v4.stencil_enable=v378; +if(v379){ +g52.cpuTime+=performance.now()-v380; +} +if(v383){ +v7.destroyStream(v382); +} +v6.elements=v384; +v6.offset=v386; +v6.count=v388; +v6.primitive=v390; +v12[g391]=v392; +v12[g394]=v395; +v12[g397]=v398; +v12[g400]=v401; +v12[g403]=v404; +v12[g406]=v407; +v12[g409]=v410; +v12[g412]=v413; +v12[g415]=v416; +v12[g418]=v419; +if(v421){ +v8.destroyStream(v427); +} +g434.state=v435; +g434.x=v436; +g434.y=v437; +g434.z=v438; +g434.w=v439; +g434.buffer=v440; +g434.size=v441; +g434.normalized=v442; +g434.type=v443; +g434.offset=v444; +g434.stride=v445; +g434.divisor=v446; +if(v448){ +v8.destroyStream(v454); +} +g461.state=v462; +g461.x=v463; +g461.y=v464; +g461.z=v465; +g461.w=v466; +g461.buffer=v467; +g461.size=v468; +g461.normalized=v469; +g461.type=v470; +g461.offset=v471; +g461.stride=v472; +g461.divisor=v473; +if(v475){ +v8.destroyStream(v481); +} +g488.state=v489; +g488.x=v490; +g488.y=v491; +g488.z=v492; +g488.w=v493; +g488.buffer=v494; +g488.size=v495; +g488.normalized=v496; +g488.type=v497; +g488.offset=v498; +g488.stride=v499; +g488.divisor=v500; +if(v502){ +v8.destroyStream(v508); +} +g515.state=v516; +g515.x=v517; +g515.y=v518; +g515.z=v519; +g515.w=v520; +g515.buffer=v521; +g515.size=v522; +g515.normalized=v523; +g515.type=v524; +g515.offset=v525; +g515.stride=v526; +g515.divisor=v527; +if(v529){ +v8.destroyStream(v535); +} +g542.state=v543; +g542.x=v544; +g542.y=v545; +g542.z=v546; +g542.w=v547; +g542.buffer=v548; +g542.size=v549; +g542.normalized=v550; +g542.type=v551; +g542.offset=v552; +g542.stride=v553; +g542.divisor=v554; +if(v556){ +v8.destroyStream(v562); +} +g569.state=v570; +g569.x=v571; +g569.y=v572; +g569.z=v573; +g569.w=v574; +g569.buffer=v575; +g569.size=v576; +g569.normalized=v577; +g569.type=v578; +g569.offset=v579; +g569.stride=v580; +g569.divisor=v581; +if(v583){ +v8.destroyStream(v589); +} +g596.state=v597; +g596.x=v598; +g596.y=v599; +g596.z=v600; +g596.w=v601; +g596.buffer=v602; +g596.size=v603; +g596.normalized=v604; +g596.type=v605; +g596.offset=v606; +g596.stride=v607; +g596.divisor=v608; +if(v610){ +v8.destroyStream(v616); +} +g623.state=v624; +g623.x=v625; +g623.y=v626; +g623.z=v627; +g623.w=v628; +g623.buffer=v629; +g623.size=v630; +g623.normalized=v631; +g623.type=v632; +g623.offset=v633; +g623.stride=v634; +g623.divisor=v635; +if(v637){ +v8.destroyStream(v643); +} +g650.state=v651; +g650.x=v652; +g650.y=v653; +g650.z=v654; +g650.w=v655; +g650.buffer=v656; +g650.size=v657; +g650.normalized=v658; +g650.type=v659; +g650.offset=v660; +g650.stride=v661; +g650.divisor=v662; +v9.vert=v664; +v9.frag=v666; +v5.dirty=true; +} +,"batch":function(a0,a1){ +var v667,v668,v707,v708,v709,v710,v711; +v667=v14.angle_instanced_arrays; +v668=v13.next; +if(v668!==v13.cur){ +if(v668){ +v1.bindFramebuffer(36160,v668.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v668; +} +if(v5.dirty){ +var v669,v670,v671,v672,v673,v674,v675,v676,v677,v678,v679,v680,v681,v682,v683,v684,v685,v686,v687,v688,v689,v690,v691,v692,v693,v694,v695,v696,v697,v698,v699,v700,v701,v702; +v669=v4.dither; +if(v669!==v5.dither){ +if(v669){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v669; +} +v670=v22[0]; +v671=v22[1]; +if(v670!==v23[0]||v671!==v23[1]){ +v1.blendEquationSeparate(v670,v671); +v23[0]=v670; +v23[1]=v671; +} +v672=v4.depth_func; +if(v672!==v5.depth_func){ +v1.depthFunc(v672); +v5.depth_func=v672; +} +v673=v26[0]; +v674=v26[1]; +if(v673!==v27[0]||v674!==v27[1]){ +v1.depthRange(v673,v674); +v27[0]=v673; +v27[1]=v674; +} +v675=v4.depth_mask; +if(v675!==v5.depth_mask){ +v1.depthMask(v675); +v5.depth_mask=v675; +} +v676=v28[0]; +v677=v28[1]; +v678=v28[2]; +v679=v28[3]; +if(v676!==v29[0]||v677!==v29[1]||v678!==v29[2]||v679!==v29[3]){ +v1.colorMask(v676,v677,v678,v679); +v29[0]=v676; +v29[1]=v677; +v29[2]=v678; +v29[3]=v679; +} +v680=v4.cull_enable; +if(v680!==v5.cull_enable){ +if(v680){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v680; +} +v681=v4.cull_face; +if(v681!==v5.cull_face){ +v1.cullFace(v681); +v5.cull_face=v681; +} +v682=v4.frontFace; +if(v682!==v5.frontFace){ +v1.frontFace(v682); +v5.frontFace=v682; +} +v683=v4.lineWidth; +if(v683!==v5.lineWidth){ +v1.lineWidth(v683); +v5.lineWidth=v683; +} +v684=v4.polygonOffset_enable; +if(v684!==v5.polygonOffset_enable){ +if(v684){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v684; +} +v685=v30[0]; +v686=v30[1]; +if(v685!==v31[0]||v686!==v31[1]){ +v1.polygonOffset(v685,v686); +v31[0]=v685; +v31[1]=v686; +} +v687=v4.sample_alpha; +if(v687!==v5.sample_alpha){ +if(v687){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v687; +} +v688=v4.sample_enable; +if(v688!==v5.sample_enable){ +if(v688){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v688; +} +v689=v32[0]; +v690=v32[1]; +if(v689!==v33[0]||v690!==v33[1]){ +v1.sampleCoverage(v689,v690); +v33[0]=v689; +v33[1]=v690; +} +v691=v4.stencil_mask; +if(v691!==v5.stencil_mask){ +v1.stencilMask(v691); +v5.stencil_mask=v691; +} +v692=v34[0]; +v693=v34[1]; +v694=v34[2]; +if(v692!==v35[0]||v693!==v35[1]||v694!==v35[2]){ +v1.stencilFunc(v692,v693,v694); +v35[0]=v692; +v35[1]=v693; +v35[2]=v694; +} +v695=v36[0]; +v696=v36[1]; +v697=v36[2]; +v698=v36[3]; +if(v695!==v37[0]||v696!==v37[1]||v697!==v37[2]||v698!==v37[3]){ +v1.stencilOpSeparate(v695,v696,v697,v698); +v37[0]=v695; +v37[1]=v696; +v37[2]=v697; +v37[3]=v698; +} +v699=v38[0]; +v700=v38[1]; +v701=v38[2]; +v702=v38[3]; +if(v699!==v39[0]||v700!==v39[1]||v701!==v39[2]||v702!==v39[3]){ +v1.stencilOpSeparate(v699,v700,v701,v702); +v39[0]=v699; +v39[1]=v700; +v39[2]=v701; +v39[3]=v702; +} +} +v1.blendColor(0,0,0,1); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=1; +if(g703){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g703; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +if(g704){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=g704; +if(g705){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g705; +if(g706){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=g706; +v707=v5.profile; +if(v707){ +v708=performance.now(); +g52.count+=a1; +} +v1.useProgram(g109.program); +v709=v14.angle_instanced_arrays; +var v911; +v11.setVAO(null); +v1.uniform1i(g291.location,false); +v1.uniform1i(g301.location,g302.bind()); +v911=v6.instances; +for(v710=0; +v710=0&&v716>=0))g18.commandRaise(g90,g19); +v717=v2.viewportWidth; +v2.viewportWidth=v715; +v718=v2.viewportHeight; +v2.viewportHeight=v716; +v1.viewport(v713,v714,v715,v716); +v43[0]=v713; +v43[1]=v714; +v43[2]=v715; +v43[3]=v716; +v719=v711["viewport"]; +if(!(v719&&typeof v719==="object"))g18.commandRaise(g100,g19); +v720=v719.x|0; +v721=v719.y|0; +v722="width" in v719?v719.width|0:(v2.framebufferWidth-v720); +v723="height" in v719?v719.height|0:(v2.framebufferHeight-v721); +if(!(v722>=0&&v723>=0))g18.commandRaise(g100,g19); +v1.scissor(v720,v721,v722,v723); +v41[0]=v720; +v41[1]=v721; +v41[2]=v722; +v41[3]=v723; +v724=g111.call(this,v2,v711,v710); +if(!(v724&&(typeof v724==="object"||typeof v724==="function")&&(v16(v724)||v8.getBuffer(v724)||v8.getBuffer(v724.buffer)||v16(v724.buffer)||("constant" in v724&&(typeof v724.constant==="number"||v17(v724.constant))))))g18.commandRaise(g113,g19); +v725=false; +v726=1; +v727=0; +v728=0; +v729=0; +v730=0; +v731=null; +v732=0; +v733=false; +v734=5126; +v735=0; +v736=0; +v737=0; +if(v16(v724)){ +v725=true; +v731=v8.createStream(34962,v724); +v734=v731.dtype; +} +else{ +v731=v8.getBuffer(v724); +if(v731){ +v734=v731.dtype; +} +else if("constant" in v724){ +v726=2; +if(typeof v724.constant === "number"){ +v727=v724.constant; +v728=v729=v730=0; +} +else{ +v727=v724.constant.length>0?v724.constant[0]:0; +v728=v724.constant.length>1?v724.constant[1]:0; +v729=v724.constant.length>2?v724.constant[2]:0; +v730=v724.constant.length>3?v724.constant[3]:0; +} +} +else{ +if(v16(v724.buffer)){ +v731=v8.createStream(34962,v724.buffer); +} +else{ +v731=v8.getBuffer(v724.buffer); +} +v734="type" in v724?v49[v724.type]:v731.dtype; +v733=!!v724.normalized; +v732=v724.size|0; +v735=v724.offset|0; +v736=v724.stride|0; +v737=v724.divisor|0; +} +} +v738=g127.location; +v739=v10[v738]; +if(v726===1){ +if(!v739.buffer){ +v1.enableVertexAttribArray(v738); +} +v740=v732||4; +if(v739.type!==v734||v739.size!==v740||v739.buffer!==v731||v739.normalized!==v733||v739.offset!==v735||v739.stride!==v736){ +v1.bindBuffer(34962,v731.buffer); +v1.vertexAttribPointer(v738,v740,v734,v733,v736,v735); +v739.type=v734; +v739.size=v740; +v739.buffer=v731; +v739.normalized=v733; +v739.offset=v735; +v739.stride=v736; +} +if(v739.divisor!==v737){ +v709.vertexAttribDivisorANGLE(v738,v737); +v739.divisor=v737; +} +} +else{ +if(v739.buffer){ +v1.disableVertexAttribArray(v738); +v739.buffer=null; +} +if(v739.x!==v727||v739.y!==v728||v739.z!==v729||v739.w!==v730){ +v1.vertexAttrib4f(v738,v727,v728,v729,v730); +v739.x=v727; +v739.y=v728; +v739.z=v729; +v739.w=v730; +} +} +v741=g131.call(this,v2,v711,v710); +if(!(v741&&(typeof v741==="object"||typeof v741==="function")&&(v16(v741)||v8.getBuffer(v741)||v8.getBuffer(v741.buffer)||v16(v741.buffer)||("constant" in v741&&(typeof v741.constant==="number"||v17(v741.constant))))))g18.commandRaise(g133,g19); +v742=false; +v743=1; +v744=0; +v745=0; +v746=0; +v747=0; +v748=null; +v749=0; +v750=false; +v751=5126; +v752=0; +v753=0; +v754=0; +if(v16(v741)){ +v742=true; +v748=v8.createStream(34962,v741); +v751=v748.dtype; +} +else{ +v748=v8.getBuffer(v741); +if(v748){ +v751=v748.dtype; +} +else if("constant" in v741){ +v743=2; +if(typeof v741.constant === "number"){ +v744=v741.constant; +v745=v746=v747=0; +} +else{ +v744=v741.constant.length>0?v741.constant[0]:0; +v745=v741.constant.length>1?v741.constant[1]:0; +v746=v741.constant.length>2?v741.constant[2]:0; +v747=v741.constant.length>3?v741.constant[3]:0; +} +} +else{ +if(v16(v741.buffer)){ +v748=v8.createStream(34962,v741.buffer); +} +else{ +v748=v8.getBuffer(v741.buffer); +} +v751="type" in v741?v49[v741.type]:v748.dtype; +v750=!!v741.normalized; +v749=v741.size|0; +v752=v741.offset|0; +v753=v741.stride|0; +v754=v741.divisor|0; +} +} +v755=g147.location; +v756=v10[v755]; +if(v743===1){ +if(!v756.buffer){ +v1.enableVertexAttribArray(v755); +} +v757=v749||1; +if(v756.type!==v751||v756.size!==v757||v756.buffer!==v748||v756.normalized!==v750||v756.offset!==v752||v756.stride!==v753){ +v1.bindBuffer(34962,v748.buffer); +v1.vertexAttribPointer(v755,v757,v751,v750,v753,v752); +v756.type=v751; +v756.size=v757; +v756.buffer=v748; +v756.normalized=v750; +v756.offset=v752; +v756.stride=v753; +} +if(v756.divisor!==v754){ +v709.vertexAttribDivisorANGLE(v755,v754); +v756.divisor=v754; +} +} +else{ +if(v756.buffer){ +v1.disableVertexAttribArray(v755); +v756.buffer=null; +} +if(v756.x!==v744||v756.y!==v745||v756.z!==v746||v756.w!==v747){ +v1.vertexAttrib4f(v755,v744,v745,v746,v747); +v756.x=v744; +v756.y=v745; +v756.z=v746; +v756.w=v747; +} +} +v758=g151.call(this,v2,v711,v710); +if(!(v758&&(typeof v758==="object"||typeof v758==="function")&&(v16(v758)||v8.getBuffer(v758)||v8.getBuffer(v758.buffer)||v16(v758.buffer)||("constant" in v758&&(typeof v758.constant==="number"||v17(v758.constant))))))g18.commandRaise(g153,g19); +v759=false; +v760=1; +v761=0; +v762=0; +v763=0; +v764=0; +v765=null; +v766=0; +v767=false; +v768=5126; +v769=0; +v770=0; +v771=0; +if(v16(v758)){ +v759=true; +v765=v8.createStream(34962,v758); +v768=v765.dtype; +} +else{ +v765=v8.getBuffer(v758); +if(v765){ +v768=v765.dtype; +} +else if("constant" in v758){ +v760=2; +if(typeof v758.constant === "number"){ +v761=v758.constant; +v762=v763=v764=0; +} +else{ +v761=v758.constant.length>0?v758.constant[0]:0; +v762=v758.constant.length>1?v758.constant[1]:0; +v763=v758.constant.length>2?v758.constant[2]:0; +v764=v758.constant.length>3?v758.constant[3]:0; +} +} +else{ +if(v16(v758.buffer)){ +v765=v8.createStream(34962,v758.buffer); +} +else{ +v765=v8.getBuffer(v758.buffer); +} +v768="type" in v758?v49[v758.type]:v765.dtype; +v767=!!v758.normalized; +v766=v758.size|0; +v769=v758.offset|0; +v770=v758.stride|0; +v771=v758.divisor|0; +} +} +v772=g167.location; +v773=v10[v772]; +if(v760===1){ +if(!v773.buffer){ +v1.enableVertexAttribArray(v772); +} +v774=v766||4; +if(v773.type!==v768||v773.size!==v774||v773.buffer!==v765||v773.normalized!==v767||v773.offset!==v769||v773.stride!==v770){ +v1.bindBuffer(34962,v765.buffer); +v1.vertexAttribPointer(v772,v774,v768,v767,v770,v769); +v773.type=v768; +v773.size=v774; +v773.buffer=v765; +v773.normalized=v767; +v773.offset=v769; +v773.stride=v770; +} +if(v773.divisor!==v771){ +v709.vertexAttribDivisorANGLE(v772,v771); +v773.divisor=v771; +} +} +else{ +if(v773.buffer){ +v1.disableVertexAttribArray(v772); +v773.buffer=null; +} +if(v773.x!==v761||v773.y!==v762||v773.z!==v763||v773.w!==v764){ +v1.vertexAttrib4f(v772,v761,v762,v763,v764); +v773.x=v761; +v773.y=v762; +v773.z=v763; +v773.w=v764; +} +} +v775=g171.call(this,v2,v711,v710); +if(!(v775&&(typeof v775==="object"||typeof v775==="function")&&(v16(v775)||v8.getBuffer(v775)||v8.getBuffer(v775.buffer)||v16(v775.buffer)||("constant" in v775&&(typeof v775.constant==="number"||v17(v775.constant))))))g18.commandRaise(g173,g19); +v776=false; +v777=1; +v778=0; +v779=0; +v780=0; +v781=0; +v782=null; +v783=0; +v784=false; +v785=5126; +v786=0; +v787=0; +v788=0; +if(v16(v775)){ +v776=true; +v782=v8.createStream(34962,v775); +v785=v782.dtype; +} +else{ +v782=v8.getBuffer(v775); +if(v782){ +v785=v782.dtype; +} +else if("constant" in v775){ +v777=2; +if(typeof v775.constant === "number"){ +v778=v775.constant; +v779=v780=v781=0; +} +else{ +v778=v775.constant.length>0?v775.constant[0]:0; +v779=v775.constant.length>1?v775.constant[1]:0; +v780=v775.constant.length>2?v775.constant[2]:0; +v781=v775.constant.length>3?v775.constant[3]:0; +} +} +else{ +if(v16(v775.buffer)){ +v782=v8.createStream(34962,v775.buffer); +} +else{ +v782=v8.getBuffer(v775.buffer); +} +v785="type" in v775?v49[v775.type]:v782.dtype; +v784=!!v775.normalized; +v783=v775.size|0; +v786=v775.offset|0; +v787=v775.stride|0; +v788=v775.divisor|0; +} +} +v789=g187.location; +v790=v10[v789]; +if(v777===1){ +if(!v790.buffer){ +v1.enableVertexAttribArray(v789); +} +v791=v783||1; +if(v790.type!==v785||v790.size!==v791||v790.buffer!==v782||v790.normalized!==v784||v790.offset!==v786||v790.stride!==v787){ +v1.bindBuffer(34962,v782.buffer); +v1.vertexAttribPointer(v789,v791,v785,v784,v787,v786); +v790.type=v785; +v790.size=v791; +v790.buffer=v782; +v790.normalized=v784; +v790.offset=v786; +v790.stride=v787; +} +if(v790.divisor!==v788){ +v709.vertexAttribDivisorANGLE(v789,v788); +v790.divisor=v788; +} +} +else{ +if(v790.buffer){ +v1.disableVertexAttribArray(v789); +v790.buffer=null; +} +if(v790.x!==v778||v790.y!==v779||v790.z!==v780||v790.w!==v781){ +v1.vertexAttrib4f(v789,v778,v779,v780,v781); +v790.x=v778; +v790.y=v779; +v790.z=v780; +v790.w=v781; +} +} +v792=g191.call(this,v2,v711,v710); +if(!(v792&&(typeof v792==="object"||typeof v792==="function")&&(v16(v792)||v8.getBuffer(v792)||v8.getBuffer(v792.buffer)||v16(v792.buffer)||("constant" in v792&&(typeof v792.constant==="number"||v17(v792.constant))))))g18.commandRaise(g193,g19); +v793=false; +v794=1; +v795=0; +v796=0; +v797=0; +v798=0; +v799=null; +v800=0; +v801=false; +v802=5126; +v803=0; +v804=0; +v805=0; +if(v16(v792)){ +v793=true; +v799=v8.createStream(34962,v792); +v802=v799.dtype; +} +else{ +v799=v8.getBuffer(v792); +if(v799){ +v802=v799.dtype; +} +else if("constant" in v792){ +v794=2; +if(typeof v792.constant === "number"){ +v795=v792.constant; +v796=v797=v798=0; +} +else{ +v795=v792.constant.length>0?v792.constant[0]:0; +v796=v792.constant.length>1?v792.constant[1]:0; +v797=v792.constant.length>2?v792.constant[2]:0; +v798=v792.constant.length>3?v792.constant[3]:0; +} +} +else{ +if(v16(v792.buffer)){ +v799=v8.createStream(34962,v792.buffer); +} +else{ +v799=v8.getBuffer(v792.buffer); +} +v802="type" in v792?v49[v792.type]:v799.dtype; +v801=!!v792.normalized; +v800=v792.size|0; +v803=v792.offset|0; +v804=v792.stride|0; +v805=v792.divisor|0; +} +} +v806=g207.location; +v807=v10[v806]; +if(v794===1){ +if(!v807.buffer){ +v1.enableVertexAttribArray(v806); +} +v808=v800||1; +if(v807.type!==v802||v807.size!==v808||v807.buffer!==v799||v807.normalized!==v801||v807.offset!==v803||v807.stride!==v804){ +v1.bindBuffer(34962,v799.buffer); +v1.vertexAttribPointer(v806,v808,v802,v801,v804,v803); +v807.type=v802; +v807.size=v808; +v807.buffer=v799; +v807.normalized=v801; +v807.offset=v803; +v807.stride=v804; +} +if(v807.divisor!==v805){ +v709.vertexAttribDivisorANGLE(v806,v805); +v807.divisor=v805; +} +} +else{ +if(v807.buffer){ +v1.disableVertexAttribArray(v806); +v807.buffer=null; +} +if(v807.x!==v795||v807.y!==v796||v807.z!==v797||v807.w!==v798){ +v1.vertexAttrib4f(v806,v795,v796,v797,v798); +v807.x=v795; +v807.y=v796; +v807.z=v797; +v807.w=v798; +} +} +v809=g211.call(this,v2,v711,v710); +if(!(v809&&(typeof v809==="object"||typeof v809==="function")&&(v16(v809)||v8.getBuffer(v809)||v8.getBuffer(v809.buffer)||v16(v809.buffer)||("constant" in v809&&(typeof v809.constant==="number"||v17(v809.constant))))))g18.commandRaise(g213,g19); +v810=false; +v811=1; +v812=0; +v813=0; +v814=0; +v815=0; +v816=null; +v817=0; +v818=false; +v819=5126; +v820=0; +v821=0; +v822=0; +if(v16(v809)){ +v810=true; +v816=v8.createStream(34962,v809); +v819=v816.dtype; +} +else{ +v816=v8.getBuffer(v809); +if(v816){ +v819=v816.dtype; +} +else if("constant" in v809){ +v811=2; +if(typeof v809.constant === "number"){ +v812=v809.constant; +v813=v814=v815=0; +} +else{ +v812=v809.constant.length>0?v809.constant[0]:0; +v813=v809.constant.length>1?v809.constant[1]:0; +v814=v809.constant.length>2?v809.constant[2]:0; +v815=v809.constant.length>3?v809.constant[3]:0; +} +} +else{ +if(v16(v809.buffer)){ +v816=v8.createStream(34962,v809.buffer); +} +else{ +v816=v8.getBuffer(v809.buffer); +} +v819="type" in v809?v49[v809.type]:v816.dtype; +v818=!!v809.normalized; +v817=v809.size|0; +v820=v809.offset|0; +v821=v809.stride|0; +v822=v809.divisor|0; +} +} +v823=g227.location; +v824=v10[v823]; +if(v811===1){ +if(!v824.buffer){ +v1.enableVertexAttribArray(v823); +} +v825=v817||1; +if(v824.type!==v819||v824.size!==v825||v824.buffer!==v816||v824.normalized!==v818||v824.offset!==v820||v824.stride!==v821){ +v1.bindBuffer(34962,v816.buffer); +v1.vertexAttribPointer(v823,v825,v819,v818,v821,v820); +v824.type=v819; +v824.size=v825; +v824.buffer=v816; +v824.normalized=v818; +v824.offset=v820; +v824.stride=v821; +} +if(v824.divisor!==v822){ +v709.vertexAttribDivisorANGLE(v823,v822); +v824.divisor=v822; +} +} +else{ +if(v824.buffer){ +v1.disableVertexAttribArray(v823); +v824.buffer=null; +} +if(v824.x!==v812||v824.y!==v813||v824.z!==v814||v824.w!==v815){ +v1.vertexAttrib4f(v823,v812,v813,v814,v815); +v824.x=v812; +v824.y=v813; +v824.z=v814; +v824.w=v815; +} +} +v826=g231.call(this,v2,v711,v710); +if(!(v826&&(typeof v826==="object"||typeof v826==="function")&&(v16(v826)||v8.getBuffer(v826)||v8.getBuffer(v826.buffer)||v16(v826.buffer)||("constant" in v826&&(typeof v826.constant==="number"||v17(v826.constant))))))g18.commandRaise(g233,g19); +v827=false; +v828=1; +v829=0; +v830=0; +v831=0; +v832=0; +v833=null; +v834=0; +v835=false; +v836=5126; +v837=0; +v838=0; +v839=0; +if(v16(v826)){ +v827=true; +v833=v8.createStream(34962,v826); +v836=v833.dtype; +} +else{ +v833=v8.getBuffer(v826); +if(v833){ +v836=v833.dtype; +} +else if("constant" in v826){ +v828=2; +if(typeof v826.constant === "number"){ +v829=v826.constant; +v830=v831=v832=0; +} +else{ +v829=v826.constant.length>0?v826.constant[0]:0; +v830=v826.constant.length>1?v826.constant[1]:0; +v831=v826.constant.length>2?v826.constant[2]:0; +v832=v826.constant.length>3?v826.constant[3]:0; +} +} +else{ +if(v16(v826.buffer)){ +v833=v8.createStream(34962,v826.buffer); +} +else{ +v833=v8.getBuffer(v826.buffer); +} +v836="type" in v826?v49[v826.type]:v833.dtype; +v835=!!v826.normalized; +v834=v826.size|0; +v837=v826.offset|0; +v838=v826.stride|0; +v839=v826.divisor|0; +} +} +v840=g247.location; +v841=v10[v840]; +if(v828===1){ +if(!v841.buffer){ +v1.enableVertexAttribArray(v840); +} +v842=v834||1; +if(v841.type!==v836||v841.size!==v842||v841.buffer!==v833||v841.normalized!==v835||v841.offset!==v837||v841.stride!==v838){ +v1.bindBuffer(34962,v833.buffer); +v1.vertexAttribPointer(v840,v842,v836,v835,v838,v837); +v841.type=v836; +v841.size=v842; +v841.buffer=v833; +v841.normalized=v835; +v841.offset=v837; +v841.stride=v838; +} +if(v841.divisor!==v839){ +v709.vertexAttribDivisorANGLE(v840,v839); +v841.divisor=v839; +} +} +else{ +if(v841.buffer){ +v1.disableVertexAttribArray(v840); +v841.buffer=null; +} +if(v841.x!==v829||v841.y!==v830||v841.z!==v831||v841.w!==v832){ +v1.vertexAttrib4f(v840,v829,v830,v831,v832); +v841.x=v829; +v841.y=v830; +v841.z=v831; +v841.w=v832; +} +} +v843=g251.call(this,v2,v711,v710); +if(!(v843&&(typeof v843==="object"||typeof v843==="function")&&(v16(v843)||v8.getBuffer(v843)||v8.getBuffer(v843.buffer)||v16(v843.buffer)||("constant" in v843&&(typeof v843.constant==="number"||v17(v843.constant))))))g18.commandRaise(g253,g19); +v844=false; +v845=1; +v846=0; +v847=0; +v848=0; +v849=0; +v850=null; +v851=0; +v852=false; +v853=5126; +v854=0; +v855=0; +v856=0; +if(v16(v843)){ +v844=true; +v850=v8.createStream(34962,v843); +v853=v850.dtype; +} +else{ +v850=v8.getBuffer(v843); +if(v850){ +v853=v850.dtype; +} +else if("constant" in v843){ +v845=2; +if(typeof v843.constant === "number"){ +v846=v843.constant; +v847=v848=v849=0; +} +else{ +v846=v843.constant.length>0?v843.constant[0]:0; +v847=v843.constant.length>1?v843.constant[1]:0; +v848=v843.constant.length>2?v843.constant[2]:0; +v849=v843.constant.length>3?v843.constant[3]:0; +} +} +else{ +if(v16(v843.buffer)){ +v850=v8.createStream(34962,v843.buffer); +} +else{ +v850=v8.getBuffer(v843.buffer); +} +v853="type" in v843?v49[v843.type]:v850.dtype; +v852=!!v843.normalized; +v851=v843.size|0; +v854=v843.offset|0; +v855=v843.stride|0; +v856=v843.divisor|0; +} +} +v857=g267.location; +v858=v10[v857]; +if(v845===1){ +if(!v858.buffer){ +v1.enableVertexAttribArray(v857); +} +v859=v851||1; +if(v858.type!==v853||v858.size!==v859||v858.buffer!==v850||v858.normalized!==v852||v858.offset!==v854||v858.stride!==v855){ +v1.bindBuffer(34962,v850.buffer); +v1.vertexAttribPointer(v857,v859,v853,v852,v855,v854); +v858.type=v853; +v858.size=v859; +v858.buffer=v850; +v858.normalized=v852; +v858.offset=v854; +v858.stride=v855; +} +if(v858.divisor!==v856){ +v709.vertexAttribDivisorANGLE(v857,v856); +v858.divisor=v856; +} +} +else{ +if(v858.buffer){ +v1.disableVertexAttribArray(v857); +v858.buffer=null; +} +if(v858.x!==v846||v858.y!==v847||v858.z!==v848||v858.w!==v849){ +v1.vertexAttrib4f(v857,v846,v847,v848,v849); +v858.x=v846; +v858.y=v847; +v858.z=v848; +v858.w=v849; +} +} +v860=g271.call(this,v2,v711,v710); +if(!(v860&&(typeof v860==="object"||typeof v860==="function")&&(v16(v860)||v8.getBuffer(v860)||v8.getBuffer(v860.buffer)||v16(v860.buffer)||("constant" in v860&&(typeof v860.constant==="number"||v17(v860.constant))))))g18.commandRaise(g273,g19); +v861=false; +v862=1; +v863=0; +v864=0; +v865=0; +v866=0; +v867=null; +v868=0; +v869=false; +v870=5126; +v871=0; +v872=0; +v873=0; +if(v16(v860)){ +v861=true; +v867=v8.createStream(34962,v860); +v870=v867.dtype; +} +else{ +v867=v8.getBuffer(v860); +if(v867){ +v870=v867.dtype; +} +else if("constant" in v860){ +v862=2; +if(typeof v860.constant === "number"){ +v863=v860.constant; +v864=v865=v866=0; +} +else{ +v863=v860.constant.length>0?v860.constant[0]:0; +v864=v860.constant.length>1?v860.constant[1]:0; +v865=v860.constant.length>2?v860.constant[2]:0; +v866=v860.constant.length>3?v860.constant[3]:0; +} +} +else{ +if(v16(v860.buffer)){ +v867=v8.createStream(34962,v860.buffer); +} +else{ +v867=v8.getBuffer(v860.buffer); +} +v870="type" in v860?v49[v860.type]:v867.dtype; +v869=!!v860.normalized; +v868=v860.size|0; +v871=v860.offset|0; +v872=v860.stride|0; +v873=v860.divisor|0; +} +} +v874=g287.location; +v875=v10[v874]; +if(v862===1){ +if(!v875.buffer){ +v1.enableVertexAttribArray(v874); +} +v876=v868||1; +if(v875.type!==v870||v875.size!==v876||v875.buffer!==v867||v875.normalized!==v869||v875.offset!==v871||v875.stride!==v872){ +v1.bindBuffer(34962,v867.buffer); +v1.vertexAttribPointer(v874,v876,v870,v869,v872,v871); +v875.type=v870; +v875.size=v876; +v875.buffer=v867; +v875.normalized=v869; +v875.offset=v871; +v875.stride=v872; +} +if(v875.divisor!==v873){ +v709.vertexAttribDivisorANGLE(v874,v873); +v875.divisor=v873; +} +} +else{ +if(v875.buffer){ +v1.disableVertexAttribArray(v874); +v875.buffer=null; +} +if(v875.x!==v863||v875.y!==v864||v875.z!==v865||v875.w!==v866){ +v1.vertexAttrib4f(v874,v863,v864,v865,v866); +v875.x=v863; +v875.y=v864; +v875.z=v865; +v875.w=v866; +} +} +v877=v711["opacity"]; +if(!(typeof v877==="number"))g18.commandRaise(g294,g19); +if(!v710||v878!==v877){ +v878=v877; +v1.uniform1f(g292.location,v877); +} +v879=g296.call(this,v2,v711,v710); +if(!(v17(v879)&&v879.length===2))g18.commandRaise(g298,g19); +v880=v879[0]; +v882=v879[1]; +if(!v710||v881!==v880||v883!==v882){ +v881=v880; +v883=v882; +v1.uniform2f(g295.location,v880,v882); +} +v884=v2["pixelRatio"]; +if(!(typeof v884==="number"))g18.commandRaise(g305,g19); +if(!v710||v885!==v884){ +v885=v884; +v1.uniform1f(g303.location,v884); +} +v886=v711["scale"]; +if(!(v17(v886)&&v886.length===2))g18.commandRaise(g308,g19); +v887=v886[0]; +v889=v886[1]; +if(!v710||v888!==v887||v890!==v889){ +v888=v887; +v890=v889; +v1.uniform2f(g306.location,v887,v889); +} +v891=v711["scaleFract"]; +if(!(v17(v891)&&v891.length===2))g18.commandRaise(g313,g19); +v892=v891[0]; +v894=v891[1]; +if(!v710||v893!==v892||v895!==v894){ +v893=v892; +v895=v894; +v1.uniform2f(g311.location,v892,v894); +} +v896=v711["translate"]; +if(!(v17(v896)&&v896.length===2))g18.commandRaise(g318,g19); +v897=v896[0]; +v899=v896[1]; +if(!v710||v898!==v897||v900!==v899){ +v898=v897; +v900=v899; +v1.uniform2f(g316.location,v897,v899); +} +v901=v711["translateFract"]; +if(!(v17(v901)&&v901.length===2))g18.commandRaise(g323,g19); +v902=v901[0]; +v904=v901[1]; +if(!v710||v903!==v902||v905!==v904){ +v903=v902; +v905=v904; +v1.uniform2f(g321.location,v902,v904); +} +v906=v711["elements"]; +v907=null; +v908=v16(v906); +if(v908){ +v907=v7.createStream(v906); +} +else{ +v907=v7.getElements(v906); +if(!(!v906||v907))g18.commandRaise(g329,g19); +} +if(v907)v1.bindBuffer(34963,v907.buffer.buffer); +v909=v711["offset"]; +if(!(v909>=0))g18.commandRaise(g331,g19); +v910=v711["count"]; +if(!(typeof v910==="number"&&v910>=0&&v910===(v910|0)))g18.commandRaise(g333,g19); +if(v910){ +if(v911>0){ +if(v907){ +v709.drawElementsInstancedANGLE(0,v910,v907.type,v909<<((v907.type-5121)>>1),v911); +} +else{ +v709.drawArraysInstancedANGLE(0,v909,v910,v911); +} +} +else if(v911<0){ +if(v907){ +v1.drawElements(0,v910,v907.type,v909<<((v907.type-5121)>>1)); +} +else{ +v1.drawArrays(0,v909,v910); +} +} +v2.viewportWidth=v717; +v2.viewportHeight=v718; +if(v725){ +v8.destroyStream(v731); +} +if(v742){ +v8.destroyStream(v748); +} +if(v759){ +v8.destroyStream(v765); +} +if(v776){ +v8.destroyStream(v782); +} +if(v793){ +v8.destroyStream(v799); +} +if(v810){ +v8.destroyStream(v816); +} +if(v827){ +v8.destroyStream(v833); +} +if(v844){ +v8.destroyStream(v850); +} +if(v861){ +v8.destroyStream(v867); +} +if(v908){ +v7.destroyStream(v907); +} +} +} +g302.unbind(); +v5.dirty=true; +v11.setVAO(null); +if(v707){ +g52.cpuTime+=performance.now()-v708; +} +} +,} + +} \ No newline at end of file diff --git a/src/generated/regl-codegen/21cec01aa93887c70e86d7f1bc84d6837da0b1f5c1ff4cadd42ac6eb37f9f316 b/src/generated/regl-codegen/21cec01aa93887c70e86d7f1bc84d6837da0b1f5c1ff4cadd42ac6eb37f9f316 new file mode 100644 index 00000000000..46af0c1d7e1 --- /dev/null +++ b/src/generated/regl-codegen/21cec01aa93887c70e86d7f1bc84d6837da0b1f5c1ff4cadd42ac6eb37f9f316 @@ -0,0 +1,2488 @@ +module.exports = function anonymous(g0,g18,g19,g52,g93,g100,g101,g103,g105,g110,g111,g114,g117,g131,g136,g150,g155,g169,g174,g188,g193,g207,g211,g212,g215,g218,g220,g221,g223,g225,g227,g228,g230,g231,g233,g236,g238,g241,g243,g244,g246,g249,g251,g254,g255,g257,g275,g277,g279,g281,g283,g285,g287,g289,g291,g293,g295,g308,g310,g314,g316,g320,g322,g324,g327,g330,g333,g336,g339,g342,g345,g348,g351,g354,g357,g360,g363,g365,g378,g405,g432,g459,g486,g513,g526,g528,g564,g565,g566 +) { +"use strict"; +var v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v53,v54,v55,v56,v57; +v1=g0.gl; +v2=g0.context; +v3=g0.strings; +v4=g0.next; +v5=g0.current; +v6=g0.draw; +v7=g0.elements; +v8=g0.buffer; +v9=g0.shader; +v10=g0.attributes; +v11=g0.vao; +v12=g0.uniforms; +v13=g0.framebuffer; +v14=g0.extensions; +v15=g0.timer; +v16=g0.isBufferArgs; +v17=g0.isArrayLike; +v20=v4.blend_color; +v21=v5.blend_color; +v22=v4.blend_equation; +v23=v5.blend_equation; +v24=v4.blend_func; +v25=v5.blend_func; +v26=v4.depth_range; +v27=v5.depth_range; +v28=v4.colorMask; +v29=v5.colorMask; +v30=v4.polygonOffset_offset; +v31=v5.polygonOffset_offset; +v32=v4.sample_coverage; +v33=v5.sample_coverage; +v34=v4.stencil_func; +v35=v5.stencil_func; +v36=v4.stencil_opFront; +v37=v5.stencil_opFront; +v38=v4.stencil_opBack; +v39=v5.stencil_opBack; +v40=v4.scissor_box; +v41=v5.scissor_box; +v42=v4.viewport; +v43=v5.viewport; +v44={ +"points":0,"point":0,"lines":1,"line":1,"triangles":4,"triangle":4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6} +; +v45={ +"never":512,"less":513,"<":513,"equal":514,"=":514,"==":514,"===":514,"lequal":515,"<=":515,"greater":516,">":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +v53={ +} +; +v53.stride=8; +v53.offset=8; +v53.divisor=1; +v54={ +} +; +v54.stride=8; +v54.offset=16; +v54.divisor=1; +v55={ +} +; +v55.stride=8; +v55.offset=8; +v55.divisor=1; +v56={ +} +; +v56.stride=8; +v56.offset=16; +v56.divisor=1; +v57={ +} +; +v57.stride=4; +v57.offset=0; +v57.divisor=1; +return { +"draw":function(a0){ +var v58,v59,v92,v94,v95,v96,v97,v98,v99,v102,v104,v106,v107,v108,v109,v112,v113,v115,v116,v118,v119,v120,v121,v122,v123,v124,v125,v126,v127,v128,v129,v130,v132,v133,v134,v135,v137,v138,v139,v140,v141,v142,v143,v144,v145,v146,v147,v148,v149,v151,v152,v153,v154,v156,v157,v158,v159,v160,v161,v162,v163,v164,v165,v166,v167,v168,v170,v171,v172,v173,v175,v176,v177,v178,v179,v180,v181,v182,v183,v184,v185,v186,v187,v189,v190,v191,v192,v194,v195,v196,v197,v198,v199,v200,v201,v202,v203,v204,v205,v206,v208,v209,v210,v213,v214,v216,v217,v219,v222,v224,v226,v229,v232,v234,v235,v237,v239,v240,v242,v245,v247,v248,v250,v252,v253,v256,v258,v259,v260,v261,v262,v263; +v58=v14.angle_instanced_arrays; +v59=v13.next; +if(v59!==v13.cur){ +if(v59){ +v1.bindFramebuffer(36160,v59.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v59; +} +if(v5.dirty){ +var v60,v61,v62,v63,v64,v65,v66,v67,v68,v69,v70,v71,v72,v73,v74,v75,v76,v77,v78,v79,v80,v81,v82,v83,v84,v85,v86,v87,v88,v89,v90,v91; +v60=v4.dither; +if(v60!==v5.dither){ +if(v60){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v60; +} +v61=v4.depth_func; +if(v61!==v5.depth_func){ +v1.depthFunc(v61); +v5.depth_func=v61; +} +v62=v26[0]; +v63=v26[1]; +if(v62!==v27[0]||v63!==v27[1]){ +v1.depthRange(v62,v63); +v27[0]=v62; +v27[1]=v63; +} +v64=v4.depth_mask; +if(v64!==v5.depth_mask){ +v1.depthMask(v64); +v5.depth_mask=v64; +} +v65=v28[0]; +v66=v28[1]; +v67=v28[2]; +v68=v28[3]; +if(v65!==v29[0]||v66!==v29[1]||v67!==v29[2]||v68!==v29[3]){ +v1.colorMask(v65,v66,v67,v68); +v29[0]=v65; +v29[1]=v66; +v29[2]=v67; +v29[3]=v68; +} +v69=v4.cull_enable; +if(v69!==v5.cull_enable){ +if(v69){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v69; +} +v70=v4.cull_face; +if(v70!==v5.cull_face){ +v1.cullFace(v70); +v5.cull_face=v70; +} +v71=v4.frontFace; +if(v71!==v5.frontFace){ +v1.frontFace(v71); +v5.frontFace=v71; +} +v72=v4.lineWidth; +if(v72!==v5.lineWidth){ +v1.lineWidth(v72); +v5.lineWidth=v72; +} +v73=v4.polygonOffset_enable; +if(v73!==v5.polygonOffset_enable){ +if(v73){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v73; +} +v74=v30[0]; +v75=v30[1]; +if(v74!==v31[0]||v75!==v31[1]){ +v1.polygonOffset(v74,v75); +v31[0]=v74; +v31[1]=v75; +} +v76=v4.sample_alpha; +if(v76!==v5.sample_alpha){ +if(v76){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v76; +} +v77=v4.sample_enable; +if(v77!==v5.sample_enable){ +if(v77){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v77; +} +v78=v32[0]; +v79=v32[1]; +if(v78!==v33[0]||v79!==v33[1]){ +v1.sampleCoverage(v78,v79); +v33[0]=v78; +v33[1]=v79; +} +v80=v4.stencil_mask; +if(v80!==v5.stencil_mask){ +v1.stencilMask(v80); +v5.stencil_mask=v80; +} +v81=v34[0]; +v82=v34[1]; +v83=v34[2]; +if(v81!==v35[0]||v82!==v35[1]||v83!==v35[2]){ +v1.stencilFunc(v81,v82,v83); +v35[0]=v81; +v35[1]=v82; +v35[2]=v83; +} +v84=v36[0]; +v85=v36[1]; +v86=v36[2]; +v87=v36[3]; +if(v84!==v37[0]||v85!==v37[1]||v86!==v37[2]||v87!==v37[3]){ +v1.stencilOpSeparate(v84,v85,v86,v87); +v37[0]=v84; +v37[1]=v85; +v37[2]=v86; +v37[3]=v87; +} +v88=v38[0]; +v89=v38[1]; +v90=v38[2]; +v91=v38[3]; +if(v88!==v39[0]||v89!==v39[1]||v90!==v39[2]||v91!==v39[3]){ +v1.stencilOpSeparate(v88,v89,v90,v91); +v39[0]=v88; +v39[1]=v89; +v39[2]=v90; +v39[3]=v91; +} +} +v92=a0["viewport"]; +if(!(v92&&typeof v92==="object"))g18.commandRaise(g93,g19); +v94=v92.x|0; +v95=v92.y|0; +v96="width" in v92?v92.width|0:(v2.framebufferWidth-v94); +v97="height" in v92?v92.height|0:(v2.framebufferHeight-v95); +if(!(v96>=0&&v97>=0))g18.commandRaise(g93,g19); +v98=v2.viewportWidth; +v2.viewportWidth=v96; +v99=v2.viewportHeight; +v2.viewportHeight=v97; +v1.viewport(v94,v95,v96,v97); +v43[0]=v94; +v43[1]=v95; +v43[2]=v96; +v43[3]=v97; +v1.blendColor(0,0,0,0); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=0; +if(g100){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g100; +v1.blendEquationSeparate(32774,32774); +v23[0]=32774; +v23[1]=32774; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +v102=g101.call(this,v2,a0,0); +if(!(typeof v102==="boolean"))g18.commandRaise(g103,g19); +if(v102){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=v102; +v104=a0["viewport"]; +if(!(v104&&typeof v104==="object"))g18.commandRaise(g105,g19); +v106=v104.x|0; +v107=v104.y|0; +v108="width" in v104?v104.width|0:(v2.framebufferWidth-v106); +v109="height" in v104?v104.height|0:(v2.framebufferHeight-v107); +if(!(v108>=0&&v109>=0))g18.commandRaise(g105,g19); +v1.scissor(v106,v107,v108,v109); +v41[0]=v106; +v41[1]=v107; +v41[2]=v108; +v41[3]=v109; +if(g110){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g110; +if(g111){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=g111; +v112=v5.profile; +if(v112){ +v113=performance.now(); +g52.count++; +} +v1.useProgram(g114.program); +v115=v14.angle_instanced_arrays; +v11.setVAO(null); +v116=a0["positionBuffer"]; +v53.buffer=v116; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g117,g19); +v118=false; +v119=1; +v120=0; +v121=0; +v122=0; +v123=0; +v124=null; +v125=0; +v126=false; +v127=5126; +v128=0; +v129=0; +v130=0; +if(v16(v53)){ +v118=true; +v124=v8.createStream(34962,v53); +v127=v124.dtype; +} +else{ +v124=v8.getBuffer(v53); +if(v124){ +v127=v124.dtype; +} +else if("constant" in v53){ +v119=2; +if(typeof v53.constant === "number"){ +v120=v53.constant; +v121=v122=v123=0; +} +else{ +v120=v53.constant.length>0?v53.constant[0]:0; +v121=v53.constant.length>1?v53.constant[1]:0; +v122=v53.constant.length>2?v53.constant[2]:0; +v123=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v124=v8.createStream(34962,v53.buffer); +} +else{ +v124=v8.getBuffer(v53.buffer); +} +v127="type" in v53?v49[v53.type]:v124.dtype; +v126=!!v53.normalized; +v125=v53.size|0; +v128=v53.offset|0; +v129=v53.stride|0; +v130=v53.divisor|0; +} +} +v132=g131.location; +v133=v10[v132]; +if(v119===1){ +if(!v133.buffer){ +v1.enableVertexAttribArray(v132); +} +v134=v125||2; +if(v133.type!==v127||v133.size!==v134||v133.buffer!==v124||v133.normalized!==v126||v133.offset!==v128||v133.stride!==v129){ +v1.bindBuffer(34962,v124.buffer); +v1.vertexAttribPointer(v132,v134,v127,v126,v129,v128); +v133.type=v127; +v133.size=v134; +v133.buffer=v124; +v133.normalized=v126; +v133.offset=v128; +v133.stride=v129; +} +if(v133.divisor!==v130){ +v115.vertexAttribDivisorANGLE(v132,v130); +v133.divisor=v130; +} +} +else{ +if(v133.buffer){ +v1.disableVertexAttribArray(v132); +v133.buffer=null; +} +if(v133.x!==v120||v133.y!==v121||v133.z!==v122||v133.w!==v123){ +v1.vertexAttrib4f(v132,v120,v121,v122,v123); +v133.x=v120; +v133.y=v121; +v133.z=v122; +v133.w=v123; +} +} +v135=a0["positionFractBuffer"]; +v55.buffer=v135; +if(!(v55&&(typeof v55==="object"||typeof v55==="function")&&(v16(v55)||v8.getBuffer(v55)||v8.getBuffer(v55.buffer)||v16(v55.buffer)||("constant" in v55&&(typeof v55.constant==="number"||v17(v55.constant))))))g18.commandRaise(g136,g19); +v137=false; +v138=1; +v139=0; +v140=0; +v141=0; +v142=0; +v143=null; +v144=0; +v145=false; +v146=5126; +v147=0; +v148=0; +v149=0; +if(v16(v55)){ +v137=true; +v143=v8.createStream(34962,v55); +v146=v143.dtype; +} +else{ +v143=v8.getBuffer(v55); +if(v143){ +v146=v143.dtype; +} +else if("constant" in v55){ +v138=2; +if(typeof v55.constant === "number"){ +v139=v55.constant; +v140=v141=v142=0; +} +else{ +v139=v55.constant.length>0?v55.constant[0]:0; +v140=v55.constant.length>1?v55.constant[1]:0; +v141=v55.constant.length>2?v55.constant[2]:0; +v142=v55.constant.length>3?v55.constant[3]:0; +} +} +else{ +if(v16(v55.buffer)){ +v143=v8.createStream(34962,v55.buffer); +} +else{ +v143=v8.getBuffer(v55.buffer); +} +v146="type" in v55?v49[v55.type]:v143.dtype; +v145=!!v55.normalized; +v144=v55.size|0; +v147=v55.offset|0; +v148=v55.stride|0; +v149=v55.divisor|0; +} +} +v151=g150.location; +v152=v10[v151]; +if(v138===1){ +if(!v152.buffer){ +v1.enableVertexAttribArray(v151); +} +v153=v144||2; +if(v152.type!==v146||v152.size!==v153||v152.buffer!==v143||v152.normalized!==v145||v152.offset!==v147||v152.stride!==v148){ +v1.bindBuffer(34962,v143.buffer); +v1.vertexAttribPointer(v151,v153,v146,v145,v148,v147); +v152.type=v146; +v152.size=v153; +v152.buffer=v143; +v152.normalized=v145; +v152.offset=v147; +v152.stride=v148; +} +if(v152.divisor!==v149){ +v115.vertexAttribDivisorANGLE(v151,v149); +v152.divisor=v149; +} +} +else{ +if(v152.buffer){ +v1.disableVertexAttribArray(v151); +v152.buffer=null; +} +if(v152.x!==v139||v152.y!==v140||v152.z!==v141||v152.w!==v142){ +v1.vertexAttrib4f(v151,v139,v140,v141,v142); +v152.x=v139; +v152.y=v140; +v152.z=v141; +v152.w=v142; +} +} +v154=a0["positionBuffer"]; +v54.buffer=v154; +if(!(v54&&(typeof v54==="object"||typeof v54==="function")&&(v16(v54)||v8.getBuffer(v54)||v8.getBuffer(v54.buffer)||v16(v54.buffer)||("constant" in v54&&(typeof v54.constant==="number"||v17(v54.constant))))))g18.commandRaise(g155,g19); +v156=false; +v157=1; +v158=0; +v159=0; +v160=0; +v161=0; +v162=null; +v163=0; +v164=false; +v165=5126; +v166=0; +v167=0; +v168=0; +if(v16(v54)){ +v156=true; +v162=v8.createStream(34962,v54); +v165=v162.dtype; +} +else{ +v162=v8.getBuffer(v54); +if(v162){ +v165=v162.dtype; +} +else if("constant" in v54){ +v157=2; +if(typeof v54.constant === "number"){ +v158=v54.constant; +v159=v160=v161=0; +} +else{ +v158=v54.constant.length>0?v54.constant[0]:0; +v159=v54.constant.length>1?v54.constant[1]:0; +v160=v54.constant.length>2?v54.constant[2]:0; +v161=v54.constant.length>3?v54.constant[3]:0; +} +} +else{ +if(v16(v54.buffer)){ +v162=v8.createStream(34962,v54.buffer); +} +else{ +v162=v8.getBuffer(v54.buffer); +} +v165="type" in v54?v49[v54.type]:v162.dtype; +v164=!!v54.normalized; +v163=v54.size|0; +v166=v54.offset|0; +v167=v54.stride|0; +v168=v54.divisor|0; +} +} +v170=g169.location; +v171=v10[v170]; +if(v157===1){ +if(!v171.buffer){ +v1.enableVertexAttribArray(v170); +} +v172=v163||2; +if(v171.type!==v165||v171.size!==v172||v171.buffer!==v162||v171.normalized!==v164||v171.offset!==v166||v171.stride!==v167){ +v1.bindBuffer(34962,v162.buffer); +v1.vertexAttribPointer(v170,v172,v165,v164,v167,v166); +v171.type=v165; +v171.size=v172; +v171.buffer=v162; +v171.normalized=v164; +v171.offset=v166; +v171.stride=v167; +} +if(v171.divisor!==v168){ +v115.vertexAttribDivisorANGLE(v170,v168); +v171.divisor=v168; +} +} +else{ +if(v171.buffer){ +v1.disableVertexAttribArray(v170); +v171.buffer=null; +} +if(v171.x!==v158||v171.y!==v159||v171.z!==v160||v171.w!==v161){ +v1.vertexAttrib4f(v170,v158,v159,v160,v161); +v171.x=v158; +v171.y=v159; +v171.z=v160; +v171.w=v161; +} +} +v173=a0["positionFractBuffer"]; +v56.buffer=v173; +if(!(v56&&(typeof v56==="object"||typeof v56==="function")&&(v16(v56)||v8.getBuffer(v56)||v8.getBuffer(v56.buffer)||v16(v56.buffer)||("constant" in v56&&(typeof v56.constant==="number"||v17(v56.constant))))))g18.commandRaise(g174,g19); +v175=false; +v176=1; +v177=0; +v178=0; +v179=0; +v180=0; +v181=null; +v182=0; +v183=false; +v184=5126; +v185=0; +v186=0; +v187=0; +if(v16(v56)){ +v175=true; +v181=v8.createStream(34962,v56); +v184=v181.dtype; +} +else{ +v181=v8.getBuffer(v56); +if(v181){ +v184=v181.dtype; +} +else if("constant" in v56){ +v176=2; +if(typeof v56.constant === "number"){ +v177=v56.constant; +v178=v179=v180=0; +} +else{ +v177=v56.constant.length>0?v56.constant[0]:0; +v178=v56.constant.length>1?v56.constant[1]:0; +v179=v56.constant.length>2?v56.constant[2]:0; +v180=v56.constant.length>3?v56.constant[3]:0; +} +} +else{ +if(v16(v56.buffer)){ +v181=v8.createStream(34962,v56.buffer); +} +else{ +v181=v8.getBuffer(v56.buffer); +} +v184="type" in v56?v49[v56.type]:v181.dtype; +v183=!!v56.normalized; +v182=v56.size|0; +v185=v56.offset|0; +v186=v56.stride|0; +v187=v56.divisor|0; +} +} +v189=g188.location; +v190=v10[v189]; +if(v176===1){ +if(!v190.buffer){ +v1.enableVertexAttribArray(v189); +} +v191=v182||2; +if(v190.type!==v184||v190.size!==v191||v190.buffer!==v181||v190.normalized!==v183||v190.offset!==v185||v190.stride!==v186){ +v1.bindBuffer(34962,v181.buffer); +v1.vertexAttribPointer(v189,v191,v184,v183,v186,v185); +v190.type=v184; +v190.size=v191; +v190.buffer=v181; +v190.normalized=v183; +v190.offset=v185; +v190.stride=v186; +} +if(v190.divisor!==v187){ +v115.vertexAttribDivisorANGLE(v189,v187); +v190.divisor=v187; +} +} +else{ +if(v190.buffer){ +v1.disableVertexAttribArray(v189); +v190.buffer=null; +} +if(v190.x!==v177||v190.y!==v178||v190.z!==v179||v190.w!==v180){ +v1.vertexAttrib4f(v189,v177,v178,v179,v180); +v190.x=v177; +v190.y=v178; +v190.z=v179; +v190.w=v180; +} +} +v192=a0["colorBuffer"]; +v57.buffer=v192; +if(!(v57&&(typeof v57==="object"||typeof v57==="function")&&(v16(v57)||v8.getBuffer(v57)||v8.getBuffer(v57.buffer)||v16(v57.buffer)||("constant" in v57&&(typeof v57.constant==="number"||v17(v57.constant))))))g18.commandRaise(g193,g19); +v194=false; +v195=1; +v196=0; +v197=0; +v198=0; +v199=0; +v200=null; +v201=0; +v202=false; +v203=5126; +v204=0; +v205=0; +v206=0; +if(v16(v57)){ +v194=true; +v200=v8.createStream(34962,v57); +v203=v200.dtype; +} +else{ +v200=v8.getBuffer(v57); +if(v200){ +v203=v200.dtype; +} +else if("constant" in v57){ +v195=2; +if(typeof v57.constant === "number"){ +v196=v57.constant; +v197=v198=v199=0; +} +else{ +v196=v57.constant.length>0?v57.constant[0]:0; +v197=v57.constant.length>1?v57.constant[1]:0; +v198=v57.constant.length>2?v57.constant[2]:0; +v199=v57.constant.length>3?v57.constant[3]:0; +} +} +else{ +if(v16(v57.buffer)){ +v200=v8.createStream(34962,v57.buffer); +} +else{ +v200=v8.getBuffer(v57.buffer); +} +v203="type" in v57?v49[v57.type]:v200.dtype; +v202=!!v57.normalized; +v201=v57.size|0; +v204=v57.offset|0; +v205=v57.stride|0; +v206=v57.divisor|0; +} +} +v208=g207.location; +v209=v10[v208]; +if(v195===1){ +if(!v209.buffer){ +v1.enableVertexAttribArray(v208); +} +v210=v201||4; +if(v209.type!==v203||v209.size!==v210||v209.buffer!==v200||v209.normalized!==v202||v209.offset!==v204||v209.stride!==v205){ +v1.bindBuffer(34962,v200.buffer); +v1.vertexAttribPointer(v208,v210,v203,v202,v205,v204); +v209.type=v203; +v209.size=v210; +v209.buffer=v200; +v209.normalized=v202; +v209.offset=v204; +v209.stride=v205; +} +if(v209.divisor!==v206){ +v115.vertexAttribDivisorANGLE(v208,v206); +v209.divisor=v206; +} +} +else{ +if(v209.buffer){ +v1.disableVertexAttribArray(v208); +v209.buffer=null; +} +if(v209.x!==v196||v209.y!==v197||v209.z!==v198||v209.w!==v199){ +v1.vertexAttrib4f(v208,v196,v197,v198,v199); +v209.x=v196; +v209.y=v197; +v209.z=v198; +v209.w=v199; +} +} +v213=g212.location; +v214=v10[v213]; +if(!v214.buffer){ +v1.enableVertexAttribArray(v213); +} +if(v214.type!==5126||v214.size!==1||v214.buffer!==g211||v214.normalized!==false||v214.offset!==0||v214.stride!==8){ +v1.bindBuffer(34962,g211.buffer); +v1.vertexAttribPointer(v213,1,5126,false,8,0); +v214.type=5126; +v214.size=1; +v214.buffer=g211; +v214.normalized=false; +v214.offset=0; +v214.stride=8; +} +if(v214.divisor!==0){ +v115.vertexAttribDivisorANGLE(v213,0); +v214.divisor=0; +} +v216=g215.location; +v217=v10[v216]; +if(!v217.buffer){ +v1.enableVertexAttribArray(v216); +} +if(v217.type!==5126||v217.size!==1||v217.buffer!==g211||v217.normalized!==false||v217.offset!==4||v217.stride!==8){ +v1.bindBuffer(34962,g211.buffer); +v1.vertexAttribPointer(v216,1,5126,false,8,4); +v217.type=5126; +v217.size=1; +v217.buffer=g211; +v217.normalized=false; +v217.offset=4; +v217.stride=8; +} +if(v217.divisor!==0){ +v115.vertexAttribDivisorANGLE(v216,0); +v217.divisor=0; +} +v219=a0["dashLength"]; +if(!(typeof v219==="number"))g18.commandRaise(g220,g19); +v1.uniform1f(g218.location,v219); +v222=a0["dashTexture"]; +if(v222&&v222._reglType==="framebuffer"){ +v222=v222.color[0]; +} +if(!(typeof v222==="function"&&v222._reglType==="texture2d"))g18.commandRaise(g223,g19); +v224=v222._texture; +v1.uniform1i(g221.location,v224.bind()); +v226=a0["depth"]; +if(!(typeof v226==="number"))g18.commandRaise(g227,g19); +v1.uniform1f(g225.location,v226); +v229=a0["opacity"]; +if(!(typeof v229==="number"))g18.commandRaise(g230,g19); +v1.uniform1f(g228.location,v229); +v232=a0["scale"]; +if(!(v17(v232)&&v232.length===2))g18.commandRaise(g233,g19); +v234=v232[0]; +v235=v232[1]; +v1.uniform2f(g231.location,v234,v235); +v237=a0["scaleFract"]; +if(!(v17(v237)&&v237.length===2))g18.commandRaise(g238,g19); +v239=v237[0]; +v240=v237[1]; +v1.uniform2f(g236.location,v239,v240); +v242=a0["thickness"]; +if(!(typeof v242==="number"))g18.commandRaise(g243,g19); +v1.uniform1f(g241.location,v242); +v245=a0["translate"]; +if(!(v17(v245)&&v245.length===2))g18.commandRaise(g246,g19); +v247=v245[0]; +v248=v245[1]; +v1.uniform2f(g244.location,v247,v248); +v250=a0["translateFract"]; +if(!(v17(v250)&&v250.length===2))g18.commandRaise(g251,g19); +v252=v250[0]; +v253=v250[1]; +v1.uniform2f(g249.location,v252,v253); +v256=g255.call(this,v2,a0,0); +if(!(v17(v256)&&v256.length===4))g18.commandRaise(g257,g19); +v258=v256[0]; +v259=v256[1]; +v260=v256[2]; +v261=v256[3]; +v1.uniform4f(g254.location,v258,v259,v260,v261); +v262=v6.elements; +if(v262){ +v1.bindBuffer(34963,v262.buffer.buffer); +} +else if(v11.currentVAO){ +v262=v7.getElements(v11.currentVAO.elements); +if(v262)v1.bindBuffer(34963,v262.buffer.buffer); +} +v263=a0["count"]; +if(v263>0){ +if(v262){ +v115.drawElementsInstancedANGLE(5,4,v262.type,0<<((v262.type-5121)>>1),v263); +} +else{ +v115.drawArraysInstancedANGLE(5,0,4,v263); +} +} +else if(v263<0){ +if(v262){ +v1.drawElements(5,4,v262.type,0<<((v262.type-5121)>>1)); +} +else{ +v1.drawArrays(5,0,4); +} +} +v5.dirty=true; +v11.setVAO(null); +v2.viewportWidth=v98; +v2.viewportHeight=v99; +if(v112){ +g52.cpuTime+=performance.now()-v113; +} +if(v118){ +v8.destroyStream(v124); +} +if(v137){ +v8.destroyStream(v143); +} +if(v156){ +v8.destroyStream(v162); +} +if(v175){ +v8.destroyStream(v181); +} +if(v194){ +v8.destroyStream(v200); +} +v224.unbind(); +} +,"scope":function(a0,a1,a2){ +var v264,v265,v266,v267,v268,v269,v270,v271,v272,v273,v274,v276,v278,v280,v282,v284,v286,v288,v290,v292,v294,v296,v297,v298,v299,v300,v301,v302,v303,v304,v305,v306,v307,v309,v311,v312,v313,v315,v317,v318,v319,v321,v323,v325,v326,v328,v329,v331,v332,v334,v335,v337,v338,v340,v341,v343,v344,v346,v347,v349,v350,v352,v353,v355,v356,v358,v359,v361,v362,v364,v366,v367,v368,v369,v370,v371,v372,v373,v374,v375,v376,v377,v379,v380,v381,v382,v383,v384,v385,v386,v387,v388,v389,v390,v391,v392,v393,v394,v395,v396,v397,v398,v399,v400,v401,v402,v403,v404,v406,v407,v408,v409,v410,v411,v412,v413,v414,v415,v416,v417,v418,v419,v420,v421,v422,v423,v424,v425,v426,v427,v428,v429,v430,v431,v433,v434,v435,v436,v437,v438,v439,v440,v441,v442,v443,v444,v445,v446,v447,v448,v449,v450,v451,v452,v453,v454,v455,v456,v457,v458,v460,v461,v462,v463,v464,v465,v466,v467,v468,v469,v470,v471,v472,v473,v474,v475,v476,v477,v478,v479,v480,v481,v482,v483,v484,v485,v487,v488,v489,v490,v491,v492,v493,v494,v495,v496,v497,v498,v499,v500,v501,v502,v503,v504,v505,v506,v507,v508,v509,v510,v511,v512,v514,v515,v516,v517,v518,v519,v520,v521,v522,v523,v524,v525,v527,v529; +v264=a0["viewport"]; +if(!(v264&&typeof v264==="object"))g18.commandRaise(g93,g19); +v265=v264.x|0; +v266=v264.y|0; +v267="width" in v264?v264.width|0:(v2.framebufferWidth-v265); +v268="height" in v264?v264.height|0:(v2.framebufferHeight-v266); +if(!(v267>=0&&v268>=0))g18.commandRaise(g93,g19); +v269=v2.viewportWidth; +v2.viewportWidth=v267; +v270=v2.viewportHeight; +v2.viewportHeight=v268; +v271=v42[0]; +v42[0]=v265; +v272=v42[1]; +v42[1]=v266; +v273=v42[2]; +v42[2]=v267; +v274=v42[3]; +v42[3]=v268; +v276=v20[0]; +v20[0]=g275; +v278=v20[1]; +v20[1]=g277; +v280=v20[2]; +v20[2]=g279; +v282=v20[3]; +v20[3]=g281; +v284=v4.blend_enable; +v4.blend_enable=g283; +v286=v22[0]; +v22[0]=g285; +v288=v22[1]; +v22[1]=g287; +v290=v24[0]; +v24[0]=g289; +v292=v24[1]; +v24[1]=g291; +v294=v24[2]; +v24[2]=g293; +v296=v24[3]; +v24[3]=g295; +v297=g101.call(this,v2,a0,a2); +if(!(typeof v297==="boolean"))g18.commandRaise(g103,g19); +v298=v4.depth_enable; +v4.depth_enable=v297; +v299=a0["viewport"]; +if(!(v299&&typeof v299==="object"))g18.commandRaise(g105,g19); +v300=v299.x|0; +v301=v299.y|0; +v302="width" in v299?v299.width|0:(v2.framebufferWidth-v300); +v303="height" in v299?v299.height|0:(v2.framebufferHeight-v301); +if(!(v302>=0&&v303>=0))g18.commandRaise(g105,g19); +v304=v40[0]; +v40[0]=v300; +v305=v40[1]; +v40[1]=v301; +v306=v40[2]; +v40[2]=v302; +v307=v40[3]; +v40[3]=v303; +v309=v4.scissor_enable; +v4.scissor_enable=g308; +v311=v4.stencil_enable; +v4.stencil_enable=g310; +v312=v5.profile; +if(v312){ +v313=performance.now(); +g52.count++; +} +v315=v6.offset; +v6.offset=g314; +v317=v6.count; +v6.count=g316; +v318=a0["count"]; +v319=v6.instances; +v6.instances=v318; +v321=v6.primitive; +v6.primitive=g320; +v323=g322.call(this,v2,a0,a2); +v325=v12[g324]; +v12[g324]=v323; +v326=a0["miterLimit"]; +v328=v12[g327]; +v12[g327]=v326; +v329=a0["scale"]; +v331=v12[g330]; +v12[g330]=v329; +v332=a0["scaleFract"]; +v334=v12[g333]; +v12[g333]=v332; +v335=a0["translateFract"]; +v337=v12[g336]; +v12[g336]=v335; +v338=a0["translate"]; +v340=v12[g339]; +v12[g339]=v338; +v341=a0["thickness"]; +v343=v12[g342]; +v12[g342]=v341; +v344=a0["dashTexture"]; +v346=v12[g345]; +v12[g345]=v344; +v347=a0["opacity"]; +v349=v12[g348]; +v12[g348]=v347; +v350=v2["pixelRatio"]; +v352=v12[g351]; +v12[g351]=v350; +v353=a0["id"]; +v355=v12[g354]; +v12[g354]=v353; +v356=a0["dashLength"]; +v358=v12[g357]; +v12[g357]=v356; +v359=g255.call(this,v2,a0,a2); +v361=v12[g360]; +v12[g360]=v359; +v362=a0["depth"]; +v364=v12[g363]; +v12[g363]=v362; +v366=g365.state; +g365.state=1; +v367=g365.x; +g365.x=0; +v368=g365.y; +g365.y=0; +v369=g365.z; +g365.z=0; +v370=g365.w; +g365.w=0; +v371=g365.buffer; +g365.buffer=g211; +v372=g365.size; +g365.size=0; +v373=g365.normalized; +g365.normalized=false; +v374=g365.type; +g365.type=5126; +v375=g365.offset; +g365.offset=0; +v376=g365.stride; +g365.stride=8; +v377=g365.divisor; +g365.divisor=0; +v379=g378.state; +g378.state=1; +v380=g378.x; +g378.x=0; +v381=g378.y; +g378.y=0; +v382=g378.z; +g378.z=0; +v383=g378.w; +g378.w=0; +v384=g378.buffer; +g378.buffer=g211; +v385=g378.size; +g378.size=0; +v386=g378.normalized; +g378.normalized=false; +v387=g378.type; +g378.type=5126; +v388=g378.offset; +g378.offset=4; +v389=g378.stride; +g378.stride=8; +v390=g378.divisor; +g378.divisor=0; +v391=a0["positionBuffer"]; +v53.buffer=v391; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g117,g19); +v392=false; +v393=1; +v394=0; +v395=0; +v396=0; +v397=0; +v398=null; +v399=0; +v400=false; +v401=5126; +v402=0; +v403=0; +v404=0; +if(v16(v53)){ +v392=true; +v398=v8.createStream(34962,v53); +v401=v398.dtype; +} +else{ +v398=v8.getBuffer(v53); +if(v398){ +v401=v398.dtype; +} +else if("constant" in v53){ +v393=2; +if(typeof v53.constant === "number"){ +v394=v53.constant; +v395=v396=v397=0; +} +else{ +v394=v53.constant.length>0?v53.constant[0]:0; +v395=v53.constant.length>1?v53.constant[1]:0; +v396=v53.constant.length>2?v53.constant[2]:0; +v397=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v398=v8.createStream(34962,v53.buffer); +} +else{ +v398=v8.getBuffer(v53.buffer); +} +v401="type" in v53?v49[v53.type]:v398.dtype; +v400=!!v53.normalized; +v399=v53.size|0; +v402=v53.offset|0; +v403=v53.stride|0; +v404=v53.divisor|0; +} +} +v406=g405.state; +g405.state=v393; +v407=g405.x; +g405.x=v394; +v408=g405.y; +g405.y=v395; +v409=g405.z; +g405.z=v396; +v410=g405.w; +g405.w=v397; +v411=g405.buffer; +g405.buffer=v398; +v412=g405.size; +g405.size=v399; +v413=g405.normalized; +g405.normalized=v400; +v414=g405.type; +g405.type=v401; +v415=g405.offset; +g405.offset=v402; +v416=g405.stride; +g405.stride=v403; +v417=g405.divisor; +g405.divisor=v404; +v418=a0["positionBuffer"]; +v54.buffer=v418; +if(!(v54&&(typeof v54==="object"||typeof v54==="function")&&(v16(v54)||v8.getBuffer(v54)||v8.getBuffer(v54.buffer)||v16(v54.buffer)||("constant" in v54&&(typeof v54.constant==="number"||v17(v54.constant))))))g18.commandRaise(g155,g19); +v419=false; +v420=1; +v421=0; +v422=0; +v423=0; +v424=0; +v425=null; +v426=0; +v427=false; +v428=5126; +v429=0; +v430=0; +v431=0; +if(v16(v54)){ +v419=true; +v425=v8.createStream(34962,v54); +v428=v425.dtype; +} +else{ +v425=v8.getBuffer(v54); +if(v425){ +v428=v425.dtype; +} +else if("constant" in v54){ +v420=2; +if(typeof v54.constant === "number"){ +v421=v54.constant; +v422=v423=v424=0; +} +else{ +v421=v54.constant.length>0?v54.constant[0]:0; +v422=v54.constant.length>1?v54.constant[1]:0; +v423=v54.constant.length>2?v54.constant[2]:0; +v424=v54.constant.length>3?v54.constant[3]:0; +} +} +else{ +if(v16(v54.buffer)){ +v425=v8.createStream(34962,v54.buffer); +} +else{ +v425=v8.getBuffer(v54.buffer); +} +v428="type" in v54?v49[v54.type]:v425.dtype; +v427=!!v54.normalized; +v426=v54.size|0; +v429=v54.offset|0; +v430=v54.stride|0; +v431=v54.divisor|0; +} +} +v433=g432.state; +g432.state=v420; +v434=g432.x; +g432.x=v421; +v435=g432.y; +g432.y=v422; +v436=g432.z; +g432.z=v423; +v437=g432.w; +g432.w=v424; +v438=g432.buffer; +g432.buffer=v425; +v439=g432.size; +g432.size=v426; +v440=g432.normalized; +g432.normalized=v427; +v441=g432.type; +g432.type=v428; +v442=g432.offset; +g432.offset=v429; +v443=g432.stride; +g432.stride=v430; +v444=g432.divisor; +g432.divisor=v431; +v445=a0["positionFractBuffer"]; +v55.buffer=v445; +if(!(v55&&(typeof v55==="object"||typeof v55==="function")&&(v16(v55)||v8.getBuffer(v55)||v8.getBuffer(v55.buffer)||v16(v55.buffer)||("constant" in v55&&(typeof v55.constant==="number"||v17(v55.constant))))))g18.commandRaise(g136,g19); +v446=false; +v447=1; +v448=0; +v449=0; +v450=0; +v451=0; +v452=null; +v453=0; +v454=false; +v455=5126; +v456=0; +v457=0; +v458=0; +if(v16(v55)){ +v446=true; +v452=v8.createStream(34962,v55); +v455=v452.dtype; +} +else{ +v452=v8.getBuffer(v55); +if(v452){ +v455=v452.dtype; +} +else if("constant" in v55){ +v447=2; +if(typeof v55.constant === "number"){ +v448=v55.constant; +v449=v450=v451=0; +} +else{ +v448=v55.constant.length>0?v55.constant[0]:0; +v449=v55.constant.length>1?v55.constant[1]:0; +v450=v55.constant.length>2?v55.constant[2]:0; +v451=v55.constant.length>3?v55.constant[3]:0; +} +} +else{ +if(v16(v55.buffer)){ +v452=v8.createStream(34962,v55.buffer); +} +else{ +v452=v8.getBuffer(v55.buffer); +} +v455="type" in v55?v49[v55.type]:v452.dtype; +v454=!!v55.normalized; +v453=v55.size|0; +v456=v55.offset|0; +v457=v55.stride|0; +v458=v55.divisor|0; +} +} +v460=g459.state; +g459.state=v447; +v461=g459.x; +g459.x=v448; +v462=g459.y; +g459.y=v449; +v463=g459.z; +g459.z=v450; +v464=g459.w; +g459.w=v451; +v465=g459.buffer; +g459.buffer=v452; +v466=g459.size; +g459.size=v453; +v467=g459.normalized; +g459.normalized=v454; +v468=g459.type; +g459.type=v455; +v469=g459.offset; +g459.offset=v456; +v470=g459.stride; +g459.stride=v457; +v471=g459.divisor; +g459.divisor=v458; +v472=a0["positionFractBuffer"]; +v56.buffer=v472; +if(!(v56&&(typeof v56==="object"||typeof v56==="function")&&(v16(v56)||v8.getBuffer(v56)||v8.getBuffer(v56.buffer)||v16(v56.buffer)||("constant" in v56&&(typeof v56.constant==="number"||v17(v56.constant))))))g18.commandRaise(g174,g19); +v473=false; +v474=1; +v475=0; +v476=0; +v477=0; +v478=0; +v479=null; +v480=0; +v481=false; +v482=5126; +v483=0; +v484=0; +v485=0; +if(v16(v56)){ +v473=true; +v479=v8.createStream(34962,v56); +v482=v479.dtype; +} +else{ +v479=v8.getBuffer(v56); +if(v479){ +v482=v479.dtype; +} +else if("constant" in v56){ +v474=2; +if(typeof v56.constant === "number"){ +v475=v56.constant; +v476=v477=v478=0; +} +else{ +v475=v56.constant.length>0?v56.constant[0]:0; +v476=v56.constant.length>1?v56.constant[1]:0; +v477=v56.constant.length>2?v56.constant[2]:0; +v478=v56.constant.length>3?v56.constant[3]:0; +} +} +else{ +if(v16(v56.buffer)){ +v479=v8.createStream(34962,v56.buffer); +} +else{ +v479=v8.getBuffer(v56.buffer); +} +v482="type" in v56?v49[v56.type]:v479.dtype; +v481=!!v56.normalized; +v480=v56.size|0; +v483=v56.offset|0; +v484=v56.stride|0; +v485=v56.divisor|0; +} +} +v487=g486.state; +g486.state=v474; +v488=g486.x; +g486.x=v475; +v489=g486.y; +g486.y=v476; +v490=g486.z; +g486.z=v477; +v491=g486.w; +g486.w=v478; +v492=g486.buffer; +g486.buffer=v479; +v493=g486.size; +g486.size=v480; +v494=g486.normalized; +g486.normalized=v481; +v495=g486.type; +g486.type=v482; +v496=g486.offset; +g486.offset=v483; +v497=g486.stride; +g486.stride=v484; +v498=g486.divisor; +g486.divisor=v485; +v499=a0["colorBuffer"]; +v57.buffer=v499; +if(!(v57&&(typeof v57==="object"||typeof v57==="function")&&(v16(v57)||v8.getBuffer(v57)||v8.getBuffer(v57.buffer)||v16(v57.buffer)||("constant" in v57&&(typeof v57.constant==="number"||v17(v57.constant))))))g18.commandRaise(g193,g19); +v500=false; +v501=1; +v502=0; +v503=0; +v504=0; +v505=0; +v506=null; +v507=0; +v508=false; +v509=5126; +v510=0; +v511=0; +v512=0; +if(v16(v57)){ +v500=true; +v506=v8.createStream(34962,v57); +v509=v506.dtype; +} +else{ +v506=v8.getBuffer(v57); +if(v506){ +v509=v506.dtype; +} +else if("constant" in v57){ +v501=2; +if(typeof v57.constant === "number"){ +v502=v57.constant; +v503=v504=v505=0; +} +else{ +v502=v57.constant.length>0?v57.constant[0]:0; +v503=v57.constant.length>1?v57.constant[1]:0; +v504=v57.constant.length>2?v57.constant[2]:0; +v505=v57.constant.length>3?v57.constant[3]:0; +} +} +else{ +if(v16(v57.buffer)){ +v506=v8.createStream(34962,v57.buffer); +} +else{ +v506=v8.getBuffer(v57.buffer); +} +v509="type" in v57?v49[v57.type]:v506.dtype; +v508=!!v57.normalized; +v507=v57.size|0; +v510=v57.offset|0; +v511=v57.stride|0; +v512=v57.divisor|0; +} +} +v514=g513.state; +g513.state=v501; +v515=g513.x; +g513.x=v502; +v516=g513.y; +g513.y=v503; +v517=g513.z; +g513.z=v504; +v518=g513.w; +g513.w=v505; +v519=g513.buffer; +g513.buffer=v506; +v520=g513.size; +g513.size=v507; +v521=g513.normalized; +g513.normalized=v508; +v522=g513.type; +g513.type=v509; +v523=g513.offset; +g513.offset=v510; +v524=g513.stride; +g513.stride=v511; +v525=g513.divisor; +g513.divisor=v512; +v527=v9.vert; +v9.vert=g526; +v529=v9.frag; +v9.frag=g528; +v5.dirty=true; +a1(v2,a0,a2); +v2.viewportWidth=v269; +v2.viewportHeight=v270; +v42[0]=v271; +v42[1]=v272; +v42[2]=v273; +v42[3]=v274; +v20[0]=v276; +v20[1]=v278; +v20[2]=v280; +v20[3]=v282; +v4.blend_enable=v284; +v22[0]=v286; +v22[1]=v288; +v24[0]=v290; +v24[1]=v292; +v24[2]=v294; +v24[3]=v296; +v4.depth_enable=v298; +v40[0]=v304; +v40[1]=v305; +v40[2]=v306; +v40[3]=v307; +v4.scissor_enable=v309; +v4.stencil_enable=v311; +if(v312){ +g52.cpuTime+=performance.now()-v313; +} +v6.offset=v315; +v6.count=v317; +v6.instances=v319; +v6.primitive=v321; +v12[g324]=v325; +v12[g327]=v328; +v12[g330]=v331; +v12[g333]=v334; +v12[g336]=v337; +v12[g339]=v340; +v12[g342]=v343; +v12[g345]=v346; +v12[g348]=v349; +v12[g351]=v352; +v12[g354]=v355; +v12[g357]=v358; +v12[g360]=v361; +v12[g363]=v364; +g365.state=v366; +g365.x=v367; +g365.y=v368; +g365.z=v369; +g365.w=v370; +g365.buffer=v371; +g365.size=v372; +g365.normalized=v373; +g365.type=v374; +g365.offset=v375; +g365.stride=v376; +g365.divisor=v377; +g378.state=v379; +g378.x=v380; +g378.y=v381; +g378.z=v382; +g378.w=v383; +g378.buffer=v384; +g378.size=v385; +g378.normalized=v386; +g378.type=v387; +g378.offset=v388; +g378.stride=v389; +g378.divisor=v390; +if(v392){ +v8.destroyStream(v398); +} +g405.state=v406; +g405.x=v407; +g405.y=v408; +g405.z=v409; +g405.w=v410; +g405.buffer=v411; +g405.size=v412; +g405.normalized=v413; +g405.type=v414; +g405.offset=v415; +g405.stride=v416; +g405.divisor=v417; +if(v419){ +v8.destroyStream(v425); +} +g432.state=v433; +g432.x=v434; +g432.y=v435; +g432.z=v436; +g432.w=v437; +g432.buffer=v438; +g432.size=v439; +g432.normalized=v440; +g432.type=v441; +g432.offset=v442; +g432.stride=v443; +g432.divisor=v444; +if(v446){ +v8.destroyStream(v452); +} +g459.state=v460; +g459.x=v461; +g459.y=v462; +g459.z=v463; +g459.w=v464; +g459.buffer=v465; +g459.size=v466; +g459.normalized=v467; +g459.type=v468; +g459.offset=v469; +g459.stride=v470; +g459.divisor=v471; +if(v473){ +v8.destroyStream(v479); +} +g486.state=v487; +g486.x=v488; +g486.y=v489; +g486.z=v490; +g486.w=v491; +g486.buffer=v492; +g486.size=v493; +g486.normalized=v494; +g486.type=v495; +g486.offset=v496; +g486.stride=v497; +g486.divisor=v498; +if(v500){ +v8.destroyStream(v506); +} +g513.state=v514; +g513.x=v515; +g513.y=v516; +g513.z=v517; +g513.w=v518; +g513.buffer=v519; +g513.size=v520; +g513.normalized=v521; +g513.type=v522; +g513.offset=v523; +g513.stride=v524; +g513.divisor=v525; +v9.vert=v527; +v9.frag=v529; +v5.dirty=true; +} +,"batch":function(a0,a1){ +var v530,v531,v567,v568,v569,v570,v571; +v530=v14.angle_instanced_arrays; +v531=v13.next; +if(v531!==v13.cur){ +if(v531){ +v1.bindFramebuffer(36160,v531.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v531; +} +if(v5.dirty){ +var v532,v533,v534,v535,v536,v537,v538,v539,v540,v541,v542,v543,v544,v545,v546,v547,v548,v549,v550,v551,v552,v553,v554,v555,v556,v557,v558,v559,v560,v561,v562,v563; +v532=v4.dither; +if(v532!==v5.dither){ +if(v532){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v532; +} +v533=v4.depth_func; +if(v533!==v5.depth_func){ +v1.depthFunc(v533); +v5.depth_func=v533; +} +v534=v26[0]; +v535=v26[1]; +if(v534!==v27[0]||v535!==v27[1]){ +v1.depthRange(v534,v535); +v27[0]=v534; +v27[1]=v535; +} +v536=v4.depth_mask; +if(v536!==v5.depth_mask){ +v1.depthMask(v536); +v5.depth_mask=v536; +} +v537=v28[0]; +v538=v28[1]; +v539=v28[2]; +v540=v28[3]; +if(v537!==v29[0]||v538!==v29[1]||v539!==v29[2]||v540!==v29[3]){ +v1.colorMask(v537,v538,v539,v540); +v29[0]=v537; +v29[1]=v538; +v29[2]=v539; +v29[3]=v540; +} +v541=v4.cull_enable; +if(v541!==v5.cull_enable){ +if(v541){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v541; +} +v542=v4.cull_face; +if(v542!==v5.cull_face){ +v1.cullFace(v542); +v5.cull_face=v542; +} +v543=v4.frontFace; +if(v543!==v5.frontFace){ +v1.frontFace(v543); +v5.frontFace=v543; +} +v544=v4.lineWidth; +if(v544!==v5.lineWidth){ +v1.lineWidth(v544); +v5.lineWidth=v544; +} +v545=v4.polygonOffset_enable; +if(v545!==v5.polygonOffset_enable){ +if(v545){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v545; +} +v546=v30[0]; +v547=v30[1]; +if(v546!==v31[0]||v547!==v31[1]){ +v1.polygonOffset(v546,v547); +v31[0]=v546; +v31[1]=v547; +} +v548=v4.sample_alpha; +if(v548!==v5.sample_alpha){ +if(v548){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v548; +} +v549=v4.sample_enable; +if(v549!==v5.sample_enable){ +if(v549){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v549; +} +v550=v32[0]; +v551=v32[1]; +if(v550!==v33[0]||v551!==v33[1]){ +v1.sampleCoverage(v550,v551); +v33[0]=v550; +v33[1]=v551; +} +v552=v4.stencil_mask; +if(v552!==v5.stencil_mask){ +v1.stencilMask(v552); +v5.stencil_mask=v552; +} +v553=v34[0]; +v554=v34[1]; +v555=v34[2]; +if(v553!==v35[0]||v554!==v35[1]||v555!==v35[2]){ +v1.stencilFunc(v553,v554,v555); +v35[0]=v553; +v35[1]=v554; +v35[2]=v555; +} +v556=v36[0]; +v557=v36[1]; +v558=v36[2]; +v559=v36[3]; +if(v556!==v37[0]||v557!==v37[1]||v558!==v37[2]||v559!==v37[3]){ +v1.stencilOpSeparate(v556,v557,v558,v559); +v37[0]=v556; +v37[1]=v557; +v37[2]=v558; +v37[3]=v559; +} +v560=v38[0]; +v561=v38[1]; +v562=v38[2]; +v563=v38[3]; +if(v560!==v39[0]||v561!==v39[1]||v562!==v39[2]||v563!==v39[3]){ +v1.stencilOpSeparate(v560,v561,v562,v563); +v39[0]=v560; +v39[1]=v561; +v39[2]=v562; +v39[3]=v563; +} +} +v1.blendColor(0,0,0,0); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=0; +if(g564){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g564; +v1.blendEquationSeparate(32774,32774); +v23[0]=32774; +v23[1]=32774; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +if(g565){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g565; +if(g566){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=g566; +v567=v5.profile; +if(v567){ +v568=performance.now(); +g52.count+=a1; +} +v1.useProgram(g114.program); +v569=v14.angle_instanced_arrays; +var v585,v586,v587,v588,v713; +v11.setVAO(null); +v585=g212.location; +v586=v10[v585]; +if(!v586.buffer){ +v1.enableVertexAttribArray(v585); +} +if(v586.type!==5126||v586.size!==1||v586.buffer!==g211||v586.normalized!==false||v586.offset!==0||v586.stride!==8){ +v1.bindBuffer(34962,g211.buffer); +v1.vertexAttribPointer(v585,1,5126,false,8,0); +v586.type=5126; +v586.size=1; +v586.buffer=g211; +v586.normalized=false; +v586.offset=0; +v586.stride=8; +} +if(v586.divisor!==0){ +v569.vertexAttribDivisorANGLE(v585,0); +v586.divisor=0; +} +v587=g215.location; +v588=v10[v587]; +if(!v588.buffer){ +v1.enableVertexAttribArray(v587); +} +if(v588.type!==5126||v588.size!==1||v588.buffer!==g211||v588.normalized!==false||v588.offset!==4||v588.stride!==8){ +v1.bindBuffer(34962,g211.buffer); +v1.vertexAttribPointer(v587,1,5126,false,8,4); +v588.type=5126; +v588.size=1; +v588.buffer=g211; +v588.normalized=false; +v588.offset=4; +v588.stride=8; +} +if(v588.divisor!==0){ +v569.vertexAttribDivisorANGLE(v587,0); +v588.divisor=0; +} +v713=v6.elements; +if(v713){ +v1.bindBuffer(34963,v713.buffer.buffer); +} +else if(v11.currentVAO){ +v713=v7.getElements(v11.currentVAO.elements); +if(v713)v1.bindBuffer(34963,v713.buffer.buffer); +} +for(v570=0; +v570=0&&v576>=0))g18.commandRaise(g93,g19); +v577=v2.viewportWidth; +v2.viewportWidth=v575; +v578=v2.viewportHeight; +v2.viewportHeight=v576; +v1.viewport(v573,v574,v575,v576); +v43[0]=v573; +v43[1]=v574; +v43[2]=v575; +v43[3]=v576; +v579=g101.call(this,v2,v571,v570); +if(!(typeof v579==="boolean"))g18.commandRaise(g103,g19); +if(v579){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=v579; +v580=v571["viewport"]; +if(!(v580&&typeof v580==="object"))g18.commandRaise(g105,g19); +v581=v580.x|0; +v582=v580.y|0; +v583="width" in v580?v580.width|0:(v2.framebufferWidth-v581); +v584="height" in v580?v580.height|0:(v2.framebufferHeight-v582); +if(!(v583>=0&&v584>=0))g18.commandRaise(g105,g19); +v1.scissor(v581,v582,v583,v584); +v41[0]=v581; +v41[1]=v582; +v41[2]=v583; +v41[3]=v584; +v589=v571["positionBuffer"]; +v53.buffer=v589; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g117,g19); +v590=false; +v591=1; +v592=0; +v593=0; +v594=0; +v595=0; +v596=null; +v597=0; +v598=false; +v599=5126; +v600=0; +v601=0; +v602=0; +if(v16(v53)){ +v590=true; +v596=v8.createStream(34962,v53); +v599=v596.dtype; +} +else{ +v596=v8.getBuffer(v53); +if(v596){ +v599=v596.dtype; +} +else if("constant" in v53){ +v591=2; +if(typeof v53.constant === "number"){ +v592=v53.constant; +v593=v594=v595=0; +} +else{ +v592=v53.constant.length>0?v53.constant[0]:0; +v593=v53.constant.length>1?v53.constant[1]:0; +v594=v53.constant.length>2?v53.constant[2]:0; +v595=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v596=v8.createStream(34962,v53.buffer); +} +else{ +v596=v8.getBuffer(v53.buffer); +} +v599="type" in v53?v49[v53.type]:v596.dtype; +v598=!!v53.normalized; +v597=v53.size|0; +v600=v53.offset|0; +v601=v53.stride|0; +v602=v53.divisor|0; +} +} +v603=g131.location; +v604=v10[v603]; +if(v591===1){ +if(!v604.buffer){ +v1.enableVertexAttribArray(v603); +} +v605=v597||2; +if(v604.type!==v599||v604.size!==v605||v604.buffer!==v596||v604.normalized!==v598||v604.offset!==v600||v604.stride!==v601){ +v1.bindBuffer(34962,v596.buffer); +v1.vertexAttribPointer(v603,v605,v599,v598,v601,v600); +v604.type=v599; +v604.size=v605; +v604.buffer=v596; +v604.normalized=v598; +v604.offset=v600; +v604.stride=v601; +} +if(v604.divisor!==v602){ +v569.vertexAttribDivisorANGLE(v603,v602); +v604.divisor=v602; +} +} +else{ +if(v604.buffer){ +v1.disableVertexAttribArray(v603); +v604.buffer=null; +} +if(v604.x!==v592||v604.y!==v593||v604.z!==v594||v604.w!==v595){ +v1.vertexAttrib4f(v603,v592,v593,v594,v595); +v604.x=v592; +v604.y=v593; +v604.z=v594; +v604.w=v595; +} +} +v606=v571["positionFractBuffer"]; +v55.buffer=v606; +if(!(v55&&(typeof v55==="object"||typeof v55==="function")&&(v16(v55)||v8.getBuffer(v55)||v8.getBuffer(v55.buffer)||v16(v55.buffer)||("constant" in v55&&(typeof v55.constant==="number"||v17(v55.constant))))))g18.commandRaise(g136,g19); +v607=false; +v608=1; +v609=0; +v610=0; +v611=0; +v612=0; +v613=null; +v614=0; +v615=false; +v616=5126; +v617=0; +v618=0; +v619=0; +if(v16(v55)){ +v607=true; +v613=v8.createStream(34962,v55); +v616=v613.dtype; +} +else{ +v613=v8.getBuffer(v55); +if(v613){ +v616=v613.dtype; +} +else if("constant" in v55){ +v608=2; +if(typeof v55.constant === "number"){ +v609=v55.constant; +v610=v611=v612=0; +} +else{ +v609=v55.constant.length>0?v55.constant[0]:0; +v610=v55.constant.length>1?v55.constant[1]:0; +v611=v55.constant.length>2?v55.constant[2]:0; +v612=v55.constant.length>3?v55.constant[3]:0; +} +} +else{ +if(v16(v55.buffer)){ +v613=v8.createStream(34962,v55.buffer); +} +else{ +v613=v8.getBuffer(v55.buffer); +} +v616="type" in v55?v49[v55.type]:v613.dtype; +v615=!!v55.normalized; +v614=v55.size|0; +v617=v55.offset|0; +v618=v55.stride|0; +v619=v55.divisor|0; +} +} +v620=g150.location; +v621=v10[v620]; +if(v608===1){ +if(!v621.buffer){ +v1.enableVertexAttribArray(v620); +} +v622=v614||2; +if(v621.type!==v616||v621.size!==v622||v621.buffer!==v613||v621.normalized!==v615||v621.offset!==v617||v621.stride!==v618){ +v1.bindBuffer(34962,v613.buffer); +v1.vertexAttribPointer(v620,v622,v616,v615,v618,v617); +v621.type=v616; +v621.size=v622; +v621.buffer=v613; +v621.normalized=v615; +v621.offset=v617; +v621.stride=v618; +} +if(v621.divisor!==v619){ +v569.vertexAttribDivisorANGLE(v620,v619); +v621.divisor=v619; +} +} +else{ +if(v621.buffer){ +v1.disableVertexAttribArray(v620); +v621.buffer=null; +} +if(v621.x!==v609||v621.y!==v610||v621.z!==v611||v621.w!==v612){ +v1.vertexAttrib4f(v620,v609,v610,v611,v612); +v621.x=v609; +v621.y=v610; +v621.z=v611; +v621.w=v612; +} +} +v623=v571["positionBuffer"]; +v54.buffer=v623; +if(!(v54&&(typeof v54==="object"||typeof v54==="function")&&(v16(v54)||v8.getBuffer(v54)||v8.getBuffer(v54.buffer)||v16(v54.buffer)||("constant" in v54&&(typeof v54.constant==="number"||v17(v54.constant))))))g18.commandRaise(g155,g19); +v624=false; +v625=1; +v626=0; +v627=0; +v628=0; +v629=0; +v630=null; +v631=0; +v632=false; +v633=5126; +v634=0; +v635=0; +v636=0; +if(v16(v54)){ +v624=true; +v630=v8.createStream(34962,v54); +v633=v630.dtype; +} +else{ +v630=v8.getBuffer(v54); +if(v630){ +v633=v630.dtype; +} +else if("constant" in v54){ +v625=2; +if(typeof v54.constant === "number"){ +v626=v54.constant; +v627=v628=v629=0; +} +else{ +v626=v54.constant.length>0?v54.constant[0]:0; +v627=v54.constant.length>1?v54.constant[1]:0; +v628=v54.constant.length>2?v54.constant[2]:0; +v629=v54.constant.length>3?v54.constant[3]:0; +} +} +else{ +if(v16(v54.buffer)){ +v630=v8.createStream(34962,v54.buffer); +} +else{ +v630=v8.getBuffer(v54.buffer); +} +v633="type" in v54?v49[v54.type]:v630.dtype; +v632=!!v54.normalized; +v631=v54.size|0; +v634=v54.offset|0; +v635=v54.stride|0; +v636=v54.divisor|0; +} +} +v637=g169.location; +v638=v10[v637]; +if(v625===1){ +if(!v638.buffer){ +v1.enableVertexAttribArray(v637); +} +v639=v631||2; +if(v638.type!==v633||v638.size!==v639||v638.buffer!==v630||v638.normalized!==v632||v638.offset!==v634||v638.stride!==v635){ +v1.bindBuffer(34962,v630.buffer); +v1.vertexAttribPointer(v637,v639,v633,v632,v635,v634); +v638.type=v633; +v638.size=v639; +v638.buffer=v630; +v638.normalized=v632; +v638.offset=v634; +v638.stride=v635; +} +if(v638.divisor!==v636){ +v569.vertexAttribDivisorANGLE(v637,v636); +v638.divisor=v636; +} +} +else{ +if(v638.buffer){ +v1.disableVertexAttribArray(v637); +v638.buffer=null; +} +if(v638.x!==v626||v638.y!==v627||v638.z!==v628||v638.w!==v629){ +v1.vertexAttrib4f(v637,v626,v627,v628,v629); +v638.x=v626; +v638.y=v627; +v638.z=v628; +v638.w=v629; +} +} +v640=v571["positionFractBuffer"]; +v56.buffer=v640; +if(!(v56&&(typeof v56==="object"||typeof v56==="function")&&(v16(v56)||v8.getBuffer(v56)||v8.getBuffer(v56.buffer)||v16(v56.buffer)||("constant" in v56&&(typeof v56.constant==="number"||v17(v56.constant))))))g18.commandRaise(g174,g19); +v641=false; +v642=1; +v643=0; +v644=0; +v645=0; +v646=0; +v647=null; +v648=0; +v649=false; +v650=5126; +v651=0; +v652=0; +v653=0; +if(v16(v56)){ +v641=true; +v647=v8.createStream(34962,v56); +v650=v647.dtype; +} +else{ +v647=v8.getBuffer(v56); +if(v647){ +v650=v647.dtype; +} +else if("constant" in v56){ +v642=2; +if(typeof v56.constant === "number"){ +v643=v56.constant; +v644=v645=v646=0; +} +else{ +v643=v56.constant.length>0?v56.constant[0]:0; +v644=v56.constant.length>1?v56.constant[1]:0; +v645=v56.constant.length>2?v56.constant[2]:0; +v646=v56.constant.length>3?v56.constant[3]:0; +} +} +else{ +if(v16(v56.buffer)){ +v647=v8.createStream(34962,v56.buffer); +} +else{ +v647=v8.getBuffer(v56.buffer); +} +v650="type" in v56?v49[v56.type]:v647.dtype; +v649=!!v56.normalized; +v648=v56.size|0; +v651=v56.offset|0; +v652=v56.stride|0; +v653=v56.divisor|0; +} +} +v654=g188.location; +v655=v10[v654]; +if(v642===1){ +if(!v655.buffer){ +v1.enableVertexAttribArray(v654); +} +v656=v648||2; +if(v655.type!==v650||v655.size!==v656||v655.buffer!==v647||v655.normalized!==v649||v655.offset!==v651||v655.stride!==v652){ +v1.bindBuffer(34962,v647.buffer); +v1.vertexAttribPointer(v654,v656,v650,v649,v652,v651); +v655.type=v650; +v655.size=v656; +v655.buffer=v647; +v655.normalized=v649; +v655.offset=v651; +v655.stride=v652; +} +if(v655.divisor!==v653){ +v569.vertexAttribDivisorANGLE(v654,v653); +v655.divisor=v653; +} +} +else{ +if(v655.buffer){ +v1.disableVertexAttribArray(v654); +v655.buffer=null; +} +if(v655.x!==v643||v655.y!==v644||v655.z!==v645||v655.w!==v646){ +v1.vertexAttrib4f(v654,v643,v644,v645,v646); +v655.x=v643; +v655.y=v644; +v655.z=v645; +v655.w=v646; +} +} +v657=v571["colorBuffer"]; +v57.buffer=v657; +if(!(v57&&(typeof v57==="object"||typeof v57==="function")&&(v16(v57)||v8.getBuffer(v57)||v8.getBuffer(v57.buffer)||v16(v57.buffer)||("constant" in v57&&(typeof v57.constant==="number"||v17(v57.constant))))))g18.commandRaise(g193,g19); +v658=false; +v659=1; +v660=0; +v661=0; +v662=0; +v663=0; +v664=null; +v665=0; +v666=false; +v667=5126; +v668=0; +v669=0; +v670=0; +if(v16(v57)){ +v658=true; +v664=v8.createStream(34962,v57); +v667=v664.dtype; +} +else{ +v664=v8.getBuffer(v57); +if(v664){ +v667=v664.dtype; +} +else if("constant" in v57){ +v659=2; +if(typeof v57.constant === "number"){ +v660=v57.constant; +v661=v662=v663=0; +} +else{ +v660=v57.constant.length>0?v57.constant[0]:0; +v661=v57.constant.length>1?v57.constant[1]:0; +v662=v57.constant.length>2?v57.constant[2]:0; +v663=v57.constant.length>3?v57.constant[3]:0; +} +} +else{ +if(v16(v57.buffer)){ +v664=v8.createStream(34962,v57.buffer); +} +else{ +v664=v8.getBuffer(v57.buffer); +} +v667="type" in v57?v49[v57.type]:v664.dtype; +v666=!!v57.normalized; +v665=v57.size|0; +v668=v57.offset|0; +v669=v57.stride|0; +v670=v57.divisor|0; +} +} +v671=g207.location; +v672=v10[v671]; +if(v659===1){ +if(!v672.buffer){ +v1.enableVertexAttribArray(v671); +} +v673=v665||4; +if(v672.type!==v667||v672.size!==v673||v672.buffer!==v664||v672.normalized!==v666||v672.offset!==v668||v672.stride!==v669){ +v1.bindBuffer(34962,v664.buffer); +v1.vertexAttribPointer(v671,v673,v667,v666,v669,v668); +v672.type=v667; +v672.size=v673; +v672.buffer=v664; +v672.normalized=v666; +v672.offset=v668; +v672.stride=v669; +} +if(v672.divisor!==v670){ +v569.vertexAttribDivisorANGLE(v671,v670); +v672.divisor=v670; +} +} +else{ +if(v672.buffer){ +v1.disableVertexAttribArray(v671); +v672.buffer=null; +} +if(v672.x!==v660||v672.y!==v661||v672.z!==v662||v672.w!==v663){ +v1.vertexAttrib4f(v671,v660,v661,v662,v663); +v672.x=v660; +v672.y=v661; +v672.z=v662; +v672.w=v663; +} +} +v674=v571["dashLength"]; +if(!(typeof v674==="number"))g18.commandRaise(g220,g19); +if(!v570||v675!==v674){ +v675=v674; +v1.uniform1f(g218.location,v674); +} +v676=v571["dashTexture"]; +if(v676&&v676._reglType==="framebuffer"){ +v676=v676.color[0]; +} +if(!(typeof v676==="function"&&v676._reglType==="texture2d"))g18.commandRaise(g223,g19); +v677=v676._texture; +v1.uniform1i(g221.location,v677.bind()); +v678=v571["depth"]; +if(!(typeof v678==="number"))g18.commandRaise(g227,g19); +if(!v570||v679!==v678){ +v679=v678; +v1.uniform1f(g225.location,v678); +} +v680=v571["opacity"]; +if(!(typeof v680==="number"))g18.commandRaise(g230,g19); +if(!v570||v681!==v680){ +v681=v680; +v1.uniform1f(g228.location,v680); +} +v682=v571["scale"]; +if(!(v17(v682)&&v682.length===2))g18.commandRaise(g233,g19); +v683=v682[0]; +v685=v682[1]; +if(!v570||v684!==v683||v686!==v685){ +v684=v683; +v686=v685; +v1.uniform2f(g231.location,v683,v685); +} +v687=v571["scaleFract"]; +if(!(v17(v687)&&v687.length===2))g18.commandRaise(g238,g19); +v688=v687[0]; +v690=v687[1]; +if(!v570||v689!==v688||v691!==v690){ +v689=v688; +v691=v690; +v1.uniform2f(g236.location,v688,v690); +} +v692=v571["thickness"]; +if(!(typeof v692==="number"))g18.commandRaise(g243,g19); +if(!v570||v693!==v692){ +v693=v692; +v1.uniform1f(g241.location,v692); +} +v694=v571["translate"]; +if(!(v17(v694)&&v694.length===2))g18.commandRaise(g246,g19); +v695=v694[0]; +v697=v694[1]; +if(!v570||v696!==v695||v698!==v697){ +v696=v695; +v698=v697; +v1.uniform2f(g244.location,v695,v697); +} +v699=v571["translateFract"]; +if(!(v17(v699)&&v699.length===2))g18.commandRaise(g251,g19); +v700=v699[0]; +v702=v699[1]; +if(!v570||v701!==v700||v703!==v702){ +v701=v700; +v703=v702; +v1.uniform2f(g249.location,v700,v702); +} +v704=g255.call(this,v2,v571,v570); +if(!(v17(v704)&&v704.length===4))g18.commandRaise(g257,g19); +v705=v704[0]; +v707=v704[1]; +v709=v704[2]; +v711=v704[3]; +if(!v570||v706!==v705||v708!==v707||v710!==v709||v712!==v711){ +v706=v705; +v708=v707; +v710=v709; +v712=v711; +v1.uniform4f(g254.location,v705,v707,v709,v711); +} +v714=v571["count"]; +if(v714>0){ +if(v713){ +v569.drawElementsInstancedANGLE(5,4,v713.type,0<<((v713.type-5121)>>1),v714); +} +else{ +v569.drawArraysInstancedANGLE(5,0,4,v714); +} +} +else if(v714<0){ +if(v713){ +v1.drawElements(5,4,v713.type,0<<((v713.type-5121)>>1)); +} +else{ +v1.drawArrays(5,0,4); +} +} +v2.viewportWidth=v577; +v2.viewportHeight=v578; +if(v590){ +v8.destroyStream(v596); +} +if(v607){ +v8.destroyStream(v613); +} +if(v624){ +v8.destroyStream(v630); +} +if(v641){ +v8.destroyStream(v647); +} +if(v658){ +v8.destroyStream(v664); +} +v677.unbind(); +} +v5.dirty=true; +v11.setVAO(null); +if(v567){ +g52.cpuTime+=performance.now()-v568; +} +} +,} + +} \ No newline at end of file diff --git a/src/generated/regl-codegen/4df455b48c9de7d9f1de4b9481b505c09613ba7f90d2b4e360e673839566688e b/src/generated/regl-codegen/4df455b48c9de7d9f1de4b9481b505c09613ba7f90d2b4e360e673839566688e new file mode 100644 index 00000000000..57535725df9 --- /dev/null +++ b/src/generated/regl-codegen/4df455b48c9de7d9f1de4b9481b505c09613ba7f90d2b4e360e673839566688e @@ -0,0 +1,662 @@ +module.exports = function anonymous(g0,g18,g19,g52,g55,g119,g129,g131,g137,g139,g199 +) { +"use strict"; +var v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v116,v196; +v1=g0.gl; +v2=g0.context; +v3=g0.strings; +v4=g0.next; +v5=g0.current; +v6=g0.draw; +v7=g0.elements; +v8=g0.buffer; +v9=g0.shader; +v10=g0.attributes; +v11=g0.vao; +v12=g0.uniforms; +v13=g0.framebuffer; +v14=g0.extensions; +v15=g0.timer; +v16=g0.isBufferArgs; +v17=g0.isArrayLike; +v20=v4.blend_color; +v21=v5.blend_color; +v22=v4.blend_equation; +v23=v5.blend_equation; +v24=v4.blend_func; +v25=v5.blend_func; +v26=v4.depth_range; +v27=v5.depth_range; +v28=v4.colorMask; +v29=v5.colorMask; +v30=v4.polygonOffset_offset; +v31=v5.polygonOffset_offset; +v32=v4.sample_coverage; +v33=v5.sample_coverage; +v34=v4.stencil_func; +v35=v5.stencil_func; +v36=v4.stencil_opFront; +v37=v5.stencil_opFront; +v38=v4.stencil_opBack; +v39=v5.stencil_opBack; +v40=v4.scissor_box; +v41=v5.scissor_box; +v42=v4.viewport; +v43=v5.viewport; +v44={ +"points":0,"point":0,"lines":1,"line":1,"triangles":4,"triangle":4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6} +; +v45={ +"never":512,"less":513,"<":513,"equal":514,"=":514,"==":514,"===":514,"lequal":515,"<=":515,"greater":516,">":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +v116={ +} +; +v196={ +} +; +return { +"draw":function(a0){ +var v53,v54,v56,v57,v58,v105,v106,v107,v108,v109,v110,v111,v112,v113,v114,v115,v117,v118; +v53=a0["framebuffer"]; +v54=v13.getFramebuffer(v53); +if(!(!v53||v54))g18.commandRaise(g55,g19); +v56=v13.next; +v13.next=v54; +v57=v2.framebufferWidth; +v2.framebufferWidth=v54?v54.width:v2.drawingBufferWidth; +v58=v2.framebufferHeight; +v2.framebufferHeight=v54?v54.height:v2.drawingBufferHeight; +if(v54!==v13.cur){ +if(v54){ +v1.bindFramebuffer(36160,v54.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v54; +} +if(v5.dirty){ +var v59,v60,v61,v62,v63,v64,v65,v66,v67,v68,v69,v70,v71,v72,v73,v74,v75,v76,v77,v78,v79,v80,v81,v82,v83,v84,v85,v86,v87,v88,v89,v90,v91,v92,v93,v94,v95,v96,v97,v98,v99,v100,v101,v102,v103,v104; +v59=v4.dither; +if(v59!==v5.dither){ +if(v59){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v59; +} +v60=v4.blend_enable; +if(v60!==v5.blend_enable){ +if(v60){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=v60; +} +v61=v20[0]; +v62=v20[1]; +v63=v20[2]; +v64=v20[3]; +if(v61!==v21[0]||v62!==v21[1]||v63!==v21[2]||v64!==v21[3]){ +v1.blendColor(v61,v62,v63,v64); +v21[0]=v61; +v21[1]=v62; +v21[2]=v63; +v21[3]=v64; +} +v65=v22[0]; +v66=v22[1]; +if(v65!==v23[0]||v66!==v23[1]){ +v1.blendEquationSeparate(v65,v66); +v23[0]=v65; +v23[1]=v66; +} +v67=v24[0]; +v68=v24[1]; +v69=v24[2]; +v70=v24[3]; +if(v67!==v25[0]||v68!==v25[1]||v69!==v25[2]||v70!==v25[3]){ +v1.blendFuncSeparate(v67,v68,v69,v70); +v25[0]=v67; +v25[1]=v68; +v25[2]=v69; +v25[3]=v70; +} +v71=v4.depth_enable; +if(v71!==v5.depth_enable){ +if(v71){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=v71; +} +v72=v4.depth_func; +if(v72!==v5.depth_func){ +v1.depthFunc(v72); +v5.depth_func=v72; +} +v73=v26[0]; +v74=v26[1]; +if(v73!==v27[0]||v74!==v27[1]){ +v1.depthRange(v73,v74); +v27[0]=v73; +v27[1]=v74; +} +v75=v4.depth_mask; +if(v75!==v5.depth_mask){ +v1.depthMask(v75); +v5.depth_mask=v75; +} +v76=v28[0]; +v77=v28[1]; +v78=v28[2]; +v79=v28[3]; +if(v76!==v29[0]||v77!==v29[1]||v78!==v29[2]||v79!==v29[3]){ +v1.colorMask(v76,v77,v78,v79); +v29[0]=v76; +v29[1]=v77; +v29[2]=v78; +v29[3]=v79; +} +v80=v4.cull_enable; +if(v80!==v5.cull_enable){ +if(v80){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v80; +} +v81=v4.cull_face; +if(v81!==v5.cull_face){ +v1.cullFace(v81); +v5.cull_face=v81; +} +v82=v4.frontFace; +if(v82!==v5.frontFace){ +v1.frontFace(v82); +v5.frontFace=v82; +} +v83=v4.lineWidth; +if(v83!==v5.lineWidth){ +v1.lineWidth(v83); +v5.lineWidth=v83; +} +v84=v4.polygonOffset_enable; +if(v84!==v5.polygonOffset_enable){ +if(v84){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v84; +} +v85=v30[0]; +v86=v30[1]; +if(v85!==v31[0]||v86!==v31[1]){ +v1.polygonOffset(v85,v86); +v31[0]=v85; +v31[1]=v86; +} +v87=v4.sample_alpha; +if(v87!==v5.sample_alpha){ +if(v87){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v87; +} +v88=v4.sample_enable; +if(v88!==v5.sample_enable){ +if(v88){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v88; +} +v89=v32[0]; +v90=v32[1]; +if(v89!==v33[0]||v90!==v33[1]){ +v1.sampleCoverage(v89,v90); +v33[0]=v89; +v33[1]=v90; +} +v91=v4.stencil_enable; +if(v91!==v5.stencil_enable){ +if(v91){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=v91; +} +v92=v4.stencil_mask; +if(v92!==v5.stencil_mask){ +v1.stencilMask(v92); +v5.stencil_mask=v92; +} +v93=v34[0]; +v94=v34[1]; +v95=v34[2]; +if(v93!==v35[0]||v94!==v35[1]||v95!==v35[2]){ +v1.stencilFunc(v93,v94,v95); +v35[0]=v93; +v35[1]=v94; +v35[2]=v95; +} +v96=v36[0]; +v97=v36[1]; +v98=v36[2]; +v99=v36[3]; +if(v96!==v37[0]||v97!==v37[1]||v98!==v37[2]||v99!==v37[3]){ +v1.stencilOpSeparate(v96,v97,v98,v99); +v37[0]=v96; +v37[1]=v97; +v37[2]=v98; +v37[3]=v99; +} +v100=v38[0]; +v101=v38[1]; +v102=v38[2]; +v103=v38[3]; +if(v100!==v39[0]||v101!==v39[1]||v102!==v39[2]||v103!==v39[3]){ +v1.stencilOpSeparate(v100,v101,v102,v103); +v39[0]=v100; +v39[1]=v101; +v39[2]=v102; +v39[3]=v103; +} +v104=v4.scissor_enable; +if(v104!==v5.scissor_enable){ +if(v104){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=v104; +} +} +v105=v2.framebufferWidth; +v106=v2.framebufferHeight; +v107=v2.viewportWidth; +v2.viewportWidth=v105; +v108=v2.viewportHeight; +v2.viewportHeight=v106; +v1.viewport(0,0,v105,v106); +v43[0]=0; +v43[1]=0; +v43[2]=v105; +v43[3]=v106; +v109=v2.framebufferWidth; +v110=v2.framebufferHeight; +v1.scissor(0,0,v109,v110); +v41[0]=0; +v41[1]=0; +v41[2]=v109; +v41[3]=v110; +v111=v5.profile; +if(v111){ +v112=performance.now(); +g52.count++; +} +v113=v9.frag; +v114=v9.vert; +v115=v9.program(v114,v113,g19); +v1.useProgram(v115.program); +v11.setVAO(null); +v117=v115.id; +v118=v116[v117]; +if(v118){ +v118.call(this,a0); +} +else{ +v118=v116[v117]=g119(v115); +v118.call(this,a0); +} +v5.dirty=true; +v11.setVAO(null); +v13.next=v56; +v2.framebufferWidth=v57; +v2.framebufferHeight=v58; +v2.viewportWidth=v107; +v2.viewportHeight=v108; +if(v111){ +g52.cpuTime+=performance.now()-v112; +} +} +,"scope":function(a0,a1,a2){ +var v120,v121,v122,v123,v124,v125,v126,v127,v128,v130,v132,v133,v134,v135,v136,v138,v140,v141,v142,v143,v144; +v120=a0["framebuffer"]; +v121=v13.getFramebuffer(v120); +if(!(!v120||v121))g18.commandRaise(g55,g19); +v122=v13.next; +v13.next=v121; +v123=v2.framebufferWidth; +v2.framebufferWidth=v121?v121.width:v2.drawingBufferWidth; +v124=v2.framebufferHeight; +v2.framebufferHeight=v121?v121.height:v2.drawingBufferHeight; +v125=v2.framebufferWidth; +v126=v2.framebufferHeight; +v127=v2.viewportWidth; +v2.viewportWidth=v125; +v128=v2.viewportHeight; +v2.viewportHeight=v126; +v130=v42[0]; +v42[0]=g129; +v132=v42[1]; +v42[1]=g131; +v133=v42[2]; +v42[2]=v125; +v134=v42[3]; +v42[3]=v126; +v135=v2.framebufferWidth; +v136=v2.framebufferHeight; +v138=v40[0]; +v40[0]=g137; +v140=v40[1]; +v40[1]=g139; +v141=v40[2]; +v40[2]=v135; +v142=v40[3]; +v40[3]=v136; +v143=v5.profile; +if(v143){ +v144=performance.now(); +g52.count++; +} +v5.dirty=true; +a1(v2,a0,a2); +v13.next=v122; +v2.framebufferWidth=v123; +v2.framebufferHeight=v124; +v2.viewportWidth=v127; +v2.viewportHeight=v128; +v42[0]=v130; +v42[1]=v132; +v42[2]=v133; +v42[3]=v134; +v40[0]=v138; +v40[1]=v140; +v40[2]=v141; +v40[3]=v142; +if(v143){ +g52.cpuTime+=performance.now()-v144; +} +v5.dirty=true; +} +,"batch":function(a0,a1){ +var v191,v192,v193,v194,v195,v197,v198; +if(v5.dirty){ +var v145,v146,v147,v148,v149,v150,v151,v152,v153,v154,v155,v156,v157,v158,v159,v160,v161,v162,v163,v164,v165,v166,v167,v168,v169,v170,v171,v172,v173,v174,v175,v176,v177,v178,v179,v180,v181,v182,v183,v184,v185,v186,v187,v188,v189,v190; +v145=v4.dither; +if(v145!==v5.dither){ +if(v145){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v145; +} +v146=v4.blend_enable; +if(v146!==v5.blend_enable){ +if(v146){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=v146; +} +v147=v20[0]; +v148=v20[1]; +v149=v20[2]; +v150=v20[3]; +if(v147!==v21[0]||v148!==v21[1]||v149!==v21[2]||v150!==v21[3]){ +v1.blendColor(v147,v148,v149,v150); +v21[0]=v147; +v21[1]=v148; +v21[2]=v149; +v21[3]=v150; +} +v151=v22[0]; +v152=v22[1]; +if(v151!==v23[0]||v152!==v23[1]){ +v1.blendEquationSeparate(v151,v152); +v23[0]=v151; +v23[1]=v152; +} +v153=v24[0]; +v154=v24[1]; +v155=v24[2]; +v156=v24[3]; +if(v153!==v25[0]||v154!==v25[1]||v155!==v25[2]||v156!==v25[3]){ +v1.blendFuncSeparate(v153,v154,v155,v156); +v25[0]=v153; +v25[1]=v154; +v25[2]=v155; +v25[3]=v156; +} +v157=v4.depth_enable; +if(v157!==v5.depth_enable){ +if(v157){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=v157; +} +v158=v4.depth_func; +if(v158!==v5.depth_func){ +v1.depthFunc(v158); +v5.depth_func=v158; +} +v159=v26[0]; +v160=v26[1]; +if(v159!==v27[0]||v160!==v27[1]){ +v1.depthRange(v159,v160); +v27[0]=v159; +v27[1]=v160; +} +v161=v4.depth_mask; +if(v161!==v5.depth_mask){ +v1.depthMask(v161); +v5.depth_mask=v161; +} +v162=v28[0]; +v163=v28[1]; +v164=v28[2]; +v165=v28[3]; +if(v162!==v29[0]||v163!==v29[1]||v164!==v29[2]||v165!==v29[3]){ +v1.colorMask(v162,v163,v164,v165); +v29[0]=v162; +v29[1]=v163; +v29[2]=v164; +v29[3]=v165; +} +v166=v4.cull_enable; +if(v166!==v5.cull_enable){ +if(v166){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v166; +} +v167=v4.cull_face; +if(v167!==v5.cull_face){ +v1.cullFace(v167); +v5.cull_face=v167; +} +v168=v4.frontFace; +if(v168!==v5.frontFace){ +v1.frontFace(v168); +v5.frontFace=v168; +} +v169=v4.lineWidth; +if(v169!==v5.lineWidth){ +v1.lineWidth(v169); +v5.lineWidth=v169; +} +v170=v4.polygonOffset_enable; +if(v170!==v5.polygonOffset_enable){ +if(v170){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v170; +} +v171=v30[0]; +v172=v30[1]; +if(v171!==v31[0]||v172!==v31[1]){ +v1.polygonOffset(v171,v172); +v31[0]=v171; +v31[1]=v172; +} +v173=v4.sample_alpha; +if(v173!==v5.sample_alpha){ +if(v173){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v173; +} +v174=v4.sample_enable; +if(v174!==v5.sample_enable){ +if(v174){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v174; +} +v175=v32[0]; +v176=v32[1]; +if(v175!==v33[0]||v176!==v33[1]){ +v1.sampleCoverage(v175,v176); +v33[0]=v175; +v33[1]=v176; +} +v177=v4.stencil_enable; +if(v177!==v5.stencil_enable){ +if(v177){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=v177; +} +v178=v4.stencil_mask; +if(v178!==v5.stencil_mask){ +v1.stencilMask(v178); +v5.stencil_mask=v178; +} +v179=v34[0]; +v180=v34[1]; +v181=v34[2]; +if(v179!==v35[0]||v180!==v35[1]||v181!==v35[2]){ +v1.stencilFunc(v179,v180,v181); +v35[0]=v179; +v35[1]=v180; +v35[2]=v181; +} +v182=v36[0]; +v183=v36[1]; +v184=v36[2]; +v185=v36[3]; +if(v182!==v37[0]||v183!==v37[1]||v184!==v37[2]||v185!==v37[3]){ +v1.stencilOpSeparate(v182,v183,v184,v185); +v37[0]=v182; +v37[1]=v183; +v37[2]=v184; +v37[3]=v185; +} +v186=v38[0]; +v187=v38[1]; +v188=v38[2]; +v189=v38[3]; +if(v186!==v39[0]||v187!==v39[1]||v188!==v39[2]||v189!==v39[3]){ +v1.stencilOpSeparate(v186,v187,v188,v189); +v39[0]=v186; +v39[1]=v187; +v39[2]=v188; +v39[3]=v189; +} +v190=v4.scissor_enable; +if(v190!==v5.scissor_enable){ +if(v190){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=v190; +} +} +v191=v5.profile; +if(v191){ +v192=performance.now(); +g52.count+=a1; +} +v193=v9.frag; +v194=v9.vert; +v195=v9.program(v194,v193,g19); +v1.useProgram(v195.program); +v11.setVAO(null); +v197=v195.id; +v198=v196[v197]; +if(v198){ +v198.call(this,a0,a1); +} +else{ +v198=v196[v197]=g199(v195); +v198.call(this,a0,a1); +} +v5.dirty=true; +v11.setVAO(null); +if(v191){ +g52.cpuTime+=performance.now()-v192; +} +} +,} + +} \ No newline at end of file diff --git a/src/generated/regl-codegen/53f2bf051e4ba66c90f343d29aa8da9e4029454c0d428f8e46e94dfddc97c8c6 b/src/generated/regl-codegen/53f2bf051e4ba66c90f343d29aa8da9e4029454c0d428f8e46e94dfddc97c8c6 new file mode 100644 index 00000000000..e2035e296a1 --- /dev/null +++ b/src/generated/regl-codegen/53f2bf051e4ba66c90f343d29aa8da9e4029454c0d428f8e46e94dfddc97c8c6 @@ -0,0 +1,459 @@ +module.exports = function anonymous(g0,g18,g19,g54,g57 +) { +"use strict"; +var v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v67,v68,v69,v70,v71,v72,v75,v76,v79,v80,v87,v88,v89,v90,v93,v94,v95,v96,v97,v98,v99,v100,v101,v102; +v1=g0.gl; +v2=g0.context; +v3=g0.strings; +v4=g0.next; +v5=g0.current; +v6=g0.draw; +v7=g0.elements; +v8=g0.buffer; +v9=g0.shader; +v10=g0.attributes; +v11=g0.vao; +v12=g0.uniforms; +v13=g0.framebuffer; +v14=g0.extensions; +v15=g0.timer; +v16=g0.isBufferArgs; +v17=g0.isArrayLike; +v20=v4.blend_color; +v21=v5.blend_color; +v22=v4.blend_equation; +v23=v5.blend_equation; +v24=v4.blend_func; +v25=v5.blend_func; +v26=v4.depth_range; +v27=v5.depth_range; +v28=v4.colorMask; +v29=v5.colorMask; +v30=v4.polygonOffset_offset; +v31=v5.polygonOffset_offset; +v32=v4.sample_coverage; +v33=v5.sample_coverage; +v34=v4.stencil_func; +v35=v5.stencil_func; +v36=v4.stencil_opFront; +v37=v5.stencil_opFront; +v38=v4.stencil_opBack; +v39=v5.stencil_opBack; +v40=v4.scissor_box; +v41=v5.scissor_box; +v42=v4.viewport; +v43=v5.viewport; +v44={ +"points":0,"point":0,"lines":1,"line":1,"triangles":4,"triangle":4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6} +; +v45={ +"never":512,"less":513,"<":513,"equal":514,"=":514,"==":514,"===":514,"lequal":515,"<=":515,"greater":516,">":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +v67=v4.blend_color; +v68=v5.blend_color; +v69=v4.blend_equation; +v70=v5.blend_equation; +v71=v4.blend_func; +v72=v5.blend_func; +v75=v4.depth_range; +v76=v5.depth_range; +v79=v4.colorMask; +v80=v5.colorMask; +v87=v4.polygonOffset_offset; +v88=v5.polygonOffset_offset; +v89=v4.sample_coverage; +v90=v5.sample_coverage; +v93=v4.stencil_func; +v94=v5.stencil_func; +v95=v4.stencil_opFront; +v96=v5.stencil_opFront; +v97=v4.stencil_opBack; +v98=v5.stencil_opBack; +v99=v4.scissor_box; +v100=v5.scissor_box; +v101=v4.viewport; +v102=v5.viewport; +return { +"poll":function(){ +var v52; +var v58,v59,v60,v61,v62,v63,v64,v65,v66,v73,v74,v77,v78,v81,v82,v83,v84,v85,v86,v91,v92; +v5.dirty=false; +v58=v4.dither; +v59=v4.blend_enable; +v60=v4.depth_enable; +v61=v4.cull_enable; +v62=v4.polygonOffset_enable; +v63=v4.sample_alpha; +v64=v4.sample_enable; +v65=v4.stencil_enable; +v66=v4.scissor_enable; +v73=v4.depth_func; +v74=v5.depth_func; +v77=v4.depth_mask; +v78=v5.depth_mask; +v81=v4.cull_face; +v82=v5.cull_face; +v83=v4.frontFace; +v84=v5.frontFace; +v85=v4.lineWidth; +v86=v5.lineWidth; +v91=v4.stencil_mask; +v92=v5.stencil_mask; +v52=v13.next; +if(v52!==v13.cur){ +if(v52){ +v1.bindFramebuffer(36160,v52.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v52; +} +if(v58!==v5.dither){ +if(v58){ +v1.enable(3024)} +else{ +v1.disable(3024)} +v5.dither=v58; +} +if(v59!==v5.blend_enable){ +if(v59){ +v1.enable(3042)} +else{ +v1.disable(3042)} +v5.blend_enable=v59; +} +if(v60!==v5.depth_enable){ +if(v60){ +v1.enable(2929)} +else{ +v1.disable(2929)} +v5.depth_enable=v60; +} +if(v61!==v5.cull_enable){ +if(v61){ +v1.enable(2884)} +else{ +v1.disable(2884)} +v5.cull_enable=v61; +} +if(v62!==v5.polygonOffset_enable){ +if(v62){ +v1.enable(32823)} +else{ +v1.disable(32823)} +v5.polygonOffset_enable=v62; +} +if(v63!==v5.sample_alpha){ +if(v63){ +v1.enable(32926)} +else{ +v1.disable(32926)} +v5.sample_alpha=v63; +} +if(v64!==v5.sample_enable){ +if(v64){ +v1.enable(32928)} +else{ +v1.disable(32928)} +v5.sample_enable=v64; +} +if(v65!==v5.stencil_enable){ +if(v65){ +v1.enable(2960)} +else{ +v1.disable(2960)} +v5.stencil_enable=v65; +} +if(v66!==v5.scissor_enable){ +if(v66){ +v1.enable(3089)} +else{ +v1.disable(3089)} +v5.scissor_enable=v66; +} +if(v67[0]!==v68[0]||v67[1]!==v68[1]||v67[2]!==v68[2]||v67[3]!==v68[3]){ +v1.blendColor(v67[0],v67[1],v67[2],v67[3]); +v68[0]=v67[0]; +v68[1]=v67[1]; +v68[2]=v67[2]; +v68[3]=v67[3]; +} +if(v69[0]!==v70[0]||v69[1]!==v70[1]){ +v1.blendEquationSeparate(v69[0],v69[1]); +v70[0]=v69[0]; +v70[1]=v69[1]; +} +if(v71[0]!==v72[0]||v71[1]!==v72[1]||v71[2]!==v72[2]||v71[3]!==v72[3]){ +v1.blendFuncSeparate(v71[0],v71[1],v71[2],v71[3]); +v72[0]=v71[0]; +v72[1]=v71[1]; +v72[2]=v71[2]; +v72[3]=v71[3]; +} +if(v73!==v74){ +v1.depthFunc(v73); +v5.depth_func=v73; +} +if(v75[0]!==v76[0]||v75[1]!==v76[1]){ +v1.depthRange(v75[0],v75[1]); +v76[0]=v75[0]; +v76[1]=v75[1]; +} +if(v77!==v78){ +v1.depthMask(v77); +v5.depth_mask=v77; +} +if(v79[0]!==v80[0]||v79[1]!==v80[1]||v79[2]!==v80[2]||v79[3]!==v80[3]){ +v1.colorMask(v79[0],v79[1],v79[2],v79[3]); +v80[0]=v79[0]; +v80[1]=v79[1]; +v80[2]=v79[2]; +v80[3]=v79[3]; +} +if(v81!==v82){ +v1.cullFace(v81); +v5.cull_face=v81; +} +if(v83!==v84){ +v1.frontFace(v83); +v5.frontFace=v83; +} +if(v85!==v86){ +v1.lineWidth(v85); +v5.lineWidth=v85; +} +if(v87[0]!==v88[0]||v87[1]!==v88[1]){ +v1.polygonOffset(v87[0],v87[1]); +v88[0]=v87[0]; +v88[1]=v87[1]; +} +if(v89[0]!==v90[0]||v89[1]!==v90[1]){ +v1.sampleCoverage(v89[0],v89[1]); +v90[0]=v89[0]; +v90[1]=v89[1]; +} +if(v91!==v92){ +v1.stencilMask(v91); +v5.stencil_mask=v91; +} +if(v93[0]!==v94[0]||v93[1]!==v94[1]||v93[2]!==v94[2]){ +v1.stencilFunc(v93[0],v93[1],v93[2]); +v94[0]=v93[0]; +v94[1]=v93[1]; +v94[2]=v93[2]; +} +if(v95[0]!==v96[0]||v95[1]!==v96[1]||v95[2]!==v96[2]||v95[3]!==v96[3]){ +v1.stencilOpSeparate(v95[0],v95[1],v95[2],v95[3]); +v96[0]=v95[0]; +v96[1]=v95[1]; +v96[2]=v95[2]; +v96[3]=v95[3]; +} +if(v97[0]!==v98[0]||v97[1]!==v98[1]||v97[2]!==v98[2]||v97[3]!==v98[3]){ +v1.stencilOpSeparate(v97[0],v97[1],v97[2],v97[3]); +v98[0]=v97[0]; +v98[1]=v97[1]; +v98[2]=v97[2]; +v98[3]=v97[3]; +} +if(v99[0]!==v100[0]||v99[1]!==v100[1]||v99[2]!==v100[2]||v99[3]!==v100[3]){ +v1.scissor(v99[0],v99[1],v99[2],v99[3]); +v100[0]=v99[0]; +v100[1]=v99[1]; +v100[2]=v99[2]; +v100[3]=v99[3]; +} +if(v101[0]!==v102[0]||v101[1]!==v102[1]||v101[2]!==v102[2]||v101[3]!==v102[3]){ +v1.viewport(v101[0],v101[1],v101[2],v101[3]); +v102[0]=v101[0]; +v102[1]=v101[1]; +v102[2]=v101[2]; +v102[3]=v101[3]; +} +} +,"refresh":function(){ +var v53,v55,v56; +var v58,v59,v60,v61,v62,v63,v64,v65,v66,v73,v74,v77,v78,v81,v82,v83,v84,v85,v86,v91,v92; +v5.dirty=false; +v58=v4.dither; +v59=v4.blend_enable; +v60=v4.depth_enable; +v61=v4.cull_enable; +v62=v4.polygonOffset_enable; +v63=v4.sample_alpha; +v64=v4.sample_enable; +v65=v4.stencil_enable; +v66=v4.scissor_enable; +v73=v4.depth_func; +v74=v5.depth_func; +v77=v4.depth_mask; +v78=v5.depth_mask; +v81=v4.cull_face; +v82=v5.cull_face; +v83=v4.frontFace; +v84=v5.frontFace; +v85=v4.lineWidth; +v86=v5.lineWidth; +v91=v4.stencil_mask; +v92=v5.stencil_mask; +v53=v13.next; +if(v53){ +v1.bindFramebuffer(36160,v53.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v53; +v55=v10; +v56=0; +for(var i=0; +i":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +v113={ +} +; +v179={ +} +; +return { +"draw":function(a0){ +var v53,v108,v109,v110,v111,v112,v114,v115; +v53=v13.next; +if(v53!==v13.cur){ +if(v53){ +v1.bindFramebuffer(36160,v53.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v53; +} +if(v5.dirty){ +var v54,v55,v56,v57,v58,v59,v60,v61,v62,v63,v64,v65,v66,v67,v68,v69,v70,v71,v72,v73,v74,v75,v76,v77,v78,v79,v80,v81,v82,v83,v84,v85,v86,v87,v88,v89,v90,v91,v92,v93,v94,v95,v96,v97,v98,v99,v100,v101,v102,v103,v104,v105,v106,v107; +v54=v4.dither; +if(v54!==v5.dither){ +if(v54){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v54; +} +v55=v4.blend_enable; +if(v55!==v5.blend_enable){ +if(v55){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=v55; +} +v56=v20[0]; +v57=v20[1]; +v58=v20[2]; +v59=v20[3]; +if(v56!==v21[0]||v57!==v21[1]||v58!==v21[2]||v59!==v21[3]){ +v1.blendColor(v56,v57,v58,v59); +v21[0]=v56; +v21[1]=v57; +v21[2]=v58; +v21[3]=v59; +} +v60=v22[0]; +v61=v22[1]; +if(v60!==v23[0]||v61!==v23[1]){ +v1.blendEquationSeparate(v60,v61); +v23[0]=v60; +v23[1]=v61; +} +v62=v24[0]; +v63=v24[1]; +v64=v24[2]; +v65=v24[3]; +if(v62!==v25[0]||v63!==v25[1]||v64!==v25[2]||v65!==v25[3]){ +v1.blendFuncSeparate(v62,v63,v64,v65); +v25[0]=v62; +v25[1]=v63; +v25[2]=v64; +v25[3]=v65; +} +v66=v4.depth_enable; +if(v66!==v5.depth_enable){ +if(v66){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=v66; +} +v67=v4.depth_func; +if(v67!==v5.depth_func){ +v1.depthFunc(v67); +v5.depth_func=v67; +} +v68=v26[0]; +v69=v26[1]; +if(v68!==v27[0]||v69!==v27[1]){ +v1.depthRange(v68,v69); +v27[0]=v68; +v27[1]=v69; +} +v70=v4.depth_mask; +if(v70!==v5.depth_mask){ +v1.depthMask(v70); +v5.depth_mask=v70; +} +v71=v28[0]; +v72=v28[1]; +v73=v28[2]; +v74=v28[3]; +if(v71!==v29[0]||v72!==v29[1]||v73!==v29[2]||v74!==v29[3]){ +v1.colorMask(v71,v72,v73,v74); +v29[0]=v71; +v29[1]=v72; +v29[2]=v73; +v29[3]=v74; +} +v75=v4.cull_enable; +if(v75!==v5.cull_enable){ +if(v75){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v75; +} +v76=v4.cull_face; +if(v76!==v5.cull_face){ +v1.cullFace(v76); +v5.cull_face=v76; +} +v77=v4.frontFace; +if(v77!==v5.frontFace){ +v1.frontFace(v77); +v5.frontFace=v77; +} +v78=v4.lineWidth; +if(v78!==v5.lineWidth){ +v1.lineWidth(v78); +v5.lineWidth=v78; +} +v79=v4.polygonOffset_enable; +if(v79!==v5.polygonOffset_enable){ +if(v79){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v79; +} +v80=v30[0]; +v81=v30[1]; +if(v80!==v31[0]||v81!==v31[1]){ +v1.polygonOffset(v80,v81); +v31[0]=v80; +v31[1]=v81; +} +v82=v4.sample_alpha; +if(v82!==v5.sample_alpha){ +if(v82){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v82; +} +v83=v4.sample_enable; +if(v83!==v5.sample_enable){ +if(v83){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v83; +} +v84=v32[0]; +v85=v32[1]; +if(v84!==v33[0]||v85!==v33[1]){ +v1.sampleCoverage(v84,v85); +v33[0]=v84; +v33[1]=v85; +} +v86=v4.stencil_enable; +if(v86!==v5.stencil_enable){ +if(v86){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=v86; +} +v87=v4.stencil_mask; +if(v87!==v5.stencil_mask){ +v1.stencilMask(v87); +v5.stencil_mask=v87; +} +v88=v34[0]; +v89=v34[1]; +v90=v34[2]; +if(v88!==v35[0]||v89!==v35[1]||v90!==v35[2]){ +v1.stencilFunc(v88,v89,v90); +v35[0]=v88; +v35[1]=v89; +v35[2]=v90; +} +v91=v36[0]; +v92=v36[1]; +v93=v36[2]; +v94=v36[3]; +if(v91!==v37[0]||v92!==v37[1]||v93!==v37[2]||v94!==v37[3]){ +v1.stencilOpSeparate(v91,v92,v93,v94); +v37[0]=v91; +v37[1]=v92; +v37[2]=v93; +v37[3]=v94; +} +v95=v38[0]; +v96=v38[1]; +v97=v38[2]; +v98=v38[3]; +if(v95!==v39[0]||v96!==v39[1]||v97!==v39[2]||v98!==v39[3]){ +v1.stencilOpSeparate(v95,v96,v97,v98); +v39[0]=v95; +v39[1]=v96; +v39[2]=v97; +v39[3]=v98; +} +v99=v4.scissor_enable; +if(v99!==v5.scissor_enable){ +if(v99){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=v99; +} +v100=v40[0]; +v101=v40[1]; +v102=v40[2]; +v103=v40[3]; +if(v100!==v41[0]||v101!==v41[1]||v102!==v41[2]||v103!==v41[3]){ +v1.scissor(v100,v101,v102,v103); +v41[0]=v100; +v41[1]=v101; +v41[2]=v102; +v41[3]=v103; +} +v104=v42[0]; +v105=v42[1]; +v106=v42[2]; +v107=v42[3]; +if(v104!==v43[0]||v105!==v43[1]||v106!==v43[2]||v107!==v43[3]){ +v1.viewport(v104,v105,v106,v107); +v43[0]=v104; +v43[1]=v105; +v43[2]=v106; +v43[3]=v107; +} +v5.dirty=false; +} +v108=v5.profile; +if(v108){ +v109=performance.now(); +g52.count++; +} +v110=v9.frag; +v111=v9.vert; +v112=v9.program(v111,v110,g19); +v1.useProgram(v112.program); +v11.setVAO(null); +v114=v112.id; +v115=v113[v114]; +if(v115){ +v115.call(this,a0); +} +else{ +v115=v113[v114]=g116(v112); +v115.call(this,a0); +} +v11.setVAO(null); +if(v108){ +g52.cpuTime+=performance.now()-v109; +} +} +,"scope":function(a0,a1,a2){ +var v117,v118; +v117=v5.profile; +if(v117){ +v118=performance.now(); +g52.count++; +} +a1(v2,a0,a2); +if(v117){ +g52.cpuTime+=performance.now()-v118; +} +} +,"batch":function(a0,a1){ +var v119,v174,v175,v176,v177,v178,v180,v181; +v119=v13.next; +if(v119!==v13.cur){ +if(v119){ +v1.bindFramebuffer(36160,v119.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v119; +} +if(v5.dirty){ +var v120,v121,v122,v123,v124,v125,v126,v127,v128,v129,v130,v131,v132,v133,v134,v135,v136,v137,v138,v139,v140,v141,v142,v143,v144,v145,v146,v147,v148,v149,v150,v151,v152,v153,v154,v155,v156,v157,v158,v159,v160,v161,v162,v163,v164,v165,v166,v167,v168,v169,v170,v171,v172,v173; +v120=v4.dither; +if(v120!==v5.dither){ +if(v120){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v120; +} +v121=v4.blend_enable; +if(v121!==v5.blend_enable){ +if(v121){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=v121; +} +v122=v20[0]; +v123=v20[1]; +v124=v20[2]; +v125=v20[3]; +if(v122!==v21[0]||v123!==v21[1]||v124!==v21[2]||v125!==v21[3]){ +v1.blendColor(v122,v123,v124,v125); +v21[0]=v122; +v21[1]=v123; +v21[2]=v124; +v21[3]=v125; +} +v126=v22[0]; +v127=v22[1]; +if(v126!==v23[0]||v127!==v23[1]){ +v1.blendEquationSeparate(v126,v127); +v23[0]=v126; +v23[1]=v127; +} +v128=v24[0]; +v129=v24[1]; +v130=v24[2]; +v131=v24[3]; +if(v128!==v25[0]||v129!==v25[1]||v130!==v25[2]||v131!==v25[3]){ +v1.blendFuncSeparate(v128,v129,v130,v131); +v25[0]=v128; +v25[1]=v129; +v25[2]=v130; +v25[3]=v131; +} +v132=v4.depth_enable; +if(v132!==v5.depth_enable){ +if(v132){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=v132; +} +v133=v4.depth_func; +if(v133!==v5.depth_func){ +v1.depthFunc(v133); +v5.depth_func=v133; +} +v134=v26[0]; +v135=v26[1]; +if(v134!==v27[0]||v135!==v27[1]){ +v1.depthRange(v134,v135); +v27[0]=v134; +v27[1]=v135; +} +v136=v4.depth_mask; +if(v136!==v5.depth_mask){ +v1.depthMask(v136); +v5.depth_mask=v136; +} +v137=v28[0]; +v138=v28[1]; +v139=v28[2]; +v140=v28[3]; +if(v137!==v29[0]||v138!==v29[1]||v139!==v29[2]||v140!==v29[3]){ +v1.colorMask(v137,v138,v139,v140); +v29[0]=v137; +v29[1]=v138; +v29[2]=v139; +v29[3]=v140; +} +v141=v4.cull_enable; +if(v141!==v5.cull_enable){ +if(v141){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v141; +} +v142=v4.cull_face; +if(v142!==v5.cull_face){ +v1.cullFace(v142); +v5.cull_face=v142; +} +v143=v4.frontFace; +if(v143!==v5.frontFace){ +v1.frontFace(v143); +v5.frontFace=v143; +} +v144=v4.lineWidth; +if(v144!==v5.lineWidth){ +v1.lineWidth(v144); +v5.lineWidth=v144; +} +v145=v4.polygonOffset_enable; +if(v145!==v5.polygonOffset_enable){ +if(v145){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v145; +} +v146=v30[0]; +v147=v30[1]; +if(v146!==v31[0]||v147!==v31[1]){ +v1.polygonOffset(v146,v147); +v31[0]=v146; +v31[1]=v147; +} +v148=v4.sample_alpha; +if(v148!==v5.sample_alpha){ +if(v148){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v148; +} +v149=v4.sample_enable; +if(v149!==v5.sample_enable){ +if(v149){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v149; +} +v150=v32[0]; +v151=v32[1]; +if(v150!==v33[0]||v151!==v33[1]){ +v1.sampleCoverage(v150,v151); +v33[0]=v150; +v33[1]=v151; +} +v152=v4.stencil_enable; +if(v152!==v5.stencil_enable){ +if(v152){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=v152; +} +v153=v4.stencil_mask; +if(v153!==v5.stencil_mask){ +v1.stencilMask(v153); +v5.stencil_mask=v153; +} +v154=v34[0]; +v155=v34[1]; +v156=v34[2]; +if(v154!==v35[0]||v155!==v35[1]||v156!==v35[2]){ +v1.stencilFunc(v154,v155,v156); +v35[0]=v154; +v35[1]=v155; +v35[2]=v156; +} +v157=v36[0]; +v158=v36[1]; +v159=v36[2]; +v160=v36[3]; +if(v157!==v37[0]||v158!==v37[1]||v159!==v37[2]||v160!==v37[3]){ +v1.stencilOpSeparate(v157,v158,v159,v160); +v37[0]=v157; +v37[1]=v158; +v37[2]=v159; +v37[3]=v160; +} +v161=v38[0]; +v162=v38[1]; +v163=v38[2]; +v164=v38[3]; +if(v161!==v39[0]||v162!==v39[1]||v163!==v39[2]||v164!==v39[3]){ +v1.stencilOpSeparate(v161,v162,v163,v164); +v39[0]=v161; +v39[1]=v162; +v39[2]=v163; +v39[3]=v164; +} +v165=v4.scissor_enable; +if(v165!==v5.scissor_enable){ +if(v165){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=v165; +} +v166=v40[0]; +v167=v40[1]; +v168=v40[2]; +v169=v40[3]; +if(v166!==v41[0]||v167!==v41[1]||v168!==v41[2]||v169!==v41[3]){ +v1.scissor(v166,v167,v168,v169); +v41[0]=v166; +v41[1]=v167; +v41[2]=v168; +v41[3]=v169; +} +v170=v42[0]; +v171=v42[1]; +v172=v42[2]; +v173=v42[3]; +if(v170!==v43[0]||v171!==v43[1]||v172!==v43[2]||v173!==v43[3]){ +v1.viewport(v170,v171,v172,v173); +v43[0]=v170; +v43[1]=v171; +v43[2]=v172; +v43[3]=v173; +} +v5.dirty=false; +} +v174=v5.profile; +if(v174){ +v175=performance.now(); +g52.count+=a1; +} +v176=v9.frag; +v177=v9.vert; +v178=v9.program(v177,v176,g19); +v1.useProgram(v178.program); +v11.setVAO(null); +v180=v178.id; +v181=v179[v180]; +if(v181){ +v181.call(this,a0,a1); +} +else{ +v181=v179[v180]=g182(v178); +v181.call(this,a0,a1); +} +v11.setVAO(null); +if(v174){ +g52.cpuTime+=performance.now()-v175; +} +} +,} + +} \ No newline at end of file diff --git a/src/generated/regl-codegen/6c3ff5a68d2906faf59307b58a799389f916ebdd3f7732ce75967575041988fc b/src/generated/regl-codegen/6c3ff5a68d2906faf59307b58a799389f916ebdd3f7732ce75967575041988fc new file mode 100644 index 00000000000..8f6d7817550 --- /dev/null +++ b/src/generated/regl-codegen/6c3ff5a68d2906faf59307b58a799389f916ebdd3f7732ce75967575041988fc @@ -0,0 +1,2226 @@ +module.exports = function anonymous(g0,g18,g19,g52,g54,g56,g58,g60,g97,g104,g105,g107,g112,g115,g117,g118,g121,g123,g137,g141,g144,g146,g160,g164,g167,g169,g183,g187,g189,g203,g207,g209,g210,g212,g213,g215,g216,g218,g221,g223,g226,g228,g231,g233,g236,g237,g239,g258,g260,g262,g264,g266,g268,g270,g272,g274,g276,g278,g280,g291,g295,g299,g302,g305,g308,g311,g314,g317,g320,g323,g326,g328,g341,g354,g381,g408,g435,g462,g475,g477,g514,g515,g516 +) { +"use strict"; +var v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v53,v55,v57,v59; +v1=g0.gl; +v2=g0.context; +v3=g0.strings; +v4=g0.next; +v5=g0.current; +v6=g0.draw; +v7=g0.elements; +v8=g0.buffer; +v9=g0.shader; +v10=g0.attributes; +v11=g0.vao; +v12=g0.uniforms; +v13=g0.framebuffer; +v14=g0.extensions; +v15=g0.timer; +v16=g0.isBufferArgs; +v17=g0.isArrayLike; +v20=v4.blend_color; +v21=v5.blend_color; +v22=v4.blend_equation; +v23=v5.blend_equation; +v24=v4.blend_func; +v25=v5.blend_func; +v26=v4.depth_range; +v27=v5.depth_range; +v28=v4.colorMask; +v29=v5.colorMask; +v30=v4.polygonOffset_offset; +v31=v5.polygonOffset_offset; +v32=v4.sample_coverage; +v33=v5.sample_coverage; +v34=v4.stencil_func; +v35=v5.stencil_func; +v36=v4.stencil_opFront; +v37=v5.stencil_opFront; +v38=v4.stencil_opBack; +v39=v5.stencil_opBack; +v40=v4.scissor_box; +v41=v5.scissor_box; +v42=v4.viewport; +v43=v5.viewport; +v44={ +"points":0,"point":0,"lines":1,"line":1,"triangles":4,"triangle":4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6} +; +v45={ +"never":512,"less":513,"<":513,"equal":514,"=":514,"==":514,"===":514,"lequal":515,"<=":515,"greater":516,">":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +v53={ +} +; +v53.buffer=g54; +v53.divisor=1; +v55={ +} +; +v55.buffer=g56; +v55.divisor=1; +v57={ +} +; +v57.buffer=g58; +v57.divisor=1; +v59={ +} +; +v59.buffer=g60; +v59.divisor=1; +return { +"draw":function(a0){ +var v61,v62,v96,v98,v99,v100,v101,v102,v103,v106,v108,v109,v110,v111,v113,v114,v116,v119,v120,v122,v124,v125,v126,v127,v128,v129,v130,v131,v132,v133,v134,v135,v136,v138,v139,v140,v142,v143,v145,v147,v148,v149,v150,v151,v152,v153,v154,v155,v156,v157,v158,v159,v161,v162,v163,v165,v166,v168,v170,v171,v172,v173,v174,v175,v176,v177,v178,v179,v180,v181,v182,v184,v185,v186,v188,v190,v191,v192,v193,v194,v195,v196,v197,v198,v199,v200,v201,v202,v204,v205,v206,v208,v211,v214,v217,v219,v220,v222,v224,v225,v227,v229,v230,v232,v234,v235,v238,v240,v241,v242,v243,v244,v245,v246; +v61=v14.angle_instanced_arrays; +v62=v13.next; +if(v62!==v13.cur){ +if(v62){ +v1.bindFramebuffer(36160,v62.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v62; +} +if(v5.dirty){ +var v63,v64,v65,v66,v67,v68,v69,v70,v71,v72,v73,v74,v75,v76,v77,v78,v79,v80,v81,v82,v83,v84,v85,v86,v87,v88,v89,v90,v91,v92,v93,v94,v95; +v63=v4.dither; +if(v63!==v5.dither){ +if(v63){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v63; +} +v64=v4.depth_func; +if(v64!==v5.depth_func){ +v1.depthFunc(v64); +v5.depth_func=v64; +} +v65=v26[0]; +v66=v26[1]; +if(v65!==v27[0]||v66!==v27[1]){ +v1.depthRange(v65,v66); +v27[0]=v65; +v27[1]=v66; +} +v67=v4.depth_mask; +if(v67!==v5.depth_mask){ +v1.depthMask(v67); +v5.depth_mask=v67; +} +v68=v28[0]; +v69=v28[1]; +v70=v28[2]; +v71=v28[3]; +if(v68!==v29[0]||v69!==v29[1]||v70!==v29[2]||v71!==v29[3]){ +v1.colorMask(v68,v69,v70,v71); +v29[0]=v68; +v29[1]=v69; +v29[2]=v70; +v29[3]=v71; +} +v72=v4.cull_enable; +if(v72!==v5.cull_enable){ +if(v72){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v72; +} +v73=v4.cull_face; +if(v73!==v5.cull_face){ +v1.cullFace(v73); +v5.cull_face=v73; +} +v74=v4.frontFace; +if(v74!==v5.frontFace){ +v1.frontFace(v74); +v5.frontFace=v74; +} +v75=v4.lineWidth; +if(v75!==v5.lineWidth){ +v1.lineWidth(v75); +v5.lineWidth=v75; +} +v76=v4.polygonOffset_enable; +if(v76!==v5.polygonOffset_enable){ +if(v76){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v76; +} +v77=v30[0]; +v78=v30[1]; +if(v77!==v31[0]||v78!==v31[1]){ +v1.polygonOffset(v77,v78); +v31[0]=v77; +v31[1]=v78; +} +v79=v4.sample_alpha; +if(v79!==v5.sample_alpha){ +if(v79){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v79; +} +v80=v4.sample_enable; +if(v80!==v5.sample_enable){ +if(v80){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v80; +} +v81=v32[0]; +v82=v32[1]; +if(v81!==v33[0]||v82!==v33[1]){ +v1.sampleCoverage(v81,v82); +v33[0]=v81; +v33[1]=v82; +} +v83=v4.stencil_enable; +if(v83!==v5.stencil_enable){ +if(v83){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=v83; +} +v84=v4.stencil_mask; +if(v84!==v5.stencil_mask){ +v1.stencilMask(v84); +v5.stencil_mask=v84; +} +v85=v34[0]; +v86=v34[1]; +v87=v34[2]; +if(v85!==v35[0]||v86!==v35[1]||v87!==v35[2]){ +v1.stencilFunc(v85,v86,v87); +v35[0]=v85; +v35[1]=v86; +v35[2]=v87; +} +v88=v36[0]; +v89=v36[1]; +v90=v36[2]; +v91=v36[3]; +if(v88!==v37[0]||v89!==v37[1]||v90!==v37[2]||v91!==v37[3]){ +v1.stencilOpSeparate(v88,v89,v90,v91); +v37[0]=v88; +v37[1]=v89; +v37[2]=v90; +v37[3]=v91; +} +v92=v38[0]; +v93=v38[1]; +v94=v38[2]; +v95=v38[3]; +if(v92!==v39[0]||v93!==v39[1]||v94!==v39[2]||v95!==v39[3]){ +v1.stencilOpSeparate(v92,v93,v94,v95); +v39[0]=v92; +v39[1]=v93; +v39[2]=v94; +v39[3]=v95; +} +} +v96=a0["viewport"]; +if(!(v96&&typeof v96==="object"))g18.commandRaise(g97,g19); +v98=v96.x|0; +v99=v96.y|0; +v100="width" in v96?v96.width|0:(v2.framebufferWidth-v98); +v101="height" in v96?v96.height|0:(v2.framebufferHeight-v99); +if(!(v100>=0&&v101>=0))g18.commandRaise(g97,g19); +v102=v2.viewportWidth; +v2.viewportWidth=v100; +v103=v2.viewportHeight; +v2.viewportHeight=v101; +v1.viewport(v98,v99,v100,v101); +v43[0]=v98; +v43[1]=v99; +v43[2]=v100; +v43[3]=v101; +v1.blendColor(0,0,0,0); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=0; +if(g104){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g104; +v1.blendEquationSeparate(32774,32774); +v23[0]=32774; +v23[1]=32774; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +if(g105){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=g105; +v106=a0["viewport"]; +if(!(v106&&typeof v106==="object"))g18.commandRaise(g107,g19); +v108=v106.x|0; +v109=v106.y|0; +v110="width" in v106?v106.width|0:(v2.framebufferWidth-v108); +v111="height" in v106?v106.height|0:(v2.framebufferHeight-v109); +if(!(v110>=0&&v111>=0))g18.commandRaise(g107,g19); +v1.scissor(v108,v109,v110,v111); +v41[0]=v108; +v41[1]=v109; +v41[2]=v110; +v41[3]=v111; +if(g112){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g112; +v113=v5.profile; +if(v113){ +v114=performance.now(); +g52.count++; +} +v1.useProgram(g115.program); +v116=v14.angle_instanced_arrays; +v11.setVAO(null); +v119=g118.location; +v120=v10[v119]; +if(!v120.buffer){ +v1.enableVertexAttribArray(v119); +} +if(v120.type!==5126||v120.size!==2||v120.buffer!==g117||v120.normalized!==false||v120.offset!==16||v120.stride!==24){ +v1.bindBuffer(34962,g117.buffer); +v1.vertexAttribPointer(v119,2,5126,false,24,16); +v120.type=5126; +v120.size=2; +v120.buffer=g117; +v120.normalized=false; +v120.offset=16; +v120.stride=24; +} +if(v120.divisor!==0){ +v116.vertexAttribDivisorANGLE(v119,0); +v120.divisor=0; +} +v122=g121.call(this,v2,a0,0); +v53.offset=v122; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g123,g19); +v124=false; +v125=1; +v126=0; +v127=0; +v128=0; +v129=0; +v130=null; +v131=0; +v132=false; +v133=5126; +v134=0; +v135=0; +v136=0; +if(v16(v53)){ +v124=true; +v130=v8.createStream(34962,v53); +v133=v130.dtype; +} +else{ +v130=v8.getBuffer(v53); +if(v130){ +v133=v130.dtype; +} +else if("constant" in v53){ +v125=2; +if(typeof v53.constant === "number"){ +v126=v53.constant; +v127=v128=v129=0; +} +else{ +v126=v53.constant.length>0?v53.constant[0]:0; +v127=v53.constant.length>1?v53.constant[1]:0; +v128=v53.constant.length>2?v53.constant[2]:0; +v129=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v130=v8.createStream(34962,v53.buffer); +} +else{ +v130=v8.getBuffer(v53.buffer); +} +v133="type" in v53?v49[v53.type]:v130.dtype; +v132=!!v53.normalized; +v131=v53.size|0; +v134=v53.offset|0; +v135=v53.stride|0; +v136=v53.divisor|0; +} +} +v138=g137.location; +v139=v10[v138]; +if(v125===1){ +if(!v139.buffer){ +v1.enableVertexAttribArray(v138); +} +v140=v131||4; +if(v139.type!==v133||v139.size!==v140||v139.buffer!==v130||v139.normalized!==v132||v139.offset!==v134||v139.stride!==v135){ +v1.bindBuffer(34962,v130.buffer); +v1.vertexAttribPointer(v138,v140,v133,v132,v135,v134); +v139.type=v133; +v139.size=v140; +v139.buffer=v130; +v139.normalized=v132; +v139.offset=v134; +v139.stride=v135; +} +if(v139.divisor!==v136){ +v116.vertexAttribDivisorANGLE(v138,v136); +v139.divisor=v136; +} +} +else{ +if(v139.buffer){ +v1.disableVertexAttribArray(v138); +v139.buffer=null; +} +if(v139.x!==v126||v139.y!==v127||v139.z!==v128||v139.w!==v129){ +v1.vertexAttrib4f(v138,v126,v127,v128,v129); +v139.x=v126; +v139.y=v127; +v139.z=v128; +v139.w=v129; +} +} +v142=g141.location; +v143=v10[v142]; +if(!v143.buffer){ +v1.enableVertexAttribArray(v142); +} +if(v143.type!==5126||v143.size!==2||v143.buffer!==g117||v143.normalized!==false||v143.offset!==0||v143.stride!==24){ +v1.bindBuffer(34962,g117.buffer); +v1.vertexAttribPointer(v142,2,5126,false,24,0); +v143.type=5126; +v143.size=2; +v143.buffer=g117; +v143.normalized=false; +v143.offset=0; +v143.stride=24; +} +if(v143.divisor!==0){ +v116.vertexAttribDivisorANGLE(v142,0); +v143.divisor=0; +} +v145=g144.call(this,v2,a0,0); +v59.offset=v145; +if(!(v59&&(typeof v59==="object"||typeof v59==="function")&&(v16(v59)||v8.getBuffer(v59)||v8.getBuffer(v59.buffer)||v16(v59.buffer)||("constant" in v59&&(typeof v59.constant==="number"||v17(v59.constant))))))g18.commandRaise(g146,g19); +v147=false; +v148=1; +v149=0; +v150=0; +v151=0; +v152=0; +v153=null; +v154=0; +v155=false; +v156=5126; +v157=0; +v158=0; +v159=0; +if(v16(v59)){ +v147=true; +v153=v8.createStream(34962,v59); +v156=v153.dtype; +} +else{ +v153=v8.getBuffer(v59); +if(v153){ +v156=v153.dtype; +} +else if("constant" in v59){ +v148=2; +if(typeof v59.constant === "number"){ +v149=v59.constant; +v150=v151=v152=0; +} +else{ +v149=v59.constant.length>0?v59.constant[0]:0; +v150=v59.constant.length>1?v59.constant[1]:0; +v151=v59.constant.length>2?v59.constant[2]:0; +v152=v59.constant.length>3?v59.constant[3]:0; +} +} +else{ +if(v16(v59.buffer)){ +v153=v8.createStream(34962,v59.buffer); +} +else{ +v153=v8.getBuffer(v59.buffer); +} +v156="type" in v59?v49[v59.type]:v153.dtype; +v155=!!v59.normalized; +v154=v59.size|0; +v157=v59.offset|0; +v158=v59.stride|0; +v159=v59.divisor|0; +} +} +v161=g160.location; +v162=v10[v161]; +if(v148===1){ +if(!v162.buffer){ +v1.enableVertexAttribArray(v161); +} +v163=v154||4; +if(v162.type!==v156||v162.size!==v163||v162.buffer!==v153||v162.normalized!==v155||v162.offset!==v157||v162.stride!==v158){ +v1.bindBuffer(34962,v153.buffer); +v1.vertexAttribPointer(v161,v163,v156,v155,v158,v157); +v162.type=v156; +v162.size=v163; +v162.buffer=v153; +v162.normalized=v155; +v162.offset=v157; +v162.stride=v158; +} +if(v162.divisor!==v159){ +v116.vertexAttribDivisorANGLE(v161,v159); +v162.divisor=v159; +} +} +else{ +if(v162.buffer){ +v1.disableVertexAttribArray(v161); +v162.buffer=null; +} +if(v162.x!==v149||v162.y!==v150||v162.z!==v151||v162.w!==v152){ +v1.vertexAttrib4f(v161,v149,v150,v151,v152); +v162.x=v149; +v162.y=v150; +v162.z=v151; +v162.w=v152; +} +} +v165=g164.location; +v166=v10[v165]; +if(!v166.buffer){ +v1.enableVertexAttribArray(v165); +} +if(v166.type!==5126||v166.size!==2||v166.buffer!==g117||v166.normalized!==false||v166.offset!==8||v166.stride!==24){ +v1.bindBuffer(34962,g117.buffer); +v1.vertexAttribPointer(v165,2,5126,false,24,8); +v166.type=5126; +v166.size=2; +v166.buffer=g117; +v166.normalized=false; +v166.offset=8; +v166.stride=24; +} +if(v166.divisor!==0){ +v116.vertexAttribDivisorANGLE(v165,0); +v166.divisor=0; +} +v168=g167.call(this,v2,a0,0); +v55.offset=v168; +if(!(v55&&(typeof v55==="object"||typeof v55==="function")&&(v16(v55)||v8.getBuffer(v55)||v8.getBuffer(v55.buffer)||v16(v55.buffer)||("constant" in v55&&(typeof v55.constant==="number"||v17(v55.constant))))))g18.commandRaise(g169,g19); +v170=false; +v171=1; +v172=0; +v173=0; +v174=0; +v175=0; +v176=null; +v177=0; +v178=false; +v179=5126; +v180=0; +v181=0; +v182=0; +if(v16(v55)){ +v170=true; +v176=v8.createStream(34962,v55); +v179=v176.dtype; +} +else{ +v176=v8.getBuffer(v55); +if(v176){ +v179=v176.dtype; +} +else if("constant" in v55){ +v171=2; +if(typeof v55.constant === "number"){ +v172=v55.constant; +v173=v174=v175=0; +} +else{ +v172=v55.constant.length>0?v55.constant[0]:0; +v173=v55.constant.length>1?v55.constant[1]:0; +v174=v55.constant.length>2?v55.constant[2]:0; +v175=v55.constant.length>3?v55.constant[3]:0; +} +} +else{ +if(v16(v55.buffer)){ +v176=v8.createStream(34962,v55.buffer); +} +else{ +v176=v8.getBuffer(v55.buffer); +} +v179="type" in v55?v49[v55.type]:v176.dtype; +v178=!!v55.normalized; +v177=v55.size|0; +v180=v55.offset|0; +v181=v55.stride|0; +v182=v55.divisor|0; +} +} +v184=g183.location; +v185=v10[v184]; +if(v171===1){ +if(!v185.buffer){ +v1.enableVertexAttribArray(v184); +} +v186=v177||2; +if(v185.type!==v179||v185.size!==v186||v185.buffer!==v176||v185.normalized!==v178||v185.offset!==v180||v185.stride!==v181){ +v1.bindBuffer(34962,v176.buffer); +v1.vertexAttribPointer(v184,v186,v179,v178,v181,v180); +v185.type=v179; +v185.size=v186; +v185.buffer=v176; +v185.normalized=v178; +v185.offset=v180; +v185.stride=v181; +} +if(v185.divisor!==v182){ +v116.vertexAttribDivisorANGLE(v184,v182); +v185.divisor=v182; +} +} +else{ +if(v185.buffer){ +v1.disableVertexAttribArray(v184); +v185.buffer=null; +} +if(v185.x!==v172||v185.y!==v173||v185.z!==v174||v185.w!==v175){ +v1.vertexAttrib4f(v184,v172,v173,v174,v175); +v185.x=v172; +v185.y=v173; +v185.z=v174; +v185.w=v175; +} +} +v188=g187.call(this,v2,a0,0); +v57.offset=v188; +if(!(v57&&(typeof v57==="object"||typeof v57==="function")&&(v16(v57)||v8.getBuffer(v57)||v8.getBuffer(v57.buffer)||v16(v57.buffer)||("constant" in v57&&(typeof v57.constant==="number"||v17(v57.constant))))))g18.commandRaise(g189,g19); +v190=false; +v191=1; +v192=0; +v193=0; +v194=0; +v195=0; +v196=null; +v197=0; +v198=false; +v199=5126; +v200=0; +v201=0; +v202=0; +if(v16(v57)){ +v190=true; +v196=v8.createStream(34962,v57); +v199=v196.dtype; +} +else{ +v196=v8.getBuffer(v57); +if(v196){ +v199=v196.dtype; +} +else if("constant" in v57){ +v191=2; +if(typeof v57.constant === "number"){ +v192=v57.constant; +v193=v194=v195=0; +} +else{ +v192=v57.constant.length>0?v57.constant[0]:0; +v193=v57.constant.length>1?v57.constant[1]:0; +v194=v57.constant.length>2?v57.constant[2]:0; +v195=v57.constant.length>3?v57.constant[3]:0; +} +} +else{ +if(v16(v57.buffer)){ +v196=v8.createStream(34962,v57.buffer); +} +else{ +v196=v8.getBuffer(v57.buffer); +} +v199="type" in v57?v49[v57.type]:v196.dtype; +v198=!!v57.normalized; +v197=v57.size|0; +v200=v57.offset|0; +v201=v57.stride|0; +v202=v57.divisor|0; +} +} +v204=g203.location; +v205=v10[v204]; +if(v191===1){ +if(!v205.buffer){ +v1.enableVertexAttribArray(v204); +} +v206=v197||2; +if(v205.type!==v199||v205.size!==v206||v205.buffer!==v196||v205.normalized!==v198||v205.offset!==v200||v205.stride!==v201){ +v1.bindBuffer(34962,v196.buffer); +v1.vertexAttribPointer(v204,v206,v199,v198,v201,v200); +v205.type=v199; +v205.size=v206; +v205.buffer=v196; +v205.normalized=v198; +v205.offset=v200; +v205.stride=v201; +} +if(v205.divisor!==v202){ +v116.vertexAttribDivisorANGLE(v204,v202); +v205.divisor=v202; +} +} +else{ +if(v205.buffer){ +v1.disableVertexAttribArray(v204); +v205.buffer=null; +} +if(v205.x!==v192||v205.y!==v193||v205.z!==v194||v205.w!==v195){ +v1.vertexAttrib4f(v204,v192,v193,v194,v195); +v205.x=v192; +v205.y=v193; +v205.z=v194; +v205.w=v195; +} +} +v208=a0["capSize"]; +if(!(typeof v208==="number"))g18.commandRaise(g209,g19); +v1.uniform1f(g207.location,v208); +v211=a0["lineWidth"]; +if(!(typeof v211==="number"))g18.commandRaise(g212,g19); +v1.uniform1f(g210.location,v211); +v214=a0["opacity"]; +if(!(typeof v214==="number"))g18.commandRaise(g215,g19); +v1.uniform1f(g213.location,v214); +v217=a0["scale"]; +if(!(v17(v217)&&v217.length===2))g18.commandRaise(g218,g19); +v219=v217[0]; +v220=v217[1]; +v1.uniform2f(g216.location,v219,v220); +v222=a0["scaleFract"]; +if(!(v17(v222)&&v222.length===2))g18.commandRaise(g223,g19); +v224=v222[0]; +v225=v222[1]; +v1.uniform2f(g221.location,v224,v225); +v227=a0["translate"]; +if(!(v17(v227)&&v227.length===2))g18.commandRaise(g228,g19); +v229=v227[0]; +v230=v227[1]; +v1.uniform2f(g226.location,v229,v230); +v232=a0["translateFract"]; +if(!(v17(v232)&&v232.length===2))g18.commandRaise(g233,g19); +v234=v232[0]; +v235=v232[1]; +v1.uniform2f(g231.location,v234,v235); +v238=g237.call(this,v2,a0,0); +if(!(v17(v238)&&v238.length===4))g18.commandRaise(g239,g19); +v240=v238[0]; +v241=v238[1]; +v242=v238[2]; +v243=v238[3]; +v1.uniform4f(g236.location,v240,v241,v242,v243); +v244=v6.elements; +if(v244){ +v1.bindBuffer(34963,v244.buffer.buffer); +} +else if(v11.currentVAO){ +v244=v7.getElements(v11.currentVAO.elements); +if(v244)v1.bindBuffer(34963,v244.buffer.buffer); +} +v245=v6.offset; +v246=a0["count"]; +if(v246>0){ +if(v244){ +v116.drawElementsInstancedANGLE(4,36,v244.type,v245<<((v244.type-5121)>>1),v246); +} +else{ +v116.drawArraysInstancedANGLE(4,v245,36,v246); +} +} +else if(v246<0){ +if(v244){ +v1.drawElements(4,36,v244.type,v245<<((v244.type-5121)>>1)); +} +else{ +v1.drawArrays(4,v245,36); +} +} +v5.dirty=true; +v11.setVAO(null); +v2.viewportWidth=v102; +v2.viewportHeight=v103; +if(v113){ +g52.cpuTime+=performance.now()-v114; +} +if(v124){ +v8.destroyStream(v130); +} +if(v147){ +v8.destroyStream(v153); +} +if(v170){ +v8.destroyStream(v176); +} +if(v190){ +v8.destroyStream(v196); +} +} +,"scope":function(a0,a1,a2){ +var v247,v248,v249,v250,v251,v252,v253,v254,v255,v256,v257,v259,v261,v263,v265,v267,v269,v271,v273,v275,v277,v279,v281,v282,v283,v284,v285,v286,v287,v288,v289,v290,v292,v293,v294,v296,v297,v298,v300,v301,v303,v304,v306,v307,v309,v310,v312,v313,v315,v316,v318,v319,v321,v322,v324,v325,v327,v329,v330,v331,v332,v333,v334,v335,v336,v337,v338,v339,v340,v342,v343,v344,v345,v346,v347,v348,v349,v350,v351,v352,v353,v355,v356,v357,v358,v359,v360,v361,v362,v363,v364,v365,v366,v367,v368,v369,v370,v371,v372,v373,v374,v375,v376,v377,v378,v379,v380,v382,v383,v384,v385,v386,v387,v388,v389,v390,v391,v392,v393,v394,v395,v396,v397,v398,v399,v400,v401,v402,v403,v404,v405,v406,v407,v409,v410,v411,v412,v413,v414,v415,v416,v417,v418,v419,v420,v421,v422,v423,v424,v425,v426,v427,v428,v429,v430,v431,v432,v433,v434,v436,v437,v438,v439,v440,v441,v442,v443,v444,v445,v446,v447,v448,v449,v450,v451,v452,v453,v454,v455,v456,v457,v458,v459,v460,v461,v463,v464,v465,v466,v467,v468,v469,v470,v471,v472,v473,v474,v476,v478; +v247=a0["viewport"]; +if(!(v247&&typeof v247==="object"))g18.commandRaise(g97,g19); +v248=v247.x|0; +v249=v247.y|0; +v250="width" in v247?v247.width|0:(v2.framebufferWidth-v248); +v251="height" in v247?v247.height|0:(v2.framebufferHeight-v249); +if(!(v250>=0&&v251>=0))g18.commandRaise(g97,g19); +v252=v2.viewportWidth; +v2.viewportWidth=v250; +v253=v2.viewportHeight; +v2.viewportHeight=v251; +v254=v42[0]; +v42[0]=v248; +v255=v42[1]; +v42[1]=v249; +v256=v42[2]; +v42[2]=v250; +v257=v42[3]; +v42[3]=v251; +v259=v20[0]; +v20[0]=g258; +v261=v20[1]; +v20[1]=g260; +v263=v20[2]; +v20[2]=g262; +v265=v20[3]; +v20[3]=g264; +v267=v4.blend_enable; +v4.blend_enable=g266; +v269=v22[0]; +v22[0]=g268; +v271=v22[1]; +v22[1]=g270; +v273=v24[0]; +v24[0]=g272; +v275=v24[1]; +v24[1]=g274; +v277=v24[2]; +v24[2]=g276; +v279=v24[3]; +v24[3]=g278; +v281=v4.depth_enable; +v4.depth_enable=g280; +v282=a0["viewport"]; +if(!(v282&&typeof v282==="object"))g18.commandRaise(g107,g19); +v283=v282.x|0; +v284=v282.y|0; +v285="width" in v282?v282.width|0:(v2.framebufferWidth-v283); +v286="height" in v282?v282.height|0:(v2.framebufferHeight-v284); +if(!(v285>=0&&v286>=0))g18.commandRaise(g107,g19); +v287=v40[0]; +v40[0]=v283; +v288=v40[1]; +v40[1]=v284; +v289=v40[2]; +v40[2]=v285; +v290=v40[3]; +v40[3]=v286; +v292=v4.scissor_enable; +v4.scissor_enable=g291; +v293=v5.profile; +if(v293){ +v294=performance.now(); +g52.count++; +} +v296=v6.count; +v6.count=g295; +v297=a0["count"]; +v298=v6.instances; +v6.instances=v297; +v300=v6.primitive; +v6.primitive=g299; +v301=a0["range"]; +v303=v12[g302]; +v12[g302]=v301; +v304=a0["lineWidth"]; +v306=v12[g305]; +v12[g305]=v304; +v307=a0["capSize"]; +v309=v12[g308]; +v12[g308]=v307; +v310=a0["opacity"]; +v312=v12[g311]; +v12[g311]=v310; +v313=a0["scale"]; +v315=v12[g314]; +v12[g314]=v313; +v316=a0["translate"]; +v318=v12[g317]; +v12[g317]=v316; +v319=a0["scaleFract"]; +v321=v12[g320]; +v12[g320]=v319; +v322=a0["translateFract"]; +v324=v12[g323]; +v12[g323]=v322; +v325=g237.call(this,v2,a0,a2); +v327=v12[g326]; +v12[g326]=v325; +v329=g328.state; +g328.state=1; +v330=g328.x; +g328.x=0; +v331=g328.y; +g328.y=0; +v332=g328.z; +g328.z=0; +v333=g328.w; +g328.w=0; +v334=g328.buffer; +g328.buffer=g117; +v335=g328.size; +g328.size=0; +v336=g328.normalized; +g328.normalized=false; +v337=g328.type; +g328.type=5126; +v338=g328.offset; +g328.offset=0; +v339=g328.stride; +g328.stride=24; +v340=g328.divisor; +g328.divisor=0; +v342=g341.state; +g341.state=1; +v343=g341.x; +g341.x=0; +v344=g341.y; +g341.y=0; +v345=g341.z; +g341.z=0; +v346=g341.w; +g341.w=0; +v347=g341.buffer; +g341.buffer=g117; +v348=g341.size; +g341.size=0; +v349=g341.normalized; +g341.normalized=false; +v350=g341.type; +g341.type=5126; +v351=g341.offset; +g341.offset=8; +v352=g341.stride; +g341.stride=24; +v353=g341.divisor; +g341.divisor=0; +v355=g354.state; +g354.state=1; +v356=g354.x; +g354.x=0; +v357=g354.y; +g354.y=0; +v358=g354.z; +g354.z=0; +v359=g354.w; +g354.w=0; +v360=g354.buffer; +g354.buffer=g117; +v361=g354.size; +g354.size=0; +v362=g354.normalized; +g354.normalized=false; +v363=g354.type; +g354.type=5126; +v364=g354.offset; +g354.offset=16; +v365=g354.stride; +g354.stride=24; +v366=g354.divisor; +g354.divisor=0; +v367=g121.call(this,v2,a0,a2); +v53.offset=v367; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g123,g19); +v368=false; +v369=1; +v370=0; +v371=0; +v372=0; +v373=0; +v374=null; +v375=0; +v376=false; +v377=5126; +v378=0; +v379=0; +v380=0; +if(v16(v53)){ +v368=true; +v374=v8.createStream(34962,v53); +v377=v374.dtype; +} +else{ +v374=v8.getBuffer(v53); +if(v374){ +v377=v374.dtype; +} +else if("constant" in v53){ +v369=2; +if(typeof v53.constant === "number"){ +v370=v53.constant; +v371=v372=v373=0; +} +else{ +v370=v53.constant.length>0?v53.constant[0]:0; +v371=v53.constant.length>1?v53.constant[1]:0; +v372=v53.constant.length>2?v53.constant[2]:0; +v373=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v374=v8.createStream(34962,v53.buffer); +} +else{ +v374=v8.getBuffer(v53.buffer); +} +v377="type" in v53?v49[v53.type]:v374.dtype; +v376=!!v53.normalized; +v375=v53.size|0; +v378=v53.offset|0; +v379=v53.stride|0; +v380=v53.divisor|0; +} +} +v382=g381.state; +g381.state=v369; +v383=g381.x; +g381.x=v370; +v384=g381.y; +g381.y=v371; +v385=g381.z; +g381.z=v372; +v386=g381.w; +g381.w=v373; +v387=g381.buffer; +g381.buffer=v374; +v388=g381.size; +g381.size=v375; +v389=g381.normalized; +g381.normalized=v376; +v390=g381.type; +g381.type=v377; +v391=g381.offset; +g381.offset=v378; +v392=g381.stride; +g381.stride=v379; +v393=g381.divisor; +g381.divisor=v380; +v394=g167.call(this,v2,a0,a2); +v55.offset=v394; +if(!(v55&&(typeof v55==="object"||typeof v55==="function")&&(v16(v55)||v8.getBuffer(v55)||v8.getBuffer(v55.buffer)||v16(v55.buffer)||("constant" in v55&&(typeof v55.constant==="number"||v17(v55.constant))))))g18.commandRaise(g169,g19); +v395=false; +v396=1; +v397=0; +v398=0; +v399=0; +v400=0; +v401=null; +v402=0; +v403=false; +v404=5126; +v405=0; +v406=0; +v407=0; +if(v16(v55)){ +v395=true; +v401=v8.createStream(34962,v55); +v404=v401.dtype; +} +else{ +v401=v8.getBuffer(v55); +if(v401){ +v404=v401.dtype; +} +else if("constant" in v55){ +v396=2; +if(typeof v55.constant === "number"){ +v397=v55.constant; +v398=v399=v400=0; +} +else{ +v397=v55.constant.length>0?v55.constant[0]:0; +v398=v55.constant.length>1?v55.constant[1]:0; +v399=v55.constant.length>2?v55.constant[2]:0; +v400=v55.constant.length>3?v55.constant[3]:0; +} +} +else{ +if(v16(v55.buffer)){ +v401=v8.createStream(34962,v55.buffer); +} +else{ +v401=v8.getBuffer(v55.buffer); +} +v404="type" in v55?v49[v55.type]:v401.dtype; +v403=!!v55.normalized; +v402=v55.size|0; +v405=v55.offset|0; +v406=v55.stride|0; +v407=v55.divisor|0; +} +} +v409=g408.state; +g408.state=v396; +v410=g408.x; +g408.x=v397; +v411=g408.y; +g408.y=v398; +v412=g408.z; +g408.z=v399; +v413=g408.w; +g408.w=v400; +v414=g408.buffer; +g408.buffer=v401; +v415=g408.size; +g408.size=v402; +v416=g408.normalized; +g408.normalized=v403; +v417=g408.type; +g408.type=v404; +v418=g408.offset; +g408.offset=v405; +v419=g408.stride; +g408.stride=v406; +v420=g408.divisor; +g408.divisor=v407; +v421=g187.call(this,v2,a0,a2); +v57.offset=v421; +if(!(v57&&(typeof v57==="object"||typeof v57==="function")&&(v16(v57)||v8.getBuffer(v57)||v8.getBuffer(v57.buffer)||v16(v57.buffer)||("constant" in v57&&(typeof v57.constant==="number"||v17(v57.constant))))))g18.commandRaise(g189,g19); +v422=false; +v423=1; +v424=0; +v425=0; +v426=0; +v427=0; +v428=null; +v429=0; +v430=false; +v431=5126; +v432=0; +v433=0; +v434=0; +if(v16(v57)){ +v422=true; +v428=v8.createStream(34962,v57); +v431=v428.dtype; +} +else{ +v428=v8.getBuffer(v57); +if(v428){ +v431=v428.dtype; +} +else if("constant" in v57){ +v423=2; +if(typeof v57.constant === "number"){ +v424=v57.constant; +v425=v426=v427=0; +} +else{ +v424=v57.constant.length>0?v57.constant[0]:0; +v425=v57.constant.length>1?v57.constant[1]:0; +v426=v57.constant.length>2?v57.constant[2]:0; +v427=v57.constant.length>3?v57.constant[3]:0; +} +} +else{ +if(v16(v57.buffer)){ +v428=v8.createStream(34962,v57.buffer); +} +else{ +v428=v8.getBuffer(v57.buffer); +} +v431="type" in v57?v49[v57.type]:v428.dtype; +v430=!!v57.normalized; +v429=v57.size|0; +v432=v57.offset|0; +v433=v57.stride|0; +v434=v57.divisor|0; +} +} +v436=g435.state; +g435.state=v423; +v437=g435.x; +g435.x=v424; +v438=g435.y; +g435.y=v425; +v439=g435.z; +g435.z=v426; +v440=g435.w; +g435.w=v427; +v441=g435.buffer; +g435.buffer=v428; +v442=g435.size; +g435.size=v429; +v443=g435.normalized; +g435.normalized=v430; +v444=g435.type; +g435.type=v431; +v445=g435.offset; +g435.offset=v432; +v446=g435.stride; +g435.stride=v433; +v447=g435.divisor; +g435.divisor=v434; +v448=g144.call(this,v2,a0,a2); +v59.offset=v448; +if(!(v59&&(typeof v59==="object"||typeof v59==="function")&&(v16(v59)||v8.getBuffer(v59)||v8.getBuffer(v59.buffer)||v16(v59.buffer)||("constant" in v59&&(typeof v59.constant==="number"||v17(v59.constant))))))g18.commandRaise(g146,g19); +v449=false; +v450=1; +v451=0; +v452=0; +v453=0; +v454=0; +v455=null; +v456=0; +v457=false; +v458=5126; +v459=0; +v460=0; +v461=0; +if(v16(v59)){ +v449=true; +v455=v8.createStream(34962,v59); +v458=v455.dtype; +} +else{ +v455=v8.getBuffer(v59); +if(v455){ +v458=v455.dtype; +} +else if("constant" in v59){ +v450=2; +if(typeof v59.constant === "number"){ +v451=v59.constant; +v452=v453=v454=0; +} +else{ +v451=v59.constant.length>0?v59.constant[0]:0; +v452=v59.constant.length>1?v59.constant[1]:0; +v453=v59.constant.length>2?v59.constant[2]:0; +v454=v59.constant.length>3?v59.constant[3]:0; +} +} +else{ +if(v16(v59.buffer)){ +v455=v8.createStream(34962,v59.buffer); +} +else{ +v455=v8.getBuffer(v59.buffer); +} +v458="type" in v59?v49[v59.type]:v455.dtype; +v457=!!v59.normalized; +v456=v59.size|0; +v459=v59.offset|0; +v460=v59.stride|0; +v461=v59.divisor|0; +} +} +v463=g462.state; +g462.state=v450; +v464=g462.x; +g462.x=v451; +v465=g462.y; +g462.y=v452; +v466=g462.z; +g462.z=v453; +v467=g462.w; +g462.w=v454; +v468=g462.buffer; +g462.buffer=v455; +v469=g462.size; +g462.size=v456; +v470=g462.normalized; +g462.normalized=v457; +v471=g462.type; +g462.type=v458; +v472=g462.offset; +g462.offset=v459; +v473=g462.stride; +g462.stride=v460; +v474=g462.divisor; +g462.divisor=v461; +v476=v9.vert; +v9.vert=g475; +v478=v9.frag; +v9.frag=g477; +v5.dirty=true; +a1(v2,a0,a2); +v2.viewportWidth=v252; +v2.viewportHeight=v253; +v42[0]=v254; +v42[1]=v255; +v42[2]=v256; +v42[3]=v257; +v20[0]=v259; +v20[1]=v261; +v20[2]=v263; +v20[3]=v265; +v4.blend_enable=v267; +v22[0]=v269; +v22[1]=v271; +v24[0]=v273; +v24[1]=v275; +v24[2]=v277; +v24[3]=v279; +v4.depth_enable=v281; +v40[0]=v287; +v40[1]=v288; +v40[2]=v289; +v40[3]=v290; +v4.scissor_enable=v292; +if(v293){ +g52.cpuTime+=performance.now()-v294; +} +v6.count=v296; +v6.instances=v298; +v6.primitive=v300; +v12[g302]=v303; +v12[g305]=v306; +v12[g308]=v309; +v12[g311]=v312; +v12[g314]=v315; +v12[g317]=v318; +v12[g320]=v321; +v12[g323]=v324; +v12[g326]=v327; +g328.state=v329; +g328.x=v330; +g328.y=v331; +g328.z=v332; +g328.w=v333; +g328.buffer=v334; +g328.size=v335; +g328.normalized=v336; +g328.type=v337; +g328.offset=v338; +g328.stride=v339; +g328.divisor=v340; +g341.state=v342; +g341.x=v343; +g341.y=v344; +g341.z=v345; +g341.w=v346; +g341.buffer=v347; +g341.size=v348; +g341.normalized=v349; +g341.type=v350; +g341.offset=v351; +g341.stride=v352; +g341.divisor=v353; +g354.state=v355; +g354.x=v356; +g354.y=v357; +g354.z=v358; +g354.w=v359; +g354.buffer=v360; +g354.size=v361; +g354.normalized=v362; +g354.type=v363; +g354.offset=v364; +g354.stride=v365; +g354.divisor=v366; +if(v368){ +v8.destroyStream(v374); +} +g381.state=v382; +g381.x=v383; +g381.y=v384; +g381.z=v385; +g381.w=v386; +g381.buffer=v387; +g381.size=v388; +g381.normalized=v389; +g381.type=v390; +g381.offset=v391; +g381.stride=v392; +g381.divisor=v393; +if(v395){ +v8.destroyStream(v401); +} +g408.state=v409; +g408.x=v410; +g408.y=v411; +g408.z=v412; +g408.w=v413; +g408.buffer=v414; +g408.size=v415; +g408.normalized=v416; +g408.type=v417; +g408.offset=v418; +g408.stride=v419; +g408.divisor=v420; +if(v422){ +v8.destroyStream(v428); +} +g435.state=v436; +g435.x=v437; +g435.y=v438; +g435.z=v439; +g435.w=v440; +g435.buffer=v441; +g435.size=v442; +g435.normalized=v443; +g435.type=v444; +g435.offset=v445; +g435.stride=v446; +g435.divisor=v447; +if(v449){ +v8.destroyStream(v455); +} +g462.state=v463; +g462.x=v464; +g462.y=v465; +g462.z=v466; +g462.w=v467; +g462.buffer=v468; +g462.size=v469; +g462.normalized=v470; +g462.type=v471; +g462.offset=v472; +g462.stride=v473; +g462.divisor=v474; +v9.vert=v476; +v9.frag=v478; +v5.dirty=true; +} +,"batch":function(a0,a1){ +var v479,v480,v517,v518,v519,v520,v521; +v479=v14.angle_instanced_arrays; +v480=v13.next; +if(v480!==v13.cur){ +if(v480){ +v1.bindFramebuffer(36160,v480.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v480; +} +if(v5.dirty){ +var v481,v482,v483,v484,v485,v486,v487,v488,v489,v490,v491,v492,v493,v494,v495,v496,v497,v498,v499,v500,v501,v502,v503,v504,v505,v506,v507,v508,v509,v510,v511,v512,v513; +v481=v4.dither; +if(v481!==v5.dither){ +if(v481){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v481; +} +v482=v4.depth_func; +if(v482!==v5.depth_func){ +v1.depthFunc(v482); +v5.depth_func=v482; +} +v483=v26[0]; +v484=v26[1]; +if(v483!==v27[0]||v484!==v27[1]){ +v1.depthRange(v483,v484); +v27[0]=v483; +v27[1]=v484; +} +v485=v4.depth_mask; +if(v485!==v5.depth_mask){ +v1.depthMask(v485); +v5.depth_mask=v485; +} +v486=v28[0]; +v487=v28[1]; +v488=v28[2]; +v489=v28[3]; +if(v486!==v29[0]||v487!==v29[1]||v488!==v29[2]||v489!==v29[3]){ +v1.colorMask(v486,v487,v488,v489); +v29[0]=v486; +v29[1]=v487; +v29[2]=v488; +v29[3]=v489; +} +v490=v4.cull_enable; +if(v490!==v5.cull_enable){ +if(v490){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v490; +} +v491=v4.cull_face; +if(v491!==v5.cull_face){ +v1.cullFace(v491); +v5.cull_face=v491; +} +v492=v4.frontFace; +if(v492!==v5.frontFace){ +v1.frontFace(v492); +v5.frontFace=v492; +} +v493=v4.lineWidth; +if(v493!==v5.lineWidth){ +v1.lineWidth(v493); +v5.lineWidth=v493; +} +v494=v4.polygonOffset_enable; +if(v494!==v5.polygonOffset_enable){ +if(v494){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v494; +} +v495=v30[0]; +v496=v30[1]; +if(v495!==v31[0]||v496!==v31[1]){ +v1.polygonOffset(v495,v496); +v31[0]=v495; +v31[1]=v496; +} +v497=v4.sample_alpha; +if(v497!==v5.sample_alpha){ +if(v497){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v497; +} +v498=v4.sample_enable; +if(v498!==v5.sample_enable){ +if(v498){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v498; +} +v499=v32[0]; +v500=v32[1]; +if(v499!==v33[0]||v500!==v33[1]){ +v1.sampleCoverage(v499,v500); +v33[0]=v499; +v33[1]=v500; +} +v501=v4.stencil_enable; +if(v501!==v5.stencil_enable){ +if(v501){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=v501; +} +v502=v4.stencil_mask; +if(v502!==v5.stencil_mask){ +v1.stencilMask(v502); +v5.stencil_mask=v502; +} +v503=v34[0]; +v504=v34[1]; +v505=v34[2]; +if(v503!==v35[0]||v504!==v35[1]||v505!==v35[2]){ +v1.stencilFunc(v503,v504,v505); +v35[0]=v503; +v35[1]=v504; +v35[2]=v505; +} +v506=v36[0]; +v507=v36[1]; +v508=v36[2]; +v509=v36[3]; +if(v506!==v37[0]||v507!==v37[1]||v508!==v37[2]||v509!==v37[3]){ +v1.stencilOpSeparate(v506,v507,v508,v509); +v37[0]=v506; +v37[1]=v507; +v37[2]=v508; +v37[3]=v509; +} +v510=v38[0]; +v511=v38[1]; +v512=v38[2]; +v513=v38[3]; +if(v510!==v39[0]||v511!==v39[1]||v512!==v39[2]||v513!==v39[3]){ +v1.stencilOpSeparate(v510,v511,v512,v513); +v39[0]=v510; +v39[1]=v511; +v39[2]=v512; +v39[3]=v513; +} +} +v1.blendColor(0,0,0,0); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=0; +if(g514){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g514; +v1.blendEquationSeparate(32774,32774); +v23[0]=32774; +v23[1]=32774; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +if(g515){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=g515; +if(g516){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g516; +v517=v5.profile; +if(v517){ +v518=performance.now(); +g52.count+=a1; +} +v1.useProgram(g115.program); +v519=v14.angle_instanced_arrays; +var v534,v535,v536,v537,v538,v539,v643,v644; +v11.setVAO(null); +v534=g118.location; +v535=v10[v534]; +if(!v535.buffer){ +v1.enableVertexAttribArray(v534); +} +if(v535.type!==5126||v535.size!==2||v535.buffer!==g117||v535.normalized!==false||v535.offset!==16||v535.stride!==24){ +v1.bindBuffer(34962,g117.buffer); +v1.vertexAttribPointer(v534,2,5126,false,24,16); +v535.type=5126; +v535.size=2; +v535.buffer=g117; +v535.normalized=false; +v535.offset=16; +v535.stride=24; +} +if(v535.divisor!==0){ +v519.vertexAttribDivisorANGLE(v534,0); +v535.divisor=0; +} +v536=g141.location; +v537=v10[v536]; +if(!v537.buffer){ +v1.enableVertexAttribArray(v536); +} +if(v537.type!==5126||v537.size!==2||v537.buffer!==g117||v537.normalized!==false||v537.offset!==0||v537.stride!==24){ +v1.bindBuffer(34962,g117.buffer); +v1.vertexAttribPointer(v536,2,5126,false,24,0); +v537.type=5126; +v537.size=2; +v537.buffer=g117; +v537.normalized=false; +v537.offset=0; +v537.stride=24; +} +if(v537.divisor!==0){ +v519.vertexAttribDivisorANGLE(v536,0); +v537.divisor=0; +} +v538=g164.location; +v539=v10[v538]; +if(!v539.buffer){ +v1.enableVertexAttribArray(v538); +} +if(v539.type!==5126||v539.size!==2||v539.buffer!==g117||v539.normalized!==false||v539.offset!==8||v539.stride!==24){ +v1.bindBuffer(34962,g117.buffer); +v1.vertexAttribPointer(v538,2,5126,false,24,8); +v539.type=5126; +v539.size=2; +v539.buffer=g117; +v539.normalized=false; +v539.offset=8; +v539.stride=24; +} +if(v539.divisor!==0){ +v519.vertexAttribDivisorANGLE(v538,0); +v539.divisor=0; +} +v643=v6.elements; +if(v643){ +v1.bindBuffer(34963,v643.buffer.buffer); +} +else if(v11.currentVAO){ +v643=v7.getElements(v11.currentVAO.elements); +if(v643)v1.bindBuffer(34963,v643.buffer.buffer); +} +v644=v6.offset; +for(v520=0; +v520=0&&v526>=0))g18.commandRaise(g97,g19); +v527=v2.viewportWidth; +v2.viewportWidth=v525; +v528=v2.viewportHeight; +v2.viewportHeight=v526; +v1.viewport(v523,v524,v525,v526); +v43[0]=v523; +v43[1]=v524; +v43[2]=v525; +v43[3]=v526; +v529=v521["viewport"]; +if(!(v529&&typeof v529==="object"))g18.commandRaise(g107,g19); +v530=v529.x|0; +v531=v529.y|0; +v532="width" in v529?v529.width|0:(v2.framebufferWidth-v530); +v533="height" in v529?v529.height|0:(v2.framebufferHeight-v531); +if(!(v532>=0&&v533>=0))g18.commandRaise(g107,g19); +v1.scissor(v530,v531,v532,v533); +v41[0]=v530; +v41[1]=v531; +v41[2]=v532; +v41[3]=v533; +v540=g121.call(this,v2,v521,v520); +v53.offset=v540; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g123,g19); +v541=false; +v542=1; +v543=0; +v544=0; +v545=0; +v546=0; +v547=null; +v548=0; +v549=false; +v550=5126; +v551=0; +v552=0; +v553=0; +if(v16(v53)){ +v541=true; +v547=v8.createStream(34962,v53); +v550=v547.dtype; +} +else{ +v547=v8.getBuffer(v53); +if(v547){ +v550=v547.dtype; +} +else if("constant" in v53){ +v542=2; +if(typeof v53.constant === "number"){ +v543=v53.constant; +v544=v545=v546=0; +} +else{ +v543=v53.constant.length>0?v53.constant[0]:0; +v544=v53.constant.length>1?v53.constant[1]:0; +v545=v53.constant.length>2?v53.constant[2]:0; +v546=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v547=v8.createStream(34962,v53.buffer); +} +else{ +v547=v8.getBuffer(v53.buffer); +} +v550="type" in v53?v49[v53.type]:v547.dtype; +v549=!!v53.normalized; +v548=v53.size|0; +v551=v53.offset|0; +v552=v53.stride|0; +v553=v53.divisor|0; +} +} +v554=g137.location; +v555=v10[v554]; +if(v542===1){ +if(!v555.buffer){ +v1.enableVertexAttribArray(v554); +} +v556=v548||4; +if(v555.type!==v550||v555.size!==v556||v555.buffer!==v547||v555.normalized!==v549||v555.offset!==v551||v555.stride!==v552){ +v1.bindBuffer(34962,v547.buffer); +v1.vertexAttribPointer(v554,v556,v550,v549,v552,v551); +v555.type=v550; +v555.size=v556; +v555.buffer=v547; +v555.normalized=v549; +v555.offset=v551; +v555.stride=v552; +} +if(v555.divisor!==v553){ +v519.vertexAttribDivisorANGLE(v554,v553); +v555.divisor=v553; +} +} +else{ +if(v555.buffer){ +v1.disableVertexAttribArray(v554); +v555.buffer=null; +} +if(v555.x!==v543||v555.y!==v544||v555.z!==v545||v555.w!==v546){ +v1.vertexAttrib4f(v554,v543,v544,v545,v546); +v555.x=v543; +v555.y=v544; +v555.z=v545; +v555.w=v546; +} +} +v557=g144.call(this,v2,v521,v520); +v59.offset=v557; +if(!(v59&&(typeof v59==="object"||typeof v59==="function")&&(v16(v59)||v8.getBuffer(v59)||v8.getBuffer(v59.buffer)||v16(v59.buffer)||("constant" in v59&&(typeof v59.constant==="number"||v17(v59.constant))))))g18.commandRaise(g146,g19); +v558=false; +v559=1; +v560=0; +v561=0; +v562=0; +v563=0; +v564=null; +v565=0; +v566=false; +v567=5126; +v568=0; +v569=0; +v570=0; +if(v16(v59)){ +v558=true; +v564=v8.createStream(34962,v59); +v567=v564.dtype; +} +else{ +v564=v8.getBuffer(v59); +if(v564){ +v567=v564.dtype; +} +else if("constant" in v59){ +v559=2; +if(typeof v59.constant === "number"){ +v560=v59.constant; +v561=v562=v563=0; +} +else{ +v560=v59.constant.length>0?v59.constant[0]:0; +v561=v59.constant.length>1?v59.constant[1]:0; +v562=v59.constant.length>2?v59.constant[2]:0; +v563=v59.constant.length>3?v59.constant[3]:0; +} +} +else{ +if(v16(v59.buffer)){ +v564=v8.createStream(34962,v59.buffer); +} +else{ +v564=v8.getBuffer(v59.buffer); +} +v567="type" in v59?v49[v59.type]:v564.dtype; +v566=!!v59.normalized; +v565=v59.size|0; +v568=v59.offset|0; +v569=v59.stride|0; +v570=v59.divisor|0; +} +} +v571=g160.location; +v572=v10[v571]; +if(v559===1){ +if(!v572.buffer){ +v1.enableVertexAttribArray(v571); +} +v573=v565||4; +if(v572.type!==v567||v572.size!==v573||v572.buffer!==v564||v572.normalized!==v566||v572.offset!==v568||v572.stride!==v569){ +v1.bindBuffer(34962,v564.buffer); +v1.vertexAttribPointer(v571,v573,v567,v566,v569,v568); +v572.type=v567; +v572.size=v573; +v572.buffer=v564; +v572.normalized=v566; +v572.offset=v568; +v572.stride=v569; +} +if(v572.divisor!==v570){ +v519.vertexAttribDivisorANGLE(v571,v570); +v572.divisor=v570; +} +} +else{ +if(v572.buffer){ +v1.disableVertexAttribArray(v571); +v572.buffer=null; +} +if(v572.x!==v560||v572.y!==v561||v572.z!==v562||v572.w!==v563){ +v1.vertexAttrib4f(v571,v560,v561,v562,v563); +v572.x=v560; +v572.y=v561; +v572.z=v562; +v572.w=v563; +} +} +v574=g167.call(this,v2,v521,v520); +v55.offset=v574; +if(!(v55&&(typeof v55==="object"||typeof v55==="function")&&(v16(v55)||v8.getBuffer(v55)||v8.getBuffer(v55.buffer)||v16(v55.buffer)||("constant" in v55&&(typeof v55.constant==="number"||v17(v55.constant))))))g18.commandRaise(g169,g19); +v575=false; +v576=1; +v577=0; +v578=0; +v579=0; +v580=0; +v581=null; +v582=0; +v583=false; +v584=5126; +v585=0; +v586=0; +v587=0; +if(v16(v55)){ +v575=true; +v581=v8.createStream(34962,v55); +v584=v581.dtype; +} +else{ +v581=v8.getBuffer(v55); +if(v581){ +v584=v581.dtype; +} +else if("constant" in v55){ +v576=2; +if(typeof v55.constant === "number"){ +v577=v55.constant; +v578=v579=v580=0; +} +else{ +v577=v55.constant.length>0?v55.constant[0]:0; +v578=v55.constant.length>1?v55.constant[1]:0; +v579=v55.constant.length>2?v55.constant[2]:0; +v580=v55.constant.length>3?v55.constant[3]:0; +} +} +else{ +if(v16(v55.buffer)){ +v581=v8.createStream(34962,v55.buffer); +} +else{ +v581=v8.getBuffer(v55.buffer); +} +v584="type" in v55?v49[v55.type]:v581.dtype; +v583=!!v55.normalized; +v582=v55.size|0; +v585=v55.offset|0; +v586=v55.stride|0; +v587=v55.divisor|0; +} +} +v588=g183.location; +v589=v10[v588]; +if(v576===1){ +if(!v589.buffer){ +v1.enableVertexAttribArray(v588); +} +v590=v582||2; +if(v589.type!==v584||v589.size!==v590||v589.buffer!==v581||v589.normalized!==v583||v589.offset!==v585||v589.stride!==v586){ +v1.bindBuffer(34962,v581.buffer); +v1.vertexAttribPointer(v588,v590,v584,v583,v586,v585); +v589.type=v584; +v589.size=v590; +v589.buffer=v581; +v589.normalized=v583; +v589.offset=v585; +v589.stride=v586; +} +if(v589.divisor!==v587){ +v519.vertexAttribDivisorANGLE(v588,v587); +v589.divisor=v587; +} +} +else{ +if(v589.buffer){ +v1.disableVertexAttribArray(v588); +v589.buffer=null; +} +if(v589.x!==v577||v589.y!==v578||v589.z!==v579||v589.w!==v580){ +v1.vertexAttrib4f(v588,v577,v578,v579,v580); +v589.x=v577; +v589.y=v578; +v589.z=v579; +v589.w=v580; +} +} +v591=g187.call(this,v2,v521,v520); +v57.offset=v591; +if(!(v57&&(typeof v57==="object"||typeof v57==="function")&&(v16(v57)||v8.getBuffer(v57)||v8.getBuffer(v57.buffer)||v16(v57.buffer)||("constant" in v57&&(typeof v57.constant==="number"||v17(v57.constant))))))g18.commandRaise(g189,g19); +v592=false; +v593=1; +v594=0; +v595=0; +v596=0; +v597=0; +v598=null; +v599=0; +v600=false; +v601=5126; +v602=0; +v603=0; +v604=0; +if(v16(v57)){ +v592=true; +v598=v8.createStream(34962,v57); +v601=v598.dtype; +} +else{ +v598=v8.getBuffer(v57); +if(v598){ +v601=v598.dtype; +} +else if("constant" in v57){ +v593=2; +if(typeof v57.constant === "number"){ +v594=v57.constant; +v595=v596=v597=0; +} +else{ +v594=v57.constant.length>0?v57.constant[0]:0; +v595=v57.constant.length>1?v57.constant[1]:0; +v596=v57.constant.length>2?v57.constant[2]:0; +v597=v57.constant.length>3?v57.constant[3]:0; +} +} +else{ +if(v16(v57.buffer)){ +v598=v8.createStream(34962,v57.buffer); +} +else{ +v598=v8.getBuffer(v57.buffer); +} +v601="type" in v57?v49[v57.type]:v598.dtype; +v600=!!v57.normalized; +v599=v57.size|0; +v602=v57.offset|0; +v603=v57.stride|0; +v604=v57.divisor|0; +} +} +v605=g203.location; +v606=v10[v605]; +if(v593===1){ +if(!v606.buffer){ +v1.enableVertexAttribArray(v605); +} +v607=v599||2; +if(v606.type!==v601||v606.size!==v607||v606.buffer!==v598||v606.normalized!==v600||v606.offset!==v602||v606.stride!==v603){ +v1.bindBuffer(34962,v598.buffer); +v1.vertexAttribPointer(v605,v607,v601,v600,v603,v602); +v606.type=v601; +v606.size=v607; +v606.buffer=v598; +v606.normalized=v600; +v606.offset=v602; +v606.stride=v603; +} +if(v606.divisor!==v604){ +v519.vertexAttribDivisorANGLE(v605,v604); +v606.divisor=v604; +} +} +else{ +if(v606.buffer){ +v1.disableVertexAttribArray(v605); +v606.buffer=null; +} +if(v606.x!==v594||v606.y!==v595||v606.z!==v596||v606.w!==v597){ +v1.vertexAttrib4f(v605,v594,v595,v596,v597); +v606.x=v594; +v606.y=v595; +v606.z=v596; +v606.w=v597; +} +} +v608=v521["capSize"]; +if(!(typeof v608==="number"))g18.commandRaise(g209,g19); +if(!v520||v609!==v608){ +v609=v608; +v1.uniform1f(g207.location,v608); +} +v610=v521["lineWidth"]; +if(!(typeof v610==="number"))g18.commandRaise(g212,g19); +if(!v520||v611!==v610){ +v611=v610; +v1.uniform1f(g210.location,v610); +} +v612=v521["opacity"]; +if(!(typeof v612==="number"))g18.commandRaise(g215,g19); +if(!v520||v613!==v612){ +v613=v612; +v1.uniform1f(g213.location,v612); +} +v614=v521["scale"]; +if(!(v17(v614)&&v614.length===2))g18.commandRaise(g218,g19); +v615=v614[0]; +v617=v614[1]; +if(!v520||v616!==v615||v618!==v617){ +v616=v615; +v618=v617; +v1.uniform2f(g216.location,v615,v617); +} +v619=v521["scaleFract"]; +if(!(v17(v619)&&v619.length===2))g18.commandRaise(g223,g19); +v620=v619[0]; +v622=v619[1]; +if(!v520||v621!==v620||v623!==v622){ +v621=v620; +v623=v622; +v1.uniform2f(g221.location,v620,v622); +} +v624=v521["translate"]; +if(!(v17(v624)&&v624.length===2))g18.commandRaise(g228,g19); +v625=v624[0]; +v627=v624[1]; +if(!v520||v626!==v625||v628!==v627){ +v626=v625; +v628=v627; +v1.uniform2f(g226.location,v625,v627); +} +v629=v521["translateFract"]; +if(!(v17(v629)&&v629.length===2))g18.commandRaise(g233,g19); +v630=v629[0]; +v632=v629[1]; +if(!v520||v631!==v630||v633!==v632){ +v631=v630; +v633=v632; +v1.uniform2f(g231.location,v630,v632); +} +v634=g237.call(this,v2,v521,v520); +if(!(v17(v634)&&v634.length===4))g18.commandRaise(g239,g19); +v635=v634[0]; +v637=v634[1]; +v639=v634[2]; +v641=v634[3]; +if(!v520||v636!==v635||v638!==v637||v640!==v639||v642!==v641){ +v636=v635; +v638=v637; +v640=v639; +v642=v641; +v1.uniform4f(g236.location,v635,v637,v639,v641); +} +v645=v521["count"]; +if(v645>0){ +if(v643){ +v519.drawElementsInstancedANGLE(4,36,v643.type,v644<<((v643.type-5121)>>1),v645); +} +else{ +v519.drawArraysInstancedANGLE(4,v644,36,v645); +} +} +else if(v645<0){ +if(v643){ +v1.drawElements(4,36,v643.type,v644<<((v643.type-5121)>>1)); +} +else{ +v1.drawArrays(4,v644,36); +} +} +v2.viewportWidth=v527; +v2.viewportHeight=v528; +if(v541){ +v8.destroyStream(v547); +} +if(v558){ +v8.destroyStream(v564); +} +if(v575){ +v8.destroyStream(v581); +} +if(v592){ +v8.destroyStream(v598); +} +} +v5.dirty=true; +v11.setVAO(null); +if(v517){ +g52.cpuTime+=performance.now()-v518; +} +} +,} + +} \ No newline at end of file diff --git a/src/generated/regl-codegen/7c8e7f36e693904898ece5f7f8b49b23c69d98397567c3915a45647209eb7da4 b/src/generated/regl-codegen/7c8e7f36e693904898ece5f7f8b49b23c69d98397567c3915a45647209eb7da4 new file mode 100644 index 00000000000..b0b526f358e --- /dev/null +++ b/src/generated/regl-codegen/7c8e7f36e693904898ece5f7f8b49b23c69d98397567c3915a45647209eb7da4 @@ -0,0 +1,2052 @@ +module.exports = function anonymous(g0,g18,g19,g52,g97,g104,g105,g106,g109,g112,g126,g131,g145,g150,g164,g169,g183,g187,g189,g190,g191,g193,g195,g196,g198,g201,g202,g204,g207,g209,g210,g211,g213,g214,g216,g221,g222,g224,g225,g227,g228,g230,g233,g235,g238,g240,g243,g245,g252,g254,g267,g269,g271,g273,g275,g277,g279,g281,g283,g285,g287,g295,g298,g301,g304,g307,g310,g313,g316,g319,g322,g325,g328,g331,g334,g350,g377,g404,g431,g444,g446,g496,g497,g498 +) { +"use strict"; +var v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v53,v54; +v1=g0.gl; +v2=g0.context; +v3=g0.strings; +v4=g0.next; +v5=g0.current; +v6=g0.draw; +v7=g0.elements; +v8=g0.buffer; +v9=g0.shader; +v10=g0.attributes; +v11=g0.vao; +v12=g0.uniforms; +v13=g0.framebuffer; +v14=g0.extensions; +v15=g0.timer; +v16=g0.isBufferArgs; +v17=g0.isArrayLike; +v20=v4.blend_color; +v21=v5.blend_color; +v22=v4.blend_equation; +v23=v5.blend_equation; +v24=v4.blend_func; +v25=v5.blend_func; +v26=v4.depth_range; +v27=v5.depth_range; +v28=v4.colorMask; +v29=v5.colorMask; +v30=v4.polygonOffset_offset; +v31=v5.polygonOffset_offset; +v32=v4.sample_coverage; +v33=v5.sample_coverage; +v34=v4.stencil_func; +v35=v5.stencil_func; +v36=v4.stencil_opFront; +v37=v5.stencil_opFront; +v38=v4.stencil_opBack; +v39=v5.stencil_opBack; +v40=v4.scissor_box; +v41=v5.scissor_box; +v42=v4.viewport; +v43=v5.viewport; +v44={ +"points":0,"point":0,"lines":1,"line":1,"triangles":4,"triangle":4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6} +; +v45={ +"never":512,"less":513,"<":513,"equal":514,"=":514,"==":514,"===":514,"lequal":515,"<=":515,"greater":516,">":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +v53={ +} +; +v53.offset=4; +v53.stride=8; +v54={ +} +; +v54.offset=0; +v54.stride=8; +return { +"draw":function(a0){ +var v55,v56,v96,v98,v99,v100,v101,v102,v103,v107,v108,v110,v111,v113,v114,v115,v116,v117,v118,v119,v120,v121,v122,v123,v124,v125,v127,v128,v129,v130,v132,v133,v134,v135,v136,v137,v138,v139,v140,v141,v142,v143,v144,v146,v147,v148,v149,v151,v152,v153,v154,v155,v156,v157,v158,v159,v160,v161,v162,v163,v165,v166,v167,v168,v170,v171,v172,v173,v174,v175,v176,v177,v178,v179,v180,v181,v182,v184,v185,v186,v188,v192,v194,v197,v199,v200,v203,v205,v206,v208,v212,v215,v217,v218,v219,v220,v223,v226,v229,v231,v232,v234,v236,v237,v239,v241,v242,v244,v246,v247,v248,v249,v250,v251,v253,v255; +v55=v14.angle_instanced_arrays; +v56=v13.next; +if(v56!==v13.cur){ +if(v56){ +v1.bindFramebuffer(36160,v56.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v56; +} +if(v5.dirty){ +var v57,v58,v59,v60,v61,v62,v63,v64,v65,v66,v67,v68,v69,v70,v71,v72,v73,v74,v75,v76,v77,v78,v79,v80,v81,v82,v83,v84,v85,v86,v87,v88,v89,v90,v91,v92,v93,v94,v95; +v57=v4.dither; +if(v57!==v5.dither){ +if(v57){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v57; +} +v58=v22[0]; +v59=v22[1]; +if(v58!==v23[0]||v59!==v23[1]){ +v1.blendEquationSeparate(v58,v59); +v23[0]=v58; +v23[1]=v59; +} +v60=v4.depth_func; +if(v60!==v5.depth_func){ +v1.depthFunc(v60); +v5.depth_func=v60; +} +v61=v26[0]; +v62=v26[1]; +if(v61!==v27[0]||v62!==v27[1]){ +v1.depthRange(v61,v62); +v27[0]=v61; +v27[1]=v62; +} +v63=v4.depth_mask; +if(v63!==v5.depth_mask){ +v1.depthMask(v63); +v5.depth_mask=v63; +} +v64=v28[0]; +v65=v28[1]; +v66=v28[2]; +v67=v28[3]; +if(v64!==v29[0]||v65!==v29[1]||v66!==v29[2]||v67!==v29[3]){ +v1.colorMask(v64,v65,v66,v67); +v29[0]=v64; +v29[1]=v65; +v29[2]=v66; +v29[3]=v67; +} +v68=v4.cull_enable; +if(v68!==v5.cull_enable){ +if(v68){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v68; +} +v69=v4.cull_face; +if(v69!==v5.cull_face){ +v1.cullFace(v69); +v5.cull_face=v69; +} +v70=v4.frontFace; +if(v70!==v5.frontFace){ +v1.frontFace(v70); +v5.frontFace=v70; +} +v71=v4.lineWidth; +if(v71!==v5.lineWidth){ +v1.lineWidth(v71); +v5.lineWidth=v71; +} +v72=v4.polygonOffset_enable; +if(v72!==v5.polygonOffset_enable){ +if(v72){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v72; +} +v73=v30[0]; +v74=v30[1]; +if(v73!==v31[0]||v74!==v31[1]){ +v1.polygonOffset(v73,v74); +v31[0]=v73; +v31[1]=v74; +} +v75=v4.sample_alpha; +if(v75!==v5.sample_alpha){ +if(v75){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v75; +} +v76=v4.sample_enable; +if(v76!==v5.sample_enable){ +if(v76){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v76; +} +v77=v32[0]; +v78=v32[1]; +if(v77!==v33[0]||v78!==v33[1]){ +v1.sampleCoverage(v77,v78); +v33[0]=v77; +v33[1]=v78; +} +v79=v4.stencil_mask; +if(v79!==v5.stencil_mask){ +v1.stencilMask(v79); +v5.stencil_mask=v79; +} +v80=v34[0]; +v81=v34[1]; +v82=v34[2]; +if(v80!==v35[0]||v81!==v35[1]||v82!==v35[2]){ +v1.stencilFunc(v80,v81,v82); +v35[0]=v80; +v35[1]=v81; +v35[2]=v82; +} +v83=v36[0]; +v84=v36[1]; +v85=v36[2]; +v86=v36[3]; +if(v83!==v37[0]||v84!==v37[1]||v85!==v37[2]||v86!==v37[3]){ +v1.stencilOpSeparate(v83,v84,v85,v86); +v37[0]=v83; +v37[1]=v84; +v37[2]=v85; +v37[3]=v86; +} +v87=v38[0]; +v88=v38[1]; +v89=v38[2]; +v90=v38[3]; +if(v87!==v39[0]||v88!==v39[1]||v89!==v39[2]||v90!==v39[3]){ +v1.stencilOpSeparate(v87,v88,v89,v90); +v39[0]=v87; +v39[1]=v88; +v39[2]=v89; +v39[3]=v90; +} +v91=v4.scissor_enable; +if(v91!==v5.scissor_enable){ +if(v91){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=v91; +} +v92=v40[0]; +v93=v40[1]; +v94=v40[2]; +v95=v40[3]; +if(v92!==v41[0]||v93!==v41[1]||v94!==v41[2]||v95!==v41[3]){ +v1.scissor(v92,v93,v94,v95); +v41[0]=v92; +v41[1]=v93; +v41[2]=v94; +v41[3]=v95; +} +} +v96=this["viewport"]; +if(!(v96&&typeof v96==="object"))g18.commandRaise(g97,g19); +v98=v96.x|0; +v99=v96.y|0; +v100="width" in v96?v96.width|0:(v2.framebufferWidth-v98); +v101="height" in v96?v96.height|0:(v2.framebufferHeight-v99); +if(!(v100>=0&&v101>=0))g18.commandRaise(g97,g19); +v102=v2.viewportWidth; +v2.viewportWidth=v100; +v103=v2.viewportHeight; +v2.viewportHeight=v101; +v1.viewport(v98,v99,v100,v101); +v43[0]=v98; +v43[1]=v99; +v43[2]=v100; +v43[3]=v101; +v1.blendColor(0,0,0,1); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=1; +if(g104){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g104; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +if(g105){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=g105; +if(g106){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=g106; +v107=v5.profile; +if(v107){ +v108=performance.now(); +g52.count++; +} +v1.useProgram(g109.program); +v110=v14.angle_instanced_arrays; +v11.setVAO(null); +v111=this["charBuffer"]; +if(!(v111&&(typeof v111==="object"||typeof v111==="function")&&(v16(v111)||v8.getBuffer(v111)||v8.getBuffer(v111.buffer)||v16(v111.buffer)||("constant" in v111&&(typeof v111.constant==="number"||v17(v111.constant))))))g18.commandRaise(g112,g19); +v113=false; +v114=1; +v115=0; +v116=0; +v117=0; +v118=0; +v119=null; +v120=0; +v121=false; +v122=5126; +v123=0; +v124=0; +v125=0; +if(v16(v111)){ +v113=true; +v119=v8.createStream(34962,v111); +v122=v119.dtype; +} +else{ +v119=v8.getBuffer(v111); +if(v119){ +v122=v119.dtype; +} +else if("constant" in v111){ +v114=2; +if(typeof v111.constant === "number"){ +v115=v111.constant; +v116=v117=v118=0; +} +else{ +v115=v111.constant.length>0?v111.constant[0]:0; +v116=v111.constant.length>1?v111.constant[1]:0; +v117=v111.constant.length>2?v111.constant[2]:0; +v118=v111.constant.length>3?v111.constant[3]:0; +} +} +else{ +if(v16(v111.buffer)){ +v119=v8.createStream(34962,v111.buffer); +} +else{ +v119=v8.getBuffer(v111.buffer); +} +v122="type" in v111?v49[v111.type]:v119.dtype; +v121=!!v111.normalized; +v120=v111.size|0; +v123=v111.offset|0; +v124=v111.stride|0; +v125=v111.divisor|0; +} +} +v127=g126.location; +v128=v10[v127]; +if(v114===1){ +if(!v128.buffer){ +v1.enableVertexAttribArray(v127); +} +v129=v120||1; +if(v128.type!==v122||v128.size!==v129||v128.buffer!==v119||v128.normalized!==v121||v128.offset!==v123||v128.stride!==v124){ +v1.bindBuffer(34962,v119.buffer); +v1.vertexAttribPointer(v127,v129,v122,v121,v124,v123); +v128.type=v122; +v128.size=v129; +v128.buffer=v119; +v128.normalized=v121; +v128.offset=v123; +v128.stride=v124; +} +if(v128.divisor!==v125){ +v110.vertexAttribDivisorANGLE(v127,v125); +v128.divisor=v125; +} +} +else{ +if(v128.buffer){ +v1.disableVertexAttribArray(v127); +v128.buffer=null; +} +if(v128.x!==v115||v128.y!==v116||v128.z!==v117||v128.w!==v118){ +v1.vertexAttrib4f(v127,v115,v116,v117,v118); +v128.x=v115; +v128.y=v116; +v128.z=v117; +v128.w=v118; +} +} +v130=this["sizeBuffer"]; +v53.buffer=v130; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g131,g19); +v132=false; +v133=1; +v134=0; +v135=0; +v136=0; +v137=0; +v138=null; +v139=0; +v140=false; +v141=5126; +v142=0; +v143=0; +v144=0; +if(v16(v53)){ +v132=true; +v138=v8.createStream(34962,v53); +v141=v138.dtype; +} +else{ +v138=v8.getBuffer(v53); +if(v138){ +v141=v138.dtype; +} +else if("constant" in v53){ +v133=2; +if(typeof v53.constant === "number"){ +v134=v53.constant; +v135=v136=v137=0; +} +else{ +v134=v53.constant.length>0?v53.constant[0]:0; +v135=v53.constant.length>1?v53.constant[1]:0; +v136=v53.constant.length>2?v53.constant[2]:0; +v137=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v138=v8.createStream(34962,v53.buffer); +} +else{ +v138=v8.getBuffer(v53.buffer); +} +v141="type" in v53?v49[v53.type]:v138.dtype; +v140=!!v53.normalized; +v139=v53.size|0; +v142=v53.offset|0; +v143=v53.stride|0; +v144=v53.divisor|0; +} +} +v146=g145.location; +v147=v10[v146]; +if(v133===1){ +if(!v147.buffer){ +v1.enableVertexAttribArray(v146); +} +v148=v139||1; +if(v147.type!==v141||v147.size!==v148||v147.buffer!==v138||v147.normalized!==v140||v147.offset!==v142||v147.stride!==v143){ +v1.bindBuffer(34962,v138.buffer); +v1.vertexAttribPointer(v146,v148,v141,v140,v143,v142); +v147.type=v141; +v147.size=v148; +v147.buffer=v138; +v147.normalized=v140; +v147.offset=v142; +v147.stride=v143; +} +if(v147.divisor!==v144){ +v110.vertexAttribDivisorANGLE(v146,v144); +v147.divisor=v144; +} +} +else{ +if(v147.buffer){ +v1.disableVertexAttribArray(v146); +v147.buffer=null; +} +if(v147.x!==v134||v147.y!==v135||v147.z!==v136||v147.w!==v137){ +v1.vertexAttrib4f(v146,v134,v135,v136,v137); +v147.x=v134; +v147.y=v135; +v147.z=v136; +v147.w=v137; +} +} +v149=this["position"]; +if(!(v149&&(typeof v149==="object"||typeof v149==="function")&&(v16(v149)||v8.getBuffer(v149)||v8.getBuffer(v149.buffer)||v16(v149.buffer)||("constant" in v149&&(typeof v149.constant==="number"||v17(v149.constant))))))g18.commandRaise(g150,g19); +v151=false; +v152=1; +v153=0; +v154=0; +v155=0; +v156=0; +v157=null; +v158=0; +v159=false; +v160=5126; +v161=0; +v162=0; +v163=0; +if(v16(v149)){ +v151=true; +v157=v8.createStream(34962,v149); +v160=v157.dtype; +} +else{ +v157=v8.getBuffer(v149); +if(v157){ +v160=v157.dtype; +} +else if("constant" in v149){ +v152=2; +if(typeof v149.constant === "number"){ +v153=v149.constant; +v154=v155=v156=0; +} +else{ +v153=v149.constant.length>0?v149.constant[0]:0; +v154=v149.constant.length>1?v149.constant[1]:0; +v155=v149.constant.length>2?v149.constant[2]:0; +v156=v149.constant.length>3?v149.constant[3]:0; +} +} +else{ +if(v16(v149.buffer)){ +v157=v8.createStream(34962,v149.buffer); +} +else{ +v157=v8.getBuffer(v149.buffer); +} +v160="type" in v149?v49[v149.type]:v157.dtype; +v159=!!v149.normalized; +v158=v149.size|0; +v161=v149.offset|0; +v162=v149.stride|0; +v163=v149.divisor|0; +} +} +v165=g164.location; +v166=v10[v165]; +if(v152===1){ +if(!v166.buffer){ +v1.enableVertexAttribArray(v165); +} +v167=v158||2; +if(v166.type!==v160||v166.size!==v167||v166.buffer!==v157||v166.normalized!==v159||v166.offset!==v161||v166.stride!==v162){ +v1.bindBuffer(34962,v157.buffer); +v1.vertexAttribPointer(v165,v167,v160,v159,v162,v161); +v166.type=v160; +v166.size=v167; +v166.buffer=v157; +v166.normalized=v159; +v166.offset=v161; +v166.stride=v162; +} +if(v166.divisor!==v163){ +v110.vertexAttribDivisorANGLE(v165,v163); +v166.divisor=v163; +} +} +else{ +if(v166.buffer){ +v1.disableVertexAttribArray(v165); +v166.buffer=null; +} +if(v166.x!==v153||v166.y!==v154||v166.z!==v155||v166.w!==v156){ +v1.vertexAttrib4f(v165,v153,v154,v155,v156); +v166.x=v153; +v166.y=v154; +v166.z=v155; +v166.w=v156; +} +} +v168=this["sizeBuffer"]; +v54.buffer=v168; +if(!(v54&&(typeof v54==="object"||typeof v54==="function")&&(v16(v54)||v8.getBuffer(v54)||v8.getBuffer(v54.buffer)||v16(v54.buffer)||("constant" in v54&&(typeof v54.constant==="number"||v17(v54.constant))))))g18.commandRaise(g169,g19); +v170=false; +v171=1; +v172=0; +v173=0; +v174=0; +v175=0; +v176=null; +v177=0; +v178=false; +v179=5126; +v180=0; +v181=0; +v182=0; +if(v16(v54)){ +v170=true; +v176=v8.createStream(34962,v54); +v179=v176.dtype; +} +else{ +v176=v8.getBuffer(v54); +if(v176){ +v179=v176.dtype; +} +else if("constant" in v54){ +v171=2; +if(typeof v54.constant === "number"){ +v172=v54.constant; +v173=v174=v175=0; +} +else{ +v172=v54.constant.length>0?v54.constant[0]:0; +v173=v54.constant.length>1?v54.constant[1]:0; +v174=v54.constant.length>2?v54.constant[2]:0; +v175=v54.constant.length>3?v54.constant[3]:0; +} +} +else{ +if(v16(v54.buffer)){ +v176=v8.createStream(34962,v54.buffer); +} +else{ +v176=v8.getBuffer(v54.buffer); +} +v179="type" in v54?v49[v54.type]:v176.dtype; +v178=!!v54.normalized; +v177=v54.size|0; +v180=v54.offset|0; +v181=v54.stride|0; +v182=v54.divisor|0; +} +} +v184=g183.location; +v185=v10[v184]; +if(v171===1){ +if(!v185.buffer){ +v1.enableVertexAttribArray(v184); +} +v186=v177||1; +if(v185.type!==v179||v185.size!==v186||v185.buffer!==v176||v185.normalized!==v178||v185.offset!==v180||v185.stride!==v181){ +v1.bindBuffer(34962,v176.buffer); +v1.vertexAttribPointer(v184,v186,v179,v178,v181,v180); +v185.type=v179; +v185.size=v186; +v185.buffer=v176; +v185.normalized=v178; +v185.offset=v180; +v185.stride=v181; +} +if(v185.divisor!==v182){ +v110.vertexAttribDivisorANGLE(v184,v182); +v185.divisor=v182; +} +} +else{ +if(v185.buffer){ +v1.disableVertexAttribArray(v184); +v185.buffer=null; +} +if(v185.x!==v172||v185.y!==v173||v185.z!==v174||v185.w!==v175){ +v1.vertexAttrib4f(v184,v172,v173,v174,v175); +v185.x=v172; +v185.y=v173; +v185.z=v174; +v185.w=v175; +} +} +v188=a0["align"]; +if(!(typeof v188==="number"))g18.commandRaise(g189,g19); +v1.uniform1f(g187.location,v188); +v192=g191.call(this,v2,a0,0); +if(v192&&v192._reglType==="framebuffer"){ +v192=v192.color[0]; +} +if(!(typeof v192==="function"&&v192._reglType==="texture2d"))g18.commandRaise(g193,g19); +v194=v192._texture; +v1.uniform1i(g190.location,v194.bind()); +v197=g196.call(this,v2,a0,0); +if(!(v17(v197)&&v197.length===2))g18.commandRaise(g198,g19); +v199=v197[0]; +v200=v197[1]; +v1.uniform2f(g195.location,v199,v200); +v203=g202.call(this,v2,a0,0); +if(!(v17(v203)&&v203.length===2))g18.commandRaise(g204,g19); +v205=v203[0]; +v206=v203[1]; +v1.uniform2f(g201.location,v205,v206); +v208=a0["baseline"]; +if(!(typeof v208==="number"))g18.commandRaise(g209,g19); +v1.uniform1f(g207.location,v208); +v212=g211.call(this,v2,a0,0); +if(!(typeof v212==="number"))g18.commandRaise(g213,g19); +v1.uniform1f(g210.location,v212); +v215=a0["color"]; +if(!(v17(v215)&&v215.length===4))g18.commandRaise(g216,g19); +v217=v215[0]; +v218=v215[1]; +v219=v215[2]; +v220=v215[3]; +v1.uniform4f(g214.location,v217,v218,v219,v220); +v223=g222.call(this,v2,a0,0); +if(!(typeof v223==="number"))g18.commandRaise(g224,g19); +v1.uniform1f(g221.location,v223); +v226=a0["opacity"]; +if(!(typeof v226==="number"))g18.commandRaise(g227,g19); +v1.uniform1f(g225.location,v226); +v229=a0["positionOffset"]; +if(!(v17(v229)&&v229.length===2))g18.commandRaise(g230,g19); +v231=v229[0]; +v232=v229[1]; +v1.uniform2f(g228.location,v231,v232); +v234=this["scale"]; +if(!(v17(v234)&&v234.length===2))g18.commandRaise(g235,g19); +v236=v234[0]; +v237=v234[1]; +v1.uniform2f(g233.location,v236,v237); +v239=this["translate"]; +if(!(v17(v239)&&v239.length===2))g18.commandRaise(g240,g19); +v241=v239[0]; +v242=v239[1]; +v1.uniform2f(g238.location,v241,v242); +v244=this["viewportArray"]; +if(!(v17(v244)&&v244.length===4))g18.commandRaise(g245,g19); +v246=v244[0]; +v247=v244[1]; +v248=v244[2]; +v249=v244[3]; +v1.uniform4f(g243.location,v246,v247,v248,v249); +v250=v6.elements; +if(v250){ +v1.bindBuffer(34963,v250.buffer.buffer); +} +else if(v11.currentVAO){ +v250=v7.getElements(v11.currentVAO.elements); +if(v250)v1.bindBuffer(34963,v250.buffer.buffer); +} +v251=a0["offset"]; +if(!(v251>=0))g18.commandRaise(g252,g19); +v253=a0["count"]; +if(!(typeof v253==="number"&&v253>=0&&v253===(v253|0)))g18.commandRaise(g254,g19); +if(v253){ +v255=v6.instances; +if(v255>0){ +if(v250){ +v110.drawElementsInstancedANGLE(0,v253,v250.type,v251<<((v250.type-5121)>>1),v255); +} +else{ +v110.drawArraysInstancedANGLE(0,v251,v253,v255); +} +} +else if(v255<0){ +if(v250){ +v1.drawElements(0,v253,v250.type,v251<<((v250.type-5121)>>1)); +} +else{ +v1.drawArrays(0,v251,v253); +} +} +v5.dirty=true; +v11.setVAO(null); +v2.viewportWidth=v102; +v2.viewportHeight=v103; +if(v107){ +g52.cpuTime+=performance.now()-v108; +} +if(v113){ +v8.destroyStream(v119); +} +if(v132){ +v8.destroyStream(v138); +} +if(v151){ +v8.destroyStream(v157); +} +if(v170){ +v8.destroyStream(v176); +} +v194.unbind(); +} +} +,"scope":function(a0,a1,a2){ +var v256,v257,v258,v259,v260,v261,v262,v263,v264,v265,v266,v268,v270,v272,v274,v276,v278,v280,v282,v284,v286,v288,v289,v290,v291,v292,v293,v294,v296,v297,v299,v300,v302,v303,v305,v306,v308,v309,v311,v312,v314,v315,v317,v318,v320,v321,v323,v324,v326,v327,v329,v330,v332,v333,v335,v336,v337,v338,v339,v340,v341,v342,v343,v344,v345,v346,v347,v348,v349,v351,v352,v353,v354,v355,v356,v357,v358,v359,v360,v361,v362,v363,v364,v365,v366,v367,v368,v369,v370,v371,v372,v373,v374,v375,v376,v378,v379,v380,v381,v382,v383,v384,v385,v386,v387,v388,v389,v390,v391,v392,v393,v394,v395,v396,v397,v398,v399,v400,v401,v402,v403,v405,v406,v407,v408,v409,v410,v411,v412,v413,v414,v415,v416,v417,v418,v419,v420,v421,v422,v423,v424,v425,v426,v427,v428,v429,v430,v432,v433,v434,v435,v436,v437,v438,v439,v440,v441,v442,v443,v445,v447; +v256=this["viewport"]; +if(!(v256&&typeof v256==="object"))g18.commandRaise(g97,g19); +v257=v256.x|0; +v258=v256.y|0; +v259="width" in v256?v256.width|0:(v2.framebufferWidth-v257); +v260="height" in v256?v256.height|0:(v2.framebufferHeight-v258); +if(!(v259>=0&&v260>=0))g18.commandRaise(g97,g19); +v261=v2.viewportWidth; +v2.viewportWidth=v259; +v262=v2.viewportHeight; +v2.viewportHeight=v260; +v263=v42[0]; +v42[0]=v257; +v264=v42[1]; +v42[1]=v258; +v265=v42[2]; +v42[2]=v259; +v266=v42[3]; +v42[3]=v260; +v268=v20[0]; +v20[0]=g267; +v270=v20[1]; +v20[1]=g269; +v272=v20[2]; +v20[2]=g271; +v274=v20[3]; +v20[3]=g273; +v276=v4.blend_enable; +v4.blend_enable=g275; +v278=v24[0]; +v24[0]=g277; +v280=v24[1]; +v24[1]=g279; +v282=v24[2]; +v24[2]=g281; +v284=v24[3]; +v24[3]=g283; +v286=v4.depth_enable; +v4.depth_enable=g285; +v288=v4.stencil_enable; +v4.stencil_enable=g287; +v289=v5.profile; +if(v289){ +v290=performance.now(); +g52.count++; +} +v291=a0["offset"]; +if(!(v291>=0))g18.commandRaise(g252,g19); +v292=v6.offset; +v6.offset=v291; +v293=a0["count"]; +if(!(typeof v293==="number"&&v293>=0&&v293===(v293|0)))g18.commandRaise(g254,g19); +v294=v6.count; +v6.count=v293; +v296=v6.primitive; +v6.primitive=g295; +v297=g202.call(this,v2,a0,a2); +v299=v12[g298]; +v12[g298]=v297; +v300=g196.call(this,v2,a0,a2); +v302=v12[g301]; +v12[g301]=v300; +v303=g191.call(this,v2,a0,a2); +v305=v12[g304]; +v12[g304]=v303; +v306=g211.call(this,v2,a0,a2); +v308=v12[g307]; +v12[g307]=v306; +v309=g222.call(this,v2,a0,a2); +v311=v12[g310]; +v12[g310]=v309; +v312=a0["color"]; +v314=v12[g313]; +v12[g313]=v312; +v315=a0["opacity"]; +v317=v12[g316]; +v12[g316]=v315; +v318=this["viewportArray"]; +v320=v12[g319]; +v12[g319]=v318; +v321=this["scale"]; +v323=v12[g322]; +v12[g322]=v321; +v324=a0["align"]; +v326=v12[g325]; +v12[g325]=v324; +v327=a0["baseline"]; +v329=v12[g328]; +v12[g328]=v327; +v330=this["translate"]; +v332=v12[g331]; +v12[g331]=v330; +v333=a0["positionOffset"]; +v335=v12[g334]; +v12[g334]=v333; +v336=this["charBuffer"]; +if(!(v336&&(typeof v336==="object"||typeof v336==="function")&&(v16(v336)||v8.getBuffer(v336)||v8.getBuffer(v336.buffer)||v16(v336.buffer)||("constant" in v336&&(typeof v336.constant==="number"||v17(v336.constant))))))g18.commandRaise(g112,g19); +v337=false; +v338=1; +v339=0; +v340=0; +v341=0; +v342=0; +v343=null; +v344=0; +v345=false; +v346=5126; +v347=0; +v348=0; +v349=0; +if(v16(v336)){ +v337=true; +v343=v8.createStream(34962,v336); +v346=v343.dtype; +} +else{ +v343=v8.getBuffer(v336); +if(v343){ +v346=v343.dtype; +} +else if("constant" in v336){ +v338=2; +if(typeof v336.constant === "number"){ +v339=v336.constant; +v340=v341=v342=0; +} +else{ +v339=v336.constant.length>0?v336.constant[0]:0; +v340=v336.constant.length>1?v336.constant[1]:0; +v341=v336.constant.length>2?v336.constant[2]:0; +v342=v336.constant.length>3?v336.constant[3]:0; +} +} +else{ +if(v16(v336.buffer)){ +v343=v8.createStream(34962,v336.buffer); +} +else{ +v343=v8.getBuffer(v336.buffer); +} +v346="type" in v336?v49[v336.type]:v343.dtype; +v345=!!v336.normalized; +v344=v336.size|0; +v347=v336.offset|0; +v348=v336.stride|0; +v349=v336.divisor|0; +} +} +v351=g350.state; +g350.state=v338; +v352=g350.x; +g350.x=v339; +v353=g350.y; +g350.y=v340; +v354=g350.z; +g350.z=v341; +v355=g350.w; +g350.w=v342; +v356=g350.buffer; +g350.buffer=v343; +v357=g350.size; +g350.size=v344; +v358=g350.normalized; +g350.normalized=v345; +v359=g350.type; +g350.type=v346; +v360=g350.offset; +g350.offset=v347; +v361=g350.stride; +g350.stride=v348; +v362=g350.divisor; +g350.divisor=v349; +v363=this["position"]; +if(!(v363&&(typeof v363==="object"||typeof v363==="function")&&(v16(v363)||v8.getBuffer(v363)||v8.getBuffer(v363.buffer)||v16(v363.buffer)||("constant" in v363&&(typeof v363.constant==="number"||v17(v363.constant))))))g18.commandRaise(g150,g19); +v364=false; +v365=1; +v366=0; +v367=0; +v368=0; +v369=0; +v370=null; +v371=0; +v372=false; +v373=5126; +v374=0; +v375=0; +v376=0; +if(v16(v363)){ +v364=true; +v370=v8.createStream(34962,v363); +v373=v370.dtype; +} +else{ +v370=v8.getBuffer(v363); +if(v370){ +v373=v370.dtype; +} +else if("constant" in v363){ +v365=2; +if(typeof v363.constant === "number"){ +v366=v363.constant; +v367=v368=v369=0; +} +else{ +v366=v363.constant.length>0?v363.constant[0]:0; +v367=v363.constant.length>1?v363.constant[1]:0; +v368=v363.constant.length>2?v363.constant[2]:0; +v369=v363.constant.length>3?v363.constant[3]:0; +} +} +else{ +if(v16(v363.buffer)){ +v370=v8.createStream(34962,v363.buffer); +} +else{ +v370=v8.getBuffer(v363.buffer); +} +v373="type" in v363?v49[v363.type]:v370.dtype; +v372=!!v363.normalized; +v371=v363.size|0; +v374=v363.offset|0; +v375=v363.stride|0; +v376=v363.divisor|0; +} +} +v378=g377.state; +g377.state=v365; +v379=g377.x; +g377.x=v366; +v380=g377.y; +g377.y=v367; +v381=g377.z; +g377.z=v368; +v382=g377.w; +g377.w=v369; +v383=g377.buffer; +g377.buffer=v370; +v384=g377.size; +g377.size=v371; +v385=g377.normalized; +g377.normalized=v372; +v386=g377.type; +g377.type=v373; +v387=g377.offset; +g377.offset=v374; +v388=g377.stride; +g377.stride=v375; +v389=g377.divisor; +g377.divisor=v376; +v390=this["sizeBuffer"]; +v53.buffer=v390; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g131,g19); +v391=false; +v392=1; +v393=0; +v394=0; +v395=0; +v396=0; +v397=null; +v398=0; +v399=false; +v400=5126; +v401=0; +v402=0; +v403=0; +if(v16(v53)){ +v391=true; +v397=v8.createStream(34962,v53); +v400=v397.dtype; +} +else{ +v397=v8.getBuffer(v53); +if(v397){ +v400=v397.dtype; +} +else if("constant" in v53){ +v392=2; +if(typeof v53.constant === "number"){ +v393=v53.constant; +v394=v395=v396=0; +} +else{ +v393=v53.constant.length>0?v53.constant[0]:0; +v394=v53.constant.length>1?v53.constant[1]:0; +v395=v53.constant.length>2?v53.constant[2]:0; +v396=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v397=v8.createStream(34962,v53.buffer); +} +else{ +v397=v8.getBuffer(v53.buffer); +} +v400="type" in v53?v49[v53.type]:v397.dtype; +v399=!!v53.normalized; +v398=v53.size|0; +v401=v53.offset|0; +v402=v53.stride|0; +v403=v53.divisor|0; +} +} +v405=g404.state; +g404.state=v392; +v406=g404.x; +g404.x=v393; +v407=g404.y; +g404.y=v394; +v408=g404.z; +g404.z=v395; +v409=g404.w; +g404.w=v396; +v410=g404.buffer; +g404.buffer=v397; +v411=g404.size; +g404.size=v398; +v412=g404.normalized; +g404.normalized=v399; +v413=g404.type; +g404.type=v400; +v414=g404.offset; +g404.offset=v401; +v415=g404.stride; +g404.stride=v402; +v416=g404.divisor; +g404.divisor=v403; +v417=this["sizeBuffer"]; +v54.buffer=v417; +if(!(v54&&(typeof v54==="object"||typeof v54==="function")&&(v16(v54)||v8.getBuffer(v54)||v8.getBuffer(v54.buffer)||v16(v54.buffer)||("constant" in v54&&(typeof v54.constant==="number"||v17(v54.constant))))))g18.commandRaise(g169,g19); +v418=false; +v419=1; +v420=0; +v421=0; +v422=0; +v423=0; +v424=null; +v425=0; +v426=false; +v427=5126; +v428=0; +v429=0; +v430=0; +if(v16(v54)){ +v418=true; +v424=v8.createStream(34962,v54); +v427=v424.dtype; +} +else{ +v424=v8.getBuffer(v54); +if(v424){ +v427=v424.dtype; +} +else if("constant" in v54){ +v419=2; +if(typeof v54.constant === "number"){ +v420=v54.constant; +v421=v422=v423=0; +} +else{ +v420=v54.constant.length>0?v54.constant[0]:0; +v421=v54.constant.length>1?v54.constant[1]:0; +v422=v54.constant.length>2?v54.constant[2]:0; +v423=v54.constant.length>3?v54.constant[3]:0; +} +} +else{ +if(v16(v54.buffer)){ +v424=v8.createStream(34962,v54.buffer); +} +else{ +v424=v8.getBuffer(v54.buffer); +} +v427="type" in v54?v49[v54.type]:v424.dtype; +v426=!!v54.normalized; +v425=v54.size|0; +v428=v54.offset|0; +v429=v54.stride|0; +v430=v54.divisor|0; +} +} +v432=g431.state; +g431.state=v419; +v433=g431.x; +g431.x=v420; +v434=g431.y; +g431.y=v421; +v435=g431.z; +g431.z=v422; +v436=g431.w; +g431.w=v423; +v437=g431.buffer; +g431.buffer=v424; +v438=g431.size; +g431.size=v425; +v439=g431.normalized; +g431.normalized=v426; +v440=g431.type; +g431.type=v427; +v441=g431.offset; +g431.offset=v428; +v442=g431.stride; +g431.stride=v429; +v443=g431.divisor; +g431.divisor=v430; +v445=v9.vert; +v9.vert=g444; +v447=v9.frag; +v9.frag=g446; +v5.dirty=true; +a1(v2,a0,a2); +v2.viewportWidth=v261; +v2.viewportHeight=v262; +v42[0]=v263; +v42[1]=v264; +v42[2]=v265; +v42[3]=v266; +v20[0]=v268; +v20[1]=v270; +v20[2]=v272; +v20[3]=v274; +v4.blend_enable=v276; +v24[0]=v278; +v24[1]=v280; +v24[2]=v282; +v24[3]=v284; +v4.depth_enable=v286; +v4.stencil_enable=v288; +if(v289){ +g52.cpuTime+=performance.now()-v290; +} +v6.offset=v292; +v6.count=v294; +v6.primitive=v296; +v12[g298]=v299; +v12[g301]=v302; +v12[g304]=v305; +v12[g307]=v308; +v12[g310]=v311; +v12[g313]=v314; +v12[g316]=v317; +v12[g319]=v320; +v12[g322]=v323; +v12[g325]=v326; +v12[g328]=v329; +v12[g331]=v332; +v12[g334]=v335; +if(v337){ +v8.destroyStream(v343); +} +g350.state=v351; +g350.x=v352; +g350.y=v353; +g350.z=v354; +g350.w=v355; +g350.buffer=v356; +g350.size=v357; +g350.normalized=v358; +g350.type=v359; +g350.offset=v360; +g350.stride=v361; +g350.divisor=v362; +if(v364){ +v8.destroyStream(v370); +} +g377.state=v378; +g377.x=v379; +g377.y=v380; +g377.z=v381; +g377.w=v382; +g377.buffer=v383; +g377.size=v384; +g377.normalized=v385; +g377.type=v386; +g377.offset=v387; +g377.stride=v388; +g377.divisor=v389; +if(v391){ +v8.destroyStream(v397); +} +g404.state=v405; +g404.x=v406; +g404.y=v407; +g404.z=v408; +g404.w=v409; +g404.buffer=v410; +g404.size=v411; +g404.normalized=v412; +g404.type=v413; +g404.offset=v414; +g404.stride=v415; +g404.divisor=v416; +if(v418){ +v8.destroyStream(v424); +} +g431.state=v432; +g431.x=v433; +g431.y=v434; +g431.z=v435; +g431.w=v436; +g431.buffer=v437; +g431.size=v438; +g431.normalized=v439; +g431.type=v440; +g431.offset=v441; +g431.stride=v442; +g431.divisor=v443; +v9.vert=v445; +v9.frag=v447; +v5.dirty=true; +} +,"batch":function(a0,a1){ +var v448,v449,v489,v490,v491,v492,v493,v494,v495,v499,v500,v501,v502,v503; +v448=v14.angle_instanced_arrays; +v449=v13.next; +if(v449!==v13.cur){ +if(v449){ +v1.bindFramebuffer(36160,v449.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v449; +} +if(v5.dirty){ +var v450,v451,v452,v453,v454,v455,v456,v457,v458,v459,v460,v461,v462,v463,v464,v465,v466,v467,v468,v469,v470,v471,v472,v473,v474,v475,v476,v477,v478,v479,v480,v481,v482,v483,v484,v485,v486,v487,v488; +v450=v4.dither; +if(v450!==v5.dither){ +if(v450){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v450; +} +v451=v22[0]; +v452=v22[1]; +if(v451!==v23[0]||v452!==v23[1]){ +v1.blendEquationSeparate(v451,v452); +v23[0]=v451; +v23[1]=v452; +} +v453=v4.depth_func; +if(v453!==v5.depth_func){ +v1.depthFunc(v453); +v5.depth_func=v453; +} +v454=v26[0]; +v455=v26[1]; +if(v454!==v27[0]||v455!==v27[1]){ +v1.depthRange(v454,v455); +v27[0]=v454; +v27[1]=v455; +} +v456=v4.depth_mask; +if(v456!==v5.depth_mask){ +v1.depthMask(v456); +v5.depth_mask=v456; +} +v457=v28[0]; +v458=v28[1]; +v459=v28[2]; +v460=v28[3]; +if(v457!==v29[0]||v458!==v29[1]||v459!==v29[2]||v460!==v29[3]){ +v1.colorMask(v457,v458,v459,v460); +v29[0]=v457; +v29[1]=v458; +v29[2]=v459; +v29[3]=v460; +} +v461=v4.cull_enable; +if(v461!==v5.cull_enable){ +if(v461){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v461; +} +v462=v4.cull_face; +if(v462!==v5.cull_face){ +v1.cullFace(v462); +v5.cull_face=v462; +} +v463=v4.frontFace; +if(v463!==v5.frontFace){ +v1.frontFace(v463); +v5.frontFace=v463; +} +v464=v4.lineWidth; +if(v464!==v5.lineWidth){ +v1.lineWidth(v464); +v5.lineWidth=v464; +} +v465=v4.polygonOffset_enable; +if(v465!==v5.polygonOffset_enable){ +if(v465){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v465; +} +v466=v30[0]; +v467=v30[1]; +if(v466!==v31[0]||v467!==v31[1]){ +v1.polygonOffset(v466,v467); +v31[0]=v466; +v31[1]=v467; +} +v468=v4.sample_alpha; +if(v468!==v5.sample_alpha){ +if(v468){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v468; +} +v469=v4.sample_enable; +if(v469!==v5.sample_enable){ +if(v469){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v469; +} +v470=v32[0]; +v471=v32[1]; +if(v470!==v33[0]||v471!==v33[1]){ +v1.sampleCoverage(v470,v471); +v33[0]=v470; +v33[1]=v471; +} +v472=v4.stencil_mask; +if(v472!==v5.stencil_mask){ +v1.stencilMask(v472); +v5.stencil_mask=v472; +} +v473=v34[0]; +v474=v34[1]; +v475=v34[2]; +if(v473!==v35[0]||v474!==v35[1]||v475!==v35[2]){ +v1.stencilFunc(v473,v474,v475); +v35[0]=v473; +v35[1]=v474; +v35[2]=v475; +} +v476=v36[0]; +v477=v36[1]; +v478=v36[2]; +v479=v36[3]; +if(v476!==v37[0]||v477!==v37[1]||v478!==v37[2]||v479!==v37[3]){ +v1.stencilOpSeparate(v476,v477,v478,v479); +v37[0]=v476; +v37[1]=v477; +v37[2]=v478; +v37[3]=v479; +} +v480=v38[0]; +v481=v38[1]; +v482=v38[2]; +v483=v38[3]; +if(v480!==v39[0]||v481!==v39[1]||v482!==v39[2]||v483!==v39[3]){ +v1.stencilOpSeparate(v480,v481,v482,v483); +v39[0]=v480; +v39[1]=v481; +v39[2]=v482; +v39[3]=v483; +} +v484=v4.scissor_enable; +if(v484!==v5.scissor_enable){ +if(v484){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=v484; +} +v485=v40[0]; +v486=v40[1]; +v487=v40[2]; +v488=v40[3]; +if(v485!==v41[0]||v486!==v41[1]||v487!==v41[2]||v488!==v41[3]){ +v1.scissor(v485,v486,v487,v488); +v41[0]=v485; +v41[1]=v486; +v41[2]=v487; +v41[3]=v488; +} +} +v489=this["viewport"]; +if(!(v489&&typeof v489==="object"))g18.commandRaise(g97,g19); +v490=v489.x|0; +v491=v489.y|0; +v492="width" in v489?v489.width|0:(v2.framebufferWidth-v490); +v493="height" in v489?v489.height|0:(v2.framebufferHeight-v491); +if(!(v492>=0&&v493>=0))g18.commandRaise(g97,g19); +v494=v2.viewportWidth; +v2.viewportWidth=v492; +v495=v2.viewportHeight; +v2.viewportHeight=v493; +v1.viewport(v490,v491,v492,v493); +v43[0]=v490; +v43[1]=v491; +v43[2]=v492; +v43[3]=v493; +v1.blendColor(0,0,0,1); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=1; +if(g496){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g496; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +if(g497){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=g497; +if(g498){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=g498; +v499=v5.profile; +if(v499){ +v500=performance.now(); +g52.count+=a1; +} +v1.useProgram(g109.program); +v501=v14.angle_instanced_arrays; +var v504,v505,v506,v507,v508,v509,v510,v511,v512,v513,v514,v515,v516,v517,v518,v519,v520,v521,v522,v523,v524,v525,v526,v527,v528,v529,v530,v531,v532,v533,v534,v535,v536,v537,v538,v539,v540,v541,v542,v543,v544,v545,v546,v547,v548,v549,v550,v551,v552,v553,v554,v555,v556,v557,v558,v559,v560,v561,v562,v563,v564,v565,v566,v567,v568,v569,v570,v571,v572,v573,v574,v575,v576,v577,v578,v579,v580,v581,v582,v619,v622; +v11.setVAO(null); +v504=this["charBuffer"]; +if(!(v504&&(typeof v504==="object"||typeof v504==="function")&&(v16(v504)||v8.getBuffer(v504)||v8.getBuffer(v504.buffer)||v16(v504.buffer)||("constant" in v504&&(typeof v504.constant==="number"||v17(v504.constant))))))g18.commandRaise(g112,g19); +v505=false; +v506=1; +v507=0; +v508=0; +v509=0; +v510=0; +v511=null; +v512=0; +v513=false; +v514=5126; +v515=0; +v516=0; +v517=0; +if(v16(v504)){ +v505=true; +v511=v8.createStream(34962,v504); +v514=v511.dtype; +} +else{ +v511=v8.getBuffer(v504); +if(v511){ +v514=v511.dtype; +} +else if("constant" in v504){ +v506=2; +if(typeof v504.constant === "number"){ +v507=v504.constant; +v508=v509=v510=0; +} +else{ +v507=v504.constant.length>0?v504.constant[0]:0; +v508=v504.constant.length>1?v504.constant[1]:0; +v509=v504.constant.length>2?v504.constant[2]:0; +v510=v504.constant.length>3?v504.constant[3]:0; +} +} +else{ +if(v16(v504.buffer)){ +v511=v8.createStream(34962,v504.buffer); +} +else{ +v511=v8.getBuffer(v504.buffer); +} +v514="type" in v504?v49[v504.type]:v511.dtype; +v513=!!v504.normalized; +v512=v504.size|0; +v515=v504.offset|0; +v516=v504.stride|0; +v517=v504.divisor|0; +} +} +v518=g126.location; +v519=v10[v518]; +if(v506===1){ +if(!v519.buffer){ +v1.enableVertexAttribArray(v518); +} +v520=v512||1; +if(v519.type!==v514||v519.size!==v520||v519.buffer!==v511||v519.normalized!==v513||v519.offset!==v515||v519.stride!==v516){ +v1.bindBuffer(34962,v511.buffer); +v1.vertexAttribPointer(v518,v520,v514,v513,v516,v515); +v519.type=v514; +v519.size=v520; +v519.buffer=v511; +v519.normalized=v513; +v519.offset=v515; +v519.stride=v516; +} +if(v519.divisor!==v517){ +v501.vertexAttribDivisorANGLE(v518,v517); +v519.divisor=v517; +} +} +else{ +if(v519.buffer){ +v1.disableVertexAttribArray(v518); +v519.buffer=null; +} +if(v519.x!==v507||v519.y!==v508||v519.z!==v509||v519.w!==v510){ +v1.vertexAttrib4f(v518,v507,v508,v509,v510); +v519.x=v507; +v519.y=v508; +v519.z=v509; +v519.w=v510; +} +} +v521=this["sizeBuffer"]; +v53.buffer=v521; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g131,g19); +v522=false; +v523=1; +v524=0; +v525=0; +v526=0; +v527=0; +v528=null; +v529=0; +v530=false; +v531=5126; +v532=0; +v533=0; +v534=0; +if(v16(v53)){ +v522=true; +v528=v8.createStream(34962,v53); +v531=v528.dtype; +} +else{ +v528=v8.getBuffer(v53); +if(v528){ +v531=v528.dtype; +} +else if("constant" in v53){ +v523=2; +if(typeof v53.constant === "number"){ +v524=v53.constant; +v525=v526=v527=0; +} +else{ +v524=v53.constant.length>0?v53.constant[0]:0; +v525=v53.constant.length>1?v53.constant[1]:0; +v526=v53.constant.length>2?v53.constant[2]:0; +v527=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v528=v8.createStream(34962,v53.buffer); +} +else{ +v528=v8.getBuffer(v53.buffer); +} +v531="type" in v53?v49[v53.type]:v528.dtype; +v530=!!v53.normalized; +v529=v53.size|0; +v532=v53.offset|0; +v533=v53.stride|0; +v534=v53.divisor|0; +} +} +v535=g145.location; +v536=v10[v535]; +if(v523===1){ +if(!v536.buffer){ +v1.enableVertexAttribArray(v535); +} +v537=v529||1; +if(v536.type!==v531||v536.size!==v537||v536.buffer!==v528||v536.normalized!==v530||v536.offset!==v532||v536.stride!==v533){ +v1.bindBuffer(34962,v528.buffer); +v1.vertexAttribPointer(v535,v537,v531,v530,v533,v532); +v536.type=v531; +v536.size=v537; +v536.buffer=v528; +v536.normalized=v530; +v536.offset=v532; +v536.stride=v533; +} +if(v536.divisor!==v534){ +v501.vertexAttribDivisorANGLE(v535,v534); +v536.divisor=v534; +} +} +else{ +if(v536.buffer){ +v1.disableVertexAttribArray(v535); +v536.buffer=null; +} +if(v536.x!==v524||v536.y!==v525||v536.z!==v526||v536.w!==v527){ +v1.vertexAttrib4f(v535,v524,v525,v526,v527); +v536.x=v524; +v536.y=v525; +v536.z=v526; +v536.w=v527; +} +} +v538=this["position"]; +if(!(v538&&(typeof v538==="object"||typeof v538==="function")&&(v16(v538)||v8.getBuffer(v538)||v8.getBuffer(v538.buffer)||v16(v538.buffer)||("constant" in v538&&(typeof v538.constant==="number"||v17(v538.constant))))))g18.commandRaise(g150,g19); +v539=false; +v540=1; +v541=0; +v542=0; +v543=0; +v544=0; +v545=null; +v546=0; +v547=false; +v548=5126; +v549=0; +v550=0; +v551=0; +if(v16(v538)){ +v539=true; +v545=v8.createStream(34962,v538); +v548=v545.dtype; +} +else{ +v545=v8.getBuffer(v538); +if(v545){ +v548=v545.dtype; +} +else if("constant" in v538){ +v540=2; +if(typeof v538.constant === "number"){ +v541=v538.constant; +v542=v543=v544=0; +} +else{ +v541=v538.constant.length>0?v538.constant[0]:0; +v542=v538.constant.length>1?v538.constant[1]:0; +v543=v538.constant.length>2?v538.constant[2]:0; +v544=v538.constant.length>3?v538.constant[3]:0; +} +} +else{ +if(v16(v538.buffer)){ +v545=v8.createStream(34962,v538.buffer); +} +else{ +v545=v8.getBuffer(v538.buffer); +} +v548="type" in v538?v49[v538.type]:v545.dtype; +v547=!!v538.normalized; +v546=v538.size|0; +v549=v538.offset|0; +v550=v538.stride|0; +v551=v538.divisor|0; +} +} +v552=g164.location; +v553=v10[v552]; +if(v540===1){ +if(!v553.buffer){ +v1.enableVertexAttribArray(v552); +} +v554=v546||2; +if(v553.type!==v548||v553.size!==v554||v553.buffer!==v545||v553.normalized!==v547||v553.offset!==v549||v553.stride!==v550){ +v1.bindBuffer(34962,v545.buffer); +v1.vertexAttribPointer(v552,v554,v548,v547,v550,v549); +v553.type=v548; +v553.size=v554; +v553.buffer=v545; +v553.normalized=v547; +v553.offset=v549; +v553.stride=v550; +} +if(v553.divisor!==v551){ +v501.vertexAttribDivisorANGLE(v552,v551); +v553.divisor=v551; +} +} +else{ +if(v553.buffer){ +v1.disableVertexAttribArray(v552); +v553.buffer=null; +} +if(v553.x!==v541||v553.y!==v542||v553.z!==v543||v553.w!==v544){ +v1.vertexAttrib4f(v552,v541,v542,v543,v544); +v553.x=v541; +v553.y=v542; +v553.z=v543; +v553.w=v544; +} +} +v555=this["sizeBuffer"]; +v54.buffer=v555; +if(!(v54&&(typeof v54==="object"||typeof v54==="function")&&(v16(v54)||v8.getBuffer(v54)||v8.getBuffer(v54.buffer)||v16(v54.buffer)||("constant" in v54&&(typeof v54.constant==="number"||v17(v54.constant))))))g18.commandRaise(g169,g19); +v556=false; +v557=1; +v558=0; +v559=0; +v560=0; +v561=0; +v562=null; +v563=0; +v564=false; +v565=5126; +v566=0; +v567=0; +v568=0; +if(v16(v54)){ +v556=true; +v562=v8.createStream(34962,v54); +v565=v562.dtype; +} +else{ +v562=v8.getBuffer(v54); +if(v562){ +v565=v562.dtype; +} +else if("constant" in v54){ +v557=2; +if(typeof v54.constant === "number"){ +v558=v54.constant; +v559=v560=v561=0; +} +else{ +v558=v54.constant.length>0?v54.constant[0]:0; +v559=v54.constant.length>1?v54.constant[1]:0; +v560=v54.constant.length>2?v54.constant[2]:0; +v561=v54.constant.length>3?v54.constant[3]:0; +} +} +else{ +if(v16(v54.buffer)){ +v562=v8.createStream(34962,v54.buffer); +} +else{ +v562=v8.getBuffer(v54.buffer); +} +v565="type" in v54?v49[v54.type]:v562.dtype; +v564=!!v54.normalized; +v563=v54.size|0; +v566=v54.offset|0; +v567=v54.stride|0; +v568=v54.divisor|0; +} +} +v569=g183.location; +v570=v10[v569]; +if(v557===1){ +if(!v570.buffer){ +v1.enableVertexAttribArray(v569); +} +v571=v563||1; +if(v570.type!==v565||v570.size!==v571||v570.buffer!==v562||v570.normalized!==v564||v570.offset!==v566||v570.stride!==v567){ +v1.bindBuffer(34962,v562.buffer); +v1.vertexAttribPointer(v569,v571,v565,v564,v567,v566); +v570.type=v565; +v570.size=v571; +v570.buffer=v562; +v570.normalized=v564; +v570.offset=v566; +v570.stride=v567; +} +if(v570.divisor!==v568){ +v501.vertexAttribDivisorANGLE(v569,v568); +v570.divisor=v568; +} +} +else{ +if(v570.buffer){ +v1.disableVertexAttribArray(v569); +v570.buffer=null; +} +if(v570.x!==v558||v570.y!==v559||v570.z!==v560||v570.w!==v561){ +v1.vertexAttrib4f(v569,v558,v559,v560,v561); +v570.x=v558; +v570.y=v559; +v570.z=v560; +v570.w=v561; +} +} +v572=this["scale"]; +if(!(v17(v572)&&v572.length===2))g18.commandRaise(g235,g19); +v573=v572[0]; +v574=v572[1]; +v1.uniform2f(g233.location,v573,v574); +v575=this["translate"]; +if(!(v17(v575)&&v575.length===2))g18.commandRaise(g240,g19); +v576=v575[0]; +v577=v575[1]; +v1.uniform2f(g238.location,v576,v577); +v578=this["viewportArray"]; +if(!(v17(v578)&&v578.length===4))g18.commandRaise(g245,g19); +v579=v578[0]; +v580=v578[1]; +v581=v578[2]; +v582=v578[3]; +v1.uniform4f(g243.location,v579,v580,v581,v582); +v619=v6.elements; +if(v619){ +v1.bindBuffer(34963,v619.buffer.buffer); +} +else if(v11.currentVAO){ +v619=v7.getElements(v11.currentVAO.elements); +if(v619)v1.bindBuffer(34963,v619.buffer.buffer); +} +v622=v6.instances; +for(v502=0; +v502=0))g18.commandRaise(g252,g19); +v621=v503["count"]; +if(!(typeof v621==="number"&&v621>=0&&v621===(v621|0)))g18.commandRaise(g254,g19); +if(v621){ +if(v622>0){ +if(v619){ +v501.drawElementsInstancedANGLE(0,v621,v619.type,v620<<((v619.type-5121)>>1),v622); +} +else{ +v501.drawArraysInstancedANGLE(0,v620,v621,v622); +} +} +else if(v622<0){ +if(v619){ +v1.drawElements(0,v621,v619.type,v620<<((v619.type-5121)>>1)); +} +else{ +v1.drawArrays(0,v620,v621); +} +} +v586.unbind(); +} +} +if(v505){ +v8.destroyStream(v511); +} +if(v522){ +v8.destroyStream(v528); +} +if(v539){ +v8.destroyStream(v545); +} +if(v556){ +v8.destroyStream(v562); +} +v5.dirty=true; +v11.setVAO(null); +v2.viewportWidth=v494; +v2.viewportHeight=v495; +if(v499){ +g52.cpuTime+=performance.now()-v500; +} +} +,} + +} \ No newline at end of file diff --git a/src/generated/regl-codegen/8a43b073e4f3e9c0e499c8ac9c253f2aa1e3d3de2febfccc6526b52295dbf770 b/src/generated/regl-codegen/8a43b073e4f3e9c0e499c8ac9c253f2aa1e3d3de2febfccc6526b52295dbf770 new file mode 100644 index 00000000000..d2ca9f641d2 --- /dev/null +++ b/src/generated/regl-codegen/8a43b073e4f3e9c0e499c8ac9c253f2aa1e3d3de2febfccc6526b52295dbf770 @@ -0,0 +1,664 @@ +module.exports = function anonymous(g0,g18,g19,g52,g56,g120,g130,g132,g138,g140,g201 +) { +"use strict"; +var v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v117,v198; +v1=g0.gl; +v2=g0.context; +v3=g0.strings; +v4=g0.next; +v5=g0.current; +v6=g0.draw; +v7=g0.elements; +v8=g0.buffer; +v9=g0.shader; +v10=g0.attributes; +v11=g0.vao; +v12=g0.uniforms; +v13=g0.framebuffer; +v14=g0.extensions; +v15=g0.timer; +v16=g0.isBufferArgs; +v17=g0.isArrayLike; +v20=v4.blend_color; +v21=v5.blend_color; +v22=v4.blend_equation; +v23=v5.blend_equation; +v24=v4.blend_func; +v25=v5.blend_func; +v26=v4.depth_range; +v27=v5.depth_range; +v28=v4.colorMask; +v29=v5.colorMask; +v30=v4.polygonOffset_offset; +v31=v5.polygonOffset_offset; +v32=v4.sample_coverage; +v33=v5.sample_coverage; +v34=v4.stencil_func; +v35=v5.stencil_func; +v36=v4.stencil_opFront; +v37=v5.stencil_opFront; +v38=v4.stencil_opBack; +v39=v5.stencil_opBack; +v40=v4.scissor_box; +v41=v5.scissor_box; +v42=v4.viewport; +v43=v5.viewport; +v44={ +"points":0,"point":0,"lines":1,"line":1,"triangles":4,"triangle":4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6} +; +v45={ +"never":512,"less":513,"<":513,"equal":514,"=":514,"==":514,"===":514,"lequal":515,"<=":515,"greater":516,">":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +v117={ +} +; +v198={ +} +; +return { +"draw":function(a0){ +var v53,v54,v55,v57,v58,v59,v106,v107,v108,v109,v110,v111,v112,v113,v114,v115,v116,v118,v119; +v53=v14.angle_instanced_arrays; +v54=a0["framebuffer"]; +v55=v13.getFramebuffer(v54); +if(!(!v54||v55))g18.commandRaise(g56,g19); +v57=v13.next; +v13.next=v55; +v58=v2.framebufferWidth; +v2.framebufferWidth=v55?v55.width:v2.drawingBufferWidth; +v59=v2.framebufferHeight; +v2.framebufferHeight=v55?v55.height:v2.drawingBufferHeight; +if(v55!==v13.cur){ +if(v55){ +v1.bindFramebuffer(36160,v55.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v55; +} +if(v5.dirty){ +var v60,v61,v62,v63,v64,v65,v66,v67,v68,v69,v70,v71,v72,v73,v74,v75,v76,v77,v78,v79,v80,v81,v82,v83,v84,v85,v86,v87,v88,v89,v90,v91,v92,v93,v94,v95,v96,v97,v98,v99,v100,v101,v102,v103,v104,v105; +v60=v4.dither; +if(v60!==v5.dither){ +if(v60){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v60; +} +v61=v4.blend_enable; +if(v61!==v5.blend_enable){ +if(v61){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=v61; +} +v62=v20[0]; +v63=v20[1]; +v64=v20[2]; +v65=v20[3]; +if(v62!==v21[0]||v63!==v21[1]||v64!==v21[2]||v65!==v21[3]){ +v1.blendColor(v62,v63,v64,v65); +v21[0]=v62; +v21[1]=v63; +v21[2]=v64; +v21[3]=v65; +} +v66=v22[0]; +v67=v22[1]; +if(v66!==v23[0]||v67!==v23[1]){ +v1.blendEquationSeparate(v66,v67); +v23[0]=v66; +v23[1]=v67; +} +v68=v24[0]; +v69=v24[1]; +v70=v24[2]; +v71=v24[3]; +if(v68!==v25[0]||v69!==v25[1]||v70!==v25[2]||v71!==v25[3]){ +v1.blendFuncSeparate(v68,v69,v70,v71); +v25[0]=v68; +v25[1]=v69; +v25[2]=v70; +v25[3]=v71; +} +v72=v4.depth_enable; +if(v72!==v5.depth_enable){ +if(v72){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=v72; +} +v73=v4.depth_func; +if(v73!==v5.depth_func){ +v1.depthFunc(v73); +v5.depth_func=v73; +} +v74=v26[0]; +v75=v26[1]; +if(v74!==v27[0]||v75!==v27[1]){ +v1.depthRange(v74,v75); +v27[0]=v74; +v27[1]=v75; +} +v76=v4.depth_mask; +if(v76!==v5.depth_mask){ +v1.depthMask(v76); +v5.depth_mask=v76; +} +v77=v28[0]; +v78=v28[1]; +v79=v28[2]; +v80=v28[3]; +if(v77!==v29[0]||v78!==v29[1]||v79!==v29[2]||v80!==v29[3]){ +v1.colorMask(v77,v78,v79,v80); +v29[0]=v77; +v29[1]=v78; +v29[2]=v79; +v29[3]=v80; +} +v81=v4.cull_enable; +if(v81!==v5.cull_enable){ +if(v81){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v81; +} +v82=v4.cull_face; +if(v82!==v5.cull_face){ +v1.cullFace(v82); +v5.cull_face=v82; +} +v83=v4.frontFace; +if(v83!==v5.frontFace){ +v1.frontFace(v83); +v5.frontFace=v83; +} +v84=v4.lineWidth; +if(v84!==v5.lineWidth){ +v1.lineWidth(v84); +v5.lineWidth=v84; +} +v85=v4.polygonOffset_enable; +if(v85!==v5.polygonOffset_enable){ +if(v85){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v85; +} +v86=v30[0]; +v87=v30[1]; +if(v86!==v31[0]||v87!==v31[1]){ +v1.polygonOffset(v86,v87); +v31[0]=v86; +v31[1]=v87; +} +v88=v4.sample_alpha; +if(v88!==v5.sample_alpha){ +if(v88){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v88; +} +v89=v4.sample_enable; +if(v89!==v5.sample_enable){ +if(v89){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v89; +} +v90=v32[0]; +v91=v32[1]; +if(v90!==v33[0]||v91!==v33[1]){ +v1.sampleCoverage(v90,v91); +v33[0]=v90; +v33[1]=v91; +} +v92=v4.stencil_enable; +if(v92!==v5.stencil_enable){ +if(v92){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=v92; +} +v93=v4.stencil_mask; +if(v93!==v5.stencil_mask){ +v1.stencilMask(v93); +v5.stencil_mask=v93; +} +v94=v34[0]; +v95=v34[1]; +v96=v34[2]; +if(v94!==v35[0]||v95!==v35[1]||v96!==v35[2]){ +v1.stencilFunc(v94,v95,v96); +v35[0]=v94; +v35[1]=v95; +v35[2]=v96; +} +v97=v36[0]; +v98=v36[1]; +v99=v36[2]; +v100=v36[3]; +if(v97!==v37[0]||v98!==v37[1]||v99!==v37[2]||v100!==v37[3]){ +v1.stencilOpSeparate(v97,v98,v99,v100); +v37[0]=v97; +v37[1]=v98; +v37[2]=v99; +v37[3]=v100; +} +v101=v38[0]; +v102=v38[1]; +v103=v38[2]; +v104=v38[3]; +if(v101!==v39[0]||v102!==v39[1]||v103!==v39[2]||v104!==v39[3]){ +v1.stencilOpSeparate(v101,v102,v103,v104); +v39[0]=v101; +v39[1]=v102; +v39[2]=v103; +v39[3]=v104; +} +v105=v4.scissor_enable; +if(v105!==v5.scissor_enable){ +if(v105){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=v105; +} +} +v106=v2.framebufferWidth; +v107=v2.framebufferHeight; +v108=v2.viewportWidth; +v2.viewportWidth=v106; +v109=v2.viewportHeight; +v2.viewportHeight=v107; +v1.viewport(0,0,v106,v107); +v43[0]=0; +v43[1]=0; +v43[2]=v106; +v43[3]=v107; +v110=v2.framebufferWidth; +v111=v2.framebufferHeight; +v1.scissor(0,0,v110,v111); +v41[0]=0; +v41[1]=0; +v41[2]=v110; +v41[3]=v111; +v112=v5.profile; +if(v112){ +v113=performance.now(); +g52.count++; +} +v114=v9.frag; +v115=v9.vert; +v116=v9.program(v115,v114,g19); +v1.useProgram(v116.program); +v11.setVAO(null); +v118=v116.id; +v119=v117[v118]; +if(v119){ +v119.call(this,a0); +} +else{ +v119=v117[v118]=g120(v116); +v119.call(this,a0); +} +v5.dirty=true; +v11.setVAO(null); +v13.next=v57; +v2.framebufferWidth=v58; +v2.framebufferHeight=v59; +v2.viewportWidth=v108; +v2.viewportHeight=v109; +if(v112){ +g52.cpuTime+=performance.now()-v113; +} +} +,"scope":function(a0,a1,a2){ +var v121,v122,v123,v124,v125,v126,v127,v128,v129,v131,v133,v134,v135,v136,v137,v139,v141,v142,v143,v144,v145; +v121=a0["framebuffer"]; +v122=v13.getFramebuffer(v121); +if(!(!v121||v122))g18.commandRaise(g56,g19); +v123=v13.next; +v13.next=v122; +v124=v2.framebufferWidth; +v2.framebufferWidth=v122?v122.width:v2.drawingBufferWidth; +v125=v2.framebufferHeight; +v2.framebufferHeight=v122?v122.height:v2.drawingBufferHeight; +v126=v2.framebufferWidth; +v127=v2.framebufferHeight; +v128=v2.viewportWidth; +v2.viewportWidth=v126; +v129=v2.viewportHeight; +v2.viewportHeight=v127; +v131=v42[0]; +v42[0]=g130; +v133=v42[1]; +v42[1]=g132; +v134=v42[2]; +v42[2]=v126; +v135=v42[3]; +v42[3]=v127; +v136=v2.framebufferWidth; +v137=v2.framebufferHeight; +v139=v40[0]; +v40[0]=g138; +v141=v40[1]; +v40[1]=g140; +v142=v40[2]; +v40[2]=v136; +v143=v40[3]; +v40[3]=v137; +v144=v5.profile; +if(v144){ +v145=performance.now(); +g52.count++; +} +v5.dirty=true; +a1(v2,a0,a2); +v13.next=v123; +v2.framebufferWidth=v124; +v2.framebufferHeight=v125; +v2.viewportWidth=v128; +v2.viewportHeight=v129; +v42[0]=v131; +v42[1]=v133; +v42[2]=v134; +v42[3]=v135; +v40[0]=v139; +v40[1]=v141; +v40[2]=v142; +v40[3]=v143; +if(v144){ +g52.cpuTime+=performance.now()-v145; +} +v5.dirty=true; +} +,"batch":function(a0,a1){ +var v146,v193,v194,v195,v196,v197,v199,v200; +v146=v14.angle_instanced_arrays; +if(v5.dirty){ +var v147,v148,v149,v150,v151,v152,v153,v154,v155,v156,v157,v158,v159,v160,v161,v162,v163,v164,v165,v166,v167,v168,v169,v170,v171,v172,v173,v174,v175,v176,v177,v178,v179,v180,v181,v182,v183,v184,v185,v186,v187,v188,v189,v190,v191,v192; +v147=v4.dither; +if(v147!==v5.dither){ +if(v147){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v147; +} +v148=v4.blend_enable; +if(v148!==v5.blend_enable){ +if(v148){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=v148; +} +v149=v20[0]; +v150=v20[1]; +v151=v20[2]; +v152=v20[3]; +if(v149!==v21[0]||v150!==v21[1]||v151!==v21[2]||v152!==v21[3]){ +v1.blendColor(v149,v150,v151,v152); +v21[0]=v149; +v21[1]=v150; +v21[2]=v151; +v21[3]=v152; +} +v153=v22[0]; +v154=v22[1]; +if(v153!==v23[0]||v154!==v23[1]){ +v1.blendEquationSeparate(v153,v154); +v23[0]=v153; +v23[1]=v154; +} +v155=v24[0]; +v156=v24[1]; +v157=v24[2]; +v158=v24[3]; +if(v155!==v25[0]||v156!==v25[1]||v157!==v25[2]||v158!==v25[3]){ +v1.blendFuncSeparate(v155,v156,v157,v158); +v25[0]=v155; +v25[1]=v156; +v25[2]=v157; +v25[3]=v158; +} +v159=v4.depth_enable; +if(v159!==v5.depth_enable){ +if(v159){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=v159; +} +v160=v4.depth_func; +if(v160!==v5.depth_func){ +v1.depthFunc(v160); +v5.depth_func=v160; +} +v161=v26[0]; +v162=v26[1]; +if(v161!==v27[0]||v162!==v27[1]){ +v1.depthRange(v161,v162); +v27[0]=v161; +v27[1]=v162; +} +v163=v4.depth_mask; +if(v163!==v5.depth_mask){ +v1.depthMask(v163); +v5.depth_mask=v163; +} +v164=v28[0]; +v165=v28[1]; +v166=v28[2]; +v167=v28[3]; +if(v164!==v29[0]||v165!==v29[1]||v166!==v29[2]||v167!==v29[3]){ +v1.colorMask(v164,v165,v166,v167); +v29[0]=v164; +v29[1]=v165; +v29[2]=v166; +v29[3]=v167; +} +v168=v4.cull_enable; +if(v168!==v5.cull_enable){ +if(v168){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v168; +} +v169=v4.cull_face; +if(v169!==v5.cull_face){ +v1.cullFace(v169); +v5.cull_face=v169; +} +v170=v4.frontFace; +if(v170!==v5.frontFace){ +v1.frontFace(v170); +v5.frontFace=v170; +} +v171=v4.lineWidth; +if(v171!==v5.lineWidth){ +v1.lineWidth(v171); +v5.lineWidth=v171; +} +v172=v4.polygonOffset_enable; +if(v172!==v5.polygonOffset_enable){ +if(v172){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v172; +} +v173=v30[0]; +v174=v30[1]; +if(v173!==v31[0]||v174!==v31[1]){ +v1.polygonOffset(v173,v174); +v31[0]=v173; +v31[1]=v174; +} +v175=v4.sample_alpha; +if(v175!==v5.sample_alpha){ +if(v175){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v175; +} +v176=v4.sample_enable; +if(v176!==v5.sample_enable){ +if(v176){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v176; +} +v177=v32[0]; +v178=v32[1]; +if(v177!==v33[0]||v178!==v33[1]){ +v1.sampleCoverage(v177,v178); +v33[0]=v177; +v33[1]=v178; +} +v179=v4.stencil_enable; +if(v179!==v5.stencil_enable){ +if(v179){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=v179; +} +v180=v4.stencil_mask; +if(v180!==v5.stencil_mask){ +v1.stencilMask(v180); +v5.stencil_mask=v180; +} +v181=v34[0]; +v182=v34[1]; +v183=v34[2]; +if(v181!==v35[0]||v182!==v35[1]||v183!==v35[2]){ +v1.stencilFunc(v181,v182,v183); +v35[0]=v181; +v35[1]=v182; +v35[2]=v183; +} +v184=v36[0]; +v185=v36[1]; +v186=v36[2]; +v187=v36[3]; +if(v184!==v37[0]||v185!==v37[1]||v186!==v37[2]||v187!==v37[3]){ +v1.stencilOpSeparate(v184,v185,v186,v187); +v37[0]=v184; +v37[1]=v185; +v37[2]=v186; +v37[3]=v187; +} +v188=v38[0]; +v189=v38[1]; +v190=v38[2]; +v191=v38[3]; +if(v188!==v39[0]||v189!==v39[1]||v190!==v39[2]||v191!==v39[3]){ +v1.stencilOpSeparate(v188,v189,v190,v191); +v39[0]=v188; +v39[1]=v189; +v39[2]=v190; +v39[3]=v191; +} +v192=v4.scissor_enable; +if(v192!==v5.scissor_enable){ +if(v192){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=v192; +} +} +v193=v5.profile; +if(v193){ +v194=performance.now(); +g52.count+=a1; +} +v195=v9.frag; +v196=v9.vert; +v197=v9.program(v196,v195,g19); +v1.useProgram(v197.program); +v11.setVAO(null); +v199=v197.id; +v200=v198[v199]; +if(v200){ +v200.call(this,a0,a1); +} +else{ +v200=v198[v199]=g201(v197); +v200.call(this,a0,a1); +} +v5.dirty=true; +v11.setVAO(null); +if(v193){ +g52.cpuTime+=performance.now()-v194; +} +} +,} + +} \ No newline at end of file diff --git a/src/generated/regl-codegen/909861c036d6f1ef40ba2dfcc33ef32489d2fe05fa7b7984d5ff315ddceb17b1 b/src/generated/regl-codegen/909861c036d6f1ef40ba2dfcc33ef32489d2fe05fa7b7984d5ff315ddceb17b1 new file mode 100644 index 00000000000..17f3c1077b9 --- /dev/null +++ b/src/generated/regl-codegen/909861c036d6f1ef40ba2dfcc33ef32489d2fe05fa7b7984d5ff315ddceb17b1 @@ -0,0 +1,454 @@ +module.exports = function anonymous(g0,g18,g19,g56 +) { +"use strict"; +var v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v66,v67,v68,v69,v70,v71,v74,v75,v78,v79,v86,v87,v88,v89,v92,v93,v94,v95,v96,v97,v98,v99,v100,v101; +v1=g0.gl; +v2=g0.context; +v3=g0.strings; +v4=g0.next; +v5=g0.current; +v6=g0.draw; +v7=g0.elements; +v8=g0.buffer; +v9=g0.shader; +v10=g0.attributes; +v11=g0.vao; +v12=g0.uniforms; +v13=g0.framebuffer; +v14=g0.extensions; +v15=g0.timer; +v16=g0.isBufferArgs; +v17=g0.isArrayLike; +v20=v4.blend_color; +v21=v5.blend_color; +v22=v4.blend_equation; +v23=v5.blend_equation; +v24=v4.blend_func; +v25=v5.blend_func; +v26=v4.depth_range; +v27=v5.depth_range; +v28=v4.colorMask; +v29=v5.colorMask; +v30=v4.polygonOffset_offset; +v31=v5.polygonOffset_offset; +v32=v4.sample_coverage; +v33=v5.sample_coverage; +v34=v4.stencil_func; +v35=v5.stencil_func; +v36=v4.stencil_opFront; +v37=v5.stencil_opFront; +v38=v4.stencil_opBack; +v39=v5.stencil_opBack; +v40=v4.scissor_box; +v41=v5.scissor_box; +v42=v4.viewport; +v43=v5.viewport; +v44={ +"points":0,"point":0,"lines":1,"line":1,"triangles":4,"triangle":4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6} +; +v45={ +"never":512,"less":513,"<":513,"equal":514,"=":514,"==":514,"===":514,"lequal":515,"<=":515,"greater":516,">":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +v66=v4.blend_color; +v67=v5.blend_color; +v68=v4.blend_equation; +v69=v5.blend_equation; +v70=v4.blend_func; +v71=v5.blend_func; +v74=v4.depth_range; +v75=v5.depth_range; +v78=v4.colorMask; +v79=v5.colorMask; +v86=v4.polygonOffset_offset; +v87=v5.polygonOffset_offset; +v88=v4.sample_coverage; +v89=v5.sample_coverage; +v92=v4.stencil_func; +v93=v5.stencil_func; +v94=v4.stencil_opFront; +v95=v5.stencil_opFront; +v96=v4.stencil_opBack; +v97=v5.stencil_opBack; +v98=v4.scissor_box; +v99=v5.scissor_box; +v100=v4.viewport; +v101=v5.viewport; +return { +"poll":function(){ +var v52; +var v57,v58,v59,v60,v61,v62,v63,v64,v65,v72,v73,v76,v77,v80,v81,v82,v83,v84,v85,v90,v91; +v5.dirty=false; +v57=v4.dither; +v58=v4.blend_enable; +v59=v4.depth_enable; +v60=v4.cull_enable; +v61=v4.polygonOffset_enable; +v62=v4.sample_alpha; +v63=v4.sample_enable; +v64=v4.stencil_enable; +v65=v4.scissor_enable; +v72=v4.depth_func; +v73=v5.depth_func; +v76=v4.depth_mask; +v77=v5.depth_mask; +v80=v4.cull_face; +v81=v5.cull_face; +v82=v4.frontFace; +v83=v5.frontFace; +v84=v4.lineWidth; +v85=v5.lineWidth; +v90=v4.stencil_mask; +v91=v5.stencil_mask; +v52=v13.next; +if(v52!==v13.cur){ +if(v52){ +v1.bindFramebuffer(36160,v52.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v52; +} +if(v57!==v5.dither){ +if(v57){ +v1.enable(3024)} +else{ +v1.disable(3024)} +v5.dither=v57; +} +if(v58!==v5.blend_enable){ +if(v58){ +v1.enable(3042)} +else{ +v1.disable(3042)} +v5.blend_enable=v58; +} +if(v59!==v5.depth_enable){ +if(v59){ +v1.enable(2929)} +else{ +v1.disable(2929)} +v5.depth_enable=v59; +} +if(v60!==v5.cull_enable){ +if(v60){ +v1.enable(2884)} +else{ +v1.disable(2884)} +v5.cull_enable=v60; +} +if(v61!==v5.polygonOffset_enable){ +if(v61){ +v1.enable(32823)} +else{ +v1.disable(32823)} +v5.polygonOffset_enable=v61; +} +if(v62!==v5.sample_alpha){ +if(v62){ +v1.enable(32926)} +else{ +v1.disable(32926)} +v5.sample_alpha=v62; +} +if(v63!==v5.sample_enable){ +if(v63){ +v1.enable(32928)} +else{ +v1.disable(32928)} +v5.sample_enable=v63; +} +if(v64!==v5.stencil_enable){ +if(v64){ +v1.enable(2960)} +else{ +v1.disable(2960)} +v5.stencil_enable=v64; +} +if(v65!==v5.scissor_enable){ +if(v65){ +v1.enable(3089)} +else{ +v1.disable(3089)} +v5.scissor_enable=v65; +} +if(v66[0]!==v67[0]||v66[1]!==v67[1]||v66[2]!==v67[2]||v66[3]!==v67[3]){ +v1.blendColor(v66[0],v66[1],v66[2],v66[3]); +v67[0]=v66[0]; +v67[1]=v66[1]; +v67[2]=v66[2]; +v67[3]=v66[3]; +} +if(v68[0]!==v69[0]||v68[1]!==v69[1]){ +v1.blendEquationSeparate(v68[0],v68[1]); +v69[0]=v68[0]; +v69[1]=v68[1]; +} +if(v70[0]!==v71[0]||v70[1]!==v71[1]||v70[2]!==v71[2]||v70[3]!==v71[3]){ +v1.blendFuncSeparate(v70[0],v70[1],v70[2],v70[3]); +v71[0]=v70[0]; +v71[1]=v70[1]; +v71[2]=v70[2]; +v71[3]=v70[3]; +} +if(v72!==v73){ +v1.depthFunc(v72); +v5.depth_func=v72; +} +if(v74[0]!==v75[0]||v74[1]!==v75[1]){ +v1.depthRange(v74[0],v74[1]); +v75[0]=v74[0]; +v75[1]=v74[1]; +} +if(v76!==v77){ +v1.depthMask(v76); +v5.depth_mask=v76; +} +if(v78[0]!==v79[0]||v78[1]!==v79[1]||v78[2]!==v79[2]||v78[3]!==v79[3]){ +v1.colorMask(v78[0],v78[1],v78[2],v78[3]); +v79[0]=v78[0]; +v79[1]=v78[1]; +v79[2]=v78[2]; +v79[3]=v78[3]; +} +if(v80!==v81){ +v1.cullFace(v80); +v5.cull_face=v80; +} +if(v82!==v83){ +v1.frontFace(v82); +v5.frontFace=v82; +} +if(v84!==v85){ +v1.lineWidth(v84); +v5.lineWidth=v84; +} +if(v86[0]!==v87[0]||v86[1]!==v87[1]){ +v1.polygonOffset(v86[0],v86[1]); +v87[0]=v86[0]; +v87[1]=v86[1]; +} +if(v88[0]!==v89[0]||v88[1]!==v89[1]){ +v1.sampleCoverage(v88[0],v88[1]); +v89[0]=v88[0]; +v89[1]=v88[1]; +} +if(v90!==v91){ +v1.stencilMask(v90); +v5.stencil_mask=v90; +} +if(v92[0]!==v93[0]||v92[1]!==v93[1]||v92[2]!==v93[2]){ +v1.stencilFunc(v92[0],v92[1],v92[2]); +v93[0]=v92[0]; +v93[1]=v92[1]; +v93[2]=v92[2]; +} +if(v94[0]!==v95[0]||v94[1]!==v95[1]||v94[2]!==v95[2]||v94[3]!==v95[3]){ +v1.stencilOpSeparate(v94[0],v94[1],v94[2],v94[3]); +v95[0]=v94[0]; +v95[1]=v94[1]; +v95[2]=v94[2]; +v95[3]=v94[3]; +} +if(v96[0]!==v97[0]||v96[1]!==v97[1]||v96[2]!==v97[2]||v96[3]!==v97[3]){ +v1.stencilOpSeparate(v96[0],v96[1],v96[2],v96[3]); +v97[0]=v96[0]; +v97[1]=v96[1]; +v97[2]=v96[2]; +v97[3]=v96[3]; +} +if(v98[0]!==v99[0]||v98[1]!==v99[1]||v98[2]!==v99[2]||v98[3]!==v99[3]){ +v1.scissor(v98[0],v98[1],v98[2],v98[3]); +v99[0]=v98[0]; +v99[1]=v98[1]; +v99[2]=v98[2]; +v99[3]=v98[3]; +} +if(v100[0]!==v101[0]||v100[1]!==v101[1]||v100[2]!==v101[2]||v100[3]!==v101[3]){ +v1.viewport(v100[0],v100[1],v100[2],v100[3]); +v101[0]=v100[0]; +v101[1]=v100[1]; +v101[2]=v100[2]; +v101[3]=v100[3]; +} +} +,"refresh":function(){ +var v53,v54,v55; +var v57,v58,v59,v60,v61,v62,v63,v64,v65,v72,v73,v76,v77,v80,v81,v82,v83,v84,v85,v90,v91; +v5.dirty=false; +v57=v4.dither; +v58=v4.blend_enable; +v59=v4.depth_enable; +v60=v4.cull_enable; +v61=v4.polygonOffset_enable; +v62=v4.sample_alpha; +v63=v4.sample_enable; +v64=v4.stencil_enable; +v65=v4.scissor_enable; +v72=v4.depth_func; +v73=v5.depth_func; +v76=v4.depth_mask; +v77=v5.depth_mask; +v80=v4.cull_face; +v81=v5.cull_face; +v82=v4.frontFace; +v83=v5.frontFace; +v84=v4.lineWidth; +v85=v5.lineWidth; +v90=v4.stencil_mask; +v91=v5.stencil_mask; +v53=v13.next; +if(v53){ +v1.bindFramebuffer(36160,v53.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v53; +v54=v10; +v55=0; +for(var i=0; +i":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +v53={ +} +; +v54={ +} +; +v186=new Float32Array(16); +v190=new Float32Array(16); +v194=new Float32Array(16); +v198=new Float32Array(16); +v202=new Float32Array(16); +v206=new Float32Array(16); +v210=new Float32Array(16); +v214=new Float32Array(16); +v221=new Float32Array(16); +v225=new Float32Array(16); +v229=new Float32Array(16); +v233=new Float32Array(16); +v237=new Float32Array(16); +v241=new Float32Array(16); +v245=new Float32Array(16); +v249=new Float32Array(16); +v736=new Float32Array(16); +v738=new Float32Array(16); +v740=new Float32Array(16); +v742=new Float32Array(16); +v744=new Float32Array(16); +v746=new Float32Array(16); +v748=new Float32Array(16); +v750=new Float32Array(16); +v754=new Float32Array(16); +v756=new Float32Array(16); +v758=new Float32Array(16); +v760=new Float32Array(16); +v762=new Float32Array(16); +v764=new Float32Array(16); +v766=new Float32Array(16); +v768=new Float32Array(16); +return { +"draw":function(a0){ +var v55,v81,v82,v83,v84,v86,v87,v88,v89,v90,v91,v100,v101,v102,v103,v105,v106,v107,v108,v110,v114,v115,v118,v119,v122,v123,v126,v127,v130,v131,v134,v135,v138,v139,v142,v143,v146,v147,v150,v151,v154,v155,v158,v159,v162,v163,v166,v167,v170,v171,v174,v175,v177,v179,v180,v181,v182,v184,v188,v192,v196,v200,v204,v208,v212,v216,v219,v223,v227,v231,v235,v239,v243,v247,v251,v254,v256,v260,v262,v263,v265,v267,v268,v270,v272,v273,v274,v275,v277; +v55=v13.next; +if(v55!==v13.cur){ +if(v55){ +v1.bindFramebuffer(36160,v55.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v55; +} +if(v5.dirty){ +var v56,v57,v58,v59,v60,v61,v62,v63,v64,v65,v66,v67,v68,v69,v70,v71,v72,v73,v74,v75,v76,v77,v78,v79,v80; +v56=v28[0]; +v57=v28[1]; +v58=v28[2]; +v59=v28[3]; +if(v56!==v29[0]||v57!==v29[1]||v58!==v29[2]||v59!==v29[3]){ +v1.colorMask(v56,v57,v58,v59); +v29[0]=v56; +v29[1]=v57; +v29[2]=v58; +v29[3]=v59; +} +v60=v4.frontFace; +if(v60!==v5.frontFace){ +v1.frontFace(v60); +v5.frontFace=v60; +} +v61=v4.polygonOffset_enable; +if(v61!==v5.polygonOffset_enable){ +if(v61){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v61; +} +v62=v30[0]; +v63=v30[1]; +if(v62!==v31[0]||v63!==v31[1]){ +v1.polygonOffset(v62,v63); +v31[0]=v62; +v31[1]=v63; +} +v64=v4.sample_alpha; +if(v64!==v5.sample_alpha){ +if(v64){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v64; +} +v65=v4.sample_enable; +if(v65!==v5.sample_enable){ +if(v65){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v65; +} +v66=v32[0]; +v67=v32[1]; +if(v66!==v33[0]||v67!==v33[1]){ +v1.sampleCoverage(v66,v67); +v33[0]=v66; +v33[1]=v67; +} +v68=v4.stencil_enable; +if(v68!==v5.stencil_enable){ +if(v68){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=v68; +} +v69=v4.stencil_mask; +if(v69!==v5.stencil_mask){ +v1.stencilMask(v69); +v5.stencil_mask=v69; +} +v70=v34[0]; +v71=v34[1]; +v72=v34[2]; +if(v70!==v35[0]||v71!==v35[1]||v72!==v35[2]){ +v1.stencilFunc(v70,v71,v72); +v35[0]=v70; +v35[1]=v71; +v35[2]=v72; +} +v73=v36[0]; +v74=v36[1]; +v75=v36[2]; +v76=v36[3]; +if(v73!==v37[0]||v74!==v37[1]||v75!==v37[2]||v76!==v37[3]){ +v1.stencilOpSeparate(v73,v74,v75,v76); +v37[0]=v73; +v37[1]=v74; +v37[2]=v75; +v37[3]=v76; +} +v77=v38[0]; +v78=v38[1]; +v79=v38[2]; +v80=v38[3]; +if(v77!==v39[0]||v78!==v39[1]||v79!==v39[2]||v80!==v39[3]){ +v1.stencilOpSeparate(v77,v78,v79,v80); +v39[0]=v77; +v39[1]=v78; +v39[2]=v79; +v39[3]=v80; +} +} +v81=a0["viewportX"]; +v53.x=v81; +v82=a0["viewportY"]; +v53.y=v82; +v83=a0["viewportWidth"]; +v53.width=v83; +v84=a0["viewportHeight"]; +v53.height=v84; +if(!(v53&&typeof v53==="object"))g18.commandRaise(g85,g19); +v86=v53.x|0; +v87=v53.y|0; +v88="width" in v53?v53.width|0:(v2.framebufferWidth-v86); +v89="height" in v53?v53.height|0:(v2.framebufferHeight-v87); +if(!(v88>=0&&v89>=0))g18.commandRaise(g85,g19); +v90=v2.viewportWidth; +v2.viewportWidth=v88; +v91=v2.viewportHeight; +v2.viewportHeight=v89; +v1.viewport(v86,v87,v88,v89); +v43[0]=v86; +v43[1]=v87; +v43[2]=v88; +v43[3]=v89; +v1.blendColor(0,0,0,0); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=0; +if(g92){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g92; +v1.blendEquationSeparate(32774,32774); +v23[0]=32774; +v23[1]=32774; +v1.blendFuncSeparate(770,771,1,1); +v25[0]=770; +v25[1]=771; +v25[2]=1; +v25[3]=1; +if(g93){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=g93; +v1.cullFace(g94); +v5.cull_face=g94; +if(g95){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=g95; +v1.depthFunc(g96); +v5.depth_func=g96; +v1.depthMask(g97); +v5.depth_mask=g97; +v1.depthRange(0,1); +v27[0]=0; +v27[1]=1; +if(g98){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=g98; +v1.lineWidth(g99); +v5.lineWidth=g99; +v100=a0["scissorX"]; +v54.x=v100; +v101=a0["scissorY"]; +v54.y=v101; +v102=a0["scissorWidth"]; +v54.width=v102; +v103=a0["scissorHeight"]; +v54.height=v103; +if(!(v54&&typeof v54==="object"))g18.commandRaise(g104,g19); +v105=v54.x|0; +v106=v54.y|0; +v107="width" in v54?v54.width|0:(v2.framebufferWidth-v105); +v108="height" in v54?v54.height|0:(v2.framebufferHeight-v106); +if(!(v107>=0&&v108>=0))g18.commandRaise(g104,g19); +v1.scissor(v105,v106,v107,v108); +v41[0]=v105; +v41[1]=v106; +v41[2]=v107; +v41[3]=v108; +if(g109){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g109; +v110=v5.profile; +v5.profile=false; +v1.useProgram(g111.program); +v11.setVAO(null); +v114=g113.location; +v115=v10[v114]; +if(!v115.buffer){ +v1.enableVertexAttribArray(v114); +} +if(v115.type!==g112.dtype||v115.size!==4||v115.buffer!==g112||v115.normalized!==false||v115.offset!==0||v115.stride!==0){ +v1.bindBuffer(34962,g112.buffer); +v1.vertexAttribPointer(v114,4,g112.dtype,false,0,0); +v115.type=g112.dtype; +v115.size=4; +v115.buffer=g112; +v115.normalized=false; +v115.offset=0; +v115.stride=0; +} +v118=g117.location; +v119=v10[v118]; +if(!v119.buffer){ +v1.enableVertexAttribArray(v118); +} +if(v119.type!==g116.dtype||v119.size!==4||v119.buffer!==g116||v119.normalized!==false||v119.offset!==0||v119.stride!==0){ +v1.bindBuffer(34962,g116.buffer); +v1.vertexAttribPointer(v118,4,g116.dtype,false,0,0); +v119.type=g116.dtype; +v119.size=4; +v119.buffer=g116; +v119.normalized=false; +v119.offset=0; +v119.stride=0; +} +v122=g121.location; +v123=v10[v122]; +if(!v123.buffer){ +v1.enableVertexAttribArray(v122); +} +if(v123.type!==g120.dtype||v123.size!==4||v123.buffer!==g120||v123.normalized!==false||v123.offset!==0||v123.stride!==0){ +v1.bindBuffer(34962,g120.buffer); +v1.vertexAttribPointer(v122,4,g120.dtype,false,0,0); +v123.type=g120.dtype; +v123.size=4; +v123.buffer=g120; +v123.normalized=false; +v123.offset=0; +v123.stride=0; +} +v126=g125.location; +v127=v10[v126]; +if(!v127.buffer){ +v1.enableVertexAttribArray(v126); +} +if(v127.type!==g124.dtype||v127.size!==4||v127.buffer!==g124||v127.normalized!==false||v127.offset!==0||v127.stride!==0){ +v1.bindBuffer(34962,g124.buffer); +v1.vertexAttribPointer(v126,4,g124.dtype,false,0,0); +v127.type=g124.dtype; +v127.size=4; +v127.buffer=g124; +v127.normalized=false; +v127.offset=0; +v127.stride=0; +} +v130=g129.location; +v131=v10[v130]; +if(!v131.buffer){ +v1.enableVertexAttribArray(v130); +} +if(v131.type!==g128.dtype||v131.size!==4||v131.buffer!==g128||v131.normalized!==false||v131.offset!==0||v131.stride!==0){ +v1.bindBuffer(34962,g128.buffer); +v1.vertexAttribPointer(v130,4,g128.dtype,false,0,0); +v131.type=g128.dtype; +v131.size=4; +v131.buffer=g128; +v131.normalized=false; +v131.offset=0; +v131.stride=0; +} +v134=g133.location; +v135=v10[v134]; +if(!v135.buffer){ +v1.enableVertexAttribArray(v134); +} +if(v135.type!==g132.dtype||v135.size!==4||v135.buffer!==g132||v135.normalized!==false||v135.offset!==0||v135.stride!==0){ +v1.bindBuffer(34962,g132.buffer); +v1.vertexAttribPointer(v134,4,g132.dtype,false,0,0); +v135.type=g132.dtype; +v135.size=4; +v135.buffer=g132; +v135.normalized=false; +v135.offset=0; +v135.stride=0; +} +v138=g137.location; +v139=v10[v138]; +if(!v139.buffer){ +v1.enableVertexAttribArray(v138); +} +if(v139.type!==g136.dtype||v139.size!==4||v139.buffer!==g136||v139.normalized!==false||v139.offset!==0||v139.stride!==0){ +v1.bindBuffer(34962,g136.buffer); +v1.vertexAttribPointer(v138,4,g136.dtype,false,0,0); +v139.type=g136.dtype; +v139.size=4; +v139.buffer=g136; +v139.normalized=false; +v139.offset=0; +v139.stride=0; +} +v142=g141.location; +v143=v10[v142]; +if(!v143.buffer){ +v1.enableVertexAttribArray(v142); +} +if(v143.type!==g140.dtype||v143.size!==4||v143.buffer!==g140||v143.normalized!==false||v143.offset!==0||v143.stride!==0){ +v1.bindBuffer(34962,g140.buffer); +v1.vertexAttribPointer(v142,4,g140.dtype,false,0,0); +v143.type=g140.dtype; +v143.size=4; +v143.buffer=g140; +v143.normalized=false; +v143.offset=0; +v143.stride=0; +} +v146=g145.location; +v147=v10[v146]; +if(!v147.buffer){ +v1.enableVertexAttribArray(v146); +} +if(v147.type!==g144.dtype||v147.size!==4||v147.buffer!==g144||v147.normalized!==false||v147.offset!==0||v147.stride!==0){ +v1.bindBuffer(34962,g144.buffer); +v1.vertexAttribPointer(v146,4,g144.dtype,false,0,0); +v147.type=g144.dtype; +v147.size=4; +v147.buffer=g144; +v147.normalized=false; +v147.offset=0; +v147.stride=0; +} +v150=g149.location; +v151=v10[v150]; +if(!v151.buffer){ +v1.enableVertexAttribArray(v150); +} +if(v151.type!==g148.dtype||v151.size!==4||v151.buffer!==g148||v151.normalized!==false||v151.offset!==0||v151.stride!==0){ +v1.bindBuffer(34962,g148.buffer); +v1.vertexAttribPointer(v150,4,g148.dtype,false,0,0); +v151.type=g148.dtype; +v151.size=4; +v151.buffer=g148; +v151.normalized=false; +v151.offset=0; +v151.stride=0; +} +v154=g153.location; +v155=v10[v154]; +if(!v155.buffer){ +v1.enableVertexAttribArray(v154); +} +if(v155.type!==g152.dtype||v155.size!==4||v155.buffer!==g152||v155.normalized!==false||v155.offset!==0||v155.stride!==0){ +v1.bindBuffer(34962,g152.buffer); +v1.vertexAttribPointer(v154,4,g152.dtype,false,0,0); +v155.type=g152.dtype; +v155.size=4; +v155.buffer=g152; +v155.normalized=false; +v155.offset=0; +v155.stride=0; +} +v158=g157.location; +v159=v10[v158]; +if(!v159.buffer){ +v1.enableVertexAttribArray(v158); +} +if(v159.type!==g156.dtype||v159.size!==4||v159.buffer!==g156||v159.normalized!==false||v159.offset!==0||v159.stride!==0){ +v1.bindBuffer(34962,g156.buffer); +v1.vertexAttribPointer(v158,4,g156.dtype,false,0,0); +v159.type=g156.dtype; +v159.size=4; +v159.buffer=g156; +v159.normalized=false; +v159.offset=0; +v159.stride=0; +} +v162=g161.location; +v163=v10[v162]; +if(!v163.buffer){ +v1.enableVertexAttribArray(v162); +} +if(v163.type!==g160.dtype||v163.size!==4||v163.buffer!==g160||v163.normalized!==false||v163.offset!==0||v163.stride!==0){ +v1.bindBuffer(34962,g160.buffer); +v1.vertexAttribPointer(v162,4,g160.dtype,false,0,0); +v163.type=g160.dtype; +v163.size=4; +v163.buffer=g160; +v163.normalized=false; +v163.offset=0; +v163.stride=0; +} +v166=g165.location; +v167=v10[v166]; +if(!v167.buffer){ +v1.enableVertexAttribArray(v166); +} +if(v167.type!==g164.dtype||v167.size!==4||v167.buffer!==g164||v167.normalized!==false||v167.offset!==0||v167.stride!==0){ +v1.bindBuffer(34962,g164.buffer); +v1.vertexAttribPointer(v166,4,g164.dtype,false,0,0); +v167.type=g164.dtype; +v167.size=4; +v167.buffer=g164; +v167.normalized=false; +v167.offset=0; +v167.stride=0; +} +v170=g169.location; +v171=v10[v170]; +if(!v171.buffer){ +v1.enableVertexAttribArray(v170); +} +if(v171.type!==g168.dtype||v171.size!==4||v171.buffer!==g168||v171.normalized!==false||v171.offset!==0||v171.stride!==0){ +v1.bindBuffer(34962,g168.buffer); +v1.vertexAttribPointer(v170,4,g168.dtype,false,0,0); +v171.type=g168.dtype; +v171.size=4; +v171.buffer=g168; +v171.normalized=false; +v171.offset=0; +v171.stride=0; +} +v174=g173.location; +v175=v10[v174]; +if(!v175.buffer){ +v1.enableVertexAttribArray(v174); +} +if(v175.type!==g172.dtype||v175.size!==4||v175.buffer!==g172||v175.normalized!==false||v175.offset!==0||v175.stride!==0){ +v1.bindBuffer(34962,g172.buffer); +v1.vertexAttribPointer(v174,4,g172.dtype,false,0,0); +v175.type=g172.dtype; +v175.size=4; +v175.buffer=g172; +v175.normalized=false; +v175.offset=0; +v175.stride=0; +} +v177=a0["contextColor"]; +if(!(v17(v177)&&v177.length===4))g18.commandRaise(g178,g19); +v179=v177[0]; +v180=v177[1]; +v181=v177[2]; +v182=v177[3]; +v1.uniform4f(g176.location,v179,v180,v181,v182); +v184=a0["dim0A"]; +if(!(v17(v184)&&v184.length===16))g18.commandRaise(g185,g19); +v1.uniformMatrix4fv(g183.location,false,(Array.isArray(v184)||v184 instanceof Float32Array)?v184:(v186[0]=v184[0],v186[1]=v184[1],v186[2]=v184[2],v186[3]=v184[3],v186[4]=v184[4],v186[5]=v184[5],v186[6]=v184[6],v186[7]=v184[7],v186[8]=v184[8],v186[9]=v184[9],v186[10]=v184[10],v186[11]=v184[11],v186[12]=v184[12],v186[13]=v184[13],v186[14]=v184[14],v186[15]=v184[15],v186)); +v188=a0["dim0B"]; +if(!(v17(v188)&&v188.length===16))g18.commandRaise(g189,g19); +v1.uniformMatrix4fv(g187.location,false,(Array.isArray(v188)||v188 instanceof Float32Array)?v188:(v190[0]=v188[0],v190[1]=v188[1],v190[2]=v188[2],v190[3]=v188[3],v190[4]=v188[4],v190[5]=v188[5],v190[6]=v188[6],v190[7]=v188[7],v190[8]=v188[8],v190[9]=v188[9],v190[10]=v188[10],v190[11]=v188[11],v190[12]=v188[12],v190[13]=v188[13],v190[14]=v188[14],v190[15]=v188[15],v190)); +v192=a0["dim0C"]; +if(!(v17(v192)&&v192.length===16))g18.commandRaise(g193,g19); +v1.uniformMatrix4fv(g191.location,false,(Array.isArray(v192)||v192 instanceof Float32Array)?v192:(v194[0]=v192[0],v194[1]=v192[1],v194[2]=v192[2],v194[3]=v192[3],v194[4]=v192[4],v194[5]=v192[5],v194[6]=v192[6],v194[7]=v192[7],v194[8]=v192[8],v194[9]=v192[9],v194[10]=v192[10],v194[11]=v192[11],v194[12]=v192[12],v194[13]=v192[13],v194[14]=v192[14],v194[15]=v192[15],v194)); +v196=a0["dim0D"]; +if(!(v17(v196)&&v196.length===16))g18.commandRaise(g197,g19); +v1.uniformMatrix4fv(g195.location,false,(Array.isArray(v196)||v196 instanceof Float32Array)?v196:(v198[0]=v196[0],v198[1]=v196[1],v198[2]=v196[2],v198[3]=v196[3],v198[4]=v196[4],v198[5]=v196[5],v198[6]=v196[6],v198[7]=v196[7],v198[8]=v196[8],v198[9]=v196[9],v198[10]=v196[10],v198[11]=v196[11],v198[12]=v196[12],v198[13]=v196[13],v198[14]=v196[14],v198[15]=v196[15],v198)); +v200=a0["dim1A"]; +if(!(v17(v200)&&v200.length===16))g18.commandRaise(g201,g19); +v1.uniformMatrix4fv(g199.location,false,(Array.isArray(v200)||v200 instanceof Float32Array)?v200:(v202[0]=v200[0],v202[1]=v200[1],v202[2]=v200[2],v202[3]=v200[3],v202[4]=v200[4],v202[5]=v200[5],v202[6]=v200[6],v202[7]=v200[7],v202[8]=v200[8],v202[9]=v200[9],v202[10]=v200[10],v202[11]=v200[11],v202[12]=v200[12],v202[13]=v200[13],v202[14]=v200[14],v202[15]=v200[15],v202)); +v204=a0["dim1B"]; +if(!(v17(v204)&&v204.length===16))g18.commandRaise(g205,g19); +v1.uniformMatrix4fv(g203.location,false,(Array.isArray(v204)||v204 instanceof Float32Array)?v204:(v206[0]=v204[0],v206[1]=v204[1],v206[2]=v204[2],v206[3]=v204[3],v206[4]=v204[4],v206[5]=v204[5],v206[6]=v204[6],v206[7]=v204[7],v206[8]=v204[8],v206[9]=v204[9],v206[10]=v204[10],v206[11]=v204[11],v206[12]=v204[12],v206[13]=v204[13],v206[14]=v204[14],v206[15]=v204[15],v206)); +v208=a0["dim1C"]; +if(!(v17(v208)&&v208.length===16))g18.commandRaise(g209,g19); +v1.uniformMatrix4fv(g207.location,false,(Array.isArray(v208)||v208 instanceof Float32Array)?v208:(v210[0]=v208[0],v210[1]=v208[1],v210[2]=v208[2],v210[3]=v208[3],v210[4]=v208[4],v210[5]=v208[5],v210[6]=v208[6],v210[7]=v208[7],v210[8]=v208[8],v210[9]=v208[9],v210[10]=v208[10],v210[11]=v208[11],v210[12]=v208[12],v210[13]=v208[13],v210[14]=v208[14],v210[15]=v208[15],v210)); +v212=a0["dim1D"]; +if(!(v17(v212)&&v212.length===16))g18.commandRaise(g213,g19); +v1.uniformMatrix4fv(g211.location,false,(Array.isArray(v212)||v212 instanceof Float32Array)?v212:(v214[0]=v212[0],v214[1]=v212[1],v214[2]=v212[2],v214[3]=v212[3],v214[4]=v212[4],v214[5]=v212[5],v214[6]=v212[6],v214[7]=v212[7],v214[8]=v212[8],v214[9]=v212[9],v214[10]=v212[10],v214[11]=v212[11],v214[12]=v212[12],v214[13]=v212[13],v214[14]=v212[14],v214[15]=v212[15],v214)); +v216=a0["drwLayer"]; +if(!(typeof v216==="number"))g18.commandRaise(g217,g19); +v1.uniform1f(g215.location,v216); +v219=a0["hiA"]; +if(!(v17(v219)&&v219.length===16))g18.commandRaise(g220,g19); +v1.uniformMatrix4fv(g218.location,false,(Array.isArray(v219)||v219 instanceof Float32Array)?v219:(v221[0]=v219[0],v221[1]=v219[1],v221[2]=v219[2],v221[3]=v219[3],v221[4]=v219[4],v221[5]=v219[5],v221[6]=v219[6],v221[7]=v219[7],v221[8]=v219[8],v221[9]=v219[9],v221[10]=v219[10],v221[11]=v219[11],v221[12]=v219[12],v221[13]=v219[13],v221[14]=v219[14],v221[15]=v219[15],v221)); +v223=a0["hiB"]; +if(!(v17(v223)&&v223.length===16))g18.commandRaise(g224,g19); +v1.uniformMatrix4fv(g222.location,false,(Array.isArray(v223)||v223 instanceof Float32Array)?v223:(v225[0]=v223[0],v225[1]=v223[1],v225[2]=v223[2],v225[3]=v223[3],v225[4]=v223[4],v225[5]=v223[5],v225[6]=v223[6],v225[7]=v223[7],v225[8]=v223[8],v225[9]=v223[9],v225[10]=v223[10],v225[11]=v223[11],v225[12]=v223[12],v225[13]=v223[13],v225[14]=v223[14],v225[15]=v223[15],v225)); +v227=a0["hiC"]; +if(!(v17(v227)&&v227.length===16))g18.commandRaise(g228,g19); +v1.uniformMatrix4fv(g226.location,false,(Array.isArray(v227)||v227 instanceof Float32Array)?v227:(v229[0]=v227[0],v229[1]=v227[1],v229[2]=v227[2],v229[3]=v227[3],v229[4]=v227[4],v229[5]=v227[5],v229[6]=v227[6],v229[7]=v227[7],v229[8]=v227[8],v229[9]=v227[9],v229[10]=v227[10],v229[11]=v227[11],v229[12]=v227[12],v229[13]=v227[13],v229[14]=v227[14],v229[15]=v227[15],v229)); +v231=a0["hiD"]; +if(!(v17(v231)&&v231.length===16))g18.commandRaise(g232,g19); +v1.uniformMatrix4fv(g230.location,false,(Array.isArray(v231)||v231 instanceof Float32Array)?v231:(v233[0]=v231[0],v233[1]=v231[1],v233[2]=v231[2],v233[3]=v231[3],v233[4]=v231[4],v233[5]=v231[5],v233[6]=v231[6],v233[7]=v231[7],v233[8]=v231[8],v233[9]=v231[9],v233[10]=v231[10],v233[11]=v231[11],v233[12]=v231[12],v233[13]=v231[13],v233[14]=v231[14],v233[15]=v231[15],v233)); +v235=a0["loA"]; +if(!(v17(v235)&&v235.length===16))g18.commandRaise(g236,g19); +v1.uniformMatrix4fv(g234.location,false,(Array.isArray(v235)||v235 instanceof Float32Array)?v235:(v237[0]=v235[0],v237[1]=v235[1],v237[2]=v235[2],v237[3]=v235[3],v237[4]=v235[4],v237[5]=v235[5],v237[6]=v235[6],v237[7]=v235[7],v237[8]=v235[8],v237[9]=v235[9],v237[10]=v235[10],v237[11]=v235[11],v237[12]=v235[12],v237[13]=v235[13],v237[14]=v235[14],v237[15]=v235[15],v237)); +v239=a0["loB"]; +if(!(v17(v239)&&v239.length===16))g18.commandRaise(g240,g19); +v1.uniformMatrix4fv(g238.location,false,(Array.isArray(v239)||v239 instanceof Float32Array)?v239:(v241[0]=v239[0],v241[1]=v239[1],v241[2]=v239[2],v241[3]=v239[3],v241[4]=v239[4],v241[5]=v239[5],v241[6]=v239[6],v241[7]=v239[7],v241[8]=v239[8],v241[9]=v239[9],v241[10]=v239[10],v241[11]=v239[11],v241[12]=v239[12],v241[13]=v239[13],v241[14]=v239[14],v241[15]=v239[15],v241)); +v243=a0["loC"]; +if(!(v17(v243)&&v243.length===16))g18.commandRaise(g244,g19); +v1.uniformMatrix4fv(g242.location,false,(Array.isArray(v243)||v243 instanceof Float32Array)?v243:(v245[0]=v243[0],v245[1]=v243[1],v245[2]=v243[2],v245[3]=v243[3],v245[4]=v243[4],v245[5]=v243[5],v245[6]=v243[6],v245[7]=v243[7],v245[8]=v243[8],v245[9]=v243[9],v245[10]=v243[10],v245[11]=v243[11],v245[12]=v243[12],v245[13]=v243[13],v245[14]=v243[14],v245[15]=v243[15],v245)); +v247=a0["loD"]; +if(!(v17(v247)&&v247.length===16))g18.commandRaise(g248,g19); +v1.uniformMatrix4fv(g246.location,false,(Array.isArray(v247)||v247 instanceof Float32Array)?v247:(v249[0]=v247[0],v249[1]=v247[1],v249[2]=v247[2],v249[3]=v247[3],v249[4]=v247[4],v249[5]=v247[5],v249[6]=v247[6],v249[7]=v247[7],v249[8]=v247[8],v249[9]=v247[9],v249[10]=v247[10],v249[11]=v247[11],v249[12]=v247[12],v249[13]=v247[13],v249[14]=v247[14],v249[15]=v247[15],v249)); +v251=a0["maskHeight"]; +if(!(typeof v251==="number"))g18.commandRaise(g252,g19); +v1.uniform1f(g250.location,v251); +v254=a0["maskTexture"]; +if(v254&&v254._reglType==="framebuffer"){ +v254=v254.color[0]; +} +if(!(typeof v254==="function"&&v254._reglType==="texture2d"))g18.commandRaise(g255,g19); +v256=v254._texture; +v1.uniform1i(g253.location,v256.bind()); +v1.uniform1i(g257.location,g258.bind()); +v260=a0["resolution"]; +if(!(v17(v260)&&v260.length===2))g18.commandRaise(g261,g19); +v262=v260[0]; +v263=v260[1]; +v1.uniform2f(g259.location,v262,v263); +v265=a0["viewBoxPos"]; +if(!(v17(v265)&&v265.length===2))g18.commandRaise(g266,g19); +v267=v265[0]; +v268=v265[1]; +v1.uniform2f(g264.location,v267,v268); +v270=a0["viewBoxSize"]; +if(!(v17(v270)&&v270.length===2))g18.commandRaise(g271,g19); +v272=v270[0]; +v273=v270[1]; +v1.uniform2f(g269.location,v272,v273); +v274=v6.elements; +if(v274){ +v1.bindBuffer(34963,v274.buffer.buffer); +} +else if(v11.currentVAO){ +v274=v7.getElements(v11.currentVAO.elements); +if(v274)v1.bindBuffer(34963,v274.buffer.buffer); +} +v275=a0["offset"]; +if(!(v275>=0))g18.commandRaise(g276,g19); +v277=a0["count"]; +if(!(typeof v277==="number"&&v277>=0&&v277===(v277|0)))g18.commandRaise(g278,g19); +if(v277){ +if(v274){ +v1.drawElements(1,v277,v274.type,v275<<((v274.type-5121)>>1)); +} +else{ +v1.drawArrays(1,v275,v277); +} +v5.dirty=true; +v11.setVAO(null); +v2.viewportWidth=v90; +v2.viewportHeight=v91; +v5.profile=v110; +v256.unbind(); +g258.unbind(); +} +} +,"scope":function(a0,a1,a2){ +var v279,v280,v281,v282,v283,v284,v285,v286,v287,v288,v289,v290,v291,v292,v294,v296,v298,v300,v302,v304,v306,v308,v310,v312,v314,v316,v318,v320,v322,v324,v326,v328,v330,v332,v333,v334,v335,v336,v337,v338,v339,v340,v341,v342,v343,v344,v346,v347,v348,v349,v350,v351,v353,v356,v357,v359,v360,v362,v363,v365,v366,v368,v369,v371,v372,v374,v375,v377,v378,v380,v381,v383,v384,v386,v387,v389,v390,v392,v393,v395,v396,v398,v399,v401,v402,v404,v405,v407,v408,v410,v411,v413,v414,v416,v417,v419,v420,v422,v423,v425,v427,v428,v429,v430,v431,v432,v433,v434,v435,v436,v437,v438,v440,v441,v442,v443,v444,v445,v446,v447,v448,v449,v450,v451,v453,v454,v455,v456,v457,v458,v459,v460,v461,v462,v463,v464,v466,v467,v468,v469,v470,v471,v472,v473,v474,v475,v476,v477,v479,v480,v481,v482,v483,v484,v485,v486,v487,v488,v489,v490,v492,v493,v494,v495,v496,v497,v498,v499,v500,v501,v502,v503,v505,v506,v507,v508,v509,v510,v511,v512,v513,v514,v515,v516,v518,v519,v520,v521,v522,v523,v524,v525,v526,v527,v528,v529,v531,v532,v533,v534,v535,v536,v537,v538,v539,v540,v541,v542,v544,v545,v546,v547,v548,v549,v550,v551,v552,v553,v554,v555,v557,v558,v559,v560,v561,v562,v563,v564,v565,v566,v567,v568,v570,v571,v572,v573,v574,v575,v576,v577,v578,v579,v580,v581,v583,v584,v585,v586,v587,v588,v589,v590,v591,v592,v593,v594,v596,v597,v598,v599,v600,v601,v602,v603,v604,v605,v606,v607,v609,v610,v611,v612,v613,v614,v615,v616,v617,v618,v619,v620,v622,v623,v624,v625,v626,v627,v628,v629,v630,v631,v632,v633,v635,v637; +v279=a0["viewportX"]; +v53.x=v279; +v280=a0["viewportY"]; +v53.y=v280; +v281=a0["viewportWidth"]; +v53.width=v281; +v282=a0["viewportHeight"]; +v53.height=v282; +if(!(v53&&typeof v53==="object"))g18.commandRaise(g85,g19); +v283=v53.x|0; +v284=v53.y|0; +v285="width" in v53?v53.width|0:(v2.framebufferWidth-v283); +v286="height" in v53?v53.height|0:(v2.framebufferHeight-v284); +if(!(v285>=0&&v286>=0))g18.commandRaise(g85,g19); +v287=v2.viewportWidth; +v2.viewportWidth=v285; +v288=v2.viewportHeight; +v2.viewportHeight=v286; +v289=v42[0]; +v42[0]=v283; +v290=v42[1]; +v42[1]=v284; +v291=v42[2]; +v42[2]=v285; +v292=v42[3]; +v42[3]=v286; +v294=v20[0]; +v20[0]=g293; +v296=v20[1]; +v20[1]=g295; +v298=v20[2]; +v20[2]=g297; +v300=v20[3]; +v20[3]=g299; +v302=v4.blend_enable; +v4.blend_enable=g301; +v304=v22[0]; +v22[0]=g303; +v306=v22[1]; +v22[1]=g305; +v308=v24[0]; +v24[0]=g307; +v310=v24[1]; +v24[1]=g309; +v312=v24[2]; +v24[2]=g311; +v314=v24[3]; +v24[3]=g313; +v316=v4.cull_enable; +v4.cull_enable=g315; +v318=v4.cull_face; +v4.cull_face=g317; +v320=v4.depth_enable; +v4.depth_enable=g319; +v322=v4.depth_func; +v4.depth_func=g321; +v324=v4.depth_mask; +v4.depth_mask=g323; +v326=v26[0]; +v26[0]=g325; +v328=v26[1]; +v26[1]=g327; +v330=v4.dither; +v4.dither=g329; +v332=v4.lineWidth; +v4.lineWidth=g331; +v333=a0["scissorX"]; +v54.x=v333; +v334=a0["scissorY"]; +v54.y=v334; +v335=a0["scissorWidth"]; +v54.width=v335; +v336=a0["scissorHeight"]; +v54.height=v336; +if(!(v54&&typeof v54==="object"))g18.commandRaise(g104,g19); +v337=v54.x|0; +v338=v54.y|0; +v339="width" in v54?v54.width|0:(v2.framebufferWidth-v337); +v340="height" in v54?v54.height|0:(v2.framebufferHeight-v338); +if(!(v339>=0&&v340>=0))g18.commandRaise(g104,g19); +v341=v40[0]; +v40[0]=v337; +v342=v40[1]; +v40[1]=v338; +v343=v40[2]; +v40[2]=v339; +v344=v40[3]; +v40[3]=v340; +v346=v4.scissor_enable; +v4.scissor_enable=g345; +v347=v5.profile; +v5.profile=false; +v348=a0["offset"]; +if(!(v348>=0))g18.commandRaise(g276,g19); +v349=v6.offset; +v6.offset=v348; +v350=a0["count"]; +if(!(typeof v350==="number"&&v350>=0&&v350===(v350|0)))g18.commandRaise(g278,g19); +v351=v6.count; +v6.count=v350; +v353=v6.primitive; +v6.primitive=g352; +v356=v12[g355]; +v12[g355]=g354; +v357=a0["resolution"]; +v359=v12[g358]; +v12[g358]=v357; +v360=a0["viewBoxPos"]; +v362=v12[g361]; +v12[g361]=v360; +v363=a0["viewBoxSize"]; +v365=v12[g364]; +v12[g364]=v363; +v366=a0["dim0A"]; +v368=v12[g367]; +v12[g367]=v366; +v369=a0["dim1A"]; +v371=v12[g370]; +v12[g370]=v369; +v372=a0["dim0B"]; +v374=v12[g373]; +v12[g373]=v372; +v375=a0["dim1B"]; +v377=v12[g376]; +v12[g376]=v375; +v378=a0["dim0C"]; +v380=v12[g379]; +v12[g379]=v378; +v381=a0["dim1C"]; +v383=v12[g382]; +v12[g382]=v381; +v384=a0["dim0D"]; +v386=v12[g385]; +v12[g385]=v384; +v387=a0["dim1D"]; +v389=v12[g388]; +v12[g388]=v387; +v390=a0["loA"]; +v392=v12[g391]; +v12[g391]=v390; +v393=a0["hiA"]; +v395=v12[g394]; +v12[g394]=v393; +v396=a0["loB"]; +v398=v12[g397]; +v12[g397]=v396; +v399=a0["hiB"]; +v401=v12[g400]; +v12[g400]=v399; +v402=a0["loC"]; +v404=v12[g403]; +v12[g403]=v402; +v405=a0["hiC"]; +v407=v12[g406]; +v12[g406]=v405; +v408=a0["loD"]; +v410=v12[g409]; +v12[g409]=v408; +v411=a0["hiD"]; +v413=v12[g412]; +v12[g412]=v411; +v414=a0["contextColor"]; +v416=v12[g415]; +v12[g415]=v414; +v417=a0["maskTexture"]; +v419=v12[g418]; +v12[g418]=v417; +v420=a0["drwLayer"]; +v422=v12[g421]; +v12[g421]=v420; +v423=a0["maskHeight"]; +v425=v12[g424]; +v12[g424]=v423; +v427=g426.state; +g426.state=1; +v428=g426.x; +g426.x=0; +v429=g426.y; +g426.y=0; +v430=g426.z; +g426.z=0; +v431=g426.w; +g426.w=0; +v432=g426.buffer; +g426.buffer=g116; +v433=g426.size; +g426.size=0; +v434=g426.normalized; +g426.normalized=false; +v435=g426.type; +g426.type=g116.dtype; +v436=g426.offset; +g426.offset=0; +v437=g426.stride; +g426.stride=0; +v438=g426.divisor; +g426.divisor=0; +v440=g439.state; +g439.state=1; +v441=g439.x; +g439.x=0; +v442=g439.y; +g439.y=0; +v443=g439.z; +g439.z=0; +v444=g439.w; +g439.w=0; +v445=g439.buffer; +g439.buffer=g120; +v446=g439.size; +g439.size=0; +v447=g439.normalized; +g439.normalized=false; +v448=g439.type; +g439.type=g120.dtype; +v449=g439.offset; +g439.offset=0; +v450=g439.stride; +g439.stride=0; +v451=g439.divisor; +g439.divisor=0; +v453=g452.state; +g452.state=1; +v454=g452.x; +g452.x=0; +v455=g452.y; +g452.y=0; +v456=g452.z; +g452.z=0; +v457=g452.w; +g452.w=0; +v458=g452.buffer; +g452.buffer=g124; +v459=g452.size; +g452.size=0; +v460=g452.normalized; +g452.normalized=false; +v461=g452.type; +g452.type=g124.dtype; +v462=g452.offset; +g452.offset=0; +v463=g452.stride; +g452.stride=0; +v464=g452.divisor; +g452.divisor=0; +v466=g465.state; +g465.state=1; +v467=g465.x; +g465.x=0; +v468=g465.y; +g465.y=0; +v469=g465.z; +g465.z=0; +v470=g465.w; +g465.w=0; +v471=g465.buffer; +g465.buffer=g128; +v472=g465.size; +g465.size=0; +v473=g465.normalized; +g465.normalized=false; +v474=g465.type; +g465.type=g128.dtype; +v475=g465.offset; +g465.offset=0; +v476=g465.stride; +g465.stride=0; +v477=g465.divisor; +g465.divisor=0; +v479=g478.state; +g478.state=1; +v480=g478.x; +g478.x=0; +v481=g478.y; +g478.y=0; +v482=g478.z; +g478.z=0; +v483=g478.w; +g478.w=0; +v484=g478.buffer; +g478.buffer=g132; +v485=g478.size; +g478.size=0; +v486=g478.normalized; +g478.normalized=false; +v487=g478.type; +g478.type=g132.dtype; +v488=g478.offset; +g478.offset=0; +v489=g478.stride; +g478.stride=0; +v490=g478.divisor; +g478.divisor=0; +v492=g491.state; +g491.state=1; +v493=g491.x; +g491.x=0; +v494=g491.y; +g491.y=0; +v495=g491.z; +g491.z=0; +v496=g491.w; +g491.w=0; +v497=g491.buffer; +g491.buffer=g136; +v498=g491.size; +g491.size=0; +v499=g491.normalized; +g491.normalized=false; +v500=g491.type; +g491.type=g136.dtype; +v501=g491.offset; +g491.offset=0; +v502=g491.stride; +g491.stride=0; +v503=g491.divisor; +g491.divisor=0; +v505=g504.state; +g504.state=1; +v506=g504.x; +g504.x=0; +v507=g504.y; +g504.y=0; +v508=g504.z; +g504.z=0; +v509=g504.w; +g504.w=0; +v510=g504.buffer; +g504.buffer=g140; +v511=g504.size; +g504.size=0; +v512=g504.normalized; +g504.normalized=false; +v513=g504.type; +g504.type=g140.dtype; +v514=g504.offset; +g504.offset=0; +v515=g504.stride; +g504.stride=0; +v516=g504.divisor; +g504.divisor=0; +v518=g517.state; +g517.state=1; +v519=g517.x; +g517.x=0; +v520=g517.y; +g517.y=0; +v521=g517.z; +g517.z=0; +v522=g517.w; +g517.w=0; +v523=g517.buffer; +g517.buffer=g144; +v524=g517.size; +g517.size=0; +v525=g517.normalized; +g517.normalized=false; +v526=g517.type; +g517.type=g144.dtype; +v527=g517.offset; +g517.offset=0; +v528=g517.stride; +g517.stride=0; +v529=g517.divisor; +g517.divisor=0; +v531=g530.state; +g530.state=1; +v532=g530.x; +g530.x=0; +v533=g530.y; +g530.y=0; +v534=g530.z; +g530.z=0; +v535=g530.w; +g530.w=0; +v536=g530.buffer; +g530.buffer=g148; +v537=g530.size; +g530.size=0; +v538=g530.normalized; +g530.normalized=false; +v539=g530.type; +g530.type=g148.dtype; +v540=g530.offset; +g530.offset=0; +v541=g530.stride; +g530.stride=0; +v542=g530.divisor; +g530.divisor=0; +v544=g543.state; +g543.state=1; +v545=g543.x; +g543.x=0; +v546=g543.y; +g543.y=0; +v547=g543.z; +g543.z=0; +v548=g543.w; +g543.w=0; +v549=g543.buffer; +g543.buffer=g152; +v550=g543.size; +g543.size=0; +v551=g543.normalized; +g543.normalized=false; +v552=g543.type; +g543.type=g152.dtype; +v553=g543.offset; +g543.offset=0; +v554=g543.stride; +g543.stride=0; +v555=g543.divisor; +g543.divisor=0; +v557=g556.state; +g556.state=1; +v558=g556.x; +g556.x=0; +v559=g556.y; +g556.y=0; +v560=g556.z; +g556.z=0; +v561=g556.w; +g556.w=0; +v562=g556.buffer; +g556.buffer=g156; +v563=g556.size; +g556.size=0; +v564=g556.normalized; +g556.normalized=false; +v565=g556.type; +g556.type=g156.dtype; +v566=g556.offset; +g556.offset=0; +v567=g556.stride; +g556.stride=0; +v568=g556.divisor; +g556.divisor=0; +v570=g569.state; +g569.state=1; +v571=g569.x; +g569.x=0; +v572=g569.y; +g569.y=0; +v573=g569.z; +g569.z=0; +v574=g569.w; +g569.w=0; +v575=g569.buffer; +g569.buffer=g160; +v576=g569.size; +g569.size=0; +v577=g569.normalized; +g569.normalized=false; +v578=g569.type; +g569.type=g160.dtype; +v579=g569.offset; +g569.offset=0; +v580=g569.stride; +g569.stride=0; +v581=g569.divisor; +g569.divisor=0; +v583=g582.state; +g582.state=1; +v584=g582.x; +g582.x=0; +v585=g582.y; +g582.y=0; +v586=g582.z; +g582.z=0; +v587=g582.w; +g582.w=0; +v588=g582.buffer; +g582.buffer=g164; +v589=g582.size; +g582.size=0; +v590=g582.normalized; +g582.normalized=false; +v591=g582.type; +g582.type=g164.dtype; +v592=g582.offset; +g582.offset=0; +v593=g582.stride; +g582.stride=0; +v594=g582.divisor; +g582.divisor=0; +v596=g595.state; +g595.state=1; +v597=g595.x; +g595.x=0; +v598=g595.y; +g595.y=0; +v599=g595.z; +g595.z=0; +v600=g595.w; +g595.w=0; +v601=g595.buffer; +g595.buffer=g168; +v602=g595.size; +g595.size=0; +v603=g595.normalized; +g595.normalized=false; +v604=g595.type; +g595.type=g168.dtype; +v605=g595.offset; +g595.offset=0; +v606=g595.stride; +g595.stride=0; +v607=g595.divisor; +g595.divisor=0; +v609=g608.state; +g608.state=1; +v610=g608.x; +g608.x=0; +v611=g608.y; +g608.y=0; +v612=g608.z; +g608.z=0; +v613=g608.w; +g608.w=0; +v614=g608.buffer; +g608.buffer=g172; +v615=g608.size; +g608.size=0; +v616=g608.normalized; +g608.normalized=false; +v617=g608.type; +g608.type=g172.dtype; +v618=g608.offset; +g608.offset=0; +v619=g608.stride; +g608.stride=0; +v620=g608.divisor; +g608.divisor=0; +v622=g621.state; +g621.state=1; +v623=g621.x; +g621.x=0; +v624=g621.y; +g621.y=0; +v625=g621.z; +g621.z=0; +v626=g621.w; +g621.w=0; +v627=g621.buffer; +g621.buffer=g112; +v628=g621.size; +g621.size=0; +v629=g621.normalized; +g621.normalized=false; +v630=g621.type; +g621.type=g112.dtype; +v631=g621.offset; +g621.offset=0; +v632=g621.stride; +g621.stride=0; +v633=g621.divisor; +g621.divisor=0; +v635=v9.vert; +v9.vert=g634; +v637=v9.frag; +v9.frag=g636; +v5.dirty=true; +a1(v2,a0,a2); +v2.viewportWidth=v287; +v2.viewportHeight=v288; +v42[0]=v289; +v42[1]=v290; +v42[2]=v291; +v42[3]=v292; +v20[0]=v294; +v20[1]=v296; +v20[2]=v298; +v20[3]=v300; +v4.blend_enable=v302; +v22[0]=v304; +v22[1]=v306; +v24[0]=v308; +v24[1]=v310; +v24[2]=v312; +v24[3]=v314; +v4.cull_enable=v316; +v4.cull_face=v318; +v4.depth_enable=v320; +v4.depth_func=v322; +v4.depth_mask=v324; +v26[0]=v326; +v26[1]=v328; +v4.dither=v330; +v4.lineWidth=v332; +v40[0]=v341; +v40[1]=v342; +v40[2]=v343; +v40[3]=v344; +v4.scissor_enable=v346; +v5.profile=v347; +v6.offset=v349; +v6.count=v351; +v6.primitive=v353; +v12[g355]=v356; +v12[g358]=v359; +v12[g361]=v362; +v12[g364]=v365; +v12[g367]=v368; +v12[g370]=v371; +v12[g373]=v374; +v12[g376]=v377; +v12[g379]=v380; +v12[g382]=v383; +v12[g385]=v386; +v12[g388]=v389; +v12[g391]=v392; +v12[g394]=v395; +v12[g397]=v398; +v12[g400]=v401; +v12[g403]=v404; +v12[g406]=v407; +v12[g409]=v410; +v12[g412]=v413; +v12[g415]=v416; +v12[g418]=v419; +v12[g421]=v422; +v12[g424]=v425; +g426.state=v427; +g426.x=v428; +g426.y=v429; +g426.z=v430; +g426.w=v431; +g426.buffer=v432; +g426.size=v433; +g426.normalized=v434; +g426.type=v435; +g426.offset=v436; +g426.stride=v437; +g426.divisor=v438; +g439.state=v440; +g439.x=v441; +g439.y=v442; +g439.z=v443; +g439.w=v444; +g439.buffer=v445; +g439.size=v446; +g439.normalized=v447; +g439.type=v448; +g439.offset=v449; +g439.stride=v450; +g439.divisor=v451; +g452.state=v453; +g452.x=v454; +g452.y=v455; +g452.z=v456; +g452.w=v457; +g452.buffer=v458; +g452.size=v459; +g452.normalized=v460; +g452.type=v461; +g452.offset=v462; +g452.stride=v463; +g452.divisor=v464; +g465.state=v466; +g465.x=v467; +g465.y=v468; +g465.z=v469; +g465.w=v470; +g465.buffer=v471; +g465.size=v472; +g465.normalized=v473; +g465.type=v474; +g465.offset=v475; +g465.stride=v476; +g465.divisor=v477; +g478.state=v479; +g478.x=v480; +g478.y=v481; +g478.z=v482; +g478.w=v483; +g478.buffer=v484; +g478.size=v485; +g478.normalized=v486; +g478.type=v487; +g478.offset=v488; +g478.stride=v489; +g478.divisor=v490; +g491.state=v492; +g491.x=v493; +g491.y=v494; +g491.z=v495; +g491.w=v496; +g491.buffer=v497; +g491.size=v498; +g491.normalized=v499; +g491.type=v500; +g491.offset=v501; +g491.stride=v502; +g491.divisor=v503; +g504.state=v505; +g504.x=v506; +g504.y=v507; +g504.z=v508; +g504.w=v509; +g504.buffer=v510; +g504.size=v511; +g504.normalized=v512; +g504.type=v513; +g504.offset=v514; +g504.stride=v515; +g504.divisor=v516; +g517.state=v518; +g517.x=v519; +g517.y=v520; +g517.z=v521; +g517.w=v522; +g517.buffer=v523; +g517.size=v524; +g517.normalized=v525; +g517.type=v526; +g517.offset=v527; +g517.stride=v528; +g517.divisor=v529; +g530.state=v531; +g530.x=v532; +g530.y=v533; +g530.z=v534; +g530.w=v535; +g530.buffer=v536; +g530.size=v537; +g530.normalized=v538; +g530.type=v539; +g530.offset=v540; +g530.stride=v541; +g530.divisor=v542; +g543.state=v544; +g543.x=v545; +g543.y=v546; +g543.z=v547; +g543.w=v548; +g543.buffer=v549; +g543.size=v550; +g543.normalized=v551; +g543.type=v552; +g543.offset=v553; +g543.stride=v554; +g543.divisor=v555; +g556.state=v557; +g556.x=v558; +g556.y=v559; +g556.z=v560; +g556.w=v561; +g556.buffer=v562; +g556.size=v563; +g556.normalized=v564; +g556.type=v565; +g556.offset=v566; +g556.stride=v567; +g556.divisor=v568; +g569.state=v570; +g569.x=v571; +g569.y=v572; +g569.z=v573; +g569.w=v574; +g569.buffer=v575; +g569.size=v576; +g569.normalized=v577; +g569.type=v578; +g569.offset=v579; +g569.stride=v580; +g569.divisor=v581; +g582.state=v583; +g582.x=v584; +g582.y=v585; +g582.z=v586; +g582.w=v587; +g582.buffer=v588; +g582.size=v589; +g582.normalized=v590; +g582.type=v591; +g582.offset=v592; +g582.stride=v593; +g582.divisor=v594; +g595.state=v596; +g595.x=v597; +g595.y=v598; +g595.z=v599; +g595.w=v600; +g595.buffer=v601; +g595.size=v602; +g595.normalized=v603; +g595.type=v604; +g595.offset=v605; +g595.stride=v606; +g595.divisor=v607; +g608.state=v609; +g608.x=v610; +g608.y=v611; +g608.z=v612; +g608.w=v613; +g608.buffer=v614; +g608.size=v615; +g608.normalized=v616; +g608.type=v617; +g608.offset=v618; +g608.stride=v619; +g608.divisor=v620; +g621.state=v622; +g621.x=v623; +g621.y=v624; +g621.z=v625; +g621.w=v626; +g621.buffer=v627; +g621.size=v628; +g621.normalized=v629; +g621.type=v630; +g621.offset=v631; +g621.stride=v632; +g621.divisor=v633; +v9.vert=v635; +v9.frag=v637; +v5.dirty=true; +} +,"batch":function(a0,a1){ +var v638,v673,v674,v675; +v638=v13.next; +if(v638!==v13.cur){ +if(v638){ +v1.bindFramebuffer(36160,v638.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v638; +} +if(v5.dirty){ +var v639,v640,v641,v642,v643,v644,v645,v646,v647,v648,v649,v650,v651,v652,v653,v654,v655,v656,v657,v658,v659,v660,v661,v662,v663; +v639=v28[0]; +v640=v28[1]; +v641=v28[2]; +v642=v28[3]; +if(v639!==v29[0]||v640!==v29[1]||v641!==v29[2]||v642!==v29[3]){ +v1.colorMask(v639,v640,v641,v642); +v29[0]=v639; +v29[1]=v640; +v29[2]=v641; +v29[3]=v642; +} +v643=v4.frontFace; +if(v643!==v5.frontFace){ +v1.frontFace(v643); +v5.frontFace=v643; +} +v644=v4.polygonOffset_enable; +if(v644!==v5.polygonOffset_enable){ +if(v644){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v644; +} +v645=v30[0]; +v646=v30[1]; +if(v645!==v31[0]||v646!==v31[1]){ +v1.polygonOffset(v645,v646); +v31[0]=v645; +v31[1]=v646; +} +v647=v4.sample_alpha; +if(v647!==v5.sample_alpha){ +if(v647){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v647; +} +v648=v4.sample_enable; +if(v648!==v5.sample_enable){ +if(v648){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v648; +} +v649=v32[0]; +v650=v32[1]; +if(v649!==v33[0]||v650!==v33[1]){ +v1.sampleCoverage(v649,v650); +v33[0]=v649; +v33[1]=v650; +} +v651=v4.stencil_enable; +if(v651!==v5.stencil_enable){ +if(v651){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=v651; +} +v652=v4.stencil_mask; +if(v652!==v5.stencil_mask){ +v1.stencilMask(v652); +v5.stencil_mask=v652; +} +v653=v34[0]; +v654=v34[1]; +v655=v34[2]; +if(v653!==v35[0]||v654!==v35[1]||v655!==v35[2]){ +v1.stencilFunc(v653,v654,v655); +v35[0]=v653; +v35[1]=v654; +v35[2]=v655; +} +v656=v36[0]; +v657=v36[1]; +v658=v36[2]; +v659=v36[3]; +if(v656!==v37[0]||v657!==v37[1]||v658!==v37[2]||v659!==v37[3]){ +v1.stencilOpSeparate(v656,v657,v658,v659); +v37[0]=v656; +v37[1]=v657; +v37[2]=v658; +v37[3]=v659; +} +v660=v38[0]; +v661=v38[1]; +v662=v38[2]; +v663=v38[3]; +if(v660!==v39[0]||v661!==v39[1]||v662!==v39[2]||v663!==v39[3]){ +v1.stencilOpSeparate(v660,v661,v662,v663); +v39[0]=v660; +v39[1]=v661; +v39[2]=v662; +v39[3]=v663; +} +} +v1.blendColor(0,0,0,0); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=0; +if(g664){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g664; +v1.blendEquationSeparate(32774,32774); +v23[0]=32774; +v23[1]=32774; +v1.blendFuncSeparate(770,771,1,1); +v25[0]=770; +v25[1]=771; +v25[2]=1; +v25[3]=1; +if(g665){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=g665; +v1.cullFace(g666); +v5.cull_face=g666; +if(g667){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=g667; +v1.depthFunc(g668); +v5.depth_func=g668; +v1.depthMask(g669); +v5.depth_mask=g669; +v1.depthRange(0,1); +v27[0]=0; +v27[1]=1; +if(g670){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=g670; +v1.lineWidth(g671); +v5.lineWidth=g671; +if(g672){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g672; +v673=v5.profile; +v5.profile=false; +v1.useProgram(g111.program); +var v694,v695,v696,v697,v698,v699,v700,v701,v702,v703,v704,v705,v706,v707,v708,v709,v710,v711,v712,v713,v714,v715,v716,v717,v718,v719,v720,v721,v722,v723,v724,v725,v788; +v11.setVAO(null); +v694=g113.location; +v695=v10[v694]; +if(!v695.buffer){ +v1.enableVertexAttribArray(v694); +} +if(v695.type!==g112.dtype||v695.size!==4||v695.buffer!==g112||v695.normalized!==false||v695.offset!==0||v695.stride!==0){ +v1.bindBuffer(34962,g112.buffer); +v1.vertexAttribPointer(v694,4,g112.dtype,false,0,0); +v695.type=g112.dtype; +v695.size=4; +v695.buffer=g112; +v695.normalized=false; +v695.offset=0; +v695.stride=0; +} +v696=g117.location; +v697=v10[v696]; +if(!v697.buffer){ +v1.enableVertexAttribArray(v696); +} +if(v697.type!==g116.dtype||v697.size!==4||v697.buffer!==g116||v697.normalized!==false||v697.offset!==0||v697.stride!==0){ +v1.bindBuffer(34962,g116.buffer); +v1.vertexAttribPointer(v696,4,g116.dtype,false,0,0); +v697.type=g116.dtype; +v697.size=4; +v697.buffer=g116; +v697.normalized=false; +v697.offset=0; +v697.stride=0; +} +v698=g121.location; +v699=v10[v698]; +if(!v699.buffer){ +v1.enableVertexAttribArray(v698); +} +if(v699.type!==g120.dtype||v699.size!==4||v699.buffer!==g120||v699.normalized!==false||v699.offset!==0||v699.stride!==0){ +v1.bindBuffer(34962,g120.buffer); +v1.vertexAttribPointer(v698,4,g120.dtype,false,0,0); +v699.type=g120.dtype; +v699.size=4; +v699.buffer=g120; +v699.normalized=false; +v699.offset=0; +v699.stride=0; +} +v700=g125.location; +v701=v10[v700]; +if(!v701.buffer){ +v1.enableVertexAttribArray(v700); +} +if(v701.type!==g124.dtype||v701.size!==4||v701.buffer!==g124||v701.normalized!==false||v701.offset!==0||v701.stride!==0){ +v1.bindBuffer(34962,g124.buffer); +v1.vertexAttribPointer(v700,4,g124.dtype,false,0,0); +v701.type=g124.dtype; +v701.size=4; +v701.buffer=g124; +v701.normalized=false; +v701.offset=0; +v701.stride=0; +} +v702=g129.location; +v703=v10[v702]; +if(!v703.buffer){ +v1.enableVertexAttribArray(v702); +} +if(v703.type!==g128.dtype||v703.size!==4||v703.buffer!==g128||v703.normalized!==false||v703.offset!==0||v703.stride!==0){ +v1.bindBuffer(34962,g128.buffer); +v1.vertexAttribPointer(v702,4,g128.dtype,false,0,0); +v703.type=g128.dtype; +v703.size=4; +v703.buffer=g128; +v703.normalized=false; +v703.offset=0; +v703.stride=0; +} +v704=g133.location; +v705=v10[v704]; +if(!v705.buffer){ +v1.enableVertexAttribArray(v704); +} +if(v705.type!==g132.dtype||v705.size!==4||v705.buffer!==g132||v705.normalized!==false||v705.offset!==0||v705.stride!==0){ +v1.bindBuffer(34962,g132.buffer); +v1.vertexAttribPointer(v704,4,g132.dtype,false,0,0); +v705.type=g132.dtype; +v705.size=4; +v705.buffer=g132; +v705.normalized=false; +v705.offset=0; +v705.stride=0; +} +v706=g137.location; +v707=v10[v706]; +if(!v707.buffer){ +v1.enableVertexAttribArray(v706); +} +if(v707.type!==g136.dtype||v707.size!==4||v707.buffer!==g136||v707.normalized!==false||v707.offset!==0||v707.stride!==0){ +v1.bindBuffer(34962,g136.buffer); +v1.vertexAttribPointer(v706,4,g136.dtype,false,0,0); +v707.type=g136.dtype; +v707.size=4; +v707.buffer=g136; +v707.normalized=false; +v707.offset=0; +v707.stride=0; +} +v708=g141.location; +v709=v10[v708]; +if(!v709.buffer){ +v1.enableVertexAttribArray(v708); +} +if(v709.type!==g140.dtype||v709.size!==4||v709.buffer!==g140||v709.normalized!==false||v709.offset!==0||v709.stride!==0){ +v1.bindBuffer(34962,g140.buffer); +v1.vertexAttribPointer(v708,4,g140.dtype,false,0,0); +v709.type=g140.dtype; +v709.size=4; +v709.buffer=g140; +v709.normalized=false; +v709.offset=0; +v709.stride=0; +} +v710=g145.location; +v711=v10[v710]; +if(!v711.buffer){ +v1.enableVertexAttribArray(v710); +} +if(v711.type!==g144.dtype||v711.size!==4||v711.buffer!==g144||v711.normalized!==false||v711.offset!==0||v711.stride!==0){ +v1.bindBuffer(34962,g144.buffer); +v1.vertexAttribPointer(v710,4,g144.dtype,false,0,0); +v711.type=g144.dtype; +v711.size=4; +v711.buffer=g144; +v711.normalized=false; +v711.offset=0; +v711.stride=0; +} +v712=g149.location; +v713=v10[v712]; +if(!v713.buffer){ +v1.enableVertexAttribArray(v712); +} +if(v713.type!==g148.dtype||v713.size!==4||v713.buffer!==g148||v713.normalized!==false||v713.offset!==0||v713.stride!==0){ +v1.bindBuffer(34962,g148.buffer); +v1.vertexAttribPointer(v712,4,g148.dtype,false,0,0); +v713.type=g148.dtype; +v713.size=4; +v713.buffer=g148; +v713.normalized=false; +v713.offset=0; +v713.stride=0; +} +v714=g153.location; +v715=v10[v714]; +if(!v715.buffer){ +v1.enableVertexAttribArray(v714); +} +if(v715.type!==g152.dtype||v715.size!==4||v715.buffer!==g152||v715.normalized!==false||v715.offset!==0||v715.stride!==0){ +v1.bindBuffer(34962,g152.buffer); +v1.vertexAttribPointer(v714,4,g152.dtype,false,0,0); +v715.type=g152.dtype; +v715.size=4; +v715.buffer=g152; +v715.normalized=false; +v715.offset=0; +v715.stride=0; +} +v716=g157.location; +v717=v10[v716]; +if(!v717.buffer){ +v1.enableVertexAttribArray(v716); +} +if(v717.type!==g156.dtype||v717.size!==4||v717.buffer!==g156||v717.normalized!==false||v717.offset!==0||v717.stride!==0){ +v1.bindBuffer(34962,g156.buffer); +v1.vertexAttribPointer(v716,4,g156.dtype,false,0,0); +v717.type=g156.dtype; +v717.size=4; +v717.buffer=g156; +v717.normalized=false; +v717.offset=0; +v717.stride=0; +} +v718=g161.location; +v719=v10[v718]; +if(!v719.buffer){ +v1.enableVertexAttribArray(v718); +} +if(v719.type!==g160.dtype||v719.size!==4||v719.buffer!==g160||v719.normalized!==false||v719.offset!==0||v719.stride!==0){ +v1.bindBuffer(34962,g160.buffer); +v1.vertexAttribPointer(v718,4,g160.dtype,false,0,0); +v719.type=g160.dtype; +v719.size=4; +v719.buffer=g160; +v719.normalized=false; +v719.offset=0; +v719.stride=0; +} +v720=g165.location; +v721=v10[v720]; +if(!v721.buffer){ +v1.enableVertexAttribArray(v720); +} +if(v721.type!==g164.dtype||v721.size!==4||v721.buffer!==g164||v721.normalized!==false||v721.offset!==0||v721.stride!==0){ +v1.bindBuffer(34962,g164.buffer); +v1.vertexAttribPointer(v720,4,g164.dtype,false,0,0); +v721.type=g164.dtype; +v721.size=4; +v721.buffer=g164; +v721.normalized=false; +v721.offset=0; +v721.stride=0; +} +v722=g169.location; +v723=v10[v722]; +if(!v723.buffer){ +v1.enableVertexAttribArray(v722); +} +if(v723.type!==g168.dtype||v723.size!==4||v723.buffer!==g168||v723.normalized!==false||v723.offset!==0||v723.stride!==0){ +v1.bindBuffer(34962,g168.buffer); +v1.vertexAttribPointer(v722,4,g168.dtype,false,0,0); +v723.type=g168.dtype; +v723.size=4; +v723.buffer=g168; +v723.normalized=false; +v723.offset=0; +v723.stride=0; +} +v724=g173.location; +v725=v10[v724]; +if(!v725.buffer){ +v1.enableVertexAttribArray(v724); +} +if(v725.type!==g172.dtype||v725.size!==4||v725.buffer!==g172||v725.normalized!==false||v725.offset!==0||v725.stride!==0){ +v1.bindBuffer(34962,g172.buffer); +v1.vertexAttribPointer(v724,4,g172.dtype,false,0,0); +v725.type=g172.dtype; +v725.size=4; +v725.buffer=g172; +v725.normalized=false; +v725.offset=0; +v725.stride=0; +} +v1.uniform1i(g257.location,g258.bind()); +v788=v6.elements; +if(v788){ +v1.bindBuffer(34963,v788.buffer.buffer); +} +else if(v11.currentVAO){ +v788=v7.getElements(v11.currentVAO.elements); +if(v788)v1.bindBuffer(34963,v788.buffer.buffer); +} +for(v674=0; +v674=0&&v683>=0))g18.commandRaise(g85,g19); +v684=v2.viewportWidth; +v2.viewportWidth=v682; +v685=v2.viewportHeight; +v2.viewportHeight=v683; +v1.viewport(v680,v681,v682,v683); +v43[0]=v680; +v43[1]=v681; +v43[2]=v682; +v43[3]=v683; +v686=v675["scissorX"]; +v54.x=v686; +v687=v675["scissorY"]; +v54.y=v687; +v688=v675["scissorWidth"]; +v54.width=v688; +v689=v675["scissorHeight"]; +v54.height=v689; +if(!(v54&&typeof v54==="object"))g18.commandRaise(g104,g19); +v690=v54.x|0; +v691=v54.y|0; +v692="width" in v54?v54.width|0:(v2.framebufferWidth-v690); +v693="height" in v54?v54.height|0:(v2.framebufferHeight-v691); +if(!(v692>=0&&v693>=0))g18.commandRaise(g104,g19); +v1.scissor(v690,v691,v692,v693); +v41[0]=v690; +v41[1]=v691; +v41[2]=v692; +v41[3]=v693; +v726=v675["contextColor"]; +if(!(v17(v726)&&v726.length===4))g18.commandRaise(g178,g19); +v727=v726[0]; +v729=v726[1]; +v731=v726[2]; +v733=v726[3]; +if(!v674||v728!==v727||v730!==v729||v732!==v731||v734!==v733){ +v728=v727; +v730=v729; +v732=v731; +v734=v733; +v1.uniform4f(g176.location,v727,v729,v731,v733); +} +v735=v675["dim0A"]; +if(!(v17(v735)&&v735.length===16))g18.commandRaise(g185,g19); +v1.uniformMatrix4fv(g183.location,false,(Array.isArray(v735)||v735 instanceof Float32Array)?v735:(v736[0]=v735[0],v736[1]=v735[1],v736[2]=v735[2],v736[3]=v735[3],v736[4]=v735[4],v736[5]=v735[5],v736[6]=v735[6],v736[7]=v735[7],v736[8]=v735[8],v736[9]=v735[9],v736[10]=v735[10],v736[11]=v735[11],v736[12]=v735[12],v736[13]=v735[13],v736[14]=v735[14],v736[15]=v735[15],v736)); +v737=v675["dim0B"]; +if(!(v17(v737)&&v737.length===16))g18.commandRaise(g189,g19); +v1.uniformMatrix4fv(g187.location,false,(Array.isArray(v737)||v737 instanceof Float32Array)?v737:(v738[0]=v737[0],v738[1]=v737[1],v738[2]=v737[2],v738[3]=v737[3],v738[4]=v737[4],v738[5]=v737[5],v738[6]=v737[6],v738[7]=v737[7],v738[8]=v737[8],v738[9]=v737[9],v738[10]=v737[10],v738[11]=v737[11],v738[12]=v737[12],v738[13]=v737[13],v738[14]=v737[14],v738[15]=v737[15],v738)); +v739=v675["dim0C"]; +if(!(v17(v739)&&v739.length===16))g18.commandRaise(g193,g19); +v1.uniformMatrix4fv(g191.location,false,(Array.isArray(v739)||v739 instanceof Float32Array)?v739:(v740[0]=v739[0],v740[1]=v739[1],v740[2]=v739[2],v740[3]=v739[3],v740[4]=v739[4],v740[5]=v739[5],v740[6]=v739[6],v740[7]=v739[7],v740[8]=v739[8],v740[9]=v739[9],v740[10]=v739[10],v740[11]=v739[11],v740[12]=v739[12],v740[13]=v739[13],v740[14]=v739[14],v740[15]=v739[15],v740)); +v741=v675["dim0D"]; +if(!(v17(v741)&&v741.length===16))g18.commandRaise(g197,g19); +v1.uniformMatrix4fv(g195.location,false,(Array.isArray(v741)||v741 instanceof Float32Array)?v741:(v742[0]=v741[0],v742[1]=v741[1],v742[2]=v741[2],v742[3]=v741[3],v742[4]=v741[4],v742[5]=v741[5],v742[6]=v741[6],v742[7]=v741[7],v742[8]=v741[8],v742[9]=v741[9],v742[10]=v741[10],v742[11]=v741[11],v742[12]=v741[12],v742[13]=v741[13],v742[14]=v741[14],v742[15]=v741[15],v742)); +v743=v675["dim1A"]; +if(!(v17(v743)&&v743.length===16))g18.commandRaise(g201,g19); +v1.uniformMatrix4fv(g199.location,false,(Array.isArray(v743)||v743 instanceof Float32Array)?v743:(v744[0]=v743[0],v744[1]=v743[1],v744[2]=v743[2],v744[3]=v743[3],v744[4]=v743[4],v744[5]=v743[5],v744[6]=v743[6],v744[7]=v743[7],v744[8]=v743[8],v744[9]=v743[9],v744[10]=v743[10],v744[11]=v743[11],v744[12]=v743[12],v744[13]=v743[13],v744[14]=v743[14],v744[15]=v743[15],v744)); +v745=v675["dim1B"]; +if(!(v17(v745)&&v745.length===16))g18.commandRaise(g205,g19); +v1.uniformMatrix4fv(g203.location,false,(Array.isArray(v745)||v745 instanceof Float32Array)?v745:(v746[0]=v745[0],v746[1]=v745[1],v746[2]=v745[2],v746[3]=v745[3],v746[4]=v745[4],v746[5]=v745[5],v746[6]=v745[6],v746[7]=v745[7],v746[8]=v745[8],v746[9]=v745[9],v746[10]=v745[10],v746[11]=v745[11],v746[12]=v745[12],v746[13]=v745[13],v746[14]=v745[14],v746[15]=v745[15],v746)); +v747=v675["dim1C"]; +if(!(v17(v747)&&v747.length===16))g18.commandRaise(g209,g19); +v1.uniformMatrix4fv(g207.location,false,(Array.isArray(v747)||v747 instanceof Float32Array)?v747:(v748[0]=v747[0],v748[1]=v747[1],v748[2]=v747[2],v748[3]=v747[3],v748[4]=v747[4],v748[5]=v747[5],v748[6]=v747[6],v748[7]=v747[7],v748[8]=v747[8],v748[9]=v747[9],v748[10]=v747[10],v748[11]=v747[11],v748[12]=v747[12],v748[13]=v747[13],v748[14]=v747[14],v748[15]=v747[15],v748)); +v749=v675["dim1D"]; +if(!(v17(v749)&&v749.length===16))g18.commandRaise(g213,g19); +v1.uniformMatrix4fv(g211.location,false,(Array.isArray(v749)||v749 instanceof Float32Array)?v749:(v750[0]=v749[0],v750[1]=v749[1],v750[2]=v749[2],v750[3]=v749[3],v750[4]=v749[4],v750[5]=v749[5],v750[6]=v749[6],v750[7]=v749[7],v750[8]=v749[8],v750[9]=v749[9],v750[10]=v749[10],v750[11]=v749[11],v750[12]=v749[12],v750[13]=v749[13],v750[14]=v749[14],v750[15]=v749[15],v750)); +v751=v675["drwLayer"]; +if(!(typeof v751==="number"))g18.commandRaise(g217,g19); +if(!v674||v752!==v751){ +v752=v751; +v1.uniform1f(g215.location,v751); +} +v753=v675["hiA"]; +if(!(v17(v753)&&v753.length===16))g18.commandRaise(g220,g19); +v1.uniformMatrix4fv(g218.location,false,(Array.isArray(v753)||v753 instanceof Float32Array)?v753:(v754[0]=v753[0],v754[1]=v753[1],v754[2]=v753[2],v754[3]=v753[3],v754[4]=v753[4],v754[5]=v753[5],v754[6]=v753[6],v754[7]=v753[7],v754[8]=v753[8],v754[9]=v753[9],v754[10]=v753[10],v754[11]=v753[11],v754[12]=v753[12],v754[13]=v753[13],v754[14]=v753[14],v754[15]=v753[15],v754)); +v755=v675["hiB"]; +if(!(v17(v755)&&v755.length===16))g18.commandRaise(g224,g19); +v1.uniformMatrix4fv(g222.location,false,(Array.isArray(v755)||v755 instanceof Float32Array)?v755:(v756[0]=v755[0],v756[1]=v755[1],v756[2]=v755[2],v756[3]=v755[3],v756[4]=v755[4],v756[5]=v755[5],v756[6]=v755[6],v756[7]=v755[7],v756[8]=v755[8],v756[9]=v755[9],v756[10]=v755[10],v756[11]=v755[11],v756[12]=v755[12],v756[13]=v755[13],v756[14]=v755[14],v756[15]=v755[15],v756)); +v757=v675["hiC"]; +if(!(v17(v757)&&v757.length===16))g18.commandRaise(g228,g19); +v1.uniformMatrix4fv(g226.location,false,(Array.isArray(v757)||v757 instanceof Float32Array)?v757:(v758[0]=v757[0],v758[1]=v757[1],v758[2]=v757[2],v758[3]=v757[3],v758[4]=v757[4],v758[5]=v757[5],v758[6]=v757[6],v758[7]=v757[7],v758[8]=v757[8],v758[9]=v757[9],v758[10]=v757[10],v758[11]=v757[11],v758[12]=v757[12],v758[13]=v757[13],v758[14]=v757[14],v758[15]=v757[15],v758)); +v759=v675["hiD"]; +if(!(v17(v759)&&v759.length===16))g18.commandRaise(g232,g19); +v1.uniformMatrix4fv(g230.location,false,(Array.isArray(v759)||v759 instanceof Float32Array)?v759:(v760[0]=v759[0],v760[1]=v759[1],v760[2]=v759[2],v760[3]=v759[3],v760[4]=v759[4],v760[5]=v759[5],v760[6]=v759[6],v760[7]=v759[7],v760[8]=v759[8],v760[9]=v759[9],v760[10]=v759[10],v760[11]=v759[11],v760[12]=v759[12],v760[13]=v759[13],v760[14]=v759[14],v760[15]=v759[15],v760)); +v761=v675["loA"]; +if(!(v17(v761)&&v761.length===16))g18.commandRaise(g236,g19); +v1.uniformMatrix4fv(g234.location,false,(Array.isArray(v761)||v761 instanceof Float32Array)?v761:(v762[0]=v761[0],v762[1]=v761[1],v762[2]=v761[2],v762[3]=v761[3],v762[4]=v761[4],v762[5]=v761[5],v762[6]=v761[6],v762[7]=v761[7],v762[8]=v761[8],v762[9]=v761[9],v762[10]=v761[10],v762[11]=v761[11],v762[12]=v761[12],v762[13]=v761[13],v762[14]=v761[14],v762[15]=v761[15],v762)); +v763=v675["loB"]; +if(!(v17(v763)&&v763.length===16))g18.commandRaise(g240,g19); +v1.uniformMatrix4fv(g238.location,false,(Array.isArray(v763)||v763 instanceof Float32Array)?v763:(v764[0]=v763[0],v764[1]=v763[1],v764[2]=v763[2],v764[3]=v763[3],v764[4]=v763[4],v764[5]=v763[5],v764[6]=v763[6],v764[7]=v763[7],v764[8]=v763[8],v764[9]=v763[9],v764[10]=v763[10],v764[11]=v763[11],v764[12]=v763[12],v764[13]=v763[13],v764[14]=v763[14],v764[15]=v763[15],v764)); +v765=v675["loC"]; +if(!(v17(v765)&&v765.length===16))g18.commandRaise(g244,g19); +v1.uniformMatrix4fv(g242.location,false,(Array.isArray(v765)||v765 instanceof Float32Array)?v765:(v766[0]=v765[0],v766[1]=v765[1],v766[2]=v765[2],v766[3]=v765[3],v766[4]=v765[4],v766[5]=v765[5],v766[6]=v765[6],v766[7]=v765[7],v766[8]=v765[8],v766[9]=v765[9],v766[10]=v765[10],v766[11]=v765[11],v766[12]=v765[12],v766[13]=v765[13],v766[14]=v765[14],v766[15]=v765[15],v766)); +v767=v675["loD"]; +if(!(v17(v767)&&v767.length===16))g18.commandRaise(g248,g19); +v1.uniformMatrix4fv(g246.location,false,(Array.isArray(v767)||v767 instanceof Float32Array)?v767:(v768[0]=v767[0],v768[1]=v767[1],v768[2]=v767[2],v768[3]=v767[3],v768[4]=v767[4],v768[5]=v767[5],v768[6]=v767[6],v768[7]=v767[7],v768[8]=v767[8],v768[9]=v767[9],v768[10]=v767[10],v768[11]=v767[11],v768[12]=v767[12],v768[13]=v767[13],v768[14]=v767[14],v768[15]=v767[15],v768)); +v769=v675["maskHeight"]; +if(!(typeof v769==="number"))g18.commandRaise(g252,g19); +if(!v674||v770!==v769){ +v770=v769; +v1.uniform1f(g250.location,v769); +} +v771=v675["maskTexture"]; +if(v771&&v771._reglType==="framebuffer"){ +v771=v771.color[0]; +} +if(!(typeof v771==="function"&&v771._reglType==="texture2d"))g18.commandRaise(g255,g19); +v772=v771._texture; +v1.uniform1i(g253.location,v772.bind()); +v773=v675["resolution"]; +if(!(v17(v773)&&v773.length===2))g18.commandRaise(g261,g19); +v774=v773[0]; +v776=v773[1]; +if(!v674||v775!==v774||v777!==v776){ +v775=v774; +v777=v776; +v1.uniform2f(g259.location,v774,v776); +} +v778=v675["viewBoxPos"]; +if(!(v17(v778)&&v778.length===2))g18.commandRaise(g266,g19); +v779=v778[0]; +v781=v778[1]; +if(!v674||v780!==v779||v782!==v781){ +v780=v779; +v782=v781; +v1.uniform2f(g264.location,v779,v781); +} +v783=v675["viewBoxSize"]; +if(!(v17(v783)&&v783.length===2))g18.commandRaise(g271,g19); +v784=v783[0]; +v786=v783[1]; +if(!v674||v785!==v784||v787!==v786){ +v785=v784; +v787=v786; +v1.uniform2f(g269.location,v784,v786); +} +v789=v675["offset"]; +if(!(v789>=0))g18.commandRaise(g276,g19); +v790=v675["count"]; +if(!(typeof v790==="number"&&v790>=0&&v790===(v790|0)))g18.commandRaise(g278,g19); +if(v790){ +if(v788){ +v1.drawElements(1,v790,v788.type,v789<<((v788.type-5121)>>1)); +} +else{ +v1.drawArrays(1,v789,v790); +} +v2.viewportWidth=v684; +v2.viewportHeight=v685; +v772.unbind(); +} +} +g258.unbind(); +v5.dirty=true; +v11.setVAO(null); +v5.profile=v673; +} +,} + +} \ No newline at end of file diff --git a/src/generated/regl-codegen/f9448a214a3e3cd439b767559aa71a4d1ccf5a8f39b8b756973e71acd33ff956 b/src/generated/regl-codegen/f9448a214a3e3cd439b767559aa71a4d1ccf5a8f39b8b756973e71acd33ff956 new file mode 100644 index 00000000000..3d04938a941 --- /dev/null +++ b/src/generated/regl-codegen/f9448a214a3e3cd439b767559aa71a4d1ccf5a8f39b8b756973e71acd33ff956 @@ -0,0 +1,2755 @@ +module.exports = function anonymous(g0,g18,g19,g52,g92,g99,g100,g101,g102,g104,g106,g111,g112,g115,g118,g132,g137,g151,g156,g170,g175,g189,g193,g194,g197,g201,g215,g220,g234,g238,g240,g241,g243,g245,g247,g248,g250,g251,g252,g254,g255,g257,g258,g260,g263,g265,g266,g268,g271,g272,g274,g292,g294,g296,g298,g300,g302,g304,g306,g308,g310,g312,g314,g316,g329,g331,g335,g337,g341,g344,g347,g350,g353,g356,g359,g362,g365,g368,g371,g374,g377,g380,g383,g385,g398,g425,g452,g479,g506,g533,g560,g573,g575,g609,g610,g611,g612,g613 +) { +"use strict"; +var v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v53,v54,v55,v56,v57,v58; +v1=g0.gl; +v2=g0.context; +v3=g0.strings; +v4=g0.next; +v5=g0.current; +v6=g0.draw; +v7=g0.elements; +v8=g0.buffer; +v9=g0.shader; +v10=g0.attributes; +v11=g0.vao; +v12=g0.uniforms; +v13=g0.framebuffer; +v14=g0.extensions; +v15=g0.timer; +v16=g0.isBufferArgs; +v17=g0.isArrayLike; +v20=v4.blend_color; +v21=v5.blend_color; +v22=v4.blend_equation; +v23=v5.blend_equation; +v24=v4.blend_func; +v25=v5.blend_func; +v26=v4.depth_range; +v27=v5.depth_range; +v28=v4.colorMask; +v29=v5.colorMask; +v30=v4.polygonOffset_offset; +v31=v5.polygonOffset_offset; +v32=v4.sample_coverage; +v33=v5.sample_coverage; +v34=v4.stencil_func; +v35=v5.stencil_func; +v36=v4.stencil_opFront; +v37=v5.stencil_opFront; +v38=v4.stencil_opBack; +v39=v5.stencil_opBack; +v40=v4.scissor_box; +v41=v5.scissor_box; +v42=v4.viewport; +v43=v5.viewport; +v44={ +"points":0,"point":0,"lines":1,"line":1,"triangles":4,"triangle":4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6} +; +v45={ +"never":512,"less":513,"<":513,"equal":514,"=":514,"==":514,"===":514,"lequal":515,"<=":515,"greater":516,">":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +v53={ +} +; +v53.stride=4; +v53.offset=0; +v53.divisor=1; +v54={ +} +; +v54.stride=4; +v54.offset=4; +v54.divisor=1; +v55={ +} +; +v55.stride=8; +v55.offset=0; +v55.divisor=1; +v56={ +} +; +v56.stride=8; +v56.offset=8; +v56.divisor=1; +v57={ +} +; +v57.stride=8; +v57.offset=16; +v57.divisor=1; +v58={ +} +; +v58.stride=8; +v58.offset=24; +v58.divisor=1; +return { +"draw":function(a0){ +var v59,v60,v91,v93,v94,v95,v96,v97,v98,v103,v105,v107,v108,v109,v110,v113,v114,v116,v117,v119,v120,v121,v122,v123,v124,v125,v126,v127,v128,v129,v130,v131,v133,v134,v135,v136,v138,v139,v140,v141,v142,v143,v144,v145,v146,v147,v148,v149,v150,v152,v153,v154,v155,v157,v158,v159,v160,v161,v162,v163,v164,v165,v166,v167,v168,v169,v171,v172,v173,v174,v176,v177,v178,v179,v180,v181,v182,v183,v184,v185,v186,v187,v188,v190,v191,v192,v195,v196,v198,v199,v200,v202,v203,v204,v205,v206,v207,v208,v209,v210,v211,v212,v213,v214,v216,v217,v218,v219,v221,v222,v223,v224,v225,v226,v227,v228,v229,v230,v231,v232,v233,v235,v236,v237,v239,v242,v244,v246,v249,v253,v256,v259,v261,v262,v264,v267,v269,v270,v273,v275,v276,v277,v278,v279,v280; +v59=v14.angle_instanced_arrays; +v60=v13.next; +if(v60!==v13.cur){ +if(v60){ +v1.bindFramebuffer(36160,v60.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v60; +} +if(v5.dirty){ +var v61,v62,v63,v64,v65,v66,v67,v68,v69,v70,v71,v72,v73,v74,v75,v76,v77,v78,v79,v80,v81,v82,v83,v84,v85,v86,v87,v88,v89,v90; +v61=v4.dither; +if(v61!==v5.dither){ +if(v61){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v61; +} +v62=v4.depth_func; +if(v62!==v5.depth_func){ +v1.depthFunc(v62); +v5.depth_func=v62; +} +v63=v26[0]; +v64=v26[1]; +if(v63!==v27[0]||v64!==v27[1]){ +v1.depthRange(v63,v64); +v27[0]=v63; +v27[1]=v64; +} +v65=v4.depth_mask; +if(v65!==v5.depth_mask){ +v1.depthMask(v65); +v5.depth_mask=v65; +} +v66=v28[0]; +v67=v28[1]; +v68=v28[2]; +v69=v28[3]; +if(v66!==v29[0]||v67!==v29[1]||v68!==v29[2]||v69!==v29[3]){ +v1.colorMask(v66,v67,v68,v69); +v29[0]=v66; +v29[1]=v67; +v29[2]=v68; +v29[3]=v69; +} +v70=v4.frontFace; +if(v70!==v5.frontFace){ +v1.frontFace(v70); +v5.frontFace=v70; +} +v71=v4.lineWidth; +if(v71!==v5.lineWidth){ +v1.lineWidth(v71); +v5.lineWidth=v71; +} +v72=v4.polygonOffset_enable; +if(v72!==v5.polygonOffset_enable){ +if(v72){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v72; +} +v73=v30[0]; +v74=v30[1]; +if(v73!==v31[0]||v74!==v31[1]){ +v1.polygonOffset(v73,v74); +v31[0]=v73; +v31[1]=v74; +} +v75=v4.sample_alpha; +if(v75!==v5.sample_alpha){ +if(v75){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v75; +} +v76=v4.sample_enable; +if(v76!==v5.sample_enable){ +if(v76){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v76; +} +v77=v32[0]; +v78=v32[1]; +if(v77!==v33[0]||v78!==v33[1]){ +v1.sampleCoverage(v77,v78); +v33[0]=v77; +v33[1]=v78; +} +v79=v4.stencil_mask; +if(v79!==v5.stencil_mask){ +v1.stencilMask(v79); +v5.stencil_mask=v79; +} +v80=v34[0]; +v81=v34[1]; +v82=v34[2]; +if(v80!==v35[0]||v81!==v35[1]||v82!==v35[2]){ +v1.stencilFunc(v80,v81,v82); +v35[0]=v80; +v35[1]=v81; +v35[2]=v82; +} +v83=v36[0]; +v84=v36[1]; +v85=v36[2]; +v86=v36[3]; +if(v83!==v37[0]||v84!==v37[1]||v85!==v37[2]||v86!==v37[3]){ +v1.stencilOpSeparate(v83,v84,v85,v86); +v37[0]=v83; +v37[1]=v84; +v37[2]=v85; +v37[3]=v86; +} +v87=v38[0]; +v88=v38[1]; +v89=v38[2]; +v90=v38[3]; +if(v87!==v39[0]||v88!==v39[1]||v89!==v39[2]||v90!==v39[3]){ +v1.stencilOpSeparate(v87,v88,v89,v90); +v39[0]=v87; +v39[1]=v88; +v39[2]=v89; +v39[3]=v90; +} +} +v91=a0["viewport"]; +if(!(v91&&typeof v91==="object"))g18.commandRaise(g92,g19); +v93=v91.x|0; +v94=v91.y|0; +v95="width" in v91?v91.width|0:(v2.framebufferWidth-v93); +v96="height" in v91?v91.height|0:(v2.framebufferHeight-v94); +if(!(v95>=0&&v96>=0))g18.commandRaise(g92,g19); +v97=v2.viewportWidth; +v2.viewportWidth=v95; +v98=v2.viewportHeight; +v2.viewportHeight=v96; +v1.viewport(v93,v94,v95,v96); +v43[0]=v93; +v43[1]=v94; +v43[2]=v95; +v43[3]=v96; +v1.blendColor(0,0,0,0); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=0; +if(g99){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g99; +v1.blendEquationSeparate(32774,32774); +v23[0]=32774; +v23[1]=32774; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +if(g100){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=g100; +v1.cullFace(g101); +v5.cull_face=g101; +v103=g102.call(this,v2,a0,0); +if(!(typeof v103==="boolean"))g18.commandRaise(g104,g19); +if(v103){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=v103; +v105=a0["viewport"]; +if(!(v105&&typeof v105==="object"))g18.commandRaise(g106,g19); +v107=v105.x|0; +v108=v105.y|0; +v109="width" in v105?v105.width|0:(v2.framebufferWidth-v107); +v110="height" in v105?v105.height|0:(v2.framebufferHeight-v108); +if(!(v109>=0&&v110>=0))g18.commandRaise(g106,g19); +v1.scissor(v107,v108,v109,v110); +v41[0]=v107; +v41[1]=v108; +v41[2]=v109; +v41[3]=v110; +if(g111){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g111; +if(g112){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=g112; +v113=v5.profile; +if(v113){ +v114=performance.now(); +g52.count++; +} +v1.useProgram(g115.program); +v116=v14.angle_instanced_arrays; +v11.setVAO(null); +v117=a0["colorBuffer"]; +v53.buffer=v117; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g118,g19); +v119=false; +v120=1; +v121=0; +v122=0; +v123=0; +v124=0; +v125=null; +v126=0; +v127=false; +v128=5126; +v129=0; +v130=0; +v131=0; +if(v16(v53)){ +v119=true; +v125=v8.createStream(34962,v53); +v128=v125.dtype; +} +else{ +v125=v8.getBuffer(v53); +if(v125){ +v128=v125.dtype; +} +else if("constant" in v53){ +v120=2; +if(typeof v53.constant === "number"){ +v121=v53.constant; +v122=v123=v124=0; +} +else{ +v121=v53.constant.length>0?v53.constant[0]:0; +v122=v53.constant.length>1?v53.constant[1]:0; +v123=v53.constant.length>2?v53.constant[2]:0; +v124=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v125=v8.createStream(34962,v53.buffer); +} +else{ +v125=v8.getBuffer(v53.buffer); +} +v128="type" in v53?v49[v53.type]:v125.dtype; +v127=!!v53.normalized; +v126=v53.size|0; +v129=v53.offset|0; +v130=v53.stride|0; +v131=v53.divisor|0; +} +} +v133=g132.location; +v134=v10[v133]; +if(v120===1){ +if(!v134.buffer){ +v1.enableVertexAttribArray(v133); +} +v135=v126||4; +if(v134.type!==v128||v134.size!==v135||v134.buffer!==v125||v134.normalized!==v127||v134.offset!==v129||v134.stride!==v130){ +v1.bindBuffer(34962,v125.buffer); +v1.vertexAttribPointer(v133,v135,v128,v127,v130,v129); +v134.type=v128; +v134.size=v135; +v134.buffer=v125; +v134.normalized=v127; +v134.offset=v129; +v134.stride=v130; +} +if(v134.divisor!==v131){ +v116.vertexAttribDivisorANGLE(v133,v131); +v134.divisor=v131; +} +} +else{ +if(v134.buffer){ +v1.disableVertexAttribArray(v133); +v134.buffer=null; +} +if(v134.x!==v121||v134.y!==v122||v134.z!==v123||v134.w!==v124){ +v1.vertexAttrib4f(v133,v121,v122,v123,v124); +v134.x=v121; +v134.y=v122; +v134.z=v123; +v134.w=v124; +} +} +v136=a0["positionBuffer"]; +v56.buffer=v136; +if(!(v56&&(typeof v56==="object"||typeof v56==="function")&&(v16(v56)||v8.getBuffer(v56)||v8.getBuffer(v56.buffer)||v16(v56.buffer)||("constant" in v56&&(typeof v56.constant==="number"||v17(v56.constant))))))g18.commandRaise(g137,g19); +v138=false; +v139=1; +v140=0; +v141=0; +v142=0; +v143=0; +v144=null; +v145=0; +v146=false; +v147=5126; +v148=0; +v149=0; +v150=0; +if(v16(v56)){ +v138=true; +v144=v8.createStream(34962,v56); +v147=v144.dtype; +} +else{ +v144=v8.getBuffer(v56); +if(v144){ +v147=v144.dtype; +} +else if("constant" in v56){ +v139=2; +if(typeof v56.constant === "number"){ +v140=v56.constant; +v141=v142=v143=0; +} +else{ +v140=v56.constant.length>0?v56.constant[0]:0; +v141=v56.constant.length>1?v56.constant[1]:0; +v142=v56.constant.length>2?v56.constant[2]:0; +v143=v56.constant.length>3?v56.constant[3]:0; +} +} +else{ +if(v16(v56.buffer)){ +v144=v8.createStream(34962,v56.buffer); +} +else{ +v144=v8.getBuffer(v56.buffer); +} +v147="type" in v56?v49[v56.type]:v144.dtype; +v146=!!v56.normalized; +v145=v56.size|0; +v148=v56.offset|0; +v149=v56.stride|0; +v150=v56.divisor|0; +} +} +v152=g151.location; +v153=v10[v152]; +if(v139===1){ +if(!v153.buffer){ +v1.enableVertexAttribArray(v152); +} +v154=v145||2; +if(v153.type!==v147||v153.size!==v154||v153.buffer!==v144||v153.normalized!==v146||v153.offset!==v148||v153.stride!==v149){ +v1.bindBuffer(34962,v144.buffer); +v1.vertexAttribPointer(v152,v154,v147,v146,v149,v148); +v153.type=v147; +v153.size=v154; +v153.buffer=v144; +v153.normalized=v146; +v153.offset=v148; +v153.stride=v149; +} +if(v153.divisor!==v150){ +v116.vertexAttribDivisorANGLE(v152,v150); +v153.divisor=v150; +} +} +else{ +if(v153.buffer){ +v1.disableVertexAttribArray(v152); +v153.buffer=null; +} +if(v153.x!==v140||v153.y!==v141||v153.z!==v142||v153.w!==v143){ +v1.vertexAttrib4f(v152,v140,v141,v142,v143); +v153.x=v140; +v153.y=v141; +v153.z=v142; +v153.w=v143; +} +} +v155=a0["colorBuffer"]; +v54.buffer=v155; +if(!(v54&&(typeof v54==="object"||typeof v54==="function")&&(v16(v54)||v8.getBuffer(v54)||v8.getBuffer(v54.buffer)||v16(v54.buffer)||("constant" in v54&&(typeof v54.constant==="number"||v17(v54.constant))))))g18.commandRaise(g156,g19); +v157=false; +v158=1; +v159=0; +v160=0; +v161=0; +v162=0; +v163=null; +v164=0; +v165=false; +v166=5126; +v167=0; +v168=0; +v169=0; +if(v16(v54)){ +v157=true; +v163=v8.createStream(34962,v54); +v166=v163.dtype; +} +else{ +v163=v8.getBuffer(v54); +if(v163){ +v166=v163.dtype; +} +else if("constant" in v54){ +v158=2; +if(typeof v54.constant === "number"){ +v159=v54.constant; +v160=v161=v162=0; +} +else{ +v159=v54.constant.length>0?v54.constant[0]:0; +v160=v54.constant.length>1?v54.constant[1]:0; +v161=v54.constant.length>2?v54.constant[2]:0; +v162=v54.constant.length>3?v54.constant[3]:0; +} +} +else{ +if(v16(v54.buffer)){ +v163=v8.createStream(34962,v54.buffer); +} +else{ +v163=v8.getBuffer(v54.buffer); +} +v166="type" in v54?v49[v54.type]:v163.dtype; +v165=!!v54.normalized; +v164=v54.size|0; +v167=v54.offset|0; +v168=v54.stride|0; +v169=v54.divisor|0; +} +} +v171=g170.location; +v172=v10[v171]; +if(v158===1){ +if(!v172.buffer){ +v1.enableVertexAttribArray(v171); +} +v173=v164||4; +if(v172.type!==v166||v172.size!==v173||v172.buffer!==v163||v172.normalized!==v165||v172.offset!==v167||v172.stride!==v168){ +v1.bindBuffer(34962,v163.buffer); +v1.vertexAttribPointer(v171,v173,v166,v165,v168,v167); +v172.type=v166; +v172.size=v173; +v172.buffer=v163; +v172.normalized=v165; +v172.offset=v167; +v172.stride=v168; +} +if(v172.divisor!==v169){ +v116.vertexAttribDivisorANGLE(v171,v169); +v172.divisor=v169; +} +} +else{ +if(v172.buffer){ +v1.disableVertexAttribArray(v171); +v172.buffer=null; +} +if(v172.x!==v159||v172.y!==v160||v172.z!==v161||v172.w!==v162){ +v1.vertexAttrib4f(v171,v159,v160,v161,v162); +v172.x=v159; +v172.y=v160; +v172.z=v161; +v172.w=v162; +} +} +v174=a0["positionBuffer"]; +v57.buffer=v174; +if(!(v57&&(typeof v57==="object"||typeof v57==="function")&&(v16(v57)||v8.getBuffer(v57)||v8.getBuffer(v57.buffer)||v16(v57.buffer)||("constant" in v57&&(typeof v57.constant==="number"||v17(v57.constant))))))g18.commandRaise(g175,g19); +v176=false; +v177=1; +v178=0; +v179=0; +v180=0; +v181=0; +v182=null; +v183=0; +v184=false; +v185=5126; +v186=0; +v187=0; +v188=0; +if(v16(v57)){ +v176=true; +v182=v8.createStream(34962,v57); +v185=v182.dtype; +} +else{ +v182=v8.getBuffer(v57); +if(v182){ +v185=v182.dtype; +} +else if("constant" in v57){ +v177=2; +if(typeof v57.constant === "number"){ +v178=v57.constant; +v179=v180=v181=0; +} +else{ +v178=v57.constant.length>0?v57.constant[0]:0; +v179=v57.constant.length>1?v57.constant[1]:0; +v180=v57.constant.length>2?v57.constant[2]:0; +v181=v57.constant.length>3?v57.constant[3]:0; +} +} +else{ +if(v16(v57.buffer)){ +v182=v8.createStream(34962,v57.buffer); +} +else{ +v182=v8.getBuffer(v57.buffer); +} +v185="type" in v57?v49[v57.type]:v182.dtype; +v184=!!v57.normalized; +v183=v57.size|0; +v186=v57.offset|0; +v187=v57.stride|0; +v188=v57.divisor|0; +} +} +v190=g189.location; +v191=v10[v190]; +if(v177===1){ +if(!v191.buffer){ +v1.enableVertexAttribArray(v190); +} +v192=v183||2; +if(v191.type!==v185||v191.size!==v192||v191.buffer!==v182||v191.normalized!==v184||v191.offset!==v186||v191.stride!==v187){ +v1.bindBuffer(34962,v182.buffer); +v1.vertexAttribPointer(v190,v192,v185,v184,v187,v186); +v191.type=v185; +v191.size=v192; +v191.buffer=v182; +v191.normalized=v184; +v191.offset=v186; +v191.stride=v187; +} +if(v191.divisor!==v188){ +v116.vertexAttribDivisorANGLE(v190,v188); +v191.divisor=v188; +} +} +else{ +if(v191.buffer){ +v1.disableVertexAttribArray(v190); +v191.buffer=null; +} +if(v191.x!==v178||v191.y!==v179||v191.z!==v180||v191.w!==v181){ +v1.vertexAttrib4f(v190,v178,v179,v180,v181); +v191.x=v178; +v191.y=v179; +v191.z=v180; +v191.w=v181; +} +} +v195=g194.location; +v196=v10[v195]; +if(!v196.buffer){ +v1.enableVertexAttribArray(v195); +} +if(v196.type!==5126||v196.size!==1||v196.buffer!==g193||v196.normalized!==false||v196.offset!==0||v196.stride!==8){ +v1.bindBuffer(34962,g193.buffer); +v1.vertexAttribPointer(v195,1,5126,false,8,0); +v196.type=5126; +v196.size=1; +v196.buffer=g193; +v196.normalized=false; +v196.offset=0; +v196.stride=8; +} +if(v196.divisor!==0){ +v116.vertexAttribDivisorANGLE(v195,0); +v196.divisor=0; +} +v198=g197.location; +v199=v10[v198]; +if(!v199.buffer){ +v1.enableVertexAttribArray(v198); +} +if(v199.type!==5126||v199.size!==1||v199.buffer!==g193||v199.normalized!==false||v199.offset!==4||v199.stride!==8){ +v1.bindBuffer(34962,g193.buffer); +v1.vertexAttribPointer(v198,1,5126,false,8,4); +v199.type=5126; +v199.size=1; +v199.buffer=g193; +v199.normalized=false; +v199.offset=4; +v199.stride=8; +} +if(v199.divisor!==0){ +v116.vertexAttribDivisorANGLE(v198,0); +v199.divisor=0; +} +v200=a0["positionBuffer"]; +v58.buffer=v200; +if(!(v58&&(typeof v58==="object"||typeof v58==="function")&&(v16(v58)||v8.getBuffer(v58)||v8.getBuffer(v58.buffer)||v16(v58.buffer)||("constant" in v58&&(typeof v58.constant==="number"||v17(v58.constant))))))g18.commandRaise(g201,g19); +v202=false; +v203=1; +v204=0; +v205=0; +v206=0; +v207=0; +v208=null; +v209=0; +v210=false; +v211=5126; +v212=0; +v213=0; +v214=0; +if(v16(v58)){ +v202=true; +v208=v8.createStream(34962,v58); +v211=v208.dtype; +} +else{ +v208=v8.getBuffer(v58); +if(v208){ +v211=v208.dtype; +} +else if("constant" in v58){ +v203=2; +if(typeof v58.constant === "number"){ +v204=v58.constant; +v205=v206=v207=0; +} +else{ +v204=v58.constant.length>0?v58.constant[0]:0; +v205=v58.constant.length>1?v58.constant[1]:0; +v206=v58.constant.length>2?v58.constant[2]:0; +v207=v58.constant.length>3?v58.constant[3]:0; +} +} +else{ +if(v16(v58.buffer)){ +v208=v8.createStream(34962,v58.buffer); +} +else{ +v208=v8.getBuffer(v58.buffer); +} +v211="type" in v58?v49[v58.type]:v208.dtype; +v210=!!v58.normalized; +v209=v58.size|0; +v212=v58.offset|0; +v213=v58.stride|0; +v214=v58.divisor|0; +} +} +v216=g215.location; +v217=v10[v216]; +if(v203===1){ +if(!v217.buffer){ +v1.enableVertexAttribArray(v216); +} +v218=v209||2; +if(v217.type!==v211||v217.size!==v218||v217.buffer!==v208||v217.normalized!==v210||v217.offset!==v212||v217.stride!==v213){ +v1.bindBuffer(34962,v208.buffer); +v1.vertexAttribPointer(v216,v218,v211,v210,v213,v212); +v217.type=v211; +v217.size=v218; +v217.buffer=v208; +v217.normalized=v210; +v217.offset=v212; +v217.stride=v213; +} +if(v217.divisor!==v214){ +v116.vertexAttribDivisorANGLE(v216,v214); +v217.divisor=v214; +} +} +else{ +if(v217.buffer){ +v1.disableVertexAttribArray(v216); +v217.buffer=null; +} +if(v217.x!==v204||v217.y!==v205||v217.z!==v206||v217.w!==v207){ +v1.vertexAttrib4f(v216,v204,v205,v206,v207); +v217.x=v204; +v217.y=v205; +v217.z=v206; +v217.w=v207; +} +} +v219=a0["positionBuffer"]; +v55.buffer=v219; +if(!(v55&&(typeof v55==="object"||typeof v55==="function")&&(v16(v55)||v8.getBuffer(v55)||v8.getBuffer(v55.buffer)||v16(v55.buffer)||("constant" in v55&&(typeof v55.constant==="number"||v17(v55.constant))))))g18.commandRaise(g220,g19); +v221=false; +v222=1; +v223=0; +v224=0; +v225=0; +v226=0; +v227=null; +v228=0; +v229=false; +v230=5126; +v231=0; +v232=0; +v233=0; +if(v16(v55)){ +v221=true; +v227=v8.createStream(34962,v55); +v230=v227.dtype; +} +else{ +v227=v8.getBuffer(v55); +if(v227){ +v230=v227.dtype; +} +else if("constant" in v55){ +v222=2; +if(typeof v55.constant === "number"){ +v223=v55.constant; +v224=v225=v226=0; +} +else{ +v223=v55.constant.length>0?v55.constant[0]:0; +v224=v55.constant.length>1?v55.constant[1]:0; +v225=v55.constant.length>2?v55.constant[2]:0; +v226=v55.constant.length>3?v55.constant[3]:0; +} +} +else{ +if(v16(v55.buffer)){ +v227=v8.createStream(34962,v55.buffer); +} +else{ +v227=v8.getBuffer(v55.buffer); +} +v230="type" in v55?v49[v55.type]:v227.dtype; +v229=!!v55.normalized; +v228=v55.size|0; +v231=v55.offset|0; +v232=v55.stride|0; +v233=v55.divisor|0; +} +} +v235=g234.location; +v236=v10[v235]; +if(v222===1){ +if(!v236.buffer){ +v1.enableVertexAttribArray(v235); +} +v237=v228||2; +if(v236.type!==v230||v236.size!==v237||v236.buffer!==v227||v236.normalized!==v229||v236.offset!==v231||v236.stride!==v232){ +v1.bindBuffer(34962,v227.buffer); +v1.vertexAttribPointer(v235,v237,v230,v229,v232,v231); +v236.type=v230; +v236.size=v237; +v236.buffer=v227; +v236.normalized=v229; +v236.offset=v231; +v236.stride=v232; +} +if(v236.divisor!==v233){ +v116.vertexAttribDivisorANGLE(v235,v233); +v236.divisor=v233; +} +} +else{ +if(v236.buffer){ +v1.disableVertexAttribArray(v235); +v236.buffer=null; +} +if(v236.x!==v223||v236.y!==v224||v236.z!==v225||v236.w!==v226){ +v1.vertexAttrib4f(v235,v223,v224,v225,v226); +v236.x=v223; +v236.y=v224; +v236.z=v225; +v236.w=v226; +} +} +v239=a0["dashLength"]; +if(!(typeof v239==="number"))g18.commandRaise(g240,g19); +v1.uniform1f(g238.location,v239); +v242=a0["dashTexture"]; +if(v242&&v242._reglType==="framebuffer"){ +v242=v242.color[0]; +} +if(!(typeof v242==="function"&&v242._reglType==="texture2d"))g18.commandRaise(g243,g19); +v244=v242._texture; +v1.uniform1i(g241.location,v244.bind()); +v246=a0["depth"]; +if(!(typeof v246==="number"))g18.commandRaise(g247,g19); +v1.uniform1f(g245.location,v246); +v249=a0["miterLimit"]; +if(!(typeof v249==="number"))g18.commandRaise(g250,g19); +v1.uniform1f(g248.location,v249); +v253=g252.call(this,v2,a0,0); +if(!(typeof v253==="number"))g18.commandRaise(g254,g19); +v1.uniform1f(g251.location,v253); +v256=a0["opacity"]; +if(!(typeof v256==="number"))g18.commandRaise(g257,g19); +v1.uniform1f(g255.location,v256); +v259=a0["scale"]; +if(!(v17(v259)&&v259.length===2))g18.commandRaise(g260,g19); +v261=v259[0]; +v262=v259[1]; +v1.uniform2f(g258.location,v261,v262); +v264=a0["thickness"]; +if(!(typeof v264==="number"))g18.commandRaise(g265,g19); +v1.uniform1f(g263.location,v264); +v267=a0["translate"]; +if(!(v17(v267)&&v267.length===2))g18.commandRaise(g268,g19); +v269=v267[0]; +v270=v267[1]; +v1.uniform2f(g266.location,v269,v270); +v273=g272.call(this,v2,a0,0); +if(!(v17(v273)&&v273.length===4))g18.commandRaise(g274,g19); +v275=v273[0]; +v276=v273[1]; +v277=v273[2]; +v278=v273[3]; +v1.uniform4f(g271.location,v275,v276,v277,v278); +v279=v6.elements; +if(v279){ +v1.bindBuffer(34963,v279.buffer.buffer); +} +else if(v11.currentVAO){ +v279=v7.getElements(v11.currentVAO.elements); +if(v279)v1.bindBuffer(34963,v279.buffer.buffer); +} +v280=a0["count"]; +if(v280>0){ +if(v279){ +v116.drawElementsInstancedANGLE(5,4,v279.type,0<<((v279.type-5121)>>1),v280); +} +else{ +v116.drawArraysInstancedANGLE(5,0,4,v280); +} +} +else if(v280<0){ +if(v279){ +v1.drawElements(5,4,v279.type,0<<((v279.type-5121)>>1)); +} +else{ +v1.drawArrays(5,0,4); +} +} +v5.dirty=true; +v11.setVAO(null); +v2.viewportWidth=v97; +v2.viewportHeight=v98; +if(v113){ +g52.cpuTime+=performance.now()-v114; +} +if(v119){ +v8.destroyStream(v125); +} +if(v138){ +v8.destroyStream(v144); +} +if(v157){ +v8.destroyStream(v163); +} +if(v176){ +v8.destroyStream(v182); +} +if(v202){ +v8.destroyStream(v208); +} +if(v221){ +v8.destroyStream(v227); +} +v244.unbind(); +} +,"scope":function(a0,a1,a2){ +var v281,v282,v283,v284,v285,v286,v287,v288,v289,v290,v291,v293,v295,v297,v299,v301,v303,v305,v307,v309,v311,v313,v315,v317,v318,v319,v320,v321,v322,v323,v324,v325,v326,v327,v328,v330,v332,v333,v334,v336,v338,v339,v340,v342,v343,v345,v346,v348,v349,v351,v352,v354,v355,v357,v358,v360,v361,v363,v364,v366,v367,v369,v370,v372,v373,v375,v376,v378,v379,v381,v382,v384,v386,v387,v388,v389,v390,v391,v392,v393,v394,v395,v396,v397,v399,v400,v401,v402,v403,v404,v405,v406,v407,v408,v409,v410,v411,v412,v413,v414,v415,v416,v417,v418,v419,v420,v421,v422,v423,v424,v426,v427,v428,v429,v430,v431,v432,v433,v434,v435,v436,v437,v438,v439,v440,v441,v442,v443,v444,v445,v446,v447,v448,v449,v450,v451,v453,v454,v455,v456,v457,v458,v459,v460,v461,v462,v463,v464,v465,v466,v467,v468,v469,v470,v471,v472,v473,v474,v475,v476,v477,v478,v480,v481,v482,v483,v484,v485,v486,v487,v488,v489,v490,v491,v492,v493,v494,v495,v496,v497,v498,v499,v500,v501,v502,v503,v504,v505,v507,v508,v509,v510,v511,v512,v513,v514,v515,v516,v517,v518,v519,v520,v521,v522,v523,v524,v525,v526,v527,v528,v529,v530,v531,v532,v534,v535,v536,v537,v538,v539,v540,v541,v542,v543,v544,v545,v546,v547,v548,v549,v550,v551,v552,v553,v554,v555,v556,v557,v558,v559,v561,v562,v563,v564,v565,v566,v567,v568,v569,v570,v571,v572,v574,v576; +v281=a0["viewport"]; +if(!(v281&&typeof v281==="object"))g18.commandRaise(g92,g19); +v282=v281.x|0; +v283=v281.y|0; +v284="width" in v281?v281.width|0:(v2.framebufferWidth-v282); +v285="height" in v281?v281.height|0:(v2.framebufferHeight-v283); +if(!(v284>=0&&v285>=0))g18.commandRaise(g92,g19); +v286=v2.viewportWidth; +v2.viewportWidth=v284; +v287=v2.viewportHeight; +v2.viewportHeight=v285; +v288=v42[0]; +v42[0]=v282; +v289=v42[1]; +v42[1]=v283; +v290=v42[2]; +v42[2]=v284; +v291=v42[3]; +v42[3]=v285; +v293=v20[0]; +v20[0]=g292; +v295=v20[1]; +v20[1]=g294; +v297=v20[2]; +v20[2]=g296; +v299=v20[3]; +v20[3]=g298; +v301=v4.blend_enable; +v4.blend_enable=g300; +v303=v22[0]; +v22[0]=g302; +v305=v22[1]; +v22[1]=g304; +v307=v24[0]; +v24[0]=g306; +v309=v24[1]; +v24[1]=g308; +v311=v24[2]; +v24[2]=g310; +v313=v24[3]; +v24[3]=g312; +v315=v4.cull_enable; +v4.cull_enable=g314; +v317=v4.cull_face; +v4.cull_face=g316; +v318=g102.call(this,v2,a0,a2); +if(!(typeof v318==="boolean"))g18.commandRaise(g104,g19); +v319=v4.depth_enable; +v4.depth_enable=v318; +v320=a0["viewport"]; +if(!(v320&&typeof v320==="object"))g18.commandRaise(g106,g19); +v321=v320.x|0; +v322=v320.y|0; +v323="width" in v320?v320.width|0:(v2.framebufferWidth-v321); +v324="height" in v320?v320.height|0:(v2.framebufferHeight-v322); +if(!(v323>=0&&v324>=0))g18.commandRaise(g106,g19); +v325=v40[0]; +v40[0]=v321; +v326=v40[1]; +v40[1]=v322; +v327=v40[2]; +v40[2]=v323; +v328=v40[3]; +v40[3]=v324; +v330=v4.scissor_enable; +v4.scissor_enable=g329; +v332=v4.stencil_enable; +v4.stencil_enable=g331; +v333=v5.profile; +if(v333){ +v334=performance.now(); +g52.count++; +} +v336=v6.offset; +v6.offset=g335; +v338=v6.count; +v6.count=g337; +v339=a0["count"]; +v340=v6.instances; +v6.instances=v339; +v342=v6.primitive; +v6.primitive=g341; +v343=g252.call(this,v2,a0,a2); +v345=v12[g344]; +v12[g344]=v343; +v346=a0["miterLimit"]; +v348=v12[g347]; +v12[g347]=v346; +v349=a0["scale"]; +v351=v12[g350]; +v12[g350]=v349; +v352=a0["scaleFract"]; +v354=v12[g353]; +v12[g353]=v352; +v355=a0["translateFract"]; +v357=v12[g356]; +v12[g356]=v355; +v358=a0["translate"]; +v360=v12[g359]; +v12[g359]=v358; +v361=a0["thickness"]; +v363=v12[g362]; +v12[g362]=v361; +v364=a0["dashTexture"]; +v366=v12[g365]; +v12[g365]=v364; +v367=a0["opacity"]; +v369=v12[g368]; +v12[g368]=v367; +v370=v2["pixelRatio"]; +v372=v12[g371]; +v12[g371]=v370; +v373=a0["id"]; +v375=v12[g374]; +v12[g374]=v373; +v376=a0["dashLength"]; +v378=v12[g377]; +v12[g377]=v376; +v379=g272.call(this,v2,a0,a2); +v381=v12[g380]; +v12[g380]=v379; +v382=a0["depth"]; +v384=v12[g383]; +v12[g383]=v382; +v386=g385.state; +g385.state=1; +v387=g385.x; +g385.x=0; +v388=g385.y; +g385.y=0; +v389=g385.z; +g385.z=0; +v390=g385.w; +g385.w=0; +v391=g385.buffer; +g385.buffer=g193; +v392=g385.size; +g385.size=0; +v393=g385.normalized; +g385.normalized=false; +v394=g385.type; +g385.type=5126; +v395=g385.offset; +g385.offset=0; +v396=g385.stride; +g385.stride=8; +v397=g385.divisor; +g385.divisor=0; +v399=g398.state; +g398.state=1; +v400=g398.x; +g398.x=0; +v401=g398.y; +g398.y=0; +v402=g398.z; +g398.z=0; +v403=g398.w; +g398.w=0; +v404=g398.buffer; +g398.buffer=g193; +v405=g398.size; +g398.size=0; +v406=g398.normalized; +g398.normalized=false; +v407=g398.type; +g398.type=5126; +v408=g398.offset; +g398.offset=4; +v409=g398.stride; +g398.stride=8; +v410=g398.divisor; +g398.divisor=0; +v411=a0["colorBuffer"]; +v53.buffer=v411; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g118,g19); +v412=false; +v413=1; +v414=0; +v415=0; +v416=0; +v417=0; +v418=null; +v419=0; +v420=false; +v421=5126; +v422=0; +v423=0; +v424=0; +if(v16(v53)){ +v412=true; +v418=v8.createStream(34962,v53); +v421=v418.dtype; +} +else{ +v418=v8.getBuffer(v53); +if(v418){ +v421=v418.dtype; +} +else if("constant" in v53){ +v413=2; +if(typeof v53.constant === "number"){ +v414=v53.constant; +v415=v416=v417=0; +} +else{ +v414=v53.constant.length>0?v53.constant[0]:0; +v415=v53.constant.length>1?v53.constant[1]:0; +v416=v53.constant.length>2?v53.constant[2]:0; +v417=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v418=v8.createStream(34962,v53.buffer); +} +else{ +v418=v8.getBuffer(v53.buffer); +} +v421="type" in v53?v49[v53.type]:v418.dtype; +v420=!!v53.normalized; +v419=v53.size|0; +v422=v53.offset|0; +v423=v53.stride|0; +v424=v53.divisor|0; +} +} +v426=g425.state; +g425.state=v413; +v427=g425.x; +g425.x=v414; +v428=g425.y; +g425.y=v415; +v429=g425.z; +g425.z=v416; +v430=g425.w; +g425.w=v417; +v431=g425.buffer; +g425.buffer=v418; +v432=g425.size; +g425.size=v419; +v433=g425.normalized; +g425.normalized=v420; +v434=g425.type; +g425.type=v421; +v435=g425.offset; +g425.offset=v422; +v436=g425.stride; +g425.stride=v423; +v437=g425.divisor; +g425.divisor=v424; +v438=a0["colorBuffer"]; +v54.buffer=v438; +if(!(v54&&(typeof v54==="object"||typeof v54==="function")&&(v16(v54)||v8.getBuffer(v54)||v8.getBuffer(v54.buffer)||v16(v54.buffer)||("constant" in v54&&(typeof v54.constant==="number"||v17(v54.constant))))))g18.commandRaise(g156,g19); +v439=false; +v440=1; +v441=0; +v442=0; +v443=0; +v444=0; +v445=null; +v446=0; +v447=false; +v448=5126; +v449=0; +v450=0; +v451=0; +if(v16(v54)){ +v439=true; +v445=v8.createStream(34962,v54); +v448=v445.dtype; +} +else{ +v445=v8.getBuffer(v54); +if(v445){ +v448=v445.dtype; +} +else if("constant" in v54){ +v440=2; +if(typeof v54.constant === "number"){ +v441=v54.constant; +v442=v443=v444=0; +} +else{ +v441=v54.constant.length>0?v54.constant[0]:0; +v442=v54.constant.length>1?v54.constant[1]:0; +v443=v54.constant.length>2?v54.constant[2]:0; +v444=v54.constant.length>3?v54.constant[3]:0; +} +} +else{ +if(v16(v54.buffer)){ +v445=v8.createStream(34962,v54.buffer); +} +else{ +v445=v8.getBuffer(v54.buffer); +} +v448="type" in v54?v49[v54.type]:v445.dtype; +v447=!!v54.normalized; +v446=v54.size|0; +v449=v54.offset|0; +v450=v54.stride|0; +v451=v54.divisor|0; +} +} +v453=g452.state; +g452.state=v440; +v454=g452.x; +g452.x=v441; +v455=g452.y; +g452.y=v442; +v456=g452.z; +g452.z=v443; +v457=g452.w; +g452.w=v444; +v458=g452.buffer; +g452.buffer=v445; +v459=g452.size; +g452.size=v446; +v460=g452.normalized; +g452.normalized=v447; +v461=g452.type; +g452.type=v448; +v462=g452.offset; +g452.offset=v449; +v463=g452.stride; +g452.stride=v450; +v464=g452.divisor; +g452.divisor=v451; +v465=a0["positionBuffer"]; +v55.buffer=v465; +if(!(v55&&(typeof v55==="object"||typeof v55==="function")&&(v16(v55)||v8.getBuffer(v55)||v8.getBuffer(v55.buffer)||v16(v55.buffer)||("constant" in v55&&(typeof v55.constant==="number"||v17(v55.constant))))))g18.commandRaise(g220,g19); +v466=false; +v467=1; +v468=0; +v469=0; +v470=0; +v471=0; +v472=null; +v473=0; +v474=false; +v475=5126; +v476=0; +v477=0; +v478=0; +if(v16(v55)){ +v466=true; +v472=v8.createStream(34962,v55); +v475=v472.dtype; +} +else{ +v472=v8.getBuffer(v55); +if(v472){ +v475=v472.dtype; +} +else if("constant" in v55){ +v467=2; +if(typeof v55.constant === "number"){ +v468=v55.constant; +v469=v470=v471=0; +} +else{ +v468=v55.constant.length>0?v55.constant[0]:0; +v469=v55.constant.length>1?v55.constant[1]:0; +v470=v55.constant.length>2?v55.constant[2]:0; +v471=v55.constant.length>3?v55.constant[3]:0; +} +} +else{ +if(v16(v55.buffer)){ +v472=v8.createStream(34962,v55.buffer); +} +else{ +v472=v8.getBuffer(v55.buffer); +} +v475="type" in v55?v49[v55.type]:v472.dtype; +v474=!!v55.normalized; +v473=v55.size|0; +v476=v55.offset|0; +v477=v55.stride|0; +v478=v55.divisor|0; +} +} +v480=g479.state; +g479.state=v467; +v481=g479.x; +g479.x=v468; +v482=g479.y; +g479.y=v469; +v483=g479.z; +g479.z=v470; +v484=g479.w; +g479.w=v471; +v485=g479.buffer; +g479.buffer=v472; +v486=g479.size; +g479.size=v473; +v487=g479.normalized; +g479.normalized=v474; +v488=g479.type; +g479.type=v475; +v489=g479.offset; +g479.offset=v476; +v490=g479.stride; +g479.stride=v477; +v491=g479.divisor; +g479.divisor=v478; +v492=a0["positionBuffer"]; +v56.buffer=v492; +if(!(v56&&(typeof v56==="object"||typeof v56==="function")&&(v16(v56)||v8.getBuffer(v56)||v8.getBuffer(v56.buffer)||v16(v56.buffer)||("constant" in v56&&(typeof v56.constant==="number"||v17(v56.constant))))))g18.commandRaise(g137,g19); +v493=false; +v494=1; +v495=0; +v496=0; +v497=0; +v498=0; +v499=null; +v500=0; +v501=false; +v502=5126; +v503=0; +v504=0; +v505=0; +if(v16(v56)){ +v493=true; +v499=v8.createStream(34962,v56); +v502=v499.dtype; +} +else{ +v499=v8.getBuffer(v56); +if(v499){ +v502=v499.dtype; +} +else if("constant" in v56){ +v494=2; +if(typeof v56.constant === "number"){ +v495=v56.constant; +v496=v497=v498=0; +} +else{ +v495=v56.constant.length>0?v56.constant[0]:0; +v496=v56.constant.length>1?v56.constant[1]:0; +v497=v56.constant.length>2?v56.constant[2]:0; +v498=v56.constant.length>3?v56.constant[3]:0; +} +} +else{ +if(v16(v56.buffer)){ +v499=v8.createStream(34962,v56.buffer); +} +else{ +v499=v8.getBuffer(v56.buffer); +} +v502="type" in v56?v49[v56.type]:v499.dtype; +v501=!!v56.normalized; +v500=v56.size|0; +v503=v56.offset|0; +v504=v56.stride|0; +v505=v56.divisor|0; +} +} +v507=g506.state; +g506.state=v494; +v508=g506.x; +g506.x=v495; +v509=g506.y; +g506.y=v496; +v510=g506.z; +g506.z=v497; +v511=g506.w; +g506.w=v498; +v512=g506.buffer; +g506.buffer=v499; +v513=g506.size; +g506.size=v500; +v514=g506.normalized; +g506.normalized=v501; +v515=g506.type; +g506.type=v502; +v516=g506.offset; +g506.offset=v503; +v517=g506.stride; +g506.stride=v504; +v518=g506.divisor; +g506.divisor=v505; +v519=a0["positionBuffer"]; +v57.buffer=v519; +if(!(v57&&(typeof v57==="object"||typeof v57==="function")&&(v16(v57)||v8.getBuffer(v57)||v8.getBuffer(v57.buffer)||v16(v57.buffer)||("constant" in v57&&(typeof v57.constant==="number"||v17(v57.constant))))))g18.commandRaise(g175,g19); +v520=false; +v521=1; +v522=0; +v523=0; +v524=0; +v525=0; +v526=null; +v527=0; +v528=false; +v529=5126; +v530=0; +v531=0; +v532=0; +if(v16(v57)){ +v520=true; +v526=v8.createStream(34962,v57); +v529=v526.dtype; +} +else{ +v526=v8.getBuffer(v57); +if(v526){ +v529=v526.dtype; +} +else if("constant" in v57){ +v521=2; +if(typeof v57.constant === "number"){ +v522=v57.constant; +v523=v524=v525=0; +} +else{ +v522=v57.constant.length>0?v57.constant[0]:0; +v523=v57.constant.length>1?v57.constant[1]:0; +v524=v57.constant.length>2?v57.constant[2]:0; +v525=v57.constant.length>3?v57.constant[3]:0; +} +} +else{ +if(v16(v57.buffer)){ +v526=v8.createStream(34962,v57.buffer); +} +else{ +v526=v8.getBuffer(v57.buffer); +} +v529="type" in v57?v49[v57.type]:v526.dtype; +v528=!!v57.normalized; +v527=v57.size|0; +v530=v57.offset|0; +v531=v57.stride|0; +v532=v57.divisor|0; +} +} +v534=g533.state; +g533.state=v521; +v535=g533.x; +g533.x=v522; +v536=g533.y; +g533.y=v523; +v537=g533.z; +g533.z=v524; +v538=g533.w; +g533.w=v525; +v539=g533.buffer; +g533.buffer=v526; +v540=g533.size; +g533.size=v527; +v541=g533.normalized; +g533.normalized=v528; +v542=g533.type; +g533.type=v529; +v543=g533.offset; +g533.offset=v530; +v544=g533.stride; +g533.stride=v531; +v545=g533.divisor; +g533.divisor=v532; +v546=a0["positionBuffer"]; +v58.buffer=v546; +if(!(v58&&(typeof v58==="object"||typeof v58==="function")&&(v16(v58)||v8.getBuffer(v58)||v8.getBuffer(v58.buffer)||v16(v58.buffer)||("constant" in v58&&(typeof v58.constant==="number"||v17(v58.constant))))))g18.commandRaise(g201,g19); +v547=false; +v548=1; +v549=0; +v550=0; +v551=0; +v552=0; +v553=null; +v554=0; +v555=false; +v556=5126; +v557=0; +v558=0; +v559=0; +if(v16(v58)){ +v547=true; +v553=v8.createStream(34962,v58); +v556=v553.dtype; +} +else{ +v553=v8.getBuffer(v58); +if(v553){ +v556=v553.dtype; +} +else if("constant" in v58){ +v548=2; +if(typeof v58.constant === "number"){ +v549=v58.constant; +v550=v551=v552=0; +} +else{ +v549=v58.constant.length>0?v58.constant[0]:0; +v550=v58.constant.length>1?v58.constant[1]:0; +v551=v58.constant.length>2?v58.constant[2]:0; +v552=v58.constant.length>3?v58.constant[3]:0; +} +} +else{ +if(v16(v58.buffer)){ +v553=v8.createStream(34962,v58.buffer); +} +else{ +v553=v8.getBuffer(v58.buffer); +} +v556="type" in v58?v49[v58.type]:v553.dtype; +v555=!!v58.normalized; +v554=v58.size|0; +v557=v58.offset|0; +v558=v58.stride|0; +v559=v58.divisor|0; +} +} +v561=g560.state; +g560.state=v548; +v562=g560.x; +g560.x=v549; +v563=g560.y; +g560.y=v550; +v564=g560.z; +g560.z=v551; +v565=g560.w; +g560.w=v552; +v566=g560.buffer; +g560.buffer=v553; +v567=g560.size; +g560.size=v554; +v568=g560.normalized; +g560.normalized=v555; +v569=g560.type; +g560.type=v556; +v570=g560.offset; +g560.offset=v557; +v571=g560.stride; +g560.stride=v558; +v572=g560.divisor; +g560.divisor=v559; +v574=v9.vert; +v9.vert=g573; +v576=v9.frag; +v9.frag=g575; +v5.dirty=true; +a1(v2,a0,a2); +v2.viewportWidth=v286; +v2.viewportHeight=v287; +v42[0]=v288; +v42[1]=v289; +v42[2]=v290; +v42[3]=v291; +v20[0]=v293; +v20[1]=v295; +v20[2]=v297; +v20[3]=v299; +v4.blend_enable=v301; +v22[0]=v303; +v22[1]=v305; +v24[0]=v307; +v24[1]=v309; +v24[2]=v311; +v24[3]=v313; +v4.cull_enable=v315; +v4.cull_face=v317; +v4.depth_enable=v319; +v40[0]=v325; +v40[1]=v326; +v40[2]=v327; +v40[3]=v328; +v4.scissor_enable=v330; +v4.stencil_enable=v332; +if(v333){ +g52.cpuTime+=performance.now()-v334; +} +v6.offset=v336; +v6.count=v338; +v6.instances=v340; +v6.primitive=v342; +v12[g344]=v345; +v12[g347]=v348; +v12[g350]=v351; +v12[g353]=v354; +v12[g356]=v357; +v12[g359]=v360; +v12[g362]=v363; +v12[g365]=v366; +v12[g368]=v369; +v12[g371]=v372; +v12[g374]=v375; +v12[g377]=v378; +v12[g380]=v381; +v12[g383]=v384; +g385.state=v386; +g385.x=v387; +g385.y=v388; +g385.z=v389; +g385.w=v390; +g385.buffer=v391; +g385.size=v392; +g385.normalized=v393; +g385.type=v394; +g385.offset=v395; +g385.stride=v396; +g385.divisor=v397; +g398.state=v399; +g398.x=v400; +g398.y=v401; +g398.z=v402; +g398.w=v403; +g398.buffer=v404; +g398.size=v405; +g398.normalized=v406; +g398.type=v407; +g398.offset=v408; +g398.stride=v409; +g398.divisor=v410; +if(v412){ +v8.destroyStream(v418); +} +g425.state=v426; +g425.x=v427; +g425.y=v428; +g425.z=v429; +g425.w=v430; +g425.buffer=v431; +g425.size=v432; +g425.normalized=v433; +g425.type=v434; +g425.offset=v435; +g425.stride=v436; +g425.divisor=v437; +if(v439){ +v8.destroyStream(v445); +} +g452.state=v453; +g452.x=v454; +g452.y=v455; +g452.z=v456; +g452.w=v457; +g452.buffer=v458; +g452.size=v459; +g452.normalized=v460; +g452.type=v461; +g452.offset=v462; +g452.stride=v463; +g452.divisor=v464; +if(v466){ +v8.destroyStream(v472); +} +g479.state=v480; +g479.x=v481; +g479.y=v482; +g479.z=v483; +g479.w=v484; +g479.buffer=v485; +g479.size=v486; +g479.normalized=v487; +g479.type=v488; +g479.offset=v489; +g479.stride=v490; +g479.divisor=v491; +if(v493){ +v8.destroyStream(v499); +} +g506.state=v507; +g506.x=v508; +g506.y=v509; +g506.z=v510; +g506.w=v511; +g506.buffer=v512; +g506.size=v513; +g506.normalized=v514; +g506.type=v515; +g506.offset=v516; +g506.stride=v517; +g506.divisor=v518; +if(v520){ +v8.destroyStream(v526); +} +g533.state=v534; +g533.x=v535; +g533.y=v536; +g533.z=v537; +g533.w=v538; +g533.buffer=v539; +g533.size=v540; +g533.normalized=v541; +g533.type=v542; +g533.offset=v543; +g533.stride=v544; +g533.divisor=v545; +if(v547){ +v8.destroyStream(v553); +} +g560.state=v561; +g560.x=v562; +g560.y=v563; +g560.z=v564; +g560.w=v565; +g560.buffer=v566; +g560.size=v567; +g560.normalized=v568; +g560.type=v569; +g560.offset=v570; +g560.stride=v571; +g560.divisor=v572; +v9.vert=v574; +v9.frag=v576; +v5.dirty=true; +} +,"batch":function(a0,a1){ +var v577,v578,v614,v615,v616,v617,v618; +v577=v14.angle_instanced_arrays; +v578=v13.next; +if(v578!==v13.cur){ +if(v578){ +v1.bindFramebuffer(36160,v578.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v578; +} +if(v5.dirty){ +var v579,v580,v581,v582,v583,v584,v585,v586,v587,v588,v589,v590,v591,v592,v593,v594,v595,v596,v597,v598,v599,v600,v601,v602,v603,v604,v605,v606,v607,v608; +v579=v4.dither; +if(v579!==v5.dither){ +if(v579){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v579; +} +v580=v4.depth_func; +if(v580!==v5.depth_func){ +v1.depthFunc(v580); +v5.depth_func=v580; +} +v581=v26[0]; +v582=v26[1]; +if(v581!==v27[0]||v582!==v27[1]){ +v1.depthRange(v581,v582); +v27[0]=v581; +v27[1]=v582; +} +v583=v4.depth_mask; +if(v583!==v5.depth_mask){ +v1.depthMask(v583); +v5.depth_mask=v583; +} +v584=v28[0]; +v585=v28[1]; +v586=v28[2]; +v587=v28[3]; +if(v584!==v29[0]||v585!==v29[1]||v586!==v29[2]||v587!==v29[3]){ +v1.colorMask(v584,v585,v586,v587); +v29[0]=v584; +v29[1]=v585; +v29[2]=v586; +v29[3]=v587; +} +v588=v4.frontFace; +if(v588!==v5.frontFace){ +v1.frontFace(v588); +v5.frontFace=v588; +} +v589=v4.lineWidth; +if(v589!==v5.lineWidth){ +v1.lineWidth(v589); +v5.lineWidth=v589; +} +v590=v4.polygonOffset_enable; +if(v590!==v5.polygonOffset_enable){ +if(v590){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v590; +} +v591=v30[0]; +v592=v30[1]; +if(v591!==v31[0]||v592!==v31[1]){ +v1.polygonOffset(v591,v592); +v31[0]=v591; +v31[1]=v592; +} +v593=v4.sample_alpha; +if(v593!==v5.sample_alpha){ +if(v593){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v593; +} +v594=v4.sample_enable; +if(v594!==v5.sample_enable){ +if(v594){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v594; +} +v595=v32[0]; +v596=v32[1]; +if(v595!==v33[0]||v596!==v33[1]){ +v1.sampleCoverage(v595,v596); +v33[0]=v595; +v33[1]=v596; +} +v597=v4.stencil_mask; +if(v597!==v5.stencil_mask){ +v1.stencilMask(v597); +v5.stencil_mask=v597; +} +v598=v34[0]; +v599=v34[1]; +v600=v34[2]; +if(v598!==v35[0]||v599!==v35[1]||v600!==v35[2]){ +v1.stencilFunc(v598,v599,v600); +v35[0]=v598; +v35[1]=v599; +v35[2]=v600; +} +v601=v36[0]; +v602=v36[1]; +v603=v36[2]; +v604=v36[3]; +if(v601!==v37[0]||v602!==v37[1]||v603!==v37[2]||v604!==v37[3]){ +v1.stencilOpSeparate(v601,v602,v603,v604); +v37[0]=v601; +v37[1]=v602; +v37[2]=v603; +v37[3]=v604; +} +v605=v38[0]; +v606=v38[1]; +v607=v38[2]; +v608=v38[3]; +if(v605!==v39[0]||v606!==v39[1]||v607!==v39[2]||v608!==v39[3]){ +v1.stencilOpSeparate(v605,v606,v607,v608); +v39[0]=v605; +v39[1]=v606; +v39[2]=v607; +v39[3]=v608; +} +} +v1.blendColor(0,0,0,0); +v21[0]=0; +v21[1]=0; +v21[2]=0; +v21[3]=0; +if(g609){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=g609; +v1.blendEquationSeparate(32774,32774); +v23[0]=32774; +v23[1]=32774; +v1.blendFuncSeparate(770,771,773,1); +v25[0]=770; +v25[1]=771; +v25[2]=773; +v25[3]=1; +if(g610){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=g610; +v1.cullFace(g611); +v5.cull_face=g611; +if(g612){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=g612; +if(g613){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=g613; +v614=v5.profile; +if(v614){ +v615=performance.now(); +g52.count+=a1; +} +v1.useProgram(g115.program); +v616=v14.angle_instanced_arrays; +var v632,v633,v634,v635,v771; +v11.setVAO(null); +v632=g194.location; +v633=v10[v632]; +if(!v633.buffer){ +v1.enableVertexAttribArray(v632); +} +if(v633.type!==5126||v633.size!==1||v633.buffer!==g193||v633.normalized!==false||v633.offset!==0||v633.stride!==8){ +v1.bindBuffer(34962,g193.buffer); +v1.vertexAttribPointer(v632,1,5126,false,8,0); +v633.type=5126; +v633.size=1; +v633.buffer=g193; +v633.normalized=false; +v633.offset=0; +v633.stride=8; +} +if(v633.divisor!==0){ +v616.vertexAttribDivisorANGLE(v632,0); +v633.divisor=0; +} +v634=g197.location; +v635=v10[v634]; +if(!v635.buffer){ +v1.enableVertexAttribArray(v634); +} +if(v635.type!==5126||v635.size!==1||v635.buffer!==g193||v635.normalized!==false||v635.offset!==4||v635.stride!==8){ +v1.bindBuffer(34962,g193.buffer); +v1.vertexAttribPointer(v634,1,5126,false,8,4); +v635.type=5126; +v635.size=1; +v635.buffer=g193; +v635.normalized=false; +v635.offset=4; +v635.stride=8; +} +if(v635.divisor!==0){ +v616.vertexAttribDivisorANGLE(v634,0); +v635.divisor=0; +} +v771=v6.elements; +if(v771){ +v1.bindBuffer(34963,v771.buffer.buffer); +} +else if(v11.currentVAO){ +v771=v7.getElements(v11.currentVAO.elements); +if(v771)v1.bindBuffer(34963,v771.buffer.buffer); +} +for(v617=0; +v617=0&&v623>=0))g18.commandRaise(g92,g19); +v624=v2.viewportWidth; +v2.viewportWidth=v622; +v625=v2.viewportHeight; +v2.viewportHeight=v623; +v1.viewport(v620,v621,v622,v623); +v43[0]=v620; +v43[1]=v621; +v43[2]=v622; +v43[3]=v623; +v626=g102.call(this,v2,v618,v617); +if(!(typeof v626==="boolean"))g18.commandRaise(g104,g19); +if(v626){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=v626; +v627=v618["viewport"]; +if(!(v627&&typeof v627==="object"))g18.commandRaise(g106,g19); +v628=v627.x|0; +v629=v627.y|0; +v630="width" in v627?v627.width|0:(v2.framebufferWidth-v628); +v631="height" in v627?v627.height|0:(v2.framebufferHeight-v629); +if(!(v630>=0&&v631>=0))g18.commandRaise(g106,g19); +v1.scissor(v628,v629,v630,v631); +v41[0]=v628; +v41[1]=v629; +v41[2]=v630; +v41[3]=v631; +v636=v618["colorBuffer"]; +v53.buffer=v636; +if(!(v53&&(typeof v53==="object"||typeof v53==="function")&&(v16(v53)||v8.getBuffer(v53)||v8.getBuffer(v53.buffer)||v16(v53.buffer)||("constant" in v53&&(typeof v53.constant==="number"||v17(v53.constant))))))g18.commandRaise(g118,g19); +v637=false; +v638=1; +v639=0; +v640=0; +v641=0; +v642=0; +v643=null; +v644=0; +v645=false; +v646=5126; +v647=0; +v648=0; +v649=0; +if(v16(v53)){ +v637=true; +v643=v8.createStream(34962,v53); +v646=v643.dtype; +} +else{ +v643=v8.getBuffer(v53); +if(v643){ +v646=v643.dtype; +} +else if("constant" in v53){ +v638=2; +if(typeof v53.constant === "number"){ +v639=v53.constant; +v640=v641=v642=0; +} +else{ +v639=v53.constant.length>0?v53.constant[0]:0; +v640=v53.constant.length>1?v53.constant[1]:0; +v641=v53.constant.length>2?v53.constant[2]:0; +v642=v53.constant.length>3?v53.constant[3]:0; +} +} +else{ +if(v16(v53.buffer)){ +v643=v8.createStream(34962,v53.buffer); +} +else{ +v643=v8.getBuffer(v53.buffer); +} +v646="type" in v53?v49[v53.type]:v643.dtype; +v645=!!v53.normalized; +v644=v53.size|0; +v647=v53.offset|0; +v648=v53.stride|0; +v649=v53.divisor|0; +} +} +v650=g132.location; +v651=v10[v650]; +if(v638===1){ +if(!v651.buffer){ +v1.enableVertexAttribArray(v650); +} +v652=v644||4; +if(v651.type!==v646||v651.size!==v652||v651.buffer!==v643||v651.normalized!==v645||v651.offset!==v647||v651.stride!==v648){ +v1.bindBuffer(34962,v643.buffer); +v1.vertexAttribPointer(v650,v652,v646,v645,v648,v647); +v651.type=v646; +v651.size=v652; +v651.buffer=v643; +v651.normalized=v645; +v651.offset=v647; +v651.stride=v648; +} +if(v651.divisor!==v649){ +v616.vertexAttribDivisorANGLE(v650,v649); +v651.divisor=v649; +} +} +else{ +if(v651.buffer){ +v1.disableVertexAttribArray(v650); +v651.buffer=null; +} +if(v651.x!==v639||v651.y!==v640||v651.z!==v641||v651.w!==v642){ +v1.vertexAttrib4f(v650,v639,v640,v641,v642); +v651.x=v639; +v651.y=v640; +v651.z=v641; +v651.w=v642; +} +} +v653=v618["positionBuffer"]; +v56.buffer=v653; +if(!(v56&&(typeof v56==="object"||typeof v56==="function")&&(v16(v56)||v8.getBuffer(v56)||v8.getBuffer(v56.buffer)||v16(v56.buffer)||("constant" in v56&&(typeof v56.constant==="number"||v17(v56.constant))))))g18.commandRaise(g137,g19); +v654=false; +v655=1; +v656=0; +v657=0; +v658=0; +v659=0; +v660=null; +v661=0; +v662=false; +v663=5126; +v664=0; +v665=0; +v666=0; +if(v16(v56)){ +v654=true; +v660=v8.createStream(34962,v56); +v663=v660.dtype; +} +else{ +v660=v8.getBuffer(v56); +if(v660){ +v663=v660.dtype; +} +else if("constant" in v56){ +v655=2; +if(typeof v56.constant === "number"){ +v656=v56.constant; +v657=v658=v659=0; +} +else{ +v656=v56.constant.length>0?v56.constant[0]:0; +v657=v56.constant.length>1?v56.constant[1]:0; +v658=v56.constant.length>2?v56.constant[2]:0; +v659=v56.constant.length>3?v56.constant[3]:0; +} +} +else{ +if(v16(v56.buffer)){ +v660=v8.createStream(34962,v56.buffer); +} +else{ +v660=v8.getBuffer(v56.buffer); +} +v663="type" in v56?v49[v56.type]:v660.dtype; +v662=!!v56.normalized; +v661=v56.size|0; +v664=v56.offset|0; +v665=v56.stride|0; +v666=v56.divisor|0; +} +} +v667=g151.location; +v668=v10[v667]; +if(v655===1){ +if(!v668.buffer){ +v1.enableVertexAttribArray(v667); +} +v669=v661||2; +if(v668.type!==v663||v668.size!==v669||v668.buffer!==v660||v668.normalized!==v662||v668.offset!==v664||v668.stride!==v665){ +v1.bindBuffer(34962,v660.buffer); +v1.vertexAttribPointer(v667,v669,v663,v662,v665,v664); +v668.type=v663; +v668.size=v669; +v668.buffer=v660; +v668.normalized=v662; +v668.offset=v664; +v668.stride=v665; +} +if(v668.divisor!==v666){ +v616.vertexAttribDivisorANGLE(v667,v666); +v668.divisor=v666; +} +} +else{ +if(v668.buffer){ +v1.disableVertexAttribArray(v667); +v668.buffer=null; +} +if(v668.x!==v656||v668.y!==v657||v668.z!==v658||v668.w!==v659){ +v1.vertexAttrib4f(v667,v656,v657,v658,v659); +v668.x=v656; +v668.y=v657; +v668.z=v658; +v668.w=v659; +} +} +v670=v618["colorBuffer"]; +v54.buffer=v670; +if(!(v54&&(typeof v54==="object"||typeof v54==="function")&&(v16(v54)||v8.getBuffer(v54)||v8.getBuffer(v54.buffer)||v16(v54.buffer)||("constant" in v54&&(typeof v54.constant==="number"||v17(v54.constant))))))g18.commandRaise(g156,g19); +v671=false; +v672=1; +v673=0; +v674=0; +v675=0; +v676=0; +v677=null; +v678=0; +v679=false; +v680=5126; +v681=0; +v682=0; +v683=0; +if(v16(v54)){ +v671=true; +v677=v8.createStream(34962,v54); +v680=v677.dtype; +} +else{ +v677=v8.getBuffer(v54); +if(v677){ +v680=v677.dtype; +} +else if("constant" in v54){ +v672=2; +if(typeof v54.constant === "number"){ +v673=v54.constant; +v674=v675=v676=0; +} +else{ +v673=v54.constant.length>0?v54.constant[0]:0; +v674=v54.constant.length>1?v54.constant[1]:0; +v675=v54.constant.length>2?v54.constant[2]:0; +v676=v54.constant.length>3?v54.constant[3]:0; +} +} +else{ +if(v16(v54.buffer)){ +v677=v8.createStream(34962,v54.buffer); +} +else{ +v677=v8.getBuffer(v54.buffer); +} +v680="type" in v54?v49[v54.type]:v677.dtype; +v679=!!v54.normalized; +v678=v54.size|0; +v681=v54.offset|0; +v682=v54.stride|0; +v683=v54.divisor|0; +} +} +v684=g170.location; +v685=v10[v684]; +if(v672===1){ +if(!v685.buffer){ +v1.enableVertexAttribArray(v684); +} +v686=v678||4; +if(v685.type!==v680||v685.size!==v686||v685.buffer!==v677||v685.normalized!==v679||v685.offset!==v681||v685.stride!==v682){ +v1.bindBuffer(34962,v677.buffer); +v1.vertexAttribPointer(v684,v686,v680,v679,v682,v681); +v685.type=v680; +v685.size=v686; +v685.buffer=v677; +v685.normalized=v679; +v685.offset=v681; +v685.stride=v682; +} +if(v685.divisor!==v683){ +v616.vertexAttribDivisorANGLE(v684,v683); +v685.divisor=v683; +} +} +else{ +if(v685.buffer){ +v1.disableVertexAttribArray(v684); +v685.buffer=null; +} +if(v685.x!==v673||v685.y!==v674||v685.z!==v675||v685.w!==v676){ +v1.vertexAttrib4f(v684,v673,v674,v675,v676); +v685.x=v673; +v685.y=v674; +v685.z=v675; +v685.w=v676; +} +} +v687=v618["positionBuffer"]; +v57.buffer=v687; +if(!(v57&&(typeof v57==="object"||typeof v57==="function")&&(v16(v57)||v8.getBuffer(v57)||v8.getBuffer(v57.buffer)||v16(v57.buffer)||("constant" in v57&&(typeof v57.constant==="number"||v17(v57.constant))))))g18.commandRaise(g175,g19); +v688=false; +v689=1; +v690=0; +v691=0; +v692=0; +v693=0; +v694=null; +v695=0; +v696=false; +v697=5126; +v698=0; +v699=0; +v700=0; +if(v16(v57)){ +v688=true; +v694=v8.createStream(34962,v57); +v697=v694.dtype; +} +else{ +v694=v8.getBuffer(v57); +if(v694){ +v697=v694.dtype; +} +else if("constant" in v57){ +v689=2; +if(typeof v57.constant === "number"){ +v690=v57.constant; +v691=v692=v693=0; +} +else{ +v690=v57.constant.length>0?v57.constant[0]:0; +v691=v57.constant.length>1?v57.constant[1]:0; +v692=v57.constant.length>2?v57.constant[2]:0; +v693=v57.constant.length>3?v57.constant[3]:0; +} +} +else{ +if(v16(v57.buffer)){ +v694=v8.createStream(34962,v57.buffer); +} +else{ +v694=v8.getBuffer(v57.buffer); +} +v697="type" in v57?v49[v57.type]:v694.dtype; +v696=!!v57.normalized; +v695=v57.size|0; +v698=v57.offset|0; +v699=v57.stride|0; +v700=v57.divisor|0; +} +} +v701=g189.location; +v702=v10[v701]; +if(v689===1){ +if(!v702.buffer){ +v1.enableVertexAttribArray(v701); +} +v703=v695||2; +if(v702.type!==v697||v702.size!==v703||v702.buffer!==v694||v702.normalized!==v696||v702.offset!==v698||v702.stride!==v699){ +v1.bindBuffer(34962,v694.buffer); +v1.vertexAttribPointer(v701,v703,v697,v696,v699,v698); +v702.type=v697; +v702.size=v703; +v702.buffer=v694; +v702.normalized=v696; +v702.offset=v698; +v702.stride=v699; +} +if(v702.divisor!==v700){ +v616.vertexAttribDivisorANGLE(v701,v700); +v702.divisor=v700; +} +} +else{ +if(v702.buffer){ +v1.disableVertexAttribArray(v701); +v702.buffer=null; +} +if(v702.x!==v690||v702.y!==v691||v702.z!==v692||v702.w!==v693){ +v1.vertexAttrib4f(v701,v690,v691,v692,v693); +v702.x=v690; +v702.y=v691; +v702.z=v692; +v702.w=v693; +} +} +v704=v618["positionBuffer"]; +v58.buffer=v704; +if(!(v58&&(typeof v58==="object"||typeof v58==="function")&&(v16(v58)||v8.getBuffer(v58)||v8.getBuffer(v58.buffer)||v16(v58.buffer)||("constant" in v58&&(typeof v58.constant==="number"||v17(v58.constant))))))g18.commandRaise(g201,g19); +v705=false; +v706=1; +v707=0; +v708=0; +v709=0; +v710=0; +v711=null; +v712=0; +v713=false; +v714=5126; +v715=0; +v716=0; +v717=0; +if(v16(v58)){ +v705=true; +v711=v8.createStream(34962,v58); +v714=v711.dtype; +} +else{ +v711=v8.getBuffer(v58); +if(v711){ +v714=v711.dtype; +} +else if("constant" in v58){ +v706=2; +if(typeof v58.constant === "number"){ +v707=v58.constant; +v708=v709=v710=0; +} +else{ +v707=v58.constant.length>0?v58.constant[0]:0; +v708=v58.constant.length>1?v58.constant[1]:0; +v709=v58.constant.length>2?v58.constant[2]:0; +v710=v58.constant.length>3?v58.constant[3]:0; +} +} +else{ +if(v16(v58.buffer)){ +v711=v8.createStream(34962,v58.buffer); +} +else{ +v711=v8.getBuffer(v58.buffer); +} +v714="type" in v58?v49[v58.type]:v711.dtype; +v713=!!v58.normalized; +v712=v58.size|0; +v715=v58.offset|0; +v716=v58.stride|0; +v717=v58.divisor|0; +} +} +v718=g215.location; +v719=v10[v718]; +if(v706===1){ +if(!v719.buffer){ +v1.enableVertexAttribArray(v718); +} +v720=v712||2; +if(v719.type!==v714||v719.size!==v720||v719.buffer!==v711||v719.normalized!==v713||v719.offset!==v715||v719.stride!==v716){ +v1.bindBuffer(34962,v711.buffer); +v1.vertexAttribPointer(v718,v720,v714,v713,v716,v715); +v719.type=v714; +v719.size=v720; +v719.buffer=v711; +v719.normalized=v713; +v719.offset=v715; +v719.stride=v716; +} +if(v719.divisor!==v717){ +v616.vertexAttribDivisorANGLE(v718,v717); +v719.divisor=v717; +} +} +else{ +if(v719.buffer){ +v1.disableVertexAttribArray(v718); +v719.buffer=null; +} +if(v719.x!==v707||v719.y!==v708||v719.z!==v709||v719.w!==v710){ +v1.vertexAttrib4f(v718,v707,v708,v709,v710); +v719.x=v707; +v719.y=v708; +v719.z=v709; +v719.w=v710; +} +} +v721=v618["positionBuffer"]; +v55.buffer=v721; +if(!(v55&&(typeof v55==="object"||typeof v55==="function")&&(v16(v55)||v8.getBuffer(v55)||v8.getBuffer(v55.buffer)||v16(v55.buffer)||("constant" in v55&&(typeof v55.constant==="number"||v17(v55.constant))))))g18.commandRaise(g220,g19); +v722=false; +v723=1; +v724=0; +v725=0; +v726=0; +v727=0; +v728=null; +v729=0; +v730=false; +v731=5126; +v732=0; +v733=0; +v734=0; +if(v16(v55)){ +v722=true; +v728=v8.createStream(34962,v55); +v731=v728.dtype; +} +else{ +v728=v8.getBuffer(v55); +if(v728){ +v731=v728.dtype; +} +else if("constant" in v55){ +v723=2; +if(typeof v55.constant === "number"){ +v724=v55.constant; +v725=v726=v727=0; +} +else{ +v724=v55.constant.length>0?v55.constant[0]:0; +v725=v55.constant.length>1?v55.constant[1]:0; +v726=v55.constant.length>2?v55.constant[2]:0; +v727=v55.constant.length>3?v55.constant[3]:0; +} +} +else{ +if(v16(v55.buffer)){ +v728=v8.createStream(34962,v55.buffer); +} +else{ +v728=v8.getBuffer(v55.buffer); +} +v731="type" in v55?v49[v55.type]:v728.dtype; +v730=!!v55.normalized; +v729=v55.size|0; +v732=v55.offset|0; +v733=v55.stride|0; +v734=v55.divisor|0; +} +} +v735=g234.location; +v736=v10[v735]; +if(v723===1){ +if(!v736.buffer){ +v1.enableVertexAttribArray(v735); +} +v737=v729||2; +if(v736.type!==v731||v736.size!==v737||v736.buffer!==v728||v736.normalized!==v730||v736.offset!==v732||v736.stride!==v733){ +v1.bindBuffer(34962,v728.buffer); +v1.vertexAttribPointer(v735,v737,v731,v730,v733,v732); +v736.type=v731; +v736.size=v737; +v736.buffer=v728; +v736.normalized=v730; +v736.offset=v732; +v736.stride=v733; +} +if(v736.divisor!==v734){ +v616.vertexAttribDivisorANGLE(v735,v734); +v736.divisor=v734; +} +} +else{ +if(v736.buffer){ +v1.disableVertexAttribArray(v735); +v736.buffer=null; +} +if(v736.x!==v724||v736.y!==v725||v736.z!==v726||v736.w!==v727){ +v1.vertexAttrib4f(v735,v724,v725,v726,v727); +v736.x=v724; +v736.y=v725; +v736.z=v726; +v736.w=v727; +} +} +v738=v618["dashLength"]; +if(!(typeof v738==="number"))g18.commandRaise(g240,g19); +if(!v617||v739!==v738){ +v739=v738; +v1.uniform1f(g238.location,v738); +} +v740=v618["dashTexture"]; +if(v740&&v740._reglType==="framebuffer"){ +v740=v740.color[0]; +} +if(!(typeof v740==="function"&&v740._reglType==="texture2d"))g18.commandRaise(g243,g19); +v741=v740._texture; +v1.uniform1i(g241.location,v741.bind()); +v742=v618["depth"]; +if(!(typeof v742==="number"))g18.commandRaise(g247,g19); +if(!v617||v743!==v742){ +v743=v742; +v1.uniform1f(g245.location,v742); +} +v744=v618["miterLimit"]; +if(!(typeof v744==="number"))g18.commandRaise(g250,g19); +if(!v617||v745!==v744){ +v745=v744; +v1.uniform1f(g248.location,v744); +} +v746=g252.call(this,v2,v618,v617); +if(!(typeof v746==="number"))g18.commandRaise(g254,g19); +if(!v617||v747!==v746){ +v747=v746; +v1.uniform1f(g251.location,v746); +} +v748=v618["opacity"]; +if(!(typeof v748==="number"))g18.commandRaise(g257,g19); +if(!v617||v749!==v748){ +v749=v748; +v1.uniform1f(g255.location,v748); +} +v750=v618["scale"]; +if(!(v17(v750)&&v750.length===2))g18.commandRaise(g260,g19); +v751=v750[0]; +v753=v750[1]; +if(!v617||v752!==v751||v754!==v753){ +v752=v751; +v754=v753; +v1.uniform2f(g258.location,v751,v753); +} +v755=v618["thickness"]; +if(!(typeof v755==="number"))g18.commandRaise(g265,g19); +if(!v617||v756!==v755){ +v756=v755; +v1.uniform1f(g263.location,v755); +} +v757=v618["translate"]; +if(!(v17(v757)&&v757.length===2))g18.commandRaise(g268,g19); +v758=v757[0]; +v760=v757[1]; +if(!v617||v759!==v758||v761!==v760){ +v759=v758; +v761=v760; +v1.uniform2f(g266.location,v758,v760); +} +v762=g272.call(this,v2,v618,v617); +if(!(v17(v762)&&v762.length===4))g18.commandRaise(g274,g19); +v763=v762[0]; +v765=v762[1]; +v767=v762[2]; +v769=v762[3]; +if(!v617||v764!==v763||v766!==v765||v768!==v767||v770!==v769){ +v764=v763; +v766=v765; +v768=v767; +v770=v769; +v1.uniform4f(g271.location,v763,v765,v767,v769); +} +v772=v618["count"]; +if(v772>0){ +if(v771){ +v616.drawElementsInstancedANGLE(5,4,v771.type,0<<((v771.type-5121)>>1),v772); +} +else{ +v616.drawArraysInstancedANGLE(5,0,4,v772); +} +} +else if(v772<0){ +if(v771){ +v1.drawElements(5,4,v771.type,0<<((v771.type-5121)>>1)); +} +else{ +v1.drawArrays(5,0,4); +} +} +v2.viewportWidth=v624; +v2.viewportHeight=v625; +if(v637){ +v8.destroyStream(v643); +} +if(v654){ +v8.destroyStream(v660); +} +if(v671){ +v8.destroyStream(v677); +} +if(v688){ +v8.destroyStream(v694); +} +if(v705){ +v8.destroyStream(v711); +} +if(v722){ +v8.destroyStream(v728); +} +v741.unbind(); +} +v5.dirty=true; +v11.setVAO(null); +if(v614){ +g52.cpuTime+=performance.now()-v615; +} +} +,} + +} \ No newline at end of file diff --git a/src/generated/regl-codegen/ff8495670417d5d0e4caa9942ad63b4dff0242a390ac1cb807c78ca326d6f3ce b/src/generated/regl-codegen/ff8495670417d5d0e4caa9942ad63b4dff0242a390ac1cb807c78ca326d6f3ce new file mode 100644 index 00000000000..30500c5291a --- /dev/null +++ b/src/generated/regl-codegen/ff8495670417d5d0e4caa9942ad63b4dff0242a390ac1cb807c78ca326d6f3ce @@ -0,0 +1,639 @@ +module.exports = function anonymous(g0,g18,g19,g52,g117,g184 +) { +"use strict"; +var v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v114,v181; +v1=g0.gl; +v2=g0.context; +v3=g0.strings; +v4=g0.next; +v5=g0.current; +v6=g0.draw; +v7=g0.elements; +v8=g0.buffer; +v9=g0.shader; +v10=g0.attributes; +v11=g0.vao; +v12=g0.uniforms; +v13=g0.framebuffer; +v14=g0.extensions; +v15=g0.timer; +v16=g0.isBufferArgs; +v17=g0.isArrayLike; +v20=v4.blend_color; +v21=v5.blend_color; +v22=v4.blend_equation; +v23=v5.blend_equation; +v24=v4.blend_func; +v25=v5.blend_func; +v26=v4.depth_range; +v27=v5.depth_range; +v28=v4.colorMask; +v29=v5.colorMask; +v30=v4.polygonOffset_offset; +v31=v5.polygonOffset_offset; +v32=v4.sample_coverage; +v33=v5.sample_coverage; +v34=v4.stencil_func; +v35=v5.stencil_func; +v36=v4.stencil_opFront; +v37=v5.stencil_opFront; +v38=v4.stencil_opBack; +v39=v5.stencil_opBack; +v40=v4.scissor_box; +v41=v5.scissor_box; +v42=v4.viewport; +v43=v5.viewport; +v44={ +"points":0,"point":0,"lines":1,"line":1,"triangles":4,"triangle":4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6} +; +v45={ +"never":512,"less":513,"<":513,"equal":514,"=":514,"==":514,"===":514,"lequal":515,"<=":515,"greater":516,">":516,"notequal":517,"!=":517,"!==":517,"gequal":518,">=":518,"always":519} +; +v46={ +"0":0,"1":1,"zero":0,"one":1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776} +; +v47={ +"add":32774,"subtract":32778,"reverse subtract":32779} +; +v48={ +"0":0,"zero":0,"keep":7680,"replace":7681,"increment":7682,"decrement":7683,"increment wrap":34055,"decrement wrap":34056,"invert":5386} +; +v49={ +"int8":5120,"int16":5122,"int32":5124,"uint8":5121,"uint16":5123,"uint32":5125,"float":5126,"float32":5126} +; +v50={ +"cw":2304,"ccw":2305} +; +v51=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"]; +v114={ +} +; +v181={ +} +; +return { +"draw":function(a0){ +var v53,v54,v109,v110,v111,v112,v113,v115,v116; +v53=v14.angle_instanced_arrays; +v54=v13.next; +if(v54!==v13.cur){ +if(v54){ +v1.bindFramebuffer(36160,v54.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v54; +} +if(v5.dirty){ +var v55,v56,v57,v58,v59,v60,v61,v62,v63,v64,v65,v66,v67,v68,v69,v70,v71,v72,v73,v74,v75,v76,v77,v78,v79,v80,v81,v82,v83,v84,v85,v86,v87,v88,v89,v90,v91,v92,v93,v94,v95,v96,v97,v98,v99,v100,v101,v102,v103,v104,v105,v106,v107,v108; +v55=v4.dither; +if(v55!==v5.dither){ +if(v55){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v55; +} +v56=v4.blend_enable; +if(v56!==v5.blend_enable){ +if(v56){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=v56; +} +v57=v20[0]; +v58=v20[1]; +v59=v20[2]; +v60=v20[3]; +if(v57!==v21[0]||v58!==v21[1]||v59!==v21[2]||v60!==v21[3]){ +v1.blendColor(v57,v58,v59,v60); +v21[0]=v57; +v21[1]=v58; +v21[2]=v59; +v21[3]=v60; +} +v61=v22[0]; +v62=v22[1]; +if(v61!==v23[0]||v62!==v23[1]){ +v1.blendEquationSeparate(v61,v62); +v23[0]=v61; +v23[1]=v62; +} +v63=v24[0]; +v64=v24[1]; +v65=v24[2]; +v66=v24[3]; +if(v63!==v25[0]||v64!==v25[1]||v65!==v25[2]||v66!==v25[3]){ +v1.blendFuncSeparate(v63,v64,v65,v66); +v25[0]=v63; +v25[1]=v64; +v25[2]=v65; +v25[3]=v66; +} +v67=v4.depth_enable; +if(v67!==v5.depth_enable){ +if(v67){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=v67; +} +v68=v4.depth_func; +if(v68!==v5.depth_func){ +v1.depthFunc(v68); +v5.depth_func=v68; +} +v69=v26[0]; +v70=v26[1]; +if(v69!==v27[0]||v70!==v27[1]){ +v1.depthRange(v69,v70); +v27[0]=v69; +v27[1]=v70; +} +v71=v4.depth_mask; +if(v71!==v5.depth_mask){ +v1.depthMask(v71); +v5.depth_mask=v71; +} +v72=v28[0]; +v73=v28[1]; +v74=v28[2]; +v75=v28[3]; +if(v72!==v29[0]||v73!==v29[1]||v74!==v29[2]||v75!==v29[3]){ +v1.colorMask(v72,v73,v74,v75); +v29[0]=v72; +v29[1]=v73; +v29[2]=v74; +v29[3]=v75; +} +v76=v4.cull_enable; +if(v76!==v5.cull_enable){ +if(v76){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v76; +} +v77=v4.cull_face; +if(v77!==v5.cull_face){ +v1.cullFace(v77); +v5.cull_face=v77; +} +v78=v4.frontFace; +if(v78!==v5.frontFace){ +v1.frontFace(v78); +v5.frontFace=v78; +} +v79=v4.lineWidth; +if(v79!==v5.lineWidth){ +v1.lineWidth(v79); +v5.lineWidth=v79; +} +v80=v4.polygonOffset_enable; +if(v80!==v5.polygonOffset_enable){ +if(v80){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v80; +} +v81=v30[0]; +v82=v30[1]; +if(v81!==v31[0]||v82!==v31[1]){ +v1.polygonOffset(v81,v82); +v31[0]=v81; +v31[1]=v82; +} +v83=v4.sample_alpha; +if(v83!==v5.sample_alpha){ +if(v83){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v83; +} +v84=v4.sample_enable; +if(v84!==v5.sample_enable){ +if(v84){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v84; +} +v85=v32[0]; +v86=v32[1]; +if(v85!==v33[0]||v86!==v33[1]){ +v1.sampleCoverage(v85,v86); +v33[0]=v85; +v33[1]=v86; +} +v87=v4.stencil_enable; +if(v87!==v5.stencil_enable){ +if(v87){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=v87; +} +v88=v4.stencil_mask; +if(v88!==v5.stencil_mask){ +v1.stencilMask(v88); +v5.stencil_mask=v88; +} +v89=v34[0]; +v90=v34[1]; +v91=v34[2]; +if(v89!==v35[0]||v90!==v35[1]||v91!==v35[2]){ +v1.stencilFunc(v89,v90,v91); +v35[0]=v89; +v35[1]=v90; +v35[2]=v91; +} +v92=v36[0]; +v93=v36[1]; +v94=v36[2]; +v95=v36[3]; +if(v92!==v37[0]||v93!==v37[1]||v94!==v37[2]||v95!==v37[3]){ +v1.stencilOpSeparate(v92,v93,v94,v95); +v37[0]=v92; +v37[1]=v93; +v37[2]=v94; +v37[3]=v95; +} +v96=v38[0]; +v97=v38[1]; +v98=v38[2]; +v99=v38[3]; +if(v96!==v39[0]||v97!==v39[1]||v98!==v39[2]||v99!==v39[3]){ +v1.stencilOpSeparate(v96,v97,v98,v99); +v39[0]=v96; +v39[1]=v97; +v39[2]=v98; +v39[3]=v99; +} +v100=v4.scissor_enable; +if(v100!==v5.scissor_enable){ +if(v100){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=v100; +} +v101=v40[0]; +v102=v40[1]; +v103=v40[2]; +v104=v40[3]; +if(v101!==v41[0]||v102!==v41[1]||v103!==v41[2]||v104!==v41[3]){ +v1.scissor(v101,v102,v103,v104); +v41[0]=v101; +v41[1]=v102; +v41[2]=v103; +v41[3]=v104; +} +v105=v42[0]; +v106=v42[1]; +v107=v42[2]; +v108=v42[3]; +if(v105!==v43[0]||v106!==v43[1]||v107!==v43[2]||v108!==v43[3]){ +v1.viewport(v105,v106,v107,v108); +v43[0]=v105; +v43[1]=v106; +v43[2]=v107; +v43[3]=v108; +} +v5.dirty=false; +} +v109=v5.profile; +if(v109){ +v110=performance.now(); +g52.count++; +} +v111=v9.frag; +v112=v9.vert; +v113=v9.program(v112,v111,g19); +v1.useProgram(v113.program); +v11.setVAO(null); +v115=v113.id; +v116=v114[v115]; +if(v116){ +v116.call(this,a0); +} +else{ +v116=v114[v115]=g117(v113); +v116.call(this,a0); +} +v11.setVAO(null); +if(v109){ +g52.cpuTime+=performance.now()-v110; +} +} +,"scope":function(a0,a1,a2){ +var v118,v119; +v118=v5.profile; +if(v118){ +v119=performance.now(); +g52.count++; +} +a1(v2,a0,a2); +if(v118){ +g52.cpuTime+=performance.now()-v119; +} +} +,"batch":function(a0,a1){ +var v120,v121,v176,v177,v178,v179,v180,v182,v183; +v120=v14.angle_instanced_arrays; +v121=v13.next; +if(v121!==v13.cur){ +if(v121){ +v1.bindFramebuffer(36160,v121.framebuffer); +} +else{ +v1.bindFramebuffer(36160,null); +} +v13.cur=v121; +} +if(v5.dirty){ +var v122,v123,v124,v125,v126,v127,v128,v129,v130,v131,v132,v133,v134,v135,v136,v137,v138,v139,v140,v141,v142,v143,v144,v145,v146,v147,v148,v149,v150,v151,v152,v153,v154,v155,v156,v157,v158,v159,v160,v161,v162,v163,v164,v165,v166,v167,v168,v169,v170,v171,v172,v173,v174,v175; +v122=v4.dither; +if(v122!==v5.dither){ +if(v122){ +v1.enable(3024); +} +else{ +v1.disable(3024); +} +v5.dither=v122; +} +v123=v4.blend_enable; +if(v123!==v5.blend_enable){ +if(v123){ +v1.enable(3042); +} +else{ +v1.disable(3042); +} +v5.blend_enable=v123; +} +v124=v20[0]; +v125=v20[1]; +v126=v20[2]; +v127=v20[3]; +if(v124!==v21[0]||v125!==v21[1]||v126!==v21[2]||v127!==v21[3]){ +v1.blendColor(v124,v125,v126,v127); +v21[0]=v124; +v21[1]=v125; +v21[2]=v126; +v21[3]=v127; +} +v128=v22[0]; +v129=v22[1]; +if(v128!==v23[0]||v129!==v23[1]){ +v1.blendEquationSeparate(v128,v129); +v23[0]=v128; +v23[1]=v129; +} +v130=v24[0]; +v131=v24[1]; +v132=v24[2]; +v133=v24[3]; +if(v130!==v25[0]||v131!==v25[1]||v132!==v25[2]||v133!==v25[3]){ +v1.blendFuncSeparate(v130,v131,v132,v133); +v25[0]=v130; +v25[1]=v131; +v25[2]=v132; +v25[3]=v133; +} +v134=v4.depth_enable; +if(v134!==v5.depth_enable){ +if(v134){ +v1.enable(2929); +} +else{ +v1.disable(2929); +} +v5.depth_enable=v134; +} +v135=v4.depth_func; +if(v135!==v5.depth_func){ +v1.depthFunc(v135); +v5.depth_func=v135; +} +v136=v26[0]; +v137=v26[1]; +if(v136!==v27[0]||v137!==v27[1]){ +v1.depthRange(v136,v137); +v27[0]=v136; +v27[1]=v137; +} +v138=v4.depth_mask; +if(v138!==v5.depth_mask){ +v1.depthMask(v138); +v5.depth_mask=v138; +} +v139=v28[0]; +v140=v28[1]; +v141=v28[2]; +v142=v28[3]; +if(v139!==v29[0]||v140!==v29[1]||v141!==v29[2]||v142!==v29[3]){ +v1.colorMask(v139,v140,v141,v142); +v29[0]=v139; +v29[1]=v140; +v29[2]=v141; +v29[3]=v142; +} +v143=v4.cull_enable; +if(v143!==v5.cull_enable){ +if(v143){ +v1.enable(2884); +} +else{ +v1.disable(2884); +} +v5.cull_enable=v143; +} +v144=v4.cull_face; +if(v144!==v5.cull_face){ +v1.cullFace(v144); +v5.cull_face=v144; +} +v145=v4.frontFace; +if(v145!==v5.frontFace){ +v1.frontFace(v145); +v5.frontFace=v145; +} +v146=v4.lineWidth; +if(v146!==v5.lineWidth){ +v1.lineWidth(v146); +v5.lineWidth=v146; +} +v147=v4.polygonOffset_enable; +if(v147!==v5.polygonOffset_enable){ +if(v147){ +v1.enable(32823); +} +else{ +v1.disable(32823); +} +v5.polygonOffset_enable=v147; +} +v148=v30[0]; +v149=v30[1]; +if(v148!==v31[0]||v149!==v31[1]){ +v1.polygonOffset(v148,v149); +v31[0]=v148; +v31[1]=v149; +} +v150=v4.sample_alpha; +if(v150!==v5.sample_alpha){ +if(v150){ +v1.enable(32926); +} +else{ +v1.disable(32926); +} +v5.sample_alpha=v150; +} +v151=v4.sample_enable; +if(v151!==v5.sample_enable){ +if(v151){ +v1.enable(32928); +} +else{ +v1.disable(32928); +} +v5.sample_enable=v151; +} +v152=v32[0]; +v153=v32[1]; +if(v152!==v33[0]||v153!==v33[1]){ +v1.sampleCoverage(v152,v153); +v33[0]=v152; +v33[1]=v153; +} +v154=v4.stencil_enable; +if(v154!==v5.stencil_enable){ +if(v154){ +v1.enable(2960); +} +else{ +v1.disable(2960); +} +v5.stencil_enable=v154; +} +v155=v4.stencil_mask; +if(v155!==v5.stencil_mask){ +v1.stencilMask(v155); +v5.stencil_mask=v155; +} +v156=v34[0]; +v157=v34[1]; +v158=v34[2]; +if(v156!==v35[0]||v157!==v35[1]||v158!==v35[2]){ +v1.stencilFunc(v156,v157,v158); +v35[0]=v156; +v35[1]=v157; +v35[2]=v158; +} +v159=v36[0]; +v160=v36[1]; +v161=v36[2]; +v162=v36[3]; +if(v159!==v37[0]||v160!==v37[1]||v161!==v37[2]||v162!==v37[3]){ +v1.stencilOpSeparate(v159,v160,v161,v162); +v37[0]=v159; +v37[1]=v160; +v37[2]=v161; +v37[3]=v162; +} +v163=v38[0]; +v164=v38[1]; +v165=v38[2]; +v166=v38[3]; +if(v163!==v39[0]||v164!==v39[1]||v165!==v39[2]||v166!==v39[3]){ +v1.stencilOpSeparate(v163,v164,v165,v166); +v39[0]=v163; +v39[1]=v164; +v39[2]=v165; +v39[3]=v166; +} +v167=v4.scissor_enable; +if(v167!==v5.scissor_enable){ +if(v167){ +v1.enable(3089); +} +else{ +v1.disable(3089); +} +v5.scissor_enable=v167; +} +v168=v40[0]; +v169=v40[1]; +v170=v40[2]; +v171=v40[3]; +if(v168!==v41[0]||v169!==v41[1]||v170!==v41[2]||v171!==v41[3]){ +v1.scissor(v168,v169,v170,v171); +v41[0]=v168; +v41[1]=v169; +v41[2]=v170; +v41[3]=v171; +} +v172=v42[0]; +v173=v42[1]; +v174=v42[2]; +v175=v42[3]; +if(v172!==v43[0]||v173!==v43[1]||v174!==v43[2]||v175!==v43[3]){ +v1.viewport(v172,v173,v174,v175); +v43[0]=v172; +v43[1]=v173; +v43[2]=v174; +v43[3]=v175; +} +v5.dirty=false; +} +v176=v5.profile; +if(v176){ +v177=performance.now(); +g52.count+=a1; +} +v178=v9.frag; +v179=v9.vert; +v180=v9.program(v179,v178,g19); +v1.useProgram(v180.program); +v11.setVAO(null); +v182=v180.id; +v183=v181[v182]; +if(v183){ +v183.call(this,a0,a1); +} +else{ +v183=v181[v182]=g184(v180); +v183.call(this,a0,a1); +} +v11.setVAO(null); +if(v176){ +g52.cpuTime+=performance.now()-v177; +} +} +,} + +} \ No newline at end of file diff --git a/src/lib/prepare_regl.js b/src/lib/prepare_regl.js index 9357876f089..bdc35ed6f22 100644 --- a/src/lib/prepare_regl.js +++ b/src/lib/prepare_regl.js @@ -18,12 +18,15 @@ var createRegl = require('regl'); * * @return {boolean} true if all createRegl calls succeeded, false otherwise */ -module.exports = function prepareRegl(gd, extensions) { +module.exports = function prepareRegl(gd, extensions, reglPrecompiled) { var fullLayout = gd._fullLayout; var success = true; fullLayout._glcanvas.each(function(d) { - if(d.regl) return; + if(d.regl) { + d.regl.preloadCachedCode(reglPrecompiled); + return; + } // only parcoords needs pick layer if(d.pick && !fullLayout._has('parcoords')) return; @@ -35,7 +38,8 @@ module.exports = function prepareRegl(gd, extensions) { preserveDrawingBuffer: true }, pixelRatio: gd._context.plotGlPixelRatio || global.devicePixelRatio, - extensions: extensions || [] + extensions: extensions || [], + cachedCode: reglPrecompiled || {} }); } catch(e) { success = false; diff --git a/src/traces/parcoords/base_index.js b/src/traces/parcoords/base_index.js new file mode 100644 index 00000000000..1c8be966cbb --- /dev/null +++ b/src/traces/parcoords/base_index.js @@ -0,0 +1,24 @@ +'use strict'; + +module.exports = { + attributes: require('./attributes'), + supplyDefaults: require('./defaults'), + calc: require('./calc'), + colorbar: { + container: 'line', + min: 'cmin', + max: 'cmax' + }, + + moduleType: 'trace', + name: 'parcoords', + basePlotModule: require('./base_plot'), + categories: ['gl', 'regl', 'noOpacity', 'noHover'], + meta: { + description: [ + 'Parallel coordinates for multidimensional exploratory data analysis.', + 'The samples are specified in `dimensions`.', + 'The colors are set in `line.color`.' + ].join(' ') + } +}; diff --git a/src/traces/parcoords/index.js b/src/traces/parcoords/index.js index f5f6699ec58..fcabd3a5437 100644 --- a/src/traces/parcoords/index.js +++ b/src/traces/parcoords/index.js @@ -1,25 +1,7 @@ 'use strict'; -module.exports = { - attributes: require('./attributes'), - supplyDefaults: require('./defaults'), - calc: require('./calc'), - plot: require('./plot'), - colorbar: { - container: 'line', - min: 'cmin', - max: 'cmax' - }, +var index = require('./base_index'); - moduleType: 'trace', - name: 'parcoords', - basePlotModule: require('./base_plot'), - categories: ['gl', 'regl', 'noOpacity', 'noHover'], - meta: { - description: [ - 'Parallel coordinates for multidimensional exploratory data analysis.', - 'The samples are specified in `dimensions`.', - 'The colors are set in `line.color`.' - ].join(' ') - } -}; +index.plot = require('./plot'); + +module.exports = index; diff --git a/src/traces/parcoords/plot-strict.js b/src/traces/parcoords/plot-strict.js new file mode 100644 index 00000000000..400e079cebc --- /dev/null +++ b/src/traces/parcoords/plot-strict.js @@ -0,0 +1,9 @@ +'use strict'; + +var plot = require('./plot'); + +var reglPrecompiled = require('./regl_precompiled'); + +Object.assign(plot.reglPrecompiled, reglPrecompiled); + +module.exports = plot; diff --git a/src/traces/parcoords/plot.js b/src/traces/parcoords/plot.js index 7ae5be63323..9b9215e3796 100644 --- a/src/traces/parcoords/plot.js +++ b/src/traces/parcoords/plot.js @@ -3,6 +3,7 @@ var parcoords = require('./parcoords'); var prepareRegl = require('../../lib/prepare_regl'); var isVisible = require('./helpers').isVisible; +var reglPrecompiled = {}; function newIndex(visibleIndices, orig, dim) { var origIndex = orig.indexOf(dim); @@ -23,10 +24,10 @@ function sorter(visibleIndices, orig) { }; } -module.exports = function plot(gd, cdModule) { +var exports = module.exports = function plot(gd, cdModule) { var fullLayout = gd._fullLayout; - var success = prepareRegl(gd); + var success = prepareRegl(gd, [], reglPrecompiled); if(!success) return; var currentDims = {}; @@ -143,3 +144,5 @@ module.exports = function plot(gd, cdModule) { } ); }; + +exports.reglPrecompiled = reglPrecompiled; diff --git a/src/traces/parcoords/regl_precompiled.js b/src/traces/parcoords/regl_precompiled.js new file mode 100644 index 00000000000..fef255879bc --- /dev/null +++ b/src/traces/parcoords/regl_precompiled.js @@ -0,0 +1,12 @@ +'use strict'; +var v0 = require('../../generated/regl-codegen/909861c036d6f1ef40ba2dfcc33ef32489d2fe05fa7b7984d5ff315ddceb17b1'); +var v1 = require('../../generated/regl-codegen/4df455b48c9de7d9f1de4b9481b505c09613ba7f90d2b4e360e673839566688e'); +var v2 = require('../../generated/regl-codegen/59568c77bcbe6343ee6109df49ceeb78c8a8a8a81872e88fb077f9a3d6dc0567'); +var v3 = require('../../generated/regl-codegen/c759965c8d66b2b356ae7455825df829f2ba7d4e7e903236f8c8d3bc5f45bd44'); + +module.exports = { + '909861c036d6f1ef40ba2dfcc33ef32489d2fe05fa7b7984d5ff315ddceb17b1': v0, + '4df455b48c9de7d9f1de4b9481b505c09613ba7f90d2b4e360e673839566688e': v1, + '59568c77bcbe6343ee6109df49ceeb78c8a8a8a81872e88fb077f9a3d6dc0567': v2, + 'c759965c8d66b2b356ae7455825df829f2ba7d4e7e903236f8c8d3bc5f45bd44': v3 +}; diff --git a/src/traces/parcoords/strict.js b/src/traces/parcoords/strict.js new file mode 100644 index 00000000000..54e22e8222c --- /dev/null +++ b/src/traces/parcoords/strict.js @@ -0,0 +1,7 @@ +'use strict'; + +var index = require('./base_index'); + +index.plot = require('./plot-strict'); + +module.exports = index; diff --git a/src/traces/scattergl/base_index.js b/src/traces/scattergl/base_index.js new file mode 100644 index 00000000000..2339e07acb7 --- /dev/null +++ b/src/traces/scattergl/base_index.js @@ -0,0 +1,29 @@ +'use strict'; + +var hover = require('./hover'); + +module.exports = { + moduleType: 'trace', + name: 'scattergl', + basePlotModule: require('../../plots/cartesian'), + categories: ['gl', 'regl', 'cartesian', 'symbols', 'errorBarsOK', 'showLegend', 'scatter-like'], + + attributes: require('./attributes'), + supplyDefaults: require('./defaults'), + crossTraceDefaults: require('../scatter/cross_trace_defaults'), + colorbar: require('../scatter/marker_colorbar'), + formatLabels: require('./format_labels'), + calc: require('./calc'), + hoverPoints: hover.hoverPoints, + selectPoints: require('./select'), + + meta: { + hrName: 'scatter_gl', + description: [ + 'The data visualized as scatter point or lines is set in `x` and `y`', + 'using the WebGL plotting engine.', + 'Bubble charts are achieved by setting `marker.size` and/or `marker.color`', + 'to a numerical arrays.' + ].join(' ') + } +}; diff --git a/src/traces/scattergl/index.js b/src/traces/scattergl/index.js index cfed96703d7..fcabd3a5437 100644 --- a/src/traces/scattergl/index.js +++ b/src/traces/scattergl/index.js @@ -1,30 +1,7 @@ 'use strict'; -var hover = require('./hover'); +var index = require('./base_index'); -module.exports = { - moduleType: 'trace', - name: 'scattergl', - basePlotModule: require('../../plots/cartesian'), - categories: ['gl', 'regl', 'cartesian', 'symbols', 'errorBarsOK', 'showLegend', 'scatter-like'], +index.plot = require('./plot'); - attributes: require('./attributes'), - supplyDefaults: require('./defaults'), - crossTraceDefaults: require('../scatter/cross_trace_defaults'), - colorbar: require('../scatter/marker_colorbar'), - formatLabels: require('./format_labels'), - calc: require('./calc'), - plot: require('./plot'), - hoverPoints: hover.hoverPoints, - selectPoints: require('./select'), - - meta: { - hrName: 'scatter_gl', - description: [ - 'The data visualized as scatter point or lines is set in `x` and `y`', - 'using the WebGL plotting engine.', - 'Bubble charts are achieved by setting `marker.size` and/or `marker.color`', - 'to a numerical arrays.' - ].join(' ') - } -}; +module.exports = index; diff --git a/src/traces/scattergl/plot.js b/src/traces/scattergl/plot.js index fbc4c2a3610..e06679b8f44 100644 --- a/src/traces/scattergl/plot.js +++ b/src/traces/scattergl/plot.js @@ -14,6 +14,7 @@ var linkTraces = require('../scatter/link_traces'); var styleTextSelection = require('./edit_style').styleTextSelection; +var reglPrecompiled = {}; function getViewport(fullLayout, xaxis, yaxis, plotGlPixelRatio) { var gs = fullLayout._size; @@ -34,7 +35,7 @@ function getViewport(fullLayout, xaxis, yaxis, plotGlPixelRatio) { ]; } -module.exports = function plot(gd, subplot, cdata) { +var exports = module.exports = function plot(gd, subplot, cdata) { if(!cdata.length) return; var fullLayout = gd._fullLayout; @@ -46,7 +47,7 @@ module.exports = function plot(gd, subplot, cdata) { // we may have more subplots than initialized data due to Axes.getSubplots method if(!scene) return; - var success = prepareRegl(gd, ['ANGLE_instanced_arrays', 'OES_element_index_uint']); + var success = prepareRegl(gd, ['ANGLE_instanced_arrays', 'OES_element_index_uint'], reglPrecompiled); if(!success) { scene.init(); return; @@ -369,3 +370,5 @@ module.exports = function plot(gd, subplot, cdata) { scene.glText.forEach(function(text) { text.update(vpRange0); }); } }; + +exports.reglPrecompiled = reglPrecompiled; diff --git a/src/traces/scattergl/plot_strict.js b/src/traces/scattergl/plot_strict.js new file mode 100644 index 00000000000..400e079cebc --- /dev/null +++ b/src/traces/scattergl/plot_strict.js @@ -0,0 +1,9 @@ +'use strict'; + +var plot = require('./plot'); + +var reglPrecompiled = require('./regl_precompiled'); + +Object.assign(plot.reglPrecompiled, reglPrecompiled); + +module.exports = plot; diff --git a/src/traces/scattergl/regl_precompiled.js b/src/traces/scattergl/regl_precompiled.js new file mode 100644 index 00000000000..107353f057b --- /dev/null +++ b/src/traces/scattergl/regl_precompiled.js @@ -0,0 +1,24 @@ +'use strict'; +var v0 = require('../../generated/regl-codegen/53f2bf051e4ba66c90f343d29aa8da9e4029454c0d428f8e46e94dfddc97c8c6'); +var v1 = require('../../generated/regl-codegen/8a43b073e4f3e9c0e499c8ac9c253f2aa1e3d3de2febfccc6526b52295dbf770'); +var v2 = require('../../generated/regl-codegen/ff8495670417d5d0e4caa9942ad63b4dff0242a390ac1cb807c78ca326d6f3ce'); +var v3 = require('../../generated/regl-codegen/21cec01aa93887c70e86d7f1bc84d6837da0b1f5c1ff4cadd42ac6eb37f9f316'); +var v4 = require('../../generated/regl-codegen/f9448a214a3e3cd439b767559aa71a4d1ccf5a8f39b8b756973e71acd33ff956'); +var v5 = require('../../generated/regl-codegen/0919c57b995304312da30a5af7873a319bfb7b7e22ff6b4fa203ecbd5774ebfc'); +var v6 = require('../../generated/regl-codegen/13c0ae156483f2bcbd7ff29404f0abfd8689ff43f41791a6c7469868690a4260'); +var v7 = require('../../generated/regl-codegen/19769c875db736c08a744c0a6aabe28276ed06aa24fdb7c36506a9f4c1f56f13'); +var v8 = require('../../generated/regl-codegen/6c3ff5a68d2906faf59307b58a799389f916ebdd3f7732ce75967575041988fc'); +var v9 = require('../../generated/regl-codegen/7c8e7f36e693904898ece5f7f8b49b23c69d98397567c3915a45647209eb7da4'); + +module.exports = { + '53f2bf051e4ba66c90f343d29aa8da9e4029454c0d428f8e46e94dfddc97c8c6': v0, + '8a43b073e4f3e9c0e499c8ac9c253f2aa1e3d3de2febfccc6526b52295dbf770': v1, + 'ff8495670417d5d0e4caa9942ad63b4dff0242a390ac1cb807c78ca326d6f3ce': v2, + '21cec01aa93887c70e86d7f1bc84d6837da0b1f5c1ff4cadd42ac6eb37f9f316': v3, + 'f9448a214a3e3cd439b767559aa71a4d1ccf5a8f39b8b756973e71acd33ff956': v4, + '0919c57b995304312da30a5af7873a319bfb7b7e22ff6b4fa203ecbd5774ebfc': v5, + '13c0ae156483f2bcbd7ff29404f0abfd8689ff43f41791a6c7469868690a4260': v6, + '19769c875db736c08a744c0a6aabe28276ed06aa24fdb7c36506a9f4c1f56f13': v7, + '6c3ff5a68d2906faf59307b58a799389f916ebdd3f7732ce75967575041988fc': v8, + '7c8e7f36e693904898ece5f7f8b49b23c69d98397567c3915a45647209eb7da4': v9 +}; diff --git a/src/traces/scattergl/strict.js b/src/traces/scattergl/strict.js new file mode 100644 index 00000000000..edea996117e --- /dev/null +++ b/src/traces/scattergl/strict.js @@ -0,0 +1,7 @@ +'use strict'; + +var index = require('./base_index'); + +index.plot = require('./plot_strict'); + +module.exports = index; diff --git a/src/traces/scatterpolargl/base_index.js b/src/traces/scatterpolargl/base_index.js new file mode 100644 index 00000000000..f5a8321ae70 --- /dev/null +++ b/src/traces/scatterpolargl/base_index.js @@ -0,0 +1,29 @@ +'use strict'; + +module.exports = { + moduleType: 'trace', + name: 'scatterpolargl', + basePlotModule: require('../../plots/polar'), + categories: ['gl', 'regl', 'polar', 'symbols', 'showLegend', 'scatter-like'], + + attributes: require('./attributes'), + supplyDefaults: require('./defaults'), + colorbar: require('../scatter/marker_colorbar'), + formatLabels: require('./format_labels'), + + calc: require('./calc'), + hoverPoints: require('./hover').hoverPoints, + selectPoints: require('../scattergl/select'), + + meta: { + hrName: 'scatter_polar_gl', + description: [ + 'The scatterpolargl trace type encompasses line charts, scatter charts, and bubble charts', + 'in polar coordinates using the WebGL plotting engine.', + 'The data visualized as scatter point or lines is set in', + '`r` (radial) and `theta` (angular) coordinates', + 'Bubble charts are achieved by setting `marker.size` and/or `marker.color`', + 'to numerical arrays.' + ].join(' ') + } +}; diff --git a/src/traces/scatterpolargl/index.js b/src/traces/scatterpolargl/index.js index 7472e656adc..fcabd3a5437 100644 --- a/src/traces/scatterpolargl/index.js +++ b/src/traces/scatterpolargl/index.js @@ -1,30 +1,7 @@ 'use strict'; -module.exports = { - moduleType: 'trace', - name: 'scatterpolargl', - basePlotModule: require('../../plots/polar'), - categories: ['gl', 'regl', 'polar', 'symbols', 'showLegend', 'scatter-like'], +var index = require('./base_index'); - attributes: require('./attributes'), - supplyDefaults: require('./defaults'), - colorbar: require('../scatter/marker_colorbar'), - formatLabels: require('./format_labels'), +index.plot = require('./plot'); - calc: require('./calc'), - plot: require('./plot'), - hoverPoints: require('./hover').hoverPoints, - selectPoints: require('../scattergl/select'), - - meta: { - hrName: 'scatter_polar_gl', - description: [ - 'The scatterpolargl trace type encompasses line charts, scatter charts, and bubble charts', - 'in polar coordinates using the WebGL plotting engine.', - 'The data visualized as scatter point or lines is set in', - '`r` (radial) and `theta` (angular) coordinates', - 'Bubble charts are achieved by setting `marker.size` and/or `marker.color`', - 'to numerical arrays.' - ].join(' ') - } -}; +module.exports = index; diff --git a/src/traces/scatterpolargl/plot.js b/src/traces/scatterpolargl/plot.js index deab9296856..701fcb449f3 100644 --- a/src/traces/scatterpolargl/plot.js +++ b/src/traces/scatterpolargl/plot.js @@ -11,6 +11,8 @@ var Lib = require('../../lib'); var TOO_MANY_POINTS = require('../scattergl/constants').TOO_MANY_POINTS; +var reglPrecompiled = {}; + module.exports = function plot(gd, subplot, cdata) { if(!cdata.length) return; @@ -126,3 +128,5 @@ module.exports = function plot(gd, subplot, cdata) { return scatterglPlot(gd, subplot, cdata); }; + +module.exports.reglPrecompiled = reglPrecompiled; diff --git a/src/traces/scatterpolargl/plot_strict.js b/src/traces/scatterpolargl/plot_strict.js new file mode 100644 index 00000000000..2e76a4c35a3 --- /dev/null +++ b/src/traces/scatterpolargl/plot_strict.js @@ -0,0 +1,13 @@ +'use strict'; + +var plot = require('./plot'); + +var reglPrecompiled = require('./regl_precompiled'); + +var reglPrecompiledDep = require('../scattergl/regl_precompiled'); + +Object.assign(plot.reglPrecompiled, reglPrecompiled); + +Object.assign(plot.reglPrecompiled, reglPrecompiledDep); + +module.exports = plot; diff --git a/src/traces/scatterpolargl/regl_precompiled.js b/src/traces/scatterpolargl/regl_precompiled.js new file mode 100644 index 00000000000..107353f057b --- /dev/null +++ b/src/traces/scatterpolargl/regl_precompiled.js @@ -0,0 +1,24 @@ +'use strict'; +var v0 = require('../../generated/regl-codegen/53f2bf051e4ba66c90f343d29aa8da9e4029454c0d428f8e46e94dfddc97c8c6'); +var v1 = require('../../generated/regl-codegen/8a43b073e4f3e9c0e499c8ac9c253f2aa1e3d3de2febfccc6526b52295dbf770'); +var v2 = require('../../generated/regl-codegen/ff8495670417d5d0e4caa9942ad63b4dff0242a390ac1cb807c78ca326d6f3ce'); +var v3 = require('../../generated/regl-codegen/21cec01aa93887c70e86d7f1bc84d6837da0b1f5c1ff4cadd42ac6eb37f9f316'); +var v4 = require('../../generated/regl-codegen/f9448a214a3e3cd439b767559aa71a4d1ccf5a8f39b8b756973e71acd33ff956'); +var v5 = require('../../generated/regl-codegen/0919c57b995304312da30a5af7873a319bfb7b7e22ff6b4fa203ecbd5774ebfc'); +var v6 = require('../../generated/regl-codegen/13c0ae156483f2bcbd7ff29404f0abfd8689ff43f41791a6c7469868690a4260'); +var v7 = require('../../generated/regl-codegen/19769c875db736c08a744c0a6aabe28276ed06aa24fdb7c36506a9f4c1f56f13'); +var v8 = require('../../generated/regl-codegen/6c3ff5a68d2906faf59307b58a799389f916ebdd3f7732ce75967575041988fc'); +var v9 = require('../../generated/regl-codegen/7c8e7f36e693904898ece5f7f8b49b23c69d98397567c3915a45647209eb7da4'); + +module.exports = { + '53f2bf051e4ba66c90f343d29aa8da9e4029454c0d428f8e46e94dfddc97c8c6': v0, + '8a43b073e4f3e9c0e499c8ac9c253f2aa1e3d3de2febfccc6526b52295dbf770': v1, + 'ff8495670417d5d0e4caa9942ad63b4dff0242a390ac1cb807c78ca326d6f3ce': v2, + '21cec01aa93887c70e86d7f1bc84d6837da0b1f5c1ff4cadd42ac6eb37f9f316': v3, + 'f9448a214a3e3cd439b767559aa71a4d1ccf5a8f39b8b756973e71acd33ff956': v4, + '0919c57b995304312da30a5af7873a319bfb7b7e22ff6b4fa203ecbd5774ebfc': v5, + '13c0ae156483f2bcbd7ff29404f0abfd8689ff43f41791a6c7469868690a4260': v6, + '19769c875db736c08a744c0a6aabe28276ed06aa24fdb7c36506a9f4c1f56f13': v7, + '6c3ff5a68d2906faf59307b58a799389f916ebdd3f7732ce75967575041988fc': v8, + '7c8e7f36e693904898ece5f7f8b49b23c69d98397567c3915a45647209eb7da4': v9 +}; diff --git a/src/traces/scatterpolargl/strict.js b/src/traces/scatterpolargl/strict.js new file mode 100644 index 00000000000..edea996117e --- /dev/null +++ b/src/traces/scatterpolargl/strict.js @@ -0,0 +1,7 @@ +'use strict'; + +var index = require('./base_index'); + +index.plot = require('./plot_strict'); + +module.exports = index; diff --git a/src/traces/splom/base_index.js b/src/traces/splom/base_index.js new file mode 100644 index 00000000000..5a9151a3adb --- /dev/null +++ b/src/traces/splom/base_index.js @@ -0,0 +1,36 @@ +'use strict'; + +var Registry = require('../../registry'); +var Grid = require('../../components/grid'); + +module.exports = { + moduleType: 'trace', + name: 'splom', + + categories: ['gl', 'regl', 'cartesian', 'symbols', 'showLegend', 'scatter-like'], + + attributes: require('./attributes'), + supplyDefaults: require('./defaults'), + colorbar: require('../scatter/marker_colorbar'), + + calc: require('./calc'), + plot: require('./plot'), + hoverPoints: require('./hover').hoverPoints, + selectPoints: require('./select'), + editStyle: require('./edit_style'), + + meta: { + description: [ + 'Splom traces generate scatter plot matrix visualizations.', + 'Each splom `dimensions` items correspond to a generated axis.', + 'Values for each of those dimensions are set in `dimensions[i].values`.', + 'Splom traces support all `scattergl` marker style attributes.', + 'Specify `layout.grid` attributes and/or layout x-axis and y-axis attributes', + 'for more control over the axis positioning and style. ' + ].join(' ') + } +}; + +// splom traces use the 'grid' component to generate their axes, +// register it here +Registry.register(Grid); diff --git a/src/traces/splom/base_plot.js b/src/traces/splom/base_plot.js index e96e28da814..a3486e64514 100644 --- a/src/traces/splom/base_plot.js +++ b/src/traces/splom/base_plot.js @@ -11,12 +11,14 @@ var shouldShowZeroLine = require('../../plots/cartesian/axes').shouldShowZeroLin var SPLOM = 'splom'; +var reglPrecompiled = {}; + function plot(gd) { var fullLayout = gd._fullLayout; var _module = Registry.getModule(SPLOM); var splomCalcData = getModuleCalcData(gd.calcdata, _module)[0]; - var success = prepareRegl(gd, ['ANGLE_instanced_arrays', 'OES_element_index_uint']); + var success = prepareRegl(gd, ['ANGLE_instanced_arrays', 'OES_element_index_uint'], reglPrecompiled); if(!success) return; if(fullLayout._hasOnlyLargeSploms) { @@ -219,5 +221,6 @@ module.exports = { updateGrid: updateGrid, clean: clean, updateFx: Cartesian.updateFx, - toSVG: Cartesian.toSVG + toSVG: Cartesian.toSVG, + reglPrecompiled: reglPrecompiled }; diff --git a/src/traces/splom/base_plot_strict.js b/src/traces/splom/base_plot_strict.js new file mode 100644 index 00000000000..15d76a2b37d --- /dev/null +++ b/src/traces/splom/base_plot_strict.js @@ -0,0 +1,9 @@ +'use strict'; + +var basePlot = require('./base_plot'); +var reglPrecompiled = require('./regl_precompiled'); + +Object.assign(basePlot.reglPrecompiled, reglPrecompiled); + + +module.exports = basePlot; diff --git a/src/traces/splom/index.js b/src/traces/splom/index.js index 8851910c646..8dfc0271e1a 100644 --- a/src/traces/splom/index.js +++ b/src/traces/splom/index.js @@ -1,37 +1,7 @@ 'use strict'; -var Registry = require('../../registry'); -var Grid = require('../../components/grid'); +var index = require('./base_index'); -module.exports = { - moduleType: 'trace', - name: 'splom', +index.basePlotModule = require('./base_plot'), - basePlotModule: require('./base_plot'), - categories: ['gl', 'regl', 'cartesian', 'symbols', 'showLegend', 'scatter-like'], - - attributes: require('./attributes'), - supplyDefaults: require('./defaults'), - colorbar: require('../scatter/marker_colorbar'), - - calc: require('./calc'), - plot: require('./plot'), - hoverPoints: require('./hover').hoverPoints, - selectPoints: require('./select'), - editStyle: require('./edit_style'), - - meta: { - description: [ - 'Splom traces generate scatter plot matrix visualizations.', - 'Each splom `dimensions` items correspond to a generated axis.', - 'Values for each of those dimensions are set in `dimensions[i].values`.', - 'Splom traces support all `scattergl` marker style attributes.', - 'Specify `layout.grid` attributes and/or layout x-axis and y-axis attributes', - 'for more control over the axis positioning and style. ' - ].join(' ') - } -}; - -// splom traces use the 'grid' component to generate their axes, -// register it here -Registry.register(Grid); +module.exports = index; diff --git a/src/traces/splom/regl_precompiled.js b/src/traces/splom/regl_precompiled.js new file mode 100644 index 00000000000..6569be365ab --- /dev/null +++ b/src/traces/splom/regl_precompiled.js @@ -0,0 +1,24 @@ +'use strict'; +var v0 = require('../../generated/regl-codegen/53f2bf051e4ba66c90f343d29aa8da9e4029454c0d428f8e46e94dfddc97c8c6'); +var v1 = require('../../generated/regl-codegen/8a43b073e4f3e9c0e499c8ac9c253f2aa1e3d3de2febfccc6526b52295dbf770'); +var v2 = require('../../generated/regl-codegen/ff8495670417d5d0e4caa9942ad63b4dff0242a390ac1cb807c78ca326d6f3ce'); +var v3 = require('../../generated/regl-codegen/13c0ae156483f2bcbd7ff29404f0abfd8689ff43f41791a6c7469868690a4260'); +var v4 = require('../../generated/regl-codegen/19769c875db736c08a744c0a6aabe28276ed06aa24fdb7c36506a9f4c1f56f13'); +var v5 = require('../../generated/regl-codegen/21cec01aa93887c70e86d7f1bc84d6837da0b1f5c1ff4cadd42ac6eb37f9f316'); +var v6 = require('../../generated/regl-codegen/f9448a214a3e3cd439b767559aa71a4d1ccf5a8f39b8b756973e71acd33ff956'); +var v7 = require('../../generated/regl-codegen/0919c57b995304312da30a5af7873a319bfb7b7e22ff6b4fa203ecbd5774ebfc'); +var v8 = require('../../generated/regl-codegen/6c3ff5a68d2906faf59307b58a799389f916ebdd3f7732ce75967575041988fc'); +var v9 = require('../../generated/regl-codegen/7c8e7f36e693904898ece5f7f8b49b23c69d98397567c3915a45647209eb7da4'); + +module.exports = { + '53f2bf051e4ba66c90f343d29aa8da9e4029454c0d428f8e46e94dfddc97c8c6': v0, + '8a43b073e4f3e9c0e499c8ac9c253f2aa1e3d3de2febfccc6526b52295dbf770': v1, + 'ff8495670417d5d0e4caa9942ad63b4dff0242a390ac1cb807c78ca326d6f3ce': v2, + '13c0ae156483f2bcbd7ff29404f0abfd8689ff43f41791a6c7469868690a4260': v3, + '19769c875db736c08a744c0a6aabe28276ed06aa24fdb7c36506a9f4c1f56f13': v4, + '21cec01aa93887c70e86d7f1bc84d6837da0b1f5c1ff4cadd42ac6eb37f9f316': v5, + 'f9448a214a3e3cd439b767559aa71a4d1ccf5a8f39b8b756973e71acd33ff956': v6, + '0919c57b995304312da30a5af7873a319bfb7b7e22ff6b4fa203ecbd5774ebfc': v7, + '6c3ff5a68d2906faf59307b58a799389f916ebdd3f7732ce75967575041988fc': v8, + '7c8e7f36e693904898ece5f7f8b49b23c69d98397567c3915a45647209eb7da4': v9 +}; diff --git a/src/traces/splom/strict.js b/src/traces/splom/strict.js new file mode 100644 index 00000000000..1be28aeeca8 --- /dev/null +++ b/src/traces/splom/strict.js @@ -0,0 +1,7 @@ +'use strict'; + +var index = require('./base_index'); + +index.basePlotModule = require('./base_plot_strict'), + +module.exports = index; diff --git a/tasks/bundle.js b/tasks/bundle.js index 86669f27296..ed6b0eb98b8 100644 --- a/tasks/bundle.js +++ b/tasks/bundle.js @@ -10,6 +10,11 @@ var pathToPlotlyDist = constants.pathToPlotlyDist; var pathToPlotlyIndex = constants.pathToPlotlyIndex; var pathToPlotlyDistMin = constants.pathToPlotlyDistMin; var pathToPlotlyDistWithMeta = constants.pathToPlotlyDistWithMeta; + +var pathToPlotlyStrict = constants.pathToPlotlyStrict; +var pathToPlotlyStrictDist = constants.pathToPlotlyStrictDist; +var pathToPlotlyStrictDistMin = constants.pathToPlotlyStrictDistMin; + var pathToPlotlyGeoAssetsSrc = constants.pathToPlotlyGeoAssetsSrc; var pathToPlotlyGeoAssetsDist = constants.pathToPlotlyGeoAssetsDist; @@ -39,6 +44,19 @@ tasks.push(function(done) { }); }); +// Browserify plotly.js-strict +tasks.push(function(done) { + _bundle(pathToPlotlyStrict, pathToPlotlyStrictDist, { + standalone: 'Plotly', + pathToMinBundle: pathToPlotlyStrictDistMin + }, function() { + prependFile(pathToPlotlyStrictDist, header, common.throwOnError); + prependFile(pathToPlotlyStrictDistMin, header, common.throwOnError); + + done(); + }); +}); + // Browserify the geo assets tasks.push(function(done) { _bundle(pathToPlotlyGeoAssetsSrc, pathToPlotlyGeoAssetsDist, { diff --git a/tasks/partial_bundle.js b/tasks/partial_bundle.js index 82a12df22f7..91d2f861bdf 100644 --- a/tasks/partial_bundle.js +++ b/tasks/partial_bundle.js @@ -20,34 +20,37 @@ module.exports = function partialBundle(tasks, opts) { var transformList = opts.transformList; var calendars = opts.calendars; - tasks.push(function(done) { - var partialIndex = mainIndex; + // skip strict bundle which is no longer a partial bundle and has a special index file for regl traces + if(name !== 'strict') { + tasks.push(function(done) { + var partialIndex = mainIndex; - var all = ['calendars'].concat(allTransforms).concat(allTraces); - var includes = (calendars ? ['calendars'] : []).concat(transformList).concat(traceList); - var excludes = all.filter(function(e) { return includes.indexOf(e) === -1; }); + var all = ['calendars'].concat(allTransforms).concat(allTraces); + var includes = (calendars ? ['calendars'] : []).concat(transformList).concat(traceList); + var excludes = all.filter(function(e) { return includes.indexOf(e) === -1; }); - excludes.forEach(function(t) { - var WHITESPACE_BEFORE = '\\s*'; - // remove require - var newCode = partialIndex.replace( - new RegExp( - WHITESPACE_BEFORE + - 'require\\(\'\\./' + t + '\'\\),', - 'g'), '' - ); + excludes.forEach(function(t) { + var WHITESPACE_BEFORE = '\\s*'; + // remove require + var newCode = partialIndex.replace( + new RegExp( + WHITESPACE_BEFORE + + 'require\\(\'\\./' + t + '\'\\),', + 'g'), '' + ); - // test removal - if(newCode === partialIndex) { - console.error('Unable to find and drop require for ' + t); - throw 'Error generating index for partial bundle!'; - } + // test removal + if(newCode === partialIndex) { + console.error('Unable to find and drop require for ' + t); + throw 'Error generating index for partial bundle!'; + } - partialIndex = newCode; - }); + partialIndex = newCode; + }); - common.writeFile(index, partialIndex, done); - }); + common.writeFile(index, partialIndex, done); + }); + } tasks.push(function(done) { var bundleOpts = { diff --git a/tasks/stats.js b/tasks/stats.js index 0a65b42517a..33a6998a283 100644 --- a/tasks/stats.js +++ b/tasks/stats.js @@ -123,9 +123,9 @@ function getMainBundleInfo() { '> The minified version of each partial bundle is also published to npm in a separate "dist-min" package.', '', [ - '> The strict partial bundle includes everything except the traces that require function constructors.', - 'Over time we hope to include more of the remaining trace types here, after which we intend to work on other strict CSP issues', - 'such as inline CSS that we may not be able to include in the main bundle.', + '> The strict bundle now includes all traces, but the regl-based traces are built differently to avoid function constructors.', + 'This results in about a 10% larger bundle size, which is why this method is not used by default.', + 'Over time we intend to use the strict bundle to work on other strict CSP issues such as inline CSS.' ].join(' '), '', '---', diff --git a/tasks/util/constants.js b/tasks/util/constants.js index f7902f173ad..001b801e615 100644 --- a/tasks/util/constants.js +++ b/tasks/util/constants.js @@ -16,11 +16,13 @@ function startsWithLowerCase(v) { return v.charAt(0) !== v.charAt(0).toUpperCase(); } + var pathToPlotlyIndex = path.join(pathToLib, 'index.js'); var pathToPlotlyStrict = path.join(pathToLib, 'index-strict.js'); var mainIndex = fs.readFileSync(pathToPlotlyIndex, 'utf-8'); var allTraces = fs.readdirSync(path.join(pathToSrc, 'traces')) .filter(startsWithLowerCase); + var allTransforms = fs.readdirSync(path.join(pathToSrc, 'transforms')) .filter(function(v) { return startsWithLowerCase(v) && v !== 'helpers.js'; @@ -133,18 +135,21 @@ var partialBundleTraces = { 'mesh3d', 'ohlc', 'parcats', + 'parcoords', 'pie', 'pointcloud', 'sankey', 'scatter', - 'scatter', + 'scattergl', 'scatter3d', 'scattercarpet', 'scattergeo', 'scattermapbox', 'scatterpolar', + 'scatterpolargl', 'scattersmith', 'scatterternary', + 'splom', 'streamtube', 'sunburst', 'surface', @@ -195,6 +200,8 @@ module.exports = { pathToPlotlyDist: path.join(pathToDist, 'plotly.js'), pathToPlotlyDistMin: path.join(pathToDist, 'plotly.min.js'), pathToPlotlyDistWithMeta: path.join(pathToDist, 'plotly-with-meta.js'), + pathToPlotlyStrictDist: path.join(pathToDist, 'plotly-strict.js'), + pathToPlotlyStrictDistMin: path.join(pathToDist, 'plotly-strict.min.js'), pathToSchemaDiff: path.join(pathToTest, 'plot-schema.json'), pathToSchemaDist: path.join(pathToDist, 'plot-schema.json'), @@ -202,6 +209,9 @@ module.exports = { partialBundleNames: partialBundleNames, + reglCodegenSubdir: path.join('generated', 'regl-codegen'), + pathToReglCodegenSrc: path.join(pathToSrc, 'generated', 'regl-codegen'), + pathToTopojsonSrc: pathToTopojsonSrc, pathToTopojsonDist: path.join(pathToDist, 'topojson/'), pathToPlotlyGeoAssetsSrc: path.join(pathToSrc, 'assets/geo_assets.js'), @@ -211,6 +221,7 @@ module.exports = { pathToCSSBuild: path.join(pathToBuild, 'plotcss.js'), pathToTestDashboardBundle: path.join(pathToBuild, 'test_dashboard-bundle.js'), + pathToReglCodegenBundle: path.join(pathToBuild, 'regl_codegen-bundle.js'), pathToImageTest: pathToImageTest, pathToTestImageMocks: path.join(pathToImageTest, 'mocks/'), diff --git a/test/jasmine/tests/splom_test.js b/test/jasmine/tests/splom_test.js index 5b09602feb1..ad9c1c997aa 100644 --- a/test/jasmine/tests/splom_test.js +++ b/test/jasmine/tests/splom_test.js @@ -1586,7 +1586,7 @@ describe('Test splom select:', function() { var to = setTimeout(function() { reject('fail: plotly_selected not emitter'); - }, 300); + }, 700); gd.once('plotly_selected', function(d) { clearTimeout(to);