*
* let a = 0.0;
* let inc = TWO_PI / 50.0;
* for (let i = 0; i < 100; i = i + 2) {
* line(i, 50, i, 50 + tan(a) * 2.0);
* a = a + inc;
* }
*
*
* @alt
* vertical black lines end down and up from center to form spike pattern
*/ cov_2lh330545e.s[13]++;
_main.default.prototype.tan = function(angle) {
cov_2lh330545e.f[6]++;
cov_2lh330545e.s[14]++;
return Math.tan(this._toRadians(angle));
};
/**
* Converts a radian measurement to its corresponding value in degrees.
* Radians and degrees are two ways of measuring the same thing. There are
* 360 degrees in a circle and 2*PI radians in a circle. For example,
* 90° = PI/2 = 1.5707964. This function does not take into account the
* current
angleMode.
*
* @method degrees
* @param {Number} radians the radians value to convert to degrees
* @return {Number} the converted angle
*
* @example
*
*
* let rad = PI / 4;
* let deg = degrees(rad);
* print(rad + ' radians is ' + deg + ' degrees');
* // Prints: 0.7853981633974483 radians is 45 degrees
*
*
*/ cov_2lh330545e.s[15]++;
_main.default.prototype.degrees = function(angle) {
cov_2lh330545e.f[7]++;
cov_2lh330545e.s[16]++;
return angle * constants.RAD_TO_DEG;
};
/**
* Converts a degree measurement to its corresponding value in radians.
* Radians and degrees are two ways of measuring the same thing. There are
* 360 degrees in a circle and 2*PI radians in a circle. For example,
* 90° = PI/2 = 1.5707964. This function does not take into account the
* current
angleMode.
*
* @method radians
* @param {Number} degrees the degree value to convert to radians
* @return {Number} the converted angle
*
* @example
*
*
* let deg = 45.0;
* let rad = radians(deg);
* print(deg + ' degrees is ' + rad + ' radians');
* // Prints: 45 degrees is 0.7853981633974483 radians
*
*
*/ cov_2lh330545e.s[17]++;
_main.default.prototype.radians = function(angle) {
cov_2lh330545e.f[8]++;
cov_2lh330545e.s[18]++;
return angle * constants.DEG_TO_RAD;
};
/**
* Sets the current mode of p5 to given mode. Default mode is RADIANS.
*
* @method angleMode
* @param {Constant} mode either RADIANS or DEGREES
*
* @example
*
*
* function draw() {
* background(204);
* angleMode(DEGREES); // Change the mode to DEGREES
* let a = atan2(mouseY - height / 2, mouseX - width / 2);
* translate(width / 2, height / 2);
* push();
* rotate(a);
* rect(-20, -5, 40, 10); // Larger rectangle is rotating in degrees
* pop();
* angleMode(RADIANS); // Change the mode to RADIANS
* rotate(a); // variable a stays the same
* rect(-40, -5, 20, 10); // Smaller rectangle is rotating in radians
* }
*
*
*
* @alt
* 40 by 10 rect in center rotates with mouse moves. 20 by 10 rect moves faster.
*
*/ cov_2lh330545e.s[19]++;
_main.default.prototype.angleMode = function(mode) {
cov_2lh330545e.f[9]++;
cov_2lh330545e.s[20]++;
if (
(cov_2lh330545e.b[1][0]++, mode === constants.DEGREES) ||
(cov_2lh330545e.b[1][1]++, mode === constants.RADIANS)
) {
cov_2lh330545e.b[0][0]++;
cov_2lh330545e.s[21]++;
this._angleMode = mode;
} else {
cov_2lh330545e.b[0][1]++;
}
};
/**
* converts angles from the current angleMode to RADIANS
*
* @method _toRadians
* @private
* @param {Number} angle
* @returns {Number}
*/ cov_2lh330545e.s[22]++;
_main.default.prototype._toRadians = function(angle) {
cov_2lh330545e.f[10]++;
cov_2lh330545e.s[23]++;
if (this._angleMode === constants.DEGREES) {
cov_2lh330545e.b[2][0]++;
cov_2lh330545e.s[24]++;
return angle * constants.DEG_TO_RAD;
} else {
cov_2lh330545e.b[2][1]++;
}
cov_2lh330545e.s[25]++;
return angle;
};
/**
* converts angles from the current angleMode to DEGREES
*
* @method _toDegrees
* @private
* @param {Number} angle
* @returns {Number}
*/ cov_2lh330545e.s[26]++;
_main.default.prototype._toDegrees = function(angle) {
cov_2lh330545e.f[11]++;
cov_2lh330545e.s[27]++;
if (this._angleMode === constants.RADIANS) {
cov_2lh330545e.b[3][0]++;
cov_2lh330545e.s[28]++;
return angle * constants.RAD_TO_DEG;
} else {
cov_2lh330545e.b[3][1]++;
}
cov_2lh330545e.s[29]++;
return angle;
};
/**
* converts angles from RADIANS into the current angleMode
*
* @method _fromRadians
* @private
* @param {Number} angle
* @returns {Number}
*/ cov_2lh330545e.s[30]++;
_main.default.prototype._fromRadians = function(angle) {
cov_2lh330545e.f[12]++;
cov_2lh330545e.s[31]++;
if (this._angleMode === constants.DEGREES) {
cov_2lh330545e.b[4][0]++;
cov_2lh330545e.s[32]++;
return angle * constants.RAD_TO_DEG;
} else {
cov_2lh330545e.b[4][1]++;
}
cov_2lh330545e.s[33]++;
return angle;
};
var _default = _main.default;
exports.default = _default;
},
{ '../core/constants': 43, '../core/main': 54 }
],
90: [
function(_dereq_, module, exports) {
'use strict';
var cov_ov7ga5uwj = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/typography/attributes.js';
var hash = '21ea44205dd71ea330eb00226dc19f89d89021df';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/typography/attributes.js',
statementMap: {
'0': { start: { line: 76, column: 0 }, end: { line: 79, column: 2 } },
'1': { start: { line: 77, column: 2 }, end: { line: 77, column: 49 } },
'2': { start: { line: 78, column: 2 }, end: { line: 78, column: 48 } },
'3': { start: { line: 113, column: 0 }, end: { line: 116, column: 2 } },
'4': { start: { line: 114, column: 2 }, end: { line: 114, column: 51 } },
'5': { start: { line: 115, column: 2 }, end: { line: 115, column: 50 } },
'6': { start: { line: 145, column: 0 }, end: { line: 148, column: 2 } },
'7': { start: { line: 146, column: 2 }, end: { line: 146, column: 48 } },
'8': { start: { line: 147, column: 2 }, end: { line: 147, column: 47 } },
'9': { start: { line: 182, column: 0 }, end: { line: 185, column: 2 } },
'10': { start: { line: 183, column: 2 }, end: { line: 183, column: 49 } },
'11': { start: { line: 184, column: 2 }, end: { line: 184, column: 48 } },
'12': { start: { line: 213, column: 0 }, end: { line: 220, column: 2 } },
'13': { start: { line: 214, column: 2 }, end: { line: 214, column: 16 } },
'14': { start: { line: 215, column: 2 }, end: { line: 215, column: 44 } },
'15': { start: { line: 216, column: 2 }, end: { line: 218, column: 3 } },
'16': { start: { line: 217, column: 4 }, end: { line: 217, column: 13 } },
'17': { start: { line: 219, column: 2 }, end: { line: 219, column: 43 } },
'18': { start: { line: 246, column: 0 }, end: { line: 249, column: 2 } },
'19': { start: { line: 247, column: 2 }, end: { line: 247, column: 45 } },
'20': { start: { line: 248, column: 2 }, end: { line: 248, column: 37 } },
'21': { start: { line: 275, column: 0 }, end: { line: 278, column: 2 } },
'22': { start: { line: 276, column: 2 }, end: { line: 276, column: 46 } },
'23': { start: { line: 277, column: 2 }, end: { line: 277, column: 38 } },
'24': { start: { line: 283, column: 0 }, end: { line: 285, column: 2 } },
'25': { start: { line: 284, column: 2 }, end: { line: 284, column: 45 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 76, column: 25 }, end: { line: 76, column: 26 } },
loc: { start: { line: 76, column: 57 }, end: { line: 79, column: 1 } },
line: 76
},
'1': {
name: '(anonymous_1)',
decl: {
start: { line: 113, column: 27 },
end: { line: 113, column: 28 }
},
loc: { start: { line: 113, column: 48 }, end: { line: 116, column: 1 } },
line: 113
},
'2': {
name: '(anonymous_2)',
decl: {
start: { line: 145, column: 24 },
end: { line: 145, column: 25 }
},
loc: { start: { line: 145, column: 42 }, end: { line: 148, column: 1 } },
line: 145
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 182, column: 25 },
end: { line: 182, column: 26 }
},
loc: { start: { line: 182, column: 44 }, end: { line: 185, column: 1 } },
line: 182
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 213, column: 25 },
end: { line: 213, column: 26 }
},
loc: { start: { line: 213, column: 43 }, end: { line: 220, column: 1 } },
line: 213
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 246, column: 26 },
end: { line: 246, column: 27 }
},
loc: { start: { line: 246, column: 44 }, end: { line: 249, column: 1 } },
line: 246
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 275, column: 27 },
end: { line: 275, column: 28 }
},
loc: { start: { line: 275, column: 45 }, end: { line: 278, column: 1 } },
line: 275
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 283, column: 34 },
end: { line: 283, column: 35 }
},
loc: { start: { line: 283, column: 45 }, end: { line: 285, column: 1 } },
line: 283
}
},
branchMap: {
'0': {
loc: { start: { line: 216, column: 2 }, end: { line: 218, column: 3 } },
type: 'if',
locations: [
{ start: { line: 216, column: 2 }, end: { line: 218, column: 3 } },
{ start: { line: 216, column: 2 }, end: { line: 218, column: 3 } }
],
line: 216
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0
},
f: { '0': 0, '1': 0, '2': 0, '3': 0, '4': 0, '5': 0, '6': 0, '7': 0 },
b: { '0': [0, 0] },
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '21ea44205dd71ea330eb00226dc19f89d89021df'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_ov7ga5uwj.s[0]++;
/**
* Sets the current alignment for drawing text. Accepts two
* arguments: horizAlign (LEFT, CENTER, or RIGHT) and
* vertAlign (TOP, BOTTOM, CENTER, or BASELINE).
*
* The horizAlign parameter is in reference to the x value
* of the
text() function, while the vertAlign parameter
* is in reference to the y value.
*
* So if you write textAlign(LEFT), you are aligning the left
* edge of your text to the x value you give in
text().
* If you write textAlign(RIGHT, TOP), you are aligning the right edge
* of your text to the x value and the top of edge of the text
* to the y value.
*
* @method textAlign
* @param {Constant} horizAlign horizontal alignment, either LEFT,
* CENTER, or RIGHT
* @param {Constant} [vertAlign] vertical alignment, either TOP,
* BOTTOM, CENTER, or BASELINE
* @chainable
* @example
*
*
* textSize(16);
* textAlign(RIGHT);
* text('ABCD', 50, 30);
* textAlign(CENTER);
* text('EFGH', 50, 50);
* textAlign(LEFT);
* text('IJKL', 50, 70);
*
*
*
*
*
* textSize(16);
* strokeWeight(0.5);
*
* line(0, 12, width, 12);
* textAlign(CENTER, TOP);
* text('TOP', 0, 12, width);
*
* line(0, 37, width, 37);
* textAlign(CENTER, CENTER);
* text('CENTER', 0, 37, width);
*
* line(0, 62, width, 62);
* textAlign(CENTER, BASELINE);
* text('BASELINE', 0, 62, width);
*
* line(0, 87, width, 87);
* textAlign(CENTER, BOTTOM);
* text('BOTTOM', 0, 87, width);
*
*
*
* @alt
* Letters ABCD displayed at top left, EFGH at center and IJKL at bottom right.
* The names of the four vertical alignments (TOP, CENTER, BASELINE & BOTTOM) rendered each showing that alignment's placement relative to a horizontal line.
*/
/**
* @method textAlign
* @return {Object}
*/
_main.default.prototype.textAlign = function(horizAlign, vertAlign) {
var _this$_renderer;
cov_ov7ga5uwj.f[0]++;
cov_ov7ga5uwj.s[1]++;
_main.default._validateParameters('textAlign', arguments);
cov_ov7ga5uwj.s[2]++;
return (_this$_renderer = this._renderer).textAlign.apply(
_this$_renderer,
arguments
);
};
/**
* Sets/gets the spacing, in pixels, between lines of text. This setting will be
* used in all subsequent calls to the
text() function.
*
* @method textLeading
* @param {Number} leading the size in pixels for spacing between lines
* @chainable
*
* @example
*
*
* let lines = 'L1\nL2\nL3'; // "\n" is a "new line" character
* textSize(12);
*
* textLeading(10);
* text(lines, 10, 25);
*
* textLeading(20);
* text(lines, 40, 25);
*
* textLeading(30);
* text(lines, 70, 25);
*
*
*
* @alt
* A set of L1 L2 & L3 displayed vertically 3 times. spacing increases for each set
*/
/**
* @method textLeading
* @return {Number}
*/ cov_ov7ga5uwj.s[3]++;
_main.default.prototype.textLeading = function(theLeading) {
var _this$_renderer2;
cov_ov7ga5uwj.f[1]++;
cov_ov7ga5uwj.s[4]++;
_main.default._validateParameters('textLeading', arguments);
cov_ov7ga5uwj.s[5]++;
return (_this$_renderer2 = this._renderer).textLeading.apply(
_this$_renderer2,
arguments
);
};
/**
* Sets/gets the current font size. This size will be used in all subsequent
* calls to the
text() function. Font size is measured in pixels.
*
* @method textSize
* @param {Number} theSize the size of the letters in units of pixels
* @chainable
*
* @example
*
*
* textSize(12);
* text('Font Size 12', 10, 30);
* textSize(14);
* text('Font Size 14', 10, 60);
* textSize(16);
* text('Font Size 16', 10, 90);
*
*
*
* @alt
* 'Font Size 12' displayed small, 'Font Size 14' medium & 'Font Size 16' large
*/
/**
* @method textSize
* @return {Number}
*/ cov_ov7ga5uwj.s[6]++;
_main.default.prototype.textSize = function(theSize) {
var _this$_renderer3;
cov_ov7ga5uwj.f[2]++;
cov_ov7ga5uwj.s[7]++;
_main.default._validateParameters('textSize', arguments);
cov_ov7ga5uwj.s[8]++;
return (_this$_renderer3 = this._renderer).textSize.apply(
_this$_renderer3,
arguments
);
};
/**
* Sets/gets the style of the text for system fonts to NORMAL, ITALIC, BOLD or BOLDITALIC.
* Note: this may be is overridden by CSS styling. For non-system fonts
* (opentype, truetype, etc.) please load styled fonts instead.
*
* @method textStyle
* @param {Constant} theStyle styling for text, either NORMAL,
* ITALIC, BOLD or BOLDITALIC
* @chainable
* @example
*
*
* strokeWeight(0);
* textSize(12);
* textStyle(NORMAL);
* text('Font Style Normal', 10, 15);
* textStyle(ITALIC);
* text('Font Style Italic', 10, 40);
* textStyle(BOLD);
* text('Font Style Bold', 10, 65);
* textStyle(BOLDITALIC);
* text('Font Style Bold Italic', 10, 90);
*
*
*
* @alt
* Words Font Style Normal displayed normally, Italic in italic, bold in bold and bold italic in bold italics.
*/
/**
* @method textStyle
* @return {String}
*/ cov_ov7ga5uwj.s[9]++;
_main.default.prototype.textStyle = function(theStyle) {
var _this$_renderer4;
cov_ov7ga5uwj.f[3]++;
cov_ov7ga5uwj.s[10]++;
_main.default._validateParameters('textStyle', arguments);
cov_ov7ga5uwj.s[11]++;
return (_this$_renderer4 = this._renderer).textStyle.apply(
_this$_renderer4,
arguments
);
};
/**
* Calculates and returns the width of any character or text string.
*
* @method textWidth
* @param {String} theText the String of characters to measure
* @return {Number} the calculated width
* @example
*
*
* textSize(28);
*
* let aChar = 'P';
* let cWidth = textWidth(aChar);
* text(aChar, 0, 40);
* line(cWidth, 0, cWidth, 50);
*
* let aString = 'p5.js';
* let sWidth = textWidth(aString);
* text(aString, 0, 85);
* line(sWidth, 50, sWidth, 100);
*
*
*
* @alt
* Letter P and p5.js are displayed with vertical lines at end.
*/ cov_ov7ga5uwj.s[12]++;
_main.default.prototype.textWidth = function() {
var _this$_renderer5;
cov_ov7ga5uwj.f[4]++;
cov_ov7ga5uwj.s[13]++;
for (
var _len = arguments.length, args = new Array(_len), _key = 0;
_key < _len;
_key++
) {
args[_key] = arguments[_key];
}
args[0] += '';
cov_ov7ga5uwj.s[14]++;
_main.default._validateParameters('textWidth', args);
cov_ov7ga5uwj.s[15]++;
if (args[0].length === 0) {
cov_ov7ga5uwj.b[0][0]++;
cov_ov7ga5uwj.s[16]++;
return 0;
} else {
cov_ov7ga5uwj.b[0][1]++;
}
cov_ov7ga5uwj.s[17]++;
return (_this$_renderer5 = this._renderer).textWidth.apply(
_this$_renderer5,
args
);
};
/**
* Returns the ascent of the current font at its current size. The ascent
* represents the distance, in pixels, of the tallest character above
* the baseline.
* @method textAscent
* @return {Number}
* @example
*
*
* let base = height * 0.75;
* let scalar = 0.8; // Different for each font
*
* textSize(32); // Set initial text size
* let asc = textAscent() * scalar; // Calc ascent
* line(0, base - asc, width, base - asc);
* text('dp', 0, base); // Draw text on baseline
*
* textSize(64); // Increase text size
* asc = textAscent() * scalar; // Recalc ascent
* line(40, base - asc, width, base - asc);
* text('dp', 40, base); // Draw text on baseline
*
*
*/ cov_ov7ga5uwj.s[18]++;
_main.default.prototype.textAscent = function() {
cov_ov7ga5uwj.f[5]++;
cov_ov7ga5uwj.s[19]++;
for (
var _len2 = arguments.length, args = new Array(_len2), _key2 = 0;
_key2 < _len2;
_key2++
) {
args[_key2] = arguments[_key2];
}
_main.default._validateParameters('textAscent', args);
cov_ov7ga5uwj.s[20]++;
return this._renderer.textAscent();
};
/**
* Returns the descent of the current font at its current size. The descent
* represents the distance, in pixels, of the character with the longest
* descender below the baseline.
* @method textDescent
* @return {Number}
* @example
*
*
* let base = height * 0.75;
* let scalar = 0.8; // Different for each font
*
* textSize(32); // Set initial text size
* let desc = textDescent() * scalar; // Calc ascent
* line(0, base + desc, width, base + desc);
* text('dp', 0, base); // Draw text on baseline
*
* textSize(64); // Increase text size
* desc = textDescent() * scalar; // Recalc ascent
* line(40, base + desc, width, base + desc);
* text('dp', 40, base); // Draw text on baseline
*
*
*/ cov_ov7ga5uwj.s[21]++;
_main.default.prototype.textDescent = function() {
cov_ov7ga5uwj.f[6]++;
cov_ov7ga5uwj.s[22]++;
for (
var _len3 = arguments.length, args = new Array(_len3), _key3 = 0;
_key3 < _len3;
_key3++
) {
args[_key3] = arguments[_key3];
}
_main.default._validateParameters('textDescent', args);
cov_ov7ga5uwj.s[23]++;
return this._renderer.textDescent();
};
/**
* Helper function to measure ascent and descent.
*/ cov_ov7ga5uwj.s[24]++;
_main.default.prototype._updateTextMetrics = function() {
cov_ov7ga5uwj.f[7]++;
cov_ov7ga5uwj.s[25]++;
return this._renderer._updateTextMetrics();
};
var _default = _main.default;
exports.default = _default;
},
{ '../core/main': 54 }
],
91: [
function(_dereq_, module, exports) {
'use strict';
function _typeof(obj) {
if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj &&
typeof Symbol === 'function' &&
obj.constructor === Symbol &&
obj !== Symbol.prototype
? 'symbol'
: typeof obj;
};
}
return _typeof(obj);
}
var cov_19iat7zg8c = (function() {
var path =
'/Users/lmccart/Documents/p5/p5.js/src/typography/loading_displaying.js';
var hash = '7825f0f9a488ebbdd437d31cb8bf8410ce52952a';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path:
'/Users/lmccart/Documents/p5/p5.js/src/typography/loading_displaying.js',
statementMap: {
'0': { start: { line: 87, column: 0 }, end: { line: 138, column: 2 } },
'1': { start: { line: 88, column: 2 }, end: { line: 88, column: 48 } },
'2': { start: { line: 89, column: 17 }, end: { line: 89, column: 34 } },
'3': { start: { line: 91, column: 15 }, end: { line: 91, column: 19 } },
'4': { start: { line: 92, column: 2 }, end: { line: 135, column: 5 } },
'5': { start: { line: 93, column: 4 }, end: { line: 100, column: 5 } },
'6': { start: { line: 94, column: 6 }, end: { line: 94, column: 41 } },
'7': { start: { line: 95, column: 6 }, end: { line: 97, column: 7 } },
'8': { start: { line: 96, column: 8 }, end: { line: 96, column: 28 } },
'9': { start: { line: 98, column: 6 }, end: { line: 98, column: 31 } },
'10': { start: { line: 99, column: 6 }, end: { line: 99, column: 13 } },
'11': { start: { line: 102, column: 4 }, end: { line: 102, column: 23 } },
'12': { start: { line: 104, column: 4 }, end: { line: 106, column: 5 } },
'13': { start: { line: 105, column: 6 }, end: { line: 105, column: 24 } },
'14': { start: { line: 108, column: 4 }, end: { line: 108, column: 29 } },
'15': { start: { line: 111, column: 27 }, end: { line: 111, column: 58 } },
'16': { start: { line: 113, column: 23 }, end: { line: 117, column: 12 } },
'17': { start: { line: 119, column: 23 }, end: { line: 119, column: 50 } },
'18': { start: { line: 122, column: 20 }, end: { line: 122, column: 77 } },
'19': { start: { line: 125, column: 4 }, end: { line: 134, column: 5 } },
'20': { start: { line: 126, column: 6 }, end: { line: 126, column: 52 } },
'21': { start: { line: 127, column: 6 }, end: { line: 127, column: 49 } },
'22': { start: { line: 128, column: 6 }, end: { line: 132, column: 8 } },
'23': { start: { line: 133, column: 6 }, end: { line: 133, column: 42 } },
'24': { start: { line: 137, column: 2 }, end: { line: 137, column: 16 } },
'25': { start: { line: 222, column: 0 }, end: { line: 227, column: 2 } },
'26': { start: { line: 223, column: 2 }, end: { line: 223, column: 44 } },
'27': { start: { line: 224, column: 2 }, end: { line: 226, column: 40 } },
'28': { start: { line: 283, column: 0 }, end: { line: 304, column: 2 } },
'29': { start: { line: 284, column: 2 }, end: { line: 284, column: 48 } },
'30': { start: { line: 285, column: 2 }, end: { line: 301, column: 3 } },
'31': { start: { line: 286, column: 4 }, end: { line: 288, column: 5 } },
'32': { start: { line: 287, column: 6 }, end: { line: 287, column: 54 } },
'33': { start: { line: 290, column: 4 }, end: { line: 290, column: 54 } },
'34': { start: { line: 292, column: 4 }, end: { line: 298, column: 5 } },
'35': { start: { line: 293, column: 6 }, end: { line: 293, column: 56 } },
'36': { start: { line: 294, column: 6 }, end: { line: 297, column: 8 } },
'37': { start: { line: 300, column: 4 }, end: { line: 300, column: 49 } },
'38': { start: { line: 303, column: 2 }, end: { line: 303, column: 34 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 87, column: 24 }, end: { line: 87, column: 25 } },
loc: { start: { line: 87, column: 59 }, end: { line: 138, column: 1 } },
line: 87
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 92, column: 22 }, end: { line: 92, column: 23 } },
loc: { start: { line: 92, column: 37 }, end: { line: 135, column: 3 } },
line: 92
},
'2': {
name: '(anonymous_2)',
decl: {
start: { line: 222, column: 20 },
end: { line: 222, column: 21 }
},
loc: { start: { line: 222, column: 61 }, end: { line: 227, column: 1 } },
line: 222
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 283, column: 24 },
end: { line: 283, column: 25 }
},
loc: { start: { line: 283, column: 51 }, end: { line: 304, column: 1 } },
line: 283
}
},
branchMap: {
'0': {
loc: { start: { line: 93, column: 4 }, end: { line: 100, column: 5 } },
type: 'if',
locations: [
{ start: { line: 93, column: 4 }, end: { line: 100, column: 5 } },
{ start: { line: 93, column: 4 }, end: { line: 100, column: 5 } }
],
line: 93
},
'1': {
loc: { start: { line: 95, column: 6 }, end: { line: 97, column: 7 } },
type: 'if',
locations: [
{ start: { line: 95, column: 6 }, end: { line: 97, column: 7 } },
{ start: { line: 95, column: 6 }, end: { line: 97, column: 7 } }
],
line: 95
},
'2': {
loc: { start: { line: 104, column: 4 }, end: { line: 106, column: 5 } },
type: 'if',
locations: [
{ start: { line: 104, column: 4 }, end: { line: 106, column: 5 } },
{ start: { line: 104, column: 4 }, end: { line: 106, column: 5 } }
],
line: 104
},
'3': {
loc: { start: { line: 122, column: 20 }, end: { line: 122, column: 77 } },
type: 'cond-expr',
locations: [
{ start: { line: 122, column: 37 }, end: { line: 122, column: 41 } },
{ start: { line: 122, column: 44 }, end: { line: 122, column: 77 } }
],
line: 122
},
'4': {
loc: { start: { line: 125, column: 4 }, end: { line: 134, column: 5 } },
type: 'if',
locations: [
{ start: { line: 125, column: 4 }, end: { line: 134, column: 5 } },
{ start: { line: 125, column: 4 }, end: { line: 134, column: 5 } }
],
line: 125
},
'5': {
loc: { start: { line: 224, column: 9 }, end: { line: 226, column: 39 } },
type: 'cond-expr',
locations: [
{ start: { line: 225, column: 6 }, end: { line: 225, column: 10 } },
{ start: { line: 226, column: 6 }, end: { line: 226, column: 39 } }
],
line: 224
},
'6': {
loc: { start: { line: 224, column: 11 }, end: { line: 224, column: 61 } },
type: 'binary-expr',
locations: [
{ start: { line: 224, column: 11 }, end: { line: 224, column: 33 } },
{ start: { line: 224, column: 37 }, end: { line: 224, column: 61 } }
],
line: 224
},
'7': {
loc: { start: { line: 285, column: 2 }, end: { line: 301, column: 3 } },
type: 'if',
locations: [
{ start: { line: 285, column: 2 }, end: { line: 301, column: 3 } },
{ start: { line: 285, column: 2 }, end: { line: 301, column: 3 } }
],
line: 285
},
'8': {
loc: { start: { line: 286, column: 4 }, end: { line: 288, column: 5 } },
type: 'if',
locations: [
{ start: { line: 286, column: 4 }, end: { line: 288, column: 5 } },
{ start: { line: 286, column: 4 }, end: { line: 288, column: 5 } }
],
line: 286
},
'9': {
loc: { start: { line: 292, column: 4 }, end: { line: 298, column: 5 } },
type: 'if',
locations: [
{ start: { line: 292, column: 4 }, end: { line: 298, column: 5 } },
{ start: { line: 292, column: 4 }, end: { line: 298, column: 5 } }
],
line: 292
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0
},
f: { '0': 0, '1': 0, '2': 0, '3': 0 },
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '7825f0f9a488ebbdd437d31cb8bf8410ce52952a'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
var constants = _interopRequireWildcard(_dereq_('../core/constants'));
var opentype = _interopRequireWildcard(_dereq_('opentype.js'));
_dereq_('../core/friendly_errors/validate_params');
_dereq_('../core/friendly_errors/file_errors');
_dereq_('../core/friendly_errors/fes_core');
function _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function _getRequireWildcardCache() {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || (_typeof(obj) !== 'object' && typeof obj !== 'function')) {
return { default: obj };
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_19iat7zg8c.s[0]++;
/**
* Loads an opentype font file (.otf, .ttf) from a file or a URL,
* and returns a PFont Object. This method is asynchronous,
* meaning it may not finish before the next line in your sketch
* is executed.
*
* The path to the font should be relative to the HTML file
* that links in your sketch. Loading fonts from a URL or other
* remote location may be blocked due to your browser's built-in
* security.
*
* @method loadFont
* @param {String} path name of the file or url to load
* @param {Function} [callback] function to be executed after
*
loadFont() completes
* @param {Function} [onError] function to be executed if
* an error occurs
* @return {p5.Font}
p5.Font object
* @example
*
* Calling loadFont() inside
preload() guarantees
* that the load operation will have completed before
setup()
* and
draw() are called.
*
*
* let myFont;
* function preload() {
* myFont = loadFont('assets/inconsolata.otf');
* }
*
* function setup() {
* fill('#ED225D');
* textFont(myFont);
* textSize(36);
* text('p5*js', 10, 50);
* }
*
*
* Outside of
preload(), you may supply a
* callback function to handle the object:
*
*
* function setup() {
* loadFont('assets/inconsolata.otf', drawText);
* }
*
* function drawText(font) {
* fill('#ED225D');
* textFont(font, 36);
* text('p5*js', 10, 50);
* }
*
*
* You can also use the font filename string (without the file extension) to
* style other HTML elements.
*
*
* function preload() {
* loadFont('assets/inconsolata.otf');
* }
*
* function setup() {
* let myDiv = createDiv('hello there');
* myDiv.style('font-family', 'Inconsolata');
* }
*
*
* @alt
* p5*js in p5's theme dark pink
* p5*js in p5's theme dark pink
*/
_main.default.prototype.loadFont = function(path, onSuccess, onError) {
cov_19iat7zg8c.f[0]++;
cov_19iat7zg8c.s[1]++;
_main.default._validateParameters('loadFont', arguments);
var p5Font = (cov_19iat7zg8c.s[2]++, new _main.default.Font(this));
var self = (cov_19iat7zg8c.s[3]++, this);
cov_19iat7zg8c.s[4]++;
opentype.load(path, function(err, font) {
cov_19iat7zg8c.f[1]++;
cov_19iat7zg8c.s[5]++;
if (err) {
cov_19iat7zg8c.b[0][0]++;
cov_19iat7zg8c.s[6]++;
_main.default._friendlyFileLoadError(4, path);
cov_19iat7zg8c.s[7]++;
if (typeof onError !== 'undefined') {
cov_19iat7zg8c.b[1][0]++;
cov_19iat7zg8c.s[8]++;
return onError(err);
} else {
cov_19iat7zg8c.b[1][1]++;
}
cov_19iat7zg8c.s[9]++;
console.error(err, path);
cov_19iat7zg8c.s[10]++;
return;
} else {
cov_19iat7zg8c.b[0][1]++;
}
cov_19iat7zg8c.s[11]++;
p5Font.font = font;
cov_19iat7zg8c.s[12]++;
if (typeof onSuccess !== 'undefined') {
cov_19iat7zg8c.b[2][0]++;
cov_19iat7zg8c.s[13]++;
onSuccess(p5Font);
} else {
cov_19iat7zg8c.b[2][1]++;
}
cov_19iat7zg8c.s[14]++;
self._decrementPreload();
// check that we have an acceptable font type
var validFontTypes = (cov_19iat7zg8c.s[15]++,
['ttf', 'otf', 'woff', 'woff2']);
var fileNoPath = (cov_19iat7zg8c.s[16]++,
path
.split('\\')
.pop()
.split('/')
.pop());
var lastDotIdx = (cov_19iat7zg8c.s[17]++, fileNoPath.lastIndexOf('.'));
var fontFamily;
var newStyle;
var fileExt = (cov_19iat7zg8c.s[18]++,
lastDotIdx < 1
? (cov_19iat7zg8c.b[3][0]++, null)
: (cov_19iat7zg8c.b[3][1]++, fileNoPath.substr(lastDotIdx + 1)));
// if so, add it to the DOM (name-only) for use with DOM module
cov_19iat7zg8c.s[19]++;
if (validFontTypes.includes(fileExt)) {
cov_19iat7zg8c.b[4][0]++;
cov_19iat7zg8c.s[20]++;
fontFamily = fileNoPath.substr(0, lastDotIdx);
cov_19iat7zg8c.s[21]++;
newStyle = document.createElement('style');
cov_19iat7zg8c.s[22]++;
newStyle.appendChild(
document.createTextNode(
'\n@font-face {\nfont-family: '
.concat(fontFamily, ';\nsrc: url(')
.concat(path, ');\n}\n')
)
);
cov_19iat7zg8c.s[23]++;
document.head.appendChild(newStyle);
} else {
cov_19iat7zg8c.b[4][1]++;
}
});
cov_19iat7zg8c.s[24]++;
return p5Font;
};
/**
* Draws text to the screen. Displays the information specified in the first
* parameter on the screen in the position specified by the additional
* parameters. A default font will be used unless a font is set with the
*
textFont() function and a default size will be
* used unless a font is set with
textSize(). Change
* the color of the text with the
fill() function. Change
* the outline of the text with the
stroke() and
*
strokeWeight() functions.
*
* The text displays in relation to the
textAlign()
* function, which gives the option to draw to the left, right, and center of the
* coordinates.
*
* The x2 and y2 parameters define a rectangular area to display within and
* may only be used with string data. When these parameters are specified,
* they are interpreted based on the current
rectMode()
* setting. Text that does not fit completely within the rectangle specified will
* not be drawn to the screen. If x2 and y2 are not specified, the baseline
* alignment is the default, which means that the text will be drawn upwards
* from x and y.
*
*
WEBGL: Only opentype/truetype fonts are supported. You must load a font
* using the
loadFont() method (see the example above).
*
stroke() currently has no effect in webgl mode.
*
* @method text
* @param {String|Object|Array|Number|Boolean} str the alphanumeric
* symbols to be displayed
* @param {Number} x x-coordinate of text
* @param {Number} y y-coordinate of text
* @param {Number} [x2] by default, the width of the text box,
* see
rectMode() for more info
* @param {Number} [y2] by default, the height of the text box,
* see
rectMode() for more info
* @chainable
* @example
*
*
* textSize(32);
* text('word', 10, 30);
* fill(0, 102, 153);
* text('word', 10, 60);
* fill(0, 102, 153, 51);
* text('word', 10, 90);
*
*
*
*
* let s = 'The quick brown fox jumped over the lazy dog.';
* fill(50);
* text(s, 10, 10, 70, 80); // Text wraps within text box
*
*
*
*
*
* let inconsolata;
* function preload() {
* inconsolata = loadFont('assets/inconsolata.otf');
* }
* function setup() {
* createCanvas(100, 100, WEBGL);
* textFont(inconsolata);
* textSize(width / 3);
* textAlign(CENTER, CENTER);
* }
* function draw() {
* background(0);
* let time = millis();
* rotateX(time / 1000);
* rotateZ(time / 1234);
* text('p5.js', 0, 0);
* }
*
*
*
* @alt
* 'word' displayed 3 times going from black, blue to translucent blue
* The text 'The quick brown fox jumped over the lazy dog' displayed.
* The text 'p5.js' spinning in 3d
*/ cov_19iat7zg8c.s[25]++;
_main.default.prototype.text = function(str, x, y, maxWidth, maxHeight) {
var _this$_renderer;
cov_19iat7zg8c.f[2]++;
cov_19iat7zg8c.s[26]++;
_main.default._validateParameters('text', arguments);
cov_19iat7zg8c.s[27]++;
return !(
(cov_19iat7zg8c.b[6][0]++, this._renderer._doFill) ||
(cov_19iat7zg8c.b[6][1]++, this._renderer._doStroke)
)
? (cov_19iat7zg8c.b[5][0]++, this)
: (cov_19iat7zg8c.b[5][1]++,
(_this$_renderer = this._renderer).text.apply(_this$_renderer, arguments));
};
/**
* Sets the current font that will be drawn with the
text() function.
*
*
WEBGL: Only fonts loaded via
loadFont() are supported.
*
* @method textFont
* @return {Object} the current font
*
* @example
*
*
* fill(0);
* textSize(12);
* textFont('Georgia');
* text('Georgia', 12, 30);
* textFont('Helvetica');
* text('Helvetica', 12, 60);
*
*
*
*
* let fontRegular, fontItalic, fontBold;
* function preload() {
* fontRegular = loadFont('assets/Regular.otf');
* fontItalic = loadFont('assets/Italic.ttf');
* fontBold = loadFont('assets/Bold.ttf');
* }
* function setup() {
* background(210);
* fill(0)
.strokeWeight(0)
.textSize(10);
* textFont(fontRegular);
* text('Font Style Normal', 10, 30);
* textFont(fontItalic);
* text('Font Style Italic', 10, 50);
* textFont(fontBold);
* text('Font Style Bold', 10, 70);
* }
*
*
*
* @alt
* word 'Georgia' displayed in font Georgia and 'Helvetica' in font Helvetica
* words Font Style Normal displayed normally, Italic in italic and bold in bold
*/
/**
* @method textFont
* @param {Object|String} font a font loaded via
loadFont(),
* or a String representing a
web safe font
* (a font that is generally available across all systems)
* @param {Number} [size] the font size to use
* @chainable
*/ cov_19iat7zg8c.s[28]++;
_main.default.prototype.textFont = function(theFont, theSize) {
cov_19iat7zg8c.f[3]++;
cov_19iat7zg8c.s[29]++;
_main.default._validateParameters('textFont', arguments);
cov_19iat7zg8c.s[30]++;
if (arguments.length) {
cov_19iat7zg8c.b[7][0]++;
cov_19iat7zg8c.s[31]++;
if (!theFont) {
cov_19iat7zg8c.b[8][0]++;
cov_19iat7zg8c.s[32]++;
throw new Error('null font passed to textFont');
} else {
cov_19iat7zg8c.b[8][1]++;
}
cov_19iat7zg8c.s[33]++;
this._renderer._setProperty('_textFont', theFont);
cov_19iat7zg8c.s[34]++;
if (theSize) {
cov_19iat7zg8c.b[9][0]++;
cov_19iat7zg8c.s[35]++;
this._renderer._setProperty('_textSize', theSize);
cov_19iat7zg8c.s[36]++;
this._renderer._setProperty(
'_textLeading',
theSize * constants._DEFAULT_LEADMULT
);
} else {
cov_19iat7zg8c.b[9][1]++;
}
cov_19iat7zg8c.s[37]++;
return this._renderer._applyTextProperties();
} else {
cov_19iat7zg8c.b[7][1]++;
}
cov_19iat7zg8c.s[38]++;
return this._renderer._textFont;
};
var _default = _main.default;
exports.default = _default;
},
{
'../core/constants': 43,
'../core/friendly_errors/fes_core': 46,
'../core/friendly_errors/file_errors': 47,
'../core/friendly_errors/validate_params': 49,
'../core/main': 54,
'opentype.js': 34
}
],
92: [
function(_dereq_, module, exports) {
'use strict';
var cov_1ih4imeq4j = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/typography/p5.Font.js';
var hash = 'c4dcb8a209b8bf28fb05e3c46aa2f9fd56374073';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/typography/p5.Font.js',
statementMap: {
'0': { start: { line: 19, column: 0 }, end: { line: 29, column: 2 } },
'1': { start: { line: 20, column: 2 }, end: { line: 20, column: 18 } },
'2': { start: { line: 22, column: 2 }, end: { line: 22, column: 18 } },
'3': { start: { line: 28, column: 2 }, end: { line: 28, column: 24 } },
'4': { start: { line: 74, column: 0 }, end: { line: 173, column: 2 } },
'5': { start: { line: 78, column: 12 }, end: { line: 78, column: 74 } },
'6': { start: { line: 80, column: 14 }, end: { line: 80, column: 40 } },
'7': { start: { line: 81, column: 20 }, end: { line: 81, column: 51 } },
'8': { start: { line: 82, column: 19 }, end: { line: 82, column: 57 } },
'9': { start: { line: 83, column: 23 }, end: { line: 83, column: 28 } },
'10': { start: { line: 87, column: 2 }, end: { line: 87, column: 47 } },
'11': { start: { line: 90, column: 2 }, end: { line: 93, column: 3 } },
'12': { start: { line: 91, column: 4 }, end: { line: 91, column: 75 } },
'13': { start: { line: 92, column: 4 }, end: { line: 92, column: 29 } },
'14': { start: { line: 95, column: 2 }, end: { line: 170, column: 3 } },
'15': { start: { line: 96, column: 15 }, end: { line: 96, column: 17 } },
'16': { start: { line: 98, column: 15 }, end: { line: 98, column: 17 } },
'17': { start: { line: 101, column: 20 }, end: { line: 101, column: 22 } },
'18': { start: { line: 102, column: 4 }, end: { line: 102, column: 20 } },
'19': { start: { line: 103, column: 20 }, end: { line: 103, column: 22 } },
'20': { start: { line: 104, column: 18 }, end: { line: 104, column: 39 } },
'21': { start: { line: 105, column: 23 }, end: { line: 105, column: 48 } },
'22': { start: { line: 106, column: 20 }, end: { line: 106, column: 21 } },
'23': { start: { line: 108, column: 4 }, end: { line: 126, column: 6 } },
'24': { start: { line: 115, column: 19 }, end: { line: 115, column: 37 } },
'25': { start: { line: 116, column: 8 }, end: { line: 124, column: 9 } },
'26': { start: { line: 117, column: 10 }, end: { line: 117, column: 25 } },
'27': { start: { line: 118, column: 10 }, end: { line: 118, column: 34 } },
'28': { start: { line: 120, column: 10 }, end: { line: 120, column: 56 } },
'29': { start: { line: 121, column: 10 }, end: { line: 121, column: 56 } },
'30': { start: { line: 122, column: 10 }, end: { line: 122, column: 71 } },
'31': { start: { line: 123, column: 10 }, end: { line: 123, column: 71 } },
'32': { start: { line: 128, column: 4 }, end: { line: 131, column: 5 } },
'33': { start: { line: 129, column: 6 }, end: { line: 129, column: 65 } },
'34': { start: { line: 130, column: 6 }, end: { line: 130, column: 65 } },
'35': { start: { line: 133, column: 20 }, end: { line: 133, column: 21 } },
'36': { start: { line: 134, column: 4 }, end: { line: 141, column: 5 } },
'37': { start: { line: 134, column: 17 }, end: { line: 134, column: 18 } },
'38': { start: { line: 135, column: 6 }, end: { line: 135, column: 49 } },
'39': { start: { line: 136, column: 6 }, end: { line: 136, column: 49 } },
'40': { start: { line: 137, column: 23 }, end: { line: 137, column: 40 } },
'41': { start: { line: 138, column: 6 }, end: { line: 140, column: 7 } },
'42': { start: { line: 139, column: 8 }, end: { line: 139, column: 31 } },
'43': { start: { line: 143, column: 20 }, end: { line: 143, column: 46 } },
'44': { start: { line: 144, column: 4 }, end: { line: 144, column: 41 } },
'45': { start: { line: 145, column: 4 }, end: { line: 145, column: 41 } },
'46': { start: { line: 147, column: 4 }, end: { line: 153, column: 6 } },
'47': { start: { line: 156, column: 4 }, end: { line: 162, column: 6 } },
'48': { start: { line: 164, column: 4 }, end: { line: 164, column: 21 } },
'49': { start: { line: 165, column: 4 }, end: { line: 165, column: 21 } },
'50': { start: { line: 167, column: 4 }, end: { line: 169, column: 5 } },
'51': { start: { line: 168, column: 6 }, end: { line: 168, column: 31 } },
'52': { start: { line: 172, column: 2 }, end: { line: 172, column: 16 } },
'53': { start: { line: 233, column: 0 }, end: { line: 269, column: 2 } },
'54': { start: { line: 234, column: 13 }, end: { line: 234, column: 14 } },
'55': { start: { line: 235, column: 17 }, end: { line: 235, column: 19 } },
'56': { start: { line: 236, column: 17 }, end: { line: 236, column: 37 } },
'57': { start: { line: 239, column: 4 }, end: { line: 243, column: 6 } },
'58': { start: { line: 246, column: 2 }, end: { line: 246, column: 57 } },
'59': { start: { line: 248, column: 2 }, end: { line: 266, column: 3 } },
'60': { start: { line: 248, column: 15 }, end: { line: 248, column: 16 } },
'61': { start: { line: 249, column: 4 }, end: { line: 263, column: 5 } },
'62': { start: { line: 252, column: 20 }, end: { line: 252, column: 53 } },
'63': { start: { line: 253, column: 16 }, end: { line: 253, column: 42 } },
'64': { start: { line: 255, column: 6 }, end: { line: 262, column: 7 } },
'65': { start: { line: 255, column: 19 }, end: { line: 255, column: 20 } },
'66': { start: { line: 256, column: 20 }, end: { line: 256, column: 51 } },
'67': { start: { line: 258, column: 8 }, end: { line: 261, column: 9 } },
'68': { start: { line: 258, column: 21 }, end: { line: 258, column: 22 } },
'69': { start: { line: 259, column: 10 }, end: { line: 259, column: 27 } },
'70': { start: { line: 260, column: 10 }, end: { line: 260, column: 30 } },
'71': { start: { line: 265, column: 4 }, end: { line: 265, column: 59 } },
'72': { start: { line: 268, column: 2 }, end: { line: 268, column: 16 } },
'73': { start: { line: 284, column: 0 }, end: { line: 286, column: 2 } },
'74': { start: { line: 285, column: 2 }, end: { line: 285, column: 39 } },
'75': { start: { line: 298, column: 0 }, end: { line: 305, column: 2 } },
'76': { start: { line: 300, column: 6 }, end: { line: 300, column: 77 } },
'77': { start: { line: 301, column: 15 }, end: { line: 301, column: 26 } },
'78': { start: { line: 302, column: 10 }, end: { line: 302, column: 53 } },
'79': { start: { line: 304, column: 2 }, end: { line: 304, column: 76 } },
'80': { start: { line: 322, column: 0 }, end: { line: 339, column: 2 } },
'81': { start: { line: 323, column: 17 }, end: { line: 323, column: 18 } },
'82': { start: { line: 326, column: 2 }, end: { line: 331, column: 3 } },
'83': { start: { line: 327, column: 4 }, end: { line: 327, column: 46 } },
'84': { start: { line: 328, column: 9 }, end: { line: 331, column: 3 } },
'85': { start: { line: 330, column: 4 }, end: { line: 330, column: 16 } },
'86': { start: { line: 334, column: 2 }, end: { line: 336, column: 3 } },
'87': { start: { line: 335, column: 4 }, end: { line: 335, column: 32 } },
'88': { start: { line: 338, column: 2 }, end: { line: 338, column: 35 } },
'89': { start: { line: 358, column: 0 }, end: { line: 386, column: 2 } },
'90': { start: { line: 359, column: 17 }, end: { line: 359, column: 18 } },
'91': { start: { line: 362, column: 2 }, end: { line: 367, column: 3 } },
'92': { start: { line: 363, column: 4 }, end: { line: 363, column: 46 } },
'93': { start: { line: 364, column: 9 }, end: { line: 367, column: 3 } },
'94': { start: { line: 366, column: 4 }, end: { line: 366, column: 16 } },
'95': { start: { line: 370, column: 2 }, end: { line: 383, column: 3 } },
'96': { start: { line: 371, column: 4 }, end: { line: 373, column: 5 } },
'97': { start: { line: 372, column: 6 }, end: { line: 372, column: 34 } },
'98': { start: { line: 374, column: 4 }, end: { line: 376, column: 5 } },
'99': { start: { line: 375, column: 6 }, end: { line: 375, column: 45 } },
'100': { start: { line: 377, column: 4 }, end: { line: 379, column: 5 } },
'101': { start: { line: 378, column: 6 }, end: { line: 378, column: 31 } },
'102': { start: { line: 380, column: 4 }, end: { line: 382, column: 5 } },
'103': { start: { line: 381, column: 6 }, end: { line: 381, column: 35 } },
'104': { start: { line: 385, column: 2 }, end: { line: 385, column: 30 } },
'105': { start: { line: 401, column: 0 }, end: { line: 443, column: 2 } },
'106': { start: { line: 403, column: 13 }, end: { line: 403, column: 67 } },
'107': { start: { line: 404, column: 14 }, end: { line: 404, column: 31 } },
'108': { start: { line: 406, column: 2 }, end: { line: 411, column: 3 } },
'109': { start: { line: 407, column: 4 }, end: { line: 407, column: 26 } },
'110': { start: { line: 410, column: 4 }, end: { line: 410, column: 56 } },
'111': { start: { line: 413, column: 2 }, end: { line: 413, column: 18 } },
'112': { start: { line: 415, column: 2 }, end: { line: 427, column: 3 } },
'113': { start: { line: 416, column: 4 }, end: { line: 426, column: 5 } },
'114': { start: { line: 417, column: 6 }, end: { line: 417, column: 31 } },
'115': { start: { line: 418, column: 11 }, end: { line: 426, column: 5 } },
'116': { start: { line: 419, column: 6 }, end: { line: 419, column: 31 } },
'117': { start: { line: 420, column: 11 }, end: { line: 426, column: 5 } },
'118': { start: { line: 421, column: 6 }, end: { line: 421, column: 70 } },
'119': { start: { line: 422, column: 11 }, end: { line: 426, column: 5 } },
'120': { start: { line: 423, column: 6 }, end: { line: 423, column: 57 } },
'121': { start: { line: 424, column: 11 }, end: { line: 426, column: 5 } },
'122': { start: { line: 425, column: 6 }, end: { line: 425, column: 22 } },
'123': { start: { line: 430, column: 2 }, end: { line: 432, column: 3 } },
'124': { start: { line: 431, column: 4 }, end: { line: 431, column: 17 } },
'125': { start: { line: 434, column: 2 }, end: { line: 440, column: 3 } },
'126': { start: { line: 436, column: 4 }, end: { line: 438, column: 5 } },
'127': { start: { line: 437, column: 6 }, end: { line: 437, column: 48 } },
'128': { start: { line: 439, column: 4 }, end: { line: 439, column: 15 } },
'129': { start: { line: 442, column: 2 }, end: { line: 442, column: 14 } },
'130': { start: { line: 445, column: 0 }, end: { line: 447, column: 2 } },
'131': { start: { line: 446, column: 2 }, end: { line: 446, column: 50 } },
'132': { start: { line: 449, column: 0 }, end: { line: 451, column: 2 } },
'133': { start: { line: 450, column: 2 }, end: { line: 450, column: 52 } },
'134': { start: { line: 453, column: 0 }, end: { line: 455, column: 2 } },
'135': { start: { line: 454, column: 2 }, end: { line: 454, column: 54 } },
'136': { start: { line: 457, column: 0 }, end: { line: 461, column: 2 } },
'137': { start: { line: 458, column: 2 }, end: { line: 460, column: 4 } },
'138': { start: { line: 463, column: 0 }, end: { line: 492, column: 2 } },
'139': { start: { line: 464, column: 19 }, end: { line: 464, column: 37 } },
'140': { start: { line: 466, column: 2 }, end: { line: 468, column: 3 } },
'141': { start: { line: 467, column: 4 }, end: { line: 467, column: 48 } },
'142': { start: { line: 470, column: 2 }, end: { line: 477, column: 3 } },
'143': { start: { line: 472, column: 6 }, end: { line: 472, column: 25 } },
'144': { start: { line: 473, column: 6 }, end: { line: 473, column: 12 } },
'145': { start: { line: 475, column: 6 }, end: { line: 475, column: 21 } },
'146': { start: { line: 476, column: 6 }, end: { line: 476, column: 12 } },
'147': { start: { line: 479, column: 2 }, end: { line: 489, column: 3 } },
'148': { start: { line: 481, column: 6 }, end: { line: 481, column: 38 } },
'149': { start: { line: 482, column: 6 }, end: { line: 482, column: 12 } },
'150': { start: { line: 484, column: 6 }, end: { line: 484, column: 42 } },
'151': { start: { line: 485, column: 6 }, end: { line: 485, column: 12 } },
'152': { start: { line: 487, column: 6 }, end: { line: 487, column: 39 } },
'153': { start: { line: 488, column: 6 }, end: { line: 488, column: 12 } },
'154': { start: { line: 491, column: 2 }, end: { line: 491, column: 18 } },
'155': { start: { line: 497, column: 15 }, end: { line: 500, column: 4 } },
'156': { start: { line: 503, column: 10 }, end: { line: 503, column: 35 } },
'157': { start: { line: 504, column: 8 }, end: { line: 504, column: 39 } },
'158': { start: { line: 505, column: 10 }, end: { line: 505, column: 12 } },
'159': { start: { line: 507, column: 2 }, end: { line: 509, column: 3 } },
'160': { start: { line: 507, column: 15 }, end: { line: 507, column: 16 } },
'161': { start: { line: 508, column: 4 }, end: { line: 508, column: 37 } },
'162': { start: { line: 511, column: 2 }, end: { line: 513, column: 3 } },
'163': { start: { line: 512, column: 4 }, end: { line: 512, column: 42 } },
'164': { start: { line: 515, column: 2 }, end: { line: 515, column: 13 } },
'165': { start: { line: 519, column: 12 }, end: { line: 519, column: 13 } },
'166': { start: { line: 520, column: 2 }, end: { line: 526, column: 3 } },
'167': { start: { line: 520, column: 15 }, end: { line: 520, column: 29 } },
'168': { start: { line: 521, column: 4 }, end: { line: 525, column: 5 } },
'169': { start: { line: 523, column: 6 }, end: { line: 523, column: 36 } },
'170': { start: { line: 524, column: 6 }, end: { line: 524, column: 12 } },
'171': { start: { line: 527, column: 2 }, end: { line: 527, column: 13 } },
'172': { start: { line: 531, column: 16 }, end: { line: 531, column: 18 } },
'173': { start: { line: 533, column: 2 }, end: { line: 541, column: 3 } },
'174': { start: { line: 533, column: 15 }, end: { line: 533, column: 16 } },
'175': { start: { line: 534, column: 4 }, end: { line: 539, column: 5 } },
'176': { start: { line: 535, column: 6 }, end: { line: 537, column: 7 } },
'177': { start: { line: 536, column: 8 }, end: { line: 536, column: 28 } },
'178': { start: { line: 538, column: 6 }, end: { line: 538, column: 19 } },
'179': { start: { line: 540, column: 4 }, end: { line: 540, column: 36 } },
'180': { start: { line: 542, column: 2 }, end: { line: 542, column: 22 } },
'181': { start: { line: 544, column: 2 }, end: { line: 544, column: 15 } },
'182': { start: { line: 548, column: 14 }, end: { line: 548, column: 24 } },
'183': { start: { line: 549, column: 2 }, end: { line: 556, column: 3 } },
'184': { start: { line: 551, column: 4 }, end: { line: 551, column: 27 } },
'185': { start: { line: 552, column: 9 }, end: { line: 556, column: 3 } },
'186': { start: { line: 553, column: 4 }, end: { line: 553, column: 59 } },
'187': { start: { line: 554, column: 9 }, end: { line: 556, column: 3 } },
'188': { start: { line: 555, column: 4 }, end: { line: 555, column: 43 } },
'189': { start: { line: 558, column: 2 }, end: { line: 558, column: 13 } },
'190': { start: { line: 562, column: 2 }, end: { line: 570, column: 3 } },
'191': { start: { line: 563, column: 4 }, end: { line: 563, column: 23 } },
'192': { start: { line: 565, column: 4 }, end: { line: 569, column: 5 } },
'193': { start: { line: 566, column: 6 }, end: { line: 568, column: 7 } },
'194': { start: { line: 567, column: 8 }, end: { line: 567, column: 37 } },
'195': { start: { line: 571, column: 2 }, end: { line: 571, column: 17 } },
'196': { start: { line: 577, column: 12 }, end: { line: 577, column: 20 } },
'197': { start: { line: 578, column: 2 }, end: { line: 578, column: 38 } },
'198': { start: { line: 582, column: 2 }, end: { line: 584, column: 3 } },
'199': { start: { line: 583, column: 4 }, end: { line: 583, column: 39 } },
'200': { start: { line: 586, column: 2 }, end: { line: 589, column: 3 } },
'201': { start: { line: 587, column: 4 }, end: { line: 587, column: 29 } },
'202': { start: { line: 588, column: 4 }, end: { line: 588, column: 29 } },
'203': { start: { line: 591, column: 13 }, end: { line: 591, column: 32 } },
'204': { start: { line: 592, column: 9 }, end: { line: 592, column: 28 } },
'205': { start: { line: 593, column: 2 }, end: { line: 593, column: 19 } },
'206': { start: { line: 594, column: 2 }, end: { line: 594, column: 19 } },
'207': { start: { line: 595, column: 2 }, end: { line: 595, column: 19 } },
'208': { start: { line: 596, column: 2 }, end: { line: 596, column: 19 } },
'209': { start: { line: 598, column: 14 }, end: { line: 598, column: 39 } },
'210': { start: { line: 599, column: 11 }, end: { line: 599, column: 47 } },
'211': { start: { line: 600, column: 11 }, end: { line: 600, column: 47 } },
'212': { start: { line: 601, column: 12 }, end: { line: 601, column: 42 } },
'213': { start: { line: 603, column: 2 }, end: { line: 603, column: 32 } },
'214': { start: { line: 607, column: 2 }, end: { line: 607, column: 71 } },
'215': { start: { line: 613, column: 13 }, end: { line: 613, column: 18 } },
'216': { start: { line: 614, column: 14 }, end: { line: 614, column: 29 } },
'217': { start: { line: 615, column: 14 }, end: { line: 615, column: 29 } },
'218': { start: { line: 616, column: 13 }, end: { line: 616, column: 18 } },
'219': { start: { line: 617, column: 13 }, end: { line: 617, column: 19 } },
'220': { start: { line: 618, column: 12 }, end: { line: 618, column: 75 } },
'221': { start: { line: 619, column: 12 }, end: { line: 619, column: 75 } },
'222': { start: { line: 620, column: 13 }, end: { line: 620, column: 67 } },
'223': { start: { line: 621, column: 13 }, end: { line: 621, column: 67 } },
'224': { start: { line: 622, column: 13 }, end: { line: 622, column: 67 } },
'225': { start: { line: 623, column: 13 }, end: { line: 623, column: 67 } },
'226': { start: { line: 624, column: 13 }, end: { line: 624, column: 31 } },
'227': { start: { line: 625, column: 13 }, end: { line: 625, column: 31 } },
'228': { start: { line: 626, column: 13 }, end: { line: 626, column: 31 } },
'229': { start: { line: 627, column: 13 }, end: { line: 627, column: 31 } },
'230': { start: { line: 628, column: 14 }, end: { line: 628, column: 63 } },
'231': { start: { line: 630, column: 2 }, end: { line: 632, column: 3 } },
'232': { start: { line: 631, column: 4 }, end: { line: 631, column: 17 } },
'233': { start: { line: 634, column: 2 }, end: { line: 642, column: 4 } },
'234': { start: { line: 656, column: 2 }, end: { line: 668, column: 8 } },
'235': { start: { line: 672, column: 2 }, end: { line: 672, column: 26 } },
'236': { start: { line: 677, column: 11 }, end: { line: 677, column: 13 } },
'237': { start: { line: 678, column: 19 }, end: { line: 678, column: 21 } },
'238': { start: { line: 680, column: 12 }, end: { line: 680, column: 13 } },
'239': { start: { line: 681, column: 2 }, end: { line: 709, column: 3 } },
'240': { start: { line: 681, column: 15 }, end: { line: 681, column: 16 } },
'241': { start: { line: 681, column: 23 }, end: { line: 681, column: 34 } },
'242': { start: { line: 682, column: 4 }, end: { line: 682, column: 16 } },
'243': { start: { line: 683, column: 4 }, end: { line: 707, column: 5 } },
'244': { start: { line: 684, column: 6 }, end: { line: 684, column: 16 } },
'245': { start: { line: 685, column: 6 }, end: { line: 685, column: 16 } },
'246': { start: { line: 687, column: 6 }, end: { line: 687, column: 76 } },
'247': { start: { line: 688, column: 6 }, end: { line: 703, column: 7 } },
'248': { start: { line: 689, column: 8 }, end: { line: 702, column: 9 } },
'249': { start: { line: 690, column: 10 }, end: { line: 700, column: 12 } },
'250': { start: { line: 701, column: 10 }, end: { line: 701, column: 64 } },
'251': { start: { line: 704, column: 6 }, end: { line: 704, column: 15 } },
'252': { start: { line: 705, column: 6 }, end: { line: 705, column: 16 } },
'253': { start: { line: 706, column: 6 }, end: { line: 706, column: 16 } },
'254': { start: { line: 708, column: 4 }, end: { line: 708, column: 24 } },
'255': { start: { line: 710, column: 2 }, end: { line: 710, column: 20 } },
'256': { start: { line: 712, column: 2 }, end: { line: 714, column: 69 } },
'257': { start: { line: 716, column: 2 }, end: { line: 718, column: 3 } },
'258': { start: { line: 717, column: 4 }, end: { line: 717, column: 59 } },
'259': { start: { line: 720, column: 2 }, end: { line: 720, column: 15 } },
'260': { start: { line: 724, column: 12 }, end: { line: 724, column: 14 } },
'261': { start: { line: 725, column: 8 }, end: { line: 725, column: 9 } },
'262': { start: { line: 726, column: 8 }, end: { line: 726, column: 9 } },
'263': { start: { line: 727, column: 9 }, end: { line: 727, column: 10 } },
'264': { start: { line: 728, column: 9 }, end: { line: 728, column: 10 } },
'265': { start: { line: 729, column: 12 }, end: { line: 729, column: 13 } },
'266': { start: { line: 730, column: 2 }, end: { line: 733, column: 3 } },
'267': { start: { line: 732, column: 4 }, end: { line: 732, column: 15 } },
'268': { start: { line: 734, column: 2 }, end: { line: 741, column: 3 } },
'269': { start: { line: 735, column: 4 }, end: { line: 735, column: 25 } },
'270': { start: { line: 736, column: 4 }, end: { line: 736, column: 25 } },
'271': { start: { line: 737, column: 4 }, end: { line: 737, column: 11 } },
'272': { start: { line: 738, column: 4 }, end: { line: 738, column: 11 } },
'273': { start: { line: 739, column: 4 }, end: { line: 739, column: 12 } },
'274': { start: { line: 740, column: 4 }, end: { line: 740, column: 25 } },
'275': { start: { line: 746, column: 4 }, end: { line: 749, column: 41 } },
'276': { start: { line: 751, column: 2 }, end: { line: 819, column: 3 } },
'277': { start: { line: 751, column: 22 }, end: { line: 751, column: 27 } },
'278': { start: { line: 751, column: 34 }, end: { line: 751, column: 50 } },
'279': { start: { line: 752, column: 4 }, end: { line: 752, column: 23 } },
'280': { start: { line: 753, column: 4 }, end: { line: 753, column: 22 } },
'281': { start: { line: 754, column: 4 }, end: { line: 799, column: 5 } },
'282': { start: { line: 755, column: 6 }, end: { line: 755, column: 54 } },
'283': { start: { line: 756, column: 6 }, end: { line: 789, column: 7 } },
'284': { start: { line: 758, column: 10 }, end: { line: 758, column: 23 } },
'285': { start: { line: 759, column: 10 }, end: { line: 759, column: 23 } },
'286': { start: { line: 760, column: 10 }, end: { line: 760, column: 23 } },
'287': { start: { line: 761, column: 10 }, end: { line: 761, column: 23 } },
'288': { start: { line: 762, column: 10 }, end: { line: 762, column: 23 } },
'289': { start: { line: 763, column: 10 }, end: { line: 763, column: 30 } },
'290': { start: { line: 764, column: 10 }, end: { line: 764, column: 30 } },
'291': { start: { line: 765, column: 10 }, end: { line: 765, column: 16 } },
'292': { start: { line: 767, column: 10 }, end: { line: 767, column: 28 } },
'293': { start: { line: 768, column: 10 }, end: { line: 768, column: 16 } },
'294': { start: { line: 770, column: 10 }, end: { line: 770, column: 28 } },
'295': { start: { line: 771, column: 10 }, end: { line: 771, column: 16 } },
'296': { start: { line: 773, column: 10 }, end: { line: 773, column: 44 } },
'297': { start: { line: 774, column: 10 }, end: { line: 777, column: 11 } },
'298': { start: { line: 774, column: 23 }, end: { line: 774, column: 24 } },
'299': { start: { line: 774, column: 31 }, end: { line: 774, column: 42 } },
'300': { start: { line: 775, column: 12 }, end: { line: 775, column: 35 } },
'301': { start: { line: 776, column: 12 }, end: { line: 776, column: 37 } },
'302': { start: { line: 778, column: 10 }, end: { line: 778, column: 20 } },
'303': { start: { line: 779, column: 10 }, end: { line: 779, column: 57 } },
'304': { start: { line: 780, column: 10 }, end: { line: 780, column: 16 } },
'305': { start: { line: 782, column: 10 }, end: { line: 782, column: 26 } },
'306': { start: { line: 783, column: 10 }, end: { line: 783, column: 26 } },
'307': { start: { line: 784, column: 10 }, end: { line: 784, column: 16 } },
'308': { start: { line: 786, column: 10 }, end: { line: 788, column: 11 } },
'309': { start: { line: 786, column: 23 }, end: { line: 786, column: 24 } },
'310': { start: { line: 786, column: 31 }, end: { line: 786, column: 40 } },
'311': { start: { line: 787, column: 12 }, end: { line: 787, column: 44 } },
'312': { start: { line: 790, column: 11 }, end: { line: 799, column: 5 } },
'313': { start: { line: 791, column: 6 }, end: { line: 791, column: 40 } },
'314': { start: { line: 792, column: 6 }, end: { line: 792, column: 16 } },
'315': { start: { line: 793, column: 6 }, end: { line: 793, column: 53 } },
'316': { start: { line: 794, column: 6 }, end: { line: 794, column: 37 } },
'317': { start: { line: 796, column: 6 }, end: { line: 798, column: 7 } },
'318': { start: { line: 796, column: 19 }, end: { line: 796, column: 20 } },
'319': { start: { line: 796, column: 27 }, end: { line: 796, column: 36 } },
'320': { start: { line: 797, column: 8 }, end: { line: 797, column: 21 } },
'321': { start: { line: 800, column: 4 }, end: { line: 818, column: 5 } },
'322': { start: { line: 802, column: 8 }, end: { line: 802, column: 15 } },
'323': { start: { line: 803, column: 8 }, end: { line: 803, column: 15 } },
'324': { start: { line: 804, column: 8 }, end: { line: 804, column: 14 } },
'325': { start: { line: 806, column: 8 }, end: { line: 806, column: 17 } },
'326': { start: { line: 807, column: 8 }, end: { line: 807, column: 14 } },
'327': { start: { line: 809, column: 8 }, end: { line: 809, column: 17 } },
'328': { start: { line: 810, column: 8 }, end: { line: 810, column: 14 } },
'329': { start: { line: 812, column: 8 }, end: { line: 812, column: 29 } },
'330': { start: { line: 813, column: 8 }, end: { line: 813, column: 29 } },
'331': { start: { line: 814, column: 8 }, end: { line: 814, column: 14 } },
'332': { start: { line: 816, column: 8 }, end: { line: 816, column: 28 } },
'333': { start: { line: 817, column: 8 }, end: { line: 817, column: 28 } },
'334': { start: { line: 820, column: 2 }, end: { line: 820, column: 13 } },
'335': { start: { line: 824, column: 12 }, end: { line: 824, column: 32 } },
'336': { start: { line: 825, column: 9 }, end: { line: 825, column: 39 } },
'337': { start: { line: 826, column: 16 }, end: { line: 826, column: 76 } },
'338': { start: { line: 827, column: 17 }, end: { line: 827, column: 77 } },
'339': { start: { line: 828, column: 17 }, end: { line: 828, column: 19 } },
'340': { start: { line: 829, column: 17 }, end: { line: 829, column: 19 } },
'341': { start: { line: 832, column: 22 }, end: { line: 891, column: 5 } },
'342': { start: { line: 835, column: 17 }, end: { line: 835, column: 31 } },
'343': { start: { line: 836, column: 6 }, end: { line: 838, column: 7 } },
'344': { start: { line: 837, column: 8 }, end: { line: 837, column: 51 } },
'345': { start: { line: 839, column: 6 }, end: { line: 841, column: 7 } },
'346': { start: { line: 840, column: 8 }, end: { line: 840, column: 27 } },
'347': { start: { line: 842, column: 6 }, end: { line: 889, column: 7 } },
'348': { start: { line: 844, column: 10 }, end: { line: 844, column: 24 } },
'349': { start: { line: 845, column: 10 }, end: { line: 845, column: 24 } },
'350': { start: { line: 846, column: 10 }, end: { line: 846, column: 16 } },
'351': { start: { line: 848, column: 10 }, end: { line: 848, column: 78 } },
'352': { start: { line: 849, column: 10 }, end: { line: 849, column: 16 } },
'353': { start: { line: 851, column: 10 }, end: { line: 857, column: 11 } },
'354': { start: { line: 852, column: 12 }, end: { line: 852, column: 32 } },
'355': { start: { line: 853, column: 12 }, end: { line: 853, column: 32 } },
'356': { start: { line: 855, column: 12 }, end: { line: 855, column: 21 } },
'357': { start: { line: 856, column: 12 }, end: { line: 856, column: 21 } },
'358': { start: { line: 858, column: 10 }, end: { line: 858, column: 53 } },
'359': { start: { line: 859, column: 10 }, end: { line: 859, column: 16 } },
'360': { start: { line: 861, column: 10 }, end: { line: 867, column: 11 } },
'361': { start: { line: 862, column: 12 }, end: { line: 862, column: 34 } },
'362': { start: { line: 863, column: 12 }, end: { line: 863, column: 34 } },
'363': { start: { line: 865, column: 12 }, end: { line: 865, column: 23 } },
'364': { start: { line: 866, column: 12 }, end: { line: 866, column: 23 } },
'365': { start: { line: 868, column: 10 }, end: { line: 868, column: 75 } },
'366': { start: { line: 869, column: 10 }, end: { line: 869, column: 16 } },
'367': { start: { line: 871, column: 10 }, end: { line: 871, column: 25 } },
'368': { start: { line: 872, column: 10 }, end: { line: 872, column: 25 } },
'369': { start: { line: 873, column: 10 }, end: { line: 875, column: 12 } },
'370': { start: { line: 876, column: 10 }, end: { line: 876, column: 16 } },
'371': { start: { line: 878, column: 10 }, end: { line: 878, column: 63 } },
'372': { start: { line: 879, column: 10 }, end: { line: 879, column: 16 } },
'373': { start: { line: 881, column: 10 }, end: { line: 881, column: 59 } },
'374': { start: { line: 882, column: 10 }, end: { line: 882, column: 16 } },
'375': { start: { line: 884, column: 10 }, end: { line: 884, column: 59 } },
'376': { start: { line: 885, column: 10 }, end: { line: 885, column: 16 } },
'377': { start: { line: 887, column: 10 }, end: { line: 887, column: 55 } },
'378': { start: { line: 888, column: 10 }, end: { line: 888, column: 16 } },
'379': { start: { line: 890, column: 6 }, end: { line: 890, column: 18 } },
'380': { start: { line: 892, column: 13 }, end: { line: 906, column: 5 } },
'381': { start: { line: 893, column: 6 }, end: { line: 905, column: 7 } },
'382': { start: { line: 894, column: 8 }, end: { line: 894, column: 22 } },
'383': { start: { line: 895, column: 19 }, end: { line: 895, column: 24 } },
'384': { start: { line: 896, column: 8 }, end: { line: 902, column: 9 } },
'385': { start: { line: 897, column: 10 }, end: { line: 897, column: 26 } },
'386': { start: { line: 898, column: 10 }, end: { line: 900, column: 11 } },
'387': { start: { line: 899, column: 12 }, end: { line: 899, column: 28 } },
'388': { start: { line: 901, column: 10 }, end: { line: 901, column: 59 } },
'389': { start: { line: 903, column: 8 }, end: { line: 903, column: 24 } },
'390': { start: { line: 904, column: 8 }, end: { line: 904, column: 56 } },
'391': { start: { line: 907, column: 11 }, end: { line: 916, column: 5 } },
'392': { start: { line: 908, column: 6 }, end: { line: 915, column: 7 } },
'393': { start: { line: 909, column: 8 }, end: { line: 909, column: 46 } },
'394': { start: { line: 910, column: 8 }, end: { line: 910, column: 18 } },
'395': { start: { line: 911, column: 8 }, end: { line: 911, column: 18 } },
'396': { start: { line: 912, column: 8 }, end: { line: 912, column: 27 } },
'397': { start: { line: 913, column: 8 }, end: { line: 913, column: 27 } },
'398': { start: { line: 914, column: 8 }, end: { line: 914, column: 56 } },
'399': { start: { line: 918, column: 15 }, end: { line: 918, column: 17 } },
'400': { start: { line: 919, column: 13 }, end: { line: 919, column: 15 } },
'401': { start: { line: 921, column: 2 }, end: { line: 921, column: 50 } },
'402': { start: { line: 922, column: 2 }, end: { line: 974, column: 3 } },
'403': { start: { line: 922, column: 15 }, end: { line: 922, column: 16 } },
'404': { start: { line: 923, column: 4 }, end: { line: 925, column: 5 } },
'405': { start: { line: 924, column: 6 }, end: { line: 924, column: 23 } },
'406': { start: { line: 927, column: 4 }, end: { line: 932, column: 5 } },
'407': { start: { line: 928, column: 6 }, end: { line: 928, column: 25 } },
'408': { start: { line: 929, column: 6 }, end: { line: 931, column: 7 } },
'409': { start: { line: 930, column: 8 }, end: { line: 930, column: 29 } },
'410': { start: { line: 933, column: 4 }, end: { line: 933, column: 42 } },
'411': { start: { line: 935, column: 4 }, end: { line: 937, column: 5 } },
'412': { start: { line: 936, column: 6 }, end: { line: 936, column: 22 } },
'413': { start: { line: 939, column: 4 }, end: { line: 939, column: 17 } },
'414': { start: { line: 941, column: 4 }, end: { line: 959, column: 5 } },
'415': { start: { line: 943, column: 6 }, end: { line: 945, column: 7 } },
'416': { start: { line: 944, column: 8 }, end: { line: 944, column: 26 } },
'417': { start: { line: 946, column: 6 }, end: { line: 951, column: 7 } },
'418': { start: { line: 947, column: 8 }, end: { line: 947, column: 27 } },
'419': { start: { line: 948, column: 8 }, end: { line: 950, column: 9 } },
'420': { start: { line: 949, column: 10 }, end: { line: 949, column: 31 } },
'421': { start: { line: 952, column: 6 }, end: { line: 952, column: 47 } },
'422': { start: { line: 954, column: 6 }, end: { line: 956, column: 7 } },
'423': { start: { line: 955, column: 8 }, end: { line: 955, column: 24 } },
'424': { start: { line: 958, column: 6 }, end: { line: 958, column: 20 } },
'425': { start: { line: 960, column: 4 }, end: { line: 960, column: 34 } },
'426': { start: { line: 961, column: 4 }, end: { line: 961, column: 34 } },
'427': { start: { line: 962, column: 16 }, end: { line: 962, column: 20 } },
'428': { start: { line: 963, column: 13 }, end: { line: 963, column: 24 } },
'429': { start: { line: 964, column: 15 }, end: { line: 964, column: 25 } },
'430': { start: { line: 965, column: 16 }, end: { line: 965, column: 33 } },
'431': { start: { line: 966, column: 4 }, end: { line: 966, column: 30 } },
'432': { start: { line: 967, column: 4 }, end: { line: 967, column: 30 } },
'433': { start: { line: 968, column: 4 }, end: { line: 968, column: 54 } },
'434': { start: { line: 969, column: 4 }, end: { line: 969, column: 54 } },
'435': { start: { line: 970, column: 4 }, end: { line: 970, column: 66 } },
'436': { start: { line: 971, column: 4 }, end: { line: 971, column: 66 } },
'437': { start: { line: 972, column: 4 }, end: { line: 972, column: 39 } },
'438': { start: { line: 973, column: 4 }, end: { line: 973, column: 39 } },
'439': { start: { line: 976, column: 2 }, end: { line: 976, column: 26 } },
'440': { start: { line: 982, column: 13 }, end: { line: 982, column: 20 } },
'441': { start: { line: 984, column: 15 }, end: { line: 984, column: 29 } },
'442': { start: { line: 989, column: 14 }, end: { line: 989, column: 38 } },
'443': { start: { line: 990, column: 12 }, end: { line: 990, column: 14 } },
'444': { start: { line: 993, column: 17 }, end: { line: 997, column: 3 } },
'445': { start: { line: 994, column: 14 }, end: { line: 994, column: 51 } },
'446': { start: { line: 995, column: 10 }, end: { line: 995, column: 47 } },
'447': { start: { line: 996, column: 4 }, end: { line: 996, column: 26 } },
'448': { start: { line: 999, column: 2 }, end: { line: 1050, column: 3 } },
'449': {
start: { line: 1000, column: 4 },
end: { line: 1000, column: 30 }
},
'450': {
start: { line: 1001, column: 4 },
end: { line: 1001, column: 14 }
},
'451': {
start: { line: 1002, column: 4 },
end: { line: 1002, column: 14 }
},
'452': {
start: { line: 1003, column: 4 },
end: { line: 1003, column: 30 }
},
'453': {
start: { line: 1004, column: 4 },
end: { line: 1004, column: 14 }
},
'454': {
start: { line: 1005, column: 4 },
end: { line: 1005, column: 14 }
},
'455': {
start: { line: 1006, column: 14 },
end: { line: 1006, column: 27 }
},
'456': {
start: { line: 1007, column: 14 },
end: { line: 1007, column: 27 }
},
'457': {
start: { line: 1008, column: 12 },
end: { line: 1008, column: 49 }
},
'458': { start: { line: 1009, column: 4 }, end: { line: 1013, column: 5 } },
'459': {
start: { line: 1010, column: 6 },
end: { line: 1010, column: 23 }
},
'460': {
start: { line: 1011, column: 6 },
end: { line: 1011, column: 18 }
},
'461': {
start: { line: 1012, column: 6 },
end: { line: 1012, column: 18 }
},
'462': {
start: { line: 1014, column: 16 },
end: { line: 1014, column: 23 }
},
'463': {
start: { line: 1015, column: 12 },
end: { line: 1015, column: 19 }
},
'464': { start: { line: 1017, column: 6 }, end: { line: 1022, column: 7 } },
'465': {
start: { line: 1024, column: 4 },
end: { line: 1024, column: 41 }
},
'466': {
start: { line: 1025, column: 4 },
end: { line: 1025, column: 42 }
},
'467': {
start: { line: 1026, column: 4 },
end: { line: 1026, column: 48 }
},
'468': {
start: { line: 1027, column: 4 },
end: { line: 1027, column: 48 }
},
'469': {
start: { line: 1029, column: 4 },
end: { line: 1029, column: 32 }
},
'470': {
start: { line: 1030, column: 4 },
end: { line: 1030, column: 32 }
},
'471': { start: { line: 1032, column: 4 }, end: { line: 1034, column: 5 } },
'472': {
start: { line: 1033, column: 6 },
end: { line: 1033, column: 23 }
},
'473': { start: { line: 1035, column: 4 }, end: { line: 1037, column: 5 } },
'474': {
start: { line: 1036, column: 6 },
end: { line: 1036, column: 23 }
},
'475': { start: { line: 1039, column: 4 }, end: { line: 1041, column: 5 } },
'476': {
start: { line: 1040, column: 6 },
end: { line: 1040, column: 23 }
},
'477': { start: { line: 1042, column: 4 }, end: { line: 1044, column: 5 } },
'478': {
start: { line: 1043, column: 6 },
end: { line: 1043, column: 23 }
},
'479': {
start: { line: 1046, column: 4 },
end: { line: 1046, column: 22 }
},
'480': {
start: { line: 1047, column: 4 },
end: { line: 1047, column: 22 }
},
'481': {
start: { line: 1048, column: 4 },
end: { line: 1048, column: 22 }
},
'482': {
start: { line: 1049, column: 4 },
end: { line: 1049, column: 22 }
},
'483': {
start: { line: 1051, column: 11 },
end: { line: 1051, column: 18 }
},
'484': { start: { line: 1052, column: 2 }, end: { line: 1065, column: 3 } },
'485': {
start: { line: 1053, column: 18 },
end: { line: 1053, column: 20 }
},
'486': {
start: { line: 1054, column: 14 },
end: { line: 1054, column: 16 }
},
'487': {
start: { line: 1055, column: 14 },
end: { line: 1055, column: 16 }
},
'488': {
start: { line: 1056, column: 4 },
end: { line: 1056, column: 54 }
},
'489': {
start: { line: 1057, column: 4 },
end: { line: 1057, column: 32 }
},
'490': {
start: { line: 1058, column: 4 },
end: { line: 1058, column: 32 }
},
'491': { start: { line: 1059, column: 4 }, end: { line: 1064, column: 7 } },
'492': {
start: { line: 1066, column: 2 },
end: { line: 1066, column: 15 }
},
'493': {
start: { line: 1067, column: 13 },
end: { line: 1067, column: 25 }
},
'494': {
start: { line: 1068, column: 9 },
end: { line: 1068, column: 21 }
},
'495': {
start: { line: 1069, column: 9 },
end: { line: 1069, column: 21 }
},
'496': {
start: { line: 1070, column: 9 },
end: { line: 1070, column: 21 }
},
'497': {
start: { line: 1071, column: 8 },
end: { line: 1071, column: 24 }
},
'498': {
start: { line: 1072, column: 9 },
end: { line: 1072, column: 23 }
},
'499': {
start: { line: 1073, column: 9 },
end: { line: 1073, column: 23 }
},
'500': {
start: { line: 1074, column: 9 },
end: { line: 1074, column: 17 }
},
'501': {
start: { line: 1075, column: 9 },
end: { line: 1075, column: 37 }
},
'502': {
start: { line: 1076, column: 9 },
end: { line: 1076, column: 37 }
},
'503': {
start: { line: 1077, column: 9 },
end: { line: 1077, column: 17 }
},
'504': {
start: { line: 1078, column: 2 },
end: { line: 1078, column: 28 }
},
'505': {
start: { line: 1079, column: 2 },
end: { line: 1079, column: 28 }
},
'506': { start: { line: 1080, column: 2 }, end: { line: 1095, column: 3 } },
'507': {
start: { line: 1081, column: 4 },
end: { line: 1081, column: 36 }
},
'508': {
start: { line: 1083, column: 4 },
end: { line: 1086, column: 18 }
},
'509': {
start: { line: 1087, column: 19 },
end: { line: 1087, column: 21 }
},
'510': { start: { line: 1088, column: 4 }, end: { line: 1093, column: 5 } },
'511': {
start: { line: 1088, column: 17 },
end: { line: 1088, column: 18 }
},
'512': {
start: { line: 1088, column: 25 },
end: { line: 1088, column: 35 }
},
'513': {
start: { line: 1089, column: 6 },
end: { line: 1092, column: 46 }
},
'514': {
start: { line: 1094, column: 4 },
end: { line: 1094, column: 18 }
},
'515': {
start: { line: 1100, column: 12 },
end: { line: 1100, column: 14 }
},
'516': { start: { line: 1101, column: 2 }, end: { line: 1160, column: 3 } },
'517': {
start: { line: 1101, column: 15 },
end: { line: 1101, column: 16 }
},
'518': {
start: { line: 1101, column: 25 },
end: { line: 1101, column: 35 }
},
'519': {
start: { line: 1102, column: 14 },
end: { line: 1119, column: 5 }
},
'520': { start: { line: 1120, column: 4 }, end: { line: 1150, column: 5 } },
'521': { start: { line: 1121, column: 6 }, end: { line: 1140, column: 7 } },
'522': {
start: { line: 1122, column: 8 },
end: { line: 1125, column: 10 }
},
'523': {
start: { line: 1126, column: 13 },
end: { line: 1140, column: 7 }
},
'524': {
start: { line: 1127, column: 8 },
end: { line: 1130, column: 10 }
},
'525': {
start: { line: 1131, column: 13 },
end: { line: 1140, column: 7 }
},
'526': {
start: { line: 1132, column: 8 },
end: { line: 1135, column: 10 }
},
'527': {
start: { line: 1136, column: 8 },
end: { line: 1139, column: 10 }
},
'528': { start: { line: 1142, column: 6 }, end: { line: 1149, column: 7 } },
'529': {
start: { line: 1143, column: 8 },
end: { line: 1143, column: 20 }
},
'530': {
start: { line: 1144, column: 13 },
end: { line: 1149, column: 7 }
},
'531': {
start: { line: 1145, column: 8 },
end: { line: 1148, column: 10 }
},
'532': { start: { line: 1151, column: 4 }, end: { line: 1159, column: 7 } },
'533': {
start: { line: 1162, column: 2 },
end: { line: 1162, column: 11 }
},
'534': {
start: { line: 1166, column: 2 },
end: { line: 1166, column: 34 }
},
'535': {
start: { line: 1170, column: 14 },
end: { line: 1170, column: 19 }
},
'536': {
start: { line: 1171, column: 10 },
end: { line: 1171, column: 15 }
},
'537': { start: { line: 1172, column: 2 }, end: { line: 1179, column: 4 } },
'538': { start: { line: 1183, column: 2 }, end: { line: 1185, column: 3 } },
'539': {
start: { line: 1184, column: 4 },
end: { line: 1184, column: 10 }
},
'540': {
start: { line: 1186, column: 2 },
end: { line: 1186, column: 32 }
},
'541': {
start: { line: 1187, column: 13 },
end: { line: 1187, column: 18 }
},
'542': {
start: { line: 1188, column: 12 },
end: { line: 1188, column: 14 }
},
'543': {
start: { line: 1189, column: 18 },
end: { line: 1202, column: 3 }
},
'544': {
start: { line: 1204, column: 12 },
end: { line: 1204, column: 13 }
},
'545': {
start: { line: 1205, column: 18 },
end: { line: 1218, column: 3 }
},
'546': { start: { line: 1220, column: 2 }, end: { line: 1226, column: 3 } },
'547': {
start: { line: 1220, column: 15 },
end: { line: 1220, column: 16 }
},
'548': {
start: { line: 1221, column: 15 },
end: { line: 1221, column: 35 }
},
'549': {
start: { line: 1222, column: 14 },
end: { line: 1222, column: 39 }
},
'550': {
start: { line: 1223, column: 14 },
end: { line: 1223, column: 39 }
},
'551': {
start: { line: 1224, column: 13 },
end: { line: 1224, column: 42 }
},
'552': {
start: { line: 1225, column: 4 },
end: { line: 1225, column: 40 }
},
'553': {
start: { line: 1227, column: 2 },
end: { line: 1227, column: 18 }
},
'554': { start: { line: 1231, column: 2 }, end: { line: 1233, column: 3 } },
'555': {
start: { line: 1232, column: 4 },
end: { line: 1232, column: 11 }
},
'556': {
start: { line: 1234, column: 12 },
end: { line: 1234, column: 13 }
},
'557': {
start: { line: 1235, column: 13 },
end: { line: 1235, column: 18 }
},
'558': {
start: { line: 1236, column: 11 },
end: { line: 1236, column: 19 }
},
'559': {
start: { line: 1238, column: 12 },
end: { line: 1238, column: 16 }
},
'560': {
start: { line: 1239, column: 2 },
end: { line: 1239, column: 49 }
},
'561': { start: { line: 1240, column: 2 }, end: { line: 1244, column: 3 } },
'562': {
start: { line: 1241, column: 4 },
end: { line: 1241, column: 14 }
},
'563': {
start: { line: 1242, column: 4 },
end: { line: 1242, column: 35 }
},
'564': {
start: { line: 1243, column: 4 },
end: { line: 1243, column: 51 }
},
'565': {
start: { line: 1245, column: 2 },
end: { line: 1245, column: 12 }
},
'566': {
start: { line: 1249, column: 13 },
end: { line: 1249, column: 47 }
},
'567': {
start: { line: 1250, column: 9 },
end: { line: 1250, column: 43 }
},
'568': {
start: { line: 1251, column: 2 },
end: { line: 1251, column: 34 }
},
'569': {
start: { line: 1255, column: 13 },
end: { line: 1255, column: 15 }
},
'570': { start: { line: 1256, column: 2 }, end: { line: 1258, column: 3 } },
'571': {
start: { line: 1256, column: 15 },
end: { line: 1256, column: 30 }
},
'572': {
start: { line: 1257, column: 4 },
end: { line: 1257, column: 26 }
},
'573': { start: { line: 1259, column: 2 }, end: { line: 1259, column: 14 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 19, column: 10 }, end: { line: 19, column: 11 } },
loc: { start: { line: 19, column: 22 }, end: { line: 29, column: 1 } },
line: 19
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 74, column: 31 }, end: { line: 74, column: 32 } },
loc: { start: { line: 74, column: 75 }, end: { line: 173, column: 1 } },
line: 74
},
'2': {
name: '(anonymous_2)',
decl: { start: { line: 114, column: 6 }, end: { line: 114, column: 7 } },
loc: { start: { line: 114, column: 36 }, end: { line: 125, column: 7 } },
line: 114
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 233, column: 33 },
end: { line: 233, column: 34 }
},
loc: { start: { line: 233, column: 72 }, end: { line: 269, column: 1 } },
line: 233
},
'4': {
name: 'isSpace',
decl: {
start: { line: 238, column: 11 },
end: { line: 238, column: 18 }
},
loc: { start: { line: 238, column: 22 }, end: { line: 244, column: 3 } },
line: 238
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 284, column: 31 },
end: { line: 284, column: 32 }
},
loc: { start: { line: 284, column: 45 }, end: { line: 286, column: 1 } },
line: 284
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 298, column: 29 },
end: { line: 298, column: 30 }
},
loc: { start: { line: 298, column: 59 }, end: { line: 305, column: 1 } },
line: 298
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 322, column: 33 },
end: { line: 322, column: 34 }
},
loc: { start: { line: 322, column: 63 }, end: { line: 339, column: 1 } },
line: 322
},
'8': {
name: '(anonymous_8)',
decl: {
start: { line: 358, column: 28 },
end: { line: 358, column: 29 }
},
loc: { start: { line: 358, column: 58 }, end: { line: 386, column: 1 } },
line: 358
},
'9': {
name: '(anonymous_9)',
decl: {
start: { line: 401, column: 32 },
end: { line: 401, column: 33 }
},
loc: { start: { line: 401, column: 62 }, end: { line: 443, column: 1 } },
line: 401
},
'10': {
name: '(anonymous_10)',
decl: {
start: { line: 445, column: 31 },
end: { line: 445, column: 32 }
},
loc: { start: { line: 445, column: 55 }, end: { line: 447, column: 1 } },
line: 445
},
'11': {
name: '(anonymous_11)',
decl: {
start: { line: 449, column: 32 },
end: { line: 449, column: 33 }
},
loc: { start: { line: 449, column: 51 }, end: { line: 451, column: 1 } },
line: 449
},
'12': {
name: '(anonymous_12)',
decl: {
start: { line: 453, column: 33 },
end: { line: 453, column: 34 }
},
loc: { start: { line: 453, column: 52 }, end: { line: 455, column: 1 } },
line: 453
},
'13': {
name: '(anonymous_13)',
decl: {
start: { line: 457, column: 27 },
end: { line: 457, column: 28 }
},
loc: { start: { line: 457, column: 46 }, end: { line: 461, column: 1 } },
line: 457
},
'14': {
name: '(anonymous_14)',
decl: {
start: { line: 463, column: 37 },
end: { line: 463, column: 38 }
},
loc: { start: { line: 463, column: 79 }, end: { line: 492, column: 1 } },
line: 463
},
'15': {
name: 'pathToPoints',
decl: { start: { line: 496, column: 9 }, end: { line: 496, column: 21 } },
loc: { start: { line: 496, column: 37 }, end: { line: 516, column: 1 } },
line: 496
},
'16': {
name: 'simplify',
decl: { start: { line: 518, column: 9 }, end: { line: 518, column: 17 } },
loc: { start: { line: 518, column: 34 }, end: { line: 528, column: 1 } },
line: 518
},
'17': {
name: 'splitPaths',
decl: { start: { line: 530, column: 9 }, end: { line: 530, column: 19 } },
loc: { start: { line: 530, column: 26 }, end: { line: 545, column: 1 } },
line: 530
},
'18': {
name: 'cmdToArr',
decl: { start: { line: 547, column: 9 }, end: { line: 547, column: 17 } },
loc: { start: { line: 547, column: 23 }, end: { line: 559, column: 1 } },
line: 547
},
'19': {
name: 'parseOpts',
decl: { start: { line: 561, column: 9 }, end: { line: 561, column: 18 } },
loc: { start: { line: 561, column: 38 }, end: { line: 572, column: 1 } },
line: 561
},
'20': {
name: 'at',
decl: { start: { line: 576, column: 9 }, end: { line: 576, column: 11 } },
loc: { start: { line: 576, column: 18 }, end: { line: 579, column: 1 } },
line: 576
},
'21': {
name: 'collinear',
decl: { start: { line: 581, column: 9 }, end: { line: 581, column: 18 } },
loc: { start: { line: 581, column: 44 }, end: { line: 604, column: 1 } },
line: 581
},
'22': {
name: 'areaTriangle',
decl: { start: { line: 606, column: 9 }, end: { line: 606, column: 21 } },
loc: { start: { line: 606, column: 31 }, end: { line: 608, column: 1 } },
line: 606
},
'23': {
name: 'findDotsAtSegment',
decl: { start: { line: 612, column: 9 }, end: { line: 612, column: 26 } },
loc: { start: { line: 612, column: 70 }, end: { line: 643, column: 1 } },
line: 612
},
'24': {
name: 'getPointAtSegmentLength',
decl: { start: { line: 645, column: 9 }, end: { line: 645, column: 32 } },
loc: { start: { line: 655, column: 2 }, end: { line: 669, column: 1 } },
line: 655
},
'25': {
name: 'pointAtLength',
decl: { start: { line: 671, column: 9 }, end: { line: 671, column: 22 } },
loc: { start: { line: 671, column: 46 }, end: { line: 721, column: 1 } },
line: 671
},
'26': {
name: 'pathToAbsolute',
decl: { start: { line: 723, column: 9 }, end: { line: 723, column: 23 } },
loc: { start: { line: 723, column: 35 }, end: { line: 821, column: 1 } },
line: 723
},
'27': {
name: 'path2curve',
decl: { start: { line: 823, column: 9 }, end: { line: 823, column: 19 } },
loc: { start: { line: 823, column: 33 }, end: { line: 977, column: 1 } },
line: 823
},
'28': {
name: '(anonymous_28)',
decl: {
start: { line: 832, column: 22 },
end: { line: 832, column: 23 }
},
loc: { start: { line: 832, column: 41 }, end: { line: 891, column: 5 } },
line: 832
},
'29': {
name: '(anonymous_29)',
decl: {
start: { line: 892, column: 13 },
end: { line: 892, column: 14 }
},
loc: { start: { line: 892, column: 24 }, end: { line: 906, column: 5 } },
line: 892
},
'30': {
name: '(anonymous_30)',
decl: {
start: { line: 907, column: 11 },
end: { line: 907, column: 12 }
},
loc: { start: { line: 907, column: 40 }, end: { line: 916, column: 5 } },
line: 907
},
'31': {
name: 'a2c',
decl: { start: { line: 979, column: 9 }, end: { line: 979, column: 12 } },
loc: { start: { line: 979, column: 72 }, end: { line: 1096, column: 1 } },
line: 979
},
'32': {
name: '(anonymous_32)',
decl: {
start: { line: 993, column: 17 },
end: { line: 993, column: 18 }
},
loc: { start: { line: 993, column: 32 }, end: { line: 997, column: 3 } },
line: 993
},
'33': {
name: 'catmullRom2bezier',
decl: {
start: { line: 1099, column: 9 },
end: { line: 1099, column: 26 }
},
loc: {
start: { line: 1099, column: 35 },
end: { line: 1163, column: 1 }
},
line: 1099
},
'34': {
name: 'l2c',
decl: {
start: { line: 1165, column: 9 },
end: { line: 1165, column: 12 }
},
loc: {
start: { line: 1165, column: 29 },
end: { line: 1167, column: 1 }
},
line: 1165
},
'35': {
name: 'q2c',
decl: {
start: { line: 1169, column: 9 },
end: { line: 1169, column: 12 }
},
loc: {
start: { line: 1169, column: 37 },
end: { line: 1180, column: 1 }
},
line: 1169
},
'36': {
name: 'bezlen',
decl: {
start: { line: 1182, column: 9 },
end: { line: 1182, column: 15 }
},
loc: {
start: { line: 1182, column: 51 },
end: { line: 1228, column: 1 }
},
line: 1182
},
'37': {
name: 'getTatLen',
decl: {
start: { line: 1230, column: 9 },
end: { line: 1230, column: 18 }
},
loc: {
start: { line: 1230, column: 55 },
end: { line: 1246, column: 1 }
},
line: 1230
},
'38': {
name: 'base3',
decl: {
start: { line: 1248, column: 9 },
end: { line: 1248, column: 14 }
},
loc: {
start: { line: 1248, column: 34 },
end: { line: 1252, column: 1 }
},
line: 1248
},
'39': {
name: 'cacheKey',
decl: {
start: { line: 1254, column: 9 },
end: { line: 1254, column: 17 }
},
loc: {
start: { line: 1254, column: 27 },
end: { line: 1260, column: 1 }
},
line: 1254
}
},
branchMap: {
'0': {
loc: { start: { line: 74, column: 45 }, end: { line: 74, column: 50 } },
type: 'default-arg',
locations: [
{ start: { line: 74, column: 49 }, end: { line: 74, column: 50 } }
],
line: 74
},
'1': {
loc: { start: { line: 74, column: 52 }, end: { line: 74, column: 57 } },
type: 'default-arg',
locations: [
{ start: { line: 74, column: 56 }, end: { line: 74, column: 57 } }
],
line: 74
},
'2': {
loc: { start: { line: 78, column: 12 }, end: { line: 78, column: 74 } },
type: 'binary-expr',
locations: [
{ start: { line: 78, column: 13 }, end: { line: 78, column: 17 } },
{ start: { line: 78, column: 21 }, end: { line: 78, column: 34 } },
{ start: { line: 78, column: 38 }, end: { line: 78, column: 58 } },
{ start: { line: 78, column: 63 }, end: { line: 78, column: 74 } }
],
line: 78
},
'3': {
loc: { start: { line: 81, column: 20 }, end: { line: 81, column: 51 } },
type: 'binary-expr',
locations: [
{ start: { line: 81, column: 20 }, end: { line: 81, column: 33 } },
{ start: { line: 81, column: 37 }, end: { line: 81, column: 51 } }
],
line: 81
},
'4': {
loc: { start: { line: 82, column: 19 }, end: { line: 82, column: 57 } },
type: 'binary-expr',
locations: [
{ start: { line: 82, column: 19 }, end: { line: 82, column: 35 } },
{ start: { line: 82, column: 39 }, end: { line: 82, column: 57 } }
],
line: 82
},
'5': {
loc: { start: { line: 87, column: 13 }, end: { line: 87, column: 46 } },
type: 'binary-expr',
locations: [
{ start: { line: 87, column: 13 }, end: { line: 87, column: 21 } },
{ start: { line: 87, column: 25 }, end: { line: 87, column: 46 } }
],
line: 87
},
'6': {
loc: { start: { line: 90, column: 2 }, end: { line: 93, column: 3 } },
type: 'if',
locations: [
{ start: { line: 90, column: 2 }, end: { line: 93, column: 3 } },
{ start: { line: 90, column: 2 }, end: { line: 93, column: 3 } }
],
line: 90
},
'7': {
loc: { start: { line: 95, column: 2 }, end: { line: 170, column: 3 } },
type: 'if',
locations: [
{ start: { line: 95, column: 2 }, end: { line: 170, column: 3 } },
{ start: { line: 95, column: 2 }, end: { line: 170, column: 3 } }
],
line: 95
},
'8': {
loc: { start: { line: 116, column: 8 }, end: { line: 124, column: 9 } },
type: 'if',
locations: [
{ start: { line: 116, column: 8 }, end: { line: 124, column: 9 } },
{ start: { line: 116, column: 8 }, end: { line: 124, column: 9 } }
],
line: 116
},
'9': {
loc: { start: { line: 116, column: 12 }, end: { line: 116, column: 51 } },
type: 'binary-expr',
locations: [
{ start: { line: 116, column: 12 }, end: { line: 116, column: 29 } },
{ start: { line: 116, column: 33 }, end: { line: 116, column: 51 } }
],
line: 116
},
'10': {
loc: { start: { line: 128, column: 4 }, end: { line: 131, column: 5 } },
type: 'if',
locations: [
{ start: { line: 128, column: 4 }, end: { line: 131, column: 5 } },
{ start: { line: 128, column: 4 }, end: { line: 131, column: 5 } }
],
line: 128
},
'11': {
loc: { start: { line: 138, column: 6 }, end: { line: 140, column: 7 } },
type: 'if',
locations: [
{ start: { line: 138, column: 6 }, end: { line: 140, column: 7 } },
{ start: { line: 138, column: 6 }, end: { line: 140, column: 7 } }
],
line: 138
},
'12': {
loc: { start: { line: 167, column: 4 }, end: { line: 169, column: 5 } },
type: 'if',
locations: [
{ start: { line: 167, column: 4 }, end: { line: 169, column: 5 } },
{ start: { line: 167, column: 4 }, end: { line: 169, column: 5 } }
],
line: 167
},
'13': {
loc: { start: { line: 240, column: 6 }, end: { line: 242, column: 48 } },
type: 'binary-expr',
locations: [
{ start: { line: 240, column: 7 }, end: { line: 240, column: 21 } },
{ start: { line: 240, column: 25 }, end: { line: 240, column: 51 } },
{ start: { line: 241, column: 7 }, end: { line: 241, column: 35 } },
{ start: { line: 241, column: 39 }, end: { line: 241, column: 53 } },
{ start: { line: 242, column: 7 }, end: { line: 242, column: 22 } },
{ start: { line: 242, column: 26 }, end: { line: 242, column: 47 } }
],
line: 240
},
'14': {
loc: { start: { line: 246, column: 13 }, end: { line: 246, column: 56 } },
type: 'binary-expr',
locations: [
{ start: { line: 246, column: 13 }, end: { line: 246, column: 21 } },
{ start: { line: 246, column: 25 }, end: { line: 246, column: 56 } }
],
line: 246
},
'15': {
loc: { start: { line: 249, column: 4 }, end: { line: 263, column: 5 } },
type: 'if',
locations: [
{ start: { line: 249, column: 4 }, end: { line: 263, column: 5 } },
{ start: { line: 249, column: 4 }, end: { line: 263, column: 5 } }
],
line: 249
},
'16': {
loc: { start: { line: 300, column: 6 }, end: { line: 300, column: 77 } },
type: 'binary-expr',
locations: [
{ start: { line: 300, column: 7 }, end: { line: 300, column: 14 } },
{ start: { line: 300, column: 18 }, end: { line: 300, column: 34 } },
{ start: { line: 300, column: 38 }, end: { line: 300, column: 61 } },
{ start: { line: 300, column: 66 }, end: { line: 300, column: 77 } }
],
line: 300
},
'17': {
loc: { start: { line: 326, column: 2 }, end: { line: 331, column: 3 } },
type: 'if',
locations: [
{ start: { line: 326, column: 2 }, end: { line: 331, column: 3 } },
{ start: { line: 326, column: 2 }, end: { line: 331, column: 3 } }
],
line: 326
},
'18': {
loc: { start: { line: 326, column: 6 }, end: { line: 326, column: 54 } },
type: 'binary-expr',
locations: [
{ start: { line: 326, column: 6 }, end: { line: 326, column: 30 } },
{ start: { line: 326, column: 34 }, end: { line: 326, column: 54 } }
],
line: 326
},
'19': {
loc: { start: { line: 328, column: 9 }, end: { line: 331, column: 3 } },
type: 'if',
locations: [
{ start: { line: 328, column: 9 }, end: { line: 331, column: 3 } },
{ start: { line: 328, column: 9 }, end: { line: 331, column: 3 } }
],
line: 328
},
'20': {
loc: { start: { line: 334, column: 2 }, end: { line: 336, column: 3 } },
type: 'if',
locations: [
{ start: { line: 334, column: 2 }, end: { line: 336, column: 3 } },
{ start: { line: 334, column: 2 }, end: { line: 336, column: 3 } }
],
line: 334
},
'21': {
loc: { start: { line: 334, column: 6 }, end: { line: 334, column: 53 } },
type: 'binary-expr',
locations: [
{ start: { line: 334, column: 6 }, end: { line: 334, column: 13 } },
{ start: { line: 334, column: 17 }, end: { line: 334, column: 53 } }
],
line: 334
},
'22': {
loc: { start: { line: 362, column: 2 }, end: { line: 367, column: 3 } },
type: 'if',
locations: [
{ start: { line: 362, column: 2 }, end: { line: 367, column: 3 } },
{ start: { line: 362, column: 2 }, end: { line: 367, column: 3 } }
],
line: 362
},
'23': {
loc: { start: { line: 362, column: 6 }, end: { line: 362, column: 54 } },
type: 'binary-expr',
locations: [
{ start: { line: 362, column: 6 }, end: { line: 362, column: 30 } },
{ start: { line: 362, column: 34 }, end: { line: 362, column: 54 } }
],
line: 362
},
'24': {
loc: { start: { line: 364, column: 9 }, end: { line: 367, column: 3 } },
type: 'if',
locations: [
{ start: { line: 364, column: 9 }, end: { line: 367, column: 3 } },
{ start: { line: 364, column: 9 }, end: { line: 367, column: 3 } }
],
line: 364
},
'25': {
loc: { start: { line: 370, column: 2 }, end: { line: 383, column: 3 } },
type: 'if',
locations: [
{ start: { line: 370, column: 2 }, end: { line: 383, column: 3 } },
{ start: { line: 370, column: 2 }, end: { line: 383, column: 3 } }
],
line: 370
},
'26': {
loc: { start: { line: 371, column: 4 }, end: { line: 373, column: 5 } },
type: 'if',
locations: [
{ start: { line: 371, column: 4 }, end: { line: 373, column: 5 } },
{ start: { line: 371, column: 4 }, end: { line: 373, column: 5 } }
],
line: 371
},
'27': {
loc: { start: { line: 374, column: 4 }, end: { line: 376, column: 5 } },
type: 'if',
locations: [
{ start: { line: 374, column: 4 }, end: { line: 376, column: 5 } },
{ start: { line: 374, column: 4 }, end: { line: 376, column: 5 } }
],
line: 374
},
'28': {
loc: { start: { line: 377, column: 4 }, end: { line: 379, column: 5 } },
type: 'if',
locations: [
{ start: { line: 377, column: 4 }, end: { line: 379, column: 5 } },
{ start: { line: 377, column: 4 }, end: { line: 379, column: 5 } }
],
line: 377
},
'29': {
loc: { start: { line: 380, column: 4 }, end: { line: 382, column: 5 } },
type: 'if',
locations: [
{ start: { line: 380, column: 4 }, end: { line: 382, column: 5 } },
{ start: { line: 380, column: 4 }, end: { line: 382, column: 5 } }
],
line: 380
},
'30': {
loc: { start: { line: 403, column: 13 }, end: { line: 403, column: 67 } },
type: 'binary-expr',
locations: [
{ start: { line: 403, column: 14 }, end: { line: 403, column: 21 } },
{ start: { line: 403, column: 25 }, end: { line: 403, column: 41 } },
{ start: { line: 403, column: 46 }, end: { line: 403, column: 67 } }
],
line: 403
},
'31': {
loc: { start: { line: 406, column: 2 }, end: { line: 411, column: 3 } },
type: 'if',
locations: [
{ start: { line: 406, column: 2 }, end: { line: 411, column: 3 } },
{ start: { line: 406, column: 2 }, end: { line: 411, column: 3 } }
],
line: 406
},
'32': {
loc: { start: { line: 406, column: 6 }, end: { line: 406, column: 47 } },
type: 'binary-expr',
locations: [
{ start: { line: 406, column: 6 }, end: { line: 406, column: 30 } },
{ start: { line: 406, column: 34 }, end: { line: 406, column: 47 } }
],
line: 406
},
'33': {
loc: { start: { line: 416, column: 4 }, end: { line: 426, column: 5 } },
type: 'if',
locations: [
{ start: { line: 416, column: 4 }, end: { line: 426, column: 5 } },
{ start: { line: 416, column: 4 }, end: { line: 426, column: 5 } }
],
line: 416
},
'34': {
loc: { start: { line: 418, column: 11 }, end: { line: 426, column: 5 } },
type: 'if',
locations: [
{ start: { line: 418, column: 11 }, end: { line: 426, column: 5 } },
{ start: { line: 418, column: 11 }, end: { line: 426, column: 5 } }
],
line: 418
},
'35': {
loc: { start: { line: 420, column: 11 }, end: { line: 426, column: 5 } },
type: 'if',
locations: [
{ start: { line: 420, column: 11 }, end: { line: 426, column: 5 } },
{ start: { line: 420, column: 11 }, end: { line: 426, column: 5 } }
],
line: 420
},
'36': {
loc: { start: { line: 422, column: 11 }, end: { line: 426, column: 5 } },
type: 'if',
locations: [
{ start: { line: 422, column: 11 }, end: { line: 426, column: 5 } },
{ start: { line: 422, column: 11 }, end: { line: 426, column: 5 } }
],
line: 422
},
'37': {
loc: { start: { line: 424, column: 11 }, end: { line: 426, column: 5 } },
type: 'if',
locations: [
{ start: { line: 424, column: 11 }, end: { line: 426, column: 5 } },
{ start: { line: 424, column: 11 }, end: { line: 426, column: 5 } }
],
line: 424
},
'38': {
loc: { start: { line: 430, column: 2 }, end: { line: 432, column: 3 } },
type: 'if',
locations: [
{ start: { line: 430, column: 2 }, end: { line: 432, column: 3 } },
{ start: { line: 430, column: 2 }, end: { line: 432, column: 3 } }
],
line: 430
},
'39': {
loc: { start: { line: 430, column: 6 }, end: { line: 430, column: 35 } },
type: 'binary-expr',
locations: [
{ start: { line: 430, column: 6 }, end: { line: 430, column: 18 } },
{ start: { line: 430, column: 22 }, end: { line: 430, column: 35 } }
],
line: 430
},
'40': {
loc: { start: { line: 434, column: 2 }, end: { line: 440, column: 3 } },
type: 'if',
locations: [
{ start: { line: 434, column: 2 }, end: { line: 440, column: 3 } },
{ start: { line: 434, column: 2 }, end: { line: 440, column: 3 } }
],
line: 434
},
'41': {
loc: { start: { line: 436, column: 4 }, end: { line: 438, column: 5 } },
type: 'if',
locations: [
{ start: { line: 436, column: 4 }, end: { line: 438, column: 5 } },
{ start: { line: 436, column: 4 }, end: { line: 438, column: 5 } }
],
line: 436
},
'42': {
loc: { start: { line: 459, column: 32 }, end: { line: 459, column: 75 } },
type: 'binary-expr',
locations: [
{ start: { line: 459, column: 32 }, end: { line: 459, column: 40 } },
{ start: { line: 459, column: 44 }, end: { line: 459, column: 75 } }
],
line: 459
},
'43': {
loc: { start: { line: 466, column: 2 }, end: { line: 468, column: 3 } },
type: 'if',
locations: [
{ start: { line: 466, column: 2 }, end: { line: 468, column: 3 } },
{ start: { line: 466, column: 2 }, end: { line: 468, column: 3 } }
],
line: 466
},
'44': {
loc: { start: { line: 470, column: 2 }, end: { line: 477, column: 3 } },
type: 'switch',
locations: [
{ start: { line: 471, column: 4 }, end: { line: 473, column: 12 } },
{ start: { line: 474, column: 4 }, end: { line: 476, column: 12 } }
],
line: 470
},
'45': {
loc: { start: { line: 479, column: 2 }, end: { line: 489, column: 3 } },
type: 'switch',
locations: [
{ start: { line: 480, column: 4 }, end: { line: 482, column: 12 } },
{ start: { line: 483, column: 4 }, end: { line: 485, column: 12 } },
{ start: { line: 486, column: 4 }, end: { line: 488, column: 12 } }
],
line: 479
},
'46': {
loc: { start: { line: 511, column: 2 }, end: { line: 513, column: 3 } },
type: 'if',
locations: [
{ start: { line: 511, column: 2 }, end: { line: 513, column: 3 } },
{ start: { line: 511, column: 2 }, end: { line: 513, column: 3 } }
],
line: 511
},
'47': {
loc: { start: { line: 518, column: 23 }, end: { line: 518, column: 32 } },
type: 'default-arg',
locations: [
{ start: { line: 518, column: 31 }, end: { line: 518, column: 32 } }
],
line: 518
},
'48': {
loc: { start: { line: 520, column: 31 }, end: { line: 520, column: 55 } },
type: 'binary-expr',
locations: [
{ start: { line: 520, column: 31 }, end: { line: 520, column: 45 } },
{ start: { line: 520, column: 49 }, end: { line: 520, column: 55 } }
],
line: 520
},
'49': {
loc: { start: { line: 521, column: 4 }, end: { line: 525, column: 5 } },
type: 'if',
locations: [
{ start: { line: 521, column: 4 }, end: { line: 525, column: 5 } },
{ start: { line: 521, column: 4 }, end: { line: 525, column: 5 } }
],
line: 521
},
'50': {
loc: { start: { line: 534, column: 4 }, end: { line: 539, column: 5 } },
type: 'if',
locations: [
{ start: { line: 534, column: 4 }, end: { line: 539, column: 5 } },
{ start: { line: 534, column: 4 }, end: { line: 539, column: 5 } }
],
line: 534
},
'51': {
loc: { start: { line: 535, column: 6 }, end: { line: 537, column: 7 } },
type: 'if',
locations: [
{ start: { line: 535, column: 6 }, end: { line: 537, column: 7 } },
{ start: { line: 535, column: 6 }, end: { line: 537, column: 7 } }
],
line: 535
},
'52': {
loc: { start: { line: 549, column: 2 }, end: { line: 556, column: 3 } },
type: 'if',
locations: [
{ start: { line: 549, column: 2 }, end: { line: 556, column: 3 } },
{ start: { line: 549, column: 2 }, end: { line: 556, column: 3 } }
],
line: 549
},
'53': {
loc: { start: { line: 549, column: 6 }, end: { line: 549, column: 42 } },
type: 'binary-expr',
locations: [
{ start: { line: 549, column: 6 }, end: { line: 549, column: 22 } },
{ start: { line: 549, column: 26 }, end: { line: 549, column: 42 } }
],
line: 549
},
'54': {
loc: { start: { line: 552, column: 9 }, end: { line: 556, column: 3 } },
type: 'if',
locations: [
{ start: { line: 552, column: 9 }, end: { line: 556, column: 3 } },
{ start: { line: 552, column: 9 }, end: { line: 556, column: 3 } }
],
line: 552
},
'55': {
loc: { start: { line: 554, column: 9 }, end: { line: 556, column: 3 } },
type: 'if',
locations: [
{ start: { line: 554, column: 9 }, end: { line: 556, column: 3 } },
{ start: { line: 554, column: 9 }, end: { line: 556, column: 3 } }
],
line: 554
},
'56': {
loc: { start: { line: 562, column: 2 }, end: { line: 570, column: 3 } },
type: 'if',
locations: [
{ start: { line: 562, column: 2 }, end: { line: 570, column: 3 } },
{ start: { line: 562, column: 2 }, end: { line: 570, column: 3 } }
],
line: 562
},
'57': {
loc: { start: { line: 566, column: 6 }, end: { line: 568, column: 7 } },
type: 'if',
locations: [
{ start: { line: 566, column: 6 }, end: { line: 568, column: 7 } },
{ start: { line: 566, column: 6 }, end: { line: 568, column: 7 } }
],
line: 566
},
'58': {
loc: { start: { line: 578, column: 11 }, end: { line: 578, column: 36 } },
type: 'cond-expr',
locations: [
{ start: { line: 578, column: 19 }, end: { line: 578, column: 28 } },
{ start: { line: 578, column: 31 }, end: { line: 578, column: 36 } }
],
line: 578
},
'59': {
loc: { start: { line: 582, column: 2 }, end: { line: 584, column: 3 } },
type: 'if',
locations: [
{ start: { line: 582, column: 2 }, end: { line: 584, column: 3 } },
{ start: { line: 582, column: 2 }, end: { line: 584, column: 3 } }
],
line: 582
},
'60': {
loc: { start: { line: 586, column: 2 }, end: { line: 589, column: 3 } },
type: 'if',
locations: [
{ start: { line: 586, column: 2 }, end: { line: 589, column: 3 } },
{ start: { line: 586, column: 2 }, end: { line: 589, column: 3 } }
],
line: 586
},
'61': {
loc: { start: { line: 630, column: 2 }, end: { line: 632, column: 3 } },
type: 'if',
locations: [
{ start: { line: 630, column: 2 }, end: { line: 632, column: 3 } },
{ start: { line: 630, column: 2 }, end: { line: 632, column: 3 } }
],
line: 630
},
'62': {
loc: { start: { line: 630, column: 6 }, end: { line: 630, column: 24 } },
type: 'binary-expr',
locations: [
{ start: { line: 630, column: 6 }, end: { line: 630, column: 13 } },
{ start: { line: 630, column: 17 }, end: { line: 630, column: 24 } }
],
line: 630
},
'63': {
loc: { start: { line: 656, column: 9 }, end: { line: 668, column: 7 } },
type: 'cond-expr',
locations: [
{ start: { line: 657, column: 6 }, end: { line: 657, column: 52 } },
{ start: { line: 658, column: 6 }, end: { line: 668, column: 7 } }
],
line: 656
},
'64': {
loc: { start: { line: 683, column: 4 }, end: { line: 707, column: 5 } },
type: 'if',
locations: [
{ start: { line: 683, column: 4 }, end: { line: 707, column: 5 } },
{ start: { line: 683, column: 4 }, end: { line: 707, column: 5 } }
],
line: 683
},
'65': {
loc: { start: { line: 688, column: 6 }, end: { line: 703, column: 7 } },
type: 'if',
locations: [
{ start: { line: 688, column: 6 }, end: { line: 703, column: 7 } },
{ start: { line: 688, column: 6 }, end: { line: 703, column: 7 } }
],
line: 688
},
'66': {
loc: { start: { line: 689, column: 8 }, end: { line: 702, column: 9 } },
type: 'if',
locations: [
{ start: { line: 689, column: 8 }, end: { line: 702, column: 9 } },
{ start: { line: 689, column: 8 }, end: { line: 702, column: 9 } }
],
line: 689
},
'67': {
loc: { start: { line: 712, column: 10 }, end: { line: 714, column: 68 } },
type: 'cond-expr',
locations: [
{ start: { line: 713, column: 6 }, end: { line: 713, column: 9 } },
{ start: { line: 714, column: 6 }, end: { line: 714, column: 68 } }
],
line: 712
},
'68': {
loc: { start: { line: 716, column: 2 }, end: { line: 718, column: 3 } },
type: 'if',
locations: [
{ start: { line: 716, column: 2 }, end: { line: 718, column: 3 } },
{ start: { line: 716, column: 2 }, end: { line: 718, column: 3 } }
],
line: 716
},
'69': {
loc: { start: { line: 730, column: 2 }, end: { line: 733, column: 3 } },
type: 'if',
locations: [
{ start: { line: 730, column: 2 }, end: { line: 733, column: 3 } },
{ start: { line: 730, column: 2 }, end: { line: 733, column: 3 } }
],
line: 730
},
'70': {
loc: { start: { line: 734, column: 2 }, end: { line: 741, column: 3 } },
type: 'if',
locations: [
{ start: { line: 734, column: 2 }, end: { line: 741, column: 3 } },
{ start: { line: 734, column: 2 }, end: { line: 741, column: 3 } }
],
line: 734
},
'71': {
loc: { start: { line: 746, column: 4 }, end: { line: 749, column: 41 } },
type: 'binary-expr',
locations: [
{ start: { line: 746, column: 4 }, end: { line: 746, column: 26 } },
{ start: { line: 747, column: 4 }, end: { line: 747, column: 27 } },
{ start: { line: 748, column: 4 }, end: { line: 748, column: 41 } },
{ start: { line: 749, column: 4 }, end: { line: 749, column: 41 } }
],
line: 746
},
'72': {
loc: { start: { line: 754, column: 4 }, end: { line: 799, column: 5 } },
type: 'if',
locations: [
{ start: { line: 754, column: 4 }, end: { line: 799, column: 5 } },
{ start: { line: 754, column: 4 }, end: { line: 799, column: 5 } }
],
line: 754
},
'73': {
loc: { start: { line: 756, column: 6 }, end: { line: 789, column: 7 } },
type: 'switch',
locations: [
{ start: { line: 757, column: 8 }, end: { line: 765, column: 16 } },
{ start: { line: 766, column: 8 }, end: { line: 768, column: 16 } },
{ start: { line: 769, column: 8 }, end: { line: 771, column: 16 } },
{ start: { line: 772, column: 8 }, end: { line: 780, column: 16 } },
{ start: { line: 781, column: 8 }, end: { line: 784, column: 16 } },
{ start: { line: 785, column: 8 }, end: { line: 788, column: 11 } }
],
line: 756
},
'74': {
loc: { start: { line: 787, column: 29 }, end: { line: 787, column: 42 } },
type: 'cond-expr',
locations: [
{ start: { line: 787, column: 37 }, end: { line: 787, column: 38 } },
{ start: { line: 787, column: 41 }, end: { line: 787, column: 42 } }
],
line: 787
},
'75': {
loc: { start: { line: 790, column: 11 }, end: { line: 799, column: 5 } },
type: 'if',
locations: [
{ start: { line: 790, column: 11 }, end: { line: 799, column: 5 } },
{ start: { line: 790, column: 11 }, end: { line: 799, column: 5 } }
],
line: 790
},
'76': {
loc: { start: { line: 800, column: 4 }, end: { line: 818, column: 5 } },
type: 'switch',
locations: [
{ start: { line: 801, column: 6 }, end: { line: 804, column: 14 } },
{ start: { line: 805, column: 6 }, end: { line: 807, column: 14 } },
{ start: { line: 808, column: 6 }, end: { line: 810, column: 14 } },
{ start: { line: 811, column: 6 }, end: { line: 814, column: 14 } },
{ start: { line: 815, column: 6 }, end: { line: 817, column: 28 } }
],
line: 800
},
'77': {
loc: { start: { line: 825, column: 9 }, end: { line: 825, column: 39 } },
type: 'binary-expr',
locations: [
{ start: { line: 825, column: 9 }, end: { line: 825, column: 14 } },
{ start: { line: 825, column: 18 }, end: { line: 825, column: 39 } }
],
line: 825
},
'78': {
loc: { start: { line: 836, column: 6 }, end: { line: 838, column: 7 } },
type: 'if',
locations: [
{ start: { line: 836, column: 6 }, end: { line: 838, column: 7 } },
{ start: { line: 836, column: 6 }, end: { line: 838, column: 7 } }
],
line: 836
},
'79': {
loc: { start: { line: 839, column: 6 }, end: { line: 841, column: 7 } },
type: 'if',
locations: [
{ start: { line: 839, column: 6 }, end: { line: 841, column: 7 } },
{ start: { line: 839, column: 6 }, end: { line: 841, column: 7 } }
],
line: 839
},
'80': {
loc: { start: { line: 842, column: 6 }, end: { line: 889, column: 7 } },
type: 'switch',
locations: [
{ start: { line: 843, column: 8 }, end: { line: 846, column: 16 } },
{ start: { line: 847, column: 8 }, end: { line: 849, column: 16 } },
{ start: { line: 850, column: 8 }, end: { line: 859, column: 16 } },
{ start: { line: 860, column: 8 }, end: { line: 869, column: 16 } },
{ start: { line: 870, column: 8 }, end: { line: 876, column: 16 } },
{ start: { line: 877, column: 8 }, end: { line: 879, column: 16 } },
{ start: { line: 880, column: 8 }, end: { line: 882, column: 16 } },
{ start: { line: 883, column: 8 }, end: { line: 885, column: 16 } },
{ start: { line: 886, column: 8 }, end: { line: 888, column: 16 } }
],
line: 842
},
'81': {
loc: { start: { line: 851, column: 10 }, end: { line: 857, column: 11 } },
type: 'if',
locations: [
{ start: { line: 851, column: 10 }, end: { line: 857, column: 11 } },
{ start: { line: 851, column: 10 }, end: { line: 857, column: 11 } }
],
line: 851
},
'82': {
loc: { start: { line: 851, column: 14 }, end: { line: 851, column: 42 } },
type: 'binary-expr',
locations: [
{ start: { line: 851, column: 14 }, end: { line: 851, column: 26 } },
{ start: { line: 851, column: 30 }, end: { line: 851, column: 42 } }
],
line: 851
},
'83': {
loc: { start: { line: 861, column: 10 }, end: { line: 867, column: 11 } },
type: 'if',
locations: [
{ start: { line: 861, column: 10 }, end: { line: 867, column: 11 } },
{ start: { line: 861, column: 10 }, end: { line: 867, column: 11 } }
],
line: 861
},
'84': {
loc: { start: { line: 861, column: 14 }, end: { line: 861, column: 42 } },
type: 'binary-expr',
locations: [
{ start: { line: 861, column: 14 }, end: { line: 861, column: 26 } },
{ start: { line: 861, column: 30 }, end: { line: 861, column: 42 } }
],
line: 861
},
'85': {
loc: { start: { line: 893, column: 6 }, end: { line: 905, column: 7 } },
type: 'if',
locations: [
{ start: { line: 893, column: 6 }, end: { line: 905, column: 7 } },
{ start: { line: 893, column: 6 }, end: { line: 905, column: 7 } }
],
line: 893
},
'86': {
loc: { start: { line: 898, column: 10 }, end: { line: 900, column: 11 } },
type: 'if',
locations: [
{ start: { line: 898, column: 10 }, end: { line: 900, column: 11 } },
{ start: { line: 898, column: 10 }, end: { line: 900, column: 11 } }
],
line: 898
},
'87': {
loc: { start: { line: 904, column: 32 }, end: { line: 904, column: 54 } },
type: 'binary-expr',
locations: [
{ start: { line: 904, column: 33 }, end: { line: 904, column: 35 } },
{ start: { line: 904, column: 39 }, end: { line: 904, column: 48 } },
{ start: { line: 904, column: 53 }, end: { line: 904, column: 54 } }
],
line: 904
},
'88': {
loc: { start: { line: 908, column: 6 }, end: { line: 915, column: 7 } },
type: 'if',
locations: [
{ start: { line: 908, column: 6 }, end: { line: 915, column: 7 } },
{ start: { line: 908, column: 6 }, end: { line: 915, column: 7 } }
],
line: 908
},
'89': {
loc: { start: { line: 908, column: 10 }, end: { line: 908, column: 70 } },
type: 'binary-expr',
locations: [
{ start: { line: 908, column: 10 }, end: { line: 908, column: 15 } },
{ start: { line: 908, column: 19 }, end: { line: 908, column: 24 } },
{ start: { line: 908, column: 28 }, end: { line: 908, column: 47 } },
{ start: { line: 908, column: 51 }, end: { line: 908, column: 70 } }
],
line: 908
},
'90': {
loc: { start: { line: 914, column: 32 }, end: { line: 914, column: 54 } },
type: 'binary-expr',
locations: [
{ start: { line: 914, column: 33 }, end: { line: 914, column: 35 } },
{ start: { line: 914, column: 39 }, end: { line: 914, column: 48 } },
{ start: { line: 914, column: 53 }, end: { line: 914, column: 54 } }
],
line: 914
},
'91': {
loc: { start: { line: 921, column: 26 }, end: { line: 921, column: 48 } },
type: 'binary-expr',
locations: [
{ start: { line: 921, column: 27 }, end: { line: 921, column: 29 } },
{ start: { line: 921, column: 33 }, end: { line: 921, column: 42 } },
{ start: { line: 921, column: 47 }, end: { line: 921, column: 48 } }
],
line: 921
},
'92': {
loc: { start: { line: 923, column: 4 }, end: { line: 925, column: 5 } },
type: 'if',
locations: [
{ start: { line: 923, column: 4 }, end: { line: 925, column: 5 } },
{ start: { line: 923, column: 4 }, end: { line: 925, column: 5 } }
],
line: 923
},
'93': {
loc: { start: { line: 927, column: 4 }, end: { line: 932, column: 5 } },
type: 'if',
locations: [
{ start: { line: 927, column: 4 }, end: { line: 932, column: 5 } },
{ start: { line: 927, column: 4 }, end: { line: 932, column: 5 } }
],
line: 927
},
'94': {
loc: { start: { line: 929, column: 6 }, end: { line: 931, column: 7 } },
type: 'if',
locations: [
{ start: { line: 929, column: 6 }, end: { line: 931, column: 7 } },
{ start: { line: 929, column: 6 }, end: { line: 931, column: 7 } }
],
line: 929
},
'95': {
loc: { start: { line: 935, column: 4 }, end: { line: 937, column: 5 } },
type: 'if',
locations: [
{ start: { line: 935, column: 4 }, end: { line: 937, column: 5 } },
{ start: { line: 935, column: 4 }, end: { line: 937, column: 5 } }
],
line: 935
},
'96': {
loc: { start: { line: 935, column: 8 }, end: { line: 935, column: 43 } },
type: 'binary-expr',
locations: [
{ start: { line: 935, column: 8 }, end: { line: 935, column: 25 } },
{ start: { line: 935, column: 29 }, end: { line: 935, column: 43 } }
],
line: 935
},
'97': {
loc: { start: { line: 941, column: 4 }, end: { line: 959, column: 5 } },
type: 'if',
locations: [
{ start: { line: 941, column: 4 }, end: { line: 959, column: 5 } },
{ start: { line: 941, column: 4 }, end: { line: 959, column: 5 } }
],
line: 941
},
'98': {
loc: { start: { line: 943, column: 6 }, end: { line: 945, column: 7 } },
type: 'if',
locations: [
{ start: { line: 943, column: 6 }, end: { line: 945, column: 7 } },
{ start: { line: 943, column: 6 }, end: { line: 945, column: 7 } }
],
line: 943
},
'99': {
loc: { start: { line: 946, column: 6 }, end: { line: 951, column: 7 } },
type: 'if',
locations: [
{ start: { line: 946, column: 6 }, end: { line: 951, column: 7 } },
{ start: { line: 946, column: 6 }, end: { line: 951, column: 7 } }
],
line: 946
},
'100': {
loc: { start: { line: 948, column: 8 }, end: { line: 950, column: 9 } },
type: 'if',
locations: [
{ start: { line: 948, column: 8 }, end: { line: 950, column: 9 } },
{ start: { line: 948, column: 8 }, end: { line: 950, column: 9 } }
],
line: 948
},
'101': {
loc: { start: { line: 954, column: 6 }, end: { line: 956, column: 7 } },
type: 'if',
locations: [
{ start: { line: 954, column: 6 }, end: { line: 956, column: 7 } },
{ start: { line: 954, column: 6 }, end: { line: 956, column: 7 } }
],
line: 954
},
'102': {
loc: { start: { line: 954, column: 10 }, end: { line: 954, column: 45 } },
type: 'binary-expr',
locations: [
{ start: { line: 954, column: 10 }, end: { line: 954, column: 27 } },
{ start: { line: 954, column: 31 }, end: { line: 954, column: 45 } }
],
line: 954
},
'103': {
loc: { start: { line: 963, column: 13 }, end: { line: 963, column: 24 } },
type: 'binary-expr',
locations: [
{ start: { line: 963, column: 13 }, end: { line: 963, column: 15 } },
{ start: { line: 963, column: 19 }, end: { line: 963, column: 24 } }
],
line: 963
},
'104': {
loc: { start: { line: 965, column: 16 }, end: { line: 965, column: 33 } },
type: 'binary-expr',
locations: [
{ start: { line: 965, column: 16 }, end: { line: 965, column: 18 } },
{ start: { line: 965, column: 22 }, end: { line: 965, column: 33 } }
],
line: 965
},
'105': {
loc: { start: { line: 968, column: 15 }, end: { line: 968, column: 53 } },
type: 'binary-expr',
locations: [
{ start: { line: 968, column: 15 }, end: { line: 968, column: 42 } },
{ start: { line: 968, column: 46 }, end: { line: 968, column: 53 } }
],
line: 968
},
'106': {
loc: { start: { line: 969, column: 15 }, end: { line: 969, column: 53 } },
type: 'binary-expr',
locations: [
{ start: { line: 969, column: 15 }, end: { line: 969, column: 42 } },
{ start: { line: 969, column: 46 }, end: { line: 969, column: 53 } }
],
line: 969
},
'107': {
loc: { start: { line: 970, column: 16 }, end: { line: 970, column: 65 } },
type: 'binary-expr',
locations: [
{ start: { line: 970, column: 16 }, end: { line: 970, column: 18 } },
{ start: { line: 970, column: 23 }, end: { line: 970, column: 52 } },
{ start: { line: 970, column: 56 }, end: { line: 970, column: 64 } }
],
line: 970
},
'108': {
loc: { start: { line: 971, column: 16 }, end: { line: 971, column: 65 } },
type: 'binary-expr',
locations: [
{ start: { line: 971, column: 16 }, end: { line: 971, column: 18 } },
{ start: { line: 971, column: 23 }, end: { line: 971, column: 52 } },
{ start: { line: 971, column: 56 }, end: { line: 971, column: 64 } }
],
line: 971
},
'109': {
loc: { start: { line: 972, column: 15 }, end: { line: 972, column: 38 } },
type: 'binary-expr',
locations: [
{ start: { line: 972, column: 15 }, end: { line: 972, column: 17 } },
{ start: { line: 972, column: 21 }, end: { line: 972, column: 38 } }
],
line: 972
},
'110': {
loc: { start: { line: 973, column: 15 }, end: { line: 973, column: 38 } },
type: 'binary-expr',
locations: [
{ start: { line: 973, column: 15 }, end: { line: 973, column: 17 } },
{ start: { line: 973, column: 21 }, end: { line: 973, column: 38 } }
],
line: 973
},
'111': {
loc: { start: { line: 976, column: 9 }, end: { line: 976, column: 25 } },
type: 'cond-expr',
locations: [
{ start: { line: 976, column: 14 }, end: { line: 976, column: 21 } },
{ start: { line: 976, column: 24 }, end: { line: 976, column: 25 } }
],
line: 976
},
'112': {
loc: { start: { line: 989, column: 26 }, end: { line: 989, column: 37 } },
type: 'binary-expr',
locations: [
{ start: { line: 989, column: 26 }, end: { line: 989, column: 32 } },
{ start: { line: 989, column: 36 }, end: { line: 989, column: 37 } }
],
line: 989
},
'113': {
loc: { start: { line: 999, column: 2 }, end: { line: 1050, column: 3 } },
type: 'if',
locations: [
{ start: { line: 999, column: 2 }, end: { line: 1050, column: 3 } },
{ start: { line: 999, column: 2 }, end: { line: 1050, column: 3 } }
],
line: 999
},
'114': {
loc: { start: { line: 1009, column: 4 }, end: { line: 1013, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1009, column: 4 }, end: { line: 1013, column: 5 } },
{ start: { line: 1009, column: 4 }, end: { line: 1013, column: 5 } }
],
line: 1009
},
'115': {
loc: {
start: { line: 1017, column: 7 },
end: { line: 1017, column: 34 }
},
type: 'cond-expr',
locations: [
{ start: { line: 1017, column: 28 }, end: { line: 1017, column: 30 } },
{ start: { line: 1017, column: 33 }, end: { line: 1017, column: 34 } }
],
line: 1017
},
'116': {
loc: {
start: { line: 1029, column: 9 },
end: { line: 1029, column: 31 }
},
type: 'cond-expr',
locations: [
{ start: { line: 1029, column: 19 }, end: { line: 1029, column: 26 } },
{ start: { line: 1029, column: 29 }, end: { line: 1029, column: 31 } }
],
line: 1029
},
'117': {
loc: {
start: { line: 1030, column: 9 },
end: { line: 1030, column: 31 }
},
type: 'cond-expr',
locations: [
{ start: { line: 1030, column: 19 }, end: { line: 1030, column: 26 } },
{ start: { line: 1030, column: 29 }, end: { line: 1030, column: 31 } }
],
line: 1030
},
'118': {
loc: { start: { line: 1032, column: 4 }, end: { line: 1034, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1032, column: 4 }, end: { line: 1034, column: 5 } },
{ start: { line: 1032, column: 4 }, end: { line: 1034, column: 5 } }
],
line: 1032
},
'119': {
loc: { start: { line: 1035, column: 4 }, end: { line: 1037, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1035, column: 4 }, end: { line: 1037, column: 5 } },
{ start: { line: 1035, column: 4 }, end: { line: 1037, column: 5 } }
],
line: 1035
},
'120': {
loc: { start: { line: 1039, column: 4 }, end: { line: 1041, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1039, column: 4 }, end: { line: 1041, column: 5 } },
{ start: { line: 1039, column: 4 }, end: { line: 1041, column: 5 } }
],
line: 1039
},
'121': {
loc: {
start: { line: 1039, column: 8 },
end: { line: 1039, column: 29 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1039, column: 8 }, end: { line: 1039, column: 18 } },
{ start: { line: 1039, column: 22 }, end: { line: 1039, column: 29 } }
],
line: 1039
},
'122': {
loc: { start: { line: 1042, column: 4 }, end: { line: 1044, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1042, column: 4 }, end: { line: 1044, column: 5 } },
{ start: { line: 1042, column: 4 }, end: { line: 1044, column: 5 } }
],
line: 1042
},
'123': {
loc: {
start: { line: 1042, column: 8 },
end: { line: 1042, column: 30 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1042, column: 8 }, end: { line: 1042, column: 19 } },
{ start: { line: 1042, column: 23 }, end: { line: 1042, column: 30 } }
],
line: 1042
},
'124': {
loc: { start: { line: 1052, column: 2 }, end: { line: 1065, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1052, column: 2 }, end: { line: 1065, column: 3 } },
{ start: { line: 1052, column: 2 }, end: { line: 1065, column: 3 } }
],
line: 1052
},
'125': {
loc: {
start: { line: 1056, column: 22 },
end: { line: 1056, column: 52 }
},
type: 'cond-expr',
locations: [
{ start: { line: 1056, column: 46 }, end: { line: 1056, column: 47 } },
{ start: { line: 1056, column: 50 }, end: { line: 1056, column: 52 } }
],
line: 1056
},
'126': {
loc: {
start: { line: 1056, column: 22 },
end: { line: 1056, column: 43 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1056, column: 22 }, end: { line: 1056, column: 32 } },
{ start: { line: 1056, column: 36 }, end: { line: 1056, column: 43 } }
],
line: 1056
},
'127': {
loc: { start: { line: 1080, column: 2 }, end: { line: 1095, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1080, column: 2 }, end: { line: 1095, column: 3 } },
{ start: { line: 1080, column: 2 }, end: { line: 1095, column: 3 } }
],
line: 1080
},
'128': {
loc: {
start: { line: 1090, column: 8 },
end: { line: 1092, column: 45 }
},
type: 'cond-expr',
locations: [
{ start: { line: 1091, column: 12 }, end: { line: 1091, column: 45 } },
{ start: { line: 1092, column: 12 }, end: { line: 1092, column: 45 } }
],
line: 1090
},
'129': {
loc: { start: { line: 1120, column: 4 }, end: { line: 1150, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1120, column: 4 }, end: { line: 1150, column: 5 } },
{ start: { line: 1120, column: 4 }, end: { line: 1150, column: 5 } }
],
line: 1120
},
'130': {
loc: { start: { line: 1121, column: 6 }, end: { line: 1140, column: 7 } },
type: 'if',
locations: [
{ start: { line: 1121, column: 6 }, end: { line: 1140, column: 7 } },
{ start: { line: 1121, column: 6 }, end: { line: 1140, column: 7 } }
],
line: 1121
},
'131': {
loc: {
start: { line: 1126, column: 13 },
end: { line: 1140, column: 7 }
},
type: 'if',
locations: [
{ start: { line: 1126, column: 13 }, end: { line: 1140, column: 7 } },
{ start: { line: 1126, column: 13 }, end: { line: 1140, column: 7 } }
],
line: 1126
},
'132': {
loc: {
start: { line: 1131, column: 13 },
end: { line: 1140, column: 7 }
},
type: 'if',
locations: [
{ start: { line: 1131, column: 13 }, end: { line: 1140, column: 7 } },
{ start: { line: 1131, column: 13 }, end: { line: 1140, column: 7 } }
],
line: 1131
},
'133': {
loc: { start: { line: 1142, column: 6 }, end: { line: 1149, column: 7 } },
type: 'if',
locations: [
{ start: { line: 1142, column: 6 }, end: { line: 1149, column: 7 } },
{ start: { line: 1142, column: 6 }, end: { line: 1149, column: 7 } }
],
line: 1142
},
'134': {
loc: {
start: { line: 1144, column: 13 },
end: { line: 1149, column: 7 }
},
type: 'if',
locations: [
{ start: { line: 1144, column: 13 }, end: { line: 1149, column: 7 } },
{ start: { line: 1144, column: 13 }, end: { line: 1149, column: 7 } }
],
line: 1144
},
'135': {
loc: { start: { line: 1183, column: 2 }, end: { line: 1185, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1183, column: 2 }, end: { line: 1185, column: 3 } },
{ start: { line: 1183, column: 2 }, end: { line: 1185, column: 3 } }
],
line: 1183
},
'136': {
loc: {
start: { line: 1186, column: 6 },
end: { line: 1186, column: 31 }
},
type: 'cond-expr',
locations: [
{ start: { line: 1186, column: 14 }, end: { line: 1186, column: 15 } },
{ start: { line: 1186, column: 18 }, end: { line: 1186, column: 31 } }
],
line: 1186
},
'137': {
loc: {
start: { line: 1186, column: 18 },
end: { line: 1186, column: 31 }
},
type: 'cond-expr',
locations: [
{ start: { line: 1186, column: 26 }, end: { line: 1186, column: 27 } },
{ start: { line: 1186, column: 30 }, end: { line: 1186, column: 31 } }
],
line: 1186
},
'138': {
loc: { start: { line: 1231, column: 2 }, end: { line: 1233, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1231, column: 2 }, end: { line: 1233, column: 3 } },
{ start: { line: 1231, column: 2 }, end: { line: 1233, column: 3 } }
],
line: 1231
},
'139': {
loc: {
start: { line: 1231, column: 6 },
end: { line: 1231, column: 59 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1231, column: 6 }, end: { line: 1231, column: 12 } },
{ start: { line: 1231, column: 16 }, end: { line: 1231, column: 59 } }
],
line: 1231
},
'140': {
loc: {
start: { line: 1242, column: 11 },
end: { line: 1242, column: 26 }
},
type: 'cond-expr',
locations: [
{ start: { line: 1242, column: 20 }, end: { line: 1242, column: 21 } },
{ start: { line: 1242, column: 24 }, end: { line: 1242, column: 26 } }
],
line: 1242
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0,
'123': 0,
'124': 0,
'125': 0,
'126': 0,
'127': 0,
'128': 0,
'129': 0,
'130': 0,
'131': 0,
'132': 0,
'133': 0,
'134': 0,
'135': 0,
'136': 0,
'137': 0,
'138': 0,
'139': 0,
'140': 0,
'141': 0,
'142': 0,
'143': 0,
'144': 0,
'145': 0,
'146': 0,
'147': 0,
'148': 0,
'149': 0,
'150': 0,
'151': 0,
'152': 0,
'153': 0,
'154': 0,
'155': 0,
'156': 0,
'157': 0,
'158': 0,
'159': 0,
'160': 0,
'161': 0,
'162': 0,
'163': 0,
'164': 0,
'165': 0,
'166': 0,
'167': 0,
'168': 0,
'169': 0,
'170': 0,
'171': 0,
'172': 0,
'173': 0,
'174': 0,
'175': 0,
'176': 0,
'177': 0,
'178': 0,
'179': 0,
'180': 0,
'181': 0,
'182': 0,
'183': 0,
'184': 0,
'185': 0,
'186': 0,
'187': 0,
'188': 0,
'189': 0,
'190': 0,
'191': 0,
'192': 0,
'193': 0,
'194': 0,
'195': 0,
'196': 0,
'197': 0,
'198': 0,
'199': 0,
'200': 0,
'201': 0,
'202': 0,
'203': 0,
'204': 0,
'205': 0,
'206': 0,
'207': 0,
'208': 0,
'209': 0,
'210': 0,
'211': 0,
'212': 0,
'213': 0,
'214': 0,
'215': 0,
'216': 0,
'217': 0,
'218': 0,
'219': 0,
'220': 0,
'221': 0,
'222': 0,
'223': 0,
'224': 0,
'225': 0,
'226': 0,
'227': 0,
'228': 0,
'229': 0,
'230': 0,
'231': 0,
'232': 0,
'233': 0,
'234': 0,
'235': 0,
'236': 0,
'237': 0,
'238': 0,
'239': 0,
'240': 0,
'241': 0,
'242': 0,
'243': 0,
'244': 0,
'245': 0,
'246': 0,
'247': 0,
'248': 0,
'249': 0,
'250': 0,
'251': 0,
'252': 0,
'253': 0,
'254': 0,
'255': 0,
'256': 0,
'257': 0,
'258': 0,
'259': 0,
'260': 0,
'261': 0,
'262': 0,
'263': 0,
'264': 0,
'265': 0,
'266': 0,
'267': 0,
'268': 0,
'269': 0,
'270': 0,
'271': 0,
'272': 0,
'273': 0,
'274': 0,
'275': 0,
'276': 0,
'277': 0,
'278': 0,
'279': 0,
'280': 0,
'281': 0,
'282': 0,
'283': 0,
'284': 0,
'285': 0,
'286': 0,
'287': 0,
'288': 0,
'289': 0,
'290': 0,
'291': 0,
'292': 0,
'293': 0,
'294': 0,
'295': 0,
'296': 0,
'297': 0,
'298': 0,
'299': 0,
'300': 0,
'301': 0,
'302': 0,
'303': 0,
'304': 0,
'305': 0,
'306': 0,
'307': 0,
'308': 0,
'309': 0,
'310': 0,
'311': 0,
'312': 0,
'313': 0,
'314': 0,
'315': 0,
'316': 0,
'317': 0,
'318': 0,
'319': 0,
'320': 0,
'321': 0,
'322': 0,
'323': 0,
'324': 0,
'325': 0,
'326': 0,
'327': 0,
'328': 0,
'329': 0,
'330': 0,
'331': 0,
'332': 0,
'333': 0,
'334': 0,
'335': 0,
'336': 0,
'337': 0,
'338': 0,
'339': 0,
'340': 0,
'341': 0,
'342': 0,
'343': 0,
'344': 0,
'345': 0,
'346': 0,
'347': 0,
'348': 0,
'349': 0,
'350': 0,
'351': 0,
'352': 0,
'353': 0,
'354': 0,
'355': 0,
'356': 0,
'357': 0,
'358': 0,
'359': 0,
'360': 0,
'361': 0,
'362': 0,
'363': 0,
'364': 0,
'365': 0,
'366': 0,
'367': 0,
'368': 0,
'369': 0,
'370': 0,
'371': 0,
'372': 0,
'373': 0,
'374': 0,
'375': 0,
'376': 0,
'377': 0,
'378': 0,
'379': 0,
'380': 0,
'381': 0,
'382': 0,
'383': 0,
'384': 0,
'385': 0,
'386': 0,
'387': 0,
'388': 0,
'389': 0,
'390': 0,
'391': 0,
'392': 0,
'393': 0,
'394': 0,
'395': 0,
'396': 0,
'397': 0,
'398': 0,
'399': 0,
'400': 0,
'401': 0,
'402': 0,
'403': 0,
'404': 0,
'405': 0,
'406': 0,
'407': 0,
'408': 0,
'409': 0,
'410': 0,
'411': 0,
'412': 0,
'413': 0,
'414': 0,
'415': 0,
'416': 0,
'417': 0,
'418': 0,
'419': 0,
'420': 0,
'421': 0,
'422': 0,
'423': 0,
'424': 0,
'425': 0,
'426': 0,
'427': 0,
'428': 0,
'429': 0,
'430': 0,
'431': 0,
'432': 0,
'433': 0,
'434': 0,
'435': 0,
'436': 0,
'437': 0,
'438': 0,
'439': 0,
'440': 0,
'441': 0,
'442': 0,
'443': 0,
'444': 0,
'445': 0,
'446': 0,
'447': 0,
'448': 0,
'449': 0,
'450': 0,
'451': 0,
'452': 0,
'453': 0,
'454': 0,
'455': 0,
'456': 0,
'457': 0,
'458': 0,
'459': 0,
'460': 0,
'461': 0,
'462': 0,
'463': 0,
'464': 0,
'465': 0,
'466': 0,
'467': 0,
'468': 0,
'469': 0,
'470': 0,
'471': 0,
'472': 0,
'473': 0,
'474': 0,
'475': 0,
'476': 0,
'477': 0,
'478': 0,
'479': 0,
'480': 0,
'481': 0,
'482': 0,
'483': 0,
'484': 0,
'485': 0,
'486': 0,
'487': 0,
'488': 0,
'489': 0,
'490': 0,
'491': 0,
'492': 0,
'493': 0,
'494': 0,
'495': 0,
'496': 0,
'497': 0,
'498': 0,
'499': 0,
'500': 0,
'501': 0,
'502': 0,
'503': 0,
'504': 0,
'505': 0,
'506': 0,
'507': 0,
'508': 0,
'509': 0,
'510': 0,
'511': 0,
'512': 0,
'513': 0,
'514': 0,
'515': 0,
'516': 0,
'517': 0,
'518': 0,
'519': 0,
'520': 0,
'521': 0,
'522': 0,
'523': 0,
'524': 0,
'525': 0,
'526': 0,
'527': 0,
'528': 0,
'529': 0,
'530': 0,
'531': 0,
'532': 0,
'533': 0,
'534': 0,
'535': 0,
'536': 0,
'537': 0,
'538': 0,
'539': 0,
'540': 0,
'541': 0,
'542': 0,
'543': 0,
'544': 0,
'545': 0,
'546': 0,
'547': 0,
'548': 0,
'549': 0,
'550': 0,
'551': 0,
'552': 0,
'553': 0,
'554': 0,
'555': 0,
'556': 0,
'557': 0,
'558': 0,
'559': 0,
'560': 0,
'561': 0,
'562': 0,
'563': 0,
'564': 0,
'565': 0,
'566': 0,
'567': 0,
'568': 0,
'569': 0,
'570': 0,
'571': 0,
'572': 0,
'573': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0
},
b: {
'0': [0],
'1': [0],
'2': [0, 0, 0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0, 0, 0, 0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0, 0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0],
'20': [0, 0],
'21': [0, 0],
'22': [0, 0],
'23': [0, 0],
'24': [0, 0],
'25': [0, 0],
'26': [0, 0],
'27': [0, 0],
'28': [0, 0],
'29': [0, 0],
'30': [0, 0, 0],
'31': [0, 0],
'32': [0, 0],
'33': [0, 0],
'34': [0, 0],
'35': [0, 0],
'36': [0, 0],
'37': [0, 0],
'38': [0, 0],
'39': [0, 0],
'40': [0, 0],
'41': [0, 0],
'42': [0, 0],
'43': [0, 0],
'44': [0, 0],
'45': [0, 0, 0],
'46': [0, 0],
'47': [0],
'48': [0, 0],
'49': [0, 0],
'50': [0, 0],
'51': [0, 0],
'52': [0, 0],
'53': [0, 0],
'54': [0, 0],
'55': [0, 0],
'56': [0, 0],
'57': [0, 0],
'58': [0, 0],
'59': [0, 0],
'60': [0, 0],
'61': [0, 0],
'62': [0, 0],
'63': [0, 0],
'64': [0, 0],
'65': [0, 0],
'66': [0, 0],
'67': [0, 0],
'68': [0, 0],
'69': [0, 0],
'70': [0, 0],
'71': [0, 0, 0, 0],
'72': [0, 0],
'73': [0, 0, 0, 0, 0, 0],
'74': [0, 0],
'75': [0, 0],
'76': [0, 0, 0, 0, 0],
'77': [0, 0],
'78': [0, 0],
'79': [0, 0],
'80': [0, 0, 0, 0, 0, 0, 0, 0, 0],
'81': [0, 0],
'82': [0, 0],
'83': [0, 0],
'84': [0, 0],
'85': [0, 0],
'86': [0, 0],
'87': [0, 0, 0],
'88': [0, 0],
'89': [0, 0, 0, 0],
'90': [0, 0, 0],
'91': [0, 0, 0],
'92': [0, 0],
'93': [0, 0],
'94': [0, 0],
'95': [0, 0],
'96': [0, 0],
'97': [0, 0],
'98': [0, 0],
'99': [0, 0],
'100': [0, 0],
'101': [0, 0],
'102': [0, 0],
'103': [0, 0],
'104': [0, 0],
'105': [0, 0],
'106': [0, 0],
'107': [0, 0, 0],
'108': [0, 0, 0],
'109': [0, 0],
'110': [0, 0],
'111': [0, 0],
'112': [0, 0],
'113': [0, 0],
'114': [0, 0],
'115': [0, 0],
'116': [0, 0],
'117': [0, 0],
'118': [0, 0],
'119': [0, 0],
'120': [0, 0],
'121': [0, 0],
'122': [0, 0],
'123': [0, 0],
'124': [0, 0],
'125': [0, 0],
'126': [0, 0],
'127': [0, 0],
'128': [0, 0],
'129': [0, 0],
'130': [0, 0],
'131': [0, 0],
'132': [0, 0],
'133': [0, 0],
'134': [0, 0],
'135': [0, 0],
'136': [0, 0],
'137': [0, 0],
'138': [0, 0],
'139': [0, 0],
'140': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: 'c4dcb8a209b8bf28fb05e3c46aa2f9fd56374073'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
var constants = _interopRequireWildcard(_dereq_('../core/constants'));
function _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function _getRequireWildcardCache() {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || (_typeof(obj) !== 'object' && typeof obj !== 'function')) {
return { default: obj };
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _typeof(obj) {
if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj &&
typeof Symbol === 'function' &&
obj.constructor === Symbol &&
obj !== Symbol.prototype
? 'symbol'
: typeof obj;
};
}
return _typeof(obj);
}
cov_1ih4imeq4j.s[0]++;
/**
* Base class for font handling
* @class p5.Font
* @constructor
* @param {p5} [pInst] pointer to p5 instance
*/
_main.default.Font = function(p) {
cov_1ih4imeq4j.f[0]++;
cov_1ih4imeq4j.s[1]++;
this.parent = p;
cov_1ih4imeq4j.s[2]++;
this.cache = {};
/**
* Underlying opentype font implementation
* @property font
*/ cov_1ih4imeq4j.s[3]++;
this.font = undefined;
};
/**
* Returns a tight bounding box for the given text string using this
* font
*
* @method textBounds
* @param {String} line a line of text
* @param {Number} x x-position
* @param {Number} y y-position
* @param {Number} [fontSize] font size to use (optional) Default is 12.
* @param {Object} [options] opentype options (optional)
* opentype fonts contains alignment and baseline options.
* Default is 'LEFT' and 'alphabetic'
*
* @return {Object} a rectangle object with properties: x, y, w, h
*
* @example
*
*
* let font;
* let textString = 'Lorem ipsum dolor sit amet.';
* function preload() {
* font = loadFont('./assets/Regular.otf');
* }
* function setup() {
* background(210);
*
* let bbox = font.textBounds(textString, 10, 30, 12);
* fill(255);
* stroke(0);
* rect(bbox.x, bbox.y, bbox.w, bbox.h);
* fill(0);
* noStroke();
*
* textFont(font);
* textSize(12);
* text(textString, 10, 30);
* }
*
*
*
* @alt
*words Lorem ipsum dol go off canvas and contained by white bounding box
*/ cov_1ih4imeq4j.s[4]++;
_main.default.Font.prototype.textBounds = function(str) {
var x =
arguments.length > 1 && arguments[1] !== undefined
? arguments[1]
: (cov_1ih4imeq4j.b[0][0]++, 0);
var y =
arguments.length > 2 && arguments[2] !== undefined
? arguments[2]
: (cov_1ih4imeq4j.b[1][0]++, 0);
var fontSize = arguments.length > 3 ? arguments[3] : undefined;
var opts = arguments.length > 4 ? arguments[4] : undefined;
cov_1ih4imeq4j.f[1]++;
// Check cache for existing bounds. Take into consideration the text alignment
// settings. Default alignment should match opentype's origin: left-aligned &
// alphabetic baseline.
var p = (cov_1ih4imeq4j.s[5]++,
((cov_1ih4imeq4j.b[2][0]++, opts) &&
(cov_1ih4imeq4j.b[2][1]++, opts.renderer) &&
(cov_1ih4imeq4j.b[2][2]++, opts.renderer._pInst)) ||
(cov_1ih4imeq4j.b[2][3]++, this.parent));
var ctx = (cov_1ih4imeq4j.s[6]++, p._renderer.drawingContext);
var alignment = (cov_1ih4imeq4j.s[7]++,
(cov_1ih4imeq4j.b[3][0]++, ctx.textAlign) ||
(cov_1ih4imeq4j.b[3][1]++, constants.LEFT));
var baseline = (cov_1ih4imeq4j.s[8]++,
(cov_1ih4imeq4j.b[4][0]++, ctx.textBaseline) ||
(cov_1ih4imeq4j.b[4][1]++, constants.BASELINE));
var cacheResults = (cov_1ih4imeq4j.s[9]++, false);
var result;
var key;
cov_1ih4imeq4j.s[10]++;
fontSize =
(cov_1ih4imeq4j.b[5][0]++, fontSize) ||
(cov_1ih4imeq4j.b[5][1]++, p._renderer._textSize);
// NOTE: cache disabled for now pending further discussion of #3436
cov_1ih4imeq4j.s[11]++;
if (cacheResults) {
cov_1ih4imeq4j.b[6][0]++;
cov_1ih4imeq4j.s[12]++;
key = cacheKey('textBounds', str, x, y, fontSize, alignment, baseline);
cov_1ih4imeq4j.s[13]++;
result = this.cache[key];
} else {
cov_1ih4imeq4j.b[6][1]++;
}
cov_1ih4imeq4j.s[14]++;
if (!result) {
cov_1ih4imeq4j.b[7][0]++;
var minX = (cov_1ih4imeq4j.s[15]++, []);
var minY;
var maxX = (cov_1ih4imeq4j.s[16]++, []);
var maxY;
var pos;
var xCoords = (cov_1ih4imeq4j.s[17]++, []);
cov_1ih4imeq4j.s[18]++;
xCoords[0] = [];
var yCoords = (cov_1ih4imeq4j.s[19]++, []);
var scale = (cov_1ih4imeq4j.s[20]++, this._scale(fontSize));
var lineHeight = (cov_1ih4imeq4j.s[21]++, p._renderer.textLeading());
var lineCount = (cov_1ih4imeq4j.s[22]++, 0);
cov_1ih4imeq4j.s[23]++;
this.font.forEachGlyph(str, x, y, fontSize, opts, function(
glyph,
gX,
gY,
gFontSize
) {
cov_1ih4imeq4j.f[2]++;
var gm = (cov_1ih4imeq4j.s[24]++, glyph.getMetrics());
cov_1ih4imeq4j.s[25]++;
if (
(cov_1ih4imeq4j.b[9][0]++, glyph.index === 0) ||
(cov_1ih4imeq4j.b[9][1]++, glyph.index === 10)
) {
cov_1ih4imeq4j.b[8][0]++;
cov_1ih4imeq4j.s[26]++;
lineCount += 1;
cov_1ih4imeq4j.s[27]++;
xCoords[lineCount] = [];
} else {
cov_1ih4imeq4j.b[8][1]++;
cov_1ih4imeq4j.s[28]++;
xCoords[lineCount].push(gX + gm.xMin * scale);
cov_1ih4imeq4j.s[29]++;
xCoords[lineCount].push(gX + gm.xMax * scale);
cov_1ih4imeq4j.s[30]++;
yCoords.push(gY + lineCount * lineHeight + -gm.yMin * scale);
cov_1ih4imeq4j.s[31]++;
yCoords.push(gY + lineCount * lineHeight + -gm.yMax * scale);
}
});
cov_1ih4imeq4j.s[32]++;
if (xCoords[lineCount].length > 0) {
cov_1ih4imeq4j.b[10][0]++;
cov_1ih4imeq4j.s[33]++;
minX[lineCount] = Math.min.apply(null, xCoords[lineCount]);
cov_1ih4imeq4j.s[34]++;
maxX[lineCount] = Math.max.apply(null, xCoords[lineCount]);
} else {
cov_1ih4imeq4j.b[10][1]++;
}
var finalMaxX = (cov_1ih4imeq4j.s[35]++, 0);
cov_1ih4imeq4j.s[36]++;
for (var i = (cov_1ih4imeq4j.s[37]++, 0); i <= lineCount; i++) {
cov_1ih4imeq4j.s[38]++;
minX[i] = Math.min.apply(null, xCoords[i]);
cov_1ih4imeq4j.s[39]++;
maxX[i] = Math.max.apply(null, xCoords[i]);
var lineLength = (cov_1ih4imeq4j.s[40]++, maxX[i] - minX[i]);
cov_1ih4imeq4j.s[41]++;
if (lineLength > finalMaxX) {
cov_1ih4imeq4j.b[11][0]++;
cov_1ih4imeq4j.s[42]++;
finalMaxX = lineLength;
} else {
cov_1ih4imeq4j.b[11][1]++;
}
}
var finalMinX = (cov_1ih4imeq4j.s[43]++, Math.min.apply(null, minX));
cov_1ih4imeq4j.s[44]++;
minY = Math.min.apply(null, yCoords);
cov_1ih4imeq4j.s[45]++;
maxY = Math.max.apply(null, yCoords);
cov_1ih4imeq4j.s[46]++;
result = {
x: finalMinX,
y: minY,
h: maxY - minY,
w: finalMaxX,
advance: finalMinX - x
};
// Bounds are now calculated, so shift the x & y to match alignment settings
cov_1ih4imeq4j.s[47]++;
pos = this._handleAlignment(
p._renderer,
str,
result.x,
result.y,
result.w + result.advance
);
cov_1ih4imeq4j.s[48]++;
result.x = pos.x;
cov_1ih4imeq4j.s[49]++;
result.y = pos.y;
cov_1ih4imeq4j.s[50]++;
if (cacheResults) {
cov_1ih4imeq4j.b[12][0]++;
cov_1ih4imeq4j.s[51]++;
this.cache[key] = result;
} else {
cov_1ih4imeq4j.b[12][1]++;
}
} else {
cov_1ih4imeq4j.b[7][1]++;
}
cov_1ih4imeq4j.s[52]++;
return result;
};
/**
* Computes an array of points following the path for specified text
*
* @method textToPoints
* @param {String} txt a line of text
* @param {Number} x x-position
* @param {Number} y y-position
* @param {Number} fontSize font size to use (optional)
* @param {Object} [options] an (optional) object that can contain:
*
*
sampleFactor - the ratio of path-length to number of samples
* (default=.1); higher values yield more points and are therefore
* more precise
*
*
simplifyThreshold - if set to a non-zero value, collinear points will be
* be removed from the polygon; the value represents the threshold angle to use
* when determining whether two edges are collinear
*
* @return {Array} an array of points, each with x, y, alpha (the path angle)
* @example
*
*
* let font;
* function preload() {
* font = loadFont('assets/inconsolata.otf');
* }
*
* let points;
* let bounds;
* function setup() {
* createCanvas(100, 100);
* stroke(0);
* fill(255, 104, 204);
*
* points = font.textToPoints('p5', 0, 0, 10, {
* sampleFactor: 5,
* simplifyThreshold: 0
* });
* bounds = font.textBounds(' p5 ', 0, 0, 10);
* }
*
* function draw() {
* background(255);
* beginShape();
* translate(-bounds.x * width / bounds.w, -bounds.y * height / bounds.h);
* for (let i = 0; i < points.length; i++) {
* let p = points[i];
* vertex(
* p.x * width / bounds.w +
* sin(20 * p.y / bounds.h + millis() / 1000) * width / 30,
* p.y * height / bounds.h
* );
* }
* endShape(CLOSE);
* }
*
*
*/ cov_1ih4imeq4j.s[53]++;
_main.default.Font.prototype.textToPoints = function(
txt,
x,
y,
fontSize,
options
) {
cov_1ih4imeq4j.f[3]++;
var xoff = (cov_1ih4imeq4j.s[54]++, 0);
var result = (cov_1ih4imeq4j.s[55]++, []);
var glyphs = (cov_1ih4imeq4j.s[56]++, this._getGlyphs(txt));
function isSpace(i) {
cov_1ih4imeq4j.f[4]++;
cov_1ih4imeq4j.s[57]++;
return (
((cov_1ih4imeq4j.b[13][0]++, glyphs[i].name) &&
(cov_1ih4imeq4j.b[13][1]++, glyphs[i].name === 'space')) ||
((cov_1ih4imeq4j.b[13][2]++, txt.length === glyphs.length) &&
(cov_1ih4imeq4j.b[13][3]++, txt[i] === ' ')) ||
((cov_1ih4imeq4j.b[13][4]++, glyphs[i].index) &&
(cov_1ih4imeq4j.b[13][5]++, glyphs[i].index === 3))
);
}
cov_1ih4imeq4j.s[58]++;
fontSize =
(cov_1ih4imeq4j.b[14][0]++, fontSize) ||
(cov_1ih4imeq4j.b[14][1]++, this.parent._renderer._textSize);
cov_1ih4imeq4j.s[59]++;
for (var i = (cov_1ih4imeq4j.s[60]++, 0); i < glyphs.length; i++) {
cov_1ih4imeq4j.s[61]++;
if (!isSpace(i)) {
cov_1ih4imeq4j.b[15][0]++;
// fix to #1817, #2069
var gpath = (cov_1ih4imeq4j.s[62]++, glyphs[i].getPath(x, y, fontSize)),
paths = (cov_1ih4imeq4j.s[63]++, splitPaths(gpath.commands));
cov_1ih4imeq4j.s[64]++;
for (var j = (cov_1ih4imeq4j.s[65]++, 0); j < paths.length; j++) {
var pts = (cov_1ih4imeq4j.s[66]++, pathToPoints(paths[j], options));
cov_1ih4imeq4j.s[67]++;
for (var k = (cov_1ih4imeq4j.s[68]++, 0); k < pts.length; k++) {
cov_1ih4imeq4j.s[69]++;
pts[k].x += xoff;
cov_1ih4imeq4j.s[70]++;
result.push(pts[k]);
}
}
} else {
cov_1ih4imeq4j.b[15][1]++;
}
cov_1ih4imeq4j.s[71]++;
xoff += glyphs[i].advanceWidth * this._scale(fontSize);
}
cov_1ih4imeq4j.s[72]++;
return result;
};
// ----------------------------- End API ------------------------------
/**
* Returns the set of opentype glyphs for the supplied string.
*
* Note that there is not a strict one-to-one mapping between characters
* and glyphs, so the list of returned glyphs can be larger or smaller
* than the length of the given string.
*
* @private
* @param {String} str the string to be converted
* @return {Array} the opentype glyphs
*/ cov_1ih4imeq4j.s[73]++;
_main.default.Font.prototype._getGlyphs = function(str) {
cov_1ih4imeq4j.f[5]++;
cov_1ih4imeq4j.s[74]++;
return this.font.stringToGlyphs(str);
};
/**
* Returns an opentype path for the supplied string and position.
*
* @private
* @param {String} line a line of text
* @param {Number} x x-position
* @param {Number} y y-position
* @param {Object} options opentype options (optional)
* @return {Object} the opentype path
*/ cov_1ih4imeq4j.s[75]++;
_main.default.Font.prototype._getPath = function(line, x, y, options) {
cov_1ih4imeq4j.f[6]++;
var p = (cov_1ih4imeq4j.s[76]++,
((cov_1ih4imeq4j.b[16][0]++, options) &&
(cov_1ih4imeq4j.b[16][1]++, options.renderer) &&
(cov_1ih4imeq4j.b[16][2]++, options.renderer._pInst)) ||
(cov_1ih4imeq4j.b[16][3]++, this.parent)),
renderer = (cov_1ih4imeq4j.s[77]++, p._renderer),
pos = (cov_1ih4imeq4j.s[78]++, this._handleAlignment(renderer, line, x, y));
cov_1ih4imeq4j.s[79]++;
return this.font.getPath(line, pos.x, pos.y, renderer._textSize, options);
};
/*
* Creates an SVG-formatted path-data string
* (See http://www.w3.org/TR/SVG/paths.html#PathData)
* from the given opentype path or string/position
*
* @param {Object} path an opentype path, OR the following:
*
* @param {String} line a line of text
* @param {Number} x x-position
* @param {Number} y y-position
* @param {Object} options opentype options (optional), set options.decimals
* to set the decimal precision of the path-data
*
* @return {Object} this p5.Font object
*/ cov_1ih4imeq4j
.s[80]++;
_main.default.Font.prototype._getPathData = function(line, x, y, options) {
cov_1ih4imeq4j.f[7]++;
var decimals = (cov_1ih4imeq4j.s[81]++, 3);
// create path from string/position
cov_1ih4imeq4j.s[82]++;
if (
(cov_1ih4imeq4j.b[18][0]++, typeof line === 'string') &&
(cov_1ih4imeq4j.b[18][1]++, arguments.length > 2)
) {
cov_1ih4imeq4j.b[17][0]++;
cov_1ih4imeq4j.s[83]++;
line = this._getPath(line, x, y, options);
} else {
cov_1ih4imeq4j.b[17][1]++;
cov_1ih4imeq4j.s[84]++;
if (_typeof(x) === 'object') {
cov_1ih4imeq4j.b[19][0]++;
cov_1ih4imeq4j.s[85]++;
// handle options specified in 2nd arg
options = x;
} else {
cov_1ih4imeq4j.b[19][1]++;
}
}
// handle svg arguments
cov_1ih4imeq4j.s[86]++;
if (
(cov_1ih4imeq4j.b[21][0]++, options) &&
(cov_1ih4imeq4j.b[21][1]++, typeof options.decimals === 'number')
) {
cov_1ih4imeq4j.b[20][0]++;
cov_1ih4imeq4j.s[87]++;
decimals = options.decimals;
} else {
cov_1ih4imeq4j.b[20][1]++;
}
cov_1ih4imeq4j.s[88]++;
return line.toPathData(decimals);
};
/*
* Creates an SVG
element, as a string,
* from the given opentype path or string/position
*
* @param {Object} path an opentype path, OR the following:
*
* @param {String} line a line of text
* @param {Number} x x-position
* @param {Number} y y-position
* @param {Object} options opentype options (optional), set options.decimals
* to set the decimal precision of the path-data in the element,
* options.fill to set the fill color for the element,
* options.stroke to set the stroke color for the element,
* options.strokeWidth to set the strokeWidth for the element.
*
* @return {Object} this p5.Font object
*/ cov_1ih4imeq4j
.s[89]++;
_main.default.Font.prototype._getSVG = function(line, x, y, options) {
cov_1ih4imeq4j.f[8]++;
var decimals = (cov_1ih4imeq4j.s[90]++, 3);
// create path from string/position
cov_1ih4imeq4j.s[91]++;
if (
(cov_1ih4imeq4j.b[23][0]++, typeof line === 'string') &&
(cov_1ih4imeq4j.b[23][1]++, arguments.length > 2)
) {
cov_1ih4imeq4j.b[22][0]++;
cov_1ih4imeq4j.s[92]++;
line = this._getPath(line, x, y, options);
} else {
cov_1ih4imeq4j.b[22][1]++;
cov_1ih4imeq4j.s[93]++;
if (_typeof(x) === 'object') {
cov_1ih4imeq4j.b[24][0]++;
cov_1ih4imeq4j.s[94]++;
// handle options specified in 2nd arg
options = x;
} else {
cov_1ih4imeq4j.b[24][1]++;
}
}
// handle svg arguments
cov_1ih4imeq4j.s[95]++;
if (options) {
cov_1ih4imeq4j.b[25][0]++;
cov_1ih4imeq4j.s[96]++;
if (typeof options.decimals === 'number') {
cov_1ih4imeq4j.b[26][0]++;
cov_1ih4imeq4j.s[97]++;
decimals = options.decimals;
} else {
cov_1ih4imeq4j.b[26][1]++;
}
cov_1ih4imeq4j.s[98]++;
if (typeof options.strokeWidth === 'number') {
cov_1ih4imeq4j.b[27][0]++;
cov_1ih4imeq4j.s[99]++;
line.strokeWidth = options.strokeWidth;
} else {
cov_1ih4imeq4j.b[27][1]++;
}
cov_1ih4imeq4j.s[100]++;
if (typeof options.fill !== 'undefined') {
cov_1ih4imeq4j.b[28][0]++;
cov_1ih4imeq4j.s[101]++;
line.fill = options.fill;
} else {
cov_1ih4imeq4j.b[28][1]++;
}
cov_1ih4imeq4j.s[102]++;
if (typeof options.stroke !== 'undefined') {
cov_1ih4imeq4j.b[29][0]++;
cov_1ih4imeq4j.s[103]++;
line.stroke = options.stroke;
} else {
cov_1ih4imeq4j.b[29][1]++;
}
} else {
cov_1ih4imeq4j.b[25][1]++;
}
cov_1ih4imeq4j.s[104]++;
return line.toSVG(decimals);
};
/*
* Renders an opentype path or string/position
* to the current graphics context
*
* @param {Object} path an opentype path, OR the following:
*
* @param {String} line a line of text
* @param {Number} x x-position
* @param {Number} y y-position
* @param {Object} options opentype options (optional)
*
* @return {p5.Font} this p5.Font object
*/ cov_1ih4imeq4j
.s[105]++;
_main.default.Font.prototype._renderPath = function(line, x, y, options) {
cov_1ih4imeq4j.f[9]++;
var pdata;
var pg = (cov_1ih4imeq4j.s[106]++,
((cov_1ih4imeq4j.b[30][0]++, options) &&
(cov_1ih4imeq4j.b[30][1]++, options.renderer)) ||
(cov_1ih4imeq4j.b[30][2]++, this.parent._renderer));
var ctx = (cov_1ih4imeq4j.s[107]++, pg.drawingContext);
cov_1ih4imeq4j.s[108]++;
if (
(cov_1ih4imeq4j.b[32][0]++, _typeof(line) === 'object') &&
(cov_1ih4imeq4j.b[32][1]++, line.commands)
) {
cov_1ih4imeq4j.b[31][0]++;
cov_1ih4imeq4j.s[109]++;
pdata = line.commands;
} else {
cov_1ih4imeq4j.b[31][1]++;
cov_1ih4imeq4j.s[110]++;
//pos = handleAlignment(p, ctx, line, x, y);
pdata = this._getPath(line, x, y, options).commands;
}
cov_1ih4imeq4j.s[111]++;
ctx.beginPath();
cov_1ih4imeq4j.s[112]++;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (
var _iterator = pdata[Symbol.iterator](), _step;
!(_iteratorNormalCompletion = (_step = _iterator.next()).done);
_iteratorNormalCompletion = true
) {
var cmd = _step.value;
cov_1ih4imeq4j.s[113]++;
if (cmd.type === 'M') {
cov_1ih4imeq4j.b[33][0]++;
cov_1ih4imeq4j.s[114]++;
ctx.moveTo(cmd.x, cmd.y);
} else {
cov_1ih4imeq4j.b[33][1]++;
cov_1ih4imeq4j.s[115]++;
if (cmd.type === 'L') {
cov_1ih4imeq4j.b[34][0]++;
cov_1ih4imeq4j.s[116]++;
ctx.lineTo(cmd.x, cmd.y);
} else {
cov_1ih4imeq4j.b[34][1]++;
cov_1ih4imeq4j.s[117]++;
if (cmd.type === 'C') {
cov_1ih4imeq4j.b[35][0]++;
cov_1ih4imeq4j.s[118]++;
ctx.bezierCurveTo(cmd.x1, cmd.y1, cmd.x2, cmd.y2, cmd.x, cmd.y);
} else {
cov_1ih4imeq4j.b[35][1]++;
cov_1ih4imeq4j.s[119]++;
if (cmd.type === 'Q') {
cov_1ih4imeq4j.b[36][0]++;
cov_1ih4imeq4j.s[120]++;
ctx.quadraticCurveTo(cmd.x1, cmd.y1, cmd.x, cmd.y);
} else {
cov_1ih4imeq4j.b[36][1]++;
cov_1ih4imeq4j.s[121]++;
if (cmd.type === 'Z') {
cov_1ih4imeq4j.b[37][0]++;
cov_1ih4imeq4j.s[122]++;
ctx.closePath();
} else {
cov_1ih4imeq4j.b[37][1]++;
}
}
}
}
}
}
// only draw stroke if manually set by user
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
cov_1ih4imeq4j.s[123]++;
if (
(cov_1ih4imeq4j.b[39][0]++, pg._doStroke) &&
(cov_1ih4imeq4j.b[39][1]++, pg._strokeSet)
) {
cov_1ih4imeq4j.b[38][0]++;
cov_1ih4imeq4j.s[124]++;
ctx.stroke();
} else {
cov_1ih4imeq4j.b[38][1]++;
}
cov_1ih4imeq4j.s[125]++;
if (pg._doFill) {
cov_1ih4imeq4j.b[40][0]++;
cov_1ih4imeq4j.s[126]++;
// if fill hasn't been set by user, use default-text-fill
if (!pg._fillSet) {
cov_1ih4imeq4j.b[41][0]++;
cov_1ih4imeq4j.s[127]++;
pg._setFill(constants._DEFAULT_TEXT_FILL);
} else {
cov_1ih4imeq4j.b[41][1]++;
}
cov_1ih4imeq4j.s[128]++;
ctx.fill();
} else {
cov_1ih4imeq4j.b[40][1]++;
}
cov_1ih4imeq4j.s[129]++;
return this;
};
cov_1ih4imeq4j.s[130]++;
_main.default.Font.prototype._textWidth = function(str, fontSize) {
cov_1ih4imeq4j.f[10]++;
cov_1ih4imeq4j.s[131]++;
return this.font.getAdvanceWidth(str, fontSize);
};
cov_1ih4imeq4j.s[132]++;
_main.default.Font.prototype._textAscent = function(fontSize) {
cov_1ih4imeq4j.f[11]++;
cov_1ih4imeq4j.s[133]++;
return this.font.ascender * this._scale(fontSize);
};
cov_1ih4imeq4j.s[134]++;
_main.default.Font.prototype._textDescent = function(fontSize) {
cov_1ih4imeq4j.f[12]++;
cov_1ih4imeq4j.s[135]++;
return -this.font.descender * this._scale(fontSize);
};
cov_1ih4imeq4j.s[136]++;
_main.default.Font.prototype._scale = function(fontSize) {
cov_1ih4imeq4j.f[13]++;
cov_1ih4imeq4j.s[137]++;
return (
1 /
this.font.unitsPerEm *
((cov_1ih4imeq4j.b[42][0]++, fontSize) ||
(cov_1ih4imeq4j.b[42][1]++, this.parent._renderer._textSize))
);
};
cov_1ih4imeq4j.s[138]++;
_main.default.Font.prototype._handleAlignment = function(
renderer,
line,
x,
y,
textWidth
) {
cov_1ih4imeq4j.f[14]++;
var fontSize = (cov_1ih4imeq4j.s[139]++, renderer._textSize);
cov_1ih4imeq4j.s[140]++;
if (typeof textWidth === 'undefined') {
cov_1ih4imeq4j.b[43][0]++;
cov_1ih4imeq4j.s[141]++;
textWidth = this._textWidth(line, fontSize);
} else {
cov_1ih4imeq4j.b[43][1]++;
}
cov_1ih4imeq4j.s[142]++;
switch (renderer._textAlign) {
case constants.CENTER:
cov_1ih4imeq4j.b[44][0]++;
cov_1ih4imeq4j.s[143]++;
x -= textWidth / 2;
cov_1ih4imeq4j.s[144]++;
break;
case constants.RIGHT:
cov_1ih4imeq4j.b[44][1]++;
cov_1ih4imeq4j.s[145]++;
x -= textWidth;
cov_1ih4imeq4j.s[146]++;
break;
}
cov_1ih4imeq4j.s[147]++;
switch (renderer._textBaseline) {
case constants.TOP:
cov_1ih4imeq4j.b[45][0]++;
cov_1ih4imeq4j.s[148]++;
y += this._textAscent(fontSize);
cov_1ih4imeq4j.s[149]++;
break;
case constants.CENTER:
cov_1ih4imeq4j.b[45][1]++;
cov_1ih4imeq4j.s[150]++;
y += this._textAscent(fontSize) / 2;
cov_1ih4imeq4j.s[151]++;
break;
case constants.BOTTOM:
cov_1ih4imeq4j.b[45][2]++;
cov_1ih4imeq4j.s[152]++;
y -= this._textDescent(fontSize);
cov_1ih4imeq4j.s[153]++;
break;
}
cov_1ih4imeq4j.s[154]++;
return { x: x, y: y };
};
// path-utils
function pathToPoints(cmds, options) {
cov_1ih4imeq4j.f[15]++;
var opts = (cov_1ih4imeq4j.s[155]++,
parseOpts(options, {
sampleFactor: 0.1,
simplifyThreshold: 0
}));
var // total-length
len = (cov_1ih4imeq4j.s[156]++, pointAtLength(cmds, 0, 1)),
t = (cov_1ih4imeq4j.s[157]++, len / (len * opts.sampleFactor)),
pts = (cov_1ih4imeq4j.s[158]++, []);
cov_1ih4imeq4j.s[159]++;
for (var i = (cov_1ih4imeq4j.s[160]++, 0); i < len; i += t) {
cov_1ih4imeq4j.s[161]++;
pts.push(pointAtLength(cmds, i));
}
cov_1ih4imeq4j.s[162]++;
if (opts.simplifyThreshold) {
cov_1ih4imeq4j.b[46][0]++;
cov_1ih4imeq4j.s[163]++;
simplify(pts, opts.simplifyThreshold);
} else {
cov_1ih4imeq4j.b[46][1]++;
}
cov_1ih4imeq4j.s[164]++;
return pts;
}
function simplify(pts) {
var angle =
arguments.length > 1 && arguments[1] !== undefined
? arguments[1]
: (cov_1ih4imeq4j.b[47][0]++, 0);
cov_1ih4imeq4j.f[16]++;
var num = (cov_1ih4imeq4j.s[165]++, 0);
cov_1ih4imeq4j.s[166]++;
for (
var i = (cov_1ih4imeq4j.s[167]++, pts.length - 1);
(cov_1ih4imeq4j.b[48][0]++, pts.length > 3) &&
(cov_1ih4imeq4j.b[48][1]++, i >= 0);
--i
) {
cov_1ih4imeq4j.s[168]++;
if (collinear(at(pts, i - 1), at(pts, i), at(pts, i + 1), angle)) {
cov_1ih4imeq4j.b[49][0]++;
cov_1ih4imeq4j.s[169]++;
// Remove the middle point
pts.splice(i % pts.length, 1);
cov_1ih4imeq4j.s[170]++;
num++;
} else {
cov_1ih4imeq4j.b[49][1]++;
}
}
cov_1ih4imeq4j.s[171]++;
return num;
}
function splitPaths(cmds) {
cov_1ih4imeq4j.f[17]++;
var paths = (cov_1ih4imeq4j.s[172]++, []);
var current;
cov_1ih4imeq4j.s[173]++;
for (var i = (cov_1ih4imeq4j.s[174]++, 0); i < cmds.length; i++) {
cov_1ih4imeq4j.s[175]++;
if (cmds[i].type === 'M') {
cov_1ih4imeq4j.b[50][0]++;
cov_1ih4imeq4j.s[176]++;
if (current) {
cov_1ih4imeq4j.b[51][0]++;
cov_1ih4imeq4j.s[177]++;
paths.push(current);
} else {
cov_1ih4imeq4j.b[51][1]++;
}
cov_1ih4imeq4j.s[178]++;
current = [];
} else {
cov_1ih4imeq4j.b[50][1]++;
}
cov_1ih4imeq4j.s[179]++;
current.push(cmdToArr(cmds[i]));
}
cov_1ih4imeq4j.s[180]++;
paths.push(current);
cov_1ih4imeq4j.s[181]++;
return paths;
}
function cmdToArr(cmd) {
cov_1ih4imeq4j.f[18]++;
var arr = (cov_1ih4imeq4j.s[182]++, [cmd.type]);
cov_1ih4imeq4j.s[183]++;
if (
(cov_1ih4imeq4j.b[53][0]++, cmd.type === 'M') ||
(cov_1ih4imeq4j.b[53][1]++, cmd.type === 'L')
) {
cov_1ih4imeq4j.b[52][0]++;
cov_1ih4imeq4j.s[184]++;
// moveto or lineto
arr.push(cmd.x, cmd.y);
} else {
cov_1ih4imeq4j.b[52][1]++;
cov_1ih4imeq4j.s[185]++;
if (cmd.type === 'C') {
cov_1ih4imeq4j.b[54][0]++;
cov_1ih4imeq4j.s[186]++;
arr.push(cmd.x1, cmd.y1, cmd.x2, cmd.y2, cmd.x, cmd.y);
} else {
cov_1ih4imeq4j.b[54][1]++;
cov_1ih4imeq4j.s[187]++;
if (cmd.type === 'Q') {
cov_1ih4imeq4j.b[55][0]++;
cov_1ih4imeq4j.s[188]++;
arr.push(cmd.x1, cmd.y1, cmd.x, cmd.y);
} else {
cov_1ih4imeq4j.b[55][1]++;
}
}
}
// else if (cmd.type === 'Z') { /* no-op */ }
cov_1ih4imeq4j.s[189]++;
return arr;
}
function parseOpts(options, defaults) {
cov_1ih4imeq4j.f[19]++;
cov_1ih4imeq4j.s[190]++;
if (_typeof(options) !== 'object') {
cov_1ih4imeq4j.b[56][0]++;
cov_1ih4imeq4j.s[191]++;
options = defaults;
} else {
cov_1ih4imeq4j.b[56][1]++;
cov_1ih4imeq4j.s[192]++;
for (var key in defaults) {
cov_1ih4imeq4j.s[193]++;
if (typeof options[key] === 'undefined') {
cov_1ih4imeq4j.b[57][0]++;
cov_1ih4imeq4j.s[194]++;
options[key] = defaults[key];
} else {
cov_1ih4imeq4j.b[57][1]++;
}
}
}
cov_1ih4imeq4j.s[195]++;
return options;
}
//////////////////////// Helpers ////////////////////////////
function at(v, i) {
cov_1ih4imeq4j.f[20]++;
var s = (cov_1ih4imeq4j.s[196]++, v.length);
cov_1ih4imeq4j.s[197]++;
return v[
i < 0
? (cov_1ih4imeq4j.b[58][0]++, i % s + s)
: (cov_1ih4imeq4j.b[58][1]++, i % s)
];
}
function collinear(a, b, c, thresholdAngle) {
cov_1ih4imeq4j.f[21]++;
cov_1ih4imeq4j.s[198]++;
if (!thresholdAngle) {
cov_1ih4imeq4j.b[59][0]++;
cov_1ih4imeq4j.s[199]++;
return areaTriangle(a, b, c) === 0;
} else {
cov_1ih4imeq4j.b[59][1]++;
}
cov_1ih4imeq4j.s[200]++;
if (typeof collinear.tmpPoint1 === 'undefined') {
cov_1ih4imeq4j.b[60][0]++;
cov_1ih4imeq4j.s[201]++;
collinear.tmpPoint1 = [];
cov_1ih4imeq4j.s[202]++;
collinear.tmpPoint2 = [];
} else {
cov_1ih4imeq4j.b[60][1]++;
}
var ab = (cov_1ih4imeq4j.s[203]++, collinear.tmpPoint1),
bc = (cov_1ih4imeq4j.s[204]++, collinear.tmpPoint2);
cov_1ih4imeq4j.s[205]++;
ab.x = b.x - a.x;
cov_1ih4imeq4j.s[206]++;
ab.y = b.y - a.y;
cov_1ih4imeq4j.s[207]++;
bc.x = c.x - b.x;
cov_1ih4imeq4j.s[208]++;
bc.y = c.y - b.y;
var dot = (cov_1ih4imeq4j.s[209]++, ab.x * bc.x + ab.y * bc.y),
magA = (cov_1ih4imeq4j.s[210]++, Math.sqrt(ab.x * ab.x + ab.y * ab.y)),
magB = (cov_1ih4imeq4j.s[211]++, Math.sqrt(bc.x * bc.x + bc.y * bc.y)),
angle = (cov_1ih4imeq4j.s[212]++, Math.acos(dot / (magA * magB)));
cov_1ih4imeq4j.s[213]++;
return angle < thresholdAngle;
}
function areaTriangle(a, b, c) {
cov_1ih4imeq4j.f[22]++;
cov_1ih4imeq4j.s[214]++;
return (b[0] - a[0]) * (c[1] - a[1]) - (c[0] - a[0]) * (b[1] - a[1]);
}
// Portions of below code copyright 2008 Dmitry Baranovskiy (via MIT license)
function findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
cov_1ih4imeq4j.f[23]++;
var t1 = (cov_1ih4imeq4j.s[215]++, 1 - t);
var t13 = (cov_1ih4imeq4j.s[216]++, Math.pow(t1, 3));
var t12 = (cov_1ih4imeq4j.s[217]++, Math.pow(t1, 2));
var t2 = (cov_1ih4imeq4j.s[218]++, t * t);
var t3 = (cov_1ih4imeq4j.s[219]++, t2 * t);
var x = (cov_1ih4imeq4j.s[220]++,
t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x);
var y = (cov_1ih4imeq4j.s[221]++,
t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y);
var mx = (cov_1ih4imeq4j.s[222]++,
p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x));
var my = (cov_1ih4imeq4j.s[223]++,
p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y));
var nx = (cov_1ih4imeq4j.s[224]++,
c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x));
var ny = (cov_1ih4imeq4j.s[225]++,
c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y));
var ax = (cov_1ih4imeq4j.s[226]++, t1 * p1x + t * c1x);
var ay = (cov_1ih4imeq4j.s[227]++, t1 * p1y + t * c1y);
var cx = (cov_1ih4imeq4j.s[228]++, t1 * c2x + t * p2x);
var cy = (cov_1ih4imeq4j.s[229]++, t1 * c2y + t * p2y);
var alpha = (cov_1ih4imeq4j.s[230]++,
90 - Math.atan2(mx - nx, my - ny) * 180 / Math.PI);
cov_1ih4imeq4j.s[231]++;
if (
(cov_1ih4imeq4j.b[62][0]++, mx > nx) ||
(cov_1ih4imeq4j.b[62][1]++, my < ny)
) {
cov_1ih4imeq4j.b[61][0]++;
cov_1ih4imeq4j.s[232]++;
alpha += 180;
} else {
cov_1ih4imeq4j.b[61][1]++;
}
cov_1ih4imeq4j.s[233]++;
return {
x: x,
y: y,
m: { x: mx, y: my },
n: { x: nx, y: ny },
start: { x: ax, y: ay },
end: { x: cx, y: cy },
alpha: alpha
};
}
function getPointAtSegmentLength(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) {
cov_1ih4imeq4j.f[24]++;
cov_1ih4imeq4j.s[234]++;
return length == null
? (cov_1ih4imeq4j.b[63][0]++, bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y))
: (cov_1ih4imeq4j.b[63][1]++,
findDotsAtSegment(
p1x,
p1y,
c1x,
c1y,
c2x,
c2y,
p2x,
p2y,
getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length)
));
}
function pointAtLength(path, length, istotal) {
cov_1ih4imeq4j.f[25]++;
cov_1ih4imeq4j.s[235]++;
path = path2curve(path);
var x;
var y;
var p;
var l;
var sp = (cov_1ih4imeq4j.s[236]++, '');
var subpaths = (cov_1ih4imeq4j.s[237]++, {});
var point;
var len = (cov_1ih4imeq4j.s[238]++, 0);
cov_1ih4imeq4j.s[239]++;
for (
var i = (cov_1ih4imeq4j.s[240]++, 0),
ii = (cov_1ih4imeq4j.s[241]++, path.length);
i < ii;
i++
) {
cov_1ih4imeq4j.s[242]++;
p = path[i];
cov_1ih4imeq4j.s[243]++;
if (p[0] === 'M') {
cov_1ih4imeq4j.b[64][0]++;
cov_1ih4imeq4j.s[244]++;
x = +p[1];
cov_1ih4imeq4j.s[245]++;
y = +p[2];
} else {
cov_1ih4imeq4j.b[64][1]++;
cov_1ih4imeq4j.s[246]++;
l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);
cov_1ih4imeq4j.s[247]++;
if (len + l > length) {
cov_1ih4imeq4j.b[65][0]++;
cov_1ih4imeq4j.s[248]++;
if (!istotal) {
cov_1ih4imeq4j.b[66][0]++;
cov_1ih4imeq4j.s[249]++;
point = getPointAtSegmentLength(
x,
y,
p[1],
p[2],
p[3],
p[4],
p[5],
p[6],
length - len
);
cov_1ih4imeq4j.s[250]++;
return { x: point.x, y: point.y, alpha: point.alpha };
} else {
cov_1ih4imeq4j.b[66][1]++;
}
} else {
cov_1ih4imeq4j.b[65][1]++;
}
cov_1ih4imeq4j.s[251]++;
len += l;
cov_1ih4imeq4j.s[252]++;
x = +p[5];
cov_1ih4imeq4j.s[253]++;
y = +p[6];
}
cov_1ih4imeq4j.s[254]++;
sp += p.shift() + p;
}
cov_1ih4imeq4j.s[255]++;
subpaths.end = sp;
cov_1ih4imeq4j.s[256]++;
point = istotal
? (cov_1ih4imeq4j.b[67][0]++, len)
: (cov_1ih4imeq4j.b[67][1]++,
findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1));
cov_1ih4imeq4j.s[257]++;
if (point.alpha) {
cov_1ih4imeq4j.b[68][0]++;
cov_1ih4imeq4j.s[258]++;
point = { x: point.x, y: point.y, alpha: point.alpha };
} else {
cov_1ih4imeq4j.b[68][1]++;
}
cov_1ih4imeq4j.s[259]++;
return point;
}
function pathToAbsolute(pathArray) {
cov_1ih4imeq4j.f[26]++;
var res = (cov_1ih4imeq4j.s[260]++, []),
x = (cov_1ih4imeq4j.s[261]++, 0),
y = (cov_1ih4imeq4j.s[262]++, 0),
mx = (cov_1ih4imeq4j.s[263]++, 0),
my = (cov_1ih4imeq4j.s[264]++, 0),
start = (cov_1ih4imeq4j.s[265]++, 0);
cov_1ih4imeq4j.s[266]++;
if (!pathArray) {
cov_1ih4imeq4j.b[69][0]++;
cov_1ih4imeq4j.s[267]++;
// console.warn("Unexpected state: undefined pathArray"); // shouldn't happen
return res;
} else {
cov_1ih4imeq4j.b[69][1]++;
}
cov_1ih4imeq4j.s[268]++;
if (pathArray[0][0] === 'M') {
cov_1ih4imeq4j.b[70][0]++;
cov_1ih4imeq4j.s[269]++;
x = +pathArray[0][1];
cov_1ih4imeq4j.s[270]++;
y = +pathArray[0][2];
cov_1ih4imeq4j.s[271]++;
mx = x;
cov_1ih4imeq4j.s[272]++;
my = y;
cov_1ih4imeq4j.s[273]++;
start++;
cov_1ih4imeq4j.s[274]++;
res[0] = ['M', x, y];
} else {
cov_1ih4imeq4j.b[70][1]++;
}
var dots;
var crz = (cov_1ih4imeq4j.s[275]++,
(cov_1ih4imeq4j.b[71][0]++, pathArray.length === 3) &&
(cov_1ih4imeq4j.b[71][1]++, pathArray[0][0] === 'M') &&
(cov_1ih4imeq4j.b[71][2]++, pathArray[1][0].toUpperCase() === 'R') &&
(cov_1ih4imeq4j.b[71][3]++, pathArray[2][0].toUpperCase() === 'Z'));
cov_1ih4imeq4j.s[276]++;
for (
var r,
pa,
i = (cov_1ih4imeq4j.s[277]++, start),
ii = (cov_1ih4imeq4j.s[278]++, pathArray.length);
i < ii;
i++
) {
cov_1ih4imeq4j.s[279]++;
res.push((r = []));
cov_1ih4imeq4j.s[280]++;
pa = pathArray[i];
cov_1ih4imeq4j.s[281]++;
if (pa[0] !== String.prototype.toUpperCase.call(pa[0])) {
cov_1ih4imeq4j.b[72][0]++;
cov_1ih4imeq4j.s[282]++;
r[0] = String.prototype.toUpperCase.call(pa[0]);
cov_1ih4imeq4j.s[283]++;
switch (r[0]) {
case 'A':
cov_1ih4imeq4j.b[73][0]++;
cov_1ih4imeq4j.s[284]++;
r[1] = pa[1];
cov_1ih4imeq4j.s[285]++;
r[2] = pa[2];
cov_1ih4imeq4j.s[286]++;
r[3] = pa[3];
cov_1ih4imeq4j.s[287]++;
r[4] = pa[4];
cov_1ih4imeq4j.s[288]++;
r[5] = pa[5];
cov_1ih4imeq4j.s[289]++;
r[6] = +(pa[6] + x);
cov_1ih4imeq4j.s[290]++;
r[7] = +(pa[7] + y);
cov_1ih4imeq4j.s[291]++;
break;
case 'V':
cov_1ih4imeq4j.b[73][1]++;
cov_1ih4imeq4j.s[292]++;
r[1] = +pa[1] + y;
cov_1ih4imeq4j.s[293]++;
break;
case 'H':
cov_1ih4imeq4j.b[73][2]++;
cov_1ih4imeq4j.s[294]++;
r[1] = +pa[1] + x;
cov_1ih4imeq4j.s[295]++;
break;
case 'R':
cov_1ih4imeq4j.b[73][3]++;
cov_1ih4imeq4j.s[296]++;
dots = [x, y].concat(pa.slice(1));
cov_1ih4imeq4j.s[297]++;
for (
var j = (cov_1ih4imeq4j.s[298]++, 2),
jj = (cov_1ih4imeq4j.s[299]++, dots.length);
j < jj;
j++
) {
cov_1ih4imeq4j.s[300]++;
dots[j] = +dots[j] + x;
cov_1ih4imeq4j.s[301]++;
dots[++j] = +dots[j] + y;
}
cov_1ih4imeq4j.s[302]++;
res.pop();
cov_1ih4imeq4j.s[303]++;
res = res.concat(catmullRom2bezier(dots, crz));
cov_1ih4imeq4j.s[304]++;
break;
case 'M':
cov_1ih4imeq4j.b[73][4]++;
cov_1ih4imeq4j.s[305]++;
mx = +pa[1] + x;
cov_1ih4imeq4j.s[306]++;
my = +pa[2] + y;
cov_1ih4imeq4j.s[307]++;
break;
default:
cov_1ih4imeq4j.b[73][5]++;
cov_1ih4imeq4j.s[308]++;
for (
var _j = (cov_1ih4imeq4j.s[309]++, 1),
_jj = (cov_1ih4imeq4j.s[310]++, pa.length);
_j < _jj;
_j++
) {
cov_1ih4imeq4j.s[311]++;
r[_j] =
+pa[_j] +
(_j % 2
? (cov_1ih4imeq4j.b[74][0]++, x)
: (cov_1ih4imeq4j.b[74][1]++, y));
}
}
} else {
cov_1ih4imeq4j.b[72][1]++;
cov_1ih4imeq4j.s[312]++;
if (pa[0] === 'R') {
cov_1ih4imeq4j.b[75][0]++;
cov_1ih4imeq4j.s[313]++;
dots = [x, y].concat(pa.slice(1));
cov_1ih4imeq4j.s[314]++;
res.pop();
cov_1ih4imeq4j.s[315]++;
res = res.concat(catmullRom2bezier(dots, crz));
cov_1ih4imeq4j.s[316]++;
r = ['R'].concat(pa.slice(-2));
} else {
cov_1ih4imeq4j.b[75][1]++;
cov_1ih4imeq4j.s[317]++;
for (
var k = (cov_1ih4imeq4j.s[318]++, 0),
kk = (cov_1ih4imeq4j.s[319]++, pa.length);
k < kk;
k++
) {
cov_1ih4imeq4j.s[320]++;
r[k] = pa[k];
}
}
}
cov_1ih4imeq4j.s[321]++;
switch (r[0]) {
case 'Z':
cov_1ih4imeq4j.b[76][0]++;
cov_1ih4imeq4j.s[322]++;
x = mx;
cov_1ih4imeq4j.s[323]++;
y = my;
cov_1ih4imeq4j.s[324]++;
break;
case 'H':
cov_1ih4imeq4j.b[76][1]++;
cov_1ih4imeq4j.s[325]++;
x = r[1];
cov_1ih4imeq4j.s[326]++;
break;
case 'V':
cov_1ih4imeq4j.b[76][2]++;
cov_1ih4imeq4j.s[327]++;
y = r[1];
cov_1ih4imeq4j.s[328]++;
break;
case 'M':
cov_1ih4imeq4j.b[76][3]++;
cov_1ih4imeq4j.s[329]++;
mx = r[r.length - 2];
cov_1ih4imeq4j.s[330]++;
my = r[r.length - 1];
cov_1ih4imeq4j.s[331]++;
break;
default:
cov_1ih4imeq4j.b[76][4]++;
cov_1ih4imeq4j.s[332]++;
x = r[r.length - 2];
cov_1ih4imeq4j.s[333]++;
y = r[r.length - 1];
}
}
cov_1ih4imeq4j.s[334]++;
return res;
}
function path2curve(path, path2) {
cov_1ih4imeq4j.f[27]++;
var p = (cov_1ih4imeq4j.s[335]++, pathToAbsolute(path)),
p2 = (cov_1ih4imeq4j.s[336]++,
(cov_1ih4imeq4j.b[77][0]++, path2) &&
(cov_1ih4imeq4j.b[77][1]++, pathToAbsolute(path2)));
var attrs = (cov_1ih4imeq4j.s[337]++,
{ x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null });
var attrs2 = (cov_1ih4imeq4j.s[338]++,
{ x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null });
var pcoms1 = (cov_1ih4imeq4j.s[339]++, []); // path commands of original path p
var pcoms2 = (cov_1ih4imeq4j.s[340]++, []); // path commands of original path p2
var ii;
cov_1ih4imeq4j.s[341]++;
cov_1ih4imeq4j.s[380]++;
cov_1ih4imeq4j.s[391]++;
var processPath = function processPath(path, d, pcom) {
cov_1ih4imeq4j.f[28]++;
var nx;
var ny;
var tq = (cov_1ih4imeq4j.s[342]++, { T: 1, Q: 1 });
cov_1ih4imeq4j.s[343]++;
if (!path) {
cov_1ih4imeq4j.b[78][0]++;
cov_1ih4imeq4j.s[344]++;
return ['C', d.x, d.y, d.x, d.y, d.x, d.y];
} else {
cov_1ih4imeq4j.b[78][1]++;
}
cov_1ih4imeq4j.s[345]++;
if (!(path[0] in tq)) {
cov_1ih4imeq4j.b[79][0]++;
cov_1ih4imeq4j.s[346]++;
d.qx = d.qy = null;
} else {
cov_1ih4imeq4j.b[79][1]++;
}
cov_1ih4imeq4j.s[347]++;
switch (path[0]) {
case 'M':
cov_1ih4imeq4j.b[80][0]++;
cov_1ih4imeq4j.s[348]++;
d.X = path[1];
cov_1ih4imeq4j.s[349]++;
d.Y = path[2];
cov_1ih4imeq4j.s[350]++;
break;
case 'A':
cov_1ih4imeq4j.b[80][1]++;
cov_1ih4imeq4j.s[351]++;
path = ['C'].concat(a2c.apply(0, [d.x, d.y].concat(path.slice(1))));
cov_1ih4imeq4j.s[352]++;
break;
case 'S':
cov_1ih4imeq4j.b[80][2]++;
cov_1ih4imeq4j.s[353]++;
if (
(cov_1ih4imeq4j.b[82][0]++, pcom === 'C') ||
(cov_1ih4imeq4j.b[82][1]++, pcom === 'S')
) {
cov_1ih4imeq4j.b[81][0]++;
cov_1ih4imeq4j.s[354]++;
nx = d.x * 2 - d.bx;
cov_1ih4imeq4j.s[355]++;
ny = d.y * 2 - d.by;
} else {
cov_1ih4imeq4j.b[81][1]++;
cov_1ih4imeq4j.s[356]++;
nx = d.x;
cov_1ih4imeq4j.s[357]++;
ny = d.y;
}
cov_1ih4imeq4j.s[358]++;
path = ['C', nx, ny].concat(path.slice(1));
cov_1ih4imeq4j.s[359]++;
break;
case 'T':
cov_1ih4imeq4j.b[80][3]++;
cov_1ih4imeq4j.s[360]++;
if (
(cov_1ih4imeq4j.b[84][0]++, pcom === 'Q') ||
(cov_1ih4imeq4j.b[84][1]++, pcom === 'T')
) {
cov_1ih4imeq4j.b[83][0]++;
cov_1ih4imeq4j.s[361]++;
d.qx = d.x * 2 - d.qx;
cov_1ih4imeq4j.s[362]++;
d.qy = d.y * 2 - d.qy;
} else {
cov_1ih4imeq4j.b[83][1]++;
cov_1ih4imeq4j.s[363]++;
d.qx = d.x;
cov_1ih4imeq4j.s[364]++;
d.qy = d.y;
}
cov_1ih4imeq4j.s[365]++;
path = ['C'].concat(q2c(d.x, d.y, d.qx, d.qy, path[1], path[2]));
cov_1ih4imeq4j.s[366]++;
break;
case 'Q':
cov_1ih4imeq4j.b[80][4]++;
cov_1ih4imeq4j.s[367]++;
d.qx = path[1];
cov_1ih4imeq4j.s[368]++;
d.qy = path[2];
cov_1ih4imeq4j.s[369]++;
path = ['C'].concat(q2c(d.x, d.y, path[1], path[2], path[3], path[4]));
cov_1ih4imeq4j.s[370]++;
break;
case 'L':
cov_1ih4imeq4j.b[80][5]++;
cov_1ih4imeq4j.s[371]++;
path = ['C'].concat(l2c(d.x, d.y, path[1], path[2]));
cov_1ih4imeq4j.s[372]++;
break;
case 'H':
cov_1ih4imeq4j.b[80][6]++;
cov_1ih4imeq4j.s[373]++;
path = ['C'].concat(l2c(d.x, d.y, path[1], d.y));
cov_1ih4imeq4j.s[374]++;
break;
case 'V':
cov_1ih4imeq4j.b[80][7]++;
cov_1ih4imeq4j.s[375]++;
path = ['C'].concat(l2c(d.x, d.y, d.x, path[1]));
cov_1ih4imeq4j.s[376]++;
break;
case 'Z':
cov_1ih4imeq4j.b[80][8]++;
cov_1ih4imeq4j.s[377]++;
path = ['C'].concat(l2c(d.x, d.y, d.X, d.Y));
cov_1ih4imeq4j.s[378]++;
break;
}
cov_1ih4imeq4j.s[379]++;
return path;
},
fixArc = function fixArc(pp, i) {
cov_1ih4imeq4j.f[29]++;
cov_1ih4imeq4j.s[381]++;
if (pp[i].length > 7) {
cov_1ih4imeq4j.b[85][0]++;
cov_1ih4imeq4j.s[382]++;
pp[i].shift();
var pi = (cov_1ih4imeq4j.s[383]++, pp[i]);
cov_1ih4imeq4j.s[384]++;
while (pi.length) {
cov_1ih4imeq4j.s[385]++;
pcoms1[i] = 'A';
cov_1ih4imeq4j.s[386]++;
if (p2) {
cov_1ih4imeq4j.b[86][0]++;
cov_1ih4imeq4j.s[387]++;
pcoms2[i] = 'A';
} else {
cov_1ih4imeq4j.b[86][1]++;
}
cov_1ih4imeq4j.s[388]++;
pp.splice(i++, 0, ['C'].concat(pi.splice(0, 6)));
}
cov_1ih4imeq4j.s[389]++;
pp.splice(i, 1);
cov_1ih4imeq4j.s[390]++;
ii = Math.max(
p.length,
((cov_1ih4imeq4j.b[87][0]++, p2) &&
(cov_1ih4imeq4j.b[87][1]++, p2.length)) ||
(cov_1ih4imeq4j.b[87][2]++, 0)
);
} else {
cov_1ih4imeq4j.b[85][1]++;
}
},
fixM = function fixM(path1, path2, a1, a2, i) {
cov_1ih4imeq4j.f[30]++;
cov_1ih4imeq4j.s[392]++;
if (
(cov_1ih4imeq4j.b[89][0]++, path1) &&
(cov_1ih4imeq4j.b[89][1]++, path2) &&
(cov_1ih4imeq4j.b[89][2]++, path1[i][0] === 'M') &&
(cov_1ih4imeq4j.b[89][3]++, path2[i][0] !== 'M')
) {
cov_1ih4imeq4j.b[88][0]++;
cov_1ih4imeq4j.s[393]++;
path2.splice(i, 0, ['M', a2.x, a2.y]);
cov_1ih4imeq4j.s[394]++;
a1.bx = 0;
cov_1ih4imeq4j.s[395]++;
a1.by = 0;
cov_1ih4imeq4j.s[396]++;
a1.x = path1[i][1];
cov_1ih4imeq4j.s[397]++;
a1.y = path1[i][2];
cov_1ih4imeq4j.s[398]++;
ii = Math.max(
p.length,
((cov_1ih4imeq4j.b[90][0]++, p2) &&
(cov_1ih4imeq4j.b[90][1]++, p2.length)) ||
(cov_1ih4imeq4j.b[90][2]++, 0)
);
} else {
cov_1ih4imeq4j.b[88][1]++;
}
};
var pfirst = (cov_1ih4imeq4j.s[399]++, ''); // temporary holder for original path command
var pcom = (cov_1ih4imeq4j.s[400]++, ''); // holder for previous path command of original path
cov_1ih4imeq4j.s[401]++;
ii = Math.max(
p.length,
((cov_1ih4imeq4j.b[91][0]++, p2) && (cov_1ih4imeq4j.b[91][1]++, p2.length)) ||
(cov_1ih4imeq4j.b[91][2]++, 0)
);
cov_1ih4imeq4j.s[402]++;
for (var i = (cov_1ih4imeq4j.s[403]++, 0); i < ii; i++) {
cov_1ih4imeq4j.s[404]++;
if (p[i]) {
cov_1ih4imeq4j.b[92][0]++;
cov_1ih4imeq4j.s[405]++;
pfirst = p[i][0];
} else {
cov_1ih4imeq4j.b[92][1]++;
} // save current path command
cov_1ih4imeq4j.s[406]++;
if (pfirst !== 'C') {
cov_1ih4imeq4j.b[93][0]++;
cov_1ih4imeq4j.s[407]++;
pcoms1[i] = pfirst; // Save current path command
cov_1ih4imeq4j.s[408]++;
if (i) {
cov_1ih4imeq4j.b[94][0]++;
cov_1ih4imeq4j.s[409]++;
pcom = pcoms1[i - 1];
} else {
cov_1ih4imeq4j.b[94][1]++;
} // Get previous path command pcom
} else {
cov_1ih4imeq4j.b[93][1]++;
}
cov_1ih4imeq4j.s[410]++;
p[i] = processPath(p[i], attrs, pcom);
cov_1ih4imeq4j.s[411]++;
if (
(cov_1ih4imeq4j.b[96][0]++, pcoms1[i] !== 'A') &&
(cov_1ih4imeq4j.b[96][1]++, pfirst === 'C')
) {
cov_1ih4imeq4j.b[95][0]++;
cov_1ih4imeq4j.s[412]++;
pcoms1[i] = 'C';
} else {
cov_1ih4imeq4j.b[95][1]++;
}
cov_1ih4imeq4j.s[413]++;
fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1
cov_1ih4imeq4j.s[414]++;
if (p2) {
cov_1ih4imeq4j.b[97][0]++;
cov_1ih4imeq4j.s[415]++;
// the same procedures is done to p2
if (p2[i]) {
cov_1ih4imeq4j.b[98][0]++;
cov_1ih4imeq4j.s[416]++;
pfirst = p2[i][0];
} else {
cov_1ih4imeq4j.b[98][1]++;
}
cov_1ih4imeq4j.s[417]++;
if (pfirst !== 'C') {
cov_1ih4imeq4j.b[99][0]++;
cov_1ih4imeq4j.s[418]++;
pcoms2[i] = pfirst;
cov_1ih4imeq4j.s[419]++;
if (i) {
cov_1ih4imeq4j.b[100][0]++;
cov_1ih4imeq4j.s[420]++;
pcom = pcoms2[i - 1];
} else {
cov_1ih4imeq4j.b[100][1]++;
}
} else {
cov_1ih4imeq4j.b[99][1]++;
}
cov_1ih4imeq4j.s[421]++;
p2[i] = processPath(p2[i], attrs2, pcom);
cov_1ih4imeq4j.s[422]++;
if (
(cov_1ih4imeq4j.b[102][0]++, pcoms2[i] !== 'A') &&
(cov_1ih4imeq4j.b[102][1]++, pfirst === 'C')
) {
cov_1ih4imeq4j.b[101][0]++;
cov_1ih4imeq4j.s[423]++;
pcoms2[i] = 'C';
} else {
cov_1ih4imeq4j.b[101][1]++;
}
cov_1ih4imeq4j.s[424]++;
fixArc(p2, i);
} else {
cov_1ih4imeq4j.b[97][1]++;
}
cov_1ih4imeq4j.s[425]++;
fixM(p, p2, attrs, attrs2, i);
cov_1ih4imeq4j.s[426]++;
fixM(p2, p, attrs2, attrs, i);
var seg = (cov_1ih4imeq4j.s[427]++, p[i]),
seg2 = (cov_1ih4imeq4j.s[428]++,
(cov_1ih4imeq4j.b[103][0]++, p2) && (cov_1ih4imeq4j.b[103][1]++, p2[i])),
seglen = (cov_1ih4imeq4j.s[429]++, seg.length),
seg2len = (cov_1ih4imeq4j.s[430]++,
(cov_1ih4imeq4j.b[104][0]++, p2) &&
(cov_1ih4imeq4j.b[104][1]++, seg2.length));
cov_1ih4imeq4j.s[431]++;
attrs.x = seg[seglen - 2];
cov_1ih4imeq4j.s[432]++;
attrs.y = seg[seglen - 1];
cov_1ih4imeq4j.s[433]++;
attrs.bx =
(cov_1ih4imeq4j.b[105][0]++, parseFloat(seg[seglen - 4])) ||
(cov_1ih4imeq4j.b[105][1]++, attrs.x);
cov_1ih4imeq4j.s[434]++;
attrs.by =
(cov_1ih4imeq4j.b[106][0]++, parseFloat(seg[seglen - 3])) ||
(cov_1ih4imeq4j.b[106][1]++, attrs.y);
cov_1ih4imeq4j.s[435]++;
attrs2.bx =
(cov_1ih4imeq4j.b[107][0]++, p2) &&
((cov_1ih4imeq4j.b[107][1]++, parseFloat(seg2[seg2len - 4])) ||
(cov_1ih4imeq4j.b[107][2]++, attrs2.x));
cov_1ih4imeq4j.s[436]++;
attrs2.by =
(cov_1ih4imeq4j.b[108][0]++, p2) &&
((cov_1ih4imeq4j.b[108][1]++, parseFloat(seg2[seg2len - 3])) ||
(cov_1ih4imeq4j.b[108][2]++, attrs2.y));
cov_1ih4imeq4j.s[437]++;
attrs2.x =
(cov_1ih4imeq4j.b[109][0]++, p2) &&
(cov_1ih4imeq4j.b[109][1]++, seg2[seg2len - 2]);
cov_1ih4imeq4j.s[438]++;
attrs2.y =
(cov_1ih4imeq4j.b[110][0]++, p2) &&
(cov_1ih4imeq4j.b[110][1]++, seg2[seg2len - 1]);
}
cov_1ih4imeq4j.s[439]++;
return p2
? (cov_1ih4imeq4j.b[111][0]++, [p, p2])
: (cov_1ih4imeq4j.b[111][1]++, p);
}
function a2c(x1, y1, rx, ry, angle, lac, sweep_flag, x2, y2, recursive) {
cov_1ih4imeq4j.f[31]++;
// for more information of where this Math came from visit:
// http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
var PI = (cov_1ih4imeq4j.s[440]++, Math.PI);
var _120 = (cov_1ih4imeq4j.s[441]++, PI * 120 / 180);
var f1;
var f2;
var cx;
var cy;
var rad = (cov_1ih4imeq4j.s[442]++,
PI /
180 *
((cov_1ih4imeq4j.b[112][0]++, +angle) || (cov_1ih4imeq4j.b[112][1]++, 0)));
var res = (cov_1ih4imeq4j.s[443]++, []);
var xy;
cov_1ih4imeq4j.s[444]++;
var rotate = function rotate(x, y, rad) {
cov_1ih4imeq4j.f[32]++;
var X = (cov_1ih4imeq4j.s[445]++, x * Math.cos(rad) - y * Math.sin(rad)),
Y = (cov_1ih4imeq4j.s[446]++, x * Math.sin(rad) + y * Math.cos(rad));
cov_1ih4imeq4j.s[447]++;
return { x: X, y: Y };
};
cov_1ih4imeq4j.s[448]++;
if (!recursive) {
cov_1ih4imeq4j.b[113][0]++;
cov_1ih4imeq4j.s[449]++;
xy = rotate(x1, y1, -rad);
cov_1ih4imeq4j.s[450]++;
x1 = xy.x;
cov_1ih4imeq4j.s[451]++;
y1 = xy.y;
cov_1ih4imeq4j.s[452]++;
xy = rotate(x2, y2, -rad);
cov_1ih4imeq4j.s[453]++;
x2 = xy.x;
cov_1ih4imeq4j.s[454]++;
y2 = xy.y;
var x = (cov_1ih4imeq4j.s[455]++, (x1 - x2) / 2);
var y = (cov_1ih4imeq4j.s[456]++, (y1 - y2) / 2);
var h = (cov_1ih4imeq4j.s[457]++, x * x / (rx * rx) + y * y / (ry * ry));
cov_1ih4imeq4j.s[458]++;
if (h > 1) {
cov_1ih4imeq4j.b[114][0]++;
cov_1ih4imeq4j.s[459]++;
h = Math.sqrt(h);
cov_1ih4imeq4j.s[460]++;
rx = h * rx;
cov_1ih4imeq4j.s[461]++;
ry = h * ry;
} else {
cov_1ih4imeq4j.b[114][1]++;
}
var rx2 = (cov_1ih4imeq4j.s[462]++, rx * rx),
ry2 = (cov_1ih4imeq4j.s[463]++, ry * ry);
var k = (cov_1ih4imeq4j.s[464]++,
(lac === sweep_flag
? (cov_1ih4imeq4j.b[115][0]++, -1)
: (cov_1ih4imeq4j.b[115][1]++, 1)) *
Math.sqrt(
Math.abs(
(rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x)
)
));
cov_1ih4imeq4j.s[465]++;
cx = k * rx * y / ry + (x1 + x2) / 2;
cov_1ih4imeq4j.s[466]++;
cy = k * -ry * x / rx + (y1 + y2) / 2;
cov_1ih4imeq4j.s[467]++;
f1 = Math.asin(((y1 - cy) / ry).toFixed(9));
cov_1ih4imeq4j.s[468]++;
f2 = Math.asin(((y2 - cy) / ry).toFixed(9));
cov_1ih4imeq4j.s[469]++;
f1 =
x1 < cx
? (cov_1ih4imeq4j.b[116][0]++, PI - f1)
: (cov_1ih4imeq4j.b[116][1]++, f1);
cov_1ih4imeq4j.s[470]++;
f2 =
x2 < cx
? (cov_1ih4imeq4j.b[117][0]++, PI - f2)
: (cov_1ih4imeq4j.b[117][1]++, f2);
cov_1ih4imeq4j.s[471]++;
if (f1 < 0) {
cov_1ih4imeq4j.b[118][0]++;
cov_1ih4imeq4j.s[472]++;
f1 = PI * 2 + f1;
} else {
cov_1ih4imeq4j.b[118][1]++;
}
cov_1ih4imeq4j.s[473]++;
if (f2 < 0) {
cov_1ih4imeq4j.b[119][0]++;
cov_1ih4imeq4j.s[474]++;
f2 = PI * 2 + f2;
} else {
cov_1ih4imeq4j.b[119][1]++;
}
cov_1ih4imeq4j.s[475]++;
if (
(cov_1ih4imeq4j.b[121][0]++, sweep_flag) &&
(cov_1ih4imeq4j.b[121][1]++, f1 > f2)
) {
cov_1ih4imeq4j.b[120][0]++;
cov_1ih4imeq4j.s[476]++;
f1 = f1 - PI * 2;
} else {
cov_1ih4imeq4j.b[120][1]++;
}
cov_1ih4imeq4j.s[477]++;
if (
(cov_1ih4imeq4j.b[123][0]++, !sweep_flag) &&
(cov_1ih4imeq4j.b[123][1]++, f2 > f1)
) {
cov_1ih4imeq4j.b[122][0]++;
cov_1ih4imeq4j.s[478]++;
f2 = f2 - PI * 2;
} else {
cov_1ih4imeq4j.b[122][1]++;
}
} else {
cov_1ih4imeq4j.b[113][1]++;
cov_1ih4imeq4j.s[479]++;
f1 = recursive[0];
cov_1ih4imeq4j.s[480]++;
f2 = recursive[1];
cov_1ih4imeq4j.s[481]++;
cx = recursive[2];
cov_1ih4imeq4j.s[482]++;
cy = recursive[3];
}
var df = (cov_1ih4imeq4j.s[483]++, f2 - f1);
cov_1ih4imeq4j.s[484]++;
if (Math.abs(df) > _120) {
cov_1ih4imeq4j.b[124][0]++;
var f2old = (cov_1ih4imeq4j.s[485]++, f2),
x2old = (cov_1ih4imeq4j.s[486]++, x2),
y2old = (cov_1ih4imeq4j.s[487]++, y2);
cov_1ih4imeq4j.s[488]++;
f2 =
f1 +
_120 *
((cov_1ih4imeq4j.b[126][0]++, sweep_flag) &&
(cov_1ih4imeq4j.b[126][1]++, f2 > f1)
? (cov_1ih4imeq4j.b[125][0]++, 1)
: (cov_1ih4imeq4j.b[125][1]++, -1));
cov_1ih4imeq4j.s[489]++;
x2 = cx + rx * Math.cos(f2);
cov_1ih4imeq4j.s[490]++;
y2 = cy + ry * Math.sin(f2);
cov_1ih4imeq4j.s[491]++;
res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [
f2,
f2old,
cx,
cy
]);
} else {
cov_1ih4imeq4j.b[124][1]++;
}
cov_1ih4imeq4j.s[492]++;
df = f2 - f1;
var c1 = (cov_1ih4imeq4j.s[493]++, Math.cos(f1)),
s1 = (cov_1ih4imeq4j.s[494]++, Math.sin(f1)),
c2 = (cov_1ih4imeq4j.s[495]++, Math.cos(f2)),
s2 = (cov_1ih4imeq4j.s[496]++, Math.sin(f2)),
t = (cov_1ih4imeq4j.s[497]++, Math.tan(df / 4)),
hx = (cov_1ih4imeq4j.s[498]++, 4 / 3 * rx * t),
hy = (cov_1ih4imeq4j.s[499]++, 4 / 3 * ry * t),
m1 = (cov_1ih4imeq4j.s[500]++, [x1, y1]),
m2 = (cov_1ih4imeq4j.s[501]++, [x1 + hx * s1, y1 - hy * c1]),
m3 = (cov_1ih4imeq4j.s[502]++, [x2 + hx * s2, y2 - hy * c2]),
m4 = (cov_1ih4imeq4j.s[503]++, [x2, y2]);
cov_1ih4imeq4j.s[504]++;
m2[0] = 2 * m1[0] - m2[0];
cov_1ih4imeq4j.s[505]++;
m2[1] = 2 * m1[1] - m2[1];
cov_1ih4imeq4j.s[506]++;
if (recursive) {
cov_1ih4imeq4j.b[127][0]++;
cov_1ih4imeq4j.s[507]++;
return [m2, m3, m4].concat(res);
} else {
cov_1ih4imeq4j.b[127][1]++;
cov_1ih4imeq4j.s[508]++;
res = [m2, m3, m4]
.concat(res)
.join()
.split(',');
var newres = (cov_1ih4imeq4j.s[509]++, []);
cov_1ih4imeq4j.s[510]++;
for (
var i = (cov_1ih4imeq4j.s[511]++, 0),
ii = (cov_1ih4imeq4j.s[512]++, res.length);
i < ii;
i++
) {
cov_1ih4imeq4j.s[513]++;
newres[i] =
i % 2
? (cov_1ih4imeq4j.b[128][0]++, rotate(res[i - 1], res[i], rad).y)
: (cov_1ih4imeq4j.b[128][1]++, rotate(res[i], res[i + 1], rad).x);
}
cov_1ih4imeq4j.s[514]++;
return newres;
}
}
// http://schepers.cc/getting-to-the-point
function catmullRom2bezier(crp, z) {
cov_1ih4imeq4j.f[33]++;
var d = (cov_1ih4imeq4j.s[515]++, []);
cov_1ih4imeq4j.s[516]++;
for (
var i = (cov_1ih4imeq4j.s[517]++, 0),
iLen = (cov_1ih4imeq4j.s[518]++, crp.length);
iLen - 2 * !z > i;
i += 2
) {
var p = (cov_1ih4imeq4j.s[519]++,
[
{
x: +crp[i - 2],
y: +crp[i - 1]
},
{
x: +crp[i],
y: +crp[i + 1]
},
{
x: +crp[i + 2],
y: +crp[i + 3]
},
{
x: +crp[i + 4],
y: +crp[i + 5]
}
]);
cov_1ih4imeq4j.s[520]++;
if (z) {
cov_1ih4imeq4j.b[129][0]++;
cov_1ih4imeq4j.s[521]++;
if (!i) {
cov_1ih4imeq4j.b[130][0]++;
cov_1ih4imeq4j.s[522]++;
p[0] = {
x: +crp[iLen - 2],
y: +crp[iLen - 1]
};
} else {
cov_1ih4imeq4j.b[130][1]++;
cov_1ih4imeq4j.s[523]++;
if (iLen - 4 === i) {
cov_1ih4imeq4j.b[131][0]++;
cov_1ih4imeq4j.s[524]++;
p[3] = {
x: +crp[0],
y: +crp[1]
};
} else {
cov_1ih4imeq4j.b[131][1]++;
cov_1ih4imeq4j.s[525]++;
if (iLen - 2 === i) {
cov_1ih4imeq4j.b[132][0]++;
cov_1ih4imeq4j.s[526]++;
p[2] = {
x: +crp[0],
y: +crp[1]
};
cov_1ih4imeq4j.s[527]++;
p[3] = {
x: +crp[2],
y: +crp[3]
};
} else {
cov_1ih4imeq4j.b[132][1]++;
}
}
}
} else {
cov_1ih4imeq4j.b[129][1]++;
cov_1ih4imeq4j.s[528]++;
if (iLen - 4 === i) {
cov_1ih4imeq4j.b[133][0]++;
cov_1ih4imeq4j.s[529]++;
p[3] = p[2];
} else {
cov_1ih4imeq4j.b[133][1]++;
cov_1ih4imeq4j.s[530]++;
if (!i) {
cov_1ih4imeq4j.b[134][0]++;
cov_1ih4imeq4j.s[531]++;
p[0] = {
x: +crp[i],
y: +crp[i + 1]
};
} else {
cov_1ih4imeq4j.b[134][1]++;
}
}
}
cov_1ih4imeq4j.s[532]++;
d.push([
'C',
(-p[0].x + 6 * p[1].x + p[2].x) / 6,
(-p[0].y + 6 * p[1].y + p[2].y) / 6,
(p[1].x + 6 * p[2].x - p[3].x) / 6,
(p[1].y + 6 * p[2].y - p[3].y) / 6,
p[2].x,
p[2].y
]);
}
cov_1ih4imeq4j.s[533]++;
return d;
}
function l2c(x1, y1, x2, y2) {
cov_1ih4imeq4j.f[34]++;
cov_1ih4imeq4j.s[534]++;
return [x1, y1, x2, y2, x2, y2];
}
function q2c(x1, y1, ax, ay, x2, y2) {
cov_1ih4imeq4j.f[35]++;
var _13 = (cov_1ih4imeq4j.s[535]++, 1 / 3),
_23 = (cov_1ih4imeq4j.s[536]++, 2 / 3);
cov_1ih4imeq4j.s[537]++;
return [
_13 * x1 + _23 * ax,
_13 * y1 + _23 * ay,
_13 * x2 + _23 * ax,
_13 * y2 + _23 * ay,
x2,
y2
];
}
function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {
cov_1ih4imeq4j.f[36]++;
cov_1ih4imeq4j.s[538]++;
if (z == null) {
cov_1ih4imeq4j.b[135][0]++;
cov_1ih4imeq4j.s[539]++;
z = 1;
} else {
cov_1ih4imeq4j.b[135][1]++;
}
cov_1ih4imeq4j.s[540]++;
z =
z > 1
? (cov_1ih4imeq4j.b[136][0]++, 1)
: (cov_1ih4imeq4j.b[136][1]++,
z < 0
? (cov_1ih4imeq4j.b[137][0]++, 0)
: (cov_1ih4imeq4j.b[137][1]++, z));
var z2 = (cov_1ih4imeq4j.s[541]++, z / 2);
var n = (cov_1ih4imeq4j.s[542]++, 12);
var Tvalues = (cov_1ih4imeq4j.s[543]++,
[
-0.1252,
0.1252,
-0.3678,
0.3678,
-0.5873,
0.5873,
-0.7699,
0.7699,
-0.9041,
0.9041,
-0.9816,
0.9816
]);
var sum = (cov_1ih4imeq4j.s[544]++, 0);
var Cvalues = (cov_1ih4imeq4j.s[545]++,
[
0.2491,
0.2491,
0.2335,
0.2335,
0.2032,
0.2032,
0.1601,
0.1601,
0.1069,
0.1069,
0.0472,
0.0472
]);
cov_1ih4imeq4j.s[546]++;
for (var i = (cov_1ih4imeq4j.s[547]++, 0); i < n; i++) {
var ct = (cov_1ih4imeq4j.s[548]++, z2 * Tvalues[i] + z2),
xbase = (cov_1ih4imeq4j.s[549]++, base3(ct, x1, x2, x3, x4)),
ybase = (cov_1ih4imeq4j.s[550]++, base3(ct, y1, y2, y3, y4)),
comb = (cov_1ih4imeq4j.s[551]++, xbase * xbase + ybase * ybase);
cov_1ih4imeq4j.s[552]++;
sum += Cvalues[i] * Math.sqrt(comb);
}
cov_1ih4imeq4j.s[553]++;
return z2 * sum;
}
function getTatLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) {
cov_1ih4imeq4j.f[37]++;
cov_1ih4imeq4j.s[554]++;
if (
(cov_1ih4imeq4j.b[139][0]++, ll < 0) ||
(cov_1ih4imeq4j.b[139][1]++, bezlen(x1, y1, x2, y2, x3, y3, x4, y4) < ll)
) {
cov_1ih4imeq4j.b[138][0]++;
cov_1ih4imeq4j.s[555]++;
return;
} else {
cov_1ih4imeq4j.b[138][1]++;
}
var t = (cov_1ih4imeq4j.s[556]++, 1);
var step = (cov_1ih4imeq4j.s[557]++, t / 2);
var t2 = (cov_1ih4imeq4j.s[558]++, t - step);
var l;
var e = (cov_1ih4imeq4j.s[559]++, 0.01);
cov_1ih4imeq4j.s[560]++;
l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);
cov_1ih4imeq4j.s[561]++;
while (Math.abs(l - ll) > e) {
cov_1ih4imeq4j.s[562]++;
step /= 2;
cov_1ih4imeq4j.s[563]++;
t2 +=
(l < ll
? (cov_1ih4imeq4j.b[140][0]++, 1)
: (cov_1ih4imeq4j.b[140][1]++, -1)) * step;
cov_1ih4imeq4j.s[564]++;
l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);
}
cov_1ih4imeq4j.s[565]++;
return t2;
}
function base3(t, p1, p2, p3, p4) {
cov_1ih4imeq4j.f[38]++;
var t1 = (cov_1ih4imeq4j.s[566]++, -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4),
t2 = (cov_1ih4imeq4j.s[567]++, t * t1 + 6 * p1 - 12 * p2 + 6 * p3);
cov_1ih4imeq4j.s[568]++;
return t * t2 - 3 * p1 + 3 * p2;
}
function cacheKey() {
cov_1ih4imeq4j.f[39]++;
var hash = (cov_1ih4imeq4j.s[569]++, '');
cov_1ih4imeq4j.s[570]++;
for (var i = (cov_1ih4imeq4j.s[571]++, arguments.length - 1); i >= 0; --i) {
cov_1ih4imeq4j.s[572]++;
hash += '\uFF1F'.concat(
i < 0 || arguments.length <= i ? undefined : arguments[i]
);
}
cov_1ih4imeq4j.s[573]++;
return hash;
}
var _default = _main.default;
exports.default = _default;
},
{ '../core/constants': 43, '../core/main': 54 }
],
93: [
function(_dereq_, module, exports) {
'use strict';
var cov_1rbmpudzj = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/utilities/array_functions.js';
var hash = '2034c711d2767f597dcbe66416a21b4633e097ef';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/utilities/array_functions.js',
statementMap: {
'0': { start: { line: 30, column: 0 }, end: { line: 33, column: 2 } },
'1': { start: { line: 31, column: 2 }, end: { line: 31, column: 20 } },
'2': { start: { line: 32, column: 2 }, end: { line: 32, column: 15 } },
'3': { start: { line: 80, column: 0 }, end: { line: 110, column: 2 } },
'4': { start: { line: 85, column: 2 }, end: { line: 104, column: 3 } },
'5': { start: { line: 86, column: 4 }, end: { line: 86, column: 39 } },
'6': { start: { line: 87, column: 4 }, end: { line: 87, column: 24 } },
'7': { start: { line: 88, column: 4 }, end: { line: 88, column: 52 } },
'8': { start: { line: 90, column: 4 }, end: { line: 98, column: 5 } },
'9': { start: { line: 93, column: 6 }, end: { line: 93, column: 16 } },
'10': { start: { line: 94, column: 6 }, end: { line: 94, column: 38 } },
'11': { start: { line: 97, column: 6 }, end: { line: 97, column: 23 } },
'12': { start: { line: 100, column: 4 }, end: { line: 100, column: 14 } },
'13': { start: { line: 102, column: 4 }, end: { line: 102, column: 22 } },
'14': { start: { line: 103, column: 4 }, end: { line: 103, column: 28 } },
'15': { start: { line: 109, column: 2 }, end: { line: 109, column: 62 } },
'16': { start: { line: 139, column: 0 }, end: { line: 139, column: 60 } },
'17': { start: { line: 139, column: 40 }, end: { line: 139, column: 59 } },
'18': { start: { line: 159, column: 0 }, end: { line: 159, column: 46 } },
'19': { start: { line: 159, column: 31 }, end: { line: 159, column: 45 } },
'20': { start: { line: 180, column: 0 }, end: { line: 183, column: 2 } },
'21': { start: { line: 181, column: 2 }, end: { line: 181, column: 13 } },
'22': { start: { line: 182, column: 2 }, end: { line: 182, column: 14 } },
'23': { start: { line: 209, column: 0 }, end: { line: 225, column: 2 } },
'24': { start: { line: 210, column: 17 }, end: { line: 210, column: 77 } },
'25': { start: { line: 211, column: 2 }, end: { line: 211, column: 43 } },
'26': { start: { line: 215, column: 10 }, end: { line: 215, column: 20 } },
'27': { start: { line: 216, column: 2 }, end: { line: 222, column: 3 } },
'28': { start: { line: 217, column: 4 }, end: { line: 217, column: 40 } },
'29': { start: { line: 219, column: 4 }, end: { line: 219, column: 21 } },
'30': { start: { line: 220, column: 4 }, end: { line: 220, column: 24 } },
'31': { start: { line: 221, column: 4 }, end: { line: 221, column: 19 } },
'32': { start: { line: 224, column: 2 }, end: { line: 224, column: 13 } },
'33': { start: { line: 262, column: 0 }, end: { line: 271, column: 2 } },
'34': { start: { line: 263, column: 12 }, end: { line: 263, column: 70 } },
'35': { start: { line: 264, column: 15 }, end: { line: 264, column: 68 } },
'36': { start: { line: 265, column: 2 }, end: { line: 269, column: 3 } },
'37': { start: { line: 266, column: 4 }, end: { line: 266, column: 21 } },
'38': { start: { line: 268, column: 4 }, end: { line: 268, column: 36 } },
'39': { start: { line: 268, column: 29 }, end: { line: 268, column: 34 } },
'40': { start: { line: 270, column: 2 }, end: { line: 270, column: 26 } },
'41': { start: { line: 301, column: 0 }, end: { line: 306, column: 2 } },
'42': { start: { line: 303, column: 2 }, end: { line: 303, column: 63 } },
'43': { start: { line: 305, column: 2 }, end: { line: 305, column: 14 } },
'44': { start: { line: 336, column: 0 }, end: { line: 342, column: 2 } },
'45': { start: { line: 337, column: 2 }, end: { line: 341, column: 3 } },
'46': { start: { line: 338, column: 4 }, end: { line: 338, column: 44 } },
'47': { start: { line: 340, column: 4 }, end: { line: 340, column: 42 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 30, column: 22 }, end: { line: 30, column: 23 } },
loc: { start: { line: 30, column: 45 }, end: { line: 33, column: 1 } },
line: 30
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 80, column: 25 }, end: { line: 80, column: 26 } },
loc: { start: { line: 80, column: 78 }, end: { line: 110, column: 1 } },
line: 80
},
'2': {
name: '(anonymous_2)',
decl: {
start: { line: 139, column: 22 },
end: { line: 139, column: 23 }
},
loc: { start: { line: 139, column: 40 }, end: { line: 139, column: 59 } },
line: 139
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 159, column: 23 },
end: { line: 159, column: 24 }
},
loc: { start: { line: 159, column: 31 }, end: { line: 159, column: 45 } },
line: 159
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 180, column: 23 },
end: { line: 180, column: 24 }
},
loc: { start: { line: 180, column: 38 }, end: { line: 183, column: 1 } },
line: 180
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 209, column: 23 },
end: { line: 209, column: 24 }
},
loc: { start: { line: 209, column: 43 }, end: { line: 225, column: 1 } },
line: 209
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 262, column: 20 },
end: { line: 262, column: 21 }
},
loc: { start: { line: 262, column: 42 }, end: { line: 271, column: 1 } },
line: 262
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 268, column: 19 },
end: { line: 268, column: 20 }
},
loc: { start: { line: 268, column: 29 }, end: { line: 268, column: 34 } },
line: 268
},
'8': {
name: '(anonymous_8)',
decl: {
start: { line: 301, column: 22 },
end: { line: 301, column: 23 }
},
loc: { start: { line: 301, column: 51 }, end: { line: 306, column: 1 } },
line: 301
},
'9': {
name: '(anonymous_9)',
decl: {
start: { line: 336, column: 22 },
end: { line: 336, column: 23 }
},
loc: { start: { line: 336, column: 51 }, end: { line: 342, column: 1 } },
line: 336
}
},
branchMap: {
'0': {
loc: { start: { line: 85, column: 2 }, end: { line: 104, column: 3 } },
type: 'if',
locations: [
{ start: { line: 85, column: 2 }, end: { line: 104, column: 3 } },
{ start: { line: 85, column: 2 }, end: { line: 104, column: 3 } }
],
line: 85
},
'1': {
loc: { start: { line: 90, column: 4 }, end: { line: 98, column: 5 } },
type: 'if',
locations: [
{ start: { line: 90, column: 4 }, end: { line: 98, column: 5 } },
{ start: { line: 90, column: 4 }, end: { line: 98, column: 5 } }
],
line: 90
},
'2': {
loc: { start: { line: 210, column: 17 }, end: { line: 210, column: 77 } },
type: 'binary-expr',
locations: [
{ start: { line: 210, column: 17 }, end: { line: 210, column: 28 } },
{ start: { line: 210, column: 32 }, end: { line: 210, column: 50 } },
{ start: { line: 210, column: 54 }, end: { line: 210, column: 77 } }
],
line: 210
},
'3': {
loc: { start: { line: 211, column: 8 }, end: { line: 211, column: 42 } },
type: 'cond-expr',
locations: [
{ start: { line: 211, column: 25 }, end: { line: 211, column: 28 } },
{ start: { line: 211, column: 31 }, end: { line: 211, column: 42 } }
],
line: 211
},
'4': {
loc: { start: { line: 211, column: 8 }, end: { line: 211, column: 22 } },
type: 'binary-expr',
locations: [
{ start: { line: 211, column: 8 }, end: { line: 211, column: 12 } },
{ start: { line: 211, column: 16 }, end: { line: 211, column: 22 } }
],
line: 211
},
'5': {
loc: { start: { line: 263, column: 12 }, end: { line: 263, column: 70 } },
type: 'cond-expr',
locations: [
{ start: { line: 263, column: 20 }, end: { line: 263, column: 63 } },
{ start: { line: 263, column: 66 }, end: { line: 263, column: 70 } }
],
line: 263
},
'6': {
loc: { start: { line: 264, column: 15 }, end: { line: 264, column: 68 } },
type: 'cond-expr',
locations: [
{ start: { line: 264, column: 23 }, end: { line: 264, column: 63 } },
{ start: { line: 264, column: 66 }, end: { line: 264, column: 68 } }
],
line: 264
},
'7': {
loc: { start: { line: 265, column: 2 }, end: { line: 269, column: 3 } },
type: 'if',
locations: [
{ start: { line: 265, column: 2 }, end: { line: 269, column: 3 } },
{ start: { line: 265, column: 2 }, end: { line: 269, column: 3 } }
],
line: 265
},
'8': {
loc: { start: { line: 337, column: 2 }, end: { line: 341, column: 3 } },
type: 'if',
locations: [
{ start: { line: 337, column: 2 }, end: { line: 341, column: 3 } },
{ start: { line: 337, column: 2 }, end: { line: 341, column: 3 } }
],
line: 337
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '2034c711d2767f597dcbe66416a21b4633e097ef'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_1rbmpudzj.s[0]++;
/**
* Adds a value to the end of an array. Extends the length of
* the array by one. Maps to Array.push().
*
* @method append
* @deprecated Use array.push(value) instead.
* @param {Array} array Array to append
* @param {any} value to be added to the Array
* @return {Array} the array that was appended to
* @example
*
* function setup() {
* let myArray = ['Mango', 'Apple', 'Papaya'];
* print(myArray); // ['Mango', 'Apple', 'Papaya']
*
* append(myArray, 'Peach');
* print(myArray); // ['Mango', 'Apple', 'Papaya', 'Peach']
* }
*
*/
_main.default.prototype.append = function(array, value) {
cov_1rbmpudzj.f[0]++;
cov_1rbmpudzj.s[1]++;
array.push(value);
cov_1rbmpudzj.s[2]++;
return array;
};
/**
* Copies an array (or part of an array) to another array. The src array is
* copied to the dst array, beginning at the position specified by
* srcPosition and into the position specified by dstPosition. The number of
* elements to copy is determined by length. Note that copying values
* overwrites existing values in the destination array. To append values
* instead of overwriting them, use concat().
*
* The simplified version with only two arguments, arrayCopy(src, dst),
* copies an entire array to another of the same size. It is equivalent to
* arrayCopy(src, 0, dst, 0, src.length).
*
* Using this function is far more efficient for copying array data than
* iterating through a for() loop and copying each element individually.
*
* @method arrayCopy
* @deprecated
* @param {Array} src the source Array
* @param {Integer} srcPosition starting position in the source Array
* @param {Array} dst the destination Array
* @param {Integer} dstPosition starting position in the destination Array
* @param {Integer} length number of Array elements to be copied
*
* @example
*
* let src = ['A', 'B', 'C'];
* let dst = [1, 2, 3];
* let srcPosition = 1;
* let dstPosition = 0;
* let length = 2;
*
* print(src); // ['A', 'B', 'C']
* print(dst); // [ 1 , 2 , 3 ]
*
* arrayCopy(src, srcPosition, dst, dstPosition, length);
* print(dst); // ['B', 'C', 3]
*
*/
/**
* @method arrayCopy
* @deprecated Use arr1.copyWithin(arr2) instead.
* @param {Array} src
* @param {Array} dst
* @param {Integer} [length]
*/ cov_1rbmpudzj.s[3]++;
_main.default.prototype.arrayCopy = function(
src,
srcPosition,
dst,
dstPosition,
length
) {
cov_1rbmpudzj.f[1]++;
// the index to begin splicing from dst array
var start;
var end;
cov_1rbmpudzj.s[4]++;
if (typeof length !== 'undefined') {
cov_1rbmpudzj.b[0][0]++;
cov_1rbmpudzj.s[5]++;
end = Math.min(length, src.length);
cov_1rbmpudzj.s[6]++;
start = dstPosition;
cov_1rbmpudzj.s[7]++;
src = src.slice(srcPosition, end + srcPosition);
} else {
cov_1rbmpudzj.b[0][1]++;
cov_1rbmpudzj.s[8]++;
if (typeof dst !== 'undefined') {
cov_1rbmpudzj.b[1][0]++;
cov_1rbmpudzj.s[9]++;
// src, dst, length
// rename so we don't get confused
end = dst;
cov_1rbmpudzj.s[10]++;
end = Math.min(end, src.length);
} else {
cov_1rbmpudzj.b[1][1]++;
cov_1rbmpudzj.s[11]++;
// src, dst
end = src.length;
}
cov_1rbmpudzj.s[12]++;
start = 0;
// rename so we don't get confused
cov_1rbmpudzj.s[13]++;
dst = srcPosition;
cov_1rbmpudzj.s[14]++;
src = src.slice(0, end);
}
// Since we are not returning the array and JavaScript is pass by reference
// we must modify the actual values of the array
// instead of reassigning arrays
cov_1rbmpudzj.s[15]++;
Array.prototype.splice.apply(dst, [start, end].concat(src));
};
/**
* Concatenates two arrays, maps to Array.concat(). Does not modify the
* input arrays.
*
* @method concat
* @deprecated Use arr1.concat(arr2) instead.
* @param {Array} a first Array to concatenate
* @param {Array} b second Array to concatenate
* @return {Array} concatenated array
*
* @example
*
* function setup() {
* let arr1 = ['A', 'B', 'C'];
* let arr2 = [1, 2, 3];
*
* print(arr1); // ['A','B','C']
* print(arr2); // [1,2,3]
*
* let arr3 = concat(arr1, arr2);
*
* print(arr1); // ['A','B','C']
* print(arr2); // [1, 2, 3]
* print(arr3); // ['A','B','C', 1, 2, 3]
* }
*
*/ cov_1rbmpudzj.s[16]++;
_main.default.prototype.concat = function(list0, list1) {
cov_1rbmpudzj.f[2]++;
cov_1rbmpudzj.s[17]++;
return list0.concat(list1);
};
/**
* Reverses the order of an array, maps to Array.reverse()
*
* @method reverse
* @deprecated Use array.reverse() instead.
* @param {Array} list Array to reverse
* @return {Array} the reversed list
* @example
*
* function setup() {
* let myArray = ['A', 'B', 'C'];
* print(myArray); // ['A','B','C']
*
* reverse(myArray);
* print(myArray); // ['C','B','A']
* }
*
*/ cov_1rbmpudzj.s[18]++;
_main.default.prototype.reverse = function(list) {
cov_1rbmpudzj.f[3]++;
cov_1rbmpudzj.s[19]++;
return list.reverse();
};
/**
* Decreases an array by one element and returns the shortened array,
* maps to Array.pop().
*
* @method shorten
* @deprecated Use array.pop() instead.
* @param {Array} list Array to shorten
* @return {Array} shortened Array
* @example
*
* function setup() {
* let myArray = ['A', 'B', 'C'];
* print(myArray); // ['A', 'B', 'C']
* let newArray = shorten(myArray);
* print(myArray); // ['A','B','C']
* print(newArray); // ['A','B']
* }
*
*/ cov_1rbmpudzj.s[20]++;
_main.default.prototype.shorten = function(list) {
cov_1rbmpudzj.f[4]++;
cov_1rbmpudzj.s[21]++;
list.pop();
cov_1rbmpudzj.s[22]++;
return list;
};
/**
* Randomizes the order of the elements of an array. Implements
*
* Fisher-Yates Shuffle Algorithm.
*
* @method shuffle
* @param {Array} array Array to shuffle
* @param {Boolean} [bool] modify passed array
* @return {Array} shuffled Array
* @example
*
* function setup() {
* let regularArr = ['ABC', 'def', createVector(), TAU, Math.E];
* print(regularArr);
* shuffle(regularArr, true); // force modifications to passed array
* print(regularArr);
*
* // By default shuffle() returns a shuffled cloned array:
* let newArr = shuffle(regularArr);
* print(regularArr);
* print(newArr);
* }
*
*/ cov_1rbmpudzj.s[23]++;
_main.default.prototype.shuffle = function(arr, bool) {
cov_1rbmpudzj.f[5]++;
var isView = (cov_1rbmpudzj.s[24]++,
(cov_1rbmpudzj.b[2][0]++, ArrayBuffer) &&
(cov_1rbmpudzj.b[2][1]++, ArrayBuffer.isView) &&
(cov_1rbmpudzj.b[2][2]++, ArrayBuffer.isView(arr)));
cov_1rbmpudzj.s[25]++;
arr =
(cov_1rbmpudzj.b[4][0]++, bool) || (cov_1rbmpudzj.b[4][1]++, isView)
? (cov_1rbmpudzj.b[3][0]++, arr)
: (cov_1rbmpudzj.b[3][1]++, arr.slice());
var rnd,
tmp,
idx = (cov_1rbmpudzj.s[26]++, arr.length);
cov_1rbmpudzj.s[27]++;
while (idx > 1) {
cov_1rbmpudzj.s[28]++;
rnd = (this.random(0, 1) * idx) | 0;
cov_1rbmpudzj.s[29]++;
tmp = arr[--idx];
cov_1rbmpudzj.s[30]++;
arr[idx] = arr[rnd];
cov_1rbmpudzj.s[31]++;
arr[rnd] = tmp;
}
cov_1rbmpudzj.s[32]++;
return arr;
};
/**
* Sorts an array of numbers from smallest to largest, or puts an array of
* words in alphabetical order. The original array is not modified; a
* re-ordered array is returned. The count parameter states the number of
* elements to sort. For example, if there are 12 elements in an array and
* count is set to 5, only the first 5 elements in the array will be sorted.
*
* @method sort
* @deprecated Use array.sort() instead.
* @param {Array} list Array to sort
* @param {Integer} [count] number of elements to sort, starting from 0
* @return {Array} the sorted list
*
* @example
*
* function setup() {
* let words = ['banana', 'apple', 'pear', 'lime'];
* print(words); // ['banana', 'apple', 'pear', 'lime']
* let count = 4; // length of array
*
* words = sort(words, count);
* print(words); // ['apple', 'banana', 'lime', 'pear']
* }
*
*
* function setup() {
* let numbers = [2, 6, 1, 5, 14, 9, 8, 12];
* print(numbers); // [2, 6, 1, 5, 14, 9, 8, 12]
* let count = 5; // Less than the length of the array
*
* numbers = sort(numbers, count);
* print(numbers); // [1,2,5,6,14,9,8,12]
* }
*
*/ cov_1rbmpudzj.s[33]++;
_main.default.prototype.sort = function(list, count) {
cov_1rbmpudzj.f[6]++;
var arr = (cov_1rbmpudzj.s[34]++,
count
? (cov_1rbmpudzj.b[5][0]++, list.slice(0, Math.min(count, list.length)))
: (cov_1rbmpudzj.b[5][1]++, list));
var rest = (cov_1rbmpudzj.s[35]++,
count
? (cov_1rbmpudzj.b[6][0]++, list.slice(Math.min(count, list.length)))
: (cov_1rbmpudzj.b[6][1]++, []));
cov_1rbmpudzj.s[36]++;
if (typeof arr[0] === 'string') {
cov_1rbmpudzj.b[7][0]++;
cov_1rbmpudzj.s[37]++;
arr = arr.sort();
} else {
cov_1rbmpudzj.b[7][1]++;
cov_1rbmpudzj.s[38]++;
arr = arr.sort(function(a, b) {
cov_1rbmpudzj.f[7]++;
cov_1rbmpudzj.s[39]++;
return a - b;
});
}
cov_1rbmpudzj.s[40]++;
return arr.concat(rest);
};
/**
* Inserts a value or an array of values into an existing array. The first
* parameter specifies the initial array to be modified, and the second
* parameter defines the data to be inserted. The third parameter is an index
* value which specifies the array position from which to insert data.
* (Remember that array index numbering starts at zero, so the first position
* is 0, the second position is 1, and so on.)
*
* @method splice
* @deprecated Use array.splice() instead.
* @param {Array} list Array to splice into
* @param {any} value value to be spliced in
* @param {Integer} position in the array from which to insert data
* @return {Array} the list
*
* @example
*
* function setup() {
* let myArray = [0, 1, 2, 3, 4];
* let insArray = ['A', 'B', 'C'];
* print(myArray); // [0, 1, 2, 3, 4]
* print(insArray); // ['A','B','C']
*
* splice(myArray, insArray, 3);
* print(myArray); // [0,1,2,'A','B','C',3,4]
* }
*
*/ cov_1rbmpudzj.s[41]++;
_main.default.prototype.splice = function(list, value, index) {
cov_1rbmpudzj.f[8]++;
cov_1rbmpudzj.s[42]++;
// note that splice returns spliced elements and not an array
Array.prototype.splice.apply(list, [index, 0].concat(value));
cov_1rbmpudzj.s[43]++;
return list;
};
/**
* Extracts an array of elements from an existing array. The list parameter
* defines the array from which the elements will be copied, and the start
* and count parameters specify which elements to extract. If no count is
* given, elements will be extracted from the start to the end of the array.
* When specifying the start, remember that the first array element is 0.
* This function does not change the source array.
*
* @method subset
* @deprecated Use array.slice() instead.
* @param {Array} list Array to extract from
* @param {Integer} start position to begin
* @param {Integer} [count] number of values to extract
* @return {Array} Array of extracted elements
*
* @example
*
* function setup() {
* let myArray = [1, 2, 3, 4, 5];
* print(myArray); // [1, 2, 3, 4, 5]
*
* let sub1 = subset(myArray, 0, 3);
* let sub2 = subset(myArray, 2, 2);
* print(sub1); // [1,2,3]
* print(sub2); // [3,4]
* }
*
*/ cov_1rbmpudzj.s[44]++;
_main.default.prototype.subset = function(list, start, count) {
cov_1rbmpudzj.f[9]++;
cov_1rbmpudzj.s[45]++;
if (typeof count !== 'undefined') {
cov_1rbmpudzj.b[8][0]++;
cov_1rbmpudzj.s[46]++;
return list.slice(start, start + count);
} else {
cov_1rbmpudzj.b[8][1]++;
cov_1rbmpudzj.s[47]++;
return list.slice(start, list.length);
}
};
var _default = _main.default;
exports.default = _default;
},
{ '../core/main': 54 }
],
94: [
function(_dereq_, module, exports) {
'use strict';
var cov_1qc6au9wz9 = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/utilities/conversion.js';
var hash = '777277a9af0ba9aba38fef86972153cb2beb119d';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/utilities/conversion.js',
statementMap: {
'0': { start: { line: 37, column: 0 }, end: { line: 42, column: 2 } },
'1': { start: { line: 38, column: 2 }, end: { line: 40, column: 3 } },
'2': { start: { line: 39, column: 4 }, end: { line: 39, column: 31 } },
'3': { start: { line: 41, column: 2 }, end: { line: 41, column: 25 } },
'4': { start: { line: 71, column: 0 }, end: { line: 85, column: 2 } },
'5': { start: { line: 72, column: 2 }, end: { line: 84, column: 3 } },
'6': { start: { line: 73, column: 4 }, end: { line: 73, column: 20 } },
'7': { start: { line: 74, column: 9 }, end: { line: 84, column: 3 } },
'8': { start: { line: 75, column: 4 }, end: { line: 75, column: 21 } },
'9': { start: { line: 76, column: 9 }, end: { line: 84, column: 3 } },
'10': { start: { line: 77, column: 4 }, end: { line: 77, column: 30 } },
'11': { start: { line: 78, column: 9 }, end: { line: 84, column: 3 } },
'12': { start: { line: 79, column: 4 }, end: { line: 79, column: 17 } },
'13': { start: { line: 80, column: 9 }, end: { line: 84, column: 3 } },
'14': { start: { line: 81, column: 4 }, end: { line: 81, column: 21 } },
'15': { start: { line: 82, column: 9 }, end: { line: 84, column: 3 } },
'16': { start: { line: 83, column: 4 }, end: { line: 83, column: 50 } },
'17': { start: { line: 83, column: 22 }, end: { line: 83, column: 48 } },
'18': { start: { line: 105, column: 0 }, end: { line: 111, column: 2 } },
'19': { start: { line: 106, column: 2 }, end: { line: 110, column: 3 } },
'20': { start: { line: 107, column: 4 }, end: { line: 107, column: 35 } },
'21': { start: { line: 109, column: 4 }, end: { line: 109, column: 21 } },
'22': { start: { line: 133, column: 0 }, end: { line: 143, column: 2 } },
'23': { start: { line: 134, column: 2 }, end: { line: 142, column: 3 } },
'24': { start: { line: 135, column: 4 }, end: { line: 135, column: 19 } },
'25': { start: { line: 136, column: 9 }, end: { line: 142, column: 3 } },
'26': { start: { line: 137, column: 4 }, end: { line: 137, column: 38 } },
'27': { start: { line: 138, column: 9 }, end: { line: 142, column: 3 } },
'28': { start: { line: 139, column: 4 }, end: { line: 139, column: 13 } },
'29': { start: { line: 140, column: 9 }, end: { line: 142, column: 3 } },
'30': { start: { line: 141, column: 4 }, end: { line: 141, column: 39 } },
'31': { start: { line: 172, column: 0 }, end: { line: 179, column: 2 } },
'32': { start: { line: 173, column: 13 }, end: { line: 173, column: 36 } },
'33': { start: { line: 174, column: 2 }, end: { line: 178, column: 3 } },
'34': { start: { line: 175, column: 4 }, end: { line: 175, column: 34 } },
'35': { start: { line: 176, column: 9 }, end: { line: 178, column: 3 } },
'36': { start: { line: 177, column: 4 }, end: { line: 177, column: 37 } },
'37': { start: { line: 205, column: 0 }, end: { line: 213, column: 2 } },
'38': { start: { line: 206, column: 2 }, end: { line: 212, column: 3 } },
'39': { start: { line: 207, column: 4 }, end: { line: 207, column: 34 } },
'40': { start: { line: 208, column: 9 }, end: { line: 212, column: 3 } },
'41': { start: { line: 209, column: 4 }, end: { line: 209, column: 36 } },
'42': { start: { line: 210, column: 9 }, end: { line: 212, column: 3 } },
'43': { start: { line: 211, column: 4 }, end: { line: 211, column: 46 } },
'44': { start: { line: 236, column: 0 }, end: { line: 242, column: 2 } },
'45': { start: { line: 237, column: 2 }, end: { line: 241, column: 3 } },
'46': { start: { line: 238, column: 4 }, end: { line: 238, column: 27 } },
'47': { start: { line: 239, column: 9 }, end: { line: 241, column: 3 } },
'48': { start: { line: 240, column: 4 }, end: { line: 240, column: 38 } },
'49': { start: { line: 270, column: 0 }, end: { line: 292, column: 2 } },
'50': { start: { line: 271, column: 2 }, end: { line: 271, column: 75 } },
'51': { start: { line: 272, column: 2 }, end: { line: 291, column: 3 } },
'52': { start: { line: 273, column: 4 }, end: { line: 273, column: 51 } },
'53': { start: { line: 273, column: 22 }, end: { line: 273, column: 49 } },
'54': { start: { line: 274, column: 9 }, end: { line: 291, column: 3 } },
'55': { start: { line: 275, column: 14 }, end: { line: 275, column: 40 } },
'56': { start: { line: 276, column: 4 }, end: { line: 276, column: 28 } },
'57': { start: { line: 277, column: 9 }, end: { line: 291, column: 3 } },
'58': { start: { line: 278, column: 4 }, end: { line: 280, column: 5 } },
'59': { start: { line: 279, column: 6 }, end: { line: 279, column: 29 } },
'60': { start: { line: 281, column: 14 }, end: { line: 283, column: 20 } },
'61': { start: { line: 284, column: 4 }, end: { line: 286, column: 5 } },
'62': { start: { line: 285, column: 6 }, end: { line: 285, column: 22 } },
'63': { start: { line: 287, column: 4 }, end: { line: 289, column: 5 } },
'64': { start: { line: 288, column: 6 }, end: { line: 288, column: 59 } },
'65': { start: { line: 290, column: 4 }, end: { line: 290, column: 15 } },
'66': { start: { line: 315, column: 0 }, end: { line: 321, column: 2 } },
'67': { start: { line: 316, column: 2 }, end: { line: 320, column: 3 } },
'68': { start: { line: 317, column: 4 }, end: { line: 317, column: 37 } },
'69': { start: { line: 319, column: 4 }, end: { line: 319, column: 34 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 37, column: 21 }, end: { line: 37, column: 22 } },
loc: { start: { line: 37, column: 35 }, end: { line: 42, column: 1 } },
line: 37
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 71, column: 19 }, end: { line: 71, column: 20 } },
loc: { start: { line: 71, column: 43 }, end: { line: 85, column: 1 } },
line: 71
},
'2': {
name: '(anonymous_2)',
decl: { start: { line: 83, column: 17 }, end: { line: 83, column: 18 } },
loc: { start: { line: 83, column: 22 }, end: { line: 83, column: 48 } },
line: 83
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 105, column: 19 },
end: { line: 105, column: 20 }
},
loc: { start: { line: 105, column: 31 }, end: { line: 111, column: 1 } },
line: 105
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 133, column: 23 },
end: { line: 133, column: 24 }
},
loc: { start: { line: 133, column: 35 }, end: { line: 143, column: 1 } },
line: 133
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 172, column: 20 },
end: { line: 172, column: 21 }
},
loc: { start: { line: 172, column: 32 }, end: { line: 179, column: 1 } },
line: 172
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 205, column: 20 },
end: { line: 205, column: 21 }
},
loc: { start: { line: 205, column: 32 }, end: { line: 213, column: 1 } },
line: 205
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 236, column: 22 },
end: { line: 236, column: 23 }
},
loc: { start: { line: 236, column: 34 }, end: { line: 242, column: 1 } },
line: 236
},
'8': {
name: '(anonymous_8)',
decl: {
start: { line: 270, column: 19 },
end: { line: 270, column: 20 }
},
loc: { start: { line: 270, column: 39 }, end: { line: 292, column: 1 } },
line: 270
},
'9': {
name: '(anonymous_9)',
decl: {
start: { line: 273, column: 17 },
end: { line: 273, column: 18 }
},
loc: { start: { line: 273, column: 22 }, end: { line: 273, column: 49 } },
line: 273
},
'10': {
name: '(anonymous_10)',
decl: {
start: { line: 315, column: 21 },
end: { line: 315, column: 22 }
},
loc: { start: { line: 315, column: 33 }, end: { line: 321, column: 1 } },
line: 315
}
},
branchMap: {
'0': {
loc: { start: { line: 38, column: 2 }, end: { line: 40, column: 3 } },
type: 'if',
locations: [
{ start: { line: 38, column: 2 }, end: { line: 40, column: 3 } },
{ start: { line: 38, column: 2 }, end: { line: 40, column: 3 } }
],
line: 38
},
'1': {
loc: { start: { line: 71, column: 31 }, end: { line: 71, column: 41 } },
type: 'default-arg',
locations: [
{ start: { line: 71, column: 39 }, end: { line: 71, column: 41 } }
],
line: 71
},
'2': {
loc: { start: { line: 72, column: 2 }, end: { line: 84, column: 3 } },
type: 'if',
locations: [
{ start: { line: 72, column: 2 }, end: { line: 84, column: 3 } },
{ start: { line: 72, column: 2 }, end: { line: 84, column: 3 } }
],
line: 72
},
'3': {
loc: { start: { line: 72, column: 6 }, end: { line: 72, column: 40 } },
type: 'binary-expr',
locations: [
{ start: { line: 72, column: 6 }, end: { line: 72, column: 20 } },
{ start: { line: 72, column: 24 }, end: { line: 72, column: 40 } }
],
line: 72
},
'4': {
loc: { start: { line: 74, column: 9 }, end: { line: 84, column: 3 } },
type: 'if',
locations: [
{ start: { line: 74, column: 9 }, end: { line: 84, column: 3 } },
{ start: { line: 74, column: 9 }, end: { line: 84, column: 3 } }
],
line: 74
},
'5': {
loc: { start: { line: 74, column: 13 }, end: { line: 74, column: 49 } },
type: 'binary-expr',
locations: [
{ start: { line: 74, column: 13 }, end: { line: 74, column: 28 } },
{ start: { line: 74, column: 32 }, end: { line: 74, column: 49 } }
],
line: 74
},
'6': {
loc: { start: { line: 76, column: 9 }, end: { line: 84, column: 3 } },
type: 'if',
locations: [
{ start: { line: 76, column: 9 }, end: { line: 84, column: 3 } },
{ start: { line: 76, column: 9 }, end: { line: 84, column: 3 } }
],
line: 76
},
'7': {
loc: { start: { line: 78, column: 9 }, end: { line: 84, column: 3 } },
type: 'if',
locations: [
{ start: { line: 78, column: 9 }, end: { line: 84, column: 3 } },
{ start: { line: 78, column: 9 }, end: { line: 84, column: 3 } }
],
line: 78
},
'8': {
loc: { start: { line: 80, column: 9 }, end: { line: 84, column: 3 } },
type: 'if',
locations: [
{ start: { line: 80, column: 9 }, end: { line: 84, column: 3 } },
{ start: { line: 80, column: 9 }, end: { line: 84, column: 3 } }
],
line: 80
},
'9': {
loc: { start: { line: 81, column: 11 }, end: { line: 81, column: 20 } },
type: 'cond-expr',
locations: [
{ start: { line: 81, column: 15 }, end: { line: 81, column: 16 } },
{ start: { line: 81, column: 19 }, end: { line: 81, column: 20 } }
],
line: 81
},
'10': {
loc: { start: { line: 82, column: 9 }, end: { line: 84, column: 3 } },
type: 'if',
locations: [
{ start: { line: 82, column: 9 }, end: { line: 84, column: 3 } },
{ start: { line: 82, column: 9 }, end: { line: 84, column: 3 } }
],
line: 82
},
'11': {
loc: { start: { line: 106, column: 2 }, end: { line: 110, column: 3 } },
type: 'if',
locations: [
{ start: { line: 106, column: 2 }, end: { line: 110, column: 3 } },
{ start: { line: 106, column: 2 }, end: { line: 110, column: 3 } }
],
line: 106
},
'12': {
loc: { start: { line: 134, column: 2 }, end: { line: 142, column: 3 } },
type: 'if',
locations: [
{ start: { line: 134, column: 2 }, end: { line: 142, column: 3 } },
{ start: { line: 134, column: 2 }, end: { line: 142, column: 3 } }
],
line: 134
},
'13': {
loc: { start: { line: 136, column: 9 }, end: { line: 142, column: 3 } },
type: 'if',
locations: [
{ start: { line: 136, column: 9 }, end: { line: 142, column: 3 } },
{ start: { line: 136, column: 9 }, end: { line: 142, column: 3 } }
],
line: 136
},
'14': {
loc: { start: { line: 138, column: 9 }, end: { line: 142, column: 3 } },
type: 'if',
locations: [
{ start: { line: 138, column: 9 }, end: { line: 142, column: 3 } },
{ start: { line: 138, column: 9 }, end: { line: 142, column: 3 } }
],
line: 138
},
'15': {
loc: { start: { line: 140, column: 9 }, end: { line: 142, column: 3 } },
type: 'if',
locations: [
{ start: { line: 140, column: 9 }, end: { line: 142, column: 3 } },
{ start: { line: 140, column: 9 }, end: { line: 142, column: 3 } }
],
line: 140
},
'16': {
loc: { start: { line: 174, column: 2 }, end: { line: 178, column: 3 } },
type: 'if',
locations: [
{ start: { line: 174, column: 2 }, end: { line: 178, column: 3 } },
{ start: { line: 174, column: 2 }, end: { line: 178, column: 3 } }
],
line: 174
},
'17': {
loc: { start: { line: 176, column: 9 }, end: { line: 178, column: 3 } },
type: 'if',
locations: [
{ start: { line: 176, column: 9 }, end: { line: 178, column: 3 } },
{ start: { line: 176, column: 9 }, end: { line: 178, column: 3 } }
],
line: 176
},
'18': {
loc: { start: { line: 206, column: 2 }, end: { line: 212, column: 3 } },
type: 'if',
locations: [
{ start: { line: 206, column: 2 }, end: { line: 212, column: 3 } },
{ start: { line: 206, column: 2 }, end: { line: 212, column: 3 } }
],
line: 206
},
'19': {
loc: { start: { line: 206, column: 6 }, end: { line: 206, column: 40 } },
type: 'binary-expr',
locations: [
{ start: { line: 206, column: 6 }, end: { line: 206, column: 27 } },
{ start: { line: 206, column: 31 }, end: { line: 206, column: 40 } }
],
line: 206
},
'20': {
loc: { start: { line: 208, column: 9 }, end: { line: 212, column: 3 } },
type: 'if',
locations: [
{ start: { line: 208, column: 9 }, end: { line: 212, column: 3 } },
{ start: { line: 208, column: 9 }, end: { line: 212, column: 3 } }
],
line: 208
},
'21': {
loc: { start: { line: 210, column: 9 }, end: { line: 212, column: 3 } },
type: 'if',
locations: [
{ start: { line: 210, column: 9 }, end: { line: 212, column: 3 } },
{ start: { line: 210, column: 9 }, end: { line: 212, column: 3 } }
],
line: 210
},
'22': {
loc: { start: { line: 237, column: 2 }, end: { line: 241, column: 3 } },
type: 'if',
locations: [
{ start: { line: 237, column: 2 }, end: { line: 241, column: 3 } },
{ start: { line: 237, column: 2 }, end: { line: 241, column: 3 } }
],
line: 237
},
'23': {
loc: { start: { line: 237, column: 6 }, end: { line: 237, column: 45 } },
type: 'binary-expr',
locations: [
{ start: { line: 237, column: 6 }, end: { line: 237, column: 27 } },
{ start: { line: 237, column: 31 }, end: { line: 237, column: 45 } }
],
line: 237
},
'24': {
loc: { start: { line: 239, column: 9 }, end: { line: 241, column: 3 } },
type: 'if',
locations: [
{ start: { line: 239, column: 9 }, end: { line: 241, column: 3 } },
{ start: { line: 239, column: 9 }, end: { line: 241, column: 3 } }
],
line: 239
},
'25': {
loc: { start: { line: 271, column: 11 }, end: { line: 271, column: 74 } },
type: 'cond-expr',
locations: [
{ start: { line: 271, column: 54 }, end: { line: 271, column: 64 } },
{ start: { line: 271, column: 68 }, end: { line: 271, column: 74 } }
],
line: 271
},
'26': {
loc: { start: { line: 271, column: 11 }, end: { line: 271, column: 50 } },
type: 'binary-expr',
locations: [
{ start: { line: 271, column: 11 }, end: { line: 271, column: 31 } },
{ start: { line: 271, column: 35 }, end: { line: 271, column: 50 } }
],
line: 271
},
'27': {
loc: { start: { line: 272, column: 2 }, end: { line: 291, column: 3 } },
type: 'if',
locations: [
{ start: { line: 272, column: 2 }, end: { line: 291, column: 3 } },
{ start: { line: 272, column: 2 }, end: { line: 291, column: 3 } }
],
line: 272
},
'28': {
loc: { start: { line: 274, column: 9 }, end: { line: 291, column: 3 } },
type: 'if',
locations: [
{ start: { line: 274, column: 9 }, end: { line: 291, column: 3 } },
{ start: { line: 274, column: 9 }, end: { line: 291, column: 3 } }
],
line: 274
},
'29': {
loc: { start: { line: 274, column: 13 }, end: { line: 274, column: 46 } },
type: 'binary-expr',
locations: [
{ start: { line: 274, column: 13 }, end: { line: 274, column: 27 } },
{ start: { line: 274, column: 31 }, end: { line: 274, column: 46 } }
],
line: 274
},
'30': {
loc: { start: { line: 275, column: 14 }, end: { line: 275, column: 40 } },
type: 'cond-expr',
locations: [
{ start: { line: 275, column: 31 }, end: { line: 275, column: 34 } },
{ start: { line: 275, column: 37 }, end: { line: 275, column: 40 } }
],
line: 275
},
'31': {
loc: { start: { line: 277, column: 9 }, end: { line: 291, column: 3 } },
type: 'if',
locations: [
{ start: { line: 277, column: 9 }, end: { line: 291, column: 3 } },
{ start: { line: 277, column: 9 }, end: { line: 291, column: 3 } }
],
line: 277
},
'32': {
loc: { start: { line: 278, column: 4 }, end: { line: 280, column: 5 } },
type: 'if',
locations: [
{ start: { line: 278, column: 4 }, end: { line: 280, column: 5 } },
{ start: { line: 278, column: 4 }, end: { line: 280, column: 5 } }
],
line: 278
},
'33': {
loc: { start: { line: 287, column: 4 }, end: { line: 289, column: 5 } },
type: 'if',
locations: [
{ start: { line: 287, column: 4 }, end: { line: 289, column: 5 } },
{ start: { line: 287, column: 4 }, end: { line: 289, column: 5 } }
],
line: 287
},
'34': {
loc: { start: { line: 316, column: 2 }, end: { line: 320, column: 3 } },
type: 'if',
locations: [
{ start: { line: 316, column: 2 }, end: { line: 320, column: 3 } },
{ start: { line: 316, column: 2 }, end: { line: 320, column: 3 } }
],
line: 316
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0
},
b: {
'0': [0, 0],
'1': [0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0],
'20': [0, 0],
'21': [0, 0],
'22': [0, 0],
'23': [0, 0],
'24': [0, 0],
'25': [0, 0],
'26': [0, 0],
'27': [0, 0],
'28': [0, 0],
'29': [0, 0],
'30': [0, 0],
'31': [0, 0],
'32': [0, 0],
'33': [0, 0],
'34': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '777277a9af0ba9aba38fef86972153cb2beb119d'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_1qc6au9wz9.s[0]++;
/**
* Converts a string to its floating point representation. The contents of a
* string must resemble a number, or NaN (not a number) will be returned.
* For example, float("1234.56") evaluates to 1234.56, but float("giraffe")
* will return NaN.
*
* When an array of values is passed in, then an array of floats of the same
* length is returned.
*
* @method float
* @param {String} str float string to parse
* @return {Number} floating point representation of string
* @example
*
* let str = '20';
* let diameter = float(str);
* ellipse(width / 2, height / 2, diameter, diameter);
*
*
* print(float('10.31')); // 10.31
* print(float('Infinity')); // Infinity
* print(float('-Infinity')); // -Infinity
*
*
* @alt
* 20 by 20 white ellipse in the center of the canvas
*/
_main.default.prototype.float = function(str) {
cov_1qc6au9wz9.f[0]++;
cov_1qc6au9wz9.s[1]++;
if (str instanceof Array) {
cov_1qc6au9wz9.b[0][0]++;
cov_1qc6au9wz9.s[2]++;
return str.map(parseFloat);
} else {
cov_1qc6au9wz9.b[0][1]++;
}
cov_1qc6au9wz9.s[3]++;
return parseFloat(str);
};
/**
* Converts a boolean, string, or float to its integer representation.
* When an array of values is passed in, then an int array of the same length
* is returned.
*
* @method int
* @param {String|Boolean|Number} n value to parse
* @param {Integer} [radix] the radix to convert to (default: 10)
* @return {Number} integer representation of value
*
* @example
*
* print(int('10')); // 10
* print(int(10.31)); // 10
* print(int(-10)); // -10
* print(int(true)); // 1
* print(int(false)); // 0
* print(int([false, true, '10.3', 9.8])); // [0, 1, 10, 9]
* print(int(Infinity)); // Infinity
* print(int('-Infinity')); // -Infinity
*
*/
/**
* @method int
* @param {Array} ns values to parse
* @return {Number[]} integer representation of values
*/ cov_1qc6au9wz9.s[4]++;
_main.default.prototype.int = function(n) {
var radix =
arguments.length > 1 && arguments[1] !== undefined
? arguments[1]
: (cov_1qc6au9wz9.b[1][0]++, 10);
cov_1qc6au9wz9.f[1]++;
cov_1qc6au9wz9.s[5]++;
if (
(cov_1qc6au9wz9.b[3][0]++, n === Infinity) ||
(cov_1qc6au9wz9.b[3][1]++, n === 'Infinity')
) {
cov_1qc6au9wz9.b[2][0]++;
cov_1qc6au9wz9.s[6]++;
return Infinity;
} else {
cov_1qc6au9wz9.b[2][1]++;
cov_1qc6au9wz9.s[7]++;
if (
(cov_1qc6au9wz9.b[5][0]++, n === -Infinity) ||
(cov_1qc6au9wz9.b[5][1]++, n === '-Infinity')
) {
cov_1qc6au9wz9.b[4][0]++;
cov_1qc6au9wz9.s[8]++;
return -Infinity;
} else {
cov_1qc6au9wz9.b[4][1]++;
cov_1qc6au9wz9.s[9]++;
if (typeof n === 'string') {
cov_1qc6au9wz9.b[6][0]++;
cov_1qc6au9wz9.s[10]++;
return parseInt(n, radix);
} else {
cov_1qc6au9wz9.b[6][1]++;
cov_1qc6au9wz9.s[11]++;
if (typeof n === 'number') {
cov_1qc6au9wz9.b[7][0]++;
cov_1qc6au9wz9.s[12]++;
return n | 0;
} else {
cov_1qc6au9wz9.b[7][1]++;
cov_1qc6au9wz9.s[13]++;
if (typeof n === 'boolean') {
cov_1qc6au9wz9.b[8][0]++;
cov_1qc6au9wz9.s[14]++;
return n
? (cov_1qc6au9wz9.b[9][0]++, 1)
: (cov_1qc6au9wz9.b[9][1]++, 0);
} else {
cov_1qc6au9wz9.b[8][1]++;
cov_1qc6au9wz9.s[15]++;
if (n instanceof Array) {
cov_1qc6au9wz9.b[10][0]++;
cov_1qc6au9wz9.s[16]++;
return n.map(function(n) {
cov_1qc6au9wz9.f[2]++;
cov_1qc6au9wz9.s[17]++;
return _main.default.prototype.int(n, radix);
});
} else {
cov_1qc6au9wz9.b[10][1]++;
}
}
}
}
}
}
};
/**
* Converts a boolean, string or number to its string representation.
* When an array of values is passed in, then an array of strings of the same
* length is returned.
*
* @method str
* @param {String|Boolean|Number|Array} n value to parse
* @return {String} string representation of value
* @example
*
* print(str('10')); // "10"
* print(str(10.31)); // "10.31"
* print(str(-10)); // "-10"
* print(str(true)); // "true"
* print(str(false)); // "false"
* print(str([true, '10.3', 9.8])); // [ "true", "10.3", "9.8" ]
*
*/ cov_1qc6au9wz9.s[18]++;
_main.default.prototype.str = function(n) {
cov_1qc6au9wz9.f[3]++;
cov_1qc6au9wz9.s[19]++;
if (n instanceof Array) {
cov_1qc6au9wz9.b[11][0]++;
cov_1qc6au9wz9.s[20]++;
return n.map(_main.default.prototype.str);
} else {
cov_1qc6au9wz9.b[11][1]++;
cov_1qc6au9wz9.s[21]++;
return String(n);
}
};
/**
* Converts a number or string to its boolean representation.
* For a number, any non-zero value (positive or negative) evaluates to true,
* while zero evaluates to false. For a string, the value "true" evaluates to
* true, while any other value evaluates to false. When an array of number or
* string values is passed in, then a array of booleans of the same length is
* returned.
*
* @method boolean
* @param {String|Boolean|Number|Array} n value to parse
* @return {Boolean} boolean representation of value
* @example
*
* print(boolean(0)); // false
* print(boolean(1)); // true
* print(boolean('true')); // true
* print(boolean('abcd')); // false
* print(boolean([0, 12, 'true'])); // [false, true, true]
*
*/ cov_1qc6au9wz9.s[22]++;
_main.default.prototype.boolean = function(n) {
cov_1qc6au9wz9.f[4]++;
cov_1qc6au9wz9.s[23]++;
if (typeof n === 'number') {
cov_1qc6au9wz9.b[12][0]++;
cov_1qc6au9wz9.s[24]++;
return n !== 0;
} else {
cov_1qc6au9wz9.b[12][1]++;
cov_1qc6au9wz9.s[25]++;
if (typeof n === 'string') {
cov_1qc6au9wz9.b[13][0]++;
cov_1qc6au9wz9.s[26]++;
return n.toLowerCase() === 'true';
} else {
cov_1qc6au9wz9.b[13][1]++;
cov_1qc6au9wz9.s[27]++;
if (typeof n === 'boolean') {
cov_1qc6au9wz9.b[14][0]++;
cov_1qc6au9wz9.s[28]++;
return n;
} else {
cov_1qc6au9wz9.b[14][1]++;
cov_1qc6au9wz9.s[29]++;
if (n instanceof Array) {
cov_1qc6au9wz9.b[15][0]++;
cov_1qc6au9wz9.s[30]++;
return n.map(_main.default.prototype.boolean);
} else {
cov_1qc6au9wz9.b[15][1]++;
}
}
}
}
};
/**
* Converts a number, string representation of a number, or boolean to its byte
* representation. A byte can be only a whole number between -128 and 127, so
* when a value outside of this range is converted, it wraps around to the
* corresponding byte representation. When an array of number, string or boolean
* values is passed in, then an array of bytes the same length is returned.
*
* @method byte
* @param {String|Boolean|Number} n value to parse
* @return {Number} byte representation of value
*
* @example
*
* print(byte(127)); // 127
* print(byte(128)); // -128
* print(byte(23.4)); // 23
* print(byte('23.4')); // 23
* print(byte('hello')); // NaN
* print(byte(true)); // 1
* print(byte([0, 255, '100'])); // [0, -1, 100]
*
*/
/**
* @method byte
* @param {Array} ns values to parse
* @return {Number[]} array of byte representation of values
*/ cov_1qc6au9wz9.s[31]++;
_main.default.prototype.byte = function(n) {
cov_1qc6au9wz9.f[5]++;
var nn = (cov_1qc6au9wz9.s[32]++, _main.default.prototype.int(n, 10));
cov_1qc6au9wz9.s[33]++;
if (typeof nn === 'number') {
cov_1qc6au9wz9.b[16][0]++;
cov_1qc6au9wz9.s[34]++;
return (nn + 128) % 256 - 128;
} else {
cov_1qc6au9wz9.b[16][1]++;
cov_1qc6au9wz9.s[35]++;
if (nn instanceof Array) {
cov_1qc6au9wz9.b[17][0]++;
cov_1qc6au9wz9.s[36]++;
return nn.map(_main.default.prototype.byte);
} else {
cov_1qc6au9wz9.b[17][1]++;
}
}
};
/**
* Converts a number or string to its corresponding single-character
* string representation. If a string parameter is provided, it is first
* parsed as an integer and then translated into a single-character string.
* When an array of number or string values is passed in, then an array of
* single-character strings of the same length is returned.
*
* @method char
* @param {String|Number} n value to parse
* @return {String} string representation of value
*
* @example
*
* print(char(65)); // "A"
* print(char('65')); // "A"
* print(char([65, 66, 67])); // [ "A", "B", "C" ]
* print(join(char([65, 66, 67]), '')); // "ABC"
*
*/
/**
* @method char
* @param {Array} ns values to parse
* @return {String[]} array of string representation of values
*/ cov_1qc6au9wz9.s[37]++;
_main.default.prototype.char = function(n) {
cov_1qc6au9wz9.f[6]++;
cov_1qc6au9wz9.s[38]++;
if (
(cov_1qc6au9wz9.b[19][0]++, typeof n === 'number') &&
(cov_1qc6au9wz9.b[19][1]++, !isNaN(n))
) {
cov_1qc6au9wz9.b[18][0]++;
cov_1qc6au9wz9.s[39]++;
return String.fromCharCode(n);
} else {
cov_1qc6au9wz9.b[18][1]++;
cov_1qc6au9wz9.s[40]++;
if (n instanceof Array) {
cov_1qc6au9wz9.b[20][0]++;
cov_1qc6au9wz9.s[41]++;
return n.map(_main.default.prototype.char);
} else {
cov_1qc6au9wz9.b[20][1]++;
cov_1qc6au9wz9.s[42]++;
if (typeof n === 'string') {
cov_1qc6au9wz9.b[21][0]++;
cov_1qc6au9wz9.s[43]++;
return _main.default.prototype.char(parseInt(n, 10));
} else {
cov_1qc6au9wz9.b[21][1]++;
}
}
}
};
/**
* Converts a single-character string to its corresponding integer
* representation. When an array of single-character string values is passed
* in, then an array of integers of the same length is returned.
*
* @method unchar
* @param {String} n value to parse
* @return {Number} integer representation of value
*
* @example
*
* print(unchar('A')); // 65
* print(unchar(['A', 'B', 'C'])); // [ 65, 66, 67 ]
* print(unchar(split('ABC', ''))); // [ 65, 66, 67 ]
*
*/
/**
* @method unchar
* @param {Array} ns values to parse
* @return {Number[]} integer representation of values
*/ cov_1qc6au9wz9.s[44]++;
_main.default.prototype.unchar = function(n) {
cov_1qc6au9wz9.f[7]++;
cov_1qc6au9wz9.s[45]++;
if (
(cov_1qc6au9wz9.b[23][0]++, typeof n === 'string') &&
(cov_1qc6au9wz9.b[23][1]++, n.length === 1)
) {
cov_1qc6au9wz9.b[22][0]++;
cov_1qc6au9wz9.s[46]++;
return n.charCodeAt(0);
} else {
cov_1qc6au9wz9.b[22][1]++;
cov_1qc6au9wz9.s[47]++;
if (n instanceof Array) {
cov_1qc6au9wz9.b[24][0]++;
cov_1qc6au9wz9.s[48]++;
return n.map(_main.default.prototype.unchar);
} else {
cov_1qc6au9wz9.b[24][1]++;
}
}
};
/**
* Converts a number to a string in its equivalent hexadecimal notation. If a
* second parameter is passed, it is used to set the number of characters to
* generate in the hexadecimal notation. When an array is passed in, an
* array of strings in hexadecimal notation of the same length is returned.
*
* @method hex
* @param {Number} n value to parse
* @param {Number} [digits]
* @return {String} hexadecimal string representation of value
*
* @example
*
* print(hex(255)); // "000000FF"
* print(hex(255, 6)); // "0000FF"
* print(hex([0, 127, 255], 6)); // [ "000000", "00007F", "0000FF" ]
* print(Infinity); // "FFFFFFFF"
* print(-Infinity); // "00000000"
*
*/
/**
* @method hex
* @param {Number[]} ns array of values to parse
* @param {Number} [digits]
* @return {String[]} hexadecimal string representation of values
*/ cov_1qc6au9wz9.s[49]++;
_main.default.prototype.hex = function(n, digits) {
cov_1qc6au9wz9.f[8]++;
cov_1qc6au9wz9.s[50]++;
digits =
(cov_1qc6au9wz9.b[26][0]++, digits === undefined) ||
(cov_1qc6au9wz9.b[26][1]++, digits === null)
? (cov_1qc6au9wz9.b[25][0]++, (digits = 8))
: (cov_1qc6au9wz9.b[25][1]++, digits);
cov_1qc6au9wz9.s[51]++;
if (n instanceof Array) {
cov_1qc6au9wz9.b[27][0]++;
cov_1qc6au9wz9.s[52]++;
return n.map(function(n) {
cov_1qc6au9wz9.f[9]++;
cov_1qc6au9wz9.s[53]++;
return _main.default.prototype.hex(n, digits);
});
} else {
cov_1qc6au9wz9.b[27][1]++;
cov_1qc6au9wz9.s[54]++;
if (
(cov_1qc6au9wz9.b[29][0]++, n === Infinity) ||
(cov_1qc6au9wz9.b[29][1]++, n === -Infinity)
) {
cov_1qc6au9wz9.b[28][0]++;
var c = (cov_1qc6au9wz9.s[55]++,
n === Infinity
? (cov_1qc6au9wz9.b[30][0]++, 'F')
: (cov_1qc6au9wz9.b[30][1]++, '0'));
cov_1qc6au9wz9.s[56]++;
return c.repeat(digits);
} else {
cov_1qc6au9wz9.b[28][1]++;
cov_1qc6au9wz9.s[57]++;
if (typeof n === 'number') {
cov_1qc6au9wz9.b[31][0]++;
cov_1qc6au9wz9.s[58]++;
if (n < 0) {
cov_1qc6au9wz9.b[32][0]++;
cov_1qc6au9wz9.s[59]++;
n = 0xffffffff + n + 1;
} else {
cov_1qc6au9wz9.b[32][1]++;
}
var hex = (cov_1qc6au9wz9.s[60]++,
Number(n)
.toString(16)
.toUpperCase());
cov_1qc6au9wz9.s[61]++;
while (hex.length < digits) {
cov_1qc6au9wz9.s[62]++;
hex = '0'.concat(hex);
}
cov_1qc6au9wz9.s[63]++;
if (hex.length >= digits) {
cov_1qc6au9wz9.b[33][0]++;
cov_1qc6au9wz9.s[64]++;
hex = hex.substring(hex.length - digits, hex.length);
} else {
cov_1qc6au9wz9.b[33][1]++;
}
cov_1qc6au9wz9.s[65]++;
return hex;
} else {
cov_1qc6au9wz9.b[31][1]++;
}
}
}
};
/**
* Converts a string representation of a hexadecimal number to its equivalent
* integer value. When an array of strings in hexadecimal notation is passed
* in, an array of integers of the same length is returned.
*
* @method unhex
* @param {String} n value to parse
* @return {Number} integer representation of hexadecimal value
*
* @example
*
* print(unhex('A')); // 10
* print(unhex('FF')); // 255
* print(unhex(['FF', 'AA', '00'])); // [ 255, 170, 0 ]
*
*/
/**
* @method unhex
* @param {Array} ns values to parse
* @return {Number[]} integer representations of hexadecimal value
*/ cov_1qc6au9wz9.s[66]++;
_main.default.prototype.unhex = function(n) {
cov_1qc6au9wz9.f[10]++;
cov_1qc6au9wz9.s[67]++;
if (n instanceof Array) {
cov_1qc6au9wz9.b[34][0]++;
cov_1qc6au9wz9.s[68]++;
return n.map(_main.default.prototype.unhex);
} else {
cov_1qc6au9wz9.b[34][1]++;
cov_1qc6au9wz9.s[69]++;
return parseInt('0x'.concat(n), 16);
}
};
var _default = _main.default;
exports.default = _default;
},
{ '../core/main': 54 }
],
95: [
function(_dereq_, module, exports) {
'use strict';
var cov_1xdbyxohs1 = (function() {
var path =
'/Users/lmccart/Documents/p5/p5.js/src/utilities/string_functions.js';
var hash = 'e961894982c787059df156cb1fa5b5cfc8efb011';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/utilities/string_functions.js',
statementMap: {
'0': { start: { line: 38, column: 0 }, end: { line: 41, column: 2 } },
'1': { start: { line: 39, column: 2 }, end: { line: 39, column: 44 } },
'2': { start: { line: 40, column: 2 }, end: { line: 40, column: 30 } },
'3': { start: { line: 78, column: 0 }, end: { line: 81, column: 2 } },
'4': { start: { line: 79, column: 2 }, end: { line: 79, column: 45 } },
'5': { start: { line: 80, column: 2 }, end: { line: 80, column: 24 } },
'6': { start: { line: 115, column: 0 }, end: { line: 128, column: 2 } },
'7': { start: { line: 116, column: 2 }, end: { line: 116, column: 48 } },
'8': { start: { line: 117, column: 13 }, end: { line: 117, column: 33 } },
'9': { start: { line: 118, column: 14 }, end: { line: 118, column: 26 } },
'10': { start: { line: 119, column: 18 }, end: { line: 119, column: 20 } },
'11': { start: { line: 120, column: 2 }, end: { line: 126, column: 3 } },
'12': { start: { line: 121, column: 4 }, end: { line: 121, column: 24 } },
'13': { start: { line: 125, column: 4 }, end: { line: 125, column: 25 } },
'14': { start: { line: 127, column: 2 }, end: { line: 127, column: 17 } },
'15': { start: { line: 185, column: 0 }, end: { line: 203, column: 2 } },
'16': { start: { line: 186, column: 2 }, end: { line: 186, column: 42 } },
'17': { start: { line: 187, column: 2 }, end: { line: 202, column: 3 } },
'18': { start: { line: 188, column: 4 }, end: { line: 188, column: 47 } },
'19': { start: { line: 188, column: 25 }, end: { line: 188, column: 45 } },
'20': { start: { line: 190, column: 24 }, end: { line: 190, column: 60 } },
'21': { start: { line: 191, column: 4 }, end: { line: 201, column: 5 } },
'22': { start: { line: 192, column: 6 }, end: { line: 198, column: 7 } },
'23': { start: { line: 193, column: 8 }, end: { line: 193, column: 50 } },
'24': { start: { line: 194, column: 13 }, end: { line: 198, column: 7 } },
'25': { start: { line: 195, column: 8 }, end: { line: 195, column: 41 } },
'26': { start: { line: 197, column: 8 }, end: { line: 197, column: 32 } },
'27': { start: { line: 200, column: 6 }, end: { line: 200, column: 37 } },
'28': { start: { line: 206, column: 14 }, end: { line: 206, column: 21 } },
'29': { start: { line: 207, column: 12 }, end: { line: 207, column: 62 } },
'30': { start: { line: 208, column: 21 }, end: { line: 208, column: 35 } },
'31': { start: { line: 209, column: 18 }, end: { line: 209, column: 68 } },
'32': { start: { line: 210, column: 16 }, end: { line: 210, column: 68 } },
'33': { start: { line: 211, column: 12 }, end: { line: 211, column: 26 } },
'34': { start: { line: 212, column: 2 }, end: { line: 236, column: 3 } },
'35': { start: { line: 213, column: 18 }, end: { line: 213, column: 20 } },
'36': { start: { line: 214, column: 4 }, end: { line: 216, column: 5 } },
'37': { start: { line: 215, column: 6 }, end: { line: 215, column: 20 } },
'38': { start: { line: 217, column: 4 }, end: { line: 219, column: 5 } },
'39': { start: { line: 218, column: 6 }, end: { line: 218, column: 44 } },
'40': { start: { line: 220, column: 4 }, end: { line: 222, column: 5 } },
'41': { start: { line: 220, column: 17 }, end: { line: 220, column: 18 } },
'42': { start: { line: 221, column: 6 }, end: { line: 221, column: 17 } },
'43': { start: { line: 223, column: 4 }, end: { line: 223, column: 19 } },
'44': { start: { line: 224, column: 4 }, end: { line: 224, column: 19 } },
'45': { start: { line: 225, column: 4 }, end: { line: 225, column: 19 } },
'46': { start: { line: 226, column: 4 }, end: { line: 228, column: 5 } },
'47': { start: { line: 226, column: 17 }, end: { line: 226, column: 18 } },
'48': { start: { line: 227, column: 6 }, end: { line: 227, column: 17 } },
'49': { start: { line: 229, column: 4 }, end: { line: 229, column: 15 } },
'50': { start: { line: 231, column: 4 }, end: { line: 233, column: 5 } },
'51': { start: { line: 231, column: 17 }, end: { line: 231, column: 18 } },
'52': { start: { line: 232, column: 6 }, end: { line: 232, column: 17 } },
'53': { start: { line: 234, column: 4 }, end: { line: 234, column: 13 } },
'54': { start: { line: 235, column: 4 }, end: { line: 235, column: 15 } },
'55': { start: { line: 283, column: 0 }, end: { line: 290, column: 2 } },
'56': { start: { line: 284, column: 2 }, end: { line: 284, column: 43 } },
'57': { start: { line: 285, column: 2 }, end: { line: 289, column: 3 } },
'58': { start: { line: 286, column: 4 }, end: { line: 286, column: 41 } },
'59': { start: { line: 286, column: 24 }, end: { line: 286, column: 39 } },
'60': { start: { line: 288, column: 4 }, end: { line: 288, column: 29 } },
'61': { start: { line: 292, column: 2 }, end: { line: 292, column: 23 } },
'62': { start: { line: 293, column: 14 }, end: { line: 293, column: 30 } },
'63': { start: { line: 294, column: 12 }, end: { line: 294, column: 48 } },
'64': { start: { line: 295, column: 10 }, end: { line: 295, column: 50 } },
'65': { start: { line: 296, column: 2 }, end: { line: 296, column: 57 } },
'66': { start: { line: 297, column: 2 }, end: { line: 309, column: 3 } },
'67': { start: { line: 298, column: 4 }, end: { line: 298, column: 13 } },
'68': { start: { line: 299, column: 9 }, end: { line: 309, column: 3 } },
'69': { start: { line: 300, column: 4 }, end: { line: 308, column: 5 } },
'70': { start: { line: 301, column: 6 }, end: { line: 301, column: 35 } },
'71': { start: { line: 302, column: 18 }, end: { line: 302, column: 40 } },
'72': { start: { line: 303, column: 6 }, end: { line: 305, column: 7 } },
'73': { start: { line: 303, column: 19 }, end: { line: 303, column: 20 } },
'74': { start: { line: 304, column: 8 }, end: { line: 304, column: 19 } },
'75': { start: { line: 307, column: 6 }, end: { line: 307, column: 40 } },
'76': { start: { line: 310, column: 2 }, end: { line: 310, column: 17 } },
'77': { start: { line: 361, column: 0 }, end: { line: 369, column: 2 } },
'78': { start: { line: 362, column: 2 }, end: { line: 362, column: 38 } },
'79': { start: { line: 363, column: 16 }, end: { line: 363, column: 49 } },
'80': { start: { line: 364, column: 2 }, end: { line: 368, column: 3 } },
'81': { start: { line: 365, column: 4 }, end: { line: 365, column: 29 } },
'82': { start: { line: 367, column: 4 }, end: { line: 367, column: 25 } },
'83': { start: { line: 372, column: 2 }, end: { line: 372, column: 69 } },
'84': { start: { line: 439, column: 0 }, end: { line: 447, column: 2 } },
'85': { start: { line: 440, column: 2 }, end: { line: 440, column: 38 } },
'86': { start: { line: 441, column: 16 }, end: { line: 441, column: 49 } },
'87': { start: { line: 442, column: 2 }, end: { line: 446, column: 3 } },
'88': { start: { line: 443, column: 4 }, end: { line: 443, column: 29 } },
'89': { start: { line: 445, column: 4 }, end: { line: 445, column: 25 } },
'90': { start: { line: 450, column: 2 }, end: { line: 450, column: 70 } },
'91': { start: { line: 481, column: 0 }, end: { line: 484, column: 2 } },
'92': { start: { line: 482, column: 2 }, end: { line: 482, column: 45 } },
'93': { start: { line: 483, column: 2 }, end: { line: 483, column: 26 } },
'94': { start: { line: 512, column: 0 }, end: { line: 537, column: 2 } },
'95': { start: { line: 513, column: 2 }, end: { line: 513, column: 51 } },
'96': { start: { line: 515, column: 2 }, end: { line: 535, column: 3 } },
'97': { start: { line: 516, column: 14 }, end: { line: 516, column: 20 } },
'98': { start: { line: 517, column: 16 }, end: { line: 517, column: 31 } },
'99': { start: { line: 518, column: 14 }, end: { line: 518, column: 29 } },
'100': { start: { line: 519, column: 4 }, end: { line: 532, column: 5 } },
'101': { start: { line: 520, column: 6 }, end: { line: 520, column: 63 } },
'102': { start: { line: 521, column: 6 }, end: { line: 521, column: 28 } },
'103': { start: { line: 522, column: 6 }, end: { line: 522, column: 63 } },
'104': { start: { line: 523, column: 6 }, end: { line: 523, column: 44 } },
'105': { start: { line: 524, column: 11 }, end: { line: 532, column: 5 } },
'106': { start: { line: 525, column: 6 }, end: { line: 525, column: 63 } },
'107': { start: { line: 526, column: 6 }, end: { line: 526, column: 41 } },
'108': { start: { line: 527, column: 11 }, end: { line: 532, column: 5 } },
'109': { start: { line: 528, column: 6 }, end: { line: 528, column: 63 } },
'110': { start: { line: 529, column: 6 }, end: { line: 529, column: 41 } },
'111': { start: { line: 531, column: 6 }, end: { line: 531, column: 38 } },
'112': { start: { line: 534, column: 4 }, end: { line: 534, column: 14 } },
'113': { start: { line: 536, column: 2 }, end: { line: 536, column: 39 } },
'114': { start: { line: 536, column: 36 }, end: { line: 536, column: 37 } },
'115': { start: { line: 564, column: 0 }, end: { line: 571, column: 2 } },
'116': { start: { line: 565, column: 2 }, end: { line: 565, column: 44 } },
'117': { start: { line: 566, column: 2 }, end: { line: 570, column: 3 } },
'118': { start: { line: 567, column: 4 }, end: { line: 567, column: 30 } },
'119': { start: { line: 569, column: 4 }, end: { line: 569, column: 22 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 38, column: 20 }, end: { line: 38, column: 21 } },
loc: { start: { line: 38, column: 46 }, end: { line: 41, column: 1 } },
line: 38
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 78, column: 21 }, end: { line: 78, column: 22 } },
loc: { start: { line: 78, column: 40 }, end: { line: 81, column: 1 } },
line: 78
},
'2': {
name: '(anonymous_2)',
decl: {
start: { line: 115, column: 24 },
end: { line: 115, column: 25 }
},
loc: { start: { line: 115, column: 43 }, end: { line: 128, column: 1 } },
line: 115
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 185, column: 18 },
end: { line: 185, column: 19 }
},
loc: { start: { line: 185, column: 46 }, end: { line: 203, column: 1 } },
line: 185
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 188, column: 20 },
end: { line: 188, column: 21 }
},
loc: { start: { line: 188, column: 25 }, end: { line: 188, column: 45 } },
line: 188
},
'5': {
name: 'doNf',
decl: { start: { line: 205, column: 9 }, end: { line: 205, column: 13 } },
loc: { start: { line: 205, column: 32 }, end: { line: 237, column: 1 } },
line: 205
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 283, column: 19 },
end: { line: 283, column: 20 }
},
loc: { start: { line: 283, column: 40 }, end: { line: 290, column: 1 } },
line: 283
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 286, column: 19 },
end: { line: 286, column: 20 }
},
loc: { start: { line: 286, column: 24 }, end: { line: 286, column: 39 } },
line: 286
},
'8': {
name: 'doNfc',
decl: { start: { line: 291, column: 9 }, end: { line: 291, column: 14 } },
loc: { start: { line: 291, column: 27 }, end: { line: 311, column: 1 } },
line: 291
},
'9': {
name: '(anonymous_9)',
decl: {
start: { line: 361, column: 19 },
end: { line: 361, column: 20 }
},
loc: { start: { line: 361, column: 37 }, end: { line: 369, column: 1 } },
line: 361
},
'10': {
name: 'addNfp',
decl: { start: { line: 371, column: 9 }, end: { line: 371, column: 15 } },
loc: { start: { line: 371, column: 21 }, end: { line: 373, column: 1 } },
line: 371
},
'11': {
name: '(anonymous_11)',
decl: {
start: { line: 439, column: 19 },
end: { line: 439, column: 20 }
},
loc: { start: { line: 439, column: 37 }, end: { line: 447, column: 1 } },
line: 439
},
'12': {
name: 'addNfs',
decl: { start: { line: 449, column: 9 }, end: { line: 449, column: 15 } },
loc: { start: { line: 449, column: 21 }, end: { line: 451, column: 1 } },
line: 449
},
'13': {
name: '(anonymous_13)',
decl: {
start: { line: 481, column: 21 },
end: { line: 481, column: 22 }
},
loc: { start: { line: 481, column: 42 }, end: { line: 484, column: 1 } },
line: 481
},
'14': {
name: '(anonymous_14)',
decl: {
start: { line: 512, column: 27 },
end: { line: 512, column: 28 }
},
loc: { start: { line: 512, column: 51 }, end: { line: 537, column: 1 } },
line: 512
},
'15': {
name: '(anonymous_15)',
decl: {
start: { line: 536, column: 31 },
end: { line: 536, column: 32 }
},
loc: { start: { line: 536, column: 36 }, end: { line: 536, column: 37 } },
line: 536
},
'16': {
name: '(anonymous_16)',
decl: {
start: { line: 564, column: 20 },
end: { line: 564, column: 21 }
},
loc: { start: { line: 564, column: 34 }, end: { line: 571, column: 1 } },
line: 564
}
},
branchMap: {
'0': {
loc: { start: { line: 187, column: 2 }, end: { line: 202, column: 3 } },
type: 'if',
locations: [
{ start: { line: 187, column: 2 }, end: { line: 202, column: 3 } },
{ start: { line: 187, column: 2 }, end: { line: 202, column: 3 } }
],
line: 187
},
'1': {
loc: { start: { line: 191, column: 4 }, end: { line: 201, column: 5 } },
type: 'if',
locations: [
{ start: { line: 191, column: 4 }, end: { line: 201, column: 5 } },
{ start: { line: 191, column: 4 }, end: { line: 201, column: 5 } }
],
line: 191
},
'2': {
loc: { start: { line: 192, column: 6 }, end: { line: 198, column: 7 } },
type: 'if',
locations: [
{ start: { line: 192, column: 6 }, end: { line: 198, column: 7 } },
{ start: { line: 192, column: 6 }, end: { line: 198, column: 7 } }
],
line: 192
},
'3': {
loc: { start: { line: 194, column: 13 }, end: { line: 198, column: 7 } },
type: 'if',
locations: [
{ start: { line: 194, column: 13 }, end: { line: 198, column: 7 } },
{ start: { line: 194, column: 13 }, end: { line: 198, column: 7 } }
],
line: 194
},
'4': {
loc: { start: { line: 207, column: 12 }, end: { line: 207, column: 62 } },
type: 'cond-expr',
locations: [
{ start: { line: 207, column: 18 }, end: { line: 207, column: 45 } },
{ start: { line: 207, column: 48 }, end: { line: 207, column: 62 } }
],
line: 207
},
'5': {
loc: { start: { line: 209, column: 18 }, end: { line: 209, column: 68 } },
type: 'cond-expr',
locations: [
{ start: { line: 209, column: 38 }, end: { line: 209, column: 64 } },
{ start: { line: 209, column: 67 }, end: { line: 209, column: 68 } }
],
line: 209
},
'6': {
loc: { start: { line: 210, column: 16 }, end: { line: 210, column: 68 } },
type: 'cond-expr',
locations: [
{ start: { line: 210, column: 36 }, end: { line: 210, column: 63 } },
{ start: { line: 210, column: 66 }, end: { line: 210, column: 68 } }
],
line: 210
},
'7': {
loc: { start: { line: 211, column: 12 }, end: { line: 211, column: 26 } },
type: 'cond-expr',
locations: [
{ start: { line: 211, column: 18 }, end: { line: 211, column: 21 } },
{ start: { line: 211, column: 24 }, end: { line: 211, column: 26 } }
],
line: 211
},
'8': {
loc: { start: { line: 212, column: 2 }, end: { line: 236, column: 3 } },
type: 'if',
locations: [
{ start: { line: 212, column: 2 }, end: { line: 236, column: 3 } },
{ start: { line: 212, column: 2 }, end: { line: 236, column: 3 } }
],
line: 212
},
'9': {
loc: { start: { line: 214, column: 4 }, end: { line: 216, column: 5 } },
type: 'if',
locations: [
{ start: { line: 214, column: 4 }, end: { line: 216, column: 5 } },
{ start: { line: 214, column: 4 }, end: { line: 216, column: 5 } }
],
line: 214
},
'10': {
loc: { start: { line: 214, column: 8 }, end: { line: 214, column: 55 } },
type: 'binary-expr',
locations: [
{ start: { line: 214, column: 8 }, end: { line: 214, column: 25 } },
{ start: { line: 214, column: 29 }, end: { line: 214, column: 55 } }
],
line: 214
},
'11': {
loc: { start: { line: 217, column: 4 }, end: { line: 219, column: 5 } },
type: 'if',
locations: [
{ start: { line: 217, column: 4 }, end: { line: 219, column: 5 } },
{ start: { line: 217, column: 4 }, end: { line: 219, column: 5 } }
],
line: 217
},
'12': {
loc: { start: { line: 285, column: 2 }, end: { line: 289, column: 3 } },
type: 'if',
locations: [
{ start: { line: 285, column: 2 }, end: { line: 289, column: 3 } },
{ start: { line: 285, column: 2 }, end: { line: 289, column: 3 } }
],
line: 285
},
'13': {
loc: { start: { line: 294, column: 12 }, end: { line: 294, column: 48 } },
type: 'cond-expr',
locations: [
{ start: { line: 294, column: 25 }, end: { line: 294, column: 43 } },
{ start: { line: 294, column: 46 }, end: { line: 294, column: 48 } }
],
line: 294
},
'14': {
loc: { start: { line: 295, column: 10 }, end: { line: 295, column: 50 } },
type: 'cond-expr',
locations: [
{ start: { line: 295, column: 23 }, end: { line: 295, column: 44 } },
{ start: { line: 295, column: 47 }, end: { line: 295, column: 50 } }
],
line: 295
},
'15': {
loc: { start: { line: 297, column: 2 }, end: { line: 309, column: 3 } },
type: 'if',
locations: [
{ start: { line: 297, column: 2 }, end: { line: 309, column: 3 } },
{ start: { line: 297, column: 2 }, end: { line: 309, column: 3 } }
],
line: 297
},
'16': {
loc: { start: { line: 299, column: 9 }, end: { line: 309, column: 3 } },
type: 'if',
locations: [
{ start: { line: 299, column: 9 }, end: { line: 309, column: 3 } },
{ start: { line: 299, column: 9 }, end: { line: 309, column: 3 } }
],
line: 299
},
'17': {
loc: { start: { line: 300, column: 4 }, end: { line: 308, column: 5 } },
type: 'if',
locations: [
{ start: { line: 300, column: 4 }, end: { line: 308, column: 5 } },
{ start: { line: 300, column: 4 }, end: { line: 308, column: 5 } }
],
line: 300
},
'18': {
loc: { start: { line: 301, column: 13 }, end: { line: 301, column: 34 } },
type: 'cond-expr',
locations: [
{ start: { line: 301, column: 26 }, end: { line: 301, column: 29 } },
{ start: { line: 301, column: 32 }, end: { line: 301, column: 34 } }
],
line: 301
},
'19': {
loc: { start: { line: 364, column: 2 }, end: { line: 368, column: 3 } },
type: 'if',
locations: [
{ start: { line: 364, column: 2 }, end: { line: 368, column: 3 } },
{ start: { line: 364, column: 2 }, end: { line: 368, column: 3 } }
],
line: 364
},
'20': {
loc: { start: { line: 372, column: 9 }, end: { line: 372, column: 68 } },
type: 'cond-expr',
locations: [
{ start: { line: 372, column: 31 }, end: { line: 372, column: 51 } },
{ start: { line: 372, column: 54 }, end: { line: 372, column: 68 } }
],
line: 372
},
'21': {
loc: { start: { line: 442, column: 2 }, end: { line: 446, column: 3 } },
type: 'if',
locations: [
{ start: { line: 442, column: 2 }, end: { line: 446, column: 3 } },
{ start: { line: 442, column: 2 }, end: { line: 446, column: 3 } }
],
line: 442
},
'22': {
loc: { start: { line: 450, column: 9 }, end: { line: 450, column: 69 } },
type: 'cond-expr',
locations: [
{ start: { line: 450, column: 32 }, end: { line: 450, column: 52 } },
{ start: { line: 450, column: 55 }, end: { line: 450, column: 69 } }
],
line: 450
},
'23': {
loc: { start: { line: 515, column: 2 }, end: { line: 535, column: 3 } },
type: 'if',
locations: [
{ start: { line: 515, column: 2 }, end: { line: 535, column: 3 } },
{ start: { line: 515, column: 2 }, end: { line: 535, column: 3 } }
],
line: 515
},
'24': {
loc: { start: { line: 519, column: 4 }, end: { line: 532, column: 5 } },
type: 'if',
locations: [
{ start: { line: 519, column: 4 }, end: { line: 532, column: 5 } },
{ start: { line: 519, column: 4 }, end: { line: 532, column: 5 } }
],
line: 519
},
'25': {
loc: { start: { line: 519, column: 8 }, end: { line: 519, column: 18 } },
type: 'binary-expr',
locations: [
{ start: { line: 519, column: 8 }, end: { line: 519, column: 11 } },
{ start: { line: 519, column: 15 }, end: { line: 519, column: 18 } }
],
line: 519
},
'26': {
loc: { start: { line: 524, column: 11 }, end: { line: 532, column: 5 } },
type: 'if',
locations: [
{ start: { line: 524, column: 11 }, end: { line: 532, column: 5 } },
{ start: { line: 524, column: 11 }, end: { line: 532, column: 5 } }
],
line: 524
},
'27': {
loc: { start: { line: 527, column: 11 }, end: { line: 532, column: 5 } },
type: 'if',
locations: [
{ start: { line: 527, column: 11 }, end: { line: 532, column: 5 } },
{ start: { line: 527, column: 11 }, end: { line: 532, column: 5 } }
],
line: 527
},
'28': {
loc: { start: { line: 566, column: 2 }, end: { line: 570, column: 3 } },
type: 'if',
locations: [
{ start: { line: 566, column: 2 }, end: { line: 570, column: 3 } },
{ start: { line: 566, column: 2 }, end: { line: 570, column: 3 } }
],
line: 566
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0],
'20': [0, 0],
'21': [0, 0],
'22': [0, 0],
'23': [0, 0],
'24': [0, 0],
'25': [0, 0],
'26': [0, 0],
'27': [0, 0],
'28': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: 'e961894982c787059df156cb1fa5b5cfc8efb011'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
_dereq_('../core/friendly_errors/validate_params');
_dereq_('../core/friendly_errors/file_errors');
_dereq_('../core/friendly_errors/fes_core');
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_1xdbyxohs1.s[0]++;
//return p5; //LM is this a mistake?
/**
* Combines an array of Strings into one String, each separated by the
* character(s) used for the separator parameter. To join arrays of ints or
* floats, it's necessary to first convert them to Strings using nf() or
* nfs().
*
* @method join
* @param {Array} list array of Strings to be joined
* @param {String} separator String to be placed between each item
* @return {String} joined String
* @example
*
*
* let array = ['Hello', 'world!'];
* let separator = ' ';
* let message = join(array, separator);
* text(message, 5, 50);
*
*
*
* @alt
* "hello world!" displayed middle left of canvas.
*/
_main.default.prototype.join = function(list, separator) {
cov_1xdbyxohs1.f[0]++;
cov_1xdbyxohs1.s[1]++;
_main.default._validateParameters('join', arguments);
cov_1xdbyxohs1.s[2]++;
return list.join(separator);
};
/**
* This function is used to apply a regular expression to a piece of text,
* and return matching groups (elements found inside parentheses) as a
* String array. If there are no matches, a null value will be returned.
* If no groups are specified in the regular expression, but the sequence
* matches, an array of length 1 (with the matched text as the first element
* of the array) will be returned.
*
* To use the function, first check to see if the result is null. If the
* result is null, then the sequence did not match at all. If the sequence
* did match, an array is returned.
*
* If there are groups (specified by sets of parentheses) in the regular
* expression, then the contents of each will be returned in the array.
* Element [0] of a regular expression match returns the entire matching
* string, and the match groups start at element [1] (the first group is [1],
* the second [2], and so on).
*
* @method match
* @param {String} str the String to be searched
* @param {String} regexp the regexp to be used for matching
* @return {String[]} Array of Strings found
* @example
*
*
* let string = 'Hello p5js*!';
* let regexp = 'p5js\\*';
* let m = match(string, regexp);
* text(m, 5, 50);
*
*
*
* @alt
* "p5js*" displayed middle left of canvas.
*/ cov_1xdbyxohs1.s[3]++;
_main.default.prototype.match = function(str, reg) {
cov_1xdbyxohs1.f[1]++;
cov_1xdbyxohs1.s[4]++;
_main.default._validateParameters('match', arguments);
cov_1xdbyxohs1.s[5]++;
return str.match(reg);
};
/**
* This function is used to apply a regular expression to a piece of text,
* and return a list of matching groups (elements found inside parentheses)
* as a two-dimensional String array. If there are no matches, a null value
* will be returned. If no groups are specified in the regular expression,
* but the sequence matches, a two dimensional array is still returned, but
* the second dimension is only of length one.
*
* To use the function, first check to see if the result is null. If the
* result is null, then the sequence did not match at all. If the sequence
* did match, a 2D array is returned.
*
* If there are groups (specified by sets of parentheses) in the regular
* expression, then the contents of each will be returned in the array.
* Assuming a loop with counter variable i, element [i][0] of a regular
* expression match returns the entire matching string, and the match groups
* start at element [i][1] (the first group is [i][1], the second [i][2],
* and so on).
*
* @method matchAll
* @param {String} str the String to be searched
* @param {String} regexp the regexp to be used for matching
* @return {String[]} 2d Array of Strings found
* @example
*
*
* let string = 'Hello p5js*! Hello world!';
* let regexp = 'Hello';
* matchAll(string, regexp);
*
*
*/ cov_1xdbyxohs1.s[6]++;
_main.default.prototype.matchAll = function(str, reg) {
cov_1xdbyxohs1.f[2]++;
cov_1xdbyxohs1.s[7]++;
_main.default._validateParameters('matchAll', arguments);
var re = (cov_1xdbyxohs1.s[8]++, new RegExp(reg, 'g'));
var match = (cov_1xdbyxohs1.s[9]++, re.exec(str));
var matches = (cov_1xdbyxohs1.s[10]++, []);
cov_1xdbyxohs1.s[11]++;
while (match !== null) {
cov_1xdbyxohs1.s[12]++;
matches.push(match);
// matched text: match[0]
// match start: match.index
// capturing group n: match[n]
cov_1xdbyxohs1.s[13]++;
match = re.exec(str);
}
cov_1xdbyxohs1.s[14]++;
return matches;
};
/**
* Utility function for formatting numbers into strings. There are two
* versions: one for formatting floats, and one for formatting ints.
* The values for the digits, left, and right parameters should always
* be positive integers.
* (NOTE): Be cautious when using left and right parameters as it prepends numbers of 0's if the parameter
* if greater than the current length of the number.
* For example if number is 123.2 and left parameter passed is 4 which is greater than length of 123
* (integer part) i.e 3 than result will be 0123.2. Same case for right parameter i.e. if right is 3 than
* the result will be 123.200.
*
* @method nf
* @param {Number|String} num the Number to format
* @param {Integer|String} [left] number of digits to the left of the
* decimal point
* @param {Integer|String} [right] number of digits to the right of the
* decimal point
* @return {String} formatted String
*
* @example
*
*
* let myFont;
* function preload() {
* myFont = loadFont('assets/fonts/inconsolata.ttf');
* }
* function setup() {
* background(200);
* let num1 = 321;
* let num2 = -1321;
*
* noStroke();
* fill(0);
* textFont(myFont);
* textSize(22);
*
* text(nf(num1, 4, 2), 10, 30);
* text(nf(num2, 4, 2), 10, 80);
* // Draw dividing line
* stroke(120);
* line(0, 50, width, 50);
* }
*
*
*
* @alt
* "0321.00" middle top, -1321.00" middle bottom canvas
*/
/**
* @method nf
* @param {Array} nums the Numbers to format
* @param {Integer|String} [left]
* @param {Integer|String} [right]
* @return {String[]} formatted Strings
*/ cov_1xdbyxohs1.s[15]++;
_main.default.prototype.nf = function(nums, left, right) {
cov_1xdbyxohs1.f[3]++;
cov_1xdbyxohs1.s[16]++;
_main.default._validateParameters('nf', arguments);
cov_1xdbyxohs1.s[17]++;
if (nums instanceof Array) {
cov_1xdbyxohs1.b[0][0]++;
cov_1xdbyxohs1.s[18]++;
return nums.map(function(x) {
cov_1xdbyxohs1.f[4]++;
cov_1xdbyxohs1.s[19]++;
return doNf(x, left, right);
});
} else {
cov_1xdbyxohs1.b[0][1]++;
var typeOfFirst = (cov_1xdbyxohs1.s[20]++,
Object.prototype.toString.call(nums));
cov_1xdbyxohs1.s[21]++;
if (typeOfFirst === '[object Arguments]') {
cov_1xdbyxohs1.b[1][0]++;
cov_1xdbyxohs1.s[22]++;
if (nums.length === 3) {
cov_1xdbyxohs1.b[2][0]++;
cov_1xdbyxohs1.s[23]++;
return this.nf(nums[0], nums[1], nums[2]);
} else {
cov_1xdbyxohs1.b[2][1]++;
cov_1xdbyxohs1.s[24]++;
if (nums.length === 2) {
cov_1xdbyxohs1.b[3][0]++;
cov_1xdbyxohs1.s[25]++;
return this.nf(nums[0], nums[1]);
} else {
cov_1xdbyxohs1.b[3][1]++;
cov_1xdbyxohs1.s[26]++;
return this.nf(nums[0]);
}
}
} else {
cov_1xdbyxohs1.b[1][1]++;
cov_1xdbyxohs1.s[27]++;
return doNf(nums, left, right);
}
}
};
function doNf(num, left, right) {
cov_1xdbyxohs1.f[5]++;
var neg = (cov_1xdbyxohs1.s[28]++, num < 0);
var n = (cov_1xdbyxohs1.s[29]++,
neg
? (cov_1xdbyxohs1.b[4][0]++, num.toString().substring(1))
: (cov_1xdbyxohs1.b[4][1]++, num.toString()));
var decimalInd = (cov_1xdbyxohs1.s[30]++, n.indexOf('.'));
var intPart = (cov_1xdbyxohs1.s[31]++,
decimalInd !== -1
? (cov_1xdbyxohs1.b[5][0]++, n.substring(0, decimalInd))
: (cov_1xdbyxohs1.b[5][1]++, n));
var decPart = (cov_1xdbyxohs1.s[32]++,
decimalInd !== -1
? (cov_1xdbyxohs1.b[6][0]++, n.substring(decimalInd + 1))
: (cov_1xdbyxohs1.b[6][1]++, ''));
var str = (cov_1xdbyxohs1.s[33]++,
neg ? (cov_1xdbyxohs1.b[7][0]++, '-') : (cov_1xdbyxohs1.b[7][1]++, ''));
cov_1xdbyxohs1.s[34]++;
if (typeof right !== 'undefined') {
cov_1xdbyxohs1.b[8][0]++;
var decimal = (cov_1xdbyxohs1.s[35]++, '');
cov_1xdbyxohs1.s[36]++;
if (
(cov_1xdbyxohs1.b[10][0]++, decimalInd !== -1) ||
(cov_1xdbyxohs1.b[10][1]++, right - decPart.length > 0)
) {
cov_1xdbyxohs1.b[9][0]++;
cov_1xdbyxohs1.s[37]++;
decimal = '.';
} else {
cov_1xdbyxohs1.b[9][1]++;
}
cov_1xdbyxohs1.s[38]++;
if (decPart.length > right) {
cov_1xdbyxohs1.b[11][0]++;
cov_1xdbyxohs1.s[39]++;
decPart = decPart.substring(0, right);
} else {
cov_1xdbyxohs1.b[11][1]++;
}
cov_1xdbyxohs1.s[40]++;
for (var i = (cov_1xdbyxohs1.s[41]++, 0); i < left - intPart.length; i++) {
cov_1xdbyxohs1.s[42]++;
str += '0';
}
cov_1xdbyxohs1.s[43]++;
str += intPart;
cov_1xdbyxohs1.s[44]++;
str += decimal;
cov_1xdbyxohs1.s[45]++;
str += decPart;
cov_1xdbyxohs1.s[46]++;
for (var j = (cov_1xdbyxohs1.s[47]++, 0); j < right - decPart.length; j++) {
cov_1xdbyxohs1.s[48]++;
str += '0';
}
cov_1xdbyxohs1.s[49]++;
return str;
} else {
cov_1xdbyxohs1.b[8][1]++;
cov_1xdbyxohs1.s[50]++;
for (
var k = (cov_1xdbyxohs1.s[51]++, 0);
k < Math.max(left - intPart.length, 0);
k++
) {
cov_1xdbyxohs1.s[52]++;
str += '0';
}
cov_1xdbyxohs1.s[53]++;
str += n;
cov_1xdbyxohs1.s[54]++;
return str;
}
}
/**
* Utility function for formatting numbers into strings and placing
* appropriate commas to mark units of 1000. There are two versions: one
* for formatting ints, and one for formatting an array of ints. The value
* for the right parameter should always be a positive integer.
*
* @method nfc
* @param {Number|String} num the Number to format
* @param {Integer|String} [right] number of digits to the right of the
* decimal point
* @return {String} formatted String
*
* @example
*
*
* function setup() {
* background(200);
* let num = 11253106.115;
* let numArr = [1, 1, 2];
*
* noStroke();
* fill(0);
* textSize(12);
*
* // Draw formatted numbers
* text(nfc(num, 4), 10, 30);
* text(nfc(numArr, 2), 10, 80);
*
* // Draw dividing line
* stroke(120);
* line(0, 50, width, 50);
* }
*
*
*
* @alt
* "11,253,106.115" top middle and "1.00,1.00,2.00" displayed bottom mid
*/
/**
* @method nfc
* @param {Array} nums the Numbers to format
* @param {Integer|String} [right]
* @return {String[]} formatted Strings
*/ cov_1xdbyxohs1.s[55]++;
_main.default.prototype.nfc = function(num, right) {
cov_1xdbyxohs1.f[6]++;
cov_1xdbyxohs1.s[56]++;
_main.default._validateParameters('nfc', arguments);
cov_1xdbyxohs1.s[57]++;
if (num instanceof Array) {
cov_1xdbyxohs1.b[12][0]++;
cov_1xdbyxohs1.s[58]++;
return num.map(function(x) {
cov_1xdbyxohs1.f[7]++;
cov_1xdbyxohs1.s[59]++;
return doNfc(x, right);
});
} else {
cov_1xdbyxohs1.b[12][1]++;
cov_1xdbyxohs1.s[60]++;
return doNfc(num, right);
}
};
function doNfc(num, right) {
cov_1xdbyxohs1.f[8]++;
cov_1xdbyxohs1.s[61]++;
num = num.toString();
var dec = (cov_1xdbyxohs1.s[62]++, num.indexOf('.'));
var rem = (cov_1xdbyxohs1.s[63]++,
dec !== -1
? (cov_1xdbyxohs1.b[13][0]++, num.substring(dec))
: (cov_1xdbyxohs1.b[13][1]++, ''));
var n = (cov_1xdbyxohs1.s[64]++,
dec !== -1
? (cov_1xdbyxohs1.b[14][0]++, num.substring(0, dec))
: (cov_1xdbyxohs1.b[14][1]++, num));
cov_1xdbyxohs1.s[65]++;
n = n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
cov_1xdbyxohs1.s[66]++;
if (right === 0) {
cov_1xdbyxohs1.b[15][0]++;
cov_1xdbyxohs1.s[67]++;
rem = '';
} else {
cov_1xdbyxohs1.b[15][1]++;
cov_1xdbyxohs1.s[68]++;
if (typeof right !== 'undefined') {
cov_1xdbyxohs1.b[16][0]++;
cov_1xdbyxohs1.s[69]++;
if (right > rem.length) {
cov_1xdbyxohs1.b[17][0]++;
cov_1xdbyxohs1.s[70]++;
rem +=
dec === -1
? (cov_1xdbyxohs1.b[18][0]++, '.')
: (cov_1xdbyxohs1.b[18][1]++, '');
var len = (cov_1xdbyxohs1.s[71]++, right - rem.length + 1);
cov_1xdbyxohs1.s[72]++;
for (var i = (cov_1xdbyxohs1.s[73]++, 0); i < len; i++) {
cov_1xdbyxohs1.s[74]++;
rem += '0';
}
} else {
cov_1xdbyxohs1.b[17][1]++;
cov_1xdbyxohs1.s[75]++;
rem = rem.substring(0, right + 1);
}
} else {
cov_1xdbyxohs1.b[16][1]++;
}
}
cov_1xdbyxohs1.s[76]++;
return n + rem;
}
/**
* Utility function for formatting numbers into strings. Similar to nf() but
* puts a "+" in front of positive numbers and a "-" in front of negative
* numbers. There are two versions: one for formatting floats, and one for
* formatting ints. The values for left, and right parameters
* should always be positive integers.
*
* @method nfp
* @param {Number} num the Number to format
* @param {Integer} [left] number of digits to the left of the decimal
* point
* @param {Integer} [right] number of digits to the right of the
* decimal point
* @return {String} formatted String
*
* @example
*
*
* function setup() {
* background(200);
* let num1 = 11253106.115;
* let num2 = -11253106.115;
*
* noStroke();
* fill(0);
* textSize(12);
*
* // Draw formatted numbers
* text(nfp(num1, 4, 2), 10, 30);
* text(nfp(num2, 4, 2), 10, 80);
*
* // Draw dividing line
* stroke(120);
* line(0, 50, width, 50);
* }
*
*
*
* @alt
* "+11253106.11" top middle and "-11253106.11" displayed bottom middle
*/
/**
* @method nfp
* @param {Number[]} nums the Numbers to format
* @param {Integer} [left]
* @param {Integer} [right]
* @return {String[]} formatted Strings
*/ cov_1xdbyxohs1.s[77]++;
_main.default.prototype.nfp = function() {
cov_1xdbyxohs1.f[9]++;
cov_1xdbyxohs1.s[78]++;
for (
var _len = arguments.length, args = new Array(_len), _key = 0;
_key < _len;
_key++
) {
args[_key] = arguments[_key];
}
_main.default._validateParameters('nfp', args);
var nfRes = (cov_1xdbyxohs1.s[79]++,
_main.default.prototype.nf.apply(this, args));
cov_1xdbyxohs1.s[80]++;
if (nfRes instanceof Array) {
cov_1xdbyxohs1.b[19][0]++;
cov_1xdbyxohs1.s[81]++;
return nfRes.map(addNfp);
} else {
cov_1xdbyxohs1.b[19][1]++;
cov_1xdbyxohs1.s[82]++;
return addNfp(nfRes);
}
};
function addNfp(num) {
cov_1xdbyxohs1.f[10]++;
cov_1xdbyxohs1.s[83]++;
return parseFloat(num) > 0
? (cov_1xdbyxohs1.b[20][0]++, '+'.concat(num.toString()))
: (cov_1xdbyxohs1.b[20][1]++, num.toString());
}
/**
* Utility function for formatting numbers into strings. Similar to nf() but
* puts an additional "_" (space) in front of positive numbers just in case to align it with negative
* numbers which includes "-" (minus) sign.
* The main usecase of nfs() can be seen when one wants to align the digits (place values) of a non-negative
* number with some negative number (See the example to get a clear picture).
* There are two versions: one for formatting float, and one for formatting int.
* The values for the digits, left, and right parameters should always be positive integers.
* (IMP): The result on the canvas basically the expected alignment can vary based on the typeface you are using.
* (NOTE): Be cautious when using left and right parameters as it prepends numbers of 0's if the parameter
* if greater than the current length of the number.
* For example if number is 123.2 and left parameter passed is 4 which is greater than length of 123
* (integer part) i.e 3 than result will be 0123.2. Same case for right parameter i.e. if right is 3 than
* the result will be 123.200.
*
* @method nfs
* @param {Number} num the Number to format
* @param {Integer} [left] number of digits to the left of the decimal
* point
* @param {Integer} [right] number of digits to the right of the
* decimal point
* @return {String} formatted String
*
* @example
*
*
* let myFont;
* function preload() {
* myFont = loadFont('assets/fonts/inconsolata.ttf');
* }
* function setup() {
* background(200);
* let num1 = 321;
* let num2 = -1321;
*
* noStroke();
* fill(0);
* textFont(myFont);
* textSize(22);
*
* // nfs() aligns num1 (positive number) with num2 (negative number) by
* // adding a blank space in front of the num1 (positive number)
* // [left = 4] in num1 add one 0 in front, to align the digits with num2
* // [right = 2] in num1 and num2 adds two 0's after both numbers
* // To see the differences check the example of nf() too.
* text(nfs(num1, 4, 2), 10, 30);
* text(nfs(num2, 4, 2), 10, 80);
* // Draw dividing line
* stroke(120);
* line(0, 50, width, 50);
* }
*
*
*
* @alt
* "0321.00" top middle and "-1321.00" displayed bottom middle
*/
/**
* @method nfs
* @param {Array} nums the Numbers to format
* @param {Integer} [left]
* @param {Integer} [right]
* @return {String[]} formatted Strings
*/ cov_1xdbyxohs1.s[84]++;
_main.default.prototype.nfs = function() {
cov_1xdbyxohs1.f[11]++;
cov_1xdbyxohs1.s[85]++;
for (
var _len2 = arguments.length, args = new Array(_len2), _key2 = 0;
_key2 < _len2;
_key2++
) {
args[_key2] = arguments[_key2];
}
_main.default._validateParameters('nfs', args);
var nfRes = (cov_1xdbyxohs1.s[86]++,
_main.default.prototype.nf.apply(this, args));
cov_1xdbyxohs1.s[87]++;
if (nfRes instanceof Array) {
cov_1xdbyxohs1.b[21][0]++;
cov_1xdbyxohs1.s[88]++;
return nfRes.map(addNfs);
} else {
cov_1xdbyxohs1.b[21][1]++;
cov_1xdbyxohs1.s[89]++;
return addNfs(nfRes);
}
};
function addNfs(num) {
cov_1xdbyxohs1.f[12]++;
cov_1xdbyxohs1.s[90]++;
return parseFloat(num) >= 0
? (cov_1xdbyxohs1.b[22][0]++, ' '.concat(num.toString()))
: (cov_1xdbyxohs1.b[22][1]++, num.toString());
}
/**
* The split() function maps to String.split(), it breaks a String into
* pieces using a character or string as the delimiter. The delim parameter
* specifies the character or characters that mark the boundaries between
* each piece. A String[] array is returned that contains each of the pieces.
*
* The splitTokens() function works in a similar fashion, except that it
* splits using a range of characters instead of a specific character or
* sequence.
*
* @method split
* @param {String} value the String to be split
* @param {String} delim the String used to separate the data
* @return {String[]} Array of Strings
* @example
*
*
* let names = 'Pat,Xio,Alex';
* let splitString = split(names, ',');
* text(splitString[0], 5, 30);
* text(splitString[1], 5, 50);
* text(splitString[2], 5, 70);
*
*
*
* @alt
* "pat" top left, "Xio" mid left and "Alex" displayed bottom left
*/ cov_1xdbyxohs1.s[91]++;
_main.default.prototype.split = function(str, delim) {
cov_1xdbyxohs1.f[13]++;
cov_1xdbyxohs1.s[92]++;
_main.default._validateParameters('split', arguments);
cov_1xdbyxohs1.s[93]++;
return str.split(delim);
};
/**
* The splitTokens() function splits a String at one or many character
* delimiters or "tokens." The delim parameter specifies the character or
* characters to be used as a boundary.
*
* If no delim characters are specified, any whitespace character is used to
* split. Whitespace characters include tab (\t), line feed (\n), carriage
* return (\r), form feed (\f), and space.
*
* @method splitTokens
* @param {String} value the String to be split
* @param {String} [delim] list of individual Strings that will be used as
* separators
* @return {String[]} Array of Strings
* @example
*
*
* function setup() {
* let myStr = 'Mango, Banana, Lime';
* let myStrArr = splitTokens(myStr, ',');
*
* print(myStrArr); // prints : ["Mango"," Banana"," Lime"]
* }
*
*
*/ cov_1xdbyxohs1.s[94]++;
_main.default.prototype.splitTokens = function(value, delims) {
cov_1xdbyxohs1.f[14]++;
cov_1xdbyxohs1.s[95]++;
_main.default._validateParameters('splitTokens', arguments);
var d;
cov_1xdbyxohs1.s[96]++;
if (typeof delims !== 'undefined') {
cov_1xdbyxohs1.b[23][0]++;
var str = (cov_1xdbyxohs1.s[97]++, delims);
var sqc = (cov_1xdbyxohs1.s[98]++, /\]/g.exec(str));
var sqo = (cov_1xdbyxohs1.s[99]++, /\[/g.exec(str));
cov_1xdbyxohs1.s[100]++;
if ((cov_1xdbyxohs1.b[25][0]++, sqo) && (cov_1xdbyxohs1.b[25][1]++, sqc)) {
cov_1xdbyxohs1.b[24][0]++;
cov_1xdbyxohs1.s[101]++;
str = str.slice(0, sqc.index) + str.slice(sqc.index + 1);
cov_1xdbyxohs1.s[102]++;
sqo = /\[/g.exec(str);
cov_1xdbyxohs1.s[103]++;
str = str.slice(0, sqo.index) + str.slice(sqo.index + 1);
cov_1xdbyxohs1.s[104]++;
d = new RegExp('[\\['.concat(str, '\\]]'), 'g');
} else {
cov_1xdbyxohs1.b[24][1]++;
cov_1xdbyxohs1.s[105]++;
if (sqc) {
cov_1xdbyxohs1.b[26][0]++;
cov_1xdbyxohs1.s[106]++;
str = str.slice(0, sqc.index) + str.slice(sqc.index + 1);
cov_1xdbyxohs1.s[107]++;
d = new RegExp('['.concat(str, '\\]]'), 'g');
} else {
cov_1xdbyxohs1.b[26][1]++;
cov_1xdbyxohs1.s[108]++;
if (sqo) {
cov_1xdbyxohs1.b[27][0]++;
cov_1xdbyxohs1.s[109]++;
str = str.slice(0, sqo.index) + str.slice(sqo.index + 1);
cov_1xdbyxohs1.s[110]++;
d = new RegExp('['.concat(str, '\\[]'), 'g');
} else {
cov_1xdbyxohs1.b[27][1]++;
cov_1xdbyxohs1.s[111]++;
d = new RegExp('['.concat(str, ']'), 'g');
}
}
}
} else {
cov_1xdbyxohs1.b[23][1]++;
cov_1xdbyxohs1.s[112]++;
d = /\s/g;
}
cov_1xdbyxohs1.s[113]++;
return value.split(d).filter(function(n) {
cov_1xdbyxohs1.f[15]++;
cov_1xdbyxohs1.s[114]++;
return n;
});
};
/**
* Removes whitespace characters from the beginning and end of a String. In
* addition to standard whitespace characters such as space, carriage return,
* and tab, this function also removes the Unicode "nbsp" character.
*
* @method trim
* @param {String} str a String to be trimmed
* @return {String} a trimmed String
*
* @example
*
*
* let string = trim(' No new lines\n ');
* text(string + ' here', 2, 50);
*
*
*
* @alt
* "No new lines here" displayed center canvas
*/
/**
* @method trim
* @param {Array} strs an Array of Strings to be trimmed
* @return {String[]} an Array of trimmed Strings
*/ cov_1xdbyxohs1.s[115]++;
_main.default.prototype.trim = function(str) {
cov_1xdbyxohs1.f[16]++;
cov_1xdbyxohs1.s[116]++;
_main.default._validateParameters('trim', arguments);
cov_1xdbyxohs1.s[117]++;
if (str instanceof Array) {
cov_1xdbyxohs1.b[28][0]++;
cov_1xdbyxohs1.s[118]++;
return str.map(this.trim);
} else {
cov_1xdbyxohs1.b[28][1]++;
cov_1xdbyxohs1.s[119]++;
return str.trim();
}
};
var _default = _main.default;
exports.default = _default;
},
{
'../core/friendly_errors/fes_core': 46,
'../core/friendly_errors/file_errors': 47,
'../core/friendly_errors/validate_params': 49,
'../core/main': 54
}
],
96: [
function(_dereq_, module, exports) {
'use strict';
var cov_1bffdnr94h = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/utilities/time_date.js';
var hash = 'd8eaa9c1016b54151cde3ea422b7904f8a99a0f7';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/utilities/time_date.js',
statementMap: {
'0': { start: { line: 27, column: 0 }, end: { line: 29, column: 2 } },
'1': { start: { line: 28, column: 2 }, end: { line: 28, column: 30 } },
'2': { start: { line: 48, column: 0 }, end: { line: 50, column: 2 } },
'3': { start: { line: 49, column: 2 }, end: { line: 49, column: 31 } },
'4': { start: { line: 69, column: 0 }, end: { line: 71, column: 2 } },
'5': { start: { line: 70, column: 2 }, end: { line: 70, column: 33 } },
'6': { start: { line: 91, column: 0 }, end: { line: 98, column: 2 } },
'7': { start: { line: 92, column: 2 }, end: { line: 97, column: 3 } },
'8': { start: { line: 94, column: 4 }, end: { line: 94, column: 13 } },
'9': { start: { line: 96, column: 4 }, end: { line: 96, column: 56 } },
'10': { start: { line: 117, column: 0 }, end: { line: 120, column: 2 } },
'11': { start: { line: 119, column: 2 }, end: { line: 119, column: 35 } },
'12': { start: { line: 139, column: 0 }, end: { line: 141, column: 2 } },
'13': { start: { line: 140, column: 2 }, end: { line: 140, column: 33 } },
'14': { start: { line: 160, column: 0 }, end: { line: 162, column: 2 } },
'15': { start: { line: 161, column: 2 }, end: { line: 161, column: 34 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 27, column: 19 }, end: { line: 27, column: 20 } },
loc: { start: { line: 27, column: 30 }, end: { line: 29, column: 1 } },
line: 27
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 48, column: 20 }, end: { line: 48, column: 21 } },
loc: { start: { line: 48, column: 31 }, end: { line: 50, column: 1 } },
line: 48
},
'2': {
name: '(anonymous_2)',
decl: { start: { line: 69, column: 22 }, end: { line: 69, column: 23 } },
loc: { start: { line: 69, column: 33 }, end: { line: 71, column: 1 } },
line: 69
},
'3': {
name: '(anonymous_3)',
decl: { start: { line: 91, column: 22 }, end: { line: 91, column: 23 } },
loc: { start: { line: 91, column: 33 }, end: { line: 98, column: 1 } },
line: 91
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 117, column: 21 },
end: { line: 117, column: 22 }
},
loc: { start: { line: 117, column: 32 }, end: { line: 120, column: 1 } },
line: 117
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 139, column: 22 },
end: { line: 139, column: 23 }
},
loc: { start: { line: 139, column: 33 }, end: { line: 141, column: 1 } },
line: 139
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 160, column: 20 },
end: { line: 160, column: 21 }
},
loc: { start: { line: 160, column: 31 }, end: { line: 162, column: 1 } },
line: 160
}
},
branchMap: {
'0': {
loc: { start: { line: 92, column: 2 }, end: { line: 97, column: 3 } },
type: 'if',
locations: [
{ start: { line: 92, column: 2 }, end: { line: 97, column: 3 } },
{ start: { line: 92, column: 2 }, end: { line: 97, column: 3 } }
],
line: 92
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0
},
f: { '0': 0, '1': 0, '2': 0, '3': 0, '4': 0, '5': 0, '6': 0 },
b: { '0': [0, 0] },
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: 'd8eaa9c1016b54151cde3ea422b7904f8a99a0f7'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_1bffdnr94h.s[0]++;
/**
* p5.js communicates with the clock on your computer. The day() function
* returns the current day as a value from 1 - 31.
*
* @method day
* @return {Integer} the current day
* @example
*
*
* let d = day();
* text('Current day: \n' + d, 5, 50);
*
*
*
* @alt
* Current day is displayed
*/
_main.default.prototype.day = function() {
cov_1bffdnr94h.f[0]++;
cov_1bffdnr94h.s[1]++;
return new Date().getDate();
};
/**
* p5.js communicates with the clock on your computer. The hour() function
* returns the current hour as a value from 0 - 23.
*
* @method hour
* @return {Integer} the current hour
* @example
*
*
* let h = hour();
* text('Current hour:\n' + h, 5, 50);
*
*
*
* @alt
* Current hour is displayed
*/ cov_1bffdnr94h.s[2]++;
_main.default.prototype.hour = function() {
cov_1bffdnr94h.f[1]++;
cov_1bffdnr94h.s[3]++;
return new Date().getHours();
};
/**
* p5.js communicates with the clock on your computer. The minute() function
* returns the current minute as a value from 0 - 59.
*
* @method minute
* @return {Integer} the current minute
* @example
*
*
* let m = minute();
* text('Current minute: \n' + m, 5, 50);
*
*
*
* @alt
* Current minute is displayed
*/ cov_1bffdnr94h.s[4]++;
_main.default.prototype.minute = function() {
cov_1bffdnr94h.f[2]++;
cov_1bffdnr94h.s[5]++;
return new Date().getMinutes();
};
/**
* Returns the number of milliseconds (thousandths of a second) since
* starting the sketch (when `setup()` is called). This information is often
* used for timing events and animation sequences.
*
* @method millis
* @return {Number} the number of milliseconds since starting the sketch
* @example
*
*
* let millisecond = millis();
* text('Milliseconds \nrunning: \n' + millisecond, 5, 40);
*
*
*
* @alt
* number of milliseconds since sketch has started displayed
*/ cov_1bffdnr94h.s[6]++;
_main.default.prototype.millis = function() {
cov_1bffdnr94h.f[3]++;
cov_1bffdnr94h.s[7]++;
if (this._millisStart === -1) {
cov_1bffdnr94h.b[0][0]++;
cov_1bffdnr94h.s[8]++;
// Sketch has not started
return 0;
} else {
cov_1bffdnr94h.b[0][1]++;
cov_1bffdnr94h.s[9]++;
return window.performance.now() - this._millisStart;
}
};
/**
* p5.js communicates with the clock on your computer. The month() function
* returns the current month as a value from 1 - 12.
*
* @method month
* @return {Integer} the current month
* @example
*
*
* let m = month();
* text('Current month: \n' + m, 5, 50);
*
*
*
* @alt
* Current month is displayed
*/ cov_1bffdnr94h.s[10]++;
_main.default.prototype.month = function() {
cov_1bffdnr94h.f[4]++;
cov_1bffdnr94h.s[11]++;
//January is 0!
return new Date().getMonth() + 1;
};
/**
* p5.js communicates with the clock on your computer. The second() function
* returns the current second as a value from 0 - 59.
*
* @method second
* @return {Integer} the current second
* @example
*
*
* let s = second();
* text('Current second: \n' + s, 5, 50);
*
*
*
* @alt
* Current second is displayed
*/ cov_1bffdnr94h.s[12]++;
_main.default.prototype.second = function() {
cov_1bffdnr94h.f[5]++;
cov_1bffdnr94h.s[13]++;
return new Date().getSeconds();
};
/**
* p5.js communicates with the clock on your computer. The year() function
* returns the current year as an integer (2014, 2015, 2016, etc).
*
* @method year
* @return {Integer} the current year
* @example
*
*
* let y = year();
* text('Current year: \n' + y, 5, 50);
*
*
*
* @alt
* Current year is displayed
*/ cov_1bffdnr94h.s[14]++;
_main.default.prototype.year = function() {
cov_1bffdnr94h.f[6]++;
cov_1bffdnr94h.s[15]++;
return new Date().getFullYear();
};
var _default = _main.default;
exports.default = _default;
},
{ '../core/main': 54 }
],
97: [
function(_dereq_, module, exports) {
'use strict';
function _typeof(obj) {
if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj &&
typeof Symbol === 'function' &&
obj.constructor === Symbol &&
obj !== Symbol.prototype
? 'symbol'
: typeof obj;
};
}
return _typeof(obj);
}
var cov_7igscgozc = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/webgl/3d_primitives.js';
var hash = '0bce85703c60be415ae797c52c432d83d114d35f';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/3d_primitives.js',
statementMap: {
'0': { start: { line: 48, column: 0 }, end: { line: 95, column: 2 } },
'1': { start: { line: 49, column: 2 }, end: { line: 49, column: 26 } },
'2': { start: { line: 50, column: 2 }, end: { line: 50, column: 45 } },
'3': { start: { line: 51, column: 2 }, end: { line: 53, column: 3 } },
'4': { start: { line: 52, column: 4 }, end: { line: 52, column: 15 } },
'5': { start: { line: 54, column: 2 }, end: { line: 56, column: 3 } },
'6': { start: { line: 55, column: 4 }, end: { line: 55, column: 19 } },
'7': { start: { line: 58, column: 2 }, end: { line: 60, column: 3 } },
'8': { start: { line: 59, column: 4 }, end: { line: 59, column: 16 } },
'9': { start: { line: 61, column: 2 }, end: { line: 63, column: 3 } },
'10': { start: { line: 62, column: 4 }, end: { line: 62, column: 16 } },
'11': { start: { line: 65, column: 14 }, end: { line: 65, column: 43 } },
'12': { start: { line: 67, column: 2 }, end: { line: 91, column: 3 } },
'13': { start: { line: 68, column: 19 }, end: { line: 79, column: 5 } },
'14': { start: { line: 70, column: 6 }, end: { line: 78, column: 7 } },
'15': { start: { line: 70, column: 19 }, end: { line: 70, column: 20 } },
'16': { start: { line: 71, column: 8 }, end: { line: 71, column: 29 } },
'17': { start: { line: 72, column: 8 }, end: { line: 77, column: 9 } },
'18': { start: { line: 72, column: 21 }, end: { line: 72, column: 22 } },
'19': { start: { line: 73, column: 10 }, end: { line: 73, column: 31 } },
'20': { start: { line: 74, column: 10 }, end: { line: 74, column: 49 } },
'21': { start: { line: 75, column: 10 }, end: { line: 75, column: 32 } },
'22': { start: { line: 76, column: 10 }, end: { line: 76, column: 30 } },
'23': { start: { line: 80, column: 22 }, end: { line: 80, column: 63 } },
'24': { start: { line: 81, column: 4 }, end: { line: 81, column: 46 } },
'25': { start: { line: 82, column: 4 }, end: { line: 89, column: 5 } },
'26': { start: { line: 83, column: 6 }, end: { line: 83, column: 56 } },
'27': { start: { line: 84, column: 11 }, end: { line: 89, column: 5 } },
'28': { start: { line: 85, column: 6 }, end: { line: 88, column: 8 } },
'29': { start: { line: 90, column: 4 }, end: { line: 90, column: 49 } },
'30': { start: { line: 93, column: 2 }, end: { line: 93, column: 58 } },
'31': { start: { line: 94, column: 2 }, end: { line: 94, column: 14 } },
'32': { start: { line: 126, column: 0 }, end: { line: 213, column: 2 } },
'33': { start: { line: 127, column: 2 }, end: { line: 127, column: 24 } },
'34': { start: { line: 128, column: 2 }, end: { line: 128, column: 43 } },
'35': { start: { line: 129, column: 2 }, end: { line: 131, column: 3 } },
'36': { start: { line: 130, column: 4 }, end: { line: 130, column: 15 } },
'37': { start: { line: 132, column: 2 }, end: { line: 134, column: 3 } },
'38': { start: { line: 133, column: 4 }, end: { line: 133, column: 19 } },
'39': { start: { line: 135, column: 2 }, end: { line: 137, column: 3 } },
'40': { start: { line: 136, column: 4 }, end: { line: 136, column: 19 } },
'41': { start: { line: 140, column: 4 }, end: { line: 140, column: 75 } },
'42': { start: { line: 141, column: 2 }, end: { line: 143, column: 3 } },
'43': { start: { line: 142, column: 4 }, end: { line: 142, column: 39 } },
'44': { start: { line: 144, column: 2 }, end: { line: 146, column: 3 } },
'45': { start: { line: 145, column: 4 }, end: { line: 145, column: 39 } },
'46': { start: { line: 148, column: 14 }, end: { line: 148, column: 41 } },
'47': { start: { line: 149, column: 2 }, end: { line: 209, column: 3 } },
'48': { start: { line: 150, column: 17 }, end: { line: 194, column: 5 } },
'49': { start: { line: 151, column: 26 }, end: { line: 158, column: 7 } },
'50': { start: { line: 161, column: 6 }, end: { line: 174, column: 8 } },
'51': { start: { line: 175, column: 6 }, end: { line: 193, column: 7 } },
'52': { start: { line: 175, column: 19 }, end: { line: 175, column: 20 } },
'53': { start: { line: 176, column: 26 }, end: { line: 176, column: 40 } },
'54': { start: { line: 177, column: 18 }, end: { line: 177, column: 23 } },
'55': { start: { line: 178, column: 8 }, end: { line: 190, column: 9 } },
'56': { start: { line: 178, column: 21 }, end: { line: 178, column: 22 } },
'57': { start: { line: 179, column: 20 }, end: { line: 179, column: 32 } },
'58': { start: { line: 183, column: 25 }, end: { line: 187, column: 11 } },
'59': { start: { line: 188, column: 10 }, end: { line: 188, column: 37 } },
'60': { start: { line: 189, column: 10 }, end: { line: 189, column: 44 } },
'61': { start: { line: 191, column: 8 }, end: { line: 191, column: 43 } },
'62': { start: { line: 192, column: 8 }, end: { line: 192, column: 47 } },
'63': { start: { line: 195, column: 20 }, end: { line: 195, column: 59 } },
'64': { start: { line: 196, column: 4 }, end: { line: 196, column: 29 } },
'65': { start: { line: 197, column: 4 }, end: { line: 204, column: 5 } },
'66': { start: { line: 198, column: 6 }, end: { line: 198, column: 54 } },
'67': { start: { line: 199, column: 11 }, end: { line: 204, column: 5 } },
'68': { start: { line: 200, column: 6 }, end: { line: 203, column: 8 } },
'69': { start: { line: 208, column: 4 }, end: { line: 208, column: 47 } },
'70': { start: { line: 210, column: 2 }, end: { line: 210, column: 62 } },
'71': { start: { line: 212, column: 2 }, end: { line: 212, column: 14 } },
'72': { start: { line: 283, column: 0 }, end: { line: 299, column: 2 } },
'73': { start: { line: 284, column: 2 }, end: { line: 284, column: 27 } },
'74': { start: { line: 285, column: 2 }, end: { line: 285, column: 46 } },
'75': { start: { line: 286, column: 2 }, end: { line: 288, column: 3 } },
'76': { start: { line: 287, column: 4 }, end: { line: 287, column: 16 } },
'77': { start: { line: 289, column: 2 }, end: { line: 291, column: 3 } },
'78': { start: { line: 290, column: 4 }, end: { line: 290, column: 17 } },
'79': { start: { line: 292, column: 2 }, end: { line: 294, column: 3 } },
'80': { start: { line: 293, column: 4 }, end: { line: 293, column: 17 } },
'81': { start: { line: 296, column: 2 }, end: { line: 296, column: 59 } },
'82': { start: { line: 298, column: 2 }, end: { line: 298, column: 14 } },
'83': { start: { line: 308, column: 23 }, end: { line: 417, column: 1 } },
'84': { start: { line: 317, column: 2 }, end: { line: 317, column: 54 } },
'85': { start: { line: 318, column: 2 }, end: { line: 318, column: 44 } },
'86': { start: { line: 319, column: 2 }, end: { line: 319, column: 47 } },
'87': { start: { line: 320, column: 2 }, end: { line: 320, column: 38 } },
'88': { start: { line: 321, column: 2 }, end: { line: 321, column: 38 } },
'89': { start: { line: 322, column: 2 }, end: { line: 322, column: 57 } },
'90': { start: { line: 323, column: 2 }, end: { line: 323, column: 59 } },
'91': { start: { line: 324, column: 16 }, end: { line: 324, column: 34 } },
'92': { start: { line: 325, column: 14 }, end: { line: 325, column: 40 } },
'93': { start: { line: 327, column: 16 }, end: { line: 327, column: 60 } },
'94': { start: { line: 328, column: 19 }, end: { line: 328, column: 34 } },
'95': { start: { line: 329, column: 19 }, end: { line: 329, column: 34 } },
'96': { start: { line: 331, column: 2 }, end: { line: 377, column: 3 } },
'97': { start: { line: 332, column: 12 }, end: { line: 332, column: 24 } },
'98': { start: { line: 333, column: 12 }, end: { line: 333, column: 22 } },
'99': { start: { line: 335, column: 4 }, end: { line: 348, column: 5 } },
'100': { start: { line: 337, column: 6 }, end: { line: 337, column: 12 } },
'101': { start: { line: 338, column: 6 }, end: { line: 338, column: 12 } },
'102': { start: { line: 339, column: 6 }, end: { line: 339, column: 32 } },
'103': { start: { line: 340, column: 11 }, end: { line: 348, column: 5 } },
'104': { start: { line: 342, column: 6 }, end: { line: 342, column: 17 } },
'105': { start: { line: 343, column: 6 }, end: { line: 343, column: 12 } },
'106': { start: { line: 344, column: 6 }, end: { line: 344, column: 29 } },
'107': { start: { line: 347, column: 6 }, end: { line: 347, column: 65 } },
'108': { start: { line: 349, column: 4 }, end: { line: 352, column: 5 } },
'109': { start: { line: 351, column: 6 }, end: { line: 351, column: 21 } },
'110': { start: { line: 354, column: 4 }, end: { line: 354, column: 20 } },
'111': { start: { line: 355, column: 4 }, end: { line: 376, column: 5 } },
'112': { start: { line: 356, column: 16 }, end: { line: 356, column: 34 } },
'113': { start: { line: 357, column: 17 }, end: { line: 357, column: 32 } },
'114': { start: { line: 358, column: 18 }, end: { line: 358, column: 30 } },
'115': { start: { line: 359, column: 18 }, end: { line: 359, column: 30 } },
'116': { start: { line: 362, column: 6 }, end: { line: 362, column: 79 } },
'117': { start: { line: 366, column: 6 }, end: { line: 372, column: 7 } },
'118': { start: { line: 367, column: 8 }, end: { line: 367, column: 47 } },
'119': { start: { line: 368, column: 13 }, end: { line: 372, column: 7 } },
'120': { start: { line: 369, column: 8 }, end: { line: 369, column: 46 } },
'121': { start: { line: 371, column: 8 }, end: { line: 371, column: 79 } },
'122': { start: { line: 373, column: 6 }, end: { line: 373, column: 44 } },
'123': { start: { line: 375, column: 6 }, end: { line: 375, column: 26 } },
'124': { start: { line: 379, column: 19 }, end: { line: 379, column: 20 } },
'125': { start: { line: 380, column: 2 }, end: { line: 390, column: 3 } },
'126': { start: { line: 381, column: 4 }, end: { line: 388, column: 5 } },
'127': { start: { line: 382, column: 21 }, end: { line: 382, column: 39 } },
'128': { start: { line: 383, column: 6 }, end: { line: 387, column: 9 } },
'129': { start: { line: 389, column: 4 }, end: { line: 389, column: 30 } },
'130': { start: { line: 391, column: 2 }, end: { line: 406, column: 3 } },
'131': { start: { line: 392, column: 4 }, end: { line: 404, column: 5 } },
'132': { start: { line: 393, column: 21 }, end: { line: 393, column: 39 } },
'133': { start: { line: 394, column: 6 }, end: { line: 398, column: 9 } },
'134': { start: { line: 399, column: 6 }, end: { line: 403, column: 9 } },
'135': { start: { line: 405, column: 4 }, end: { line: 405, column: 26 } },
'136': { start: { line: 407, column: 2 }, end: { line: 416, column: 3 } },
'137': { start: { line: 408, column: 4 }, end: { line: 408, column: 26 } },
'138': { start: { line: 409, column: 4 }, end: { line: 415, column: 5 } },
'139': { start: { line: 410, column: 6 }, end: { line: 414, column: 9 } },
'140': { start: { line: 495, column: 0 }, end: { line: 552, column: 2 } },
'141': { start: { line: 503, column: 2 }, end: { line: 503, column: 29 } },
'142': { start: { line: 504, column: 2 }, end: { line: 504, column: 48 } },
'143': { start: { line: 505, column: 2 }, end: { line: 507, column: 3 } },
'144': { start: { line: 506, column: 4 }, end: { line: 506, column: 16 } },
'145': { start: { line: 508, column: 2 }, end: { line: 510, column: 3 } },
'146': { start: { line: 509, column: 4 }, end: { line: 509, column: 20 } },
'147': { start: { line: 511, column: 2 }, end: { line: 513, column: 3 } },
'148': { start: { line: 512, column: 4 }, end: { line: 512, column: 17 } },
'149': { start: { line: 514, column: 2 }, end: { line: 516, column: 3 } },
'150': { start: { line: 515, column: 4 }, end: { line: 515, column: 16 } },
'151': { start: { line: 517, column: 2 }, end: { line: 519, column: 3 } },
'152': { start: { line: 518, column: 4 }, end: { line: 518, column: 18 } },
'153': { start: { line: 520, column: 2 }, end: { line: 522, column: 3 } },
'154': { start: { line: 521, column: 4 }, end: { line: 521, column: 21 } },
'155': { start: { line: 524, column: 14 }, end: { line: 524, column: 69 } },
'156': { start: { line: 525, column: 2 }, end: { line: 547, column: 3 } },
'157': { start: { line: 526, column: 25 }, end: { line: 526, column: 58 } },
'158': { start: { line: 527, column: 4 }, end: { line: 536, column: 6 } },
'159': { start: { line: 538, column: 4 }, end: { line: 545, column: 5 } },
'160': { start: { line: 539, column: 6 }, end: { line: 539, column: 59 } },
'161': { start: { line: 540, column: 11 }, end: { line: 545, column: 5 } },
'162': { start: { line: 541, column: 6 }, end: { line: 544, column: 8 } },
'163': { start: { line: 546, column: 4 }, end: { line: 546, column: 52 } },
'164': { start: { line: 549, column: 2 }, end: { line: 549, column: 64 } },
'165': { start: { line: 551, column: 2 }, end: { line: 551, column: 14 } },
'166': { start: { line: 630, column: 0 }, end: { line: 667, column: 2 } },
'167': { start: { line: 631, column: 2 }, end: { line: 631, column: 25 } },
'168': { start: { line: 632, column: 2 }, end: { line: 632, column: 44 } },
'169': { start: { line: 633, column: 2 }, end: { line: 635, column: 3 } },
'170': { start: { line: 634, column: 4 }, end: { line: 634, column: 16 } },
'171': { start: { line: 636, column: 2 }, end: { line: 638, column: 3 } },
'172': { start: { line: 637, column: 4 }, end: { line: 637, column: 20 } },
'173': { start: { line: 639, column: 2 }, end: { line: 641, column: 3 } },
'174': { start: { line: 640, column: 4 }, end: { line: 640, column: 17 } },
'175': { start: { line: 642, column: 2 }, end: { line: 644, column: 3 } },
'176': { start: { line: 643, column: 4 }, end: { line: 643, column: 16 } },
'177': { start: { line: 645, column: 2 }, end: { line: 647, column: 3 } },
'178': { start: { line: 646, column: 4 }, end: { line: 646, column: 15 } },
'179': { start: { line: 649, column: 14 }, end: { line: 649, column: 49 } },
'180': { start: { line: 650, column: 2 }, end: { line: 662, column: 3 } },
'181': { start: { line: 651, column: 21 }, end: { line: 651, column: 54 } },
'182': { start: { line: 652, column: 4 }, end: { line: 652, column: 73 } },
'183': { start: { line: 653, column: 4 }, end: { line: 660, column: 5 } },
'184': { start: { line: 654, column: 6 }, end: { line: 654, column: 55 } },
'185': { start: { line: 655, column: 11 }, end: { line: 660, column: 5 } },
'186': { start: { line: 656, column: 6 }, end: { line: 659, column: 8 } },
'187': { start: { line: 661, column: 4 }, end: { line: 661, column: 48 } },
'188': { start: { line: 664, column: 2 }, end: { line: 664, column: 64 } },
'189': { start: { line: 666, column: 2 }, end: { line: 666, column: 14 } },
'190': { start: { line: 744, column: 0 }, end: { line: 802, column: 2 } },
'191': { start: { line: 745, column: 2 }, end: { line: 745, column: 30 } },
'192': { start: { line: 746, column: 2 }, end: { line: 746, column: 49 } },
'193': { start: { line: 747, column: 2 }, end: { line: 749, column: 3 } },
'194': { start: { line: 748, column: 4 }, end: { line: 748, column: 17 } },
'195': { start: { line: 750, column: 2 }, end: { line: 752, column: 3 } },
'196': { start: { line: 751, column: 4 }, end: { line: 751, column: 22 } },
'197': { start: { line: 753, column: 2 }, end: { line: 755, column: 3 } },
'198': { start: { line: 754, column: 4 }, end: { line: 754, column: 22 } },
'199': { start: { line: 757, column: 2 }, end: { line: 759, column: 3 } },
'200': { start: { line: 758, column: 4 }, end: { line: 758, column: 17 } },
'201': { start: { line: 760, column: 2 }, end: { line: 762, column: 3 } },
'202': { start: { line: 761, column: 4 }, end: { line: 761, column: 17 } },
'203': { start: { line: 764, column: 14 }, end: { line: 764, column: 47 } },
'204': { start: { line: 766, column: 2 }, end: { line: 797, column: 3 } },
'205': { start: { line: 767, column: 23 }, end: { line: 785, column: 5 } },
'206': { start: { line: 768, column: 6 }, end: { line: 784, column: 7 } },
'207': { start: { line: 768, column: 19 }, end: { line: 768, column: 20 } },
'208': { start: { line: 769, column: 18 }, end: { line: 769, column: 34 } },
'209': { start: { line: 770, column: 20 }, end: { line: 770, column: 45 } },
'210': { start: { line: 771, column: 23 }, end: { line: 771, column: 36 } },
'211': { start: { line: 772, column: 23 }, end: { line: 772, column: 36 } },
'212': { start: { line: 774, column: 8 }, end: { line: 783, column: 9 } },
'213': { start: { line: 774, column: 21 }, end: { line: 774, column: 22 } },
'214': { start: { line: 775, column: 20 }, end: { line: 775, column: 36 } },
'215': { start: { line: 776, column: 24 }, end: { line: 776, column: 39 } },
'216': { start: { line: 777, column: 27 }, end: { line: 777, column: 42 } },
'217': { start: { line: 778, column: 27 }, end: { line: 778, column: 42 } },
'218': { start: { line: 779, column: 20 }, end: { line: 779, column: 79 } },
'219': { start: { line: 780, column: 10 }, end: { line: 780, column: 32 } },
'220': { start: { line: 781, column: 10 }, end: { line: 781, column: 37 } },
'221': { start: { line: 782, column: 10 }, end: { line: 782, column: 30 } },
'222': { start: { line: 786, column: 26 }, end: { line: 786, column: 71 } },
'223': { start: { line: 787, column: 4 }, end: { line: 787, column: 33 } },
'224': { start: { line: 788, column: 4 }, end: { line: 795, column: 5 } },
'225': { start: { line: 789, column: 6 }, end: { line: 789, column: 60 } },
'226': { start: { line: 790, column: 11 }, end: { line: 795, column: 5 } },
'227': { start: { line: 791, column: 6 }, end: { line: 794, column: 8 } },
'228': { start: { line: 796, column: 4 }, end: { line: 796, column: 53 } },
'229': { start: { line: 799, column: 2 }, end: { line: 799, column: 67 } },
'230': { start: { line: 801, column: 2 }, end: { line: 801, column: 14 } },
'231': { start: { line: 880, column: 0 }, end: { line: 949, column: 2 } },
'232': { start: { line: 881, column: 2 }, end: { line: 881, column: 26 } },
'233': { start: { line: 882, column: 2 }, end: { line: 882, column: 45 } },
'234': { start: { line: 883, column: 2 }, end: { line: 887, column: 3 } },
'235': { start: { line: 884, column: 4 }, end: { line: 884, column: 16 } },
'236': { start: { line: 885, column: 9 }, end: { line: 887, column: 3 } },
'237': { start: { line: 886, column: 4 }, end: { line: 886, column: 11 } },
'238': { start: { line: 889, column: 2 }, end: { line: 893, column: 3 } },
'239': { start: { line: 890, column: 4 }, end: { line: 890, column: 20 } },
'240': { start: { line: 891, column: 9 }, end: { line: 893, column: 3 } },
'241': { start: { line: 892, column: 4 }, end: { line: 892, column: 11 } },
'242': { start: { line: 895, column: 2 }, end: { line: 897, column: 3 } },
'243': { start: { line: 896, column: 4 }, end: { line: 896, column: 17 } },
'244': { start: { line: 898, column: 2 }, end: { line: 900, column: 3 } },
'245': { start: { line: 899, column: 4 }, end: { line: 899, column: 17 } },
'246': { start: { line: 902, column: 20 }, end: { line: 902, column: 56 } },
'247': { start: { line: 903, column: 14 }, end: { line: 903, column: 56 } },
'248': { start: { line: 905, column: 2 }, end: { line: 945, column: 3 } },
'249': { start: { line: 906, column: 19 }, end: { line: 933, column: 5 } },
'250': { start: { line: 907, column: 6 }, end: { line: 932, column: 7 } },
'251': { start: { line: 907, column: 19 }, end: { line: 907, column: 20 } },
'252': { start: { line: 908, column: 18 }, end: { line: 908, column: 34 } },
'253': { start: { line: 909, column: 20 }, end: { line: 909, column: 35 } },
'254': { start: { line: 910, column: 23 }, end: { line: 910, column: 36 } },
'255': { start: { line: 911, column: 23 }, end: { line: 911, column: 36 } },
'256': { start: { line: 912, column: 18 }, end: { line: 912, column: 40 } },
'257': { start: { line: 914, column: 8 }, end: { line: 931, column: 9 } },
'258': { start: { line: 914, column: 21 }, end: { line: 914, column: 22 } },
'259': { start: { line: 915, column: 20 }, end: { line: 915, column: 36 } },
'260': { start: { line: 916, column: 24 }, end: { line: 916, column: 39 } },
'261': { start: { line: 917, column: 27 }, end: { line: 917, column: 42 } },
'262': { start: { line: 918, column: 27 }, end: { line: 918, column: 42 } },
'263': { start: { line: 920, column: 20 }, end: { line: 924, column: 11 } },
'264': { start: { line: 926, column: 20 }, end: { line: 926, column: 79 } },
'265': { start: { line: 928, column: 10 }, end: { line: 928, column: 32 } },
'266': { start: { line: 929, column: 10 }, end: { line: 929, column: 37 } },
'267': { start: { line: 930, column: 10 }, end: { line: 930, column: 30 } },
'268': { start: { line: 934, column: 22 }, end: { line: 934, column: 63 } },
'269': { start: { line: 935, column: 4 }, end: { line: 935, column: 29 } },
'270': { start: { line: 936, column: 4 }, end: { line: 943, column: 5 } },
'271': { start: { line: 937, column: 6 }, end: { line: 937, column: 56 } },
'272': { start: { line: 938, column: 11 }, end: { line: 943, column: 5 } },
'273': { start: { line: 939, column: 6 }, end: { line: 942, column: 8 } },
'274': { start: { line: 944, column: 4 }, end: { line: 944, column: 49 } },
'275': { start: { line: 946, column: 2 }, end: { line: 946, column: 64 } },
'276': { start: { line: 948, column: 2 }, end: { line: 948, column: 14 } },
'277': { start: { line: 987, column: 0 }, end: { line: 997, column: 2 } },
'278': { start: { line: 988, column: 2 }, end: { line: 990, column: 3 } },
'279': { start: { line: 989, column: 4 }, end: { line: 989, column: 10 } },
'280': { start: { line: 992, column: 18 }, end: { line: 992, column: 20 } },
'281': { start: { line: 993, column: 2 }, end: { line: 993, column: 39 } },
'282': { start: { line: 994, column: 2 }, end: { line: 994, column: 62 } },
'283': { start: { line: 996, column: 2 }, end: { line: 996, column: 14 } },
'284': { start: { line: 999, column: 0 }, end: { line: 1049, column: 2 } },
'285': {
start: { line: 1000, column: 13 },
end: { line: 1000, column: 20 }
},
'286': {
start: { line: 1001, column: 9 },
end: { line: 1001, column: 16 }
},
'287': {
start: { line: 1002, column: 13 },
end: { line: 1002, column: 20 }
},
'288': {
start: { line: 1003, column: 9 },
end: { line: 1003, column: 16 }
},
'289': {
start: { line: 1004, column: 13 },
end: { line: 1004, column: 20 }
},
'290': {
start: { line: 1005, column: 9 },
end: { line: 1005, column: 16 }
},
'291': {
start: { line: 1007, column: 14 },
end: { line: 1007, column: 19 }
},
'292': { start: { line: 1008, column: 2 }, end: { line: 1023, column: 3 } },
'293': {
start: { line: 1009, column: 22 },
end: { line: 1018, column: 5 }
},
'294': {
start: { line: 1010, column: 23 },
end: { line: 1010, column: 25 }
},
'295': {
start: { line: 1011, column: 6 },
end: { line: 1011, column: 44 }
},
'296': {
start: { line: 1012, column: 6 },
end: { line: 1012, column: 44 }
},
'297': {
start: { line: 1013, column: 6 },
end: { line: 1013, column: 44 }
},
'298': {
start: { line: 1014, column: 6 },
end: { line: 1014, column: 52 }
},
'299': {
start: { line: 1015, column: 6 },
end: { line: 1015, column: 31 }
},
'300': {
start: { line: 1016, column: 6 },
end: { line: 1016, column: 31 }
},
'301': {
start: { line: 1017, column: 6 },
end: { line: 1017, column: 36 }
},
'302': {
start: { line: 1019, column: 20 },
end: { line: 1019, column: 52 }
},
'303': {
start: { line: 1020, column: 4 },
end: { line: 1020, column: 52 }
},
'304': {
start: { line: 1021, column: 4 },
end: { line: 1021, column: 29 }
},
'305': {
start: { line: 1022, column: 4 },
end: { line: 1022, column: 37 }
},
'306': {
start: { line: 1031, column: 20 },
end: { line: 1031, column: 41 }
},
'307': { start: { line: 1032, column: 2 }, end: { line: 1046, column: 3 } },
'308': {
start: { line: 1034, column: 17 },
end: { line: 1039, column: 27 }
},
'309': {
start: { line: 1041, column: 4 },
end: { line: 1041, column: 26 }
},
'310': {
start: { line: 1043, column: 4 },
end: { line: 1043, column: 26 }
},
'311': {
start: { line: 1045, column: 4 },
end: { line: 1045, column: 31 }
},
'312': {
start: { line: 1048, column: 2 },
end: { line: 1048, column: 14 }
},
'313': { start: { line: 1051, column: 0 }, end: { line: 1062, column: 2 } },
'314': { start: { line: 1052, column: 2 }, end: { line: 1061, column: 4 } },
'315': { start: { line: 1064, column: 0 }, end: { line: 1178, column: 2 } },
'316': {
start: { line: 1065, column: 12 },
end: { line: 1065, column: 24 }
},
'317': {
start: { line: 1066, column: 12 },
end: { line: 1066, column: 24 }
},
'318': {
start: { line: 1067, column: 16 },
end: { line: 1067, column: 28 }
},
'319': {
start: { line: 1068, column: 17 },
end: { line: 1068, column: 29 }
},
'320': {
start: { line: 1069, column: 16 },
end: { line: 1069, column: 28 }
},
'321': {
start: { line: 1070, column: 15 },
end: { line: 1070, column: 27 }
},
'322': {
start: { line: 1071, column: 15 },
end: { line: 1071, column: 27 }
},
'323': {
start: { line: 1072, column: 17 },
end: { line: 1072, column: 35 }
},
'324': { start: { line: 1078, column: 2 }, end: { line: 1084, column: 3 } },
'325': {
start: { line: 1079, column: 4 },
end: { line: 1079, column: 22 }
},
'326': {
start: { line: 1080, column: 4 },
end: { line: 1080, column: 32 }
},
'327': {
start: { line: 1082, column: 4 },
end: { line: 1082, column: 18 }
},
'328': {
start: { line: 1083, column: 4 },
end: { line: 1083, column: 57 }
},
'329': { start: { line: 1086, column: 2 }, end: { line: 1164, column: 3 } },
'330': {
start: { line: 1087, column: 17 },
end: { line: 1152, column: 5 }
},
'331': {
start: { line: 1088, column: 6 },
end: { line: 1088, column: 30 }
},
'332': { start: { line: 1091, column: 6 }, end: { line: 1151, column: 7 } },
'333': { start: { line: 1093, column: 8 }, end: { line: 1096, column: 9 } },
'334': {
start: { line: 1094, column: 10 },
end: { line: 1094, column: 57 }
},
'335': {
start: { line: 1095, column: 10 },
end: { line: 1095, column: 36 }
},
'336': { start: { line: 1099, column: 8 }, end: { line: 1113, column: 9 } },
'337': {
start: { line: 1099, column: 21 },
end: { line: 1099, column: 22 }
},
'338': {
start: { line: 1100, column: 20 },
end: { line: 1100, column: 30 }
},
'339': {
start: { line: 1101, column: 24 },
end: { line: 1101, column: 50 }
},
'340': {
start: { line: 1103, column: 21 },
end: { line: 1103, column: 46 }
},
'341': {
start: { line: 1104, column: 21 },
end: { line: 1104, column: 46 }
},
'342': {
start: { line: 1106, column: 10 },
end: { line: 1106, column: 55 }
},
'343': {
start: { line: 1107, column: 10 },
end: { line: 1107, column: 34 }
},
'344': {
start: { line: 1109, column: 10 },
end: { line: 1112, column: 11 }
},
'345': {
start: { line: 1110, column: 12 },
end: { line: 1110, column: 47 }
},
'346': {
start: { line: 1111, column: 12 },
end: { line: 1111, column: 52 }
},
'347': { start: { line: 1116, column: 8 }, end: { line: 1150, column: 9 } },
'348': {
start: { line: 1118, column: 12 },
end: { line: 1122, column: 15 }
},
'349': {
start: { line: 1123, column: 12 },
end: { line: 1123, column: 44 }
},
'350': {
start: { line: 1124, column: 12 },
end: { line: 1127, column: 15 }
},
'351': {
start: { line: 1128, column: 12 },
end: { line: 1128, column: 67 }
},
'352': {
start: { line: 1129, column: 12 },
end: { line: 1129, column: 18 }
},
'353': {
start: { line: 1132, column: 12 },
end: { line: 1132, column: 44 }
},
'354': {
start: { line: 1133, column: 12 },
end: { line: 1133, column: 67 }
},
'355': {
start: { line: 1134, column: 12 },
end: { line: 1134, column: 18 }
},
'356': {
start: { line: 1137, column: 12 },
end: { line: 1137, column: 44 }
},
'357': {
start: { line: 1138, column: 12 },
end: { line: 1138, column: 18 }
},
'358': {
start: { line: 1141, column: 12 },
end: { line: 1145, column: 15 }
},
'359': {
start: { line: 1146, column: 12 },
end: { line: 1149, column: 15 }
},
'360': {
start: { line: 1154, column: 20 },
end: { line: 1154, column: 52 }
},
'361': {
start: { line: 1155, column: 4 },
end: { line: 1155, column: 29 }
},
'362': { start: { line: 1157, column: 4 }, end: { line: 1161, column: 5 } },
'363': {
start: { line: 1158, column: 6 },
end: { line: 1158, column: 61 }
},
'364': {
start: { line: 1159, column: 11 },
end: { line: 1161, column: 5 }
},
'365': {
start: { line: 1160, column: 6 },
end: { line: 1160, column: 69 }
},
'366': {
start: { line: 1163, column: 4 },
end: { line: 1163, column: 37 }
},
'367': {
start: { line: 1166, column: 20 },
end: { line: 1166, column: 41 }
},
'368': { start: { line: 1168, column: 2 }, end: { line: 1175, column: 3 } },
'369': {
start: { line: 1169, column: 4 },
end: { line: 1169, column: 40 }
},
'370': {
start: { line: 1170, column: 4 },
end: { line: 1170, column: 43 }
},
'371': {
start: { line: 1172, column: 4 },
end: { line: 1172, column: 26 }
},
'372': {
start: { line: 1174, column: 4 },
end: { line: 1174, column: 31 }
},
'373': {
start: { line: 1177, column: 2 },
end: { line: 1177, column: 14 }
},
'374': { start: { line: 1180, column: 0 }, end: { line: 1233, column: 2 } },
'375': {
start: { line: 1181, column: 27 },
end: { line: 1181, column: 69 }
},
'376': {
start: { line: 1182, column: 12 },
end: { line: 1182, column: 19 }
},
'377': {
start: { line: 1183, column: 12 },
end: { line: 1183, column: 19 }
},
'378': {
start: { line: 1184, column: 16 },
end: { line: 1184, column: 23 }
},
'379': {
start: { line: 1185, column: 17 },
end: { line: 1185, column: 24 }
},
'380': {
start: { line: 1186, column: 18 },
end: { line: 1186, column: 56 }
},
'381': {
start: { line: 1187, column: 18 },
end: { line: 1187, column: 56 }
},
'382': {
start: { line: 1188, column: 14 },
end: { line: 1188, column: 42 }
},
'383': { start: { line: 1189, column: 2 }, end: { line: 1217, column: 3 } },
'384': {
start: { line: 1190, column: 18 },
end: { line: 1209, column: 5 }
},
'385': { start: { line: 1191, column: 6 }, end: { line: 1199, column: 7 } },
'386': {
start: { line: 1191, column: 19 },
end: { line: 1191, column: 20 }
},
'387': {
start: { line: 1192, column: 18 },
end: { line: 1192, column: 34 }
},
'388': { start: { line: 1193, column: 8 }, end: { line: 1198, column: 9 } },
'389': {
start: { line: 1193, column: 21 },
end: { line: 1193, column: 22 }
},
'390': {
start: { line: 1194, column: 20 },
end: { line: 1194, column: 36 }
},
'391': {
start: { line: 1195, column: 20 },
end: { line: 1195, column: 42 }
},
'392': {
start: { line: 1196, column: 10 },
end: { line: 1196, column: 32 }
},
'393': {
start: { line: 1197, column: 10 },
end: { line: 1197, column: 30 }
},
'394': { start: { line: 1201, column: 6 }, end: { line: 1208, column: 7 } },
'395': {
start: { line: 1202, column: 8 },
end: { line: 1207, column: 10 }
},
'396': {
start: { line: 1210, column: 21 },
end: { line: 1210, column: 61 }
},
'397': {
start: { line: 1211, column: 4 },
end: { line: 1215, column: 26 }
},
'398': {
start: { line: 1216, column: 4 },
end: { line: 1216, column: 38 }
},
'399': {
start: { line: 1223, column: 20 },
end: { line: 1223, column: 41 }
},
'400': { start: { line: 1224, column: 2 }, end: { line: 1231, column: 3 } },
'401': {
start: { line: 1225, column: 4 },
end: { line: 1225, column: 40 }
},
'402': {
start: { line: 1226, column: 4 },
end: { line: 1226, column: 43 }
},
'403': {
start: { line: 1228, column: 4 },
end: { line: 1228, column: 26 }
},
'404': {
start: { line: 1230, column: 4 },
end: { line: 1230, column: 31 }
},
'405': {
start: { line: 1232, column: 2 },
end: { line: 1232, column: 14 }
},
'406': { start: { line: 1236, column: 0 }, end: { line: 1258, column: 2 } },
'407': {
start: { line: 1238, column: 4 },
end: { line: 1238, column: 82 }
},
'408': { start: { line: 1239, column: 2 }, end: { line: 1255, column: 3 } },
'409': {
start: { line: 1240, column: 18 },
end: { line: 1247, column: 5 }
},
'410': {
start: { line: 1241, column: 6 },
end: { line: 1241, column: 52 }
},
'411': {
start: { line: 1242, column: 6 },
end: { line: 1242, column: 52 }
},
'412': {
start: { line: 1243, column: 6 },
end: { line: 1243, column: 52 }
},
'413': {
start: { line: 1244, column: 6 },
end: { line: 1244, column: 52 }
},
'414': {
start: { line: 1245, column: 6 },
end: { line: 1245, column: 44 }
},
'415': {
start: { line: 1246, column: 6 },
end: { line: 1246, column: 60 }
},
'416': {
start: { line: 1248, column: 21 },
end: { line: 1248, column: 49 }
},
'417': {
start: { line: 1249, column: 4 },
end: { line: 1252, column: 26 }
},
'418': {
start: { line: 1253, column: 4 },
end: { line: 1253, column: 44 }
},
'419': {
start: { line: 1254, column: 4 },
end: { line: 1254, column: 38 }
},
'420': {
start: { line: 1256, column: 2 },
end: { line: 1256, column: 24 }
},
'421': {
start: { line: 1257, column: 2 },
end: { line: 1257, column: 14 }
},
'422': { start: { line: 1263, column: 0 }, end: { line: 1301, column: 2 } },
'423': { start: { line: 1277, column: 2 }, end: { line: 1285, column: 3 } },
'424': {
start: { line: 1278, column: 4 },
end: { line: 1278, column: 12 }
},
'425': {
start: { line: 1279, column: 4 },
end: { line: 1279, column: 12 }
},
'426': {
start: { line: 1280, column: 4 },
end: { line: 1280, column: 12 }
},
'427': {
start: { line: 1281, column: 4 },
end: { line: 1281, column: 12 }
},
'428': {
start: { line: 1282, column: 4 },
end: { line: 1282, column: 12 }
},
'429': {
start: { line: 1283, column: 4 },
end: { line: 1283, column: 12 }
},
'430': {
start: { line: 1284, column: 4 },
end: { line: 1284, column: 26 }
},
'431': {
start: { line: 1286, column: 23 },
end: { line: 1286, column: 54 }
},
'432': {
start: { line: 1287, column: 2 },
end: { line: 1287, column: 20 }
},
'433': { start: { line: 1288, column: 2 }, end: { line: 1298, column: 3 } },
'434': {
start: { line: 1288, column: 15 },
end: { line: 1288, column: 16 }
},
'435': {
start: { line: 1289, column: 15 },
end: { line: 1289, column: 48 }
},
'436': {
start: { line: 1290, column: 15 },
end: { line: 1290, column: 73 }
},
'437': {
start: { line: 1291, column: 15 },
end: { line: 1291, column: 73 }
},
'438': {
start: { line: 1292, column: 15 },
end: { line: 1292, column: 44 }
},
'439': { start: { line: 1293, column: 4 }, end: { line: 1297, column: 6 } },
'440': {
start: { line: 1299, column: 2 },
end: { line: 1299, column: 18 }
},
'441': {
start: { line: 1300, column: 2 },
end: { line: 1300, column: 14 }
},
'442': { start: { line: 1304, column: 0 }, end: { line: 1353, column: 2 } },
'443': { start: { line: 1318, column: 2 }, end: { line: 1326, column: 3 } },
'444': {
start: { line: 1319, column: 4 },
end: { line: 1319, column: 12 }
},
'445': {
start: { line: 1320, column: 4 },
end: { line: 1320, column: 12 }
},
'446': {
start: { line: 1321, column: 4 },
end: { line: 1321, column: 12 }
},
'447': {
start: { line: 1322, column: 4 },
end: { line: 1322, column: 12 }
},
'448': {
start: { line: 1323, column: 4 },
end: { line: 1323, column: 12 }
},
'449': {
start: { line: 1324, column: 4 },
end: { line: 1324, column: 12 }
},
'450': {
start: { line: 1325, column: 4 },
end: { line: 1325, column: 26 }
},
'451': {
start: { line: 1327, column: 22 },
end: { line: 1327, column: 46 }
},
'452': {
start: { line: 1328, column: 2 },
end: { line: 1328, column: 20 }
},
'453': { start: { line: 1329, column: 2 }, end: { line: 1350, column: 3 } },
'454': {
start: { line: 1329, column: 15 },
end: { line: 1329, column: 16 }
},
'455': {
start: { line: 1330, column: 15 },
end: { line: 1330, column: 49 }
},
'456': {
start: { line: 1331, column: 15 },
end: { line: 1331, column: 49 }
},
'457': {
start: { line: 1332, column: 15 },
end: { line: 1332, column: 36 }
},
'458': {
start: { line: 1333, column: 15 },
end: { line: 1333, column: 18 }
},
'459': {
start: { line: 1335, column: 6 },
end: { line: 1338, column: 19 }
},
'460': {
start: { line: 1340, column: 6 },
end: { line: 1343, column: 19 }
},
'461': {
start: { line: 1345, column: 6 },
end: { line: 1348, column: 19 }
},
'462': {
start: { line: 1349, column: 4 },
end: { line: 1349, column: 28 }
},
'463': {
start: { line: 1351, column: 2 },
end: { line: 1351, column: 18 }
},
'464': {
start: { line: 1352, column: 2 },
end: { line: 1352, column: 14 }
},
'465': { start: { line: 1384, column: 0 }, end: { line: 1397, column: 2 } },
'466': { start: { line: 1385, column: 2 }, end: { line: 1395, column: 3 } },
'467': {
start: { line: 1386, column: 4 },
end: { line: 1386, column: 37 }
},
'468': {
start: { line: 1387, column: 4 },
end: { line: 1387, column: 43 }
},
'469': {
start: { line: 1388, column: 4 },
end: { line: 1388, column: 43 }
},
'470': {
start: { line: 1389, column: 4 },
end: { line: 1389, column: 20 }
},
'471': { start: { line: 1390, column: 9 }, end: { line: 1395, column: 3 } },
'472': {
start: { line: 1391, column: 4 },
end: { line: 1391, column: 37 }
},
'473': {
start: { line: 1392, column: 4 },
end: { line: 1392, column: 37 }
},
'474': {
start: { line: 1393, column: 4 },
end: { line: 1393, column: 37 }
},
'475': {
start: { line: 1394, column: 4 },
end: { line: 1394, column: 20 }
},
'476': {
start: { line: 1396, column: 2 },
end: { line: 1396, column: 14 }
},
'477': { start: { line: 1399, column: 0 }, end: { line: 1488, column: 2 } },
'478': { start: { line: 1400, column: 2 }, end: { line: 1487, column: 3 } },
'479': {
start: { line: 1401, column: 4 },
end: { line: 1401, column: 76 }
},
'480': {
start: { line: 1403, column: 14 },
end: { line: 1403, column: 16 }
},
'481': {
start: { line: 1404, column: 14 },
end: { line: 1404, column: 16 }
},
'482': {
start: { line: 1405, column: 14 },
end: { line: 1405, column: 16 }
},
'483': {
start: { line: 1407, column: 22 },
end: { line: 1407, column: 33 }
},
'484': {
start: { line: 1409, column: 4 },
end: { line: 1409, column: 10 }
},
'485': { start: { line: 1411, column: 4 }, end: { line: 1434, column: 5 } },
'486': {
start: { line: 1415, column: 6 },
end: { line: 1415, column: 35 }
},
'487': {
start: { line: 1416, column: 6 },
end: { line: 1416, column: 55 }
},
'488': {
start: { line: 1417, column: 19 },
end: { line: 1417, column: 44 }
},
'489': {
start: { line: 1418, column: 18 },
end: { line: 1418, column: 19 }
},
'490': {
start: { line: 1419, column: 16 },
end: { line: 1419, column: 17 }
},
'491': {
start: { line: 1420, column: 14 },
end: { line: 1420, column: 15 }
},
'492': { start: { line: 1421, column: 6 }, end: { line: 1433, column: 7 } },
'493': {
start: { line: 1422, column: 8 },
end: { line: 1422, column: 41 }
},
'494': {
start: { line: 1423, column: 8 },
end: { line: 1423, column: 65 }
},
'495': { start: { line: 1424, column: 8 }, end: { line: 1429, column: 9 } },
'496': {
start: { line: 1425, column: 10 },
end: { line: 1425, column: 72 }
},
'497': {
start: { line: 1426, column: 10 },
end: { line: 1426, column: 14 }
},
'498': {
start: { line: 1427, column: 10 },
end: { line: 1427, column: 67 }
},
'499': {
start: { line: 1428, column: 10 },
end: { line: 1428, column: 16 }
},
'500': {
start: { line: 1430, column: 8 },
end: { line: 1430, column: 22 }
},
'501': {
start: { line: 1431, column: 8 },
end: { line: 1431, column: 20 }
},
'502': {
start: { line: 1432, column: 8 },
end: { line: 1432, column: 12 }
},
'503': {
start: { line: 1436, column: 22 },
end: { line: 1436, column: 52 }
},
'504': { start: { line: 1438, column: 4 }, end: { line: 1486, column: 5 } },
'505': {
start: { line: 1439, column: 6 },
end: { line: 1439, column: 27 }
},
'506': {
start: { line: 1441, column: 6 },
end: { line: 1441, column: 77 }
},
'507': {
start: { line: 1442, column: 6 },
end: { line: 1442, column: 77 }
},
'508': { start: { line: 1444, column: 6 }, end: { line: 1456, column: 7 } },
'509': {
start: { line: 1445, column: 8 },
end: { line: 1449, column: 49 }
},
'510': {
start: { line: 1450, column: 8 },
end: { line: 1454, column: 49 }
},
'511': {
start: { line: 1455, column: 8 },
end: { line: 1455, column: 28 }
},
'512': {
start: { line: 1457, column: 6 },
end: { line: 1457, column: 52 }
},
'513': {
start: { line: 1458, column: 6 },
end: { line: 1458, column: 52 }
},
'514': {
start: { line: 1459, column: 11 },
end: { line: 1486, column: 5 }
},
'515': {
start: { line: 1460, column: 6 },
end: { line: 1460, column: 27 }
},
'516': {
start: { line: 1462, column: 6 },
end: { line: 1462, column: 77 }
},
'517': {
start: { line: 1463, column: 6 },
end: { line: 1463, column: 77 }
},
'518': {
start: { line: 1464, column: 6 },
end: { line: 1464, column: 77 }
},
'519': { start: { line: 1465, column: 6 }, end: { line: 1482, column: 7 } },
'520': {
start: { line: 1466, column: 8 },
end: { line: 1470, column: 49 }
},
'521': {
start: { line: 1471, column: 8 },
end: { line: 1475, column: 49 }
},
'522': {
start: { line: 1476, column: 8 },
end: { line: 1480, column: 49 }
},
'523': {
start: { line: 1481, column: 8 },
end: { line: 1481, column: 32 }
},
'524': {
start: { line: 1483, column: 6 },
end: { line: 1483, column: 52 }
},
'525': {
start: { line: 1484, column: 6 },
end: { line: 1484, column: 52 }
},
'526': {
start: { line: 1485, column: 6 },
end: { line: 1485, column: 52 }
},
'527': { start: { line: 1490, column: 0 }, end: { line: 1577, column: 2 } },
'528': { start: { line: 1491, column: 2 }, end: { line: 1576, column: 3 } },
'529': {
start: { line: 1492, column: 4 },
end: { line: 1492, column: 79 }
},
'530': {
start: { line: 1494, column: 14 },
end: { line: 1494, column: 16 }
},
'531': {
start: { line: 1495, column: 14 },
end: { line: 1495, column: 16 }
},
'532': {
start: { line: 1496, column: 14 },
end: { line: 1496, column: 16 }
},
'533': {
start: { line: 1498, column: 22 },
end: { line: 1498, column: 33 }
},
'534': {
start: { line: 1500, column: 4 },
end: { line: 1500, column: 10 }
},
'535': { start: { line: 1502, column: 4 }, end: { line: 1525, column: 5 } },
'536': {
start: { line: 1506, column: 6 },
end: { line: 1506, column: 38 }
},
'537': {
start: { line: 1507, column: 6 },
end: { line: 1507, column: 58 }
},
'538': {
start: { line: 1508, column: 19 },
end: { line: 1508, column: 47 }
},
'539': {
start: { line: 1509, column: 18 },
end: { line: 1509, column: 19 }
},
'540': {
start: { line: 1510, column: 16 },
end: { line: 1510, column: 17 }
},
'541': {
start: { line: 1511, column: 14 },
end: { line: 1511, column: 15 }
},
'542': { start: { line: 1512, column: 6 }, end: { line: 1524, column: 7 } },
'543': {
start: { line: 1513, column: 8 },
end: { line: 1513, column: 41 }
},
'544': {
start: { line: 1514, column: 8 },
end: { line: 1514, column: 71 }
},
'545': { start: { line: 1515, column: 8 }, end: { line: 1520, column: 9 } },
'546': {
start: { line: 1516, column: 10 },
end: { line: 1516, column: 72 }
},
'547': {
start: { line: 1517, column: 10 },
end: { line: 1517, column: 14 }
},
'548': {
start: { line: 1518, column: 10 },
end: { line: 1518, column: 73 }
},
'549': {
start: { line: 1519, column: 10 },
end: { line: 1519, column: 16 }
},
'550': {
start: { line: 1521, column: 8 },
end: { line: 1521, column: 22 }
},
'551': {
start: { line: 1522, column: 8 },
end: { line: 1522, column: 20 }
},
'552': {
start: { line: 1523, column: 8 },
end: { line: 1523, column: 12 }
},
'553': {
start: { line: 1527, column: 22 },
end: { line: 1527, column: 55 }
},
'554': { start: { line: 1529, column: 4 }, end: { line: 1575, column: 5 } },
'555': {
start: { line: 1530, column: 6 },
end: { line: 1530, column: 30 }
},
'556': {
start: { line: 1532, column: 6 },
end: { line: 1532, column: 71 }
},
'557': {
start: { line: 1533, column: 6 },
end: { line: 1533, column: 71 }
},
'558': { start: { line: 1535, column: 6 }, end: { line: 1545, column: 7 } },
'559': {
start: { line: 1536, column: 8 },
end: { line: 1539, column: 52 }
},
'560': {
start: { line: 1540, column: 8 },
end: { line: 1543, column: 52 }
},
'561': {
start: { line: 1544, column: 8 },
end: { line: 1544, column: 28 }
},
'562': {
start: { line: 1547, column: 6 },
end: { line: 1547, column: 55 }
},
'563': {
start: { line: 1548, column: 6 },
end: { line: 1548, column: 55 }
},
'564': {
start: { line: 1549, column: 11 },
end: { line: 1575, column: 5 }
},
'565': {
start: { line: 1550, column: 6 },
end: { line: 1550, column: 30 }
},
'566': {
start: { line: 1552, column: 6 },
end: { line: 1552, column: 71 }
},
'567': {
start: { line: 1553, column: 6 },
end: { line: 1553, column: 71 }
},
'568': {
start: { line: 1554, column: 6 },
end: { line: 1554, column: 71 }
},
'569': { start: { line: 1556, column: 6 }, end: { line: 1570, column: 7 } },
'570': {
start: { line: 1557, column: 8 },
end: { line: 1560, column: 52 }
},
'571': {
start: { line: 1561, column: 8 },
end: { line: 1564, column: 52 }
},
'572': {
start: { line: 1565, column: 8 },
end: { line: 1568, column: 52 }
},
'573': {
start: { line: 1569, column: 8 },
end: { line: 1569, column: 32 }
},
'574': {
start: { line: 1572, column: 6 },
end: { line: 1572, column: 55 }
},
'575': {
start: { line: 1573, column: 6 },
end: { line: 1573, column: 55 }
},
'576': {
start: { line: 1574, column: 6 },
end: { line: 1574, column: 55 }
},
'577': { start: { line: 1579, column: 0 }, end: { line: 1695, column: 2 } },
'578': {
start: { line: 1580, column: 12 },
end: { line: 1580, column: 14 }
},
'579': {
start: { line: 1581, column: 12 },
end: { line: 1581, column: 14 }
},
'580': {
start: { line: 1582, column: 12 },
end: { line: 1582, column: 14 }
},
'581': { start: { line: 1584, column: 2 }, end: { line: 1584, column: 8 } },
'582': {
start: { line: 1585, column: 20 },
end: { line: 1585, column: 31 }
},
'583': { start: { line: 1587, column: 2 }, end: { line: 1610, column: 3 } },
'584': {
start: { line: 1591, column: 4 },
end: { line: 1591, column: 33 }
},
'585': {
start: { line: 1592, column: 4 },
end: { line: 1592, column: 53 }
},
'586': {
start: { line: 1593, column: 17 },
end: { line: 1593, column: 42 }
},
'587': {
start: { line: 1594, column: 16 },
end: { line: 1594, column: 17 }
},
'588': {
start: { line: 1595, column: 14 },
end: { line: 1595, column: 15 }
},
'589': {
start: { line: 1596, column: 12 },
end: { line: 1596, column: 13 }
},
'590': { start: { line: 1597, column: 4 }, end: { line: 1609, column: 5 } },
'591': {
start: { line: 1598, column: 6 },
end: { line: 1598, column: 39 }
},
'592': {
start: { line: 1599, column: 6 },
end: { line: 1599, column: 63 }
},
'593': { start: { line: 1600, column: 6 }, end: { line: 1605, column: 7 } },
'594': {
start: { line: 1601, column: 8 },
end: { line: 1601, column: 70 }
},
'595': {
start: { line: 1602, column: 8 },
end: { line: 1602, column: 12 }
},
'596': {
start: { line: 1603, column: 8 },
end: { line: 1603, column: 65 }
},
'597': {
start: { line: 1604, column: 8 },
end: { line: 1604, column: 14 }
},
'598': {
start: { line: 1606, column: 6 },
end: { line: 1606, column: 20 }
},
'599': {
start: { line: 1607, column: 6 },
end: { line: 1607, column: 18 }
},
'600': {
start: { line: 1608, column: 6 },
end: { line: 1608, column: 10 }
},
'601': {
start: { line: 1612, column: 20 },
end: { line: 1612, column: 50 }
},
'602': { start: { line: 1614, column: 2 }, end: { line: 1694, column: 3 } },
'603': {
start: { line: 1615, column: 4 },
end: { line: 1615, column: 50 }
},
'604': {
start: { line: 1616, column: 4 },
end: { line: 1616, column: 50 }
},
'605': { start: { line: 1617, column: 4 }, end: { line: 1647, column: 5 } },
'606': {
start: { line: 1618, column: 6 },
end: { line: 1618, column: 26 }
},
'607': { start: { line: 1619, column: 6 }, end: { line: 1624, column: 9 } },
'608': { start: { line: 1625, column: 6 }, end: { line: 1630, column: 9 } },
'609': { start: { line: 1631, column: 6 }, end: { line: 1643, column: 7 } },
'610': {
start: { line: 1632, column: 8 },
end: { line: 1636, column: 49 }
},
'611': {
start: { line: 1637, column: 8 },
end: { line: 1641, column: 49 }
},
'612': {
start: { line: 1642, column: 8 },
end: { line: 1642, column: 28 }
},
'613': { start: { line: 1644, column: 6 }, end: { line: 1646, column: 7 } },
'614': {
start: { line: 1645, column: 8 },
end: { line: 1645, column: 48 }
},
'615': { start: { line: 1648, column: 9 }, end: { line: 1694, column: 3 } },
'616': {
start: { line: 1649, column: 4 },
end: { line: 1649, column: 50 }
},
'617': {
start: { line: 1650, column: 4 },
end: { line: 1650, column: 50 }
},
'618': {
start: { line: 1651, column: 4 },
end: { line: 1651, column: 50 }
},
'619': { start: { line: 1652, column: 4 }, end: { line: 1693, column: 5 } },
'620': {
start: { line: 1653, column: 6 },
end: { line: 1653, column: 26 }
},
'621': { start: { line: 1654, column: 6 }, end: { line: 1659, column: 9 } },
'622': { start: { line: 1660, column: 6 }, end: { line: 1665, column: 9 } },
'623': { start: { line: 1666, column: 6 }, end: { line: 1671, column: 9 } },
'624': { start: { line: 1672, column: 6 }, end: { line: 1689, column: 7 } },
'625': {
start: { line: 1673, column: 8 },
end: { line: 1677, column: 49 }
},
'626': {
start: { line: 1678, column: 8 },
end: { line: 1682, column: 49 }
},
'627': {
start: { line: 1683, column: 8 },
end: { line: 1687, column: 49 }
},
'628': {
start: { line: 1688, column: 8 },
end: { line: 1688, column: 32 }
},
'629': { start: { line: 1690, column: 6 }, end: { line: 1692, column: 7 } },
'630': {
start: { line: 1691, column: 8 },
end: { line: 1691, column: 48 }
},
'631': { start: { line: 1697, column: 0 }, end: { line: 1751, column: 2 } },
'632': { start: { line: 1708, column: 2 }, end: { line: 1710, column: 3 } },
'633': {
start: { line: 1709, column: 4 },
end: { line: 1709, column: 42 }
},
'634': {
start: { line: 1712, column: 2 },
end: { line: 1712, column: 21 }
},
'635': {
start: { line: 1714, column: 2 },
end: { line: 1714, column: 25 }
},
'636': {
start: { line: 1716, column: 2 },
end: { line: 1716, column: 27 }
},
'637': {
start: { line: 1717, column: 2 },
end: { line: 1717, column: 44 }
},
'638': {
start: { line: 1719, column: 11 },
end: { line: 1719, column: 12 }
},
'639': { start: { line: 1720, column: 2 }, end: { line: 1722, column: 3 } },
'640': {
start: { line: 1721, column: 4 },
end: { line: 1721, column: 24 }
},
'641': {
start: { line: 1724, column: 11 },
end: { line: 1724, column: 12 }
},
'642': { start: { line: 1725, column: 2 }, end: { line: 1727, column: 3 } },
'643': {
start: { line: 1726, column: 4 },
end: { line: 1726, column: 35 }
},
'644': {
start: { line: 1729, column: 11 },
end: { line: 1729, column: 12 }
},
'645': { start: { line: 1730, column: 2 }, end: { line: 1732, column: 3 } },
'646': {
start: { line: 1731, column: 4 },
end: { line: 1731, column: 25 }
},
'647': {
start: { line: 1734, column: 11 },
end: { line: 1734, column: 12 }
},
'648': { start: { line: 1735, column: 2 }, end: { line: 1737, column: 3 } },
'649': {
start: { line: 1736, column: 4 },
end: { line: 1736, column: 37 }
},
'650': {
start: { line: 1739, column: 2 },
end: { line: 1739, column: 20 }
},
'651': {
start: { line: 1740, column: 2 },
end: { line: 1740, column: 33 }
},
'652': {
start: { line: 1741, column: 2 },
end: { line: 1741, column: 42 }
},
'653': {
start: { line: 1742, column: 2 },
end: { line: 1742, column: 52 }
},
'654': {
start: { line: 1743, column: 2 },
end: { line: 1743, column: 43 }
},
'655': {
start: { line: 1744, column: 2 },
end: { line: 1744, column: 33 }
},
'656': {
start: { line: 1746, column: 2 },
end: { line: 1746, column: 20 }
},
'657': { start: { line: 1748, column: 2 }, end: { line: 1750, column: 3 } },
'658': { start: { line: 1749, column: 4 }, end: { line: 1749, column: 37 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 48, column: 21 }, end: { line: 48, column: 22 } },
loc: { start: { line: 48, column: 63 }, end: { line: 95, column: 1 } },
line: 48
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 68, column: 19 }, end: { line: 68, column: 20 } },
loc: { start: { line: 68, column: 30 }, end: { line: 79, column: 5 } },
line: 68
},
'2': {
name: '(anonymous_2)',
decl: {
start: { line: 126, column: 19 },
end: { line: 126, column: 20 }
},
loc: { start: { line: 126, column: 68 }, end: { line: 213, column: 1 } },
line: 126
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 150, column: 17 },
end: { line: 150, column: 18 }
},
loc: { start: { line: 150, column: 28 }, end: { line: 194, column: 5 } },
line: 150
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 283, column: 22 },
end: { line: 283, column: 23 }
},
loc: { start: { line: 283, column: 57 }, end: { line: 299, column: 1 } },
line: 283
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 308, column: 23 },
end: { line: 308, column: 24 }
},
loc: { start: { line: 316, column: 2 }, end: { line: 417, column: 1 } },
line: 316
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 495, column: 24 },
end: { line: 495, column: 25 }
},
loc: { start: { line: 502, column: 2 }, end: { line: 552, column: 1 } },
line: 502
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 630, column: 20 },
end: { line: 630, column: 21 }
},
loc: { start: { line: 630, column: 68 }, end: { line: 667, column: 1 } },
line: 630
},
'8': {
name: '(anonymous_8)',
decl: {
start: { line: 744, column: 25 },
end: { line: 744, column: 26 }
},
loc: { start: { line: 744, column: 79 }, end: { line: 802, column: 1 } },
line: 744
},
'9': {
name: '(anonymous_9)',
decl: {
start: { line: 767, column: 23 },
end: { line: 767, column: 24 }
},
loc: { start: { line: 767, column: 34 }, end: { line: 785, column: 5 } },
line: 767
},
'10': {
name: '(anonymous_10)',
decl: {
start: { line: 880, column: 21 },
end: { line: 880, column: 22 }
},
loc: { start: { line: 880, column: 68 }, end: { line: 949, column: 1 } },
line: 880
},
'11': {
name: '(anonymous_11)',
decl: {
start: { line: 906, column: 19 },
end: { line: 906, column: 20 }
},
loc: { start: { line: 906, column: 30 }, end: { line: 933, column: 5 } },
line: 906
},
'12': {
name: '(anonymous_12)',
decl: {
start: { line: 987, column: 32 },
end: { line: 987, column: 33 }
},
loc: { start: { line: 987, column: 50 }, end: { line: 997, column: 1 } },
line: 987
},
'13': {
name: '(anonymous_13)',
decl: {
start: { line: 999, column: 35 },
end: { line: 999, column: 36 }
},
loc: { start: { line: 999, column: 50 }, end: { line: 1049, column: 1 } },
line: 999
},
'14': {
name: '(anonymous_14)',
decl: {
start: { line: 1009, column: 22 },
end: { line: 1009, column: 23 }
},
loc: {
start: { line: 1009, column: 33 },
end: { line: 1018, column: 5 }
},
line: 1009
},
'15': {
name: '(anonymous_15)',
decl: {
start: { line: 1051, column: 34 },
end: { line: 1051, column: 35 }
},
loc: {
start: { line: 1051, column: 49 },
end: { line: 1062, column: 1 }
},
line: 1051
},
'16': {
name: '(anonymous_16)',
decl: {
start: { line: 1064, column: 30 },
end: { line: 1064, column: 31 }
},
loc: {
start: { line: 1064, column: 45 },
end: { line: 1178, column: 1 }
},
line: 1064
},
'17': {
name: '(anonymous_17)',
decl: {
start: { line: 1087, column: 17 },
end: { line: 1087, column: 18 }
},
loc: {
start: { line: 1087, column: 28 },
end: { line: 1152, column: 5 }
},
line: 1087
},
'18': {
name: '(anonymous_18)',
decl: {
start: { line: 1180, column: 31 },
end: { line: 1180, column: 32 }
},
loc: {
start: { line: 1180, column: 46 },
end: { line: 1233, column: 1 }
},
line: 1180
},
'19': {
name: '(anonymous_19)',
decl: {
start: { line: 1190, column: 18 },
end: { line: 1190, column: 19 }
},
loc: {
start: { line: 1190, column: 29 },
end: { line: 1209, column: 5 }
},
line: 1190
},
'20': {
name: '(anonymous_20)',
decl: {
start: { line: 1236, column: 31 },
end: { line: 1236, column: 32 }
},
loc: {
start: { line: 1236, column: 88 },
end: { line: 1258, column: 1 }
},
line: 1236
},
'21': {
name: '(anonymous_21)',
decl: {
start: { line: 1240, column: 18 },
end: { line: 1240, column: 19 }
},
loc: {
start: { line: 1240, column: 29 },
end: { line: 1247, column: 5 }
},
line: 1240
},
'22': {
name: '(anonymous_22)',
decl: {
start: { line: 1263, column: 33 },
end: { line: 1263, column: 34 }
},
loc: { start: { line: 1276, column: 2 }, end: { line: 1301, column: 1 } },
line: 1276
},
'23': {
name: '(anonymous_23)',
decl: {
start: { line: 1304, column: 32 },
end: { line: 1304, column: 33 }
},
loc: { start: { line: 1317, column: 2 }, end: { line: 1353, column: 1 } },
line: 1317
},
'24': {
name: '(anonymous_24)',
decl: {
start: { line: 1384, column: 31 },
end: { line: 1384, column: 32 }
},
loc: {
start: { line: 1384, column: 49 },
end: { line: 1397, column: 1 }
},
line: 1384
},
'25': {
name: '(anonymous_25)',
decl: {
start: { line: 1399, column: 39 },
end: { line: 1399, column: 40 }
},
loc: {
start: { line: 1399, column: 57 },
end: { line: 1488, column: 1 }
},
line: 1399
},
'26': {
name: '(anonymous_26)',
decl: {
start: { line: 1490, column: 42 },
end: { line: 1490, column: 43 }
},
loc: {
start: { line: 1490, column: 60 },
end: { line: 1577, column: 1 }
},
line: 1490
},
'27': {
name: '(anonymous_27)',
decl: {
start: { line: 1579, column: 38 },
end: { line: 1579, column: 39 }
},
loc: {
start: { line: 1579, column: 56 },
end: { line: 1695, column: 1 }
},
line: 1579
},
'28': {
name: '(anonymous_28)',
decl: {
start: { line: 1697, column: 32 },
end: { line: 1697, column: 33 }
},
loc: { start: { line: 1707, column: 2 }, end: { line: 1751, column: 1 } },
line: 1707
}
},
branchMap: {
'0': {
loc: { start: { line: 51, column: 2 }, end: { line: 53, column: 3 } },
type: 'if',
locations: [
{ start: { line: 51, column: 2 }, end: { line: 53, column: 3 } },
{ start: { line: 51, column: 2 }, end: { line: 53, column: 3 } }
],
line: 51
},
'1': {
loc: { start: { line: 54, column: 2 }, end: { line: 56, column: 3 } },
type: 'if',
locations: [
{ start: { line: 54, column: 2 }, end: { line: 56, column: 3 } },
{ start: { line: 54, column: 2 }, end: { line: 56, column: 3 } }
],
line: 54
},
'2': {
loc: { start: { line: 58, column: 2 }, end: { line: 60, column: 3 } },
type: 'if',
locations: [
{ start: { line: 58, column: 2 }, end: { line: 60, column: 3 } },
{ start: { line: 58, column: 2 }, end: { line: 60, column: 3 } }
],
line: 58
},
'3': {
loc: { start: { line: 61, column: 2 }, end: { line: 63, column: 3 } },
type: 'if',
locations: [
{ start: { line: 61, column: 2 }, end: { line: 63, column: 3 } },
{ start: { line: 61, column: 2 }, end: { line: 63, column: 3 } }
],
line: 61
},
'4': {
loc: { start: { line: 67, column: 2 }, end: { line: 91, column: 3 } },
type: 'if',
locations: [
{ start: { line: 67, column: 2 }, end: { line: 91, column: 3 } },
{ start: { line: 67, column: 2 }, end: { line: 91, column: 3 } }
],
line: 67
},
'5': {
loc: { start: { line: 82, column: 4 }, end: { line: 89, column: 5 } },
type: 'if',
locations: [
{ start: { line: 82, column: 4 }, end: { line: 89, column: 5 } },
{ start: { line: 82, column: 4 }, end: { line: 89, column: 5 } }
],
line: 82
},
'6': {
loc: { start: { line: 82, column: 8 }, end: { line: 82, column: 36 } },
type: 'binary-expr',
locations: [
{ start: { line: 82, column: 8 }, end: { line: 82, column: 20 } },
{ start: { line: 82, column: 24 }, end: { line: 82, column: 36 } }
],
line: 82
},
'7': {
loc: { start: { line: 84, column: 11 }, end: { line: 89, column: 5 } },
type: 'if',
locations: [
{ start: { line: 84, column: 11 }, end: { line: 89, column: 5 } },
{ start: { line: 84, column: 11 }, end: { line: 89, column: 5 } }
],
line: 84
},
'8': {
loc: { start: { line: 129, column: 2 }, end: { line: 131, column: 3 } },
type: 'if',
locations: [
{ start: { line: 129, column: 2 }, end: { line: 131, column: 3 } },
{ start: { line: 129, column: 2 }, end: { line: 131, column: 3 } }
],
line: 129
},
'9': {
loc: { start: { line: 132, column: 2 }, end: { line: 134, column: 3 } },
type: 'if',
locations: [
{ start: { line: 132, column: 2 }, end: { line: 134, column: 3 } },
{ start: { line: 132, column: 2 }, end: { line: 134, column: 3 } }
],
line: 132
},
'10': {
loc: { start: { line: 135, column: 2 }, end: { line: 137, column: 3 } },
type: 'if',
locations: [
{ start: { line: 135, column: 2 }, end: { line: 137, column: 3 } },
{ start: { line: 135, column: 2 }, end: { line: 137, column: 3 } }
],
line: 135
},
'11': {
loc: { start: { line: 140, column: 4 }, end: { line: 140, column: 75 } },
type: 'binary-expr',
locations: [
{ start: { line: 140, column: 4 }, end: { line: 140, column: 29 } },
{ start: { line: 140, column: 33 }, end: { line: 140, column: 75 } }
],
line: 140
},
'12': {
loc: { start: { line: 141, column: 2 }, end: { line: 143, column: 3 } },
type: 'if',
locations: [
{ start: { line: 141, column: 2 }, end: { line: 143, column: 3 } },
{ start: { line: 141, column: 2 }, end: { line: 143, column: 3 } }
],
line: 141
},
'13': {
loc: { start: { line: 142, column: 14 }, end: { line: 142, column: 38 } },
type: 'cond-expr',
locations: [
{ start: { line: 142, column: 33 }, end: { line: 142, column: 34 } },
{ start: { line: 142, column: 37 }, end: { line: 142, column: 38 } }
],
line: 142
},
'14': {
loc: { start: { line: 144, column: 2 }, end: { line: 146, column: 3 } },
type: 'if',
locations: [
{ start: { line: 144, column: 2 }, end: { line: 146, column: 3 } },
{ start: { line: 144, column: 2 }, end: { line: 146, column: 3 } }
],
line: 144
},
'15': {
loc: { start: { line: 145, column: 14 }, end: { line: 145, column: 38 } },
type: 'cond-expr',
locations: [
{ start: { line: 145, column: 33 }, end: { line: 145, column: 34 } },
{ start: { line: 145, column: 37 }, end: { line: 145, column: 38 } }
],
line: 145
},
'16': {
loc: { start: { line: 149, column: 2 }, end: { line: 209, column: 3 } },
type: 'if',
locations: [
{ start: { line: 149, column: 2 }, end: { line: 209, column: 3 } },
{ start: { line: 149, column: 2 }, end: { line: 209, column: 3 } }
],
line: 149
},
'17': {
loc: { start: { line: 197, column: 4 }, end: { line: 204, column: 5 } },
type: 'if',
locations: [
{ start: { line: 197, column: 4 }, end: { line: 204, column: 5 } },
{ start: { line: 197, column: 4 }, end: { line: 204, column: 5 } }
],
line: 197
},
'18': {
loc: { start: { line: 197, column: 8 }, end: { line: 197, column: 36 } },
type: 'binary-expr',
locations: [
{ start: { line: 197, column: 8 }, end: { line: 197, column: 20 } },
{ start: { line: 197, column: 24 }, end: { line: 197, column: 36 } }
],
line: 197
},
'19': {
loc: { start: { line: 199, column: 11 }, end: { line: 204, column: 5 } },
type: 'if',
locations: [
{ start: { line: 199, column: 11 }, end: { line: 204, column: 5 } },
{ start: { line: 199, column: 11 }, end: { line: 204, column: 5 } }
],
line: 199
},
'20': {
loc: { start: { line: 286, column: 2 }, end: { line: 288, column: 3 } },
type: 'if',
locations: [
{ start: { line: 286, column: 2 }, end: { line: 288, column: 3 } },
{ start: { line: 286, column: 2 }, end: { line: 288, column: 3 } }
],
line: 286
},
'21': {
loc: { start: { line: 289, column: 2 }, end: { line: 291, column: 3 } },
type: 'if',
locations: [
{ start: { line: 289, column: 2 }, end: { line: 291, column: 3 } },
{ start: { line: 289, column: 2 }, end: { line: 291, column: 3 } }
],
line: 289
},
'22': {
loc: { start: { line: 292, column: 2 }, end: { line: 294, column: 3 } },
type: 'if',
locations: [
{ start: { line: 292, column: 2 }, end: { line: 294, column: 3 } },
{ start: { line: 292, column: 2 }, end: { line: 294, column: 3 } }
],
line: 292
},
'23': {
loc: { start: { line: 317, column: 17 }, end: { line: 317, column: 53 } },
type: 'cond-expr',
locations: [
{ start: { line: 317, column: 37 }, end: { line: 317, column: 38 } },
{ start: { line: 317, column: 41 }, end: { line: 317, column: 53 } }
],
line: 317
},
'24': {
loc: { start: { line: 318, column: 14 }, end: { line: 318, column: 43 } },
type: 'cond-expr',
locations: [
{ start: { line: 318, column: 30 }, end: { line: 318, column: 31 } },
{ start: { line: 318, column: 34 }, end: { line: 318, column: 43 } }
],
line: 318
},
'25': {
loc: { start: { line: 319, column: 11 }, end: { line: 319, column: 46 } },
type: 'cond-expr',
locations: [
{ start: { line: 319, column: 25 }, end: { line: 319, column: 37 } },
{ start: { line: 319, column: 40 }, end: { line: 319, column: 46 } }
],
line: 319
},
'26': {
loc: { start: { line: 320, column: 12 }, end: { line: 320, column: 37 } },
type: 'cond-expr',
locations: [
{ start: { line: 320, column: 26 }, end: { line: 320, column: 27 } },
{ start: { line: 320, column: 30 }, end: { line: 320, column: 37 } }
],
line: 320
},
'27': {
loc: { start: { line: 321, column: 12 }, end: { line: 321, column: 37 } },
type: 'cond-expr',
locations: [
{ start: { line: 321, column: 26 }, end: { line: 321, column: 27 } },
{ start: { line: 321, column: 30 }, end: { line: 321, column: 37 } }
],
line: 321
},
'28': {
loc: { start: { line: 322, column: 14 }, end: { line: 322, column: 56 } },
type: 'cond-expr',
locations: [
{ start: { line: 322, column: 40 }, end: { line: 322, column: 44 } },
{ start: { line: 322, column: 47 }, end: { line: 322, column: 56 } }
],
line: 322
},
'29': {
loc: { start: { line: 323, column: 11 }, end: { line: 323, column: 58 } },
type: 'cond-expr',
locations: [
{ start: { line: 323, column: 34 }, end: { line: 323, column: 49 } },
{ start: { line: 323, column: 52 }, end: { line: 323, column: 58 } }
],
line: 323
},
'30': {
loc: { start: { line: 324, column: 16 }, end: { line: 324, column: 34 } },
type: 'cond-expr',
locations: [
{ start: { line: 324, column: 28 }, end: { line: 324, column: 30 } },
{ start: { line: 324, column: 33 }, end: { line: 324, column: 34 } }
],
line: 324
},
'31': {
loc: { start: { line: 325, column: 25 }, end: { line: 325, column: 39 } },
type: 'cond-expr',
locations: [
{ start: { line: 325, column: 34 }, end: { line: 325, column: 35 } },
{ start: { line: 325, column: 38 }, end: { line: 325, column: 39 } }
],
line: 325
},
'32': {
loc: { start: { line: 335, column: 4 }, end: { line: 348, column: 5 } },
type: 'if',
locations: [
{ start: { line: 335, column: 4 }, end: { line: 348, column: 5 } },
{ start: { line: 335, column: 4 }, end: { line: 348, column: 5 } }
],
line: 335
},
'33': {
loc: { start: { line: 340, column: 11 }, end: { line: 348, column: 5 } },
type: 'if',
locations: [
{ start: { line: 340, column: 11 }, end: { line: 348, column: 5 } },
{ start: { line: 340, column: 11 }, end: { line: 348, column: 5 } }
],
line: 340
},
'34': {
loc: { start: { line: 349, column: 4 }, end: { line: 352, column: 5 } },
type: 'if',
locations: [
{ start: { line: 349, column: 4 }, end: { line: 352, column: 5 } },
{ start: { line: 349, column: 4 }, end: { line: 352, column: 5 } }
],
line: 349
},
'35': {
loc: { start: { line: 349, column: 8 }, end: { line: 349, column: 39 } },
type: 'binary-expr',
locations: [
{ start: { line: 349, column: 8 }, end: { line: 349, column: 17 } },
{ start: { line: 349, column: 21 }, end: { line: 349, column: 39 } }
],
line: 349
},
'36': {
loc: { start: { line: 366, column: 6 }, end: { line: 372, column: 7 } },
type: 'if',
locations: [
{ start: { line: 366, column: 6 }, end: { line: 372, column: 7 } },
{ start: { line: 366, column: 6 }, end: { line: 372, column: 7 } }
],
line: 366
},
'37': {
loc: { start: { line: 368, column: 13 }, end: { line: 372, column: 7 } },
type: 'if',
locations: [
{ start: { line: 368, column: 13 }, end: { line: 372, column: 7 } },
{ start: { line: 368, column: 13 }, end: { line: 372, column: 7 } }
],
line: 368
},
'38': {
loc: { start: { line: 368, column: 17 }, end: { line: 368, column: 42 } },
type: 'binary-expr',
locations: [
{ start: { line: 368, column: 17 }, end: { line: 368, column: 29 } },
{ start: { line: 368, column: 33 }, end: { line: 368, column: 42 } }
],
line: 368
},
'39': {
loc: { start: { line: 380, column: 2 }, end: { line: 390, column: 3 } },
type: 'if',
locations: [
{ start: { line: 380, column: 2 }, end: { line: 390, column: 3 } },
{ start: { line: 380, column: 2 }, end: { line: 390, column: 3 } }
],
line: 380
},
'40': {
loc: { start: { line: 407, column: 2 }, end: { line: 416, column: 3 } },
type: 'if',
locations: [
{ start: { line: 407, column: 2 }, end: { line: 416, column: 3 } },
{ start: { line: 407, column: 2 }, end: { line: 416, column: 3 } }
],
line: 407
},
'41': {
loc: { start: { line: 505, column: 2 }, end: { line: 507, column: 3 } },
type: 'if',
locations: [
{ start: { line: 505, column: 2 }, end: { line: 507, column: 3 } },
{ start: { line: 505, column: 2 }, end: { line: 507, column: 3 } }
],
line: 505
},
'42': {
loc: { start: { line: 508, column: 2 }, end: { line: 510, column: 3 } },
type: 'if',
locations: [
{ start: { line: 508, column: 2 }, end: { line: 510, column: 3 } },
{ start: { line: 508, column: 2 }, end: { line: 510, column: 3 } }
],
line: 508
},
'43': {
loc: { start: { line: 511, column: 2 }, end: { line: 513, column: 3 } },
type: 'if',
locations: [
{ start: { line: 511, column: 2 }, end: { line: 513, column: 3 } },
{ start: { line: 511, column: 2 }, end: { line: 513, column: 3 } }
],
line: 511
},
'44': {
loc: { start: { line: 514, column: 2 }, end: { line: 516, column: 3 } },
type: 'if',
locations: [
{ start: { line: 514, column: 2 }, end: { line: 516, column: 3 } },
{ start: { line: 514, column: 2 }, end: { line: 516, column: 3 } }
],
line: 514
},
'45': {
loc: { start: { line: 517, column: 2 }, end: { line: 519, column: 3 } },
type: 'if',
locations: [
{ start: { line: 517, column: 2 }, end: { line: 519, column: 3 } },
{ start: { line: 517, column: 2 }, end: { line: 519, column: 3 } }
],
line: 517
},
'46': {
loc: { start: { line: 520, column: 2 }, end: { line: 522, column: 3 } },
type: 'if',
locations: [
{ start: { line: 520, column: 2 }, end: { line: 522, column: 3 } },
{ start: { line: 520, column: 2 }, end: { line: 522, column: 3 } }
],
line: 520
},
'47': {
loc: { start: { line: 525, column: 2 }, end: { line: 547, column: 3 } },
type: 'if',
locations: [
{ start: { line: 525, column: 2 }, end: { line: 547, column: 3 } },
{ start: { line: 525, column: 2 }, end: { line: 547, column: 3 } }
],
line: 525
},
'48': {
loc: { start: { line: 538, column: 4 }, end: { line: 545, column: 5 } },
type: 'if',
locations: [
{ start: { line: 538, column: 4 }, end: { line: 545, column: 5 } },
{ start: { line: 538, column: 4 }, end: { line: 545, column: 5 } }
],
line: 538
},
'49': {
loc: { start: { line: 538, column: 8 }, end: { line: 538, column: 38 } },
type: 'binary-expr',
locations: [
{ start: { line: 538, column: 8 }, end: { line: 538, column: 21 } },
{ start: { line: 538, column: 25 }, end: { line: 538, column: 38 } }
],
line: 538
},
'50': {
loc: { start: { line: 540, column: 11 }, end: { line: 545, column: 5 } },
type: 'if',
locations: [
{ start: { line: 540, column: 11 }, end: { line: 545, column: 5 } },
{ start: { line: 540, column: 11 }, end: { line: 545, column: 5 } }
],
line: 540
},
'51': {
loc: { start: { line: 633, column: 2 }, end: { line: 635, column: 3 } },
type: 'if',
locations: [
{ start: { line: 633, column: 2 }, end: { line: 635, column: 3 } },
{ start: { line: 633, column: 2 }, end: { line: 635, column: 3 } }
],
line: 633
},
'52': {
loc: { start: { line: 636, column: 2 }, end: { line: 638, column: 3 } },
type: 'if',
locations: [
{ start: { line: 636, column: 2 }, end: { line: 638, column: 3 } },
{ start: { line: 636, column: 2 }, end: { line: 638, column: 3 } }
],
line: 636
},
'53': {
loc: { start: { line: 639, column: 2 }, end: { line: 641, column: 3 } },
type: 'if',
locations: [
{ start: { line: 639, column: 2 }, end: { line: 641, column: 3 } },
{ start: { line: 639, column: 2 }, end: { line: 641, column: 3 } }
],
line: 639
},
'54': {
loc: { start: { line: 642, column: 2 }, end: { line: 644, column: 3 } },
type: 'if',
locations: [
{ start: { line: 642, column: 2 }, end: { line: 644, column: 3 } },
{ start: { line: 642, column: 2 }, end: { line: 644, column: 3 } }
],
line: 642
},
'55': {
loc: { start: { line: 645, column: 2 }, end: { line: 647, column: 3 } },
type: 'if',
locations: [
{ start: { line: 645, column: 2 }, end: { line: 647, column: 3 } },
{ start: { line: 645, column: 2 }, end: { line: 647, column: 3 } }
],
line: 645
},
'56': {
loc: { start: { line: 650, column: 2 }, end: { line: 662, column: 3 } },
type: 'if',
locations: [
{ start: { line: 650, column: 2 }, end: { line: 662, column: 3 } },
{ start: { line: 650, column: 2 }, end: { line: 662, column: 3 } }
],
line: 650
},
'57': {
loc: { start: { line: 653, column: 4 }, end: { line: 660, column: 5 } },
type: 'if',
locations: [
{ start: { line: 653, column: 4 }, end: { line: 660, column: 5 } },
{ start: { line: 653, column: 4 }, end: { line: 660, column: 5 } }
],
line: 653
},
'58': {
loc: { start: { line: 653, column: 8 }, end: { line: 653, column: 38 } },
type: 'binary-expr',
locations: [
{ start: { line: 653, column: 8 }, end: { line: 653, column: 21 } },
{ start: { line: 653, column: 25 }, end: { line: 653, column: 38 } }
],
line: 653
},
'59': {
loc: { start: { line: 655, column: 11 }, end: { line: 660, column: 5 } },
type: 'if',
locations: [
{ start: { line: 655, column: 11 }, end: { line: 660, column: 5 } },
{ start: { line: 655, column: 11 }, end: { line: 660, column: 5 } }
],
line: 655
},
'60': {
loc: { start: { line: 747, column: 2 }, end: { line: 749, column: 3 } },
type: 'if',
locations: [
{ start: { line: 747, column: 2 }, end: { line: 749, column: 3 } },
{ start: { line: 747, column: 2 }, end: { line: 749, column: 3 } }
],
line: 747
},
'61': {
loc: { start: { line: 750, column: 2 }, end: { line: 752, column: 3 } },
type: 'if',
locations: [
{ start: { line: 750, column: 2 }, end: { line: 752, column: 3 } },
{ start: { line: 750, column: 2 }, end: { line: 752, column: 3 } }
],
line: 750
},
'62': {
loc: { start: { line: 753, column: 2 }, end: { line: 755, column: 3 } },
type: 'if',
locations: [
{ start: { line: 753, column: 2 }, end: { line: 755, column: 3 } },
{ start: { line: 753, column: 2 }, end: { line: 755, column: 3 } }
],
line: 753
},
'63': {
loc: { start: { line: 757, column: 2 }, end: { line: 759, column: 3 } },
type: 'if',
locations: [
{ start: { line: 757, column: 2 }, end: { line: 759, column: 3 } },
{ start: { line: 757, column: 2 }, end: { line: 759, column: 3 } }
],
line: 757
},
'64': {
loc: { start: { line: 760, column: 2 }, end: { line: 762, column: 3 } },
type: 'if',
locations: [
{ start: { line: 760, column: 2 }, end: { line: 762, column: 3 } },
{ start: { line: 760, column: 2 }, end: { line: 762, column: 3 } }
],
line: 760
},
'65': {
loc: { start: { line: 766, column: 2 }, end: { line: 797, column: 3 } },
type: 'if',
locations: [
{ start: { line: 766, column: 2 }, end: { line: 797, column: 3 } },
{ start: { line: 766, column: 2 }, end: { line: 797, column: 3 } }
],
line: 766
},
'66': {
loc: { start: { line: 788, column: 4 }, end: { line: 795, column: 5 } },
type: 'if',
locations: [
{ start: { line: 788, column: 4 }, end: { line: 795, column: 5 } },
{ start: { line: 788, column: 4 }, end: { line: 795, column: 5 } }
],
line: 788
},
'67': {
loc: { start: { line: 788, column: 8 }, end: { line: 788, column: 38 } },
type: 'binary-expr',
locations: [
{ start: { line: 788, column: 8 }, end: { line: 788, column: 21 } },
{ start: { line: 788, column: 25 }, end: { line: 788, column: 38 } }
],
line: 788
},
'68': {
loc: { start: { line: 790, column: 11 }, end: { line: 795, column: 5 } },
type: 'if',
locations: [
{ start: { line: 790, column: 11 }, end: { line: 795, column: 5 } },
{ start: { line: 790, column: 11 }, end: { line: 795, column: 5 } }
],
line: 790
},
'69': {
loc: { start: { line: 883, column: 2 }, end: { line: 887, column: 3 } },
type: 'if',
locations: [
{ start: { line: 883, column: 2 }, end: { line: 887, column: 3 } },
{ start: { line: 883, column: 2 }, end: { line: 887, column: 3 } }
],
line: 883
},
'70': {
loc: { start: { line: 885, column: 9 }, end: { line: 887, column: 3 } },
type: 'if',
locations: [
{ start: { line: 885, column: 9 }, end: { line: 887, column: 3 } },
{ start: { line: 885, column: 9 }, end: { line: 887, column: 3 } }
],
line: 885
},
'71': {
loc: { start: { line: 889, column: 2 }, end: { line: 893, column: 3 } },
type: 'if',
locations: [
{ start: { line: 889, column: 2 }, end: { line: 893, column: 3 } },
{ start: { line: 889, column: 2 }, end: { line: 893, column: 3 } }
],
line: 889
},
'72': {
loc: { start: { line: 891, column: 9 }, end: { line: 893, column: 3 } },
type: 'if',
locations: [
{ start: { line: 891, column: 9 }, end: { line: 893, column: 3 } },
{ start: { line: 891, column: 9 }, end: { line: 893, column: 3 } }
],
line: 891
},
'73': {
loc: { start: { line: 895, column: 2 }, end: { line: 897, column: 3 } },
type: 'if',
locations: [
{ start: { line: 895, column: 2 }, end: { line: 897, column: 3 } },
{ start: { line: 895, column: 2 }, end: { line: 897, column: 3 } }
],
line: 895
},
'74': {
loc: { start: { line: 898, column: 2 }, end: { line: 900, column: 3 } },
type: 'if',
locations: [
{ start: { line: 898, column: 2 }, end: { line: 900, column: 3 } },
{ start: { line: 898, column: 2 }, end: { line: 900, column: 3 } }
],
line: 898
},
'75': {
loc: { start: { line: 905, column: 2 }, end: { line: 945, column: 3 } },
type: 'if',
locations: [
{ start: { line: 905, column: 2 }, end: { line: 945, column: 3 } },
{ start: { line: 905, column: 2 }, end: { line: 945, column: 3 } }
],
line: 905
},
'76': {
loc: { start: { line: 936, column: 4 }, end: { line: 943, column: 5 } },
type: 'if',
locations: [
{ start: { line: 936, column: 4 }, end: { line: 943, column: 5 } },
{ start: { line: 936, column: 4 }, end: { line: 943, column: 5 } }
],
line: 936
},
'77': {
loc: { start: { line: 936, column: 8 }, end: { line: 936, column: 38 } },
type: 'binary-expr',
locations: [
{ start: { line: 936, column: 8 }, end: { line: 936, column: 21 } },
{ start: { line: 936, column: 25 }, end: { line: 936, column: 38 } }
],
line: 936
},
'78': {
loc: { start: { line: 938, column: 11 }, end: { line: 943, column: 5 } },
type: 'if',
locations: [
{ start: { line: 938, column: 11 }, end: { line: 943, column: 5 } },
{ start: { line: 938, column: 11 }, end: { line: 943, column: 5 } }
],
line: 938
},
'79': {
loc: { start: { line: 988, column: 2 }, end: { line: 990, column: 3 } },
type: 'if',
locations: [
{ start: { line: 988, column: 2 }, end: { line: 990, column: 3 } },
{ start: { line: 988, column: 2 }, end: { line: 990, column: 3 } }
],
line: 988
},
'80': {
loc: { start: { line: 1008, column: 2 }, end: { line: 1023, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1008, column: 2 }, end: { line: 1023, column: 3 } },
{ start: { line: 1008, column: 2 }, end: { line: 1023, column: 3 } }
],
line: 1008
},
'81': {
loc: {
start: { line: 1072, column: 17 },
end: { line: 1072, column: 35 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1072, column: 17 }, end: { line: 1072, column: 29 } },
{ start: { line: 1072, column: 33 }, end: { line: 1072, column: 35 } }
],
line: 1072
},
'82': {
loc: { start: { line: 1078, column: 2 }, end: { line: 1084, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1078, column: 2 }, end: { line: 1084, column: 3 } },
{ start: { line: 1078, column: 2 }, end: { line: 1084, column: 3 } }
],
line: 1078
},
'83': {
loc: { start: { line: 1086, column: 2 }, end: { line: 1164, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1086, column: 2 }, end: { line: 1164, column: 3 } },
{ start: { line: 1086, column: 2 }, end: { line: 1164, column: 3 } }
],
line: 1086
},
'84': {
loc: { start: { line: 1091, column: 6 }, end: { line: 1151, column: 7 } },
type: 'if',
locations: [
{ start: { line: 1091, column: 6 }, end: { line: 1151, column: 7 } },
{ start: { line: 1091, column: 6 }, end: { line: 1151, column: 7 } }
],
line: 1091
},
'85': {
loc: { start: { line: 1093, column: 8 }, end: { line: 1096, column: 9 } },
type: 'if',
locations: [
{ start: { line: 1093, column: 8 }, end: { line: 1096, column: 9 } },
{ start: { line: 1093, column: 8 }, end: { line: 1096, column: 9 } }
],
line: 1093
},
'86': {
loc: {
start: { line: 1093, column: 12 },
end: { line: 1093, column: 65 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1093, column: 12 }, end: { line: 1093, column: 34 } },
{ start: { line: 1093, column: 38 }, end: { line: 1093, column: 65 } }
],
line: 1093
},
'87': {
loc: {
start: { line: 1109, column: 10 },
end: { line: 1112, column: 11 }
},
type: 'if',
locations: [
{ start: { line: 1109, column: 10 }, end: { line: 1112, column: 11 } },
{ start: { line: 1109, column: 10 }, end: { line: 1112, column: 11 } }
],
line: 1109
},
'88': {
loc: { start: { line: 1116, column: 8 }, end: { line: 1150, column: 9 } },
type: 'switch',
locations: [
{ start: { line: 1117, column: 10 }, end: { line: 1129, column: 18 } },
{ start: { line: 1131, column: 10 }, end: { line: 1134, column: 18 } },
{ start: { line: 1136, column: 10 }, end: { line: 1138, column: 18 } },
{ start: { line: 1140, column: 10 }, end: { line: 1149, column: 15 } }
],
line: 1116
},
'89': {
loc: { start: { line: 1157, column: 4 }, end: { line: 1161, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1157, column: 4 }, end: { line: 1161, column: 5 } },
{ start: { line: 1157, column: 4 }, end: { line: 1161, column: 5 } }
],
line: 1157
},
'90': {
loc: {
start: { line: 1159, column: 11 },
end: { line: 1161, column: 5 }
},
type: 'if',
locations: [
{ start: { line: 1159, column: 11 }, end: { line: 1161, column: 5 } },
{ start: { line: 1159, column: 11 }, end: { line: 1161, column: 5 } }
],
line: 1159
},
'91': {
loc: {
start: { line: 1186, column: 18 },
end: { line: 1186, column: 56 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1186, column: 18 }, end: { line: 1186, column: 25 } },
{ start: { line: 1186, column: 30 }, end: { line: 1186, column: 55 } }
],
line: 1186
},
'92': {
loc: {
start: { line: 1186, column: 30 },
end: { line: 1186, column: 55 }
},
type: 'cond-expr',
locations: [
{ start: { line: 1186, column: 49 }, end: { line: 1186, column: 50 } },
{ start: { line: 1186, column: 53 }, end: { line: 1186, column: 55 } }
],
line: 1186
},
'93': {
loc: {
start: { line: 1187, column: 18 },
end: { line: 1187, column: 56 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1187, column: 18 }, end: { line: 1187, column: 25 } },
{ start: { line: 1187, column: 30 }, end: { line: 1187, column: 55 } }
],
line: 1187
},
'94': {
loc: {
start: { line: 1187, column: 30 },
end: { line: 1187, column: 55 }
},
type: 'cond-expr',
locations: [
{ start: { line: 1187, column: 49 }, end: { line: 1187, column: 50 } },
{ start: { line: 1187, column: 53 }, end: { line: 1187, column: 55 } }
],
line: 1187
},
'95': {
loc: { start: { line: 1189, column: 2 }, end: { line: 1217, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1189, column: 2 }, end: { line: 1217, column: 3 } },
{ start: { line: 1189, column: 2 }, end: { line: 1217, column: 3 } }
],
line: 1189
},
'96': {
loc: { start: { line: 1201, column: 6 }, end: { line: 1208, column: 7 } },
type: 'if',
locations: [
{ start: { line: 1201, column: 6 }, end: { line: 1208, column: 7 } },
{ start: { line: 1201, column: 6 }, end: { line: 1208, column: 7 } }
],
line: 1201
},
'97': {
loc: {
start: { line: 1201, column: 10 },
end: { line: 1201, column: 36 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1201, column: 10 }, end: { line: 1201, column: 21 } },
{ start: { line: 1201, column: 25 }, end: { line: 1201, column: 36 } }
],
line: 1201
},
'98': {
loc: { start: { line: 1239, column: 2 }, end: { line: 1255, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1239, column: 2 }, end: { line: 1255, column: 3 } },
{ start: { line: 1239, column: 2 }, end: { line: 1255, column: 3 } }
],
line: 1239
},
'99': {
loc: { start: { line: 1277, column: 2 }, end: { line: 1285, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1277, column: 2 }, end: { line: 1285, column: 3 } },
{ start: { line: 1277, column: 2 }, end: { line: 1285, column: 3 } }
],
line: 1277
},
'100': {
loc: {
start: { line: 1286, column: 23 },
end: { line: 1286, column: 54 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1286, column: 23 }, end: { line: 1286, column: 48 } },
{ start: { line: 1286, column: 52 }, end: { line: 1286, column: 54 } }
],
line: 1286
},
'101': {
loc: { start: { line: 1318, column: 2 }, end: { line: 1326, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1318, column: 2 }, end: { line: 1326, column: 3 } },
{ start: { line: 1318, column: 2 }, end: { line: 1326, column: 3 } }
],
line: 1318
},
'102': {
loc: { start: { line: 1385, column: 2 }, end: { line: 1395, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1385, column: 2 }, end: { line: 1395, column: 3 } },
{ start: { line: 1385, column: 2 }, end: { line: 1395, column: 3 } }
],
line: 1385
},
'103': {
loc: { start: { line: 1390, column: 9 }, end: { line: 1395, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1390, column: 9 }, end: { line: 1395, column: 3 } },
{ start: { line: 1390, column: 9 }, end: { line: 1395, column: 3 } }
],
line: 1390
},
'104': {
loc: { start: { line: 1400, column: 2 }, end: { line: 1487, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1400, column: 2 }, end: { line: 1487, column: 3 } },
{ start: { line: 1400, column: 2 }, end: { line: 1487, column: 3 } }
],
line: 1400
},
'105': {
loc: { start: { line: 1411, column: 4 }, end: { line: 1434, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1411, column: 4 }, end: { line: 1434, column: 5 } },
{ start: { line: 1411, column: 4 }, end: { line: 1434, column: 5 } }
],
line: 1411
},
'106': {
loc: {
start: { line: 1412, column: 6 },
end: { line: 1413, column: 56 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1412, column: 6 }, end: { line: 1412, column: 42 } },
{ start: { line: 1413, column: 6 }, end: { line: 1413, column: 56 } }
],
line: 1412
},
'107': {
loc: { start: { line: 1424, column: 8 }, end: { line: 1429, column: 9 } },
type: 'if',
locations: [
{ start: { line: 1424, column: 8 }, end: { line: 1429, column: 9 } },
{ start: { line: 1424, column: 8 }, end: { line: 1429, column: 9 } }
],
line: 1424
},
'108': {
loc: { start: { line: 1438, column: 4 }, end: { line: 1486, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1438, column: 4 }, end: { line: 1486, column: 5 } },
{ start: { line: 1438, column: 4 }, end: { line: 1486, column: 5 } }
],
line: 1438
},
'109': {
loc: {
start: { line: 1459, column: 11 },
end: { line: 1486, column: 5 }
},
type: 'if',
locations: [
{ start: { line: 1459, column: 11 }, end: { line: 1486, column: 5 } },
{ start: { line: 1459, column: 11 }, end: { line: 1486, column: 5 } }
],
line: 1459
},
'110': {
loc: { start: { line: 1491, column: 2 }, end: { line: 1576, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1491, column: 2 }, end: { line: 1576, column: 3 } },
{ start: { line: 1491, column: 2 }, end: { line: 1576, column: 3 } }
],
line: 1491
},
'111': {
loc: { start: { line: 1502, column: 4 }, end: { line: 1525, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1502, column: 4 }, end: { line: 1525, column: 5 } },
{ start: { line: 1502, column: 4 }, end: { line: 1525, column: 5 } }
],
line: 1502
},
'112': {
loc: {
start: { line: 1503, column: 6 },
end: { line: 1504, column: 59 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1503, column: 6 }, end: { line: 1503, column: 45 } },
{ start: { line: 1504, column: 6 }, end: { line: 1504, column: 59 } }
],
line: 1503
},
'113': {
loc: { start: { line: 1515, column: 8 }, end: { line: 1520, column: 9 } },
type: 'if',
locations: [
{ start: { line: 1515, column: 8 }, end: { line: 1520, column: 9 } },
{ start: { line: 1515, column: 8 }, end: { line: 1520, column: 9 } }
],
line: 1515
},
'114': {
loc: { start: { line: 1529, column: 4 }, end: { line: 1575, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1529, column: 4 }, end: { line: 1575, column: 5 } },
{ start: { line: 1529, column: 4 }, end: { line: 1575, column: 5 } }
],
line: 1529
},
'115': {
loc: {
start: { line: 1549, column: 11 },
end: { line: 1575, column: 5 }
},
type: 'if',
locations: [
{ start: { line: 1549, column: 11 }, end: { line: 1575, column: 5 } },
{ start: { line: 1549, column: 11 }, end: { line: 1575, column: 5 } }
],
line: 1549
},
'116': {
loc: { start: { line: 1587, column: 2 }, end: { line: 1610, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1587, column: 2 }, end: { line: 1610, column: 3 } },
{ start: { line: 1587, column: 2 }, end: { line: 1610, column: 3 } }
],
line: 1587
},
'117': {
loc: {
start: { line: 1588, column: 4 },
end: { line: 1589, column: 54 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1588, column: 4 }, end: { line: 1588, column: 40 } },
{ start: { line: 1589, column: 4 }, end: { line: 1589, column: 54 } }
],
line: 1588
},
'118': {
loc: { start: { line: 1600, column: 6 }, end: { line: 1605, column: 7 } },
type: 'if',
locations: [
{ start: { line: 1600, column: 6 }, end: { line: 1605, column: 7 } },
{ start: { line: 1600, column: 6 }, end: { line: 1605, column: 7 } }
],
line: 1600
},
'119': {
loc: { start: { line: 1614, column: 2 }, end: { line: 1694, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1614, column: 2 }, end: { line: 1694, column: 3 } },
{ start: { line: 1614, column: 2 }, end: { line: 1694, column: 3 } }
],
line: 1614
},
'120': {
loc: { start: { line: 1617, column: 4 }, end: { line: 1647, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1617, column: 4 }, end: { line: 1647, column: 5 } },
{ start: { line: 1617, column: 4 }, end: { line: 1647, column: 5 } }
],
line: 1617
},
'121': {
loc: { start: { line: 1648, column: 9 }, end: { line: 1694, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1648, column: 9 }, end: { line: 1694, column: 3 } },
{ start: { line: 1648, column: 9 }, end: { line: 1694, column: 3 } }
],
line: 1648
},
'122': {
loc: { start: { line: 1652, column: 4 }, end: { line: 1693, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1652, column: 4 }, end: { line: 1693, column: 5 } },
{ start: { line: 1652, column: 4 }, end: { line: 1693, column: 5 } }
],
line: 1652
},
'123': {
loc: { start: { line: 1708, column: 2 }, end: { line: 1710, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1708, column: 2 }, end: { line: 1710, column: 3 } },
{ start: { line: 1708, column: 2 }, end: { line: 1710, column: 3 } }
],
line: 1708
},
'124': {
loc: { start: { line: 1720, column: 2 }, end: { line: 1722, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1720, column: 2 }, end: { line: 1722, column: 3 } },
{ start: { line: 1720, column: 2 }, end: { line: 1722, column: 3 } }
],
line: 1720
},
'125': {
loc: { start: { line: 1725, column: 2 }, end: { line: 1727, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1725, column: 2 }, end: { line: 1727, column: 3 } },
{ start: { line: 1725, column: 2 }, end: { line: 1727, column: 3 } }
],
line: 1725
},
'126': {
loc: { start: { line: 1730, column: 2 }, end: { line: 1732, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1730, column: 2 }, end: { line: 1732, column: 3 } },
{ start: { line: 1730, column: 2 }, end: { line: 1732, column: 3 } }
],
line: 1730
},
'127': {
loc: { start: { line: 1735, column: 2 }, end: { line: 1737, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1735, column: 2 }, end: { line: 1737, column: 3 } },
{ start: { line: 1735, column: 2 }, end: { line: 1737, column: 3 } }
],
line: 1735
},
'128': {
loc: { start: { line: 1748, column: 2 }, end: { line: 1750, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1748, column: 2 }, end: { line: 1750, column: 3 } },
{ start: { line: 1748, column: 2 }, end: { line: 1750, column: 3 } }
],
line: 1748
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0,
'123': 0,
'124': 0,
'125': 0,
'126': 0,
'127': 0,
'128': 0,
'129': 0,
'130': 0,
'131': 0,
'132': 0,
'133': 0,
'134': 0,
'135': 0,
'136': 0,
'137': 0,
'138': 0,
'139': 0,
'140': 0,
'141': 0,
'142': 0,
'143': 0,
'144': 0,
'145': 0,
'146': 0,
'147': 0,
'148': 0,
'149': 0,
'150': 0,
'151': 0,
'152': 0,
'153': 0,
'154': 0,
'155': 0,
'156': 0,
'157': 0,
'158': 0,
'159': 0,
'160': 0,
'161': 0,
'162': 0,
'163': 0,
'164': 0,
'165': 0,
'166': 0,
'167': 0,
'168': 0,
'169': 0,
'170': 0,
'171': 0,
'172': 0,
'173': 0,
'174': 0,
'175': 0,
'176': 0,
'177': 0,
'178': 0,
'179': 0,
'180': 0,
'181': 0,
'182': 0,
'183': 0,
'184': 0,
'185': 0,
'186': 0,
'187': 0,
'188': 0,
'189': 0,
'190': 0,
'191': 0,
'192': 0,
'193': 0,
'194': 0,
'195': 0,
'196': 0,
'197': 0,
'198': 0,
'199': 0,
'200': 0,
'201': 0,
'202': 0,
'203': 0,
'204': 0,
'205': 0,
'206': 0,
'207': 0,
'208': 0,
'209': 0,
'210': 0,
'211': 0,
'212': 0,
'213': 0,
'214': 0,
'215': 0,
'216': 0,
'217': 0,
'218': 0,
'219': 0,
'220': 0,
'221': 0,
'222': 0,
'223': 0,
'224': 0,
'225': 0,
'226': 0,
'227': 0,
'228': 0,
'229': 0,
'230': 0,
'231': 0,
'232': 0,
'233': 0,
'234': 0,
'235': 0,
'236': 0,
'237': 0,
'238': 0,
'239': 0,
'240': 0,
'241': 0,
'242': 0,
'243': 0,
'244': 0,
'245': 0,
'246': 0,
'247': 0,
'248': 0,
'249': 0,
'250': 0,
'251': 0,
'252': 0,
'253': 0,
'254': 0,
'255': 0,
'256': 0,
'257': 0,
'258': 0,
'259': 0,
'260': 0,
'261': 0,
'262': 0,
'263': 0,
'264': 0,
'265': 0,
'266': 0,
'267': 0,
'268': 0,
'269': 0,
'270': 0,
'271': 0,
'272': 0,
'273': 0,
'274': 0,
'275': 0,
'276': 0,
'277': 0,
'278': 0,
'279': 0,
'280': 0,
'281': 0,
'282': 0,
'283': 0,
'284': 0,
'285': 0,
'286': 0,
'287': 0,
'288': 0,
'289': 0,
'290': 0,
'291': 0,
'292': 0,
'293': 0,
'294': 0,
'295': 0,
'296': 0,
'297': 0,
'298': 0,
'299': 0,
'300': 0,
'301': 0,
'302': 0,
'303': 0,
'304': 0,
'305': 0,
'306': 0,
'307': 0,
'308': 0,
'309': 0,
'310': 0,
'311': 0,
'312': 0,
'313': 0,
'314': 0,
'315': 0,
'316': 0,
'317': 0,
'318': 0,
'319': 0,
'320': 0,
'321': 0,
'322': 0,
'323': 0,
'324': 0,
'325': 0,
'326': 0,
'327': 0,
'328': 0,
'329': 0,
'330': 0,
'331': 0,
'332': 0,
'333': 0,
'334': 0,
'335': 0,
'336': 0,
'337': 0,
'338': 0,
'339': 0,
'340': 0,
'341': 0,
'342': 0,
'343': 0,
'344': 0,
'345': 0,
'346': 0,
'347': 0,
'348': 0,
'349': 0,
'350': 0,
'351': 0,
'352': 0,
'353': 0,
'354': 0,
'355': 0,
'356': 0,
'357': 0,
'358': 0,
'359': 0,
'360': 0,
'361': 0,
'362': 0,
'363': 0,
'364': 0,
'365': 0,
'366': 0,
'367': 0,
'368': 0,
'369': 0,
'370': 0,
'371': 0,
'372': 0,
'373': 0,
'374': 0,
'375': 0,
'376': 0,
'377': 0,
'378': 0,
'379': 0,
'380': 0,
'381': 0,
'382': 0,
'383': 0,
'384': 0,
'385': 0,
'386': 0,
'387': 0,
'388': 0,
'389': 0,
'390': 0,
'391': 0,
'392': 0,
'393': 0,
'394': 0,
'395': 0,
'396': 0,
'397': 0,
'398': 0,
'399': 0,
'400': 0,
'401': 0,
'402': 0,
'403': 0,
'404': 0,
'405': 0,
'406': 0,
'407': 0,
'408': 0,
'409': 0,
'410': 0,
'411': 0,
'412': 0,
'413': 0,
'414': 0,
'415': 0,
'416': 0,
'417': 0,
'418': 0,
'419': 0,
'420': 0,
'421': 0,
'422': 0,
'423': 0,
'424': 0,
'425': 0,
'426': 0,
'427': 0,
'428': 0,
'429': 0,
'430': 0,
'431': 0,
'432': 0,
'433': 0,
'434': 0,
'435': 0,
'436': 0,
'437': 0,
'438': 0,
'439': 0,
'440': 0,
'441': 0,
'442': 0,
'443': 0,
'444': 0,
'445': 0,
'446': 0,
'447': 0,
'448': 0,
'449': 0,
'450': 0,
'451': 0,
'452': 0,
'453': 0,
'454': 0,
'455': 0,
'456': 0,
'457': 0,
'458': 0,
'459': 0,
'460': 0,
'461': 0,
'462': 0,
'463': 0,
'464': 0,
'465': 0,
'466': 0,
'467': 0,
'468': 0,
'469': 0,
'470': 0,
'471': 0,
'472': 0,
'473': 0,
'474': 0,
'475': 0,
'476': 0,
'477': 0,
'478': 0,
'479': 0,
'480': 0,
'481': 0,
'482': 0,
'483': 0,
'484': 0,
'485': 0,
'486': 0,
'487': 0,
'488': 0,
'489': 0,
'490': 0,
'491': 0,
'492': 0,
'493': 0,
'494': 0,
'495': 0,
'496': 0,
'497': 0,
'498': 0,
'499': 0,
'500': 0,
'501': 0,
'502': 0,
'503': 0,
'504': 0,
'505': 0,
'506': 0,
'507': 0,
'508': 0,
'509': 0,
'510': 0,
'511': 0,
'512': 0,
'513': 0,
'514': 0,
'515': 0,
'516': 0,
'517': 0,
'518': 0,
'519': 0,
'520': 0,
'521': 0,
'522': 0,
'523': 0,
'524': 0,
'525': 0,
'526': 0,
'527': 0,
'528': 0,
'529': 0,
'530': 0,
'531': 0,
'532': 0,
'533': 0,
'534': 0,
'535': 0,
'536': 0,
'537': 0,
'538': 0,
'539': 0,
'540': 0,
'541': 0,
'542': 0,
'543': 0,
'544': 0,
'545': 0,
'546': 0,
'547': 0,
'548': 0,
'549': 0,
'550': 0,
'551': 0,
'552': 0,
'553': 0,
'554': 0,
'555': 0,
'556': 0,
'557': 0,
'558': 0,
'559': 0,
'560': 0,
'561': 0,
'562': 0,
'563': 0,
'564': 0,
'565': 0,
'566': 0,
'567': 0,
'568': 0,
'569': 0,
'570': 0,
'571': 0,
'572': 0,
'573': 0,
'574': 0,
'575': 0,
'576': 0,
'577': 0,
'578': 0,
'579': 0,
'580': 0,
'581': 0,
'582': 0,
'583': 0,
'584': 0,
'585': 0,
'586': 0,
'587': 0,
'588': 0,
'589': 0,
'590': 0,
'591': 0,
'592': 0,
'593': 0,
'594': 0,
'595': 0,
'596': 0,
'597': 0,
'598': 0,
'599': 0,
'600': 0,
'601': 0,
'602': 0,
'603': 0,
'604': 0,
'605': 0,
'606': 0,
'607': 0,
'608': 0,
'609': 0,
'610': 0,
'611': 0,
'612': 0,
'613': 0,
'614': 0,
'615': 0,
'616': 0,
'617': 0,
'618': 0,
'619': 0,
'620': 0,
'621': 0,
'622': 0,
'623': 0,
'624': 0,
'625': 0,
'626': 0,
'627': 0,
'628': 0,
'629': 0,
'630': 0,
'631': 0,
'632': 0,
'633': 0,
'634': 0,
'635': 0,
'636': 0,
'637': 0,
'638': 0,
'639': 0,
'640': 0,
'641': 0,
'642': 0,
'643': 0,
'644': 0,
'645': 0,
'646': 0,
'647': 0,
'648': 0,
'649': 0,
'650': 0,
'651': 0,
'652': 0,
'653': 0,
'654': 0,
'655': 0,
'656': 0,
'657': 0,
'658': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0],
'20': [0, 0],
'21': [0, 0],
'22': [0, 0],
'23': [0, 0],
'24': [0, 0],
'25': [0, 0],
'26': [0, 0],
'27': [0, 0],
'28': [0, 0],
'29': [0, 0],
'30': [0, 0],
'31': [0, 0],
'32': [0, 0],
'33': [0, 0],
'34': [0, 0],
'35': [0, 0],
'36': [0, 0],
'37': [0, 0],
'38': [0, 0],
'39': [0, 0],
'40': [0, 0],
'41': [0, 0],
'42': [0, 0],
'43': [0, 0],
'44': [0, 0],
'45': [0, 0],
'46': [0, 0],
'47': [0, 0],
'48': [0, 0],
'49': [0, 0],
'50': [0, 0],
'51': [0, 0],
'52': [0, 0],
'53': [0, 0],
'54': [0, 0],
'55': [0, 0],
'56': [0, 0],
'57': [0, 0],
'58': [0, 0],
'59': [0, 0],
'60': [0, 0],
'61': [0, 0],
'62': [0, 0],
'63': [0, 0],
'64': [0, 0],
'65': [0, 0],
'66': [0, 0],
'67': [0, 0],
'68': [0, 0],
'69': [0, 0],
'70': [0, 0],
'71': [0, 0],
'72': [0, 0],
'73': [0, 0],
'74': [0, 0],
'75': [0, 0],
'76': [0, 0],
'77': [0, 0],
'78': [0, 0],
'79': [0, 0],
'80': [0, 0],
'81': [0, 0],
'82': [0, 0],
'83': [0, 0],
'84': [0, 0],
'85': [0, 0],
'86': [0, 0],
'87': [0, 0],
'88': [0, 0, 0, 0],
'89': [0, 0],
'90': [0, 0],
'91': [0, 0],
'92': [0, 0],
'93': [0, 0],
'94': [0, 0],
'95': [0, 0],
'96': [0, 0],
'97': [0, 0],
'98': [0, 0],
'99': [0, 0],
'100': [0, 0],
'101': [0, 0],
'102': [0, 0],
'103': [0, 0],
'104': [0, 0],
'105': [0, 0],
'106': [0, 0],
'107': [0, 0],
'108': [0, 0],
'109': [0, 0],
'110': [0, 0],
'111': [0, 0],
'112': [0, 0],
'113': [0, 0],
'114': [0, 0],
'115': [0, 0],
'116': [0, 0],
'117': [0, 0],
'118': [0, 0],
'119': [0, 0],
'120': [0, 0],
'121': [0, 0],
'122': [0, 0],
'123': [0, 0],
'124': [0, 0],
'125': [0, 0],
'126': [0, 0],
'127': [0, 0],
'128': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '0bce85703c60be415ae797c52c432d83d114d35f'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
_dereq_('./p5.Geometry');
var constants = _interopRequireWildcard(_dereq_('../core/constants'));
function _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function _getRequireWildcardCache() {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || (_typeof(obj) !== 'object' && typeof obj !== 'function')) {
return { default: obj };
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_7igscgozc.s[0]++;
/**
* Draw a plane with given a width and height
* @method plane
* @param {Number} [width] width of the plane
* @param {Number} [height] height of the plane
* @param {Integer} [detailX] Optional number of triangle
* subdivisions in x-dimension
* @param {Integer} [detailY] Optional number of triangle
* subdivisions in y-dimension
* @chainable
* @example
*
*
* // draw a plane
* // with width 50 and height 50
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(200);
* plane(50, 50);
* }
*
*
*
* @alt
* Nothing displayed on canvas
* Rotating interior view of a box with sides that change color.
* 3d red and green gradient.
* Rotating interior view of a cylinder with sides that change color.
* Rotating view of a cylinder with sides that change color.
* 3d red and green gradient.
* rotating view of a multi-colored cylinder with concave sides.
*/
_main.default.prototype.plane = function(width, height, detailX, detailY) {
cov_7igscgozc.f[0]++;
cov_7igscgozc.s[1]++;
this._assert3d('plane');
cov_7igscgozc.s[2]++;
_main.default._validateParameters('plane', arguments);
cov_7igscgozc.s[3]++;
if (typeof width === 'undefined') {
cov_7igscgozc.b[0][0]++;
cov_7igscgozc.s[4]++;
width = 50;
} else {
cov_7igscgozc.b[0][1]++;
}
cov_7igscgozc.s[5]++;
if (typeof height === 'undefined') {
cov_7igscgozc.b[1][0]++;
cov_7igscgozc.s[6]++;
height = width;
} else {
cov_7igscgozc.b[1][1]++;
}
cov_7igscgozc.s[7]++;
if (typeof detailX === 'undefined') {
cov_7igscgozc.b[2][0]++;
cov_7igscgozc.s[8]++;
detailX = 1;
} else {
cov_7igscgozc.b[2][1]++;
}
cov_7igscgozc.s[9]++;
if (typeof detailY === 'undefined') {
cov_7igscgozc.b[3][0]++;
cov_7igscgozc.s[10]++;
detailY = 1;
} else {
cov_7igscgozc.b[3][1]++;
}
var gId = (cov_7igscgozc.s[11]++,
'plane|'.concat(detailX, '|').concat(detailY));
cov_7igscgozc.s[12]++;
if (!this._renderer.geometryInHash(gId)) {
cov_7igscgozc.b[4][0]++;
cov_7igscgozc.s[13]++;
var _plane = function _plane() {
cov_7igscgozc.f[1]++;
var u, v, p;
cov_7igscgozc.s[14]++;
for (var i = (cov_7igscgozc.s[15]++, 0); i <= this.detailY; i++) {
cov_7igscgozc.s[16]++;
v = i / this.detailY;
cov_7igscgozc.s[17]++;
for (var j = (cov_7igscgozc.s[18]++, 0); j <= this.detailX; j++) {
cov_7igscgozc.s[19]++;
u = j / this.detailX;
cov_7igscgozc.s[20]++;
p = new _main.default.Vector(u - 0.5, v - 0.5, 0);
cov_7igscgozc.s[21]++;
this.vertices.push(p);
cov_7igscgozc.s[22]++;
this.uvs.push(u, v);
}
}
};
var planeGeom = (cov_7igscgozc.s[23]++,
new _main.default.Geometry(detailX, detailY, _plane));
cov_7igscgozc.s[24]++;
planeGeom.computeFaces().computeNormals();
cov_7igscgozc.s[25]++;
if (
(cov_7igscgozc.b[6][0]++, detailX <= 1) &&
(cov_7igscgozc.b[6][1]++, detailY <= 1)
) {
cov_7igscgozc.b[5][0]++;
cov_7igscgozc.s[26]++;
planeGeom._makeTriangleEdges()._edgesToVertices();
} else {
cov_7igscgozc.b[5][1]++;
cov_7igscgozc.s[27]++;
if (this._renderer._doStroke) {
cov_7igscgozc.b[7][0]++;
cov_7igscgozc.s[28]++;
console.log(
'Cannot draw stroke on plane objects with more' +
' than 1 detailX or 1 detailY'
);
} else {
cov_7igscgozc.b[7][1]++;
}
}
cov_7igscgozc.s[29]++;
this._renderer.createBuffers(gId, planeGeom);
} else {
cov_7igscgozc.b[4][1]++;
}
cov_7igscgozc.s[30]++;
this._renderer.drawBuffersScaled(gId, width, height, 1);
cov_7igscgozc.s[31]++;
return this;
};
/**
* Draw a box with given width, height and depth
* @method box
* @param {Number} [width] width of the box
* @param {Number} [Height] height of the box
* @param {Number} [depth] depth of the box
* @param {Integer} [detailX] Optional number of triangle
* subdivisions in x-dimension
* @param {Integer} [detailY] Optional number of triangle
* subdivisions in y-dimension
* @chainable
* @example
*
*
* // draw a spinning box
* // with width, height and depth of 50
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(200);
* rotateX(frameCount * 0.01);
* rotateY(frameCount * 0.01);
* box(50);
* }
*
*
*/ cov_7igscgozc.s[32]++;
_main.default.prototype.box = function(width, height, depth, detailX, detailY) {
cov_7igscgozc.f[2]++;
cov_7igscgozc.s[33]++;
this._assert3d('box');
cov_7igscgozc.s[34]++;
_main.default._validateParameters('box', arguments);
cov_7igscgozc.s[35]++;
if (typeof width === 'undefined') {
cov_7igscgozc.b[8][0]++;
cov_7igscgozc.s[36]++;
width = 50;
} else {
cov_7igscgozc.b[8][1]++;
}
cov_7igscgozc.s[37]++;
if (typeof height === 'undefined') {
cov_7igscgozc.b[9][0]++;
cov_7igscgozc.s[38]++;
height = width;
} else {
cov_7igscgozc.b[9][1]++;
}
cov_7igscgozc.s[39]++;
if (typeof depth === 'undefined') {
cov_7igscgozc.b[10][0]++;
cov_7igscgozc.s[40]++;
depth = height;
} else {
cov_7igscgozc.b[10][1]++;
}
var perPixelLighting = (cov_7igscgozc.s[41]++,
(cov_7igscgozc.b[11][0]++, this._renderer.attributes) &&
(cov_7igscgozc.b[11][1]++, this._renderer.attributes.perPixelLighting));
cov_7igscgozc.s[42]++;
if (typeof detailX === 'undefined') {
cov_7igscgozc.b[12][0]++;
cov_7igscgozc.s[43]++;
detailX = perPixelLighting
? (cov_7igscgozc.b[13][0]++, 1)
: (cov_7igscgozc.b[13][1]++, 4);
} else {
cov_7igscgozc.b[12][1]++;
}
cov_7igscgozc.s[44]++;
if (typeof detailY === 'undefined') {
cov_7igscgozc.b[14][0]++;
cov_7igscgozc.s[45]++;
detailY = perPixelLighting
? (cov_7igscgozc.b[15][0]++, 1)
: (cov_7igscgozc.b[15][1]++, 4);
} else {
cov_7igscgozc.b[14][1]++;
}
var gId = (cov_7igscgozc.s[46]++, 'box|'.concat(detailX, '|').concat(detailY));
cov_7igscgozc.s[47]++;
if (!this._renderer.geometryInHash(gId)) {
cov_7igscgozc.b[16][0]++;
cov_7igscgozc.s[48]++;
var _box = function _box() {
cov_7igscgozc.f[3]++;
var cubeIndices = (cov_7igscgozc.s[49]++,
[
[0, 4, 2, 6], // -1, 0, 0],// -x
[1, 3, 5, 7], // +1, 0, 0],// +x
[0, 1, 4, 5], // 0, -1, 0],// -y
[2, 6, 3, 7], // 0, +1, 0],// +y
[0, 2, 1, 3], // 0, 0, -1],// -z
[4, 5, 6, 7] // 0, 0, +1] // +z
]);
//using strokeIndices instead of faces for strokes
//to avoid diagonal stroke lines across face of box
cov_7igscgozc.s[50]++;
this.strokeIndices = [
[0, 1],
[1, 3],
[3, 2],
[6, 7],
[8, 9],
[9, 11],
[14, 15],
[16, 17],
[17, 19],
[18, 19],
[20, 21],
[22, 23]
];
cov_7igscgozc.s[51]++;
for (var i = (cov_7igscgozc.s[52]++, 0); i < cubeIndices.length; i++) {
var cubeIndex = (cov_7igscgozc.s[53]++, cubeIndices[i]);
var v = (cov_7igscgozc.s[54]++, i * 4);
cov_7igscgozc.s[55]++;
for (var j = (cov_7igscgozc.s[56]++, 0); j < 4; j++) {
var d = (cov_7igscgozc.s[57]++, cubeIndex[j]);
//inspired by lightgl:
//https://github.com/evanw/lightgl.js
//octants:https://en.wikipedia.org/wiki/Octant_(solid_geometry)
var octant = (cov_7igscgozc.s[58]++,
new _main.default.Vector(
((d & 1) * 2 - 1) / 2,
((d & 2) - 1) / 2,
((d & 4) / 2 - 1) / 2
));
cov_7igscgozc.s[59]++;
this.vertices.push(octant);
cov_7igscgozc.s[60]++;
this.uvs.push(j & 1, (j & 2) / 2);
}
cov_7igscgozc.s[61]++;
this.faces.push([v, v + 1, v + 2]);
cov_7igscgozc.s[62]++;
this.faces.push([v + 2, v + 1, v + 3]);
}
};
var boxGeom = (cov_7igscgozc.s[63]++,
new _main.default.Geometry(detailX, detailY, _box));
cov_7igscgozc.s[64]++;
boxGeom.computeNormals();
cov_7igscgozc.s[65]++;
if (
(cov_7igscgozc.b[18][0]++, detailX <= 4) &&
(cov_7igscgozc.b[18][1]++, detailY <= 4)
) {
cov_7igscgozc.b[17][0]++;
cov_7igscgozc.s[66]++;
boxGeom._makeTriangleEdges()._edgesToVertices();
} else {
cov_7igscgozc.b[17][1]++;
cov_7igscgozc.s[67]++;
if (this._renderer._doStroke) {
cov_7igscgozc.b[19][0]++;
cov_7igscgozc.s[68]++;
console.log(
'Cannot draw stroke on box objects with more' +
' than 4 detailX or 4 detailY'
);
} else {
cov_7igscgozc.b[19][1]++;
}
}
//initialize our geometry buffer with
//the key val pair:
//geometry Id, Geom object
cov_7igscgozc.s[69]++;
this._renderer.createBuffers(gId, boxGeom);
} else {
cov_7igscgozc.b[16][1]++;
}
cov_7igscgozc.s[70]++;
this._renderer.drawBuffersScaled(gId, width, height, depth);
cov_7igscgozc.s[71]++;
return this;
};
/**
* Draw a sphere with given radius.
*
* DetailX and detailY determines the number of subdivisions in the x-dimension
* and the y-dimension of a sphere. More subdivisions make the sphere seem
* smoother. The recommended maximum values are both 24. Using a value greater
* than 24 may cause a warning or slow down the browser.
* @method sphere
* @param {Number} [radius] radius of circle
* @param {Integer} [detailX] optional number of subdivisions in x-dimension
* @param {Integer} [detailY] optional number of subdivisions in y-dimension
*
* @chainable
* @example
*
*
* // draw a sphere with radius 40
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(205, 102, 94);
* sphere(40);
* }
*
*
*
* @example
*
*
* let detailX;
* // slide to see how detailX works
* function setup() {
* createCanvas(100, 100, WEBGL);
* detailX = createSlider(3, 24, 3);
* detailX.position(10, height + 5);
* detailX.style('width', '80px');
* }
*
* function draw() {
* background(205, 105, 94);
* rotateY(millis() / 1000);
* sphere(40, detailX.value(), 16);
* }
*
*
*
* @example
*
*
* let detailY;
* // slide to see how detailY works
* function setup() {
* createCanvas(100, 100, WEBGL);
* detailY = createSlider(3, 16, 3);
* detailY.position(10, height + 5);
* detailY.style('width', '80px');
* }
*
* function draw() {
* background(205, 105, 94);
* rotateY(millis() / 1000);
* sphere(40, 16, detailY.value());
* }
*
*
*/ cov_7igscgozc.s[72]++;
_main.default.prototype.sphere = function(radius, detailX, detailY) {
cov_7igscgozc.f[4]++;
cov_7igscgozc.s[73]++;
this._assert3d('sphere');
cov_7igscgozc.s[74]++;
_main.default._validateParameters('sphere', arguments);
cov_7igscgozc.s[75]++;
if (typeof radius === 'undefined') {
cov_7igscgozc.b[20][0]++;
cov_7igscgozc.s[76]++;
radius = 50;
} else {
cov_7igscgozc.b[20][1]++;
}
cov_7igscgozc.s[77]++;
if (typeof detailX === 'undefined') {
cov_7igscgozc.b[21][0]++;
cov_7igscgozc.s[78]++;
detailX = 24;
} else {
cov_7igscgozc.b[21][1]++;
}
cov_7igscgozc.s[79]++;
if (typeof detailY === 'undefined') {
cov_7igscgozc.b[22][0]++;
cov_7igscgozc.s[80]++;
detailY = 16;
} else {
cov_7igscgozc.b[22][1]++;
}
cov_7igscgozc.s[81]++;
this.ellipsoid(radius, radius, radius, detailX, detailY);
cov_7igscgozc.s[82]++;
return this;
};
/**
* @private
* Helper function for creating both cones and cylinders
* Will only generate well-defined geometry when bottomRadius, height > 0
* and topRadius >= 0
* If topRadius == 0, topCap should be false
*/ cov_7igscgozc.s[83]++;
var _truncatedCone = function _truncatedCone(
bottomRadius,
topRadius,
height,
detailX,
detailY,
bottomCap,
topCap
) {
cov_7igscgozc.f[5]++;
cov_7igscgozc.s[84]++;
bottomRadius =
bottomRadius <= 0
? (cov_7igscgozc.b[23][0]++, 1)
: (cov_7igscgozc.b[23][1]++, bottomRadius);
cov_7igscgozc.s[85]++;
topRadius =
topRadius < 0
? (cov_7igscgozc.b[24][0]++, 0)
: (cov_7igscgozc.b[24][1]++, topRadius);
cov_7igscgozc.s[86]++;
height =
height <= 0
? (cov_7igscgozc.b[25][0]++, bottomRadius)
: (cov_7igscgozc.b[25][1]++, height);
cov_7igscgozc.s[87]++;
detailX =
detailX < 3
? (cov_7igscgozc.b[26][0]++, 3)
: (cov_7igscgozc.b[26][1]++, detailX);
cov_7igscgozc.s[88]++;
detailY =
detailY < 1
? (cov_7igscgozc.b[27][0]++, 1)
: (cov_7igscgozc.b[27][1]++, detailY);
cov_7igscgozc.s[89]++;
bottomCap =
bottomCap === undefined
? (cov_7igscgozc.b[28][0]++, true)
: (cov_7igscgozc.b[28][1]++, bottomCap);
cov_7igscgozc.s[90]++;
topCap =
topCap === undefined
? (cov_7igscgozc.b[29][0]++, topRadius !== 0)
: (cov_7igscgozc.b[29][1]++, topCap);
var start = (cov_7igscgozc.s[91]++,
bottomCap ? (cov_7igscgozc.b[30][0]++, -2) : (cov_7igscgozc.b[30][1]++, 0));
var end = (cov_7igscgozc.s[92]++,
detailY +
(topCap ? (cov_7igscgozc.b[31][0]++, 2) : (cov_7igscgozc.b[31][1]++, 0)));
//ensure constant slant for interior vertex normals
var slant = (cov_7igscgozc.s[93]++,
Math.atan2(bottomRadius - topRadius, height));
var sinSlant = (cov_7igscgozc.s[94]++, Math.sin(slant));
var cosSlant = (cov_7igscgozc.s[95]++, Math.cos(slant));
var yy, ii, jj;
cov_7igscgozc.s[96]++;
for (yy = start; yy <= end; ++yy) {
var v = (cov_7igscgozc.s[97]++, yy / detailY);
var y = (cov_7igscgozc.s[98]++, height * v);
var ringRadius = void 0;
cov_7igscgozc.s[99]++;
if (yy < 0) {
cov_7igscgozc.b[32][0]++;
cov_7igscgozc.s[100]++;
//for the bottomCap edge
y = 0;
cov_7igscgozc.s[101]++;
v = 0;
cov_7igscgozc.s[102]++;
ringRadius = bottomRadius;
} else {
cov_7igscgozc.b[32][1]++;
cov_7igscgozc.s[103]++;
if (yy > detailY) {
cov_7igscgozc.b[33][0]++;
cov_7igscgozc.s[104]++;
//for the topCap edge
y = height;
cov_7igscgozc.s[105]++;
v = 1;
cov_7igscgozc.s[106]++;
ringRadius = topRadius;
} else {
cov_7igscgozc.b[33][1]++;
cov_7igscgozc.s[107]++;
//for the middle
ringRadius = bottomRadius + (topRadius - bottomRadius) * v;
}
}
cov_7igscgozc.s[108]++;
if (
(cov_7igscgozc.b[35][0]++, yy === -2) ||
(cov_7igscgozc.b[35][1]++, yy === detailY + 2)
) {
cov_7igscgozc.b[34][0]++;
cov_7igscgozc.s[109]++;
//center of bottom or top caps
ringRadius = 0;
} else {
cov_7igscgozc.b[34][1]++;
}
cov_7igscgozc.s[110]++;
y -= height / 2; //shift coordiate origin to the center of object
cov_7igscgozc.s[111]++;
for (ii = 0; ii < detailX; ++ii) {
var u = (cov_7igscgozc.s[112]++, ii / (detailX - 1));
var ur = (cov_7igscgozc.s[113]++, 2 * Math.PI * u);
var sur = (cov_7igscgozc.s[114]++, Math.sin(ur));
var cur = (cov_7igscgozc.s[115]++, Math.cos(ur));
//VERTICES
cov_7igscgozc.s[116]++;
this.vertices.push(
new _main.default.Vector(sur * ringRadius, y, cur * ringRadius)
);
//VERTEX NORMALS
var vertexNormal = void 0;
cov_7igscgozc.s[117]++;
if (yy < 0) {
cov_7igscgozc.b[36][0]++;
cov_7igscgozc.s[118]++;
vertexNormal = new _main.default.Vector(0, -1, 0);
} else {
cov_7igscgozc.b[36][1]++;
cov_7igscgozc.s[119]++;
if (
(cov_7igscgozc.b[38][0]++, yy > detailY) &&
(cov_7igscgozc.b[38][1]++, topRadius)
) {
cov_7igscgozc.b[37][0]++;
cov_7igscgozc.s[120]++;
vertexNormal = new _main.default.Vector(0, 1, 0);
} else {
cov_7igscgozc.b[37][1]++;
cov_7igscgozc.s[121]++;
vertexNormal = new _main.default.Vector(
sur * cosSlant,
sinSlant,
cur * cosSlant
);
}
}
cov_7igscgozc.s[122]++;
this.vertexNormals.push(vertexNormal);
//UVs
cov_7igscgozc.s[123]++;
this.uvs.push(u, v);
}
}
var startIndex = (cov_7igscgozc.s[124]++, 0);
cov_7igscgozc.s[125]++;
if (bottomCap) {
cov_7igscgozc.b[39][0]++;
cov_7igscgozc.s[126]++;
for (jj = 0; jj < detailX; ++jj) {
var nextjj = (cov_7igscgozc.s[127]++, (jj + 1) % detailX);
cov_7igscgozc.s[128]++;
this.faces.push([
startIndex + jj,
startIndex + detailX + nextjj,
startIndex + detailX + jj
]);
}
cov_7igscgozc.s[129]++;
startIndex += detailX * 2;
} else {
cov_7igscgozc.b[39][1]++;
}
cov_7igscgozc.s[130]++;
for (yy = 0; yy < detailY; ++yy) {
cov_7igscgozc.s[131]++;
for (ii = 0; ii < detailX; ++ii) {
var nextii = (cov_7igscgozc.s[132]++, (ii + 1) % detailX);
cov_7igscgozc.s[133]++;
this.faces.push([
startIndex + ii,
startIndex + nextii,
startIndex + detailX + nextii
]);
cov_7igscgozc.s[134]++;
this.faces.push([
startIndex + ii,
startIndex + detailX + nextii,
startIndex + detailX + ii
]);
}
cov_7igscgozc.s[135]++;
startIndex += detailX;
}
cov_7igscgozc.s[136]++;
if (topCap) {
cov_7igscgozc.b[40][0]++;
cov_7igscgozc.s[137]++;
startIndex += detailX;
cov_7igscgozc.s[138]++;
for (ii = 0; ii < detailX; ++ii) {
cov_7igscgozc.s[139]++;
this.faces.push([
startIndex + ii,
startIndex + (ii + 1) % detailX,
startIndex + detailX
]);
}
} else {
cov_7igscgozc.b[40][1]++;
}
};
/**
* Draw a cylinder with given radius and height
*
* DetailX and detailY determines the number of subdivisions in the x-dimension
* and the y-dimension of a cylinder. More subdivisions make the cylinder seem smoother.
* The recommended maximum value for detailX is 24. Using a value greater than 24
* may cause a warning or slow down the browser.
*
* @method cylinder
* @param {Number} [radius] radius of the surface
* @param {Number} [height] height of the cylinder
* @param {Integer} [detailX] number of subdivisions in x-dimension;
* default is 24
* @param {Integer} [detailY] number of subdivisions in y-dimension;
* default is 1
* @param {Boolean} [bottomCap] whether to draw the bottom of the cylinder
* @param {Boolean} [topCap] whether to draw the top of the cylinder
* @chainable
* @example
*
*
* // draw a spinning cylinder
* // with radius 20 and height 50
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(205, 105, 94);
* rotateX(frameCount * 0.01);
* rotateZ(frameCount * 0.01);
* cylinder(20, 50);
* }
*
*
*
* @example
*
*
* // slide to see how detailX works
* let detailX;
* function setup() {
* createCanvas(100, 100, WEBGL);
* detailX = createSlider(3, 24, 3);
* detailX.position(10, height + 5);
* detailX.style('width', '80px');
* }
*
* function draw() {
* background(205, 105, 94);
* rotateY(millis() / 1000);
* cylinder(20, 75, detailX.value(), 1);
* }
*
*
*
* @example
*
*
* // slide to see how detailY works
* let detailY;
* function setup() {
* createCanvas(100, 100, WEBGL);
* detailY = createSlider(1, 16, 1);
* detailY.position(10, height + 5);
* detailY.style('width', '80px');
* }
*
* function draw() {
* background(205, 105, 94);
* rotateY(millis() / 1000);
* cylinder(20, 75, 16, detailY.value());
* }
*
*
*/ cov_7igscgozc.s[140]++;
_main.default.prototype.cylinder = function(
radius,
height,
detailX,
detailY,
bottomCap,
topCap
) {
cov_7igscgozc.f[6]++;
cov_7igscgozc.s[141]++;
this._assert3d('cylinder');
cov_7igscgozc.s[142]++;
_main.default._validateParameters('cylinder', arguments);
cov_7igscgozc.s[143]++;
if (typeof radius === 'undefined') {
cov_7igscgozc.b[41][0]++;
cov_7igscgozc.s[144]++;
radius = 50;
} else {
cov_7igscgozc.b[41][1]++;
}
cov_7igscgozc.s[145]++;
if (typeof height === 'undefined') {
cov_7igscgozc.b[42][0]++;
cov_7igscgozc.s[146]++;
height = radius;
} else {
cov_7igscgozc.b[42][1]++;
}
cov_7igscgozc.s[147]++;
if (typeof detailX === 'undefined') {
cov_7igscgozc.b[43][0]++;
cov_7igscgozc.s[148]++;
detailX = 24;
} else {
cov_7igscgozc.b[43][1]++;
}
cov_7igscgozc.s[149]++;
if (typeof detailY === 'undefined') {
cov_7igscgozc.b[44][0]++;
cov_7igscgozc.s[150]++;
detailY = 1;
} else {
cov_7igscgozc.b[44][1]++;
}
cov_7igscgozc.s[151]++;
if (typeof topCap === 'undefined') {
cov_7igscgozc.b[45][0]++;
cov_7igscgozc.s[152]++;
topCap = true;
} else {
cov_7igscgozc.b[45][1]++;
}
cov_7igscgozc.s[153]++;
if (typeof bottomCap === 'undefined') {
cov_7igscgozc.b[46][0]++;
cov_7igscgozc.s[154]++;
bottomCap = true;
} else {
cov_7igscgozc.b[46][1]++;
}
var gId = (cov_7igscgozc.s[155]++,
'cylinder|'
.concat(detailX, '|')
.concat(detailY, '|')
.concat(bottomCap, '|')
.concat(topCap));
cov_7igscgozc.s[156]++;
if (!this._renderer.geometryInHash(gId)) {
cov_7igscgozc.b[47][0]++;
var cylinderGeom = (cov_7igscgozc.s[157]++,
new _main.default.Geometry(detailX, detailY));
cov_7igscgozc.s[158]++;
_truncatedCone.call(
cylinderGeom,
1,
1,
1,
detailX,
detailY,
bottomCap,
topCap
);
// normals are computed in call to _truncatedCone
cov_7igscgozc.s[159]++;
if (
(cov_7igscgozc.b[49][0]++, detailX <= 24) &&
(cov_7igscgozc.b[49][1]++, detailY <= 16)
) {
cov_7igscgozc.b[48][0]++;
cov_7igscgozc.s[160]++;
cylinderGeom._makeTriangleEdges()._edgesToVertices();
} else {
cov_7igscgozc.b[48][1]++;
cov_7igscgozc.s[161]++;
if (this._renderer._doStroke) {
cov_7igscgozc.b[50][0]++;
cov_7igscgozc.s[162]++;
console.log(
'Cannot draw stroke on cylinder objects with more' +
' than 24 detailX or 16 detailY'
);
} else {
cov_7igscgozc.b[50][1]++;
}
}
cov_7igscgozc.s[163]++;
this._renderer.createBuffers(gId, cylinderGeom);
} else {
cov_7igscgozc.b[47][1]++;
}
cov_7igscgozc.s[164]++;
this._renderer.drawBuffersScaled(gId, radius, height, radius);
cov_7igscgozc.s[165]++;
return this;
};
/**
* Draw a cone with given radius and height
*
* DetailX and detailY determine the number of subdivisions in the x-dimension and
* the y-dimension of a cone. More subdivisions make the cone seem smoother. The
* recommended maximum value for detailX is 24. Using a value greater than 24
* may cause a warning or slow down the browser.
* @method cone
* @param {Number} [radius] radius of the bottom surface
* @param {Number} [height] height of the cone
* @param {Integer} [detailX] number of segments,
* the more segments the smoother geometry
* default is 24
* @param {Integer} [detailY] number of segments,
* the more segments the smoother geometry
* default is 1
* @param {Boolean} [cap] whether to draw the base of the cone
* @chainable
* @example
*
*
* // draw a spinning cone
* // with radius 40 and height 70
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(200);
* rotateX(frameCount * 0.01);
* rotateZ(frameCount * 0.01);
* cone(40, 70);
* }
*
*
*
* @example
*
*
* // slide to see how detailx works
* let detailX;
* function setup() {
* createCanvas(100, 100, WEBGL);
* detailX = createSlider(3, 16, 3);
* detailX.position(10, height + 5);
* detailX.style('width', '80px');
* }
*
* function draw() {
* background(205, 102, 94);
* rotateY(millis() / 1000);
* cone(30, 65, detailX.value(), 16);
* }
*
*
*
* @example
*
*
* // slide to see how detailY works
* let detailY;
* function setup() {
* createCanvas(100, 100, WEBGL);
* detailY = createSlider(3, 16, 3);
* detailY.position(10, height + 5);
* detailY.style('width', '80px');
* }
*
* function draw() {
* background(205, 102, 94);
* rotateY(millis() / 1000);
* cone(30, 65, 16, detailY.value());
* }
*
*
*/ cov_7igscgozc.s[166]++;
_main.default.prototype.cone = function(radius, height, detailX, detailY, cap) {
cov_7igscgozc.f[7]++;
cov_7igscgozc.s[167]++;
this._assert3d('cone');
cov_7igscgozc.s[168]++;
_main.default._validateParameters('cone', arguments);
cov_7igscgozc.s[169]++;
if (typeof radius === 'undefined') {
cov_7igscgozc.b[51][0]++;
cov_7igscgozc.s[170]++;
radius = 50;
} else {
cov_7igscgozc.b[51][1]++;
}
cov_7igscgozc.s[171]++;
if (typeof height === 'undefined') {
cov_7igscgozc.b[52][0]++;
cov_7igscgozc.s[172]++;
height = radius;
} else {
cov_7igscgozc.b[52][1]++;
}
cov_7igscgozc.s[173]++;
if (typeof detailX === 'undefined') {
cov_7igscgozc.b[53][0]++;
cov_7igscgozc.s[174]++;
detailX = 24;
} else {
cov_7igscgozc.b[53][1]++;
}
cov_7igscgozc.s[175]++;
if (typeof detailY === 'undefined') {
cov_7igscgozc.b[54][0]++;
cov_7igscgozc.s[176]++;
detailY = 1;
} else {
cov_7igscgozc.b[54][1]++;
}
cov_7igscgozc.s[177]++;
if (typeof cap === 'undefined') {
cov_7igscgozc.b[55][0]++;
cov_7igscgozc.s[178]++;
cap = true;
} else {
cov_7igscgozc.b[55][1]++;
}
var gId = (cov_7igscgozc.s[179]++,
'cone|'
.concat(detailX, '|')
.concat(detailY, '|')
.concat(cap));
cov_7igscgozc.s[180]++;
if (!this._renderer.geometryInHash(gId)) {
cov_7igscgozc.b[56][0]++;
var coneGeom = (cov_7igscgozc.s[181]++,
new _main.default.Geometry(detailX, detailY));
cov_7igscgozc.s[182]++;
_truncatedCone.call(coneGeom, 1, 0, 1, detailX, detailY, cap, false);
cov_7igscgozc.s[183]++;
if (
(cov_7igscgozc.b[58][0]++, detailX <= 24) &&
(cov_7igscgozc.b[58][1]++, detailY <= 16)
) {
cov_7igscgozc.b[57][0]++;
cov_7igscgozc.s[184]++;
coneGeom._makeTriangleEdges()._edgesToVertices();
} else {
cov_7igscgozc.b[57][1]++;
cov_7igscgozc.s[185]++;
if (this._renderer._doStroke) {
cov_7igscgozc.b[59][0]++;
cov_7igscgozc.s[186]++;
console.log(
'Cannot draw stroke on cone objects with more' +
' than 24 detailX or 16 detailY'
);
} else {
cov_7igscgozc.b[59][1]++;
}
}
cov_7igscgozc.s[187]++;
this._renderer.createBuffers(gId, coneGeom);
} else {
cov_7igscgozc.b[56][1]++;
}
cov_7igscgozc.s[188]++;
this._renderer.drawBuffersScaled(gId, radius, height, radius);
cov_7igscgozc.s[189]++;
return this;
};
/**
* Draw an ellipsoid with given radius
*
* DetailX and detailY determine the number of subdivisions in the x-dimension and
* the y-dimension of a cone. More subdivisions make the ellipsoid appear to be smoother.
* Avoid detail number above 150, it may crash the browser.
* @method ellipsoid
* @param {Number} [radiusx] x-radius of ellipsoid
* @param {Number} [radiusy] y-radius of ellipsoid
* @param {Number} [radiusz] z-radius of ellipsoid
* @param {Integer} [detailX] number of segments,
* the more segments the smoother geometry
* default is 24. Avoid detail number above
* 150, it may crash the browser.
* @param {Integer} [detailY] number of segments,
* the more segments the smoother geometry
* default is 16. Avoid detail number above
* 150, it may crash the browser.
* @chainable
* @example
*
*
* // draw an ellipsoid
* // with radius 30, 40 and 40.
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(205, 105, 94);
* ellipsoid(30, 40, 40);
* }
*
*
*
* @example
*
*
* // slide to see how detailX works
* let detailX;
* function setup() {
* createCanvas(100, 100, WEBGL);
* detailX = createSlider(2, 24, 12);
* detailX.position(10, height + 5);
* detailX.style('width', '80px');
* }
*
* function draw() {
* background(205, 105, 94);
* rotateY(millis() / 1000);
* ellipsoid(30, 40, 40, detailX.value(), 8);
* }
*
*
*
* @example
*
*
* // slide to see how detailY works
* let detailY;
* function setup() {
* createCanvas(100, 100, WEBGL);
* detailY = createSlider(2, 24, 6);
* detailY.position(10, height + 5);
* detailY.style('width', '80px');
* }
*
* function draw() {
* background(205, 105, 9);
* rotateY(millis() / 1000);
* ellipsoid(30, 40, 40, 12, detailY.value());
* }
*
*
*/ cov_7igscgozc.s[190]++;
_main.default.prototype.ellipsoid = function(
radiusX,
radiusY,
radiusZ,
detailX,
detailY
) {
cov_7igscgozc.f[8]++;
cov_7igscgozc.s[191]++;
this._assert3d('ellipsoid');
cov_7igscgozc.s[192]++;
_main.default._validateParameters('ellipsoid', arguments);
cov_7igscgozc.s[193]++;
if (typeof radiusX === 'undefined') {
cov_7igscgozc.b[60][0]++;
cov_7igscgozc.s[194]++;
radiusX = 50;
} else {
cov_7igscgozc.b[60][1]++;
}
cov_7igscgozc.s[195]++;
if (typeof radiusY === 'undefined') {
cov_7igscgozc.b[61][0]++;
cov_7igscgozc.s[196]++;
radiusY = radiusX;
} else {
cov_7igscgozc.b[61][1]++;
}
cov_7igscgozc.s[197]++;
if (typeof radiusZ === 'undefined') {
cov_7igscgozc.b[62][0]++;
cov_7igscgozc.s[198]++;
radiusZ = radiusX;
} else {
cov_7igscgozc.b[62][1]++;
}
cov_7igscgozc.s[199]++;
if (typeof detailX === 'undefined') {
cov_7igscgozc.b[63][0]++;
cov_7igscgozc.s[200]++;
detailX = 24;
} else {
cov_7igscgozc.b[63][1]++;
}
cov_7igscgozc.s[201]++;
if (typeof detailY === 'undefined') {
cov_7igscgozc.b[64][0]++;
cov_7igscgozc.s[202]++;
detailY = 16;
} else {
cov_7igscgozc.b[64][1]++;
}
var gId = (cov_7igscgozc.s[203]++,
'ellipsoid|'.concat(detailX, '|').concat(detailY));
cov_7igscgozc.s[204]++;
if (!this._renderer.geometryInHash(gId)) {
cov_7igscgozc.b[65][0]++;
cov_7igscgozc.s[205]++;
var _ellipsoid = function _ellipsoid() {
cov_7igscgozc.f[9]++;
cov_7igscgozc.s[206]++;
for (var i = (cov_7igscgozc.s[207]++, 0); i <= this.detailY; i++) {
var v = (cov_7igscgozc.s[208]++, i / this.detailY);
var phi = (cov_7igscgozc.s[209]++, Math.PI * v - Math.PI / 2);
var cosPhi = (cov_7igscgozc.s[210]++, Math.cos(phi));
var sinPhi = (cov_7igscgozc.s[211]++, Math.sin(phi));
cov_7igscgozc.s[212]++;
for (var j = (cov_7igscgozc.s[213]++, 0); j <= this.detailX; j++) {
var u = (cov_7igscgozc.s[214]++, j / this.detailX);
var theta = (cov_7igscgozc.s[215]++, 2 * Math.PI * u);
var cosTheta = (cov_7igscgozc.s[216]++, Math.cos(theta));
var sinTheta = (cov_7igscgozc.s[217]++, Math.sin(theta));
var p = (cov_7igscgozc.s[218]++,
new _main.default.Vector(cosPhi * sinTheta, sinPhi, cosPhi * cosTheta));
cov_7igscgozc.s[219]++;
this.vertices.push(p);
cov_7igscgozc.s[220]++;
this.vertexNormals.push(p);
cov_7igscgozc.s[221]++;
this.uvs.push(u, v);
}
}
};
var ellipsoidGeom = (cov_7igscgozc.s[222]++,
new _main.default.Geometry(detailX, detailY, _ellipsoid));
cov_7igscgozc.s[223]++;
ellipsoidGeom.computeFaces();
cov_7igscgozc.s[224]++;
if (
(cov_7igscgozc.b[67][0]++, detailX <= 24) &&
(cov_7igscgozc.b[67][1]++, detailY <= 24)
) {
cov_7igscgozc.b[66][0]++;
cov_7igscgozc.s[225]++;
ellipsoidGeom._makeTriangleEdges()._edgesToVertices();
} else {
cov_7igscgozc.b[66][1]++;
cov_7igscgozc.s[226]++;
if (this._renderer._doStroke) {
cov_7igscgozc.b[68][0]++;
cov_7igscgozc.s[227]++;
console.log(
'Cannot draw stroke on ellipsoids with more' +
' than 24 detailX or 24 detailY'
);
} else {
cov_7igscgozc.b[68][1]++;
}
}
cov_7igscgozc.s[228]++;
this._renderer.createBuffers(gId, ellipsoidGeom);
} else {
cov_7igscgozc.b[65][1]++;
}
cov_7igscgozc.s[229]++;
this._renderer.drawBuffersScaled(gId, radiusX, radiusY, radiusZ);
cov_7igscgozc.s[230]++;
return this;
};
/**
* Draw a torus with given radius and tube radius
*
* DetailX and detailY determine the number of subdivisions in the x-dimension and
* the y-dimension of a torus. More subdivisions make the torus appear to be smoother.
* The default and maximum values for detailX and detailY are 24 and 16, respectively.
* Setting them to relatively small values like 4 and 6 allows you to create new
* shapes other than a torus.
* @method torus
* @param {Number} [radius] radius of the whole ring
* @param {Number} [tubeRadius] radius of the tube
* @param {Integer} [detailX] number of segments in x-dimension,
* the more segments the smoother geometry
* default is 24
* @param {Integer} [detailY] number of segments in y-dimension,
* the more segments the smoother geometry
* default is 16
* @chainable
* @example
*
*
* // draw a spinning torus
* // with ring radius 30 and tube radius 15
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(205, 102, 94);
* rotateX(frameCount * 0.01);
* rotateY(frameCount * 0.01);
* torus(30, 15);
* }
*
*
*
* @example
*
*
* // slide to see how detailX works
* let detailX;
* function setup() {
* createCanvas(100, 100, WEBGL);
* detailX = createSlider(3, 24, 3);
* detailX.position(10, height + 5);
* detailX.style('width', '80px');
* }
*
* function draw() {
* background(205, 102, 94);
* rotateY(millis() / 1000);
* torus(30, 15, detailX.value(), 12);
* }
*
*
*
* @example
*
*
* // slide to see how detailY works
* let detailY;
* function setup() {
* createCanvas(100, 100, WEBGL);
* detailY = createSlider(3, 16, 3);
* detailY.position(10, height + 5);
* detailY.style('width', '80px');
* }
*
* function draw() {
* background(205, 102, 94);
* rotateY(millis() / 1000);
* torus(30, 15, 16, detailY.value());
* }
*
*
*/ cov_7igscgozc.s[231]++;
_main.default.prototype.torus = function(radius, tubeRadius, detailX, detailY) {
cov_7igscgozc.f[10]++;
cov_7igscgozc.s[232]++;
this._assert3d('torus');
cov_7igscgozc.s[233]++;
_main.default._validateParameters('torus', arguments);
cov_7igscgozc.s[234]++;
if (typeof radius === 'undefined') {
cov_7igscgozc.b[69][0]++;
cov_7igscgozc.s[235]++;
radius = 50;
} else {
cov_7igscgozc.b[69][1]++;
cov_7igscgozc.s[236]++;
if (!radius) {
cov_7igscgozc.b[70][0]++;
cov_7igscgozc.s[237]++;
return; // nothing to draw
} else {
cov_7igscgozc.b[70][1]++;
}
}
cov_7igscgozc.s[238]++;
if (typeof tubeRadius === 'undefined') {
cov_7igscgozc.b[71][0]++;
cov_7igscgozc.s[239]++;
tubeRadius = 10;
} else {
cov_7igscgozc.b[71][1]++;
cov_7igscgozc.s[240]++;
if (!tubeRadius) {
cov_7igscgozc.b[72][0]++;
cov_7igscgozc.s[241]++;
return; // nothing to draw
} else {
cov_7igscgozc.b[72][1]++;
}
}
cov_7igscgozc.s[242]++;
if (typeof detailX === 'undefined') {
cov_7igscgozc.b[73][0]++;
cov_7igscgozc.s[243]++;
detailX = 24;
} else {
cov_7igscgozc.b[73][1]++;
}
cov_7igscgozc.s[244]++;
if (typeof detailY === 'undefined') {
cov_7igscgozc.b[74][0]++;
cov_7igscgozc.s[245]++;
detailY = 16;
} else {
cov_7igscgozc.b[74][1]++;
}
var tubeRatio = (cov_7igscgozc.s[246]++, (tubeRadius / radius).toPrecision(4));
var gId = (cov_7igscgozc.s[247]++,
'torus|'
.concat(tubeRatio, '|')
.concat(detailX, '|')
.concat(detailY));
cov_7igscgozc.s[248]++;
if (!this._renderer.geometryInHash(gId)) {
cov_7igscgozc.b[75][0]++;
cov_7igscgozc.s[249]++;
var _torus = function _torus() {
cov_7igscgozc.f[11]++;
cov_7igscgozc.s[250]++;
for (var i = (cov_7igscgozc.s[251]++, 0); i <= this.detailY; i++) {
var v = (cov_7igscgozc.s[252]++, i / this.detailY);
var phi = (cov_7igscgozc.s[253]++, 2 * Math.PI * v);
var cosPhi = (cov_7igscgozc.s[254]++, Math.cos(phi));
var sinPhi = (cov_7igscgozc.s[255]++, Math.sin(phi));
var r = (cov_7igscgozc.s[256]++, 1 + tubeRatio * cosPhi);
cov_7igscgozc.s[257]++;
for (var j = (cov_7igscgozc.s[258]++, 0); j <= this.detailX; j++) {
var u = (cov_7igscgozc.s[259]++, j / this.detailX);
var theta = (cov_7igscgozc.s[260]++, 2 * Math.PI * u);
var cosTheta = (cov_7igscgozc.s[261]++, Math.cos(theta));
var sinTheta = (cov_7igscgozc.s[262]++, Math.sin(theta));
var p = (cov_7igscgozc.s[263]++,
new _main.default.Vector(
r * cosTheta,
r * sinTheta,
tubeRatio * sinPhi
));
var n = (cov_7igscgozc.s[264]++,
new _main.default.Vector(cosPhi * cosTheta, cosPhi * sinTheta, sinPhi));
cov_7igscgozc.s[265]++;
this.vertices.push(p);
cov_7igscgozc.s[266]++;
this.vertexNormals.push(n);
cov_7igscgozc.s[267]++;
this.uvs.push(u, v);
}
}
};
var torusGeom = (cov_7igscgozc.s[268]++,
new _main.default.Geometry(detailX, detailY, _torus));
cov_7igscgozc.s[269]++;
torusGeom.computeFaces();
cov_7igscgozc.s[270]++;
if (
(cov_7igscgozc.b[77][0]++, detailX <= 24) &&
(cov_7igscgozc.b[77][1]++, detailY <= 16)
) {
cov_7igscgozc.b[76][0]++;
cov_7igscgozc.s[271]++;
torusGeom._makeTriangleEdges()._edgesToVertices();
} else {
cov_7igscgozc.b[76][1]++;
cov_7igscgozc.s[272]++;
if (this._renderer._doStroke) {
cov_7igscgozc.b[78][0]++;
cov_7igscgozc.s[273]++;
console.log(
'Cannot draw strokes on torus object with more' +
' than 24 detailX or 16 detailY'
);
} else {
cov_7igscgozc.b[78][1]++;
}
}
cov_7igscgozc.s[274]++;
this._renderer.createBuffers(gId, torusGeom);
} else {
cov_7igscgozc.b[75][1]++;
}
cov_7igscgozc.s[275]++;
this._renderer.drawBuffersScaled(gId, radius, radius, radius);
cov_7igscgozc.s[276]++;
return this;
};
///////////////////////
/// 2D primitives
/////////////////////////
/**
* Draws a point, a coordinate in space at the dimension of one pixel,
* given x, y and z coordinates. The color of the point is determined
* by the current stroke, while the point size is determined by current
* stroke weight.
* @private
* @param {Number} x x-coordinate of point
* @param {Number} y y-coordinate of point
* @param {Number} z z-coordinate of point
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(50);
* stroke(255);
* strokeWeight(4);
* point(25, 0);
* strokeWeight(3);
* point(-25, 0);
* strokeWeight(2);
* point(0, 25);
* strokeWeight(1);
* point(0, -25);
* }
*
*
*/ cov_7igscgozc.s[277]++;
_main.default.RendererGL.prototype.point = function(x, y, z) {
cov_7igscgozc.f[12]++;
cov_7igscgozc.s[278]++;
if (typeof z === 'undefined') {
cov_7igscgozc.b[79][0]++;
cov_7igscgozc.s[279]++;
z = 0;
} else {
cov_7igscgozc.b[79][1]++;
}
var _vertex = (cov_7igscgozc.s[280]++, []);
cov_7igscgozc.s[281]++;
_vertex.push(new _main.default.Vector(x, y, z));
cov_7igscgozc.s[282]++;
this._drawPoints(_vertex, this.immediateMode.buffers.point);
cov_7igscgozc.s[283]++;
return this;
};
cov_7igscgozc.s[284]++;
_main.default.RendererGL.prototype.triangle = function(args) {
cov_7igscgozc.f[13]++;
var x1 = (cov_7igscgozc.s[285]++, args[0]),
y1 = (cov_7igscgozc.s[286]++, args[1]);
var x2 = (cov_7igscgozc.s[287]++, args[2]),
y2 = (cov_7igscgozc.s[288]++, args[3]);
var x3 = (cov_7igscgozc.s[289]++, args[4]),
y3 = (cov_7igscgozc.s[290]++, args[5]);
var gId = (cov_7igscgozc.s[291]++, 'tri');
cov_7igscgozc.s[292]++;
if (!this.geometryInHash(gId)) {
cov_7igscgozc.b[80][0]++;
cov_7igscgozc.s[293]++;
var _triangle = function _triangle() {
cov_7igscgozc.f[14]++;
var vertices = (cov_7igscgozc.s[294]++, []);
cov_7igscgozc.s[295]++;
vertices.push(new _main.default.Vector(0, 0, 0));
cov_7igscgozc.s[296]++;
vertices.push(new _main.default.Vector(0, 1, 0));
cov_7igscgozc.s[297]++;
vertices.push(new _main.default.Vector(1, 0, 0));
cov_7igscgozc.s[298]++;
this.strokeIndices = [[0, 1], [1, 2], [2, 0]];
cov_7igscgozc.s[299]++;
this.vertices = vertices;
cov_7igscgozc.s[300]++;
this.faces = [[0, 1, 2]];
cov_7igscgozc.s[301]++;
this.uvs = [0, 0, 0, 1, 1, 1];
};
var triGeom = (cov_7igscgozc.s[302]++,
new _main.default.Geometry(1, 1, _triangle));
cov_7igscgozc.s[303]++;
triGeom._makeTriangleEdges()._edgesToVertices();
cov_7igscgozc.s[304]++;
triGeom.computeNormals();
cov_7igscgozc.s[305]++;
this.createBuffers(gId, triGeom);
} else {
cov_7igscgozc.b[80][1]++;
}
// only one triangle is cached, one point is at the origin, and the
// two adjacent sides are tne unit vectors along the X & Y axes.
//
// this matrix multiplication transforms those two unit vectors
// onto the required vector prior to rendering, and moves the
// origin appropriately.
var uMVMatrix = (cov_7igscgozc.s[306]++, this.uMVMatrix.copy());
cov_7igscgozc.s[307]++;
try {
// prettier-ignore
var mult = (cov_7igscgozc.s[308]++, new _main.default.Matrix([
x2 - x1, y2 - y1, 0, 0, // the resulting unit X-axis
x3 - x1, y3 - y1, 0, 0, // the resulting unit Y-axis
0, 0, 1, 0, // the resulting unit Z-axis (unchanged)
x1, y1, 0, 1 // the resulting origin
]).mult(this.uMVMatrix));
cov_7igscgozc.s[309]++;
this.uMVMatrix = mult;
cov_7igscgozc.s[310]++;
this.drawBuffers(gId);
} finally {
cov_7igscgozc.s[311]++;
this.uMVMatrix = uMVMatrix;
}
cov_7igscgozc.s[312]++;
return this;
};
cov_7igscgozc.s[313]++;
_main.default.RendererGL.prototype.ellipse = function(args) {
cov_7igscgozc.f[15]++;
cov_7igscgozc.s[314]++;
this.arc(
args[0],
args[1],
args[2],
args[3],
0,
constants.TWO_PI,
constants.OPEN,
args[4]
);
};
cov_7igscgozc.s[315]++;
_main.default.RendererGL.prototype.arc = function(args) {
cov_7igscgozc.f[16]++;
var x = (cov_7igscgozc.s[316]++, arguments[0]);
var y = (cov_7igscgozc.s[317]++, arguments[1]);
var width = (cov_7igscgozc.s[318]++, arguments[2]);
var height = (cov_7igscgozc.s[319]++, arguments[3]);
var start = (cov_7igscgozc.s[320]++, arguments[4]);
var stop = (cov_7igscgozc.s[321]++, arguments[5]);
var mode = (cov_7igscgozc.s[322]++, arguments[6]);
var detail = (cov_7igscgozc.s[323]++,
(cov_7igscgozc.b[81][0]++, arguments[7]) || (cov_7igscgozc.b[81][1]++, 25));
var shape;
var gId;
// check if it is an ellipse or an arc
cov_7igscgozc.s[324]++;
if (Math.abs(stop - start) >= constants.TWO_PI) {
cov_7igscgozc.b[82][0]++;
cov_7igscgozc.s[325]++;
shape = 'ellipse';
cov_7igscgozc.s[326]++;
gId = ''.concat(shape, '|').concat(detail, '|');
} else {
cov_7igscgozc.b[82][1]++;
cov_7igscgozc.s[327]++;
shape = 'arc';
cov_7igscgozc.s[328]++;
gId = ''
.concat(shape, '|')
.concat(start, '|')
.concat(stop, '|')
.concat(mode, '|')
.concat(detail, '|');
}
cov_7igscgozc.s[329]++;
if (!this.geometryInHash(gId)) {
cov_7igscgozc.b[83][0]++;
cov_7igscgozc.s[330]++;
var _arc = function _arc() {
cov_7igscgozc.f[17]++;
cov_7igscgozc.s[331]++;
this.strokeIndices = [];
// if the start and stop angles are not the same, push vertices to the array
cov_7igscgozc.s[332]++;
if (start.toFixed(10) !== stop.toFixed(10)) {
cov_7igscgozc.b[84][0]++;
cov_7igscgozc.s[333]++;
// if the mode specified is PIE or null, push the mid point of the arc in vertices
if (
(cov_7igscgozc.b[86][0]++, mode === constants.PIE) ||
(cov_7igscgozc.b[86][1]++, typeof mode === 'undefined')
) {
cov_7igscgozc.b[85][0]++;
cov_7igscgozc.s[334]++;
this.vertices.push(new _main.default.Vector(0.5, 0.5, 0));
cov_7igscgozc.s[335]++;
this.uvs.push([0.5, 0.5]);
} else {
cov_7igscgozc.b[85][1]++;
}
// vertices for the perimeter of the circle
cov_7igscgozc.s[336]++;
for (var i = (cov_7igscgozc.s[337]++, 0); i <= detail; i++) {
var u = (cov_7igscgozc.s[338]++, i / detail);
var theta = (cov_7igscgozc.s[339]++, (stop - start) * u + start);
var _x = (cov_7igscgozc.s[340]++, 0.5 + Math.cos(theta) / 2);
var _y = (cov_7igscgozc.s[341]++, 0.5 + Math.sin(theta) / 2);
cov_7igscgozc.s[342]++;
this.vertices.push(new _main.default.Vector(_x, _y, 0));
cov_7igscgozc.s[343]++;
this.uvs.push([_x, _y]);
cov_7igscgozc.s[344]++;
if (i < detail - 1) {
cov_7igscgozc.b[87][0]++;
cov_7igscgozc.s[345]++;
this.faces.push([0, i + 1, i + 2]);
cov_7igscgozc.s[346]++;
this.strokeIndices.push([i + 1, i + 2]);
} else {
cov_7igscgozc.b[87][1]++;
}
}
// check the mode specified in order to push vertices and faces, different for each mode
cov_7igscgozc.s[347]++;
switch (mode) {
case constants.PIE:
cov_7igscgozc.b[88][0]++;
cov_7igscgozc.s[348]++;
this.faces.push([
0,
this.vertices.length - 2,
this.vertices.length - 1
]);
cov_7igscgozc.s[349]++;
this.strokeIndices.push([0, 1]);
cov_7igscgozc.s[350]++;
this.strokeIndices.push([
this.vertices.length - 2,
this.vertices.length - 1
]);
cov_7igscgozc.s[351]++;
this.strokeIndices.push([0, this.vertices.length - 1]);
cov_7igscgozc.s[352]++;
break;
case constants.CHORD:
cov_7igscgozc.b[88][1]++;
cov_7igscgozc.s[353]++;
this.strokeIndices.push([0, 1]);
cov_7igscgozc.s[354]++;
this.strokeIndices.push([0, this.vertices.length - 1]);
cov_7igscgozc.s[355]++;
break;
case constants.OPEN:
cov_7igscgozc.b[88][2]++;
cov_7igscgozc.s[356]++;
this.strokeIndices.push([0, 1]);
cov_7igscgozc.s[357]++;
break;
default:
cov_7igscgozc.b[88][3]++;
cov_7igscgozc.s[358]++;
this.faces.push([
0,
this.vertices.length - 2,
this.vertices.length - 1
]);
cov_7igscgozc.s[359]++;
this.strokeIndices.push([
this.vertices.length - 2,
this.vertices.length - 1
]);
}
} else {
cov_7igscgozc.b[84][1]++;
}
};
var arcGeom = (cov_7igscgozc.s[360]++,
new _main.default.Geometry(detail, 1, _arc));
cov_7igscgozc.s[361]++;
arcGeom.computeNormals();
cov_7igscgozc.s[362]++;
if (detail <= 50) {
cov_7igscgozc.b[89][0]++;
cov_7igscgozc.s[363]++;
arcGeom._makeTriangleEdges()._edgesToVertices(arcGeom);
} else {
cov_7igscgozc.b[89][1]++;
cov_7igscgozc.s[364]++;
if (this._renderer._doStroke) {
cov_7igscgozc.b[90][0]++;
cov_7igscgozc.s[365]++;
console.log('Cannot stroke ${shape} with more than 50 detail');
} else {
cov_7igscgozc.b[90][1]++;
}
}
cov_7igscgozc.s[366]++;
this.createBuffers(gId, arcGeom);
} else {
cov_7igscgozc.b[83][1]++;
}
var uMVMatrix = (cov_7igscgozc.s[367]++, this.uMVMatrix.copy());
cov_7igscgozc.s[368]++;
try {
cov_7igscgozc.s[369]++;
this.uMVMatrix.translate([x, y, 0]);
cov_7igscgozc.s[370]++;
this.uMVMatrix.scale(width, height, 1);
cov_7igscgozc.s[371]++;
this.drawBuffers(gId);
} finally {
cov_7igscgozc.s[372]++;
this.uMVMatrix = uMVMatrix;
}
cov_7igscgozc.s[373]++;
return this;
};
cov_7igscgozc.s[374]++;
_main.default.RendererGL.prototype.rect = function(args) {
cov_7igscgozc.f[18]++;
var perPixelLighting = (cov_7igscgozc.s[375]++,
this._pInst._glAttributes.perPixelLighting);
var x = (cov_7igscgozc.s[376]++, args[0]);
var y = (cov_7igscgozc.s[377]++, args[1]);
var width = (cov_7igscgozc.s[378]++, args[2]);
var height = (cov_7igscgozc.s[379]++, args[3]);
var detailX = (cov_7igscgozc.s[380]++,
(cov_7igscgozc.b[91][0]++, args[4]) ||
(cov_7igscgozc.b[91][1]++,
perPixelLighting
? (cov_7igscgozc.b[92][0]++, 1)
: (cov_7igscgozc.b[92][1]++, 24)));
var detailY = (cov_7igscgozc.s[381]++,
(cov_7igscgozc.b[93][0]++, args[5]) ||
(cov_7igscgozc.b[93][1]++,
perPixelLighting
? (cov_7igscgozc.b[94][0]++, 1)
: (cov_7igscgozc.b[94][1]++, 16)));
var gId = (cov_7igscgozc.s[382]++,
'rect|'.concat(detailX, '|').concat(detailY));
cov_7igscgozc.s[383]++;
if (!this.geometryInHash(gId)) {
cov_7igscgozc.b[95][0]++;
cov_7igscgozc.s[384]++;
var _rect = function _rect() {
cov_7igscgozc.f[19]++;
cov_7igscgozc.s[385]++;
for (var i = (cov_7igscgozc.s[386]++, 0); i <= this.detailY; i++) {
var v = (cov_7igscgozc.s[387]++, i / this.detailY);
cov_7igscgozc.s[388]++;
for (var j = (cov_7igscgozc.s[389]++, 0); j <= this.detailX; j++) {
var u = (cov_7igscgozc.s[390]++, j / this.detailX);
var p = (cov_7igscgozc.s[391]++, new _main.default.Vector(u, v, 0));
cov_7igscgozc.s[392]++;
this.vertices.push(p);
cov_7igscgozc.s[393]++;
this.uvs.push(u, v);
}
}
// using stroke indices to avoid stroke over face(s) of rectangle
cov_7igscgozc.s[394]++;
if (
(cov_7igscgozc.b[97][0]++, detailX > 0) &&
(cov_7igscgozc.b[97][1]++, detailY > 0)
) {
cov_7igscgozc.b[96][0]++;
cov_7igscgozc.s[395]++;
this.strokeIndices = [
[0, detailX],
[detailX, (detailX + 1) * (detailY + 1) - 1],
[(detailX + 1) * (detailY + 1) - 1, (detailX + 1) * detailY],
[(detailX + 1) * detailY, 0]
];
} else {
cov_7igscgozc.b[96][1]++;
}
};
var rectGeom = (cov_7igscgozc.s[396]++,
new _main.default.Geometry(detailX, detailY, _rect));
cov_7igscgozc.s[397]++;
rectGeom
.computeFaces()
.computeNormals()
._makeTriangleEdges()
._edgesToVertices();
cov_7igscgozc.s[398]++;
this.createBuffers(gId, rectGeom);
} else {
cov_7igscgozc.b[95][1]++;
}
// only a single rectangle (of a given detail) is cached: a square with
// opposite corners at (0,0) & (1,1).
//
// before rendering, this square is scaled & moved to the required location.
var uMVMatrix = (cov_7igscgozc.s[399]++, this.uMVMatrix.copy());
cov_7igscgozc.s[400]++;
try {
cov_7igscgozc.s[401]++;
this.uMVMatrix.translate([x, y, 0]);
cov_7igscgozc.s[402]++;
this.uMVMatrix.scale(width, height, 1);
cov_7igscgozc.s[403]++;
this.drawBuffers(gId);
} finally {
cov_7igscgozc.s[404]++;
this.uMVMatrix = uMVMatrix;
}
cov_7igscgozc.s[405]++;
return this;
};
// prettier-ignore
cov_7igscgozc.s[406]++;
_main.default.RendererGL.prototype.quad = function(
x1,
y1,
z1,
x2,
y2,
z2,
x3,
y3,
z3,
x4,
y4,
z4
) {
cov_7igscgozc.f[20]++;
var gId = (cov_7igscgozc.s[407]++,
'quad|'
.concat(x1, '|')
.concat(y1, '|')
.concat(z1, '|')
.concat(x2, '|')
.concat(y2, '|')
.concat(z2, '|')
.concat(x3, '|')
.concat(y3, '|')
.concat(z3, '|')
.concat(x4, '|')
.concat(y4, '|')
.concat(z4));
cov_7igscgozc.s[408]++;
if (!this.geometryInHash(gId)) {
cov_7igscgozc.b[98][0]++;
cov_7igscgozc.s[409]++;
var _quad = function _quad() {
cov_7igscgozc.f[21]++;
cov_7igscgozc.s[410]++;
this.vertices.push(new _main.default.Vector(x1, y1, z1));
cov_7igscgozc.s[411]++;
this.vertices.push(new _main.default.Vector(x2, y2, z2));
cov_7igscgozc.s[412]++;
this.vertices.push(new _main.default.Vector(x3, y3, z3));
cov_7igscgozc.s[413]++;
this.vertices.push(new _main.default.Vector(x4, y4, z4));
cov_7igscgozc.s[414]++;
this.uvs.push(0, 0, 1, 0, 1, 1, 0, 1);
cov_7igscgozc.s[415]++;
this.strokeIndices = [[0, 1], [1, 2], [2, 3], [3, 0]];
};
var quadGeom = (cov_7igscgozc.s[416]++,
new _main.default.Geometry(2, 2, _quad));
cov_7igscgozc.s[417]++;
quadGeom
.computeNormals()
._makeTriangleEdges()
._edgesToVertices();
cov_7igscgozc.s[418]++;
quadGeom.faces = [[0, 1, 2], [2, 3, 0]];
cov_7igscgozc.s[419]++;
this.createBuffers(gId, quadGeom);
} else {
cov_7igscgozc.b[98][1]++;
}
cov_7igscgozc.s[420]++;
this.drawBuffers(gId);
cov_7igscgozc.s[421]++;
return this;
};
//this implementation of bezier curve
//is based on Bernstein polynomial
// pretier-ignore
cov_7igscgozc.s[422]++;
_main.default.RendererGL.prototype.bezier = function(
x1,
y1,
z1, // x2
x2, // y2
y2, // x3
z2, // y3
x3, // x4
y3, // y4
z3,
x4,
y4,
z4
) {
cov_7igscgozc.f[22]++;
cov_7igscgozc.s[423]++;
if (arguments.length === 8) {
cov_7igscgozc.b[99][0]++;
cov_7igscgozc.s[424]++;
y4 = y3;
cov_7igscgozc.s[425]++;
x4 = x3;
cov_7igscgozc.s[426]++;
y3 = z2;
cov_7igscgozc.s[427]++;
x3 = y2;
cov_7igscgozc.s[428]++;
y2 = x2;
cov_7igscgozc.s[429]++;
x2 = z1;
cov_7igscgozc.s[430]++;
z1 = z2 = z3 = z4 = 0;
} else {
cov_7igscgozc.b[99][1]++;
}
var bezierDetail = (cov_7igscgozc.s[431]++,
(cov_7igscgozc.b[100][0]++, this._pInst._bezierDetail) ||
(cov_7igscgozc.b[100][1]++, 20)); //value of Bezier detail
cov_7igscgozc.s[432]++;
this.beginShape();
cov_7igscgozc.s[433]++;
for (var i = (cov_7igscgozc.s[434]++, 0); i <= bezierDetail; i++) {
var c1 = (cov_7igscgozc.s[435]++, Math.pow(1 - i / bezierDetail, 3));
var c2 = (cov_7igscgozc.s[436]++,
3 * (i / bezierDetail) * Math.pow(1 - i / bezierDetail, 2));
var c3 = (cov_7igscgozc.s[437]++,
3 * Math.pow(i / bezierDetail, 2) * (1 - i / bezierDetail));
var c4 = (cov_7igscgozc.s[438]++, Math.pow(i / bezierDetail, 3));
cov_7igscgozc.s[439]++;
this.vertex(
x1 * c1 + x2 * c2 + x3 * c3 + x4 * c4,
y1 * c1 + y2 * c2 + y3 * c3 + y4 * c4,
z1 * c1 + z2 * c2 + z3 * c3 + z4 * c4
);
}
cov_7igscgozc.s[440]++;
this.endShape();
cov_7igscgozc.s[441]++;
return this;
};
// pretier-ignore
cov_7igscgozc.s[442]++;
_main.default.RendererGL.prototype.curve = function(
x1,
y1,
z1, // x2
x2, // y2
y2, // x3
z2, // y3
x3, // x4
y3, // y4
z3,
x4,
y4,
z4
) {
cov_7igscgozc.f[23]++;
cov_7igscgozc.s[443]++;
if (arguments.length === 8) {
cov_7igscgozc.b[101][0]++;
cov_7igscgozc.s[444]++;
x4 = x3;
cov_7igscgozc.s[445]++;
y4 = y3;
cov_7igscgozc.s[446]++;
x3 = y2;
cov_7igscgozc.s[447]++;
y3 = x2;
cov_7igscgozc.s[448]++;
x2 = z1;
cov_7igscgozc.s[449]++;
y2 = x2;
cov_7igscgozc.s[450]++;
z1 = z2 = z3 = z4 = 0;
} else {
cov_7igscgozc.b[101][1]++;
}
var curveDetail = (cov_7igscgozc.s[451]++, this._pInst._curveDetail);
cov_7igscgozc.s[452]++;
this.beginShape();
cov_7igscgozc.s[453]++;
for (var i = (cov_7igscgozc.s[454]++, 0); i <= curveDetail; i++) {
var c1 = (cov_7igscgozc.s[455]++, Math.pow(i / curveDetail, 3) * 0.5);
var c2 = (cov_7igscgozc.s[456]++, Math.pow(i / curveDetail, 2) * 0.5);
var c3 = (cov_7igscgozc.s[457]++, i / curveDetail * 0.5);
var c4 = (cov_7igscgozc.s[458]++, 0.5);
var vx = (cov_7igscgozc.s[459]++,
c1 * (-x1 + 3 * x2 - 3 * x3 + x4) +
c2 * (2 * x1 - 5 * x2 + 4 * x3 - x4) +
c3 * (-x1 + x3) +
c4 * (2 * x2));
var vy = (cov_7igscgozc.s[460]++,
c1 * (-y1 + 3 * y2 - 3 * y3 + y4) +
c2 * (2 * y1 - 5 * y2 + 4 * y3 - y4) +
c3 * (-y1 + y3) +
c4 * (2 * y2));
var vz = (cov_7igscgozc.s[461]++,
c1 * (-z1 + 3 * z2 - 3 * z3 + z4) +
c2 * (2 * z1 - 5 * z2 + 4 * z3 - z4) +
c3 * (-z1 + z3) +
c4 * (2 * z2));
cov_7igscgozc.s[462]++;
this.vertex(vx, vy, vz);
}
cov_7igscgozc.s[463]++;
this.endShape();
cov_7igscgozc.s[464]++;
return this;
};
/**
* Draw a line given two points
* @private
* @param {Number} x0 x-coordinate of first vertex
* @param {Number} y0 y-coordinate of first vertex
* @param {Number} z0 z-coordinate of first vertex
* @param {Number} x1 x-coordinate of second vertex
* @param {Number} y1 y-coordinate of second vertex
* @param {Number} z1 z-coordinate of second vertex
* @chainable
* @example
*
*
* //draw a line
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(200);
* rotateX(frameCount * 0.01);
* rotateY(frameCount * 0.01);
* // Use fill instead of stroke to change the color of shape.
* fill(255, 0, 0);
* line(10, 10, 0, 60, 60, 20);
* }
*
*
*/ cov_7igscgozc.s[465]++;
_main.default.RendererGL.prototype.line = function() {
cov_7igscgozc.f[24]++;
cov_7igscgozc.s[466]++;
if (arguments.length === 6) {
cov_7igscgozc.b[102][0]++;
cov_7igscgozc.s[467]++;
this.beginShape(constants.LINES);
cov_7igscgozc.s[468]++;
this.vertex(
arguments.length <= 0 ? undefined : arguments[0],
arguments.length <= 1 ? undefined : arguments[1],
arguments.length <= 2 ? undefined : arguments[2]
);
cov_7igscgozc.s[469]++;
this.vertex(
arguments.length <= 3 ? undefined : arguments[3],
arguments.length <= 4 ? undefined : arguments[4],
arguments.length <= 5 ? undefined : arguments[5]
);
cov_7igscgozc.s[470]++;
this.endShape();
} else {
cov_7igscgozc.b[102][1]++;
cov_7igscgozc.s[471]++;
if (arguments.length === 4) {
cov_7igscgozc.b[103][0]++;
cov_7igscgozc.s[472]++;
this.beginShape(constants.LINES);
cov_7igscgozc.s[473]++;
this.vertex(
arguments.length <= 0 ? undefined : arguments[0],
arguments.length <= 1 ? undefined : arguments[1],
0
);
cov_7igscgozc.s[474]++;
this.vertex(
arguments.length <= 2 ? undefined : arguments[2],
arguments.length <= 3 ? undefined : arguments[3],
0
);
cov_7igscgozc.s[475]++;
this.endShape();
} else {
cov_7igscgozc.b[103][1]++;
}
}
cov_7igscgozc.s[476]++;
return this;
};
cov_7igscgozc.s[477]++;
_main.default.RendererGL.prototype.bezierVertex = function() {
cov_7igscgozc.f[25]++;
cov_7igscgozc.s[478]++;
if (this.immediateMode._bezierVertex.length === 0) {
cov_7igscgozc.b[104][0]++;
cov_7igscgozc.s[479]++;
throw Error('vertex() must be used once before calling bezierVertex()');
} else {
cov_7igscgozc.b[104][1]++;
var w_x = (cov_7igscgozc.s[480]++, []);
var w_y = (cov_7igscgozc.s[481]++, []);
var w_z = (cov_7igscgozc.s[482]++, []);
var t, _x, _y, _z, i;
var argLength = (cov_7igscgozc.s[483]++, arguments.length);
cov_7igscgozc.s[484]++;
t = 0;
cov_7igscgozc.s[485]++;
if (
(cov_7igscgozc.b[106][0]++, this._lookUpTableBezier.length === 0) ||
(cov_7igscgozc.b[106][1]++,
this._lutBezierDetail !== this._pInst._curveDetail)
) {
cov_7igscgozc.b[105][0]++;
cov_7igscgozc.s[486]++;
this._lookUpTableBezier = [];
cov_7igscgozc.s[487]++;
this._lutBezierDetail = this._pInst._curveDetail;
var step = (cov_7igscgozc.s[488]++, 1 / this._lutBezierDetail);
var start = (cov_7igscgozc.s[489]++, 0);
var end = (cov_7igscgozc.s[490]++, 1);
var j = (cov_7igscgozc.s[491]++, 0);
cov_7igscgozc.s[492]++;
while (start < 1) {
cov_7igscgozc.s[493]++;
t = parseFloat(start.toFixed(6));
cov_7igscgozc.s[494]++;
this._lookUpTableBezier[j] = this._bezierCoefficients(t);
cov_7igscgozc.s[495]++;
if (end.toFixed(6) === step.toFixed(6)) {
cov_7igscgozc.b[107][0]++;
cov_7igscgozc.s[496]++;
t = parseFloat(end.toFixed(6)) + parseFloat(start.toFixed(6));
cov_7igscgozc.s[497]++;
++j;
cov_7igscgozc.s[498]++;
this._lookUpTableBezier[j] = this._bezierCoefficients(t);
cov_7igscgozc.s[499]++;
break;
} else {
cov_7igscgozc.b[107][1]++;
}
cov_7igscgozc.s[500]++;
start += step;
cov_7igscgozc.s[501]++;
end -= step;
cov_7igscgozc.s[502]++;
++j;
}
} else {
cov_7igscgozc.b[105][1]++;
}
var LUTLength = (cov_7igscgozc.s[503]++, this._lookUpTableBezier.length);
cov_7igscgozc.s[504]++;
if (argLength === 6) {
cov_7igscgozc.b[108][0]++;
cov_7igscgozc.s[505]++;
this.isBezier = true;
cov_7igscgozc.s[506]++;
w_x = [
this.immediateMode._bezierVertex[0],
arguments.length <= 0 ? undefined : arguments[0],
arguments.length <= 2 ? undefined : arguments[2],
arguments.length <= 4 ? undefined : arguments[4]
];
cov_7igscgozc.s[507]++;
w_y = [
this.immediateMode._bezierVertex[1],
arguments.length <= 1 ? undefined : arguments[1],
arguments.length <= 3 ? undefined : arguments[3],
arguments.length <= 5 ? undefined : arguments[5]
];
cov_7igscgozc.s[508]++;
for (i = 0; i < LUTLength; i++) {
cov_7igscgozc.s[509]++;
_x =
w_x[0] * this._lookUpTableBezier[i][0] +
w_x[1] * this._lookUpTableBezier[i][1] +
w_x[2] * this._lookUpTableBezier[i][2] +
w_x[3] * this._lookUpTableBezier[i][3];
cov_7igscgozc.s[510]++;
_y =
w_y[0] * this._lookUpTableBezier[i][0] +
w_y[1] * this._lookUpTableBezier[i][1] +
w_y[2] * this._lookUpTableBezier[i][2] +
w_y[3] * this._lookUpTableBezier[i][3];
cov_7igscgozc.s[511]++;
this.vertex(_x, _y);
}
cov_7igscgozc.s[512]++;
this.immediateMode._bezierVertex[0] =
arguments.length <= 4 ? undefined : arguments[4];
cov_7igscgozc.s[513]++;
this.immediateMode._bezierVertex[1] =
arguments.length <= 5 ? undefined : arguments[5];
} else {
cov_7igscgozc.b[108][1]++;
cov_7igscgozc.s[514]++;
if (argLength === 9) {
cov_7igscgozc.b[109][0]++;
cov_7igscgozc.s[515]++;
this.isBezier = true;
cov_7igscgozc.s[516]++;
w_x = [
this.immediateMode._bezierVertex[0],
arguments.length <= 0 ? undefined : arguments[0],
arguments.length <= 3 ? undefined : arguments[3],
arguments.length <= 6 ? undefined : arguments[6]
];
cov_7igscgozc.s[517]++;
w_y = [
this.immediateMode._bezierVertex[1],
arguments.length <= 1 ? undefined : arguments[1],
arguments.length <= 4 ? undefined : arguments[4],
arguments.length <= 7 ? undefined : arguments[7]
];
cov_7igscgozc.s[518]++;
w_z = [
this.immediateMode._bezierVertex[2],
arguments.length <= 2 ? undefined : arguments[2],
arguments.length <= 5 ? undefined : arguments[5],
arguments.length <= 8 ? undefined : arguments[8]
];
cov_7igscgozc.s[519]++;
for (i = 0; i < LUTLength; i++) {
cov_7igscgozc.s[520]++;
_x =
w_x[0] * this._lookUpTableBezier[i][0] +
w_x[1] * this._lookUpTableBezier[i][1] +
w_x[2] * this._lookUpTableBezier[i][2] +
w_x[3] * this._lookUpTableBezier[i][3];
cov_7igscgozc.s[521]++;
_y =
w_y[0] * this._lookUpTableBezier[i][0] +
w_y[1] * this._lookUpTableBezier[i][1] +
w_y[2] * this._lookUpTableBezier[i][2] +
w_y[3] * this._lookUpTableBezier[i][3];
cov_7igscgozc.s[522]++;
_z =
w_z[0] * this._lookUpTableBezier[i][0] +
w_z[1] * this._lookUpTableBezier[i][1] +
w_z[2] * this._lookUpTableBezier[i][2] +
w_z[3] * this._lookUpTableBezier[i][3];
cov_7igscgozc.s[523]++;
this.vertex(_x, _y, _z);
}
cov_7igscgozc.s[524]++;
this.immediateMode._bezierVertex[0] =
arguments.length <= 6 ? undefined : arguments[6];
cov_7igscgozc.s[525]++;
this.immediateMode._bezierVertex[1] =
arguments.length <= 7 ? undefined : arguments[7];
cov_7igscgozc.s[526]++;
this.immediateMode._bezierVertex[2] =
arguments.length <= 8 ? undefined : arguments[8];
} else {
cov_7igscgozc.b[109][1]++;
}
}
}
};
cov_7igscgozc.s[527]++;
_main.default.RendererGL.prototype.quadraticVertex = function() {
cov_7igscgozc.f[26]++;
cov_7igscgozc.s[528]++;
if (this.immediateMode._quadraticVertex.length === 0) {
cov_7igscgozc.b[110][0]++;
cov_7igscgozc.s[529]++;
throw Error('vertex() must be used once before calling quadraticVertex()');
} else {
cov_7igscgozc.b[110][1]++;
var w_x = (cov_7igscgozc.s[530]++, []);
var w_y = (cov_7igscgozc.s[531]++, []);
var w_z = (cov_7igscgozc.s[532]++, []);
var t, _x, _y, _z, i;
var argLength = (cov_7igscgozc.s[533]++, arguments.length);
cov_7igscgozc.s[534]++;
t = 0;
cov_7igscgozc.s[535]++;
if (
(cov_7igscgozc.b[112][0]++, this._lookUpTableQuadratic.length === 0) ||
(cov_7igscgozc.b[112][1]++,
this._lutQuadraticDetail !== this._pInst._curveDetail)
) {
cov_7igscgozc.b[111][0]++;
cov_7igscgozc.s[536]++;
this._lookUpTableQuadratic = [];
cov_7igscgozc.s[537]++;
this._lutQuadraticDetail = this._pInst._curveDetail;
var step = (cov_7igscgozc.s[538]++, 1 / this._lutQuadraticDetail);
var start = (cov_7igscgozc.s[539]++, 0);
var end = (cov_7igscgozc.s[540]++, 1);
var j = (cov_7igscgozc.s[541]++, 0);
cov_7igscgozc.s[542]++;
while (start < 1) {
cov_7igscgozc.s[543]++;
t = parseFloat(start.toFixed(6));
cov_7igscgozc.s[544]++;
this._lookUpTableQuadratic[j] = this._quadraticCoefficients(t);
cov_7igscgozc.s[545]++;
if (end.toFixed(6) === step.toFixed(6)) {
cov_7igscgozc.b[113][0]++;
cov_7igscgozc.s[546]++;
t = parseFloat(end.toFixed(6)) + parseFloat(start.toFixed(6));
cov_7igscgozc.s[547]++;
++j;
cov_7igscgozc.s[548]++;
this._lookUpTableQuadratic[j] = this._quadraticCoefficients(t);
cov_7igscgozc.s[549]++;
break;
} else {
cov_7igscgozc.b[113][1]++;
}
cov_7igscgozc.s[550]++;
start += step;
cov_7igscgozc.s[551]++;
end -= step;
cov_7igscgozc.s[552]++;
++j;
}
} else {
cov_7igscgozc.b[111][1]++;
}
var LUTLength = (cov_7igscgozc.s[553]++, this._lookUpTableQuadratic.length);
cov_7igscgozc.s[554]++;
if (argLength === 4) {
cov_7igscgozc.b[114][0]++;
cov_7igscgozc.s[555]++;
this.isQuadratic = true;
cov_7igscgozc.s[556]++;
w_x = [
this.immediateMode._quadraticVertex[0],
arguments.length <= 0 ? undefined : arguments[0],
arguments.length <= 2 ? undefined : arguments[2]
];
cov_7igscgozc.s[557]++;
w_y = [
this.immediateMode._quadraticVertex[1],
arguments.length <= 1 ? undefined : arguments[1],
arguments.length <= 3 ? undefined : arguments[3]
];
cov_7igscgozc.s[558]++;
for (i = 0; i < LUTLength; i++) {
cov_7igscgozc.s[559]++;
_x =
w_x[0] * this._lookUpTableQuadratic[i][0] +
w_x[1] * this._lookUpTableQuadratic[i][1] +
w_x[2] * this._lookUpTableQuadratic[i][2];
cov_7igscgozc.s[560]++;
_y =
w_y[0] * this._lookUpTableQuadratic[i][0] +
w_y[1] * this._lookUpTableQuadratic[i][1] +
w_y[2] * this._lookUpTableQuadratic[i][2];
cov_7igscgozc.s[561]++;
this.vertex(_x, _y);
}
cov_7igscgozc.s[562]++;
this.immediateMode._quadraticVertex[0] =
arguments.length <= 2 ? undefined : arguments[2];
cov_7igscgozc.s[563]++;
this.immediateMode._quadraticVertex[1] =
arguments.length <= 3 ? undefined : arguments[3];
} else {
cov_7igscgozc.b[114][1]++;
cov_7igscgozc.s[564]++;
if (argLength === 6) {
cov_7igscgozc.b[115][0]++;
cov_7igscgozc.s[565]++;
this.isQuadratic = true;
cov_7igscgozc.s[566]++;
w_x = [
this.immediateMode._quadraticVertex[0],
arguments.length <= 0 ? undefined : arguments[0],
arguments.length <= 3 ? undefined : arguments[3]
];
cov_7igscgozc.s[567]++;
w_y = [
this.immediateMode._quadraticVertex[1],
arguments.length <= 1 ? undefined : arguments[1],
arguments.length <= 4 ? undefined : arguments[4]
];
cov_7igscgozc.s[568]++;
w_z = [
this.immediateMode._quadraticVertex[2],
arguments.length <= 2 ? undefined : arguments[2],
arguments.length <= 5 ? undefined : arguments[5]
];
cov_7igscgozc.s[569]++;
for (i = 0; i < LUTLength; i++) {
cov_7igscgozc.s[570]++;
_x =
w_x[0] * this._lookUpTableQuadratic[i][0] +
w_x[1] * this._lookUpTableQuadratic[i][1] +
w_x[2] * this._lookUpTableQuadratic[i][2];
cov_7igscgozc.s[571]++;
_y =
w_y[0] * this._lookUpTableQuadratic[i][0] +
w_y[1] * this._lookUpTableQuadratic[i][1] +
w_y[2] * this._lookUpTableQuadratic[i][2];
cov_7igscgozc.s[572]++;
_z =
w_z[0] * this._lookUpTableQuadratic[i][0] +
w_z[1] * this._lookUpTableQuadratic[i][1] +
w_z[2] * this._lookUpTableQuadratic[i][2];
cov_7igscgozc.s[573]++;
this.vertex(_x, _y, _z);
}
cov_7igscgozc.s[574]++;
this.immediateMode._quadraticVertex[0] =
arguments.length <= 3 ? undefined : arguments[3];
cov_7igscgozc.s[575]++;
this.immediateMode._quadraticVertex[1] =
arguments.length <= 4 ? undefined : arguments[4];
cov_7igscgozc.s[576]++;
this.immediateMode._quadraticVertex[2] =
arguments.length <= 5 ? undefined : arguments[5];
} else {
cov_7igscgozc.b[115][1]++;
}
}
}
};
cov_7igscgozc.s[577]++;
_main.default.RendererGL.prototype.curveVertex = function() {
cov_7igscgozc.f[27]++;
var w_x = (cov_7igscgozc.s[578]++, []);
var w_y = (cov_7igscgozc.s[579]++, []);
var w_z = (cov_7igscgozc.s[580]++, []);
var t, _x, _y, _z, i;
cov_7igscgozc.s[581]++;
t = 0;
var argLength = (cov_7igscgozc.s[582]++, arguments.length);
cov_7igscgozc.s[583]++;
if (
(cov_7igscgozc.b[117][0]++, this._lookUpTableBezier.length === 0) ||
(cov_7igscgozc.b[117][1]++,
this._lutBezierDetail !== this._pInst._curveDetail)
) {
cov_7igscgozc.b[116][0]++;
cov_7igscgozc.s[584]++;
this._lookUpTableBezier = [];
cov_7igscgozc.s[585]++;
this._lutBezierDetail = this._pInst._curveDetail;
var step = (cov_7igscgozc.s[586]++, 1 / this._lutBezierDetail);
var start = (cov_7igscgozc.s[587]++, 0);
var end = (cov_7igscgozc.s[588]++, 1);
var j = (cov_7igscgozc.s[589]++, 0);
cov_7igscgozc.s[590]++;
while (start < 1) {
cov_7igscgozc.s[591]++;
t = parseFloat(start.toFixed(6));
cov_7igscgozc.s[592]++;
this._lookUpTableBezier[j] = this._bezierCoefficients(t);
cov_7igscgozc.s[593]++;
if (end.toFixed(6) === step.toFixed(6)) {
cov_7igscgozc.b[118][0]++;
cov_7igscgozc.s[594]++;
t = parseFloat(end.toFixed(6)) + parseFloat(start.toFixed(6));
cov_7igscgozc.s[595]++;
++j;
cov_7igscgozc.s[596]++;
this._lookUpTableBezier[j] = this._bezierCoefficients(t);
cov_7igscgozc.s[597]++;
break;
} else {
cov_7igscgozc.b[118][1]++;
}
cov_7igscgozc.s[598]++;
start += step;
cov_7igscgozc.s[599]++;
end -= step;
cov_7igscgozc.s[600]++;
++j;
}
} else {
cov_7igscgozc.b[116][1]++;
}
var LUTLength = (cov_7igscgozc.s[601]++, this._lookUpTableBezier.length);
cov_7igscgozc.s[602]++;
if (argLength === 2) {
cov_7igscgozc.b[119][0]++;
cov_7igscgozc.s[603]++;
this.immediateMode._curveVertex.push(
arguments.length <= 0 ? undefined : arguments[0]
);
cov_7igscgozc.s[604]++;
this.immediateMode._curveVertex.push(
arguments.length <= 1 ? undefined : arguments[1]
);
cov_7igscgozc.s[605]++;
if (this.immediateMode._curveVertex.length === 8) {
cov_7igscgozc.b[120][0]++;
cov_7igscgozc.s[606]++;
this.isCurve = true;
cov_7igscgozc.s[607]++;
w_x = this._bezierToCatmull([
this.immediateMode._curveVertex[0],
this.immediateMode._curveVertex[2],
this.immediateMode._curveVertex[4],
this.immediateMode._curveVertex[6]
]);
cov_7igscgozc.s[608]++;
w_y = this._bezierToCatmull([
this.immediateMode._curveVertex[1],
this.immediateMode._curveVertex[3],
this.immediateMode._curveVertex[5],
this.immediateMode._curveVertex[7]
]);
cov_7igscgozc.s[609]++;
for (i = 0; i < LUTLength; i++) {
cov_7igscgozc.s[610]++;
_x =
w_x[0] * this._lookUpTableBezier[i][0] +
w_x[1] * this._lookUpTableBezier[i][1] +
w_x[2] * this._lookUpTableBezier[i][2] +
w_x[3] * this._lookUpTableBezier[i][3];
cov_7igscgozc.s[611]++;
_y =
w_y[0] * this._lookUpTableBezier[i][0] +
w_y[1] * this._lookUpTableBezier[i][1] +
w_y[2] * this._lookUpTableBezier[i][2] +
w_y[3] * this._lookUpTableBezier[i][3];
cov_7igscgozc.s[612]++;
this.vertex(_x, _y);
}
cov_7igscgozc.s[613]++;
for (i = 0; i < argLength; i++) {
cov_7igscgozc.s[614]++;
this.immediateMode._curveVertex.shift();
}
} else {
cov_7igscgozc.b[120][1]++;
}
} else {
cov_7igscgozc.b[119][1]++;
cov_7igscgozc.s[615]++;
if (argLength === 3) {
cov_7igscgozc.b[121][0]++;
cov_7igscgozc.s[616]++;
this.immediateMode._curveVertex.push(
arguments.length <= 0 ? undefined : arguments[0]
);
cov_7igscgozc.s[617]++;
this.immediateMode._curveVertex.push(
arguments.length <= 1 ? undefined : arguments[1]
);
cov_7igscgozc.s[618]++;
this.immediateMode._curveVertex.push(
arguments.length <= 2 ? undefined : arguments[2]
);
cov_7igscgozc.s[619]++;
if (this.immediateMode._curveVertex.length === 12) {
cov_7igscgozc.b[122][0]++;
cov_7igscgozc.s[620]++;
this.isCurve = true;
cov_7igscgozc.s[621]++;
w_x = this._bezierToCatmull([
this.immediateMode._curveVertex[0],
this.immediateMode._curveVertex[3],
this.immediateMode._curveVertex[6],
this.immediateMode._curveVertex[9]
]);
cov_7igscgozc.s[622]++;
w_y = this._bezierToCatmull([
this.immediateMode._curveVertex[1],
this.immediateMode._curveVertex[4],
this.immediateMode._curveVertex[7],
this.immediateMode._curveVertex[10]
]);
cov_7igscgozc.s[623]++;
w_z = this._bezierToCatmull([
this.immediateMode._curveVertex[2],
this.immediateMode._curveVertex[5],
this.immediateMode._curveVertex[8],
this.immediateMode._curveVertex[11]
]);
cov_7igscgozc.s[624]++;
for (i = 0; i < LUTLength; i++) {
cov_7igscgozc.s[625]++;
_x =
w_x[0] * this._lookUpTableBezier[i][0] +
w_x[1] * this._lookUpTableBezier[i][1] +
w_x[2] * this._lookUpTableBezier[i][2] +
w_x[3] * this._lookUpTableBezier[i][3];
cov_7igscgozc.s[626]++;
_y =
w_y[0] * this._lookUpTableBezier[i][0] +
w_y[1] * this._lookUpTableBezier[i][1] +
w_y[2] * this._lookUpTableBezier[i][2] +
w_y[3] * this._lookUpTableBezier[i][3];
cov_7igscgozc.s[627]++;
_z =
w_z[0] * this._lookUpTableBezier[i][0] +
w_z[1] * this._lookUpTableBezier[i][1] +
w_z[2] * this._lookUpTableBezier[i][2] +
w_z[3] * this._lookUpTableBezier[i][3];
cov_7igscgozc.s[628]++;
this.vertex(_x, _y, _z);
}
cov_7igscgozc.s[629]++;
for (i = 0; i < argLength; i++) {
cov_7igscgozc.s[630]++;
this.immediateMode._curveVertex.shift();
}
} else {
cov_7igscgozc.b[122][1]++;
}
} else {
cov_7igscgozc.b[121][1]++;
}
}
};
cov_7igscgozc.s[631]++;
_main.default.RendererGL.prototype.image = function(
img,
sx,
sy,
sWidth,
sHeight,
dx,
dy,
dWidth,
dHeight
) {
cov_7igscgozc.f[28]++;
cov_7igscgozc.s[632]++;
if (this._isErasing) {
cov_7igscgozc.b[123][0]++;
cov_7igscgozc.s[633]++;
this.blendMode(this._cachedBlendMode);
} else {
cov_7igscgozc.b[123][1]++;
}
cov_7igscgozc.s[634]++;
this._pInst.push();
cov_7igscgozc.s[635]++;
this._pInst.noLights();
cov_7igscgozc.s[636]++;
this._pInst.texture(img);
cov_7igscgozc.s[637]++;
this._pInst.textureMode(constants.NORMAL);
var u0 = (cov_7igscgozc.s[638]++, 0);
cov_7igscgozc.s[639]++;
if (sx <= img.width) {
cov_7igscgozc.b[124][0]++;
cov_7igscgozc.s[640]++;
u0 = sx / img.width;
} else {
cov_7igscgozc.b[124][1]++;
}
var u1 = (cov_7igscgozc.s[641]++, 1);
cov_7igscgozc.s[642]++;
if (sx + sWidth <= img.width) {
cov_7igscgozc.b[125][0]++;
cov_7igscgozc.s[643]++;
u1 = (sx + sWidth) / img.width;
} else {
cov_7igscgozc.b[125][1]++;
}
var v0 = (cov_7igscgozc.s[644]++, 0);
cov_7igscgozc.s[645]++;
if (sy <= img.height) {
cov_7igscgozc.b[126][0]++;
cov_7igscgozc.s[646]++;
v0 = sy / img.height;
} else {
cov_7igscgozc.b[126][1]++;
}
var v1 = (cov_7igscgozc.s[647]++, 1);
cov_7igscgozc.s[648]++;
if (sy + sHeight <= img.height) {
cov_7igscgozc.b[127][0]++;
cov_7igscgozc.s[649]++;
v1 = (sy + sHeight) / img.height;
} else {
cov_7igscgozc.b[127][1]++;
}
cov_7igscgozc.s[650]++;
this.beginShape();
cov_7igscgozc.s[651]++;
this.vertex(dx, dy, 0, u0, v0);
cov_7igscgozc.s[652]++;
this.vertex(dx + dWidth, dy, 0, u1, v0);
cov_7igscgozc.s[653]++;
this.vertex(dx + dWidth, dy + dHeight, 0, u1, v1);
cov_7igscgozc.s[654]++;
this.vertex(dx, dy + dHeight, 0, u0, v1);
cov_7igscgozc.s[655]++;
this.endShape(constants.CLOSE);
cov_7igscgozc.s[656]++;
this._pInst.pop();
cov_7igscgozc.s[657]++;
if (this._isErasing) {
cov_7igscgozc.b[128][0]++;
cov_7igscgozc.s[658]++;
this.blendMode(constants.REMOVE);
} else {
cov_7igscgozc.b[128][1]++;
}
};
var _default = _main.default;
exports.default = _default;
},
{ '../core/constants': 43, '../core/main': 54, './p5.Geometry': 103 }
],
98: [
function(_dereq_, module, exports) {
'use strict';
function _typeof(obj) {
if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj &&
typeof Symbol === 'function' &&
obj.constructor === Symbol &&
obj !== Symbol.prototype
? 'symbol'
: typeof obj;
};
}
return _typeof(obj);
}
var cov_26tsr7rwx0 = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/webgl/interaction.js';
var hash = '1d82e325bc807fa6c67263b69781006ad9f70999';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/interaction.js',
statementMap: {
'0': { start: { line: 49, column: 0 }, end: { line: 143, column: 2 } },
'1': { start: { line: 50, column: 2 }, end: { line: 50, column: 33 } },
'2': { start: { line: 51, column: 2 }, end: { line: 51, column: 52 } },
'3': { start: { line: 55, column: 4 }, end: { line: 58, column: 19 } },
'4': { start: { line: 59, column: 2 }, end: { line: 59, column: 29 } },
'5': { start: { line: 59, column: 22 }, end: { line: 59, column: 29 } },
'6': { start: { line: 61, column: 14 }, end: { line: 61, column: 39 } },
'7': { start: { line: 63, column: 2 }, end: { line: 65, column: 3 } },
'8': { start: { line: 64, column: 4 }, end: { line: 64, column: 21 } },
'9': { start: { line: 66, column: 2 }, end: { line: 68, column: 3 } },
'10': { start: { line: 67, column: 4 }, end: { line: 67, column: 32 } },
'11': { start: { line: 69, column: 2 }, end: { line: 71, column: 3 } },
'12': { start: { line: 70, column: 4 }, end: { line: 70, column: 23 } },
'13': { start: { line: 79, column: 2 }, end: { line: 82, column: 3 } },
'14': { start: { line: 80, column: 4 }, end: { line: 80, column: 44 } },
'15': { start: { line: 80, column: 38 }, end: { line: 80, column: 43 } },
'16': { start: { line: 81, column: 4 }, end: { line: 81, column: 51 } },
'17': { start: { line: 86, column: 2 }, end: { line: 89, column: 3 } },
'18': { start: { line: 87, column: 4 }, end: { line: 87, column: 38 } },
'19': { start: { line: 87, column: 32 }, end: { line: 87, column: 37 } },
'20': { start: { line: 88, column: 4 }, end: { line: 88, column: 52 } },
'21': { start: { line: 91, column: 22 }, end: { line: 91, column: 73 } },
'22': { start: { line: 94, column: 2 }, end: { line: 101, column: 3 } },
'23': { start: { line: 96, column: 4 }, end: { line: 100, column: 5 } },
'24': { start: { line: 97, column: 6 }, end: { line: 97, column: 73 } },
'25': { start: { line: 99, column: 6 }, end: { line: 99, column: 74 } },
'26': { start: { line: 103, column: 2 }, end: { line: 141, column: 3 } },
'27': { start: { line: 105, column: 4 }, end: { line: 140, column: 5 } },
'28': { start: { line: 107, column: 8 }, end: { line: 107, column: 66 } },
'29': { start: { line: 109, column: 8 }, end: { line: 109, column: 65 } },
'30': { start: { line: 110, column: 6 }, end: { line: 110, column: 64 } },
'31': { start: { line: 111, column: 11 }, end: { line: 140, column: 5 } },
'32': { start: { line: 114, column: 20 }, end: { line: 114, column: 39 } },
'33': { start: { line: 117, column: 19 }, end: { line: 117, column: 79 } },
'34': { start: { line: 118, column: 6 }, end: { line: 121, column: 7 } },
'35': { start: { line: 119, column: 8 }, end: { line: 119, column: 27 } },
'36': { start: { line: 120, column: 8 }, end: { line: 120, column: 27 } },
'37': { start: { line: 124, column: 19 }, end: { line: 124, column: 79 } },
'38': { start: { line: 125, column: 6 }, end: { line: 128, column: 7 } },
'39': { start: { line: 126, column: 8 }, end: { line: 126, column: 27 } },
'40': { start: { line: 127, column: 8 }, end: { line: 127, column: 27 } },
'41': { start: { line: 131, column: 17 }, end: { line: 131, column: 65 } },
'42': { start: { line: 132, column: 17 }, end: { line: 132, column: 65 } },
'43': { start: { line: 135, column: 6 }, end: { line: 139, column: 8 } },
'44': { start: { line: 142, column: 2 }, end: { line: 142, column: 14 } },
'45': { start: { line: 315, column: 0 }, end: { line: 351, column: 2 } },
'46': { start: { line: 316, column: 2 }, end: { line: 316, column: 30 } },
'47': { start: { line: 317, column: 2 }, end: { line: 317, column: 44 } },
'48': { start: { line: 320, column: 2 }, end: { line: 328, column: 3 } },
'49': { start: { line: 320, column: 15 }, end: { line: 320, column: 54 } },
'50': { start: { line: 322, column: 4 }, end: { line: 327, column: 5 } },
'51': { start: { line: 326, column: 6 }, end: { line: 326, column: 48 } },
'52': { start: { line: 331, column: 2 }, end: { line: 350, column: 3 } },
'53': { start: { line: 332, column: 4 }, end: { line: 335, column: 6 } },
'54': { start: { line: 336, column: 9 }, end: { line: 350, column: 3 } },
'55': { start: { line: 337, column: 4 }, end: { line: 340, column: 6 } },
'56': { start: { line: 342, column: 4 }, end: { line: 345, column: 6 } },
'57': { start: { line: 346, column: 4 }, end: { line: 349, column: 6 } },
'58': { start: { line: 383, column: 0 }, end: { line: 396, column: 2 } },
'59': { start: { line: 384, column: 2 }, end: { line: 384, column: 32 } },
'60': { start: { line: 387, column: 2 }, end: { line: 395, column: 3 } },
'61': { start: { line: 387, column: 15 }, end: { line: 387, column: 54 } },
'62': { start: { line: 389, column: 4 }, end: { line: 394, column: 5 } },
'63': { start: { line: 393, column: 6 }, end: { line: 393, column: 48 } },
'64': { start: { line: 408, column: 0 }, end: { line: 473, column: 2 } },
'65': { start: { line: 409, column: 2 }, end: { line: 411, column: 3 } },
'66': { start: { line: 410, column: 4 }, end: { line: 410, column: 26 } },
'67': { start: { line: 412, column: 2 }, end: { line: 415, column: 3 } },
'68': { start: { line: 414, column: 4 }, end: { line: 414, column: 68 } },
'69': { start: { line: 416, column: 2 }, end: { line: 418, column: 3 } },
'70': { start: { line: 417, column: 4 }, end: { line: 417, column: 13 } },
'71': { start: { line: 419, column: 2 }, end: { line: 421, column: 3 } },
'72': { start: { line: 420, column: 4 }, end: { line: 420, column: 13 } },
'73': { start: { line: 422, column: 2 }, end: { line: 424, column: 3 } },
'74': { start: { line: 423, column: 4 }, end: { line: 423, column: 13 } },
'75': { start: { line: 426, column: 18 }, end: { line: 426, column: 32 } },
'76': { start: { line: 427, column: 19 }, end: { line: 427, column: 27 } },
'77': { start: { line: 429, column: 2 }, end: { line: 472, column: 4 } },
'78': { start: { line: 430, column: 4 }, end: { line: 430, column: 16 } },
'79': { start: { line: 431, column: 4 }, end: { line: 435, column: 6 } },
'80': { start: { line: 436, column: 4 }, end: { line: 453, column: 6 } },
'81': { start: { line: 456, column: 4 }, end: { line: 461, column: 5 } },
'82': { start: { line: 456, column: 17 }, end: { line: 456, column: 18 } },
'83': { start: { line: 457, column: 6 }, end: { line: 457, column: 34 } },
'84': { start: { line: 458, column: 6 }, end: { line: 458, column: 73 } },
'85': { start: { line: 459, column: 6 }, end: { line: 459, column: 73 } },
'86': { start: { line: 460, column: 6 }, end: { line: 460, column: 22 } },
'87': { start: { line: 464, column: 4 }, end: { line: 469, column: 5 } },
'88': { start: { line: 464, column: 17 }, end: { line: 464, column: 18 } },
'89': { start: { line: 465, column: 6 }, end: { line: 465, column: 34 } },
'90': { start: { line: 466, column: 6 }, end: { line: 466, column: 73 } },
'91': { start: { line: 467, column: 6 }, end: { line: 467, column: 73 } },
'92': { start: { line: 468, column: 6 }, end: { line: 468, column: 22 } },
'93': { start: { line: 471, column: 4 }, end: { line: 471, column: 15 } },
'94': { start: { line: 484, column: 0 }, end: { line: 540, column: 2 } },
'95': { start: { line: 485, column: 2 }, end: { line: 487, column: 3 } },
'96': { start: { line: 486, column: 4 }, end: { line: 486, column: 55 } },
'97': { start: { line: 488, column: 2 }, end: { line: 490, column: 3 } },
'98': { start: { line: 489, column: 4 }, end: { line: 489, column: 27 } },
'99': { start: { line: 491, column: 2 }, end: { line: 493, column: 3 } },
'100': { start: { line: 492, column: 4 }, end: { line: 492, column: 16 } },
'101': { start: { line: 494, column: 2 }, end: { line: 496, column: 3 } },
'102': { start: { line: 495, column: 4 }, end: { line: 495, column: 16 } },
'103': { start: { line: 498, column: 2 }, end: { line: 539, column: 4 } },
'104': { start: { line: 499, column: 4 }, end: { line: 499, column: 16 } },
'105': { start: { line: 500, column: 4 }, end: { line: 517, column: 6 } },
'106': { start: { line: 520, column: 4 }, end: { line: 520, column: 25 } },
'107': { start: { line: 521, column: 4 }, end: { line: 521, column: 27 } },
'108': { start: { line: 522, column: 4 }, end: { line: 522, column: 32 } },
'109': { start: { line: 523, column: 4 }, end: { line: 523, column: 34 } },
'110': { start: { line: 524, column: 4 }, end: { line: 524, column: 41 } },
'111': { start: { line: 525, column: 4 }, end: { line: 525, column: 20 } },
'112': { start: { line: 527, column: 4 }, end: { line: 527, column: 27 } },
'113': { start: { line: 528, column: 4 }, end: { line: 528, column: 32 } },
'114': { start: { line: 529, column: 4 }, end: { line: 529, column: 34 } },
'115': { start: { line: 530, column: 4 }, end: { line: 530, column: 41 } },
'116': { start: { line: 531, column: 4 }, end: { line: 531, column: 20 } },
'117': { start: { line: 533, column: 4 }, end: { line: 533, column: 27 } },
'118': { start: { line: 534, column: 4 }, end: { line: 534, column: 32 } },
'119': { start: { line: 535, column: 4 }, end: { line: 535, column: 34 } },
'120': { start: { line: 536, column: 4 }, end: { line: 536, column: 41 } },
'121': { start: { line: 537, column: 4 }, end: { line: 537, column: 20 } },
'122': { start: { line: 538, column: 4 }, end: { line: 538, column: 15 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 49, column: 28 }, end: { line: 49, column: 29 } },
loc: { start: { line: 49, column: 79 }, end: { line: 143, column: 1 } },
line: 49
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 80, column: 32 }, end: { line: 80, column: 33 } },
loc: { start: { line: 80, column: 38 }, end: { line: 80, column: 43 } },
line: 80
},
'2': {
name: '(anonymous_2)',
decl: { start: { line: 87, column: 26 }, end: { line: 87, column: 27 } },
loc: { start: { line: 87, column: 32 }, end: { line: 87, column: 37 } },
line: 87
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 315, column: 25 },
end: { line: 315, column: 26 }
},
loc: { start: { line: 315, column: 43 }, end: { line: 351, column: 1 } },
line: 315
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 383, column: 27 },
end: { line: 383, column: 28 }
},
loc: { start: { line: 383, column: 38 }, end: { line: 396, column: 1 } },
line: 383
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 408, column: 21 },
end: { line: 408, column: 22 }
},
loc: { start: { line: 408, column: 63 }, end: { line: 473, column: 1 } },
line: 408
},
'6': {
name: '(anonymous_6)',
decl: { start: { line: 429, column: 9 }, end: { line: 429, column: 10 } },
loc: { start: { line: 429, column: 20 }, end: { line: 472, column: 3 } },
line: 429
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 484, column: 25 },
end: { line: 484, column: 26 }
},
loc: { start: { line: 484, column: 58 }, end: { line: 540, column: 1 } },
line: 484
},
'8': {
name: '(anonymous_8)',
decl: { start: { line: 498, column: 9 }, end: { line: 498, column: 10 } },
loc: { start: { line: 498, column: 20 }, end: { line: 539, column: 3 } },
line: 498
}
},
branchMap: {
'0': {
loc: { start: { line: 55, column: 4 }, end: { line: 58, column: 19 } },
type: 'binary-expr',
locations: [
{ start: { line: 55, column: 4 }, end: { line: 55, column: 28 } },
{ start: { line: 56, column: 4 }, end: { line: 56, column: 19 } },
{ start: { line: 57, column: 4 }, end: { line: 57, column: 29 } },
{ start: { line: 58, column: 4 }, end: { line: 58, column: 19 } }
],
line: 55
},
'1': {
loc: { start: { line: 59, column: 2 }, end: { line: 59, column: 29 } },
type: 'if',
locations: [
{ start: { line: 59, column: 2 }, end: { line: 59, column: 29 } },
{ start: { line: 59, column: 2 }, end: { line: 59, column: 29 } }
],
line: 59
},
'2': {
loc: { start: { line: 63, column: 2 }, end: { line: 65, column: 3 } },
type: 'if',
locations: [
{ start: { line: 63, column: 2 }, end: { line: 65, column: 3 } },
{ start: { line: 63, column: 2 }, end: { line: 65, column: 3 } }
],
line: 63
},
'3': {
loc: { start: { line: 66, column: 2 }, end: { line: 68, column: 3 } },
type: 'if',
locations: [
{ start: { line: 66, column: 2 }, end: { line: 68, column: 3 } },
{ start: { line: 66, column: 2 }, end: { line: 68, column: 3 } }
],
line: 66
},
'4': {
loc: { start: { line: 69, column: 2 }, end: { line: 71, column: 3 } },
type: 'if',
locations: [
{ start: { line: 69, column: 2 }, end: { line: 71, column: 3 } },
{ start: { line: 69, column: 2 }, end: { line: 71, column: 3 } }
],
line: 69
},
'5': {
loc: { start: { line: 79, column: 2 }, end: { line: 82, column: 3 } },
type: 'if',
locations: [
{ start: { line: 79, column: 2 }, end: { line: 82, column: 3 } },
{ start: { line: 79, column: 2 }, end: { line: 82, column: 3 } }
],
line: 79
},
'6': {
loc: { start: { line: 86, column: 2 }, end: { line: 89, column: 3 } },
type: 'if',
locations: [
{ start: { line: 86, column: 2 }, end: { line: 89, column: 3 } },
{ start: { line: 86, column: 2 }, end: { line: 89, column: 3 } }
],
line: 86
},
'7': {
loc: { start: { line: 91, column: 22 }, end: { line: 91, column: 73 } },
type: 'cond-expr',
locations: [
{ start: { line: 91, column: 49 }, end: { line: 91, column: 60 } },
{ start: { line: 91, column: 63 }, end: { line: 91, column: 73 } }
],
line: 91
},
'8': {
loc: { start: { line: 94, column: 2 }, end: { line: 101, column: 3 } },
type: 'if',
locations: [
{ start: { line: 94, column: 2 }, end: { line: 101, column: 3 } },
{ start: { line: 94, column: 2 }, end: { line: 101, column: 3 } }
],
line: 94
},
'9': {
loc: { start: { line: 96, column: 4 }, end: { line: 100, column: 5 } },
type: 'if',
locations: [
{ start: { line: 96, column: 4 }, end: { line: 100, column: 5 } },
{ start: { line: 96, column: 4 }, end: { line: 100, column: 5 } }
],
line: 96
},
'10': {
loc: { start: { line: 103, column: 2 }, end: { line: 141, column: 3 } },
type: 'if',
locations: [
{ start: { line: 103, column: 2 }, end: { line: 141, column: 3 } },
{ start: { line: 103, column: 2 }, end: { line: 141, column: 3 } }
],
line: 103
},
'11': {
loc: { start: { line: 105, column: 4 }, end: { line: 140, column: 5 } },
type: 'if',
locations: [
{ start: { line: 105, column: 4 }, end: { line: 140, column: 5 } },
{ start: { line: 105, column: 4 }, end: { line: 140, column: 5 } }
],
line: 105
},
'12': {
loc: { start: { line: 111, column: 11 }, end: { line: 140, column: 5 } },
type: 'if',
locations: [
{ start: { line: 111, column: 11 }, end: { line: 140, column: 5 } },
{ start: { line: 111, column: 11 }, end: { line: 140, column: 5 } }
],
line: 111
},
'13': {
loc: { start: { line: 118, column: 6 }, end: { line: 121, column: 7 } },
type: 'if',
locations: [
{ start: { line: 118, column: 6 }, end: { line: 121, column: 7 } },
{ start: { line: 118, column: 6 }, end: { line: 121, column: 7 } }
],
line: 118
},
'14': {
loc: { start: { line: 125, column: 6 }, end: { line: 128, column: 7 } },
type: 'if',
locations: [
{ start: { line: 125, column: 6 }, end: { line: 128, column: 7 } },
{ start: { line: 125, column: 6 }, end: { line: 128, column: 7 } }
],
line: 125
},
'15': {
loc: { start: { line: 322, column: 4 }, end: { line: 327, column: 5 } },
type: 'if',
locations: [
{ start: { line: 322, column: 4 }, end: { line: 327, column: 5 } },
{ start: { line: 322, column: 4 }, end: { line: 327, column: 5 } }
],
line: 322
},
'16': {
loc: { start: { line: 323, column: 6 }, end: { line: 324, column: 80 } },
type: 'binary-expr',
locations: [
{ start: { line: 323, column: 6 }, end: { line: 323, column: 76 } },
{ start: { line: 324, column: 6 }, end: { line: 324, column: 80 } }
],
line: 323
},
'17': {
loc: { start: { line: 331, column: 2 }, end: { line: 350, column: 3 } },
type: 'if',
locations: [
{ start: { line: 331, column: 2 }, end: { line: 350, column: 3 } },
{ start: { line: 331, column: 2 }, end: { line: 350, column: 3 } }
],
line: 331
},
'18': {
loc: { start: { line: 336, column: 9 }, end: { line: 350, column: 3 } },
type: 'if',
locations: [
{ start: { line: 336, column: 9 }, end: { line: 350, column: 3 } },
{ start: { line: 336, column: 9 }, end: { line: 350, column: 3 } }
],
line: 336
},
'19': {
loc: { start: { line: 389, column: 4 }, end: { line: 394, column: 5 } },
type: 'if',
locations: [
{ start: { line: 389, column: 4 }, end: { line: 394, column: 5 } },
{ start: { line: 389, column: 4 }, end: { line: 394, column: 5 } }
],
line: 389
},
'20': {
loc: { start: { line: 390, column: 6 }, end: { line: 391, column: 80 } },
type: 'binary-expr',
locations: [
{ start: { line: 390, column: 6 }, end: { line: 390, column: 76 } },
{ start: { line: 391, column: 6 }, end: { line: 391, column: 80 } }
],
line: 390
},
'21': {
loc: { start: { line: 409, column: 2 }, end: { line: 411, column: 3 } },
type: 'if',
locations: [
{ start: { line: 409, column: 2 }, end: { line: 411, column: 3 } },
{ start: { line: 409, column: 2 }, end: { line: 411, column: 3 } }
],
line: 409
},
'22': {
loc: { start: { line: 412, column: 2 }, end: { line: 415, column: 3 } },
type: 'if',
locations: [
{ start: { line: 412, column: 2 }, end: { line: 415, column: 3 } },
{ start: { line: 412, column: 2 }, end: { line: 415, column: 3 } }
],
line: 412
},
'23': {
loc: { start: { line: 414, column: 14 }, end: { line: 414, column: 67 } },
type: 'cond-expr',
locations: [
{ start: { line: 414, column: 42 }, end: { line: 414, column: 43 } },
{ start: { line: 414, column: 46 }, end: { line: 414, column: 67 } }
],
line: 414
},
'24': {
loc: { start: { line: 416, column: 2 }, end: { line: 418, column: 3 } },
type: 'if',
locations: [
{ start: { line: 416, column: 2 }, end: { line: 418, column: 3 } },
{ start: { line: 416, column: 2 }, end: { line: 418, column: 3 } }
],
line: 416
},
'25': {
loc: { start: { line: 419, column: 2 }, end: { line: 421, column: 3 } },
type: 'if',
locations: [
{ start: { line: 419, column: 2 }, end: { line: 421, column: 3 } },
{ start: { line: 419, column: 2 }, end: { line: 421, column: 3 } }
],
line: 419
},
'26': {
loc: { start: { line: 422, column: 2 }, end: { line: 424, column: 3 } },
type: 'if',
locations: [
{ start: { line: 422, column: 2 }, end: { line: 424, column: 3 } },
{ start: { line: 422, column: 2 }, end: { line: 424, column: 3 } }
],
line: 422
},
'27': {
loc: { start: { line: 485, column: 2 }, end: { line: 487, column: 3 } },
type: 'if',
locations: [
{ start: { line: 485, column: 2 }, end: { line: 487, column: 3 } },
{ start: { line: 485, column: 2 }, end: { line: 487, column: 3 } }
],
line: 485
},
'28': {
loc: { start: { line: 486, column: 11 }, end: { line: 486, column: 54 } },
type: 'cond-expr',
locations: [
{ start: { line: 486, column: 34 }, end: { line: 486, column: 49 } },
{ start: { line: 486, column: 52 }, end: { line: 486, column: 54 } }
],
line: 486
},
'29': {
loc: { start: { line: 488, column: 2 }, end: { line: 490, column: 3 } },
type: 'if',
locations: [
{ start: { line: 488, column: 2 }, end: { line: 490, column: 3 } },
{ start: { line: 488, column: 2 }, end: { line: 490, column: 3 } }
],
line: 488
},
'30': {
loc: { start: { line: 491, column: 2 }, end: { line: 493, column: 3 } },
type: 'if',
locations: [
{ start: { line: 491, column: 2 }, end: { line: 493, column: 3 } },
{ start: { line: 491, column: 2 }, end: { line: 493, column: 3 } }
],
line: 491
},
'31': {
loc: { start: { line: 494, column: 2 }, end: { line: 496, column: 3 } },
type: 'if',
locations: [
{ start: { line: 494, column: 2 }, end: { line: 496, column: 3 } },
{ start: { line: 494, column: 2 }, end: { line: 496, column: 3 } }
],
line: 494
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0
},
f: { '0': 0, '1': 0, '2': 0, '3': 0, '4': 0, '5': 0, '6': 0, '7': 0, '8': 0 },
b: {
'0': [0, 0, 0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0],
'20': [0, 0],
'21': [0, 0],
'22': [0, 0],
'23': [0, 0],
'24': [0, 0],
'25': [0, 0],
'26': [0, 0],
'27': [0, 0],
'28': [0, 0],
'29': [0, 0],
'30': [0, 0],
'31': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '1d82e325bc807fa6c67263b69781006ad9f70999'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
var constants = _interopRequireWildcard(_dereq_('../core/constants'));
function _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function _getRequireWildcardCache() {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || (_typeof(obj) !== 'object' && typeof obj !== 'function')) {
return { default: obj };
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_26tsr7rwx0.s[0]++;
/**
* Allows movement around a 3D sketch using a mouse or trackpad. Left-clicking
* and dragging will rotate the camera position about the center of the sketch,
* right-clicking and dragging will pan the camera position without rotation,
* and using the mouse wheel (scrolling) will move the camera closer or further
* from the center of the sketch. This function can be called with parameters
* dictating sensitivity to mouse movement along the X and Y axes. Calling
* this function without parameters is equivalent to calling orbitControl(1,1).
* To reverse direction of movement in either axis, enter a negative number
* for sensitivity.
* @method orbitControl
* @for p5
* @param {Number} [sensitivityX] sensitivity to mouse movement along X axis
* @param {Number} [sensitivityY] sensitivity to mouse movement along Y axis
* @param {Number} [sensitivityZ] sensitivity to scroll movement along Z axis
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* normalMaterial();
* }
* function draw() {
* background(200);
* orbitControl();
* rotateY(0.5);
* box(30, 50);
* }
*
*
*
* @alt
* Camera orbits around a box when mouse is hold-clicked & then moved.
*/
// implementation based on three.js 'orbitControls':
// https://github.com/mrdoob/three.js/blob/dev/examples/js/controls/OrbitControls.js
_main.default.prototype.orbitControl = function(
sensitivityX,
sensitivityY,
sensitivityZ
) {
cov_26tsr7rwx0.f[0]++;
cov_26tsr7rwx0.s[1]++;
this._assert3d('orbitControl');
cov_26tsr7rwx0.s[2]++;
_main.default._validateParameters('orbitControl', arguments);
// If the mouse is not in bounds of the canvas, disable all behaviors:
var mouseInCanvas = (cov_26tsr7rwx0.s[3]++,
(cov_26tsr7rwx0.b[0][0]++, this.mouseX < this.width) &&
(cov_26tsr7rwx0.b[0][1]++, this.mouseX > 0) &&
(cov_26tsr7rwx0.b[0][2]++, this.mouseY < this.height) &&
(cov_26tsr7rwx0.b[0][3]++, this.mouseY > 0));
cov_26tsr7rwx0.s[4]++;
if (!mouseInCanvas) {
cov_26tsr7rwx0.b[1][0]++;
cov_26tsr7rwx0.s[5]++;
return;
} else {
cov_26tsr7rwx0.b[1][1]++;
}
var cam = (cov_26tsr7rwx0.s[6]++, this._renderer._curCamera);
cov_26tsr7rwx0.s[7]++;
if (typeof sensitivityX === 'undefined') {
cov_26tsr7rwx0.b[2][0]++;
cov_26tsr7rwx0.s[8]++;
sensitivityX = 1;
} else {
cov_26tsr7rwx0.b[2][1]++;
}
cov_26tsr7rwx0.s[9]++;
if (typeof sensitivityY === 'undefined') {
cov_26tsr7rwx0.b[3][0]++;
cov_26tsr7rwx0.s[10]++;
sensitivityY = sensitivityX;
} else {
cov_26tsr7rwx0.b[3][1]++;
}
cov_26tsr7rwx0.s[11]++;
if (typeof sensitivityZ === 'undefined') {
cov_26tsr7rwx0.b[4][0]++;
cov_26tsr7rwx0.s[12]++;
sensitivityZ = 0.5;
} else {
cov_26tsr7rwx0.b[4][1]++;
}
// default right-mouse and mouse-wheel behaviors (context menu and scrolling,
// respectively) are disabled here to allow use of those events for panning and
// zooming
// disable context menu for canvas element and add 'contextMenuDisabled'
// flag to p5 instance
cov_26tsr7rwx0.s[13]++;
if (this.contextMenuDisabled !== true) {
cov_26tsr7rwx0.b[5][0]++;
cov_26tsr7rwx0.s[14]++;
this.canvas.oncontextmenu = function() {
cov_26tsr7rwx0.f[1]++;
cov_26tsr7rwx0.s[15]++;
return false;
};
cov_26tsr7rwx0.s[16]++;
this._setProperty('contextMenuDisabled', true);
} else {
cov_26tsr7rwx0.b[5][1]++;
}
// disable default scrolling behavior on the canvas element and add
// 'wheelDefaultDisabled' flag to p5 instance
cov_26tsr7rwx0.s[17]++;
if (this.wheelDefaultDisabled !== true) {
cov_26tsr7rwx0.b[6][0]++;
cov_26tsr7rwx0.s[18]++;
this.canvas.onwheel = function() {
cov_26tsr7rwx0.f[2]++;
cov_26tsr7rwx0.s[19]++;
return false;
};
cov_26tsr7rwx0.s[20]++;
this._setProperty('wheelDefaultDisabled', true);
} else {
cov_26tsr7rwx0.b[6][1]++;
}
var scaleFactor = (cov_26tsr7rwx0.s[21]++,
this.height < this.width
? (cov_26tsr7rwx0.b[7][0]++, this.height)
: (cov_26tsr7rwx0.b[7][1]++, this.width));
// ZOOM if there is a change in mouseWheelDelta
cov_26tsr7rwx0.s[22]++;
if (this._mouseWheelDeltaY !== this._pmouseWheelDeltaY) {
cov_26tsr7rwx0.b[8][0]++;
cov_26tsr7rwx0.s[23]++;
// zoom according to direction of mouseWheelDeltaY rather than value
if (this._mouseWheelDeltaY > 0) {
cov_26tsr7rwx0.b[9][0]++;
cov_26tsr7rwx0.s[24]++;
this._renderer._curCamera._orbit(0, 0, sensitivityZ * scaleFactor);
} else {
cov_26tsr7rwx0.b[9][1]++;
cov_26tsr7rwx0.s[25]++;
this._renderer._curCamera._orbit(0, 0, -sensitivityZ * scaleFactor);
}
} else {
cov_26tsr7rwx0.b[8][1]++;
}
cov_26tsr7rwx0.s[26]++;
if (this.mouseIsPressed) {
cov_26tsr7rwx0.b[10][0]++;
cov_26tsr7rwx0.s[27]++;
// ORBIT BEHAVIOR
if (this.mouseButton === this.LEFT) {
cov_26tsr7rwx0.b[11][0]++;
var deltaTheta = (cov_26tsr7rwx0.s[28]++,
-sensitivityX * (this.mouseX - this.pmouseX) / scaleFactor);
var deltaPhi = (cov_26tsr7rwx0.s[29]++,
sensitivityY * (this.mouseY - this.pmouseY) / scaleFactor);
cov_26tsr7rwx0.s[30]++;
this._renderer._curCamera._orbit(deltaTheta, deltaPhi, 0);
} else {
cov_26tsr7rwx0.b[11][1]++;
cov_26tsr7rwx0.s[31]++;
if (this.mouseButton === this.RIGHT) {
cov_26tsr7rwx0.b[12][0]++;
// PANNING BEHAVIOR along X/Z camera axes and restricted to X/Z plane
// in world space
var local = (cov_26tsr7rwx0.s[32]++, cam._getLocalAxes());
// normalize portions along X/Z axes
var xmag = (cov_26tsr7rwx0.s[33]++,
Math.sqrt(local.x[0] * local.x[0] + local.x[2] * local.x[2]));
cov_26tsr7rwx0.s[34]++;
if (xmag !== 0) {
cov_26tsr7rwx0.b[13][0]++;
cov_26tsr7rwx0.s[35]++;
local.x[0] /= xmag;
cov_26tsr7rwx0.s[36]++;
local.x[2] /= xmag;
} else {
cov_26tsr7rwx0.b[13][1]++;
}
// normalize portions along X/Z axes
var ymag = (cov_26tsr7rwx0.s[37]++,
Math.sqrt(local.y[0] * local.y[0] + local.y[2] * local.y[2]));
cov_26tsr7rwx0.s[38]++;
if (ymag !== 0) {
cov_26tsr7rwx0.b[14][0]++;
cov_26tsr7rwx0.s[39]++;
local.y[0] /= ymag;
cov_26tsr7rwx0.s[40]++;
local.y[2] /= ymag;
} else {
cov_26tsr7rwx0.b[14][1]++;
}
// move along those vectors by amount controlled by mouseX, pmouseY
var dx = (cov_26tsr7rwx0.s[41]++,
-1 * sensitivityX * (this.mouseX - this.pmouseX));
var dz = (cov_26tsr7rwx0.s[42]++,
-1 * sensitivityY * (this.mouseY - this.pmouseY));
// restrict movement to XZ plane in world space
cov_26tsr7rwx0.s[43]++;
cam.setPosition(
cam.eyeX + dx * local.x[0] + dz * local.z[0],
cam.eyeY,
cam.eyeZ + dx * local.x[2] + dz * local.z[2]
);
} else {
cov_26tsr7rwx0.b[12][1]++;
}
}
} else {
cov_26tsr7rwx0.b[10][1]++;
}
cov_26tsr7rwx0.s[44]++;
return this;
};
/**
* debugMode() helps visualize 3D space by adding a grid to indicate where the
* ‘ground’ is in a sketch and an axes icon which indicates the +X, +Y, and +Z
* directions. This function can be called without parameters to create a
* default grid and axes icon, or it can be called according to the examples
* above to customize the size and position of the grid and/or axes icon. The
* grid is drawn using the most recently set stroke color and weight. To
* specify these parameters, add a call to stroke() and strokeWeight()
* just before the end of the draw() loop.
*
* By default, the grid will run through the origin (0,0,0) of the sketch
* along the XZ plane
* and the axes icon will be offset from the origin. Both the grid and axes
* icon will be sized according to the current canvas size. Note that because the
* grid runs parallel to the default camera view, it is often helpful to use
* debugMode along with orbitControl to allow full view of the grid.
* @method debugMode
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* camera(0, -30, 100, 0, 0, 0, 0, 1, 0);
* normalMaterial();
* debugMode();
* }
*
* function draw() {
* background(200);
* orbitControl();
* box(15, 30);
* // Press the spacebar to turn debugMode off!
* if (keyIsDown(32)) {
* noDebugMode();
* }
* }
*
*
* @alt
* a 3D box is centered on a grid in a 3D sketch. an icon
* indicates the direction of each axis: a red line points +X,
* a green line +Y, and a blue line +Z. the grid and icon disappear when the
* spacebar is pressed.
*
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* camera(0, -30, 100, 0, 0, 0, 0, 1, 0);
* normalMaterial();
* debugMode(GRID);
* }
*
* function draw() {
* background(200);
* orbitControl();
* box(15, 30);
* }
*
*
* @alt
* a 3D box is centered on a grid in a 3D sketch.
*
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* camera(0, -30, 100, 0, 0, 0, 0, 1, 0);
* normalMaterial();
* debugMode(AXES);
* }
*
* function draw() {
* background(200);
* orbitControl();
* box(15, 30);
* }
*
*
* @alt
* a 3D box is centered in a 3D sketch. an icon
* indicates the direction of each axis: a red line points +X,
* a green line +Y, and a blue line +Z.
*
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* camera(0, -30, 100, 0, 0, 0, 0, 1, 0);
* normalMaterial();
* debugMode(GRID, 100, 10, 0, 0, 0);
* }
*
* function draw() {
* background(200);
* orbitControl();
* box(15, 30);
* }
*
*
* @alt
* a 3D box is centered on a grid in a 3D sketch
*
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* camera(0, -30, 100, 0, 0, 0, 0, 1, 0);
* normalMaterial();
* debugMode(100, 10, 0, 0, 0, 20, 0, -40, 0);
* }
*
* function draw() {
* noStroke();
* background(200);
* orbitControl();
* box(15, 30);
* // set the stroke color and weight for the grid!
* stroke(255, 0, 150);
* strokeWeight(0.8);
* }
*
*
* @alt
* a 3D box is centered on a grid in a 3D sketch. an icon
* indicates the direction of each axis: a red line points +X,
* a green line +Y, and a blue line +Z.
*/
/**
* @method debugMode
* @param {Constant} mode either GRID or AXES
*/
/**
* @method debugMode
* @param {Constant} mode
* @param {Number} [gridSize] size of one side of the grid
* @param {Number} [gridDivisions] number of divisions in the grid
* @param {Number} [xOff] X axis offset from origin (0,0,0)
* @param {Number} [yOff] Y axis offset from origin (0,0,0)
* @param {Number} [zOff] Z axis offset from origin (0,0,0)
*/
/**
* @method debugMode
* @param {Constant} mode
* @param {Number} [axesSize] size of axes icon
* @param {Number} [xOff]
* @param {Number} [yOff]
* @param {Number} [zOff]
*/
/**
* @method debugMode
* @param {Number} [gridSize]
* @param {Number} [gridDivisions]
* @param {Number} [gridXOff]
* @param {Number} [gridYOff]
* @param {Number} [gridZOff]
* @param {Number} [axesSize]
* @param {Number} [axesXOff]
* @param {Number} [axesYOff]
* @param {Number} [axesZOff]
*/ cov_26tsr7rwx0.s[45]++;
_main.default.prototype.debugMode = function() {
cov_26tsr7rwx0.f[3]++;
cov_26tsr7rwx0.s[46]++;
this._assert3d('debugMode');
cov_26tsr7rwx0.s[47]++;
for (
var _len = arguments.length, args = new Array(_len), _key = 0;
_key < _len;
_key++
) {
args[_key] = arguments[_key];
}
_main.default._validateParameters('debugMode', args);
// start by removing existing 'post' registered debug methods
cov_26tsr7rwx0.s[48]++;
for (
var i = (cov_26tsr7rwx0.s[49]++, this._registeredMethods.post.length - 1);
i >= 0;
i--
) {
cov_26tsr7rwx0.s[50]++;
// test for equality...
if (
(cov_26tsr7rwx0.b[16][0]++,
this._registeredMethods.post[i].toString() === this._grid().toString()) ||
(cov_26tsr7rwx0.b[16][1]++,
this._registeredMethods.post[i].toString() === this._axesIcon().toString())
) {
cov_26tsr7rwx0.b[15][0]++;
cov_26tsr7rwx0.s[51]++;
this._registeredMethods.post.splice(i, 1);
} else {
cov_26tsr7rwx0.b[15][1]++;
}
}
// then add new debugMode functions according to the argument list
cov_26tsr7rwx0.s[52]++;
if (args[0] === constants.GRID) {
cov_26tsr7rwx0.b[17][0]++;
cov_26tsr7rwx0.s[53]++;
this.registerMethod(
'post',
this._grid.call(this, args[1], args[2], args[3], args[4], args[5])
);
} else {
cov_26tsr7rwx0.b[17][1]++;
cov_26tsr7rwx0.s[54]++;
if (args[0] === constants.AXES) {
cov_26tsr7rwx0.b[18][0]++;
cov_26tsr7rwx0.s[55]++;
this.registerMethod(
'post',
this._axesIcon.call(this, args[1], args[2], args[3], args[4])
);
} else {
cov_26tsr7rwx0.b[18][1]++;
cov_26tsr7rwx0.s[56]++;
this.registerMethod(
'post',
this._grid.call(this, args[0], args[1], args[2], args[3], args[4])
);
cov_26tsr7rwx0.s[57]++;
this.registerMethod(
'post',
this._axesIcon.call(this, args[5], args[6], args[7], args[8])
);
}
}
};
/**
* Turns off debugMode() in a 3D sketch.
* @method noDebugMode
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* camera(0, -30, 100, 0, 0, 0, 0, 1, 0);
* normalMaterial();
* debugMode();
* }
*
* function draw() {
* background(200);
* orbitControl();
* box(15, 30);
* // Press the spacebar to turn debugMode off!
* if (keyIsDown(32)) {
* noDebugMode();
* }
* }
*
*
* @alt
* a 3D box is centered on a grid in a 3D sketch. an icon
* indicates the direction of each axis: a red line points +X,
* a green line +Y, and a blue line +Z. the grid and icon disappear when the
* spacebar is pressed.
*/ cov_26tsr7rwx0.s[58]++;
_main.default.prototype.noDebugMode = function() {
cov_26tsr7rwx0.f[4]++;
cov_26tsr7rwx0.s[59]++;
this._assert3d('noDebugMode');
// start by removing existing 'post' registered debug methods
cov_26tsr7rwx0.s[60]++;
for (
var i = (cov_26tsr7rwx0.s[61]++, this._registeredMethods.post.length - 1);
i >= 0;
i--
) {
cov_26tsr7rwx0.s[62]++;
// test for equality...
if (
(cov_26tsr7rwx0.b[20][0]++,
this._registeredMethods.post[i].toString() === this._grid().toString()) ||
(cov_26tsr7rwx0.b[20][1]++,
this._registeredMethods.post[i].toString() === this._axesIcon().toString())
) {
cov_26tsr7rwx0.b[19][0]++;
cov_26tsr7rwx0.s[63]++;
this._registeredMethods.post.splice(i, 1);
} else {
cov_26tsr7rwx0.b[19][1]++;
}
}
};
/**
* For use with debugMode
* @private
* @method _grid
* @param {Number} [size] size of grid sides
* @param {Number} [div] number of grid divisions
* @param {Number} [xOff] offset of grid center from origin in X axis
* @param {Number} [yOff] offset of grid center from origin in Y axis
* @param {Number} [zOff] offset of grid center from origin in Z axis
*/ cov_26tsr7rwx0.s[64]++;
_main.default.prototype._grid = function(size, numDivs, xOff, yOff, zOff) {
cov_26tsr7rwx0.f[5]++;
cov_26tsr7rwx0.s[65]++;
if (typeof size === 'undefined') {
cov_26tsr7rwx0.b[21][0]++;
cov_26tsr7rwx0.s[66]++;
size = this.width / 2;
} else {
cov_26tsr7rwx0.b[21][1]++;
}
cov_26tsr7rwx0.s[67]++;
if (typeof numDivs === 'undefined') {
cov_26tsr7rwx0.b[22][0]++;
cov_26tsr7rwx0.s[68]++;
// ensure at least 2 divisions
numDivs =
Math.round(size / 30) < 4
? (cov_26tsr7rwx0.b[23][0]++, 4)
: (cov_26tsr7rwx0.b[23][1]++, Math.round(size / 30));
} else {
cov_26tsr7rwx0.b[22][1]++;
}
cov_26tsr7rwx0.s[69]++;
if (typeof xOff === 'undefined') {
cov_26tsr7rwx0.b[24][0]++;
cov_26tsr7rwx0.s[70]++;
xOff = 0;
} else {
cov_26tsr7rwx0.b[24][1]++;
}
cov_26tsr7rwx0.s[71]++;
if (typeof yOff === 'undefined') {
cov_26tsr7rwx0.b[25][0]++;
cov_26tsr7rwx0.s[72]++;
yOff = 0;
} else {
cov_26tsr7rwx0.b[25][1]++;
}
cov_26tsr7rwx0.s[73]++;
if (typeof zOff === 'undefined') {
cov_26tsr7rwx0.b[26][0]++;
cov_26tsr7rwx0.s[74]++;
zOff = 0;
} else {
cov_26tsr7rwx0.b[26][1]++;
}
var spacing = (cov_26tsr7rwx0.s[75]++, size / numDivs);
var halfSize = (cov_26tsr7rwx0.s[76]++, size / 2);
cov_26tsr7rwx0.s[77]++;
return function() {
cov_26tsr7rwx0.f[6]++;
cov_26tsr7rwx0.s[78]++;
this.push();
cov_26tsr7rwx0.s[79]++;
this.stroke(
this._renderer.curStrokeColor[0] * 255,
this._renderer.curStrokeColor[1] * 255,
this._renderer.curStrokeColor[2] * 255
);
cov_26tsr7rwx0.s[80]++;
this._renderer.uMVMatrix.set(
this._renderer._curCamera.cameraMatrix.mat4[0],
this._renderer._curCamera.cameraMatrix.mat4[1],
this._renderer._curCamera.cameraMatrix.mat4[2],
this._renderer._curCamera.cameraMatrix.mat4[3],
this._renderer._curCamera.cameraMatrix.mat4[4],
this._renderer._curCamera.cameraMatrix.mat4[5],
this._renderer._curCamera.cameraMatrix.mat4[6],
this._renderer._curCamera.cameraMatrix.mat4[7],
this._renderer._curCamera.cameraMatrix.mat4[8],
this._renderer._curCamera.cameraMatrix.mat4[9],
this._renderer._curCamera.cameraMatrix.mat4[10],
this._renderer._curCamera.cameraMatrix.mat4[11],
this._renderer._curCamera.cameraMatrix.mat4[12],
this._renderer._curCamera.cameraMatrix.mat4[13],
this._renderer._curCamera.cameraMatrix.mat4[14],
this._renderer._curCamera.cameraMatrix.mat4[15]
);
// Lines along X axis
cov_26tsr7rwx0.s[81]++;
for (var q = (cov_26tsr7rwx0.s[82]++, 0); q <= numDivs; q++) {
cov_26tsr7rwx0.s[83]++;
this.beginShape(this.LINES);
cov_26tsr7rwx0.s[84]++;
this.vertex(-halfSize + xOff, yOff, q * spacing - halfSize + zOff);
cov_26tsr7rwx0.s[85]++;
this.vertex(+halfSize + xOff, yOff, q * spacing - halfSize + zOff);
cov_26tsr7rwx0.s[86]++;
this.endShape();
}
// Lines along Z axis
cov_26tsr7rwx0.s[87]++;
for (var i = (cov_26tsr7rwx0.s[88]++, 0); i <= numDivs; i++) {
cov_26tsr7rwx0.s[89]++;
this.beginShape(this.LINES);
cov_26tsr7rwx0.s[90]++;
this.vertex(i * spacing - halfSize + xOff, yOff, -halfSize + zOff);
cov_26tsr7rwx0.s[91]++;
this.vertex(i * spacing - halfSize + xOff, yOff, +halfSize + zOff);
cov_26tsr7rwx0.s[92]++;
this.endShape();
}
cov_26tsr7rwx0.s[93]++;
this.pop();
};
};
/**
* For use with debugMode
* @private
* @method _axesIcon
* @param {Number} [size] size of axes icon lines
* @param {Number} [xOff] offset of icon from origin in X axis
* @param {Number} [yOff] offset of icon from origin in Y axis
* @param {Number} [zOff] offset of icon from origin in Z axis
*/ cov_26tsr7rwx0.s[94]++;
_main.default.prototype._axesIcon = function(size, xOff, yOff, zOff) {
cov_26tsr7rwx0.f[7]++;
cov_26tsr7rwx0.s[95]++;
if (typeof size === 'undefined') {
cov_26tsr7rwx0.b[27][0]++;
cov_26tsr7rwx0.s[96]++;
size =
this.width / 20 > 40
? (cov_26tsr7rwx0.b[28][0]++, this.width / 20)
: (cov_26tsr7rwx0.b[28][1]++, 40);
} else {
cov_26tsr7rwx0.b[27][1]++;
}
cov_26tsr7rwx0.s[97]++;
if (typeof xOff === 'undefined') {
cov_26tsr7rwx0.b[29][0]++;
cov_26tsr7rwx0.s[98]++;
xOff = -this.width / 4;
} else {
cov_26tsr7rwx0.b[29][1]++;
}
cov_26tsr7rwx0.s[99]++;
if (typeof yOff === 'undefined') {
cov_26tsr7rwx0.b[30][0]++;
cov_26tsr7rwx0.s[100]++;
yOff = xOff;
} else {
cov_26tsr7rwx0.b[30][1]++;
}
cov_26tsr7rwx0.s[101]++;
if (typeof zOff === 'undefined') {
cov_26tsr7rwx0.b[31][0]++;
cov_26tsr7rwx0.s[102]++;
zOff = xOff;
} else {
cov_26tsr7rwx0.b[31][1]++;
}
cov_26tsr7rwx0.s[103]++;
return function() {
cov_26tsr7rwx0.f[8]++;
cov_26tsr7rwx0.s[104]++;
this.push();
cov_26tsr7rwx0.s[105]++;
this._renderer.uMVMatrix.set(
this._renderer._curCamera.cameraMatrix.mat4[0],
this._renderer._curCamera.cameraMatrix.mat4[1],
this._renderer._curCamera.cameraMatrix.mat4[2],
this._renderer._curCamera.cameraMatrix.mat4[3],
this._renderer._curCamera.cameraMatrix.mat4[4],
this._renderer._curCamera.cameraMatrix.mat4[5],
this._renderer._curCamera.cameraMatrix.mat4[6],
this._renderer._curCamera.cameraMatrix.mat4[7],
this._renderer._curCamera.cameraMatrix.mat4[8],
this._renderer._curCamera.cameraMatrix.mat4[9],
this._renderer._curCamera.cameraMatrix.mat4[10],
this._renderer._curCamera.cameraMatrix.mat4[11],
this._renderer._curCamera.cameraMatrix.mat4[12],
this._renderer._curCamera.cameraMatrix.mat4[13],
this._renderer._curCamera.cameraMatrix.mat4[14],
this._renderer._curCamera.cameraMatrix.mat4[15]
);
// X axis
cov_26tsr7rwx0.s[106]++;
this.strokeWeight(2);
cov_26tsr7rwx0.s[107]++;
this.stroke(255, 0, 0);
cov_26tsr7rwx0.s[108]++;
this.beginShape(this.LINES);
cov_26tsr7rwx0.s[109]++;
this.vertex(xOff, yOff, zOff);
cov_26tsr7rwx0.s[110]++;
this.vertex(xOff + size, yOff, zOff);
cov_26tsr7rwx0.s[111]++;
this.endShape();
// Y axis
cov_26tsr7rwx0.s[112]++;
this.stroke(0, 255, 0);
cov_26tsr7rwx0.s[113]++;
this.beginShape(this.LINES);
cov_26tsr7rwx0.s[114]++;
this.vertex(xOff, yOff, zOff);
cov_26tsr7rwx0.s[115]++;
this.vertex(xOff, yOff + size, zOff);
cov_26tsr7rwx0.s[116]++;
this.endShape();
// Z axis
cov_26tsr7rwx0.s[117]++;
this.stroke(0, 0, 255);
cov_26tsr7rwx0.s[118]++;
this.beginShape(this.LINES);
cov_26tsr7rwx0.s[119]++;
this.vertex(xOff, yOff, zOff);
cov_26tsr7rwx0.s[120]++;
this.vertex(xOff, yOff, zOff + size);
cov_26tsr7rwx0.s[121]++;
this.endShape();
cov_26tsr7rwx0.s[122]++;
this.pop();
};
};
var _default = _main.default;
exports.default = _default;
},
{ '../core/constants': 43, '../core/main': 54 }
],
99: [
function(_dereq_, module, exports) {
'use strict';
var cov_tnl1hv10y = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/webgl/light.js';
var hash = '0dec701c8516d96119256972139e52cd93c2a4b9';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/light.js',
statementMap: {
'0': { start: { line: 75, column: 0 }, end: { line: 89, column: 2 } },
'1': { start: { line: 76, column: 2 }, end: { line: 76, column: 33 } },
'2': { start: { line: 77, column: 2 }, end: { line: 77, column: 52 } },
'3': { start: { line: 78, column: 16 }, end: { line: 78, column: 40 } },
'4': { start: { line: 80, column: 2 }, end: { line: 84, column: 4 } },
'5': { start: { line: 86, column: 2 }, end: { line: 86, column: 40 } },
'6': { start: { line: 88, column: 2 }, end: { line: 88, column: 14 } },
'7': { start: { line: 162, column: 0 }, end: { line: 174, column: 2 } },
'8': { start: { line: 163, column: 2 }, end: { line: 163, column: 34 } },
'9': { start: { line: 164, column: 2 }, end: { line: 164, column: 53 } },
'10': { start: { line: 165, column: 16 }, end: { line: 165, column: 40 } },
'11': { start: { line: 167, column: 2 }, end: { line: 171, column: 4 } },
'12': { start: { line: 173, column: 2 }, end: { line: 173, column: 14 } },
'13': { start: { line: 236, column: 0 }, end: { line: 277, column: 2 } },
'14': { start: { line: 237, column: 2 }, end: { line: 237, column: 37 } },
'15': { start: { line: 238, column: 2 }, end: { line: 238, column: 56 } },
'16': { start: { line: 242, column: 2 }, end: { line: 246, column: 3 } },
'17': { start: { line: 243, column: 4 }, end: { line: 243, column: 15 } },
'18': { start: { line: 245, column: 4 }, end: { line: 245, column: 35 } },
'19': { start: { line: 249, column: 12 }, end: { line: 249, column: 43 } },
'20': { start: { line: 250, column: 2 }, end: { line: 258, column: 3 } },
'21': { start: { line: 251, column: 4 }, end: { line: 251, column: 41 } },
'22': { start: { line: 252, column: 4 }, end: { line: 252, column: 41 } },
'23': { start: { line: 253, column: 4 }, end: { line: 253, column: 41 } },
'24': { start: { line: 255, column: 4 }, end: { line: 255, column: 13 } },
'25': { start: { line: 256, column: 4 }, end: { line: 256, column: 13 } },
'26': { start: { line: 257, column: 4 }, end: { line: 257, column: 13 } },
'27': { start: { line: 261, column: 12 }, end: { line: 261, column: 50 } },
'28': { start: { line: 262, column: 2 }, end: { line: 262, column: 73 } },
'29': { start: { line: 264, column: 2 }, end: { line: 268, column: 4 } },
'30': { start: { line: 269, column: 2 }, end: { line: 272, column: 4 } },
'31': { start: { line: 274, column: 2 }, end: { line: 274, column: 40 } },
'32': { start: { line: 276, column: 2 }, end: { line: 276, column: 14 } },
'33': { start: { line: 346, column: 0 }, end: { line: 384, column: 2 } },
'34': { start: { line: 347, column: 2 }, end: { line: 347, column: 31 } },
'35': { start: { line: 348, column: 2 }, end: { line: 348, column: 50 } },
'36': { start: { line: 352, column: 2 }, end: { line: 356, column: 3 } },
'37': { start: { line: 353, column: 4 }, end: { line: 353, column: 15 } },
'38': { start: { line: 355, column: 4 }, end: { line: 355, column: 35 } },
'39': { start: { line: 359, column: 12 }, end: { line: 359, column: 43 } },
'40': { start: { line: 360, column: 2 }, end: { line: 368, column: 3 } },
'41': { start: { line: 361, column: 4 }, end: { line: 361, column: 41 } },
'42': { start: { line: 362, column: 4 }, end: { line: 362, column: 41 } },
'43': { start: { line: 363, column: 4 }, end: { line: 363, column: 41 } },
'44': { start: { line: 365, column: 4 }, end: { line: 365, column: 13 } },
'45': { start: { line: 366, column: 4 }, end: { line: 366, column: 13 } },
'46': { start: { line: 367, column: 4 }, end: { line: 367, column: 13 } },
'47': { start: { line: 370, column: 2 }, end: { line: 370, column: 54 } },
'48': { start: { line: 371, column: 2 }, end: { line: 375, column: 4 } },
'49': { start: { line: 376, column: 2 }, end: { line: 379, column: 4 } },
'50': { start: { line: 381, column: 2 }, end: { line: 381, column: 40 } },
'51': { start: { line: 383, column: 2 }, end: { line: 383, column: 14 } },
'52': { start: { line: 410, column: 0 }, end: { line: 415, column: 2 } },
'53': { start: { line: 411, column: 2 }, end: { line: 411, column: 27 } },
'54': { start: { line: 412, column: 2 }, end: { line: 412, column: 35 } },
'55': { start: { line: 413, column: 2 }, end: { line: 413, column: 49 } },
'56': { start: { line: 414, column: 2 }, end: { line: 414, column: 14 } },
'57': { start: { line: 456, column: 0 }, end: { line: 500, column: 2 } },
'58': { start: { line: 461, column: 2 }, end: { line: 461, column: 33 } },
'59': { start: { line: 462, column: 2 }, end: { line: 462, column: 52 } },
'60': { start: { line: 464, column: 2 }, end: { line: 469, column: 3 } },
'61': { start: { line: 465, column: 4 }, end: { line: 465, column: 28 } },
'62': { start: { line: 466, column: 4 }, end: { line: 468, column: 6 } },
'63': { start: { line: 471, column: 2 }, end: { line: 476, column: 3 } },
'64': { start: { line: 472, column: 4 }, end: { line: 472, column: 26 } },
'65': { start: { line: 473, column: 4 }, end: { line: 475, column: 6 } },
'66': { start: { line: 478, column: 2 }, end: { line: 483, column: 3 } },
'67': { start: { line: 479, column: 4 }, end: { line: 479, column: 29 } },
'68': { start: { line: 480, column: 4 }, end: { line: 482, column: 6 } },
'69': { start: { line: 485, column: 2 }, end: { line: 493, column: 3 } },
'70': { start: { line: 489, column: 4 }, end: { line: 489, column: 28 } },
'71': { start: { line: 490, column: 4 }, end: { line: 492, column: 6 } },
'72': { start: { line: 495, column: 2 }, end: { line: 495, column: 59 } },
'73': { start: { line: 496, column: 2 }, end: { line: 496, column: 55 } },
'74': { start: { line: 497, column: 2 }, end: { line: 497, column: 61 } },
'75': { start: { line: 499, column: 2 }, end: { line: 499, column: 14 } },
'76': { start: { line: 629, column: 0 }, end: { line: 840, column: 2 } },
'77': { start: { line: 642, column: 2 }, end: { line: 642, column: 30 } },
'78': { start: { line: 643, column: 2 }, end: { line: 643, column: 49 } },
'79': { start: { line: 646, column: 17 }, end: { line: 646, column: 33 } },
'80': { start: { line: 648, column: 2 }, end: { line: 800, column: 3 } },
'81': { start: { line: 651, column: 6 }, end: { line: 651, column: 37 } },
'82': { start: { line: 652, column: 6 }, end: { line: 652, column: 40 } },
'83': { start: { line: 653, column: 6 }, end: { line: 653, column: 44 } },
'84': { start: { line: 654, column: 6 }, end: { line: 654, column: 12 } },
'85': { start: { line: 657, column: 6 }, end: { line: 679, column: 7 } },
'86': { start: { line: 658, column: 8 }, end: { line: 658, column: 19 } },
'87': { start: { line: 659, column: 8 }, end: { line: 659, column: 44 } },
'88': { start: { line: 660, column: 8 }, end: { line: 660, column: 44 } },
'89': { start: { line: 661, column: 8 }, end: { line: 661, column: 19 } },
'90': { start: { line: 662, column: 8 }, end: { line: 662, column: 27 } },
'91': { start: { line: 663, column: 13 }, end: { line: 679, column: 7 } },
'92': { start: { line: 664, column: 8 }, end: { line: 664, column: 39 } },
'93': { start: { line: 665, column: 8 }, end: { line: 665, column: 21 } },
'94': { start: { line: 666, column: 8 }, end: { line: 666, column: 44 } },
'95': { start: { line: 667, column: 8 }, end: { line: 667, column: 19 } },
'96': { start: { line: 668, column: 8 }, end: { line: 668, column: 27 } },
'97': { start: { line: 669, column: 13 }, end: { line: 679, column: 7 } },
'98': { start: { line: 670, column: 8 }, end: { line: 670, column: 39 } },
'99': { start: { line: 671, column: 8 }, end: { line: 671, column: 42 } },
'100': { start: { line: 672, column: 8 }, end: { line: 672, column: 23 } },
'101': { start: { line: 673, column: 8 }, end: { line: 673, column: 19 } },
'102': { start: { line: 674, column: 8 }, end: { line: 674, column: 27 } },
'103': { start: { line: 676, column: 8 }, end: { line: 676, column: 39 } },
'104': { start: { line: 677, column: 8 }, end: { line: 677, column: 42 } },
'105': { start: { line: 678, column: 8 }, end: { line: 678, column: 46 } },
'106': { start: { line: 680, column: 6 }, end: { line: 680, column: 12 } },
'107': { start: { line: 683, column: 6 }, end: { line: 698, column: 7 } },
'108': { start: { line: 684, column: 8 }, end: { line: 684, column: 19 } },
'109': { start: { line: 685, column: 8 }, end: { line: 685, column: 44 } },
'110': { start: { line: 686, column: 8 }, end: { line: 686, column: 44 } },
'111': { start: { line: 687, column: 8 }, end: { line: 687, column: 19 } },
'112': { start: { line: 688, column: 13 }, end: { line: 698, column: 7 } },
'113': { start: { line: 689, column: 8 }, end: { line: 689, column: 39 } },
'114': { start: { line: 690, column: 8 }, end: { line: 690, column: 21 } },
'115': { start: { line: 691, column: 8 }, end: { line: 691, column: 44 } },
'116': { start: { line: 692, column: 8 }, end: { line: 692, column: 19 } },
'117': { start: { line: 694, column: 8 }, end: { line: 694, column: 39 } },
'118': { start: { line: 695, column: 8 }, end: { line: 695, column: 42 } },
'119': { start: { line: 696, column: 8 }, end: { line: 696, column: 23 } },
'120': { start: { line: 697, column: 8 }, end: { line: 697, column: 19 } },
'121': { start: { line: 699, column: 6 }, end: { line: 699, column: 12 } },
'122': { start: { line: 702, column: 6 }, end: { line: 732, column: 7 } },
'123': { start: { line: 703, column: 8 }, end: { line: 703, column: 19 } },
'124': { start: { line: 704, column: 8 }, end: { line: 704, column: 22 } },
'125': { start: { line: 705, column: 8 }, end: { line: 705, column: 44 } },
'126': { start: { line: 706, column: 8 }, end: { line: 706, column: 18 } },
'127': { start: { line: 707, column: 8 }, end: { line: 707, column: 27 } },
'128': { start: { line: 708, column: 13 }, end: { line: 732, column: 7 } },
'129': { start: { line: 709, column: 8 }, end: { line: 709, column: 19 } },
'130': { start: { line: 710, column: 8 }, end: { line: 710, column: 44 } },
'131': { start: { line: 711, column: 8 }, end: { line: 711, column: 22 } },
'132': { start: { line: 712, column: 8 }, end: { line: 712, column: 18 } },
'133': { start: { line: 713, column: 8 }, end: { line: 713, column: 27 } },
'134': { start: { line: 714, column: 13 }, end: { line: 732, column: 7 } },
'135': { start: { line: 715, column: 8 }, end: { line: 715, column: 39 } },
'136': { start: { line: 716, column: 8 }, end: { line: 716, column: 21 } },
'137': { start: { line: 717, column: 8 }, end: { line: 717, column: 22 } },
'138': { start: { line: 718, column: 8 }, end: { line: 718, column: 18 } },
'139': { start: { line: 719, column: 8 }, end: { line: 719, column: 27 } },
'140': { start: { line: 720, column: 13 }, end: { line: 732, column: 7 } },
'141': { start: { line: 721, column: 8 }, end: { line: 721, column: 19 } },
'142': { start: { line: 722, column: 8 }, end: { line: 722, column: 44 } },
'143': { start: { line: 723, column: 8 }, end: { line: 723, column: 44 } },
'144': { start: { line: 724, column: 13 }, end: { line: 732, column: 7 } },
'145': { start: { line: 725, column: 8 }, end: { line: 725, column: 39 } },
'146': { start: { line: 726, column: 8 }, end: { line: 726, column: 21 } },
'147': { start: { line: 727, column: 8 }, end: { line: 727, column: 44 } },
'148': { start: { line: 729, column: 8 }, end: { line: 729, column: 39 } },
'149': { start: { line: 730, column: 8 }, end: { line: 730, column: 42 } },
'150': { start: { line: 731, column: 8 }, end: { line: 731, column: 23 } },
'151': { start: { line: 733, column: 6 }, end: { line: 733, column: 12 } },
'152': { start: { line: 736, column: 6 }, end: { line: 751, column: 7 } },
'153': { start: { line: 737, column: 8 }, end: { line: 737, column: 39 } },
'154': { start: { line: 738, column: 8 }, end: { line: 738, column: 21 } },
'155': { start: { line: 739, column: 8 }, end: { line: 739, column: 22 } },
'156': { start: { line: 740, column: 8 }, end: { line: 740, column: 18 } },
'157': { start: { line: 741, column: 13 }, end: { line: 751, column: 7 } },
'158': { start: { line: 742, column: 8 }, end: { line: 742, column: 19 } },
'159': { start: { line: 743, column: 8 }, end: { line: 743, column: 44 } },
'160': { start: { line: 744, column: 8 }, end: { line: 744, column: 22 } },
'161': { start: { line: 745, column: 8 }, end: { line: 745, column: 18 } },
'162': { start: { line: 746, column: 13 }, end: { line: 751, column: 7 } },
'163': { start: { line: 747, column: 8 }, end: { line: 747, column: 19 } },
'164': { start: { line: 748, column: 8 }, end: { line: 748, column: 22 } },
'165': { start: { line: 749, column: 8 }, end: { line: 749, column: 44 } },
'166': { start: { line: 750, column: 8 }, end: { line: 750, column: 18 } },
'167': { start: { line: 752, column: 6 }, end: { line: 752, column: 12 } },
'168': { start: { line: 755, column: 6 }, end: { line: 777, column: 7 } },
'169': { start: { line: 760, column: 8 }, end: { line: 760, column: 19 } },
'170': { start: { line: 761, column: 8 }, end: { line: 761, column: 22 } },
'171': { start: { line: 762, column: 8 }, end: { line: 762, column: 23 } },
'172': { start: { line: 763, column: 8 }, end: { line: 763, column: 18 } },
'173': { start: { line: 764, column: 8 }, end: { line: 764, column: 26 } },
'174': { start: { line: 765, column: 13 }, end: { line: 777, column: 7 } },
'175': { start: { line: 766, column: 8 }, end: { line: 766, column: 39 } },
'176': { start: { line: 767, column: 8 }, end: { line: 767, column: 21 } },
'177': { start: { line: 768, column: 8 }, end: { line: 768, column: 22 } },
'178': { start: { line: 769, column: 13 }, end: { line: 777, column: 7 } },
'179': { start: { line: 770, column: 8 }, end: { line: 770, column: 19 } },
'180': { start: { line: 771, column: 8 }, end: { line: 771, column: 44 } },
'181': { start: { line: 772, column: 8 }, end: { line: 772, column: 22 } },
'182': { start: { line: 773, column: 13 }, end: { line: 777, column: 7 } },
'183': { start: { line: 774, column: 8 }, end: { line: 774, column: 19 } },
'184': { start: { line: 775, column: 8 }, end: { line: 775, column: 22 } },
'185': { start: { line: 776, column: 8 }, end: { line: 776, column: 44 } },
'186': { start: { line: 778, column: 6 }, end: { line: 778, column: 12 } },
'187': { start: { line: 781, column: 6 }, end: { line: 781, column: 17 } },
'188': { start: { line: 782, column: 6 }, end: { line: 782, column: 20 } },
'189': { start: { line: 783, column: 6 }, end: { line: 783, column: 21 } },
'190': { start: { line: 784, column: 6 }, end: { line: 784, column: 16 } },
'191': { start: { line: 785, column: 6 }, end: { line: 785, column: 12 } },
'192': { start: { line: 788, column: 6 }, end: { line: 788, column: 17 } },
'193': { start: { line: 789, column: 6 }, end: { line: 789, column: 20 } },
'194': { start: { line: 790, column: 6 }, end: { line: 790, column: 21 } },
'195': { start: { line: 791, column: 6 }, end: { line: 791, column: 12 } },
'196': { start: { line: 794, column: 6 }, end: { line: 798, column: 8 } },
'197': { start: { line: 799, column: 6 }, end: { line: 799, column: 18 } },
'198': { start: { line: 801, column: 2 }, end: { line: 805, column: 4 } },
'199': { start: { line: 807, column: 2 }, end: { line: 810, column: 4 } },
'200': { start: { line: 812, column: 2 }, end: { line: 812, column: 77 } },
'201': { start: { line: 813, column: 2 }, end: { line: 813, column: 24 } },
'202': { start: { line: 814, column: 2 }, end: { line: 818, column: 4 } },
'203': { start: { line: 820, column: 2 }, end: { line: 822, column: 3 } },
'204': { start: { line: 821, column: 4 }, end: { line: 821, column: 24 } },
'205': { start: { line: 824, column: 2 }, end: { line: 831, column: 3 } },
'206': { start: { line: 825, column: 4 }, end: { line: 825, column: 22 } },
'207': { start: { line: 826, column: 4 }, end: { line: 828, column: 6 } },
'208': { start: { line: 829, column: 9 }, end: { line: 831, column: 3 } },
'209': { start: { line: 830, column: 4 }, end: { line: 830, column: 24 } },
'210': { start: { line: 833, column: 2 }, end: { line: 833, column: 50 } },
'211': { start: { line: 834, column: 2 }, end: { line: 834, column: 54 } },
'212': { start: { line: 835, column: 2 }, end: { line: 835, column: 51 } },
'213': { start: { line: 837, column: 2 }, end: { line: 837, column: 40 } },
'214': { start: { line: 839, column: 2 }, end: { line: 839, column: 14 } },
'215': { start: { line: 876, column: 0 }, end: { line: 906, column: 2 } },
'216': { start: { line: 877, column: 2 }, end: { line: 877, column: 29 } },
'217': { start: { line: 878, column: 2 }, end: { line: 878, column: 48 } },
'218': { start: { line: 880, column: 2 }, end: { line: 880, column: 41 } },
'219': { start: { line: 882, column: 2 }, end: { line: 882, column: 47 } },
'220': { start: { line: 883, column: 2 }, end: { line: 883, column: 44 } },
'221': { start: { line: 885, column: 2 }, end: { line: 885, column: 55 } },
'222': { start: { line: 886, column: 2 }, end: { line: 886, column: 58 } },
'223': { start: { line: 887, column: 2 }, end: { line: 887, column: 59 } },
'224': { start: { line: 889, column: 2 }, end: { line: 889, column: 48 } },
'225': { start: { line: 890, column: 2 }, end: { line: 890, column: 52 } },
'226': { start: { line: 891, column: 2 }, end: { line: 891, column: 53 } },
'227': { start: { line: 893, column: 2 }, end: { line: 893, column: 47 } },
'228': { start: { line: 894, column: 2 }, end: { line: 894, column: 48 } },
'229': { start: { line: 895, column: 2 }, end: { line: 895, column: 51 } },
'230': { start: { line: 896, column: 2 }, end: { line: 896, column: 52 } },
'231': { start: { line: 897, column: 2 }, end: { line: 897, column: 43 } },
'232': { start: { line: 898, column: 2 }, end: { line: 898, column: 42 } },
'233': { start: { line: 900, column: 2 }, end: { line: 900, column: 41 } },
'234': { start: { line: 901, column: 2 }, end: { line: 901, column: 39 } },
'235': { start: { line: 902, column: 2 }, end: { line: 902, column: 42 } },
'236': { start: { line: 903, column: 2 }, end: { line: 903, column: 35 } },
'237': { start: { line: 905, column: 2 }, end: { line: 905, column: 14 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 75, column: 28 }, end: { line: 75, column: 29 } },
loc: { start: { line: 75, column: 52 }, end: { line: 89, column: 1 } },
line: 75
},
'1': {
name: '(anonymous_1)',
decl: {
start: { line: 162, column: 29 },
end: { line: 162, column: 30 }
},
loc: { start: { line: 162, column: 50 }, end: { line: 174, column: 1 } },
line: 162
},
'2': {
name: '(anonymous_2)',
decl: {
start: { line: 236, column: 32 },
end: { line: 236, column: 33 }
},
loc: { start: { line: 236, column: 62 }, end: { line: 277, column: 1 } },
line: 236
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 346, column: 26 },
end: { line: 346, column: 27 }
},
loc: { start: { line: 346, column: 56 }, end: { line: 384, column: 1 } },
line: 346
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 410, column: 22 },
end: { line: 410, column: 23 }
},
loc: { start: { line: 410, column: 33 }, end: { line: 415, column: 1 } },
line: 410
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 456, column: 28 },
end: { line: 456, column: 29 }
},
loc: { start: { line: 460, column: 2 }, end: { line: 500, column: 1 } },
line: 460
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 629, column: 25 },
end: { line: 629, column: 26 }
},
loc: { start: { line: 641, column: 2 }, end: { line: 840, column: 1 } },
line: 641
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 876, column: 24 },
end: { line: 876, column: 25 }
},
loc: { start: { line: 876, column: 35 }, end: { line: 906, column: 1 } },
line: 876
}
},
branchMap: {
'0': {
loc: { start: { line: 242, column: 2 }, end: { line: 246, column: 3 } },
type: 'if',
locations: [
{ start: { line: 242, column: 2 }, end: { line: 246, column: 3 } },
{ start: { line: 242, column: 2 }, end: { line: 246, column: 3 } }
],
line: 242
},
'1': {
loc: { start: { line: 250, column: 2 }, end: { line: 258, column: 3 } },
type: 'if',
locations: [
{ start: { line: 250, column: 2 }, end: { line: 258, column: 3 } },
{ start: { line: 250, column: 2 }, end: { line: 258, column: 3 } }
],
line: 250
},
'2': {
loc: { start: { line: 352, column: 2 }, end: { line: 356, column: 3 } },
type: 'if',
locations: [
{ start: { line: 352, column: 2 }, end: { line: 356, column: 3 } },
{ start: { line: 352, column: 2 }, end: { line: 356, column: 3 } }
],
line: 352
},
'3': {
loc: { start: { line: 360, column: 2 }, end: { line: 368, column: 3 } },
type: 'if',
locations: [
{ start: { line: 360, column: 2 }, end: { line: 368, column: 3 } },
{ start: { line: 360, column: 2 }, end: { line: 368, column: 3 } }
],
line: 360
},
'4': {
loc: { start: { line: 464, column: 2 }, end: { line: 469, column: 3 } },
type: 'if',
locations: [
{ start: { line: 464, column: 2 }, end: { line: 469, column: 3 } },
{ start: { line: 464, column: 2 }, end: { line: 469, column: 3 } }
],
line: 464
},
'5': {
loc: { start: { line: 471, column: 2 }, end: { line: 476, column: 3 } },
type: 'if',
locations: [
{ start: { line: 471, column: 2 }, end: { line: 476, column: 3 } },
{ start: { line: 471, column: 2 }, end: { line: 476, column: 3 } }
],
line: 471
},
'6': {
loc: { start: { line: 478, column: 2 }, end: { line: 483, column: 3 } },
type: 'if',
locations: [
{ start: { line: 478, column: 2 }, end: { line: 483, column: 3 } },
{ start: { line: 478, column: 2 }, end: { line: 483, column: 3 } }
],
line: 478
},
'7': {
loc: { start: { line: 485, column: 2 }, end: { line: 493, column: 3 } },
type: 'if',
locations: [
{ start: { line: 485, column: 2 }, end: { line: 493, column: 3 } },
{ start: { line: 485, column: 2 }, end: { line: 493, column: 3 } }
],
line: 485
},
'8': {
loc: { start: { line: 486, column: 4 }, end: { line: 487, column: 59 } },
type: 'binary-expr',
locations: [
{ start: { line: 486, column: 4 }, end: { line: 486, column: 29 } },
{ start: { line: 487, column: 5 }, end: { line: 487, column: 28 } },
{ start: { line: 487, column: 32 }, end: { line: 487, column: 58 } }
],
line: 486
},
'9': {
loc: { start: { line: 648, column: 2 }, end: { line: 800, column: 3 } },
type: 'switch',
locations: [
{ start: { line: 649, column: 4 }, end: { line: 649, column: 12 } },
{ start: { line: 650, column: 4 }, end: { line: 654, column: 12 } },
{ start: { line: 656, column: 4 }, end: { line: 680, column: 12 } },
{ start: { line: 682, column: 4 }, end: { line: 699, column: 12 } },
{ start: { line: 701, column: 4 }, end: { line: 733, column: 12 } },
{ start: { line: 735, column: 4 }, end: { line: 752, column: 12 } },
{ start: { line: 754, column: 4 }, end: { line: 778, column: 12 } },
{ start: { line: 780, column: 4 }, end: { line: 785, column: 12 } },
{ start: { line: 787, column: 4 }, end: { line: 791, column: 12 } },
{ start: { line: 793, column: 4 }, end: { line: 799, column: 18 } }
],
line: 648
},
'10': {
loc: { start: { line: 657, column: 6 }, end: { line: 679, column: 7 } },
type: 'if',
locations: [
{ start: { line: 657, column: 6 }, end: { line: 679, column: 7 } },
{ start: { line: 657, column: 6 }, end: { line: 679, column: 7 } }
],
line: 657
},
'11': {
loc: { start: { line: 663, column: 13 }, end: { line: 679, column: 7 } },
type: 'if',
locations: [
{ start: { line: 663, column: 13 }, end: { line: 679, column: 7 } },
{ start: { line: 663, column: 13 }, end: { line: 679, column: 7 } }
],
line: 663
},
'12': {
loc: { start: { line: 669, column: 13 }, end: { line: 679, column: 7 } },
type: 'if',
locations: [
{ start: { line: 669, column: 13 }, end: { line: 679, column: 7 } },
{ start: { line: 669, column: 13 }, end: { line: 679, column: 7 } }
],
line: 669
},
'13': {
loc: { start: { line: 683, column: 6 }, end: { line: 698, column: 7 } },
type: 'if',
locations: [
{ start: { line: 683, column: 6 }, end: { line: 698, column: 7 } },
{ start: { line: 683, column: 6 }, end: { line: 698, column: 7 } }
],
line: 683
},
'14': {
loc: { start: { line: 688, column: 13 }, end: { line: 698, column: 7 } },
type: 'if',
locations: [
{ start: { line: 688, column: 13 }, end: { line: 698, column: 7 } },
{ start: { line: 688, column: 13 }, end: { line: 698, column: 7 } }
],
line: 688
},
'15': {
loc: { start: { line: 702, column: 6 }, end: { line: 732, column: 7 } },
type: 'if',
locations: [
{ start: { line: 702, column: 6 }, end: { line: 732, column: 7 } },
{ start: { line: 702, column: 6 }, end: { line: 732, column: 7 } }
],
line: 702
},
'16': {
loc: { start: { line: 702, column: 10 }, end: { line: 702, column: 59 } },
type: 'binary-expr',
locations: [
{ start: { line: 702, column: 10 }, end: { line: 702, column: 32 } },
{ start: { line: 702, column: 36 }, end: { line: 702, column: 59 } }
],
line: 702
},
'17': {
loc: { start: { line: 708, column: 13 }, end: { line: 732, column: 7 } },
type: 'if',
locations: [
{ start: { line: 708, column: 13 }, end: { line: 732, column: 7 } },
{ start: { line: 708, column: 13 }, end: { line: 732, column: 7 } }
],
line: 708
},
'18': {
loc: { start: { line: 708, column: 17 }, end: { line: 708, column: 65 } },
type: 'binary-expr',
locations: [
{ start: { line: 708, column: 17 }, end: { line: 708, column: 39 } },
{ start: { line: 708, column: 43 }, end: { line: 708, column: 65 } }
],
line: 708
},
'19': {
loc: { start: { line: 714, column: 13 }, end: { line: 732, column: 7 } },
type: 'if',
locations: [
{ start: { line: 714, column: 13 }, end: { line: 732, column: 7 } },
{ start: { line: 714, column: 13 }, end: { line: 732, column: 7 } }
],
line: 714
},
'20': {
loc: { start: { line: 714, column: 17 }, end: { line: 714, column: 65 } },
type: 'binary-expr',
locations: [
{ start: { line: 714, column: 17 }, end: { line: 714, column: 39 } },
{ start: { line: 714, column: 43 }, end: { line: 714, column: 65 } }
],
line: 714
},
'21': {
loc: { start: { line: 720, column: 13 }, end: { line: 732, column: 7 } },
type: 'if',
locations: [
{ start: { line: 720, column: 13 }, end: { line: 732, column: 7 } },
{ start: { line: 720, column: 13 }, end: { line: 732, column: 7 } }
],
line: 720
},
'22': {
loc: { start: { line: 724, column: 13 }, end: { line: 732, column: 7 } },
type: 'if',
locations: [
{ start: { line: 724, column: 13 }, end: { line: 732, column: 7 } },
{ start: { line: 724, column: 13 }, end: { line: 732, column: 7 } }
],
line: 724
},
'23': {
loc: { start: { line: 736, column: 6 }, end: { line: 751, column: 7 } },
type: 'if',
locations: [
{ start: { line: 736, column: 6 }, end: { line: 751, column: 7 } },
{ start: { line: 736, column: 6 }, end: { line: 751, column: 7 } }
],
line: 736
},
'24': {
loc: { start: { line: 736, column: 10 }, end: { line: 736, column: 58 } },
type: 'binary-expr',
locations: [
{ start: { line: 736, column: 10 }, end: { line: 736, column: 32 } },
{ start: { line: 736, column: 36 }, end: { line: 736, column: 58 } }
],
line: 736
},
'25': {
loc: { start: { line: 741, column: 13 }, end: { line: 751, column: 7 } },
type: 'if',
locations: [
{ start: { line: 741, column: 13 }, end: { line: 751, column: 7 } },
{ start: { line: 741, column: 13 }, end: { line: 751, column: 7 } }
],
line: 741
},
'26': {
loc: { start: { line: 741, column: 17 }, end: { line: 741, column: 65 } },
type: 'binary-expr',
locations: [
{ start: { line: 741, column: 17 }, end: { line: 741, column: 39 } },
{ start: { line: 741, column: 43 }, end: { line: 741, column: 65 } }
],
line: 741
},
'27': {
loc: { start: { line: 746, column: 13 }, end: { line: 751, column: 7 } },
type: 'if',
locations: [
{ start: { line: 746, column: 13 }, end: { line: 751, column: 7 } },
{ start: { line: 746, column: 13 }, end: { line: 751, column: 7 } }
],
line: 746
},
'28': {
loc: { start: { line: 746, column: 17 }, end: { line: 746, column: 66 } },
type: 'binary-expr',
locations: [
{ start: { line: 746, column: 17 }, end: { line: 746, column: 39 } },
{ start: { line: 746, column: 43 }, end: { line: 746, column: 66 } }
],
line: 746
},
'29': {
loc: { start: { line: 755, column: 6 }, end: { line: 777, column: 7 } },
type: 'if',
locations: [
{ start: { line: 755, column: 6 }, end: { line: 777, column: 7 } },
{ start: { line: 755, column: 6 }, end: { line: 777, column: 7 } }
],
line: 755
},
'30': {
loc: { start: { line: 756, column: 8 }, end: { line: 758, column: 31 } },
type: 'binary-expr',
locations: [
{ start: { line: 756, column: 8 }, end: { line: 756, column: 30 } },
{ start: { line: 757, column: 8 }, end: { line: 757, column: 31 } },
{ start: { line: 758, column: 8 }, end: { line: 758, column: 31 } }
],
line: 756
},
'31': {
loc: { start: { line: 765, column: 13 }, end: { line: 777, column: 7 } },
type: 'if',
locations: [
{ start: { line: 765, column: 13 }, end: { line: 777, column: 7 } },
{ start: { line: 765, column: 13 }, end: { line: 777, column: 7 } }
],
line: 765
},
'32': {
loc: { start: { line: 765, column: 17 }, end: { line: 765, column: 65 } },
type: 'binary-expr',
locations: [
{ start: { line: 765, column: 17 }, end: { line: 765, column: 39 } },
{ start: { line: 765, column: 43 }, end: { line: 765, column: 65 } }
],
line: 765
},
'33': {
loc: { start: { line: 769, column: 13 }, end: { line: 777, column: 7 } },
type: 'if',
locations: [
{ start: { line: 769, column: 13 }, end: { line: 777, column: 7 } },
{ start: { line: 769, column: 13 }, end: { line: 777, column: 7 } }
],
line: 769
},
'34': {
loc: { start: { line: 769, column: 17 }, end: { line: 769, column: 65 } },
type: 'binary-expr',
locations: [
{ start: { line: 769, column: 17 }, end: { line: 769, column: 39 } },
{ start: { line: 769, column: 43 }, end: { line: 769, column: 65 } }
],
line: 769
},
'35': {
loc: { start: { line: 773, column: 13 }, end: { line: 777, column: 7 } },
type: 'if',
locations: [
{ start: { line: 773, column: 13 }, end: { line: 777, column: 7 } },
{ start: { line: 773, column: 13 }, end: { line: 777, column: 7 } }
],
line: 773
},
'36': {
loc: { start: { line: 773, column: 17 }, end: { line: 773, column: 66 } },
type: 'binary-expr',
locations: [
{ start: { line: 773, column: 17 }, end: { line: 773, column: 39 } },
{ start: { line: 773, column: 43 }, end: { line: 773, column: 66 } }
],
line: 773
},
'37': {
loc: { start: { line: 796, column: 10 }, end: { line: 796, column: 37 } },
type: 'cond-expr',
locations: [
{ start: { line: 796, column: 23 }, end: { line: 796, column: 28 } },
{ start: { line: 796, column: 31 }, end: { line: 796, column: 37 } }
],
line: 796
},
'38': {
loc: { start: { line: 820, column: 2 }, end: { line: 822, column: 3 } },
type: 'if',
locations: [
{ start: { line: 820, column: 2 }, end: { line: 822, column: 3 } },
{ start: { line: 820, column: 2 }, end: { line: 822, column: 3 } }
],
line: 820
},
'39': {
loc: { start: { line: 824, column: 2 }, end: { line: 831, column: 3 } },
type: 'if',
locations: [
{ start: { line: 824, column: 2 }, end: { line: 831, column: 3 } },
{ start: { line: 824, column: 2 }, end: { line: 831, column: 3 } }
],
line: 824
},
'40': {
loc: { start: { line: 824, column: 6 }, end: { line: 824, column: 54 } },
type: 'binary-expr',
locations: [
{ start: { line: 824, column: 6 }, end: { line: 824, column: 33 } },
{ start: { line: 824, column: 37 }, end: { line: 824, column: 54 } }
],
line: 824
},
'41': {
loc: { start: { line: 829, column: 9 }, end: { line: 831, column: 3 } },
type: 'if',
locations: [
{ start: { line: 829, column: 9 }, end: { line: 831, column: 3 } },
{ start: { line: 829, column: 9 }, end: { line: 831, column: 3 } }
],
line: 829
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0,
'123': 0,
'124': 0,
'125': 0,
'126': 0,
'127': 0,
'128': 0,
'129': 0,
'130': 0,
'131': 0,
'132': 0,
'133': 0,
'134': 0,
'135': 0,
'136': 0,
'137': 0,
'138': 0,
'139': 0,
'140': 0,
'141': 0,
'142': 0,
'143': 0,
'144': 0,
'145': 0,
'146': 0,
'147': 0,
'148': 0,
'149': 0,
'150': 0,
'151': 0,
'152': 0,
'153': 0,
'154': 0,
'155': 0,
'156': 0,
'157': 0,
'158': 0,
'159': 0,
'160': 0,
'161': 0,
'162': 0,
'163': 0,
'164': 0,
'165': 0,
'166': 0,
'167': 0,
'168': 0,
'169': 0,
'170': 0,
'171': 0,
'172': 0,
'173': 0,
'174': 0,
'175': 0,
'176': 0,
'177': 0,
'178': 0,
'179': 0,
'180': 0,
'181': 0,
'182': 0,
'183': 0,
'184': 0,
'185': 0,
'186': 0,
'187': 0,
'188': 0,
'189': 0,
'190': 0,
'191': 0,
'192': 0,
'193': 0,
'194': 0,
'195': 0,
'196': 0,
'197': 0,
'198': 0,
'199': 0,
'200': 0,
'201': 0,
'202': 0,
'203': 0,
'204': 0,
'205': 0,
'206': 0,
'207': 0,
'208': 0,
'209': 0,
'210': 0,
'211': 0,
'212': 0,
'213': 0,
'214': 0,
'215': 0,
'216': 0,
'217': 0,
'218': 0,
'219': 0,
'220': 0,
'221': 0,
'222': 0,
'223': 0,
'224': 0,
'225': 0,
'226': 0,
'227': 0,
'228': 0,
'229': 0,
'230': 0,
'231': 0,
'232': 0,
'233': 0,
'234': 0,
'235': 0,
'236': 0,
'237': 0
},
f: { '0': 0, '1': 0, '2': 0, '3': 0, '4': 0, '5': 0, '6': 0, '7': 0 },
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0, 0],
'9': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0],
'20': [0, 0],
'21': [0, 0],
'22': [0, 0],
'23': [0, 0],
'24': [0, 0],
'25': [0, 0],
'26': [0, 0],
'27': [0, 0],
'28': [0, 0],
'29': [0, 0],
'30': [0, 0, 0],
'31': [0, 0],
'32': [0, 0],
'33': [0, 0],
'34': [0, 0],
'35': [0, 0],
'36': [0, 0],
'37': [0, 0],
'38': [0, 0],
'39': [0, 0],
'40': [0, 0],
'41': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '0dec701c8516d96119256972139e52cd93c2a4b9'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_tnl1hv10y.s[0]++;
/**
* Creates an ambient light with a color. Ambient light is light that comes from everywhere on the canvas.
* It has no particular source.
* @method ambientLight
* @param {Number} v1 red or hue value relative to
* the current color range
* @param {Number} v2 green or saturation value
* relative to the current color range
* @param {Number} v3 blue or brightness value
* relative to the current color range
* @param {Number} [alpha] the alpha value
* @chainable
*
* @example
*
*
* createCanvas(100, 100, WEBGL);
* ambientLight(0);
* ambientMaterial(250);
* sphere(40);
*
*
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
* function draw() {
* background(51);
* ambientLight(100); // white light
* ambientMaterial(255, 102, 94); // magenta material
* box(30);
* }
*
*
* @alt
* evenly distributed light across a sphere
* evenly distributed light across a rotating sphere
*/
/**
* @method ambientLight
* @param {String} value a color string
* @chainable
*/
/**
* @method ambientLight
* @param {Number} gray a gray value
* @param {Number} [alpha]
* @chainable
*/
/**
* @method ambientLight
* @param {Number[]} values an array containing the red,green,blue &
* and alpha components of the color
* @chainable
*/
/**
* @method ambientLight
* @param {p5.Color} color the ambient light color
* @chainable
*/
_main.default.prototype.ambientLight = function(v1, v2, v3, a) {
cov_tnl1hv10y.f[0]++;
cov_tnl1hv10y.s[1]++;
this._assert3d('ambientLight');
cov_tnl1hv10y.s[2]++;
_main.default._validateParameters('ambientLight', arguments);
var color = (cov_tnl1hv10y.s[3]++, this.color.apply(this, arguments));
cov_tnl1hv10y.s[4]++;
this._renderer.ambientLightColors.push(
color._array[0],
color._array[1],
color._array[2]
);
cov_tnl1hv10y.s[5]++;
this._renderer._enableLighting = true;
cov_tnl1hv10y.s[6]++;
return this;
};
/**
* Set's the color of the specular highlight when using a specular material and
* specular light.
*
* This method can be combined with specularMaterial() and shininess()
* functions to set specular highlights. The default color is white, ie
* (255, 255, 255), which is used if this method is not called before
* specularMaterial(). If this method is called without specularMaterial(),
* There will be no effect.
*
* Note: specularColor is equivalent to the processing function
* lightSpecular.
*
* @method specularColor
* @param {Number} v1 red or hue value relative to
* the current color range
* @param {Number} v2 green or saturation value
* relative to the current color range
* @param {Number} v3 blue or brightness value
* relative to the current color range
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* noStroke();
* }
*
* function draw() {
* background(0);
* shininess(20);
* ambientLight(50);
* specularColor(255, 0, 0);
* pointLight(255, 0, 0, 0, -50, 50);
* specularColor(0, 255, 0);
* pointLight(0, 255, 0, 0, 50, 50);
* specularMaterial(255);
* sphere(40);
* }
*
*
*
* @alt
* different specular light sources from top and bottom of canvas
*/
/**
* @method specularColor
* @param {String} value a color string
* @chainable
*/
/**
* @method specularColor
* @param {Number} gray a gray value
* @chainable
*/
/**
* @method specularColor
* @param {Number[]} values an array containing the red,green,blue &
* and alpha components of the color
* @chainable
*/
/**
* @method specularColor
* @param {p5.Color} color the ambient light color
* @chainable
*/ cov_tnl1hv10y.s[7]++;
_main.default.prototype.specularColor = function(v1, v2, v3) {
cov_tnl1hv10y.f[1]++;
cov_tnl1hv10y.s[8]++;
this._assert3d('specularColor');
cov_tnl1hv10y.s[9]++;
_main.default._validateParameters('specularColor', arguments);
var color = (cov_tnl1hv10y.s[10]++, this.color.apply(this, arguments));
cov_tnl1hv10y.s[11]++;
this._renderer.specularColors = [
color._array[0],
color._array[1],
color._array[2]
];
cov_tnl1hv10y.s[12]++;
return this;
};
/**
* Creates a directional light with a color and a direction
*
* A maximum of 5 directionalLight can be active at one time
* @method directionalLight
* @param {Number} v1 red or hue value (depending on the current
* color mode),
* @param {Number} v2 green or saturation value
* @param {Number} v3 blue or brightness value
* @param {p5.Vector} position the direction of the light
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
* function draw() {
* background(0);
* //move your mouse to change light direction
* let dirX = (mouseX / width - 0.5) * 2;
* let dirY = (mouseY / height - 0.5) * 2;
* directionalLight(250, 250, 250, -dirX, -dirY, -1);
* noStroke();
* sphere(40);
* }
*
*
*
* @alt
* light source on canvas changeable with mouse position
*/
/**
* @method directionalLight
* @param {Number[]|String|p5.Color} color color Array, CSS color string,
* or p5.Color value
* @param {Number} x x axis direction
* @param {Number} y y axis direction
* @param {Number} z z axis direction
* @chainable
*/
/**
* @method directionalLight
* @param {Number[]|String|p5.Color} color
* @param {p5.Vector} position
* @chainable
*/
/**
* @method directionalLight
* @param {Number} v1
* @param {Number} v2
* @param {Number} v3
* @param {Number} x
* @param {Number} y
* @param {Number} z
* @chainable
*/ cov_tnl1hv10y.s[13]++;
_main.default.prototype.directionalLight = function(v1, v2, v3, x, y, z) {
cov_tnl1hv10y.f[2]++;
cov_tnl1hv10y.s[14]++;
this._assert3d('directionalLight');
cov_tnl1hv10y.s[15]++;
_main.default._validateParameters('directionalLight', arguments);
//@TODO: check parameters number
var color;
cov_tnl1hv10y.s[16]++;
if (v1 instanceof _main.default.Color) {
cov_tnl1hv10y.b[0][0]++;
cov_tnl1hv10y.s[17]++;
color = v1;
} else {
cov_tnl1hv10y.b[0][1]++;
cov_tnl1hv10y.s[18]++;
color = this.color(v1, v2, v3);
}
var _x, _y, _z;
var v = (cov_tnl1hv10y.s[19]++, arguments[arguments.length - 1]);
cov_tnl1hv10y.s[20]++;
if (typeof v === 'number') {
cov_tnl1hv10y.b[1][0]++;
cov_tnl1hv10y.s[21]++;
_x = arguments[arguments.length - 3];
cov_tnl1hv10y.s[22]++;
_y = arguments[arguments.length - 2];
cov_tnl1hv10y.s[23]++;
_z = arguments[arguments.length - 1];
} else {
cov_tnl1hv10y.b[1][1]++;
cov_tnl1hv10y.s[24]++;
_x = v.x;
cov_tnl1hv10y.s[25]++;
_y = v.y;
cov_tnl1hv10y.s[26]++;
_z = v.z;
}
// normalize direction
var l = (cov_tnl1hv10y.s[27]++, Math.sqrt(_x * _x + _y * _y + _z * _z));
cov_tnl1hv10y.s[28]++;
this._renderer.directionalLightDirections.push(_x / l, _y / l, _z / l);
cov_tnl1hv10y.s[29]++;
this._renderer.directionalLightDiffuseColors.push(
color._array[0],
color._array[1],
color._array[2]
);
cov_tnl1hv10y.s[30]++;
Array.prototype.push.apply(
this._renderer.directionalLightSpecularColors,
this._renderer.specularColors
);
cov_tnl1hv10y.s[31]++;
this._renderer._enableLighting = true;
cov_tnl1hv10y.s[32]++;
return this;
};
/**
* Creates a point light with a color and a light position
*
* A maximum of 5 pointLight can be active at one time
* @method pointLight
* @param {Number} v1 red or hue value (depending on the current
* color mode),
* @param {Number} v2 green or saturation value
* @param {Number} v3 blue or brightness value
* @param {Number} x x axis position
* @param {Number} y y axis position
* @param {Number} z z axis position
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
* function draw() {
* background(0);
* //move your mouse to change light position
* let locX = mouseX - width / 2;
* let locY = mouseY - height / 2;
* // to set the light position,
* // think of the world's coordinate as:
* // -width/2,-height/2 -------- width/2,-height/2
* // | |
* // | 0,0 |
* // | |
* // -width/2,height/2--------width/2,height/2
* pointLight(250, 250, 250, locX, locY, 50);
* noStroke();
* sphere(40);
* }
*
*
*
* @alt
* spot light on canvas changes position with mouse
*/
/**
* @method pointLight
* @param {Number} v1
* @param {Number} v2
* @param {Number} v3
* @param {p5.Vector} position the position of the light
* @chainable
*/
/**
* @method pointLight
* @param {Number[]|String|p5.Color} color color Array, CSS color string,
* or p5.Color value
* @param {Number} x
* @param {Number} y
* @param {Number} z
* @chainable
*/
/**
* @method pointLight
* @param {Number[]|String|p5.Color} color
* @param {p5.Vector} position
* @chainable
*/ cov_tnl1hv10y.s[33]++;
_main.default.prototype.pointLight = function(v1, v2, v3, x, y, z) {
cov_tnl1hv10y.f[3]++;
cov_tnl1hv10y.s[34]++;
this._assert3d('pointLight');
cov_tnl1hv10y.s[35]++;
_main.default._validateParameters('pointLight', arguments);
//@TODO: check parameters number
var color;
cov_tnl1hv10y.s[36]++;
if (v1 instanceof _main.default.Color) {
cov_tnl1hv10y.b[2][0]++;
cov_tnl1hv10y.s[37]++;
color = v1;
} else {
cov_tnl1hv10y.b[2][1]++;
cov_tnl1hv10y.s[38]++;
color = this.color(v1, v2, v3);
}
var _x, _y, _z;
var v = (cov_tnl1hv10y.s[39]++, arguments[arguments.length - 1]);
cov_tnl1hv10y.s[40]++;
if (typeof v === 'number') {
cov_tnl1hv10y.b[3][0]++;
cov_tnl1hv10y.s[41]++;
_x = arguments[arguments.length - 3];
cov_tnl1hv10y.s[42]++;
_y = arguments[arguments.length - 2];
cov_tnl1hv10y.s[43]++;
_z = arguments[arguments.length - 1];
} else {
cov_tnl1hv10y.b[3][1]++;
cov_tnl1hv10y.s[44]++;
_x = v.x;
cov_tnl1hv10y.s[45]++;
_y = v.y;
cov_tnl1hv10y.s[46]++;
_z = v.z;
}
cov_tnl1hv10y.s[47]++;
this._renderer.pointLightPositions.push(_x, _y, _z);
cov_tnl1hv10y.s[48]++;
this._renderer.pointLightDiffuseColors.push(
color._array[0],
color._array[1],
color._array[2]
);
cov_tnl1hv10y.s[49]++;
Array.prototype.push.apply(
this._renderer.pointLightSpecularColors,
this._renderer.specularColors
);
cov_tnl1hv10y.s[50]++;
this._renderer._enableLighting = true;
cov_tnl1hv10y.s[51]++;
return this;
};
/**
* Sets the default ambient and directional light. The defaults are ambientLight(128, 128, 128) and directionalLight(128, 128, 128, 0, 0, -1). Lights need to be included in the draw() to remain persistent in a looping program. Placing them in the setup() of a looping program will cause them to only have an effect the first time through the loop.
* @method lights
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
* function draw() {
* background(0);
* lights();
* rotateX(millis() / 1000);
* rotateY(millis() / 1000);
* rotateZ(millis() / 1000);
* box();
* }
*
*
*
* @alt
* the light is partially ambient and partially directional
*/ cov_tnl1hv10y.s[52]++;
_main.default.prototype.lights = function() {
cov_tnl1hv10y.f[4]++;
cov_tnl1hv10y.s[53]++;
this._assert3d('lights');
cov_tnl1hv10y.s[54]++;
this.ambientLight(128, 128, 128);
cov_tnl1hv10y.s[55]++;
this.directionalLight(128, 128, 128, 0, 0, -1);
cov_tnl1hv10y.s[56]++;
return this;
};
/**
* Sets the falloff rates for point lights. It affects only the elements which are created after it in the code.
* The default value is lightFalloff(1.0, 0.0, 0.0), and the parameters are used to calculate the falloff with the following equation:
*
* d = distance from light position to vertex position
*
* falloff = 1 / (CONSTANT + d \* LINEAR + ( d \* d ) \* QUADRATIC)
*
* @method lightFalloff
* @param {Number} constant constant value for determining falloff
* @param {Number} linear linear value for determining falloff
* @param {Number} quadratic quadratic value for determining falloff
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* noStroke();
* }
* function draw() {
* background(0);
* let locX = mouseX - width / 2;
* let locY = mouseY - height / 2;
* translate(-25, 0, 0);
* lightFalloff(1, 0, 0);
* pointLight(250, 250, 250, locX, locY, 50);
* sphere(20);
* translate(50, 0, 0);
* lightFalloff(0.9, 0.01, 0);
* pointLight(250, 250, 250, locX, locY, 50);
* sphere(20);
* }
*
*
*
* @alt
* Two spheres with different falloff values show different intensity of light
*/ cov_tnl1hv10y.s[57]++;
_main.default.prototype.lightFalloff = function(
constantAttenuation,
linearAttenuation,
quadraticAttenuation
) {
cov_tnl1hv10y.f[5]++;
cov_tnl1hv10y.s[58]++;
this._assert3d('lightFalloff');
cov_tnl1hv10y.s[59]++;
_main.default._validateParameters('lightFalloff', arguments);
cov_tnl1hv10y.s[60]++;
if (constantAttenuation < 0) {
cov_tnl1hv10y.b[4][0]++;
cov_tnl1hv10y.s[61]++;
constantAttenuation = 0;
cov_tnl1hv10y.s[62]++;
console.warn(
'Value of constant argument in lightFalloff() should be never be negative. Set to 0.'
);
} else {
cov_tnl1hv10y.b[4][1]++;
}
cov_tnl1hv10y.s[63]++;
if (linearAttenuation < 0) {
cov_tnl1hv10y.b[5][0]++;
cov_tnl1hv10y.s[64]++;
linearAttenuation = 0;
cov_tnl1hv10y.s[65]++;
console.warn(
'Value of linear argument in lightFalloff() should be never be negative. Set to 0.'
);
} else {
cov_tnl1hv10y.b[5][1]++;
}
cov_tnl1hv10y.s[66]++;
if (quadraticAttenuation < 0) {
cov_tnl1hv10y.b[6][0]++;
cov_tnl1hv10y.s[67]++;
quadraticAttenuation = 0;
cov_tnl1hv10y.s[68]++;
console.warn(
'Value of quadratic argument in lightFalloff() should be never be negative. Set to 0.'
);
} else {
cov_tnl1hv10y.b[6][1]++;
}
cov_tnl1hv10y.s[69]++;
if (
(cov_tnl1hv10y.b[8][0]++, constantAttenuation === 0) &&
(cov_tnl1hv10y.b[8][1]++, linearAttenuation === 0) &&
(cov_tnl1hv10y.b[8][2]++, quadraticAttenuation === 0)
) {
cov_tnl1hv10y.b[7][0]++;
cov_tnl1hv10y.s[70]++;
constantAttenuation = 1;
cov_tnl1hv10y.s[71]++;
console.warn(
'Either one of the three arguments in lightFalloff() should be greater than zero. Set constant argument to 1.'
);
} else {
cov_tnl1hv10y.b[7][1]++;
}
cov_tnl1hv10y.s[72]++;
this._renderer.constantAttenuation = constantAttenuation;
cov_tnl1hv10y.s[73]++;
this._renderer.linearAttenuation = linearAttenuation;
cov_tnl1hv10y.s[74]++;
this._renderer.quadraticAttenuation = quadraticAttenuation;
cov_tnl1hv10y.s[75]++;
return this;
};
/**
* Creates a spotlight with a given color, position, direction of light,
* angle and concentration. Here, angle refers to the opening or aperture
* of the cone of the spotlight, and concentration is used to focus the
* light towards the center. Both angle and concentration are optional, but if
* you want to provide concentration, you will also have to specify the angle.
*
* A maximum of 5 spotLight can be active at one time
* @method spotLight
* @param {Number} v1 red or hue value (depending on the current
* color mode),
* @param {Number} v2 green or saturation value
* @param {Number} v3 blue or brightness value
* @param {Number} x x axis position
* @param {Number} y y axis position
* @param {Number} z z axis position
* @param {Number} rx x axis direction of light
* @param {Number} ry y axis direction of light
* @param {Number} rz z axis direction of light
* @param {Number} [angle] optional parameter for angle. Defaults to PI/3
* @param {Number} [conc] optional parameter for concentration. Defaults to 100
* @chainable
*
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
* function draw() {
* background(0);
* //move your mouse to change light position
* let locX = mouseX - width / 2;
* let locY = mouseY - height / 2;
* // to set the light position,
* // think of the world's coordinate as:
* // -width/2,-height/2 -------- width/2,-height/2
* // | |
* // | 0,0 |
* // | |
* // -width/2,height/2--------width/2,height/2
* ambientLight(50);
* spotLight(0, 250, 0, locX, locY, 100, 0, 0, -1, Math.PI / 16);
* noStroke();
* sphere(40);
* }
*
*
*
* @alt
* Spot light on a sphere which changes position with mouse
*/
/**
* @method spotLight
* @param {Number[]|String|p5.Color} color color Array, CSS color string,
* or p5.Color value
* @param {p5.Vector} position the position of the light
* @param {p5.Vector} direction the direction of the light
* @param {Number} [angle]
* @param {Number} [conc]
*/
/**
* @method spotLight
* @param {Number} v1
* @param {Number} v2
* @param {Number} v3
* @param {p5.Vector} position
* @param {p5.Vector} direction
* @param {Number} [angle]
* @param {Number} [conc]
*/
/**
* @method spotLight
* @param {Number[]|String|p5.Color} color
* @param {Number} x
* @param {Number} y
* @param {Number} z
* @param {p5.Vector} direction
* @param {Number} [angle]
* @param {Number} [conc]
*/
/**
* @method spotLight
* @param {Number[]|String|p5.Color} color
* @param {p5.Vector} position
* @param {Number} rx
* @param {Number} ry
* @param {Number} rz
* @param {Number} [angle]
* @param {Number} [conc]
*/
/**
* @method spotLight
* @param {Number} v1
* @param {Number} v2
* @param {Number} v3
* @param {Number} x
* @param {Number} y
* @param {Number} z
* @param {p5.Vector} direction
* @param {Number} [angle]
* @param {Number} [conc]
*/
/**
* @method spotLight
* @param {Number} v1
* @param {Number} v2
* @param {Number} v3
* @param {p5.Vector} position
* @param {Number} rx
* @param {Number} ry
* @param {Number} rz
* @param {Number} [angle]
* @param {Number} [conc]
*/
/**
* @method spotLight
* @param {Number[]|String|p5.Color} color
* @param {Number} x
* @param {Number} y
* @param {Number} z
* @param {Number} rx
* @param {Number} ry
* @param {Number} rz
* @param {Number} [angle]
* @param {Number} [conc]
*/ cov_tnl1hv10y.s[76]++;
_main.default.prototype.spotLight = function(
v1,
v2,
v3,
x,
y,
z,
nx,
ny,
nz,
angle,
concentration
) {
cov_tnl1hv10y.f[6]++;
cov_tnl1hv10y.s[77]++;
this._assert3d('spotLight');
cov_tnl1hv10y.s[78]++;
_main.default._validateParameters('spotLight', arguments);
var color, position, direction;
var length = (cov_tnl1hv10y.s[79]++, arguments.length);
cov_tnl1hv10y.s[80]++;
switch (length) {
case 11:
cov_tnl1hv10y.b[9][0]++;
case 10:
cov_tnl1hv10y.b[9][1]++;
cov_tnl1hv10y.s[81]++;
color = this.color(v1, v2, v3);
cov_tnl1hv10y.s[82]++;
position = new _main.default.Vector(x, y, z);
cov_tnl1hv10y.s[83]++;
direction = new _main.default.Vector(nx, ny, nz);
cov_tnl1hv10y.s[84]++;
break;
case 9:
cov_tnl1hv10y.b[9][2]++;
cov_tnl1hv10y.s[85]++;
if (v1 instanceof _main.default.Color) {
cov_tnl1hv10y.b[10][0]++;
cov_tnl1hv10y.s[86]++;
color = v1;
cov_tnl1hv10y.s[87]++;
position = new _main.default.Vector(v2, v3, x);
cov_tnl1hv10y.s[88]++;
direction = new _main.default.Vector(y, z, nx);
cov_tnl1hv10y.s[89]++;
angle = ny;
cov_tnl1hv10y.s[90]++;
concentration = nz;
} else {
cov_tnl1hv10y.b[10][1]++;
cov_tnl1hv10y.s[91]++;
if (x instanceof _main.default.Vector) {
cov_tnl1hv10y.b[11][0]++;
cov_tnl1hv10y.s[92]++;
color = this.color(v1, v2, v3);
cov_tnl1hv10y.s[93]++;
position = x;
cov_tnl1hv10y.s[94]++;
direction = new _main.default.Vector(y, z, nx);
cov_tnl1hv10y.s[95]++;
angle = ny;
cov_tnl1hv10y.s[96]++;
concentration = nz;
} else {
cov_tnl1hv10y.b[11][1]++;
cov_tnl1hv10y.s[97]++;
if (nx instanceof _main.default.Vector) {
cov_tnl1hv10y.b[12][0]++;
cov_tnl1hv10y.s[98]++;
color = this.color(v1, v2, v3);
cov_tnl1hv10y.s[99]++;
position = new _main.default.Vector(x, y, z);
cov_tnl1hv10y.s[100]++;
direction = nx;
cov_tnl1hv10y.s[101]++;
angle = ny;
cov_tnl1hv10y.s[102]++;
concentration = nz;
} else {
cov_tnl1hv10y.b[12][1]++;
cov_tnl1hv10y.s[103]++;
color = this.color(v1, v2, v3);
cov_tnl1hv10y.s[104]++;
position = new _main.default.Vector(x, y, z);
cov_tnl1hv10y.s[105]++;
direction = new _main.default.Vector(nx, ny, nz);
}
}
}
cov_tnl1hv10y.s[106]++;
break;
case 8:
cov_tnl1hv10y.b[9][3]++;
cov_tnl1hv10y.s[107]++;
if (v1 instanceof _main.default.Color) {
cov_tnl1hv10y.b[13][0]++;
cov_tnl1hv10y.s[108]++;
color = v1;
cov_tnl1hv10y.s[109]++;
position = new _main.default.Vector(v2, v3, x);
cov_tnl1hv10y.s[110]++;
direction = new _main.default.Vector(y, z, nx);
cov_tnl1hv10y.s[111]++;
angle = ny;
} else {
cov_tnl1hv10y.b[13][1]++;
cov_tnl1hv10y.s[112]++;
if (x instanceof _main.default.Vector) {
cov_tnl1hv10y.b[14][0]++;
cov_tnl1hv10y.s[113]++;
color = this.color(v1, v2, v3);
cov_tnl1hv10y.s[114]++;
position = x;
cov_tnl1hv10y.s[115]++;
direction = new _main.default.Vector(y, z, nx);
cov_tnl1hv10y.s[116]++;
angle = ny;
} else {
cov_tnl1hv10y.b[14][1]++;
cov_tnl1hv10y.s[117]++;
color = this.color(v1, v2, v3);
cov_tnl1hv10y.s[118]++;
position = new _main.default.Vector(x, y, z);
cov_tnl1hv10y.s[119]++;
direction = nx;
cov_tnl1hv10y.s[120]++;
angle = ny;
}
}
cov_tnl1hv10y.s[121]++;
break;
case 7:
cov_tnl1hv10y.b[9][4]++;
cov_tnl1hv10y.s[122]++;
if (
(cov_tnl1hv10y.b[16][0]++, v1 instanceof _main.default.Color) &&
(cov_tnl1hv10y.b[16][1]++, v2 instanceof _main.default.Vector)
) {
cov_tnl1hv10y.b[15][0]++;
cov_tnl1hv10y.s[123]++;
color = v1;
cov_tnl1hv10y.s[124]++;
position = v2;
cov_tnl1hv10y.s[125]++;
direction = new _main.default.Vector(v3, x, y);
cov_tnl1hv10y.s[126]++;
angle = z;
cov_tnl1hv10y.s[127]++;
concentration = nx;
} else {
cov_tnl1hv10y.b[15][1]++;
cov_tnl1hv10y.s[128]++;
if (
(cov_tnl1hv10y.b[18][0]++, v1 instanceof _main.default.Color) &&
(cov_tnl1hv10y.b[18][1]++, y instanceof _main.default.Vector)
) {
cov_tnl1hv10y.b[17][0]++;
cov_tnl1hv10y.s[129]++;
color = v1;
cov_tnl1hv10y.s[130]++;
position = new _main.default.Vector(v2, v3, x);
cov_tnl1hv10y.s[131]++;
direction = y;
cov_tnl1hv10y.s[132]++;
angle = z;
cov_tnl1hv10y.s[133]++;
concentration = nx;
} else {
cov_tnl1hv10y.b[17][1]++;
cov_tnl1hv10y.s[134]++;
if (
(cov_tnl1hv10y.b[20][0]++, x instanceof _main.default.Vector) &&
(cov_tnl1hv10y.b[20][1]++, y instanceof _main.default.Vector)
) {
cov_tnl1hv10y.b[19][0]++;
cov_tnl1hv10y.s[135]++;
color = this.color(v1, v2, v3);
cov_tnl1hv10y.s[136]++;
position = x;
cov_tnl1hv10y.s[137]++;
direction = y;
cov_tnl1hv10y.s[138]++;
angle = z;
cov_tnl1hv10y.s[139]++;
concentration = nx;
} else {
cov_tnl1hv10y.b[19][1]++;
cov_tnl1hv10y.s[140]++;
if (v1 instanceof _main.default.Color) {
cov_tnl1hv10y.b[21][0]++;
cov_tnl1hv10y.s[141]++;
color = v1;
cov_tnl1hv10y.s[142]++;
position = new _main.default.Vector(v2, v3, x);
cov_tnl1hv10y.s[143]++;
direction = new _main.default.Vector(y, z, nx);
} else {
cov_tnl1hv10y.b[21][1]++;
cov_tnl1hv10y.s[144]++;
if (x instanceof _main.default.Vector) {
cov_tnl1hv10y.b[22][0]++;
cov_tnl1hv10y.s[145]++;
color = this.color(v1, v2, v3);
cov_tnl1hv10y.s[146]++;
position = x;
cov_tnl1hv10y.s[147]++;
direction = new _main.default.Vector(y, z, nx);
} else {
cov_tnl1hv10y.b[22][1]++;
cov_tnl1hv10y.s[148]++;
color = this.color(v1, v2, v3);
cov_tnl1hv10y.s[149]++;
position = new _main.default.Vector(x, y, z);
cov_tnl1hv10y.s[150]++;
direction = nx;
}
}
}
}
}
cov_tnl1hv10y.s[151]++;
break;
case 6:
cov_tnl1hv10y.b[9][5]++;
cov_tnl1hv10y.s[152]++;
if (
(cov_tnl1hv10y.b[24][0]++, x instanceof _main.default.Vector) &&
(cov_tnl1hv10y.b[24][1]++, y instanceof _main.default.Vector)
) {
cov_tnl1hv10y.b[23][0]++;
cov_tnl1hv10y.s[153]++;
color = this.color(v1, v2, v3);
cov_tnl1hv10y.s[154]++;
position = x;
cov_tnl1hv10y.s[155]++;
direction = y;
cov_tnl1hv10y.s[156]++;
angle = z;
} else {
cov_tnl1hv10y.b[23][1]++;
cov_tnl1hv10y.s[157]++;
if (
(cov_tnl1hv10y.b[26][0]++, v1 instanceof _main.default.Color) &&
(cov_tnl1hv10y.b[26][1]++, y instanceof _main.default.Vector)
) {
cov_tnl1hv10y.b[25][0]++;
cov_tnl1hv10y.s[158]++;
color = v1;
cov_tnl1hv10y.s[159]++;
position = new _main.default.Vector(v2, v3, x);
cov_tnl1hv10y.s[160]++;
direction = y;
cov_tnl1hv10y.s[161]++;
angle = z;
} else {
cov_tnl1hv10y.b[25][1]++;
cov_tnl1hv10y.s[162]++;
if (
(cov_tnl1hv10y.b[28][0]++, v1 instanceof _main.default.Color) &&
(cov_tnl1hv10y.b[28][1]++, v2 instanceof _main.default.Vector)
) {
cov_tnl1hv10y.b[27][0]++;
cov_tnl1hv10y.s[163]++;
color = v1;
cov_tnl1hv10y.s[164]++;
position = v2;
cov_tnl1hv10y.s[165]++;
direction = new _main.default.Vector(v3, x, y);
cov_tnl1hv10y.s[166]++;
angle = z;
} else {
cov_tnl1hv10y.b[27][1]++;
}
}
}
cov_tnl1hv10y.s[167]++;
break;
case 5:
cov_tnl1hv10y.b[9][6]++;
cov_tnl1hv10y.s[168]++;
if (
(cov_tnl1hv10y.b[30][0]++, v1 instanceof _main.default.Color) &&
(cov_tnl1hv10y.b[30][1]++, v2 instanceof _main.default.Vector) &&
(cov_tnl1hv10y.b[30][2]++, v3 instanceof _main.default.Vector)
) {
cov_tnl1hv10y.b[29][0]++;
cov_tnl1hv10y.s[169]++;
color = v1;
cov_tnl1hv10y.s[170]++;
position = v2;
cov_tnl1hv10y.s[171]++;
direction = v3;
cov_tnl1hv10y.s[172]++;
angle = x;
cov_tnl1hv10y.s[173]++;
concentration = y;
} else {
cov_tnl1hv10y.b[29][1]++;
cov_tnl1hv10y.s[174]++;
if (
(cov_tnl1hv10y.b[32][0]++, x instanceof _main.default.Vector) &&
(cov_tnl1hv10y.b[32][1]++, y instanceof _main.default.Vector)
) {
cov_tnl1hv10y.b[31][0]++;
cov_tnl1hv10y.s[175]++;
color = this.color(v1, v2, v3);
cov_tnl1hv10y.s[176]++;
position = x;
cov_tnl1hv10y.s[177]++;
direction = y;
} else {
cov_tnl1hv10y.b[31][1]++;
cov_tnl1hv10y.s[178]++;
if (
(cov_tnl1hv10y.b[34][0]++, v1 instanceof _main.default.Color) &&
(cov_tnl1hv10y.b[34][1]++, y instanceof _main.default.Vector)
) {
cov_tnl1hv10y.b[33][0]++;
cov_tnl1hv10y.s[179]++;
color = v1;
cov_tnl1hv10y.s[180]++;
position = new _main.default.Vector(v2, v3, x);
cov_tnl1hv10y.s[181]++;
direction = y;
} else {
cov_tnl1hv10y.b[33][1]++;
cov_tnl1hv10y.s[182]++;
if (
(cov_tnl1hv10y.b[36][0]++, v1 instanceof _main.default.Color) &&
(cov_tnl1hv10y.b[36][1]++, v2 instanceof _main.default.Vector)
) {
cov_tnl1hv10y.b[35][0]++;
cov_tnl1hv10y.s[183]++;
color = v1;
cov_tnl1hv10y.s[184]++;
position = v2;
cov_tnl1hv10y.s[185]++;
direction = new _main.default.Vector(v3, x, y);
} else {
cov_tnl1hv10y.b[35][1]++;
}
}
}
}
cov_tnl1hv10y.s[186]++;
break;
case 4:
cov_tnl1hv10y.b[9][7]++;
cov_tnl1hv10y.s[187]++;
color = v1;
cov_tnl1hv10y.s[188]++;
position = v2;
cov_tnl1hv10y.s[189]++;
direction = v3;
cov_tnl1hv10y.s[190]++;
angle = x;
cov_tnl1hv10y.s[191]++;
break;
case 3:
cov_tnl1hv10y.b[9][8]++;
cov_tnl1hv10y.s[192]++;
color = v1;
cov_tnl1hv10y.s[193]++;
position = v2;
cov_tnl1hv10y.s[194]++;
direction = v3;
cov_tnl1hv10y.s[195]++;
break;
default:
cov_tnl1hv10y.b[9][9]++;
cov_tnl1hv10y.s[196]++;
console.warn(
'Sorry, input for spotlight() is not in prescribed format. Too '.concat(
length < 3
? (cov_tnl1hv10y.b[37][0]++, 'few')
: (cov_tnl1hv10y.b[37][1]++, 'many'),
' arguments were provided'
)
);
cov_tnl1hv10y.s[197]++;
return this;
}
cov_tnl1hv10y.s[198]++;
this._renderer.spotLightDiffuseColors.push(
color._array[0],
color._array[1],
color._array[2]
);
cov_tnl1hv10y.s[199]++;
Array.prototype.push.apply(
this._renderer.spotLightSpecularColors,
this._renderer.specularColors
);
cov_tnl1hv10y.s[200]++;
this._renderer.spotLightPositions.push(position.x, position.y, position.z);
cov_tnl1hv10y.s[201]++;
direction.normalize();
cov_tnl1hv10y.s[202]++;
this._renderer.spotLightDirections.push(direction.x, direction.y, direction.z);
cov_tnl1hv10y.s[203]++;
if (angle === undefined) {
cov_tnl1hv10y.b[38][0]++;
cov_tnl1hv10y.s[204]++;
angle = Math.PI / 3;
} else {
cov_tnl1hv10y.b[38][1]++;
}
cov_tnl1hv10y.s[205]++;
if (
(cov_tnl1hv10y.b[40][0]++, concentration !== undefined) &&
(cov_tnl1hv10y.b[40][1]++, concentration < 1)
) {
cov_tnl1hv10y.b[39][0]++;
cov_tnl1hv10y.s[206]++;
concentration = 1;
cov_tnl1hv10y.s[207]++;
console.warn(
'Value of concentration needs to be greater than 1. Setting it to 1'
);
} else {
cov_tnl1hv10y.b[39][1]++;
cov_tnl1hv10y.s[208]++;
if (concentration === undefined) {
cov_tnl1hv10y.b[41][0]++;
cov_tnl1hv10y.s[209]++;
concentration = 100;
} else {
cov_tnl1hv10y.b[41][1]++;
}
}
cov_tnl1hv10y.s[210]++;
angle = this._renderer._pInst._toRadians(angle);
cov_tnl1hv10y.s[211]++;
this._renderer.spotLightAngle.push(Math.cos(angle));
cov_tnl1hv10y.s[212]++;
this._renderer.spotLightConc.push(concentration);
cov_tnl1hv10y.s[213]++;
this._renderer._enableLighting = true;
cov_tnl1hv10y.s[214]++;
return this;
};
/**
* This function will remove all the lights from the sketch for the
* subsequent materials rendered. It affects all the subsequent methods.
* Calls to lighting methods made after noLights() will re-enable lights
* in the sketch.
* @method noLights
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
* function draw() {
* background(0);
* noStroke();
*
* ambientLight(150, 0, 0);
* translate(-25, 0, 0);
* ambientMaterial(250);
* sphere(20);
*
* noLights();
* ambientLight(0, 150, 0);
* translate(50, 0, 0);
* ambientMaterial(250);
* sphere(20);
* }
*
*
*
* @alt
* Two spheres showing different colors
*/ cov_tnl1hv10y.s[215]++;
_main.default.prototype.noLights = function() {
cov_tnl1hv10y.f[7]++;
cov_tnl1hv10y.s[216]++;
this._assert3d('noLights');
cov_tnl1hv10y.s[217]++;
_main.default._validateParameters('noLights', arguments);
cov_tnl1hv10y.s[218]++;
this._renderer._enableLighting = false;
cov_tnl1hv10y.s[219]++;
this._renderer.ambientLightColors.length = 0;
cov_tnl1hv10y.s[220]++;
this._renderer.specularColors = [1, 1, 1];
cov_tnl1hv10y.s[221]++;
this._renderer.directionalLightDirections.length = 0;
cov_tnl1hv10y.s[222]++;
this._renderer.directionalLightDiffuseColors.length = 0;
cov_tnl1hv10y.s[223]++;
this._renderer.directionalLightSpecularColors.length = 0;
cov_tnl1hv10y.s[224]++;
this._renderer.pointLightPositions.length = 0;
cov_tnl1hv10y.s[225]++;
this._renderer.pointLightDiffuseColors.length = 0;
cov_tnl1hv10y.s[226]++;
this._renderer.pointLightSpecularColors.length = 0;
cov_tnl1hv10y.s[227]++;
this._renderer.spotLightPositions.length = 0;
cov_tnl1hv10y.s[228]++;
this._renderer.spotLightDirections.length = 0;
cov_tnl1hv10y.s[229]++;
this._renderer.spotLightDiffuseColors.length = 0;
cov_tnl1hv10y.s[230]++;
this._renderer.spotLightSpecularColors.length = 0;
cov_tnl1hv10y.s[231]++;
this._renderer.spotLightAngle.length = 0;
cov_tnl1hv10y.s[232]++;
this._renderer.spotLightConc.length = 0;
cov_tnl1hv10y.s[233]++;
this._renderer.constantAttenuation = 1;
cov_tnl1hv10y.s[234]++;
this._renderer.linearAttenuation = 0;
cov_tnl1hv10y.s[235]++;
this._renderer.quadraticAttenuation = 0;
cov_tnl1hv10y.s[236]++;
this._renderer._useShininess = 1;
cov_tnl1hv10y.s[237]++;
return this;
};
var _default = _main.default;
exports.default = _default;
},
{ '../core/main': 54 }
],
100: [
function(_dereq_, module, exports) {
'use strict';
var cov_1b0evnrslm = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/webgl/loading.js';
var hash = '626bae31ee28f3108da807a3ce1af59ab5d24d9d';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/loading.js',
statementMap: {
'0': { start: { line: 104, column: 0 }, end: { line: 177, column: 2 } },
'1': { start: { line: 105, column: 2 }, end: { line: 105, column: 49 } },
'2': { start: { line: 109, column: 17 }, end: { line: 109, column: 31 } },
'3': { start: { line: 110, column: 2 }, end: { line: 124, column: 3 } },
'4': { start: { line: 111, column: 4 }, end: { line: 111, column: 29 } },
'5': { start: { line: 112, column: 4 }, end: { line: 112, column: 35 } },
'6': { start: { line: 113, column: 4 }, end: { line: 113, column: 35 } },
'7': { start: { line: 114, column: 4 }, end: { line: 116, column: 5 } },
'8': { start: { line: 115, column: 6 }, end: { line: 115, column: 30 } },
'9': { start: { line: 118, column: 4 }, end: { line: 118, column: 22 } },
'10': { start: { line: 119, column: 4 }, end: { line: 119, column: 35 } },
'11': { start: { line: 120, column: 4 }, end: { line: 120, column: 35 } },
'12': { start: { line: 121, column: 4 }, end: { line: 123, column: 5 } },
'13': { start: { line: 122, column: 6 }, end: { line: 122, column: 30 } },
'14': { start: { line: 126, column: 16 }, end: { line: 126, column: 33 } },
'15': { start: { line: 127, column: 2 }, end: { line: 127, column: 37 } },
'16': { start: { line: 128, column: 15 }, end: { line: 128, column: 19 } },
'17': { start: { line: 130, column: 2 }, end: { line: 175, column: 3 } },
'18': { start: { line: 131, column: 4 }, end: { line: 147, column: 6 } },
'19': { start: { line: 136, column: 8 }, end: { line: 136, column: 37 } },
'20': { start: { line: 138, column: 8 }, end: { line: 140, column: 9 } },
'21': { start: { line: 139, column: 10 }, end: { line: 139, column: 28 } },
'22': { start: { line: 141, column: 8 }, end: { line: 141, column: 33 } },
'23': { start: { line: 142, column: 8 }, end: { line: 144, column: 9 } },
'24': { start: { line: 143, column: 10 }, end: { line: 143, column: 33 } },
'25': { start: { line: 148, column: 9 }, end: { line: 175, column: 3 } },
'26': { start: { line: 149, column: 4 }, end: { line: 164, column: 6 } },
'27': { start: { line: 152, column: 8 }, end: { line: 152, column: 33 } },
'28': { start: { line: 154, column: 8 }, end: { line: 156, column: 9 } },
'29': { start: { line: 155, column: 10 }, end: { line: 155, column: 28 } },
'30': { start: { line: 158, column: 8 }, end: { line: 158, column: 33 } },
'31': { start: { line: 159, column: 8 }, end: { line: 161, column: 9 } },
'32': { start: { line: 160, column: 10 }, end: { line: 160, column: 33 } },
'33': { start: { line: 166, column: 4 }, end: { line: 166, column: 39 } },
'34': { start: { line: 168, column: 4 }, end: { line: 174, column: 5 } },
'35': { start: { line: 169, column: 6 }, end: { line: 169, column: 24 } },
'36': { start: { line: 171, column: 6 }, end: { line: 173, column: 8 } },
'37': { start: { line: 176, column: 2 }, end: { line: 176, column: 15 } },
'38': { start: { line: 200, column: 22 }, end: { line: 204, column: 3 } },
'39': { start: { line: 205, column: 23 }, end: { line: 205, column: 25 } },
'40': { start: { line: 207, column: 2 }, end: { line: 279, column: 3 } },
'41': { start: { line: 207, column: 18 }, end: { line: 207, column: 19 } },
'42': { start: { line: 211, column: 19 }, end: { line: 211, column: 52 } },
'43': { start: { line: 213, column: 4 }, end: { line: 278, column: 5 } },
'44': { start: { line: 214, column: 6 }, end: { line: 277, column: 7 } },
'45': { start: { line: 217, column: 23 }, end: { line: 221, column: 9 } },
'46': { start: { line: 222, column: 8 }, end: { line: 222, column: 44 } },
'47': { start: { line: 223, column: 13 }, end: { line: 277, column: 7 } },
'48': { start: { line: 226, column: 26 }, end: { line: 226, column: 72 } },
'49': { start: { line: 227, column: 8 }, end: { line: 227, column: 47 } },
'50': { start: { line: 228, column: 13 }, end: { line: 277, column: 7 } },
'51': { start: { line: 231, column: 8 }, end: { line: 276, column: 9 } },
'52': { start: { line: 231, column: 23 }, end: { line: 231, column: 24 } },
'53': { start: { line: 232, column: 23 }, end: { line: 232, column: 25 } },
'54': { start: { line: 234, column: 31 }, end: { line: 234, column: 48 } },
'55': { start: { line: 236, column: 10 }, end: { line: 267, column: 11 } },
'56': { start: { line: 236, column: 30 }, end: { line: 236, column: 31 } },
'57': { start: { line: 238, column: 31 }, end: { line: 238, column: 61 } },
'58': { start: { line: 239, column: 28 }, end: { line: 239, column: 29 } },
'59': { start: { line: 245, column: 12 }, end: { line: 264, column: 13 } },
'60': { start: { line: 246, column: 14 }, end: { line: 246, column: 51 } },
'61': { start: { line: 248, column: 32 }, end: { line: 248, column: 53 } },
'62': { start: { line: 249, column: 14 }, end: { line: 251, column: 15 } },
'63': { start: { line: 249, column: 27 }, end: { line: 249, column: 28 } },
'64': { start: { line: 250, column: 16 }, end: { line: 250, column: 58 } },
'65': { start: { line: 253, column: 14 }, end: { line: 253, column: 75 } },
'66': { start: { line: 254, column: 14 }, end: { line: 254, column: 70 } },
'67': { start: { line: 255, column: 14 }, end: { line: 259, column: 15 } },
'68': { start: { line: 256, column: 16 }, end: { line: 256, column: 69 } },
'69': { start: { line: 258, column: 16 }, end: { line: 258, column: 39 } },
'70': { start: { line: 261, column: 14 }, end: { line: 263, column: 15 } },
'71': { start: { line: 262, column: 16 }, end: { line: 262, column: 78 } },
'72': { start: { line: 266, column: 12 }, end: { line: 266, column: 33 } },
'73': { start: { line: 269, column: 10 }, end: { line: 275, column: 11 } },
'74': { start: { line: 274, column: 12 }, end: { line: 274, column: 35 } },
'75': { start: { line: 281, column: 2 }, end: { line: 283, column: 3 } },
'76': { start: { line: 282, column: 4 }, end: { line: 282, column: 27 } },
'77': { start: { line: 285, column: 2 }, end: { line: 285, column: 15 } },
'78': { start: { line: 295, column: 2 }, end: { line: 311, column: 3 } },
'79': { start: { line: 296, column: 4 }, end: { line: 296, column: 34 } },
'80': { start: { line: 298, column: 19 }, end: { line: 298, column: 39 } },
'81': { start: { line: 300, column: 4 }, end: { line: 305, column: 5 } },
'82': { start: { line: 301, column: 6 }, end: { line: 303, column: 8 } },
'83': { start: { line: 304, column: 6 }, end: { line: 304, column: 19 } },
'84': { start: { line: 307, column: 20 }, end: { line: 307, column: 44 } },
'85': { start: { line: 308, column: 18 }, end: { line: 308, column: 40 } },
'86': { start: { line: 309, column: 22 }, end: { line: 309, column: 39 } },
'87': { start: { line: 310, column: 4 }, end: { line: 310, column: 36 } },
'88': { start: { line: 312, column: 2 }, end: { line: 312, column: 15 } },
'89': { start: { line: 329, column: 17 }, end: { line: 329, column: 35 } },
'90': { start: { line: 332, column: 16 }, end: { line: 332, column: 41 } },
'91': { start: { line: 333, column: 2 }, end: { line: 336, column: 3 } },
'92': { start: { line: 333, column: 17 }, end: { line: 333, column: 18 } },
'93': { start: { line: 335, column: 4 }, end: { line: 335, column: 58 } },
'94': { start: { line: 335, column: 45 }, end: { line: 335, column: 58 } },
'95': { start: { line: 339, column: 2 }, end: { line: 339, column: 14 } },
'96': { start: { line: 347, column: 2 }, end: { line: 349, column: 3 } },
'97': { start: { line: 347, column: 15 }, end: { line: 347, column: 16 } },
'98': { start: { line: 347, column: 23 }, end: { line: 347, column: 35 } },
'99': { start: { line: 348, column: 4 }, end: { line: 348, column: 70 } },
'100': { start: { line: 348, column: 57 }, end: { line: 348, column: 70 } },
'101': { start: { line: 351, column: 2 }, end: { line: 351, column: 14 } },
'102': { start: { line: 361, column: 17 }, end: { line: 361, column: 37 } },
'103': { start: { line: 364, column: 16 }, end: { line: 364, column: 42 } },
'104': { start: { line: 368, column: 16 }, end: { line: 368, column: 21 } },
'105': { start: { line: 373, column: 2 }, end: { line: 389, column: 3 } },
'106': { start: { line: 373, column: 19 }, end: { line: 373, column: 20 } },
'107': { start: { line: 375, column: 4 }, end: { line: 388, column: 5 } },
'108': { start: { line: 380, column: 6 }, end: { line: 380, column: 23 } },
'109': { start: { line: 381, column: 6 }, end: { line: 381, column: 18 } },
'110': { start: { line: 383, column: 6 }, end: { line: 383, column: 50 } },
'111': { start: { line: 384, column: 6 }, end: { line: 384, column: 50 } },
'112': { start: { line: 385, column: 6 }, end: { line: 385, column: 50 } },
'113': { start: { line: 390, column: 21 }, end: { line: 390, column: 23 } },
'114': { start: { line: 391, column: 21 }, end: { line: 391, column: 31 } },
'115': { start: { line: 394, column: 2 }, end: { line: 435, column: 3 } },
'116': { start: { line: 394, column: 18 }, end: { line: 394, column: 19 } },
'117': { start: { line: 395, column: 18 }, end: { line: 395, column: 48 } },
'118': { start: { line: 396, column: 20 }, end: { line: 396, column: 50 } },
'119': { start: { line: 397, column: 20 }, end: { line: 397, column: 54 } },
'120': { start: { line: 398, column: 20 }, end: { line: 398, column: 54 } },
'121': { start: { line: 400, column: 4 }, end: { line: 413, column: 5 } },
'122': { start: { line: 401, column: 26 }, end: { line: 401, column: 60 } },
'123': { start: { line: 403, column: 6 }, end: { line: 412, column: 7 } },
'124': { start: { line: 405, column: 8 }, end: { line: 405, column: 38 } },
'125': { start: { line: 406, column: 8 }, end: { line: 406, column: 45 } },
'126': { start: { line: 407, column: 8 }, end: { line: 407, column: 46 } },
'127': { start: { line: 409, column: 8 }, end: { line: 409, column: 21 } },
'128': { start: { line: 410, column: 8 }, end: { line: 410, column: 21 } },
'129': { start: { line: 411, column: 8 }, end: { line: 411, column: 21 } },
'130': { start: { line: 414, column: 22 }, end: { line: 414, column: 62 } },
'131': { start: { line: 416, column: 4 }, end: { line: 431, column: 5 } },
'132': { start: { line: 416, column: 17 }, end: { line: 416, column: 18 } },
'133': { start: { line: 417, column: 26 }, end: { line: 417, column: 40 } },
'134': { start: { line: 419, column: 24 }, end: { line: 423, column: 7 } },
'135': { start: { line: 425, column: 6 }, end: { line: 425, column: 37 } },
'136': { start: { line: 426, column: 6 }, end: { line: 426, column: 42 } },
'137': { start: { line: 428, column: 6 }, end: { line: 430, column: 7 } },
'138': { start: { line: 429, column: 8 }, end: { line: 429, column: 29 } },
'139': { start: { line: 433, column: 4 }, end: { line: 433, column: 61 } },
'140': { start: { line: 434, column: 4 }, end: { line: 434, column: 43 } },
'141': { start: { line: 436, column: 2 }, end: { line: 438, column: 3 } },
'142': { start: { line: 439, column: 2 }, end: { line: 439, column: 15 } },
'143': { start: { line: 453, column: 14 }, end: { line: 453, column: 16 } },
'144': { start: { line: 454, column: 23 }, end: { line: 454, column: 25 } },
'145': { start: { line: 457, column: 2 }, end: { line: 582, column: 3 } },
'146': { start: { line: 457, column: 22 }, end: { line: 457, column: 23 } },
'147': { start: { line: 458, column: 17 }, end: { line: 458, column: 39 } },
'148': { start: { line: 459, column: 18 }, end: { line: 459, column: 33 } },
'149': { start: { line: 461, column: 4 }, end: { line: 466, column: 5 } },
'150': { start: { line: 461, column: 29 }, end: { line: 461, column: 30 } },
'151': { start: { line: 462, column: 6 }, end: { line: 465, column: 7 } },
'152': { start: { line: 464, column: 8 }, end: { line: 464, column: 39 } },
'153': { start: { line: 468, column: 4 }, end: { line: 471, column: 5 } },
'154': { start: { line: 470, column: 6 }, end: { line: 470, column: 15 } },
'155': { start: { line: 473, column: 4 }, end: { line: 581, column: 5 } },
'156': { start: { line: 475, column: 8 }, end: { line: 482, column: 9 } },
'157': { start: { line: 477, column: 10 }, end: { line: 477, column: 30 } },
'158': { start: { line: 478, column: 10 }, end: { line: 478, column: 74 } },
'159': { start: { line: 479, column: 10 }, end: { line: 479, column: 17 } },
'160': { start: { line: 481, column: 10 }, end: { line: 481, column: 26 } },
'161': { start: { line: 483, column: 8 }, end: { line: 483, column: 14 } },
'162': { start: { line: 486, column: 8 }, end: { line: 502, column: 9 } },
'163': { start: { line: 488, column: 10 }, end: { line: 488, column: 30 } },
'164': { start: { line: 489, column: 10 }, end: { line: 491, column: 12 } },
'165': { start: { line: 492, column: 10 }, end: { line: 492, column: 17 } },
'166': { start: { line: 495, column: 10 }, end: { line: 499, column: 12 } },
'167': { start: { line: 500, column: 10 }, end: { line: 500, column: 68 } },
'168': { start: { line: 501, column: 10 }, end: { line: 501, column: 33 } },
'169': { start: { line: 503, column: 8 }, end: { line: 503, column: 14 } },
'170': { start: { line: 506, column: 8 }, end: { line: 514, column: 9 } },
'171': { start: { line: 508, column: 10 }, end: { line: 508, column: 30 } },
'172': { start: { line: 509, column: 10 }, end: { line: 509, column: 79 } },
'173': { start: { line: 510, column: 10 }, end: { line: 510, column: 17 } },
'174': { start: { line: 513, column: 10 }, end: { line: 513, column: 27 } },
'175': { start: { line: 515, column: 8 }, end: { line: 515, column: 14 } },
'176': { start: { line: 518, column: 8 }, end: { line: 540, column: 9 } },
'177': { start: { line: 520, column: 10 }, end: { line: 524, column: 12 } },
'178': { start: { line: 525, column: 10 }, end: { line: 525, column: 41 } },
'179': { start: { line: 526, column: 10 }, end: { line: 526, column: 33 } },
'180': { start: { line: 527, column: 10 }, end: { line: 527, column: 65 } },
'181': { start: { line: 528, column: 15 }, end: { line: 540, column: 9 } },
'182': { start: { line: 530, column: 10 }, end: { line: 530, column: 43 } },
'183': { start: { line: 531, column: 10 }, end: { line: 531, column: 30 } },
'184': { start: { line: 532, column: 10 }, end: { line: 532, column: 28 } },
'185': { start: { line: 535, column: 10 }, end: { line: 535, column: 30 } },
'186': { start: { line: 536, column: 10 }, end: { line: 538, column: 12 } },
'187': { start: { line: 539, column: 10 }, end: { line: 539, column: 17 } },
'188': { start: { line: 541, column: 8 }, end: { line: 541, column: 14 } },
'189': { start: { line: 544, column: 8 }, end: { line: 551, column: 9 } },
'190': { start: { line: 546, column: 10 }, end: { line: 546, column: 30 } },
'191': { start: { line: 547, column: 10 }, end: { line: 547, column: 77 } },
'192': { start: { line: 548, column: 10 }, end: { line: 548, column: 17 } },
'193': { start: { line: 550, column: 10 }, end: { line: 550, column: 29 } },
'194': { start: { line: 552, column: 8 }, end: { line: 552, column: 14 } },
'195': { start: { line: 555, column: 8 }, end: { line: 575, column: 9 } },
'196': { start: { line: 557, column: 15 }, end: { line: 575, column: 9 } },
'197': { start: { line: 559, column: 10 }, end: { line: 563, column: 12 } },
'198': { start: { line: 564, column: 10 }, end: { line: 564, column: 68 } },
'199': { start: { line: 565, column: 10 }, end: { line: 565, column: 33 } },
'200': { start: { line: 568, column: 10 }, end: { line: 568, column: 30 } },
'201': { start: { line: 569, column: 10 }, end: { line: 573, column: 12 } },
'202': { start: { line: 574, column: 10 }, end: { line: 574, column: 17 } },
'203': { start: { line: 576, column: 8 }, end: { line: 576, column: 14 } },
'204': { start: { line: 579, column: 8 }, end: { line: 579, column: 50 } },
'205': { start: { line: 580, column: 8 }, end: { line: 580, column: 14 } },
'206': { start: { line: 583, column: 2 }, end: { line: 583, column: 15 } },
'207': { start: { line: 617, column: 0 }, end: { line: 628, column: 2 } },
'208': { start: { line: 618, column: 2 }, end: { line: 618, column: 26 } },
'209': { start: { line: 619, column: 2 }, end: { line: 619, column: 45 } },
'210': { start: { line: 620, column: 2 }, end: { line: 627, column: 3 } },
'211': { start: { line: 621, column: 4 }, end: { line: 624, column: 5 } },
'212': { start: { line: 622, column: 6 }, end: { line: 622, column: 52 } },
'213': { start: { line: 623, column: 6 }, end: { line: 623, column: 53 } },
'214': { start: { line: 626, column: 4 }, end: { line: 626, column: 42 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: { line: 104, column: 25 },
end: { line: 104, column: 26 }
},
loc: { start: { line: 104, column: 40 }, end: { line: 177, column: 1 } },
line: 104
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 135, column: 6 }, end: { line: 135, column: 7 } },
loc: { start: { line: 135, column: 21 }, end: { line: 145, column: 7 } },
line: 135
},
'2': {
name: '(anonymous_2)',
decl: { start: { line: 151, column: 6 }, end: { line: 151, column: 7 } },
loc: { start: { line: 151, column: 17 }, end: { line: 162, column: 7 } },
line: 151
},
'3': {
name: 'parseObj',
decl: { start: { line: 190, column: 9 }, end: { line: 190, column: 17 } },
loc: { start: { line: 190, column: 32 }, end: { line: 286, column: 1 } },
line: 190
},
'4': {
name: 'parseSTL',
decl: { start: { line: 294, column: 9 }, end: { line: 294, column: 17 } },
loc: { start: { line: 294, column: 33 }, end: { line: 313, column: 1 } },
line: 294
},
'5': {
name: 'isBinary',
decl: { start: { line: 328, column: 9 }, end: { line: 328, column: 17 } },
loc: { start: { line: 328, column: 24 }, end: { line: 340, column: 1 } },
line: 328
},
'6': {
name: 'matchDataViewAt',
decl: { start: { line: 345, column: 9 }, end: { line: 345, column: 24 } },
loc: { start: { line: 345, column: 48 }, end: { line: 352, column: 1 } },
line: 345
},
'7': {
name: 'parseBinarySTL',
decl: { start: { line: 360, column: 9 }, end: { line: 360, column: 23 } },
loc: { start: { line: 360, column: 39 }, end: { line: 440, column: 1 } },
line: 360
},
'8': {
name: 'parseASCIISTL',
decl: { start: { line: 452, column: 9 }, end: { line: 452, column: 22 } },
loc: { start: { line: 452, column: 37 }, end: { line: 584, column: 1 } },
line: 452
},
'9': {
name: '(anonymous_9)',
decl: {
start: { line: 617, column: 21 },
end: { line: 617, column: 22 }
},
loc: { start: { line: 617, column: 37 }, end: { line: 628, column: 1 } },
line: 617
}
},
branchMap: {
'0': {
loc: { start: { line: 110, column: 2 }, end: { line: 124, column: 3 } },
type: 'if',
locations: [
{ start: { line: 110, column: 2 }, end: { line: 124, column: 3 } },
{ start: { line: 110, column: 2 }, end: { line: 124, column: 3 } }
],
line: 110
},
'1': {
loc: { start: { line: 114, column: 4 }, end: { line: 116, column: 5 } },
type: 'if',
locations: [
{ start: { line: 114, column: 4 }, end: { line: 116, column: 5 } },
{ start: { line: 114, column: 4 }, end: { line: 116, column: 5 } }
],
line: 114
},
'2': {
loc: { start: { line: 121, column: 4 }, end: { line: 123, column: 5 } },
type: 'if',
locations: [
{ start: { line: 121, column: 4 }, end: { line: 123, column: 5 } },
{ start: { line: 121, column: 4 }, end: { line: 123, column: 5 } }
],
line: 121
},
'3': {
loc: { start: { line: 130, column: 2 }, end: { line: 175, column: 3 } },
type: 'if',
locations: [
{ start: { line: 130, column: 2 }, end: { line: 175, column: 3 } },
{ start: { line: 130, column: 2 }, end: { line: 175, column: 3 } }
],
line: 130
},
'4': {
loc: { start: { line: 138, column: 8 }, end: { line: 140, column: 9 } },
type: 'if',
locations: [
{ start: { line: 138, column: 8 }, end: { line: 140, column: 9 } },
{ start: { line: 138, column: 8 }, end: { line: 140, column: 9 } }
],
line: 138
},
'5': {
loc: { start: { line: 142, column: 8 }, end: { line: 144, column: 9 } },
type: 'if',
locations: [
{ start: { line: 142, column: 8 }, end: { line: 144, column: 9 } },
{ start: { line: 142, column: 8 }, end: { line: 144, column: 9 } }
],
line: 142
},
'6': {
loc: { start: { line: 148, column: 9 }, end: { line: 175, column: 3 } },
type: 'if',
locations: [
{ start: { line: 148, column: 9 }, end: { line: 175, column: 3 } },
{ start: { line: 148, column: 9 }, end: { line: 175, column: 3 } }
],
line: 148
},
'7': {
loc: { start: { line: 154, column: 8 }, end: { line: 156, column: 9 } },
type: 'if',
locations: [
{ start: { line: 154, column: 8 }, end: { line: 156, column: 9 } },
{ start: { line: 154, column: 8 }, end: { line: 156, column: 9 } }
],
line: 154
},
'8': {
loc: { start: { line: 159, column: 8 }, end: { line: 161, column: 9 } },
type: 'if',
locations: [
{ start: { line: 159, column: 8 }, end: { line: 161, column: 9 } },
{ start: { line: 159, column: 8 }, end: { line: 161, column: 9 } }
],
line: 159
},
'9': {
loc: { start: { line: 168, column: 4 }, end: { line: 174, column: 5 } },
type: 'if',
locations: [
{ start: { line: 168, column: 4 }, end: { line: 174, column: 5 } },
{ start: { line: 168, column: 4 }, end: { line: 174, column: 5 } }
],
line: 168
},
'10': {
loc: { start: { line: 213, column: 4 }, end: { line: 278, column: 5 } },
type: 'if',
locations: [
{ start: { line: 213, column: 4 }, end: { line: 278, column: 5 } },
{ start: { line: 213, column: 4 }, end: { line: 278, column: 5 } }
],
line: 213
},
'11': {
loc: { start: { line: 214, column: 6 }, end: { line: 277, column: 7 } },
type: 'if',
locations: [
{ start: { line: 214, column: 6 }, end: { line: 277, column: 7 } },
{ start: { line: 214, column: 6 }, end: { line: 277, column: 7 } }
],
line: 214
},
'12': {
loc: { start: { line: 214, column: 10 }, end: { line: 214, column: 49 } },
type: 'binary-expr',
locations: [
{ start: { line: 214, column: 10 }, end: { line: 214, column: 27 } },
{ start: { line: 214, column: 31 }, end: { line: 214, column: 49 } }
],
line: 214
},
'13': {
loc: { start: { line: 223, column: 13 }, end: { line: 277, column: 7 } },
type: 'if',
locations: [
{ start: { line: 223, column: 13 }, end: { line: 277, column: 7 } },
{ start: { line: 223, column: 13 }, end: { line: 277, column: 7 } }
],
line: 223
},
'14': {
loc: { start: { line: 228, column: 13 }, end: { line: 277, column: 7 } },
type: 'if',
locations: [
{ start: { line: 228, column: 13 }, end: { line: 277, column: 7 } },
{ start: { line: 228, column: 13 }, end: { line: 277, column: 7 } }
],
line: 228
},
'15': {
loc: { start: { line: 245, column: 12 }, end: { line: 264, column: 13 } },
type: 'if',
locations: [
{ start: { line: 245, column: 12 }, end: { line: 264, column: 13 } },
{ start: { line: 245, column: 12 }, end: { line: 264, column: 13 } }
],
line: 245
},
'16': {
loc: { start: { line: 255, column: 14 }, end: { line: 259, column: 15 } },
type: 'if',
locations: [
{ start: { line: 255, column: 14 }, end: { line: 259, column: 15 } },
{ start: { line: 255, column: 14 }, end: { line: 259, column: 15 } }
],
line: 255
},
'17': {
loc: { start: { line: 261, column: 14 }, end: { line: 263, column: 15 } },
type: 'if',
locations: [
{ start: { line: 261, column: 14 }, end: { line: 263, column: 15 } },
{ start: { line: 261, column: 14 }, end: { line: 263, column: 15 } }
],
line: 261
},
'18': {
loc: { start: { line: 269, column: 10 }, end: { line: 275, column: 11 } },
type: 'if',
locations: [
{ start: { line: 269, column: 10 }, end: { line: 275, column: 11 } },
{ start: { line: 269, column: 10 }, end: { line: 275, column: 11 } }
],
line: 269
},
'19': {
loc: { start: { line: 270, column: 12 }, end: { line: 272, column: 31 } },
type: 'binary-expr',
locations: [
{ start: { line: 270, column: 12 }, end: { line: 270, column: 31 } },
{ start: { line: 271, column: 12 }, end: { line: 271, column: 31 } },
{ start: { line: 272, column: 12 }, end: { line: 272, column: 31 } }
],
line: 270
},
'20': {
loc: { start: { line: 281, column: 2 }, end: { line: 283, column: 3 } },
type: 'if',
locations: [
{ start: { line: 281, column: 2 }, end: { line: 283, column: 3 } },
{ start: { line: 281, column: 2 }, end: { line: 283, column: 3 } }
],
line: 281
},
'21': {
loc: { start: { line: 295, column: 2 }, end: { line: 311, column: 3 } },
type: 'if',
locations: [
{ start: { line: 295, column: 2 }, end: { line: 311, column: 3 } },
{ start: { line: 295, column: 2 }, end: { line: 311, column: 3 } }
],
line: 295
},
'22': {
loc: { start: { line: 300, column: 4 }, end: { line: 305, column: 5 } },
type: 'if',
locations: [
{ start: { line: 300, column: 4 }, end: { line: 305, column: 5 } },
{ start: { line: 300, column: 4 }, end: { line: 305, column: 5 } }
],
line: 300
},
'23': {
loc: { start: { line: 335, column: 4 }, end: { line: 335, column: 58 } },
type: 'if',
locations: [
{ start: { line: 335, column: 4 }, end: { line: 335, column: 58 } },
{ start: { line: 335, column: 4 }, end: { line: 335, column: 58 } }
],
line: 335
},
'24': {
loc: { start: { line: 348, column: 4 }, end: { line: 348, column: 70 } },
type: 'if',
locations: [
{ start: { line: 348, column: 4 }, end: { line: 348, column: 70 } },
{ start: { line: 348, column: 4 }, end: { line: 348, column: 70 } }
],
line: 348
},
'25': {
loc: { start: { line: 375, column: 4 }, end: { line: 388, column: 5 } },
type: 'if',
locations: [
{ start: { line: 375, column: 4 }, end: { line: 388, column: 5 } },
{ start: { line: 375, column: 4 }, end: { line: 388, column: 5 } }
],
line: 375
},
'26': {
loc: { start: { line: 376, column: 6 }, end: { line: 378, column: 41 } },
type: 'binary-expr',
locations: [
{ start: { line: 376, column: 6 }, end: { line: 376, column: 51 } },
{ start: { line: 377, column: 6 }, end: { line: 377, column: 41 } },
{ start: { line: 378, column: 6 }, end: { line: 378, column: 41 } }
],
line: 376
},
'27': {
loc: { start: { line: 400, column: 4 }, end: { line: 413, column: 5 } },
type: 'if',
locations: [
{ start: { line: 400, column: 4 }, end: { line: 413, column: 5 } },
{ start: { line: 400, column: 4 }, end: { line: 413, column: 5 } }
],
line: 400
},
'28': {
loc: { start: { line: 403, column: 6 }, end: { line: 412, column: 7 } },
type: 'if',
locations: [
{ start: { line: 403, column: 6 }, end: { line: 412, column: 7 } },
{ start: { line: 403, column: 6 }, end: { line: 412, column: 7 } }
],
line: 403
},
'29': {
loc: { start: { line: 428, column: 6 }, end: { line: 430, column: 7 } },
type: 'if',
locations: [
{ start: { line: 428, column: 6 }, end: { line: 430, column: 7 } },
{ start: { line: 428, column: 6 }, end: { line: 430, column: 7 } }
],
line: 428
},
'30': {
loc: { start: { line: 436, column: 2 }, end: { line: 438, column: 3 } },
type: 'if',
locations: [
{ start: { line: 436, column: 2 }, end: { line: 438, column: 3 } },
{ start: { line: 436, column: 2 }, end: { line: 438, column: 3 } }
],
line: 436
},
'31': {
loc: { start: { line: 462, column: 6 }, end: { line: 465, column: 7 } },
type: 'if',
locations: [
{ start: { line: 462, column: 6 }, end: { line: 465, column: 7 } },
{ start: { line: 462, column: 6 }, end: { line: 465, column: 7 } }
],
line: 462
},
'32': {
loc: { start: { line: 468, column: 4 }, end: { line: 471, column: 5 } },
type: 'if',
locations: [
{ start: { line: 468, column: 4 }, end: { line: 471, column: 5 } },
{ start: { line: 468, column: 4 }, end: { line: 471, column: 5 } }
],
line: 468
},
'33': {
loc: { start: { line: 473, column: 4 }, end: { line: 581, column: 5 } },
type: 'switch',
locations: [
{ start: { line: 474, column: 6 }, end: { line: 483, column: 14 } },
{ start: { line: 485, column: 6 }, end: { line: 503, column: 14 } },
{ start: { line: 505, column: 6 }, end: { line: 515, column: 14 } },
{ start: { line: 517, column: 6 }, end: { line: 541, column: 14 } },
{ start: { line: 543, column: 6 }, end: { line: 552, column: 14 } },
{ start: { line: 554, column: 6 }, end: { line: 576, column: 14 } },
{ start: { line: 578, column: 6 }, end: { line: 580, column: 14 } }
],
line: 473
},
'34': {
loc: { start: { line: 475, column: 8 }, end: { line: 482, column: 9 } },
type: 'if',
locations: [
{ start: { line: 475, column: 8 }, end: { line: 482, column: 9 } },
{ start: { line: 475, column: 8 }, end: { line: 482, column: 9 } }
],
line: 475
},
'35': {
loc: { start: { line: 486, column: 8 }, end: { line: 502, column: 9 } },
type: 'if',
locations: [
{ start: { line: 486, column: 8 }, end: { line: 502, column: 9 } },
{ start: { line: 486, column: 8 }, end: { line: 502, column: 9 } }
],
line: 486
},
'36': {
loc: { start: { line: 486, column: 12 }, end: { line: 486, column: 57 } },
type: 'binary-expr',
locations: [
{ start: { line: 486, column: 12 }, end: { line: 486, column: 32 } },
{ start: { line: 486, column: 36 }, end: { line: 486, column: 57 } }
],
line: 486
},
'37': {
loc: { start: { line: 506, column: 8 }, end: { line: 514, column: 9 } },
type: 'if',
locations: [
{ start: { line: 506, column: 8 }, end: { line: 514, column: 9 } },
{ start: { line: 506, column: 8 }, end: { line: 514, column: 9 } }
],
line: 506
},
'38': {
loc: { start: { line: 506, column: 12 }, end: { line: 506, column: 55 } },
type: 'binary-expr',
locations: [
{ start: { line: 506, column: 12 }, end: { line: 506, column: 32 } },
{ start: { line: 506, column: 36 }, end: { line: 506, column: 55 } }
],
line: 506
},
'39': {
loc: { start: { line: 518, column: 8 }, end: { line: 540, column: 9 } },
type: 'if',
locations: [
{ start: { line: 518, column: 8 }, end: { line: 540, column: 9 } },
{ start: { line: 518, column: 8 }, end: { line: 540, column: 9 } }
],
line: 518
},
'40': {
loc: { start: { line: 528, column: 15 }, end: { line: 540, column: 9 } },
type: 'if',
locations: [
{ start: { line: 528, column: 15 }, end: { line: 540, column: 9 } },
{ start: { line: 528, column: 15 }, end: { line: 540, column: 9 } }
],
line: 528
},
'41': {
loc: { start: { line: 544, column: 8 }, end: { line: 551, column: 9 } },
type: 'if',
locations: [
{ start: { line: 544, column: 8 }, end: { line: 551, column: 9 } },
{ start: { line: 544, column: 8 }, end: { line: 551, column: 9 } }
],
line: 544
},
'42': {
loc: { start: { line: 555, column: 8 }, end: { line: 575, column: 9 } },
type: 'if',
locations: [
{ start: { line: 555, column: 8 }, end: { line: 575, column: 9 } },
{ start: { line: 555, column: 8 }, end: { line: 575, column: 9 } }
],
line: 555
},
'43': {
loc: { start: { line: 557, column: 15 }, end: { line: 575, column: 9 } },
type: 'if',
locations: [
{ start: { line: 557, column: 15 }, end: { line: 575, column: 9 } },
{ start: { line: 557, column: 15 }, end: { line: 575, column: 9 } }
],
line: 557
},
'44': {
loc: { start: { line: 557, column: 19 }, end: { line: 557, column: 64 } },
type: 'binary-expr',
locations: [
{ start: { line: 557, column: 19 }, end: { line: 557, column: 39 } },
{ start: { line: 557, column: 43 }, end: { line: 557, column: 64 } }
],
line: 557
},
'45': {
loc: { start: { line: 620, column: 2 }, end: { line: 627, column: 3 } },
type: 'if',
locations: [
{ start: { line: 620, column: 2 }, end: { line: 627, column: 3 } },
{ start: { line: 620, column: 2 }, end: { line: 627, column: 3 } }
],
line: 620
},
'46': {
loc: { start: { line: 621, column: 4 }, end: { line: 624, column: 5 } },
type: 'if',
locations: [
{ start: { line: 621, column: 4 }, end: { line: 624, column: 5 } },
{ start: { line: 621, column: 4 }, end: { line: 624, column: 5 } }
],
line: 621
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0,
'123': 0,
'124': 0,
'125': 0,
'126': 0,
'127': 0,
'128': 0,
'129': 0,
'130': 0,
'131': 0,
'132': 0,
'133': 0,
'134': 0,
'135': 0,
'136': 0,
'137': 0,
'138': 0,
'139': 0,
'140': 0,
'141': 0,
'142': 0,
'143': 0,
'144': 0,
'145': 0,
'146': 0,
'147': 0,
'148': 0,
'149': 0,
'150': 0,
'151': 0,
'152': 0,
'153': 0,
'154': 0,
'155': 0,
'156': 0,
'157': 0,
'158': 0,
'159': 0,
'160': 0,
'161': 0,
'162': 0,
'163': 0,
'164': 0,
'165': 0,
'166': 0,
'167': 0,
'168': 0,
'169': 0,
'170': 0,
'171': 0,
'172': 0,
'173': 0,
'174': 0,
'175': 0,
'176': 0,
'177': 0,
'178': 0,
'179': 0,
'180': 0,
'181': 0,
'182': 0,
'183': 0,
'184': 0,
'185': 0,
'186': 0,
'187': 0,
'188': 0,
'189': 0,
'190': 0,
'191': 0,
'192': 0,
'193': 0,
'194': 0,
'195': 0,
'196': 0,
'197': 0,
'198': 0,
'199': 0,
'200': 0,
'201': 0,
'202': 0,
'203': 0,
'204': 0,
'205': 0,
'206': 0,
'207': 0,
'208': 0,
'209': 0,
'210': 0,
'211': 0,
'212': 0,
'213': 0,
'214': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0, 0],
'20': [0, 0],
'21': [0, 0],
'22': [0, 0],
'23': [0, 0],
'24': [0, 0],
'25': [0, 0],
'26': [0, 0, 0],
'27': [0, 0],
'28': [0, 0],
'29': [0, 0],
'30': [0, 0],
'31': [0, 0],
'32': [0, 0],
'33': [0, 0, 0, 0, 0, 0, 0],
'34': [0, 0],
'35': [0, 0],
'36': [0, 0],
'37': [0, 0],
'38': [0, 0],
'39': [0, 0],
'40': [0, 0],
'41': [0, 0],
'42': [0, 0],
'43': [0, 0],
'44': [0, 0],
'45': [0, 0],
'46': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '626bae31ee28f3108da807a3ce1af59ab5d24d9d'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
_dereq_('./p5.Geometry');
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_1b0evnrslm.s[0]++;
/**
* Load a 3d model from an OBJ or STL file.
*
* loadModel() should be placed inside of preload().
* This allows the model to load fully before the rest of your code is run.
*
* One of the limitations of the OBJ and STL format is that it doesn't have a built-in
* sense of scale. This means that models exported from different programs might
* be very different sizes. If your model isn't displaying, try calling
* loadModel() with the normalized parameter set to true. This will resize the
* model to a scale appropriate for p5. You can also make additional changes to
* the final size of your model with the scale() function.
*
* Also, the support for colored STL files is not present. STL files with color will be
* rendered without color properties.
*
* @method loadModel
* @param {String} path Path of the model to be loaded
* @param {Boolean} normalize If true, scale the model to a
* standardized size when loading
* @param {function(p5.Geometry)} [successCallback] Function to be called
* once the model is loaded. Will be passed
* the 3D model object.
* @param {function(Event)} [failureCallback] called with event error if
* the model fails to load.
* @param {String} [fileType] The file extension of the model
* (.stl
, .obj
).
* @return {p5.Geometry} the p5.Geometry object
*
* @example
*
*
* //draw a spinning octahedron
* let octahedron;
*
* function preload() {
* octahedron = loadModel('assets/octahedron.obj');
* }
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(200);
* rotateX(frameCount * 0.01);
* rotateY(frameCount * 0.01);
* model(octahedron);
* }
*
*
*
* @alt
* Vertically rotating 3-d octahedron.
*
* @example
*
*
* //draw a spinning teapot
* let teapot;
*
* function preload() {
* // Load model with normalise parameter set to true
* teapot = loadModel('assets/teapot.obj', true);
* }
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(200);
* scale(0.4); // Scaled to make model fit into canvas
* rotateX(frameCount * 0.01);
* rotateY(frameCount * 0.01);
* normalMaterial(); // For effect
* model(teapot);
* }
*
*
*
* @alt
* Vertically rotating 3-d teapot with red, green and blue gradient.
*/
/**
* @method loadModel
* @param {String} path
* @param {function(p5.Geometry)} [successCallback]
* @param {function(Event)} [failureCallback]
* @param {String} [fileType]
* @return {p5.Geometry} the p5.Geometry object
*/
_main.default.prototype.loadModel = function(path) {
cov_1b0evnrslm.f[0]++;
cov_1b0evnrslm.s[1]++;
_main.default._validateParameters('loadModel', arguments);
var normalize;
var successCallback;
var failureCallback;
var fileType = (cov_1b0evnrslm.s[2]++, path.slice(-4));
cov_1b0evnrslm.s[3]++;
if (typeof arguments[1] === 'boolean') {
cov_1b0evnrslm.b[0][0]++;
cov_1b0evnrslm.s[4]++;
normalize = arguments[1];
cov_1b0evnrslm.s[5]++;
successCallback = arguments[2];
cov_1b0evnrslm.s[6]++;
failureCallback = arguments[3];
cov_1b0evnrslm.s[7]++;
if (typeof arguments[4] !== 'undefined') {
cov_1b0evnrslm.b[1][0]++;
cov_1b0evnrslm.s[8]++;
fileType = arguments[4];
} else {
cov_1b0evnrslm.b[1][1]++;
}
} else {
cov_1b0evnrslm.b[0][1]++;
cov_1b0evnrslm.s[9]++;
normalize = false;
cov_1b0evnrslm.s[10]++;
successCallback = arguments[1];
cov_1b0evnrslm.s[11]++;
failureCallback = arguments[2];
cov_1b0evnrslm.s[12]++;
if (typeof arguments[3] !== 'undefined') {
cov_1b0evnrslm.b[2][0]++;
cov_1b0evnrslm.s[13]++;
fileType = arguments[3];
} else {
cov_1b0evnrslm.b[2][1]++;
}
}
var model = (cov_1b0evnrslm.s[14]++, new _main.default.Geometry());
cov_1b0evnrslm.s[15]++;
model.gid = ''.concat(path, '|').concat(normalize);
var self = (cov_1b0evnrslm.s[16]++, this);
cov_1b0evnrslm.s[17]++;
if (fileType.match(/\.stl$/i)) {
cov_1b0evnrslm.b[3][0]++;
cov_1b0evnrslm.s[18]++;
this.httpDo(
path,
'GET',
'arrayBuffer',
function(arrayBuffer) {
cov_1b0evnrslm.f[1]++;
cov_1b0evnrslm.s[19]++;
parseSTL(model, arrayBuffer);
cov_1b0evnrslm.s[20]++;
if (normalize) {
cov_1b0evnrslm.b[4][0]++;
cov_1b0evnrslm.s[21]++;
model.normalize();
} else {
cov_1b0evnrslm.b[4][1]++;
}
cov_1b0evnrslm.s[22]++;
self._decrementPreload();
cov_1b0evnrslm.s[23]++;
if (typeof successCallback === 'function') {
cov_1b0evnrslm.b[5][0]++;
cov_1b0evnrslm.s[24]++;
successCallback(model);
} else {
cov_1b0evnrslm.b[5][1]++;
}
},
failureCallback
);
} else {
cov_1b0evnrslm.b[3][1]++;
cov_1b0evnrslm.s[25]++;
if (fileType.match(/\.obj$/i)) {
cov_1b0evnrslm.b[6][0]++;
cov_1b0evnrslm.s[26]++;
this.loadStrings(
path,
function(strings) {
cov_1b0evnrslm.f[2]++;
cov_1b0evnrslm.s[27]++;
parseObj(model, strings);
cov_1b0evnrslm.s[28]++;
if (normalize) {
cov_1b0evnrslm.b[7][0]++;
cov_1b0evnrslm.s[29]++;
model.normalize();
} else {
cov_1b0evnrslm.b[7][1]++;
}
cov_1b0evnrslm.s[30]++;
self._decrementPreload();
cov_1b0evnrslm.s[31]++;
if (typeof successCallback === 'function') {
cov_1b0evnrslm.b[8][0]++;
cov_1b0evnrslm.s[32]++;
successCallback(model);
} else {
cov_1b0evnrslm.b[8][1]++;
}
},
failureCallback
);
} else {
cov_1b0evnrslm.b[6][1]++;
cov_1b0evnrslm.s[33]++;
_main.default._friendlyFileLoadError(3, path);
cov_1b0evnrslm.s[34]++;
if (failureCallback) {
cov_1b0evnrslm.b[9][0]++;
cov_1b0evnrslm.s[35]++;
failureCallback();
} else {
cov_1b0evnrslm.b[9][1]++;
cov_1b0evnrslm.s[36]++;
console.error(
'Sorry, the file type is invalid. Only OBJ and STL files are supported.'
);
}
}
}
cov_1b0evnrslm.s[37]++;
return model;
};
/**
* Parse OBJ lines into model. For reference, this is what a simple model of a
* square might look like:
*
* v -0.5 -0.5 0.5
* v -0.5 -0.5 -0.5
* v -0.5 0.5 -0.5
* v -0.5 0.5 0.5
*
* f 4 3 2 1
*/
function parseObj(model, lines) {
cov_1b0evnrslm.f[3]++;
// OBJ allows a face to specify an index for a vertex (in the above example),
// but it also allows you to specify a custom combination of vertex, UV
// coordinate, and vertex normal. So, "3/4/3" would mean, "use vertex 3 with
// UV coordinate 4 and vertex normal 3". In WebGL, every vertex with different
// parameters must be a different vertex, so loadedVerts is used to
// temporarily store the parsed vertices, normals, etc., and indexedVerts is
// used to map a specific combination (keyed on, for example, the string
// "3/4/3"), to the actual index of the newly created vertex in the final
// object.
var loadedVerts = (cov_1b0evnrslm.s[38]++,
{
v: [],
vt: [],
vn: []
});
var indexedVerts = (cov_1b0evnrslm.s[39]++, {});
cov_1b0evnrslm.s[40]++;
for (var line = (cov_1b0evnrslm.s[41]++, 0); line < lines.length; ++line) {
// Each line is a separate object (vertex, face, vertex normal, etc)
// For each line, split it into tokens on whitespace. The first token
// describes the type.
var tokens = (cov_1b0evnrslm.s[42]++, lines[line].trim().split(/\b\s+/));
cov_1b0evnrslm.s[43]++;
if (tokens.length > 0) {
cov_1b0evnrslm.b[10][0]++;
cov_1b0evnrslm.s[44]++;
if (
(cov_1b0evnrslm.b[12][0]++, tokens[0] === 'v') ||
(cov_1b0evnrslm.b[12][1]++, tokens[0] === 'vn')
) {
cov_1b0evnrslm.b[11][0]++;
// Check if this line describes a vertex or vertex normal.
// It will have three numeric parameters.
var vertex = (cov_1b0evnrslm.s[45]++,
new _main.default.Vector(
parseFloat(tokens[1]),
parseFloat(tokens[2]),
parseFloat(tokens[3])
));
cov_1b0evnrslm.s[46]++;
loadedVerts[tokens[0]].push(vertex);
} else {
cov_1b0evnrslm.b[11][1]++;
cov_1b0evnrslm.s[47]++;
if (tokens[0] === 'vt') {
cov_1b0evnrslm.b[13][0]++;
// Check if this line describes a texture coordinate.
// It will have two numeric parameters.
var texVertex = (cov_1b0evnrslm.s[48]++,
[parseFloat(tokens[1]), parseFloat(tokens[2])]);
cov_1b0evnrslm.s[49]++;
loadedVerts[tokens[0]].push(texVertex);
} else {
cov_1b0evnrslm.b[13][1]++;
cov_1b0evnrslm.s[50]++;
if (tokens[0] === 'f') {
cov_1b0evnrslm.b[14][0]++;
cov_1b0evnrslm.s[51]++;
// Check if this line describes a face.
// OBJ faces can have more than three points. Triangulate points.
for (
var tri = (cov_1b0evnrslm.s[52]++, 3);
tri < tokens.length;
++tri
) {
var face = (cov_1b0evnrslm.s[53]++, []);
var vertexTokens = (cov_1b0evnrslm.s[54]++, [1, tri - 1, tri]);
cov_1b0evnrslm.s[55]++;
for (
var tokenInd = (cov_1b0evnrslm.s[56]++, 0);
tokenInd < vertexTokens.length;
++tokenInd
) {
// Now, convert the given token into an index
var vertString = (cov_1b0evnrslm.s[57]++,
tokens[vertexTokens[tokenInd]]);
var vertIndex = (cov_1b0evnrslm.s[58]++, 0);
// TODO: Faces can technically use negative numbers to refer to the
// previous nth vertex. I haven't seen this used in practice, but
// it might be good to implement this in the future.
cov_1b0evnrslm.s[59]++;
if (indexedVerts[vertString] !== undefined) {
cov_1b0evnrslm.b[15][0]++;
cov_1b0evnrslm.s[60]++;
vertIndex = indexedVerts[vertString];
} else {
cov_1b0evnrslm.b[15][1]++;
var vertParts = (cov_1b0evnrslm.s[61]++, vertString.split('/'));
cov_1b0evnrslm.s[62]++;
for (
var i = (cov_1b0evnrslm.s[63]++, 0);
i < vertParts.length;
i++
) {
cov_1b0evnrslm.s[64]++;
vertParts[i] = parseInt(vertParts[i]) - 1;
}
cov_1b0evnrslm.s[65]++;
vertIndex = indexedVerts[vertString] = model.vertices.length;
cov_1b0evnrslm.s[66]++;
model.vertices.push(loadedVerts.v[vertParts[0]].copy());
cov_1b0evnrslm.s[67]++;
if (loadedVerts.vt[vertParts[1]]) {
cov_1b0evnrslm.b[16][0]++;
cov_1b0evnrslm.s[68]++;
model.uvs.push(loadedVerts.vt[vertParts[1]].slice());
} else {
cov_1b0evnrslm.b[16][1]++;
cov_1b0evnrslm.s[69]++;
model.uvs.push([0, 0]);
}
cov_1b0evnrslm.s[70]++;
if (loadedVerts.vn[vertParts[2]]) {
cov_1b0evnrslm.b[17][0]++;
cov_1b0evnrslm.s[71]++;
model.vertexNormals.push(loadedVerts.vn[vertParts[2]].copy());
} else {
cov_1b0evnrslm.b[17][1]++;
}
}
cov_1b0evnrslm.s[72]++;
face.push(vertIndex);
}
cov_1b0evnrslm.s[73]++;
if (
(cov_1b0evnrslm.b[19][0]++, face[0] !== face[1]) &&
(cov_1b0evnrslm.b[19][1]++, face[0] !== face[2]) &&
(cov_1b0evnrslm.b[19][2]++, face[1] !== face[2])
) {
cov_1b0evnrslm.b[18][0]++;
cov_1b0evnrslm.s[74]++;
model.faces.push(face);
} else {
cov_1b0evnrslm.b[18][1]++;
}
}
} else {
cov_1b0evnrslm.b[14][1]++;
}
}
}
} else {
cov_1b0evnrslm.b[10][1]++;
}
}
// If the model doesn't have normals, compute the normals
cov_1b0evnrslm.s[75]++;
if (model.vertexNormals.length === 0) {
cov_1b0evnrslm.b[20][0]++;
cov_1b0evnrslm.s[76]++;
model.computeNormals();
} else {
cov_1b0evnrslm.b[20][1]++;
}
cov_1b0evnrslm.s[77]++;
return model;
}
/**
* STL files can be of two types, ASCII and Binary,
*
* We need to convert the arrayBuffer to an array of strings,
* to parse it as an ASCII file.
*/
function parseSTL(model, buffer) {
cov_1b0evnrslm.f[4]++;
cov_1b0evnrslm.s[78]++;
if (isBinary(buffer)) {
cov_1b0evnrslm.b[21][0]++;
cov_1b0evnrslm.s[79]++;
parseBinarySTL(model, buffer);
} else {
cov_1b0evnrslm.b[21][1]++;
var reader = (cov_1b0evnrslm.s[80]++, new DataView(buffer));
cov_1b0evnrslm.s[81]++;
if (!('TextDecoder' in window)) {
cov_1b0evnrslm.b[22][0]++;
cov_1b0evnrslm.s[82]++;
console.warn(
'Sorry, ASCII STL loading only works in browsers that support TextDecoder (https://caniuse.com/#feat=textencoder)'
);
cov_1b0evnrslm.s[83]++;
return model;
} else {
cov_1b0evnrslm.b[22][1]++;
}
var decoder = (cov_1b0evnrslm.s[84]++, new TextDecoder('utf-8'));
var lines = (cov_1b0evnrslm.s[85]++, decoder.decode(reader));
var lineArray = (cov_1b0evnrslm.s[86]++, lines.split('\n'));
cov_1b0evnrslm.s[87]++;
parseASCIISTL(model, lineArray);
}
cov_1b0evnrslm.s[88]++;
return model;
}
/**
* This function checks if the file is in ASCII format or in Binary format
*
* It is done by searching keyword `solid` at the start of the file.
*
* An ASCII STL data must begin with `solid` as the first six bytes.
* However, ASCII STLs lacking the SPACE after the `d` are known to be
* plentiful. So, check the first 5 bytes for `solid`.
*
* Several encodings, such as UTF-8, precede the text with up to 5 bytes:
* https://en.wikipedia.org/wiki/Byte_order_mark#Byte_order_marks_by_encoding
* Search for `solid` to start anywhere after those prefixes.
*/
function isBinary(data) {
cov_1b0evnrslm.f[5]++;
var reader = (cov_1b0evnrslm.s[89]++, new DataView(data));
// US-ASCII ordinal values for `s`, `o`, `l`, `i`, `d`
var solid = (cov_1b0evnrslm.s[90]++, [115, 111, 108, 105, 100]);
cov_1b0evnrslm.s[91]++;
for (var off = (cov_1b0evnrslm.s[92]++, 0); off < 5; off++) {
cov_1b0evnrslm.s[93]++;
// If "solid" text is matched to the current offset, declare it to be an ASCII STL.
if (matchDataViewAt(solid, reader, off)) {
cov_1b0evnrslm.b[23][0]++;
cov_1b0evnrslm.s[94]++;
return false;
} else {
cov_1b0evnrslm.b[23][1]++;
}
}
// Couldn't find "solid" text at the beginning; it is binary STL.
cov_1b0evnrslm.s[95]++;
return true;
}
/**
* This function matches the `query` at the provided `offset`
*/
function matchDataViewAt(query, reader, offset) {
cov_1b0evnrslm.f[6]++;
cov_1b0evnrslm.s[96]++;
// Check if each byte in query matches the corresponding byte from the current offset
for (
var i = (cov_1b0evnrslm.s[97]++, 0),
il = (cov_1b0evnrslm.s[98]++, query.length);
i < il;
i++
) {
cov_1b0evnrslm.s[99]++;
if (query[i] !== reader.getUint8(offset + i, false)) {
cov_1b0evnrslm.b[24][0]++;
cov_1b0evnrslm.s[100]++;
return false;
} else {
cov_1b0evnrslm.b[24][1]++;
}
}
cov_1b0evnrslm.s[101]++;
return true;
}
/**
* This function parses the Binary STL files.
* https://en.wikipedia.org/wiki/STL_%28file_format%29#Binary_STL
*
* Currently there is no support for the colors provided in STL files.
*/
function parseBinarySTL(model, buffer) {
cov_1b0evnrslm.f[7]++;
var reader = (cov_1b0evnrslm.s[102]++, new DataView(buffer));
// Number of faces is present following the header
var faces = (cov_1b0evnrslm.s[103]++, reader.getUint32(80, true));
var r,
g,
b,
hasColors = (cov_1b0evnrslm.s[104]++, false),
colors;
var defaultR, defaultG, defaultB;
// Binary files contain 80-byte header, which is generally ignored.
cov_1b0evnrslm.s[105]++;
for (var index = (cov_1b0evnrslm.s[106]++, 0); index < 80 - 10; index++) {
cov_1b0evnrslm.s[107]++;
// Check for `COLOR=`
if (
(cov_1b0evnrslm.b[26][0]++,
reader.getUint32(index, false) === 0x434f4c4f /*COLO*/) &&
(cov_1b0evnrslm.b[26][1]++, reader.getUint8(index + 4) === 0x52) /*'R'*/ &&
(cov_1b0evnrslm.b[26][2]++, reader.getUint8(index + 5) === 0x3d) /*'='*/
) {
cov_1b0evnrslm.b[25][0]++;
cov_1b0evnrslm.s[108]++;
hasColors = true;
cov_1b0evnrslm.s[109]++;
colors = [];
cov_1b0evnrslm.s[110]++;
defaultR = reader.getUint8(index + 6) / 255;
cov_1b0evnrslm.s[111]++;
defaultG = reader.getUint8(index + 7) / 255;
cov_1b0evnrslm.s[112]++;
defaultB = reader.getUint8(index + 8) / 255;
// To be used when color support is added
// alpha = reader.getUint8(index + 9) / 255;
} else {
cov_1b0evnrslm.b[25][1]++;
}
}
var dataOffset = (cov_1b0evnrslm.s[113]++, 84);
var faceLength = (cov_1b0evnrslm.s[114]++, 12 * 4 + 2);
// Iterate the faces
cov_1b0evnrslm.s[115]++;
for (var face = (cov_1b0evnrslm.s[116]++, 0); face < faces; face++) {
var start = (cov_1b0evnrslm.s[117]++, dataOffset + face * faceLength);
var normalX = (cov_1b0evnrslm.s[118]++, reader.getFloat32(start, true));
var normalY = (cov_1b0evnrslm.s[119]++, reader.getFloat32(start + 4, true));
var normalZ = (cov_1b0evnrslm.s[120]++, reader.getFloat32(start + 8, true));
cov_1b0evnrslm.s[121]++;
if (hasColors) {
cov_1b0evnrslm.b[27][0]++;
var packedColor = (cov_1b0evnrslm.s[122]++,
reader.getUint16(start + 48, true));
cov_1b0evnrslm.s[123]++;
if ((packedColor & 0x8000) === 0) {
cov_1b0evnrslm.b[28][0]++;
cov_1b0evnrslm.s[124]++;
// facet has its own unique color
r = (packedColor & 0x1f) / 31;
cov_1b0evnrslm.s[125]++;
g = ((packedColor >> 5) & 0x1f) / 31;
cov_1b0evnrslm.s[126]++;
b = ((packedColor >> 10) & 0x1f) / 31;
} else {
cov_1b0evnrslm.b[28][1]++;
cov_1b0evnrslm.s[127]++;
r = defaultR;
cov_1b0evnrslm.s[128]++;
g = defaultG;
cov_1b0evnrslm.s[129]++;
b = defaultB;
}
} else {
cov_1b0evnrslm.b[27][1]++;
}
var newNormal = (cov_1b0evnrslm.s[130]++,
new _main.default.Vector(normalX, normalY, normalZ));
cov_1b0evnrslm.s[131]++;
for (var i = (cov_1b0evnrslm.s[132]++, 1); i <= 3; i++) {
var vertexstart = (cov_1b0evnrslm.s[133]++, start + i * 12);
var newVertex = (cov_1b0evnrslm.s[134]++,
new _main.default.Vector(
reader.getFloat32(vertexstart, true),
reader.getFloat32(vertexstart + 4, true),
reader.getFloat32(vertexstart + 8, true)
));
cov_1b0evnrslm.s[135]++;
model.vertices.push(newVertex);
cov_1b0evnrslm.s[136]++;
model.vertexNormals.push(newNormal);
cov_1b0evnrslm.s[137]++;
if (hasColors) {
cov_1b0evnrslm.b[29][0]++;
cov_1b0evnrslm.s[138]++;
colors.push(r, g, b);
} else {
cov_1b0evnrslm.b[29][1]++;
}
}
cov_1b0evnrslm.s[139]++;
model.faces.push([3 * face, 3 * face + 1, 3 * face + 2]);
cov_1b0evnrslm.s[140]++;
model.uvs.push([0, 0], [0, 0], [0, 0]);
}
cov_1b0evnrslm.s[141]++;
if (hasColors) {
// add support for colors here.
cov_1b0evnrslm.b[30][0]++;
} else {
cov_1b0evnrslm.b[30][1]++;
}
cov_1b0evnrslm.s[142]++;
return model;
}
/**
* ASCII STL file starts with `solid 'nameOfFile'`
* Then contain the normal of the face, starting with `facet normal`
* Next contain a keyword indicating the start of face vertex, `outer loop`
* Next comes the three vertex, starting with `vertex x y z`
* Vertices ends with `endloop`
* Face ends with `endfacet`
* Next face starts with `facet normal`
* The end of the file is indicated by `endsolid`
*/
function parseASCIISTL(model, lines) {
cov_1b0evnrslm.f[8]++;
var state = (cov_1b0evnrslm.s[143]++, '');
var curVertexIndex = (cov_1b0evnrslm.s[144]++, []);
var newNormal, newVertex;
cov_1b0evnrslm.s[145]++;
for (
var iterator = (cov_1b0evnrslm.s[146]++, 0);
iterator < lines.length;
++iterator
) {
var line = (cov_1b0evnrslm.s[147]++, lines[iterator].trim());
var parts = (cov_1b0evnrslm.s[148]++, line.split(' '));
cov_1b0evnrslm.s[149]++;
for (
var partsiterator = (cov_1b0evnrslm.s[150]++, 0);
partsiterator < parts.length;
++partsiterator
) {
cov_1b0evnrslm.s[151]++;
if (parts[partsiterator] === '') {
cov_1b0evnrslm.b[31][0]++;
cov_1b0evnrslm.s[152]++;
// Ignoring multiple whitespaces
parts.splice(partsiterator, 1);
} else {
cov_1b0evnrslm.b[31][1]++;
}
}
cov_1b0evnrslm.s[153]++;
if (parts.length === 0) {
cov_1b0evnrslm.b[32][0]++;
cov_1b0evnrslm.s[154]++;
// Remove newline
continue;
} else {
cov_1b0evnrslm.b[32][1]++;
}
cov_1b0evnrslm.s[155]++;
switch (state) {
case '':
cov_1b0evnrslm.b[33][0]++;
cov_1b0evnrslm.s[156]++; // First run
if (parts[0] !== 'solid') {
cov_1b0evnrslm.b[34][0]++;
cov_1b0evnrslm.s[157]++;
// Invalid state
console.error(line);
cov_1b0evnrslm.s[158]++;
console.error(
'Invalid state "'.concat(parts[0], '", should be "solid"')
);
cov_1b0evnrslm.s[159]++;
return;
} else {
cov_1b0evnrslm.b[34][1]++;
cov_1b0evnrslm.s[160]++;
state = 'solid';
}
cov_1b0evnrslm.s[161]++;
break;
case 'solid':
cov_1b0evnrslm.b[33][1]++;
cov_1b0evnrslm.s[162]++; // First face
if (
(cov_1b0evnrslm.b[36][0]++, parts[0] !== 'facet') ||
(cov_1b0evnrslm.b[36][1]++, parts[1] !== 'normal')
) {
cov_1b0evnrslm.b[35][0]++;
cov_1b0evnrslm.s[163]++;
// Invalid state
console.error(line);
cov_1b0evnrslm.s[164]++;
console.error(
'Invalid state "'.concat(parts[0], '", should be "facet normal"')
);
cov_1b0evnrslm.s[165]++;
return;
} else {
cov_1b0evnrslm.b[35][1]++;
cov_1b0evnrslm.s[166]++;
// Push normal for first face
newNormal = new _main.default.Vector(
parseFloat(parts[2]),
parseFloat(parts[3]),
parseFloat(parts[4])
);
cov_1b0evnrslm.s[167]++;
model.vertexNormals.push(newNormal, newNormal, newNormal);
cov_1b0evnrslm.s[168]++;
state = 'facet normal';
}
cov_1b0evnrslm.s[169]++;
break;
case 'facet normal':
cov_1b0evnrslm.b[33][2]++;
cov_1b0evnrslm.s[170]++; // After normal is defined
if (
(cov_1b0evnrslm.b[38][0]++, parts[0] !== 'outer') ||
(cov_1b0evnrslm.b[38][1]++, parts[1] !== 'loop')
) {
cov_1b0evnrslm.b[37][0]++;
cov_1b0evnrslm.s[171]++;
// Invalid State
console.error(line);
cov_1b0evnrslm.s[172]++;
console.error(
'Invalid state "'.concat(parts[0], '", should be "outer loop"')
);
cov_1b0evnrslm.s[173]++;
return;
} else {
cov_1b0evnrslm.b[37][1]++;
cov_1b0evnrslm.s[174]++;
// Next should be vertices
state = 'vertex';
}
cov_1b0evnrslm.s[175]++;
break;
case 'vertex':
cov_1b0evnrslm.b[33][3]++;
cov_1b0evnrslm.s[176]++;
if (parts[0] === 'vertex') {
cov_1b0evnrslm.b[39][0]++;
cov_1b0evnrslm.s[177]++;
//Vertex of triangle
newVertex = new _main.default.Vector(
parseFloat(parts[1]),
parseFloat(parts[2]),
parseFloat(parts[3])
);
cov_1b0evnrslm.s[178]++;
model.vertices.push(newVertex);
cov_1b0evnrslm.s[179]++;
model.uvs.push([0, 0]);
cov_1b0evnrslm.s[180]++;
curVertexIndex.push(model.vertices.indexOf(newVertex));
} else {
cov_1b0evnrslm.b[39][1]++;
cov_1b0evnrslm.s[181]++;
if (parts[0] === 'endloop') {
cov_1b0evnrslm.b[40][0]++;
cov_1b0evnrslm.s[182]++;
// End of vertices
model.faces.push(curVertexIndex);
cov_1b0evnrslm.s[183]++;
curVertexIndex = [];
cov_1b0evnrslm.s[184]++;
state = 'endloop';
} else {
cov_1b0evnrslm.b[40][1]++;
cov_1b0evnrslm.s[185]++;
// Invalid State
console.error(line);
cov_1b0evnrslm.s[186]++;
console.error(
'Invalid state "'.concat(
parts[0],
'", should be "vertex" or "endloop"'
)
);
cov_1b0evnrslm.s[187]++;
return;
}
}
cov_1b0evnrslm.s[188]++;
break;
case 'endloop':
cov_1b0evnrslm.b[33][4]++;
cov_1b0evnrslm.s[189]++;
if (parts[0] !== 'endfacet') {
cov_1b0evnrslm.b[41][0]++;
cov_1b0evnrslm.s[190]++;
// End of face
console.error(line);
cov_1b0evnrslm.s[191]++;
console.error(
'Invalid state "'.concat(parts[0], '", should be "endfacet"')
);
cov_1b0evnrslm.s[192]++;
return;
} else {
cov_1b0evnrslm.b[41][1]++;
cov_1b0evnrslm.s[193]++;
state = 'endfacet';
}
cov_1b0evnrslm.s[194]++;
break;
case 'endfacet':
cov_1b0evnrslm.b[33][5]++;
cov_1b0evnrslm.s[195]++;
if (parts[0] === 'endsolid') {
// End of solid
cov_1b0evnrslm.b[42][0]++;
} else {
cov_1b0evnrslm.b[42][1]++;
cov_1b0evnrslm.s[196]++;
if (
(cov_1b0evnrslm.b[44][0]++, parts[0] === 'facet') &&
(cov_1b0evnrslm.b[44][1]++, parts[1] === 'normal')
) {
cov_1b0evnrslm.b[43][0]++;
cov_1b0evnrslm.s[197]++;
// Next face
newNormal = new _main.default.Vector(
parseFloat(parts[2]),
parseFloat(parts[3]),
parseFloat(parts[4])
);
cov_1b0evnrslm.s[198]++;
model.vertexNormals.push(newNormal, newNormal, newNormal);
cov_1b0evnrslm.s[199]++;
state = 'facet normal';
} else {
cov_1b0evnrslm.b[43][1]++;
cov_1b0evnrslm.s[200]++;
// Invalid State
console.error(line);
cov_1b0evnrslm.s[201]++;
console.error(
'Invalid state "'.concat(
parts[0],
'", should be "endsolid" or "facet normal"'
)
);
cov_1b0evnrslm.s[202]++;
return;
}
}
cov_1b0evnrslm.s[203]++;
break;
default:
cov_1b0evnrslm.b[33][6]++;
cov_1b0evnrslm.s[204]++;
console.error('Invalid state "'.concat(state, '"'));
cov_1b0evnrslm.s[205]++;
break;
}
}
cov_1b0evnrslm.s[206]++;
return model;
}
/**
* Render a 3d model to the screen.
*
* @method model
* @param {p5.Geometry} model Loaded 3d model to be rendered
* @example
*
*
* //draw a spinning octahedron
* let octahedron;
*
* function preload() {
* octahedron = loadModel('assets/octahedron.obj');
* }
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(200);
* rotateX(frameCount * 0.01);
* rotateY(frameCount * 0.01);
* model(octahedron);
* }
*
*
*
* @alt
* Vertically rotating 3-d octahedron.
*/ cov_1b0evnrslm.s[207]++;
_main.default.prototype.model = function(model) {
cov_1b0evnrslm.f[9]++;
cov_1b0evnrslm.s[208]++;
this._assert3d('model');
cov_1b0evnrslm.s[209]++;
_main.default._validateParameters('model', arguments);
cov_1b0evnrslm.s[210]++;
if (model.vertices.length > 0) {
cov_1b0evnrslm.b[45][0]++;
cov_1b0evnrslm.s[211]++;
if (!this._renderer.geometryInHash(model.gid)) {
cov_1b0evnrslm.b[46][0]++;
cov_1b0evnrslm.s[212]++;
model._makeTriangleEdges()._edgesToVertices();
cov_1b0evnrslm.s[213]++;
this._renderer.createBuffers(model.gid, model);
} else {
cov_1b0evnrslm.b[46][1]++;
}
cov_1b0evnrslm.s[214]++;
this._renderer.drawBuffers(model.gid);
} else {
cov_1b0evnrslm.b[45][1]++;
}
};
var _default = _main.default;
exports.default = _default;
},
{ '../core/main': 54, './p5.Geometry': 103 }
],
101: [
function(_dereq_, module, exports) {
'use strict';
function _typeof(obj) {
if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj &&
typeof Symbol === 'function' &&
obj.constructor === Symbol &&
obj !== Symbol.prototype
? 'symbol'
: typeof obj;
};
}
return _typeof(obj);
}
var cov_mon2nx39l = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/webgl/material.js';
var hash = '1369e6082eda34486ddb6ba7f8b81d060b60eaa6';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/material.js',
statementMap: {
'0': { start: { line: 60, column: 0 }, end: { line: 109, column: 2 } },
'1': { start: { line: 66, column: 2 }, end: { line: 66, column: 50 } },
'2': { start: { line: 67, column: 2 }, end: { line: 69, column: 3 } },
'3': { start: { line: 68, column: 4 }, end: { line: 68, column: 34 } },
'4': { start: { line: 71, column: 23 }, end: { line: 71, column: 38 } },
'5': { start: { line: 73, column: 15 }, end: { line: 73, column: 19 } },
'6': { start: { line: 74, column: 19 }, end: { line: 74, column: 24 } },
'7': { start: { line: 75, column: 19 }, end: { line: 75, column: 24 } },
'8': { start: { line: 77, column: 17 }, end: { line: 82, column: 3 } },
'9': { start: { line: 78, column: 4 }, end: { line: 78, column: 29 } },
'10': { start: { line: 79, column: 4 }, end: { line: 81, column: 5 } },
'11': { start: { line: 80, column: 6 }, end: { line: 80, column: 29 } },
'12': { start: { line: 84, column: 2 }, end: { line: 94, column: 4 } },
'13': { start: { line: 87, column: 6 }, end: { line: 87, column: 48 } },
'14': { start: { line: 88, column: 6 }, end: { line: 88, column: 24 } },
'15': { start: { line: 89, column: 6 }, end: { line: 91, column: 7 } },
'16': { start: { line: 90, column: 8 }, end: { line: 90, column: 17 } },
'17': { start: { line: 96, column: 2 }, end: { line: 106, column: 4 } },
'18': { start: { line: 99, column: 6 }, end: { line: 99, column: 48 } },
'19': { start: { line: 100, column: 6 }, end: { line: 100, column: 24 } },
'20': { start: { line: 101, column: 6 }, end: { line: 103, column: 7 } },
'21': { start: { line: 102, column: 8 }, end: { line: 102, column: 17 } },
'22': { start: { line: 108, column: 2 }, end: { line: 108, column: 22 } },
'23': { start: { line: 173, column: 0 }, end: { line: 177, column: 2 } },
'24': { start: { line: 174, column: 2 }, end: { line: 174, column: 33 } },
'25': { start: { line: 175, column: 2 }, end: { line: 175, column: 52 } },
'26': { start: { line: 176, column: 2 }, end: { line: 176, column: 57 } },
'27': { start: { line: 250, column: 0 }, end: { line: 268, column: 2 } },
'28': { start: { line: 251, column: 2 }, end: { line: 251, column: 27 } },
'29': { start: { line: 252, column: 2 }, end: { line: 252, column: 46 } },
'30': { start: { line: 254, column: 2 }, end: { line: 256, column: 3 } },
'31': { start: { line: 255, column: 4 }, end: { line: 255, column: 33 } },
'32': { start: { line: 258, column: 2 }, end: { line: 263, column: 3 } },
'33': { start: { line: 259, column: 4 }, end: { line: 259, column: 40 } },
'34': { start: { line: 261, column: 4 }, end: { line: 261, column: 38 } },
'35': { start: { line: 262, column: 4 }, end: { line: 262, column: 46 } },
'36': { start: { line: 265, column: 2 }, end: { line: 265, column: 11 } },
'37': { start: { line: 267, column: 2 }, end: { line: 267, column: 14 } },
'38': { start: { line: 278, column: 0 }, end: { line: 281, column: 2 } },
'39': { start: { line: 279, column: 2 }, end: { line: 279, column: 73 } },
'40': { start: { line: 280, column: 2 }, end: { line: 280, column: 14 } },
'41': { start: { line: 308, column: 0 }, end: { line: 319, column: 2 } },
'42': { start: { line: 309, column: 2 }, end: { line: 309, column: 35 } },
'43': { start: { line: 310, column: 2 }, end: { line: 310, column: 49 } },
'44': { start: { line: 311, column: 2 }, end: { line: 311, column: 43 } },
'45': { start: { line: 312, column: 2 }, end: { line: 312, column: 46 } },
'46': { start: { line: 313, column: 2 }, end: { line: 313, column: 46 } },
'47': { start: { line: 314, column: 2 }, end: { line: 314, column: 43 } },
'48': { start: { line: 315, column: 2 }, end: { line: 315, column: 45 } },
'49': { start: { line: 316, column: 2 }, end: { line: 316, column: 47 } },
'50': { start: { line: 317, column: 2 }, end: { line: 317, column: 18 } },
'51': { start: { line: 318, column: 2 }, end: { line: 318, column: 14 } },
'52': { start: { line: 404, column: 0 }, end: { line: 419, column: 2 } },
'53': { start: { line: 405, column: 2 }, end: { line: 405, column: 28 } },
'54': { start: { line: 406, column: 2 }, end: { line: 406, column: 47 } },
'55': { start: { line: 407, column: 2 }, end: { line: 409, column: 3 } },
'56': { start: { line: 408, column: 4 }, end: { line: 408, column: 26 } },
'57': { start: { line: 411, column: 2 }, end: { line: 411, column: 46 } },
'58': { start: { line: 412, column: 2 }, end: { line: 412, column: 46 } },
'59': { start: { line: 413, column: 2 }, end: { line: 413, column: 46 } },
'60': { start: { line: 414, column: 2 }, end: { line: 414, column: 44 } },
'61': { start: { line: 415, column: 2 }, end: { line: 415, column: 28 } },
'62': { start: { line: 416, column: 2 }, end: { line: 416, column: 47 } },
'63': { start: { line: 418, column: 2 }, end: { line: 418, column: 14 } },
'64': { start: { line: 489, column: 0 }, end: { line: 497, column: 2 } },
'65': { start: { line: 490, column: 2 }, end: { line: 496, column: 3 } },
'66': { start: { line: 491, column: 4 }, end: { line: 493, column: 6 } },
'67': { start: { line: 495, column: 4 }, end: { line: 495, column: 38 } },
'68': { start: { line: 561, column: 0 }, end: { line: 569, column: 2 } },
'69': { start: { line: 562, column: 2 }, end: { line: 562, column: 38 } },
'70': { start: { line: 563, column: 2 }, end: { line: 563, column: 38 } },
'71': { start: { line: 565, column: 19 }, end: { line: 565, column: 42 } },
'72': { start: { line: 566, column: 2 }, end: { line: 568, column: 3 } },
'73': { start: { line: 566, column: 15 }, end: { line: 566, column: 16 } },
'74': { start: { line: 567, column: 4 }, end: { line: 567, column: 42 } },
'75': { start: { line: 636, column: 0 }, end: { line: 649, column: 2 } },
'76': { start: { line: 637, column: 2 }, end: { line: 637, column: 36 } },
'77': { start: { line: 638, column: 2 }, end: { line: 638, column: 55 } },
'78': { start: { line: 640, column: 16 }, end: { line: 640, column: 57 } },
'79': { start: { line: 641, column: 2 }, end: { line: 641, column: 45 } },
'80': { start: { line: 642, column: 2 }, end: { line: 642, column: 46 } },
'81': { start: { line: 643, column: 2 }, end: { line: 643, column: 46 } },
'82': { start: { line: 644, column: 2 }, end: { line: 644, column: 44 } },
'83': { start: { line: 645, column: 2 }, end: { line: 645, column: 40 } },
'84': { start: { line: 646, column: 2 }, end: { line: 646, column: 29 } },
'85': { start: { line: 648, column: 2 }, end: { line: 648, column: 14 } },
'86': { start: { line: 688, column: 0 }, end: { line: 701, column: 2 } },
'87': { start: { line: 689, column: 2 }, end: { line: 689, column: 37 } },
'88': { start: { line: 690, column: 2 }, end: { line: 690, column: 56 } },
'89': { start: { line: 692, column: 16 }, end: { line: 692, column: 57 } },
'90': { start: { line: 693, column: 2 }, end: { line: 693, column: 45 } },
'91': { start: { line: 694, column: 2 }, end: { line: 694, column: 46 } },
'92': { start: { line: 695, column: 2 }, end: { line: 695, column: 45 } },
'93': { start: { line: 696, column: 2 }, end: { line: 696, column: 44 } },
'94': { start: { line: 697, column: 2 }, end: { line: 697, column: 40 } },
'95': { start: { line: 698, column: 2 }, end: { line: 698, column: 29 } },
'96': { start: { line: 700, column: 2 }, end: { line: 700, column: 14 } },
'97': { start: { line: 752, column: 0 }, end: { line: 765, column: 2 } },
'98': { start: { line: 753, column: 2 }, end: { line: 753, column: 37 } },
'99': { start: { line: 754, column: 2 }, end: { line: 754, column: 56 } },
'100': { start: { line: 756, column: 16 }, end: { line: 756, column: 57 } },
'101': { start: { line: 757, column: 2 }, end: { line: 757, column: 45 } },
'102': { start: { line: 758, column: 2 }, end: { line: 758, column: 45 } },
'103': { start: { line: 759, column: 2 }, end: { line: 759, column: 46 } },
'104': { start: { line: 760, column: 2 }, end: { line: 760, column: 44 } },
'105': { start: { line: 761, column: 2 }, end: { line: 761, column: 40 } },
'106': { start: { line: 762, column: 2 }, end: { line: 762, column: 29 } },
'107': { start: { line: 764, column: 2 }, end: { line: 764, column: 14 } },
'108': { start: { line: 801, column: 0 }, end: { line: 810, column: 2 } },
'109': { start: { line: 802, column: 2 }, end: { line: 802, column: 30 } },
'110': { start: { line: 803, column: 2 }, end: { line: 803, column: 49 } },
'111': { start: { line: 805, column: 2 }, end: { line: 807, column: 3 } },
'112': { start: { line: 806, column: 4 }, end: { line: 806, column: 14 } },
'113': { start: { line: 808, column: 2 }, end: { line: 808, column: 39 } },
'114': { start: { line: 809, column: 2 }, end: { line: 809, column: 14 } },
'115': { start: { line: 819, column: 0 }, end: { line: 841, column: 2 } },
'116': { start: { line: 820, column: 13 }, end: { line: 820, column: 20 } },
'117': { start: { line: 822, column: 20 }, end: { line: 822, column: 55 } },
'118': { start: { line: 824, column: 4 }, end: { line: 824, column: 67 } },
'119': { start: { line: 826, column: 2 }, end: { line: 838, column: 3 } },
'120': { start: { line: 827, column: 4 }, end: { line: 835, column: 5 } },
'121': { start: { line: 832, column: 6 }, end: { line: 832, column: 26 } },
'122': { start: { line: 834, column: 6 }, end: { line: 834, column: 27 } },
'123': { start: { line: 836, column: 4 }, end: { line: 836, column: 23 } },
'124': { start: { line: 837, column: 4 }, end: { line: 837, column: 31 } },
'125': { start: { line: 839, column: 2 }, end: { line: 839, column: 25 } },
'126': { start: { line: 840, column: 2 }, end: { line: 840, column: 16 } },
'127': { start: { line: 848, column: 0 }, end: { line: 917, column: 2 } },
'128': { start: { line: 849, column: 2 }, end: { line: 851, column: 3 } },
'129': { start: { line: 850, column: 4 }, end: { line: 850, column: 11 } },
'130': { start: { line: 852, column: 13 }, end: { line: 852, column: 20 } },
'131': { start: { line: 853, column: 2 }, end: { line: 913, column: 3 } },
'132': { start: { line: 856, column: 6 }, end: { line: 856, column: 36 } },
'133': { start: { line: 857, column: 6 }, end: { line: 857, column: 57 } },
'134': { start: { line: 858, column: 6 }, end: { line: 858, column: 12 } },
'135': { start: { line: 860, column: 6 }, end: { line: 860, column: 49 } },
'136': { start: { line: 861, column: 6 }, end: { line: 861, column: 47 } },
'137': { start: { line: 862, column: 6 }, end: { line: 862, column: 12 } },
'138': { start: { line: 864, column: 6 }, end: { line: 864, column: 57 } },
'139': { start: { line: 865, column: 6 }, end: { line: 865, column: 66 } },
'140': { start: { line: 866, column: 6 }, end: { line: 866, column: 12 } },
'141': { start: { line: 868, column: 6 }, end: { line: 868, column: 57 } },
'142': { start: { line: 869, column: 6 }, end: { line: 869, column: 75 } },
'143': { start: { line: 870, column: 6 }, end: { line: 870, column: 12 } },
'144': { start: { line: 872, column: 6 }, end: { line: 872, column: 57 } },
'145': { start: { line: 873, column: 6 }, end: { line: 878, column: 8 } },
'146': { start: { line: 879, column: 6 }, end: { line: 879, column: 12 } },
'147': { start: { line: 881, column: 6 }, end: { line: 881, column: 36 } },
'148': { start: { line: 882, column: 6 }, end: { line: 882, column: 36 } },
'149': { start: { line: 883, column: 6 }, end: { line: 883, column: 12 } },
'150': { start: { line: 885, column: 6 }, end: { line: 885, column: 70 } },
'151': { start: { line: 886, column: 6 }, end: { line: 886, column: 65 } },
'152': { start: { line: 887, column: 6 }, end: { line: 887, column: 12 } },
'153': { start: { line: 889, column: 6 }, end: { line: 896, column: 7 } },
'154': { start: { line: 890, column: 8 }, end: { line: 890, column: 69 } },
'155': { start: { line: 891, column: 8 }, end: { line: 891, column: 61 } },
'156': { start: { line: 893, column: 8 }, end: { line: 895, column: 10 } },
'157': { start: { line: 897, column: 6 }, end: { line: 897, column: 12 } },
'158': { start: { line: 899, column: 6 }, end: { line: 906, column: 7 } },
'159': { start: { line: 900, column: 8 }, end: { line: 900, column: 69 } },
'160': { start: { line: 901, column: 8 }, end: { line: 901, column: 61 } },
'161': { start: { line: 903, column: 8 }, end: { line: 905, column: 10 } },
'162': { start: { line: 907, column: 6 }, end: { line: 907, column: 12 } },
'163': { start: { line: 909, column: 6 }, end: { line: 911, column: 8 } },
'164': { start: { line: 912, column: 6 }, end: { line: 912, column: 12 } },
'165': { start: { line: 914, column: 2 }, end: { line: 916, column: 3 } },
'166': { start: { line: 915, column: 4 }, end: { line: 915, column: 46 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 60, column: 26 }, end: { line: 60, column: 27 } },
loc: { start: { line: 65, column: 2 }, end: { line: 109, column: 1 } },
line: 65
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 77, column: 17 }, end: { line: 77, column: 18 } },
loc: { start: { line: 77, column: 23 }, end: { line: 82, column: 3 } },
line: 77
},
'2': {
name: '(anonymous_2)',
decl: { start: { line: 86, column: 4 }, end: { line: 86, column: 5 } },
loc: { start: { line: 86, column: 14 }, end: { line: 92, column: 5 } },
line: 86
},
'3': {
name: '(anonymous_3)',
decl: { start: { line: 98, column: 4 }, end: { line: 98, column: 5 } },
loc: { start: { line: 98, column: 14 }, end: { line: 104, column: 5 } },
line: 98
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 173, column: 28 },
end: { line: 173, column: 29 }
},
loc: { start: { line: 173, column: 55 }, end: { line: 177, column: 1 } },
line: 173
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 250, column: 22 },
end: { line: 250, column: 23 }
},
loc: { start: { line: 250, column: 34 }, end: { line: 268, column: 1 } },
line: 250
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 278, column: 27 },
end: { line: 278, column: 28 }
},
loc: { start: { line: 278, column: 38 }, end: { line: 281, column: 1 } },
line: 278
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 308, column: 30 },
end: { line: 308, column: 31 }
},
loc: { start: { line: 308, column: 48 }, end: { line: 319, column: 1 } },
line: 308
},
'8': {
name: '(anonymous_8)',
decl: {
start: { line: 404, column: 23 },
end: { line: 404, column: 24 }
},
loc: { start: { line: 404, column: 37 }, end: { line: 419, column: 1 } },
line: 404
},
'9': {
name: '(anonymous_9)',
decl: {
start: { line: 489, column: 27 },
end: { line: 489, column: 28 }
},
loc: { start: { line: 489, column: 42 }, end: { line: 497, column: 1 } },
line: 489
},
'10': {
name: '(anonymous_10)',
decl: {
start: { line: 561, column: 27 },
end: { line: 561, column: 28 }
},
loc: { start: { line: 561, column: 58 }, end: { line: 569, column: 1 } },
line: 561
},
'11': {
name: '(anonymous_11)',
decl: {
start: { line: 636, column: 31 },
end: { line: 636, column: 32 }
},
loc: { start: { line: 636, column: 52 }, end: { line: 649, column: 1 } },
line: 636
},
'12': {
name: '(anonymous_12)',
decl: {
start: { line: 688, column: 32 },
end: { line: 688, column: 33 }
},
loc: { start: { line: 688, column: 56 }, end: { line: 701, column: 1 } },
line: 688
},
'13': {
name: '(anonymous_13)',
decl: {
start: { line: 752, column: 32 },
end: { line: 752, column: 33 }
},
loc: { start: { line: 752, column: 60 }, end: { line: 765, column: 1 } },
line: 752
},
'14': {
name: '(anonymous_14)',
decl: {
start: { line: 801, column: 25 },
end: { line: 801, column: 26 }
},
loc: { start: { line: 801, column: 41 }, end: { line: 810, column: 1 } },
line: 801
},
'15': {
name: '(anonymous_15)',
decl: {
start: { line: 819, column: 43 },
end: { line: 819, column: 44 }
},
loc: { start: { line: 819, column: 60 }, end: { line: 841, column: 1 } },
line: 819
},
'16': {
name: '(anonymous_16)',
decl: {
start: { line: 848, column: 42 },
end: { line: 848, column: 43 }
},
loc: { start: { line: 848, column: 53 }, end: { line: 917, column: 1 } },
line: 848
}
},
branchMap: {
'0': {
loc: { start: { line: 67, column: 2 }, end: { line: 69, column: 3 } },
type: 'if',
locations: [
{ start: { line: 67, column: 2 }, end: { line: 69, column: 3 } },
{ start: { line: 67, column: 2 }, end: { line: 69, column: 3 } }
],
line: 67
},
'1': {
loc: { start: { line: 79, column: 4 }, end: { line: 81, column: 5 } },
type: 'if',
locations: [
{ start: { line: 79, column: 4 }, end: { line: 81, column: 5 } },
{ start: { line: 79, column: 4 }, end: { line: 81, column: 5 } }
],
line: 79
},
'2': {
loc: { start: { line: 89, column: 6 }, end: { line: 91, column: 7 } },
type: 'if',
locations: [
{ start: { line: 89, column: 6 }, end: { line: 91, column: 7 } },
{ start: { line: 89, column: 6 }, end: { line: 91, column: 7 } }
],
line: 89
},
'3': {
loc: { start: { line: 101, column: 6 }, end: { line: 103, column: 7 } },
type: 'if',
locations: [
{ start: { line: 101, column: 6 }, end: { line: 103, column: 7 } },
{ start: { line: 101, column: 6 }, end: { line: 103, column: 7 } }
],
line: 101
},
'4': {
loc: { start: { line: 254, column: 2 }, end: { line: 256, column: 3 } },
type: 'if',
locations: [
{ start: { line: 254, column: 2 }, end: { line: 256, column: 3 } },
{ start: { line: 254, column: 2 }, end: { line: 256, column: 3 } }
],
line: 254
},
'5': {
loc: { start: { line: 258, column: 2 }, end: { line: 263, column: 3 } },
type: 'if',
locations: [
{ start: { line: 258, column: 2 }, end: { line: 263, column: 3 } },
{ start: { line: 258, column: 2 }, end: { line: 263, column: 3 } }
],
line: 258
},
'6': {
loc: { start: { line: 407, column: 2 }, end: { line: 409, column: 3 } },
type: 'if',
locations: [
{ start: { line: 407, column: 2 }, end: { line: 409, column: 3 } },
{ start: { line: 407, column: 2 }, end: { line: 409, column: 3 } }
],
line: 407
},
'7': {
loc: { start: { line: 490, column: 2 }, end: { line: 496, column: 3 } },
type: 'if',
locations: [
{ start: { line: 490, column: 2 }, end: { line: 496, column: 3 } },
{ start: { line: 490, column: 2 }, end: { line: 496, column: 3 } }
],
line: 490
},
'8': {
loc: { start: { line: 490, column: 6 }, end: { line: 490, column: 59 } },
type: 'binary-expr',
locations: [
{ start: { line: 490, column: 6 }, end: { line: 490, column: 30 } },
{ start: { line: 490, column: 34 }, end: { line: 490, column: 59 } }
],
line: 490
},
'9': {
loc: { start: { line: 561, column: 43 }, end: { line: 561, column: 56 } },
type: 'default-arg',
locations: [
{ start: { line: 561, column: 51 }, end: { line: 561, column: 56 } }
],
line: 561
},
'10': {
loc: { start: { line: 805, column: 2 }, end: { line: 807, column: 3 } },
type: 'if',
locations: [
{ start: { line: 805, column: 2 }, end: { line: 807, column: 3 } },
{ start: { line: 805, column: 2 }, end: { line: 807, column: 3 } }
],
line: 805
},
'11': {
loc: { start: { line: 824, column: 4 }, end: { line: 824, column: 67 } },
type: 'binary-expr',
locations: [
{ start: { line: 824, column: 4 }, end: { line: 824, column: 13 } },
{ start: { line: 824, column: 17 }, end: { line: 824, column: 48 } },
{ start: { line: 824, column: 52 }, end: { line: 824, column: 67 } }
],
line: 824
},
'12': {
loc: { start: { line: 826, column: 2 }, end: { line: 838, column: 3 } },
type: 'if',
locations: [
{ start: { line: 826, column: 2 }, end: { line: 838, column: 3 } },
{ start: { line: 826, column: 2 }, end: { line: 838, column: 3 } }
],
line: 826
},
'13': {
loc: { start: { line: 827, column: 4 }, end: { line: 835, column: 5 } },
type: 'if',
locations: [
{ start: { line: 827, column: 4 }, end: { line: 835, column: 5 } },
{ start: { line: 827, column: 4 }, end: { line: 835, column: 5 } }
],
line: 827
},
'14': {
loc: { start: { line: 828, column: 6 }, end: { line: 830, column: 44 } },
type: 'binary-expr',
locations: [
{ start: { line: 828, column: 6 }, end: { line: 828, column: 13 } },
{ start: { line: 829, column: 7 }, end: { line: 829, column: 44 } },
{ start: { line: 830, column: 8 }, end: { line: 830, column: 43 } }
],
line: 828
},
'15': {
loc: { start: { line: 849, column: 2 }, end: { line: 851, column: 3 } },
type: 'if',
locations: [
{ start: { line: 849, column: 2 }, end: { line: 851, column: 3 } },
{ start: { line: 849, column: 2 }, end: { line: 851, column: 3 } }
],
line: 849
},
'16': {
loc: { start: { line: 853, column: 2 }, end: { line: 913, column: 3 } },
type: 'switch',
locations: [
{ start: { line: 854, column: 4 }, end: { line: 854, column: 25 } },
{ start: { line: 855, column: 4 }, end: { line: 858, column: 12 } },
{ start: { line: 859, column: 4 }, end: { line: 862, column: 12 } },
{ start: { line: 863, column: 4 }, end: { line: 866, column: 12 } },
{ start: { line: 867, column: 4 }, end: { line: 870, column: 12 } },
{ start: { line: 871, column: 4 }, end: { line: 879, column: 12 } },
{ start: { line: 880, column: 4 }, end: { line: 883, column: 12 } },
{ start: { line: 884, column: 4 }, end: { line: 887, column: 12 } },
{ start: { line: 888, column: 4 }, end: { line: 897, column: 12 } },
{ start: { line: 898, column: 4 }, end: { line: 907, column: 12 } },
{ start: { line: 908, column: 4 }, end: { line: 912, column: 12 } }
],
line: 853
},
'17': {
loc: { start: { line: 889, column: 6 }, end: { line: 896, column: 7 } },
type: 'if',
locations: [
{ start: { line: 889, column: 6 }, end: { line: 896, column: 7 } },
{ start: { line: 889, column: 6 }, end: { line: 896, column: 7 } }
],
line: 889
},
'18': {
loc: { start: { line: 899, column: 6 }, end: { line: 906, column: 7 } },
type: 'if',
locations: [
{ start: { line: 899, column: 6 }, end: { line: 906, column: 7 } },
{ start: { line: 899, column: 6 }, end: { line: 906, column: 7 } }
],
line: 899
},
'19': {
loc: { start: { line: 914, column: 2 }, end: { line: 916, column: 3 } },
type: 'if',
locations: [
{ start: { line: 914, column: 2 }, end: { line: 916, column: 3 } },
{ start: { line: 914, column: 2 }, end: { line: 916, column: 3 } }
],
line: 914
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0,
'123': 0,
'124': 0,
'125': 0,
'126': 0,
'127': 0,
'128': 0,
'129': 0,
'130': 0,
'131': 0,
'132': 0,
'133': 0,
'134': 0,
'135': 0,
'136': 0,
'137': 0,
'138': 0,
'139': 0,
'140': 0,
'141': 0,
'142': 0,
'143': 0,
'144': 0,
'145': 0,
'146': 0,
'147': 0,
'148': 0,
'149': 0,
'150': 0,
'151': 0,
'152': 0,
'153': 0,
'154': 0,
'155': 0,
'156': 0,
'157': 0,
'158': 0,
'159': 0,
'160': 0,
'161': 0,
'162': 0,
'163': 0,
'164': 0,
'165': 0,
'166': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0],
'10': [0, 0],
'11': [0, 0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0, 0],
'15': [0, 0],
'16': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '1369e6082eda34486ddb6ba7f8b81d060b60eaa6'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
var constants = _interopRequireWildcard(_dereq_('../core/constants'));
_dereq_('./p5.Texture');
function _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function _getRequireWildcardCache() {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || (_typeof(obj) !== 'object' && typeof obj !== 'function')) {
return { default: obj };
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_mon2nx39l.s[0]++;
/**
* Loads a custom shader from the provided vertex and fragment
* shader paths. The shader files are loaded asynchronously in the
* background, so this method should be used in preload().
*
* For now, there are three main types of shaders. p5 will automatically
* supply appropriate vertices, normals, colors, and lighting attributes
* if the parameters defined in the shader match the names.
*
* @method loadShader
* @param {String} vertFilename path to file containing vertex shader
* source code
* @param {String} fragFilename path to file containing fragment shader
* source code
* @param {function} [callback] callback to be executed after loadShader
* completes. On success, the Shader object is passed as the first argument.
* @param {function} [errorCallback] callback to be executed when an error
* occurs inside loadShader. On error, the error is passed as the first
* argument.
* @return {p5.Shader} a shader object created from the provided
* vertex and fragment shader files.
*
* @example
*
*
* let mandel;
* function preload() {
* // load the shader definitions from files
* mandel = loadShader('assets/shader.vert', 'assets/shader.frag');
* }
* function setup() {
* createCanvas(100, 100, WEBGL);
* // use the shader
* shader(mandel);
* noStroke();
* mandel.setUniform('p', [-0.74364388703, 0.13182590421]);
* }
*
* function draw() {
* mandel.setUniform('r', 1.5 * exp(-6.5 * (1 + sin(millis() / 2000))));
* quad(-1, -1, 1, -1, 1, 1, -1, 1);
* }
*
*
*
* @alt
* zooming Mandelbrot set. a colorful, infinitely detailed fractal.
*/
_main.default.prototype.loadShader = function(
vertFilename,
fragFilename,
callback,
errorCallback
) {
cov_mon2nx39l.f[0]++;
cov_mon2nx39l.s[1]++;
_main.default._validateParameters('loadShader', arguments);
cov_mon2nx39l.s[2]++;
if (!errorCallback) {
cov_mon2nx39l.b[0][0]++;
cov_mon2nx39l.s[3]++;
errorCallback = console.error;
} else {
cov_mon2nx39l.b[0][1]++;
}
var loadedShader = (cov_mon2nx39l.s[4]++, new _main.default.Shader());
var self = (cov_mon2nx39l.s[5]++, this);
var loadedFrag = (cov_mon2nx39l.s[6]++, false);
var loadedVert = (cov_mon2nx39l.s[7]++, false);
cov_mon2nx39l.s[8]++;
var onLoad = function onLoad() {
cov_mon2nx39l.f[1]++;
cov_mon2nx39l.s[9]++;
self._decrementPreload();
cov_mon2nx39l.s[10]++;
if (callback) {
cov_mon2nx39l.b[1][0]++;
cov_mon2nx39l.s[11]++;
callback(loadedShader);
} else {
cov_mon2nx39l.b[1][1]++;
}
};
cov_mon2nx39l.s[12]++;
this.loadStrings(
vertFilename,
function(result) {
cov_mon2nx39l.f[2]++;
cov_mon2nx39l.s[13]++;
loadedShader._vertSrc = result.join('\n');
cov_mon2nx39l.s[14]++;
loadedVert = true;
cov_mon2nx39l.s[15]++;
if (loadedFrag) {
cov_mon2nx39l.b[2][0]++;
cov_mon2nx39l.s[16]++;
onLoad();
} else {
cov_mon2nx39l.b[2][1]++;
}
},
errorCallback
);
cov_mon2nx39l.s[17]++;
this.loadStrings(
fragFilename,
function(result) {
cov_mon2nx39l.f[3]++;
cov_mon2nx39l.s[18]++;
loadedShader._fragSrc = result.join('\n');
cov_mon2nx39l.s[19]++;
loadedFrag = true;
cov_mon2nx39l.s[20]++;
if (loadedVert) {
cov_mon2nx39l.b[3][0]++;
cov_mon2nx39l.s[21]++;
onLoad();
} else {
cov_mon2nx39l.b[3][1]++;
}
},
errorCallback
);
cov_mon2nx39l.s[22]++;
return loadedShader;
};
/**
* @method createShader
* @param {String} vertSrc source code for the vertex shader
* @param {String} fragSrc source code for the fragment shader
* @returns {p5.Shader} a shader object created from the provided
* vertex and fragment shaders.
*
* @example
*
*
* // the 'varying's are shared between both vertex & fragment shaders
* let varying = 'precision highp float; varying vec2 vPos;';
*
* // the vertex shader is called for each vertex
* let vs =
* varying +
* 'attribute vec3 aPosition;' +
* 'void main() { vPos = (gl_Position = vec4(aPosition,1.0)).xy; }';
*
* // the fragment shader is called for each pixel
* let fs =
* varying +
* 'uniform vec2 p;' +
* 'uniform float r;' +
* 'const int I = 500;' +
* 'void main() {' +
* ' vec2 c = p + vPos * r, z = c;' +
* ' float n = 0.0;' +
* ' for (int i = I; i > 0; i --) {' +
* ' if(z.x*z.x+z.y*z.y > 4.0) {' +
* ' n = float(i)/float(I);' +
* ' break;' +
* ' }' +
* ' z = vec2(z.x*z.x-z.y*z.y, 2.0*z.x*z.y) + c;' +
* ' }' +
* ' gl_FragColor = vec4(0.5-cos(n*17.0)/2.0,0.5-cos(n*13.0)/2.0,0.5-cos(n*23.0)/2.0,1.0);' +
* '}';
*
* let mandel;
* function setup() {
* createCanvas(100, 100, WEBGL);
*
* // create and initialize the shader
* mandel = createShader(vs, fs);
* shader(mandel);
* noStroke();
*
* // 'p' is the center point of the Mandelbrot image
* mandel.setUniform('p', [-0.74364388703, 0.13182590421]);
* }
*
* function draw() {
* // 'r' is the size of the image in Mandelbrot-space
* mandel.setUniform('r', 1.5 * exp(-6.5 * (1 + sin(millis() / 2000))));
* quad(-1, -1, 1, -1, 1, 1, -1, 1);
* }
*
*
*
* @alt
* zooming Mandelbrot set. a colorful, infinitely detailed fractal.
*/ cov_mon2nx39l.s[23]++;
_main.default.prototype.createShader = function(vertSrc, fragSrc) {
cov_mon2nx39l.f[4]++;
cov_mon2nx39l.s[24]++;
this._assert3d('createShader');
cov_mon2nx39l.s[25]++;
_main.default._validateParameters('createShader', arguments);
cov_mon2nx39l.s[26]++;
return new _main.default.Shader(this._renderer, vertSrc, fragSrc);
};
/**
* The shader() function lets the user provide a custom shader
* to fill in shapes in WEBGL mode. Users can create their
* own shaders by loading vertex and fragment shaders with
* loadShader().
*
* @method shader
* @chainable
* @param {p5.Shader} [s] the desired p5.Shader to use for rendering
* shapes.
*
* @example
*
*
* // Click within the image to toggle
* // the shader used by the quad shape
* // Note: for an alternative approach to the same example,
* // involving changing uniforms please refer to:
* // https://p5js.org/reference/#/p5.Shader/setUniform
*
* let redGreen;
* let orangeBlue;
* let showRedGreen = false;
*
* function preload() {
* // note that we are using two instances
* // of the same vertex and fragment shaders
* redGreen = loadShader('assets/shader.vert', 'assets/shader-gradient.frag');
* orangeBlue = loadShader('assets/shader.vert', 'assets/shader-gradient.frag');
* }
*
* function setup() {
* createCanvas(100, 100, WEBGL);
*
* // initialize the colors for redGreen shader
* shader(redGreen);
* redGreen.setUniform('colorCenter', [1.0, 0.0, 0.0]);
* redGreen.setUniform('colorBackground', [0.0, 1.0, 0.0]);
*
* // initialize the colors for orangeBlue shader
* shader(orangeBlue);
* orangeBlue.setUniform('colorCenter', [1.0, 0.5, 0.0]);
* orangeBlue.setUniform('colorBackground', [0.226, 0.0, 0.615]);
*
* noStroke();
* }
*
* function draw() {
* // update the offset values for each shader,
* // moving orangeBlue in vertical and redGreen
* // in horizontal direction
* orangeBlue.setUniform('offset', [0, sin(millis() / 2000) + 1]);
* redGreen.setUniform('offset', [sin(millis() / 2000), 1]);
*
* if (showRedGreen === true) {
* shader(redGreen);
* } else {
* shader(orangeBlue);
* }
* quad(-1, -1, 1, -1, 1, 1, -1, 1);
* }
*
* function mouseClicked() {
* showRedGreen = !showRedGreen;
* }
*
*
*
* @alt
* canvas toggles between a circular gradient of orange and blue vertically. and a circular gradient of red and green moving horizontally when mouse is clicked/pressed.
*/ cov_mon2nx39l.s[27]++;
_main.default.prototype.shader = function(s) {
cov_mon2nx39l.f[5]++;
cov_mon2nx39l.s[28]++;
this._assert3d('shader');
cov_mon2nx39l.s[29]++;
_main.default._validateParameters('shader', arguments);
cov_mon2nx39l.s[30]++;
if (s._renderer === undefined) {
cov_mon2nx39l.b[4][0]++;
cov_mon2nx39l.s[31]++;
s._renderer = this._renderer;
} else {
cov_mon2nx39l.b[4][1]++;
}
cov_mon2nx39l.s[32]++;
if (s.isStrokeShader()) {
cov_mon2nx39l.b[5][0]++;
cov_mon2nx39l.s[33]++;
this._renderer.userStrokeShader = s;
} else {
cov_mon2nx39l.b[5][1]++;
cov_mon2nx39l.s[34]++;
this._renderer.userFillShader = s;
cov_mon2nx39l.s[35]++;
this._renderer._useNormalMaterial = false;
}
cov_mon2nx39l.s[36]++;
s.init();
cov_mon2nx39l.s[37]++;
return this;
};
/**
* This function restores the default shaders in WEBGL mode. Code that runs
* after resetShader() will not be affected by previously defined
* shaders. Should be run after shader().
*
* @method resetShader
* @chainable
*/ cov_mon2nx39l.s[38]++;
_main.default.prototype.resetShader = function() {
cov_mon2nx39l.f[6]++;
cov_mon2nx39l.s[39]++;
this._renderer.userFillShader = this._renderer.userStrokeShader = null;
cov_mon2nx39l.s[40]++;
return this;
};
/**
* Normal material for geometry is a material that is not affected by light.
* It is not reflective and is a placeholder material often used for debugging.
* Surfaces facing the X-axis, become red, those facing the Y-axis, become green and those facing the Z-axis, become blue.
* You can view all possible materials in this
* example.
* @method normalMaterial
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(200);
* normalMaterial();
* sphere(40);
* }
*
*
* @alt
* Red, green and blue gradient.
*/ cov_mon2nx39l.s[41]++;
_main.default.prototype.normalMaterial = function() {
cov_mon2nx39l.f[7]++;
cov_mon2nx39l.s[42]++;
this._assert3d('normalMaterial');
cov_mon2nx39l.s[43]++;
for (
var _len = arguments.length, args = new Array(_len), _key = 0;
_key < _len;
_key++
) {
args[_key] = arguments[_key];
}
_main.default._validateParameters('normalMaterial', args);
cov_mon2nx39l.s[44]++;
this._renderer.drawMode = constants.FILL;
cov_mon2nx39l.s[45]++;
this._renderer._useSpecularMaterial = false;
cov_mon2nx39l.s[46]++;
this._renderer._useEmissiveMaterial = false;
cov_mon2nx39l.s[47]++;
this._renderer._useNormalMaterial = true;
cov_mon2nx39l.s[48]++;
this._renderer.curFillColor = [1, 1, 1, 1];
cov_mon2nx39l.s[49]++;
this._renderer._setProperty('_doFill', true);
cov_mon2nx39l.s[50]++;
this.noStroke();
cov_mon2nx39l.s[51]++;
return this;
};
/**
* Texture for geometry. You can view other possible materials in this
* example.
* @method texture
* @param {p5.Image|p5.MediaElement|p5.Graphics} tex 2-dimensional graphics
* to render as texture
* @chainable
* @example
*
*
* let img;
* function preload() {
* img = loadImage('assets/laDefense.jpg');
* }
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(0);
* rotateZ(frameCount * 0.01);
* rotateX(frameCount * 0.01);
* rotateY(frameCount * 0.01);
* //pass image as texture
* texture(img);
* box(200, 200, 200);
* }
*
*
*
*
*
* let pg;
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* pg = createGraphics(200, 200);
* pg.textSize(75);
* }
*
* function draw() {
* background(0);
* pg.background(255);
* pg.text('hello!', 0, 100);
* //pass image as texture
* texture(pg);
* rotateX(0.5);
* noStroke();
* plane(50);
* }
*
*
*
*
*
* let vid;
* function preload() {
* vid = createVideo('assets/fingers.mov');
* vid.hide();
* }
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(0);
* //pass video frame as texture
* texture(vid);
* rect(-40, -40, 80, 80);
* }
*
* function mousePressed() {
* vid.loop();
* }
*
*
*
* @alt
* Rotating view of many images umbrella and grid roof on a 3d plane
* black canvas
* black canvas
*/ cov_mon2nx39l.s[52]++;
_main.default.prototype.texture = function(tex) {
cov_mon2nx39l.f[8]++;
cov_mon2nx39l.s[53]++;
this._assert3d('texture');
cov_mon2nx39l.s[54]++;
_main.default._validateParameters('texture', arguments);
cov_mon2nx39l.s[55]++;
if (tex.gifProperties) {
cov_mon2nx39l.b[6][0]++;
cov_mon2nx39l.s[56]++;
tex._animateGif(this);
} else {
cov_mon2nx39l.b[6][1]++;
}
cov_mon2nx39l.s[57]++;
this._renderer.drawMode = constants.TEXTURE;
cov_mon2nx39l.s[58]++;
this._renderer._useSpecularMaterial = false;
cov_mon2nx39l.s[59]++;
this._renderer._useEmissiveMaterial = false;
cov_mon2nx39l.s[60]++;
this._renderer._useNormalMaterial = false;
cov_mon2nx39l.s[61]++;
this._renderer._tex = tex;
cov_mon2nx39l.s[62]++;
this._renderer._setProperty('_doFill', true);
cov_mon2nx39l.s[63]++;
return this;
};
/**
* Sets the coordinate space for texture mapping. The default mode is IMAGE
* which refers to the actual coordinates of the image.
* NORMAL refers to a normalized space of values ranging from 0 to 1.
* This function only works in WEBGL mode.
*
* With IMAGE, if an image is 100 x 200 pixels, mapping the image onto the entire
* size of a quad would require the points (0,0) (100, 0) (100,200) (0,200).
* The same mapping in NORMAL is (0,0) (1,0) (1,1) (0,1).
* @method textureMode
* @param {Constant} mode either IMAGE or NORMAL
* @example
*
*
* let img;
*
* function preload() {
* img = loadImage('assets/laDefense.jpg');
* }
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* texture(img);
* textureMode(NORMAL);
* beginShape();
* vertex(-50, -50, 0, 0);
* vertex(50, -50, 1, 0);
* vertex(50, 50, 1, 1);
* vertex(-50, 50, 0, 1);
* endShape();
* }
*
*
*
* @alt
* the underside of a white umbrella and gridded ceiling above
*
*
*
* let img;
*
* function preload() {
* img = loadImage('assets/laDefense.jpg');
* }
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* texture(img);
* textureMode(NORMAL);
* beginShape();
* vertex(-50, -50, 0, 0);
* vertex(50, -50, img.width, 0);
* vertex(50, 50, img.width, img.height);
* vertex(-50, 50, 0, img.height);
* endShape();
* }
*
*
*
* @alt
* the underside of a white umbrella and gridded ceiling above
*/ cov_mon2nx39l.s[64]++;
_main.default.prototype.textureMode = function(mode) {
cov_mon2nx39l.f[9]++;
cov_mon2nx39l.s[65]++;
if (
(cov_mon2nx39l.b[8][0]++, mode !== constants.IMAGE) &&
(cov_mon2nx39l.b[8][1]++, mode !== constants.NORMAL)
) {
cov_mon2nx39l.b[7][0]++;
cov_mon2nx39l.s[66]++;
console.warn(
'You tried to set '.concat(
mode,
' textureMode only supports IMAGE & NORMAL '
)
);
} else {
cov_mon2nx39l.b[7][1]++;
cov_mon2nx39l.s[67]++;
this._renderer.textureMode = mode;
}
};
/**
* Sets the global texture wrapping mode. This controls how textures behave
* when their uv's go outside of the 0 - 1 range. There are three options:
* CLAMP, REPEAT, and MIRROR.
*
* CLAMP causes the pixels at the edge of the texture to extend to the bounds
* REPEAT causes the texture to tile repeatedly until reaching the bounds
* MIRROR works similarly to REPEAT but it flips the texture with every new tile
*
* REPEAT & MIRROR are only available if the texture
* is a power of two size (128, 256, 512, 1024, etc.).
*
* This method will affect all textures in your sketch until a subsequent
* textureWrap call is made.
*
* If only one argument is provided, it will be applied to both the
* horizontal and vertical axes.
* @method textureWrap
* @param {Constant} wrapX either CLAMP, REPEAT, or MIRROR
* @param {Constant} [wrapY] either CLAMP, REPEAT, or MIRROR
* @example
*
*
* let img;
* function preload() {
* img = loadImage('assets/rockies128.jpg');
* }
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* textureWrap(MIRROR);
* }
*
* function draw() {
* background(0);
*
* let dX = mouseX;
* let dY = mouseY;
*
* let u = lerp(1.0, 2.0, dX);
* let v = lerp(1.0, 2.0, dY);
*
* scale(width / 2);
*
* texture(img);
*
* beginShape(TRIANGLES);
* vertex(-1, -1, 0, 0, 0);
* vertex(1, -1, 0, u, 0);
* vertex(1, 1, 0, u, v);
*
* vertex(1, 1, 0, u, v);
* vertex(-1, 1, 0, 0, v);
* vertex(-1, -1, 0, 0, 0);
* endShape();
* }
*
*
*
* @alt
* an image of the rocky mountains repeated in mirrored tiles
*/ cov_mon2nx39l.s[68]++;
_main.default.prototype.textureWrap = function(wrapX) {
var wrapY =
arguments.length > 1 && arguments[1] !== undefined
? arguments[1]
: (cov_mon2nx39l.b[9][0]++, wrapX);
cov_mon2nx39l.f[10]++;
cov_mon2nx39l.s[69]++;
this._renderer.textureWrapX = wrapX;
cov_mon2nx39l.s[70]++;
this._renderer.textureWrapY = wrapY;
var textures = (cov_mon2nx39l.s[71]++, this._renderer.textures);
cov_mon2nx39l.s[72]++;
for (var i = (cov_mon2nx39l.s[73]++, 0); i < textures.length; i++) {
cov_mon2nx39l.s[74]++;
textures[i].setWrapMode(wrapX, wrapY);
}
};
/**
* Ambient material for geometry with a given color. Ambient material defines the color the object reflects under any lighting.
* For example, if the ambient material of an object is pure red, but the ambient lighting only contains green, the object will not reflect any light.
* Here's an example containing all possible materials.
* @method ambientMaterial
* @param {Number} v1 gray value, red or hue value
* (depending on the current color mode),
* @param {Number} [v2] green or saturation value
* @param {Number} [v3] blue or brightness value
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
* function draw() {
* background(0);
* noStroke();
* ambientLight(200);
* ambientMaterial(70, 130, 230);
* sphere(40);
* }
*
*
*
*
* // ambientLight is both red and blue (magenta),
* // so object only reflects it's red and blue components
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
* function draw() {
* background(70);
* ambientLight(100); // white light
* ambientMaterial(255, 0, 255); // pink material
* box(30);
* }
*
*
*
*
* // ambientLight is green. Since object does not contain
* // green, it does not reflect any light
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
* function draw() {
* background(70);
* ambientLight(0, 255, 0); // green light
* ambientMaterial(255, 0, 255); // pink material
* box(30);
* }
*
*
* @alt
* radiating light source from top right of canvas
* box reflecting only red and blue light
* box reflecting no light
*/
/**
* @method ambientMaterial
* @param {Number[]|String|p5.Color} color color, color Array, or CSS color string
* @chainable
*/ cov_mon2nx39l.s[75]++;
_main.default.prototype.ambientMaterial = function(v1, v2, v3) {
cov_mon2nx39l.f[11]++;
cov_mon2nx39l.s[76]++;
this._assert3d('ambientMaterial');
cov_mon2nx39l.s[77]++;
_main.default._validateParameters('ambientMaterial', arguments);
var color = (cov_mon2nx39l.s[78]++,
_main.default.prototype.color.apply(this, arguments));
cov_mon2nx39l.s[79]++;
this._renderer.curFillColor = color._array;
cov_mon2nx39l.s[80]++;
this._renderer._useSpecularMaterial = false;
cov_mon2nx39l.s[81]++;
this._renderer._useEmissiveMaterial = false;
cov_mon2nx39l.s[82]++;
this._renderer._useNormalMaterial = false;
cov_mon2nx39l.s[83]++;
this._renderer._enableLighting = true;
cov_mon2nx39l.s[84]++;
this._renderer._tex = null;
cov_mon2nx39l.s[85]++;
return this;
};
/**
* Sets the emissive color of the material used for geometry drawn to
* the screen. This is a misnomer in the sense that the material does not
* actually emit light that effects surrounding polygons. Instead,
* it gives the appearance that the object is glowing. An emissive material
* will display at full strength even if there is no light for it to reflect.
* @method emissiveMaterial
* @param {Number} v1 gray value, red or hue value
* (depending on the current color mode),
* @param {Number} [v2] green or saturation value
* @param {Number} [v3] blue or brightness value
* @param {Number} [a] opacity
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
* function draw() {
* background(0);
* noStroke();
* ambientLight(0);
* emissiveMaterial(130, 230, 0);
* sphere(40);
* }
*
*
*
* @alt
* radiating light source from top right of canvas
*/
/**
* @method emissiveMaterial
* @param {Number[]|String|p5.Color} color color, color Array, or CSS color string
* @chainable
*/ cov_mon2nx39l.s[86]++;
_main.default.prototype.emissiveMaterial = function(v1, v2, v3, a) {
cov_mon2nx39l.f[12]++;
cov_mon2nx39l.s[87]++;
this._assert3d('emissiveMaterial');
cov_mon2nx39l.s[88]++;
_main.default._validateParameters('emissiveMaterial', arguments);
var color = (cov_mon2nx39l.s[89]++,
_main.default.prototype.color.apply(this, arguments));
cov_mon2nx39l.s[90]++;
this._renderer.curFillColor = color._array;
cov_mon2nx39l.s[91]++;
this._renderer._useSpecularMaterial = false;
cov_mon2nx39l.s[92]++;
this._renderer._useEmissiveMaterial = true;
cov_mon2nx39l.s[93]++;
this._renderer._useNormalMaterial = false;
cov_mon2nx39l.s[94]++;
this._renderer._enableLighting = true;
cov_mon2nx39l.s[95]++;
this._renderer._tex = null;
cov_mon2nx39l.s[96]++;
return this;
};
/**
* Specular material for geometry with a given color. Specular material is a shiny reflective material.
* Like ambient material it also defines the color the object reflects under ambient lighting.
* For example, if the specular material of an object is pure red, but the ambient lighting only contains green, the object will not reflect any light.
* For all other types of light like point and directional light, a specular material will reflect the color of the light source to the viewer.
* Here's an example containing all possible materials.
*
* @method specularMaterial
* @param {Number} gray number specifying value between white and black.
* @param {Number} [alpha] alpha value relative to current color range
* (default is 0-255)
* @chainable
*/
/**
* @method specularMaterial
* @param {Number} v1 red or hue value relative to
* the current color range
* @param {Number} v2 green or saturation value
* relative to the current color range
* @param {Number} v3 blue or brightness value
* relative to the current color range
* @param {Number} [alpha]
* @chainable
*
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
* function draw() {
* background(0);
* ambientLight(50);
* pointLight(250, 250, 250, 100, 100, 30);
* specularMaterial(250);
* sphere(40);
* }
*
*
* @alt
* diffused radiating light source from top right of canvas
*/
/**
* @method specularMaterial
* @param {Number[]|String|p5.Color} color color Array, or CSS color string
* @chainable
*/ cov_mon2nx39l.s[97]++;
_main.default.prototype.specularMaterial = function(v1, v2, v3, alpha) {
cov_mon2nx39l.f[13]++;
cov_mon2nx39l.s[98]++;
this._assert3d('specularMaterial');
cov_mon2nx39l.s[99]++;
_main.default._validateParameters('specularMaterial', arguments);
var color = (cov_mon2nx39l.s[100]++,
_main.default.prototype.color.apply(this, arguments));
cov_mon2nx39l.s[101]++;
this._renderer.curFillColor = color._array;
cov_mon2nx39l.s[102]++;
this._renderer._useSpecularMaterial = true;
cov_mon2nx39l.s[103]++;
this._renderer._useEmissiveMaterial = false;
cov_mon2nx39l.s[104]++;
this._renderer._useNormalMaterial = false;
cov_mon2nx39l.s[105]++;
this._renderer._enableLighting = true;
cov_mon2nx39l.s[106]++;
this._renderer._tex = null;
cov_mon2nx39l.s[107]++;
return this;
};
/**
* Sets the amount of gloss in the surface of shapes.
* Used in combination with specularMaterial() in setting
* the material properties of shapes. The default and minimum value is 1.
* @method shininess
* @param {Number} shine Degree of Shininess.
* Defaults to 1.
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
* function draw() {
* background(0);
* noStroke();
* let locX = mouseX - width / 2;
* let locY = mouseY - height / 2;
* ambientLight(60, 60, 60);
* pointLight(255, 255, 255, locX, locY, 50);
* specularMaterial(250);
* translate(-25, 0, 0);
* shininess(1);
* sphere(20);
* translate(50, 0, 0);
* shininess(20);
* sphere(20);
* }
*
*
* @alt
* Shininess on Camera changes position with mouse
*/ cov_mon2nx39l.s[108]++;
_main.default.prototype.shininess = function(shine) {
cov_mon2nx39l.f[14]++;
cov_mon2nx39l.s[109]++;
this._assert3d('shininess');
cov_mon2nx39l.s[110]++;
_main.default._validateParameters('shininess', arguments);
cov_mon2nx39l.s[111]++;
if (shine < 1) {
cov_mon2nx39l.b[10][0]++;
cov_mon2nx39l.s[112]++;
shine = 1;
} else {
cov_mon2nx39l.b[10][1]++;
}
cov_mon2nx39l.s[113]++;
this._renderer._useShininess = shine;
cov_mon2nx39l.s[114]++;
return this;
};
/**
* @private blends colors according to color components.
* If alpha value is less than 1, or non-standard blendMode
* we need to enable blending on our gl context.
* @param {Number[]} color [description]
* @return {Number[]]} Normalized numbers array
*/ cov_mon2nx39l.s[115]++;
_main.default.RendererGL.prototype._applyColorBlend = function(colors) {
cov_mon2nx39l.f[15]++;
var gl = (cov_mon2nx39l.s[116]++, this.GL);
var isTexture = (cov_mon2nx39l.s[117]++, this.drawMode === constants.TEXTURE);
var doBlend = (cov_mon2nx39l.s[118]++,
(cov_mon2nx39l.b[11][0]++, isTexture) ||
(cov_mon2nx39l.b[11][1]++, colors[colors.length - 1] < 1.0) ||
(cov_mon2nx39l.b[11][2]++, this._isErasing));
cov_mon2nx39l.s[119]++;
if (doBlend !== this._isBlending) {
cov_mon2nx39l.b[12][0]++;
cov_mon2nx39l.s[120]++;
if (
(cov_mon2nx39l.b[14][0]++, doBlend) ||
((cov_mon2nx39l.b[14][1]++, this.curBlendMode !== constants.BLEND) &&
(cov_mon2nx39l.b[14][2]++, this.curBlendMode !== constants.ADD))
) {
cov_mon2nx39l.b[13][0]++;
cov_mon2nx39l.s[121]++;
gl.enable(gl.BLEND);
} else {
cov_mon2nx39l.b[13][1]++;
cov_mon2nx39l.s[122]++;
gl.disable(gl.BLEND);
}
cov_mon2nx39l.s[123]++;
gl.depthMask(true);
cov_mon2nx39l.s[124]++;
this._isBlending = doBlend;
} else {
cov_mon2nx39l.b[12][1]++;
}
cov_mon2nx39l.s[125]++;
this._applyBlendMode();
cov_mon2nx39l.s[126]++;
return colors;
};
/**
* @private sets blending in gl context to curBlendMode
* @param {Number[]} color [description]
* @return {Number[]]} Normalized numbers array
*/ cov_mon2nx39l.s[127]++;
_main.default.RendererGL.prototype._applyBlendMode = function() {
cov_mon2nx39l.f[16]++;
cov_mon2nx39l.s[128]++;
if (this._cachedBlendMode === this.curBlendMode) {
cov_mon2nx39l.b[15][0]++;
cov_mon2nx39l.s[129]++;
return;
} else {
cov_mon2nx39l.b[15][1]++;
}
var gl = (cov_mon2nx39l.s[130]++, this.GL);
cov_mon2nx39l.s[131]++;
switch (this.curBlendMode) {
case constants.BLEND:
cov_mon2nx39l.b[16][0]++;
case constants.ADD:
cov_mon2nx39l.b[16][1]++;
cov_mon2nx39l.s[132]++;
gl.blendEquation(gl.FUNC_ADD);
cov_mon2nx39l.s[133]++;
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
cov_mon2nx39l.s[134]++;
break;
case constants.REMOVE:
cov_mon2nx39l.b[16][2]++;
cov_mon2nx39l.s[135]++;
gl.blendEquation(gl.FUNC_REVERSE_SUBTRACT);
cov_mon2nx39l.s[136]++;
gl.blendFunc(gl.SRC_ALPHA, gl.DST_ALPHA);
cov_mon2nx39l.s[137]++;
break;
case constants.MULTIPLY:
cov_mon2nx39l.b[16][3]++;
cov_mon2nx39l.s[138]++;
gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);
cov_mon2nx39l.s[139]++;
gl.blendFuncSeparate(gl.ZERO, gl.SRC_COLOR, gl.ONE, gl.ONE);
cov_mon2nx39l.s[140]++;
break;
case constants.SCREEN:
cov_mon2nx39l.b[16][4]++;
cov_mon2nx39l.s[141]++;
gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);
cov_mon2nx39l.s[142]++;
gl.blendFuncSeparate(gl.ONE_MINUS_DST_COLOR, gl.ONE, gl.ONE, gl.ONE);
cov_mon2nx39l.s[143]++;
break;
case constants.EXCLUSION:
cov_mon2nx39l.b[16][5]++;
cov_mon2nx39l.s[144]++;
gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);
cov_mon2nx39l.s[145]++;
gl.blendFuncSeparate(
gl.ONE_MINUS_DST_COLOR,
gl.ONE_MINUS_SRC_COLOR,
gl.ONE,
gl.ONE
);
cov_mon2nx39l.s[146]++;
break;
case constants.REPLACE:
cov_mon2nx39l.b[16][6]++;
cov_mon2nx39l.s[147]++;
gl.blendEquation(gl.FUNC_ADD);
cov_mon2nx39l.s[148]++;
gl.blendFunc(gl.ONE, gl.ZERO);
cov_mon2nx39l.s[149]++;
break;
case constants.SUBTRACT:
cov_mon2nx39l.b[16][7]++;
cov_mon2nx39l.s[150]++;
gl.blendEquationSeparate(gl.FUNC_REVERSE_SUBTRACT, gl.FUNC_ADD);
cov_mon2nx39l.s[151]++;
gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE, gl.ONE, gl.ONE);
cov_mon2nx39l.s[152]++;
break;
case constants.DARKEST:
cov_mon2nx39l.b[16][8]++;
cov_mon2nx39l.s[153]++;
if (this.blendExt) {
cov_mon2nx39l.b[17][0]++;
cov_mon2nx39l.s[154]++;
gl.blendEquationSeparate(this.blendExt.MIN_EXT, gl.FUNC_ADD);
cov_mon2nx39l.s[155]++;
gl.blendFuncSeparate(gl.ONE, gl.ONE, gl.ONE, gl.ONE);
} else {
cov_mon2nx39l.b[17][1]++;
cov_mon2nx39l.s[156]++;
console.warn(
'blendMode(DARKEST) does not work in your browser in WEBGL mode.'
);
}
cov_mon2nx39l.s[157]++;
break;
case constants.LIGHTEST:
cov_mon2nx39l.b[16][9]++;
cov_mon2nx39l.s[158]++;
if (this.blendExt) {
cov_mon2nx39l.b[18][0]++;
cov_mon2nx39l.s[159]++;
gl.blendEquationSeparate(this.blendExt.MAX_EXT, gl.FUNC_ADD);
cov_mon2nx39l.s[160]++;
gl.blendFuncSeparate(gl.ONE, gl.ONE, gl.ONE, gl.ONE);
} else {
cov_mon2nx39l.b[18][1]++;
cov_mon2nx39l.s[161]++;
console.warn(
'blendMode(LIGHTEST) does not work in your browser in WEBGL mode.'
);
}
cov_mon2nx39l.s[162]++;
break;
default:
cov_mon2nx39l.b[16][10]++;
cov_mon2nx39l.s[163]++;
console.error(
'Oops! Somehow RendererGL set curBlendMode to an unsupported mode.'
);
cov_mon2nx39l.s[164]++;
break;
}
cov_mon2nx39l.s[165]++;
if (!this._isErasing) {
cov_mon2nx39l.b[19][0]++;
cov_mon2nx39l.s[166]++;
this._cachedBlendMode = this.curBlendMode;
} else {
cov_mon2nx39l.b[19][1]++;
}
};
var _default = _main.default;
exports.default = _default;
},
{ '../core/constants': 43, '../core/main': 54, './p5.Texture': 110 }
],
102: [
function(_dereq_, module, exports) {
'use strict';
var cov_coydg3ubv = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.Camera.js';
var hash = '349c6ec6f17363fec518bd06f24c006f62e61c5a';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.Camera.js',
statementMap: {
'0': { start: { line: 108, column: 0 }, end: { line: 113, column: 2 } },
'1': { start: { line: 109, column: 2 }, end: { line: 109, column: 27 } },
'2': { start: { line: 110, column: 2 }, end: { line: 110, column: 41 } },
'3': { start: { line: 111, column: 2 }, end: { line: 111, column: 44 } },
'4': { start: { line: 112, column: 2 }, end: { line: 112, column: 14 } },
'5': { start: { line: 168, column: 0 }, end: { line: 173, column: 2 } },
'6': { start: { line: 169, column: 2 }, end: { line: 169, column: 32 } },
'7': { start: { line: 170, column: 2 }, end: { line: 170, column: 46 } },
'8': { start: { line: 171, column: 2 }, end: { line: 171, column: 49 } },
'9': { start: { line: 172, column: 2 }, end: { line: 172, column: 14 } },
'10': { start: { line: 224, column: 0 }, end: { line: 229, column: 2 } },
'11': { start: { line: 225, column: 2 }, end: { line: 225, column: 26 } },
'12': { start: { line: 226, column: 2 }, end: { line: 226, column: 40 } },
'13': { start: { line: 227, column: 2 }, end: { line: 227, column: 43 } },
'14': { start: { line: 228, column: 2 }, end: { line: 228, column: 14 } },
'15': { start: { line: 286, column: 0 }, end: { line: 291, column: 2 } },
'16': { start: { line: 287, column: 2 }, end: { line: 287, column: 28 } },
'17': { start: { line: 288, column: 2 }, end: { line: 288, column: 42 } },
'18': { start: { line: 289, column: 2 }, end: { line: 289, column: 45 } },
'19': { start: { line: 290, column: 2 }, end: { line: 290, column: 14 } },
'20': { start: { line: 325, column: 0 }, end: { line: 337, column: 2 } },
'21': { start: { line: 326, column: 2 }, end: { line: 326, column: 33 } },
'22': { start: { line: 327, column: 15 }, end: { line: 327, column: 44 } },
'23': { start: { line: 330, column: 2 }, end: { line: 330, column: 39 } },
'24': { start: { line: 331, column: 2 }, end: { line: 331, column: 27 } },
'25': { start: { line: 334, column: 2 }, end: { line: 334, column: 35 } },
'26': { start: { line: 336, column: 2 }, end: { line: 336, column: 14 } },
'27': { start: { line: 412, column: 0 }, end: { line: 419, column: 2 } },
'28': { start: { line: 413, column: 2 }, end: { line: 413, column: 28 } },
'29': { start: { line: 415, column: 2 }, end: { line: 415, column: 30 } },
'30': { start: { line: 417, column: 2 }, end: { line: 417, column: 38 } },
'31': { start: { line: 418, column: 2 }, end: { line: 418, column: 36 } },
'32': { start: { line: 432, column: 0 }, end: { line: 503, column: 2 } },
'33': { start: { line: 433, column: 2 }, end: { line: 433, column: 64 } },
'34': { start: { line: 434, column: 2 }, end: { line: 442, column: 3 } },
'35': { start: { line: 435, column: 4 }, end: { line: 435, column: 33 } },
'36': { start: { line: 439, column: 4 }, end: { line: 439, column: 26 } },
'37': { start: { line: 441, column: 4 }, end: { line: 441, column: 60 } },
'38': { start: { line: 443, column: 2 }, end: { line: 445, column: 3 } },
'39': { start: { line: 444, column: 4 }, end: { line: 444, column: 37 } },
'40': { start: { line: 446, column: 2 }, end: { line: 448, column: 3 } },
'41': { start: { line: 447, column: 4 }, end: { line: 447, column: 34 } },
'42': { start: { line: 449, column: 2 }, end: { line: 451, column: 3 } },
'43': { start: { line: 450, column: 4 }, end: { line: 450, column: 32 } },
'44': { start: { line: 453, column: 2 }, end: { line: 459, column: 3 } },
'45': { start: { line: 454, column: 4 }, end: { line: 454, column: 16 } },
'46': { start: { line: 455, column: 4 }, end: { line: 458, column: 6 } },
'47': { start: { line: 461, column: 2 }, end: { line: 466, column: 3 } },
'48': { start: { line: 462, column: 4 }, end: { line: 465, column: 6 } },
'49': { start: { line: 468, column: 2 }, end: { line: 468, column: 28 } },
'50': { start: { line: 469, column: 2 }, end: { line: 469, column: 25 } },
'51': { start: { line: 470, column: 2 }, end: { line: 470, column: 23 } },
'52': { start: { line: 472, column: 2 }, end: { line: 472, column: 41 } },
'53': { start: { line: 474, column: 12 }, end: { line: 474, column: 46 } },
'54': { start: { line: 475, column: 13 }, end: { line: 475, column: 53 } },
'55': { start: { line: 478, column: 2 }, end: { line: 481, column: 65 } },
'56': { start: { line: 483, column: 2 }, end: { line: 502, column: 3 } },
'57': { start: { line: 484, column: 4 }, end: { line: 501, column: 6 } },
'58': { start: { line: 511, column: 0 }, end: { line: 562, column: 2 } },
'59': { start: { line: 512, column: 2 }, end: { line: 512, column: 59 } },
'60': { start: { line: 512, column: 26 }, end: { line: 512, column: 59 } },
'61': { start: { line: 513, column: 2 }, end: { line: 513, column: 61 } },
'62': { start: { line: 513, column: 27 }, end: { line: 513, column: 61 } },
'63': { start: { line: 514, column: 2 }, end: { line: 514, column: 64 } },
'64': { start: { line: 514, column: 28 }, end: { line: 514, column: 64 } },
'65': { start: { line: 515, column: 2 }, end: { line: 515, column: 58 } },
'66': { start: { line: 515, column: 25 }, end: { line: 515, column: 58 } },
'67': { start: { line: 516, column: 2 }, end: { line: 516, column: 35 } },
'68': { start: { line: 516, column: 26 }, end: { line: 516, column: 35 } },
'69': { start: { line: 517, column: 2 }, end: { line: 518, column: 64 } },
'70': { start: { line: 518, column: 4 }, end: { line: 518, column: 64 } },
'71': { start: { line: 520, column: 12 }, end: { line: 520, column: 24 } },
'72': { start: { line: 521, column: 12 }, end: { line: 521, column: 24 } },
'73': { start: { line: 522, column: 12 }, end: { line: 522, column: 22 } },
'74': { start: { line: 524, column: 12 }, end: { line: 524, column: 20 } },
'75': { start: { line: 525, column: 12 }, end: { line: 525, column: 20 } },
'76': { start: { line: 526, column: 12 }, end: { line: 526, column: 20 } },
'77': { start: { line: 528, column: 13 }, end: { line: 528, column: 32 } },
'78': { start: { line: 529, column: 13 }, end: { line: 529, column: 32 } },
'79': { start: { line: 530, column: 13 }, end: { line: 530, column: 30 } },
'80': { start: { line: 532, column: 2 }, end: { line: 532, column: 41 } },
'81': { start: { line: 535, column: 2 }, end: { line: 538, column: 40 } },
'82': { start: { line: 540, column: 2 }, end: { line: 559, column: 3 } },
'83': { start: { line: 541, column: 4 }, end: { line: 558, column: 6 } },
'84': { start: { line: 561, column: 2 }, end: { line: 561, column: 29 } },
'85': { start: { line: 568, column: 0 }, end: { line: 619, column: 2 } },
'86': { start: { line: 569, column: 2 }, end: { line: 569, column: 59 } },
'87': { start: { line: 569, column: 26 }, end: { line: 569, column: 59 } },
'88': { start: { line: 570, column: 2 }, end: { line: 570, column: 61 } },
'89': { start: { line: 570, column: 27 }, end: { line: 570, column: 61 } },
'90': { start: { line: 571, column: 2 }, end: { line: 571, column: 64 } },
'91': { start: { line: 571, column: 28 }, end: { line: 571, column: 64 } },
'92': { start: { line: 572, column: 2 }, end: { line: 572, column: 58 } },
'93': { start: { line: 572, column: 25 }, end: { line: 572, column: 58 } },
'94': { start: { line: 573, column: 2 }, end: { line: 573, column: 35 } },
'95': { start: { line: 573, column: 26 }, end: { line: 573, column: 35 } },
'96': { start: { line: 574, column: 2 }, end: { line: 575, column: 64 } },
'97': { start: { line: 575, column: 4 }, end: { line: 575, column: 64 } },
'98': { start: { line: 577, column: 12 }, end: { line: 577, column: 24 } },
'99': { start: { line: 578, column: 12 }, end: { line: 578, column: 24 } },
'100': { start: { line: 579, column: 12 }, end: { line: 579, column: 22 } },
'101': { start: { line: 581, column: 12 }, end: { line: 581, column: 29 } },
'102': { start: { line: 582, column: 12 }, end: { line: 582, column: 29 } },
'103': { start: { line: 583, column: 12 }, end: { line: 583, column: 35 } },
'104': { start: { line: 585, column: 13 }, end: { line: 585, column: 31 } },
'105': { start: { line: 586, column: 13 }, end: { line: 586, column: 31 } },
'106': { start: { line: 587, column: 13 }, end: { line: 587, column: 30 } },
'107': { start: { line: 589, column: 2 }, end: { line: 589, column: 41 } },
'108': { start: { line: 592, column: 2 }, end: { line: 595, column: 39 } },
'109': { start: { line: 597, column: 2 }, end: { line: 616, column: 3 } },
'110': { start: { line: 598, column: 4 }, end: { line: 615, column: 6 } },
'111': { start: { line: 618, column: 2 }, end: { line: 618, column: 29 } },
'112': { start: { line: 631, column: 0 }, end: { line: 667, column: 2 } },
'113': { start: { line: 632, column: 16 }, end: { line: 632, column: 28 } },
'114': { start: { line: 633, column: 16 }, end: { line: 633, column: 28 } },
'115': { start: { line: 634, column: 16 }, end: { line: 634, column: 28 } },
'116': { start: { line: 637, column: 2 }, end: { line: 637, column: 23 } },
'117': { start: { line: 638, column: 2 }, end: { line: 638, column: 23 } },
'118': { start: { line: 639, column: 2 }, end: { line: 639, column: 23 } },
'119': { start: { line: 641, column: 19 }, end: { line: 641, column: 60 } },
'120': { start: { line: 642, column: 2 }, end: { line: 642, column: 64 } },
'121': { start: { line: 645, column: 24 }, end: { line: 649, column: 3 } },
'122': { start: { line: 652, column: 2 }, end: { line: 652, column: 32 } },
'123': { start: { line: 653, column: 2 }, end: { line: 653, column: 32 } },
'124': { start: { line: 654, column: 2 }, end: { line: 654, column: 32 } },
'125': { start: { line: 656, column: 2 }, end: { line: 666, column: 4 } },
'126': { start: { line: 722, column: 0 }, end: { line: 725, column: 2 } },
'127': { start: { line: 723, column: 16 }, end: { line: 723, column: 36 } },
'128': { start: { line: 724, column: 2 }, end: { line: 724, column: 63 } },
'129': { start: { line: 780, column: 0 }, end: { line: 783, column: 2 } },
'130': { start: { line: 781, column: 16 }, end: { line: 781, column: 36 } },
'131': { start: { line: 782, column: 2 }, end: { line: 782, column: 63 } },
'132': { start: { line: 834, column: 0 }, end: { line: 846, column: 2 } },
'133': { start: { line: 835, column: 2 }, end: { line: 845, column: 4 } },
'134': { start: { line: 858, column: 0 }, end: { line: 931, column: 2 } },
'135': { start: { line: 869, column: 2 }, end: { line: 879, column: 3 } },
'136': { start: { line: 870, column: 4 }, end: { line: 870, column: 28 } },
'137': { start: { line: 871, column: 4 }, end: { line: 871, column: 28 } },
'138': { start: { line: 872, column: 4 }, end: { line: 872, column: 28 } },
'139': { start: { line: 873, column: 4 }, end: { line: 873, column: 19 } },
'140': { start: { line: 874, column: 4 }, end: { line: 874, column: 19 } },
'141': { start: { line: 875, column: 4 }, end: { line: 875, column: 16 } },
'142': { start: { line: 876, column: 4 }, end: { line: 876, column: 12 } },
'143': { start: { line: 877, column: 4 }, end: { line: 877, column: 12 } },
'144': { start: { line: 878, column: 4 }, end: { line: 878, column: 12 } },
'145': { start: { line: 881, column: 2 }, end: { line: 881, column: 19 } },
'146': { start: { line: 882, column: 2 }, end: { line: 882, column: 19 } },
'147': { start: { line: 883, column: 2 }, end: { line: 883, column: 19 } },
'148': { start: { line: 885, column: 2 }, end: { line: 885, column: 25 } },
'149': { start: { line: 886, column: 2 }, end: { line: 886, column: 25 } },
'150': { start: { line: 887, column: 2 }, end: { line: 887, column: 25 } },
'151': { start: { line: 889, column: 2 }, end: { line: 889, column: 17 } },
'152': { start: { line: 890, column: 2 }, end: { line: 890, column: 17 } },
'153': { start: { line: 891, column: 2 }, end: { line: 891, column: 17 } },
'154': { start: { line: 893, column: 16 }, end: { line: 893, column: 36 } },
'155': { start: { line: 899, column: 2 }, end: { line: 902, column: 63 } },
'156': { start: { line: 904, column: 13 }, end: { line: 904, column: 18 } },
'157': { start: { line: 905, column: 13 }, end: { line: 905, column: 18 } },
'158': { start: { line: 906, column: 13 }, end: { line: 906, column: 18 } },
'159': { start: { line: 908, column: 2 }, end: { line: 908, column: 44 } },
'160': { start: { line: 910, column: 2 }, end: { line: 929, column: 3 } },
'161': { start: { line: 911, column: 4 }, end: { line: 928, column: 6 } },
'162': { start: { line: 930, column: 2 }, end: { line: 930, column: 14 } },
'163': { start: { line: 983, column: 0 }, end: { line: 1003, column: 2 } },
'164': { start: { line: 984, column: 16 }, end: { line: 984, column: 36 } },
'165': { start: { line: 988, column: 13 }, end: { line: 988, column: 61 } },
'166': { start: { line: 989, column: 13 }, end: { line: 989, column: 61 } },
'167': { start: { line: 990, column: 13 }, end: { line: 990, column: 61 } },
'168': { start: { line: 992, column: 2 }, end: { line: 1002, column: 4 } },
'169': { start: { line: 1049, column: 0 }, end: { line: 1065, column: 2 } },
'170': {
start: { line: 1050, column: 16 },
end: { line: 1050, column: 29 }
},
'171': {
start: { line: 1051, column: 16 },
end: { line: 1051, column: 29 }
},
'172': {
start: { line: 1052, column: 16 },
end: { line: 1052, column: 29 }
},
'173': { start: { line: 1054, column: 2 }, end: { line: 1064, column: 4 } },
'174': { start: { line: 1073, column: 0 }, end: { line: 1085, column: 2 } },
'175': {
start: { line: 1074, column: 2 },
end: { line: 1074, column: 45 }
},
'176': {
start: { line: 1075, column: 2 },
end: { line: 1075, column: 73 }
},
'177': {
start: { line: 1076, column: 2 },
end: { line: 1076, column: 23 }
},
'178': {
start: { line: 1077, column: 2 },
end: { line: 1077, column: 23 }
},
'179': {
start: { line: 1078, column: 2 },
end: { line: 1079, column: 72 }
},
'180': {
start: { line: 1080, column: 2 },
end: { line: 1080, column: 26 }
},
'181': {
start: { line: 1081, column: 2 },
end: { line: 1081, column: 26 }
},
'182': {
start: { line: 1082, column: 2 },
end: { line: 1082, column: 26 }
},
'183': {
start: { line: 1083, column: 2 },
end: { line: 1083, column: 50 }
},
'184': {
start: { line: 1084, column: 2 },
end: { line: 1084, column: 48 }
},
'185': { start: { line: 1089, column: 0 }, end: { line: 1108, column: 2 } },
'186': {
start: { line: 1090, column: 2 },
end: { line: 1090, column: 41 }
},
'187': {
start: { line: 1091, column: 2 },
end: { line: 1091, column: 45 }
},
'188': {
start: { line: 1092, column: 2 },
end: { line: 1092, column: 31 }
},
'189': {
start: { line: 1093, column: 2 },
end: { line: 1093, column: 31 }
},
'190': {
start: { line: 1094, column: 2 },
end: { line: 1094, column: 31 }
},
'191': {
start: { line: 1095, column: 2 },
end: { line: 1095, column: 37 }
},
'192': {
start: { line: 1096, column: 2 },
end: { line: 1096, column: 37 }
},
'193': {
start: { line: 1097, column: 2 },
end: { line: 1097, column: 37 }
},
'194': {
start: { line: 1098, column: 2 },
end: { line: 1098, column: 15 }
},
'195': {
start: { line: 1099, column: 2 },
end: { line: 1099, column: 15 }
},
'196': {
start: { line: 1100, column: 2 },
end: { line: 1100, column: 15 }
},
'197': {
start: { line: 1101, column: 2 },
end: { line: 1101, column: 43 }
},
'198': {
start: { line: 1102, column: 2 },
end: { line: 1102, column: 41 }
},
'199': {
start: { line: 1104, column: 2 },
end: { line: 1104, column: 21 }
},
'200': {
start: { line: 1105, column: 2 },
end: { line: 1105, column: 16 }
},
'201': {
start: { line: 1107, column: 2 },
end: { line: 1107, column: 30 }
},
'202': { start: { line: 1110, column: 0 }, end: { line: 1121, column: 2 } },
'203': { start: { line: 1112, column: 2 }, end: { line: 1120, column: 3 } },
'204': {
start: { line: 1113, column: 4 },
end: { line: 1113, column: 41 }
},
'205': {
start: { line: 1114, column: 4 },
end: { line: 1114, column: 29 }
},
'206': { start: { line: 1116, column: 4 }, end: { line: 1119, column: 6 } },
'207': { start: { line: 1128, column: 0 }, end: { line: 1147, column: 2 } },
'208': {
start: { line: 1129, column: 15 },
end: { line: 1129, column: 44 }
},
'209': {
start: { line: 1130, column: 2 },
end: { line: 1130, column: 34 }
},
'210': {
start: { line: 1131, column: 2 },
end: { line: 1131, column: 38 }
},
'211': {
start: { line: 1132, column: 2 },
end: { line: 1132, column: 24 }
},
'212': {
start: { line: 1133, column: 2 },
end: { line: 1133, column: 24 }
},
'213': {
start: { line: 1134, column: 2 },
end: { line: 1134, column: 24 }
},
'214': {
start: { line: 1135, column: 2 },
end: { line: 1135, column: 30 }
},
'215': {
start: { line: 1136, column: 2 },
end: { line: 1136, column: 30 }
},
'216': {
start: { line: 1137, column: 2 },
end: { line: 1137, column: 30 }
},
'217': {
start: { line: 1138, column: 2 },
end: { line: 1138, column: 36 }
},
'218': {
start: { line: 1139, column: 2 },
end: { line: 1139, column: 34 }
},
'219': {
start: { line: 1141, column: 2 },
end: { line: 1141, column: 36 }
},
'220': {
start: { line: 1143, column: 2 },
end: { line: 1143, column: 47 }
},
'221': {
start: { line: 1144, column: 2 },
end: { line: 1144, column: 43 }
},
'222': {
start: { line: 1146, column: 2 },
end: { line: 1146, column: 14 }
},
'223': { start: { line: 1155, column: 0 }, end: { line: 1205, column: 2 } },
'224': {
start: { line: 1157, column: 11 },
end: { line: 1157, column: 35 }
},
'225': {
start: { line: 1158, column: 11 },
end: { line: 1158, column: 35 }
},
'226': {
start: { line: 1159, column: 11 },
end: { line: 1159, column: 35 }
},
'227': {
start: { line: 1162, column: 18 },
end: { line: 1162, column: 56 }
},
'228': { start: { line: 1163, column: 2 }, end: { line: 1167, column: 3 } },
'229': {
start: { line: 1164, column: 4 },
end: { line: 1164, column: 18 }
},
'230': {
start: { line: 1165, column: 4 },
end: { line: 1165, column: 18 }
},
'231': {
start: { line: 1166, column: 4 },
end: { line: 1166, column: 18 }
},
'232': {
start: { line: 1170, column: 11 },
end: { line: 1170, column: 19 }
},
'233': {
start: { line: 1171, column: 11 },
end: { line: 1171, column: 19 }
},
'234': {
start: { line: 1172, column: 11 },
end: { line: 1172, column: 19 }
},
'235': {
start: { line: 1175, column: 11 },
end: { line: 1175, column: 28 }
},
'236': {
start: { line: 1176, column: 11 },
end: { line: 1176, column: 29 }
},
'237': {
start: { line: 1177, column: 11 },
end: { line: 1177, column: 28 }
},
'238': {
start: { line: 1180, column: 2 },
end: { line: 1180, column: 25 }
},
'239': {
start: { line: 1181, column: 2 },
end: { line: 1181, column: 26 }
},
'240': {
start: { line: 1182, column: 2 },
end: { line: 1182, column: 25 }
},
'241': {
start: { line: 1186, column: 15 },
end: { line: 1186, column: 53 }
},
'242': { start: { line: 1187, column: 2 }, end: { line: 1191, column: 3 } },
'243': {
start: { line: 1188, column: 4 },
end: { line: 1188, column: 15 }
},
'244': {
start: { line: 1189, column: 4 },
end: { line: 1189, column: 15 }
},
'245': {
start: { line: 1190, column: 4 },
end: { line: 1190, column: 15 }
},
'246': {
start: { line: 1193, column: 15 },
end: { line: 1193, column: 53 }
},
'247': { start: { line: 1194, column: 2 }, end: { line: 1198, column: 3 } },
'248': {
start: { line: 1195, column: 4 },
end: { line: 1195, column: 15 }
},
'249': {
start: { line: 1196, column: 4 },
end: { line: 1196, column: 15 }
},
'250': {
start: { line: 1197, column: 4 },
end: { line: 1197, column: 15 }
},
'251': { start: { line: 1200, column: 2 }, end: { line: 1204, column: 4 } },
'252': { start: { line: 1215, column: 0 }, end: { line: 1259, column: 2 } },
'253': {
start: { line: 1216, column: 16 },
end: { line: 1216, column: 40 }
},
'254': {
start: { line: 1217, column: 16 },
end: { line: 1217, column: 40 }
},
'255': {
start: { line: 1218, column: 16 },
end: { line: 1218, column: 40 }
},
'256': {
start: { line: 1221, column: 18 },
end: { line: 1221, column: 74 }
},
'257': {
start: { line: 1223, column: 17 },
end: { line: 1223, column: 41 }
},
'258': {
start: { line: 1224, column: 15 },
end: { line: 1224, column: 70 }
},
'259': {
start: { line: 1227, column: 2 },
end: { line: 1227, column: 21 }
},
'260': {
start: { line: 1228, column: 2 },
end: { line: 1228, column: 17 }
},
'261': {
start: { line: 1229, column: 2 },
end: { line: 1229, column: 23 }
},
'262': { start: { line: 1232, column: 2 }, end: { line: 1234, column: 3 } },
'263': {
start: { line: 1233, column: 4 },
end: { line: 1233, column: 20 }
},
'264': { start: { line: 1237, column: 2 }, end: { line: 1241, column: 3 } },
'265': {
start: { line: 1238, column: 4 },
end: { line: 1238, column: 21 }
},
'266': { start: { line: 1239, column: 9 }, end: { line: 1241, column: 3 } },
'267': {
start: { line: 1240, column: 4 },
end: { line: 1240, column: 19 }
},
'268': {
start: { line: 1244, column: 13 },
end: { line: 1244, column: 62 }
},
'269': {
start: { line: 1245, column: 13 },
end: { line: 1245, column: 41 }
},
'270': {
start: { line: 1246, column: 13 },
end: { line: 1246, column: 62 }
},
'271': { start: { line: 1248, column: 2 }, end: { line: 1258, column: 4 } },
'272': { start: { line: 1266, column: 0 }, end: { line: 1268, column: 2 } },
'273': {
start: { line: 1267, column: 2 },
end: { line: 1267, column: 44 }
},
'274': { start: { line: 1341, column: 0 }, end: { line: 1363, column: 2 } },
'275': {
start: { line: 1342, column: 2 },
end: { line: 1342, column: 34 }
},
'276': { start: { line: 1345, column: 2 }, end: { line: 1362, column: 4 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: { line: 108, column: 22 },
end: { line: 108, column: 23 }
},
loc: { start: { line: 108, column: 40 }, end: { line: 113, column: 1 } },
line: 108
},
'1': {
name: '(anonymous_1)',
decl: {
start: { line: 168, column: 27 },
end: { line: 168, column: 28 }
},
loc: { start: { line: 168, column: 45 }, end: { line: 173, column: 1 } },
line: 168
},
'2': {
name: '(anonymous_2)',
decl: {
start: { line: 224, column: 21 },
end: { line: 224, column: 22 }
},
loc: { start: { line: 224, column: 39 }, end: { line: 229, column: 1 } },
line: 224
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 286, column: 23 },
end: { line: 286, column: 24 }
},
loc: { start: { line: 286, column: 41 }, end: { line: 291, column: 1 } },
line: 286
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 325, column: 28 },
end: { line: 325, column: 29 }
},
loc: { start: { line: 325, column: 39 }, end: { line: 337, column: 1 } },
line: 325
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 412, column: 12 },
end: { line: 412, column: 13 }
},
loc: { start: { line: 412, column: 31 }, end: { line: 419, column: 1 } },
line: 412
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 432, column: 34 },
end: { line: 432, column: 35 }
},
loc: { start: { line: 432, column: 68 }, end: { line: 503, column: 1 } },
line: 432
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 511, column: 28 },
end: { line: 511, column: 29 }
},
loc: { start: { line: 511, column: 74 }, end: { line: 562, column: 1 } },
line: 511
},
'8': {
name: '(anonymous_8)',
decl: {
start: { line: 568, column: 30 },
end: { line: 568, column: 31 }
},
loc: { start: { line: 568, column: 76 }, end: { line: 619, column: 1 } },
line: 568
},
'9': {
name: '(anonymous_9)',
decl: {
start: { line: 631, column: 34 },
end: { line: 631, column: 35 }
},
loc: { start: { line: 631, column: 55 }, end: { line: 667, column: 1 } },
line: 631
},
'10': {
name: '(anonymous_10)',
decl: {
start: { line: 722, column: 26 },
end: { line: 722, column: 27 }
},
loc: { start: { line: 722, column: 43 }, end: { line: 725, column: 1 } },
line: 722
},
'11': {
name: '(anonymous_11)',
decl: {
start: { line: 780, column: 27 },
end: { line: 780, column: 28 }
},
loc: { start: { line: 780, column: 44 }, end: { line: 783, column: 1 } },
line: 780
},
'12': {
name: '(anonymous_12)',
decl: {
start: { line: 834, column: 29 },
end: { line: 834, column: 30 }
},
loc: { start: { line: 834, column: 47 }, end: { line: 846, column: 1 } },
line: 834
},
'13': {
name: '(anonymous_13)',
decl: {
start: { line: 858, column: 29 },
end: { line: 858, column: 30 }
},
loc: { start: { line: 868, column: 2 }, end: { line: 931, column: 1 } },
line: 868
},
'14': {
name: '(anonymous_14)',
decl: {
start: { line: 983, column: 27 },
end: { line: 983, column: 28 }
},
loc: { start: { line: 983, column: 45 }, end: { line: 1003, column: 1 } },
line: 983
},
'15': {
name: '(anonymous_15)',
decl: {
start: { line: 1049, column: 34 },
end: { line: 1049, column: 35 }
},
loc: {
start: { line: 1049, column: 52 },
end: { line: 1065, column: 1 }
},
line: 1049
},
'16': {
name: '(anonymous_16)',
decl: {
start: { line: 1073, column: 52 },
end: { line: 1073, column: 53 }
},
loc: {
start: { line: 1073, column: 63 },
end: { line: 1085, column: 1 }
},
line: 1073
},
'17': {
name: '(anonymous_17)',
decl: {
start: { line: 1089, column: 40 },
end: { line: 1089, column: 41 }
},
loc: {
start: { line: 1089, column: 51 },
end: { line: 1108, column: 1 }
},
line: 1089
},
'18': {
name: '(anonymous_18)',
decl: {
start: { line: 1110, column: 30 },
end: { line: 1110, column: 31 }
},
loc: {
start: { line: 1110, column: 41 },
end: { line: 1121, column: 1 }
},
line: 1110
},
'19': {
name: '(anonymous_19)',
decl: {
start: { line: 1128, column: 27 },
end: { line: 1128, column: 28 }
},
loc: {
start: { line: 1128, column: 38 },
end: { line: 1147, column: 1 }
},
line: 1128
},
'20': {
name: '(anonymous_20)',
decl: {
start: { line: 1155, column: 36 },
end: { line: 1155, column: 37 }
},
loc: {
start: { line: 1155, column: 47 },
end: { line: 1205, column: 1 }
},
line: 1155
},
'21': {
name: '(anonymous_21)',
decl: {
start: { line: 1215, column: 29 },
end: { line: 1215, column: 30 }
},
loc: {
start: { line: 1215, column: 61 },
end: { line: 1259, column: 1 }
},
line: 1215
},
'22': {
name: '(anonymous_22)',
decl: {
start: { line: 1266, column: 32 },
end: { line: 1266, column: 33 }
},
loc: {
start: { line: 1266, column: 43 },
end: { line: 1268, column: 1 }
},
line: 1266
},
'23': {
name: '(anonymous_23)',
decl: {
start: { line: 1341, column: 25 },
end: { line: 1341, column: 26 }
},
loc: {
start: { line: 1341, column: 39 },
end: { line: 1363, column: 1 }
},
line: 1341
}
},
branchMap: {
'0': {
loc: { start: { line: 433, column: 20 }, end: { line: 433, column: 63 } },
type: 'cond-expr',
locations: [
{ start: { line: 433, column: 43 }, end: { line: 433, column: 51 } },
{ start: { line: 433, column: 54 }, end: { line: 433, column: 63 } }
],
line: 433
},
'1': {
loc: { start: { line: 434, column: 2 }, end: { line: 442, column: 3 } },
type: 'if',
locations: [
{ start: { line: 434, column: 2 }, end: { line: 442, column: 3 } },
{ start: { line: 434, column: 2 }, end: { line: 442, column: 3 } }
],
line: 434
},
'2': {
loc: { start: { line: 443, column: 2 }, end: { line: 445, column: 3 } },
type: 'if',
locations: [
{ start: { line: 443, column: 2 }, end: { line: 445, column: 3 } },
{ start: { line: 443, column: 2 }, end: { line: 445, column: 3 } }
],
line: 443
},
'3': {
loc: { start: { line: 446, column: 2 }, end: { line: 448, column: 3 } },
type: 'if',
locations: [
{ start: { line: 446, column: 2 }, end: { line: 448, column: 3 } },
{ start: { line: 446, column: 2 }, end: { line: 448, column: 3 } }
],
line: 446
},
'4': {
loc: { start: { line: 449, column: 2 }, end: { line: 451, column: 3 } },
type: 'if',
locations: [
{ start: { line: 449, column: 2 }, end: { line: 451, column: 3 } },
{ start: { line: 449, column: 2 }, end: { line: 451, column: 3 } }
],
line: 449
},
'5': {
loc: { start: { line: 453, column: 2 }, end: { line: 459, column: 3 } },
type: 'if',
locations: [
{ start: { line: 453, column: 2 }, end: { line: 459, column: 3 } },
{ start: { line: 453, column: 2 }, end: { line: 459, column: 3 } }
],
line: 453
},
'6': {
loc: { start: { line: 461, column: 2 }, end: { line: 466, column: 3 } },
type: 'if',
locations: [
{ start: { line: 461, column: 2 }, end: { line: 466, column: 3 } },
{ start: { line: 461, column: 2 }, end: { line: 466, column: 3 } }
],
line: 461
},
'7': {
loc: { start: { line: 483, column: 2 }, end: { line: 502, column: 3 } },
type: 'if',
locations: [
{ start: { line: 483, column: 2 }, end: { line: 502, column: 3 } },
{ start: { line: 483, column: 2 }, end: { line: 502, column: 3 } }
],
line: 483
},
'8': {
loc: { start: { line: 512, column: 2 }, end: { line: 512, column: 59 } },
type: 'if',
locations: [
{ start: { line: 512, column: 2 }, end: { line: 512, column: 59 } },
{ start: { line: 512, column: 2 }, end: { line: 512, column: 59 } }
],
line: 512
},
'9': {
loc: { start: { line: 513, column: 2 }, end: { line: 513, column: 61 } },
type: 'if',
locations: [
{ start: { line: 513, column: 2 }, end: { line: 513, column: 61 } },
{ start: { line: 513, column: 2 }, end: { line: 513, column: 61 } }
],
line: 513
},
'10': {
loc: { start: { line: 514, column: 2 }, end: { line: 514, column: 64 } },
type: 'if',
locations: [
{ start: { line: 514, column: 2 }, end: { line: 514, column: 64 } },
{ start: { line: 514, column: 2 }, end: { line: 514, column: 64 } }
],
line: 514
},
'11': {
loc: { start: { line: 515, column: 2 }, end: { line: 515, column: 58 } },
type: 'if',
locations: [
{ start: { line: 515, column: 2 }, end: { line: 515, column: 58 } },
{ start: { line: 515, column: 2 }, end: { line: 515, column: 58 } }
],
line: 515
},
'12': {
loc: { start: { line: 516, column: 2 }, end: { line: 516, column: 35 } },
type: 'if',
locations: [
{ start: { line: 516, column: 2 }, end: { line: 516, column: 35 } },
{ start: { line: 516, column: 2 }, end: { line: 516, column: 35 } }
],
line: 516
},
'13': {
loc: { start: { line: 517, column: 2 }, end: { line: 518, column: 64 } },
type: 'if',
locations: [
{ start: { line: 517, column: 2 }, end: { line: 518, column: 64 } },
{ start: { line: 517, column: 2 }, end: { line: 518, column: 64 } }
],
line: 517
},
'14': {
loc: { start: { line: 540, column: 2 }, end: { line: 559, column: 3 } },
type: 'if',
locations: [
{ start: { line: 540, column: 2 }, end: { line: 559, column: 3 } },
{ start: { line: 540, column: 2 }, end: { line: 559, column: 3 } }
],
line: 540
},
'15': {
loc: { start: { line: 569, column: 2 }, end: { line: 569, column: 59 } },
type: 'if',
locations: [
{ start: { line: 569, column: 2 }, end: { line: 569, column: 59 } },
{ start: { line: 569, column: 2 }, end: { line: 569, column: 59 } }
],
line: 569
},
'16': {
loc: { start: { line: 570, column: 2 }, end: { line: 570, column: 61 } },
type: 'if',
locations: [
{ start: { line: 570, column: 2 }, end: { line: 570, column: 61 } },
{ start: { line: 570, column: 2 }, end: { line: 570, column: 61 } }
],
line: 570
},
'17': {
loc: { start: { line: 571, column: 2 }, end: { line: 571, column: 64 } },
type: 'if',
locations: [
{ start: { line: 571, column: 2 }, end: { line: 571, column: 64 } },
{ start: { line: 571, column: 2 }, end: { line: 571, column: 64 } }
],
line: 571
},
'18': {
loc: { start: { line: 572, column: 2 }, end: { line: 572, column: 58 } },
type: 'if',
locations: [
{ start: { line: 572, column: 2 }, end: { line: 572, column: 58 } },
{ start: { line: 572, column: 2 }, end: { line: 572, column: 58 } }
],
line: 572
},
'19': {
loc: { start: { line: 573, column: 2 }, end: { line: 573, column: 35 } },
type: 'if',
locations: [
{ start: { line: 573, column: 2 }, end: { line: 573, column: 35 } },
{ start: { line: 573, column: 2 }, end: { line: 573, column: 35 } }
],
line: 573
},
'20': {
loc: { start: { line: 574, column: 2 }, end: { line: 575, column: 64 } },
type: 'if',
locations: [
{ start: { line: 574, column: 2 }, end: { line: 575, column: 64 } },
{ start: { line: 574, column: 2 }, end: { line: 575, column: 64 } }
],
line: 574
},
'21': {
loc: { start: { line: 597, column: 2 }, end: { line: 616, column: 3 } },
type: 'if',
locations: [
{ start: { line: 597, column: 2 }, end: { line: 616, column: 3 } },
{ start: { line: 597, column: 2 }, end: { line: 616, column: 3 } }
],
line: 597
},
'22': {
loc: { start: { line: 869, column: 2 }, end: { line: 879, column: 3 } },
type: 'if',
locations: [
{ start: { line: 869, column: 2 }, end: { line: 879, column: 3 } },
{ start: { line: 869, column: 2 }, end: { line: 879, column: 3 } }
],
line: 869
},
'23': {
loc: { start: { line: 910, column: 2 }, end: { line: 929, column: 3 } },
type: 'if',
locations: [
{ start: { line: 910, column: 2 }, end: { line: 929, column: 3 } },
{ start: { line: 910, column: 2 }, end: { line: 929, column: 3 } }
],
line: 910
},
'24': {
loc: { start: { line: 1112, column: 2 }, end: { line: 1120, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1112, column: 2 }, end: { line: 1120, column: 3 } },
{ start: { line: 1112, column: 2 }, end: { line: 1120, column: 3 } }
],
line: 1112
},
'25': {
loc: { start: { line: 1163, column: 2 }, end: { line: 1167, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1163, column: 2 }, end: { line: 1167, column: 3 } },
{ start: { line: 1163, column: 2 }, end: { line: 1167, column: 3 } }
],
line: 1163
},
'26': {
loc: { start: { line: 1187, column: 2 }, end: { line: 1191, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1187, column: 2 }, end: { line: 1191, column: 3 } },
{ start: { line: 1187, column: 2 }, end: { line: 1191, column: 3 } }
],
line: 1187
},
'27': {
loc: { start: { line: 1194, column: 2 }, end: { line: 1198, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1194, column: 2 }, end: { line: 1198, column: 3 } },
{ start: { line: 1194, column: 2 }, end: { line: 1198, column: 3 } }
],
line: 1194
},
'28': {
loc: { start: { line: 1232, column: 2 }, end: { line: 1234, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1232, column: 2 }, end: { line: 1234, column: 3 } },
{ start: { line: 1232, column: 2 }, end: { line: 1234, column: 3 } }
],
line: 1232
},
'29': {
loc: { start: { line: 1237, column: 2 }, end: { line: 1241, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1237, column: 2 }, end: { line: 1241, column: 3 } },
{ start: { line: 1237, column: 2 }, end: { line: 1241, column: 3 } }
],
line: 1237
},
'30': {
loc: { start: { line: 1239, column: 9 }, end: { line: 1241, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1239, column: 9 }, end: { line: 1241, column: 3 } },
{ start: { line: 1239, column: 9 }, end: { line: 1241, column: 3 } }
],
line: 1239
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0,
'123': 0,
'124': 0,
'125': 0,
'126': 0,
'127': 0,
'128': 0,
'129': 0,
'130': 0,
'131': 0,
'132': 0,
'133': 0,
'134': 0,
'135': 0,
'136': 0,
'137': 0,
'138': 0,
'139': 0,
'140': 0,
'141': 0,
'142': 0,
'143': 0,
'144': 0,
'145': 0,
'146': 0,
'147': 0,
'148': 0,
'149': 0,
'150': 0,
'151': 0,
'152': 0,
'153': 0,
'154': 0,
'155': 0,
'156': 0,
'157': 0,
'158': 0,
'159': 0,
'160': 0,
'161': 0,
'162': 0,
'163': 0,
'164': 0,
'165': 0,
'166': 0,
'167': 0,
'168': 0,
'169': 0,
'170': 0,
'171': 0,
'172': 0,
'173': 0,
'174': 0,
'175': 0,
'176': 0,
'177': 0,
'178': 0,
'179': 0,
'180': 0,
'181': 0,
'182': 0,
'183': 0,
'184': 0,
'185': 0,
'186': 0,
'187': 0,
'188': 0,
'189': 0,
'190': 0,
'191': 0,
'192': 0,
'193': 0,
'194': 0,
'195': 0,
'196': 0,
'197': 0,
'198': 0,
'199': 0,
'200': 0,
'201': 0,
'202': 0,
'203': 0,
'204': 0,
'205': 0,
'206': 0,
'207': 0,
'208': 0,
'209': 0,
'210': 0,
'211': 0,
'212': 0,
'213': 0,
'214': 0,
'215': 0,
'216': 0,
'217': 0,
'218': 0,
'219': 0,
'220': 0,
'221': 0,
'222': 0,
'223': 0,
'224': 0,
'225': 0,
'226': 0,
'227': 0,
'228': 0,
'229': 0,
'230': 0,
'231': 0,
'232': 0,
'233': 0,
'234': 0,
'235': 0,
'236': 0,
'237': 0,
'238': 0,
'239': 0,
'240': 0,
'241': 0,
'242': 0,
'243': 0,
'244': 0,
'245': 0,
'246': 0,
'247': 0,
'248': 0,
'249': 0,
'250': 0,
'251': 0,
'252': 0,
'253': 0,
'254': 0,
'255': 0,
'256': 0,
'257': 0,
'258': 0,
'259': 0,
'260': 0,
'261': 0,
'262': 0,
'263': 0,
'264': 0,
'265': 0,
'266': 0,
'267': 0,
'268': 0,
'269': 0,
'270': 0,
'271': 0,
'272': 0,
'273': 0,
'274': 0,
'275': 0,
'276': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0],
'20': [0, 0],
'21': [0, 0],
'22': [0, 0],
'23': [0, 0],
'24': [0, 0],
'25': [0, 0],
'26': [0, 0],
'27': [0, 0],
'28': [0, 0],
'29': [0, 0],
'30': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '349c6ec6f17363fec518bd06f24c006f62e61c5a'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_coydg3ubv.s[0]++;
////////////////////////////////////////////////////////////////////////////////
// p5.Prototype Methods
////////////////////////////////////////////////////////////////////////////////
/**
* Sets the camera position for a 3D sketch. Parameters for this function define
* the position for the camera, the center of the sketch (where the camera is
* pointing), and an up direction (the orientation of the camera).
*
* This function simulates the movements of the camera, allowing objects to be
* viewed from various angles. Remember, it does not move the objects themselves
* but the camera instead. For example when centerX value is positive, the camera
* is rotating to the right side of the sketch, so the object would seem like
* moving to the left.
*
* See this example
* to view the position of your camera.
*
* When called with no arguments, this function creates a default camera
* equivalent to
* camera(0, 0, (height/2.0) / tan(PI*30.0 / 180.0), 0, 0, 0, 0, 1, 0);
* @method camera
* @constructor
* @for p5
* @param {Number} [x] camera position value on x axis
* @param {Number} [y] camera position value on y axis
* @param {Number} [z] camera position value on z axis
* @param {Number} [centerX] x coordinate representing center of the sketch
* @param {Number} [centerY] y coordinate representing center of the sketch
* @param {Number} [centerZ] z coordinate representing center of the sketch
* @param {Number} [upX] x component of direction 'up' from camera
* @param {Number} [upY] y component of direction 'up' from camera
* @param {Number} [upZ] z component of direction 'up' from camera
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
* function draw() {
* background(204);
* //move the camera away from the plane by a sin wave
* camera(0, 0, 20 + sin(frameCount * 0.01) * 10, 0, 0, 0, 0, 1, 0);
* plane(10, 10);
* }
*
*
*
* @example
*
*
* //move slider to see changes!
* //sliders control the first 6 parameters of camera()
* let sliderGroup = [];
* let X;
* let Y;
* let Z;
* let centerX;
* let centerY;
* let centerZ;
* let h = 20;
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* //create sliders
* for (var i = 0; i < 6; i++) {
* if (i === 2) {
* sliderGroup[i] = createSlider(10, 400, 200);
* } else {
* sliderGroup[i] = createSlider(-400, 400, 0);
* }
* h = map(i, 0, 6, 5, 85);
* sliderGroup[i].position(10, height + h);
* sliderGroup[i].style('width', '80px');
* }
* }
*
* function draw() {
* background(60);
* // assigning sliders' value to each parameters
* X = sliderGroup[0].value();
* Y = sliderGroup[1].value();
* Z = sliderGroup[2].value();
* centerX = sliderGroup[3].value();
* centerY = sliderGroup[4].value();
* centerZ = sliderGroup[5].value();
* camera(X, Y, Z, centerX, centerY, centerZ, 0, 1, 0);
* stroke(255);
* fill(255, 102, 94);
* box(85);
* }
*
*
* @alt
* White square repeatedly grows to fill canvas and then shrinks.
* An interactive example of a red cube with 3 sliders for moving it across x, y,
* z axis and 3 sliders for shifting it's center.
*/
_main.default.prototype.camera = function() {
var _this$_renderer$_curC;
cov_coydg3ubv.f[0]++;
cov_coydg3ubv.s[1]++;
this._assert3d('camera');
cov_coydg3ubv.s[2]++;
for (
var _len = arguments.length, args = new Array(_len), _key = 0;
_key < _len;
_key++
) {
args[_key] = arguments[_key];
}
_main.default._validateParameters('camera', args);
cov_coydg3ubv.s[3]++;
(_this$_renderer$_curC = this._renderer._curCamera).camera.apply(
_this$_renderer$_curC,
args
);
cov_coydg3ubv.s[4]++;
return this;
};
/**
* Sets a perspective projection for the camera in a 3D sketch. This projection
* represents depth through foreshortening: objects that are close to the camera
* appear their actual size while those that are further away from the camera
* appear smaller. The parameters to this function define the viewing frustum
* (the truncated pyramid within which objects are seen by the camera) through
* vertical field of view, aspect ratio (usually width/height), and near and far
* clipping planes.
*
* When called with no arguments, the defaults
* provided are equivalent to
* perspective(PI/3.0, width/height, eyeZ/10.0, eyeZ*10.0), where eyeZ
* is equal to ((height/2.0) / tan(PI*60.0/360.0));
* @method perspective
* @for p5
* @param {Number} [fovy] camera frustum vertical field of view,
* from bottom to top of view, in angleMode units
* @param {Number} [aspect] camera frustum aspect ratio
* @param {Number} [near] frustum near plane length
* @param {Number} [far] frustum far plane length
* @chainable
* @example
*
*
* //drag the mouse to look around!
* function setup() {
* createCanvas(100, 100, WEBGL);
* perspective(PI / 3.0, width / height, 0.1, 500);
* }
* function draw() {
* background(200);
* orbitControl();
* normalMaterial();
*
* rotateX(-0.3);
* rotateY(-0.2);
* translate(0, 0, -50);
*
* push();
* translate(-15, 0, sin(frameCount / 30) * 95);
* box(30);
* pop();
* push();
* translate(15, 0, sin(frameCount / 30 + PI) * 95);
* box(30);
* pop();
* }
*
*
*
* @alt
* two colored 3D boxes move back and forth, rotating as mouse is dragged.
*/ cov_coydg3ubv.s[5]++;
_main.default.prototype.perspective = function() {
var _this$_renderer$_curC2;
cov_coydg3ubv.f[1]++;
cov_coydg3ubv.s[6]++;
this._assert3d('perspective');
cov_coydg3ubv.s[7]++;
for (
var _len2 = arguments.length, args = new Array(_len2), _key2 = 0;
_key2 < _len2;
_key2++
) {
args[_key2] = arguments[_key2];
}
_main.default._validateParameters('perspective', args);
cov_coydg3ubv.s[8]++;
(_this$_renderer$_curC2 = this._renderer._curCamera).perspective.apply(
_this$_renderer$_curC2,
args
);
cov_coydg3ubv.s[9]++;
return this;
};
/**
* Sets an orthographic projection for the camera in a 3D sketch and defines a
* box-shaped viewing frustum within which objects are seen. In this projection,
* all objects with the same dimension appear the same size, regardless of
* whether they are near or far from the camera. The parameters to this
* function specify the viewing frustum where left and right are the minimum and
* maximum x values, top and bottom are the minimum and maximum y values, and near
* and far are the minimum and maximum z values. If no parameters are given, the
* default is used: ortho(-width/2, width/2, -height/2, height/2).
* @method ortho
* @for p5
* @param {Number} [left] camera frustum left plane
* @param {Number} [right] camera frustum right plane
* @param {Number} [bottom] camera frustum bottom plane
* @param {Number} [top] camera frustum top plane
* @param {Number} [near] camera frustum near plane
* @param {Number} [far] camera frustum far plane
* @chainable
* @example
*
*
* //drag the mouse to look around!
* //there's no vanishing point
* function setup() {
* createCanvas(100, 100, WEBGL);
* ortho(-width / 2, width / 2, height / 2, -height / 2, 0, 500);
* }
* function draw() {
* background(200);
* orbitControl();
* normalMaterial();
*
* rotateX(0.2);
* rotateY(-0.2);
* push();
* translate(-15, 0, sin(frameCount / 30) * 65);
* box(30);
* pop();
* push();
* translate(15, 0, sin(frameCount / 30 + PI) * 65);
* box(30);
* pop();
* }
*
*
*
* @alt
* two 3D boxes move back and forth along same plane, rotating as mouse is dragged.
*/ cov_coydg3ubv.s[10]++;
_main.default.prototype.ortho = function() {
var _this$_renderer$_curC3;
cov_coydg3ubv.f[2]++;
cov_coydg3ubv.s[11]++;
this._assert3d('ortho');
cov_coydg3ubv.s[12]++;
for (
var _len3 = arguments.length, args = new Array(_len3), _key3 = 0;
_key3 < _len3;
_key3++
) {
args[_key3] = arguments[_key3];
}
_main.default._validateParameters('ortho', args);
cov_coydg3ubv.s[13]++;
(_this$_renderer$_curC3 = this._renderer._curCamera).ortho.apply(
_this$_renderer$_curC3,
args
);
cov_coydg3ubv.s[14]++;
return this;
};
/**
* Sets a perspective matrix as defined by the parameters.
*
* A frustum is a geometric form: a pyramid with its top
* cut off. With the viewer's eye at the imaginary top of
* the pyramid, the six planes of the frustum act as clipping
* planes when rendering a 3D view. Thus, any form inside the
* clipping planes is visible; anything outside
* those planes is not visible.
*
* Setting the frustum changes the perspective of the scene being rendered.
* This can be achieved more simply in many cases by using
* perspective().
*
* @method frustum
* @for p5
* @param {Number} [left] camera frustum left plane
* @param {Number} [right] camera frustum right plane
* @param {Number} [bottom] camera frustum bottom plane
* @param {Number} [top] camera frustum top plane
* @param {Number} [near] camera frustum near plane
* @param {Number} [far] camera frustum far plane
* @chainable
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* setAttributes('antialias', true);
* frustum(-0.1, 0.1, -0.1, 0.1, 0.1, 200);
* }
* function draw() {
* background(200);
* orbitControl();
* strokeWeight(10);
* stroke(0, 0, 255);
* noFill();
*
* rotateY(-0.2);
* rotateX(-0.3);
* push();
* translate(-15, 0, sin(frameCount / 30) * 25);
* box(30);
* pop();
* push();
* translate(15, 0, sin(frameCount / 30 + PI) * 25);
* box(30);
* pop();
* }
*
*
*
* @alt
* two 3D boxes move back and forth along same plane, rotating as mouse is dragged.
*/ cov_coydg3ubv.s[15]++;
_main.default.prototype.frustum = function() {
var _this$_renderer$_curC4;
cov_coydg3ubv.f[3]++;
cov_coydg3ubv.s[16]++;
this._assert3d('frustum');
cov_coydg3ubv.s[17]++;
for (
var _len4 = arguments.length, args = new Array(_len4), _key4 = 0;
_key4 < _len4;
_key4++
) {
args[_key4] = arguments[_key4];
}
_main.default._validateParameters('frustum', args);
cov_coydg3ubv.s[18]++;
(_this$_renderer$_curC4 = this._renderer._curCamera).frustum.apply(
_this$_renderer$_curC4,
args
);
cov_coydg3ubv.s[19]++;
return this;
};
////////////////////////////////////////////////////////////////////////////////
// p5.Camera
////////////////////////////////////////////////////////////////////////////////
/**
* Creates a new p5.Camera object and tells the
* renderer to use that camera.
* Returns the p5.Camera object.
* @method createCamera
* @return {p5.Camera} The newly created camera object.
* @for p5
* @example
*
* // Creates a camera object and animates it around a box.
* let camera;
* function setup() {
* createCanvas(100, 100, WEBGL);
* background(0);
* camera = createCamera();
* setCamera(camera);
* }
*
* function draw() {
* camera.lookAt(0, 0, 0);
* camera.setPosition(sin(frameCount / 60) * 200, 0, 100);
* box(20);
* }
*
*
* @alt
* An example that creates a camera and moves it around the box.
*/ cov_coydg3ubv.s[20]++;
_main.default.prototype.createCamera = function() {
cov_coydg3ubv.f[4]++;
cov_coydg3ubv.s[21]++;
this._assert3d('createCamera');
var _cam = (cov_coydg3ubv.s[22]++, new _main.default.Camera(this._renderer));
// compute default camera settings, then set a default camera
cov_coydg3ubv.s[23]++;
_cam._computeCameraDefaultSettings();
cov_coydg3ubv.s[24]++;
_cam._setDefaultCamera();
// set renderer current camera to the new camera
cov_coydg3ubv.s[25]++;
this._renderer._curCamera = _cam;
cov_coydg3ubv.s[26]++;
return _cam;
};
/**
* This class describes a camera for use in p5's
*
* WebGL mode. It contains camera position, orientation, and projection
* information necessary for rendering a 3D scene.
*
* New p5.Camera objects can be made through the
* createCamera() function and controlled through
* the methods described below. A camera created in this way will use a default
* position in the scene and a default perspective projection until these
* properties are changed through the various methods available. It is possible
* to create multiple cameras, in which case the current camera
* can be set through the setCamera() method.
*
* Note:
* The methods below operate in two coordinate systems: the 'world' coordinate
* system describe positions in terms of their relationship to the origin along
* the X, Y and Z axes whereas the camera's 'local' coordinate system
* describes positions from the camera's point of view: left-right, up-down,
* and forward-backward. The move() method,
* for instance, moves the camera along its own axes, whereas the
* setPosition()
* method sets the camera's position in world-space.
*
* @class p5.Camera
* @param {rendererGL} rendererGL instance of WebGL renderer
* @example
*
*
* let cam;
* let delta = 0.01;
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* normalMaterial();
* cam = createCamera();
* // set initial pan angle
* cam.pan(-0.8);
* }
*
* function draw() {
* background(200);
*
* // pan camera according to angle 'delta'
* cam.pan(delta);
*
* // every 160 frames, switch direction
* if (frameCount % 160 === 0) {
* delta *= -1;
* }
*
* rotateX(frameCount * 0.01);
* translate(-100, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* }
*
*
*
* @alt
* camera view pans left and right across a series of rotating 3D boxes.
*/ cov_coydg3ubv.s[27]++;
_main.default.Camera = function(renderer) {
cov_coydg3ubv.f[5]++;
cov_coydg3ubv.s[28]++;
this._renderer = renderer;
cov_coydg3ubv.s[29]++;
this.cameraType = 'default';
cov_coydg3ubv.s[30]++;
this.cameraMatrix = new _main.default.Matrix();
cov_coydg3ubv.s[31]++;
this.projMatrix = new _main.default.Matrix();
};
////////////////////////////////////////////////////////////////////////////////
// Camera Projection Methods
////////////////////////////////////////////////////////////////////////////////
/**
* Sets a perspective projection for a p5.Camera object and sets parameters
* for that projection according to perspective()
* syntax.
* @method perspective
* @for p5.Camera
*/ cov_coydg3ubv.s[32]++;
_main.default.Camera.prototype.perspective = function(fovy, aspect, near, far) {
cov_coydg3ubv.f[6]++;
cov_coydg3ubv.s[33]++;
this.cameraType =
arguments.length > 0
? (cov_coydg3ubv.b[0][0]++, 'custom')
: (cov_coydg3ubv.b[0][1]++, 'default');
cov_coydg3ubv.s[34]++;
if (typeof fovy === 'undefined') {
cov_coydg3ubv.b[1][0]++;
cov_coydg3ubv.s[35]++;
fovy = this.defaultCameraFOV;
// this avoids issue where setting angleMode(DEGREES) before calling
// perspective leads to a smaller than expected FOV (because
// _computeCameraDefaultSettings computes in radians)
cov_coydg3ubv.s[36]++;
this.cameraFOV = fovy;
} else {
cov_coydg3ubv.b[1][1]++;
cov_coydg3ubv.s[37]++;
this.cameraFOV = this._renderer._pInst._toRadians(fovy);
}
cov_coydg3ubv.s[38]++;
if (typeof aspect === 'undefined') {
cov_coydg3ubv.b[2][0]++;
cov_coydg3ubv.s[39]++;
aspect = this.defaultAspectRatio;
} else {
cov_coydg3ubv.b[2][1]++;
}
cov_coydg3ubv.s[40]++;
if (typeof near === 'undefined') {
cov_coydg3ubv.b[3][0]++;
cov_coydg3ubv.s[41]++;
near = this.defaultCameraNear;
} else {
cov_coydg3ubv.b[3][1]++;
}
cov_coydg3ubv.s[42]++;
if (typeof far === 'undefined') {
cov_coydg3ubv.b[4][0]++;
cov_coydg3ubv.s[43]++;
far = this.defaultCameraFar;
} else {
cov_coydg3ubv.b[4][1]++;
}
cov_coydg3ubv.s[44]++;
if (near <= 0.0001) {
cov_coydg3ubv.b[5][0]++;
cov_coydg3ubv.s[45]++;
near = 0.01;
cov_coydg3ubv.s[46]++;
console.log(
'Avoid perspective near plane values close to or below 0. ' +
'Setting value to 0.01.'
);
} else {
cov_coydg3ubv.b[5][1]++;
}
cov_coydg3ubv.s[47]++;
if (far < near) {
cov_coydg3ubv.b[6][0]++;
cov_coydg3ubv.s[48]++;
console.log(
'Perspective far plane value is less than near plane value. ' +
'Nothing will be shown.'
);
} else {
cov_coydg3ubv.b[6][1]++;
}
cov_coydg3ubv.s[49]++;
this.aspectRatio = aspect;
cov_coydg3ubv.s[50]++;
this.cameraNear = near;
cov_coydg3ubv.s[51]++;
this.cameraFar = far;
cov_coydg3ubv.s[52]++;
this.projMatrix = _main.default.Matrix.identity();
var f = (cov_coydg3ubv.s[53]++, 1.0 / Math.tan(this.cameraFOV / 2));
var nf = (cov_coydg3ubv.s[54]++, 1.0 / (this.cameraNear - this.cameraFar));
// prettier-ignore
cov_coydg3ubv.s[55]++;
this.projMatrix.set(
f / aspect,
0,
0,
0,
0,
-f,
0,
0,
0,
0,
(far + near) * nf,
-1,
0,
0,
2 * far * near * nf,
0
);
cov_coydg3ubv.s[56]++;
if (this._isActive()) {
cov_coydg3ubv.b[7][0]++;
cov_coydg3ubv.s[57]++;
this._renderer.uPMatrix.set(
this.projMatrix.mat4[0],
this.projMatrix.mat4[1],
this.projMatrix.mat4[2],
this.projMatrix.mat4[3],
this.projMatrix.mat4[4],
this.projMatrix.mat4[5],
this.projMatrix.mat4[6],
this.projMatrix.mat4[7],
this.projMatrix.mat4[8],
this.projMatrix.mat4[9],
this.projMatrix.mat4[10],
this.projMatrix.mat4[11],
this.projMatrix.mat4[12],
this.projMatrix.mat4[13],
this.projMatrix.mat4[14],
this.projMatrix.mat4[15]
);
} else {
cov_coydg3ubv.b[7][1]++;
}
};
/**
* Sets an orthographic projection for a p5.Camera object and sets parameters
* for that projection according to ortho() syntax.
* @method ortho
* @for p5.Camera
*/ cov_coydg3ubv.s[58]++;
_main.default.Camera.prototype.ortho = function(
left,
right,
bottom,
top,
near,
far
) {
cov_coydg3ubv.f[7]++;
cov_coydg3ubv.s[59]++;
if (left === undefined) {
cov_coydg3ubv.b[8][0]++;
cov_coydg3ubv.s[60]++;
left = -this._renderer.width / 2;
} else {
cov_coydg3ubv.b[8][1]++;
}
cov_coydg3ubv.s[61]++;
if (right === undefined) {
cov_coydg3ubv.b[9][0]++;
cov_coydg3ubv.s[62]++;
right = +this._renderer.width / 2;
} else {
cov_coydg3ubv.b[9][1]++;
}
cov_coydg3ubv.s[63]++;
if (bottom === undefined) {
cov_coydg3ubv.b[10][0]++;
cov_coydg3ubv.s[64]++;
bottom = -this._renderer.height / 2;
} else {
cov_coydg3ubv.b[10][1]++;
}
cov_coydg3ubv.s[65]++;
if (top === undefined) {
cov_coydg3ubv.b[11][0]++;
cov_coydg3ubv.s[66]++;
top = +this._renderer.height / 2;
} else {
cov_coydg3ubv.b[11][1]++;
}
cov_coydg3ubv.s[67]++;
if (near === undefined) {
cov_coydg3ubv.b[12][0]++;
cov_coydg3ubv.s[68]++;
near = 0;
} else {
cov_coydg3ubv.b[12][1]++;
}
cov_coydg3ubv.s[69]++;
if (far === undefined) {
cov_coydg3ubv.b[13][0]++;
cov_coydg3ubv.s[70]++;
far = Math.max(this._renderer.width, this._renderer.height);
} else {
cov_coydg3ubv.b[13][1]++;
}
var w = (cov_coydg3ubv.s[71]++, right - left);
var h = (cov_coydg3ubv.s[72]++, top - bottom);
var d = (cov_coydg3ubv.s[73]++, far - near);
var x = (cov_coydg3ubv.s[74]++, +2.0 / w);
var y = (cov_coydg3ubv.s[75]++, +2.0 / h);
var z = (cov_coydg3ubv.s[76]++, -2.0 / d);
var tx = (cov_coydg3ubv.s[77]++, -(right + left) / w);
var ty = (cov_coydg3ubv.s[78]++, -(top + bottom) / h);
var tz = (cov_coydg3ubv.s[79]++, -(far + near) / d);
cov_coydg3ubv.s[80]++;
this.projMatrix = _main.default.Matrix.identity();
// prettier-ignore
cov_coydg3ubv.s[81]++;
this.projMatrix.set(x, 0, 0, 0, 0, -y, 0, 0, 0, 0, z, 0, tx, ty, tz, 1);
cov_coydg3ubv.s[82]++;
if (this._isActive()) {
cov_coydg3ubv.b[14][0]++;
cov_coydg3ubv.s[83]++;
this._renderer.uPMatrix.set(
this.projMatrix.mat4[0],
this.projMatrix.mat4[1],
this.projMatrix.mat4[2],
this.projMatrix.mat4[3],
this.projMatrix.mat4[4],
this.projMatrix.mat4[5],
this.projMatrix.mat4[6],
this.projMatrix.mat4[7],
this.projMatrix.mat4[8],
this.projMatrix.mat4[9],
this.projMatrix.mat4[10],
this.projMatrix.mat4[11],
this.projMatrix.mat4[12],
this.projMatrix.mat4[13],
this.projMatrix.mat4[14],
this.projMatrix.mat4[15]
);
} else {
cov_coydg3ubv.b[14][1]++;
}
cov_coydg3ubv.s[84]++;
this.cameraType = 'custom';
};
/**
* @method frustum
* @for p5.Camera
*/ cov_coydg3ubv.s[85]++;
_main.default.Camera.prototype.frustum = function(
left,
right,
bottom,
top,
near,
far
) {
cov_coydg3ubv.f[8]++;
cov_coydg3ubv.s[86]++;
if (left === undefined) {
cov_coydg3ubv.b[15][0]++;
cov_coydg3ubv.s[87]++;
left = -this._renderer.width / 2;
} else {
cov_coydg3ubv.b[15][1]++;
}
cov_coydg3ubv.s[88]++;
if (right === undefined) {
cov_coydg3ubv.b[16][0]++;
cov_coydg3ubv.s[89]++;
right = +this._renderer.width / 2;
} else {
cov_coydg3ubv.b[16][1]++;
}
cov_coydg3ubv.s[90]++;
if (bottom === undefined) {
cov_coydg3ubv.b[17][0]++;
cov_coydg3ubv.s[91]++;
bottom = -this._renderer.height / 2;
} else {
cov_coydg3ubv.b[17][1]++;
}
cov_coydg3ubv.s[92]++;
if (top === undefined) {
cov_coydg3ubv.b[18][0]++;
cov_coydg3ubv.s[93]++;
top = +this._renderer.height / 2;
} else {
cov_coydg3ubv.b[18][1]++;
}
cov_coydg3ubv.s[94]++;
if (near === undefined) {
cov_coydg3ubv.b[19][0]++;
cov_coydg3ubv.s[95]++;
near = 0;
} else {
cov_coydg3ubv.b[19][1]++;
}
cov_coydg3ubv.s[96]++;
if (far === undefined) {
cov_coydg3ubv.b[20][0]++;
cov_coydg3ubv.s[97]++;
far = Math.max(this._renderer.width, this._renderer.height);
} else {
cov_coydg3ubv.b[20][1]++;
}
var w = (cov_coydg3ubv.s[98]++, right - left);
var h = (cov_coydg3ubv.s[99]++, top - bottom);
var d = (cov_coydg3ubv.s[100]++, far - near);
var x = (cov_coydg3ubv.s[101]++, +(2.0 * near) / w);
var y = (cov_coydg3ubv.s[102]++, +(2.0 * near) / h);
var z = (cov_coydg3ubv.s[103]++, -(2.0 * far * near) / d);
var tx = (cov_coydg3ubv.s[104]++, (right + left) / w);
var ty = (cov_coydg3ubv.s[105]++, (top + bottom) / h);
var tz = (cov_coydg3ubv.s[106]++, -(far + near) / d);
cov_coydg3ubv.s[107]++;
this.projMatrix = _main.default.Matrix.identity();
// prettier-ignore
cov_coydg3ubv.s[108]++;
this.projMatrix.set(x, 0, 0, 0, 0, y, 0, 0, tx, ty, tz, -1, 0, 0, z, 0);
cov_coydg3ubv.s[109]++;
if (this._isActive()) {
cov_coydg3ubv.b[21][0]++;
cov_coydg3ubv.s[110]++;
this._renderer.uPMatrix.set(
this.projMatrix.mat4[0],
this.projMatrix.mat4[1],
this.projMatrix.mat4[2],
this.projMatrix.mat4[3],
this.projMatrix.mat4[4],
this.projMatrix.mat4[5],
this.projMatrix.mat4[6],
this.projMatrix.mat4[7],
this.projMatrix.mat4[8],
this.projMatrix.mat4[9],
this.projMatrix.mat4[10],
this.projMatrix.mat4[11],
this.projMatrix.mat4[12],
this.projMatrix.mat4[13],
this.projMatrix.mat4[14],
this.projMatrix.mat4[15]
);
} else {
cov_coydg3ubv.b[21][1]++;
}
cov_coydg3ubv.s[111]++;
this.cameraType = 'custom';
};
////////////////////////////////////////////////////////////////////////////////
// Camera Orientation Methods
////////////////////////////////////////////////////////////////////////////////
/**
* Rotate camera view about arbitrary axis defined by x,y,z
* based on http://learnwebgl.brown37.net/07_cameras/camera_rotating_motion.html
* @method _rotateView
* @private
*/ cov_coydg3ubv.s[112]++;
_main.default.Camera.prototype._rotateView = function(a, x, y, z) {
cov_coydg3ubv.f[9]++;
var centerX = (cov_coydg3ubv.s[113]++, this.centerX);
var centerY = (cov_coydg3ubv.s[114]++, this.centerY);
var centerZ = (cov_coydg3ubv.s[115]++, this.centerZ);
// move center by eye position such that rotation happens around eye position
cov_coydg3ubv.s[116]++;
centerX -= this.eyeX;
cov_coydg3ubv.s[117]++;
centerY -= this.eyeY;
cov_coydg3ubv.s[118]++;
centerZ -= this.eyeZ;
var rotation = (cov_coydg3ubv.s[119]++,
_main.default.Matrix.identity(this._renderer._pInst));
cov_coydg3ubv.s[120]++;
rotation.rotate(this._renderer._pInst._toRadians(a), x, y, z);
// prettier-ignore
var rotatedCenter = (cov_coydg3ubv.s[121]++, [
centerX * rotation.mat4[0] + centerY * rotation.mat4[4] + centerZ * rotation.mat4[8],
centerX * rotation.mat4[1] + centerY * rotation.mat4[5] + centerZ * rotation.mat4[9],
centerX * rotation.mat4[2] + centerY * rotation.mat4[6] + centerZ * rotation.mat4[10]]);
// add eye position back into center
cov_coydg3ubv.s[122]++;
rotatedCenter[0] += this.eyeX;
cov_coydg3ubv.s[123]++;
rotatedCenter[1] += this.eyeY;
cov_coydg3ubv.s[124]++;
rotatedCenter[2] += this.eyeZ;
cov_coydg3ubv.s[125]++;
this.camera(
this.eyeX,
this.eyeY,
this.eyeZ,
rotatedCenter[0],
rotatedCenter[1],
rotatedCenter[2],
this.upX,
this.upY,
this.upZ
);
};
/**
* Panning rotates the camera view to the left and right.
* @method pan
* @param {Number} angle amount to rotate camera in current
* angleMode units.
* Greater than 0 values rotate counterclockwise (to the left).
* @example
*
*
* let cam;
* let delta = 0.01;
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* normalMaterial();
* cam = createCamera();
* // set initial pan angle
* cam.pan(-0.8);
* }
*
* function draw() {
* background(200);
*
* // pan camera according to angle 'delta'
* cam.pan(delta);
*
* // every 160 frames, switch direction
* if (frameCount % 160 === 0) {
* delta *= -1;
* }
*
* rotateX(frameCount * 0.01);
* translate(-100, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* }
*
*
*
* @alt
* camera view pans left and right across a series of rotating 3D boxes.
*/ cov_coydg3ubv.s[126]++;
_main.default.Camera.prototype.pan = function(amount) {
cov_coydg3ubv.f[10]++;
var local = (cov_coydg3ubv.s[127]++, this._getLocalAxes());
cov_coydg3ubv.s[128]++;
this._rotateView(amount, local.y[0], local.y[1], local.y[2]);
};
/**
* Tilting rotates the camera view up and down.
* @method tilt
* @param {Number} angle amount to rotate camera in current
* angleMode units.
* Greater than 0 values rotate counterclockwise (to the left).
* @example
*
*
* let cam;
* let delta = 0.01;
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* normalMaterial();
* cam = createCamera();
* // set initial tilt
* cam.tilt(-0.8);
* }
*
* function draw() {
* background(200);
*
* // pan camera according to angle 'delta'
* cam.tilt(delta);
*
* // every 160 frames, switch direction
* if (frameCount % 160 === 0) {
* delta *= -1;
* }
*
* rotateY(frameCount * 0.01);
* translate(0, -100, 0);
* box(20);
* translate(0, 35, 0);
* box(20);
* translate(0, 35, 0);
* box(20);
* translate(0, 35, 0);
* box(20);
* translate(0, 35, 0);
* box(20);
* translate(0, 35, 0);
* box(20);
* translate(0, 35, 0);
* box(20);
* }
*
*
*
* @alt
* camera view tilts up and down across a series of rotating 3D boxes.
*/ cov_coydg3ubv.s[129]++;
_main.default.Camera.prototype.tilt = function(amount) {
cov_coydg3ubv.f[11]++;
var local = (cov_coydg3ubv.s[130]++, this._getLocalAxes());
cov_coydg3ubv.s[131]++;
this._rotateView(amount, local.x[0], local.x[1], local.x[2]);
};
/**
* Reorients the camera to look at a position in world space.
* @method lookAt
* @for p5.Camera
* @param {Number} x x position of a point in world space
* @param {Number} y y position of a point in world space
* @param {Number} z z position of a point in world space
* @example
*
*
* let cam;
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* normalMaterial();
* cam = createCamera();
* }
*
* function draw() {
* background(200);
*
* // look at a new random point every 60 frames
* if (frameCount % 60 === 0) {
* cam.lookAt(random(-100, 100), random(-50, 50), 0);
* }
*
* rotateX(frameCount * 0.01);
* translate(-100, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* }
*
*
*
* @alt
* camera view of rotating 3D cubes changes to look at a new random
* point every second .
*/ cov_coydg3ubv.s[132]++;
_main.default.Camera.prototype.lookAt = function(x, y, z) {
cov_coydg3ubv.f[12]++;
cov_coydg3ubv.s[133]++;
this.camera(
this.eyeX,
this.eyeY,
this.eyeZ,
x,
y,
z,
this.upX,
this.upY,
this.upZ
);
};
////////////////////////////////////////////////////////////////////////////////
// Camera Position Methods
////////////////////////////////////////////////////////////////////////////////
/**
* Sets a camera's position and orientation. This is equivalent to calling
* camera() on a p5.Camera object.
* @method camera
* @for p5.Camera
*/ cov_coydg3ubv.s[134]++;
_main.default.Camera.prototype.camera = function(
eyeX,
eyeY,
eyeZ,
centerX,
centerY,
centerZ,
upX,
upY,
upZ
) {
cov_coydg3ubv.f[13]++;
cov_coydg3ubv.s[135]++;
if (typeof eyeX === 'undefined') {
cov_coydg3ubv.b[22][0]++;
cov_coydg3ubv.s[136]++;
eyeX = this.defaultEyeX;
cov_coydg3ubv.s[137]++;
eyeY = this.defaultEyeY;
cov_coydg3ubv.s[138]++;
eyeZ = this.defaultEyeZ;
cov_coydg3ubv.s[139]++;
centerX = eyeX;
cov_coydg3ubv.s[140]++;
centerY = eyeY;
cov_coydg3ubv.s[141]++;
centerZ = 0;
cov_coydg3ubv.s[142]++;
upX = 0;
cov_coydg3ubv.s[143]++;
upY = 1;
cov_coydg3ubv.s[144]++;
upZ = 0;
} else {
cov_coydg3ubv.b[22][1]++;
}
cov_coydg3ubv.s[145]++;
this.eyeX = eyeX;
cov_coydg3ubv.s[146]++;
this.eyeY = eyeY;
cov_coydg3ubv.s[147]++;
this.eyeZ = eyeZ;
cov_coydg3ubv.s[148]++;
this.centerX = centerX;
cov_coydg3ubv.s[149]++;
this.centerY = centerY;
cov_coydg3ubv.s[150]++;
this.centerZ = centerZ;
cov_coydg3ubv.s[151]++;
this.upX = upX;
cov_coydg3ubv.s[152]++;
this.upY = upY;
cov_coydg3ubv.s[153]++;
this.upZ = upZ;
var local = (cov_coydg3ubv.s[154]++, this._getLocalAxes());
// the camera affects the model view matrix, insofar as it
// inverse translates the world to the eye position of the camera
// and rotates it.
// prettier-ignore
cov_coydg3ubv.s[155]++;
this.cameraMatrix.set(
local.x[0],
local.y[0],
local.z[0],
0,
local.x[1],
local.y[1],
local.z[1],
0,
local.x[2],
local.y[2],
local.z[2],
0,
0,
0,
0,
1
);
var tx = (cov_coydg3ubv.s[156]++, -eyeX);
var ty = (cov_coydg3ubv.s[157]++, -eyeY);
var tz = (cov_coydg3ubv.s[158]++, -eyeZ);
cov_coydg3ubv.s[159]++;
this.cameraMatrix.translate([tx, ty, tz]);
cov_coydg3ubv.s[160]++;
if (this._isActive()) {
cov_coydg3ubv.b[23][0]++;
cov_coydg3ubv.s[161]++;
this._renderer.uMVMatrix.set(
this.cameraMatrix.mat4[0],
this.cameraMatrix.mat4[1],
this.cameraMatrix.mat4[2],
this.cameraMatrix.mat4[3],
this.cameraMatrix.mat4[4],
this.cameraMatrix.mat4[5],
this.cameraMatrix.mat4[6],
this.cameraMatrix.mat4[7],
this.cameraMatrix.mat4[8],
this.cameraMatrix.mat4[9],
this.cameraMatrix.mat4[10],
this.cameraMatrix.mat4[11],
this.cameraMatrix.mat4[12],
this.cameraMatrix.mat4[13],
this.cameraMatrix.mat4[14],
this.cameraMatrix.mat4[15]
);
} else {
cov_coydg3ubv.b[23][1]++;
}
cov_coydg3ubv.s[162]++;
return this;
};
/**
* Move camera along its local axes while maintaining current camera orientation.
* @method move
* @param {Number} x amount to move along camera's left-right axis
* @param {Number} y amount to move along camera's up-down axis
* @param {Number} z amount to move along camera's forward-backward axis
* @example
*
*
* // see the camera move along its own axes while maintaining its orientation
* let cam;
* let delta = 0.5;
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* normalMaterial();
* cam = createCamera();
* }
*
* function draw() {
* background(200);
*
* // move the camera along its local axes
* cam.move(delta, delta, 0);
*
* // every 100 frames, switch direction
* if (frameCount % 150 === 0) {
* delta *= -1;
* }
*
* translate(-10, -10, 0);
* box(50, 8, 50);
* translate(15, 15, 0);
* box(50, 8, 50);
* translate(15, 15, 0);
* box(50, 8, 50);
* translate(15, 15, 0);
* box(50, 8, 50);
* translate(15, 15, 0);
* box(50, 8, 50);
* translate(15, 15, 0);
* box(50, 8, 50);
* }
*
*
*
* @alt
* camera view moves along a series of 3D boxes, maintaining the same
* orientation throughout the move
*/ cov_coydg3ubv.s[163]++;
_main.default.Camera.prototype.move = function(x, y, z) {
cov_coydg3ubv.f[14]++;
var local = (cov_coydg3ubv.s[164]++, this._getLocalAxes());
// scale local axes by movement amounts
// based on http://learnwebgl.brown37.net/07_cameras/camera_linear_motion.html
var dx = (cov_coydg3ubv.s[165]++,
[local.x[0] * x, local.x[1] * x, local.x[2] * x]);
var dy = (cov_coydg3ubv.s[166]++,
[local.y[0] * y, local.y[1] * y, local.y[2] * y]);
var dz = (cov_coydg3ubv.s[167]++,
[local.z[0] * z, local.z[1] * z, local.z[2] * z]);
cov_coydg3ubv.s[168]++;
this.camera(
this.eyeX + dx[0] + dy[0] + dz[0],
this.eyeY + dx[1] + dy[1] + dz[1],
this.eyeZ + dx[2] + dy[2] + dz[2],
this.centerX + dx[0] + dy[0] + dz[0],
this.centerY + dx[1] + dy[1] + dz[1],
this.centerZ + dx[2] + dy[2] + dz[2],
0,
1,
0
);
};
/**
* Set camera position in world-space while maintaining current camera
* orientation.
* @method setPosition
* @param {Number} x x position of a point in world space
* @param {Number} y y position of a point in world space
* @param {Number} z z position of a point in world space
* @example
*
*
* // press '1' '2' or '3' keys to set camera position
*
* let cam;
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* normalMaterial();
* cam = createCamera();
* }
*
* function draw() {
* background(200);
*
* // '1' key
* if (keyIsDown(49)) {
* cam.setPosition(30, 0, 80);
* }
* // '2' key
* if (keyIsDown(50)) {
* cam.setPosition(0, 0, 80);
* }
* // '3' key
* if (keyIsDown(51)) {
* cam.setPosition(-30, 0, 80);
* }
*
* box(20);
* }
*
*
*
* @alt
* camera position changes as the user presses keys, altering view of a 3D box
*/ cov_coydg3ubv.s[169]++;
_main.default.Camera.prototype.setPosition = function(x, y, z) {
cov_coydg3ubv.f[15]++;
var diffX = (cov_coydg3ubv.s[170]++, x - this.eyeX);
var diffY = (cov_coydg3ubv.s[171]++, y - this.eyeY);
var diffZ = (cov_coydg3ubv.s[172]++, z - this.eyeZ);
cov_coydg3ubv.s[173]++;
this.camera(
x,
y,
z,
this.centerX + diffX,
this.centerY + diffY,
this.centerZ + diffZ,
0,
1,
0
);
};
////////////////////////////////////////////////////////////////////////////////
// Camera Helper Methods
////////////////////////////////////////////////////////////////////////////////
// @TODO: combine this function with _setDefaultCamera to compute these values
// as-needed
cov_coydg3ubv.s[174]++;
_main.default.Camera.prototype._computeCameraDefaultSettings = function() {
cov_coydg3ubv.f[16]++;
cov_coydg3ubv.s[175]++;
this.defaultCameraFOV = 60 / 180 * Math.PI;
cov_coydg3ubv.s[176]++;
this.defaultAspectRatio = this._renderer.width / this._renderer.height;
cov_coydg3ubv.s[177]++;
this.defaultEyeX = 0;
cov_coydg3ubv.s[178]++;
this.defaultEyeY = 0;
cov_coydg3ubv.s[179]++;
this.defaultEyeZ =
this._renderer.height / 2.0 / Math.tan(this.defaultCameraFOV / 2.0);
cov_coydg3ubv.s[180]++;
this.defaultCenterX = 0;
cov_coydg3ubv.s[181]++;
this.defaultCenterY = 0;
cov_coydg3ubv.s[182]++;
this.defaultCenterZ = 0;
cov_coydg3ubv.s[183]++;
this.defaultCameraNear = this.defaultEyeZ * 0.1;
cov_coydg3ubv.s[184]++;
this.defaultCameraFar = this.defaultEyeZ * 10;
};
//detect if user didn't set the camera
//then call this function below
cov_coydg3ubv.s[185]++;
_main.default.Camera.prototype._setDefaultCamera = function() {
cov_coydg3ubv.f[17]++;
cov_coydg3ubv.s[186]++;
this.cameraFOV = this.defaultCameraFOV;
cov_coydg3ubv.s[187]++;
this.aspectRatio = this.defaultAspectRatio;
cov_coydg3ubv.s[188]++;
this.eyeX = this.defaultEyeX;
cov_coydg3ubv.s[189]++;
this.eyeY = this.defaultEyeY;
cov_coydg3ubv.s[190]++;
this.eyeZ = this.defaultEyeZ;
cov_coydg3ubv.s[191]++;
this.centerX = this.defaultCenterX;
cov_coydg3ubv.s[192]++;
this.centerY = this.defaultCenterY;
cov_coydg3ubv.s[193]++;
this.centerZ = this.defaultCenterZ;
cov_coydg3ubv.s[194]++;
this.upX = 0;
cov_coydg3ubv.s[195]++;
this.upY = 1;
cov_coydg3ubv.s[196]++;
this.upZ = 0;
cov_coydg3ubv.s[197]++;
this.cameraNear = this.defaultCameraNear;
cov_coydg3ubv.s[198]++;
this.cameraFar = this.defaultCameraFar;
cov_coydg3ubv.s[199]++;
this.perspective();
cov_coydg3ubv.s[200]++;
this.camera();
cov_coydg3ubv.s[201]++;
this.cameraType = 'default';
};
cov_coydg3ubv.s[202]++;
_main.default.Camera.prototype._resize = function() {
cov_coydg3ubv.f[18]++;
cov_coydg3ubv.s[203]++;
// If we're using the default camera, update the aspect ratio
if (this.cameraType === 'default') {
cov_coydg3ubv.b[24][0]++;
cov_coydg3ubv.s[204]++;
this._computeCameraDefaultSettings();
cov_coydg3ubv.s[205]++;
this._setDefaultCamera();
} else {
cov_coydg3ubv.b[24][1]++;
cov_coydg3ubv.s[206]++;
this.perspective(
this.cameraFOV,
this._renderer.width / this._renderer.height
);
}
};
/**
* Returns a copy of a camera.
* @method copy
* @private
*/ cov_coydg3ubv.s[207]++;
_main.default.Camera.prototype.copy = function() {
cov_coydg3ubv.f[19]++;
var _cam = (cov_coydg3ubv.s[208]++, new _main.default.Camera(this._renderer));
cov_coydg3ubv.s[209]++;
_cam.cameraFOV = this.cameraFOV;
cov_coydg3ubv.s[210]++;
_cam.aspectRatio = this.aspectRatio;
cov_coydg3ubv.s[211]++;
_cam.eyeX = this.eyeX;
cov_coydg3ubv.s[212]++;
_cam.eyeY = this.eyeY;
cov_coydg3ubv.s[213]++;
_cam.eyeZ = this.eyeZ;
cov_coydg3ubv.s[214]++;
_cam.centerX = this.centerX;
cov_coydg3ubv.s[215]++;
_cam.centerY = this.centerY;
cov_coydg3ubv.s[216]++;
_cam.centerZ = this.centerZ;
cov_coydg3ubv.s[217]++;
_cam.cameraNear = this.cameraNear;
cov_coydg3ubv.s[218]++;
_cam.cameraFar = this.cameraFar;
cov_coydg3ubv.s[219]++;
_cam.cameraType = this.cameraType;
cov_coydg3ubv.s[220]++;
_cam.cameraMatrix = this.cameraMatrix.copy();
cov_coydg3ubv.s[221]++;
_cam.projMatrix = this.projMatrix.copy();
cov_coydg3ubv.s[222]++;
return _cam;
};
/**
* Returns a camera's local axes: left-right, up-down, and forward-backward,
* as defined by vectors in world-space.
* @method _getLocalAxes
* @private
*/ cov_coydg3ubv.s[223]++;
_main.default.Camera.prototype._getLocalAxes = function() {
cov_coydg3ubv.f[20]++;
// calculate camera local Z vector
var z0 = (cov_coydg3ubv.s[224]++, this.eyeX - this.centerX);
var z1 = (cov_coydg3ubv.s[225]++, this.eyeY - this.centerY);
var z2 = (cov_coydg3ubv.s[226]++, this.eyeZ - this.centerZ);
// normalize camera local Z vector
var eyeDist = (cov_coydg3ubv.s[227]++, Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2));
cov_coydg3ubv.s[228]++;
if (eyeDist !== 0) {
cov_coydg3ubv.b[25][0]++;
cov_coydg3ubv.s[229]++;
z0 /= eyeDist;
cov_coydg3ubv.s[230]++;
z1 /= eyeDist;
cov_coydg3ubv.s[231]++;
z2 /= eyeDist;
} else {
cov_coydg3ubv.b[25][1]++;
}
// calculate camera Y vector
var y0 = (cov_coydg3ubv.s[232]++, this.upX);
var y1 = (cov_coydg3ubv.s[233]++, this.upY);
var y2 = (cov_coydg3ubv.s[234]++, this.upZ);
// compute camera local X vector as up vector (local Y) cross local Z
var x0 = (cov_coydg3ubv.s[235]++, y1 * z2 - y2 * z1);
var x1 = (cov_coydg3ubv.s[236]++, -y0 * z2 + y2 * z0);
var x2 = (cov_coydg3ubv.s[237]++, y0 * z1 - y1 * z0);
// recompute y = z cross x
cov_coydg3ubv.s[238]++;
y0 = z1 * x2 - z2 * x1;
cov_coydg3ubv.s[239]++;
y1 = -z0 * x2 + z2 * x0;
cov_coydg3ubv.s[240]++;
y2 = z0 * x1 - z1 * x0;
// cross product gives area of parallelogram, which is < 1.0 for
// non-perpendicular unit-length vectors; so normalize x, y here:
var xmag = (cov_coydg3ubv.s[241]++, Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2));
cov_coydg3ubv.s[242]++;
if (xmag !== 0) {
cov_coydg3ubv.b[26][0]++;
cov_coydg3ubv.s[243]++;
x0 /= xmag;
cov_coydg3ubv.s[244]++;
x1 /= xmag;
cov_coydg3ubv.s[245]++;
x2 /= xmag;
} else {
cov_coydg3ubv.b[26][1]++;
}
var ymag = (cov_coydg3ubv.s[246]++, Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2));
cov_coydg3ubv.s[247]++;
if (ymag !== 0) {
cov_coydg3ubv.b[27][0]++;
cov_coydg3ubv.s[248]++;
y0 /= ymag;
cov_coydg3ubv.s[249]++;
y1 /= ymag;
cov_coydg3ubv.s[250]++;
y2 /= ymag;
} else {
cov_coydg3ubv.b[27][1]++;
}
cov_coydg3ubv.s[251]++;
return {
x: [x0, x1, x2],
y: [y0, y1, y2],
z: [z0, z1, z2]
};
};
/**
* Orbits the camera about center point. For use with orbitControl().
* @method _orbit
* @private
* @param {Number} dTheta change in spherical coordinate theta
* @param {Number} dPhi change in spherical coordinate phi
* @param {Number} dRadius change in radius
*/ cov_coydg3ubv.s[252]++;
_main.default.Camera.prototype._orbit = function(dTheta, dPhi, dRadius) {
cov_coydg3ubv.f[21]++;
var diffX = (cov_coydg3ubv.s[253]++, this.eyeX - this.centerX);
var diffY = (cov_coydg3ubv.s[254]++, this.eyeY - this.centerY);
var diffZ = (cov_coydg3ubv.s[255]++, this.eyeZ - this.centerZ);
// get spherical coorinates for current camera position about origin
var camRadius = (cov_coydg3ubv.s[256]++,
Math.sqrt(diffX * diffX + diffY * diffY + diffZ * diffZ));
// from https://github.com/mrdoob/three.js/blob/dev/src/math/Spherical.js#L72-L73
var camTheta = (cov_coydg3ubv.s[257]++, Math.atan2(diffX, diffZ)); // equatorial angle
var camPhi = (cov_coydg3ubv.s[258]++,
Math.acos(Math.max(-1, Math.min(1, diffY / camRadius)))); // polar angle
// add change
cov_coydg3ubv.s[259]++;
camTheta += dTheta;
cov_coydg3ubv.s[260]++;
camPhi += dPhi;
cov_coydg3ubv.s[261]++;
camRadius += dRadius;
// prevent zooming through the center:
cov_coydg3ubv.s[262]++;
if (camRadius < 0) {
cov_coydg3ubv.b[28][0]++;
cov_coydg3ubv.s[263]++;
camRadius = 0.1;
} else {
cov_coydg3ubv.b[28][1]++;
}
// prevent rotation over the zenith / under bottom
cov_coydg3ubv.s[264]++;
if (camPhi > Math.PI) {
cov_coydg3ubv.b[29][0]++;
cov_coydg3ubv.s[265]++;
camPhi = Math.PI;
} else {
cov_coydg3ubv.b[29][1]++;
cov_coydg3ubv.s[266]++;
if (camPhi <= 0) {
cov_coydg3ubv.b[30][0]++;
cov_coydg3ubv.s[267]++;
camPhi = 0.001;
} else {
cov_coydg3ubv.b[30][1]++;
}
}
// from https://github.com/mrdoob/three.js/blob/dev/src/math/Vector3.js#L628-L632
var _x = (cov_coydg3ubv.s[268]++,
Math.sin(camPhi) * camRadius * Math.sin(camTheta));
var _y = (cov_coydg3ubv.s[269]++, Math.cos(camPhi) * camRadius);
var _z = (cov_coydg3ubv.s[270]++,
Math.sin(camPhi) * camRadius * Math.cos(camTheta));
cov_coydg3ubv.s[271]++;
this.camera(
_x + this.centerX,
_y + this.centerY,
_z + this.centerZ,
this.centerX,
this.centerY,
this.centerZ,
0,
1,
0
);
};
/**
* Returns true if camera is currently attached to renderer.
* @method _isActive
* @private
*/ cov_coydg3ubv.s[272]++;
_main.default.Camera.prototype._isActive = function() {
cov_coydg3ubv.f[22]++;
cov_coydg3ubv.s[273]++;
return this === this._renderer._curCamera;
};
/**
* Sets rendererGL's current camera to a p5.Camera object. Allows switching
* between multiple cameras.
* @method setCamera
* @param {p5.Camera} cam p5.Camera object
* @for p5
* @example
*
*
* let cam1, cam2;
* let currentCamera;
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* normalMaterial();
*
* cam1 = createCamera();
* cam2 = createCamera();
* cam2.setPosition(30, 0, 50);
* cam2.lookAt(0, 0, 0);
* cam2.ortho();
*
* // set variable for previously active camera:
* currentCamera = 1;
* }
*
* function draw() {
* background(200);
*
* // camera 1:
* cam1.lookAt(0, 0, 0);
* cam1.setPosition(sin(frameCount / 60) * 200, 0, 100);
*
* // every 100 frames, switch between the two cameras
* if (frameCount % 100 === 0) {
* if (currentCamera === 1) {
* setCamera(cam1);
* currentCamera = 0;
* } else {
* setCamera(cam2);
* currentCamera = 1;
* }
* }
*
* drawBoxes();
* }
*
* function drawBoxes() {
* rotateX(frameCount * 0.01);
* translate(-100, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* translate(35, 0, 0);
* box(20);
* }
*
*
*
* @alt
* Canvas switches between two camera views, each showing a series of spinning
* 3D boxes.
*/ cov_coydg3ubv.s[274]++;
_main.default.prototype.setCamera = function(cam) {
cov_coydg3ubv.f[23]++;
cov_coydg3ubv.s[275]++;
this._renderer._curCamera = cam;
// set the projection matrix (which is not normally updated each frame)
cov_coydg3ubv.s[276]++;
this._renderer.uPMatrix.set(
cam.projMatrix.mat4[0],
cam.projMatrix.mat4[1],
cam.projMatrix.mat4[2],
cam.projMatrix.mat4[3],
cam.projMatrix.mat4[4],
cam.projMatrix.mat4[5],
cam.projMatrix.mat4[6],
cam.projMatrix.mat4[7],
cam.projMatrix.mat4[8],
cam.projMatrix.mat4[9],
cam.projMatrix.mat4[10],
cam.projMatrix.mat4[11],
cam.projMatrix.mat4[12],
cam.projMatrix.mat4[13],
cam.projMatrix.mat4[14],
cam.projMatrix.mat4[15]
);
};
var _default = _main.default.Camera;
exports.default = _default;
},
{ '../core/main': 54 }
],
103: [
function(_dereq_, module, exports) {
'use strict';
var cov_11grrgcw1f = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.Geometry.js';
var hash = '6fc7043d33b63ed22d4f1d1d5b4d8cef05b21657';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.Geometry.js',
statementMap: {
'0': { start: { line: 20, column: 0 }, end: { line: 56, column: 2 } },
'1': { start: { line: 23, column: 2 }, end: { line: 23, column: 21 } },
'2': { start: { line: 26, column: 2 }, end: { line: 26, column: 25 } },
'3': { start: { line: 32, column: 2 }, end: { line: 32, column: 24 } },
'4': { start: { line: 37, column: 2 }, end: { line: 37, column: 26 } },
'5': { start: { line: 40, column: 2 }, end: { line: 40, column: 18 } },
'6': { start: { line: 43, column: 2 }, end: { line: 43, column: 16 } },
'7': { start: { line: 46, column: 2 }, end: { line: 46, column: 18 } },
'8': { start: { line: 47, column: 2 }, end: { line: 47, column: 25 } },
'9': { start: { line: 48, column: 2 }, end: { line: 48, column: 53 } },
'10': { start: { line: 49, column: 2 }, end: { line: 49, column: 53 } },
'11': { start: { line: 50, column: 2 }, end: { line: 50, column: 23 } },
'12': { start: { line: 52, column: 2 }, end: { line: 54, column: 3 } },
'13': { start: { line: 53, column: 4 }, end: { line: 53, column: 24 } },
'14': { start: { line: 55, column: 2 }, end: { line: 55, column: 14 } },
'15': { start: { line: 58, column: 0 }, end: { line: 69, column: 2 } },
'16': { start: { line: 59, column: 2 }, end: { line: 59, column: 31 } },
'17': { start: { line: 60, column: 2 }, end: { line: 60, column: 30 } },
'18': { start: { line: 62, column: 2 }, end: { line: 62, column: 27 } },
'19': { start: { line: 63, column: 2 }, end: { line: 63, column: 24 } },
'20': { start: { line: 64, column: 2 }, end: { line: 64, column: 31 } },
'21': { start: { line: 65, column: 2 }, end: { line: 65, column: 32 } },
'22': { start: { line: 66, column: 2 }, end: { line: 66, column: 22 } },
'23': { start: { line: 68, column: 2 }, end: { line: 68, column: 23 } },
'24': { start: { line: 76, column: 0 }, end: { line: 91, column: 2 } },
'25': { start: { line: 77, column: 2 }, end: { line: 77, column: 24 } },
'26': { start: { line: 78, column: 21 }, end: { line: 78, column: 37 } },
'27': { start: { line: 80, column: 2 }, end: { line: 89, column: 3 } },
'28': { start: { line: 80, column: 15 }, end: { line: 80, column: 16 } },
'29': { start: { line: 81, column: 4 }, end: { line: 88, column: 5 } },
'30': { start: { line: 81, column: 17 }, end: { line: 81, column: 18 } },
'31': { start: { line: 82, column: 6 }, end: { line: 82, column: 29 } },
'32': { start: { line: 83, column: 6 }, end: { line: 83, column: 33 } },
'33': { start: { line: 84, column: 6 }, end: { line: 84, column: 39 } },
'34': { start: { line: 85, column: 6 }, end: { line: 85, column: 35 } },
'35': { start: { line: 86, column: 6 }, end: { line: 86, column: 33 } },
'36': { start: { line: 87, column: 6 }, end: { line: 87, column: 33 } },
'37': { start: { line: 90, column: 2 }, end: { line: 90, column: 14 } },
'38': { start: { line: 93, column: 0 }, end: { line: 113, column: 2 } },
'39': { start: { line: 95, column: 15 }, end: { line: 95, column: 33 } },
'40': { start: { line: 96, column: 13 }, end: { line: 96, column: 35 } },
'41': { start: { line: 97, column: 13 }, end: { line: 97, column: 35 } },
'42': { start: { line: 98, column: 13 }, end: { line: 98, column: 35 } },
'43': { start: { line: 99, column: 13 }, end: { line: 99, column: 34 } },
'44': { start: { line: 100, column: 13 }, end: { line: 100, column: 34 } },
'45': { start: { line: 101, column: 12 }, end: { line: 101, column: 35 } },
'46': { start: { line: 102, column: 13 }, end: { line: 102, column: 29 } },
'47': { start: { line: 103, column: 17 }, end: { line: 103, column: 61 } },
'48': { start: { line: 104, column: 2 }, end: { line: 110, column: 3 } },
'49': { start: { line: 105, column: 4 }, end: { line: 108, column: 6 } },
'50': { start: { line: 109, column: 4 }, end: { line: 109, column: 13 } },
'51': { start: { line: 111, column: 2 }, end: { line: 111, column: 33 } },
'52': { start: { line: 111, column: 20 }, end: { line: 111, column: 33 } },
'53': { start: { line: 112, column: 2 }, end: { line: 112, column: 42 } },
'54': { start: { line: 120, column: 0 }, end: { line: 151, column: 2 } },
'55': { start: { line: 121, column: 24 }, end: { line: 121, column: 42 } },
'56': { start: { line: 122, column: 19 }, end: { line: 122, column: 32 } },
'57': { start: { line: 123, column: 16 }, end: { line: 123, column: 26 } },
'58': { start: { line: 127, column: 2 }, end: { line: 127, column: 27 } },
'59': { start: { line: 128, column: 2 }, end: { line: 130, column: 3 } },
'60': { start: { line: 129, column: 4 }, end: { line: 129, column: 40 } },
'61': { start: { line: 134, column: 2 }, end: { line: 143, column: 3 } },
'62': { start: { line: 134, column: 15 }, end: { line: 134, column: 16 } },
'63': { start: { line: 135, column: 17 }, end: { line: 135, column: 25 } },
'64': { start: { line: 136, column: 23 }, end: { line: 136, column: 45 } },
'65': { start: { line: 139, column: 4 }, end: { line: 142, column: 5 } },
'66': { start: { line: 139, column: 18 }, end: { line: 139, column: 19 } },
'67': { start: { line: 140, column: 26 }, end: { line: 140, column: 34 } },
'68': { start: { line: 141, column: 6 }, end: { line: 141, column: 49 } },
'69': { start: { line: 146, column: 2 }, end: { line: 148, column: 3 } },
'70': { start: { line: 147, column: 4 }, end: { line: 147, column: 34 } },
'71': { start: { line: 150, column: 2 }, end: { line: 150, column: 14 } },
'72': { start: { line: 159, column: 0 }, end: { line: 172, column: 2 } },
'73': { start: { line: 160, column: 2 }, end: { line: 170, column: 3 } },
'74': { start: { line: 160, column: 15 }, end: { line: 160, column: 16 } },
'75': { start: { line: 161, column: 19 }, end: { line: 161, column: 35 } },
'76': { start: { line: 162, column: 15 }, end: { line: 165, column: 5 } },
'77': { start: { line: 167, column: 4 }, end: { line: 167, column: 34 } },
'78': { start: { line: 168, column: 4 }, end: { line: 168, column: 42 } },
'79': { start: { line: 169, column: 4 }, end: { line: 169, column: 57 } },
'80': { start: { line: 171, column: 2 }, end: { line: 171, column: 14 } },
'81': { start: { line: 179, column: 0 }, end: { line: 210, column: 2 } },
'82': { start: { line: 181, column: 12 }, end: { line: 181, column: 34 } },
'83': { start: { line: 182, column: 2 }, end: { line: 184, column: 3 } },
'84': { start: { line: 182, column: 15 }, end: { line: 182, column: 16 } },
'85': { start: { line: 183, column: 4 }, end: { line: 183, column: 35 } },
'86': { start: { line: 185, column: 2 }, end: { line: 185, column: 41 } },
'87': { start: { line: 187, column: 2 }, end: { line: 189, column: 3 } },
'88': { start: { line: 187, column: 15 }, end: { line: 187, column: 16 } },
'89': { start: { line: 188, column: 4 }, end: { line: 188, column: 32 } },
'90': { start: { line: 192, column: 2 }, end: { line: 192, column: 31 } },
'91': { start: { line: 193, column: 2 }, end: { line: 199, column: 3 } },
'92': { start: { line: 194, column: 12 }, end: { line: 194, column: 36 } },
'93': { start: { line: 198, column: 4 }, end: { line: 198, column: 35 } },
'94': { start: { line: 200, column: 2 }, end: { line: 200, column: 41 } },
'95': { start: { line: 202, column: 2 }, end: { line: 208, column: 3 } },
'96': { start: { line: 203, column: 12 }, end: { line: 203, column: 36 } },
'97': { start: { line: 207, column: 4 }, end: { line: 207, column: 32 } },
'98': { start: { line: 209, column: 2 }, end: { line: 209, column: 14 } },
'99': { start: { line: 217, column: 0 }, end: { line: 231, column: 2 } },
'100': { start: { line: 218, column: 2 }, end: { line: 218, column: 24 } },
'101': { start: { line: 219, column: 2 }, end: { line: 229, column: 3 } },
'102': { start: { line: 220, column: 4 }, end: { line: 222, column: 5 } },
'103': { start: { line: 220, column: 17 }, end: { line: 220, column: 18 } },
'104': { start: { line: 220, column: 26 }, end: { line: 220, column: 51 } },
'105': { start: { line: 221, column: 6 }, end: { line: 221, column: 45 } },
'106': { start: { line: 224, column: 4 }, end: { line: 228, column: 5 } },
'107': { start: { line: 224, column: 17 }, end: { line: 224, column: 18 } },
'108': { start: { line: 225, column: 6 }, end: { line: 225, column: 60 } },
'109': { start: { line: 226, column: 6 }, end: { line: 226, column: 60 } },
'110': { start: { line: 227, column: 6 }, end: { line: 227, column: 60 } },
'111': { start: { line: 230, column: 2 }, end: { line: 230, column: 14 } },
'112': { start: { line: 240, column: 0 }, end: { line: 265, column: 2 } },
'113': { start: { line: 241, column: 2 }, end: { line: 241, column: 31 } },
'114': { start: { line: 242, column: 2 }, end: { line: 242, column: 30 } },
'115': { start: { line: 244, column: 2 }, end: { line: 263, column: 3 } },
'116': { start: { line: 244, column: 15 }, end: { line: 244, column: 16 } },
'117': { start: { line: 245, column: 18 }, end: { line: 245, column: 49 } },
'118': { start: { line: 246, column: 16 }, end: { line: 246, column: 47 } },
'119': { start: { line: 247, column: 16 }, end: { line: 250, column: 18 } },
'120': { start: { line: 251, column: 14 }, end: { line: 251, column: 27 } },
'121': { start: { line: 252, column: 14 }, end: { line: 252, column: 27 } },
'122': { start: { line: 253, column: 14 }, end: { line: 253, column: 25 } },
'123': { start: { line: 254, column: 14 }, end: { line: 254, column: 25 } },
'124': { start: { line: 255, column: 19 }, end: { line: 255, column: 30 } },
'125': { start: { line: 256, column: 19 }, end: { line: 256, column: 30 } },
'126': { start: { line: 259, column: 4 }, end: { line: 259, column: 19 } },
'127': { start: { line: 260, column: 4 }, end: { line: 260, column: 20 } },
'128': { start: { line: 261, column: 4 }, end: { line: 261, column: 74 } },
'129': { start: { line: 262, column: 4 }, end: { line: 262, column: 45 } },
'130': { start: { line: 264, column: 2 }, end: { line: 264, column: 14 } },
'131': { start: { line: 272, column: 0 }, end: { line: 298, column: 2 } },
'132': { start: { line: 273, column: 2 }, end: { line: 296, column: 3 } },
'133': { start: { line: 275, column: 24 }, end: { line: 275, column: 47 } },
'134': { start: { line: 276, column: 24 }, end: { line: 276, column: 47 } },
'135': { start: { line: 278, column: 4 }, end: { line: 285, column: 5 } },
'136': { start: { line: 278, column: 17 }, end: { line: 278, column: 18 } },
'137': { start: { line: 279, column: 6 }, end: { line: 279, column: 66 } },
'138': { start: { line: 280, column: 6 }, end: { line: 280, column: 66 } },
'139': { start: { line: 281, column: 6 }, end: { line: 281, column: 66 } },
'140': { start: { line: 282, column: 6 }, end: { line: 282, column: 66 } },
'141': { start: { line: 283, column: 6 }, end: { line: 283, column: 66 } },
'142': { start: { line: 284, column: 6 }, end: { line: 284, column: 66 } },
'143': { start: { line: 287, column: 19 }, end: { line: 287, column: 64 } },
'144': { start: { line: 288, column: 17 }, end: { line: 288, column: 56 } },
'145': { start: { line: 289, column: 24 }, end: { line: 289, column: 66 } },
'146': { start: { line: 290, column: 18 }, end: { line: 290, column: 35 } },
'147': { start: { line: 292, column: 4 }, end: { line: 295, column: 5 } },
'148': { start: { line: 292, column: 17 }, end: { line: 292, column: 18 } },
'149': { start: { line: 293, column: 6 }, end: { line: 293, column: 35 } },
'150': { start: { line: 294, column: 6 }, end: { line: 294, column: 35 } },
'151': { start: { line: 297, column: 2 }, end: { line: 297, column: 14 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 20, column: 14 }, end: { line: 20, column: 15 } },
loc: { start: { line: 20, column: 51 }, end: { line: 56, column: 1 } },
line: 20
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 58, column: 30 }, end: { line: 58, column: 31 } },
loc: { start: { line: 58, column: 41 }, end: { line: 69, column: 1 } },
line: 58
},
'2': {
name: '(anonymous_2)',
decl: { start: { line: 76, column: 37 }, end: { line: 76, column: 38 } },
loc: { start: { line: 76, column: 48 }, end: { line: 91, column: 1 } },
line: 76
},
'3': {
name: '(anonymous_3)',
decl: { start: { line: 93, column: 39 }, end: { line: 93, column: 40 } },
loc: { start: { line: 93, column: 56 }, end: { line: 113, column: 1 } },
line: 93
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 120, column: 39 },
end: { line: 120, column: 40 }
},
loc: { start: { line: 120, column: 50 }, end: { line: 151, column: 1 } },
line: 120
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 159, column: 39 },
end: { line: 159, column: 40 }
},
loc: { start: { line: 159, column: 50 }, end: { line: 172, column: 1 } },
line: 159
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 179, column: 43 },
end: { line: 179, column: 44 }
},
loc: { start: { line: 179, column: 54 }, end: { line: 210, column: 1 } },
line: 179
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 217, column: 43 },
end: { line: 217, column: 44 }
},
loc: { start: { line: 217, column: 54 }, end: { line: 231, column: 1 } },
line: 217
},
'8': {
name: '(anonymous_8)',
decl: {
start: { line: 240, column: 41 },
end: { line: 240, column: 42 }
},
loc: { start: { line: 240, column: 52 }, end: { line: 265, column: 1 } },
line: 240
},
'9': {
name: '(anonymous_9)',
decl: {
start: { line: 272, column: 34 },
end: { line: 272, column: 35 }
},
loc: { start: { line: 272, column: 45 }, end: { line: 298, column: 1 } },
line: 272
}
},
branchMap: {
'0': {
loc: { start: { line: 48, column: 17 }, end: { line: 48, column: 52 } },
type: 'cond-expr',
locations: [
{ start: { line: 48, column: 41 }, end: { line: 48, column: 48 } },
{ start: { line: 48, column: 51 }, end: { line: 48, column: 52 } }
],
line: 48
},
'1': {
loc: { start: { line: 49, column: 17 }, end: { line: 49, column: 52 } },
type: 'cond-expr',
locations: [
{ start: { line: 49, column: 41 }, end: { line: 49, column: 48 } },
{ start: { line: 49, column: 51 }, end: { line: 49, column: 52 } }
],
line: 49
},
'2': {
loc: { start: { line: 52, column: 2 }, end: { line: 54, column: 3 } },
type: 'if',
locations: [
{ start: { line: 52, column: 2 }, end: { line: 54, column: 3 } },
{ start: { line: 52, column: 2 }, end: { line: 54, column: 3 } }
],
line: 52
},
'3': {
loc: { start: { line: 104, column: 2 }, end: { line: 110, column: 3 } },
type: 'if',
locations: [
{ start: { line: 104, column: 2 }, end: { line: 110, column: 3 } },
{ start: { line: 104, column: 2 }, end: { line: 110, column: 3 } }
],
line: 104
},
'4': {
loc: { start: { line: 104, column: 6 }, end: { line: 104, column: 39 } },
type: 'binary-expr',
locations: [
{ start: { line: 104, column: 6 }, end: { line: 104, column: 20 } },
{ start: { line: 104, column: 24 }, end: { line: 104, column: 39 } }
],
line: 104
},
'5': {
loc: { start: { line: 111, column: 2 }, end: { line: 111, column: 33 } },
type: 'if',
locations: [
{ start: { line: 111, column: 2 }, end: { line: 111, column: 33 } },
{ start: { line: 111, column: 2 }, end: { line: 111, column: 33 } }
],
line: 111
},
'6': {
loc: { start: { line: 219, column: 2 }, end: { line: 229, column: 3 } },
type: 'if',
locations: [
{ start: { line: 219, column: 2 }, end: { line: 229, column: 3 } },
{ start: { line: 219, column: 2 }, end: { line: 229, column: 3 } }
],
line: 219
},
'7': {
loc: { start: { line: 273, column: 2 }, end: { line: 296, column: 3 } },
type: 'if',
locations: [
{ start: { line: 273, column: 2 }, end: { line: 296, column: 3 } },
{ start: { line: 273, column: 2 }, end: { line: 296, column: 3 } }
],
line: 273
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0,
'123': 0,
'124': 0,
'125': 0,
'126': 0,
'127': 0,
'128': 0,
'129': 0,
'130': 0,
'131': 0,
'132': 0,
'133': 0,
'134': 0,
'135': 0,
'136': 0,
'137': 0,
'138': 0,
'139': 0,
'140': 0,
'141': 0,
'142': 0,
'143': 0,
'144': 0,
'145': 0,
'146': 0,
'147': 0,
'148': 0,
'149': 0,
'150': 0,
'151': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '6fc7043d33b63ed22d4f1d1d5b4d8cef05b21657'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_11grrgcw1f.s[0]++;
/**
* p5 Geometry class
* @class p5.Geometry
* @constructor
* @param {Integer} [detailX] number of vertices on horizontal surface
* @param {Integer} [detailY] number of vertices on horizontal surface
* @param {function} [callback] function to call upon object instantiation.
*/
_main.default.Geometry = function(detailX, detailY, callback) {
cov_11grrgcw1f.f[0]++;
cov_11grrgcw1f.s[1]++;
//an array containing every vertex
//@type [p5.Vector]
this.vertices = [];
//an array containing every vertex for stroke drawing
cov_11grrgcw1f.s[2]++;
this.lineVertices = [];
//an array 1 normal per lineVertex with
//final position representing which direction to
//displace for strokeWeight
//[[0,0,-1,1], [0,1,0,-1] ...];
cov_11grrgcw1f.s[3]++;
this.lineNormals = [];
//an array containing 1 normal per vertex
//@type [p5.Vector]
//[p5.Vector, p5.Vector, p5.Vector,p5.Vector, p5.Vector, p5.Vector,...]
cov_11grrgcw1f.s[4]++;
this.vertexNormals = [];
//an array containing each three vertex indices that form a face
//[[0, 1, 2], [2, 1, 3], ...]
cov_11grrgcw1f.s[5]++;
this.faces = [];
//a 2D array containing uvs for every vertex
//[[0.0,0.0],[1.0,0.0], ...]
cov_11grrgcw1f.s[6]++;
this.uvs = [];
// a 2D array containing edge connectivity pattern for create line vertices
//based on faces for most objects;
cov_11grrgcw1f.s[7]++;
this.edges = [];
cov_11grrgcw1f.s[8]++;
this.vertexColors = [];
cov_11grrgcw1f.s[9]++;
this.detailX =
detailX !== undefined
? (cov_11grrgcw1f.b[0][0]++, detailX)
: (cov_11grrgcw1f.b[0][1]++, 1);
cov_11grrgcw1f.s[10]++;
this.detailY =
detailY !== undefined
? (cov_11grrgcw1f.b[1][0]++, detailY)
: (cov_11grrgcw1f.b[1][1]++, 1);
cov_11grrgcw1f.s[11]++;
this.dirtyFlags = {};
cov_11grrgcw1f.s[12]++;
if (callback instanceof Function) {
cov_11grrgcw1f.b[2][0]++;
cov_11grrgcw1f.s[13]++;
callback.call(this);
} else {
cov_11grrgcw1f.b[2][1]++;
}
cov_11grrgcw1f.s[14]++;
return this; // TODO: is this a constructor?
};
cov_11grrgcw1f.s[15]++;
_main.default.Geometry.prototype.reset = function() {
cov_11grrgcw1f.f[1]++;
cov_11grrgcw1f.s[16]++;
this.lineVertices.length = 0;
cov_11grrgcw1f.s[17]++;
this.lineNormals.length = 0;
cov_11grrgcw1f.s[18]++;
this.vertices.length = 0;
cov_11grrgcw1f.s[19]++;
this.edges.length = 0;
cov_11grrgcw1f.s[20]++;
this.vertexColors.length = 0;
cov_11grrgcw1f.s[21]++;
this.vertexNormals.length = 0;
cov_11grrgcw1f.s[22]++;
this.uvs.length = 0;
cov_11grrgcw1f.s[23]++;
this.dirtyFlags = {};
};
/**
* computes faces for geometry objects based on the vertices.
* @method computeFaces
* @chainable
*/ cov_11grrgcw1f.s[24]++;
_main.default.Geometry.prototype.computeFaces = function() {
cov_11grrgcw1f.f[2]++;
cov_11grrgcw1f.s[25]++;
this.faces.length = 0;
var sliceCount = (cov_11grrgcw1f.s[26]++, this.detailX + 1);
var a, b, c, d;
cov_11grrgcw1f.s[27]++;
for (var i = (cov_11grrgcw1f.s[28]++, 0); i < this.detailY; i++) {
cov_11grrgcw1f.s[29]++;
for (var j = (cov_11grrgcw1f.s[30]++, 0); j < this.detailX; j++) {
cov_11grrgcw1f.s[31]++;
a = i * sliceCount + j; // + offset;
cov_11grrgcw1f.s[32]++;
b = i * sliceCount + j + 1; // + offset;
cov_11grrgcw1f.s[33]++;
c = (i + 1) * sliceCount + j + 1; // + offset;
cov_11grrgcw1f.s[34]++;
d = (i + 1) * sliceCount + j; // + offset;
cov_11grrgcw1f.s[35]++;
this.faces.push([a, b, d]);
cov_11grrgcw1f.s[36]++;
this.faces.push([d, b, c]);
}
}
cov_11grrgcw1f.s[37]++;
return this;
};
cov_11grrgcw1f.s[38]++;
_main.default.Geometry.prototype._getFaceNormal = function(faceId) {
cov_11grrgcw1f.f[3]++;
//This assumes that vA->vB->vC is a counter-clockwise ordering
var face = (cov_11grrgcw1f.s[39]++, this.faces[faceId]);
var vA = (cov_11grrgcw1f.s[40]++, this.vertices[face[0]]);
var vB = (cov_11grrgcw1f.s[41]++, this.vertices[face[1]]);
var vC = (cov_11grrgcw1f.s[42]++, this.vertices[face[2]]);
var ab = (cov_11grrgcw1f.s[43]++, _main.default.Vector.sub(vB, vA));
var ac = (cov_11grrgcw1f.s[44]++, _main.default.Vector.sub(vC, vA));
var n = (cov_11grrgcw1f.s[45]++, _main.default.Vector.cross(ab, ac));
var ln = (cov_11grrgcw1f.s[46]++, _main.default.Vector.mag(n));
var sinAlpha = (cov_11grrgcw1f.s[47]++,
ln / (_main.default.Vector.mag(ab) * _main.default.Vector.mag(ac)));
cov_11grrgcw1f.s[48]++;
if (
(cov_11grrgcw1f.b[4][0]++, sinAlpha === 0) ||
(cov_11grrgcw1f.b[4][1]++, isNaN(sinAlpha))
) {
cov_11grrgcw1f.b[3][0]++;
cov_11grrgcw1f.s[49]++;
console.warn(
'p5.Geometry.prototype._getFaceNormal:',
'face has colinear sides or a repeated vertex'
);
cov_11grrgcw1f.s[50]++;
return n;
} else {
cov_11grrgcw1f.b[3][1]++;
}
cov_11grrgcw1f.s[51]++;
if (sinAlpha > 1) {
cov_11grrgcw1f.b[5][0]++;
cov_11grrgcw1f.s[52]++;
sinAlpha = 1;
} else {
cov_11grrgcw1f.b[5][1]++;
} // handle float rounding error
cov_11grrgcw1f.s[53]++;
return n.mult(Math.asin(sinAlpha) / ln);
};
/**
* computes smooth normals per vertex as an average of each
* face.
* @method computeNormals
* @chainable
*/ cov_11grrgcw1f.s[54]++;
_main.default.Geometry.prototype.computeNormals = function() {
cov_11grrgcw1f.f[4]++;
var vertexNormals = (cov_11grrgcw1f.s[55]++, this.vertexNormals);
var vertices = (cov_11grrgcw1f.s[56]++, this.vertices);
var faces = (cov_11grrgcw1f.s[57]++, this.faces);
var iv;
// initialize the vertexNormals array with empty vectors
cov_11grrgcw1f.s[58]++;
vertexNormals.length = 0;
cov_11grrgcw1f.s[59]++;
for (iv = 0; iv < vertices.length; ++iv) {
cov_11grrgcw1f.s[60]++;
vertexNormals.push(new _main.default.Vector());
}
// loop through all the faces adding its normal to the normal
// of each of its vertices
cov_11grrgcw1f.s[61]++;
for (var f = (cov_11grrgcw1f.s[62]++, 0); f < faces.length; ++f) {
var face = (cov_11grrgcw1f.s[63]++, faces[f]);
var faceNormal = (cov_11grrgcw1f.s[64]++, this._getFaceNormal(f));
// all three vertices get the normal added
cov_11grrgcw1f.s[65]++;
for (var fv = (cov_11grrgcw1f.s[66]++, 0); fv < 3; ++fv) {
var vertexIndex = (cov_11grrgcw1f.s[67]++, face[fv]);
cov_11grrgcw1f.s[68]++;
vertexNormals[vertexIndex].add(faceNormal);
}
}
// normalize the normals
cov_11grrgcw1f.s[69]++;
for (iv = 0; iv < vertices.length; ++iv) {
cov_11grrgcw1f.s[70]++;
vertexNormals[iv].normalize();
}
cov_11grrgcw1f.s[71]++;
return this;
};
/**
* Averages the vertex normals. Used in curved
* surfaces
* @method averageNormals
* @chainable
*/ cov_11grrgcw1f.s[72]++;
_main.default.Geometry.prototype.averageNormals = function() {
cov_11grrgcw1f.f[5]++;
cov_11grrgcw1f.s[73]++;
for (var i = (cov_11grrgcw1f.s[74]++, 0); i <= this.detailY; i++) {
var offset = (cov_11grrgcw1f.s[75]++, this.detailX + 1);
var temp = (cov_11grrgcw1f.s[76]++,
_main.default.Vector.add(
this.vertexNormals[i * offset],
this.vertexNormals[i * offset + this.detailX]
));
cov_11grrgcw1f.s[77]++;
temp = _main.default.Vector.div(temp, 2);
cov_11grrgcw1f.s[78]++;
this.vertexNormals[i * offset] = temp;
cov_11grrgcw1f.s[79]++;
this.vertexNormals[i * offset + this.detailX] = temp;
}
cov_11grrgcw1f.s[80]++;
return this;
};
/**
* Averages pole normals. Used in spherical primitives
* @method averagePoleNormals
* @chainable
*/ cov_11grrgcw1f.s[81]++;
_main.default.Geometry.prototype.averagePoleNormals = function() {
cov_11grrgcw1f.f[6]++;
//average the north pole
var sum = (cov_11grrgcw1f.s[82]++, new _main.default.Vector(0, 0, 0));
cov_11grrgcw1f.s[83]++;
for (var i = (cov_11grrgcw1f.s[84]++, 0); i < this.detailX; i++) {
cov_11grrgcw1f.s[85]++;
sum.add(this.vertexNormals[i]);
}
cov_11grrgcw1f.s[86]++;
sum = _main.default.Vector.div(sum, this.detailX);
cov_11grrgcw1f.s[87]++;
for (var _i = (cov_11grrgcw1f.s[88]++, 0); _i < this.detailX; _i++) {
cov_11grrgcw1f.s[89]++;
this.vertexNormals[_i] = sum;
}
//average the south pole
cov_11grrgcw1f.s[90]++;
sum = new _main.default.Vector(0, 0, 0);
cov_11grrgcw1f.s[91]++;
for (
var _i2 = (cov_11grrgcw1f.s[92]++, this.vertices.length - 1);
_i2 > this.vertices.length - 1 - this.detailX;
_i2--
) {
cov_11grrgcw1f.s[93]++;
sum.add(this.vertexNormals[_i2]);
}
cov_11grrgcw1f.s[94]++;
sum = _main.default.Vector.div(sum, this.detailX);
cov_11grrgcw1f.s[95]++;
for (
var _i3 = (cov_11grrgcw1f.s[96]++, this.vertices.length - 1);
_i3 > this.vertices.length - 1 - this.detailX;
_i3--
) {
cov_11grrgcw1f.s[97]++;
this.vertexNormals[_i3] = sum;
}
cov_11grrgcw1f.s[98]++;
return this;
};
/**
* Create a 2D array for establishing stroke connections
* @private
* @chainable
*/ cov_11grrgcw1f.s[99]++;
_main.default.Geometry.prototype._makeTriangleEdges = function() {
cov_11grrgcw1f.f[7]++;
cov_11grrgcw1f.s[100]++;
this.edges.length = 0;
cov_11grrgcw1f.s[101]++;
if (Array.isArray(this.strokeIndices)) {
cov_11grrgcw1f.b[6][0]++;
cov_11grrgcw1f.s[102]++;
for (
var i = (cov_11grrgcw1f.s[103]++, 0),
max = (cov_11grrgcw1f.s[104]++, this.strokeIndices.length);
i < max;
i++
) {
cov_11grrgcw1f.s[105]++;
this.edges.push(this.strokeIndices[i]);
}
} else {
cov_11grrgcw1f.b[6][1]++;
cov_11grrgcw1f.s[106]++;
for (var j = (cov_11grrgcw1f.s[107]++, 0); j < this.faces.length; j++) {
cov_11grrgcw1f.s[108]++;
this.edges.push([this.faces[j][0], this.faces[j][1]]);
cov_11grrgcw1f.s[109]++;
this.edges.push([this.faces[j][1], this.faces[j][2]]);
cov_11grrgcw1f.s[110]++;
this.edges.push([this.faces[j][2], this.faces[j][0]]);
}
}
cov_11grrgcw1f.s[111]++;
return this;
};
/**
* Create 4 vertices for each stroke line, two at the beginning position
* and two at the end position. These vertices are displaced relative to
* that line's normal on the GPU
* @private
* @chainable
*/ cov_11grrgcw1f.s[112]++;
_main.default.Geometry.prototype._edgesToVertices = function() {
cov_11grrgcw1f.f[8]++;
cov_11grrgcw1f.s[113]++;
this.lineVertices.length = 0;
cov_11grrgcw1f.s[114]++;
this.lineNormals.length = 0;
cov_11grrgcw1f.s[115]++;
for (var i = (cov_11grrgcw1f.s[116]++, 0); i < this.edges.length; i++) {
var begin = (cov_11grrgcw1f.s[117]++, this.vertices[this.edges[i][0]]);
var end = (cov_11grrgcw1f.s[118]++, this.vertices[this.edges[i][1]]);
var dir = (cov_11grrgcw1f.s[119]++,
end
.copy()
.sub(begin)
.normalize());
var a = (cov_11grrgcw1f.s[120]++, begin.array());
var b = (cov_11grrgcw1f.s[121]++, begin.array());
var c = (cov_11grrgcw1f.s[122]++, end.array());
var d = (cov_11grrgcw1f.s[123]++, end.array());
var dirAdd = (cov_11grrgcw1f.s[124]++, dir.array());
var dirSub = (cov_11grrgcw1f.s[125]++, dir.array());
// below is used to displace the pair of vertices at beginning and end
// in opposite directions
cov_11grrgcw1f.s[126]++;
dirAdd.push(1);
cov_11grrgcw1f.s[127]++;
dirSub.push(-1);
cov_11grrgcw1f.s[128]++;
this.lineNormals.push(dirAdd, dirSub, dirAdd, dirAdd, dirSub, dirSub);
cov_11grrgcw1f.s[129]++;
this.lineVertices.push(a, b, c, c, b, d);
}
cov_11grrgcw1f.s[130]++;
return this;
};
/**
* Modifies all vertices to be centered within the range -100 to 100.
* @method normalize
* @chainable
*/ cov_11grrgcw1f.s[131]++;
_main.default.Geometry.prototype.normalize = function() {
cov_11grrgcw1f.f[9]++;
cov_11grrgcw1f.s[132]++;
if (this.vertices.length > 0) {
cov_11grrgcw1f.b[7][0]++;
// Find the corners of our bounding box
var maxPosition = (cov_11grrgcw1f.s[133]++, this.vertices[0].copy());
var minPosition = (cov_11grrgcw1f.s[134]++, this.vertices[0].copy());
cov_11grrgcw1f.s[135]++;
for (var i = (cov_11grrgcw1f.s[136]++, 0); i < this.vertices.length; i++) {
cov_11grrgcw1f.s[137]++;
maxPosition.x = Math.max(maxPosition.x, this.vertices[i].x);
cov_11grrgcw1f.s[138]++;
minPosition.x = Math.min(minPosition.x, this.vertices[i].x);
cov_11grrgcw1f.s[139]++;
maxPosition.y = Math.max(maxPosition.y, this.vertices[i].y);
cov_11grrgcw1f.s[140]++;
minPosition.y = Math.min(minPosition.y, this.vertices[i].y);
cov_11grrgcw1f.s[141]++;
maxPosition.z = Math.max(maxPosition.z, this.vertices[i].z);
cov_11grrgcw1f.s[142]++;
minPosition.z = Math.min(minPosition.z, this.vertices[i].z);
}
var center = (cov_11grrgcw1f.s[143]++,
_main.default.Vector.lerp(maxPosition, minPosition, 0.5));
var dist = (cov_11grrgcw1f.s[144]++,
_main.default.Vector.sub(maxPosition, minPosition));
var longestDist = (cov_11grrgcw1f.s[145]++,
Math.max(Math.max(dist.x, dist.y), dist.z));
var scale = (cov_11grrgcw1f.s[146]++, 200 / longestDist);
cov_11grrgcw1f.s[147]++;
for (
var _i4 = (cov_11grrgcw1f.s[148]++, 0);
_i4 < this.vertices.length;
_i4++
) {
cov_11grrgcw1f.s[149]++;
this.vertices[_i4].sub(center);
cov_11grrgcw1f.s[150]++;
this.vertices[_i4].mult(scale);
}
} else {
cov_11grrgcw1f.b[7][1]++;
}
cov_11grrgcw1f.s[151]++;
return this;
};
var _default = _main.default.Geometry;
exports.default = _default;
},
{ '../core/main': 54 }
],
104: [
function(_dereq_, module, exports) {
'use strict';
var cov_1fs5mmbhgv = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.Matrix.js';
var hash = '4ef4601f42a4ee65a8815b165b8a632d0dc64699';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.Matrix.js',
statementMap: {
'0': { start: { line: 12, column: 23 }, end: { line: 12, column: 28 } },
'1': { start: { line: 13, column: 20 }, end: { line: 13, column: 43 } },
'2': { start: { line: 13, column: 25 }, end: { line: 13, column: 43 } },
'3': { start: { line: 14, column: 0 }, end: { line: 17, column: 1 } },
'4': { start: { line: 15, column: 2 }, end: { line: 15, column: 34 } },
'5': { start: { line: 16, column: 2 }, end: { line: 16, column: 71 } },
'6': { start: { line: 16, column: 23 }, end: { line: 16, column: 70 } },
'7': { start: { line: 27, column: 0 }, end: { line: 50, column: 2 } },
'8': { start: { line: 28, column: 15 }, end: { line: 28, column: 42 } },
'9': { start: { line: 29, column: 2 }, end: { line: 31, column: 3 } },
'10': { start: { line: 29, column: 15 }, end: { line: 29, column: 16 } },
'11': { start: { line: 30, column: 4 }, end: { line: 30, column: 27 } },
'12': { start: { line: 36, column: 2 }, end: { line: 38, column: 3 } },
'13': { start: { line: 37, column: 4 }, end: { line: 37, column: 36 } },
'14': { start: { line: 40, column: 2 }, end: { line: 48, column: 3 } },
'15': { start: { line: 41, column: 4 }, end: { line: 43, column: 58 } },
'16': { start: { line: 45, column: 4 }, end: { line: 47, column: 79 } },
'17': { start: { line: 49, column: 2 }, end: { line: 49, column: 14 } },
'18': { start: { line: 67, column: 0 }, end: { line: 93, column: 2 } },
'19': { start: { line: 68, column: 2 }, end: { line: 91, column: 3 } },
'20': { start: { line: 69, column: 4 }, end: { line: 69, column: 30 } },
'21': { start: { line: 70, column: 4 }, end: { line: 70, column: 16 } },
'22': { start: { line: 71, column: 9 }, end: { line: 91, column: 3 } },
'23': { start: { line: 72, column: 4 }, end: { line: 72, column: 25 } },
'24': { start: { line: 73, column: 4 }, end: { line: 73, column: 16 } },
'25': { start: { line: 74, column: 9 }, end: { line: 91, column: 3 } },
'26': { start: { line: 75, column: 4 }, end: { line: 75, column: 32 } },
'27': { start: { line: 76, column: 4 }, end: { line: 76, column: 32 } },
'28': { start: { line: 77, column: 4 }, end: { line: 77, column: 32 } },
'29': { start: { line: 78, column: 4 }, end: { line: 78, column: 32 } },
'30': { start: { line: 79, column: 4 }, end: { line: 79, column: 32 } },
'31': { start: { line: 80, column: 4 }, end: { line: 80, column: 32 } },
'32': { start: { line: 81, column: 4 }, end: { line: 81, column: 32 } },
'33': { start: { line: 82, column: 4 }, end: { line: 82, column: 32 } },
'34': { start: { line: 83, column: 4 }, end: { line: 83, column: 32 } },
'35': { start: { line: 84, column: 4 }, end: { line: 84, column: 32 } },
'36': { start: { line: 85, column: 4 }, end: { line: 85, column: 34 } },
'37': { start: { line: 86, column: 4 }, end: { line: 86, column: 34 } },
'38': { start: { line: 87, column: 4 }, end: { line: 87, column: 34 } },
'39': { start: { line: 88, column: 4 }, end: { line: 88, column: 34 } },
'40': { start: { line: 89, column: 4 }, end: { line: 89, column: 34 } },
'41': { start: { line: 90, column: 4 }, end: { line: 90, column: 34 } },
'42': { start: { line: 92, column: 2 }, end: { line: 92, column: 14 } },
'43': { start: { line: 101, column: 0 }, end: { line: 103, column: 2 } },
'44': { start: { line: 102, column: 2 }, end: { line: 102, column: 43 } },
'45': { start: { line: 110, column: 0 }, end: { line: 129, column: 2 } },
'46': { start: { line: 111, column: 17 }, end: { line: 111, column: 39 } },
'47': { start: { line: 112, column: 2 }, end: { line: 112, column: 32 } },
'48': { start: { line: 113, column: 2 }, end: { line: 113, column: 32 } },
'49': { start: { line: 114, column: 2 }, end: { line: 114, column: 32 } },
'50': { start: { line: 115, column: 2 }, end: { line: 115, column: 32 } },
'51': { start: { line: 116, column: 2 }, end: { line: 116, column: 32 } },
'52': { start: { line: 117, column: 2 }, end: { line: 117, column: 32 } },
'53': { start: { line: 118, column: 2 }, end: { line: 118, column: 32 } },
'54': { start: { line: 119, column: 2 }, end: { line: 119, column: 32 } },
'55': { start: { line: 120, column: 2 }, end: { line: 120, column: 32 } },
'56': { start: { line: 121, column: 2 }, end: { line: 121, column: 32 } },
'57': { start: { line: 122, column: 2 }, end: { line: 122, column: 34 } },
'58': { start: { line: 123, column: 2 }, end: { line: 123, column: 34 } },
'59': { start: { line: 124, column: 2 }, end: { line: 124, column: 34 } },
'60': { start: { line: 125, column: 2 }, end: { line: 125, column: 34 } },
'61': { start: { line: 126, column: 2 }, end: { line: 126, column: 34 } },
'62': { start: { line: 127, column: 2 }, end: { line: 127, column: 34 } },
'63': { start: { line: 128, column: 2 }, end: { line: 128, column: 16 } },
'64': { start: { line: 136, column: 0 }, end: { line: 136, column: 51 } },
'65': { start: { line: 136, column: 30 }, end: { line: 136, column: 50 } },
'66': { start: { line: 145, column: 0 }, end: { line: 197, column: 2 } },
'67': { start: { line: 147, column: 2 }, end: { line: 195, column: 3 } },
'68': { start: { line: 148, column: 4 }, end: { line: 148, column: 20 } },
'69': { start: { line: 149, column: 4 }, end: { line: 149, column: 20 } },
'70': { start: { line: 150, column: 4 }, end: { line: 150, column: 20 } },
'71': { start: { line: 151, column: 4 }, end: { line: 151, column: 20 } },
'72': { start: { line: 152, column: 4 }, end: { line: 152, column: 20 } },
'73': { start: { line: 153, column: 4 }, end: { line: 153, column: 21 } },
'74': { start: { line: 155, column: 4 }, end: { line: 155, column: 29 } },
'75': { start: { line: 156, column: 4 }, end: { line: 156, column: 29 } },
'76': { start: { line: 157, column: 4 }, end: { line: 157, column: 29 } },
'77': { start: { line: 158, column: 4 }, end: { line: 158, column: 30 } },
'78': { start: { line: 159, column: 4 }, end: { line: 159, column: 23 } },
'79': { start: { line: 160, column: 4 }, end: { line: 160, column: 29 } },
'80': { start: { line: 161, column: 4 }, end: { line: 161, column: 29 } },
'81': { start: { line: 162, column: 4 }, end: { line: 162, column: 30 } },
'82': { start: { line: 163, column: 4 }, end: { line: 163, column: 23 } },
'83': { start: { line: 164, column: 4 }, end: { line: 164, column: 23 } },
'84': { start: { line: 165, column: 4 }, end: { line: 165, column: 31 } },
'85': { start: { line: 166, column: 4 }, end: { line: 166, column: 31 } },
'86': { start: { line: 167, column: 4 }, end: { line: 167, column: 24 } },
'87': { start: { line: 168, column: 4 }, end: { line: 168, column: 24 } },
'88': { start: { line: 169, column: 4 }, end: { line: 169, column: 24 } },
'89': { start: { line: 170, column: 4 }, end: { line: 170, column: 31 } },
'90': { start: { line: 171, column: 9 }, end: { line: 195, column: 3 } },
'91': { start: { line: 172, column: 4 }, end: { line: 172, column: 15 } },
'92': { start: { line: 173, column: 4 }, end: { line: 173, column: 15 } },
'93': { start: { line: 174, column: 4 }, end: { line: 174, column: 15 } },
'94': { start: { line: 175, column: 4 }, end: { line: 175, column: 15 } },
'95': { start: { line: 176, column: 4 }, end: { line: 176, column: 15 } },
'96': { start: { line: 177, column: 4 }, end: { line: 177, column: 16 } },
'97': { start: { line: 179, column: 4 }, end: { line: 179, column: 24 } },
'98': { start: { line: 180, column: 4 }, end: { line: 180, column: 24 } },
'99': { start: { line: 181, column: 4 }, end: { line: 181, column: 24 } },
'100': { start: { line: 182, column: 4 }, end: { line: 182, column: 25 } },
'101': { start: { line: 183, column: 4 }, end: { line: 183, column: 23 } },
'102': { start: { line: 184, column: 4 }, end: { line: 184, column: 24 } },
'103': { start: { line: 185, column: 4 }, end: { line: 185, column: 24 } },
'104': { start: { line: 186, column: 4 }, end: { line: 186, column: 25 } },
'105': { start: { line: 187, column: 4 }, end: { line: 187, column: 23 } },
'106': { start: { line: 188, column: 4 }, end: { line: 188, column: 23 } },
'107': { start: { line: 189, column: 4 }, end: { line: 189, column: 26 } },
'108': { start: { line: 190, column: 4 }, end: { line: 190, column: 26 } },
'109': { start: { line: 191, column: 4 }, end: { line: 191, column: 24 } },
'110': { start: { line: 192, column: 4 }, end: { line: 192, column: 24 } },
'111': { start: { line: 193, column: 4 }, end: { line: 193, column: 24 } },
'112': { start: { line: 194, column: 4 }, end: { line: 194, column: 26 } },
'113': { start: { line: 196, column: 2 }, end: { line: 196, column: 14 } },
'114': { start: { line: 206, column: 0 }, end: { line: 284, column: 2 } },
'115': { start: { line: 209, column: 2 }, end: { line: 243, column: 3 } },
'116': { start: { line: 210, column: 4 }, end: { line: 210, column: 20 } },
'117': { start: { line: 211, column: 4 }, end: { line: 211, column: 20 } },
'118': { start: { line: 212, column: 4 }, end: { line: 212, column: 20 } },
'119': { start: { line: 213, column: 4 }, end: { line: 213, column: 20 } },
'120': { start: { line: 214, column: 4 }, end: { line: 214, column: 20 } },
'121': { start: { line: 215, column: 4 }, end: { line: 215, column: 20 } },
'122': { start: { line: 216, column: 4 }, end: { line: 216, column: 20 } },
'123': { start: { line: 217, column: 4 }, end: { line: 217, column: 20 } },
'124': { start: { line: 218, column: 4 }, end: { line: 218, column: 20 } },
'125': { start: { line: 219, column: 4 }, end: { line: 219, column: 20 } },
'126': { start: { line: 220, column: 4 }, end: { line: 220, column: 21 } },
'127': { start: { line: 221, column: 4 }, end: { line: 221, column: 21 } },
'128': { start: { line: 222, column: 4 }, end: { line: 222, column: 21 } },
'129': { start: { line: 223, column: 4 }, end: { line: 223, column: 21 } },
'130': { start: { line: 224, column: 4 }, end: { line: 224, column: 21 } },
'131': { start: { line: 225, column: 4 }, end: { line: 225, column: 21 } },
'132': { start: { line: 226, column: 9 }, end: { line: 243, column: 3 } },
'133': { start: { line: 227, column: 4 }, end: { line: 227, column: 15 } },
'134': { start: { line: 228, column: 4 }, end: { line: 228, column: 15 } },
'135': { start: { line: 229, column: 4 }, end: { line: 229, column: 15 } },
'136': { start: { line: 230, column: 4 }, end: { line: 230, column: 15 } },
'137': { start: { line: 231, column: 4 }, end: { line: 231, column: 15 } },
'138': { start: { line: 232, column: 4 }, end: { line: 232, column: 15 } },
'139': { start: { line: 233, column: 4 }, end: { line: 233, column: 15 } },
'140': { start: { line: 234, column: 4 }, end: { line: 234, column: 15 } },
'141': { start: { line: 235, column: 4 }, end: { line: 235, column: 15 } },
'142': { start: { line: 236, column: 4 }, end: { line: 236, column: 15 } },
'143': { start: { line: 237, column: 4 }, end: { line: 237, column: 16 } },
'144': { start: { line: 238, column: 4 }, end: { line: 238, column: 16 } },
'145': { start: { line: 239, column: 4 }, end: { line: 239, column: 16 } },
'146': { start: { line: 240, column: 4 }, end: { line: 240, column: 16 } },
'147': { start: { line: 241, column: 4 }, end: { line: 241, column: 16 } },
'148': { start: { line: 242, column: 4 }, end: { line: 242, column: 16 } },
'149': { start: { line: 244, column: 14 }, end: { line: 244, column: 35 } },
'150': { start: { line: 245, column: 14 }, end: { line: 245, column: 35 } },
'151': { start: { line: 246, column: 14 }, end: { line: 246, column: 35 } },
'152': { start: { line: 247, column: 14 }, end: { line: 247, column: 35 } },
'153': { start: { line: 248, column: 14 }, end: { line: 248, column: 35 } },
'154': { start: { line: 249, column: 14 }, end: { line: 249, column: 35 } },
'155': { start: { line: 250, column: 14 }, end: { line: 250, column: 35 } },
'156': { start: { line: 251, column: 14 }, end: { line: 251, column: 35 } },
'157': { start: { line: 252, column: 14 }, end: { line: 252, column: 35 } },
'158': { start: { line: 253, column: 14 }, end: { line: 253, column: 35 } },
'159': { start: { line: 254, column: 14 }, end: { line: 254, column: 35 } },
'160': { start: { line: 255, column: 14 }, end: { line: 255, column: 35 } },
'161': { start: { line: 259, column: 4 }, end: { line: 259, column: 73 } },
'162': { start: { line: 261, column: 2 }, end: { line: 263, column: 3 } },
'163': { start: { line: 262, column: 4 }, end: { line: 262, column: 16 } },
'164': { start: { line: 264, column: 2 }, end: { line: 264, column: 18 } },
'165': { start: { line: 266, column: 2 }, end: { line: 266, column: 59 } },
'166': { start: { line: 267, column: 2 }, end: { line: 267, column: 59 } },
'167': { start: { line: 268, column: 2 }, end: { line: 268, column: 59 } },
'168': { start: { line: 269, column: 2 }, end: { line: 269, column: 59 } },
'169': { start: { line: 270, column: 2 }, end: { line: 270, column: 59 } },
'170': { start: { line: 271, column: 2 }, end: { line: 271, column: 59 } },
'171': { start: { line: 272, column: 2 }, end: { line: 272, column: 59 } },
'172': { start: { line: 273, column: 2 }, end: { line: 273, column: 59 } },
'173': { start: { line: 274, column: 2 }, end: { line: 274, column: 59 } },
'174': { start: { line: 275, column: 2 }, end: { line: 275, column: 59 } },
'175': { start: { line: 276, column: 2 }, end: { line: 276, column: 60 } },
'176': { start: { line: 277, column: 2 }, end: { line: 277, column: 60 } },
'177': { start: { line: 278, column: 2 }, end: { line: 278, column: 60 } },
'178': { start: { line: 279, column: 2 }, end: { line: 279, column: 60 } },
'179': { start: { line: 280, column: 2 }, end: { line: 280, column: 60 } },
'180': { start: { line: 281, column: 2 }, end: { line: 281, column: 60 } },
'181': { start: { line: 283, column: 2 }, end: { line: 283, column: 14 } },
'182': { start: { line: 291, column: 0 }, end: { line: 321, column: 2 } },
'183': { start: { line: 292, column: 14 }, end: { line: 292, column: 26 } },
'184': { start: { line: 293, column: 14 }, end: { line: 293, column: 26 } },
'185': { start: { line: 294, column: 14 }, end: { line: 294, column: 26 } },
'186': { start: { line: 295, column: 14 }, end: { line: 295, column: 26 } },
'187': { start: { line: 296, column: 14 }, end: { line: 296, column: 26 } },
'188': { start: { line: 297, column: 14 }, end: { line: 297, column: 26 } },
'189': { start: { line: 298, column: 14 }, end: { line: 298, column: 26 } },
'190': { start: { line: 299, column: 14 }, end: { line: 299, column: 26 } },
'191': { start: { line: 300, column: 14 }, end: { line: 300, column: 26 } },
'192': { start: { line: 301, column: 14 }, end: { line: 301, column: 35 } },
'193': { start: { line: 302, column: 14 }, end: { line: 302, column: 36 } },
'194': { start: { line: 303, column: 14 }, end: { line: 303, column: 35 } },
'195': { start: { line: 306, column: 12 }, end: { line: 306, column: 45 } },
'196': { start: { line: 307, column: 2 }, end: { line: 309, column: 3 } },
'197': { start: { line: 308, column: 4 }, end: { line: 308, column: 16 } },
'198': { start: { line: 310, column: 2 }, end: { line: 310, column: 18 } },
'199': { start: { line: 311, column: 2 }, end: { line: 311, column: 27 } },
'200': { start: { line: 312, column: 2 }, end: { line: 312, column: 48 } },
'201': { start: { line: 313, column: 2 }, end: { line: 313, column: 47 } },
'202': { start: { line: 314, column: 2 }, end: { line: 314, column: 27 } },
'203': { start: { line: 315, column: 2 }, end: { line: 315, column: 47 } },
'204': { start: { line: 316, column: 2 }, end: { line: 316, column: 48 } },
'205': { start: { line: 317, column: 2 }, end: { line: 317, column: 27 } },
'206': { start: { line: 318, column: 2 }, end: { line: 318, column: 48 } },
'207': { start: { line: 319, column: 2 }, end: { line: 319, column: 47 } },
'208': { start: { line: 320, column: 2 }, end: { line: 320, column: 14 } },
'209': { start: { line: 329, column: 0 }, end: { line: 340, column: 2 } },
'210': { start: { line: 330, column: 14 }, end: { line: 330, column: 21 } },
'211': { start: { line: 331, column: 10 }, end: { line: 331, column: 17 } },
'212': { start: { line: 332, column: 10 }, end: { line: 332, column: 17 } },
'213': { start: { line: 333, column: 2 }, end: { line: 333, column: 25 } },
'214': { start: { line: 334, column: 2 }, end: { line: 334, column: 25 } },
'215': { start: { line: 335, column: 2 }, end: { line: 335, column: 21 } },
'216': { start: { line: 336, column: 2 }, end: { line: 336, column: 25 } },
'217': { start: { line: 337, column: 2 }, end: { line: 337, column: 21 } },
'218': { start: { line: 338, column: 2 }, end: { line: 338, column: 21 } },
'219': { start: { line: 339, column: 2 }, end: { line: 339, column: 14 } },
'220': { start: { line: 350, column: 0 }, end: { line: 377, column: 2 } },
'221': { start: { line: 351, column: 2 }, end: { line: 364, column: 3 } },
'222': { start: { line: 352, column: 4 }, end: { line: 352, column: 63 } },
'223': { start: { line: 355, column: 4 }, end: { line: 355, column: 34 } },
'224': { start: { line: 356, column: 4 }, end: { line: 356, column: 34 } },
'225': { start: { line: 357, column: 4 }, end: { line: 357, column: 34 } },
'226': { start: { line: 358, column: 4 }, end: { line: 358, column: 34 } },
'227': { start: { line: 359, column: 4 }, end: { line: 359, column: 34 } },
'228': { start: { line: 360, column: 4 }, end: { line: 360, column: 34 } },
'229': { start: { line: 361, column: 4 }, end: { line: 361, column: 34 } },
'230': { start: { line: 362, column: 4 }, end: { line: 362, column: 34 } },
'231': { start: { line: 363, column: 4 }, end: { line: 363, column: 35 } },
'232': { start: { line: 366, column: 18 }, end: { line: 366, column: 34 } },
'233': { start: { line: 368, column: 2 }, end: { line: 375, column: 3 } },
'234': { start: { line: 369, column: 4 }, end: { line: 369, column: 36 } },
'235': { start: { line: 372, column: 4 }, end: { line: 374, column: 5 } },
'236': { start: { line: 372, column: 17 }, end: { line: 372, column: 18 } },
'237': { start: { line: 373, column: 6 }, end: { line: 373, column: 23 } },
'238': { start: { line: 376, column: 2 }, end: { line: 376, column: 14 } },
'239': { start: { line: 384, column: 0 }, end: { line: 400, column: 2 } },
'240': { start: { line: 385, column: 14 }, end: { line: 385, column: 71 } },
'241': { start: { line: 386, column: 10 }, end: { line: 386, column: 67 } },
'242': { start: { line: 387, column: 10 }, end: { line: 387, column: 67 } },
'243': { start: { line: 388, column: 10 }, end: { line: 388, column: 67 } },
'244': { start: { line: 389, column: 10 }, end: { line: 389, column: 67 } },
'245': { start: { line: 390, column: 10 }, end: { line: 390, column: 67 } },
'246': { start: { line: 391, column: 10 }, end: { line: 391, column: 69 } },
'247': { start: { line: 392, column: 10 }, end: { line: 392, column: 70 } },
'248': { start: { line: 393, column: 10 }, end: { line: 393, column: 70 } },
'249': { start: { line: 394, column: 10 }, end: { line: 394, column: 70 } },
'250': { start: { line: 395, column: 10 }, end: { line: 395, column: 70 } },
'251': { start: { line: 396, column: 10 }, end: { line: 396, column: 71 } },
'252': { start: { line: 399, column: 2 }, end: { line: 399, column: 79 } },
'253': { start: { line: 409, column: 0 }, end: { line: 462, column: 2 } },
'254': { start: { line: 412, column: 2 }, end: { line: 422, column: 3 } },
'255': { start: { line: 413, column: 4 }, end: { line: 413, column: 28 } },
'256': { start: { line: 414, column: 9 }, end: { line: 422, column: 3 } },
'257': { start: { line: 415, column: 4 }, end: { line: 415, column: 27 } },
'258': { start: { line: 416, column: 9 }, end: { line: 422, column: 3 } },
'259': { start: { line: 417, column: 4 }, end: { line: 417, column: 22 } },
'260': { start: { line: 418, column: 9 }, end: { line: 422, column: 3 } },
'261': { start: { line: 419, column: 4 }, end: { line: 419, column: 21 } },
'262': { start: { line: 421, column: 4 }, end: { line: 421, column: 11 } },
'263': { start: { line: 425, column: 11 }, end: { line: 425, column: 23 } },
'264': { start: { line: 426, column: 9 }, end: { line: 426, column: 21 } },
'265': { start: { line: 427, column: 9 }, end: { line: 427, column: 21 } },
'266': { start: { line: 428, column: 9 }, end: { line: 428, column: 21 } },
'267': { start: { line: 429, column: 2 }, end: { line: 429, column: 76 } },
'268': { start: { line: 430, column: 2 }, end: { line: 430, column: 76 } },
'269': { start: { line: 431, column: 2 }, end: { line: 431, column: 77 } },
'270': { start: { line: 432, column: 2 }, end: { line: 432, column: 77 } },
'271': { start: { line: 434, column: 2 }, end: { line: 434, column: 20 } },
'272': { start: { line: 435, column: 2 }, end: { line: 435, column: 20 } },
'273': { start: { line: 436, column: 2 }, end: { line: 436, column: 20 } },
'274': { start: { line: 437, column: 2 }, end: { line: 437, column: 20 } },
'275': { start: { line: 438, column: 2 }, end: { line: 438, column: 76 } },
'276': { start: { line: 439, column: 2 }, end: { line: 439, column: 76 } },
'277': { start: { line: 440, column: 2 }, end: { line: 440, column: 77 } },
'278': { start: { line: 441, column: 2 }, end: { line: 441, column: 77 } },
'279': { start: { line: 443, column: 2 }, end: { line: 443, column: 20 } },
'280': { start: { line: 444, column: 2 }, end: { line: 444, column: 20 } },
'281': { start: { line: 445, column: 2 }, end: { line: 445, column: 21 } },
'282': { start: { line: 446, column: 2 }, end: { line: 446, column: 21 } },
'283': { start: { line: 447, column: 2 }, end: { line: 447, column: 76 } },
'284': { start: { line: 448, column: 2 }, end: { line: 448, column: 76 } },
'285': { start: { line: 449, column: 2 }, end: { line: 449, column: 78 } },
'286': { start: { line: 450, column: 2 }, end: { line: 450, column: 78 } },
'287': { start: { line: 452, column: 2 }, end: { line: 452, column: 21 } },
'288': { start: { line: 453, column: 2 }, end: { line: 453, column: 21 } },
'289': { start: { line: 454, column: 2 }, end: { line: 454, column: 21 } },
'290': { start: { line: 455, column: 2 }, end: { line: 455, column: 21 } },
'291': { start: { line: 456, column: 2 }, end: { line: 456, column: 77 } },
'292': { start: { line: 457, column: 2 }, end: { line: 457, column: 77 } },
'293': { start: { line: 458, column: 2 }, end: { line: 458, column: 78 } },
'294': { start: { line: 459, column: 2 }, end: { line: 459, column: 78 } },
'295': { start: { line: 461, column: 2 }, end: { line: 461, column: 14 } },
'296': { start: { line: 464, column: 0 }, end: { line: 519, column: 2 } },
'297': { start: { line: 467, column: 2 }, end: { line: 477, column: 3 } },
'298': { start: { line: 468, column: 4 }, end: { line: 468, column: 28 } },
'299': { start: { line: 469, column: 9 }, end: { line: 477, column: 3 } },
'300': { start: { line: 470, column: 4 }, end: { line: 470, column: 27 } },
'301': { start: { line: 471, column: 9 }, end: { line: 477, column: 3 } },
'302': { start: { line: 472, column: 4 }, end: { line: 472, column: 22 } },
'303': { start: { line: 473, column: 9 }, end: { line: 477, column: 3 } },
'304': { start: { line: 474, column: 4 }, end: { line: 474, column: 21 } },
'305': { start: { line: 476, column: 4 }, end: { line: 476, column: 11 } },
'306': { start: { line: 479, column: 15 }, end: { line: 479, column: 24 } },
'307': { start: { line: 482, column: 13 }, end: { line: 482, column: 20 } },
'308': { start: { line: 483, column: 13 }, end: { line: 483, column: 20 } },
'309': { start: { line: 484, column: 13 }, end: { line: 484, column: 20 } },
'310': { start: { line: 485, column: 14 }, end: { line: 485, column: 22 } },
'311': { start: { line: 486, column: 2 }, end: { line: 486, column: 71 } },
'312': { start: { line: 487, column: 2 }, end: { line: 487, column: 71 } },
'313': { start: { line: 488, column: 2 }, end: { line: 488, column: 73 } },
'314': { start: { line: 489, column: 2 }, end: { line: 489, column: 76 } },
'315': { start: { line: 491, column: 13 }, end: { line: 491, column: 20 } },
'316': { start: { line: 492, column: 13 }, end: { line: 492, column: 20 } },
'317': { start: { line: 493, column: 13 }, end: { line: 493, column: 20 } },
'318': { start: { line: 494, column: 14 }, end: { line: 494, column: 22 } },
'319': { start: { line: 495, column: 2 }, end: { line: 495, column: 71 } },
'320': { start: { line: 496, column: 2 }, end: { line: 496, column: 71 } },
'321': { start: { line: 497, column: 2 }, end: { line: 497, column: 73 } },
'322': { start: { line: 498, column: 2 }, end: { line: 498, column: 76 } },
'323': { start: { line: 500, column: 13 }, end: { line: 500, column: 20 } },
'324': { start: { line: 501, column: 13 }, end: { line: 501, column: 20 } },
'325': { start: { line: 502, column: 14 }, end: { line: 502, column: 22 } },
'326': { start: { line: 503, column: 14 }, end: { line: 503, column: 22 } },
'327': { start: { line: 504, column: 2 }, end: { line: 504, column: 72 } },
'328': { start: { line: 505, column: 2 }, end: { line: 505, column: 72 } },
'329': { start: { line: 506, column: 2 }, end: { line: 506, column: 75 } },
'330': { start: { line: 507, column: 2 }, end: { line: 507, column: 77 } },
'331': { start: { line: 509, column: 13 }, end: { line: 509, column: 20 } },
'332': { start: { line: 510, column: 13 }, end: { line: 510, column: 20 } },
'333': { start: { line: 511, column: 14 }, end: { line: 511, column: 22 } },
'334': { start: { line: 512, column: 14 }, end: { line: 512, column: 22 } },
'335': { start: { line: 513, column: 2 }, end: { line: 513, column: 72 } },
'336': { start: { line: 514, column: 2 }, end: { line: 514, column: 72 } },
'337': { start: { line: 515, column: 2 }, end: { line: 515, column: 75 } },
'338': { start: { line: 516, column: 2 }, end: { line: 516, column: 77 } },
'339': { start: { line: 518, column: 2 }, end: { line: 518, column: 14 } },
'340': { start: { line: 527, column: 0 }, end: { line: 554, column: 2 } },
'341': { start: { line: 528, column: 2 }, end: { line: 538, column: 3 } },
'342': { start: { line: 530, column: 4 }, end: { line: 530, column: 12 } },
'343': { start: { line: 531, column: 4 }, end: { line: 531, column: 12 } },
'344': { start: { line: 532, column: 4 }, end: { line: 532, column: 12 } },
'345': { start: { line: 533, column: 9 }, end: { line: 538, column: 3 } },
'346': { start: { line: 535, column: 4 }, end: { line: 535, column: 13 } },
'347': { start: { line: 536, column: 4 }, end: { line: 536, column: 13 } },
'348': { start: { line: 537, column: 4 }, end: { line: 537, column: 13 } },
'349': { start: { line: 540, column: 2 }, end: { line: 540, column: 20 } },
'350': { start: { line: 541, column: 2 }, end: { line: 541, column: 20 } },
'351': { start: { line: 542, column: 2 }, end: { line: 542, column: 20 } },
'352': { start: { line: 543, column: 2 }, end: { line: 543, column: 20 } },
'353': { start: { line: 544, column: 2 }, end: { line: 544, column: 20 } },
'354': { start: { line: 545, column: 2 }, end: { line: 545, column: 20 } },
'355': { start: { line: 546, column: 2 }, end: { line: 546, column: 20 } },
'356': { start: { line: 547, column: 2 }, end: { line: 547, column: 20 } },
'357': { start: { line: 548, column: 2 }, end: { line: 548, column: 20 } },
'358': { start: { line: 549, column: 2 }, end: { line: 549, column: 20 } },
'359': { start: { line: 550, column: 2 }, end: { line: 550, column: 21 } },
'360': { start: { line: 551, column: 2 }, end: { line: 551, column: 21 } },
'361': { start: { line: 553, column: 2 }, end: { line: 553, column: 14 } },
'362': { start: { line: 564, column: 0 }, end: { line: 625, column: 2 } },
'363': { start: { line: 565, column: 2 }, end: { line: 575, column: 3 } },
'364': { start: { line: 567, column: 4 }, end: { line: 567, column: 12 } },
'365': { start: { line: 568, column: 4 }, end: { line: 568, column: 12 } },
'366': { start: { line: 569, column: 4 }, end: { line: 569, column: 12 } },
'367': { start: { line: 570, column: 9 }, end: { line: 575, column: 3 } },
'368': { start: { line: 572, column: 4 }, end: { line: 572, column: 13 } },
'369': { start: { line: 573, column: 4 }, end: { line: 573, column: 13 } },
'370': { start: { line: 574, column: 4 }, end: { line: 574, column: 13 } },
'371': { start: { line: 577, column: 14 }, end: { line: 577, column: 46 } },
'372': { start: { line: 578, column: 2 }, end: { line: 578, column: 15 } },
'373': { start: { line: 579, column: 2 }, end: { line: 579, column: 15 } },
'374': { start: { line: 580, column: 2 }, end: { line: 580, column: 15 } },
'375': { start: { line: 582, column: 14 }, end: { line: 582, column: 26 } },
'376': { start: { line: 583, column: 14 }, end: { line: 583, column: 26 } },
'377': { start: { line: 584, column: 14 }, end: { line: 584, column: 26 } },
'378': { start: { line: 585, column: 14 }, end: { line: 585, column: 26 } },
'379': { start: { line: 586, column: 14 }, end: { line: 586, column: 26 } },
'380': { start: { line: 587, column: 14 }, end: { line: 587, column: 26 } },
'381': { start: { line: 588, column: 14 }, end: { line: 588, column: 26 } },
'382': { start: { line: 589, column: 14 }, end: { line: 589, column: 26 } },
'383': { start: { line: 590, column: 14 }, end: { line: 590, column: 26 } },
'384': { start: { line: 591, column: 14 }, end: { line: 591, column: 26 } },
'385': { start: { line: 592, column: 14 }, end: { line: 592, column: 27 } },
'386': { start: { line: 593, column: 14 }, end: { line: 593, column: 27 } },
'387': { start: { line: 596, column: 13 }, end: { line: 596, column: 24 } },
'388': { start: { line: 597, column: 13 }, end: { line: 597, column: 24 } },
'389': { start: { line: 598, column: 13 }, end: { line: 598, column: 19 } },
'390': { start: { line: 600, column: 14 }, end: { line: 600, column: 29 } },
'391': { start: { line: 601, column: 14 }, end: { line: 601, column: 33 } },
'392': { start: { line: 602, column: 14 }, end: { line: 602, column: 33 } },
'393': { start: { line: 603, column: 14 }, end: { line: 603, column: 33 } },
'394': { start: { line: 604, column: 14 }, end: { line: 604, column: 29 } },
'395': { start: { line: 605, column: 14 }, end: { line: 605, column: 33 } },
'396': { start: { line: 606, column: 14 }, end: { line: 606, column: 33 } },
'397': { start: { line: 607, column: 14 }, end: { line: 607, column: 33 } },
'398': { start: { line: 608, column: 14 }, end: { line: 608, column: 29 } },
'399': { start: { line: 611, column: 2 }, end: { line: 611, column: 51 } },
'400': { start: { line: 612, column: 2 }, end: { line: 612, column: 51 } },
'401': { start: { line: 613, column: 2 }, end: { line: 613, column: 51 } },
'402': { start: { line: 614, column: 2 }, end: { line: 614, column: 51 } },
'403': { start: { line: 615, column: 2 }, end: { line: 615, column: 51 } },
'404': { start: { line: 616, column: 2 }, end: { line: 616, column: 51 } },
'405': { start: { line: 617, column: 2 }, end: { line: 617, column: 51 } },
'406': { start: { line: 618, column: 2 }, end: { line: 618, column: 51 } },
'407': { start: { line: 619, column: 2 }, end: { line: 619, column: 51 } },
'408': { start: { line: 620, column: 2 }, end: { line: 620, column: 51 } },
'409': { start: { line: 621, column: 2 }, end: { line: 621, column: 52 } },
'410': { start: { line: 622, column: 2 }, end: { line: 622, column: 52 } },
'411': { start: { line: 624, column: 2 }, end: { line: 624, column: 14 } },
'412': { start: { line: 634, column: 0 }, end: { line: 642, column: 2 } },
'413': { start: { line: 635, column: 12 }, end: { line: 635, column: 16 } },
'414': { start: { line: 636, column: 8 }, end: { line: 636, column: 12 } },
'415': { start: { line: 637, column: 8 }, end: { line: 637, column: 17 } },
'416': { start: { line: 638, column: 2 }, end: { line: 638, column: 74 } },
'417': { start: { line: 639, column: 2 }, end: { line: 639, column: 74 } },
'418': { start: { line: 640, column: 2 }, end: { line: 640, column: 75 } },
'419': { start: { line: 641, column: 2 }, end: { line: 641, column: 75 } },
'420': { start: { line: 644, column: 0 }, end: { line: 646, column: 2 } },
'421': { start: { line: 645, column: 2 }, end: { line: 645, column: 26 } },
'422': { start: { line: 647, column: 0 }, end: { line: 649, column: 2 } },
'423': { start: { line: 648, column: 2 }, end: { line: 648, column: 26 } },
'424': { start: { line: 650, column: 0 }, end: { line: 652, column: 2 } },
'425': { start: { line: 651, column: 2 }, end: { line: 651, column: 26 } },
'426': { start: { line: 663, column: 0 }, end: { line: 685, column: 2 } },
'427': { start: { line: 664, column: 12 }, end: { line: 664, column: 36 } },
'428': { start: { line: 665, column: 9 }, end: { line: 665, column: 25 } },
'429': { start: { line: 667, column: 2 }, end: { line: 667, column: 28 } },
'430': { start: { line: 668, column: 2 }, end: { line: 668, column: 19 } },
'431': { start: { line: 669, column: 2 }, end: { line: 669, column: 19 } },
'432': { start: { line: 670, column: 2 }, end: { line: 670, column: 19 } },
'433': { start: { line: 671, column: 2 }, end: { line: 671, column: 19 } },
'434': { start: { line: 672, column: 2 }, end: { line: 672, column: 19 } },
'435': { start: { line: 673, column: 2 }, end: { line: 673, column: 19 } },
'436': { start: { line: 674, column: 2 }, end: { line: 674, column: 19 } },
'437': { start: { line: 675, column: 2 }, end: { line: 675, column: 19 } },
'438': { start: { line: 676, column: 2 }, end: { line: 676, column: 19 } },
'439': { start: { line: 677, column: 2 }, end: { line: 677, column: 36 } },
'440': { start: { line: 678, column: 2 }, end: { line: 678, column: 21 } },
'441': { start: { line: 679, column: 2 }, end: { line: 679, column: 20 } },
'442': { start: { line: 680, column: 2 }, end: { line: 680, column: 20 } },
'443': { start: { line: 681, column: 2 }, end: { line: 681, column: 38 } },
'444': { start: { line: 682, column: 2 }, end: { line: 682, column: 20 } },
'445': { start: { line: 684, column: 2 }, end: { line: 684, column: 14 } },
'446': { start: { line: 698, column: 0 }, end: { line: 720, column: 2 } },
'447': { start: { line: 699, column: 13 }, end: { line: 699, column: 31 } },
'448': { start: { line: 700, column: 9 }, end: { line: 700, column: 27 } },
'449': { start: { line: 701, column: 9 }, end: { line: 701, column: 25 } },
'450': { start: { line: 702, column: 2 }, end: { line: 702, column: 25 } },
'451': { start: { line: 703, column: 2 }, end: { line: 703, column: 19 } },
'452': { start: { line: 704, column: 2 }, end: { line: 704, column: 19 } },
'453': { start: { line: 705, column: 2 }, end: { line: 705, column: 19 } },
'454': { start: { line: 706, column: 2 }, end: { line: 706, column: 19 } },
'455': { start: { line: 707, column: 2 }, end: { line: 707, column: 25 } },
'456': { start: { line: 708, column: 2 }, end: { line: 708, column: 19 } },
'457': { start: { line: 709, column: 2 }, end: { line: 709, column: 19 } },
'458': { start: { line: 710, column: 2 }, end: { line: 710, column: 19 } },
'459': { start: { line: 711, column: 2 }, end: { line: 711, column: 19 } },
'460': { start: { line: 712, column: 2 }, end: { line: 712, column: 25 } },
'461': { start: { line: 713, column: 2 }, end: { line: 713, column: 20 } },
'462': { start: { line: 714, column: 2 }, end: { line: 714, column: 38 } },
'463': { start: { line: 715, column: 2 }, end: { line: 715, column: 38 } },
'464': { start: { line: 716, column: 2 }, end: { line: 716, column: 36 } },
'465': { start: { line: 717, column: 2 }, end: { line: 717, column: 20 } },
'466': { start: { line: 719, column: 2 }, end: { line: 719, column: 14 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 13, column: 20 }, end: { line: 13, column: 21 } },
loc: { start: { line: 13, column: 25 }, end: { line: 13, column: 43 } },
line: 13
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 16, column: 18 }, end: { line: 16, column: 19 } },
loc: { start: { line: 16, column: 23 }, end: { line: 16, column: 70 } },
line: 16
},
'2': {
name: '(anonymous_2)',
decl: { start: { line: 27, column: 12 }, end: { line: 27, column: 13 } },
loc: { start: { line: 27, column: 23 }, end: { line: 50, column: 1 } },
line: 27
},
'3': {
name: '(anonymous_3)',
decl: { start: { line: 67, column: 26 }, end: { line: 67, column: 27 } },
loc: { start: { line: 67, column: 45 }, end: { line: 93, column: 1 } },
line: 67
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 101, column: 26 },
end: { line: 101, column: 27 }
},
loc: { start: { line: 101, column: 37 }, end: { line: 103, column: 1 } },
line: 101
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 110, column: 27 },
end: { line: 110, column: 28 }
},
loc: { start: { line: 110, column: 38 }, end: { line: 129, column: 1 } },
line: 110
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 136, column: 21 },
end: { line: 136, column: 22 }
},
loc: { start: { line: 136, column: 30 }, end: { line: 136, column: 50 } },
line: 136
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 145, column: 32 },
end: { line: 145, column: 33 }
},
loc: { start: { line: 145, column: 44 }, end: { line: 197, column: 1 } },
line: 145
},
'8': {
name: '(anonymous_8)',
decl: {
start: { line: 206, column: 29 },
end: { line: 206, column: 30 }
},
loc: { start: { line: 206, column: 41 }, end: { line: 284, column: 1 } },
line: 206
},
'9': {
name: '(anonymous_9)',
decl: {
start: { line: 291, column: 32 },
end: { line: 291, column: 33 }
},
loc: { start: { line: 291, column: 43 }, end: { line: 321, column: 1 } },
line: 291
},
'10': {
name: '(anonymous_10)',
decl: {
start: { line: 329, column: 35 },
end: { line: 329, column: 36 }
},
loc: { start: { line: 329, column: 50 }, end: { line: 340, column: 1 } },
line: 329
},
'11': {
name: '(anonymous_11)',
decl: {
start: { line: 350, column: 39 },
end: { line: 350, column: 40 }
},
loc: { start: { line: 350, column: 56 }, end: { line: 377, column: 1 } },
line: 350
},
'12': {
name: '(anonymous_12)',
decl: {
start: { line: 384, column: 34 },
end: { line: 384, column: 35 }
},
loc: { start: { line: 384, column: 45 }, end: { line: 400, column: 1 } },
line: 384
},
'13': {
name: '(anonymous_13)',
decl: {
start: { line: 409, column: 27 },
end: { line: 409, column: 28 }
},
loc: { start: { line: 409, column: 48 }, end: { line: 462, column: 1 } },
line: 409
},
'14': {
name: '(anonymous_14)',
decl: {
start: { line: 464, column: 28 },
end: { line: 464, column: 29 }
},
loc: { start: { line: 464, column: 49 }, end: { line: 519, column: 1 } },
line: 464
},
'15': {
name: '(anonymous_15)',
decl: {
start: { line: 527, column: 28 },
end: { line: 527, column: 29 }
},
loc: { start: { line: 527, column: 46 }, end: { line: 554, column: 1 } },
line: 527
},
'16': {
name: '(anonymous_16)',
decl: {
start: { line: 564, column: 29 },
end: { line: 564, column: 30 }
},
loc: { start: { line: 564, column: 50 }, end: { line: 625, column: 1 } },
line: 564
},
'17': {
name: '(anonymous_17)',
decl: {
start: { line: 634, column: 32 },
end: { line: 634, column: 33 }
},
loc: { start: { line: 634, column: 44 }, end: { line: 642, column: 1 } },
line: 634
},
'18': {
name: '(anonymous_18)',
decl: {
start: { line: 644, column: 30 },
end: { line: 644, column: 31 }
},
loc: { start: { line: 644, column: 42 }, end: { line: 646, column: 1 } },
line: 644
},
'19': {
name: '(anonymous_19)',
decl: {
start: { line: 647, column: 30 },
end: { line: 647, column: 31 }
},
loc: { start: { line: 647, column: 42 }, end: { line: 649, column: 1 } },
line: 647
},
'20': {
name: '(anonymous_20)',
decl: {
start: { line: 650, column: 30 },
end: { line: 650, column: 31 }
},
loc: { start: { line: 650, column: 42 }, end: { line: 652, column: 1 } },
line: 650
},
'21': {
name: '(anonymous_21)',
decl: {
start: { line: 663, column: 34 },
end: { line: 663, column: 35 }
},
loc: { start: { line: 663, column: 68 }, end: { line: 685, column: 1 } },
line: 663
},
'22': {
name: '(anonymous_22)',
decl: {
start: { line: 698, column: 28 },
end: { line: 698, column: 29 }
},
loc: { start: { line: 698, column: 74 }, end: { line: 720, column: 1 } },
line: 698
}
},
branchMap: {
'0': {
loc: { start: { line: 14, column: 0 }, end: { line: 17, column: 1 } },
type: 'if',
locations: [
{ start: { line: 14, column: 0 }, end: { line: 17, column: 1 } },
{ start: { line: 14, column: 0 }, end: { line: 17, column: 1 } }
],
line: 14
},
'1': {
loc: { start: { line: 16, column: 23 }, end: { line: 16, column: 70 } },
type: 'binary-expr',
locations: [
{ start: { line: 16, column: 23 }, end: { line: 16, column: 41 } },
{ start: { line: 16, column: 45 }, end: { line: 16, column: 70 } }
],
line: 16
},
'2': {
loc: { start: { line: 36, column: 2 }, end: { line: 38, column: 3 } },
type: 'if',
locations: [
{ start: { line: 36, column: 2 }, end: { line: 38, column: 3 } },
{ start: { line: 36, column: 2 }, end: { line: 38, column: 3 } }
],
line: 36
},
'3': {
loc: { start: { line: 36, column: 6 }, end: { line: 36, column: 56 } },
type: 'binary-expr',
locations: [
{ start: { line: 36, column: 6 }, end: { line: 36, column: 17 } },
{ start: { line: 36, column: 21 }, end: { line: 36, column: 56 } }
],
line: 36
},
'4': {
loc: { start: { line: 40, column: 2 }, end: { line: 48, column: 3 } },
type: 'if',
locations: [
{ start: { line: 40, column: 2 }, end: { line: 48, column: 3 } },
{ start: { line: 40, column: 2 }, end: { line: 48, column: 3 } }
],
line: 40
},
'5': {
loc: { start: { line: 41, column: 16 }, end: { line: 43, column: 57 } },
type: 'cond-expr',
locations: [
{ start: { line: 42, column: 8 }, end: { line: 42, column: 15 } },
{ start: { line: 43, column: 8 }, end: { line: 43, column: 57 } }
],
line: 41
},
'6': {
loc: { start: { line: 45, column: 16 }, end: { line: 47, column: 78 } },
type: 'cond-expr',
locations: [
{ start: { line: 46, column: 8 }, end: { line: 46, column: 15 } },
{ start: { line: 47, column: 8 }, end: { line: 47, column: 78 } }
],
line: 45
},
'7': {
loc: { start: { line: 68, column: 2 }, end: { line: 91, column: 3 } },
type: 'if',
locations: [
{ start: { line: 68, column: 2 }, end: { line: 91, column: 3 } },
{ start: { line: 68, column: 2 }, end: { line: 91, column: 3 } }
],
line: 68
},
'8': {
loc: { start: { line: 71, column: 9 }, end: { line: 91, column: 3 } },
type: 'if',
locations: [
{ start: { line: 71, column: 9 }, end: { line: 91, column: 3 } },
{ start: { line: 71, column: 9 }, end: { line: 91, column: 3 } }
],
line: 71
},
'9': {
loc: { start: { line: 74, column: 9 }, end: { line: 91, column: 3 } },
type: 'if',
locations: [
{ start: { line: 74, column: 9 }, end: { line: 91, column: 3 } },
{ start: { line: 74, column: 9 }, end: { line: 91, column: 3 } }
],
line: 74
},
'10': {
loc: { start: { line: 147, column: 2 }, end: { line: 195, column: 3 } },
type: 'if',
locations: [
{ start: { line: 147, column: 2 }, end: { line: 195, column: 3 } },
{ start: { line: 147, column: 2 }, end: { line: 195, column: 3 } }
],
line: 147
},
'11': {
loc: { start: { line: 171, column: 9 }, end: { line: 195, column: 3 } },
type: 'if',
locations: [
{ start: { line: 171, column: 9 }, end: { line: 195, column: 3 } },
{ start: { line: 171, column: 9 }, end: { line: 195, column: 3 } }
],
line: 171
},
'12': {
loc: { start: { line: 209, column: 2 }, end: { line: 243, column: 3 } },
type: 'if',
locations: [
{ start: { line: 209, column: 2 }, end: { line: 243, column: 3 } },
{ start: { line: 209, column: 2 }, end: { line: 243, column: 3 } }
],
line: 209
},
'13': {
loc: { start: { line: 226, column: 9 }, end: { line: 243, column: 3 } },
type: 'if',
locations: [
{ start: { line: 226, column: 9 }, end: { line: 243, column: 3 } },
{ start: { line: 226, column: 9 }, end: { line: 243, column: 3 } }
],
line: 226
},
'14': {
loc: { start: { line: 261, column: 2 }, end: { line: 263, column: 3 } },
type: 'if',
locations: [
{ start: { line: 261, column: 2 }, end: { line: 263, column: 3 } },
{ start: { line: 261, column: 2 }, end: { line: 263, column: 3 } }
],
line: 261
},
'15': {
loc: { start: { line: 307, column: 2 }, end: { line: 309, column: 3 } },
type: 'if',
locations: [
{ start: { line: 307, column: 2 }, end: { line: 309, column: 3 } },
{ start: { line: 307, column: 2 }, end: { line: 309, column: 3 } }
],
line: 307
},
'16': {
loc: { start: { line: 351, column: 2 }, end: { line: 364, column: 3 } },
type: 'if',
locations: [
{ start: { line: 351, column: 2 }, end: { line: 364, column: 3 } },
{ start: { line: 351, column: 2 }, end: { line: 364, column: 3 } }
],
line: 351
},
'17': {
loc: { start: { line: 368, column: 2 }, end: { line: 375, column: 3 } },
type: 'if',
locations: [
{ start: { line: 368, column: 2 }, end: { line: 375, column: 3 } },
{ start: { line: 368, column: 2 }, end: { line: 375, column: 3 } }
],
line: 368
},
'18': {
loc: { start: { line: 412, column: 2 }, end: { line: 422, column: 3 } },
type: 'if',
locations: [
{ start: { line: 412, column: 2 }, end: { line: 422, column: 3 } },
{ start: { line: 412, column: 2 }, end: { line: 422, column: 3 } }
],
line: 412
},
'19': {
loc: { start: { line: 412, column: 6 }, end: { line: 412, column: 53 } },
type: 'binary-expr',
locations: [
{ start: { line: 412, column: 6 }, end: { line: 412, column: 25 } },
{ start: { line: 412, column: 29 }, end: { line: 412, column: 53 } }
],
line: 412
},
'20': {
loc: { start: { line: 414, column: 9 }, end: { line: 422, column: 3 } },
type: 'if',
locations: [
{ start: { line: 414, column: 9 }, end: { line: 422, column: 3 } },
{ start: { line: 414, column: 9 }, end: { line: 422, column: 3 } }
],
line: 414
},
'21': {
loc: { start: { line: 416, column: 9 }, end: { line: 422, column: 3 } },
type: 'if',
locations: [
{ start: { line: 416, column: 9 }, end: { line: 422, column: 3 } },
{ start: { line: 416, column: 9 }, end: { line: 422, column: 3 } }
],
line: 416
},
'22': {
loc: { start: { line: 418, column: 9 }, end: { line: 422, column: 3 } },
type: 'if',
locations: [
{ start: { line: 418, column: 9 }, end: { line: 422, column: 3 } },
{ start: { line: 418, column: 9 }, end: { line: 422, column: 3 } }
],
line: 418
},
'23': {
loc: { start: { line: 467, column: 2 }, end: { line: 477, column: 3 } },
type: 'if',
locations: [
{ start: { line: 467, column: 2 }, end: { line: 477, column: 3 } },
{ start: { line: 467, column: 2 }, end: { line: 477, column: 3 } }
],
line: 467
},
'24': {
loc: { start: { line: 467, column: 6 }, end: { line: 467, column: 53 } },
type: 'binary-expr',
locations: [
{ start: { line: 467, column: 6 }, end: { line: 467, column: 25 } },
{ start: { line: 467, column: 29 }, end: { line: 467, column: 53 } }
],
line: 467
},
'25': {
loc: { start: { line: 469, column: 9 }, end: { line: 477, column: 3 } },
type: 'if',
locations: [
{ start: { line: 469, column: 9 }, end: { line: 477, column: 3 } },
{ start: { line: 469, column: 9 }, end: { line: 477, column: 3 } }
],
line: 469
},
'26': {
loc: { start: { line: 471, column: 9 }, end: { line: 477, column: 3 } },
type: 'if',
locations: [
{ start: { line: 471, column: 9 }, end: { line: 477, column: 3 } },
{ start: { line: 471, column: 9 }, end: { line: 477, column: 3 } }
],
line: 471
},
'27': {
loc: { start: { line: 473, column: 9 }, end: { line: 477, column: 3 } },
type: 'if',
locations: [
{ start: { line: 473, column: 9 }, end: { line: 477, column: 3 } },
{ start: { line: 473, column: 9 }, end: { line: 477, column: 3 } }
],
line: 473
},
'28': {
loc: { start: { line: 528, column: 2 }, end: { line: 538, column: 3 } },
type: 'if',
locations: [
{ start: { line: 528, column: 2 }, end: { line: 538, column: 3 } },
{ start: { line: 528, column: 2 }, end: { line: 538, column: 3 } }
],
line: 528
},
'29': {
loc: { start: { line: 533, column: 9 }, end: { line: 538, column: 3 } },
type: 'if',
locations: [
{ start: { line: 533, column: 9 }, end: { line: 538, column: 3 } },
{ start: { line: 533, column: 9 }, end: { line: 538, column: 3 } }
],
line: 533
},
'30': {
loc: { start: { line: 565, column: 2 }, end: { line: 575, column: 3 } },
type: 'if',
locations: [
{ start: { line: 565, column: 2 }, end: { line: 575, column: 3 } },
{ start: { line: 565, column: 2 }, end: { line: 575, column: 3 } }
],
line: 565
},
'31': {
loc: { start: { line: 570, column: 9 }, end: { line: 575, column: 3 } },
type: 'if',
locations: [
{ start: { line: 570, column: 9 }, end: { line: 575, column: 3 } },
{ start: { line: 570, column: 9 }, end: { line: 575, column: 3 } }
],
line: 570
},
'32': {
loc: { start: { line: 637, column: 8 }, end: { line: 637, column: 17 } },
type: 'binary-expr',
locations: [
{ start: { line: 637, column: 8 }, end: { line: 637, column: 12 } },
{ start: { line: 637, column: 16 }, end: { line: 637, column: 17 } }
],
line: 637
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0,
'123': 0,
'124': 0,
'125': 0,
'126': 0,
'127': 0,
'128': 0,
'129': 0,
'130': 0,
'131': 0,
'132': 0,
'133': 0,
'134': 0,
'135': 0,
'136': 0,
'137': 0,
'138': 0,
'139': 0,
'140': 0,
'141': 0,
'142': 0,
'143': 0,
'144': 0,
'145': 0,
'146': 0,
'147': 0,
'148': 0,
'149': 0,
'150': 0,
'151': 0,
'152': 0,
'153': 0,
'154': 0,
'155': 0,
'156': 0,
'157': 0,
'158': 0,
'159': 0,
'160': 0,
'161': 0,
'162': 0,
'163': 0,
'164': 0,
'165': 0,
'166': 0,
'167': 0,
'168': 0,
'169': 0,
'170': 0,
'171': 0,
'172': 0,
'173': 0,
'174': 0,
'175': 0,
'176': 0,
'177': 0,
'178': 0,
'179': 0,
'180': 0,
'181': 0,
'182': 0,
'183': 0,
'184': 0,
'185': 0,
'186': 0,
'187': 0,
'188': 0,
'189': 0,
'190': 0,
'191': 0,
'192': 0,
'193': 0,
'194': 0,
'195': 0,
'196': 0,
'197': 0,
'198': 0,
'199': 0,
'200': 0,
'201': 0,
'202': 0,
'203': 0,
'204': 0,
'205': 0,
'206': 0,
'207': 0,
'208': 0,
'209': 0,
'210': 0,
'211': 0,
'212': 0,
'213': 0,
'214': 0,
'215': 0,
'216': 0,
'217': 0,
'218': 0,
'219': 0,
'220': 0,
'221': 0,
'222': 0,
'223': 0,
'224': 0,
'225': 0,
'226': 0,
'227': 0,
'228': 0,
'229': 0,
'230': 0,
'231': 0,
'232': 0,
'233': 0,
'234': 0,
'235': 0,
'236': 0,
'237': 0,
'238': 0,
'239': 0,
'240': 0,
'241': 0,
'242': 0,
'243': 0,
'244': 0,
'245': 0,
'246': 0,
'247': 0,
'248': 0,
'249': 0,
'250': 0,
'251': 0,
'252': 0,
'253': 0,
'254': 0,
'255': 0,
'256': 0,
'257': 0,
'258': 0,
'259': 0,
'260': 0,
'261': 0,
'262': 0,
'263': 0,
'264': 0,
'265': 0,
'266': 0,
'267': 0,
'268': 0,
'269': 0,
'270': 0,
'271': 0,
'272': 0,
'273': 0,
'274': 0,
'275': 0,
'276': 0,
'277': 0,
'278': 0,
'279': 0,
'280': 0,
'281': 0,
'282': 0,
'283': 0,
'284': 0,
'285': 0,
'286': 0,
'287': 0,
'288': 0,
'289': 0,
'290': 0,
'291': 0,
'292': 0,
'293': 0,
'294': 0,
'295': 0,
'296': 0,
'297': 0,
'298': 0,
'299': 0,
'300': 0,
'301': 0,
'302': 0,
'303': 0,
'304': 0,
'305': 0,
'306': 0,
'307': 0,
'308': 0,
'309': 0,
'310': 0,
'311': 0,
'312': 0,
'313': 0,
'314': 0,
'315': 0,
'316': 0,
'317': 0,
'318': 0,
'319': 0,
'320': 0,
'321': 0,
'322': 0,
'323': 0,
'324': 0,
'325': 0,
'326': 0,
'327': 0,
'328': 0,
'329': 0,
'330': 0,
'331': 0,
'332': 0,
'333': 0,
'334': 0,
'335': 0,
'336': 0,
'337': 0,
'338': 0,
'339': 0,
'340': 0,
'341': 0,
'342': 0,
'343': 0,
'344': 0,
'345': 0,
'346': 0,
'347': 0,
'348': 0,
'349': 0,
'350': 0,
'351': 0,
'352': 0,
'353': 0,
'354': 0,
'355': 0,
'356': 0,
'357': 0,
'358': 0,
'359': 0,
'360': 0,
'361': 0,
'362': 0,
'363': 0,
'364': 0,
'365': 0,
'366': 0,
'367': 0,
'368': 0,
'369': 0,
'370': 0,
'371': 0,
'372': 0,
'373': 0,
'374': 0,
'375': 0,
'376': 0,
'377': 0,
'378': 0,
'379': 0,
'380': 0,
'381': 0,
'382': 0,
'383': 0,
'384': 0,
'385': 0,
'386': 0,
'387': 0,
'388': 0,
'389': 0,
'390': 0,
'391': 0,
'392': 0,
'393': 0,
'394': 0,
'395': 0,
'396': 0,
'397': 0,
'398': 0,
'399': 0,
'400': 0,
'401': 0,
'402': 0,
'403': 0,
'404': 0,
'405': 0,
'406': 0,
'407': 0,
'408': 0,
'409': 0,
'410': 0,
'411': 0,
'412': 0,
'413': 0,
'414': 0,
'415': 0,
'416': 0,
'417': 0,
'418': 0,
'419': 0,
'420': 0,
'421': 0,
'422': 0,
'423': 0,
'424': 0,
'425': 0,
'426': 0,
'427': 0,
'428': 0,
'429': 0,
'430': 0,
'431': 0,
'432': 0,
'433': 0,
'434': 0,
'435': 0,
'436': 0,
'437': 0,
'438': 0,
'439': 0,
'440': 0,
'441': 0,
'442': 0,
'443': 0,
'444': 0,
'445': 0,
'446': 0,
'447': 0,
'448': 0,
'449': 0,
'450': 0,
'451': 0,
'452': 0,
'453': 0,
'454': 0,
'455': 0,
'456': 0,
'457': 0,
'458': 0,
'459': 0,
'460': 0,
'461': 0,
'462': 0,
'463': 0,
'464': 0,
'465': 0,
'466': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0],
'20': [0, 0],
'21': [0, 0],
'22': [0, 0],
'23': [0, 0],
'24': [0, 0],
'25': [0, 0],
'26': [0, 0],
'27': [0, 0],
'28': [0, 0],
'29': [0, 0],
'30': [0, 0],
'31': [0, 0],
'32': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '4ef4601f42a4ee65a8815b165b8a632d0dc64699'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
var GLMAT_ARRAY_TYPE = (cov_1fs5mmbhgv.s[0]++, Array);
cov_1fs5mmbhgv.s[1]++;
var isMatrixArray = function isMatrixArray(x) {
cov_1fs5mmbhgv.f[0]++;
cov_1fs5mmbhgv.s[2]++;
return x instanceof Array;
};
cov_1fs5mmbhgv.s[3]++;
if (typeof Float32Array !== 'undefined') {
cov_1fs5mmbhgv.b[0][0]++;
cov_1fs5mmbhgv.s[4]++;
GLMAT_ARRAY_TYPE = Float32Array;
cov_1fs5mmbhgv.s[5]++;
isMatrixArray = function isMatrixArray(x) {
cov_1fs5mmbhgv.f[1]++;
cov_1fs5mmbhgv.s[6]++;
return (
(cov_1fs5mmbhgv.b[1][0]++, x instanceof Array) ||
(cov_1fs5mmbhgv.b[1][1]++, x instanceof Float32Array)
);
};
} else {
cov_1fs5mmbhgv.b[0][1]++;
}
/**
* A class to describe a 4x4 matrix
* for model and view matrix manipulation in the p5js webgl renderer.
* @class p5.Matrix
* @private
* @constructor
* @param {Array} [mat4] array literal of our 4x4 matrix
*/ cov_1fs5mmbhgv.s[7]++;
_main.default.Matrix = function() {
cov_1fs5mmbhgv.f[2]++;
var args = (cov_1fs5mmbhgv.s[8]++, new Array(arguments.length));
cov_1fs5mmbhgv.s[9]++;
for (var i = (cov_1fs5mmbhgv.s[10]++, 0); i < args.length; ++i) {
cov_1fs5mmbhgv.s[11]++;
args[i] = arguments[i];
}
// This is default behavior when object
// instantiated using createMatrix()
// @todo implement createMatrix() in core/math.js
cov_1fs5mmbhgv.s[12]++;
if (
(cov_1fs5mmbhgv.b[3][0]++, args.length) &&
(cov_1fs5mmbhgv.b[3][1]++, args[args.length - 1] instanceof _main.default)
) {
cov_1fs5mmbhgv.b[2][0]++;
cov_1fs5mmbhgv.s[13]++;
this.p5 = args[args.length - 1];
} else {
cov_1fs5mmbhgv.b[2][1]++;
}
cov_1fs5mmbhgv.s[14]++;
if (args[0] === 'mat3') {
cov_1fs5mmbhgv.b[4][0]++;
cov_1fs5mmbhgv.s[15]++;
this.mat3 = Array.isArray(args[1])
? (cov_1fs5mmbhgv.b[5][0]++, args[1])
: (cov_1fs5mmbhgv.b[5][1]++,
new GLMAT_ARRAY_TYPE([1, 0, 0, 0, 1, 0, 0, 0, 1]));
} else {
cov_1fs5mmbhgv.b[4][1]++;
cov_1fs5mmbhgv.s[16]++;
this.mat4 = Array.isArray(args[0])
? (cov_1fs5mmbhgv.b[6][0]++, args[0])
: (cov_1fs5mmbhgv.b[6][1]++,
new GLMAT_ARRAY_TYPE([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]));
}
cov_1fs5mmbhgv.s[17]++;
return this;
};
/**
* Sets the x, y, and z component of the vector using two or three separate
* variables, the data from a p5.Matrix, or the values from a float array.
*
* @method set
* @param {p5.Matrix|Float32Array|Number[]} [inMatrix] the input p5.Matrix or
* an Array of length 16
* @chainable
*/
/**
* @method set
* @param {Number[]} elements 16 numbers passed by value to avoid
* array copying.
* @chainable
*/ cov_1fs5mmbhgv.s[18]++;
_main.default.Matrix.prototype.set = function(inMatrix) {
cov_1fs5mmbhgv.f[3]++;
cov_1fs5mmbhgv.s[19]++;
if (inMatrix instanceof _main.default.Matrix) {
cov_1fs5mmbhgv.b[7][0]++;
cov_1fs5mmbhgv.s[20]++;
this.mat4 = inMatrix.mat4;
cov_1fs5mmbhgv.s[21]++;
return this;
} else {
cov_1fs5mmbhgv.b[7][1]++;
cov_1fs5mmbhgv.s[22]++;
if (isMatrixArray(inMatrix)) {
cov_1fs5mmbhgv.b[8][0]++;
cov_1fs5mmbhgv.s[23]++;
this.mat4 = inMatrix;
cov_1fs5mmbhgv.s[24]++;
return this;
} else {
cov_1fs5mmbhgv.b[8][1]++;
cov_1fs5mmbhgv.s[25]++;
if (arguments.length === 16) {
cov_1fs5mmbhgv.b[9][0]++;
cov_1fs5mmbhgv.s[26]++;
this.mat4[0] = arguments[0];
cov_1fs5mmbhgv.s[27]++;
this.mat4[1] = arguments[1];
cov_1fs5mmbhgv.s[28]++;
this.mat4[2] = arguments[2];
cov_1fs5mmbhgv.s[29]++;
this.mat4[3] = arguments[3];
cov_1fs5mmbhgv.s[30]++;
this.mat4[4] = arguments[4];
cov_1fs5mmbhgv.s[31]++;
this.mat4[5] = arguments[5];
cov_1fs5mmbhgv.s[32]++;
this.mat4[6] = arguments[6];
cov_1fs5mmbhgv.s[33]++;
this.mat4[7] = arguments[7];
cov_1fs5mmbhgv.s[34]++;
this.mat4[8] = arguments[8];
cov_1fs5mmbhgv.s[35]++;
this.mat4[9] = arguments[9];
cov_1fs5mmbhgv.s[36]++;
this.mat4[10] = arguments[10];
cov_1fs5mmbhgv.s[37]++;
this.mat4[11] = arguments[11];
cov_1fs5mmbhgv.s[38]++;
this.mat4[12] = arguments[12];
cov_1fs5mmbhgv.s[39]++;
this.mat4[13] = arguments[13];
cov_1fs5mmbhgv.s[40]++;
this.mat4[14] = arguments[14];
cov_1fs5mmbhgv.s[41]++;
this.mat4[15] = arguments[15];
} else {
cov_1fs5mmbhgv.b[9][1]++;
}
}
}
cov_1fs5mmbhgv.s[42]++;
return this;
};
/**
* Gets a copy of the vector, returns a p5.Matrix object.
*
* @method get
* @return {p5.Matrix} the copy of the p5.Matrix object
*/ cov_1fs5mmbhgv.s[43]++;
_main.default.Matrix.prototype.get = function() {
cov_1fs5mmbhgv.f[4]++;
cov_1fs5mmbhgv.s[44]++;
return new _main.default.Matrix(this.mat4, this.p5);
};
/**
* return a copy of a matrix
* @method copy
* @return {p5.Matrix} the result matrix
*/ cov_1fs5mmbhgv.s[45]++;
_main.default.Matrix.prototype.copy = function() {
cov_1fs5mmbhgv.f[5]++;
var copied = (cov_1fs5mmbhgv.s[46]++, new _main.default.Matrix(this.p5));
cov_1fs5mmbhgv.s[47]++;
copied.mat4[0] = this.mat4[0];
cov_1fs5mmbhgv.s[48]++;
copied.mat4[1] = this.mat4[1];
cov_1fs5mmbhgv.s[49]++;
copied.mat4[2] = this.mat4[2];
cov_1fs5mmbhgv.s[50]++;
copied.mat4[3] = this.mat4[3];
cov_1fs5mmbhgv.s[51]++;
copied.mat4[4] = this.mat4[4];
cov_1fs5mmbhgv.s[52]++;
copied.mat4[5] = this.mat4[5];
cov_1fs5mmbhgv.s[53]++;
copied.mat4[6] = this.mat4[6];
cov_1fs5mmbhgv.s[54]++;
copied.mat4[7] = this.mat4[7];
cov_1fs5mmbhgv.s[55]++;
copied.mat4[8] = this.mat4[8];
cov_1fs5mmbhgv.s[56]++;
copied.mat4[9] = this.mat4[9];
cov_1fs5mmbhgv.s[57]++;
copied.mat4[10] = this.mat4[10];
cov_1fs5mmbhgv.s[58]++;
copied.mat4[11] = this.mat4[11];
cov_1fs5mmbhgv.s[59]++;
copied.mat4[12] = this.mat4[12];
cov_1fs5mmbhgv.s[60]++;
copied.mat4[13] = this.mat4[13];
cov_1fs5mmbhgv.s[61]++;
copied.mat4[14] = this.mat4[14];
cov_1fs5mmbhgv.s[62]++;
copied.mat4[15] = this.mat4[15];
cov_1fs5mmbhgv.s[63]++;
return copied;
};
/**
* return an identity matrix
* @method identity
* @return {p5.Matrix} the result matrix
*/ cov_1fs5mmbhgv.s[64]++;
_main.default.Matrix.identity = function(pInst) {
cov_1fs5mmbhgv.f[6]++;
cov_1fs5mmbhgv.s[65]++;
return new _main.default.Matrix(pInst);
};
/**
* transpose according to a given matrix
* @method transpose
* @param {p5.Matrix|Float32Array|Number[]} a the matrix to be
* based on to transpose
* @chainable
*/ cov_1fs5mmbhgv.s[66]++;
_main.default.Matrix.prototype.transpose = function(a) {
cov_1fs5mmbhgv.f[7]++;
var a01, a02, a03, a12, a13, a23;
cov_1fs5mmbhgv.s[67]++;
if (a instanceof _main.default.Matrix) {
cov_1fs5mmbhgv.b[10][0]++;
cov_1fs5mmbhgv.s[68]++;
a01 = a.mat4[1];
cov_1fs5mmbhgv.s[69]++;
a02 = a.mat4[2];
cov_1fs5mmbhgv.s[70]++;
a03 = a.mat4[3];
cov_1fs5mmbhgv.s[71]++;
a12 = a.mat4[6];
cov_1fs5mmbhgv.s[72]++;
a13 = a.mat4[7];
cov_1fs5mmbhgv.s[73]++;
a23 = a.mat4[11];
cov_1fs5mmbhgv.s[74]++;
this.mat4[0] = a.mat4[0];
cov_1fs5mmbhgv.s[75]++;
this.mat4[1] = a.mat4[4];
cov_1fs5mmbhgv.s[76]++;
this.mat4[2] = a.mat4[8];
cov_1fs5mmbhgv.s[77]++;
this.mat4[3] = a.mat4[12];
cov_1fs5mmbhgv.s[78]++;
this.mat4[4] = a01;
cov_1fs5mmbhgv.s[79]++;
this.mat4[5] = a.mat4[5];
cov_1fs5mmbhgv.s[80]++;
this.mat4[6] = a.mat4[9];
cov_1fs5mmbhgv.s[81]++;
this.mat4[7] = a.mat4[13];
cov_1fs5mmbhgv.s[82]++;
this.mat4[8] = a02;
cov_1fs5mmbhgv.s[83]++;
this.mat4[9] = a12;
cov_1fs5mmbhgv.s[84]++;
this.mat4[10] = a.mat4[10];
cov_1fs5mmbhgv.s[85]++;
this.mat4[11] = a.mat4[14];
cov_1fs5mmbhgv.s[86]++;
this.mat4[12] = a03;
cov_1fs5mmbhgv.s[87]++;
this.mat4[13] = a13;
cov_1fs5mmbhgv.s[88]++;
this.mat4[14] = a23;
cov_1fs5mmbhgv.s[89]++;
this.mat4[15] = a.mat4[15];
} else {
cov_1fs5mmbhgv.b[10][1]++;
cov_1fs5mmbhgv.s[90]++;
if (isMatrixArray(a)) {
cov_1fs5mmbhgv.b[11][0]++;
cov_1fs5mmbhgv.s[91]++;
a01 = a[1];
cov_1fs5mmbhgv.s[92]++;
a02 = a[2];
cov_1fs5mmbhgv.s[93]++;
a03 = a[3];
cov_1fs5mmbhgv.s[94]++;
a12 = a[6];
cov_1fs5mmbhgv.s[95]++;
a13 = a[7];
cov_1fs5mmbhgv.s[96]++;
a23 = a[11];
cov_1fs5mmbhgv.s[97]++;
this.mat4[0] = a[0];
cov_1fs5mmbhgv.s[98]++;
this.mat4[1] = a[4];
cov_1fs5mmbhgv.s[99]++;
this.mat4[2] = a[8];
cov_1fs5mmbhgv.s[100]++;
this.mat4[3] = a[12];
cov_1fs5mmbhgv.s[101]++;
this.mat4[4] = a01;
cov_1fs5mmbhgv.s[102]++;
this.mat4[5] = a[5];
cov_1fs5mmbhgv.s[103]++;
this.mat4[6] = a[9];
cov_1fs5mmbhgv.s[104]++;
this.mat4[7] = a[13];
cov_1fs5mmbhgv.s[105]++;
this.mat4[8] = a02;
cov_1fs5mmbhgv.s[106]++;
this.mat4[9] = a12;
cov_1fs5mmbhgv.s[107]++;
this.mat4[10] = a[10];
cov_1fs5mmbhgv.s[108]++;
this.mat4[11] = a[14];
cov_1fs5mmbhgv.s[109]++;
this.mat4[12] = a03;
cov_1fs5mmbhgv.s[110]++;
this.mat4[13] = a13;
cov_1fs5mmbhgv.s[111]++;
this.mat4[14] = a23;
cov_1fs5mmbhgv.s[112]++;
this.mat4[15] = a[15];
} else {
cov_1fs5mmbhgv.b[11][1]++;
}
}
cov_1fs5mmbhgv.s[113]++;
return this;
};
/**
* invert matrix according to a give matrix
* @method invert
* @param {p5.Matrix|Float32Array|Number[]} a the matrix to be
* based on to invert
* @chainable
*/ cov_1fs5mmbhgv.s[114]++;
_main.default.Matrix.prototype.invert = function(a) {
cov_1fs5mmbhgv.f[8]++;
var a00, a01, a02, a03, a10, a11, a12, a13;
var a20, a21, a22, a23, a30, a31, a32, a33;
cov_1fs5mmbhgv.s[115]++;
if (a instanceof _main.default.Matrix) {
cov_1fs5mmbhgv.b[12][0]++;
cov_1fs5mmbhgv.s[116]++;
a00 = a.mat4[0];
cov_1fs5mmbhgv.s[117]++;
a01 = a.mat4[1];
cov_1fs5mmbhgv.s[118]++;
a02 = a.mat4[2];
cov_1fs5mmbhgv.s[119]++;
a03 = a.mat4[3];
cov_1fs5mmbhgv.s[120]++;
a10 = a.mat4[4];
cov_1fs5mmbhgv.s[121]++;
a11 = a.mat4[5];
cov_1fs5mmbhgv.s[122]++;
a12 = a.mat4[6];
cov_1fs5mmbhgv.s[123]++;
a13 = a.mat4[7];
cov_1fs5mmbhgv.s[124]++;
a20 = a.mat4[8];
cov_1fs5mmbhgv.s[125]++;
a21 = a.mat4[9];
cov_1fs5mmbhgv.s[126]++;
a22 = a.mat4[10];
cov_1fs5mmbhgv.s[127]++;
a23 = a.mat4[11];
cov_1fs5mmbhgv.s[128]++;
a30 = a.mat4[12];
cov_1fs5mmbhgv.s[129]++;
a31 = a.mat4[13];
cov_1fs5mmbhgv.s[130]++;
a32 = a.mat4[14];
cov_1fs5mmbhgv.s[131]++;
a33 = a.mat4[15];
} else {
cov_1fs5mmbhgv.b[12][1]++;
cov_1fs5mmbhgv.s[132]++;
if (isMatrixArray(a)) {
cov_1fs5mmbhgv.b[13][0]++;
cov_1fs5mmbhgv.s[133]++;
a00 = a[0];
cov_1fs5mmbhgv.s[134]++;
a01 = a[1];
cov_1fs5mmbhgv.s[135]++;
a02 = a[2];
cov_1fs5mmbhgv.s[136]++;
a03 = a[3];
cov_1fs5mmbhgv.s[137]++;
a10 = a[4];
cov_1fs5mmbhgv.s[138]++;
a11 = a[5];
cov_1fs5mmbhgv.s[139]++;
a12 = a[6];
cov_1fs5mmbhgv.s[140]++;
a13 = a[7];
cov_1fs5mmbhgv.s[141]++;
a20 = a[8];
cov_1fs5mmbhgv.s[142]++;
a21 = a[9];
cov_1fs5mmbhgv.s[143]++;
a22 = a[10];
cov_1fs5mmbhgv.s[144]++;
a23 = a[11];
cov_1fs5mmbhgv.s[145]++;
a30 = a[12];
cov_1fs5mmbhgv.s[146]++;
a31 = a[13];
cov_1fs5mmbhgv.s[147]++;
a32 = a[14];
cov_1fs5mmbhgv.s[148]++;
a33 = a[15];
} else {
cov_1fs5mmbhgv.b[13][1]++;
}
}
var b00 = (cov_1fs5mmbhgv.s[149]++, a00 * a11 - a01 * a10);
var b01 = (cov_1fs5mmbhgv.s[150]++, a00 * a12 - a02 * a10);
var b02 = (cov_1fs5mmbhgv.s[151]++, a00 * a13 - a03 * a10);
var b03 = (cov_1fs5mmbhgv.s[152]++, a01 * a12 - a02 * a11);
var b04 = (cov_1fs5mmbhgv.s[153]++, a01 * a13 - a03 * a11);
var b05 = (cov_1fs5mmbhgv.s[154]++, a02 * a13 - a03 * a12);
var b06 = (cov_1fs5mmbhgv.s[155]++, a20 * a31 - a21 * a30);
var b07 = (cov_1fs5mmbhgv.s[156]++, a20 * a32 - a22 * a30);
var b08 = (cov_1fs5mmbhgv.s[157]++, a20 * a33 - a23 * a30);
var b09 = (cov_1fs5mmbhgv.s[158]++, a21 * a32 - a22 * a31);
var b10 = (cov_1fs5mmbhgv.s[159]++, a21 * a33 - a23 * a31);
var b11 = (cov_1fs5mmbhgv.s[160]++, a22 * a33 - a23 * a32);
// Calculate the determinant
var det = (cov_1fs5mmbhgv.s[161]++,
b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06);
cov_1fs5mmbhgv.s[162]++;
if (!det) {
cov_1fs5mmbhgv.b[14][0]++;
cov_1fs5mmbhgv.s[163]++;
return null;
} else {
cov_1fs5mmbhgv.b[14][1]++;
}
cov_1fs5mmbhgv.s[164]++;
det = 1.0 / det;
cov_1fs5mmbhgv.s[165]++;
this.mat4[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
cov_1fs5mmbhgv.s[166]++;
this.mat4[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
cov_1fs5mmbhgv.s[167]++;
this.mat4[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
cov_1fs5mmbhgv.s[168]++;
this.mat4[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;
cov_1fs5mmbhgv.s[169]++;
this.mat4[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
cov_1fs5mmbhgv.s[170]++;
this.mat4[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
cov_1fs5mmbhgv.s[171]++;
this.mat4[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
cov_1fs5mmbhgv.s[172]++;
this.mat4[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;
cov_1fs5mmbhgv.s[173]++;
this.mat4[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
cov_1fs5mmbhgv.s[174]++;
this.mat4[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
cov_1fs5mmbhgv.s[175]++;
this.mat4[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
cov_1fs5mmbhgv.s[176]++;
this.mat4[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;
cov_1fs5mmbhgv.s[177]++;
this.mat4[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;
cov_1fs5mmbhgv.s[178]++;
this.mat4[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;
cov_1fs5mmbhgv.s[179]++;
this.mat4[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;
cov_1fs5mmbhgv.s[180]++;
this.mat4[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;
cov_1fs5mmbhgv.s[181]++;
return this;
};
/**
* Inverts a 3x3 matrix
* @method invert3x3
* @chainable
*/ cov_1fs5mmbhgv.s[182]++;
_main.default.Matrix.prototype.invert3x3 = function() {
cov_1fs5mmbhgv.f[9]++;
var a00 = (cov_1fs5mmbhgv.s[183]++, this.mat3[0]);
var a01 = (cov_1fs5mmbhgv.s[184]++, this.mat3[1]);
var a02 = (cov_1fs5mmbhgv.s[185]++, this.mat3[2]);
var a10 = (cov_1fs5mmbhgv.s[186]++, this.mat3[3]);
var a11 = (cov_1fs5mmbhgv.s[187]++, this.mat3[4]);
var a12 = (cov_1fs5mmbhgv.s[188]++, this.mat3[5]);
var a20 = (cov_1fs5mmbhgv.s[189]++, this.mat3[6]);
var a21 = (cov_1fs5mmbhgv.s[190]++, this.mat3[7]);
var a22 = (cov_1fs5mmbhgv.s[191]++, this.mat3[8]);
var b01 = (cov_1fs5mmbhgv.s[192]++, a22 * a11 - a12 * a21);
var b11 = (cov_1fs5mmbhgv.s[193]++, -a22 * a10 + a12 * a20);
var b21 = (cov_1fs5mmbhgv.s[194]++, a21 * a10 - a11 * a20);
// Calculate the determinant
var det = (cov_1fs5mmbhgv.s[195]++, a00 * b01 + a01 * b11 + a02 * b21);
cov_1fs5mmbhgv.s[196]++;
if (!det) {
cov_1fs5mmbhgv.b[15][0]++;
cov_1fs5mmbhgv.s[197]++;
return null;
} else {
cov_1fs5mmbhgv.b[15][1]++;
}
cov_1fs5mmbhgv.s[198]++;
det = 1.0 / det;
cov_1fs5mmbhgv.s[199]++;
this.mat3[0] = b01 * det;
cov_1fs5mmbhgv.s[200]++;
this.mat3[1] = (-a22 * a01 + a02 * a21) * det;
cov_1fs5mmbhgv.s[201]++;
this.mat3[2] = (a12 * a01 - a02 * a11) * det;
cov_1fs5mmbhgv.s[202]++;
this.mat3[3] = b11 * det;
cov_1fs5mmbhgv.s[203]++;
this.mat3[4] = (a22 * a00 - a02 * a20) * det;
cov_1fs5mmbhgv.s[204]++;
this.mat3[5] = (-a12 * a00 + a02 * a10) * det;
cov_1fs5mmbhgv.s[205]++;
this.mat3[6] = b21 * det;
cov_1fs5mmbhgv.s[206]++;
this.mat3[7] = (-a21 * a00 + a01 * a20) * det;
cov_1fs5mmbhgv.s[207]++;
this.mat3[8] = (a11 * a00 - a01 * a10) * det;
cov_1fs5mmbhgv.s[208]++;
return this;
};
/**
* transposes a 3x3 p5.Matrix by a mat3
* @method transpose3x3
* @param {Number[]} mat3 1-dimensional array
* @chainable
*/ cov_1fs5mmbhgv.s[209]++;
_main.default.Matrix.prototype.transpose3x3 = function(mat3) {
cov_1fs5mmbhgv.f[10]++;
var a01 = (cov_1fs5mmbhgv.s[210]++, mat3[1]),
a02 = (cov_1fs5mmbhgv.s[211]++, mat3[2]),
a12 = (cov_1fs5mmbhgv.s[212]++, mat3[5]);
cov_1fs5mmbhgv.s[213]++;
this.mat3[1] = mat3[3];
cov_1fs5mmbhgv.s[214]++;
this.mat3[2] = mat3[6];
cov_1fs5mmbhgv.s[215]++;
this.mat3[3] = a01;
cov_1fs5mmbhgv.s[216]++;
this.mat3[5] = mat3[7];
cov_1fs5mmbhgv.s[217]++;
this.mat3[6] = a02;
cov_1fs5mmbhgv.s[218]++;
this.mat3[7] = a12;
cov_1fs5mmbhgv.s[219]++;
return this;
};
/**
* converts a 4x4 matrix to its 3x3 inverse transform
* commonly used in MVMatrix to NMatrix conversions.
* @method invertTranspose
* @param {p5.Matrix} mat4 the matrix to be based on to invert
* @chainable
* @todo finish implementation
*/ cov_1fs5mmbhgv.s[220]++;
_main.default.Matrix.prototype.inverseTranspose = function(matrix) {
cov_1fs5mmbhgv.f[11]++;
cov_1fs5mmbhgv.s[221]++;
if (this.mat3 === undefined) {
cov_1fs5mmbhgv.b[16][0]++;
cov_1fs5mmbhgv.s[222]++;
console.error('sorry, this function only works with mat3');
} else {
cov_1fs5mmbhgv.b[16][1]++;
cov_1fs5mmbhgv.s[223]++;
//convert mat4 -> mat3
this.mat3[0] = matrix.mat4[0];
cov_1fs5mmbhgv.s[224]++;
this.mat3[1] = matrix.mat4[1];
cov_1fs5mmbhgv.s[225]++;
this.mat3[2] = matrix.mat4[2];
cov_1fs5mmbhgv.s[226]++;
this.mat3[3] = matrix.mat4[4];
cov_1fs5mmbhgv.s[227]++;
this.mat3[4] = matrix.mat4[5];
cov_1fs5mmbhgv.s[228]++;
this.mat3[5] = matrix.mat4[6];
cov_1fs5mmbhgv.s[229]++;
this.mat3[6] = matrix.mat4[8];
cov_1fs5mmbhgv.s[230]++;
this.mat3[7] = matrix.mat4[9];
cov_1fs5mmbhgv.s[231]++;
this.mat3[8] = matrix.mat4[10];
}
var inverse = (cov_1fs5mmbhgv.s[232]++, this.invert3x3());
// check inverse succeeded
cov_1fs5mmbhgv.s[233]++;
if (inverse) {
cov_1fs5mmbhgv.b[17][0]++;
cov_1fs5mmbhgv.s[234]++;
inverse.transpose3x3(this.mat3);
} else {
cov_1fs5mmbhgv.b[17][1]++;
cov_1fs5mmbhgv.s[235]++;
// in case of singularity, just zero the matrix
for (var i = (cov_1fs5mmbhgv.s[236]++, 0); i < 9; i++) {
cov_1fs5mmbhgv.s[237]++;
this.mat3[i] = 0;
}
}
cov_1fs5mmbhgv.s[238]++;
return this;
};
/**
* inspired by Toji's mat4 determinant
* @method determinant
* @return {Number} Determinant of our 4x4 matrix
*/ cov_1fs5mmbhgv.s[239]++;
_main.default.Matrix.prototype.determinant = function() {
cov_1fs5mmbhgv.f[12]++;
var d00 = (cov_1fs5mmbhgv.s[240]++,
this.mat4[0] * this.mat4[5] - this.mat4[1] * this.mat4[4]),
d01 = (cov_1fs5mmbhgv.s[241]++,
this.mat4[0] * this.mat4[6] - this.mat4[2] * this.mat4[4]),
d02 = (cov_1fs5mmbhgv.s[242]++,
this.mat4[0] * this.mat4[7] - this.mat4[3] * this.mat4[4]),
d03 = (cov_1fs5mmbhgv.s[243]++,
this.mat4[1] * this.mat4[6] - this.mat4[2] * this.mat4[5]),
d04 = (cov_1fs5mmbhgv.s[244]++,
this.mat4[1] * this.mat4[7] - this.mat4[3] * this.mat4[5]),
d05 = (cov_1fs5mmbhgv.s[245]++,
this.mat4[2] * this.mat4[7] - this.mat4[3] * this.mat4[6]),
d06 = (cov_1fs5mmbhgv.s[246]++,
this.mat4[8] * this.mat4[13] - this.mat4[9] * this.mat4[12]),
d07 = (cov_1fs5mmbhgv.s[247]++,
this.mat4[8] * this.mat4[14] - this.mat4[10] * this.mat4[12]),
d08 = (cov_1fs5mmbhgv.s[248]++,
this.mat4[8] * this.mat4[15] - this.mat4[11] * this.mat4[12]),
d09 = (cov_1fs5mmbhgv.s[249]++,
this.mat4[9] * this.mat4[14] - this.mat4[10] * this.mat4[13]),
d10 = (cov_1fs5mmbhgv.s[250]++,
this.mat4[9] * this.mat4[15] - this.mat4[11] * this.mat4[13]),
d11 = (cov_1fs5mmbhgv.s[251]++,
this.mat4[10] * this.mat4[15] - this.mat4[11] * this.mat4[14]);
// Calculate the determinant
cov_1fs5mmbhgv.s[252]++;
return d00 * d11 - d01 * d10 + d02 * d09 + d03 * d08 - d04 * d07 + d05 * d06;
};
/**
* multiply two mat4s
* @method mult
* @param {p5.Matrix|Float32Array|Number[]} multMatrix The matrix
* we want to multiply by
* @chainable
*/ cov_1fs5mmbhgv.s[253]++;
_main.default.Matrix.prototype.mult = function(multMatrix) {
cov_1fs5mmbhgv.f[13]++;
var _src;
cov_1fs5mmbhgv.s[254]++;
if (
(cov_1fs5mmbhgv.b[19][0]++, multMatrix === this) ||
(cov_1fs5mmbhgv.b[19][1]++, multMatrix === this.mat4)
) {
cov_1fs5mmbhgv.b[18][0]++;
cov_1fs5mmbhgv.s[255]++;
_src = this.copy().mat4; // only need to allocate in this rare case
} else {
cov_1fs5mmbhgv.b[18][1]++;
cov_1fs5mmbhgv.s[256]++;
if (multMatrix instanceof _main.default.Matrix) {
cov_1fs5mmbhgv.b[20][0]++;
cov_1fs5mmbhgv.s[257]++;
_src = multMatrix.mat4;
} else {
cov_1fs5mmbhgv.b[20][1]++;
cov_1fs5mmbhgv.s[258]++;
if (isMatrixArray(multMatrix)) {
cov_1fs5mmbhgv.b[21][0]++;
cov_1fs5mmbhgv.s[259]++;
_src = multMatrix;
} else {
cov_1fs5mmbhgv.b[21][1]++;
cov_1fs5mmbhgv.s[260]++;
if (arguments.length === 16) {
cov_1fs5mmbhgv.b[22][0]++;
cov_1fs5mmbhgv.s[261]++;
_src = arguments;
} else {
cov_1fs5mmbhgv.b[22][1]++;
cov_1fs5mmbhgv.s[262]++;
return; // nothing to do.
}
}
}
}
// each row is used for the multiplier
var b0 = (cov_1fs5mmbhgv.s[263]++, this.mat4[0]),
b1 = (cov_1fs5mmbhgv.s[264]++, this.mat4[1]),
b2 = (cov_1fs5mmbhgv.s[265]++, this.mat4[2]),
b3 = (cov_1fs5mmbhgv.s[266]++, this.mat4[3]);
cov_1fs5mmbhgv.s[267]++;
this.mat4[0] = b0 * _src[0] + b1 * _src[4] + b2 * _src[8] + b3 * _src[12];
cov_1fs5mmbhgv.s[268]++;
this.mat4[1] = b0 * _src[1] + b1 * _src[5] + b2 * _src[9] + b3 * _src[13];
cov_1fs5mmbhgv.s[269]++;
this.mat4[2] = b0 * _src[2] + b1 * _src[6] + b2 * _src[10] + b3 * _src[14];
cov_1fs5mmbhgv.s[270]++;
this.mat4[3] = b0 * _src[3] + b1 * _src[7] + b2 * _src[11] + b3 * _src[15];
cov_1fs5mmbhgv.s[271]++;
b0 = this.mat4[4];
cov_1fs5mmbhgv.s[272]++;
b1 = this.mat4[5];
cov_1fs5mmbhgv.s[273]++;
b2 = this.mat4[6];
cov_1fs5mmbhgv.s[274]++;
b3 = this.mat4[7];
cov_1fs5mmbhgv.s[275]++;
this.mat4[4] = b0 * _src[0] + b1 * _src[4] + b2 * _src[8] + b3 * _src[12];
cov_1fs5mmbhgv.s[276]++;
this.mat4[5] = b0 * _src[1] + b1 * _src[5] + b2 * _src[9] + b3 * _src[13];
cov_1fs5mmbhgv.s[277]++;
this.mat4[6] = b0 * _src[2] + b1 * _src[6] + b2 * _src[10] + b3 * _src[14];
cov_1fs5mmbhgv.s[278]++;
this.mat4[7] = b0 * _src[3] + b1 * _src[7] + b2 * _src[11] + b3 * _src[15];
cov_1fs5mmbhgv.s[279]++;
b0 = this.mat4[8];
cov_1fs5mmbhgv.s[280]++;
b1 = this.mat4[9];
cov_1fs5mmbhgv.s[281]++;
b2 = this.mat4[10];
cov_1fs5mmbhgv.s[282]++;
b3 = this.mat4[11];
cov_1fs5mmbhgv.s[283]++;
this.mat4[8] = b0 * _src[0] + b1 * _src[4] + b2 * _src[8] + b3 * _src[12];
cov_1fs5mmbhgv.s[284]++;
this.mat4[9] = b0 * _src[1] + b1 * _src[5] + b2 * _src[9] + b3 * _src[13];
cov_1fs5mmbhgv.s[285]++;
this.mat4[10] = b0 * _src[2] + b1 * _src[6] + b2 * _src[10] + b3 * _src[14];
cov_1fs5mmbhgv.s[286]++;
this.mat4[11] = b0 * _src[3] + b1 * _src[7] + b2 * _src[11] + b3 * _src[15];
cov_1fs5mmbhgv.s[287]++;
b0 = this.mat4[12];
cov_1fs5mmbhgv.s[288]++;
b1 = this.mat4[13];
cov_1fs5mmbhgv.s[289]++;
b2 = this.mat4[14];
cov_1fs5mmbhgv.s[290]++;
b3 = this.mat4[15];
cov_1fs5mmbhgv.s[291]++;
this.mat4[12] = b0 * _src[0] + b1 * _src[4] + b2 * _src[8] + b3 * _src[12];
cov_1fs5mmbhgv.s[292]++;
this.mat4[13] = b0 * _src[1] + b1 * _src[5] + b2 * _src[9] + b3 * _src[13];
cov_1fs5mmbhgv.s[293]++;
this.mat4[14] = b0 * _src[2] + b1 * _src[6] + b2 * _src[10] + b3 * _src[14];
cov_1fs5mmbhgv.s[294]++;
this.mat4[15] = b0 * _src[3] + b1 * _src[7] + b2 * _src[11] + b3 * _src[15];
cov_1fs5mmbhgv.s[295]++;
return this;
};
cov_1fs5mmbhgv.s[296]++;
_main.default.Matrix.prototype.apply = function(multMatrix) {
cov_1fs5mmbhgv.f[14]++;
var _src;
cov_1fs5mmbhgv.s[297]++;
if (
(cov_1fs5mmbhgv.b[24][0]++, multMatrix === this) ||
(cov_1fs5mmbhgv.b[24][1]++, multMatrix === this.mat4)
) {
cov_1fs5mmbhgv.b[23][0]++;
cov_1fs5mmbhgv.s[298]++;
_src = this.copy().mat4; // only need to allocate in this rare case
} else {
cov_1fs5mmbhgv.b[23][1]++;
cov_1fs5mmbhgv.s[299]++;
if (multMatrix instanceof _main.default.Matrix) {
cov_1fs5mmbhgv.b[25][0]++;
cov_1fs5mmbhgv.s[300]++;
_src = multMatrix.mat4;
} else {
cov_1fs5mmbhgv.b[25][1]++;
cov_1fs5mmbhgv.s[301]++;
if (isMatrixArray(multMatrix)) {
cov_1fs5mmbhgv.b[26][0]++;
cov_1fs5mmbhgv.s[302]++;
_src = multMatrix;
} else {
cov_1fs5mmbhgv.b[26][1]++;
cov_1fs5mmbhgv.s[303]++;
if (arguments.length === 16) {
cov_1fs5mmbhgv.b[27][0]++;
cov_1fs5mmbhgv.s[304]++;
_src = arguments;
} else {
cov_1fs5mmbhgv.b[27][1]++;
cov_1fs5mmbhgv.s[305]++;
return; // nothing to do.
}
}
}
}
var mat4 = (cov_1fs5mmbhgv.s[306]++, this.mat4);
// each row is used for the multiplier
var m0 = (cov_1fs5mmbhgv.s[307]++, mat4[0]);
var m4 = (cov_1fs5mmbhgv.s[308]++, mat4[4]);
var m8 = (cov_1fs5mmbhgv.s[309]++, mat4[8]);
var m12 = (cov_1fs5mmbhgv.s[310]++, mat4[12]);
cov_1fs5mmbhgv.s[311]++;
mat4[0] = _src[0] * m0 + _src[1] * m4 + _src[2] * m8 + _src[3] * m12;
cov_1fs5mmbhgv.s[312]++;
mat4[4] = _src[4] * m0 + _src[5] * m4 + _src[6] * m8 + _src[7] * m12;
cov_1fs5mmbhgv.s[313]++;
mat4[8] = _src[8] * m0 + _src[9] * m4 + _src[10] * m8 + _src[11] * m12;
cov_1fs5mmbhgv.s[314]++;
mat4[12] = _src[12] * m0 + _src[13] * m4 + _src[14] * m8 + _src[15] * m12;
var m1 = (cov_1fs5mmbhgv.s[315]++, mat4[1]);
var m5 = (cov_1fs5mmbhgv.s[316]++, mat4[5]);
var m9 = (cov_1fs5mmbhgv.s[317]++, mat4[9]);
var m13 = (cov_1fs5mmbhgv.s[318]++, mat4[13]);
cov_1fs5mmbhgv.s[319]++;
mat4[1] = _src[0] * m1 + _src[1] * m5 + _src[2] * m9 + _src[3] * m13;
cov_1fs5mmbhgv.s[320]++;
mat4[5] = _src[4] * m1 + _src[5] * m5 + _src[6] * m9 + _src[7] * m13;
cov_1fs5mmbhgv.s[321]++;
mat4[9] = _src[8] * m1 + _src[9] * m5 + _src[10] * m9 + _src[11] * m13;
cov_1fs5mmbhgv.s[322]++;
mat4[13] = _src[12] * m1 + _src[13] * m5 + _src[14] * m9 + _src[15] * m13;
var m2 = (cov_1fs5mmbhgv.s[323]++, mat4[2]);
var m6 = (cov_1fs5mmbhgv.s[324]++, mat4[6]);
var m10 = (cov_1fs5mmbhgv.s[325]++, mat4[10]);
var m14 = (cov_1fs5mmbhgv.s[326]++, mat4[14]);
cov_1fs5mmbhgv.s[327]++;
mat4[2] = _src[0] * m2 + _src[1] * m6 + _src[2] * m10 + _src[3] * m14;
cov_1fs5mmbhgv.s[328]++;
mat4[6] = _src[4] * m2 + _src[5] * m6 + _src[6] * m10 + _src[7] * m14;
cov_1fs5mmbhgv.s[329]++;
mat4[10] = _src[8] * m2 + _src[9] * m6 + _src[10] * m10 + _src[11] * m14;
cov_1fs5mmbhgv.s[330]++;
mat4[14] = _src[12] * m2 + _src[13] * m6 + _src[14] * m10 + _src[15] * m14;
var m3 = (cov_1fs5mmbhgv.s[331]++, mat4[3]);
var m7 = (cov_1fs5mmbhgv.s[332]++, mat4[7]);
var m11 = (cov_1fs5mmbhgv.s[333]++, mat4[11]);
var m15 = (cov_1fs5mmbhgv.s[334]++, mat4[15]);
cov_1fs5mmbhgv.s[335]++;
mat4[3] = _src[0] * m3 + _src[1] * m7 + _src[2] * m11 + _src[3] * m15;
cov_1fs5mmbhgv.s[336]++;
mat4[7] = _src[4] * m3 + _src[5] * m7 + _src[6] * m11 + _src[7] * m15;
cov_1fs5mmbhgv.s[337]++;
mat4[11] = _src[8] * m3 + _src[9] * m7 + _src[10] * m11 + _src[11] * m15;
cov_1fs5mmbhgv.s[338]++;
mat4[15] = _src[12] * m3 + _src[13] * m7 + _src[14] * m11 + _src[15] * m15;
cov_1fs5mmbhgv.s[339]++;
return this;
};
/**
* scales a p5.Matrix by scalars or a vector
* @method scale
* @param {p5.Vector|Float32Array|Number[]} s vector to scale by
* @chainable
*/ cov_1fs5mmbhgv.s[340]++;
_main.default.Matrix.prototype.scale = function(x, y, z) {
cov_1fs5mmbhgv.f[15]++;
cov_1fs5mmbhgv.s[341]++;
if (x instanceof _main.default.Vector) {
cov_1fs5mmbhgv.b[28][0]++;
cov_1fs5mmbhgv.s[342]++;
// x is a vector, extract the components from it.
y = x.y;
cov_1fs5mmbhgv.s[343]++;
z = x.z;
cov_1fs5mmbhgv.s[344]++;
x = x.x; // must be last
} else {
cov_1fs5mmbhgv.b[28][1]++;
cov_1fs5mmbhgv.s[345]++;
if (x instanceof Array) {
cov_1fs5mmbhgv.b[29][0]++;
cov_1fs5mmbhgv.s[346]++;
// x is an array, extract the components from it.
y = x[1];
cov_1fs5mmbhgv.s[347]++;
z = x[2];
cov_1fs5mmbhgv.s[348]++;
x = x[0]; // must be last
} else {
cov_1fs5mmbhgv.b[29][1]++;
}
}
cov_1fs5mmbhgv.s[349]++;
this.mat4[0] *= x;
cov_1fs5mmbhgv.s[350]++;
this.mat4[1] *= x;
cov_1fs5mmbhgv.s[351]++;
this.mat4[2] *= x;
cov_1fs5mmbhgv.s[352]++;
this.mat4[3] *= x;
cov_1fs5mmbhgv.s[353]++;
this.mat4[4] *= y;
cov_1fs5mmbhgv.s[354]++;
this.mat4[5] *= y;
cov_1fs5mmbhgv.s[355]++;
this.mat4[6] *= y;
cov_1fs5mmbhgv.s[356]++;
this.mat4[7] *= y;
cov_1fs5mmbhgv.s[357]++;
this.mat4[8] *= z;
cov_1fs5mmbhgv.s[358]++;
this.mat4[9] *= z;
cov_1fs5mmbhgv.s[359]++;
this.mat4[10] *= z;
cov_1fs5mmbhgv.s[360]++;
this.mat4[11] *= z;
cov_1fs5mmbhgv.s[361]++;
return this;
};
/**
* rotate our Matrix around an axis by the given angle.
* @method rotate
* @param {Number} a The angle of rotation in radians
* @param {p5.Vector|Number[]} axis the axis(es) to rotate around
* @chainable
* inspired by Toji's gl-matrix lib, mat4 rotation
*/ cov_1fs5mmbhgv.s[362]++;
_main.default.Matrix.prototype.rotate = function(a, x, y, z) {
cov_1fs5mmbhgv.f[16]++;
cov_1fs5mmbhgv.s[363]++;
if (x instanceof _main.default.Vector) {
cov_1fs5mmbhgv.b[30][0]++;
cov_1fs5mmbhgv.s[364]++;
// x is a vector, extract the components from it.
y = x.y;
cov_1fs5mmbhgv.s[365]++;
z = x.z;
cov_1fs5mmbhgv.s[366]++;
x = x.x; //must be last
} else {
cov_1fs5mmbhgv.b[30][1]++;
cov_1fs5mmbhgv.s[367]++;
if (x instanceof Array) {
cov_1fs5mmbhgv.b[31][0]++;
cov_1fs5mmbhgv.s[368]++;
// x is an array, extract the components from it.
y = x[1];
cov_1fs5mmbhgv.s[369]++;
z = x[2];
cov_1fs5mmbhgv.s[370]++;
x = x[0]; //must be last
} else {
cov_1fs5mmbhgv.b[31][1]++;
}
}
var len = (cov_1fs5mmbhgv.s[371]++, Math.sqrt(x * x + y * y + z * z));
cov_1fs5mmbhgv.s[372]++;
x *= 1 / len;
cov_1fs5mmbhgv.s[373]++;
y *= 1 / len;
cov_1fs5mmbhgv.s[374]++;
z *= 1 / len;
var a00 = (cov_1fs5mmbhgv.s[375]++, this.mat4[0]);
var a01 = (cov_1fs5mmbhgv.s[376]++, this.mat4[1]);
var a02 = (cov_1fs5mmbhgv.s[377]++, this.mat4[2]);
var a03 = (cov_1fs5mmbhgv.s[378]++, this.mat4[3]);
var a10 = (cov_1fs5mmbhgv.s[379]++, this.mat4[4]);
var a11 = (cov_1fs5mmbhgv.s[380]++, this.mat4[5]);
var a12 = (cov_1fs5mmbhgv.s[381]++, this.mat4[6]);
var a13 = (cov_1fs5mmbhgv.s[382]++, this.mat4[7]);
var a20 = (cov_1fs5mmbhgv.s[383]++, this.mat4[8]);
var a21 = (cov_1fs5mmbhgv.s[384]++, this.mat4[9]);
var a22 = (cov_1fs5mmbhgv.s[385]++, this.mat4[10]);
var a23 = (cov_1fs5mmbhgv.s[386]++, this.mat4[11]);
//sin,cos, and tan of respective angle
var sA = (cov_1fs5mmbhgv.s[387]++, Math.sin(a));
var cA = (cov_1fs5mmbhgv.s[388]++, Math.cos(a));
var tA = (cov_1fs5mmbhgv.s[389]++, 1 - cA);
// Construct the elements of the rotation matrix
var b00 = (cov_1fs5mmbhgv.s[390]++, x * x * tA + cA);
var b01 = (cov_1fs5mmbhgv.s[391]++, y * x * tA + z * sA);
var b02 = (cov_1fs5mmbhgv.s[392]++, z * x * tA - y * sA);
var b10 = (cov_1fs5mmbhgv.s[393]++, x * y * tA - z * sA);
var b11 = (cov_1fs5mmbhgv.s[394]++, y * y * tA + cA);
var b12 = (cov_1fs5mmbhgv.s[395]++, z * y * tA + x * sA);
var b20 = (cov_1fs5mmbhgv.s[396]++, x * z * tA + y * sA);
var b21 = (cov_1fs5mmbhgv.s[397]++, y * z * tA - x * sA);
var b22 = (cov_1fs5mmbhgv.s[398]++, z * z * tA + cA);
// rotation-specific matrix multiplication
cov_1fs5mmbhgv.s[399]++;
this.mat4[0] = a00 * b00 + a10 * b01 + a20 * b02;
cov_1fs5mmbhgv.s[400]++;
this.mat4[1] = a01 * b00 + a11 * b01 + a21 * b02;
cov_1fs5mmbhgv.s[401]++;
this.mat4[2] = a02 * b00 + a12 * b01 + a22 * b02;
cov_1fs5mmbhgv.s[402]++;
this.mat4[3] = a03 * b00 + a13 * b01 + a23 * b02;
cov_1fs5mmbhgv.s[403]++;
this.mat4[4] = a00 * b10 + a10 * b11 + a20 * b12;
cov_1fs5mmbhgv.s[404]++;
this.mat4[5] = a01 * b10 + a11 * b11 + a21 * b12;
cov_1fs5mmbhgv.s[405]++;
this.mat4[6] = a02 * b10 + a12 * b11 + a22 * b12;
cov_1fs5mmbhgv.s[406]++;
this.mat4[7] = a03 * b10 + a13 * b11 + a23 * b12;
cov_1fs5mmbhgv.s[407]++;
this.mat4[8] = a00 * b20 + a10 * b21 + a20 * b22;
cov_1fs5mmbhgv.s[408]++;
this.mat4[9] = a01 * b20 + a11 * b21 + a21 * b22;
cov_1fs5mmbhgv.s[409]++;
this.mat4[10] = a02 * b20 + a12 * b21 + a22 * b22;
cov_1fs5mmbhgv.s[410]++;
this.mat4[11] = a03 * b20 + a13 * b21 + a23 * b22;
cov_1fs5mmbhgv.s[411]++;
return this;
};
/**
* @todo finish implementing this method!
* translates
* @method translate
* @param {Number[]} v vector to translate by
* @chainable
*/ cov_1fs5mmbhgv.s[412]++;
_main.default.Matrix.prototype.translate = function(v) {
cov_1fs5mmbhgv.f[17]++;
var x = (cov_1fs5mmbhgv.s[413]++, v[0]),
y = (cov_1fs5mmbhgv.s[414]++, v[1]),
z = (cov_1fs5mmbhgv.s[415]++,
(cov_1fs5mmbhgv.b[32][0]++, v[2]) || (cov_1fs5mmbhgv.b[32][1]++, 0));
cov_1fs5mmbhgv.s[416]++;
this.mat4[12] += this.mat4[0] * x + this.mat4[4] * y + this.mat4[8] * z;
cov_1fs5mmbhgv.s[417]++;
this.mat4[13] += this.mat4[1] * x + this.mat4[5] * y + this.mat4[9] * z;
cov_1fs5mmbhgv.s[418]++;
this.mat4[14] += this.mat4[2] * x + this.mat4[6] * y + this.mat4[10] * z;
cov_1fs5mmbhgv.s[419]++;
this.mat4[15] += this.mat4[3] * x + this.mat4[7] * y + this.mat4[11] * z;
};
cov_1fs5mmbhgv.s[420]++;
_main.default.Matrix.prototype.rotateX = function(a) {
cov_1fs5mmbhgv.f[18]++;
cov_1fs5mmbhgv.s[421]++;
this.rotate(a, 1, 0, 0);
};
cov_1fs5mmbhgv.s[422]++;
_main.default.Matrix.prototype.rotateY = function(a) {
cov_1fs5mmbhgv.f[19]++;
cov_1fs5mmbhgv.s[423]++;
this.rotate(a, 0, 1, 0);
};
cov_1fs5mmbhgv.s[424]++;
_main.default.Matrix.prototype.rotateZ = function(a) {
cov_1fs5mmbhgv.f[20]++;
cov_1fs5mmbhgv.s[425]++;
this.rotate(a, 0, 0, 1);
};
/**
* sets the perspective matrix
* @method perspective
* @param {Number} fovy [description]
* @param {Number} aspect [description]
* @param {Number} near near clipping plane
* @param {Number} far far clipping plane
* @chainable
*/ cov_1fs5mmbhgv.s[426]++;
_main.default.Matrix.prototype.perspective = function(fovy, aspect, near, far) {
cov_1fs5mmbhgv.f[21]++;
var f = (cov_1fs5mmbhgv.s[427]++, 1.0 / Math.tan(fovy / 2)),
nf = (cov_1fs5mmbhgv.s[428]++, 1 / (near - far));
cov_1fs5mmbhgv.s[429]++;
this.mat4[0] = f / aspect;
cov_1fs5mmbhgv.s[430]++;
this.mat4[1] = 0;
cov_1fs5mmbhgv.s[431]++;
this.mat4[2] = 0;
cov_1fs5mmbhgv.s[432]++;
this.mat4[3] = 0;
cov_1fs5mmbhgv.s[433]++;
this.mat4[4] = 0;
cov_1fs5mmbhgv.s[434]++;
this.mat4[5] = f;
cov_1fs5mmbhgv.s[435]++;
this.mat4[6] = 0;
cov_1fs5mmbhgv.s[436]++;
this.mat4[7] = 0;
cov_1fs5mmbhgv.s[437]++;
this.mat4[8] = 0;
cov_1fs5mmbhgv.s[438]++;
this.mat4[9] = 0;
cov_1fs5mmbhgv.s[439]++;
this.mat4[10] = (far + near) * nf;
cov_1fs5mmbhgv.s[440]++;
this.mat4[11] = -1;
cov_1fs5mmbhgv.s[441]++;
this.mat4[12] = 0;
cov_1fs5mmbhgv.s[442]++;
this.mat4[13] = 0;
cov_1fs5mmbhgv.s[443]++;
this.mat4[14] = 2 * far * near * nf;
cov_1fs5mmbhgv.s[444]++;
this.mat4[15] = 0;
cov_1fs5mmbhgv.s[445]++;
return this;
};
/**
* sets the ortho matrix
* @method ortho
* @param {Number} left [description]
* @param {Number} right [description]
* @param {Number} bottom [description]
* @param {Number} top [description]
* @param {Number} near near clipping plane
* @param {Number} far far clipping plane
* @chainable
*/ cov_1fs5mmbhgv.s[446]++;
_main.default.Matrix.prototype.ortho = function(
left,
right,
bottom,
top,
near,
far
) {
cov_1fs5mmbhgv.f[22]++;
var lr = (cov_1fs5mmbhgv.s[447]++, 1 / (left - right)),
bt = (cov_1fs5mmbhgv.s[448]++, 1 / (bottom - top)),
nf = (cov_1fs5mmbhgv.s[449]++, 1 / (near - far));
cov_1fs5mmbhgv.s[450]++;
this.mat4[0] = -2 * lr;
cov_1fs5mmbhgv.s[451]++;
this.mat4[1] = 0;
cov_1fs5mmbhgv.s[452]++;
this.mat4[2] = 0;
cov_1fs5mmbhgv.s[453]++;
this.mat4[3] = 0;
cov_1fs5mmbhgv.s[454]++;
this.mat4[4] = 0;
cov_1fs5mmbhgv.s[455]++;
this.mat4[5] = -2 * bt;
cov_1fs5mmbhgv.s[456]++;
this.mat4[6] = 0;
cov_1fs5mmbhgv.s[457]++;
this.mat4[7] = 0;
cov_1fs5mmbhgv.s[458]++;
this.mat4[8] = 0;
cov_1fs5mmbhgv.s[459]++;
this.mat4[9] = 0;
cov_1fs5mmbhgv.s[460]++;
this.mat4[10] = 2 * nf;
cov_1fs5mmbhgv.s[461]++;
this.mat4[11] = 0;
cov_1fs5mmbhgv.s[462]++;
this.mat4[12] = (left + right) * lr;
cov_1fs5mmbhgv.s[463]++;
this.mat4[13] = (top + bottom) * bt;
cov_1fs5mmbhgv.s[464]++;
this.mat4[14] = (far + near) * nf;
cov_1fs5mmbhgv.s[465]++;
this.mat4[15] = 1;
cov_1fs5mmbhgv.s[466]++;
return this;
};
/**
* PRIVATE
*/
// matrix methods adapted from:
// https://developer.mozilla.org/en-US/docs/Web/WebGL/
// gluPerspective
//
// function _makePerspective(fovy, aspect, znear, zfar){
// const ymax = znear * Math.tan(fovy * Math.PI / 360.0);
// const ymin = -ymax;
// const xmin = ymin * aspect;
// const xmax = ymax * aspect;
// return _makeFrustum(xmin, xmax, ymin, ymax, znear, zfar);
// }
////
//// glFrustum
////
//function _makeFrustum(left, right, bottom, top, znear, zfar){
// const X = 2*znear/(right-left);
// const Y = 2*znear/(top-bottom);
// const A = (right+left)/(right-left);
// const B = (top+bottom)/(top-bottom);
// const C = -(zfar+znear)/(zfar-znear);
// const D = -2*zfar*znear/(zfar-znear);
// const frustrumMatrix =[
// X, 0, A, 0,
// 0, Y, B, 0,
// 0, 0, C, D,
// 0, 0, -1, 0
//];
//return frustrumMatrix;
// }
// function _setMVPMatrices(){
////an identity matrix
////@TODO use the p5.Matrix class to abstract away our MV matrices and
///other math
//const _mvMatrix =
//[
// 1.0,0.0,0.0,0.0,
// 0.0,1.0,0.0,0.0,
// 0.0,0.0,1.0,0.0,
// 0.0,0.0,0.0,1.0
//];
var _default = _main.default.Matrix;
exports.default = _default;
},
{ '../core/main': 54 }
],
105: [
function(_dereq_, module, exports) {
'use strict';
var cov_t66yoiwch = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.RenderBuffer.js';
var hash = '9ebd3b8f1ef23414e72a3c49d49f8def7d8ddd21';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.RenderBuffer.js',
statementMap: {
'0': { start: { line: 3, column: 0 }, end: { line: 10, column: 2 } },
'1': { start: { line: 4, column: 2 }, end: { line: 4, column: 19 } },
'2': { start: { line: 5, column: 2 }, end: { line: 5, column: 17 } },
'3': { start: { line: 6, column: 2 }, end: { line: 6, column: 17 } },
'4': { start: { line: 7, column: 2 }, end: { line: 7, column: 19 } },
'5': { start: { line: 8, column: 2 }, end: { line: 8, column: 28 } },
'6': { start: { line: 9, column: 2 }, end: { line: 9, column: 17 } },
'7': { start: { line: 19, column: 0 }, end: { line: 62, column: 2 } },
'8': { start: { line: 20, column: 21 }, end: { line: 20, column: 38 } },
'9': { start: { line: 21, column: 13 }, end: { line: 21, column: 30 } },
'10': { start: { line: 23, column: 2 }, end: { line: 27, column: 3 } },
'11': { start: { line: 24, column: 4 }, end: { line: 24, column: 27 } },
'12': { start: { line: 26, column: 4 }, end: { line: 26, column: 21 } },
'13': { start: { line: 30, column: 15 }, end: { line: 30, column: 36 } },
'14': { start: { line: 31, column: 2 }, end: { line: 33, column: 3 } },
'15': { start: { line: 32, column: 4 }, end: { line: 32, column: 11 } },
'16': { start: { line: 36, column: 15 }, end: { line: 36, column: 33 } },
'17': { start: { line: 37, column: 14 }, end: { line: 37, column: 29 } },
'18': { start: { line: 38, column: 2 }, end: { line: 61, column: 3 } },
'19': { start: { line: 40, column: 25 }, end: { line: 40, column: 32 } },
'20': { start: { line: 41, column: 4 }, end: { line: 44, column: 5 } },
'21': { start: { line: 43, column: 6 }, end: { line: 43, column: 54 } },
'22': { start: { line: 46, column: 4 }, end: { line: 46, column: 43 } },
'23': { start: { line: 49, column: 4 }, end: { line: 58, column: 5 } },
'24': { start: { line: 50, column: 18 }, end: { line: 50, column: 26 } },
'25': { start: { line: 52, column: 21 }, end: { line: 52, column: 41 } },
'26': { start: { line: 54, column: 6 }, end: { line: 54, column: 66 } },
'27': { start: { line: 57, column: 6 }, end: { line: 57, column: 41 } },
'28': { start: { line: 60, column: 4 }, end: { line: 60, column: 41 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 3, column: 18 }, end: { line: 3, column: 19 } },
loc: { start: { line: 3, column: 64 }, end: { line: 10, column: 1 } },
line: 3
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 19, column: 43 }, end: { line: 19, column: 44 } },
loc: { start: { line: 19, column: 70 }, end: { line: 62, column: 1 } },
line: 19
}
},
branchMap: {
'0': {
loc: { start: { line: 23, column: 2 }, end: { line: 27, column: 3 } },
type: 'if',
locations: [
{ start: { line: 23, column: 2 }, end: { line: 27, column: 3 } },
{ start: { line: 23, column: 2 }, end: { line: 27, column: 3 } }
],
line: 23
},
'1': {
loc: { start: { line: 31, column: 2 }, end: { line: 33, column: 3 } },
type: 'if',
locations: [
{ start: { line: 31, column: 2 }, end: { line: 33, column: 3 } },
{ start: { line: 31, column: 2 }, end: { line: 33, column: 3 } }
],
line: 31
},
'2': {
loc: { start: { line: 38, column: 2 }, end: { line: 61, column: 3 } },
type: 'if',
locations: [
{ start: { line: 38, column: 2 }, end: { line: 61, column: 3 } },
{ start: { line: 38, column: 2 }, end: { line: 61, column: 3 } }
],
line: 38
},
'3': {
loc: { start: { line: 41, column: 4 }, end: { line: 44, column: 5 } },
type: 'if',
locations: [
{ start: { line: 41, column: 4 }, end: { line: 44, column: 5 } },
{ start: { line: 41, column: 4 }, end: { line: 44, column: 5 } }
],
line: 41
},
'4': {
loc: { start: { line: 49, column: 4 }, end: { line: 58, column: 5 } },
type: 'if',
locations: [
{ start: { line: 49, column: 4 }, end: { line: 58, column: 5 } },
{ start: { line: 49, column: 4 }, end: { line: 58, column: 5 } }
],
line: 49
},
'5': {
loc: { start: { line: 49, column: 8 }, end: { line: 49, column: 60 } },
type: 'binary-expr',
locations: [
{ start: { line: 49, column: 8 }, end: { line: 49, column: 20 } },
{ start: { line: 49, column: 24 }, end: { line: 49, column: 60 } }
],
line: 49
},
'6': {
loc: { start: { line: 52, column: 21 }, end: { line: 52, column: 41 } },
type: 'cond-expr',
locations: [
{ start: { line: 52, column: 27 }, end: { line: 52, column: 35 } },
{ start: { line: 52, column: 38 }, end: { line: 52, column: 41 } }
],
line: 52
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0
},
f: { '0': 0, '1': 0 },
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '9ebd3b8f1ef23414e72a3c49d49f8def7d8ddd21'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_t66yoiwch.s[0]++;
_main.default.RenderBuffer = function(size, src, dst, attr, renderer, map) {
cov_t66yoiwch.f[0]++;
cov_t66yoiwch.s[1]++;
this.size = size; // the number of FLOATs in each vertex
cov_t66yoiwch.s[2]++;
this.src = src; // the name of the model's source array
cov_t66yoiwch.s[3]++;
this.dst = dst; // the name of the geometry's buffer
cov_t66yoiwch.s[4]++;
this.attr = attr; // the name of the vertex attribute
cov_t66yoiwch.s[5]++;
this._renderer = renderer;
cov_t66yoiwch.s[6]++;
this.map = map; // optional, a transformation function to apply to src
};
/**
* Enables and binds the buffers used by shader when the appropriate data exists in geometry.
* Must always be done prior to drawing geometry in WebGL.
* @param {p5.Geometry} geometry Geometry that is going to be drawn
* @param {p5.Shader} shader Active shader
* @private
*/ cov_t66yoiwch.s[7]++;
_main.default.RenderBuffer.prototype._prepareBuffer = function(geometry, shader) {
cov_t66yoiwch.f[1]++;
var attributes = (cov_t66yoiwch.s[8]++, shader.attributes);
var gl = (cov_t66yoiwch.s[9]++, this._renderer.GL);
var model;
cov_t66yoiwch.s[10]++;
if (geometry.model) {
cov_t66yoiwch.b[0][0]++;
cov_t66yoiwch.s[11]++;
model = geometry.model;
} else {
cov_t66yoiwch.b[0][1]++;
cov_t66yoiwch.s[12]++;
model = geometry;
}
// loop through each of the buffer definitions
var attr = (cov_t66yoiwch.s[13]++, attributes[this.attr]);
cov_t66yoiwch.s[14]++;
if (!attr) {
cov_t66yoiwch.b[1][0]++;
cov_t66yoiwch.s[15]++;
return;
} else {
cov_t66yoiwch.b[1][1]++;
}
// check if the model has the appropriate source array
var buffer = (cov_t66yoiwch.s[16]++, geometry[this.dst]);
var src = (cov_t66yoiwch.s[17]++, model[this.src]);
cov_t66yoiwch.s[18]++;
if (src.length > 0) {
cov_t66yoiwch.b[2][0]++;
// check if we need to create the GL buffer
var createBuffer = (cov_t66yoiwch.s[19]++, !buffer);
cov_t66yoiwch.s[20]++;
if (createBuffer) {
cov_t66yoiwch.b[3][0]++;
cov_t66yoiwch.s[21]++;
// create and remember the buffer
geometry[this.dst] = buffer = gl.createBuffer();
} else {
cov_t66yoiwch.b[3][1]++;
}
// bind the buffer
cov_t66yoiwch.s[22]++;
gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
// check if we need to fill the buffer with data
cov_t66yoiwch.s[23]++;
if (
(cov_t66yoiwch.b[5][0]++, createBuffer) ||
(cov_t66yoiwch.b[5][1]++, model.dirtyFlags[this.src] !== false)
) {
cov_t66yoiwch.b[4][0]++;
var map = (cov_t66yoiwch.s[24]++, this.map);
// get the values from the model, possibly transformed
var values = (cov_t66yoiwch.s[25]++,
map ? (cov_t66yoiwch.b[6][0]++, map(src)) : (cov_t66yoiwch.b[6][1]++, src));
// fill the buffer with the values
cov_t66yoiwch.s[26]++;
this._renderer._bindBuffer(buffer, gl.ARRAY_BUFFER, values);
// mark the model's source array as clean
cov_t66yoiwch.s[27]++;
model.dirtyFlags[this.src] = false;
} else {
cov_t66yoiwch.b[4][1]++;
}
// enable the attribute
cov_t66yoiwch.s[28]++;
shader.enableAttrib(attr, this.size);
} else {
cov_t66yoiwch.b[2][1]++;
}
};
var _default = _main.default.RenderBuffer;
exports.default = _default;
},
{ '../core/main': 54 }
],
106: [
function(_dereq_, module, exports) {
'use strict';
function _typeof(obj) {
if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj &&
typeof Symbol === 'function' &&
obj.constructor === Symbol &&
obj !== Symbol.prototype
? 'symbol'
: typeof obj;
};
}
return _typeof(obj);
}
var cov_tnfynn6ph = (function() {
var path =
'/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.RendererGL.Immediate.js';
var hash = '25175bb2f142df1378a0d10992b768000fee8ca6';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path:
'/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.RendererGL.Immediate.js',
statementMap: {
'0': { start: { line: 32, column: 0 }, end: { line: 37, column: 2 } },
'1': { start: { line: 33, column: 2 }, end: { line: 34, column: 55 } },
'2': { start: { line: 35, column: 2 }, end: { line: 35, column: 38 } },
'3': { start: { line: 36, column: 2 }, end: { line: 36, column: 14 } },
'4': { start: { line: 49, column: 0 }, end: { line: 104, column: 2 } },
'5': { start: { line: 53, column: 2 }, end: { line: 53, column: 16 } },
'6': { start: { line: 55, column: 2 }, end: { line: 67, column: 3 } },
'7': { start: { line: 57, column: 4 }, end: { line: 57, column: 21 } },
'8': { start: { line: 58, column: 9 }, end: { line: 67, column: 3 } },
'9': { start: { line: 60, column: 4 }, end: { line: 60, column: 21 } },
'10': { start: { line: 61, column: 4 }, end: { line: 61, column: 21 } },
'11': { start: { line: 62, column: 9 }, end: { line: 67, column: 3 } },
'12': { start: { line: 64, column: 4 }, end: { line: 64, column: 21 } },
'13': { start: { line: 65, column: 4 }, end: { line: 65, column: 21 } },
'14': { start: { line: 66, column: 4 }, end: { line: 66, column: 21 } },
'15': { start: { line: 68, column: 15 }, end: { line: 68, column: 37 } },
'16': { start: { line: 69, column: 2 }, end: { line: 69, column: 50 } },
'17': { start: { line: 70, column: 22 }, end: { line: 70, column: 63 } },
'18': { start: { line: 71, column: 2 }, end: { line: 76, column: 4 } },
'19': { start: { line: 78, column: 2 }, end: { line: 91, column: 3 } },
'20': { start: { line: 79, column: 4 }, end: { line: 90, column: 5 } },
'21': { start: { line: 80, column: 6 }, end: { line: 83, column: 7 } },
'22': { start: { line: 81, column: 8 }, end: { line: 81, column: 29 } },
'23': { start: { line: 82, column: 8 }, end: { line: 82, column: 30 } },
'24': { start: { line: 84, column: 11 }, end: { line: 90, column: 5 } },
'25': { start: { line: 86, column: 6 }, end: { line: 89, column: 8 } },
'26': { start: { line: 93, column: 2 }, end: { line: 93, column: 45 } },
'27': { start: { line: 95, column: 2 }, end: { line: 95, column: 42 } },
'28': { start: { line: 96, column: 2 }, end: { line: 96, column: 42 } },
'29': { start: { line: 97, column: 2 }, end: { line: 97, column: 42 } },
'30': { start: { line: 99, column: 2 }, end: { line: 99, column: 45 } },
'31': { start: { line: 100, column: 2 }, end: { line: 100, column: 45 } },
'32': { start: { line: 101, column: 2 }, end: { line: 101, column: 45 } },
'33': { start: { line: 103, column: 2 }, end: { line: 103, column: 14 } },
'34': { start: { line: 110, column: 0 }, end: { line: 144, column: 2 } },
'35': { start: { line: 118, column: 2 }, end: { line: 124, column: 3 } },
'36': { start: { line: 119, column: 4 }, end: { line: 122, column: 6 } },
'37': { start: { line: 123, column: 4 }, end: { line: 123, column: 16 } },
'38': { start: { line: 125, column: 2 }, end: { line: 125, column: 38 } },
'39': { start: { line: 126, column: 2 }, end: { line: 130, column: 3 } },
'40': { start: { line: 127, column: 4 }, end: { line: 129, column: 5 } },
'41': { start: { line: 128, column: 6 }, end: { line: 128, column: 32 } },
'42': { start: { line: 131, column: 2 }, end: { line: 135, column: 3 } },
'43': { start: { line: 132, column: 4 }, end: { line: 134, column: 5 } },
'44': { start: { line: 133, column: 6 }, end: { line: 133, column: 34 } },
'45': { start: { line: 137, column: 2 }, end: { line: 137, column: 24 } },
'46': { start: { line: 138, column: 2 }, end: { line: 138, column: 27 } },
'47': { start: { line: 139, column: 2 }, end: { line: 139, column: 23 } },
'48': { start: { line: 140, column: 2 }, end: { line: 140, column: 46 } },
'49': { start: { line: 141, column: 2 }, end: { line: 141, column: 49 } },
'50': { start: { line: 142, column: 2 }, end: { line: 142, column: 45 } },
'51': { start: { line: 143, column: 2 }, end: { line: 143, column: 14 } },
'52': { start: { line: 155, column: 0 }, end: { line: 178, column: 2 } },
'53': { start: { line: 156, column: 2 }, end: { line: 156, column: 64 } },
'54': { start: { line: 156, column: 57 }, end: { line: 156, column: 64 } },
'55': { start: { line: 158, column: 26 }, end: { line: 158, column: 79 } },
'56': { start: { line: 159, column: 22 }, end: { line: 159, column: 46 } },
'57': { start: { line: 160, column: 2 }, end: { line: 167, column: 3 } },
'58': { start: { line: 161, column: 4 }, end: { line: 165, column: 6 } },
'59': { start: { line: 166, column: 4 }, end: { line: 166, column: 51 } },
'60': { start: { line: 169, column: 22 }, end: { line: 169, column: 69 } },
'61': { start: { line: 172, column: 4 }, end: { line: 173, column: 52 } },
'62': { start: { line: 175, column: 2 }, end: { line: 177, column: 3 } },
'63': { start: { line: 176, column: 4 }, end: { line: 176, column: 27 } },
'64': { start: { line: 186, column: 0 }, end: { line: 223, column: 2 } },
'65': { start: { line: 191, column: 14 }, end: { line: 191, column: 16 } },
'66': { start: { line: 192, column: 10 }, end: { line: 192, column: 11 } },
'67': { start: { line: 193, column: 2 }, end: { line: 218, column: 3 } },
'68': { start: { line: 195, column: 6 }, end: { line: 198, column: 7 } },
'69': { start: { line: 196, column: 8 }, end: { line: 196, column: 29 } },
'70': { start: { line: 197, column: 8 }, end: { line: 197, column: 29 } },
'71': { start: { line: 199, column: 6 }, end: { line: 199, column: 27 } },
'72': { start: { line: 200, column: 6 }, end: { line: 200, column: 12 } },
'73': { start: { line: 202, column: 6 }, end: { line: 206, column: 7 } },
'74': { start: { line: 203, column: 8 }, end: { line: 203, column: 29 } },
'75': { start: { line: 204, column: 8 }, end: { line: 204, column: 33 } },
'76': { start: { line: 205, column: 8 }, end: { line: 205, column: 29 } },
'77': { start: { line: 207, column: 6 }, end: { line: 207, column: 12 } },
'78': { start: { line: 209, column: 6 }, end: { line: 211, column: 7 } },
'79': { start: { line: 210, column: 8 }, end: { line: 210, column: 29 } },
'80': { start: { line: 212, column: 6 }, end: { line: 212, column: 12 } },
'81': { start: { line: 214, column: 6 }, end: { line: 216, column: 7 } },
'82': { start: { line: 215, column: 8 }, end: { line: 215, column: 29 } },
'83': { start: { line: 217, column: 6 }, end: { line: 217, column: 12 } },
'84': { start: { line: 219, column: 2 }, end: { line: 221, column: 3 } },
'85': { start: { line: 220, column: 4 }, end: { line: 220, column: 36 } },
'86': { start: { line: 222, column: 2 }, end: { line: 222, column: 13 } },
'87': { start: { line: 229, column: 0 }, end: { line: 243, column: 2 } },
'88': { start: { line: 230, column: 2 }, end: { line: 230, column: 53 } },
'89': { start: { line: 231, column: 19 }, end: { line: 233, column: 3 } },
'90': { start: { line: 234, column: 24 }, end: { line: 234, column: 51 } },
'91': { start: { line: 235, column: 2 }, end: { line: 235, column: 44 } },
'92': { start: { line: 236, column: 2 }, end: { line: 242, column: 3 } },
'93': { start: { line: 237, column: 12 }, end: { line: 237, column: 13 } },
'94': { start: { line: 237, column: 31 }, end: { line: 237, column: 51 } },
'95': { start: { line: 241, column: 4 }, end: { line: 241, column: 78 } },
'96': { start: { line: 250, column: 0 }, end: { line: 278, column: 2 } },
'97': { start: { line: 251, column: 13 }, end: { line: 251, column: 20 } },
'98': { start: { line: 252, column: 17 }, end: { line: 252, column: 47 } },
'99': { start: { line: 254, column: 2 }, end: { line: 254, column: 54 } },
'100': { start: { line: 255, column: 2 }, end: { line: 255, column: 32 } },
'101': { start: { line: 257, column: 2 }, end: { line: 259, column: 3 } },
'102': { start: { line: 258, column: 4 }, end: { line: 258, column: 61 } },
'103': { start: { line: 263, column: 2 }, end: { line: 268, column: 3 } },
'104': { start: { line: 267, column: 4 }, end: { line: 267, column: 58 } },
'105': { start: { line: 270, column: 2 }, end: { line: 270, column: 43 } },
'106': { start: { line: 271, column: 2 }, end: { line: 275, column: 4 } },
'107': { start: { line: 277, column: 2 }, end: { line: 277, column: 24 } },
'108': { start: { line: 285, column: 0 }, end: { line: 299, column: 2 } },
'109': { start: { line: 286, column: 13 }, end: { line: 286, column: 20 } },
'110': { start: { line: 287, column: 17 }, end: { line: 287, column: 49 } },
'111': { start: { line: 288, column: 2 }, end: { line: 288, column: 34 } },
'112': { start: { line: 289, column: 2 }, end: { line: 291, column: 3 } },
'113': { start: { line: 290, column: 4 }, end: { line: 290, column: 61 } },
'114': { start: { line: 292, column: 2 }, end: { line: 292, column: 45 } },
'115': { start: { line: 293, column: 2 }, end: { line: 297, column: 4 } },
'116': { start: { line: 298, column: 2 }, end: { line: 298, column: 24 } },
'117': { start: { line: 307, column: 0 }, end: { line: 311, column: 2 } },
'118': { start: { line: 308, column: 2 }, end: { line: 310, column: 5 } },
'119': { start: { line: 309, column: 4 }, end: { line: 309, column: 56 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 32, column: 37 }, end: { line: 32, column: 38 } },
loc: { start: { line: 32, column: 52 }, end: { line: 37, column: 1 } },
line: 32
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 49, column: 33 }, end: { line: 49, column: 34 } },
loc: { start: { line: 49, column: 48 }, end: { line: 104, column: 1 } },
line: 49
},
'2': {
name: '(anonymous_2)',
decl: {
start: { line: 110, column: 35 },
end: { line: 110, column: 36 }
},
loc: { start: { line: 117, column: 2 }, end: { line: 144, column: 1 } },
line: 117
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 155, column: 43 },
end: { line: 155, column: 44 }
},
loc: { start: { line: 155, column: 58 }, end: { line: 178, column: 1 } },
line: 155
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 186, column: 42 },
end: { line: 186, column: 43 }
},
loc: { start: { line: 190, column: 2 }, end: { line: 223, column: 1 } },
line: 190
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 229, column: 42 },
end: { line: 229, column: 43 }
},
loc: { start: { line: 229, column: 53 }, end: { line: 243, column: 1 } },
line: 229
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 250, column: 45 },
end: { line: 250, column: 46 }
},
loc: { start: { line: 250, column: 56 }, end: { line: 278, column: 1 } },
line: 250
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 285, column: 47 },
end: { line: 285, column: 48 }
},
loc: { start: { line: 285, column: 58 }, end: { line: 299, column: 1 } },
line: 285
},
'8': {
name: '(anonymous_8)',
decl: {
start: { line: 307, column: 44 },
end: { line: 307, column: 45 }
},
loc: { start: { line: 307, column: 63 }, end: { line: 311, column: 1 } },
line: 307
},
'9': {
name: '(anonymous_9)',
decl: {
start: { line: 308, column: 28 },
end: { line: 308, column: 29 }
},
loc: { start: { line: 308, column: 34 }, end: { line: 310, column: 3 } },
line: 308
}
},
branchMap: {
'0': {
loc: { start: { line: 34, column: 4 }, end: { line: 34, column: 54 } },
type: 'cond-expr',
locations: [
{ start: { line: 34, column: 25 }, end: { line: 34, column: 29 } },
{ start: { line: 34, column: 32 }, end: { line: 34, column: 54 } }
],
line: 34
},
'1': {
loc: { start: { line: 55, column: 2 }, end: { line: 67, column: 3 } },
type: 'if',
locations: [
{ start: { line: 55, column: 2 }, end: { line: 67, column: 3 } },
{ start: { line: 55, column: 2 }, end: { line: 67, column: 3 } }
],
line: 55
},
'2': {
loc: { start: { line: 58, column: 9 }, end: { line: 67, column: 3 } },
type: 'if',
locations: [
{ start: { line: 58, column: 9 }, end: { line: 67, column: 3 } },
{ start: { line: 58, column: 9 }, end: { line: 67, column: 3 } }
],
line: 58
},
'3': {
loc: { start: { line: 62, column: 9 }, end: { line: 67, column: 3 } },
type: 'if',
locations: [
{ start: { line: 62, column: 9 }, end: { line: 67, column: 3 } },
{ start: { line: 62, column: 9 }, end: { line: 67, column: 3 } }
],
line: 62
},
'4': {
loc: { start: { line: 70, column: 22 }, end: { line: 70, column: 63 } },
type: 'binary-expr',
locations: [
{ start: { line: 70, column: 22 }, end: { line: 70, column: 39 } },
{ start: { line: 70, column: 43 }, end: { line: 70, column: 63 } }
],
line: 70
},
'5': {
loc: { start: { line: 78, column: 2 }, end: { line: 91, column: 3 } },
type: 'if',
locations: [
{ start: { line: 78, column: 2 }, end: { line: 91, column: 3 } },
{ start: { line: 78, column: 2 }, end: { line: 91, column: 3 } }
],
line: 78
},
'6': {
loc: { start: { line: 79, column: 4 }, end: { line: 90, column: 5 } },
type: 'if',
locations: [
{ start: { line: 79, column: 4 }, end: { line: 90, column: 5 } },
{ start: { line: 79, column: 4 }, end: { line: 90, column: 5 } }
],
line: 79
},
'7': {
loc: { start: { line: 80, column: 6 }, end: { line: 83, column: 7 } },
type: 'if',
locations: [
{ start: { line: 80, column: 6 }, end: { line: 83, column: 7 } },
{ start: { line: 80, column: 6 }, end: { line: 83, column: 7 } }
],
line: 80
},
'8': {
loc: { start: { line: 80, column: 10 }, end: { line: 80, column: 53 } },
type: 'binary-expr',
locations: [
{ start: { line: 80, column: 10 }, end: { line: 80, column: 29 } },
{ start: { line: 80, column: 33 }, end: { line: 80, column: 53 } }
],
line: 80
},
'9': {
loc: { start: { line: 84, column: 11 }, end: { line: 90, column: 5 } },
type: 'if',
locations: [
{ start: { line: 84, column: 11 }, end: { line: 90, column: 5 } },
{ start: { line: 84, column: 11 }, end: { line: 90, column: 5 } }
],
line: 84
},
'10': {
loc: { start: { line: 84, column: 15 }, end: { line: 84, column: 58 } },
type: 'binary-expr',
locations: [
{ start: { line: 84, column: 15 }, end: { line: 84, column: 33 } },
{ start: { line: 84, column: 37 }, end: { line: 84, column: 58 } }
],
line: 84
},
'11': {
loc: { start: { line: 118, column: 2 }, end: { line: 124, column: 3 } },
type: 'if',
locations: [
{ start: { line: 118, column: 2 }, end: { line: 124, column: 3 } },
{ start: { line: 118, column: 2 }, end: { line: 124, column: 3 } }
],
line: 118
},
'12': {
loc: { start: { line: 126, column: 2 }, end: { line: 130, column: 3 } },
type: 'if',
locations: [
{ start: { line: 126, column: 2 }, end: { line: 130, column: 3 } },
{ start: { line: 126, column: 2 }, end: { line: 130, column: 3 } }
],
line: 126
},
'13': {
loc: { start: { line: 127, column: 4 }, end: { line: 129, column: 5 } },
type: 'if',
locations: [
{ start: { line: 127, column: 4 }, end: { line: 129, column: 5 } },
{ start: { line: 127, column: 4 }, end: { line: 129, column: 5 } }
],
line: 127
},
'14': {
loc: { start: { line: 131, column: 2 }, end: { line: 135, column: 3 } },
type: 'if',
locations: [
{ start: { line: 131, column: 2 }, end: { line: 135, column: 3 } },
{ start: { line: 131, column: 2 }, end: { line: 135, column: 3 } }
],
line: 131
},
'15': {
loc: { start: { line: 132, column: 4 }, end: { line: 134, column: 5 } },
type: 'if',
locations: [
{ start: { line: 132, column: 4 }, end: { line: 134, column: 5 } },
{ start: { line: 132, column: 4 }, end: { line: 134, column: 5 } }
],
line: 132
},
'16': {
loc: { start: { line: 156, column: 2 }, end: { line: 156, column: 64 } },
type: 'if',
locations: [
{ start: { line: 156, column: 2 }, end: { line: 156, column: 64 } },
{ start: { line: 156, column: 2 }, end: { line: 156, column: 64 } }
],
line: 156
},
'17': {
loc: { start: { line: 158, column: 26 }, end: { line: 158, column: 79 } },
type: 'binary-expr',
locations: [
{ start: { line: 158, column: 26 }, end: { line: 158, column: 40 } },
{ start: { line: 158, column: 44 }, end: { line: 158, column: 79 } }
],
line: 158
},
'18': {
loc: { start: { line: 160, column: 2 }, end: { line: 167, column: 3 } },
type: 'if',
locations: [
{ start: { line: 160, column: 2 }, end: { line: 167, column: 3 } },
{ start: { line: 160, column: 2 }, end: { line: 167, column: 3 } }
],
line: 160
},
'19': {
loc: { start: { line: 172, column: 4 }, end: { line: 173, column: 52 } },
type: 'binary-expr',
locations: [
{ start: { line: 172, column: 5 }, end: { line: 172, column: 18 } },
{ start: { line: 172, column: 22 }, end: { line: 172, column: 38 } },
{ start: { line: 172, column: 42 }, end: { line: 172, column: 54 } },
{ start: { line: 172, column: 58 }, end: { line: 172, column: 69 } },
{ start: { line: 173, column: 4 }, end: { line: 173, column: 52 } }
],
line: 172
},
'20': {
loc: { start: { line: 175, column: 2 }, end: { line: 177, column: 3 } },
type: 'if',
locations: [
{ start: { line: 175, column: 2 }, end: { line: 177, column: 3 } },
{ start: { line: 175, column: 2 }, end: { line: 177, column: 3 } }
],
line: 175
},
'21': {
loc: { start: { line: 193, column: 2 }, end: { line: 218, column: 3 } },
type: 'switch',
locations: [
{ start: { line: 194, column: 4 }, end: { line: 200, column: 12 } },
{ start: { line: 201, column: 4 }, end: { line: 207, column: 12 } },
{ start: { line: 208, column: 4 }, end: { line: 212, column: 12 } },
{ start: { line: 213, column: 4 }, end: { line: 217, column: 12 } }
],
line: 193
},
'22': {
loc: { start: { line: 219, column: 2 }, end: { line: 221, column: 3 } },
type: 'if',
locations: [
{ start: { line: 219, column: 2 }, end: { line: 221, column: 3 } },
{ start: { line: 219, column: 2 }, end: { line: 221, column: 3 } }
],
line: 219
},
'23': {
loc: { start: { line: 263, column: 2 }, end: { line: 268, column: 3 } },
type: 'if',
locations: [
{ start: { line: 263, column: 2 }, end: { line: 268, column: 3 } },
{ start: { line: 263, column: 2 }, end: { line: 268, column: 3 } }
],
line: 263
},
'24': {
loc: { start: { line: 264, column: 4 }, end: { line: 265, column: 52 } },
type: 'binary-expr',
locations: [
{ start: { line: 264, column: 4 }, end: { line: 264, column: 57 } },
{ start: { line: 265, column: 4 }, end: { line: 265, column: 52 } }
],
line: 264
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0, 0, 0, 0],
'20': [0, 0],
'21': [0, 0, 0, 0],
'22': [0, 0],
'23': [0, 0],
'24': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '25175bb2f142df1378a0d10992b768000fee8ca6'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
var constants = _interopRequireWildcard(_dereq_('../core/constants'));
_dereq_('./p5.RenderBuffer');
function _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function _getRequireWildcardCache() {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || (_typeof(obj) !== 'object' && typeof obj !== 'function')) {
return { default: obj };
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_tnfynn6ph.s[0]++;
/**
* Begin shape drawing. This is a helpful way of generating
* custom shapes quickly. However in WEBGL mode, application
* performance will likely drop as a result of too many calls to
* beginShape() / endShape(). As a high performance alternative,
* please use p5.js geometry primitives.
* @private
* @method beginShape
* @param {Number} mode webgl primitives mode. beginShape supports the
* following modes:
* POINTS,LINES,LINE_STRIP,LINE_LOOP,TRIANGLES,
* TRIANGLE_STRIP, TRIANGLE_FAN and TESS(WEBGL only)
* @chainable
*/
_main.default.RendererGL.prototype.beginShape = function(mode) {
cov_tnfynn6ph.f[0]++;
cov_tnfynn6ph.s[1]++;
this.immediateMode.shapeMode =
mode !== undefined
? (cov_tnfynn6ph.b[0][0]++, mode)
: (cov_tnfynn6ph.b[0][1]++, constants.TRIANGLE_FAN);
cov_tnfynn6ph.s[2]++;
this.immediateMode.geometry.reset();
cov_tnfynn6ph.s[3]++;
return this;
};
/**
* adds a vertex to be drawn in a custom Shape.
* @private
* @method vertex
* @param {Number} x x-coordinate of vertex
* @param {Number} y y-coordinate of vertex
* @param {Number} z z-coordinate of vertex
* @chainable
* @TODO implement handling of p5.Vector args
*/ cov_tnfynn6ph.s[4]++;
_main.default.RendererGL.prototype.vertex = function(x, y) {
cov_tnfynn6ph.f[1]++;
var z, u, v;
// default to (x, y) mode: all other arugments assumed to be 0.
cov_tnfynn6ph.s[5]++;
z = u = v = 0;
cov_tnfynn6ph.s[6]++;
if (arguments.length === 3) {
cov_tnfynn6ph.b[1][0]++;
cov_tnfynn6ph.s[7]++;
// (x, y, z) mode: (u, v) assumed to be 0.
z = arguments[2];
} else {
cov_tnfynn6ph.b[1][1]++;
cov_tnfynn6ph.s[8]++;
if (arguments.length === 4) {
cov_tnfynn6ph.b[2][0]++;
cov_tnfynn6ph.s[9]++;
// (x, y, u, v) mode: z assumed to be 0.
u = arguments[2];
cov_tnfynn6ph.s[10]++;
v = arguments[3];
} else {
cov_tnfynn6ph.b[2][1]++;
cov_tnfynn6ph.s[11]++;
if (arguments.length === 5) {
cov_tnfynn6ph.b[3][0]++;
cov_tnfynn6ph.s[12]++;
// (x, y, z, u, v) mode
z = arguments[2];
cov_tnfynn6ph.s[13]++;
u = arguments[3];
cov_tnfynn6ph.s[14]++;
v = arguments[4];
} else {
cov_tnfynn6ph.b[3][1]++;
}
}
}
var vert = (cov_tnfynn6ph.s[15]++, new _main.default.Vector(x, y, z));
cov_tnfynn6ph.s[16]++;
this.immediateMode.geometry.vertices.push(vert);
var vertexColor = (cov_tnfynn6ph.s[17]++,
(cov_tnfynn6ph.b[4][0]++, this.curFillColor) ||
(cov_tnfynn6ph.b[4][1]++, [0.5, 0.5, 0.5, 1.0]));
cov_tnfynn6ph.s[18]++;
this.immediateMode.geometry.vertexColors.push(
vertexColor[0],
vertexColor[1],
vertexColor[2],
vertexColor[3]
);
cov_tnfynn6ph.s[19]++;
if (this.textureMode === constants.IMAGE) {
cov_tnfynn6ph.b[5][0]++;
cov_tnfynn6ph.s[20]++;
if (this._tex !== null) {
cov_tnfynn6ph.b[6][0]++;
cov_tnfynn6ph.s[21]++;
if (
(cov_tnfynn6ph.b[8][0]++, this._tex.width > 0) &&
(cov_tnfynn6ph.b[8][1]++, this._tex.height > 0)
) {
cov_tnfynn6ph.b[7][0]++;
cov_tnfynn6ph.s[22]++;
u /= this._tex.width;
cov_tnfynn6ph.s[23]++;
v /= this._tex.height;
} else {
cov_tnfynn6ph.b[7][1]++;
}
} else {
cov_tnfynn6ph.b[6][1]++;
cov_tnfynn6ph.s[24]++;
if (
(cov_tnfynn6ph.b[10][0]++, this._tex === null) &&
(cov_tnfynn6ph.b[10][1]++, arguments.length >= 4)
) {
cov_tnfynn6ph.b[9][0]++;
cov_tnfynn6ph.s[25]++;
// Only throw this warning if custom uv's have been provided
console.warn(
'You must first call texture() before using' +
' vertex() with image based u and v coordinates'
);
} else {
cov_tnfynn6ph.b[9][1]++;
}
}
} else {
cov_tnfynn6ph.b[5][1]++;
}
cov_tnfynn6ph.s[26]++;
this.immediateMode.geometry.uvs.push(u, v);
cov_tnfynn6ph.s[27]++;
this.immediateMode._bezierVertex[0] = x;
cov_tnfynn6ph.s[28]++;
this.immediateMode._bezierVertex[1] = y;
cov_tnfynn6ph.s[29]++;
this.immediateMode._bezierVertex[2] = z;
cov_tnfynn6ph.s[30]++;
this.immediateMode._quadraticVertex[0] = x;
cov_tnfynn6ph.s[31]++;
this.immediateMode._quadraticVertex[1] = y;
cov_tnfynn6ph.s[32]++;
this.immediateMode._quadraticVertex[2] = z;
cov_tnfynn6ph.s[33]++;
return this;
};
/**
* End shape drawing and render vertices to screen.
* @chainable
*/ cov_tnfynn6ph.s[34]++;
_main.default.RendererGL.prototype.endShape = function(
mode,
isCurve,
isBezier,
isQuadratic,
isContour,
shapeKind
) {
cov_tnfynn6ph.f[2]++;
cov_tnfynn6ph.s[35]++;
if (this.immediateMode.shapeMode === constants.POINTS) {
cov_tnfynn6ph.b[11][0]++;
cov_tnfynn6ph.s[36]++;
this._drawPoints(
this.immediateMode.geometry.vertices,
this.immediateMode.buffers.point
);
cov_tnfynn6ph.s[37]++;
return this;
} else {
cov_tnfynn6ph.b[11][1]++;
}
cov_tnfynn6ph.s[38]++;
this._processVertices.apply(this, arguments);
cov_tnfynn6ph.s[39]++;
if (this._doFill) {
cov_tnfynn6ph.b[12][0]++;
cov_tnfynn6ph.s[40]++;
if (this.immediateMode.geometry.vertices.length > 1) {
cov_tnfynn6ph.b[13][0]++;
cov_tnfynn6ph.s[41]++;
this._drawImmediateFill();
} else {
cov_tnfynn6ph.b[13][1]++;
}
} else {
cov_tnfynn6ph.b[12][1]++;
}
cov_tnfynn6ph.s[42]++;
if (this._doStroke) {
cov_tnfynn6ph.b[14][0]++;
cov_tnfynn6ph.s[43]++;
if (this.immediateMode.geometry.lineVertices.length > 1) {
cov_tnfynn6ph.b[15][0]++;
cov_tnfynn6ph.s[44]++;
this._drawImmediateStroke();
} else {
cov_tnfynn6ph.b[15][1]++;
}
} else {
cov_tnfynn6ph.b[14][1]++;
}
cov_tnfynn6ph.s[45]++;
this.isBezier = false;
cov_tnfynn6ph.s[46]++;
this.isQuadratic = false;
cov_tnfynn6ph.s[47]++;
this.isCurve = false;
cov_tnfynn6ph.s[48]++;
this.immediateMode._bezierVertex.length = 0;
cov_tnfynn6ph.s[49]++;
this.immediateMode._quadraticVertex.length = 0;
cov_tnfynn6ph.s[50]++;
this.immediateMode._curveVertex.length = 0;
cov_tnfynn6ph.s[51]++;
return this;
};
/**
* Called from endShape(). This function calculates the stroke vertices for custom shapes and
* tesselates shapes when applicable.
* @private
* @param {Number} mode webgl primitives mode. beginShape supports the
* following modes:
* POINTS,LINES,LINE_STRIP,LINE_LOOP,TRIANGLES,
* TRIANGLE_STRIP, TRIANGLE_FAN and TESS(WEBGL only)
*/ cov_tnfynn6ph.s[52]++;
_main.default.RendererGL.prototype._processVertices = function(mode) {
cov_tnfynn6ph.f[3]++;
cov_tnfynn6ph.s[53]++;
if (this.immediateMode.geometry.vertices.length === 0) {
cov_tnfynn6ph.b[16][0]++;
cov_tnfynn6ph.s[54]++;
return;
} else {
cov_tnfynn6ph.b[16][1]++;
}
var calculateStroke = (cov_tnfynn6ph.s[55]++,
(cov_tnfynn6ph.b[17][0]++, this._doStroke) &&
(cov_tnfynn6ph.b[17][1]++, this.drawMode !== constants.TEXTURE));
var shouldClose = (cov_tnfynn6ph.s[56]++, mode === constants.CLOSE);
cov_tnfynn6ph.s[57]++;
if (calculateStroke) {
cov_tnfynn6ph.b[18][0]++;
cov_tnfynn6ph.s[58]++;
this.immediateMode.geometry.edges = this._calculateEdges(
this.immediateMode.shapeMode,
this.immediateMode.geometry.vertices,
shouldClose
);
cov_tnfynn6ph.s[59]++;
this.immediateMode.geometry._edgesToVertices();
} else {
cov_tnfynn6ph.b[18][1]++;
}
// For hollow shapes, user must set mode to TESS
var convexShape = (cov_tnfynn6ph.s[60]++,
this.immediateMode.shapeMode === constants.TESS);
// We tesselate when drawing curves or convex shapes
var shouldTess = (cov_tnfynn6ph.s[61]++,
((cov_tnfynn6ph.b[19][0]++, this.isBezier) ||
(cov_tnfynn6ph.b[19][1]++, this.isQuadratic) ||
(cov_tnfynn6ph.b[19][2]++, this.isCurve) ||
(cov_tnfynn6ph.b[19][3]++, convexShape)) &&
(cov_tnfynn6ph.b[19][4]++, this.immediateMode.shapeMode !== constants.LINES));
cov_tnfynn6ph.s[62]++;
if (shouldTess) {
cov_tnfynn6ph.b[20][0]++;
cov_tnfynn6ph.s[63]++;
this._tesselateShape();
} else {
cov_tnfynn6ph.b[20][1]++;
}
};
/**
* Called from _processVertices(). This function calculates the stroke vertices for custom shapes and
* tesselates shapes when applicable.
* @private
* @returns {Array[Number]} indices for custom shape vertices indicating edges.
*/ cov_tnfynn6ph.s[64]++;
_main.default.RendererGL.prototype._calculateEdges = function(
shapeMode,
verts,
shouldClose
) {
cov_tnfynn6ph.f[4]++;
var res = (cov_tnfynn6ph.s[65]++, []);
var i = (cov_tnfynn6ph.s[66]++, 0);
cov_tnfynn6ph.s[67]++;
switch (shapeMode) {
case constants.TRIANGLE_STRIP:
cov_tnfynn6ph.b[21][0]++;
cov_tnfynn6ph.s[68]++;
for (i = 0; i < verts.length - 2; i++) {
cov_tnfynn6ph.s[69]++;
res.push([i, i + 1]);
cov_tnfynn6ph.s[70]++;
res.push([i, i + 2]);
}
cov_tnfynn6ph.s[71]++;
res.push([i, i + 1]);
cov_tnfynn6ph.s[72]++;
break;
case constants.TRIANGLES:
cov_tnfynn6ph.b[21][1]++;
cov_tnfynn6ph.s[73]++;
for (i = 0; i < verts.length - 2; i = i + 3) {
cov_tnfynn6ph.s[74]++;
res.push([i, i + 1]);
cov_tnfynn6ph.s[75]++;
res.push([i + 1, i + 2]);
cov_tnfynn6ph.s[76]++;
res.push([i + 2, i]);
}
cov_tnfynn6ph.s[77]++;
break;
case constants.LINES:
cov_tnfynn6ph.b[21][2]++;
cov_tnfynn6ph.s[78]++;
for (i = 0; i < verts.length - 1; i = i + 2) {
cov_tnfynn6ph.s[79]++;
res.push([i, i + 1]);
}
cov_tnfynn6ph.s[80]++;
break;
default:
cov_tnfynn6ph.b[21][3]++;
cov_tnfynn6ph.s[81]++;
for (i = 0; i < verts.length - 1; i++) {
cov_tnfynn6ph.s[82]++;
res.push([i, i + 1]);
}
cov_tnfynn6ph.s[83]++;
break;
}
cov_tnfynn6ph.s[84]++;
if (shouldClose) {
cov_tnfynn6ph.b[22][0]++;
cov_tnfynn6ph.s[85]++;
res.push([verts.length - 1, 0]);
} else {
cov_tnfynn6ph.b[22][1]++;
}
cov_tnfynn6ph.s[86]++;
return res;
};
/**
* Called from _processVertices() when applicable. This function tesselates immediateMode.geometry.
* @private
*/ cov_tnfynn6ph.s[87]++;
_main.default.RendererGL.prototype._tesselateShape = function() {
cov_tnfynn6ph.f[5]++;
cov_tnfynn6ph.s[88]++;
this.immediateMode.shapeMode = constants.TRIANGLES;
var contours = (cov_tnfynn6ph.s[89]++,
[new Float32Array(this._vToNArray(this.immediateMode.geometry.vertices))]);
var polyTriangles = (cov_tnfynn6ph.s[90]++, this._triangulate(contours));
cov_tnfynn6ph.s[91]++;
this.immediateMode.geometry.vertices = [];
cov_tnfynn6ph.s[92]++;
for (
var j = (cov_tnfynn6ph.s[93]++, 0),
polyTriLength = (cov_tnfynn6ph.s[94]++, polyTriangles.length);
j < polyTriLength;
j = j + 3
) {
cov_tnfynn6ph.s[95]++;
this.vertex(polyTriangles[j], polyTriangles[j + 1], polyTriangles[j + 2]);
}
};
/**
* Called from endShape(). Responsible for calculating normals, setting shader uniforms,
* enabling all appropriate buffers, applying color blend, and drawing the fill geometry.
* @private
*/ cov_tnfynn6ph.s[96]++;
_main.default.RendererGL.prototype._drawImmediateFill = function() {
cov_tnfynn6ph.f[6]++;
var gl = (cov_tnfynn6ph.s[97]++, this.GL);
var shader = (cov_tnfynn6ph.s[98]++, this._getImmediateFillShader());
cov_tnfynn6ph.s[99]++;
this._calculateNormals(this.immediateMode.geometry);
cov_tnfynn6ph.s[100]++;
this._setFillUniforms(shader);
cov_tnfynn6ph.s[101]++;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (
var _iterator = this.immediateMode.buffers.fill[Symbol.iterator](), _step;
!(_iteratorNormalCompletion = (_step = _iterator.next()).done);
_iteratorNormalCompletion = true
) {
var buff = _step.value;
cov_tnfynn6ph.s[102]++;
buff._prepareBuffer(this.immediateMode.geometry, shader);
}
// LINE_STRIP and LINES are not used for rendering, instead
// they only indicate a way to modify vertices during the _processVertices() step
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
cov_tnfynn6ph.s[103]++;
if (
(cov_tnfynn6ph.b[24][0]++,
this.immediateMode.shapeMode === constants.LINE_STRIP) ||
(cov_tnfynn6ph.b[24][1]++, this.immediateMode.shapeMode === constants.LINES)
) {
cov_tnfynn6ph.b[23][0]++;
cov_tnfynn6ph.s[104]++;
this.immediateMode.shapeMode = constants.TRIANGLE_FAN;
} else {
cov_tnfynn6ph.b[23][1]++;
}
cov_tnfynn6ph.s[105]++;
this._applyColorBlend(this.curFillColor);
cov_tnfynn6ph.s[106]++;
gl.drawArrays(
this.immediateMode.shapeMode,
0,
this.immediateMode.geometry.vertices.length
);
cov_tnfynn6ph.s[107]++;
shader.unbindShader();
};
/**
* Called from endShape(). Responsible for calculating normals, setting shader uniforms,
* enabling all appropriate buffers, applying color blend, and drawing the stroke geometry.
* @private
*/ cov_tnfynn6ph.s[108]++;
_main.default.RendererGL.prototype._drawImmediateStroke = function() {
cov_tnfynn6ph.f[7]++;
var gl = (cov_tnfynn6ph.s[109]++, this.GL);
var shader = (cov_tnfynn6ph.s[110]++, this._getImmediateStrokeShader());
cov_tnfynn6ph.s[111]++;
this._setStrokeUniforms(shader);
cov_tnfynn6ph.s[112]++;
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (
var _iterator2 = this.immediateMode.buffers.stroke[Symbol.iterator](),
_step2;
!(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done);
_iteratorNormalCompletion2 = true
) {
var buff = _step2.value;
cov_tnfynn6ph.s[113]++;
buff._prepareBuffer(this.immediateMode.geometry, shader);
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
cov_tnfynn6ph.s[114]++;
this._applyColorBlend(this.curStrokeColor);
cov_tnfynn6ph.s[115]++;
gl.drawArrays(gl.TRIANGLES, 0, this.immediateMode.geometry.lineVertices.length);
cov_tnfynn6ph.s[116]++;
shader.unbindShader();
};
/**
* Called from _drawImmediateFill(). Currently adds default normals which
* only work for flat shapes.
* @parem
* @private
*/ cov_tnfynn6ph.s[117]++;
_main.default.RendererGL.prototype._calculateNormals = function(geometry) {
cov_tnfynn6ph.f[8]++;
cov_tnfynn6ph.s[118]++;
geometry.vertices.forEach(function() {
cov_tnfynn6ph.f[9]++;
cov_tnfynn6ph.s[119]++;
geometry.vertexNormals.push(new _main.default.Vector(0, 0, 1));
});
};
var _default = _main.default.RendererGL;
exports.default = _default;
},
{ '../core/constants': 43, '../core/main': 54, './p5.RenderBuffer': 105 }
],
107: [
function(_dereq_, module, exports) {
'use strict';
var cov_smfo8eu7 = (function() {
var path =
'/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.RendererGL.Retained.js';
var hash = '0097c5628da5459f7c8c66d28126ae0c7955d677';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.RendererGL.Retained.js',
statementMap: {
'0': { start: { line: 7, column: 16 }, end: { line: 7, column: 17 } },
'1': { start: { line: 16, column: 0 }, end: { line: 29, column: 2 } },
'2': { start: { line: 17, column: 2 }, end: { line: 17, column: 25 } },
'3': { start: { line: 20, column: 2 }, end: { line: 20, column: 14 } },
'4': { start: { line: 21, column: 2 }, end: { line: 25, column: 3 } },
'5': { start: { line: 22, column: 16 }, end: { line: 22, column: 58 } },
'6': { start: { line: 23, column: 4 }, end: { line: 23, column: 43 } },
'7': { start: { line: 24, column: 4 }, end: { line: 24, column: 16 } },
'8': { start: { line: 28, column: 2 }, end: { line: 28, column: 48 } },
'9': { start: { line: 31, column: 0 }, end: { line: 57, column: 2 } },
'10': { start: { line: 32, column: 18 }, end: { line: 32, column: 49 } },
'11': { start: { line: 33, column: 2 }, end: { line: 35, column: 3 } },
'12': { start: { line: 34, column: 4 }, end: { line: 34, column: 11 } },
'13': { start: { line: 37, column: 2 }, end: { line: 37, column: 41 } },
'14': { start: { line: 38, column: 2 }, end: { line: 38, column: 14 } },
'15': { start: { line: 40, column: 13 }, end: { line: 40, column: 20 } },
'16': { start: { line: 41, column: 2 }, end: { line: 43, column: 3 } },
'17': { start: { line: 42, column: 4 }, end: { line: 42, column: 41 } },
'18': { start: { line: 46, column: 4 }, end: { line: 51, column: 5 } },
'19': { start: { line: 47, column: 6 }, end: { line: 50, column: 7 } },
'20': { start: { line: 48, column: 8 }, end: { line: 48, column: 42 } },
'21': { start: { line: 49, column: 8 }, end: { line: 49, column: 32 } },
'22': { start: { line: 55, column: 2 }, end: { line: 55, column: 48 } },
'23': { start: { line: 56, column: 2 }, end: { line: 56, column: 46 } },
'24': { start: { line: 66, column: 0 }, end: { line: 95, column: 2 } },
'25': { start: { line: 67, column: 13 }, end: { line: 67, column: 20 } },
'26': { start: { line: 69, column: 18 }, end: { line: 69, column: 47 } },
'27': { start: { line: 70, column: 2 }, end: { line: 70, column: 24 } },
'28': { start: { line: 72, column: 20 }, end: { line: 72, column: 39 } },
'29': { start: { line: 74, column: 2 }, end: { line: 90, column: 3 } },
'30': { start: { line: 76, column: 4 }, end: { line: 76, column: 76 } },
'31': { start: { line: 76, column: 22 }, end: { line: 76, column: 76 } },
'32': { start: { line: 77, column: 17 }, end: { line: 77, column: 62 } },
'33': { start: { line: 78, column: 4 }, end: { line: 78, column: 78 } },
'34': { start: { line: 81, column: 4 }, end: { line: 81, column: 49 } },
'35': { start: { line: 84, column: 4 }, end: { line: 87, column: 5 } },
'36': { start: { line: 85, column: 6 }, end: { line: 85, column: 35 } },
'37': { start: { line: 86, column: 6 }, end: { line: 86, column: 33 } },
'38': { start: { line: 89, column: 4 }, end: { line: 89, column: 69 } },
'39': { start: { line: 92, column: 2 }, end: { line: 92, column: 79 } },
'40': { start: { line: 94, column: 2 }, end: { line: 94, column: 17 } },
'41': { start: { line: 103, column: 0 }, end: { line: 133, column: 2 } },
'42': { start: { line: 104, column: 13 }, end: { line: 104, column: 20 } },
'43': { start: { line: 105, column: 19 }, end: { line: 105, column: 50 } },
'44': { start: { line: 107, column: 2 }, end: { line: 116, column: 3 } },
'45': { start: { line: 108, column: 25 }, end: { line: 108, column: 56 } },
'46': { start: { line: 109, column: 4 }, end: { line: 109, column: 42 } },
'47': { start: { line: 110, column: 4 }, end: { line: 112, column: 5 } },
'48': { start: { line: 111, column: 6 }, end: { line: 111, column: 50 } },
'49': { start: { line: 113, column: 4 }, end: { line: 113, column: 47 } },
'50': { start: { line: 114, column: 4 }, end: { line: 114, column: 40 } },
'51': { start: { line: 115, column: 4 }, end: { line: 115, column: 32 } },
'52': { start: { line: 118, column: 2 }, end: { line: 131, column: 3 } },
'53': { start: { line: 119, column: 23 }, end: { line: 119, column: 52 } },
'54': { start: { line: 120, column: 4 }, end: { line: 120, column: 38 } },
'55': { start: { line: 121, column: 4 }, end: { line: 123, column: 5 } },
'56': { start: { line: 122, column: 6 }, end: { line: 122, column: 48 } },
'57': { start: { line: 124, column: 4 }, end: { line: 127, column: 5 } },
'58': { start: { line: 126, column: 6 }, end: { line: 126, column: 70 } },
'59': { start: { line: 128, column: 4 }, end: { line: 128, column: 45 } },
'60': { start: { line: 129, column: 4 }, end: { line: 129, column: 42 } },
'61': { start: { line: 130, column: 4 }, end: { line: 130, column: 30 } },
'62': { start: { line: 132, column: 2 }, end: { line: 132, column: 14 } },
'63': { start: { line: 150, column: 0 }, end: { line: 163, column: 2 } },
'64': { start: { line: 156, column: 20 }, end: { line: 156, column: 41 } },
'65': { start: { line: 157, column: 2 }, end: { line: 162, column: 3 } },
'66': { start: { line: 158, column: 4 }, end: { line: 158, column: 49 } },
'67': { start: { line: 159, column: 4 }, end: { line: 159, column: 26 } },
'68': { start: { line: 161, column: 4 }, end: { line: 161, column: 31 } },
'69': { start: { line: 165, column: 0 }, end: { line: 172, column: 2 } },
'70': { start: { line: 166, column: 2 }, end: { line: 170, column: 4 } },
'71': { start: { line: 171, column: 2 }, end: { line: 171, column: 14 } },
'72': { start: { line: 174, column: 0 }, end: { line: 185, column: 2 } },
'73': { start: { line: 175, column: 18 }, end: { line: 175, column: 49 } },
'74': { start: { line: 176, column: 13 }, end: { line: 176, column: 20 } },
'75': { start: { line: 178, column: 2 }, end: { line: 184, column: 3 } },
'76': { start: { line: 180, column: 4 }, end: { line: 180, column: 77 } },
'77': { start: { line: 183, column: 4 }, end: { line: 183, column: 68 } },
'78': { start: { line: 187, column: 0 }, end: { line: 205, column: 2 } },
'79': { start: { line: 188, column: 13 }, end: { line: 188, column: 20 } },
'80': { start: { line: 189, column: 22 }, end: { line: 189, column: 53 } },
'81': { start: { line: 190, column: 2 }, end: { line: 190, column: 38 } },
'82': { start: { line: 192, column: 2 }, end: { line: 198, column: 4 } },
'83': { start: { line: 200, column: 2 }, end: { line: 200, column: 64 } },
'84': { start: { line: 202, column: 2 }, end: { line: 202, column: 47 } },
'85': { start: { line: 204, column: 2 }, end: { line: 204, column: 29 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 16, column: 46 }, end: { line: 16, column: 47 } },
loc: { start: { line: 16, column: 60 }, end: { line: 29, column: 1 } },
line: 16
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 31, column: 39 }, end: { line: 31, column: 40 } },
loc: { start: { line: 31, column: 53 }, end: { line: 57, column: 1 } },
line: 31
},
'2': {
name: 'freeBuffers',
decl: { start: { line: 45, column: 11 }, end: { line: 45, column: 22 } },
loc: { start: { line: 45, column: 29 }, end: { line: 52, column: 3 } },
line: 45
},
'3': {
name: '(anonymous_3)',
decl: { start: { line: 66, column: 40 }, end: { line: 66, column: 41 } },
loc: { start: { line: 66, column: 61 }, end: { line: 95, column: 1 } },
line: 66
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 103, column: 38 },
end: { line: 103, column: 39 }
},
loc: { start: { line: 103, column: 52 }, end: { line: 133, column: 1 } },
line: 103
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 150, column: 44 },
end: { line: 150, column: 45 }
},
loc: { start: { line: 155, column: 2 }, end: { line: 163, column: 1 } },
line: 155
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 165, column: 38 },
end: { line: 165, column: 39 }
},
loc: { start: { line: 165, column: 62 }, end: { line: 172, column: 1 } },
line: 165
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 174, column: 40 },
end: { line: 174, column: 41 }
},
loc: { start: { line: 174, column: 64 }, end: { line: 185, column: 1 } },
line: 174
},
'8': {
name: '(anonymous_8)',
decl: {
start: { line: 187, column: 38 },
end: { line: 187, column: 39 }
},
loc: { start: { line: 187, column: 71 }, end: { line: 205, column: 1 } },
line: 187
}
},
branchMap: {
'0': {
loc: { start: { line: 21, column: 2 }, end: { line: 25, column: 3 } },
type: 'if',
locations: [
{ start: { line: 21, column: 2 }, end: { line: 25, column: 3 } },
{ start: { line: 21, column: 2 }, end: { line: 25, column: 3 } }
],
line: 21
},
'1': {
loc: { start: { line: 33, column: 2 }, end: { line: 35, column: 3 } },
type: 'if',
locations: [
{ start: { line: 33, column: 2 }, end: { line: 35, column: 3 } },
{ start: { line: 33, column: 2 }, end: { line: 35, column: 3 } }
],
line: 33
},
'2': {
loc: { start: { line: 41, column: 2 }, end: { line: 43, column: 3 } },
type: 'if',
locations: [
{ start: { line: 41, column: 2 }, end: { line: 43, column: 3 } },
{ start: { line: 41, column: 2 }, end: { line: 43, column: 3 } }
],
line: 41
},
'3': {
loc: { start: { line: 47, column: 6 }, end: { line: 50, column: 7 } },
type: 'if',
locations: [
{ start: { line: 47, column: 6 }, end: { line: 50, column: 7 } },
{ start: { line: 47, column: 6 }, end: { line: 50, column: 7 } }
],
line: 47
},
'4': {
loc: { start: { line: 74, column: 2 }, end: { line: 90, column: 3 } },
type: 'if',
locations: [
{ start: { line: 74, column: 2 }, end: { line: 90, column: 3 } },
{ start: { line: 74, column: 2 }, end: { line: 90, column: 3 } }
],
line: 74
},
'5': {
loc: { start: { line: 76, column: 4 }, end: { line: 76, column: 76 } },
type: 'if',
locations: [
{ start: { line: 76, column: 4 }, end: { line: 76, column: 76 } },
{ start: { line: 76, column: 4 }, end: { line: 76, column: 76 } }
],
line: 76
},
'6': {
loc: { start: { line: 84, column: 4 }, end: { line: 87, column: 5 } },
type: 'if',
locations: [
{ start: { line: 84, column: 4 }, end: { line: 87, column: 5 } },
{ start: { line: 84, column: 4 }, end: { line: 87, column: 5 } }
],
line: 84
},
'7': {
loc: { start: { line: 89, column: 26 }, end: { line: 89, column: 68 } },
type: 'cond-expr',
locations: [
{ start: { line: 89, column: 43 }, end: { line: 89, column: 64 } },
{ start: { line: 89, column: 67 }, end: { line: 89, column: 68 } }
],
line: 89
},
'8': {
loc: { start: { line: 92, column: 28 }, end: { line: 92, column: 78 } },
type: 'cond-expr',
locations: [
{ start: { line: 92, column: 49 }, end: { line: 92, column: 74 } },
{ start: { line: 92, column: 77 }, end: { line: 92, column: 78 } }
],
line: 92
},
'9': {
loc: { start: { line: 107, column: 2 }, end: { line: 116, column: 3 } },
type: 'if',
locations: [
{ start: { line: 107, column: 2 }, end: { line: 116, column: 3 } },
{ start: { line: 107, column: 2 }, end: { line: 116, column: 3 } }
],
line: 107
},
'10': {
loc: { start: { line: 107, column: 6 }, end: { line: 107, column: 52 } },
type: 'binary-expr',
locations: [
{ start: { line: 107, column: 6 }, end: { line: 107, column: 20 } },
{ start: { line: 107, column: 24 }, end: { line: 107, column: 52 } }
],
line: 107
},
'11': {
loc: { start: { line: 118, column: 2 }, end: { line: 131, column: 3 } },
type: 'if',
locations: [
{ start: { line: 118, column: 2 }, end: { line: 131, column: 3 } },
{ start: { line: 118, column: 2 }, end: { line: 131, column: 3 } }
],
line: 118
},
'12': {
loc: { start: { line: 124, column: 4 }, end: { line: 127, column: 5 } },
type: 'if',
locations: [
{ start: { line: 124, column: 4 }, end: { line: 127, column: 5 } },
{ start: { line: 124, column: 4 }, end: { line: 127, column: 5 } }
],
line: 124
},
'13': {
loc: { start: { line: 178, column: 2 }, end: { line: 184, column: 3 } },
type: 'if',
locations: [
{ start: { line: 178, column: 2 }, end: { line: 184, column: 3 } },
{ start: { line: 178, column: 2 }, end: { line: 184, column: 3 } }
],
line: 178
},
'14': {
loc: { start: { line: 183, column: 18 }, end: { line: 183, column: 42 } },
type: 'binary-expr',
locations: [
{ start: { line: 183, column: 18 }, end: { line: 183, column: 26 } },
{ start: { line: 183, column: 30 }, end: { line: 183, column: 42 } }
],
line: 183
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0
},
f: { '0': 0, '1': 0, '2': 0, '3': 0, '4': 0, '5': 0, '6': 0, '7': 0, '8': 0 },
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '0097c5628da5459f7c8c66d28126ae0c7955d677'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
_dereq_('./p5.RendererGL');
_dereq_('./p5.RenderBuffer');
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
var hashCount = (cov_smfo8eu7.s[0]++, 0);
/**
* _initBufferDefaults
* @private
* @description initializes buffer defaults. runs each time a new geometry is
* registered
* @param {String} gId key of the geometry object
* @returns {Object} a new buffer object
*/ cov_smfo8eu7.s[1]++;
_main.default.RendererGL.prototype._initBufferDefaults = function(gId) {
cov_smfo8eu7.f[0]++;
cov_smfo8eu7.s[2]++;
this._freeBuffers(gId);
//@TODO remove this limit on hashes in retainedMode.geometry
cov_smfo8eu7.s[3]++;
hashCount++;
cov_smfo8eu7.s[4]++;
if (hashCount > 1000) {
cov_smfo8eu7.b[0][0]++;
var key = (cov_smfo8eu7.s[5]++, Object.keys(this.retainedMode.geometry)[0]);
cov_smfo8eu7.s[6]++;
delete this.retainedMode.geometry[key];
cov_smfo8eu7.s[7]++;
hashCount--;
} else {
cov_smfo8eu7.b[0][1]++;
}
//create a new entry in our retainedMode.geometry
cov_smfo8eu7.s[8]++;
return (this.retainedMode.geometry[gId] = {});
};
cov_smfo8eu7.s[9]++;
_main.default.RendererGL.prototype._freeBuffers = function(gId) {
cov_smfo8eu7.f[1]++;
var buffers = (cov_smfo8eu7.s[10]++, this.retainedMode.geometry[gId]);
cov_smfo8eu7.s[11]++;
if (!buffers) {
cov_smfo8eu7.b[1][0]++;
cov_smfo8eu7.s[12]++;
return;
} else {
cov_smfo8eu7.b[1][1]++;
}
cov_smfo8eu7.s[13]++;
delete this.retainedMode.geometry[gId];
cov_smfo8eu7.s[14]++;
hashCount--;
var gl = (cov_smfo8eu7.s[15]++, this.GL);
cov_smfo8eu7.s[16]++;
if (buffers.indexBuffer) {
cov_smfo8eu7.b[2][0]++;
cov_smfo8eu7.s[17]++;
gl.deleteBuffer(buffers.indexBuffer);
} else {
cov_smfo8eu7.b[2][1]++;
}
function freeBuffers(defs) {
cov_smfo8eu7.f[2]++;
cov_smfo8eu7.s[18]++;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (
var _iterator = defs[Symbol.iterator](), _step;
!(_iteratorNormalCompletion = (_step = _iterator.next()).done);
_iteratorNormalCompletion = true
) {
var def = _step.value;
cov_smfo8eu7.s[19]++;
if (buffers[def.dst]) {
cov_smfo8eu7.b[3][0]++;
cov_smfo8eu7.s[20]++;
gl.deleteBuffer(buffers[def.dst]);
cov_smfo8eu7.s[21]++;
buffers[def.dst] = null;
} else {
cov_smfo8eu7.b[3][1]++;
}
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
}
// free all the buffers
cov_smfo8eu7.s[22]++;
freeBuffers(this.retainedMode.buffers.stroke);
cov_smfo8eu7.s[23]++;
freeBuffers(this.retainedMode.buffers.fill);
};
/**
* creates a buffers object that holds the WebGL render buffers
* for a geometry.
* @private
* @param {String} gId key of the geometry object
* @param {p5.Geometry} model contains geometry data
*/ cov_smfo8eu7.s[24]++;
_main.default.RendererGL.prototype.createBuffers = function(gId, model) {
cov_smfo8eu7.f[3]++;
var gl = (cov_smfo8eu7.s[25]++, this.GL);
//initialize the gl buffers for our geom groups
var buffers = (cov_smfo8eu7.s[26]++, this._initBufferDefaults(gId));
cov_smfo8eu7.s[27]++;
buffers.model = model;
var indexBuffer = (cov_smfo8eu7.s[28]++, buffers.indexBuffer);
cov_smfo8eu7.s[29]++;
if (model.faces.length) {
cov_smfo8eu7.b[4][0]++;
cov_smfo8eu7.s[30]++;
// allocate space for faces
if (!indexBuffer) {
cov_smfo8eu7.b[5][0]++;
cov_smfo8eu7.s[31]++;
indexBuffer = buffers.indexBuffer = gl.createBuffer();
} else {
cov_smfo8eu7.b[5][1]++;
}
var vals = (cov_smfo8eu7.s[32]++,
_main.default.RendererGL.prototype._flatten(model.faces));
cov_smfo8eu7.s[33]++;
this._bindBuffer(indexBuffer, gl.ELEMENT_ARRAY_BUFFER, vals, Uint16Array);
// the vertex count is based on the number of faces
cov_smfo8eu7.s[34]++;
buffers.vertexCount = model.faces.length * 3;
} else {
cov_smfo8eu7.b[4][1]++;
cov_smfo8eu7.s[35]++;
// the index buffer is unused, remove it
if (indexBuffer) {
cov_smfo8eu7.b[6][0]++;
cov_smfo8eu7.s[36]++;
gl.deleteBuffer(indexBuffer);
cov_smfo8eu7.s[37]++;
buffers.indexBuffer = null;
} else {
cov_smfo8eu7.b[6][1]++;
}
// the vertex count comes directly from the model
cov_smfo8eu7.s[38]++;
buffers.vertexCount = model.vertices
? (cov_smfo8eu7.b[7][0]++, model.vertices.length)
: (cov_smfo8eu7.b[7][1]++, 0);
}
cov_smfo8eu7.s[39]++;
buffers.lineVertexCount = model.lineVertices
? (cov_smfo8eu7.b[8][0]++, model.lineVertices.length)
: (cov_smfo8eu7.b[8][1]++, 0);
cov_smfo8eu7.s[40]++;
return buffers;
};
/**
* Draws buffers given a geometry key ID
* @private
* @param {String} gId ID in our geom hash
* @chainable
*/ cov_smfo8eu7.s[41]++;
_main.default.RendererGL.prototype.drawBuffers = function(gId) {
cov_smfo8eu7.f[4]++;
var gl = (cov_smfo8eu7.s[42]++, this.GL);
var geometry = (cov_smfo8eu7.s[43]++, this.retainedMode.geometry[gId]);
cov_smfo8eu7.s[44]++;
if (
(cov_smfo8eu7.b[10][0]++, this._doStroke) &&
(cov_smfo8eu7.b[10][1]++, geometry.lineVertexCount > 0)
) {
cov_smfo8eu7.b[9][0]++;
var strokeShader = (cov_smfo8eu7.s[45]++, this._getRetainedStrokeShader());
cov_smfo8eu7.s[46]++;
this._setStrokeUniforms(strokeShader);
cov_smfo8eu7.s[47]++;
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (
var _iterator2 = this.retainedMode.buffers.stroke[Symbol.iterator](),
_step2;
!(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done);
_iteratorNormalCompletion2 = true
) {
var buff = _step2.value;
cov_smfo8eu7.s[48]++;
buff._prepareBuffer(geometry, strokeShader);
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
cov_smfo8eu7.s[49]++;
this._applyColorBlend(this.curStrokeColor);
cov_smfo8eu7.s[50]++;
this._drawArrays(gl.TRIANGLES, gId);
cov_smfo8eu7.s[51]++;
strokeShader.unbindShader();
} else {
cov_smfo8eu7.b[9][1]++;
}
cov_smfo8eu7.s[52]++;
if (this._doFill) {
cov_smfo8eu7.b[11][0]++;
var fillShader = (cov_smfo8eu7.s[53]++, this._getRetainedFillShader());
cov_smfo8eu7.s[54]++;
this._setFillUniforms(fillShader);
cov_smfo8eu7.s[55]++;
var _iteratorNormalCompletion3 = true;
var _didIteratorError3 = false;
var _iteratorError3 = undefined;
try {
for (
var _iterator3 = this.retainedMode.buffers.fill[Symbol.iterator](),
_step3;
!(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done);
_iteratorNormalCompletion3 = true
) {
var _buff = _step3.value;
cov_smfo8eu7.s[56]++;
_buff._prepareBuffer(geometry, fillShader);
}
} catch (err) {
_didIteratorError3 = true;
_iteratorError3 = err;
} finally {
try {
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
_iterator3.return();
}
} finally {
if (_didIteratorError3) {
throw _iteratorError3;
}
}
}
cov_smfo8eu7.s[57]++;
if (geometry.indexBuffer) {
cov_smfo8eu7.b[12][0]++;
cov_smfo8eu7.s[58]++;
//vertex index buffer
this._bindBuffer(geometry.indexBuffer, gl.ELEMENT_ARRAY_BUFFER);
} else {
cov_smfo8eu7.b[12][1]++;
}
cov_smfo8eu7.s[59]++;
this._applyColorBlend(this.curFillColor);
cov_smfo8eu7.s[60]++;
this._drawElements(gl.TRIANGLES, gId);
cov_smfo8eu7.s[61]++;
fillShader.unbindShader();
} else {
cov_smfo8eu7.b[11][1]++;
}
cov_smfo8eu7.s[62]++;
return this;
};
/**
* Calls drawBuffers() with a scaled model/view matrix.
*
* This is used by various 3d primitive methods (in primitives.js, eg. plane,
* box, torus, etc...) to allow caching of un-scaled geometries. Those
* geometries are generally created with unit-length dimensions, cached as
* such, and then scaled appropriately in this method prior to rendering.
*
* @private
* @method drawBuffersScaled
* @param {String} gId ID in our geom hash
* @param {Number} scaleX the amount to scale in the X direction
* @param {Number} scaleY the amount to scale in the Y direction
* @param {Number} scaleZ the amount to scale in the Z direction
*/ cov_smfo8eu7.s[63]++;
_main.default.RendererGL.prototype.drawBuffersScaled = function(
gId,
scaleX,
scaleY,
scaleZ
) {
cov_smfo8eu7.f[5]++;
var uMVMatrix = (cov_smfo8eu7.s[64]++, this.uMVMatrix.copy());
cov_smfo8eu7.s[65]++;
try {
cov_smfo8eu7.s[66]++;
this.uMVMatrix.scale(scaleX, scaleY, scaleZ);
cov_smfo8eu7.s[67]++;
this.drawBuffers(gId);
} finally {
cov_smfo8eu7.s[68]++;
this.uMVMatrix = uMVMatrix;
}
};
cov_smfo8eu7.s[69]++;
_main.default.RendererGL.prototype._drawArrays = function(drawMode, gId) {
cov_smfo8eu7.f[6]++;
cov_smfo8eu7.s[70]++;
this.GL.drawArrays(
drawMode,
0,
this.retainedMode.geometry[gId].lineVertexCount
);
cov_smfo8eu7.s[71]++;
return this;
};
cov_smfo8eu7.s[72]++;
_main.default.RendererGL.prototype._drawElements = function(drawMode, gId) {
cov_smfo8eu7.f[7]++;
var buffers = (cov_smfo8eu7.s[73]++, this.retainedMode.geometry[gId]);
var gl = (cov_smfo8eu7.s[74]++, this.GL);
// render the fill
cov_smfo8eu7.s[75]++;
if (buffers.indexBuffer) {
cov_smfo8eu7.b[13][0]++;
cov_smfo8eu7.s[76]++;
// we're drawing faces
gl.drawElements(gl.TRIANGLES, buffers.vertexCount, gl.UNSIGNED_SHORT, 0);
} else {
cov_smfo8eu7.b[13][1]++;
cov_smfo8eu7.s[77]++;
// drawing vertices
gl.drawArrays(
(cov_smfo8eu7.b[14][0]++, drawMode) ||
(cov_smfo8eu7.b[14][1]++, gl.TRIANGLES),
0,
buffers.vertexCount
);
}
};
cov_smfo8eu7.s[78]++;
_main.default.RendererGL.prototype._drawPoints = function(
vertices,
vertexBuffer
) {
cov_smfo8eu7.f[8]++;
var gl = (cov_smfo8eu7.s[79]++, this.GL);
var pointShader = (cov_smfo8eu7.s[80]++, this._getImmediatePointShader());
cov_smfo8eu7.s[81]++;
this._setPointUniforms(pointShader);
cov_smfo8eu7.s[82]++;
this._bindBuffer(
vertexBuffer,
gl.ARRAY_BUFFER,
this._vToNArray(vertices),
Float32Array,
gl.STATIC_DRAW
);
cov_smfo8eu7.s[83]++;
pointShader.enableAttrib(pointShader.attributes.aPosition, 3);
cov_smfo8eu7.s[84]++;
gl.drawArrays(gl.Points, 0, vertices.length);
cov_smfo8eu7.s[85]++;
pointShader.unbindShader();
};
var _default = _main.default.RendererGL;
exports.default = _default;
},
{ '../core/main': 54, './p5.RenderBuffer': 105, './p5.RendererGL': 108 }
],
108: [
function(_dereq_, module, exports) {
'use strict';
function _typeof(obj) {
if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj &&
typeof Symbol === 'function' &&
obj.constructor === Symbol &&
obj !== Symbol.prototype
? 'symbol'
: typeof obj;
};
}
return _typeof(obj);
}
var cov_1rqo8cuxsf = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.RendererGL.js';
var hash = 'ef82bd075bafd7a3e0cc824799040b0f1e4c96e7';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.RendererGL.js',
statementMap: {
'0': { start: { line: 11, column: 23 }, end: { line: 14, column: 1 } },
'1': { start: { line: 16, column: 23 }, end: { line: 49, column: 1 } },
'2': { start: { line: 60, column: 0 }, end: { line: 223, column: 2 } },
'3': { start: { line: 61, column: 2 }, end: { line: 61, column: 51 } },
'4': { start: { line: 62, column: 2 }, end: { line: 62, column: 36 } },
'5': { start: { line: 63, column: 2 }, end: { line: 63, column: 22 } },
'6': { start: { line: 64, column: 2 }, end: { line: 64, column: 20 } },
'7': { start: { line: 68, column: 2 }, end: { line: 68, column: 32 } },
'8': { start: { line: 69, column: 2 }, end: { line: 69, column: 66 } },
'9': { start: { line: 72, column: 2 }, end: { line: 72, column: 26 } },
'10': { start: { line: 75, column: 2 }, end: { line: 75, column: 31 } },
'11': { start: { line: 77, column: 2 }, end: { line: 77, column: 31 } },
'12': { start: { line: 78, column: 2 }, end: { line: 78, column: 34 } },
'13': { start: { line: 80, column: 2 }, end: { line: 80, column: 39 } },
'14': { start: { line: 81, column: 2 }, end: { line: 81, column: 42 } },
'15': { start: { line: 82, column: 2 }, end: { line: 82, column: 43 } },
'16': { start: { line: 84, column: 2 }, end: { line: 84, column: 32 } },
'17': { start: { line: 85, column: 2 }, end: { line: 85, column: 36 } },
'18': { start: { line: 86, column: 2 }, end: { line: 86, column: 37 } },
'19': { start: { line: 88, column: 2 }, end: { line: 88, column: 31 } },
'20': { start: { line: 89, column: 2 }, end: { line: 89, column: 32 } },
'21': { start: { line: 90, column: 2 }, end: { line: 90, column: 35 } },
'22': { start: { line: 91, column: 2 }, end: { line: 91, column: 36 } },
'23': { start: { line: 92, column: 2 }, end: { line: 92, column: 27 } },
'24': { start: { line: 93, column: 2 }, end: { line: 93, column: 26 } },
'25': { start: { line: 95, column: 2 }, end: { line: 95, column: 33 } },
'26': { start: { line: 97, column: 2 }, end: { line: 97, column: 59 } },
'27': { start: { line: 98, column: 2 }, end: { line: 98, column: 63 } },
'28': { start: { line: 100, column: 2 }, end: { line: 100, column: 38 } },
'29': { start: { line: 101, column: 2 }, end: { line: 101, column: 36 } },
'30': { start: { line: 102, column: 2 }, end: { line: 102, column: 59 } },
'31': { start: { line: 103, column: 2 }, end: { line: 103, column: 27 } },
'32': { start: { line: 105, column: 2 }, end: { line: 105, column: 36 } },
'33': { start: { line: 106, column: 2 }, end: { line: 106, column: 36 } },
'34': { start: { line: 107, column: 2 }, end: { line: 107, column: 34 } },
'35': { start: { line: 108, column: 2 }, end: { line: 108, column: 25 } },
'36': { start: { line: 110, column: 2 }, end: { line: 110, column: 36 } },
'37': { start: { line: 113, column: 2 }, end: { line: 113, column: 31 } },
'38': { start: { line: 114, column: 2 }, end: { line: 114, column: 29 } },
'39': { start: { line: 115, column: 2 }, end: { line: 115, column: 32 } },
'40': { start: { line: 121, column: 2 }, end: { line: 121, column: 35 } },
'41': { start: { line: 122, column: 2 }, end: { line: 122, column: 34 } },
'42': { start: { line: 123, column: 2 }, end: { line: 123, column: 40 } },
'43': { start: { line: 126, column: 2 }, end: { line: 126, column: 40 } },
'44': { start: { line: 127, column: 2 }, end: { line: 127, column: 50 } },
'45': { start: { line: 128, column: 2 }, end: { line: 128, column: 38 } },
'46': { start: { line: 130, column: 2 }, end: { line: 130, column: 39 } },
'47': { start: { line: 131, column: 2 }, end: { line: 131, column: 47 } },
'48': { start: { line: 132, column: 2 }, end: { line: 132, column: 40 } },
'49': { start: { line: 133, column: 2 }, end: { line: 133, column: 39 } },
'50': { start: { line: 134, column: 2 }, end: { line: 134, column: 39 } },
'51': { start: { line: 136, column: 2 }, end: { line: 136, column: 34 } },
'52': { start: { line: 137, column: 2 }, end: { line: 137, column: 36 } },
'53': { start: { line: 138, column: 2 }, end: { line: 138, column: 35 } },
'54': { start: { line: 142, column: 2 }, end: { line: 165, column: 4 } },
'55': { start: { line: 169, column: 2 }, end: { line: 191, column: 4 } },
'56': { start: { line: 193, column: 2 }, end: { line: 193, column: 23 } },
'57': { start: { line: 194, column: 2 }, end: { line: 194, column: 27 } },
'58': { start: { line: 197, column: 2 }, end: { line: 197, column: 21 } },
'59': { start: { line: 199, column: 2 }, end: { line: 199, column: 37 } },
'60': { start: { line: 201, column: 2 }, end: { line: 201, column: 38 } },
'61': { start: { line: 202, column: 2 }, end: { line: 202, column: 38 } },
'62': { start: { line: 203, column: 2 }, end: { line: 203, column: 19 } },
'63': { start: { line: 204, column: 2 }, end: { line: 204, column: 27 } },
'64': { start: { line: 207, column: 2 }, end: { line: 207, column: 31 } },
'65': { start: { line: 209, column: 2 }, end: { line: 209, column: 34 } },
'66': { start: { line: 212, column: 2 }, end: { line: 212, column: 28 } },
'67': { start: { line: 214, column: 2 }, end: { line: 214, column: 31 } },
'68': { start: { line: 216, column: 2 }, end: { line: 216, column: 34 } },
'69': { start: { line: 218, column: 2 }, end: { line: 218, column: 22 } },
'70': { start: { line: 220, column: 2 }, end: { line: 220, column: 30 } },
'71': { start: { line: 222, column: 2 }, end: { line: 222, column: 14 } },
'72': { start: { line: 225, column: 0 }, end: { line: 225, column: 63 } },
'73': { start: { line: 231, column: 0 }, end: { line: 249, column: 2 } },
'74': { start: { line: 233, column: 18 }, end: { line: 233, column: 70 } },
'75': { start: { line: 234, column: 19 }, end: { line: 242, column: 3 } },
'76': { start: { line: 243, column: 2 }, end: { line: 247, column: 3 } },
'77': { start: { line: 244, column: 4 }, end: { line: 244, column: 35 } },
'78': { start: { line: 246, column: 4 }, end: { line: 246, column: 71 } },
'79': { start: { line: 248, column: 2 }, end: { line: 248, column: 9 } },
'80': { start: { line: 251, column: 0 }, end: { line: 270, column: 2 } },
'81': { start: { line: 252, column: 2 }, end: { line: 269, column: 3 } },
'82': { start: { line: 253, column: 4 }, end: { line: 255, column: 78 } },
'83': { start: { line: 256, column: 4 }, end: { line: 266, column: 5 } },
'84': { start: { line: 257, column: 6 }, end: { line: 257, column: 54 } },
'85': { start: { line: 259, column: 17 }, end: { line: 259, column: 36 } },
'86': { start: { line: 260, column: 6 }, end: { line: 260, column: 31 } },
'87': { start: { line: 261, column: 6 }, end: { line: 261, column: 30 } },
'88': { start: { line: 262, column: 6 }, end: { line: 262, column: 71 } },
'89': { start: { line: 263, column: 6 }, end: { line: 265, column: 8 } },
'90': { start: { line: 268, column: 4 }, end: { line: 268, column: 13 } },
'91': { start: { line: 275, column: 0 }, end: { line: 325, column: 2 } },
'92': { start: { line: 276, column: 12 }, end: { line: 276, column: 22 } },
'93': { start: { line: 277, column: 12 }, end: { line: 277, column: 23 } },
'94': { start: { line: 278, column: 20 }, end: { line: 278, column: 34 } },
'95': { start: { line: 279, column: 22 }, end: { line: 279, column: 56 } },
'96': { start: { line: 281, column: 2 }, end: { line: 303, column: 3 } },
'97': { start: { line: 282, column: 15 }, end: { line: 282, column: 26 } },
'98': { start: { line: 283, column: 4 }, end: { line: 283, column: 48 } },
'99': { start: { line: 284, column: 4 }, end: { line: 284, column: 49 } },
'100': { start: { line: 285, column: 17 }, end: { line: 285, column: 53 } },
'101': { start: { line: 286, column: 4 }, end: { line: 286, column: 32 } },
'102': { start: { line: 287, column: 4 }, end: { line: 287, column: 46 } },
'103': { start: { line: 288, column: 4 }, end: { line: 288, column: 17 } },
'104': { start: { line: 289, column: 4 }, end: { line: 289, column: 18 } },
'105': { start: { line: 291, column: 12 }, end: { line: 291, column: 23 } },
'106': { start: { line: 292, column: 4 }, end: { line: 294, column: 5 } },
'107': { start: { line: 293, column: 6 }, end: { line: 293, column: 34 } },
'108': { start: { line: 295, column: 4 }, end: { line: 295, column: 41 } },
'109': { start: { line: 296, column: 4 }, end: { line: 296, column: 21 } },
'110': { start: { line: 297, column: 4 }, end: { line: 301, column: 5 } },
'111': { start: { line: 298, column: 6 }, end: { line: 298, column: 43 } },
'112': { start: { line: 300, column: 6 }, end: { line: 300, column: 35 } },
'113': { start: { line: 302, column: 4 }, end: { line: 302, column: 27 } },
'114': { start: { line: 305, column: 19 }, end: { line: 309, column: 3 } },
'115': { start: { line: 310, column: 2 }, end: { line: 310, column: 50 } },
'116': { start: { line: 311, column: 2 }, end: { line: 311, column: 24 } },
'117': { start: { line: 312, column: 2 }, end: { line: 312, column: 28 } },
'118': { start: { line: 314, column: 2 }, end: { line: 316, column: 3 } },
'119': { start: { line: 315, column: 4 }, end: { line: 315, column: 41 } },
'120': { start: { line: 318, column: 2 }, end: { line: 324, column: 3 } },
'121': { start: { line: 321, column: 4 }, end: { line: 323, column: 10 } },
'122': { start: { line: 322, column: 6 }, end: { line: 322, column: 48 } },
'123': { start: { line: 476, column: 0 }, end: { line: 526, column: 2 } },
'124': { start: { line: 477, column: 2 }, end: { line: 483, column: 3 } },
'125': { start: { line: 478, column: 4 }, end: { line: 481, column: 6 } },
'126': { start: { line: 482, column: 4 }, end: { line: 482, column: 11 } },
'127': { start: { line: 484, column: 18 }, end: { line: 484, column: 22 } },
'128': { start: { line: 485, column: 2 }, end: { line: 501, column: 3 } },
'129': { start: { line: 487, column: 4 }, end: { line: 489, column: 5 } },
'130': { start: { line: 488, column: 6 }, end: { line: 488, column: 30 } },
'131': { start: { line: 490, column: 4 }, end: { line: 494, column: 5 } },
'132': { start: { line: 492, column: 6 }, end: { line: 492, column: 38 } },
'133': { start: { line: 493, column: 6 }, end: { line: 493, column: 24 } },
'134': { start: { line: 496, column: 9 }, end: { line: 501, column: 3 } },
'135': { start: { line: 497, column: 4 }, end: { line: 500, column: 5 } },
'136': { start: { line: 498, column: 6 }, end: { line: 498, column: 31 } },
'137': { start: { line: 499, column: 6 }, end: { line: 499, column: 24 } },
'138': { start: { line: 503, column: 2 }, end: { line: 505, column: 3 } },
'139': { start: { line: 504, column: 4 }, end: { line: 504, column: 11 } },
'140': { start: { line: 507, column: 2 }, end: { line: 517, column: 3 } },
'141': { start: { line: 508, column: 4 }, end: { line: 516, column: 5 } },
'142': { start: { line: 509, column: 6 }, end: { line: 515, column: 7 } },
'143': { start: { line: 510, column: 8 }, end: { line: 513, column: 10 } },
'144': { start: { line: 514, column: 8 }, end: { line: 514, column: 15 } },
'145': { start: { line: 519, column: 2 }, end: { line: 519, column: 14 } },
'146': { start: { line: 520, column: 2 }, end: { line: 520, column: 33 } },
'147': { start: { line: 521, column: 2 }, end: { line: 521, column: 13 } },
'148': { start: { line: 523, column: 2 }, end: { line: 525, column: 3 } },
'149': { start: { line: 524, column: 4 }, end: { line: 524, column: 57 } },
'150': { start: { line: 532, column: 0 }, end: { line: 581, column: 2 } },
'151': { start: { line: 535, column: 2 }, end: { line: 552, column: 4 } },
'152': { start: { line: 556, column: 2 }, end: { line: 556, column: 37 } },
'153': { start: { line: 557, column: 2 }, end: { line: 557, column: 34 } },
'154': { start: { line: 559, column: 2 }, end: { line: 559, column: 45 } },
'155': { start: { line: 560, column: 2 }, end: { line: 560, column: 48 } },
'156': { start: { line: 561, column: 2 }, end: { line: 561, column: 49 } },
'157': { start: { line: 563, column: 2 }, end: { line: 563, column: 38 } },
'158': { start: { line: 564, column: 2 }, end: { line: 564, column: 42 } },
'159': { start: { line: 565, column: 2 }, end: { line: 565, column: 43 } },
'160': { start: { line: 567, column: 2 }, end: { line: 567, column: 37 } },
'161': { start: { line: 568, column: 2 }, end: { line: 568, column: 38 } },
'162': { start: { line: 569, column: 2 }, end: { line: 569, column: 41 } },
'163': { start: { line: 570, column: 2 }, end: { line: 570, column: 42 } },
'164': { start: { line: 571, column: 2 }, end: { line: 571, column: 33 } },
'165': { start: { line: 572, column: 2 }, end: { line: 572, column: 32 } },
'166': { start: { line: 574, column: 2 }, end: { line: 574, column: 31 } },
'167': { start: { line: 577, column: 2 }, end: { line: 577, column: 36 } },
'168': { start: { line: 580, column: 2 }, end: { line: 580, column: 42 } },
'169': { start: { line: 586, column: 0 }, end: { line: 595, column: 2 } },
'170': { start: { line: 587, column: 15 }, end: { line: 587, column: 41 } },
'171': { start: { line: 588, column: 13 }, end: { line: 588, column: 33 } },
'172': { start: { line: 589, column: 13 }, end: { line: 589, column: 33 } },
'173': { start: { line: 590, column: 13 }, end: { line: 590, column: 33 } },
'174': { start: { line: 591, column: 13 }, end: { line: 591, column: 33 } },
'175': { start: { line: 592, column: 2 }, end: { line: 592, column: 37 } },
'176': { start: { line: 594, column: 2 }, end: { line: 594, column: 42 } },
'177': { start: { line: 632, column: 0 }, end: { line: 639, column: 2 } },
'178': { start: { line: 634, column: 16 }, end: { line: 634, column: 64 } },
'179': { start: { line: 635, column: 2 }, end: { line: 635, column: 35 } },
'180': { start: { line: 636, column: 2 }, end: { line: 636, column: 33 } },
'181': { start: { line: 637, column: 2 }, end: { line: 637, column: 34 } },
'182': { start: { line: 638, column: 2 }, end: { line: 638, column: 19 } },
'183': { start: { line: 671, column: 0 }, end: { line: 677, column: 2 } },
'184': { start: { line: 674, column: 2 }, end: { line: 674, column: 21 } },
'185': { start: { line: 675, column: 16 }, end: { line: 675, column: 64 } },
'186': { start: { line: 676, column: 2 }, end: { line: 676, column: 37 } },
'187': { start: { line: 679, column: 0 }, end: { line: 682, column: 2 } },
'188': { start: { line: 681, column: 2 }, end: { line: 681, column: 75 } },
'189': { start: { line: 684, column: 0 }, end: { line: 688, column: 2 } },
'190': { start: { line: 687, column: 2 }, end: { line: 687, column: 76 } },
'191': { start: { line: 690, column: 0 }, end: { line: 695, column: 2 } },
'192': { start: { line: 694, column: 2 }, end: { line: 694, column: 56 } },
'193': { start: { line: 697, column: 0 }, end: { line: 722, column: 2 } },
'194': { start: { line: 698, column: 2 }, end: { line: 721, column: 3 } },
'195': { start: { line: 710, column: 4 }, end: { line: 710, column: 29 } },
'196': { start: { line: 711, column: 7 }, end: { line: 721, column: 3 } },
'197': { start: { line: 718, column: 4 }, end: { line: 720, column: 6 } },
'198': { start: { line: 724, column: 0 }, end: { line: 735, column: 2 } },
'199': { start: { line: 725, column: 2 }, end: { line: 734, column: 3 } },
'200': { start: { line: 726, column: 4 }, end: { line: 726, column: 43 } },
'201': { start: { line: 727, column: 4 }, end: { line: 727, column: 27 } },
'202': { start: { line: 729, column: 4 }, end: { line: 729, column: 54 } },
'203': { start: { line: 730, column: 4 }, end: { line: 730, column: 53 } },
'204': { start: { line: 732, column: 4 }, end: { line: 732, column: 58 } },
'205': { start: { line: 733, column: 4 }, end: { line: 733, column: 57 } },
'206': { start: { line: 737, column: 0 }, end: { line: 744, column: 2 } },
'207': { start: { line: 738, column: 2 }, end: { line: 743, column: 3 } },
'208': { start: { line: 739, column: 4 }, end: { line: 739, column: 28 } },
'209': { start: { line: 740, column: 4 }, end: { line: 740, column: 54 } },
'210': { start: { line: 741, column: 4 }, end: { line: 741, column: 58 } },
'211': { start: { line: 742, column: 4 }, end: { line: 742, column: 42 } },
'212': { start: { line: 785, column: 0 }, end: { line: 790, column: 2 } },
'213': { start: { line: 786, column: 2 }, end: { line: 789, column: 3 } },
'214': { start: { line: 787, column: 4 }, end: { line: 787, column: 23 } },
'215': { start: { line: 788, column: 4 }, end: { line: 788, column: 29 } },
'216': { start: { line: 793, column: 0 }, end: { line: 809, column: 2 } },
'217': { start: { line: 795, column: 2 }, end: { line: 795, column: 32 } },
'218': { start: { line: 797, column: 2 }, end: { line: 801, column: 6 } },
'219': { start: { line: 802, column: 2 }, end: { line: 802, column: 12 } },
'220': { start: { line: 803, column: 2 }, end: { line: 808, column: 4 } },
'221': { start: { line: 820, column: 0 }, end: { line: 847, column: 2 } },
'222': { start: { line: 821, column: 22 }, end: { line: 821, column: 39 } },
'223': { start: { line: 824, column: 2 }, end: { line: 829, column: 3 } },
'224': { start: { line: 825, column: 4 }, end: { line: 827, column: 6 } },
'225': { start: { line: 828, column: 4 }, end: { line: 828, column: 11 } },
'226': { start: { line: 833, column: 15 }, end: { line: 833, column: 33 } },
'227': { start: { line: 834, column: 14 }, end: { line: 834, column: 74 } },
'228': { start: { line: 835, column: 2 }, end: { line: 838, column: 3 } },
'229': { start: { line: 836, column: 4 }, end: { line: 836, column: 33 } },
'230': { start: { line: 837, column: 4 }, end: { line: 837, column: 53 } },
'231': { start: { line: 840, column: 13 }, end: { line: 840, column: 38 } },
'232': { start: { line: 842, column: 2 }, end: { line: 846, column: 4 } },
'233': { start: { line: 853, column: 0 }, end: { line: 855, column: 2 } },
'234': { start: { line: 854, column: 2 }, end: { line: 854, column: 55 } },
'235': { start: { line: 863, column: 0 }, end: { line: 885, column: 2 } },
'236': { start: { line: 864, column: 2 }, end: { line: 864, column: 48 } },
'237': { start: { line: 865, column: 2 }, end: { line: 870, column: 4 } },
'238': { start: { line: 871, column: 2 }, end: { line: 871, column: 58 } },
'239': { start: { line: 873, column: 2 }, end: { line: 873, column: 28 } },
'240': { start: { line: 876, column: 22 }, end: { line: 876, column: 39 } },
'241': { start: { line: 877, column: 2 }, end: { line: 884, column: 3 } },
'242': { start: { line: 878, column: 4 }, end: { line: 883, column: 6 } },
'243': { start: { line: 896, column: 0 }, end: { line: 903, column: 2 } },
'244': { start: { line: 897, column: 13 }, end: { line: 897, column: 25 } },
'245': { start: { line: 898, column: 13 }, end: { line: 898, column: 25 } },
'246': { start: { line: 899, column: 13 }, end: { line: 899, column: 25 } },
'247': { start: { line: 900, column: 13 }, end: { line: 900, column: 25 } },
'248': { start: { line: 901, column: 2 }, end: { line: 901, column: 37 } },
'249': { start: { line: 902, column: 2 }, end: { line: 902, column: 69 } },
'250': { start: { line: 905, column: 0 }, end: { line: 917, column: 2 } },
'251': { start: { line: 906, column: 2 }, end: { line: 916, column: 3 } },
'252': { start: { line: 907, column: 4 }, end: { line: 907, column: 63 } },
'253': { start: { line: 910, column: 4 }, end: { line: 915, column: 7 } },
'254': { start: { line: 928, column: 0 }, end: { line: 936, column: 2 } },
'255': { start: { line: 929, column: 2 }, end: { line: 933, column: 3 } },
'256': { start: { line: 930, column: 4 }, end: { line: 930, column: 12 } },
'257': { start: { line: 931, column: 4 }, end: { line: 931, column: 12 } },
'258': { start: { line: 932, column: 4 }, end: { line: 932, column: 12 } },
'259': { start: { line: 934, column: 2 }, end: { line: 934, column: 38 } },
'260': { start: { line: 935, column: 2 }, end: { line: 935, column: 14 } },
'261': { start: { line: 946, column: 0 }, end: { line: 949, column: 2 } },
'262': { start: { line: 947, column: 2 }, end: { line: 947, column: 32 } },
'263': { start: { line: 948, column: 2 }, end: { line: 948, column: 14 } },
'264': { start: { line: 951, column: 0 }, end: { line: 957, column: 2 } },
'265': { start: { line: 952, column: 2 }, end: { line: 954, column: 3 } },
'266': { start: { line: 953, column: 4 }, end: { line: 953, column: 29 } },
'267': { start: { line: 955, column: 2 }, end: { line: 955, column: 62 } },
'268': { start: { line: 956, column: 2 }, end: { line: 956, column: 14 } },
'269': { start: { line: 959, column: 0 }, end: { line: 962, column: 2 } },
'270': { start: { line: 960, column: 2 }, end: { line: 960, column: 28 } },
'271': { start: { line: 961, column: 2 }, end: { line: 961, column: 14 } },
'272': { start: { line: 964, column: 0 }, end: { line: 967, column: 2 } },
'273': { start: { line: 965, column: 2 }, end: { line: 965, column: 28 } },
'274': { start: { line: 966, column: 2 }, end: { line: 966, column: 14 } },
'275': { start: { line: 969, column: 0 }, end: { line: 972, column: 2 } },
'276': { start: { line: 970, column: 2 }, end: { line: 970, column: 28 } },
'277': { start: { line: 971, column: 2 }, end: { line: 971, column: 14 } },
'278': { start: { line: 974, column: 0 }, end: { line: 1030, column: 2 } },
'279': { start: { line: 976, column: 16 }, end: { line: 976, column: 54 } },
'280': { start: { line: 979, column: 21 }, end: { line: 979, column: 37 } },
'281': { start: { line: 981, column: 2 }, end: { line: 981, column: 47 } },
'282': { start: { line: 982, column: 2 }, end: { line: 982, column: 45 } },
'283': { start: { line: 983, column: 2 }, end: { line: 983, column: 42 } },
'284': { start: { line: 987, column: 2 }, end: { line: 987, column: 43 } },
'285': { start: { line: 989, column: 2 }, end: { line: 989, column: 66 } },
'286': { start: { line: 990, column: 2 }, end: { line: 990, column: 58 } },
'287': { start: { line: 992, column: 2 }, end: { line: 992, column: 82 } },
'288': { start: { line: 993, column: 2 }, end: { line: 993, column: 88 } },
'289': { start: { line: 994, column: 2 }, end: { line: 994, column: 90 } },
'290': { start: { line: 996, column: 2 }, end: { line: 996, column: 68 } },
'291': { start: { line: 997, column: 2 }, end: { line: 997, column: 76 } },
'292': { start: { line: 998, column: 2 }, end: { line: 998, column: 78 } },
'293': {
start: { line: 1000, column: 2 },
end: { line: 1000, column: 66 }
},
'294': {
start: { line: 1001, column: 2 },
end: { line: 1001, column: 68 }
},
'295': {
start: { line: 1002, column: 2 },
end: { line: 1002, column: 74 }
},
'296': {
start: { line: 1003, column: 2 },
end: { line: 1003, column: 76 }
},
'297': {
start: { line: 1004, column: 2 },
end: { line: 1004, column: 58 }
},
'298': {
start: { line: 1005, column: 2 },
end: { line: 1005, column: 56 }
},
'299': {
start: { line: 1007, column: 2 },
end: { line: 1007, column: 50 }
},
'300': {
start: { line: 1008, column: 2 },
end: { line: 1008, column: 54 }
},
'301': {
start: { line: 1009, column: 2 },
end: { line: 1009, column: 52 }
},
'302': {
start: { line: 1011, column: 2 },
end: { line: 1011, column: 40 }
},
'303': {
start: { line: 1012, column: 2 },
end: { line: 1012, column: 52 }
},
'304': {
start: { line: 1013, column: 2 },
end: { line: 1013, column: 50 }
},
'305': {
start: { line: 1014, column: 2 },
end: { line: 1014, column: 46 }
},
'306': {
start: { line: 1016, column: 2 },
end: { line: 1016, column: 62 }
},
'307': {
start: { line: 1017, column: 2 },
end: { line: 1017, column: 62 }
},
'308': {
start: { line: 1018, column: 2 },
end: { line: 1018, column: 48 }
},
'309': {
start: { line: 1020, column: 2 },
end: { line: 1020, column: 60 }
},
'310': {
start: { line: 1021, column: 2 },
end: { line: 1021, column: 56 }
},
'311': {
start: { line: 1022, column: 2 },
end: { line: 1022, column: 62 }
},
'312': {
start: { line: 1024, column: 2 },
end: { line: 1024, column: 52 }
},
'313': {
start: { line: 1025, column: 2 },
end: { line: 1025, column: 58 }
},
'314': {
start: { line: 1026, column: 2 },
end: { line: 1026, column: 30 }
},
'315': {
start: { line: 1027, column: 2 },
end: { line: 1027, column: 38 }
},
'316': {
start: { line: 1029, column: 2 },
end: { line: 1029, column: 15 }
},
'317': { start: { line: 1032, column: 0 }, end: { line: 1035, column: 2 } },
'318': {
start: { line: 1033, column: 2 },
end: { line: 1033, column: 51 }
},
'319': {
start: { line: 1034, column: 2 },
end: { line: 1034, column: 14 }
},
'320': { start: { line: 1047, column: 0 }, end: { line: 1054, column: 2 } },
'321': {
start: { line: 1049, column: 17 },
end: { line: 1049, column: 38 }
},
'322': { start: { line: 1050, column: 2 }, end: { line: 1052, column: 3 } },
'323': {
start: { line: 1051, column: 4 },
end: { line: 1051, column: 33 }
},
'324': {
start: { line: 1053, column: 2 },
end: { line: 1053, column: 16 }
},
'325': {
start: { line: 1056, column: 0 },
end: { line: 1057, column: 52 }
},
'326': { start: { line: 1063, column: 0 }, end: { line: 1082, column: 2 } },
'327': {
start: { line: 1064, column: 15 },
end: { line: 1064, column: 34 }
},
'328': { start: { line: 1065, column: 2 }, end: { line: 1069, column: 3 } },
'329': { start: { line: 1066, column: 4 }, end: { line: 1068, column: 5 } },
'330': {
start: { line: 1067, column: 6 },
end: { line: 1067, column: 37 }
},
'331': { start: { line: 1070, column: 2 }, end: { line: 1080, column: 3 } },
'332': { start: { line: 1071, column: 4 }, end: { line: 1073, column: 5 } },
'333': {
start: { line: 1072, column: 6 },
end: { line: 1072, column: 36 }
},
'334': { start: { line: 1074, column: 9 }, end: { line: 1080, column: 3 } },
'335': { start: { line: 1075, column: 4 }, end: { line: 1077, column: 5 } },
'336': {
start: { line: 1076, column: 6 },
end: { line: 1076, column: 36 }
},
'337': { start: { line: 1078, column: 9 }, end: { line: 1080, column: 3 } },
'338': {
start: { line: 1079, column: 4 },
end: { line: 1079, column: 42 }
},
'339': {
start: { line: 1081, column: 2 },
end: { line: 1081, column: 14 }
},
'340': { start: { line: 1088, column: 0 }, end: { line: 1106, column: 2 } },
'341': { start: { line: 1089, column: 2 }, end: { line: 1091, column: 3 } },
'342': {
start: { line: 1090, column: 4 },
end: { line: 1090, column: 35 }
},
'343': {
start: { line: 1093, column: 15 },
end: { line: 1093, column: 34 }
},
'344': { start: { line: 1094, column: 2 }, end: { line: 1104, column: 3 } },
'345': { start: { line: 1095, column: 4 }, end: { line: 1097, column: 5 } },
'346': {
start: { line: 1096, column: 6 },
end: { line: 1096, column: 36 }
},
'347': { start: { line: 1098, column: 9 }, end: { line: 1104, column: 3 } },
'348': { start: { line: 1099, column: 4 }, end: { line: 1101, column: 5 } },
'349': {
start: { line: 1100, column: 6 },
end: { line: 1100, column: 36 }
},
'350': { start: { line: 1102, column: 9 }, end: { line: 1104, column: 3 } },
'351': {
start: { line: 1103, column: 4 },
end: { line: 1103, column: 34 }
},
'352': {
start: { line: 1105, column: 2 },
end: { line: 1105, column: 14 }
},
'353': { start: { line: 1108, column: 0 }, end: { line: 1115, column: 2 } },
'354': {
start: { line: 1110, column: 16 },
end: { line: 1110, column: 36 }
},
'355': { start: { line: 1111, column: 2 }, end: { line: 1113, column: 3 } },
'356': {
start: { line: 1112, column: 4 },
end: { line: 1112, column: 34 }
},
'357': {
start: { line: 1114, column: 2 },
end: { line: 1114, column: 15 }
},
'358': {
start: { line: 1117, column: 0 },
end: { line: 1118, column: 50 }
},
'359': { start: { line: 1120, column: 0 }, end: { line: 1138, column: 2 } },
'360': { start: { line: 1121, column: 2 }, end: { line: 1135, column: 3 } },
'361': { start: { line: 1122, column: 4 }, end: { line: 1134, column: 5 } },
'362': { start: { line: 1123, column: 6 }, end: { line: 1127, column: 8 } },
'363': { start: { line: 1129, column: 6 }, end: { line: 1133, column: 8 } },
'364': {
start: { line: 1137, column: 2 },
end: { line: 1137, column: 34 }
},
'365': { start: { line: 1140, column: 0 }, end: { line: 1150, column: 2 } },
'366': { start: { line: 1141, column: 2 }, end: { line: 1147, column: 3 } },
'367': { start: { line: 1142, column: 4 }, end: { line: 1146, column: 6 } },
'368': {
start: { line: 1149, column: 2 },
end: { line: 1149, column: 42 }
},
'369': { start: { line: 1152, column: 0 }, end: { line: 1162, column: 2 } },
'370': { start: { line: 1153, column: 2 }, end: { line: 1159, column: 3 } },
'371': { start: { line: 1154, column: 4 }, end: { line: 1158, column: 6 } },
'372': {
start: { line: 1161, column: 2 },
end: { line: 1161, column: 35 }
},
'373': { start: { line: 1164, column: 0 }, end: { line: 1174, column: 2 } },
'374': { start: { line: 1165, column: 2 }, end: { line: 1171, column: 3 } },
'375': { start: { line: 1166, column: 4 }, end: { line: 1170, column: 6 } },
'376': {
start: { line: 1173, column: 2 },
end: { line: 1173, column: 34 }
},
'377': { start: { line: 1176, column: 0 }, end: { line: 1185, column: 2 } },
'378': { start: { line: 1177, column: 2 }, end: { line: 1183, column: 3 } },
'379': { start: { line: 1178, column: 4 }, end: { line: 1182, column: 6 } },
'380': {
start: { line: 1184, column: 2 },
end: { line: 1184, column: 34 }
},
'381': { start: { line: 1187, column: 0 }, end: { line: 1197, column: 2 } },
'382': { start: { line: 1188, column: 2 }, end: { line: 1194, column: 3 } },
'383': { start: { line: 1189, column: 4 }, end: { line: 1193, column: 6 } },
'384': {
start: { line: 1196, column: 2 },
end: { line: 1196, column: 33 }
},
'385': { start: { line: 1199, column: 0 }, end: { line: 1209, column: 2 } },
'386': { start: { line: 1200, column: 2 }, end: { line: 1207, column: 3 } },
'387': {
start: { line: 1201, column: 4 },
end: { line: 1201, column: 53 }
},
'388': { start: { line: 1202, column: 4 }, end: { line: 1206, column: 6 } },
'389': {
start: { line: 1208, column: 2 },
end: { line: 1208, column: 33 }
},
'390': { start: { line: 1211, column: 0 }, end: { line: 1219, column: 2 } },
'391': { start: { line: 1212, column: 2 }, end: { line: 1217, column: 3 } },
'392': {
start: { line: 1214, column: 15 },
end: { line: 1214, column: 33 }
},
'393': {
start: { line: 1215, column: 4 },
end: { line: 1215, column: 22 }
},
'394': {
start: { line: 1216, column: 4 },
end: { line: 1216, column: 50 }
},
'395': {
start: { line: 1218, column: 2 },
end: { line: 1218, column: 28 }
},
'396': { start: { line: 1221, column: 0 }, end: { line: 1231, column: 2 } },
'397': {
start: { line: 1222, column: 19 },
end: { line: 1222, column: 32 }
},
'398': { start: { line: 1224, column: 2 }, end: { line: 1226, column: 3 } },
'399': {
start: { line: 1225, column: 4 },
end: { line: 1225, column: 44 }
},
'400': {
start: { line: 1225, column: 29 },
end: { line: 1225, column: 44 }
},
'401': {
start: { line: 1228, column: 14 },
end: { line: 1228, column: 39 }
},
'402': {
start: { line: 1229, column: 2 },
end: { line: 1229, column: 21 }
},
'403': {
start: { line: 1230, column: 2 },
end: { line: 1230, column: 13 }
},
'404': { start: { line: 1233, column: 0 }, end: { line: 1239, column: 2 } },
'405': {
start: { line: 1234, column: 2 },
end: { line: 1234, column: 28 }
},
'406': {
start: { line: 1237, column: 2 },
end: { line: 1237, column: 65 }
},
'407': {
start: { line: 1238, column: 2 },
end: { line: 1238, column: 65 }
},
'408': { start: { line: 1241, column: 0 }, end: { line: 1304, column: 2 } },
'409': {
start: { line: 1242, column: 2 },
end: { line: 1242, column: 26 }
},
'410': {
start: { line: 1245, column: 2 },
end: { line: 1245, column: 61 }
},
'411': {
start: { line: 1246, column: 2 },
end: { line: 1246, column: 50 }
},
'412': { start: { line: 1247, column: 2 }, end: { line: 1249, column: 3 } },
'413': {
start: { line: 1248, column: 4 },
end: { line: 1248, column: 49 }
},
'414': {
start: { line: 1250, column: 2 },
end: { line: 1250, column: 45 }
},
'415': {
start: { line: 1252, column: 2 },
end: { line: 1252, column: 64 }
},
'416': {
start: { line: 1253, column: 2 },
end: { line: 1253, column: 64 }
},
'417': {
start: { line: 1254, column: 2 },
end: { line: 1254, column: 58 }
},
'418': {
start: { line: 1256, column: 2 },
end: { line: 1256, column: 62 }
},
'419': {
start: { line: 1258, column: 26 },
end: { line: 1258, column: 65 }
},
'420': {
start: { line: 1259, column: 2 },
end: { line: 1259, column: 61 }
},
'421': {
start: { line: 1260, column: 2 },
end: { line: 1260, column: 73 }
},
'422': { start: { line: 1261, column: 2 }, end: { line: 1264, column: 4 } },
'423': { start: { line: 1265, column: 2 }, end: { line: 1268, column: 4 } },
'424': {
start: { line: 1270, column: 32 },
end: { line: 1270, column: 77 }
},
'425': {
start: { line: 1271, column: 2 },
end: { line: 1271, column: 73 }
},
'426': {
start: { line: 1272, column: 2 },
end: { line: 1272, column: 79 }
},
'427': { start: { line: 1273, column: 2 }, end: { line: 1276, column: 4 } },
'428': { start: { line: 1277, column: 2 }, end: { line: 1280, column: 4 } },
'429': {
start: { line: 1283, column: 28 },
end: { line: 1283, column: 62 }
},
'430': {
start: { line: 1284, column: 2 },
end: { line: 1284, column: 65 }
},
'431': {
start: { line: 1285, column: 2 },
end: { line: 1285, column: 66 }
},
'432': {
start: { line: 1287, column: 25 },
end: { line: 1287, column: 63 }
},
'433': {
start: { line: 1288, column: 2 },
end: { line: 1288, column: 59 }
},
'434': {
start: { line: 1289, column: 2 },
end: { line: 1289, column: 64 }
},
'435': {
start: { line: 1290, column: 2 },
end: { line: 1290, column: 62 }
},
'436': {
start: { line: 1291, column: 2 },
end: { line: 1291, column: 80 }
},
'437': { start: { line: 1292, column: 2 }, end: { line: 1295, column: 4 } },
'438': {
start: { line: 1296, column: 2 },
end: { line: 1296, column: 71 }
},
'439': {
start: { line: 1297, column: 2 },
end: { line: 1297, column: 73 }
},
'440': {
start: { line: 1299, column: 2 },
end: { line: 1299, column: 74 }
},
'441': {
start: { line: 1300, column: 2 },
end: { line: 1300, column: 70 }
},
'442': {
start: { line: 1301, column: 2 },
end: { line: 1301, column: 76 }
},
'443': {
start: { line: 1303, column: 2 },
end: { line: 1303, column: 28 }
},
'444': { start: { line: 1306, column: 0 }, end: { line: 1314, column: 2 } },
'445': {
start: { line: 1307, column: 2 },
end: { line: 1307, column: 27 }
},
'446': {
start: { line: 1310, column: 2 },
end: { line: 1310, column: 64 }
},
'447': {
start: { line: 1313, column: 2 },
end: { line: 1313, column: 55 }
},
'448': { start: { line: 1320, column: 0 }, end: { line: 1333, column: 2 } },
'449': {
start: { line: 1327, column: 2 },
end: { line: 1327, column: 45 }
},
'450': {
start: { line: 1327, column: 15 },
end: { line: 1327, column: 45 }
},
'451': {
start: { line: 1328, column: 2 },
end: { line: 1328, column: 37 }
},
'452': { start: { line: 1329, column: 2 }, end: { line: 1332, column: 3 } },
'453': {
start: { line: 1330, column: 17 },
end: { line: 1330, column: 51 }
},
'454': {
start: { line: 1331, column: 4 },
end: { line: 1331, column: 67 }
},
'455': { start: { line: 1338, column: 0 }, end: { line: 1345, column: 2 } },
'456': {
start: { line: 1339, column: 18 },
end: { line: 1339, column: 26 }
},
'457': {
start: { line: 1340, column: 2 },
end: { line: 1340, column: 41 }
},
'458': {
start: { line: 1340, column: 28 },
end: { line: 1340, column: 41 }
},
'459': { start: { line: 1341, column: 2 }, end: { line: 1343, column: 3 } },
'460': {
start: { line: 1341, column: 15 },
end: { line: 1341, column: 16 }
},
'461': {
start: { line: 1342, column: 4 },
end: { line: 1342, column: 36 }
},
'462': {
start: { line: 1342, column: 23 },
end: { line: 1342, column: 36 }
},
'463': {
start: { line: 1344, column: 2 },
end: { line: 1344, column: 14 }
},
'464': { start: { line: 1347, column: 0 }, end: { line: 1355, column: 2 } },
'465': {
start: { line: 1348, column: 12 },
end: { line: 1348, column: 17 }
},
'466': {
start: { line: 1349, column: 2 },
end: { line: 1349, column: 36 }
},
'467': {
start: { line: 1350, column: 2 },
end: { line: 1350, column: 36 }
},
'468': {
start: { line: 1351, column: 2 },
end: { line: 1351, column: 34 }
},
'469': {
start: { line: 1352, column: 2 },
end: { line: 1352, column: 35 }
},
'470': {
start: { line: 1353, column: 2 },
end: { line: 1353, column: 35 }
},
'471': {
start: { line: 1354, column: 2 },
end: { line: 1354, column: 13 }
},
'472': { start: { line: 1363, column: 0 }, end: { line: 1391, column: 2 } },
'473': { start: { line: 1365, column: 2 }, end: { line: 1390, column: 3 } },
'474': {
start: { line: 1366, column: 4 },
end: { line: 1366, column: 14 }
},
'475': { start: { line: 1367, column: 9 }, end: { line: 1390, column: 3 } },
'476': {
start: { line: 1371, column: 21 },
end: { line: 1371, column: 46 }
},
'477': {
start: { line: 1372, column: 25 },
end: { line: 1372, column: 41 }
},
'478': {
start: { line: 1373, column: 19 },
end: { line: 1373, column: 21 }
},
'479': {
start: { line: 1374, column: 18 },
end: { line: 1374, column: 29 }
},
'480': {
start: { line: 1376, column: 4 },
end: { line: 1376, column: 23 }
},
'481': {
start: { line: 1377, column: 4 },
end: { line: 1383, column: 65 }
},
'482': { start: { line: 1378, column: 6 }, end: { line: 1382, column: 7 } },
'483': {
start: { line: 1379, column: 8 },
end: { line: 1379, column: 28 }
},
'484': {
start: { line: 1381, column: 8 },
end: { line: 1381, column: 26 }
},
'485': {
start: { line: 1384, column: 4 },
end: { line: 1384, column: 21 }
},
'486': {
start: { line: 1385, column: 4 },
end: { line: 1385, column: 18 }
},
'487': {
start: { line: 1389, column: 4 },
end: { line: 1389, column: 29 }
},
'488': { start: { line: 1401, column: 0 }, end: { line: 1409, column: 2 } },
'489': {
start: { line: 1402, column: 14 },
end: { line: 1402, column: 16 }
},
'490': { start: { line: 1404, column: 2 }, end: { line: 1406, column: 3 } },
'491': {
start: { line: 1405, column: 4 },
end: { line: 1405, column: 37 }
},
'492': {
start: { line: 1408, column: 2 },
end: { line: 1408, column: 13 }
},
'493': { start: { line: 1414, column: 0 }, end: { line: 1419, column: 2 } },
'494': { start: { line: 1415, column: 2 }, end: { line: 1418, column: 6 } },
'495': { start: { line: 1416, column: 4 }, end: { line: 1418, column: 6 } },
'496': { start: { line: 1423, column: 0 }, end: { line: 1458, column: 2 } },
'497': {
start: { line: 1426, column: 4 },
end: { line: 1426, column: 50 }
},
'498': {
start: { line: 1427, column: 4 },
end: { line: 1427, column: 50 }
},
'499': {
start: { line: 1428, column: 4 },
end: { line: 1428, column: 50 }
},
'500': { start: { line: 1432, column: 4 }, end: { line: 1434, column: 5 } },
'501': {
start: { line: 1433, column: 6 },
end: { line: 1433, column: 62 }
},
'502': {
start: { line: 1438, column: 4 },
end: { line: 1438, column: 34 }
},
'503': {
start: { line: 1439, column: 4 },
end: { line: 1439, column: 42 }
},
'504': {
start: { line: 1443, column: 4 },
end: { line: 1443, column: 45 }
},
'505': {
start: { line: 1450, column: 16 },
end: { line: 1450, column: 43 }
},
'506': {
start: { line: 1451, column: 2 },
end: { line: 1451, column: 78 }
},
'507': {
start: { line: 1452, column: 2 },
end: { line: 1452, column: 71 }
},
'508': {
start: { line: 1453, column: 2 },
end: { line: 1453, column: 71 }
},
'509': {
start: { line: 1454, column: 2 },
end: { line: 1454, column: 75 }
},
'510': {
start: { line: 1455, column: 2 },
end: { line: 1455, column: 74 }
},
'511': {
start: { line: 1457, column: 2 },
end: { line: 1457, column: 15 }
},
'512': { start: { line: 1460, column: 0 }, end: { line: 1484, column: 2 } },
'513': {
start: { line: 1465, column: 2 },
end: { line: 1465, column: 37 }
},
'514': {
start: { line: 1467, column: 24 },
end: { line: 1467, column: 26 }
},
'515': {
start: { line: 1468, column: 2 },
end: { line: 1468, column: 49 }
},
'516': { start: { line: 1470, column: 2 }, end: { line: 1478, column: 3 } },
'517': {
start: { line: 1470, column: 15 },
end: { line: 1470, column: 16 }
},
'518': {
start: { line: 1471, column: 4 },
end: { line: 1471, column: 38 }
},
'519': {
start: { line: 1472, column: 20 },
end: { line: 1472, column: 31 }
},
'520': { start: { line: 1473, column: 4 }, end: { line: 1476, column: 5 } },
'521': {
start: { line: 1473, column: 17 },
end: { line: 1473, column: 18 }
},
'522': {
start: { line: 1474, column: 21 },
end: { line: 1474, column: 65 }
},
'523': {
start: { line: 1475, column: 6 },
end: { line: 1475, column: 48 }
},
'524': {
start: { line: 1477, column: 4 },
end: { line: 1477, column: 36 }
},
'525': {
start: { line: 1481, column: 2 },
end: { line: 1481, column: 34 }
},
'526': {
start: { line: 1483, column: 2 },
end: { line: 1483, column: 23 }
},
'527': { start: { line: 1487, column: 0 }, end: { line: 1494, column: 2 } },
'528': {
start: { line: 1488, column: 13 },
end: { line: 1488, column: 18 }
},
'529': {
start: { line: 1489, column: 13 },
end: { line: 1489, column: 19 }
},
'530': {
start: { line: 1490, column: 13 },
end: { line: 1490, column: 18 }
},
'531': {
start: { line: 1491, column: 14 },
end: { line: 1491, column: 21 }
},
'532': {
start: { line: 1492, column: 14 },
end: { line: 1492, column: 22 }
},
'533': {
start: { line: 1493, column: 2 },
end: { line: 1493, column: 45 }
},
'534': { start: { line: 1497, column: 0 }, end: { line: 1502, column: 2 } },
'535': {
start: { line: 1498, column: 13 },
end: { line: 1498, column: 18 }
},
'536': {
start: { line: 1499, column: 13 },
end: { line: 1499, column: 18 }
},
'537': {
start: { line: 1500, column: 14 },
end: { line: 1500, column: 21 }
},
'538': {
start: { line: 1501, column: 2 },
end: { line: 1501, column: 31 }
},
'539': { start: { line: 1505, column: 0 }, end: { line: 1512, column: 2 } },
'540': {
start: { line: 1506, column: 13 },
end: { line: 1506, column: 17 }
},
'541': {
start: { line: 1507, column: 13 },
end: { line: 1507, column: 56 }
},
'542': {
start: { line: 1508, column: 13 },
end: { line: 1508, column: 56 }
},
'543': {
start: { line: 1509, column: 13 },
end: { line: 1509, column: 17 }
},
'544': {
start: { line: 1510, column: 12 },
end: { line: 1510, column: 28 }
},
'545': { start: { line: 1511, column: 2 }, end: { line: 1511, column: 11 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 60, column: 16 }, end: { line: 60, column: 17 } },
loc: { start: { line: 60, column: 57 }, end: { line: 223, column: 1 } },
line: 60
},
'1': {
name: '(anonymous_1)',
decl: {
start: { line: 231, column: 48 },
end: { line: 231, column: 49 }
},
loc: { start: { line: 231, column: 64 }, end: { line: 249, column: 1 } },
line: 231
},
'2': {
name: '(anonymous_2)',
decl: {
start: { line: 251, column: 39 },
end: { line: 251, column: 40 }
},
loc: { start: { line: 251, column: 50 }, end: { line: 270, column: 1 } },
line: 251
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 275, column: 40 },
end: { line: 275, column: 41 }
},
loc: { start: { line: 275, column: 68 }, end: { line: 325, column: 1 } },
line: 275
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 321, column: 15 },
end: { line: 321, column: 16 }
},
loc: { start: { line: 321, column: 21 }, end: { line: 323, column: 5 } },
line: 321
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 476, column: 29 },
end: { line: 476, column: 30 }
},
loc: { start: { line: 476, column: 50 }, end: { line: 526, column: 1 } },
line: 476
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 532, column: 34 },
end: { line: 532, column: 35 }
},
loc: { start: { line: 532, column: 45 }, end: { line: 581, column: 1 } },
line: 532
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 586, column: 37 },
end: { line: 586, column: 38 }
},
loc: { start: { line: 586, column: 55 }, end: { line: 595, column: 1 } },
line: 586
},
'8': {
name: '(anonymous_8)',
decl: {
start: { line: 632, column: 31 },
end: { line: 632, column: 32 }
},
loc: { start: { line: 632, column: 55 }, end: { line: 639, column: 1 } },
line: 632
},
'9': {
name: '(anonymous_9)',
decl: {
start: { line: 671, column: 33 },
end: { line: 671, column: 34 }
},
loc: { start: { line: 671, column: 54 }, end: { line: 677, column: 1 } },
line: 671
},
'10': {
name: '(anonymous_10)',
decl: {
start: { line: 679, column: 36 },
end: { line: 679, column: 37 }
},
loc: { start: { line: 679, column: 50 }, end: { line: 682, column: 1 } },
line: 679
},
'11': {
name: '(anonymous_11)',
decl: {
start: { line: 684, column: 37 },
end: { line: 684, column: 38 }
},
loc: { start: { line: 684, column: 52 }, end: { line: 688, column: 1 } },
line: 684
},
'12': {
name: '(anonymous_12)',
decl: {
start: { line: 690, column: 33 },
end: { line: 690, column: 34 }
},
loc: { start: { line: 690, column: 54 }, end: { line: 695, column: 1 } },
line: 690
},
'13': {
name: '(anonymous_13)',
decl: {
start: { line: 697, column: 36 },
end: { line: 697, column: 37 }
},
loc: { start: { line: 697, column: 51 }, end: { line: 722, column: 1 } },
line: 697
},
'14': {
name: '(anonymous_14)',
decl: {
start: { line: 724, column: 32 },
end: { line: 724, column: 33 }
},
loc: { start: { line: 724, column: 69 }, end: { line: 735, column: 1 } },
line: 724
},
'15': {
name: '(anonymous_15)',
decl: {
start: { line: 737, column: 34 },
end: { line: 737, column: 35 }
},
loc: { start: { line: 737, column: 45 }, end: { line: 744, column: 1 } },
line: 737
},
'16': {
name: '(anonymous_16)',
decl: {
start: { line: 785, column: 39 },
end: { line: 785, column: 40 }
},
loc: { start: { line: 785, column: 51 }, end: { line: 790, column: 1 } },
line: 785
},
'17': {
name: '(anonymous_17)',
decl: {
start: { line: 793, column: 36 },
end: { line: 793, column: 37 }
},
loc: { start: { line: 793, column: 51 }, end: { line: 809, column: 1 } },
line: 793
},
'18': {
name: '(anonymous_18)',
decl: {
start: { line: 820, column: 37 },
end: { line: 820, column: 38 }
},
loc: { start: { line: 820, column: 48 }, end: { line: 847, column: 1 } },
line: 820
},
'19': {
name: '(anonymous_19)',
decl: {
start: { line: 853, column: 41 },
end: { line: 853, column: 42 }
},
loc: { start: { line: 853, column: 55 }, end: { line: 855, column: 1 } },
line: 853
},
'20': {
name: '(anonymous_20)',
decl: {
start: { line: 863, column: 33 },
end: { line: 863, column: 34 }
},
loc: { start: { line: 863, column: 48 }, end: { line: 885, column: 1 } },
line: 863
},
'21': {
name: '(anonymous_21)',
decl: {
start: { line: 896, column: 32 },
end: { line: 896, column: 33 }
},
loc: { start: { line: 896, column: 50 }, end: { line: 903, column: 1 } },
line: 896
},
'22': {
name: '(anonymous_22)',
decl: {
start: { line: 905, column: 38 },
end: { line: 905, column: 39 }
},
loc: { start: { line: 905, column: 65 }, end: { line: 917, column: 1 } },
line: 905
},
'23': {
name: '(anonymous_23)',
decl: {
start: { line: 928, column: 36 },
end: { line: 928, column: 37 }
},
loc: { start: { line: 928, column: 54 }, end: { line: 936, column: 1 } },
line: 928
},
'24': {
name: '(anonymous_24)',
decl: {
start: { line: 946, column: 32 },
end: { line: 946, column: 33 }
},
loc: { start: { line: 946, column: 50 }, end: { line: 949, column: 1 } },
line: 946
},
'25': {
name: '(anonymous_25)',
decl: {
start: { line: 951, column: 33 },
end: { line: 951, column: 34 }
},
loc: { start: { line: 951, column: 53 }, end: { line: 957, column: 1 } },
line: 951
},
'26': {
name: '(anonymous_26)',
decl: {
start: { line: 959, column: 34 },
end: { line: 959, column: 35 }
},
loc: { start: { line: 959, column: 48 }, end: { line: 962, column: 1 } },
line: 959
},
'27': {
name: '(anonymous_27)',
decl: {
start: { line: 964, column: 34 },
end: { line: 964, column: 35 }
},
loc: { start: { line: 964, column: 48 }, end: { line: 967, column: 1 } },
line: 964
},
'28': {
name: '(anonymous_28)',
decl: {
start: { line: 969, column: 34 },
end: { line: 969, column: 35 }
},
loc: { start: { line: 969, column: 48 }, end: { line: 972, column: 1 } },
line: 969
},
'29': {
name: '(anonymous_29)',
decl: {
start: { line: 974, column: 31 },
end: { line: 974, column: 32 }
},
loc: { start: { line: 974, column: 42 }, end: { line: 1030, column: 1 } },
line: 974
},
'30': {
name: '(anonymous_30)',
decl: {
start: { line: 1032, column: 38 },
end: { line: 1032, column: 39 }
},
loc: {
start: { line: 1032, column: 49 },
end: { line: 1035, column: 1 }
},
line: 1032
},
'31': {
name: '(anonymous_31)',
decl: {
start: { line: 1047, column: 52 },
end: { line: 1047, column: 53 }
},
loc: {
start: { line: 1047, column: 63 },
end: { line: 1054, column: 1 }
},
line: 1047
},
'32': {
name: '(anonymous_32)',
decl: {
start: { line: 1063, column: 50 },
end: { line: 1063, column: 51 }
},
loc: {
start: { line: 1063, column: 61 },
end: { line: 1082, column: 1 }
},
line: 1063
},
'33': {
name: '(anonymous_33)',
decl: {
start: { line: 1088, column: 49 },
end: { line: 1088, column: 50 }
},
loc: {
start: { line: 1088, column: 60 },
end: { line: 1106, column: 1 }
},
line: 1088
},
'34': {
name: '(anonymous_34)',
decl: {
start: { line: 1108, column: 51 },
end: { line: 1108, column: 52 }
},
loc: {
start: { line: 1108, column: 62 },
end: { line: 1115, column: 1 }
},
line: 1108
},
'35': {
name: '(anonymous_35)',
decl: {
start: { line: 1120, column: 42 },
end: { line: 1120, column: 43 }
},
loc: {
start: { line: 1120, column: 53 },
end: { line: 1138, column: 1 }
},
line: 1120
},
'36': {
name: '(anonymous_36)',
decl: {
start: { line: 1140, column: 50 },
end: { line: 1140, column: 51 }
},
loc: {
start: { line: 1140, column: 61 },
end: { line: 1150, column: 1 }
},
line: 1140
},
'37': {
name: '(anonymous_37)',
decl: {
start: { line: 1152, column: 43 },
end: { line: 1152, column: 44 }
},
loc: {
start: { line: 1152, column: 54 },
end: { line: 1162, column: 1 }
},
line: 1152
},
'38': {
name: '(anonymous_38)',
decl: {
start: { line: 1164, column: 42 },
end: { line: 1164, column: 43 }
},
loc: {
start: { line: 1164, column: 53 },
end: { line: 1174, column: 1 }
},
line: 1164
},
'39': {
name: '(anonymous_39)',
decl: {
start: { line: 1176, column: 42 },
end: { line: 1176, column: 43 }
},
loc: {
start: { line: 1176, column: 53 },
end: { line: 1185, column: 1 }
},
line: 1176
},
'40': {
name: '(anonymous_40)',
decl: {
start: { line: 1187, column: 41 },
end: { line: 1187, column: 42 }
},
loc: {
start: { line: 1187, column: 52 },
end: { line: 1197, column: 1 }
},
line: 1187
},
'41': {
name: '(anonymous_41)',
decl: {
start: { line: 1199, column: 41 },
end: { line: 1199, column: 42 }
},
loc: {
start: { line: 1199, column: 52 },
end: { line: 1209, column: 1 }
},
line: 1199
},
'42': {
name: '(anonymous_42)',
decl: {
start: { line: 1211, column: 43 },
end: { line: 1211, column: 44 }
},
loc: {
start: { line: 1211, column: 54 },
end: { line: 1219, column: 1 }
},
line: 1211
},
'43': {
name: '(anonymous_43)',
decl: {
start: { line: 1221, column: 37 },
end: { line: 1221, column: 38 }
},
loc: {
start: { line: 1221, column: 51 },
end: { line: 1231, column: 1 }
},
line: 1221
},
'44': {
name: '(anonymous_44)',
decl: {
start: { line: 1233, column: 45 },
end: { line: 1233, column: 46 }
},
loc: {
start: { line: 1233, column: 68 },
end: { line: 1239, column: 1 }
},
line: 1233
},
'45': {
name: '(anonymous_45)',
decl: {
start: { line: 1241, column: 43 },
end: { line: 1241, column: 44 }
},
loc: {
start: { line: 1241, column: 64 },
end: { line: 1304, column: 1 }
},
line: 1241
},
'46': {
name: '(anonymous_46)',
decl: {
start: { line: 1306, column: 44 },
end: { line: 1306, column: 45 }
},
loc: {
start: { line: 1306, column: 66 },
end: { line: 1314, column: 1 }
},
line: 1306
},
'47': {
name: '(anonymous_47)',
decl: {
start: { line: 1320, column: 38 },
end: { line: 1320, column: 39 }
},
loc: { start: { line: 1326, column: 2 }, end: { line: 1333, column: 1 } },
line: 1326
},
'48': {
name: '(anonymous_48)',
decl: {
start: { line: 1338, column: 39 },
end: { line: 1338, column: 40 }
},
loc: {
start: { line: 1338, column: 54 },
end: { line: 1345, column: 1 }
},
line: 1338
},
'49': {
name: '(anonymous_49)',
decl: {
start: { line: 1347, column: 40 },
end: { line: 1347, column: 41 }
},
loc: {
start: { line: 1347, column: 54 },
end: { line: 1355, column: 1 }
},
line: 1347
},
'50': {
name: '(anonymous_50)',
decl: {
start: { line: 1363, column: 35 },
end: { line: 1363, column: 36 }
},
loc: {
start: { line: 1363, column: 49 },
end: { line: 1391, column: 1 }
},
line: 1363
},
'51': {
name: '(anonymous_51)',
decl: {
start: { line: 1401, column: 37 },
end: { line: 1401, column: 38 }
},
loc: {
start: { line: 1401, column: 51 },
end: { line: 1409, column: 1 }
},
line: 1401
},
'52': {
name: '(anonymous_52)',
decl: {
start: { line: 1414, column: 25 },
end: { line: 1414, column: 26 }
},
loc: {
start: { line: 1414, column: 40 },
end: { line: 1419, column: 1 }
},
line: 1414
},
'53': {
name: 'initTesselator',
decl: {
start: { line: 1423, column: 46 },
end: { line: 1423, column: 60 }
},
loc: {
start: { line: 1423, column: 63 },
end: { line: 1458, column: 1 }
},
line: 1423
},
'54': {
name: 'vertexCallback',
decl: {
start: { line: 1425, column: 11 },
end: { line: 1425, column: 25 }
},
loc: {
start: { line: 1425, column: 47 },
end: { line: 1429, column: 3 }
},
line: 1425
},
'55': {
name: 'begincallback',
decl: {
start: { line: 1431, column: 11 },
end: { line: 1431, column: 24 }
},
loc: {
start: { line: 1431, column: 31 },
end: { line: 1435, column: 3 }
},
line: 1431
},
'56': {
name: 'errorcallback',
decl: {
start: { line: 1437, column: 11 },
end: { line: 1437, column: 24 }
},
loc: {
start: { line: 1437, column: 32 },
end: { line: 1440, column: 3 }
},
line: 1437
},
'57': {
name: 'combinecallback',
decl: {
start: { line: 1442, column: 11 },
end: { line: 1442, column: 26 }
},
loc: {
start: { line: 1442, column: 49 },
end: { line: 1444, column: 3 }
},
line: 1442
},
'58': {
name: 'edgeCallback',
decl: {
start: { line: 1446, column: 11 },
end: { line: 1446, column: 23 }
},
loc: {
start: { line: 1446, column: 30 },
end: { line: 1448, column: 3 }
},
line: 1446
},
'59': {
name: '(anonymous_59)',
decl: {
start: { line: 1460, column: 39 },
end: { line: 1460, column: 40 }
},
loc: {
start: { line: 1460, column: 58 },
end: { line: 1484, column: 1 }
},
line: 1460
},
'60': {
name: '(anonymous_60)',
decl: {
start: { line: 1487, column: 46 },
end: { line: 1487, column: 47 }
},
loc: {
start: { line: 1487, column: 58 },
end: { line: 1494, column: 1 }
},
line: 1487
},
'61': {
name: '(anonymous_61)',
decl: {
start: { line: 1497, column: 49 },
end: { line: 1497, column: 50 }
},
loc: {
start: { line: 1497, column: 61 },
end: { line: 1502, column: 1 }
},
line: 1497
},
'62': {
name: '(anonymous_62)',
decl: {
start: { line: 1505, column: 43 },
end: { line: 1505, column: 44 }
},
loc: {
start: { line: 1505, column: 55 },
end: { line: 1512, column: 1 }
},
line: 1505
}
},
branchMap: {
'0': {
loc: { start: { line: 243, column: 2 }, end: { line: 247, column: 3 } },
type: 'if',
locations: [
{ start: { line: 243, column: 2 }, end: { line: 247, column: 3 } },
{ start: { line: 243, column: 2 }, end: { line: 247, column: 3 } }
],
line: 243
},
'1': {
loc: { start: { line: 254, column: 6 }, end: { line: 255, column: 77 } },
type: 'binary-expr',
locations: [
{ start: { line: 254, column: 6 }, end: { line: 254, column: 64 } },
{ start: { line: 255, column: 6 }, end: { line: 255, column: 77 } }
],
line: 254
},
'2': {
loc: { start: { line: 256, column: 4 }, end: { line: 266, column: 5 } },
type: 'if',
locations: [
{ start: { line: 256, column: 4 }, end: { line: 266, column: 5 } },
{ start: { line: 256, column: 4 }, end: { line: 266, column: 5 } }
],
line: 256
},
'3': {
loc: { start: { line: 281, column: 2 }, end: { line: 303, column: 3 } },
type: 'if',
locations: [
{ start: { line: 281, column: 2 }, end: { line: 303, column: 3 } },
{ start: { line: 281, column: 2 }, end: { line: 303, column: 3 } }
],
line: 281
},
'4': {
loc: { start: { line: 285, column: 17 }, end: { line: 285, column: 53 } },
type: 'binary-expr',
locations: [
{ start: { line: 285, column: 17 }, end: { line: 285, column: 36 } },
{ start: { line: 285, column: 40 }, end: { line: 285, column: 53 } }
],
line: 285
},
'5': {
loc: { start: { line: 292, column: 4 }, end: { line: 294, column: 5 } },
type: 'if',
locations: [
{ start: { line: 292, column: 4 }, end: { line: 294, column: 5 } },
{ start: { line: 292, column: 4 }, end: { line: 294, column: 5 } }
],
line: 292
},
'6': {
loc: { start: { line: 297, column: 4 }, end: { line: 301, column: 5 } },
type: 'if',
locations: [
{ start: { line: 297, column: 4 }, end: { line: 301, column: 5 } },
{ start: { line: 297, column: 4 }, end: { line: 301, column: 5 } }
],
line: 297
},
'7': {
loc: { start: { line: 314, column: 2 }, end: { line: 316, column: 3 } },
type: 'if',
locations: [
{ start: { line: 314, column: 2 }, end: { line: 316, column: 3 } },
{ start: { line: 314, column: 2 }, end: { line: 316, column: 3 } }
],
line: 314
},
'8': {
loc: { start: { line: 318, column: 2 }, end: { line: 324, column: 3 } },
type: 'if',
locations: [
{ start: { line: 318, column: 2 }, end: { line: 324, column: 3 } },
{ start: { line: 318, column: 2 }, end: { line: 324, column: 3 } }
],
line: 318
},
'9': {
loc: { start: { line: 477, column: 2 }, end: { line: 483, column: 3 } },
type: 'if',
locations: [
{ start: { line: 477, column: 2 }, end: { line: 483, column: 3 } },
{ start: { line: 477, column: 2 }, end: { line: 483, column: 3 } }
],
line: 477
},
'10': {
loc: { start: { line: 485, column: 2 }, end: { line: 501, column: 3 } },
type: 'if',
locations: [
{ start: { line: 485, column: 2 }, end: { line: 501, column: 3 } },
{ start: { line: 485, column: 2 }, end: { line: 501, column: 3 } }
],
line: 485
},
'11': {
loc: { start: { line: 487, column: 4 }, end: { line: 489, column: 5 } },
type: 'if',
locations: [
{ start: { line: 487, column: 4 }, end: { line: 489, column: 5 } },
{ start: { line: 487, column: 4 }, end: { line: 489, column: 5 } }
],
line: 487
},
'12': {
loc: { start: { line: 490, column: 4 }, end: { line: 494, column: 5 } },
type: 'if',
locations: [
{ start: { line: 490, column: 4 }, end: { line: 494, column: 5 } },
{ start: { line: 490, column: 4 }, end: { line: 494, column: 5 } }
],
line: 490
},
'13': {
loc: { start: { line: 496, column: 9 }, end: { line: 501, column: 3 } },
type: 'if',
locations: [
{ start: { line: 496, column: 9 }, end: { line: 501, column: 3 } },
{ start: { line: 496, column: 9 }, end: { line: 501, column: 3 } }
],
line: 496
},
'14': {
loc: { start: { line: 497, column: 4 }, end: { line: 500, column: 5 } },
type: 'if',
locations: [
{ start: { line: 497, column: 4 }, end: { line: 500, column: 5 } },
{ start: { line: 497, column: 4 }, end: { line: 500, column: 5 } }
],
line: 497
},
'15': {
loc: { start: { line: 503, column: 2 }, end: { line: 505, column: 3 } },
type: 'if',
locations: [
{ start: { line: 503, column: 2 }, end: { line: 505, column: 3 } },
{ start: { line: 503, column: 2 }, end: { line: 505, column: 3 } }
],
line: 503
},
'16': {
loc: { start: { line: 503, column: 6 }, end: { line: 503, column: 40 } },
type: 'binary-expr',
locations: [
{ start: { line: 503, column: 6 }, end: { line: 503, column: 27 } },
{ start: { line: 503, column: 31 }, end: { line: 503, column: 40 } }
],
line: 503
},
'17': {
loc: { start: { line: 507, column: 2 }, end: { line: 517, column: 3 } },
type: 'if',
locations: [
{ start: { line: 507, column: 2 }, end: { line: 517, column: 3 } },
{ start: { line: 507, column: 2 }, end: { line: 517, column: 3 } }
],
line: 507
},
'18': {
loc: { start: { line: 509, column: 6 }, end: { line: 515, column: 7 } },
type: 'if',
locations: [
{ start: { line: 509, column: 6 }, end: { line: 515, column: 7 } },
{ start: { line: 509, column: 6 }, end: { line: 515, column: 7 } }
],
line: 509
},
'19': {
loc: { start: { line: 523, column: 2 }, end: { line: 525, column: 3 } },
type: 'if',
locations: [
{ start: { line: 523, column: 2 }, end: { line: 525, column: 3 } },
{ start: { line: 523, column: 2 }, end: { line: 525, column: 3 } }
],
line: 523
},
'20': {
loc: { start: { line: 698, column: 2 }, end: { line: 721, column: 3 } },
type: 'if',
locations: [
{ start: { line: 698, column: 2 }, end: { line: 721, column: 3 } },
{ start: { line: 698, column: 2 }, end: { line: 721, column: 3 } }
],
line: 698
},
'21': {
loc: { start: { line: 699, column: 4 }, end: { line: 708, column: 29 } },
type: 'binary-expr',
locations: [
{ start: { line: 699, column: 4 }, end: { line: 699, column: 30 } },
{ start: { line: 700, column: 4 }, end: { line: 700, column: 31 } },
{ start: { line: 701, column: 4 }, end: { line: 701, column: 26 } },
{ start: { line: 702, column: 4 }, end: { line: 702, column: 28 } },
{ start: { line: 703, column: 4 }, end: { line: 703, column: 31 } },
{ start: { line: 704, column: 4 }, end: { line: 704, column: 29 } },
{ start: { line: 705, column: 4 }, end: { line: 705, column: 32 } },
{ start: { line: 706, column: 4 }, end: { line: 706, column: 30 } },
{ start: { line: 707, column: 4 }, end: { line: 707, column: 31 } },
{ start: { line: 708, column: 4 }, end: { line: 708, column: 29 } }
],
line: 699
},
'22': {
loc: { start: { line: 711, column: 7 }, end: { line: 721, column: 3 } },
type: 'if',
locations: [
{ start: { line: 711, column: 7 }, end: { line: 721, column: 3 } },
{ start: { line: 711, column: 7 }, end: { line: 721, column: 3 } }
],
line: 711
},
'23': {
loc: { start: { line: 712, column: 4 }, end: { line: 716, column: 28 } },
type: 'binary-expr',
locations: [
{ start: { line: 712, column: 4 }, end: { line: 712, column: 27 } },
{ start: { line: 713, column: 4 }, end: { line: 713, column: 30 } },
{ start: { line: 714, column: 4 }, end: { line: 714, column: 33 } },
{ start: { line: 715, column: 4 }, end: { line: 715, column: 33 } },
{ start: { line: 716, column: 4 }, end: { line: 716, column: 28 } }
],
line: 712
},
'24': {
loc: { start: { line: 725, column: 2 }, end: { line: 734, column: 3 } },
type: 'if',
locations: [
{ start: { line: 725, column: 2 }, end: { line: 734, column: 3 } },
{ start: { line: 725, column: 2 }, end: { line: 734, column: 3 } }
],
line: 725
},
'25': {
loc: { start: { line: 738, column: 2 }, end: { line: 743, column: 3 } },
type: 'if',
locations: [
{ start: { line: 738, column: 2 }, end: { line: 743, column: 3 } },
{ start: { line: 738, column: 2 }, end: { line: 743, column: 3 } }
],
line: 738
},
'26': {
loc: { start: { line: 786, column: 2 }, end: { line: 789, column: 3 } },
type: 'if',
locations: [
{ start: { line: 786, column: 2 }, end: { line: 789, column: 3 } },
{ start: { line: 786, column: 2 }, end: { line: 789, column: 3 } }
],
line: 786
},
'27': {
loc: { start: { line: 824, column: 2 }, end: { line: 829, column: 3 } },
type: 'if',
locations: [
{ start: { line: 824, column: 2 }, end: { line: 829, column: 3 } },
{ start: { line: 824, column: 2 }, end: { line: 829, column: 3 } }
],
line: 824
},
'28': {
loc: { start: { line: 835, column: 2 }, end: { line: 838, column: 3 } },
type: 'if',
locations: [
{ start: { line: 835, column: 2 }, end: { line: 838, column: 3 } },
{ start: { line: 835, column: 2 }, end: { line: 838, column: 3 } }
],
line: 835
},
'29': {
loc: { start: { line: 835, column: 6 }, end: { line: 835, column: 62 } },
type: 'binary-expr',
locations: [
{ start: { line: 835, column: 6 }, end: { line: 835, column: 37 } },
{ start: { line: 835, column: 41 }, end: { line: 835, column: 62 } }
],
line: 835
},
'30': {
loc: { start: { line: 877, column: 2 }, end: { line: 884, column: 3 } },
type: 'if',
locations: [
{ start: { line: 877, column: 2 }, end: { line: 884, column: 3 } },
{ start: { line: 877, column: 2 }, end: { line: 884, column: 3 } }
],
line: 877
},
'31': {
loc: { start: { line: 897, column: 13 }, end: { line: 897, column: 25 } },
type: 'binary-expr',
locations: [
{ start: { line: 897, column: 13 }, end: { line: 897, column: 20 } },
{ start: { line: 897, column: 24 }, end: { line: 897, column: 25 } }
],
line: 897
},
'32': {
loc: { start: { line: 898, column: 13 }, end: { line: 898, column: 25 } },
type: 'binary-expr',
locations: [
{ start: { line: 898, column: 13 }, end: { line: 898, column: 20 } },
{ start: { line: 898, column: 24 }, end: { line: 898, column: 25 } }
],
line: 898
},
'33': {
loc: { start: { line: 899, column: 13 }, end: { line: 899, column: 25 } },
type: 'binary-expr',
locations: [
{ start: { line: 899, column: 13 }, end: { line: 899, column: 20 } },
{ start: { line: 899, column: 24 }, end: { line: 899, column: 25 } }
],
line: 899
},
'34': {
loc: { start: { line: 900, column: 13 }, end: { line: 900, column: 25 } },
type: 'binary-expr',
locations: [
{ start: { line: 900, column: 13 }, end: { line: 900, column: 20 } },
{ start: { line: 900, column: 24 }, end: { line: 900, column: 25 } }
],
line: 900
},
'35': {
loc: { start: { line: 906, column: 2 }, end: { line: 916, column: 3 } },
type: 'if',
locations: [
{ start: { line: 906, column: 2 }, end: { line: 916, column: 3 } },
{ start: { line: 906, column: 2 }, end: { line: 916, column: 3 } }
],
line: 906
},
'36': {
loc: { start: { line: 929, column: 2 }, end: { line: 933, column: 3 } },
type: 'if',
locations: [
{ start: { line: 929, column: 2 }, end: { line: 933, column: 3 } },
{ start: { line: 929, column: 2 }, end: { line: 933, column: 3 } }
],
line: 929
},
'37': {
loc: { start: { line: 952, column: 2 }, end: { line: 954, column: 3 } },
type: 'if',
locations: [
{ start: { line: 952, column: 2 }, end: { line: 954, column: 3 } },
{ start: { line: 952, column: 2 }, end: { line: 954, column: 3 } }
],
line: 952
},
'38': {
loc: { start: { line: 1050, column: 2 }, end: { line: 1052, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1050, column: 2 }, end: { line: 1052, column: 3 } },
{ start: { line: 1050, column: 2 }, end: { line: 1052, column: 3 } }
],
line: 1050
},
'39': {
loc: {
start: { line: 1050, column: 6 },
end: { line: 1050, column: 41 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1050, column: 6 }, end: { line: 1050, column: 13 } },
{ start: { line: 1050, column: 17 }, end: { line: 1050, column: 41 } }
],
line: 1050
},
'40': {
loc: { start: { line: 1065, column: 2 }, end: { line: 1069, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1065, column: 2 }, end: { line: 1069, column: 3 } },
{ start: { line: 1065, column: 2 }, end: { line: 1069, column: 3 } }
],
line: 1065
},
'41': {
loc: { start: { line: 1066, column: 4 }, end: { line: 1068, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1066, column: 4 }, end: { line: 1068, column: 5 } },
{ start: { line: 1066, column: 4 }, end: { line: 1068, column: 5 } }
],
line: 1066
},
'42': {
loc: {
start: { line: 1066, column: 8 },
end: { line: 1066, column: 39 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1066, column: 8 }, end: { line: 1066, column: 13 } },
{ start: { line: 1066, column: 17 }, end: { line: 1066, column: 39 } }
],
line: 1066
},
'43': {
loc: { start: { line: 1070, column: 2 }, end: { line: 1080, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1070, column: 2 }, end: { line: 1080, column: 3 } },
{ start: { line: 1070, column: 2 }, end: { line: 1080, column: 3 } }
],
line: 1070
},
'44': {
loc: { start: { line: 1071, column: 4 }, end: { line: 1073, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1071, column: 4 }, end: { line: 1073, column: 5 } },
{ start: { line: 1071, column: 4 }, end: { line: 1073, column: 5 } }
],
line: 1071
},
'45': {
loc: {
start: { line: 1071, column: 8 },
end: { line: 1071, column: 38 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1071, column: 8 }, end: { line: 1071, column: 13 } },
{ start: { line: 1071, column: 17 }, end: { line: 1071, column: 38 } }
],
line: 1071
},
'46': {
loc: { start: { line: 1074, column: 9 }, end: { line: 1080, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1074, column: 9 }, end: { line: 1080, column: 3 } },
{ start: { line: 1074, column: 9 }, end: { line: 1080, column: 3 } }
],
line: 1074
},
'47': {
loc: { start: { line: 1075, column: 4 }, end: { line: 1077, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1075, column: 4 }, end: { line: 1077, column: 5 } },
{ start: { line: 1075, column: 4 }, end: { line: 1077, column: 5 } }
],
line: 1075
},
'48': {
loc: {
start: { line: 1075, column: 8 },
end: { line: 1075, column: 40 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1075, column: 8 }, end: { line: 1075, column: 13 } },
{ start: { line: 1075, column: 17 }, end: { line: 1075, column: 40 } }
],
line: 1075
},
'49': {
loc: { start: { line: 1078, column: 9 }, end: { line: 1080, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1078, column: 9 }, end: { line: 1080, column: 3 } },
{ start: { line: 1078, column: 9 }, end: { line: 1080, column: 3 } }
],
line: 1078
},
'50': {
loc: { start: { line: 1089, column: 2 }, end: { line: 1091, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1089, column: 2 }, end: { line: 1091, column: 3 } },
{ start: { line: 1089, column: 2 }, end: { line: 1091, column: 3 } }
],
line: 1089
},
'51': {
loc: { start: { line: 1094, column: 2 }, end: { line: 1104, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1094, column: 2 }, end: { line: 1104, column: 3 } },
{ start: { line: 1094, column: 2 }, end: { line: 1104, column: 3 } }
],
line: 1094
},
'52': {
loc: { start: { line: 1095, column: 4 }, end: { line: 1097, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1095, column: 4 }, end: { line: 1097, column: 5 } },
{ start: { line: 1095, column: 4 }, end: { line: 1097, column: 5 } }
],
line: 1095
},
'53': {
loc: {
start: { line: 1095, column: 8 },
end: { line: 1095, column: 38 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1095, column: 8 }, end: { line: 1095, column: 13 } },
{ start: { line: 1095, column: 17 }, end: { line: 1095, column: 38 } }
],
line: 1095
},
'54': {
loc: { start: { line: 1098, column: 9 }, end: { line: 1104, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1098, column: 9 }, end: { line: 1104, column: 3 } },
{ start: { line: 1098, column: 9 }, end: { line: 1104, column: 3 } }
],
line: 1098
},
'55': {
loc: { start: { line: 1099, column: 4 }, end: { line: 1101, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1099, column: 4 }, end: { line: 1101, column: 5 } },
{ start: { line: 1099, column: 4 }, end: { line: 1101, column: 5 } }
],
line: 1099
},
'56': {
loc: {
start: { line: 1099, column: 8 },
end: { line: 1099, column: 40 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1099, column: 8 }, end: { line: 1099, column: 13 } },
{ start: { line: 1099, column: 17 }, end: { line: 1099, column: 40 } }
],
line: 1099
},
'57': {
loc: { start: { line: 1102, column: 9 }, end: { line: 1104, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1102, column: 9 }, end: { line: 1104, column: 3 } },
{ start: { line: 1102, column: 9 }, end: { line: 1104, column: 3 } }
],
line: 1102
},
'58': {
loc: { start: { line: 1111, column: 2 }, end: { line: 1113, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1111, column: 2 }, end: { line: 1113, column: 3 } },
{ start: { line: 1111, column: 2 }, end: { line: 1113, column: 3 } }
],
line: 1111
},
'59': {
loc: {
start: { line: 1111, column: 6 },
end: { line: 1111, column: 38 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1111, column: 6 }, end: { line: 1111, column: 12 } },
{ start: { line: 1111, column: 16 }, end: { line: 1111, column: 38 } }
],
line: 1111
},
'60': {
loc: { start: { line: 1121, column: 2 }, end: { line: 1135, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1121, column: 2 }, end: { line: 1135, column: 3 } },
{ start: { line: 1121, column: 2 }, end: { line: 1135, column: 3 } }
],
line: 1121
},
'61': {
loc: { start: { line: 1122, column: 4 }, end: { line: 1134, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1122, column: 4 }, end: { line: 1134, column: 5 } },
{ start: { line: 1122, column: 4 }, end: { line: 1134, column: 5 } }
],
line: 1122
},
'62': {
loc: { start: { line: 1141, column: 2 }, end: { line: 1147, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1141, column: 2 }, end: { line: 1147, column: 3 } },
{ start: { line: 1141, column: 2 }, end: { line: 1147, column: 3 } }
],
line: 1141
},
'63': {
loc: { start: { line: 1153, column: 2 }, end: { line: 1159, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1153, column: 2 }, end: { line: 1159, column: 3 } },
{ start: { line: 1153, column: 2 }, end: { line: 1159, column: 3 } }
],
line: 1153
},
'64': {
loc: { start: { line: 1165, column: 2 }, end: { line: 1171, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1165, column: 2 }, end: { line: 1171, column: 3 } },
{ start: { line: 1165, column: 2 }, end: { line: 1171, column: 3 } }
],
line: 1165
},
'65': {
loc: { start: { line: 1177, column: 2 }, end: { line: 1183, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1177, column: 2 }, end: { line: 1183, column: 3 } },
{ start: { line: 1177, column: 2 }, end: { line: 1183, column: 3 } }
],
line: 1177
},
'66': {
loc: { start: { line: 1188, column: 2 }, end: { line: 1194, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1188, column: 2 }, end: { line: 1194, column: 3 } },
{ start: { line: 1188, column: 2 }, end: { line: 1194, column: 3 } }
],
line: 1188
},
'67': {
loc: { start: { line: 1200, column: 2 }, end: { line: 1207, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1200, column: 2 }, end: { line: 1207, column: 3 } },
{ start: { line: 1200, column: 2 }, end: { line: 1207, column: 3 } }
],
line: 1200
},
'68': {
loc: { start: { line: 1212, column: 2 }, end: { line: 1217, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1212, column: 2 }, end: { line: 1217, column: 3 } },
{ start: { line: 1212, column: 2 }, end: { line: 1217, column: 3 } }
],
line: 1212
},
'69': {
loc: {
start: { line: 1225, column: 4 },
end: { line: 1225, column: 44 }
},
type: 'if',
locations: [
{ start: { line: 1225, column: 4 }, end: { line: 1225, column: 44 } },
{ start: { line: 1225, column: 4 }, end: { line: 1225, column: 44 } }
],
line: 1225
},
'70': {
loc: { start: { line: 1247, column: 2 }, end: { line: 1249, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1247, column: 2 }, end: { line: 1249, column: 3 } },
{ start: { line: 1247, column: 2 }, end: { line: 1249, column: 3 } }
],
line: 1247
},
'71': {
loc: {
start: { line: 1327, column: 2 },
end: { line: 1327, column: 45 }
},
type: 'if',
locations: [
{ start: { line: 1327, column: 2 }, end: { line: 1327, column: 45 } },
{ start: { line: 1327, column: 2 }, end: { line: 1327, column: 45 } }
],
line: 1327
},
'72': {
loc: { start: { line: 1329, column: 2 }, end: { line: 1332, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1329, column: 2 }, end: { line: 1332, column: 3 } },
{ start: { line: 1329, column: 2 }, end: { line: 1332, column: 3 } }
],
line: 1329
},
'73': {
loc: {
start: { line: 1330, column: 22 },
end: { line: 1330, column: 42 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1330, column: 22 }, end: { line: 1330, column: 26 } },
{ start: { line: 1330, column: 30 }, end: { line: 1330, column: 42 } }
],
line: 1330
},
'74': {
loc: {
start: { line: 1331, column: 37 },
end: { line: 1331, column: 65 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1331, column: 37 }, end: { line: 1331, column: 42 } },
{ start: { line: 1331, column: 46 }, end: { line: 1331, column: 65 } }
],
line: 1331
},
'75': {
loc: {
start: { line: 1340, column: 2 },
end: { line: 1340, column: 41 }
},
type: 'if',
locations: [
{ start: { line: 1340, column: 2 }, end: { line: 1340, column: 41 } },
{ start: { line: 1340, column: 2 }, end: { line: 1340, column: 41 } }
],
line: 1340
},
'76': {
loc: {
start: { line: 1342, column: 4 },
end: { line: 1342, column: 36 }
},
type: 'if',
locations: [
{ start: { line: 1342, column: 4 }, end: { line: 1342, column: 36 } },
{ start: { line: 1342, column: 4 }, end: { line: 1342, column: 36 } }
],
line: 1342
},
'77': {
loc: { start: { line: 1365, column: 2 }, end: { line: 1390, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1365, column: 2 }, end: { line: 1390, column: 3 } },
{ start: { line: 1365, column: 2 }, end: { line: 1390, column: 3 } }
],
line: 1365
},
'78': {
loc: { start: { line: 1367, column: 9 }, end: { line: 1390, column: 3 } },
type: 'if',
locations: [
{ start: { line: 1367, column: 9 }, end: { line: 1390, column: 3 } },
{ start: { line: 1367, column: 9 }, end: { line: 1390, column: 3 } }
],
line: 1367
},
'79': {
loc: {
start: { line: 1383, column: 13 },
end: { line: 1383, column: 63 }
},
type: 'binary-expr',
locations: [
{ start: { line: 1383, column: 13 }, end: { line: 1383, column: 25 } },
{ start: { line: 1383, column: 29 }, end: { line: 1383, column: 63 } }
],
line: 1383
},
'80': {
loc: { start: { line: 1378, column: 6 }, end: { line: 1382, column: 7 } },
type: 'if',
locations: [
{ start: { line: 1378, column: 6 }, end: { line: 1382, column: 7 } },
{ start: { line: 1378, column: 6 }, end: { line: 1382, column: 7 } }
],
line: 1378
},
'81': {
loc: { start: { line: 1415, column: 2 }, end: { line: 1418, column: 6 } },
type: 'if',
locations: [
{ start: { line: 1415, column: 2 }, end: { line: 1418, column: 6 } },
{ start: { line: 1415, column: 2 }, end: { line: 1418, column: 6 } }
],
line: 1415
},
'82': {
loc: { start: { line: 1432, column: 4 }, end: { line: 1434, column: 5 } },
type: 'if',
locations: [
{ start: { line: 1432, column: 4 }, end: { line: 1434, column: 5 } },
{ start: { line: 1432, column: 4 }, end: { line: 1434, column: 5 } }
],
line: 1432
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0,
'123': 0,
'124': 0,
'125': 0,
'126': 0,
'127': 0,
'128': 0,
'129': 0,
'130': 0,
'131': 0,
'132': 0,
'133': 0,
'134': 0,
'135': 0,
'136': 0,
'137': 0,
'138': 0,
'139': 0,
'140': 0,
'141': 0,
'142': 0,
'143': 0,
'144': 0,
'145': 0,
'146': 0,
'147': 0,
'148': 0,
'149': 0,
'150': 0,
'151': 0,
'152': 0,
'153': 0,
'154': 0,
'155': 0,
'156': 0,
'157': 0,
'158': 0,
'159': 0,
'160': 0,
'161': 0,
'162': 0,
'163': 0,
'164': 0,
'165': 0,
'166': 0,
'167': 0,
'168': 0,
'169': 0,
'170': 0,
'171': 0,
'172': 0,
'173': 0,
'174': 0,
'175': 0,
'176': 0,
'177': 0,
'178': 0,
'179': 0,
'180': 0,
'181': 0,
'182': 0,
'183': 0,
'184': 0,
'185': 0,
'186': 0,
'187': 0,
'188': 0,
'189': 0,
'190': 0,
'191': 0,
'192': 0,
'193': 0,
'194': 0,
'195': 0,
'196': 0,
'197': 0,
'198': 0,
'199': 0,
'200': 0,
'201': 0,
'202': 0,
'203': 0,
'204': 0,
'205': 0,
'206': 0,
'207': 0,
'208': 0,
'209': 0,
'210': 0,
'211': 0,
'212': 0,
'213': 0,
'214': 0,
'215': 0,
'216': 0,
'217': 0,
'218': 0,
'219': 0,
'220': 0,
'221': 0,
'222': 0,
'223': 0,
'224': 0,
'225': 0,
'226': 0,
'227': 0,
'228': 0,
'229': 0,
'230': 0,
'231': 0,
'232': 0,
'233': 0,
'234': 0,
'235': 0,
'236': 0,
'237': 0,
'238': 0,
'239': 0,
'240': 0,
'241': 0,
'242': 0,
'243': 0,
'244': 0,
'245': 0,
'246': 0,
'247': 0,
'248': 0,
'249': 0,
'250': 0,
'251': 0,
'252': 0,
'253': 0,
'254': 0,
'255': 0,
'256': 0,
'257': 0,
'258': 0,
'259': 0,
'260': 0,
'261': 0,
'262': 0,
'263': 0,
'264': 0,
'265': 0,
'266': 0,
'267': 0,
'268': 0,
'269': 0,
'270': 0,
'271': 0,
'272': 0,
'273': 0,
'274': 0,
'275': 0,
'276': 0,
'277': 0,
'278': 0,
'279': 0,
'280': 0,
'281': 0,
'282': 0,
'283': 0,
'284': 0,
'285': 0,
'286': 0,
'287': 0,
'288': 0,
'289': 0,
'290': 0,
'291': 0,
'292': 0,
'293': 0,
'294': 0,
'295': 0,
'296': 0,
'297': 0,
'298': 0,
'299': 0,
'300': 0,
'301': 0,
'302': 0,
'303': 0,
'304': 0,
'305': 0,
'306': 0,
'307': 0,
'308': 0,
'309': 0,
'310': 0,
'311': 0,
'312': 0,
'313': 0,
'314': 0,
'315': 0,
'316': 0,
'317': 0,
'318': 0,
'319': 0,
'320': 0,
'321': 0,
'322': 0,
'323': 0,
'324': 0,
'325': 0,
'326': 0,
'327': 0,
'328': 0,
'329': 0,
'330': 0,
'331': 0,
'332': 0,
'333': 0,
'334': 0,
'335': 0,
'336': 0,
'337': 0,
'338': 0,
'339': 0,
'340': 0,
'341': 0,
'342': 0,
'343': 0,
'344': 0,
'345': 0,
'346': 0,
'347': 0,
'348': 0,
'349': 0,
'350': 0,
'351': 0,
'352': 0,
'353': 0,
'354': 0,
'355': 0,
'356': 0,
'357': 0,
'358': 0,
'359': 0,
'360': 0,
'361': 0,
'362': 0,
'363': 0,
'364': 0,
'365': 0,
'366': 0,
'367': 0,
'368': 0,
'369': 0,
'370': 0,
'371': 0,
'372': 0,
'373': 0,
'374': 0,
'375': 0,
'376': 0,
'377': 0,
'378': 0,
'379': 0,
'380': 0,
'381': 0,
'382': 0,
'383': 0,
'384': 0,
'385': 0,
'386': 0,
'387': 0,
'388': 0,
'389': 0,
'390': 0,
'391': 0,
'392': 0,
'393': 0,
'394': 0,
'395': 0,
'396': 0,
'397': 0,
'398': 0,
'399': 0,
'400': 0,
'401': 0,
'402': 0,
'403': 0,
'404': 0,
'405': 0,
'406': 0,
'407': 0,
'408': 0,
'409': 0,
'410': 0,
'411': 0,
'412': 0,
'413': 0,
'414': 0,
'415': 0,
'416': 0,
'417': 0,
'418': 0,
'419': 0,
'420': 0,
'421': 0,
'422': 0,
'423': 0,
'424': 0,
'425': 0,
'426': 0,
'427': 0,
'428': 0,
'429': 0,
'430': 0,
'431': 0,
'432': 0,
'433': 0,
'434': 0,
'435': 0,
'436': 0,
'437': 0,
'438': 0,
'439': 0,
'440': 0,
'441': 0,
'442': 0,
'443': 0,
'444': 0,
'445': 0,
'446': 0,
'447': 0,
'448': 0,
'449': 0,
'450': 0,
'451': 0,
'452': 0,
'453': 0,
'454': 0,
'455': 0,
'456': 0,
'457': 0,
'458': 0,
'459': 0,
'460': 0,
'461': 0,
'462': 0,
'463': 0,
'464': 0,
'465': 0,
'466': 0,
'467': 0,
'468': 0,
'469': 0,
'470': 0,
'471': 0,
'472': 0,
'473': 0,
'474': 0,
'475': 0,
'476': 0,
'477': 0,
'478': 0,
'479': 0,
'480': 0,
'481': 0,
'482': 0,
'483': 0,
'484': 0,
'485': 0,
'486': 0,
'487': 0,
'488': 0,
'489': 0,
'490': 0,
'491': 0,
'492': 0,
'493': 0,
'494': 0,
'495': 0,
'496': 0,
'497': 0,
'498': 0,
'499': 0,
'500': 0,
'501': 0,
'502': 0,
'503': 0,
'504': 0,
'505': 0,
'506': 0,
'507': 0,
'508': 0,
'509': 0,
'510': 0,
'511': 0,
'512': 0,
'513': 0,
'514': 0,
'515': 0,
'516': 0,
'517': 0,
'518': 0,
'519': 0,
'520': 0,
'521': 0,
'522': 0,
'523': 0,
'524': 0,
'525': 0,
'526': 0,
'527': 0,
'528': 0,
'529': 0,
'530': 0,
'531': 0,
'532': 0,
'533': 0,
'534': 0,
'535': 0,
'536': 0,
'537': 0,
'538': 0,
'539': 0,
'540': 0,
'541': 0,
'542': 0,
'543': 0,
'544': 0,
'545': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0],
'20': [0, 0],
'21': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
'22': [0, 0],
'23': [0, 0, 0, 0, 0],
'24': [0, 0],
'25': [0, 0],
'26': [0, 0],
'27': [0, 0],
'28': [0, 0],
'29': [0, 0],
'30': [0, 0],
'31': [0, 0],
'32': [0, 0],
'33': [0, 0],
'34': [0, 0],
'35': [0, 0],
'36': [0, 0],
'37': [0, 0],
'38': [0, 0],
'39': [0, 0],
'40': [0, 0],
'41': [0, 0],
'42': [0, 0],
'43': [0, 0],
'44': [0, 0],
'45': [0, 0],
'46': [0, 0],
'47': [0, 0],
'48': [0, 0],
'49': [0, 0],
'50': [0, 0],
'51': [0, 0],
'52': [0, 0],
'53': [0, 0],
'54': [0, 0],
'55': [0, 0],
'56': [0, 0],
'57': [0, 0],
'58': [0, 0],
'59': [0, 0],
'60': [0, 0],
'61': [0, 0],
'62': [0, 0],
'63': [0, 0],
'64': [0, 0],
'65': [0, 0],
'66': [0, 0],
'67': [0, 0],
'68': [0, 0],
'69': [0, 0],
'70': [0, 0],
'71': [0, 0],
'72': [0, 0],
'73': [0, 0],
'74': [0, 0],
'75': [0, 0],
'76': [0, 0],
'77': [0, 0],
'78': [0, 0],
'79': [0, 0],
'80': [0, 0],
'81': [0, 0],
'82': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: 'ef82bd075bafd7a3e0cc824799040b0f1e4c96e7'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
var constants = _interopRequireWildcard(_dereq_('../core/constants'));
var _libtess = _interopRequireDefault(_dereq_('libtess'));
_dereq_('./p5.Shader');
_dereq_('./p5.Camera');
_dereq_('../core/p5.Renderer');
_dereq_('./p5.Matrix');
var _path = _dereq_('path');
function _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function _getRequireWildcardCache() {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || (_typeof(obj) !== 'object' && typeof obj !== 'function')) {
return { default: obj };
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
}
function _nonIterableSpread() {
throw new TypeError('Invalid attempt to spread non-iterable instance');
}
function _iterableToArray(iter) {
if (
Symbol.iterator in Object(iter) ||
Object.prototype.toString.call(iter) === '[object Arguments]'
)
return Array.from(iter);
}
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
arr2[i] = arr[i];
}
return arr2;
}
}
var lightingShader = (cov_1rqo8cuxsf.s[0]++,
'precision highp float;\nprecision highp int;\n\nuniform mat4 uViewMatrix;\n\nuniform bool uUseLighting;\n\nuniform int uAmbientLightCount;\nuniform vec3 uAmbientColor[5];\n\nuniform int uDirectionalLightCount;\nuniform vec3 uLightingDirection[5];\nuniform vec3 uDirectionalDiffuseColors[5];\nuniform vec3 uDirectionalSpecularColors[5];\n\nuniform int uPointLightCount;\nuniform vec3 uPointLightLocation[5];\nuniform vec3 uPointLightDiffuseColors[5];\t\nuniform vec3 uPointLightSpecularColors[5];\n\nuniform int uSpotLightCount;\nuniform float uSpotLightAngle[5];\nuniform float uSpotLightConc[5];\nuniform vec3 uSpotLightDiffuseColors[5];\nuniform vec3 uSpotLightSpecularColors[5];\nuniform vec3 uSpotLightLocation[5];\nuniform vec3 uSpotLightDirection[5];\n\nuniform bool uSpecular;\nuniform float uShininess;\n\nuniform float uConstantAttenuation;\nuniform float uLinearAttenuation;\nuniform float uQuadraticAttenuation;\n\nconst float specularFactor = 2.0;\nconst float diffuseFactor = 0.73;\n\nstruct LightResult {\n float specular;\n float diffuse;\n};\n\nfloat _phongSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float shininess) {\n\n vec3 R = reflect(lightDirection, surfaceNormal);\n return pow(max(0.0, dot(R, viewDirection)), shininess);\n}\n\nfloat _lambertDiffuse(vec3 lightDirection, vec3 surfaceNormal) {\n return max(0.0, dot(-lightDirection, surfaceNormal));\n}\n\nLightResult _light(vec3 viewDirection, vec3 normal, vec3 lightVector) {\n\n vec3 lightDir = normalize(lightVector);\n\n //compute our diffuse & specular terms\n LightResult lr;\n if (uSpecular)\n lr.specular = _phongSpecular(lightDir, viewDirection, normal, uShininess);\n lr.diffuse = _lambertDiffuse(lightDir, normal);\n return lr;\n}\n\nvoid totalLight(\n vec3 modelPosition,\n vec3 normal,\n out vec3 totalDiffuse,\n out vec3 totalSpecular\n) {\n\n totalSpecular = vec3(0.0);\n\n if (!uUseLighting) {\n totalDiffuse = vec3(1.0);\n return;\n }\n\n totalDiffuse = vec3(0.0);\n\n vec3 viewDirection = normalize(-modelPosition);\n\n for (int j = 0; j < 5; j++) {\n if (j < uDirectionalLightCount) {\n vec3 lightVector = (uViewMatrix * vec4(uLightingDirection[j], 0.0)).xyz;\n vec3 lightColor = uDirectionalDiffuseColors[j];\n vec3 specularColor = uDirectionalSpecularColors[j];\n LightResult result = _light(viewDirection, normal, lightVector);\n totalDiffuse += result.diffuse * lightColor;\n totalSpecular += result.specular * lightColor * specularColor;\n }\n\n if (j < uPointLightCount) {\n vec3 lightPosition = (uViewMatrix * vec4(uPointLightLocation[j], 1.0)).xyz;\n vec3 lightVector = modelPosition - lightPosition;\n \n //calculate attenuation\n float lightDistance = length(lightVector);\n float lightFalloff = 1.0 / (uConstantAttenuation + lightDistance * uLinearAttenuation + (lightDistance * lightDistance) * uQuadraticAttenuation);\n vec3 lightColor = lightFalloff * uPointLightDiffuseColors[j];\n vec3 specularColor = lightFalloff * uPointLightSpecularColors[j];\n\n LightResult result = _light(viewDirection, normal, lightVector);\n totalDiffuse += result.diffuse * lightColor;\n totalSpecular += result.specular * lightColor * specularColor;\n }\n\n if(j < uSpotLightCount) {\n vec3 lightPosition = (uViewMatrix * vec4(uSpotLightLocation[j], 1.0)).xyz;\n vec3 lightVector = modelPosition - lightPosition;\n \n float lightDistance = length(lightVector);\n float lightFalloff = 1.0 / (uConstantAttenuation + lightDistance * uLinearAttenuation + (lightDistance * lightDistance) * uQuadraticAttenuation);\n\n vec3 lightDirection = (uViewMatrix * vec4(uSpotLightDirection[j], 0.0)).xyz;\n float spotDot = dot(normalize(lightVector), normalize(lightDirection));\n float spotFalloff;\n if(spotDot < uSpotLightAngle[j]) {\n spotFalloff = 0.0;\n }\n else {\n spotFalloff = pow(spotDot, uSpotLightConc[j]);\n }\n lightFalloff *= spotFalloff;\n\n vec3 lightColor = uSpotLightDiffuseColors[j];\n vec3 specularColor = uSpotLightSpecularColors[j];\n \n LightResult result = _light(viewDirection, normal, lightVector);\n \n totalDiffuse += result.diffuse * lightColor * lightFalloff;\n totalSpecular += result.specular * lightColor * specularColor * lightFalloff;\n }\n }\n\n totalDiffuse *= diffuseFactor;\n totalSpecular *= specularFactor;\n}\n');
var defaultShaders = (cov_1rqo8cuxsf.s[1]++,
{
immediateVert:
'attribute vec3 aPosition;\nattribute vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uResolution;\nuniform float uPointSize;\n\nvarying vec4 vColor;\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vColor = aVertexColor;\n gl_PointSize = uPointSize;\n}\n',
vertexColorVert:
'attribute vec3 aPosition;\nattribute vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vColor = aVertexColor;\n}\n',
vertexColorFrag:
'precision mediump float;\nvarying vec4 vColor;\nvoid main(void) {\n gl_FragColor = vColor;\n}',
normalVert:
'attribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\n\nvarying vec3 vVertexNormal;\nvarying highp vec2 vVertTexCoord;\n\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vVertexNormal = normalize(vec3( uNormalMatrix * aNormal ));\n vVertTexCoord = aTexCoord;\n}\n',
normalFrag:
'precision mediump float;\nvarying vec3 vVertexNormal;\nvoid main(void) {\n gl_FragColor = vec4(vVertexNormal, 1.0);\n}',
basicFrag:
'precision mediump float;\nuniform vec4 uMaterialColor;\nvoid main(void) {\n gl_FragColor = uMaterialColor;\n}',
lightVert:
lightingShader +
'// include lighting.glgl\n\nattribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\n\nvarying highp vec2 vVertTexCoord;\nvarying vec3 vDiffuseColor;\nvarying vec3 vSpecularColor;\n\nvoid main(void) {\n\n vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * viewModelPosition;\n\n vec3 vertexNormal = normalize(uNormalMatrix * aNormal);\n vVertTexCoord = aTexCoord;\n\n totalLight(viewModelPosition.xyz, vertexNormal, vDiffuseColor, vSpecularColor);\n\n for (int i = 0; i < 8; i++) {\n if (i < uAmbientLightCount) {\n vDiffuseColor += uAmbientColor[i];\n }\n }\n}\n',
lightTextureFrag:
'precision highp float;\n\nuniform vec4 uMaterialColor;\nuniform vec4 uTint;\nuniform sampler2D uSampler;\nuniform bool isTexture;\nuniform bool uEmissive;\n\nvarying highp vec2 vVertTexCoord;\nvarying vec3 vDiffuseColor;\nvarying vec3 vSpecularColor;\n\nvoid main(void) {\n if(uEmissive && !isTexture) {\n gl_FragColor = uMaterialColor;\n }\n else {\n gl_FragColor = isTexture ? texture2D(uSampler, vVertTexCoord) * (uTint / vec4(255, 255, 255, 255)) : uMaterialColor;\n gl_FragColor.rgb = gl_FragColor.rgb * vDiffuseColor + vSpecularColor;\n }\n}',
phongVert:
'precision highp float;\nprecision highp int;\n\nattribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nuniform vec3 uAmbientColor[5];\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\nuniform int uAmbientLightCount;\n\nvarying vec3 vNormal;\nvarying vec2 vTexCoord;\nvarying vec3 vViewPosition;\nvarying vec3 vAmbientColor;\n\nvoid main(void) {\n\n vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0);\n\n // Pass varyings to fragment shader\n vViewPosition = viewModelPosition.xyz;\n gl_Position = uProjectionMatrix * viewModelPosition; \n\n vNormal = uNormalMatrix * aNormal;\n vTexCoord = aTexCoord;\n\n // TODO: this should be a uniform\n vAmbientColor = vec3(0.0);\n for (int i = 0; i < 5; i++) {\n if (i < uAmbientLightCount) {\n vAmbientColor += uAmbientColor[i];\n }\n }\n}\n',
phongFrag:
lightingShader +
'// include lighting.glsl\nprecision highp float;\nprecision highp int;\n\nuniform vec4 uMaterialColor;\nuniform vec4 uTint;\nuniform sampler2D uSampler;\nuniform bool isTexture;\nuniform bool uEmissive;\n\nvarying vec3 vNormal;\nvarying vec2 vTexCoord;\nvarying vec3 vViewPosition;\nvarying vec3 vAmbientColor;\n\nvoid main(void) {\n\n vec3 diffuse;\n vec3 specular;\n totalLight(vViewPosition, normalize(vNormal), diffuse, specular);\n\n if(uEmissive && !isTexture) {\n gl_FragColor = uMaterialColor;\n }\n else {\n gl_FragColor = isTexture ? texture2D(uSampler, vTexCoord) * (uTint / vec4(255, 255, 255, 255)) : uMaterialColor;\n gl_FragColor.rgb = gl_FragColor.rgb * (diffuse + vAmbientColor) + specular;\n }\n}',
fontVert:
"precision mediump float;\n\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nuniform vec4 uGlyphRect;\nuniform float uGlyphOffset;\n\nvarying vec2 vTexCoord;\nvarying float w;\n\nvoid main() {\n vec4 positionVec4 = vec4(aPosition, 1.0);\n\n // scale by the size of the glyph's rectangle\n positionVec4.xy *= uGlyphRect.zw - uGlyphRect.xy;\n\n // move to the corner of the glyph\n positionVec4.xy += uGlyphRect.xy;\n\n // move to the letter's line offset\n positionVec4.x += uGlyphOffset;\n \n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vTexCoord = aTexCoord;\n w = gl_Position.w;\n}\n",
fontFrag:
"#extension GL_OES_standard_derivatives : enable\nprecision mediump float;\n\n#if 0\n // simulate integer math using floats\n\t#define int float\n\t#define ivec2 vec2\n\t#define INT(x) float(x)\n\n\tint ifloor(float v) { return floor(v); }\n\tivec2 ifloor(vec2 v) { return floor(v); }\n\n#else\n // use native integer math\n\tprecision highp int;\n\t#define INT(x) x\n\n\tint ifloor(float v) { return int(v); }\n\tint ifloor(int v) { return v; }\n\tivec2 ifloor(vec2 v) { return ivec2(v); }\n\n#endif\n\nuniform sampler2D uSamplerStrokes;\nuniform sampler2D uSamplerRowStrokes;\nuniform sampler2D uSamplerRows;\nuniform sampler2D uSamplerColStrokes;\nuniform sampler2D uSamplerCols;\n\nuniform ivec2 uStrokeImageSize;\nuniform ivec2 uCellsImageSize;\nuniform ivec2 uGridImageSize;\n\nuniform ivec2 uGridOffset;\nuniform ivec2 uGridSize;\nuniform vec4 uMaterialColor;\n\nvarying vec2 vTexCoord;\n\n// some helper functions\nint round(float v) { return ifloor(v + 0.5); }\nivec2 round(vec2 v) { return ifloor(v + 0.5); }\nfloat saturate(float v) { return clamp(v, 0.0, 1.0); }\nvec2 saturate(vec2 v) { return clamp(v, 0.0, 1.0); }\n\nint mul(float v1, int v2) {\n return ifloor(v1 * float(v2));\n}\n\nivec2 mul(vec2 v1, ivec2 v2) {\n return ifloor(v1 * vec2(v2) + 0.5);\n}\n\n// unpack a 16-bit integer from a float vec2\nint getInt16(vec2 v) {\n ivec2 iv = round(v * 255.0);\n return iv.x * INT(128) + iv.y;\n}\n\nvec2 pixelScale;\nvec2 coverage = vec2(0.0);\nvec2 weight = vec2(0.5);\nconst float minDistance = 1.0/8192.0;\nconst float hardness = 1.05; // amount of antialias\n\n// the maximum number of curves in a glyph\nconst int N = INT(250);\n\n// retrieves an indexed pixel from a sampler\nvec4 getTexel(sampler2D sampler, int pos, ivec2 size) {\n int width = size.x;\n int y = ifloor(pos / width);\n int x = pos - y * width; // pos % width\n\n return texture2D(sampler, (vec2(x, y) + 0.5) / vec2(size));\n}\n\nvoid calulateCrossings(vec2 p0, vec2 p1, vec2 p2, out vec2 C1, out vec2 C2) {\n\n // get the coefficients of the quadratic in t\n vec2 a = p0 - p1 * 2.0 + p2;\n vec2 b = p0 - p1;\n vec2 c = p0 - vTexCoord;\n\n // found out which values of 't' it crosses the axes\n vec2 surd = sqrt(max(vec2(0.0), b * b - a * c));\n vec2 t1 = ((b - surd) / a).yx;\n vec2 t2 = ((b + surd) / a).yx;\n\n // approximate straight lines to avoid rounding errors\n if (abs(a.y) < 0.001)\n t1.x = t2.x = c.y / (2.0 * b.y);\n\n if (abs(a.x) < 0.001)\n t1.y = t2.y = c.x / (2.0 * b.x);\n\n // plug into quadratic formula to find the corrdinates of the crossings\n C1 = ((a * t1 - b * 2.0) * t1 + c) * pixelScale;\n C2 = ((a * t2 - b * 2.0) * t2 + c) * pixelScale;\n}\n\nvoid coverageX(vec2 p0, vec2 p1, vec2 p2) {\n\n vec2 C1, C2;\n calulateCrossings(p0, p1, p2, C1, C2);\n\n // determine on which side of the x-axis the points lie\n bool y0 = p0.y > vTexCoord.y;\n bool y1 = p1.y > vTexCoord.y;\n bool y2 = p2.y > vTexCoord.y;\n\n // could web be under the curve (after t1)?\n if (y1 ? !y2 : y0) {\n // add the coverage for t1\n coverage.x += saturate(C1.x + 0.5);\n // calculate the anti-aliasing for t1\n weight.x = min(weight.x, abs(C1.x));\n }\n\n // are we outside the curve (after t2)?\n if (y1 ? !y0 : y2) {\n // subtract the coverage for t2\n coverage.x -= saturate(C2.x + 0.5);\n // calculate the anti-aliasing for t2\n weight.x = min(weight.x, abs(C2.x));\n }\n}\n\n// this is essentially the same as coverageX, but with the axes swapped\nvoid coverageY(vec2 p0, vec2 p1, vec2 p2) {\n\n vec2 C1, C2;\n calulateCrossings(p0, p1, p2, C1, C2);\n\n bool x0 = p0.x > vTexCoord.x;\n bool x1 = p1.x > vTexCoord.x;\n bool x2 = p2.x > vTexCoord.x;\n\n if (x1 ? !x2 : x0) {\n coverage.y -= saturate(C1.y + 0.5);\n weight.y = min(weight.y, abs(C1.y));\n }\n\n if (x1 ? !x0 : x2) {\n coverage.y += saturate(C2.y + 0.5);\n weight.y = min(weight.y, abs(C2.y));\n }\n}\n\nvoid main() {\n\n // calculate the pixel scale based on screen-coordinates\n pixelScale = hardness / fwidth(vTexCoord);\n\n // which grid cell is this pixel in?\n ivec2 gridCoord = ifloor(vTexCoord * vec2(uGridSize));\n\n // intersect curves in this row\n {\n // the index into the row info bitmap\n int rowIndex = gridCoord.y + uGridOffset.y;\n // fetch the info texel\n vec4 rowInfo = getTexel(uSamplerRows, rowIndex, uGridImageSize);\n // unpack the rowInfo\n int rowStrokeIndex = getInt16(rowInfo.xy);\n int rowStrokeCount = getInt16(rowInfo.zw);\n\n for (int iRowStroke = INT(0); iRowStroke < N; iRowStroke++) {\n if (iRowStroke >= rowStrokeCount)\n break;\n\n // each stroke is made up of 3 points: the start and control point\n // and the start of the next curve.\n // fetch the indices of this pair of strokes:\n vec4 strokeIndices = getTexel(uSamplerRowStrokes, rowStrokeIndex++, uCellsImageSize);\n\n // unpack the stroke index\n int strokePos = getInt16(strokeIndices.xy);\n\n // fetch the two strokes\n vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);\n vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);\n\n // calculate the coverage\n coverageX(stroke0.xy, stroke0.zw, stroke1.xy);\n }\n }\n\n // intersect curves in this column\n {\n int colIndex = gridCoord.x + uGridOffset.x;\n vec4 colInfo = getTexel(uSamplerCols, colIndex, uGridImageSize);\n int colStrokeIndex = getInt16(colInfo.xy);\n int colStrokeCount = getInt16(colInfo.zw);\n \n for (int iColStroke = INT(0); iColStroke < N; iColStroke++) {\n if (iColStroke >= colStrokeCount)\n break;\n\n vec4 strokeIndices = getTexel(uSamplerColStrokes, colStrokeIndex++, uCellsImageSize);\n\n int strokePos = getInt16(strokeIndices.xy);\n vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);\n vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);\n coverageY(stroke0.xy, stroke0.zw, stroke1.xy);\n }\n }\n\n weight = saturate(1.0 - weight * 2.0);\n float distance = max(weight.x + weight.y, minDistance); // manhattan approx.\n float antialias = abs(dot(coverage, weight) / distance);\n float cover = min(abs(coverage.x), abs(coverage.y));\n gl_FragColor = uMaterialColor;\n gl_FragColor.a *= saturate(max(antialias, cover));\n}",
lineVert:
"/*\n Part of the Processing project - http://processing.org\n Copyright (c) 2012-15 The Processing Foundation\n Copyright (c) 2004-12 Ben Fry and Casey Reas\n Copyright (c) 2001-04 Massachusetts Institute of Technology\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation, version 2.1.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General\n Public License along with this library; if not, write to the\n Free Software Foundation, Inc., 59 Temple Place, Suite 330,\n Boston, MA 02111-1307 USA\n*/\n\n#define PROCESSING_LINE_SHADER\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uStrokeWeight;\n\nuniform vec4 uViewport;\nuniform int uPerspective;\n\nattribute vec4 aPosition;\nattribute vec4 aDirection;\n \nvoid main() {\n // using a scale <1 moves the lines towards the camera\n // in order to prevent popping effects due to half of\n // the line disappearing behind the geometry faces.\n vec3 scale = vec3(0.9995);\n\n vec4 posp = uModelViewMatrix * aPosition;\n vec4 posq = uModelViewMatrix * (aPosition + vec4(aDirection.xyz, 0));\n\n // Moving vertices slightly toward the camera\n // to avoid depth-fighting with the fill triangles.\n // Discussed here:\n // http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=252848 \n posp.xyz = posp.xyz * scale;\n posq.xyz = posq.xyz * scale;\n\n vec4 p = uProjectionMatrix * posp;\n vec4 q = uProjectionMatrix * posq;\n\n // formula to convert from clip space (range -1..1) to screen space (range 0..[width or height])\n // screen_p = (p.xy/p.w + <1,1>) * 0.5 * uViewport.zw\n\n // prevent division by W by transforming the tangent formula (div by 0 causes\n // the line to disappear, see https://github.com/processing/processing/issues/5183)\n // t = screen_q - screen_p\n //\n // tangent is normalized and we don't care which aDirection it points to (+-)\n // t = +- normalize( screen_q - screen_p )\n // t = +- normalize( (q.xy/q.w+<1,1>)*0.5*uViewport.zw - (p.xy/p.w+<1,1>)*0.5*uViewport.zw )\n //\n // extract common factor, <1,1> - <1,1> cancels out\n // t = +- normalize( (q.xy/q.w - p.xy/p.w) * 0.5 * uViewport.zw )\n //\n // convert to common divisor\n // t = +- normalize( ((q.xy*p.w - p.xy*q.w) / (p.w*q.w)) * 0.5 * uViewport.zw )\n //\n // remove the common scalar divisor/factor, not needed due to normalize and +-\n // (keep uViewport - can't remove because it has different components for x and y\n // and corrects for aspect ratio, see https://github.com/processing/processing/issues/5181)\n // t = +- normalize( (q.xy*p.w - p.xy*q.w) * uViewport.zw )\n\n vec2 tangent = normalize((q.xy*p.w - p.xy*q.w) * uViewport.zw);\n\n // flip tangent to normal (it's already normalized)\n vec2 normal = vec2(-tangent.y, tangent.x);\n\n float thickness = aDirection.w * uStrokeWeight;\n vec2 offset = normal * thickness / 2.0;\n\n vec2 curPerspScale;\n\n if(uPerspective == 1) {\n // Perspective ---\n // convert from world to clip by multiplying with projection scaling factor\n // to get the right thickness (see https://github.com/processing/processing/issues/5182)\n // invert Y, projections in Processing invert Y\n curPerspScale = (uProjectionMatrix * vec4(1, -1, 0, 0)).xy;\n } else {\n // No Perspective ---\n // multiply by W (to cancel out division by W later in the pipeline) and\n // convert from screen to clip (derived from clip to screen above)\n curPerspScale = p.w / (0.5 * uViewport.zw);\n }\n\n gl_Position.xy = p.xy + offset.xy * curPerspScale;\n gl_Position.zw = p.zw;\n}\n",
lineFrag:
'precision mediump float;\nprecision mediump int;\n\nuniform vec4 uMaterialColor;\n\nvoid main() {\n gl_FragColor = uMaterialColor;\n}',
pointVert:
'attribute vec3 aPosition;\nuniform float uPointSize;\nvarying float vStrokeWeight;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvoid main() {\n\tvec4 positionVec4 = vec4(aPosition, 1.0);\n\tgl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n\tgl_PointSize = uPointSize;\n\tvStrokeWeight = uPointSize;\n}',
pointFrag:
'precision mediump float;\nprecision mediump int;\nuniform vec4 uMaterialColor;\nvarying float vStrokeWeight;\n\nvoid main(){\n\tfloat mask = 0.0;\n\n\t// make a circular mask using the gl_PointCoord (goes from 0 - 1 on a point)\n // might be able to get a nicer edge on big strokeweights with smoothstep but slightly less performant\n\n\tmask = step(0.98, length(gl_PointCoord * 2.0 - 1.0));\n\n\t// if strokeWeight is 1 or less lets just draw a square\n\t// this prevents weird artifacting from carving circles when our points are really small\n\t// if strokeWeight is larger than 1, we just use it as is\n\n\tmask = mix(0.0, mask, clamp(floor(vStrokeWeight - 0.5),0.0,1.0));\n\n\t// throw away the borders of the mask\n // otherwise we get weird alpha blending issues\n\n\tif(mask > 0.98){\n discard;\n \t}\n\n \tgl_FragColor = vec4(uMaterialColor.rgb * (1.0 - mask), uMaterialColor.a) ;\n}'
});
/**
* 3D graphics class
* @private
* @class p5.RendererGL
* @constructor
* @extends p5.Renderer
* @todo extend class to include public method for offscreen
* rendering (FBO).
*/ cov_1rqo8cuxsf.s[2]++;
_main.default.RendererGL = function(elt, pInst, isMainCanvas, attr) {
cov_1rqo8cuxsf.f[0]++;
cov_1rqo8cuxsf.s[3]++;
_main.default.Renderer.call(this, elt, pInst, isMainCanvas);
cov_1rqo8cuxsf.s[4]++;
this._setAttributeDefaults(pInst);
cov_1rqo8cuxsf.s[5]++;
this._initContext();
cov_1rqo8cuxsf.s[6]++;
this.isP3D = true; //lets us know we're in 3d mode
// This redundant property is useful in reminding you that you are
// interacting with WebGLRenderingContext, still worth considering future removal
cov_1rqo8cuxsf.s[7]++;
this.GL = this.drawingContext;
cov_1rqo8cuxsf.s[8]++;
this._pInst._setProperty('drawingContext', this.drawingContext);
// erasing
cov_1rqo8cuxsf.s[9]++;
this._isErasing = false;
// lights
cov_1rqo8cuxsf.s[10]++;
this._enableLighting = false;
cov_1rqo8cuxsf.s[11]++;
this.ambientLightColors = [];
cov_1rqo8cuxsf.s[12]++;
this.specularColors = [1, 1, 1];
cov_1rqo8cuxsf.s[13]++;
this.directionalLightDirections = [];
cov_1rqo8cuxsf.s[14]++;
this.directionalLightDiffuseColors = [];
cov_1rqo8cuxsf.s[15]++;
this.directionalLightSpecularColors = [];
cov_1rqo8cuxsf.s[16]++;
this.pointLightPositions = [];
cov_1rqo8cuxsf.s[17]++;
this.pointLightDiffuseColors = [];
cov_1rqo8cuxsf.s[18]++;
this.pointLightSpecularColors = [];
cov_1rqo8cuxsf.s[19]++;
this.spotLightPositions = [];
cov_1rqo8cuxsf.s[20]++;
this.spotLightDirections = [];
cov_1rqo8cuxsf.s[21]++;
this.spotLightDiffuseColors = [];
cov_1rqo8cuxsf.s[22]++;
this.spotLightSpecularColors = [];
cov_1rqo8cuxsf.s[23]++;
this.spotLightAngle = [];
cov_1rqo8cuxsf.s[24]++;
this.spotLightConc = [];
cov_1rqo8cuxsf.s[25]++;
this.drawMode = constants.FILL;
cov_1rqo8cuxsf.s[26]++;
this.curFillColor = this._cachedFillStyle = [1, 1, 1, 1];
cov_1rqo8cuxsf.s[27]++;
this.curStrokeColor = this._cachedStrokeStyle = [0, 0, 0, 1];
cov_1rqo8cuxsf.s[28]++;
this.curBlendMode = constants.BLEND;
cov_1rqo8cuxsf.s[29]++;
this._cachedBlendMode = undefined;
cov_1rqo8cuxsf.s[30]++;
this.blendExt = this.GL.getExtension('EXT_blend_minmax');
cov_1rqo8cuxsf.s[31]++;
this._isBlending = false;
cov_1rqo8cuxsf.s[32]++;
this._useSpecularMaterial = false;
cov_1rqo8cuxsf.s[33]++;
this._useEmissiveMaterial = false;
cov_1rqo8cuxsf.s[34]++;
this._useNormalMaterial = false;
cov_1rqo8cuxsf.s[35]++;
this._useShininess = 1;
cov_1rqo8cuxsf.s[36]++;
this._tint = [255, 255, 255, 255];
// lightFalloff variables
cov_1rqo8cuxsf.s[37]++;
this.constantAttenuation = 1;
cov_1rqo8cuxsf.s[38]++;
this.linearAttenuation = 0;
cov_1rqo8cuxsf.s[39]++;
this.quadraticAttenuation = 0;
/**
* model view, projection, & normal
* matrices
*/ cov_1rqo8cuxsf.s[40]++;
this.uMVMatrix = new _main.default.Matrix();
cov_1rqo8cuxsf.s[41]++;
this.uPMatrix = new _main.default.Matrix();
cov_1rqo8cuxsf.s[42]++;
this.uNMatrix = new _main.default.Matrix('mat3');
// Camera
cov_1rqo8cuxsf.s[43]++;
this._curCamera = new _main.default.Camera(this);
cov_1rqo8cuxsf.s[44]++;
this._curCamera._computeCameraDefaultSettings();
cov_1rqo8cuxsf.s[45]++;
this._curCamera._setDefaultCamera();
cov_1rqo8cuxsf.s[46]++;
this._defaultLightShader = undefined;
cov_1rqo8cuxsf.s[47]++;
this._defaultImmediateModeShader = undefined;
cov_1rqo8cuxsf.s[48]++;
this._defaultNormalShader = undefined;
cov_1rqo8cuxsf.s[49]++;
this._defaultColorShader = undefined;
cov_1rqo8cuxsf.s[50]++;
this._defaultPointShader = undefined;
cov_1rqo8cuxsf.s[51]++;
this.userFillShader = undefined;
cov_1rqo8cuxsf.s[52]++;
this.userStrokeShader = undefined;
cov_1rqo8cuxsf.s[53]++;
this.userPointShader = undefined;
// Default drawing is done in Retained Mode
// Geometry and Material hashes stored here
cov_1rqo8cuxsf.s[54]++;
this.retainedMode = {
geometry: {},
buffers: {
// prettier-ignore
stroke: [
new _main.default.RenderBuffer(3, 'lineVertices', 'lineVertexBuffer', 'aPosition', this, this._flatten),
new _main.default.RenderBuffer(4, 'lineNormals', 'lineNormalBuffer', 'aDirection', this, this._flatten)],
// prettier-ignore
fill: [
new _main.default.RenderBuffer(3, 'vertices', 'vertexBuffer', 'aPosition', this, this._vToNArray),
new _main.default.RenderBuffer(3, 'vertexNormals', 'normalBuffer', 'aNormal', this, this._vToNArray),
new _main.default.RenderBuffer(4, 'vertexColors', 'colorBuffer', 'aMaterialColor', this),
new _main.default.RenderBuffer(3, 'vertexAmbients', 'ambientBuffer', 'aAmbientColor', this),
//new BufferDef(3, 'vertexSpeculars', 'specularBuffer', 'aSpecularColor'),
new _main.default.RenderBuffer(2, 'uvs', 'uvBuffer', 'aTexCoord', this, this._flatten)],
// prettier-ignore
text: [
new _main.default.RenderBuffer(3, 'vertices', 'vertexBuffer', 'aPosition', this, this._vToNArray),
new _main.default.RenderBuffer(2, 'uvs', 'uvBuffer', 'aTexCoord', this, this._flatten)]
}
};
// Imediate Mode
// Geometry and Material hashes stored here
cov_1rqo8cuxsf.s[55]++;
this.immediateMode = {
geometry: new _main.default.Geometry(),
shapeMode: constants.TRIANGLE_FAN,
_bezierVertex: [],
_quadraticVertex: [],
_curveVertex: [],
buffers: {
// prettier-ignore
fill: [
new _main.default.RenderBuffer(3, 'vertices', 'vertexBuffer', 'aPosition', this, this._vToNArray),
new _main.default.RenderBuffer(3, 'vertexNormals', 'normalBuffer', 'aNormal', this, this._vToNArray),
new _main.default.RenderBuffer(4, 'vertexColors', 'colorBuffer', 'aVertexColor', this),
new _main.default.RenderBuffer(3, 'vertexAmbients', 'ambientBuffer', 'aAmbientColor', this),
new _main.default.RenderBuffer(2, 'uvs', 'uvBuffer', 'aTexCoord', this, this._flatten)],
// prettier-ignore
stroke: [
new _main.default.RenderBuffer(3, 'lineVertices', 'lineVertexBuffer', 'aPosition', this, this._flatten),
new _main.default.RenderBuffer(4, 'lineNormals', 'lineNormalBuffer', 'aDirection', this, this._flatten)],
point: this.GL.createBuffer()
}
};
cov_1rqo8cuxsf.s[56]++;
this.pointSize = 5.0; //default point size
cov_1rqo8cuxsf.s[57]++;
this.curStrokeWeight = 1;
// array of textures created in this gl context via this.getTexture(src)
cov_1rqo8cuxsf.s[58]++;
this.textures = [];
cov_1rqo8cuxsf.s[59]++;
this.textureMode = constants.IMAGE;
// default wrap settings
cov_1rqo8cuxsf.s[60]++;
this.textureWrapX = constants.CLAMP;
cov_1rqo8cuxsf.s[61]++;
this.textureWrapY = constants.CLAMP;
cov_1rqo8cuxsf.s[62]++;
this._tex = null;
cov_1rqo8cuxsf.s[63]++;
this._curveTightness = 6;
// lookUpTable for coefficients needed to be calculated for bezierVertex, same are used for curveVertex
cov_1rqo8cuxsf.s[64]++;
this._lookUpTableBezier = [];
// lookUpTable for coefficients needed to be calculated for quadraticVertex
cov_1rqo8cuxsf.s[65]++;
this._lookUpTableQuadratic = [];
// current curveDetail in the Bezier lookUpTable
cov_1rqo8cuxsf.s[66]++;
this._lutBezierDetail = 0;
// current curveDetail in the Quadratic lookUpTable
cov_1rqo8cuxsf.s[67]++;
this._lutQuadraticDetail = 0;
cov_1rqo8cuxsf.s[68]++;
this._tessy = this._initTessy();
cov_1rqo8cuxsf.s[69]++;
this.fontInfos = {};
cov_1rqo8cuxsf.s[70]++;
this._curShader = undefined;
cov_1rqo8cuxsf.s[71]++;
return this;
};
cov_1rqo8cuxsf.s[72]++;
_main.default.RendererGL.prototype = Object.create(
_main.default.Renderer.prototype
);
//////////////////////////////////////////////
// Setting
//////////////////////////////////////////////
cov_1rqo8cuxsf.s[73]++;
_main.default.RendererGL.prototype._setAttributeDefaults = function(pInst) {
cov_1rqo8cuxsf.f[1]++;
// See issue #3850, safer to enable AA in Safari
var applyAA = (cov_1rqo8cuxsf.s[74]++,
navigator.userAgent.toLowerCase().includes('safari'));
var defaults = (cov_1rqo8cuxsf.s[75]++,
{
alpha: true,
depth: true,
stencil: true,
antialias: applyAA,
premultipliedAlpha: false,
preserveDrawingBuffer: true,
perPixelLighting: true
});
cov_1rqo8cuxsf.s[76]++;
if (pInst._glAttributes === null) {
cov_1rqo8cuxsf.b[0][0]++;
cov_1rqo8cuxsf.s[77]++;
pInst._glAttributes = defaults;
} else {
cov_1rqo8cuxsf.b[0][1]++;
cov_1rqo8cuxsf.s[78]++;
pInst._glAttributes = Object.assign(defaults, pInst._glAttributes);
}
cov_1rqo8cuxsf.s[79]++;
return;
};
cov_1rqo8cuxsf.s[80]++;
_main.default.RendererGL.prototype._initContext = function() {
cov_1rqo8cuxsf.f[2]++;
cov_1rqo8cuxsf.s[81]++;
try {
cov_1rqo8cuxsf.s[82]++;
this.drawingContext =
(cov_1rqo8cuxsf.b[1][0]++,
this.canvas.getContext('webgl', this._pInst._glAttributes)) ||
(cov_1rqo8cuxsf.b[1][1]++,
this.canvas.getContext('experimental-webgl', this._pInst._glAttributes));
cov_1rqo8cuxsf.s[83]++;
if (this.drawingContext === null) {
cov_1rqo8cuxsf.b[2][0]++;
cov_1rqo8cuxsf.s[84]++;
throw new Error('Error creating webgl context');
} else {
cov_1rqo8cuxsf.b[2][1]++;
var gl = (cov_1rqo8cuxsf.s[85]++, this.drawingContext);
cov_1rqo8cuxsf.s[86]++;
gl.enable(gl.DEPTH_TEST);
cov_1rqo8cuxsf.s[87]++;
gl.depthFunc(gl.LEQUAL);
cov_1rqo8cuxsf.s[88]++;
gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
cov_1rqo8cuxsf.s[89]++;
this._viewport = this.drawingContext.getParameter(
this.drawingContext.VIEWPORT
);
}
} catch (er) {
cov_1rqo8cuxsf.s[90]++;
throw er;
}
};
//This is helper function to reset the context anytime the attributes
//are changed with setAttributes()
cov_1rqo8cuxsf.s[91]++;
_main.default.RendererGL.prototype._resetContext = function(options, callback) {
cov_1rqo8cuxsf.f[3]++;
var w = (cov_1rqo8cuxsf.s[92]++, this.width);
var h = (cov_1rqo8cuxsf.s[93]++, this.height);
var defaultId = (cov_1rqo8cuxsf.s[94]++, this.canvas.id);
var isPGraphics = (cov_1rqo8cuxsf.s[95]++,
this._pInst instanceof _main.default.Graphics);
cov_1rqo8cuxsf.s[96]++;
if (isPGraphics) {
cov_1rqo8cuxsf.b[3][0]++;
var pg = (cov_1rqo8cuxsf.s[97]++, this._pInst);
cov_1rqo8cuxsf.s[98]++;
pg.canvas.parentNode.removeChild(pg.canvas);
cov_1rqo8cuxsf.s[99]++;
pg.canvas = document.createElement('canvas');
var node = (cov_1rqo8cuxsf.s[100]++,
(cov_1rqo8cuxsf.b[4][0]++, pg._pInst._userNode) ||
(cov_1rqo8cuxsf.b[4][1]++, document.body));
cov_1rqo8cuxsf.s[101]++;
node.appendChild(pg.canvas);
cov_1rqo8cuxsf.s[102]++;
_main.default.Element.call(pg, pg.canvas, pg._pInst);
cov_1rqo8cuxsf.s[103]++;
pg.width = w;
cov_1rqo8cuxsf.s[104]++;
pg.height = h;
} else {
cov_1rqo8cuxsf.b[3][1]++;
var c = (cov_1rqo8cuxsf.s[105]++, this.canvas);
cov_1rqo8cuxsf.s[106]++;
if (c) {
cov_1rqo8cuxsf.b[5][0]++;
cov_1rqo8cuxsf.s[107]++;
c.parentNode.removeChild(c);
} else {
cov_1rqo8cuxsf.b[5][1]++;
}
cov_1rqo8cuxsf.s[108]++;
c = document.createElement('canvas');
cov_1rqo8cuxsf.s[109]++;
c.id = defaultId;
cov_1rqo8cuxsf.s[110]++;
if (this._pInst._userNode) {
cov_1rqo8cuxsf.b[6][0]++;
cov_1rqo8cuxsf.s[111]++;
this._pInst._userNode.appendChild(c);
} else {
cov_1rqo8cuxsf.b[6][1]++;
cov_1rqo8cuxsf.s[112]++;
document.body.appendChild(c);
}
cov_1rqo8cuxsf.s[113]++;
this._pInst.canvas = c;
}
var renderer = (cov_1rqo8cuxsf.s[114]++,
new _main.default.RendererGL(this._pInst.canvas, this._pInst, !isPGraphics));
cov_1rqo8cuxsf.s[115]++;
this._pInst._setProperty('_renderer', renderer);
cov_1rqo8cuxsf.s[116]++;
renderer.resize(w, h);
cov_1rqo8cuxsf.s[117]++;
renderer._applyDefaults();
cov_1rqo8cuxsf.s[118]++;
if (!isPGraphics) {
cov_1rqo8cuxsf.b[7][0]++;
cov_1rqo8cuxsf.s[119]++;
this._pInst._elements.push(renderer);
} else {
cov_1rqo8cuxsf.b[7][1]++;
}
cov_1rqo8cuxsf.s[120]++;
if (typeof callback === 'function') {
cov_1rqo8cuxsf.b[8][0]++;
cov_1rqo8cuxsf.s[121]++;
//setTimeout with 0 forces the task to the back of the queue, this ensures that
//we finish switching out the renderer
setTimeout(function() {
cov_1rqo8cuxsf.f[4]++;
cov_1rqo8cuxsf.s[122]++;
callback.apply(window._renderer, options);
}, 0);
} else {
cov_1rqo8cuxsf.b[8][1]++;
}
};
/**
* @module Rendering
* @submodule Rendering
* @for p5
*/
/**
* Set attributes for the WebGL Drawing context.
* This is a way of adjusting how the WebGL
* renderer works to fine-tune the display and performance.
*
* Note that this will reinitialize the drawing context
* if called after the WebGL canvas is made.
*
* If an object is passed as the parameter, all attributes
* not declared in the object will be set to defaults.
*
* The available attributes are:
*
* alpha - indicates if the canvas contains an alpha buffer
* default is true
*
* depth - indicates whether the drawing buffer has a depth buffer
* of at least 16 bits - default is true
*
* stencil - indicates whether the drawing buffer has a stencil buffer
* of at least 8 bits
*
* antialias - indicates whether or not to perform anti-aliasing
* default is false (true in Safari)
*
* premultipliedAlpha - indicates that the page compositor will assume
* the drawing buffer contains colors with pre-multiplied alpha
* default is false
*
* preserveDrawingBuffer - if true the buffers will not be cleared and
* and will preserve their values until cleared or overwritten by author
* (note that p5 clears automatically on draw loop)
* default is true
*
* perPixelLighting - if true, per-pixel lighting will be used in the
* lighting shader otherwise per-vertex lighting is used.
* default is true.
*
* @method setAttributes
* @for p5
* @param {String} key Name of attribute
* @param {Boolean} value New value of named attribute
* @example
*
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(255);
* push();
* rotateZ(frameCount * 0.02);
* rotateX(frameCount * 0.02);
* rotateY(frameCount * 0.02);
* fill(0, 0, 0);
* box(50);
* pop();
* }
*
*
*
* Now with the antialias attribute set to true.
*
*
*
* function setup() {
* setAttributes('antialias', true);
* createCanvas(100, 100, WEBGL);
* }
*
* function draw() {
* background(255);
* push();
* rotateZ(frameCount * 0.02);
* rotateX(frameCount * 0.02);
* rotateY(frameCount * 0.02);
* fill(0, 0, 0);
* box(50);
* pop();
* }
*
*
*
*
*
* // press the mouse button to disable perPixelLighting
* function setup() {
* createCanvas(100, 100, WEBGL);
* noStroke();
* fill(255);
* }
*
* let lights = [
* { c: '#f00', t: 1.12, p: 1.91, r: 0.2 },
* { c: '#0f0', t: 1.21, p: 1.31, r: 0.2 },
* { c: '#00f', t: 1.37, p: 1.57, r: 0.2 },
* { c: '#ff0', t: 1.12, p: 1.91, r: 0.7 },
* { c: '#0ff', t: 1.21, p: 1.31, r: 0.7 },
* { c: '#f0f', t: 1.37, p: 1.57, r: 0.7 }
* ];
*
* function draw() {
* let t = millis() / 1000 + 1000;
* background(0);
* directionalLight(color('#222'), 1, 1, 1);
*
* for (let i = 0; i < lights.length; i++) {
* let light = lights[i];
* pointLight(
* color(light.c),
* p5.Vector.fromAngles(t * light.t, t * light.p, width * light.r)
* );
* }
*
* specularMaterial(255);
* sphere(width * 0.1);
*
* rotateX(t * 0.77);
* rotateY(t * 0.83);
* rotateZ(t * 0.91);
* torus(width * 0.3, width * 0.07, 24, 10);
* }
*
* function mousePressed() {
* setAttributes('perPixelLighting', false);
* noStroke();
* fill(255);
* }
* function mouseReleased() {
* setAttributes('perPixelLighting', true);
* noStroke();
* fill(255);
* }
*
*
*
* @alt a rotating cube with smoother edges
*/
/**
* @method setAttributes
* @for p5
* @param {Object} obj object with key-value pairs
*/ cov_1rqo8cuxsf.s[123]++;
_main.default.prototype.setAttributes = function(key, value) {
cov_1rqo8cuxsf.f[5]++;
cov_1rqo8cuxsf.s[124]++;
if (typeof this._glAttributes === 'undefined') {
cov_1rqo8cuxsf.b[9][0]++;
cov_1rqo8cuxsf.s[125]++;
console.log(
'You are trying to use setAttributes on a p5.Graphics object ' +
'that does not use a WEBGL renderer.'
);
cov_1rqo8cuxsf.s[126]++;
return;
} else {
cov_1rqo8cuxsf.b[9][1]++;
}
var unchanged = (cov_1rqo8cuxsf.s[127]++, true);
cov_1rqo8cuxsf.s[128]++;
if (typeof value !== 'undefined') {
cov_1rqo8cuxsf.b[10][0]++;
cov_1rqo8cuxsf.s[129]++;
//first time modifying the attributes
if (this._glAttributes === null) {
cov_1rqo8cuxsf.b[11][0]++;
cov_1rqo8cuxsf.s[130]++;
this._glAttributes = {};
} else {
cov_1rqo8cuxsf.b[11][1]++;
}
cov_1rqo8cuxsf.s[131]++;
if (this._glAttributes[key] !== value) {
cov_1rqo8cuxsf.b[12][0]++;
cov_1rqo8cuxsf.s[132]++;
//changing value of previously altered attribute
this._glAttributes[key] = value;
cov_1rqo8cuxsf.s[133]++;
unchanged = false;
} else {
cov_1rqo8cuxsf.b[12][1]++;
}
//setting all attributes with some change
} else {
cov_1rqo8cuxsf.b[10][1]++;
cov_1rqo8cuxsf.s[134]++;
if (key instanceof Object) {
cov_1rqo8cuxsf.b[13][0]++;
cov_1rqo8cuxsf.s[135]++;
if (this._glAttributes !== key) {
cov_1rqo8cuxsf.b[14][0]++;
cov_1rqo8cuxsf.s[136]++;
this._glAttributes = key;
cov_1rqo8cuxsf.s[137]++;
unchanged = false;
} else {
cov_1rqo8cuxsf.b[14][1]++;
}
} else {
cov_1rqo8cuxsf.b[13][1]++;
}
}
//@todo_FES
cov_1rqo8cuxsf.s[138]++;
if (
(cov_1rqo8cuxsf.b[16][0]++, !this._renderer.isP3D) ||
(cov_1rqo8cuxsf.b[16][1]++, unchanged)
) {
cov_1rqo8cuxsf.b[15][0]++;
cov_1rqo8cuxsf.s[139]++;
return;
} else {
cov_1rqo8cuxsf.b[15][1]++;
}
cov_1rqo8cuxsf.s[140]++;
if (!this._setupDone) {
cov_1rqo8cuxsf.b[17][0]++;
cov_1rqo8cuxsf.s[141]++;
for (var x in this._renderer.retainedMode.geometry) {
cov_1rqo8cuxsf.s[142]++;
if (this._renderer.retainedMode.geometry.hasOwnProperty(x)) {
cov_1rqo8cuxsf.b[18][0]++;
cov_1rqo8cuxsf.s[143]++;
console.error(
'Sorry, Could not set the attributes, you need to call setAttributes() ' +
'before calling the other drawing methods in setup()'
);
cov_1rqo8cuxsf.s[144]++;
return;
} else {
cov_1rqo8cuxsf.b[18][1]++;
}
}
} else {
cov_1rqo8cuxsf.b[17][1]++;
}
cov_1rqo8cuxsf.s[145]++;
this.push();
cov_1rqo8cuxsf.s[146]++;
this._renderer._resetContext();
cov_1rqo8cuxsf.s[147]++;
this.pop();
cov_1rqo8cuxsf.s[148]++;
if (this._renderer._curCamera) {
cov_1rqo8cuxsf.b[19][0]++;
cov_1rqo8cuxsf.s[149]++;
this._renderer._curCamera._renderer = this._renderer;
} else {
cov_1rqo8cuxsf.b[19][1]++;
}
};
/**
* @class p5.RendererGL
*/ cov_1rqo8cuxsf.s[150]++;
_main.default.RendererGL.prototype._update = function() {
cov_1rqo8cuxsf.f[6]++;
cov_1rqo8cuxsf.s[151]++;
// reset model view and apply initial camera transform
// (containing only look at info; no projection).
this.uMVMatrix.set(
this._curCamera.cameraMatrix.mat4[0],
this._curCamera.cameraMatrix.mat4[1],
this._curCamera.cameraMatrix.mat4[2],
this._curCamera.cameraMatrix.mat4[3],
this._curCamera.cameraMatrix.mat4[4],
this._curCamera.cameraMatrix.mat4[5],
this._curCamera.cameraMatrix.mat4[6],
this._curCamera.cameraMatrix.mat4[7],
this._curCamera.cameraMatrix.mat4[8],
this._curCamera.cameraMatrix.mat4[9],
this._curCamera.cameraMatrix.mat4[10],
this._curCamera.cameraMatrix.mat4[11],
this._curCamera.cameraMatrix.mat4[12],
this._curCamera.cameraMatrix.mat4[13],
this._curCamera.cameraMatrix.mat4[14],
this._curCamera.cameraMatrix.mat4[15]
);
// reset light data for new frame.
cov_1rqo8cuxsf.s[152]++;
this.ambientLightColors.length = 0;
cov_1rqo8cuxsf.s[153]++;
this.specularColors = [1, 1, 1];
cov_1rqo8cuxsf.s[154]++;
this.directionalLightDirections.length = 0;
cov_1rqo8cuxsf.s[155]++;
this.directionalLightDiffuseColors.length = 0;
cov_1rqo8cuxsf.s[156]++;
this.directionalLightSpecularColors.length = 0;
cov_1rqo8cuxsf.s[157]++;
this.pointLightPositions.length = 0;
cov_1rqo8cuxsf.s[158]++;
this.pointLightDiffuseColors.length = 0;
cov_1rqo8cuxsf.s[159]++;
this.pointLightSpecularColors.length = 0;
cov_1rqo8cuxsf.s[160]++;
this.spotLightPositions.length = 0;
cov_1rqo8cuxsf.s[161]++;
this.spotLightDirections.length = 0;
cov_1rqo8cuxsf.s[162]++;
this.spotLightDiffuseColors.length = 0;
cov_1rqo8cuxsf.s[163]++;
this.spotLightSpecularColors.length = 0;
cov_1rqo8cuxsf.s[164]++;
this.spotLightAngle.length = 0;
cov_1rqo8cuxsf.s[165]++;
this.spotLightConc.length = 0;
cov_1rqo8cuxsf.s[166]++;
this._enableLighting = false;
//reset tint value for new frame
cov_1rqo8cuxsf.s[167]++;
this._tint = [255, 255, 255, 255];
//Clear depth every frame
cov_1rqo8cuxsf.s[168]++;
this.GL.clear(this.GL.DEPTH_BUFFER_BIT);
};
/**
* [background description]
*/ cov_1rqo8cuxsf.s[169]++;
_main.default.RendererGL.prototype.background = function() {
var _this$_pInst;
cov_1rqo8cuxsf.f[7]++;
var _col = (cov_1rqo8cuxsf.s[170]++,
(_this$_pInst = this._pInst).color.apply(_this$_pInst, arguments));
var _r = (cov_1rqo8cuxsf.s[171]++, _col.levels[0] / 255);
var _g = (cov_1rqo8cuxsf.s[172]++, _col.levels[1] / 255);
var _b = (cov_1rqo8cuxsf.s[173]++, _col.levels[2] / 255);
var _a = (cov_1rqo8cuxsf.s[174]++, _col.levels[3] / 255);
cov_1rqo8cuxsf.s[175]++;
this.GL.clearColor(_r, _g, _b, _a);
cov_1rqo8cuxsf.s[176]++;
this.GL.clear(this.GL.COLOR_BUFFER_BIT);
};
//////////////////////////////////////////////
// COLOR
//////////////////////////////////////////////
/**
* Basic fill material for geometry with a given color
* @method fill
* @class p5.RendererGL
* @param {Number|Number[]|String|p5.Color} v1 gray value,
* red or hue value (depending on the current color mode),
* or color Array, or CSS color string
* @param {Number} [v2] green or saturation value
* @param {Number} [v3] blue or brightness value
* @param {Number} [a] opacity
* @chainable
* @example
*
*
* function setup() {
* createCanvas(200, 200, WEBGL);
* }
*
* function draw() {
* background(0);
* noStroke();
* fill(100, 100, 240);
* rotateX(frameCount * 0.01);
* rotateY(frameCount * 0.01);
* box(75, 75, 75);
* }
*
*
*
* @alt
* black canvas with purple cube spinning
*/ cov_1rqo8cuxsf.s[177]++;
_main.default.RendererGL.prototype.fill = function(v1, v2, v3, a) {
cov_1rqo8cuxsf.f[8]++;
//see material.js for more info on color blending in webgl
var color = (cov_1rqo8cuxsf.s[178]++,
_main.default.prototype.color.apply(this._pInst, arguments));
cov_1rqo8cuxsf.s[179]++;
this.curFillColor = color._array;
cov_1rqo8cuxsf.s[180]++;
this.drawMode = constants.FILL;
cov_1rqo8cuxsf.s[181]++;
this._useNormalMaterial = false;
cov_1rqo8cuxsf.s[182]++;
this._tex = null;
};
/**
* Basic stroke material for geometry with a given color
* @method stroke
* @param {Number|Number[]|String|p5.Color} v1 gray value,
* red or hue value (depending on the current color mode),
* or color Array, or CSS color string
* @param {Number} [v2] green or saturation value
* @param {Number} [v3] blue or brightness value
* @param {Number} [a] opacity
* @example
*
*
* function setup() {
* createCanvas(200, 200, WEBGL);
* }
*
* function draw() {
* background(0);
* stroke(240, 150, 150);
* fill(100, 100, 240);
* rotateX(frameCount * 0.01);
* rotateY(frameCount * 0.01);
* box(75, 75, 75);
* }
*
*
*
* @alt
* black canvas with purple cube with pink outline spinning
*/ cov_1rqo8cuxsf.s[183]++;
_main.default.RendererGL.prototype.stroke = function(r, g, b, a) {
cov_1rqo8cuxsf.f[9]++;
cov_1rqo8cuxsf.s[184]++;
//@todo allow transparency in stroking currently doesn't have
//any impact and causes problems with specularMaterial
arguments[3] = 255;
var color = (cov_1rqo8cuxsf.s[185]++,
_main.default.prototype.color.apply(this._pInst, arguments));
cov_1rqo8cuxsf.s[186]++;
this.curStrokeColor = color._array;
};
cov_1rqo8cuxsf.s[187]++;
_main.default.RendererGL.prototype.strokeCap = function(cap) {
cov_1rqo8cuxsf.f[10]++;
cov_1rqo8cuxsf.s[188]++;
// @TODO : to be implemented
console.error('Sorry, strokeCap() is not yet implemented in WEBGL mode');
};
cov_1rqo8cuxsf.s[189]++;
_main.default.RendererGL.prototype.strokeJoin = function(join) {
cov_1rqo8cuxsf.f[11]++;
cov_1rqo8cuxsf.s[190]++;
// @TODO : to be implemented
// https://processing.org/reference/strokeJoin_.html
console.error('Sorry, strokeJoin() is not yet implemented in WEBGL mode');
};
cov_1rqo8cuxsf.s[191]++;
_main.default.RendererGL.prototype.filter = function(filterType) {
cov_1rqo8cuxsf.f[12]++;
cov_1rqo8cuxsf.s[192]++;
// filter can be achieved using custom shaders.
// https://github.com/aferriss/p5jsShaderExamples
// https://itp-xstory.github.io/p5js-shaders/#/
console.error('filter() does not work in WEBGL mode');
};
cov_1rqo8cuxsf.s[193]++;
_main.default.RendererGL.prototype.blendMode = function(mode) {
cov_1rqo8cuxsf.f[13]++;
cov_1rqo8cuxsf.s[194]++;
if (
(cov_1rqo8cuxsf.b[21][0]++, mode === constants.DARKEST) ||
(cov_1rqo8cuxsf.b[21][1]++, mode === constants.LIGHTEST) ||
(cov_1rqo8cuxsf.b[21][2]++, mode === constants.ADD) ||
(cov_1rqo8cuxsf.b[21][3]++, mode === constants.BLEND) ||
(cov_1rqo8cuxsf.b[21][4]++, mode === constants.SUBTRACT) ||
(cov_1rqo8cuxsf.b[21][5]++, mode === constants.SCREEN) ||
(cov_1rqo8cuxsf.b[21][6]++, mode === constants.EXCLUSION) ||
(cov_1rqo8cuxsf.b[21][7]++, mode === constants.REPLACE) ||
(cov_1rqo8cuxsf.b[21][8]++, mode === constants.MULTIPLY) ||
(cov_1rqo8cuxsf.b[21][9]++, mode === constants.REMOVE)
) {
cov_1rqo8cuxsf.b[20][0]++;
cov_1rqo8cuxsf.s[195]++;
this.curBlendMode = mode;
} else {
cov_1rqo8cuxsf.b[20][1]++;
cov_1rqo8cuxsf.s[196]++;
if (
(cov_1rqo8cuxsf.b[23][0]++, mode === constants.BURN) ||
(cov_1rqo8cuxsf.b[23][1]++, mode === constants.OVERLAY) ||
(cov_1rqo8cuxsf.b[23][2]++, mode === constants.HARD_LIGHT) ||
(cov_1rqo8cuxsf.b[23][3]++, mode === constants.SOFT_LIGHT) ||
(cov_1rqo8cuxsf.b[23][4]++, mode === constants.DODGE)
) {
cov_1rqo8cuxsf.b[22][0]++;
cov_1rqo8cuxsf.s[197]++;
console.warn(
'BURN, OVERLAY, HARD_LIGHT, SOFT_LIGHT, and DODGE only work for blendMode in 2D mode.'
);
} else {
cov_1rqo8cuxsf.b[22][1]++;
}
}
};
cov_1rqo8cuxsf.s[198]++;
_main.default.RendererGL.prototype.erase = function(opacityFill, opacityStroke) {
cov_1rqo8cuxsf.f[14]++;
cov_1rqo8cuxsf.s[199]++;
if (!this._isErasing) {
cov_1rqo8cuxsf.b[24][0]++;
cov_1rqo8cuxsf.s[200]++;
this._applyBlendMode(constants.REMOVE);
cov_1rqo8cuxsf.s[201]++;
this._isErasing = true;
cov_1rqo8cuxsf.s[202]++;
this._cachedFillStyle = this.curFillColor.slice();
cov_1rqo8cuxsf.s[203]++;
this.curFillColor = [1, 1, 1, opacityFill / 255];
cov_1rqo8cuxsf.s[204]++;
this._cachedStrokeStyle = this.curStrokeColor.slice();
cov_1rqo8cuxsf.s[205]++;
this.curStrokeColor = [1, 1, 1, opacityStroke / 255];
} else {
cov_1rqo8cuxsf.b[24][1]++;
}
};
cov_1rqo8cuxsf.s[206]++;
_main.default.RendererGL.prototype.noErase = function() {
cov_1rqo8cuxsf.f[15]++;
cov_1rqo8cuxsf.s[207]++;
if (this._isErasing) {
cov_1rqo8cuxsf.b[25][0]++;
cov_1rqo8cuxsf.s[208]++;
this._isErasing = false;
cov_1rqo8cuxsf.s[209]++;
this.curFillColor = this._cachedFillStyle.slice();
cov_1rqo8cuxsf.s[210]++;
this.curStrokeColor = this._cachedStrokeStyle.slice();
cov_1rqo8cuxsf.s[211]++;
this.blendMode(this._cachedBlendMode);
} else {
cov_1rqo8cuxsf.b[25][1]++;
}
};
/**
* Change weight of stroke
* @method strokeWeight
* @param {Number} stroke weight to be used for drawing
* @example
*
*
* function setup() {
* createCanvas(200, 400, WEBGL);
* setAttributes('antialias', true);
* }
*
* function draw() {
* background(0);
* noStroke();
* translate(0, -100, 0);
* stroke(240, 150, 150);
* fill(100, 100, 240);
* push();
* strokeWeight(8);
* rotateX(frameCount * 0.01);
* rotateY(frameCount * 0.01);
* sphere(75);
* pop();
* push();
* translate(0, 200, 0);
* strokeWeight(1);
* rotateX(frameCount * 0.01);
* rotateY(frameCount * 0.01);
* sphere(75);
* pop();
* }
*
*
*
* @alt
* black canvas with two purple rotating spheres with pink
* outlines the sphere on top has much heavier outlines,
*/ cov_1rqo8cuxsf.s[212]++;
_main.default.RendererGL.prototype.strokeWeight = function(w) {
cov_1rqo8cuxsf.f[16]++;
cov_1rqo8cuxsf.s[213]++;
if (this.curStrokeWeight !== w) {
cov_1rqo8cuxsf.b[26][0]++;
cov_1rqo8cuxsf.s[214]++;
this.pointSize = w;
cov_1rqo8cuxsf.s[215]++;
this.curStrokeWeight = w;
} else {
cov_1rqo8cuxsf.b[26][1]++;
}
};
// x,y are canvas-relative (pre-scaled by _pixelDensity)
cov_1rqo8cuxsf.s[216]++;
_main.default.RendererGL.prototype._getPixel = function(x, y) {
cov_1rqo8cuxsf.f[17]++;
var imageData, index;
cov_1rqo8cuxsf.s[217]++;
imageData = new Uint8Array(4);
// prettier-ignore
cov_1rqo8cuxsf.s[218]++;
this.drawingContext.readPixels(
x,
y,
1,
1,
this.drawingContext.RGBA,
this.drawingContext.UNSIGNED_BYTE,
imageData
);
cov_1rqo8cuxsf.s[219]++;
index = 0;
cov_1rqo8cuxsf.s[220]++;
return [
imageData[index + 0],
imageData[index + 1],
imageData[index + 2],
imageData[index + 3]
];
};
/**
* Loads the pixels data for this canvas into the pixels[] attribute.
* Note that updatePixels() and set() do not work.
* Any pixel manipulation must be done directly to the pixels[] array.
*
* @private
* @method loadPixels
*/ cov_1rqo8cuxsf.s[221]++;
_main.default.RendererGL.prototype.loadPixels = function() {
cov_1rqo8cuxsf.f[18]++;
var pixelsState = (cov_1rqo8cuxsf.s[222]++, this._pixelsState);
//@todo_FES
cov_1rqo8cuxsf.s[223]++;
if (this._pInst._glAttributes.preserveDrawingBuffer !== true) {
cov_1rqo8cuxsf.b[27][0]++;
cov_1rqo8cuxsf.s[224]++;
console.log(
'loadPixels only works in WebGL when preserveDrawingBuffer ' + 'is true.'
);
cov_1rqo8cuxsf.s[225]++;
return;
} else {
cov_1rqo8cuxsf.b[27][1]++;
}
//if there isn't a renderer-level temporary pixels buffer
//make a new one
var pixels = (cov_1rqo8cuxsf.s[226]++, pixelsState.pixels);
var len = (cov_1rqo8cuxsf.s[227]++,
this.GL.drawingBufferWidth * this.GL.drawingBufferHeight * 4);
cov_1rqo8cuxsf.s[228]++;
if (
(cov_1rqo8cuxsf.b[29][0]++, !(pixels instanceof Uint8Array)) ||
(cov_1rqo8cuxsf.b[29][1]++, pixels.length !== len)
) {
cov_1rqo8cuxsf.b[28][0]++;
cov_1rqo8cuxsf.s[229]++;
pixels = new Uint8Array(len);
cov_1rqo8cuxsf.s[230]++;
this._pixelsState._setProperty('pixels', pixels);
} else {
cov_1rqo8cuxsf.b[28][1]++;
}
var pd = (cov_1rqo8cuxsf.s[231]++, this._pInst._pixelDensity);
// prettier-ignore
cov_1rqo8cuxsf.s[232]++;
this.GL.readPixels(
0,
0,
this.width * pd,
this.height * pd,
this.GL.RGBA,
this.GL.UNSIGNED_BYTE,
pixels
);
};
//////////////////////////////////////////////
// HASH | for geometry
//////////////////////////////////////////////
cov_1rqo8cuxsf.s[233]++;
_main.default.RendererGL.prototype.geometryInHash = function(gId) {
cov_1rqo8cuxsf.f[19]++;
cov_1rqo8cuxsf.s[234]++;
return this.retainedMode.geometry[gId] !== undefined;
};
/**
* [resize description]
* @private
* @param {Number} w [description]
* @param {Number} h [description]
*/ cov_1rqo8cuxsf.s[235]++;
_main.default.RendererGL.prototype.resize = function(w, h) {
cov_1rqo8cuxsf.f[20]++;
cov_1rqo8cuxsf.s[236]++;
_main.default.Renderer.prototype.resize.call(this, w, h);
cov_1rqo8cuxsf.s[237]++;
this.GL.viewport(0, 0, this.GL.drawingBufferWidth, this.GL.drawingBufferHeight);
cov_1rqo8cuxsf.s[238]++;
this._viewport = this.GL.getParameter(this.GL.VIEWPORT);
cov_1rqo8cuxsf.s[239]++;
this._curCamera._resize();
//resize pixels buffer
var pixelsState = (cov_1rqo8cuxsf.s[240]++, this._pixelsState);
cov_1rqo8cuxsf.s[241]++;
if (typeof pixelsState.pixels !== 'undefined') {
cov_1rqo8cuxsf.b[30][0]++;
cov_1rqo8cuxsf.s[242]++;
pixelsState._setProperty(
'pixels',
new Uint8Array(this.GL.drawingBufferWidth * this.GL.drawingBufferHeight * 4)
);
} else {
cov_1rqo8cuxsf.b[30][1]++;
}
};
/**
* clears color and depth buffers
* with r,g,b,a
* @private
* @param {Number} r normalized red val.
* @param {Number} g normalized green val.
* @param {Number} b normalized blue val.
* @param {Number} a normalized alpha val.
*/ cov_1rqo8cuxsf.s[243]++;
_main.default.RendererGL.prototype.clear = function() {
cov_1rqo8cuxsf.f[21]++;
var _r = (cov_1rqo8cuxsf.s[244]++,
(cov_1rqo8cuxsf.b[31][0]++, arguments.length <= 0 ? undefined : arguments[0]) ||
(cov_1rqo8cuxsf.b[31][1]++, 0));
var _g = (cov_1rqo8cuxsf.s[245]++,
(cov_1rqo8cuxsf.b[32][0]++, arguments.length <= 1 ? undefined : arguments[1]) ||
(cov_1rqo8cuxsf.b[32][1]++, 0));
var _b = (cov_1rqo8cuxsf.s[246]++,
(cov_1rqo8cuxsf.b[33][0]++, arguments.length <= 2 ? undefined : arguments[2]) ||
(cov_1rqo8cuxsf.b[33][1]++, 0));
var _a = (cov_1rqo8cuxsf.s[247]++,
(cov_1rqo8cuxsf.b[34][0]++, arguments.length <= 3 ? undefined : arguments[3]) ||
(cov_1rqo8cuxsf.b[34][1]++, 0));
cov_1rqo8cuxsf.s[248]++;
this.GL.clearColor(_r, _g, _b, _a);
cov_1rqo8cuxsf.s[249]++;
this.GL.clear(this.GL.COLOR_BUFFER_BIT | this.GL.DEPTH_BUFFER_BIT);
};
cov_1rqo8cuxsf.s[250]++;
_main.default.RendererGL.prototype.applyMatrix = function(a, b, c, d, e, f) {
cov_1rqo8cuxsf.f[22]++;
cov_1rqo8cuxsf.s[251]++;
if (arguments.length === 16) {
cov_1rqo8cuxsf.b[35][0]++;
cov_1rqo8cuxsf.s[252]++;
_main.default.Matrix.prototype.apply.apply(this.uMVMatrix, arguments);
} else {
cov_1rqo8cuxsf.b[35][1]++;
cov_1rqo8cuxsf.s[253]++;
// prettier-ignore
this.uMVMatrix.apply([
a, b, 0, 0,
c, d, 0, 0,
0, 0, 1, 0,
e, f, 0, 1]);
}
};
/**
* [translate description]
* @private
* @param {Number} x [description]
* @param {Number} y [description]
* @param {Number} z [description]
* @chainable
* @todo implement handle for components or vector as args
*/ cov_1rqo8cuxsf.s[254]++;
_main.default.RendererGL.prototype.translate = function(x, y, z) {
cov_1rqo8cuxsf.f[23]++;
cov_1rqo8cuxsf.s[255]++;
if (x instanceof _main.default.Vector) {
cov_1rqo8cuxsf.b[36][0]++;
cov_1rqo8cuxsf.s[256]++;
z = x.z;
cov_1rqo8cuxsf.s[257]++;
y = x.y;
cov_1rqo8cuxsf.s[258]++;
x = x.x;
} else {
cov_1rqo8cuxsf.b[36][1]++;
}
cov_1rqo8cuxsf.s[259]++;
this.uMVMatrix.translate([x, y, z]);
cov_1rqo8cuxsf.s[260]++;
return this;
};
/**
* Scales the Model View Matrix by a vector
* @private
* @param {Number | p5.Vector | Array} x [description]
* @param {Number} [y] y-axis scalar
* @param {Number} [z] z-axis scalar
* @chainable
*/ cov_1rqo8cuxsf.s[261]++;
_main.default.RendererGL.prototype.scale = function(x, y, z) {
cov_1rqo8cuxsf.f[24]++;
cov_1rqo8cuxsf.s[262]++;
this.uMVMatrix.scale(x, y, z);
cov_1rqo8cuxsf.s[263]++;
return this;
};
cov_1rqo8cuxsf.s[264]++;
_main.default.RendererGL.prototype.rotate = function(rad, axis) {
cov_1rqo8cuxsf.f[25]++;
cov_1rqo8cuxsf.s[265]++;
if (typeof axis === 'undefined') {
cov_1rqo8cuxsf.b[37][0]++;
cov_1rqo8cuxsf.s[266]++;
return this.rotateZ(rad);
} else {
cov_1rqo8cuxsf.b[37][1]++;
}
cov_1rqo8cuxsf.s[267]++;
_main.default.Matrix.prototype.rotate.apply(this.uMVMatrix, arguments);
cov_1rqo8cuxsf.s[268]++;
return this;
};
cov_1rqo8cuxsf.s[269]++;
_main.default.RendererGL.prototype.rotateX = function(rad) {
cov_1rqo8cuxsf.f[26]++;
cov_1rqo8cuxsf.s[270]++;
this.rotate(rad, 1, 0, 0);
cov_1rqo8cuxsf.s[271]++;
return this;
};
cov_1rqo8cuxsf.s[272]++;
_main.default.RendererGL.prototype.rotateY = function(rad) {
cov_1rqo8cuxsf.f[27]++;
cov_1rqo8cuxsf.s[273]++;
this.rotate(rad, 0, 1, 0);
cov_1rqo8cuxsf.s[274]++;
return this;
};
cov_1rqo8cuxsf.s[275]++;
_main.default.RendererGL.prototype.rotateZ = function(rad) {
cov_1rqo8cuxsf.f[28]++;
cov_1rqo8cuxsf.s[276]++;
this.rotate(rad, 0, 0, 1);
cov_1rqo8cuxsf.s[277]++;
return this;
};
cov_1rqo8cuxsf.s[278]++;
_main.default.RendererGL.prototype.push = function() {
cov_1rqo8cuxsf.f[29]++;
// get the base renderer style
var style = (cov_1rqo8cuxsf.s[279]++,
_main.default.Renderer.prototype.push.apply(this));
// add webgl-specific style properties
var properties = (cov_1rqo8cuxsf.s[280]++, style.properties);
cov_1rqo8cuxsf.s[281]++;
properties.uMVMatrix = this.uMVMatrix.copy();
cov_1rqo8cuxsf.s[282]++;
properties.uPMatrix = this.uPMatrix.copy();
cov_1rqo8cuxsf.s[283]++;
properties._curCamera = this._curCamera;
// make a copy of the current camera for the push state
// this preserves any references stored using 'createCamera'
cov_1rqo8cuxsf.s[284]++;
this._curCamera = this._curCamera.copy();
cov_1rqo8cuxsf.s[285]++;
properties.ambientLightColors = this.ambientLightColors.slice();
cov_1rqo8cuxsf.s[286]++;
properties.specularColors = this.specularColors.slice();
cov_1rqo8cuxsf.s[287]++;
properties.directionalLightDirections = this.directionalLightDirections.slice();
cov_1rqo8cuxsf.s[288]++;
properties.directionalLightDiffuseColors = this.directionalLightDiffuseColors.slice();
cov_1rqo8cuxsf.s[289]++;
properties.directionalLightSpecularColors = this.directionalLightSpecularColors.slice();
cov_1rqo8cuxsf.s[290]++;
properties.pointLightPositions = this.pointLightPositions.slice();
cov_1rqo8cuxsf.s[291]++;
properties.pointLightDiffuseColors = this.pointLightDiffuseColors.slice();
cov_1rqo8cuxsf.s[292]++;
properties.pointLightSpecularColors = this.pointLightSpecularColors.slice();
cov_1rqo8cuxsf.s[293]++;
properties.spotLightPositions = this.spotLightPositions.slice();
cov_1rqo8cuxsf.s[294]++;
properties.spotLightDirections = this.spotLightDirections.slice();
cov_1rqo8cuxsf.s[295]++;
properties.spotLightDiffuseColors = this.spotLightDiffuseColors.slice();
cov_1rqo8cuxsf.s[296]++;
properties.spotLightSpecularColors = this.spotLightSpecularColors.slice();
cov_1rqo8cuxsf.s[297]++;
properties.spotLightAngle = this.spotLightAngle.slice();
cov_1rqo8cuxsf.s[298]++;
properties.spotLightConc = this.spotLightConc.slice();
cov_1rqo8cuxsf.s[299]++;
properties.userFillShader = this.userFillShader;
cov_1rqo8cuxsf.s[300]++;
properties.userStrokeShader = this.userStrokeShader;
cov_1rqo8cuxsf.s[301]++;
properties.userPointShader = this.userPointShader;
cov_1rqo8cuxsf.s[302]++;
properties.pointSize = this.pointSize;
cov_1rqo8cuxsf.s[303]++;
properties.curStrokeWeight = this.curStrokeWeight;
cov_1rqo8cuxsf.s[304]++;
properties.curStrokeColor = this.curStrokeColor;
cov_1rqo8cuxsf.s[305]++;
properties.curFillColor = this.curFillColor;
cov_1rqo8cuxsf.s[306]++;
properties._useSpecularMaterial = this._useSpecularMaterial;
cov_1rqo8cuxsf.s[307]++;
properties._useEmissiveMaterial = this._useEmissiveMaterial;
cov_1rqo8cuxsf.s[308]++;
properties._useShininess = this._useShininess;
cov_1rqo8cuxsf.s[309]++;
properties.constantAttenuation = this.constantAttenuation;
cov_1rqo8cuxsf.s[310]++;
properties.linearAttenuation = this.linearAttenuation;
cov_1rqo8cuxsf.s[311]++;
properties.quadraticAttenuation = this.quadraticAttenuation;
cov_1rqo8cuxsf.s[312]++;
properties._enableLighting = this._enableLighting;
cov_1rqo8cuxsf.s[313]++;
properties._useNormalMaterial = this._useNormalMaterial;
cov_1rqo8cuxsf.s[314]++;
properties._tex = this._tex;
cov_1rqo8cuxsf.s[315]++;
properties.drawMode = this.drawMode;
cov_1rqo8cuxsf.s[316]++;
return style;
};
cov_1rqo8cuxsf.s[317]++;
_main.default.RendererGL.prototype.resetMatrix = function() {
cov_1rqo8cuxsf.f[30]++;
cov_1rqo8cuxsf.s[318]++;
this.uMVMatrix = _main.default.Matrix.identity(this._pInst);
cov_1rqo8cuxsf.s[319]++;
return this;
};
//////////////////////////////////////////////
// SHADER
//////////////////////////////////////////////
/*
* shaders are created and cached on a per-renderer basis,
* on the grounds that each renderer will have its own gl context
* and the shader must be valid in that context.
*/ cov_1rqo8cuxsf
.s[320]++;
_main.default.RendererGL.prototype._getImmediateStrokeShader = function() {
cov_1rqo8cuxsf.f[31]++;
// select the stroke shader to use
var stroke = (cov_1rqo8cuxsf.s[321]++, this.userStrokeShader);
cov_1rqo8cuxsf.s[322]++;
if (
(cov_1rqo8cuxsf.b[39][0]++, !stroke) ||
(cov_1rqo8cuxsf.b[39][1]++, !stroke.isStrokeShader())
) {
cov_1rqo8cuxsf.b[38][0]++;
cov_1rqo8cuxsf.s[323]++;
return this._getLineShader();
} else {
cov_1rqo8cuxsf.b[38][1]++;
}
cov_1rqo8cuxsf.s[324]++;
return stroke;
};
cov_1rqo8cuxsf.s[325]++;
_main.default.RendererGL.prototype._getRetainedStrokeShader =
_main.default.RendererGL.prototype._getImmediateStrokeShader;
/*
* selects which fill shader should be used based on renderer state,
* for use with begin/endShape and immediate vertex mode.
*/ cov_1rqo8cuxsf
.s[326]++;
_main.default.RendererGL.prototype._getImmediateFillShader = function() {
cov_1rqo8cuxsf.f[32]++;
var fill = (cov_1rqo8cuxsf.s[327]++, this.userFillShader);
cov_1rqo8cuxsf.s[328]++;
if (this._useNormalMaterial) {
cov_1rqo8cuxsf.b[40][0]++;
cov_1rqo8cuxsf.s[329]++;
if (
(cov_1rqo8cuxsf.b[42][0]++, !fill) ||
(cov_1rqo8cuxsf.b[42][1]++, !fill.isNormalShader())
) {
cov_1rqo8cuxsf.b[41][0]++;
cov_1rqo8cuxsf.s[330]++;
return this._getNormalShader();
} else {
cov_1rqo8cuxsf.b[41][1]++;
}
} else {
cov_1rqo8cuxsf.b[40][1]++;
}
cov_1rqo8cuxsf.s[331]++;
if (this._enableLighting) {
cov_1rqo8cuxsf.b[43][0]++;
cov_1rqo8cuxsf.s[332]++;
if (
(cov_1rqo8cuxsf.b[45][0]++, !fill) ||
(cov_1rqo8cuxsf.b[45][1]++, !fill.isLightShader())
) {
cov_1rqo8cuxsf.b[44][0]++;
cov_1rqo8cuxsf.s[333]++;
return this._getLightShader();
} else {
cov_1rqo8cuxsf.b[44][1]++;
}
} else {
cov_1rqo8cuxsf.b[43][1]++;
cov_1rqo8cuxsf.s[334]++;
if (this._tex) {
cov_1rqo8cuxsf.b[46][0]++;
cov_1rqo8cuxsf.s[335]++;
if (
(cov_1rqo8cuxsf.b[48][0]++, !fill) ||
(cov_1rqo8cuxsf.b[48][1]++, !fill.isTextureShader())
) {
cov_1rqo8cuxsf.b[47][0]++;
cov_1rqo8cuxsf.s[336]++;
return this._getLightShader();
} else {
cov_1rqo8cuxsf.b[47][1]++;
}
} else {
cov_1rqo8cuxsf.b[46][1]++;
cov_1rqo8cuxsf.s[337]++;
if (!fill /*|| !fill.isColorShader()*/) {
cov_1rqo8cuxsf.b[49][0]++;
cov_1rqo8cuxsf.s[338]++;
return this._getImmediateModeShader();
} else {
cov_1rqo8cuxsf.b[49][1]++;
}
}
}
cov_1rqo8cuxsf.s[339]++;
return fill;
};
/*
* selects which fill shader should be used based on renderer state
* for retained mode.
*/ cov_1rqo8cuxsf
.s[340]++;
_main.default.RendererGL.prototype._getRetainedFillShader = function() {
cov_1rqo8cuxsf.f[33]++;
cov_1rqo8cuxsf.s[341]++;
if (this._useNormalMaterial) {
cov_1rqo8cuxsf.b[50][0]++;
cov_1rqo8cuxsf.s[342]++;
return this._getNormalShader();
} else {
cov_1rqo8cuxsf.b[50][1]++;
}
var fill = (cov_1rqo8cuxsf.s[343]++, this.userFillShader);
cov_1rqo8cuxsf.s[344]++;
if (this._enableLighting) {
cov_1rqo8cuxsf.b[51][0]++;
cov_1rqo8cuxsf.s[345]++;
if (
(cov_1rqo8cuxsf.b[53][0]++, !fill) ||
(cov_1rqo8cuxsf.b[53][1]++, !fill.isLightShader())
) {
cov_1rqo8cuxsf.b[52][0]++;
cov_1rqo8cuxsf.s[346]++;
return this._getLightShader();
} else {
cov_1rqo8cuxsf.b[52][1]++;
}
} else {
cov_1rqo8cuxsf.b[51][1]++;
cov_1rqo8cuxsf.s[347]++;
if (this._tex) {
cov_1rqo8cuxsf.b[54][0]++;
cov_1rqo8cuxsf.s[348]++;
if (
(cov_1rqo8cuxsf.b[56][0]++, !fill) ||
(cov_1rqo8cuxsf.b[56][1]++, !fill.isTextureShader())
) {
cov_1rqo8cuxsf.b[55][0]++;
cov_1rqo8cuxsf.s[349]++;
return this._getLightShader();
} else {
cov_1rqo8cuxsf.b[55][1]++;
}
} else {
cov_1rqo8cuxsf.b[54][1]++;
cov_1rqo8cuxsf.s[350]++;
if (!fill /* || !fill.isColorShader()*/) {
cov_1rqo8cuxsf.b[57][0]++;
cov_1rqo8cuxsf.s[351]++;
return this._getColorShader();
} else {
cov_1rqo8cuxsf.b[57][1]++;
}
}
}
cov_1rqo8cuxsf.s[352]++;
return fill;
};
cov_1rqo8cuxsf.s[353]++;
_main.default.RendererGL.prototype._getImmediatePointShader = function() {
cov_1rqo8cuxsf.f[34]++;
// select the point shader to use
var point = (cov_1rqo8cuxsf.s[354]++, this.userPointShader);
cov_1rqo8cuxsf.s[355]++;
if (
(cov_1rqo8cuxsf.b[59][0]++, !point) ||
(cov_1rqo8cuxsf.b[59][1]++, !point.isPointShader())
) {
cov_1rqo8cuxsf.b[58][0]++;
cov_1rqo8cuxsf.s[356]++;
return this._getPointShader();
} else {
cov_1rqo8cuxsf.b[58][1]++;
}
cov_1rqo8cuxsf.s[357]++;
return point;
};
cov_1rqo8cuxsf.s[358]++;
_main.default.RendererGL.prototype._getRetainedLineShader =
_main.default.RendererGL.prototype._getImmediateLineShader;
cov_1rqo8cuxsf.s[359]++;
_main.default.RendererGL.prototype._getLightShader = function() {
cov_1rqo8cuxsf.f[35]++;
cov_1rqo8cuxsf.s[360]++;
if (!this._defaultLightShader) {
cov_1rqo8cuxsf.b[60][0]++;
cov_1rqo8cuxsf.s[361]++;
if (this._pInst._glAttributes.perPixelLighting) {
cov_1rqo8cuxsf.b[61][0]++;
cov_1rqo8cuxsf.s[362]++;
this._defaultLightShader = new _main.default.Shader(
this,
defaultShaders.phongVert,
defaultShaders.phongFrag
);
} else {
cov_1rqo8cuxsf.b[61][1]++;
cov_1rqo8cuxsf.s[363]++;
this._defaultLightShader = new _main.default.Shader(
this,
defaultShaders.lightVert,
defaultShaders.lightTextureFrag
);
}
} else {
cov_1rqo8cuxsf.b[60][1]++;
}
cov_1rqo8cuxsf.s[364]++;
return this._defaultLightShader;
};
cov_1rqo8cuxsf.s[365]++;
_main.default.RendererGL.prototype._getImmediateModeShader = function() {
cov_1rqo8cuxsf.f[36]++;
cov_1rqo8cuxsf.s[366]++;
if (!this._defaultImmediateModeShader) {
cov_1rqo8cuxsf.b[62][0]++;
cov_1rqo8cuxsf.s[367]++;
this._defaultImmediateModeShader = new _main.default.Shader(
this,
defaultShaders.immediateVert,
defaultShaders.vertexColorFrag
);
} else {
cov_1rqo8cuxsf.b[62][1]++;
}
cov_1rqo8cuxsf.s[368]++;
return this._defaultImmediateModeShader;
};
cov_1rqo8cuxsf.s[369]++;
_main.default.RendererGL.prototype._getNormalShader = function() {
cov_1rqo8cuxsf.f[37]++;
cov_1rqo8cuxsf.s[370]++;
if (!this._defaultNormalShader) {
cov_1rqo8cuxsf.b[63][0]++;
cov_1rqo8cuxsf.s[371]++;
this._defaultNormalShader = new _main.default.Shader(
this,
defaultShaders.normalVert,
defaultShaders.normalFrag
);
} else {
cov_1rqo8cuxsf.b[63][1]++;
}
cov_1rqo8cuxsf.s[372]++;
return this._defaultNormalShader;
};
cov_1rqo8cuxsf.s[373]++;
_main.default.RendererGL.prototype._getColorShader = function() {
cov_1rqo8cuxsf.f[38]++;
cov_1rqo8cuxsf.s[374]++;
if (!this._defaultColorShader) {
cov_1rqo8cuxsf.b[64][0]++;
cov_1rqo8cuxsf.s[375]++;
this._defaultColorShader = new _main.default.Shader(
this,
defaultShaders.normalVert,
defaultShaders.basicFrag
);
} else {
cov_1rqo8cuxsf.b[64][1]++;
}
cov_1rqo8cuxsf.s[376]++;
return this._defaultColorShader;
};
cov_1rqo8cuxsf.s[377]++;
_main.default.RendererGL.prototype._getPointShader = function() {
cov_1rqo8cuxsf.f[39]++;
cov_1rqo8cuxsf.s[378]++;
if (!this._defaultPointShader) {
cov_1rqo8cuxsf.b[65][0]++;
cov_1rqo8cuxsf.s[379]++;
this._defaultPointShader = new _main.default.Shader(
this,
defaultShaders.pointVert,
defaultShaders.pointFrag
);
} else {
cov_1rqo8cuxsf.b[65][1]++;
}
cov_1rqo8cuxsf.s[380]++;
return this._defaultPointShader;
};
cov_1rqo8cuxsf.s[381]++;
_main.default.RendererGL.prototype._getLineShader = function() {
cov_1rqo8cuxsf.f[40]++;
cov_1rqo8cuxsf.s[382]++;
if (!this._defaultLineShader) {
cov_1rqo8cuxsf.b[66][0]++;
cov_1rqo8cuxsf.s[383]++;
this._defaultLineShader = new _main.default.Shader(
this,
defaultShaders.lineVert,
defaultShaders.lineFrag
);
} else {
cov_1rqo8cuxsf.b[66][1]++;
}
cov_1rqo8cuxsf.s[384]++;
return this._defaultLineShader;
};
cov_1rqo8cuxsf.s[385]++;
_main.default.RendererGL.prototype._getFontShader = function() {
cov_1rqo8cuxsf.f[41]++;
cov_1rqo8cuxsf.s[386]++;
if (!this._defaultFontShader) {
cov_1rqo8cuxsf.b[67][0]++;
cov_1rqo8cuxsf.s[387]++;
this.GL.getExtension('OES_standard_derivatives');
cov_1rqo8cuxsf.s[388]++;
this._defaultFontShader = new _main.default.Shader(
this,
defaultShaders.fontVert,
defaultShaders.fontFrag
);
} else {
cov_1rqo8cuxsf.b[67][1]++;
}
cov_1rqo8cuxsf.s[389]++;
return this._defaultFontShader;
};
cov_1rqo8cuxsf.s[390]++;
_main.default.RendererGL.prototype._getEmptyTexture = function() {
cov_1rqo8cuxsf.f[42]++;
cov_1rqo8cuxsf.s[391]++;
if (!this._emptyTexture) {
cov_1rqo8cuxsf.b[68][0]++;
// a plain white texture RGBA, full alpha, single pixel.
var im = (cov_1rqo8cuxsf.s[392]++, new _main.default.Image(1, 1));
cov_1rqo8cuxsf.s[393]++;
im.set(0, 0, 255);
cov_1rqo8cuxsf.s[394]++;
this._emptyTexture = new _main.default.Texture(this, im);
} else {
cov_1rqo8cuxsf.b[68][1]++;
}
cov_1rqo8cuxsf.s[395]++;
return this._emptyTexture;
};
cov_1rqo8cuxsf.s[396]++;
_main.default.RendererGL.prototype.getTexture = function(img) {
cov_1rqo8cuxsf.f[43]++;
var textures = (cov_1rqo8cuxsf.s[397]++, this.textures);
cov_1rqo8cuxsf.s[398]++;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (
var _iterator = textures[Symbol.iterator](), _step;
!(_iteratorNormalCompletion = (_step = _iterator.next()).done);
_iteratorNormalCompletion = true
) {
var texture = _step.value;
cov_1rqo8cuxsf.s[399]++;
if (texture.src === img) {
cov_1rqo8cuxsf.b[69][0]++;
cov_1rqo8cuxsf.s[400]++;
return texture;
} else {
cov_1rqo8cuxsf.b[69][1]++;
}
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
var tex = (cov_1rqo8cuxsf.s[401]++, new _main.default.Texture(this, img));
cov_1rqo8cuxsf.s[402]++;
textures.push(tex);
cov_1rqo8cuxsf.s[403]++;
return tex;
};
cov_1rqo8cuxsf.s[404]++;
_main.default.RendererGL.prototype._setStrokeUniforms = function(strokeShader) {
cov_1rqo8cuxsf.f[44]++;
cov_1rqo8cuxsf.s[405]++;
strokeShader.bindShader();
// set the uniform values
cov_1rqo8cuxsf.s[406]++;
strokeShader.setUniform('uMaterialColor', this.curStrokeColor);
cov_1rqo8cuxsf.s[407]++;
strokeShader.setUniform('uStrokeWeight', this.curStrokeWeight);
};
cov_1rqo8cuxsf.s[408]++;
_main.default.RendererGL.prototype._setFillUniforms = function(fillShader) {
cov_1rqo8cuxsf.f[45]++;
cov_1rqo8cuxsf.s[409]++;
fillShader.bindShader();
// TODO: optimize
cov_1rqo8cuxsf.s[410]++;
fillShader.setUniform('uMaterialColor', this.curFillColor);
cov_1rqo8cuxsf.s[411]++;
fillShader.setUniform('isTexture', !!this._tex);
cov_1rqo8cuxsf.s[412]++;
if (this._tex) {
cov_1rqo8cuxsf.b[70][0]++;
cov_1rqo8cuxsf.s[413]++;
fillShader.setUniform('uSampler', this._tex);
} else {
cov_1rqo8cuxsf.b[70][1]++;
}
cov_1rqo8cuxsf.s[414]++;
fillShader.setUniform('uTint', this._tint);
cov_1rqo8cuxsf.s[415]++;
fillShader.setUniform('uSpecular', this._useSpecularMaterial);
cov_1rqo8cuxsf.s[416]++;
fillShader.setUniform('uEmissive', this._useEmissiveMaterial);
cov_1rqo8cuxsf.s[417]++;
fillShader.setUniform('uShininess', this._useShininess);
cov_1rqo8cuxsf.s[418]++;
fillShader.setUniform('uUseLighting', this._enableLighting);
var pointLightCount = (cov_1rqo8cuxsf.s[419]++,
this.pointLightDiffuseColors.length / 3);
cov_1rqo8cuxsf.s[420]++;
fillShader.setUniform('uPointLightCount', pointLightCount);
cov_1rqo8cuxsf.s[421]++;
fillShader.setUniform('uPointLightLocation', this.pointLightPositions);
cov_1rqo8cuxsf.s[422]++;
fillShader.setUniform('uPointLightDiffuseColors', this.pointLightDiffuseColors);
cov_1rqo8cuxsf.s[423]++;
fillShader.setUniform(
'uPointLightSpecularColors',
this.pointLightSpecularColors
);
var directionalLightCount = (cov_1rqo8cuxsf.s[424]++,
this.directionalLightDiffuseColors.length / 3);
cov_1rqo8cuxsf.s[425]++;
fillShader.setUniform('uDirectionalLightCount', directionalLightCount);
cov_1rqo8cuxsf.s[426]++;
fillShader.setUniform('uLightingDirection', this.directionalLightDirections);
cov_1rqo8cuxsf.s[427]++;
fillShader.setUniform(
'uDirectionalDiffuseColors',
this.directionalLightDiffuseColors
);
cov_1rqo8cuxsf.s[428]++;
fillShader.setUniform(
'uDirectionalSpecularColors',
this.directionalLightSpecularColors
);
// TODO: sum these here...
var ambientLightCount = (cov_1rqo8cuxsf.s[429]++,
this.ambientLightColors.length / 3);
cov_1rqo8cuxsf.s[430]++;
fillShader.setUniform('uAmbientLightCount', ambientLightCount);
cov_1rqo8cuxsf.s[431]++;
fillShader.setUniform('uAmbientColor', this.ambientLightColors);
var spotLightCount = (cov_1rqo8cuxsf.s[432]++,
this.spotLightDiffuseColors.length / 3);
cov_1rqo8cuxsf.s[433]++;
fillShader.setUniform('uSpotLightCount', spotLightCount);
cov_1rqo8cuxsf.s[434]++;
fillShader.setUniform('uSpotLightAngle', this.spotLightAngle);
cov_1rqo8cuxsf.s[435]++;
fillShader.setUniform('uSpotLightConc', this.spotLightConc);
cov_1rqo8cuxsf.s[436]++;
fillShader.setUniform('uSpotLightDiffuseColors', this.spotLightDiffuseColors);
cov_1rqo8cuxsf.s[437]++;
fillShader.setUniform('uSpotLightSpecularColors', this.spotLightSpecularColors);
cov_1rqo8cuxsf.s[438]++;
fillShader.setUniform('uSpotLightLocation', this.spotLightPositions);
cov_1rqo8cuxsf.s[439]++;
fillShader.setUniform('uSpotLightDirection', this.spotLightDirections);
cov_1rqo8cuxsf.s[440]++;
fillShader.setUniform('uConstantAttenuation', this.constantAttenuation);
cov_1rqo8cuxsf.s[441]++;
fillShader.setUniform('uLinearAttenuation', this.linearAttenuation);
cov_1rqo8cuxsf.s[442]++;
fillShader.setUniform('uQuadraticAttenuation', this.quadraticAttenuation);
cov_1rqo8cuxsf.s[443]++;
fillShader.bindTextures();
};
cov_1rqo8cuxsf.s[444]++;
_main.default.RendererGL.prototype._setPointUniforms = function(pointShader) {
cov_1rqo8cuxsf.f[46]++;
cov_1rqo8cuxsf.s[445]++;
pointShader.bindShader();
// set the uniform values
cov_1rqo8cuxsf.s[446]++;
pointShader.setUniform('uMaterialColor', this.curStrokeColor);
// @todo is there an instance where this isn't stroke weight?
// should be they be same var?
cov_1rqo8cuxsf.s[447]++;
pointShader.setUniform('uPointSize', this.pointSize);
};
/* Binds a buffer to the drawing context
* when passed more than two arguments it also updates or initializes
* the data associated with the buffer
*/ cov_1rqo8cuxsf
.s[448]++;
_main.default.RendererGL.prototype._bindBuffer = function(
buffer,
target,
values,
type,
usage
) {
cov_1rqo8cuxsf.f[47]++;
cov_1rqo8cuxsf.s[449]++;
if (!target) {
cov_1rqo8cuxsf.b[71][0]++;
cov_1rqo8cuxsf.s[450]++;
target = this.GL.ARRAY_BUFFER;
} else {
cov_1rqo8cuxsf.b[71][1]++;
}
cov_1rqo8cuxsf.s[451]++;
this.GL.bindBuffer(target, buffer);
cov_1rqo8cuxsf.s[452]++;
if (values !== undefined) {
cov_1rqo8cuxsf.b[72][0]++;
var data = (cov_1rqo8cuxsf.s[453]++,
new ((cov_1rqo8cuxsf.b[73][0]++, type) ||
(cov_1rqo8cuxsf.b[73][1]++, Float32Array))(values));
cov_1rqo8cuxsf.s[454]++;
this.GL.bufferData(
target,
data,
(cov_1rqo8cuxsf.b[74][0]++, usage) ||
(cov_1rqo8cuxsf.b[74][1]++, this.GL.STATIC_DRAW)
);
} else {
cov_1rqo8cuxsf.b[72][1]++;
}
};
///////////////////////////////
//// UTILITY FUNCTIONS
//////////////////////////////
cov_1rqo8cuxsf.s[455]++;
_main.default.RendererGL.prototype._arraysEqual = function(a, b) {
cov_1rqo8cuxsf.f[48]++;
var aLength = (cov_1rqo8cuxsf.s[456]++, a.length);
cov_1rqo8cuxsf.s[457]++;
if (aLength !== b.length) {
cov_1rqo8cuxsf.b[75][0]++;
cov_1rqo8cuxsf.s[458]++;
return false;
} else {
cov_1rqo8cuxsf.b[75][1]++;
}
cov_1rqo8cuxsf.s[459]++;
for (var i = (cov_1rqo8cuxsf.s[460]++, 0); i < aLength; i++) {
cov_1rqo8cuxsf.s[461]++;
if (a[i] !== b[i]) {
cov_1rqo8cuxsf.b[76][0]++;
cov_1rqo8cuxsf.s[462]++;
return false;
} else {
cov_1rqo8cuxsf.b[76][1]++;
}
}
cov_1rqo8cuxsf.s[463]++;
return true;
};
cov_1rqo8cuxsf.s[464]++;
_main.default.RendererGL.prototype._isTypedArray = function(arr) {
cov_1rqo8cuxsf.f[49]++;
var res = (cov_1rqo8cuxsf.s[465]++, false);
cov_1rqo8cuxsf.s[466]++;
res = arr instanceof Float32Array;
cov_1rqo8cuxsf.s[467]++;
res = arr instanceof Float64Array;
cov_1rqo8cuxsf.s[468]++;
res = arr instanceof Int16Array;
cov_1rqo8cuxsf.s[469]++;
res = arr instanceof Uint16Array;
cov_1rqo8cuxsf.s[470]++;
res = arr instanceof Uint32Array;
cov_1rqo8cuxsf.s[471]++;
return res;
};
/**
* turn a two dimensional array into one dimensional array
* @private
* @param {Array} arr 2-dimensional array
* @return {Array} 1-dimensional array
* [[1, 2, 3],[4, 5, 6]] -> [1, 2, 3, 4, 5, 6]
*/ cov_1rqo8cuxsf.s[472]++;
_main.default.RendererGL.prototype._flatten = function(arr) {
cov_1rqo8cuxsf.f[50]++;
cov_1rqo8cuxsf.s[473]++;
//when empty, return empty
if (arr.length === 0) {
cov_1rqo8cuxsf.b[77][0]++;
cov_1rqo8cuxsf.s[474]++;
return [];
} else {
cov_1rqo8cuxsf.b[77][1]++;
cov_1rqo8cuxsf.s[475]++;
if (arr.length > 20000) {
cov_1rqo8cuxsf.b[78][0]++;
//big models , load slower to avoid stack overflow
//faster non-recursive flatten via axelduch
//stackoverflow.com/questions/27266550/how-to-flatten-nested-array-in-javascript
var _toString = (cov_1rqo8cuxsf.s[476]++, Object.prototype.toString);
var arrayTypeStr = (cov_1rqo8cuxsf.s[477]++, '[object Array]');
var result = (cov_1rqo8cuxsf.s[478]++, []);
var nodes = (cov_1rqo8cuxsf.s[479]++, arr.slice());
var node;
cov_1rqo8cuxsf.s[480]++;
node = nodes.pop();
cov_1rqo8cuxsf.s[481]++;
do {
cov_1rqo8cuxsf.s[482]++;
if (_toString.call(node) === arrayTypeStr) {
cov_1rqo8cuxsf.b[80][0]++;
cov_1rqo8cuxsf.s[483]++;
nodes.push.apply(nodes, _toConsumableArray(node));
} else {
cov_1rqo8cuxsf.b[80][1]++;
cov_1rqo8cuxsf.s[484]++;
result.push(node);
}
} while (
(cov_1rqo8cuxsf.b[79][0]++, nodes.length) &&
(cov_1rqo8cuxsf.b[79][1]++, (node = nodes.pop()) !== undefined)
);
cov_1rqo8cuxsf.s[485]++;
result.reverse(); // we reverse result to restore the original order
cov_1rqo8cuxsf.s[486]++;
return result;
} else {
var _ref;
cov_1rqo8cuxsf.b[78][1]++;
cov_1rqo8cuxsf.s[487]++;
//otherwise if model within limits for browser
//use faster recursive loading
return (_ref = []).concat.apply(_ref, _toConsumableArray(arr));
}
}
};
/**
* turn a p5.Vector Array into a one dimensional number array
* @private
* @param {p5.Vector[]} arr an array of p5.Vector
* @return {Number[]} a one dimensional array of numbers
* [p5.Vector(1, 2, 3), p5.Vector(4, 5, 6)] ->
* [1, 2, 3, 4, 5, 6]
*/ cov_1rqo8cuxsf.s[488]++;
_main.default.RendererGL.prototype._vToNArray = function(arr) {
cov_1rqo8cuxsf.f[51]++;
var ret = (cov_1rqo8cuxsf.s[489]++, []);
cov_1rqo8cuxsf.s[490]++;
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (
var _iterator2 = arr[Symbol.iterator](), _step2;
!(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done);
_iteratorNormalCompletion2 = true
) {
var item = _step2.value;
cov_1rqo8cuxsf.s[491]++;
ret.push(item.x, item.y, item.z);
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
cov_1rqo8cuxsf.s[492]++;
return ret;
};
/**
* ensures that p5 is using a 3d renderer. throws an error if not.
*/ cov_1rqo8cuxsf.s[493]++;
_main.default.prototype._assert3d = function(name) {
cov_1rqo8cuxsf.f[52]++;
cov_1rqo8cuxsf.s[494]++;
if (!this._renderer.isP3D) {
cov_1rqo8cuxsf.b[81][0]++;
cov_1rqo8cuxsf.s[495]++;
throw new Error(
''.concat(
name,
"() is only supported in WEBGL mode. If you'd like to use 3D graphics and WebGL, see https://p5js.org/examples/form-3d-primitives.html for more information."
)
);
} else {
cov_1rqo8cuxsf.b[81][1]++;
}
};
// function to initialize GLU Tesselator
cov_1rqo8cuxsf.s[496]++;
_main.default.RendererGL.prototype._initTessy = function initTesselator() {
cov_1rqo8cuxsf.f[53]++;
// function called for each vertex of tesselator output
function vertexCallback(data, polyVertArray) {
cov_1rqo8cuxsf.f[54]++;
cov_1rqo8cuxsf.s[497]++;
polyVertArray[polyVertArray.length] = data[0];
cov_1rqo8cuxsf.s[498]++;
polyVertArray[polyVertArray.length] = data[1];
cov_1rqo8cuxsf.s[499]++;
polyVertArray[polyVertArray.length] = data[2];
}
function begincallback(type) {
cov_1rqo8cuxsf.f[55]++;
cov_1rqo8cuxsf.s[500]++;
if (type !== _libtess.default.primitiveType.GL_TRIANGLES) {
cov_1rqo8cuxsf.b[82][0]++;
cov_1rqo8cuxsf.s[501]++;
console.log('expected TRIANGLES but got type: '.concat(type));
} else {
cov_1rqo8cuxsf.b[82][1]++;
}
}
function errorcallback(errno) {
cov_1rqo8cuxsf.f[56]++;
cov_1rqo8cuxsf.s[502]++;
console.log('error callback');
cov_1rqo8cuxsf.s[503]++;
console.log('error number: '.concat(errno));
}
// callback for when segments intersect and must be split
function combinecallback(coords, data, weight) {
cov_1rqo8cuxsf.f[57]++;
cov_1rqo8cuxsf.s[504]++;
return [coords[0], coords[1], coords[2]];
}
function edgeCallback(flag) {
// don't really care about the flag, but need no-strip/no-fan behavior
cov_1rqo8cuxsf.f[58]++;
}
var tessy = (cov_1rqo8cuxsf.s[505]++, new _libtess.default.GluTesselator());
cov_1rqo8cuxsf.s[506]++;
tessy.gluTessCallback(
_libtess.default.gluEnum.GLU_TESS_VERTEX_DATA,
vertexCallback
);
cov_1rqo8cuxsf.s[507]++;
tessy.gluTessCallback(_libtess.default.gluEnum.GLU_TESS_BEGIN, begincallback);
cov_1rqo8cuxsf.s[508]++;
tessy.gluTessCallback(_libtess.default.gluEnum.GLU_TESS_ERROR, errorcallback);
cov_1rqo8cuxsf.s[509]++;
tessy.gluTessCallback(
_libtess.default.gluEnum.GLU_TESS_COMBINE,
combinecallback
);
cov_1rqo8cuxsf.s[510]++;
tessy.gluTessCallback(
_libtess.default.gluEnum.GLU_TESS_EDGE_FLAG,
edgeCallback
);
cov_1rqo8cuxsf.s[511]++;
return tessy;
};
cov_1rqo8cuxsf.s[512]++;
_main.default.RendererGL.prototype._triangulate = function(contours) {
cov_1rqo8cuxsf.f[59]++;
cov_1rqo8cuxsf.s[513]++;
// libtess will take 3d verts and flatten to a plane for tesselation
// since only doing 2d tesselation here, provide z=1 normal to skip
// iterating over verts only to get the same answer.
// comment out to test normal-generation code
this._tessy.gluTessNormal(0, 0, 1);
var triangleVerts = (cov_1rqo8cuxsf.s[514]++, []);
cov_1rqo8cuxsf.s[515]++;
this._tessy.gluTessBeginPolygon(triangleVerts);
cov_1rqo8cuxsf.s[516]++;
for (var i = (cov_1rqo8cuxsf.s[517]++, 0); i < contours.length; i++) {
cov_1rqo8cuxsf.s[518]++;
this._tessy.gluTessBeginContour();
var contour = (cov_1rqo8cuxsf.s[519]++, contours[i]);
cov_1rqo8cuxsf.s[520]++;
for (var j = (cov_1rqo8cuxsf.s[521]++, 0); j < contour.length; j += 3) {
var coords = (cov_1rqo8cuxsf.s[522]++,
[contour[j], contour[j + 1], contour[j + 2]]);
cov_1rqo8cuxsf.s[523]++;
this._tessy.gluTessVertex(coords, coords);
}
cov_1rqo8cuxsf.s[524]++;
this._tessy.gluTessEndContour();
}
// finish polygon
cov_1rqo8cuxsf.s[525]++;
this._tessy.gluTessEndPolygon();
cov_1rqo8cuxsf.s[526]++;
return triangleVerts;
};
// function to calculate BezierVertex Coefficients
cov_1rqo8cuxsf.s[527]++;
_main.default.RendererGL.prototype._bezierCoefficients = function(t) {
cov_1rqo8cuxsf.f[60]++;
var t2 = (cov_1rqo8cuxsf.s[528]++, t * t);
var t3 = (cov_1rqo8cuxsf.s[529]++, t2 * t);
var mt = (cov_1rqo8cuxsf.s[530]++, 1 - t);
var mt2 = (cov_1rqo8cuxsf.s[531]++, mt * mt);
var mt3 = (cov_1rqo8cuxsf.s[532]++, mt2 * mt);
cov_1rqo8cuxsf.s[533]++;
return [mt3, 3 * mt2 * t, 3 * mt * t2, t3];
};
// function to calculate QuadraticVertex Coefficients
cov_1rqo8cuxsf.s[534]++;
_main.default.RendererGL.prototype._quadraticCoefficients = function(t) {
cov_1rqo8cuxsf.f[61]++;
var t2 = (cov_1rqo8cuxsf.s[535]++, t * t);
var mt = (cov_1rqo8cuxsf.s[536]++, 1 - t);
var mt2 = (cov_1rqo8cuxsf.s[537]++, mt * mt);
cov_1rqo8cuxsf.s[538]++;
return [mt2, 2 * mt * t, t2];
};
// function to convert Bezier coordinates to Catmull Rom Splines
cov_1rqo8cuxsf.s[539]++;
_main.default.RendererGL.prototype._bezierToCatmull = function(w) {
cov_1rqo8cuxsf.f[62]++;
var p1 = (cov_1rqo8cuxsf.s[540]++, w[1]);
var p2 = (cov_1rqo8cuxsf.s[541]++, w[1] + (w[2] - w[0]) / this._curveTightness);
var p3 = (cov_1rqo8cuxsf.s[542]++, w[2] - (w[3] - w[1]) / this._curveTightness);
var p4 = (cov_1rqo8cuxsf.s[543]++, w[2]);
var p = (cov_1rqo8cuxsf.s[544]++, [p1, p2, p3, p4]);
cov_1rqo8cuxsf.s[545]++;
return p;
};
var _default = _main.default.RendererGL;
exports.default = _default;
},
{
'../core/constants': 43,
'../core/main': 54,
'../core/p5.Renderer': 57,
'./p5.Camera': 102,
'./p5.Matrix': 104,
'./p5.Shader': 109,
libtess: 32,
path: 35
}
],
109: [
function(_dereq_, module, exports) {
'use strict';
var cov_1cgthlmn1k = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.Shader.js';
var hash = '936beddf43b75bf2cd66efdae581c3dcda9d1572';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.Shader.js',
statementMap: {
'0': { start: { line: 20, column: 0 }, end: { line: 36, column: 2 } },
'1': { start: { line: 24, column: 2 }, end: { line: 24, column: 28 } },
'2': { start: { line: 25, column: 2 }, end: { line: 25, column: 26 } },
'3': { start: { line: 26, column: 2 }, end: { line: 26, column: 26 } },
'4': { start: { line: 27, column: 2 }, end: { line: 27, column: 24 } },
'5': { start: { line: 28, column: 2 }, end: { line: 28, column: 24 } },
'6': { start: { line: 29, column: 2 }, end: { line: 29, column: 22 } },
'7': { start: { line: 30, column: 2 }, end: { line: 30, column: 33 } },
'8': { start: { line: 31, column: 2 }, end: { line: 31, column: 23 } },
'9': { start: { line: 32, column: 2 }, end: { line: 32, column: 31 } },
'10': { start: { line: 33, column: 2 }, end: { line: 33, column: 21 } },
'11': { start: { line: 34, column: 2 }, end: { line: 34, column: 22 } },
'12': { start: { line: 35, column: 2 }, end: { line: 35, column: 21 } },
'13': { start: { line: 47, column: 0 }, end: { line: 103, column: 2 } },
'14': { start: { line: 48, column: 2 }, end: { line: 101, column: 3 } },
'15': { start: { line: 49, column: 15 }, end: { line: 49, column: 32 } },
'16': { start: { line: 59, column: 4 }, end: { line: 59, column: 57 } },
'17': { start: { line: 61, column: 4 }, end: { line: 61, column: 53 } },
'18': { start: { line: 62, column: 4 }, end: { line: 62, column: 39 } },
'19': { start: { line: 64, column: 4 }, end: { line: 71, column: 5 } },
'20': { start: { line: 65, column: 6 }, end: { line: 69, column: 8 } },
'21': { start: { line: 70, column: 6 }, end: { line: 70, column: 18 } },
'22': { start: { line: 73, column: 4 }, end: { line: 73, column: 59 } },
'23': { start: { line: 75, column: 4 }, end: { line: 75, column: 53 } },
'24': { start: { line: 76, column: 4 }, end: { line: 76, column: 39 } },
'25': { start: { line: 78, column: 4 }, end: { line: 85, column: 5 } },
'26': { start: { line: 79, column: 6 }, end: { line: 83, column: 8 } },
'27': { start: { line: 84, column: 6 }, end: { line: 84, column: 18 } },
'28': { start: { line: 87, column: 4 }, end: { line: 87, column: 41 } },
'29': { start: { line: 88, column: 4 }, end: { line: 88, column: 55 } },
'30': { start: { line: 89, column: 4 }, end: { line: 89, column: 55 } },
'31': { start: { line: 90, column: 4 }, end: { line: 90, column: 36 } },
'32': { start: { line: 91, column: 4 }, end: { line: 97, column: 5 } },
'33': { start: { line: 92, column: 6 }, end: { line: 96, column: 8 } },
'34': { start: { line: 99, column: 4 }, end: { line: 99, column: 27 } },
'35': { start: { line: 100, column: 4 }, end: { line: 100, column: 25 } },
'36': { start: { line: 102, column: 2 }, end: { line: 102, column: 14 } },
'37': { start: { line: 111, column: 0 }, end: { line: 138, column: 2 } },
'38': { start: { line: 112, column: 2 }, end: { line: 114, column: 3 } },
'39': { start: { line: 113, column: 4 }, end: { line: 113, column: 11 } },
'40': { start: { line: 116, column: 2 }, end: { line: 116, column: 23 } },
'41': { start: { line: 118, column: 13 }, end: { line: 118, column: 30 } },
'42': { start: { line: 120, column: 24 }, end: { line: 123, column: 3 } },
'43': { start: { line: 124, column: 2 }, end: { line: 135, column: 3 } },
'44': { start: { line: 124, column: 15 }, end: { line: 124, column: 16 } },
'45': { start: { line: 125, column: 26 }, end: { line: 125, column: 64 } },
'46': { start: { line: 126, column: 17 }, end: { line: 126, column: 35 } },
'47': { start: { line: 127, column: 21 }, end: { line: 127, column: 64 } },
'48': { start: { line: 128, column: 22 }, end: { line: 128, column: 24 } },
'49': { start: { line: 129, column: 4 }, end: { line: 129, column: 26 } },
'50': { start: { line: 130, column: 4 }, end: { line: 130, column: 34 } },
'51': { start: { line: 131, column: 4 }, end: { line: 131, column: 24 } },
'52': { start: { line: 132, column: 4 }, end: { line: 132, column: 40 } },
'53': { start: { line: 133, column: 4 }, end: { line: 133, column: 40 } },
'54': { start: { line: 134, column: 4 }, end: { line: 134, column: 38 } },
'55': { start: { line: 137, column: 2 }, end: { line: 137, column: 32 } },
'56': { start: { line: 146, column: 0 }, end: { line: 194, column: 2 } },
'57': { start: { line: 147, column: 2 }, end: { line: 149, column: 3 } },
'58': { start: { line: 148, column: 4 }, end: { line: 148, column: 11 } },
'59': { start: { line: 151, column: 13 }, end: { line: 151, column: 30 } },
'60': { start: { line: 154, column: 22 }, end: { line: 157, column: 3 } },
'61': { start: { line: 159, column: 21 }, end: { line: 159, column: 22 } },
'62': { start: { line: 160, column: 2 }, end: { line: 192, column: 3 } },
'63': { start: { line: 160, column: 15 }, end: { line: 160, column: 16 } },
'64': { start: { line: 161, column: 24 }, end: { line: 161, column: 63 } },
'65': { start: { line: 162, column: 20 }, end: { line: 162, column: 22 } },
'66': { start: { line: 163, column: 4 }, end: { line: 163, column: 80 } },
'67': { start: { line: 164, column: 4 }, end: { line: 164, column: 36 } },
'68': { start: { line: 165, column: 22 }, end: { line: 165, column: 38 } },
'69': { start: { line: 170, column: 4 }, end: { line: 172, column: 5 } },
'70': { start: { line: 171, column: 6 }, end: { line: 171, column: 73 } },
'71': { start: { line: 173, column: 4 }, end: { line: 173, column: 31 } },
'72': { start: { line: 174, column: 4 }, end: { line: 174, column: 36 } },
'73': { start: { line: 175, column: 4 }, end: { line: 175, column: 36 } },
'74': { start: { line: 176, column: 4 }, end: { line: 180, column: 5 } },
'75': { start: { line: 177, column: 6 }, end: { line: 177, column: 42 } },
'76': { start: { line: 178, column: 6 }, end: { line: 178, column: 21 } },
'77': { start: { line: 179, column: 6 }, end: { line: 179, column: 34 } },
'78': { start: { line: 181, column: 4 }, end: { line: 189, column: 35 } },
'79': { start: { line: 191, column: 4 }, end: { line: 191, column: 41 } },
'80': { start: { line: 193, column: 2 }, end: { line: 193, column: 30 } },
'81': { start: { line: 196, column: 0 }, end: { line: 198, column: 2 } },
'82': { start: { line: 205, column: 0 }, end: { line: 215, column: 2 } },
'83': { start: { line: 206, column: 2 }, end: { line: 206, column: 14 } },
'84': { start: { line: 207, column: 2 }, end: { line: 214, column: 3 } },
'85': { start: { line: 208, column: 4 }, end: { line: 208, column: 22 } },
'86': { start: { line: 209, column: 4 }, end: { line: 209, column: 23 } },
'87': { start: { line: 211, column: 4 }, end: { line: 211, column: 30 } },
'88': { start: { line: 213, column: 4 }, end: { line: 213, column: 59 } },
'89': { start: { line: 222, column: 0 }, end: { line: 229, column: 2 } },
'90': { start: { line: 223, column: 2 }, end: { line: 227, column: 3 } },
'91': { start: { line: 224, column: 4 }, end: { line: 224, column: 26 } },
'92': { start: { line: 226, column: 4 }, end: { line: 226, column: 24 } },
'93': { start: { line: 228, column: 2 }, end: { line: 228, column: 14 } },
'94': { start: { line: 231, column: 0 }, end: { line: 247, column: 2 } },
'95': { start: { line: 232, column: 13 }, end: { line: 232, column: 30 } },
'96': { start: { line: 234, column: 2 }, end: { line: 246, column: 3 } },
'97': { start: { line: 235, column: 14 }, end: { line: 235, column: 29 } },
'98': { start: { line: 236, column: 4 }, end: { line: 241, column: 5 } },
'99': { start: { line: 240, column: 6 }, end: { line: 240, column: 46 } },
'100': { start: { line: 242, column: 4 }, end: { line: 242, column: 57 } },
'101': { start: { line: 243, column: 4 }, end: { line: 243, column: 22 } },
'102': { start: { line: 244, column: 4 }, end: { line: 244, column: 17 } },
'103': { start: { line: 245, column: 4 }, end: { line: 245, column: 57 } },
'104': { start: { line: 249, column: 0 }, end: { line: 256, column: 2 } },
'105': { start: { line: 250, column: 2 }, end: { line: 255, column: 3 } },
'106': { start: { line: 251, column: 16 }, end: { line: 251, column: 31 } },
'107': { start: { line: 252, column: 4 }, end: { line: 254, column: 5 } },
'108': { start: { line: 253, column: 6 }, end: { line: 253, column: 19 } },
'109': { start: { line: 258, column: 0 }, end: { line: 261, column: 2 } },
'110': { start: { line: 263, column: 0 }, end: { line: 280, column: 2 } },
'111': { start: { line: 264, column: 2 }, end: { line: 264, column: 69 } },
'112': { start: { line: 265, column: 2 }, end: { line: 273, column: 3 } },
'113': { start: { line: 266, column: 4 }, end: { line: 272, column: 5 } },
'114': { start: { line: 268, column: 6 }, end: { line: 268, column: 41 } },
'115': { start: { line: 271, column: 6 }, end: { line: 271, column: 41 } },
'116': { start: { line: 274, column: 2 }, end: { line: 274, column: 69 } },
'117': { start: { line: 275, column: 2 }, end: { line: 275, column: 78 } },
'118': { start: { line: 276, column: 2 }, end: { line: 279, column: 3 } },
'119': { start: { line: 277, column: 4 }, end: { line: 277, column: 71 } },
'120': { start: { line: 278, column: 4 }, end: { line: 278, column: 67 } },
'121': { start: { line: 287, column: 0 }, end: { line: 294, column: 2 } },
'122': { start: { line: 288, column: 13 }, end: { line: 288, column: 30 } },
'123': { start: { line: 289, column: 2 }, end: { line: 292, column: 3 } },
'124': { start: { line: 290, column: 4 }, end: { line: 290, column: 35 } },
'125': { start: { line: 291, column: 4 }, end: { line: 291, column: 37 } },
'126': { start: { line: 293, column: 2 }, end: { line: 293, column: 14 } },
'127': { start: { line: 358, column: 0 }, end: { line: 462, column: 2 } },
'128': { start: { line: 359, column: 18 }, end: { line: 359, column: 44 } },
'129': { start: { line: 360, column: 2 }, end: { line: 362, column: 3 } },
'130': { start: { line: 361, column: 4 }, end: { line: 361, column: 11 } },
'131': { start: { line: 363, column: 13 }, end: { line: 363, column: 30 } },
'132': { start: { line: 365, column: 2 }, end: { line: 378, column: 3 } },
'133': { start: { line: 366, column: 4 }, end: { line: 373, column: 5 } },
'134': { start: { line: 370, column: 6 }, end: { line: 370, column: 13 } },
'135': { start: { line: 372, column: 6 }, end: { line: 372, column: 42 } },
'136': { start: { line: 374, column: 9 }, end: { line: 378, column: 3 } },
'137': { start: { line: 375, column: 4 }, end: { line: 375, column: 11 } },
'138': { start: { line: 377, column: 4 }, end: { line: 377, column: 31 } },
'139': { start: { line: 380, column: 19 }, end: { line: 380, column: 35 } },
'140': { start: { line: 382, column: 2 }, end: { line: 382, column: 20 } },
'141': { start: { line: 384, column: 2 }, end: { line: 460, column: 3 } },
'142': { start: { line: 386, column: 6 }, end: { line: 390, column: 7 } },
'143': { start: { line: 387, column: 8 }, end: { line: 387, column: 34 } },
'144': { start: { line: 389, column: 8 }, end: { line: 389, column: 34 } },
'145': { start: { line: 391, column: 6 }, end: { line: 391, column: 12 } },
'146': { start: { line: 393, column: 6 }, end: { line: 397, column: 7 } },
'147': { start: { line: 394, column: 8 }, end: { line: 394, column: 53 } },
'148': { start: { line: 396, column: 8 }, end: { line: 396, column: 37 } },
'149': { start: { line: 398, column: 6 }, end: { line: 398, column: 12 } },
'150': { start: { line: 400, column: 6 }, end: { line: 404, column: 7 } },
'151': { start: { line: 401, column: 8 }, end: { line: 401, column: 53 } },
'152': { start: { line: 403, column: 8 }, end: { line: 403, column: 37 } },
'153': { start: { line: 405, column: 6 }, end: { line: 405, column: 12 } },
'154': { start: { line: 407, column: 6 }, end: { line: 407, column: 49 } },
'155': { start: { line: 408, column: 6 }, end: { line: 408, column: 12 } },
'156': { start: { line: 410, column: 6 }, end: { line: 410, column: 49 } },
'157': { start: { line: 411, column: 6 }, end: { line: 411, column: 12 } },
'158': { start: { line: 413, column: 6 }, end: { line: 417, column: 7 } },
'159': { start: { line: 414, column: 8 }, end: { line: 414, column: 53 } },
'160': { start: { line: 416, column: 8 }, end: { line: 416, column: 49 } },
'161': { start: { line: 418, column: 6 }, end: { line: 418, column: 12 } },
'162': { start: { line: 420, column: 6 }, end: { line: 424, column: 7 } },
'163': { start: { line: 421, column: 8 }, end: { line: 421, column: 53 } },
'164': { start: { line: 423, column: 8 }, end: { line: 423, column: 58 } },
'165': { start: { line: 425, column: 6 }, end: { line: 425, column: 12 } },
'166': { start: { line: 427, column: 6 }, end: { line: 431, column: 7 } },
'167': { start: { line: 428, column: 8 }, end: { line: 428, column: 53 } },
'168': { start: { line: 430, column: 8 }, end: { line: 430, column: 67 } },
'169': { start: { line: 432, column: 6 }, end: { line: 432, column: 12 } },
'170': { start: { line: 434, column: 6 }, end: { line: 438, column: 7 } },
'171': { start: { line: 435, column: 8 }, end: { line: 435, column: 53 } },
'172': { start: { line: 437, column: 8 }, end: { line: 437, column: 49 } },
'173': { start: { line: 439, column: 6 }, end: { line: 439, column: 12 } },
'174': { start: { line: 441, column: 6 }, end: { line: 445, column: 7 } },
'175': { start: { line: 442, column: 8 }, end: { line: 442, column: 53 } },
'176': { start: { line: 444, column: 8 }, end: { line: 444, column: 58 } },
'177': { start: { line: 446, column: 6 }, end: { line: 446, column: 12 } },
'178': { start: { line: 448, column: 6 }, end: { line: 452, column: 7 } },
'179': { start: { line: 449, column: 8 }, end: { line: 449, column: 53 } },
'180': { start: { line: 451, column: 8 }, end: { line: 451, column: 67 } },
'181': { start: { line: 453, column: 6 }, end: { line: 453, column: 12 } },
'182': { start: { line: 455, column: 6 }, end: { line: 455, column: 59 } },
'183': { start: { line: 456, column: 6 }, end: { line: 456, column: 56 } },
'184': { start: { line: 457, column: 6 }, end: { line: 457, column: 59 } },
'185': { start: { line: 458, column: 6 }, end: { line: 458, column: 12 } },
'186': { start: { line: 461, column: 2 }, end: { line: 461, column: 14 } },
'187': { start: { line: 474, column: 0 }, end: { line: 490, column: 2 } },
'188': { start: { line: 475, column: 2 }, end: { line: 489, column: 4 } },
'189': { start: { line: 492, column: 0 }, end: { line: 494, column: 2 } },
'190': { start: { line: 493, column: 2 }, end: { line: 493, column: 47 } },
'191': { start: { line: 496, column: 0 }, end: { line: 498, column: 2 } },
'192': { start: { line: 497, column: 2 }, end: { line: 497, column: 31 } },
'193': { start: { line: 500, column: 0 }, end: { line: 505, column: 2 } },
'194': { start: { line: 501, column: 2 }, end: { line: 504, column: 4 } },
'195': { start: { line: 507, column: 0 }, end: { line: 509, column: 2 } },
'196': { start: { line: 508, column: 2 }, end: { line: 508, column: 56 } },
'197': { start: { line: 511, column: 0 }, end: { line: 513, column: 2 } },
'198': { start: { line: 512, column: 2 }, end: { line: 512, column: 51 } },
'199': { start: { line: 520, column: 0 }, end: { line: 557, column: 2 } },
'200': { start: { line: 528, column: 2 }, end: { line: 555, column: 3 } },
'201': { start: { line: 529, column: 4 }, end: { line: 538, column: 5 } },
'202': { start: { line: 533, column: 6 }, end: { line: 537, column: 8 } },
'203': { start: { line: 539, column: 16 }, end: { line: 539, column: 29 } },
'204': { start: { line: 540, column: 4 }, end: { line: 554, column: 5 } },
'205': { start: { line: 541, column: 17 }, end: { line: 541, column: 34 } },
'206': { start: { line: 542, column: 6 }, end: { line: 545, column: 7 } },
'207': { start: { line: 543, column: 8 }, end: { line: 543, column: 40 } },
'208': { start: { line: 544, column: 8 }, end: { line: 544, column: 28 } },
'209': { start: { line: 546, column: 6 }, end: { line: 553, column: 8 } },
'210': { start: { line: 556, column: 2 }, end: { line: 556, column: 14 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 20, column: 12 }, end: { line: 20, column: 13 } },
loc: { start: { line: 20, column: 49 }, end: { line: 36, column: 1 } },
line: 20
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 47, column: 27 }, end: { line: 47, column: 28 } },
loc: { start: { line: 47, column: 38 }, end: { line: 103, column: 1 } },
line: 47
},
'2': {
name: '(anonymous_2)',
decl: {
start: { line: 111, column: 38 },
end: { line: 111, column: 39 }
},
loc: { start: { line: 111, column: 49 }, end: { line: 138, column: 1 } },
line: 111
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 146, column: 36 },
end: { line: 146, column: 37 }
},
loc: { start: { line: 146, column: 47 }, end: { line: 194, column: 1 } },
line: 146
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 196, column: 30 },
end: { line: 196, column: 31 }
},
loc: { start: { line: 196, column: 41 }, end: { line: 198, column: 1 } },
line: 196
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 205, column: 33 },
end: { line: 205, column: 34 }
},
loc: { start: { line: 205, column: 44 }, end: { line: 215, column: 1 } },
line: 205
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 222, column: 35 },
end: { line: 222, column: 36 }
},
loc: { start: { line: 222, column: 46 }, end: { line: 229, column: 1 } },
line: 222
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 231, column: 35 },
end: { line: 231, column: 36 }
},
loc: { start: { line: 231, column: 46 }, end: { line: 247, column: 1 } },
line: 231
},
'8': {
name: '(anonymous_8)',
decl: {
start: { line: 249, column: 37 },
end: { line: 249, column: 38 }
},
loc: { start: { line: 249, column: 48 }, end: { line: 256, column: 1 } },
line: 249
},
'9': {
name: '(anonymous_9)',
decl: {
start: { line: 258, column: 37 },
end: { line: 258, column: 38 }
},
loc: { start: { line: 258, column: 48 }, end: { line: 261, column: 1 } },
line: 258
},
'10': {
name: '(anonymous_10)',
decl: {
start: { line: 263, column: 41 },
end: { line: 263, column: 42 }
},
loc: { start: { line: 263, column: 52 }, end: { line: 280, column: 1 } },
line: 263
},
'11': {
name: '(anonymous_11)',
decl: {
start: { line: 287, column: 33 },
end: { line: 287, column: 34 }
},
loc: { start: { line: 287, column: 44 }, end: { line: 294, column: 1 } },
line: 287
},
'12': {
name: '(anonymous_12)',
decl: {
start: { line: 358, column: 33 },
end: { line: 358, column: 34 }
},
loc: { start: { line: 358, column: 61 }, end: { line: 462, column: 1 } },
line: 358
},
'13': {
name: '(anonymous_13)',
decl: {
start: { line: 474, column: 36 },
end: { line: 474, column: 37 }
},
loc: { start: { line: 474, column: 47 }, end: { line: 490, column: 1 } },
line: 474
},
'14': {
name: '(anonymous_14)',
decl: {
start: { line: 492, column: 37 },
end: { line: 492, column: 38 }
},
loc: { start: { line: 492, column: 48 }, end: { line: 494, column: 1 } },
line: 492
},
'15': {
name: '(anonymous_15)',
decl: {
start: { line: 496, column: 38 },
end: { line: 496, column: 39 }
},
loc: { start: { line: 496, column: 49 }, end: { line: 498, column: 1 } },
line: 496
},
'16': {
name: '(anonymous_16)',
decl: {
start: { line: 500, column: 36 },
end: { line: 500, column: 37 }
},
loc: { start: { line: 500, column: 47 }, end: { line: 505, column: 1 } },
line: 500
},
'17': {
name: '(anonymous_17)',
decl: {
start: { line: 507, column: 39 },
end: { line: 507, column: 40 }
},
loc: { start: { line: 507, column: 50 }, end: { line: 509, column: 1 } },
line: 507
},
'18': {
name: '(anonymous_18)',
decl: {
start: { line: 511, column: 37 },
end: { line: 511, column: 38 }
},
loc: { start: { line: 511, column: 48 }, end: { line: 513, column: 1 } },
line: 511
},
'19': {
name: '(anonymous_19)',
decl: {
start: { line: 520, column: 35 },
end: { line: 520, column: 36 }
},
loc: { start: { line: 527, column: 2 }, end: { line: 557, column: 1 } },
line: 527
}
},
branchMap: {
'0': {
loc: { start: { line: 48, column: 2 }, end: { line: 101, column: 3 } },
type: 'if',
locations: [
{ start: { line: 48, column: 2 }, end: { line: 101, column: 3 } },
{ start: { line: 48, column: 2 }, end: { line: 101, column: 3 } }
],
line: 48
},
'1': {
loc: { start: { line: 64, column: 4 }, end: { line: 71, column: 5 } },
type: 'if',
locations: [
{ start: { line: 64, column: 4 }, end: { line: 71, column: 5 } },
{ start: { line: 64, column: 4 }, end: { line: 71, column: 5 } }
],
line: 64
},
'2': {
loc: { start: { line: 78, column: 4 }, end: { line: 85, column: 5 } },
type: 'if',
locations: [
{ start: { line: 78, column: 4 }, end: { line: 85, column: 5 } },
{ start: { line: 78, column: 4 }, end: { line: 85, column: 5 } }
],
line: 78
},
'3': {
loc: { start: { line: 91, column: 4 }, end: { line: 97, column: 5 } },
type: 'if',
locations: [
{ start: { line: 91, column: 4 }, end: { line: 97, column: 5 } },
{ start: { line: 91, column: 4 }, end: { line: 97, column: 5 } }
],
line: 91
},
'4': {
loc: { start: { line: 112, column: 2 }, end: { line: 114, column: 3 } },
type: 'if',
locations: [
{ start: { line: 112, column: 2 }, end: { line: 114, column: 3 } },
{ start: { line: 112, column: 2 }, end: { line: 114, column: 3 } }
],
line: 112
},
'5': {
loc: { start: { line: 147, column: 2 }, end: { line: 149, column: 3 } },
type: 'if',
locations: [
{ start: { line: 147, column: 2 }, end: { line: 149, column: 3 } },
{ start: { line: 147, column: 2 }, end: { line: 149, column: 3 } }
],
line: 147
},
'6': {
loc: { start: { line: 170, column: 4 }, end: { line: 172, column: 5 } },
type: 'if',
locations: [
{ start: { line: 170, column: 4 }, end: { line: 172, column: 5 } },
{ start: { line: 170, column: 4 }, end: { line: 172, column: 5 } }
],
line: 170
},
'7': {
loc: { start: { line: 176, column: 4 }, end: { line: 180, column: 5 } },
type: 'if',
locations: [
{ start: { line: 176, column: 4 }, end: { line: 180, column: 5 } },
{ start: { line: 176, column: 4 }, end: { line: 180, column: 5 } }
],
line: 176
},
'8': {
loc: { start: { line: 182, column: 6 }, end: { line: 189, column: 34 } },
type: 'binary-expr',
locations: [
{ start: { line: 182, column: 6 }, end: { line: 182, column: 36 } },
{ start: { line: 183, column: 6 }, end: { line: 183, column: 36 } },
{ start: { line: 184, column: 6 }, end: { line: 184, column: 36 } },
{ start: { line: 185, column: 6 }, end: { line: 185, column: 36 } },
{ start: { line: 186, column: 6 }, end: { line: 186, column: 36 } },
{ start: { line: 187, column: 6 }, end: { line: 187, column: 34 } },
{ start: { line: 188, column: 6 }, end: { line: 188, column: 34 } },
{ start: { line: 189, column: 6 }, end: { line: 189, column: 34 } }
],
line: 182
},
'9': {
loc: { start: { line: 207, column: 2 }, end: { line: 214, column: 3 } },
type: 'if',
locations: [
{ start: { line: 207, column: 2 }, end: { line: 214, column: 3 } },
{ start: { line: 207, column: 2 }, end: { line: 214, column: 3 } }
],
line: 207
},
'10': {
loc: { start: { line: 223, column: 2 }, end: { line: 227, column: 3 } },
type: 'if',
locations: [
{ start: { line: 223, column: 2 }, end: { line: 227, column: 3 } },
{ start: { line: 223, column: 2 }, end: { line: 227, column: 3 } }
],
line: 223
},
'11': {
loc: { start: { line: 236, column: 4 }, end: { line: 241, column: 5 } },
type: 'if',
locations: [
{ start: { line: 236, column: 4 }, end: { line: 241, column: 5 } },
{ start: { line: 236, column: 4 }, end: { line: 241, column: 5 } }
],
line: 236
},
'12': {
loc: { start: { line: 252, column: 4 }, end: { line: 254, column: 5 } },
type: 'if',
locations: [
{ start: { line: 252, column: 4 }, end: { line: 254, column: 5 } },
{ start: { line: 252, column: 4 }, end: { line: 254, column: 5 } }
],
line: 252
},
'13': {
loc: { start: { line: 265, column: 2 }, end: { line: 273, column: 3 } },
type: 'if',
locations: [
{ start: { line: 265, column: 2 }, end: { line: 273, column: 3 } },
{ start: { line: 265, column: 2 }, end: { line: 273, column: 3 } }
],
line: 265
},
'14': {
loc: { start: { line: 266, column: 4 }, end: { line: 272, column: 5 } },
type: 'if',
locations: [
{ start: { line: 266, column: 4 }, end: { line: 272, column: 5 } },
{ start: { line: 266, column: 4 }, end: { line: 272, column: 5 } }
],
line: 266
},
'15': {
loc: { start: { line: 276, column: 2 }, end: { line: 279, column: 3 } },
type: 'if',
locations: [
{ start: { line: 276, column: 2 }, end: { line: 279, column: 3 } },
{ start: { line: 276, column: 2 }, end: { line: 279, column: 3 } }
],
line: 276
},
'16': {
loc: { start: { line: 289, column: 2 }, end: { line: 292, column: 3 } },
type: 'if',
locations: [
{ start: { line: 289, column: 2 }, end: { line: 292, column: 3 } },
{ start: { line: 289, column: 2 }, end: { line: 292, column: 3 } }
],
line: 289
},
'17': {
loc: { start: { line: 360, column: 2 }, end: { line: 362, column: 3 } },
type: 'if',
locations: [
{ start: { line: 360, column: 2 }, end: { line: 362, column: 3 } },
{ start: { line: 360, column: 2 }, end: { line: 362, column: 3 } }
],
line: 360
},
'18': {
loc: { start: { line: 365, column: 2 }, end: { line: 378, column: 3 } },
type: 'if',
locations: [
{ start: { line: 365, column: 2 }, end: { line: 378, column: 3 } },
{ start: { line: 365, column: 2 }, end: { line: 378, column: 3 } }
],
line: 365
},
'19': {
loc: { start: { line: 366, column: 4 }, end: { line: 373, column: 5 } },
type: 'if',
locations: [
{ start: { line: 366, column: 4 }, end: { line: 373, column: 5 } },
{ start: { line: 366, column: 4 }, end: { line: 373, column: 5 } }
],
line: 366
},
'20': {
loc: { start: { line: 367, column: 6 }, end: { line: 368, column: 60 } },
type: 'binary-expr',
locations: [
{ start: { line: 367, column: 6 }, end: { line: 367, column: 25 } },
{ start: { line: 368, column: 6 }, end: { line: 368, column: 60 } }
],
line: 367
},
'21': {
loc: { start: { line: 374, column: 9 }, end: { line: 378, column: 3 } },
type: 'if',
locations: [
{ start: { line: 374, column: 9 }, end: { line: 378, column: 3 } },
{ start: { line: 374, column: 9 }, end: { line: 378, column: 3 } }
],
line: 374
},
'22': {
loc: { start: { line: 374, column: 13 }, end: { line: 374, column: 64 } },
type: 'binary-expr',
locations: [
{ start: { line: 374, column: 13 }, end: { line: 374, column: 32 } },
{ start: { line: 374, column: 36 }, end: { line: 374, column: 64 } }
],
line: 374
},
'23': {
loc: { start: { line: 384, column: 2 }, end: { line: 460, column: 3 } },
type: 'switch',
locations: [
{ start: { line: 385, column: 4 }, end: { line: 391, column: 12 } },
{ start: { line: 392, column: 4 }, end: { line: 398, column: 12 } },
{ start: { line: 399, column: 4 }, end: { line: 405, column: 12 } },
{ start: { line: 406, column: 4 }, end: { line: 408, column: 12 } },
{ start: { line: 409, column: 4 }, end: { line: 411, column: 12 } },
{ start: { line: 412, column: 4 }, end: { line: 418, column: 12 } },
{ start: { line: 419, column: 4 }, end: { line: 425, column: 12 } },
{ start: { line: 426, column: 4 }, end: { line: 432, column: 12 } },
{ start: { line: 433, column: 4 }, end: { line: 439, column: 12 } },
{ start: { line: 440, column: 4 }, end: { line: 446, column: 12 } },
{ start: { line: 447, column: 4 }, end: { line: 453, column: 12 } },
{ start: { line: 454, column: 4 }, end: { line: 458, column: 12 } }
],
line: 384
},
'24': {
loc: { start: { line: 386, column: 6 }, end: { line: 390, column: 7 } },
type: 'if',
locations: [
{ start: { line: 386, column: 6 }, end: { line: 390, column: 7 } },
{ start: { line: 386, column: 6 }, end: { line: 390, column: 7 } }
],
line: 386
},
'25': {
loc: { start: { line: 393, column: 6 }, end: { line: 397, column: 7 } },
type: 'if',
locations: [
{ start: { line: 393, column: 6 }, end: { line: 397, column: 7 } },
{ start: { line: 393, column: 6 }, end: { line: 397, column: 7 } }
],
line: 393
},
'26': {
loc: { start: { line: 394, column: 8 }, end: { line: 394, column: 52 } },
type: 'binary-expr',
locations: [
{ start: { line: 394, column: 8 }, end: { line: 394, column: 19 } },
{ start: { line: 394, column: 23 }, end: { line: 394, column: 52 } }
],
line: 394
},
'27': {
loc: { start: { line: 400, column: 6 }, end: { line: 404, column: 7 } },
type: 'if',
locations: [
{ start: { line: 400, column: 6 }, end: { line: 404, column: 7 } },
{ start: { line: 400, column: 6 }, end: { line: 404, column: 7 } }
],
line: 400
},
'28': {
loc: { start: { line: 401, column: 8 }, end: { line: 401, column: 52 } },
type: 'binary-expr',
locations: [
{ start: { line: 401, column: 8 }, end: { line: 401, column: 19 } },
{ start: { line: 401, column: 23 }, end: { line: 401, column: 52 } }
],
line: 401
},
'29': {
loc: { start: { line: 413, column: 6 }, end: { line: 417, column: 7 } },
type: 'if',
locations: [
{ start: { line: 413, column: 6 }, end: { line: 417, column: 7 } },
{ start: { line: 413, column: 6 }, end: { line: 417, column: 7 } }
],
line: 413
},
'30': {
loc: { start: { line: 414, column: 8 }, end: { line: 414, column: 52 } },
type: 'binary-expr',
locations: [
{ start: { line: 414, column: 8 }, end: { line: 414, column: 19 } },
{ start: { line: 414, column: 23 }, end: { line: 414, column: 52 } }
],
line: 414
},
'31': {
loc: { start: { line: 420, column: 6 }, end: { line: 424, column: 7 } },
type: 'if',
locations: [
{ start: { line: 420, column: 6 }, end: { line: 424, column: 7 } },
{ start: { line: 420, column: 6 }, end: { line: 424, column: 7 } }
],
line: 420
},
'32': {
loc: { start: { line: 421, column: 8 }, end: { line: 421, column: 52 } },
type: 'binary-expr',
locations: [
{ start: { line: 421, column: 8 }, end: { line: 421, column: 19 } },
{ start: { line: 421, column: 23 }, end: { line: 421, column: 52 } }
],
line: 421
},
'33': {
loc: { start: { line: 427, column: 6 }, end: { line: 431, column: 7 } },
type: 'if',
locations: [
{ start: { line: 427, column: 6 }, end: { line: 431, column: 7 } },
{ start: { line: 427, column: 6 }, end: { line: 431, column: 7 } }
],
line: 427
},
'34': {
loc: { start: { line: 428, column: 8 }, end: { line: 428, column: 52 } },
type: 'binary-expr',
locations: [
{ start: { line: 428, column: 8 }, end: { line: 428, column: 19 } },
{ start: { line: 428, column: 23 }, end: { line: 428, column: 52 } }
],
line: 428
},
'35': {
loc: { start: { line: 434, column: 6 }, end: { line: 438, column: 7 } },
type: 'if',
locations: [
{ start: { line: 434, column: 6 }, end: { line: 438, column: 7 } },
{ start: { line: 434, column: 6 }, end: { line: 438, column: 7 } }
],
line: 434
},
'36': {
loc: { start: { line: 435, column: 8 }, end: { line: 435, column: 52 } },
type: 'binary-expr',
locations: [
{ start: { line: 435, column: 8 }, end: { line: 435, column: 19 } },
{ start: { line: 435, column: 23 }, end: { line: 435, column: 52 } }
],
line: 435
},
'37': {
loc: { start: { line: 441, column: 6 }, end: { line: 445, column: 7 } },
type: 'if',
locations: [
{ start: { line: 441, column: 6 }, end: { line: 445, column: 7 } },
{ start: { line: 441, column: 6 }, end: { line: 445, column: 7 } }
],
line: 441
},
'38': {
loc: { start: { line: 442, column: 8 }, end: { line: 442, column: 52 } },
type: 'binary-expr',
locations: [
{ start: { line: 442, column: 8 }, end: { line: 442, column: 19 } },
{ start: { line: 442, column: 23 }, end: { line: 442, column: 52 } }
],
line: 442
},
'39': {
loc: { start: { line: 448, column: 6 }, end: { line: 452, column: 7 } },
type: 'if',
locations: [
{ start: { line: 448, column: 6 }, end: { line: 452, column: 7 } },
{ start: { line: 448, column: 6 }, end: { line: 452, column: 7 } }
],
line: 448
},
'40': {
loc: { start: { line: 449, column: 8 }, end: { line: 449, column: 52 } },
type: 'binary-expr',
locations: [
{ start: { line: 449, column: 8 }, end: { line: 449, column: 19 } },
{ start: { line: 449, column: 23 }, end: { line: 449, column: 52 } }
],
line: 449
},
'41': {
loc: { start: { line: 476, column: 4 }, end: { line: 488, column: 41 } },
type: 'binary-expr',
locations: [
{ start: { line: 476, column: 4 }, end: { line: 476, column: 41 } },
{ start: { line: 477, column: 4 }, end: { line: 477, column: 44 } },
{ start: { line: 478, column: 4 }, end: { line: 478, column: 50 } },
{ start: { line: 479, column: 4 }, end: { line: 479, column: 54 } },
{ start: { line: 480, column: 4 }, end: { line: 480, column: 48 } },
{ start: { line: 481, column: 4 }, end: { line: 481, column: 45 } },
{ start: { line: 482, column: 4 }, end: { line: 482, column: 57 } },
{ start: { line: 483, column: 4 }, end: { line: 483, column: 58 } },
{ start: { line: 484, column: 4 }, end: { line: 484, column: 51 } },
{ start: { line: 485, column: 4 }, end: { line: 485, column: 56 } },
{ start: { line: 486, column: 4 }, end: { line: 486, column: 57 } },
{ start: { line: 487, column: 4 }, end: { line: 487, column: 50 } },
{ start: { line: 488, column: 4 }, end: { line: 488, column: 41 } }
],
line: 476
},
'42': {
loc: { start: { line: 502, column: 4 }, end: { line: 503, column: 46 } },
type: 'binary-expr',
locations: [
{ start: { line: 502, column: 4 }, end: { line: 502, column: 46 } },
{ start: { line: 503, column: 4 }, end: { line: 503, column: 46 } }
],
line: 502
},
'43': {
loc: { start: { line: 508, column: 9 }, end: { line: 508, column: 55 } },
type: 'binary-expr',
locations: [
{ start: { line: 508, column: 9 }, end: { line: 508, column: 29 } },
{ start: { line: 508, column: 33 }, end: { line: 508, column: 55 } }
],
line: 508
},
'44': {
loc: { start: { line: 528, column: 2 }, end: { line: 555, column: 3 } },
type: 'if',
locations: [
{ start: { line: 528, column: 2 }, end: { line: 555, column: 3 } },
{ start: { line: 528, column: 2 }, end: { line: 555, column: 3 } }
],
line: 528
},
'45': {
loc: { start: { line: 529, column: 4 }, end: { line: 538, column: 5 } },
type: 'if',
locations: [
{ start: { line: 529, column: 4 }, end: { line: 538, column: 5 } },
{ start: { line: 529, column: 4 }, end: { line: 538, column: 5 } }
],
line: 529
},
'46': {
loc: { start: { line: 530, column: 6 }, end: { line: 531, column: 41 } },
type: 'binary-expr',
locations: [
{ start: { line: 530, column: 6 }, end: { line: 530, column: 40 } },
{ start: { line: 531, column: 6 }, end: { line: 531, column: 41 } }
],
line: 530
},
'47': {
loc: { start: { line: 540, column: 4 }, end: { line: 554, column: 5 } },
type: 'if',
locations: [
{ start: { line: 540, column: 4 }, end: { line: 554, column: 5 } },
{ start: { line: 540, column: 4 }, end: { line: 554, column: 5 } }
],
line: 540
},
'48': {
loc: { start: { line: 542, column: 6 }, end: { line: 545, column: 7 } },
type: 'if',
locations: [
{ start: { line: 542, column: 6 }, end: { line: 545, column: 7 } },
{ start: { line: 542, column: 6 }, end: { line: 545, column: 7 } }
],
line: 542
},
'49': {
loc: { start: { line: 549, column: 8 }, end: { line: 549, column: 24 } },
type: 'binary-expr',
locations: [
{ start: { line: 549, column: 8 }, end: { line: 549, column: 12 } },
{ start: { line: 549, column: 16 }, end: { line: 549, column: 24 } }
],
line: 549
},
'50': {
loc: { start: { line: 550, column: 8 }, end: { line: 550, column: 27 } },
type: 'binary-expr',
locations: [
{ start: { line: 550, column: 8 }, end: { line: 550, column: 18 } },
{ start: { line: 550, column: 22 }, end: { line: 550, column: 27 } }
],
line: 550
},
'51': {
loc: { start: { line: 551, column: 8 }, end: { line: 551, column: 19 } },
type: 'binary-expr',
locations: [
{ start: { line: 551, column: 8 }, end: { line: 551, column: 14 } },
{ start: { line: 551, column: 18 }, end: { line: 551, column: 19 } }
],
line: 551
},
'52': {
loc: { start: { line: 552, column: 8 }, end: { line: 552, column: 19 } },
type: 'binary-expr',
locations: [
{ start: { line: 552, column: 8 }, end: { line: 552, column: 14 } },
{ start: { line: 552, column: 18 }, end: { line: 552, column: 19 } }
],
line: 552
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0,
'123': 0,
'124': 0,
'125': 0,
'126': 0,
'127': 0,
'128': 0,
'129': 0,
'130': 0,
'131': 0,
'132': 0,
'133': 0,
'134': 0,
'135': 0,
'136': 0,
'137': 0,
'138': 0,
'139': 0,
'140': 0,
'141': 0,
'142': 0,
'143': 0,
'144': 0,
'145': 0,
'146': 0,
'147': 0,
'148': 0,
'149': 0,
'150': 0,
'151': 0,
'152': 0,
'153': 0,
'154': 0,
'155': 0,
'156': 0,
'157': 0,
'158': 0,
'159': 0,
'160': 0,
'161': 0,
'162': 0,
'163': 0,
'164': 0,
'165': 0,
'166': 0,
'167': 0,
'168': 0,
'169': 0,
'170': 0,
'171': 0,
'172': 0,
'173': 0,
'174': 0,
'175': 0,
'176': 0,
'177': 0,
'178': 0,
'179': 0,
'180': 0,
'181': 0,
'182': 0,
'183': 0,
'184': 0,
'185': 0,
'186': 0,
'187': 0,
'188': 0,
'189': 0,
'190': 0,
'191': 0,
'192': 0,
'193': 0,
'194': 0,
'195': 0,
'196': 0,
'197': 0,
'198': 0,
'199': 0,
'200': 0,
'201': 0,
'202': 0,
'203': 0,
'204': 0,
'205': 0,
'206': 0,
'207': 0,
'208': 0,
'209': 0,
'210': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0, 0, 0, 0, 0, 0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0],
'20': [0, 0],
'21': [0, 0],
'22': [0, 0],
'23': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
'24': [0, 0],
'25': [0, 0],
'26': [0, 0],
'27': [0, 0],
'28': [0, 0],
'29': [0, 0],
'30': [0, 0],
'31': [0, 0],
'32': [0, 0],
'33': [0, 0],
'34': [0, 0],
'35': [0, 0],
'36': [0, 0],
'37': [0, 0],
'38': [0, 0],
'39': [0, 0],
'40': [0, 0],
'41': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
'42': [0, 0],
'43': [0, 0],
'44': [0, 0],
'45': [0, 0],
'46': [0, 0],
'47': [0, 0],
'48': [0, 0],
'49': [0, 0],
'50': [0, 0],
'51': [0, 0],
'52': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '936beddf43b75bf2cd66efdae581c3dcda9d1572'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_1cgthlmn1k.s[0]++;
/**
* Shader class for WEBGL Mode
* @class p5.Shader
* @constructor
* @param {p5.RendererGL} renderer an instance of p5.RendererGL that
* will provide the GL context for this new p5.Shader
* @param {String} vertSrc source code for the vertex shader (as a string)
* @param {String} fragSrc source code for the fragment shader (as a string)
*/
_main.default.Shader = function(renderer, vertSrc, fragSrc) {
cov_1cgthlmn1k.f[0]++;
cov_1cgthlmn1k.s[1]++;
// TODO: adapt this to not take ids, but rather,
// to take the source for a vertex and fragment shader
// to enable custom shaders at some later date
this._renderer = renderer;
cov_1cgthlmn1k.s[2]++;
this._vertSrc = vertSrc;
cov_1cgthlmn1k.s[3]++;
this._fragSrc = fragSrc;
cov_1cgthlmn1k.s[4]++;
this._vertShader = -1;
cov_1cgthlmn1k.s[5]++;
this._fragShader = -1;
cov_1cgthlmn1k.s[6]++;
this._glProgram = 0;
cov_1cgthlmn1k.s[7]++;
this._loadedAttributes = false;
cov_1cgthlmn1k.s[8]++;
this.attributes = {};
cov_1cgthlmn1k.s[9]++;
this._loadedUniforms = false;
cov_1cgthlmn1k.s[10]++;
this.uniforms = {};
cov_1cgthlmn1k.s[11]++;
this._bound = false;
cov_1cgthlmn1k.s[12]++;
this.samplers = [];
};
/**
* Creates, compiles, and links the shader based on its
* sources for the vertex and fragment shaders (provided
* to the constructor). Populates known attributes and
* uniforms from the shader.
* @method init
* @chainable
* @private
*/ cov_1cgthlmn1k.s[13]++;
_main.default.Shader.prototype.init = function() {
cov_1cgthlmn1k.f[1]++;
cov_1cgthlmn1k.s[14]++;
if (this._glProgram === 0 /* or context is stale? */) {
cov_1cgthlmn1k.b[0][0]++;
var gl = (cov_1cgthlmn1k.s[15]++, this._renderer.GL);
// @todo: once custom shading is allowed,
// friendly error messages should be used here to share
// compiler and linker errors.
//set up the shader by
// 1. creating and getting a gl id for the shader program,
// 2. compliling its vertex & fragment sources,
// 3. linking the vertex and fragment shaders
cov_1cgthlmn1k.s[16]++;
this._vertShader = gl.createShader(gl.VERTEX_SHADER);
//load in our default vertex shader
cov_1cgthlmn1k.s[17]++;
gl.shaderSource(this._vertShader, this._vertSrc);
cov_1cgthlmn1k.s[18]++;
gl.compileShader(this._vertShader);
// if our vertex shader failed compilation?
cov_1cgthlmn1k.s[19]++;
if (!gl.getShaderParameter(this._vertShader, gl.COMPILE_STATUS)) {
cov_1cgthlmn1k.b[1][0]++;
cov_1cgthlmn1k.s[20]++;
console.error(
'Yikes! An error occurred compiling the vertex shader:'.concat(
gl.getShaderInfoLog(this._vertShader)
)
);
cov_1cgthlmn1k.s[21]++;
return null;
} else {
cov_1cgthlmn1k.b[1][1]++;
}
cov_1cgthlmn1k.s[22]++;
this._fragShader = gl.createShader(gl.FRAGMENT_SHADER);
//load in our material frag shader
cov_1cgthlmn1k.s[23]++;
gl.shaderSource(this._fragShader, this._fragSrc);
cov_1cgthlmn1k.s[24]++;
gl.compileShader(this._fragShader);
// if our frag shader failed compilation?
cov_1cgthlmn1k.s[25]++;
if (!gl.getShaderParameter(this._fragShader, gl.COMPILE_STATUS)) {
cov_1cgthlmn1k.b[2][0]++;
cov_1cgthlmn1k.s[26]++;
console.error(
'Darn! An error occurred compiling the fragment shader:'.concat(
gl.getShaderInfoLog(this._fragShader)
)
);
cov_1cgthlmn1k.s[27]++;
return null;
} else {
cov_1cgthlmn1k.b[2][1]++;
}
cov_1cgthlmn1k.s[28]++;
this._glProgram = gl.createProgram();
cov_1cgthlmn1k.s[29]++;
gl.attachShader(this._glProgram, this._vertShader);
cov_1cgthlmn1k.s[30]++;
gl.attachShader(this._glProgram, this._fragShader);
cov_1cgthlmn1k.s[31]++;
gl.linkProgram(this._glProgram);
cov_1cgthlmn1k.s[32]++;
if (!gl.getProgramParameter(this._glProgram, gl.LINK_STATUS)) {
cov_1cgthlmn1k.b[3][0]++;
cov_1cgthlmn1k.s[33]++;
console.error(
'Snap! Error linking shader program: '.concat(
gl.getProgramInfoLog(this._glProgram)
)
);
} else {
cov_1cgthlmn1k.b[3][1]++;
}
cov_1cgthlmn1k.s[34]++;
this._loadAttributes();
cov_1cgthlmn1k.s[35]++;
this._loadUniforms();
} else {
cov_1cgthlmn1k.b[0][1]++;
}
cov_1cgthlmn1k.s[36]++;
return this;
};
/**
* Queries the active attributes for this shader and loads
* their names and locations into the attributes array.
* @method _loadAttributes
* @private
*/ cov_1cgthlmn1k.s[37]++;
_main.default.Shader.prototype._loadAttributes = function() {
cov_1cgthlmn1k.f[2]++;
cov_1cgthlmn1k.s[38]++;
if (this._loadedAttributes) {
cov_1cgthlmn1k.b[4][0]++;
cov_1cgthlmn1k.s[39]++;
return;
} else {
cov_1cgthlmn1k.b[4][1]++;
}
cov_1cgthlmn1k.s[40]++;
this.attributes = {};
var gl = (cov_1cgthlmn1k.s[41]++, this._renderer.GL);
var numAttributes = (cov_1cgthlmn1k.s[42]++,
gl.getProgramParameter(this._glProgram, gl.ACTIVE_ATTRIBUTES));
cov_1cgthlmn1k.s[43]++;
for (var i = (cov_1cgthlmn1k.s[44]++, 0); i < numAttributes; ++i) {
var attributeInfo = (cov_1cgthlmn1k.s[45]++,
gl.getActiveAttrib(this._glProgram, i));
var name = (cov_1cgthlmn1k.s[46]++, attributeInfo.name);
var location = (cov_1cgthlmn1k.s[47]++,
gl.getAttribLocation(this._glProgram, name));
var attribute = (cov_1cgthlmn1k.s[48]++, {});
cov_1cgthlmn1k.s[49]++;
attribute.name = name;
cov_1cgthlmn1k.s[50]++;
attribute.location = location;
cov_1cgthlmn1k.s[51]++;
attribute.index = i;
cov_1cgthlmn1k.s[52]++;
attribute.type = attributeInfo.type;
cov_1cgthlmn1k.s[53]++;
attribute.size = attributeInfo.size;
cov_1cgthlmn1k.s[54]++;
this.attributes[name] = attribute;
}
cov_1cgthlmn1k.s[55]++;
this._loadedAttributes = true;
};
/**
* Queries the active uniforms for this shader and loads
* their names and locations into the uniforms array.
* @method _loadUniforms
* @private
*/ cov_1cgthlmn1k.s[56]++;
_main.default.Shader.prototype._loadUniforms = function() {
cov_1cgthlmn1k.f[3]++;
cov_1cgthlmn1k.s[57]++;
if (this._loadedUniforms) {
cov_1cgthlmn1k.b[5][0]++;
cov_1cgthlmn1k.s[58]++;
return;
} else {
cov_1cgthlmn1k.b[5][1]++;
}
var gl = (cov_1cgthlmn1k.s[59]++, this._renderer.GL);
// Inspect shader and cache uniform info
var numUniforms = (cov_1cgthlmn1k.s[60]++,
gl.getProgramParameter(this._glProgram, gl.ACTIVE_UNIFORMS));
var samplerIndex = (cov_1cgthlmn1k.s[61]++, 0);
cov_1cgthlmn1k.s[62]++;
for (var i = (cov_1cgthlmn1k.s[63]++, 0); i < numUniforms; ++i) {
var uniformInfo = (cov_1cgthlmn1k.s[64]++,
gl.getActiveUniform(this._glProgram, i));
var uniform = (cov_1cgthlmn1k.s[65]++, {});
cov_1cgthlmn1k.s[66]++;
uniform.location = gl.getUniformLocation(this._glProgram, uniformInfo.name);
cov_1cgthlmn1k.s[67]++;
uniform.size = uniformInfo.size;
var uniformName = (cov_1cgthlmn1k.s[68]++, uniformInfo.name);
//uniforms thats are arrays have their name returned as
//someUniform[0] which is a bit silly so we trim it
//off here. The size property tells us that its an array
//so we dont lose any information by doing this
cov_1cgthlmn1k.s[69]++;
if (uniformInfo.size > 1) {
cov_1cgthlmn1k.b[6][0]++;
cov_1cgthlmn1k.s[70]++;
uniformName = uniformName.substring(0, uniformName.indexOf('[0]'));
} else {
cov_1cgthlmn1k.b[6][1]++;
}
cov_1cgthlmn1k.s[71]++;
uniform.name = uniformName;
cov_1cgthlmn1k.s[72]++;
uniform.type = uniformInfo.type;
cov_1cgthlmn1k.s[73]++;
uniform._cachedData = undefined;
cov_1cgthlmn1k.s[74]++;
if (uniform.type === gl.SAMPLER_2D) {
cov_1cgthlmn1k.b[7][0]++;
cov_1cgthlmn1k.s[75]++;
uniform.samplerIndex = samplerIndex;
cov_1cgthlmn1k.s[76]++;
samplerIndex++;
cov_1cgthlmn1k.s[77]++;
this.samplers.push(uniform);
} else {
cov_1cgthlmn1k.b[7][1]++;
}
cov_1cgthlmn1k.s[78]++;
uniform.isArray =
(cov_1cgthlmn1k.b[8][0]++, uniform.type === gl.FLOAT_MAT3) ||
(cov_1cgthlmn1k.b[8][1]++, uniform.type === gl.FLOAT_MAT4) ||
(cov_1cgthlmn1k.b[8][2]++, uniform.type === gl.FLOAT_VEC2) ||
(cov_1cgthlmn1k.b[8][3]++, uniform.type === gl.FLOAT_VEC3) ||
(cov_1cgthlmn1k.b[8][4]++, uniform.type === gl.FLOAT_VEC4) ||
(cov_1cgthlmn1k.b[8][5]++, uniform.type === gl.INT_VEC2) ||
(cov_1cgthlmn1k.b[8][6]++, uniform.type === gl.INT_VEC3) ||
(cov_1cgthlmn1k.b[8][7]++, uniform.type === gl.INT_VEC4);
cov_1cgthlmn1k.s[79]++;
this.uniforms[uniformName] = uniform;
}
cov_1cgthlmn1k.s[80]++;
this._loadedUniforms = true;
};
cov_1cgthlmn1k.s[81]++;
_main.default.Shader.prototype.compile = function() {
// TODO
cov_1cgthlmn1k.f[4]++;
};
/**
* initializes (if needed) and binds the shader program.
* @method bindShader
* @private
*/ cov_1cgthlmn1k.s[82]++;
_main.default.Shader.prototype.bindShader = function() {
cov_1cgthlmn1k.f[5]++;
cov_1cgthlmn1k.s[83]++;
this.init();
cov_1cgthlmn1k.s[84]++;
if (!this._bound) {
cov_1cgthlmn1k.b[9][0]++;
cov_1cgthlmn1k.s[85]++;
this.useProgram();
cov_1cgthlmn1k.s[86]++;
this._bound = true;
cov_1cgthlmn1k.s[87]++;
this._setMatrixUniforms();
cov_1cgthlmn1k.s[88]++;
this.setUniform('uViewport', this._renderer._viewport);
} else {
cov_1cgthlmn1k.b[9][1]++;
}
};
/**
* @method unbindShader
* @chainable
* @private
*/ cov_1cgthlmn1k.s[89]++;
_main.default.Shader.prototype.unbindShader = function() {
cov_1cgthlmn1k.f[6]++;
cov_1cgthlmn1k.s[90]++;
if (this._bound) {
cov_1cgthlmn1k.b[10][0]++;
cov_1cgthlmn1k.s[91]++;
this.unbindTextures();
//this._renderer.GL.useProgram(0); ??
cov_1cgthlmn1k.s[92]++;
this._bound = false;
} else {
cov_1cgthlmn1k.b[10][1]++;
}
cov_1cgthlmn1k.s[93]++;
return this;
};
cov_1cgthlmn1k.s[94]++;
_main.default.Shader.prototype.bindTextures = function() {
cov_1cgthlmn1k.f[7]++;
var gl = (cov_1cgthlmn1k.s[95]++, this._renderer.GL);
cov_1cgthlmn1k.s[96]++;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (
var _iterator = this.samplers[Symbol.iterator](), _step;
!(_iteratorNormalCompletion = (_step = _iterator.next()).done);
_iteratorNormalCompletion = true
) {
var uniform = _step.value;
var tex = (cov_1cgthlmn1k.s[97]++, uniform.texture);
cov_1cgthlmn1k.s[98]++;
if (tex === undefined) {
cov_1cgthlmn1k.b[11][0]++;
cov_1cgthlmn1k.s[99]++;
// user hasn't yet supplied a texture for this slot.
// (or there may not be one--maybe just lighting),
// so we supply a default texture instead.
tex = this._renderer._getEmptyTexture();
} else {
cov_1cgthlmn1k.b[11][1]++;
}
cov_1cgthlmn1k.s[100]++;
gl.activeTexture(gl.TEXTURE0 + uniform.samplerIndex);
cov_1cgthlmn1k.s[101]++;
tex.bindTexture();
cov_1cgthlmn1k.s[102]++;
tex.update();
cov_1cgthlmn1k.s[103]++;
gl.uniform1i(uniform.location, uniform.samplerIndex);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
};
cov_1cgthlmn1k.s[104]++;
_main.default.Shader.prototype.updateTextures = function() {
cov_1cgthlmn1k.f[8]++;
cov_1cgthlmn1k.s[105]++;
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (
var _iterator2 = this.samplers[Symbol.iterator](), _step2;
!(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done);
_iteratorNormalCompletion2 = true
) {
var uniform = _step2.value;
var tex = (cov_1cgthlmn1k.s[106]++, uniform.texture);
cov_1cgthlmn1k.s[107]++;
if (tex) {
cov_1cgthlmn1k.b[12][0]++;
cov_1cgthlmn1k.s[108]++;
tex.update();
} else {
cov_1cgthlmn1k.b[12][1]++;
}
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
};
cov_1cgthlmn1k.s[109]++;
_main.default.Shader.prototype.unbindTextures = function() {
// TODO: migrate stuff from material.js here
// - OR - have material.js define this function
cov_1cgthlmn1k.f[9]++;
};
cov_1cgthlmn1k.s[110]++;
_main.default.Shader.prototype._setMatrixUniforms = function() {
cov_1cgthlmn1k.f[10]++;
cov_1cgthlmn1k.s[111]++;
this.setUniform('uProjectionMatrix', this._renderer.uPMatrix.mat4);
cov_1cgthlmn1k.s[112]++;
if (this.isStrokeShader()) {
cov_1cgthlmn1k.b[13][0]++;
cov_1cgthlmn1k.s[113]++;
if (this._renderer._curCamera.cameraType === 'default') {
cov_1cgthlmn1k.b[14][0]++;
cov_1cgthlmn1k.s[114]++;
// strokes scale up as they approach camera, default
this.setUniform('uPerspective', 1);
} else {
cov_1cgthlmn1k.b[14][1]++;
cov_1cgthlmn1k.s[115]++;
// strokes have uniform scale regardless of distance from camera
this.setUniform('uPerspective', 0);
}
} else {
cov_1cgthlmn1k.b[13][1]++;
}
cov_1cgthlmn1k.s[116]++;
this.setUniform('uModelViewMatrix', this._renderer.uMVMatrix.mat4);
cov_1cgthlmn1k.s[117]++;
this.setUniform('uViewMatrix', this._renderer._curCamera.cameraMatrix.mat4);
cov_1cgthlmn1k.s[118]++;
if (this.uniforms.uNormalMatrix) {
cov_1cgthlmn1k.b[15][0]++;
cov_1cgthlmn1k.s[119]++;
this._renderer.uNMatrix.inverseTranspose(this._renderer.uMVMatrix);
cov_1cgthlmn1k.s[120]++;
this.setUniform('uNormalMatrix', this._renderer.uNMatrix.mat3);
} else {
cov_1cgthlmn1k.b[15][1]++;
}
};
/**
* @method useProgram
* @chainable
* @private
*/ cov_1cgthlmn1k.s[121]++;
_main.default.Shader.prototype.useProgram = function() {
cov_1cgthlmn1k.f[11]++;
var gl = (cov_1cgthlmn1k.s[122]++, this._renderer.GL);
cov_1cgthlmn1k.s[123]++;
if (this._renderer._curShader !== this) {
cov_1cgthlmn1k.b[16][0]++;
cov_1cgthlmn1k.s[124]++;
gl.useProgram(this._glProgram);
cov_1cgthlmn1k.s[125]++;
this._renderer._curShader = this;
} else {
cov_1cgthlmn1k.b[16][1]++;
}
cov_1cgthlmn1k.s[126]++;
return this;
};
/**
* Wrapper around gl.uniform functions.
* As we store uniform info in the shader we can use that
* to do type checking on the supplied data and call
* the appropriate function.
* @method setUniform
* @chainable
* @param {String} uniformName the name of the uniform in the
* shader program
* @param {Object|Number|Boolean|Number[]} data the data to be associated
* with that uniform; type varies (could be a single numerical value, array,
* matrix, or texture / sampler reference)
*
* @example
*
*
* // Click within the image to toggle the value of uniforms
* // Note: for an alternative approach to the same example,
* // involving toggling between shaders please refer to:
* // https://p5js.org/reference/#/p5/shader
*
* let grad;
* let showRedGreen = false;
*
* function preload() {
* // note that we are using two instances
* // of the same vertex and fragment shaders
* grad = loadShader('assets/shader.vert', 'assets/shader-gradient.frag');
* }
*
* function setup() {
* createCanvas(100, 100, WEBGL);
* shader(grad);
* noStroke();
* }
*
* function draw() {
* // update the offset values for each scenario,
* // moving the "grad" shader in either vertical or
* // horizontal direction each with differing colors
*
* if (showRedGreen === true) {
* grad.setUniform('colorCenter', [1, 0, 0]);
* grad.setUniform('colorBackground', [0, 1, 0]);
* grad.setUniform('offset', [sin(millis() / 2000), 1]);
* } else {
* grad.setUniform('colorCenter', [1, 0.5, 0]);
* grad.setUniform('colorBackground', [0.226, 0, 0.615]);
* grad.setUniform('offset', [0, sin(millis() / 2000) + 1]);
* }
* quad(-1, -1, 1, -1, 1, 1, -1, 1);
* }
*
* function mouseClicked() {
* showRedGreen = !showRedGreen;
* }
*
*
*
* @alt
* canvas toggles between a circular gradient of orange and blue vertically. and a circular gradient of red and green moving horizontally when mouse is clicked/pressed.
*/ cov_1cgthlmn1k.s[127]++;
_main.default.Shader.prototype.setUniform = function(uniformName, data) {
cov_1cgthlmn1k.f[12]++;
var uniform = (cov_1cgthlmn1k.s[128]++, this.uniforms[uniformName]);
cov_1cgthlmn1k.s[129]++;
if (!uniform) {
cov_1cgthlmn1k.b[17][0]++;
cov_1cgthlmn1k.s[130]++;
return;
} else {
cov_1cgthlmn1k.b[17][1]++;
}
var gl = (cov_1cgthlmn1k.s[131]++, this._renderer.GL);
cov_1cgthlmn1k.s[132]++;
if (uniform.isArray) {
cov_1cgthlmn1k.b[18][0]++;
cov_1cgthlmn1k.s[133]++;
if (
(cov_1cgthlmn1k.b[20][0]++, uniform._cachedData) &&
(cov_1cgthlmn1k.b[20][1]++,
this._renderer._arraysEqual(uniform._cachedData, data))
) {
cov_1cgthlmn1k.b[19][0]++;
cov_1cgthlmn1k.s[134]++;
return;
} else {
cov_1cgthlmn1k.b[19][1]++;
cov_1cgthlmn1k.s[135]++;
uniform._cachedData = data.slice(0);
}
} else {
cov_1cgthlmn1k.b[18][1]++;
cov_1cgthlmn1k.s[136]++;
if (
(cov_1cgthlmn1k.b[22][0]++, uniform._cachedData) &&
(cov_1cgthlmn1k.b[22][1]++, uniform._cachedData === data)
) {
cov_1cgthlmn1k.b[21][0]++;
cov_1cgthlmn1k.s[137]++;
return;
} else {
cov_1cgthlmn1k.b[21][1]++;
cov_1cgthlmn1k.s[138]++;
uniform._cachedData = data;
}
}
var location = (cov_1cgthlmn1k.s[139]++, uniform.location);
cov_1cgthlmn1k.s[140]++;
this.useProgram();
cov_1cgthlmn1k.s[141]++;
switch (uniform.type) {
case gl.BOOL:
cov_1cgthlmn1k.b[23][0]++;
cov_1cgthlmn1k.s[142]++;
if (data === true) {
cov_1cgthlmn1k.b[24][0]++;
cov_1cgthlmn1k.s[143]++;
gl.uniform1i(location, 1);
} else {
cov_1cgthlmn1k.b[24][1]++;
cov_1cgthlmn1k.s[144]++;
gl.uniform1i(location, 0);
}
cov_1cgthlmn1k.s[145]++;
break;
case gl.INT:
cov_1cgthlmn1k.b[23][1]++;
cov_1cgthlmn1k.s[146]++;
if (uniform.size > 1) {
cov_1cgthlmn1k.b[25][0]++;
cov_1cgthlmn1k.s[147]++;
(cov_1cgthlmn1k.b[26][0]++, data.length) &&
(cov_1cgthlmn1k.b[26][1]++, gl.uniform1iv(location, data));
} else {
cov_1cgthlmn1k.b[25][1]++;
cov_1cgthlmn1k.s[148]++;
gl.uniform1i(location, data);
}
cov_1cgthlmn1k.s[149]++;
break;
case gl.FLOAT:
cov_1cgthlmn1k.b[23][2]++;
cov_1cgthlmn1k.s[150]++;
if (uniform.size > 1) {
cov_1cgthlmn1k.b[27][0]++;
cov_1cgthlmn1k.s[151]++;
(cov_1cgthlmn1k.b[28][0]++, data.length) &&
(cov_1cgthlmn1k.b[28][1]++, gl.uniform1fv(location, data));
} else {
cov_1cgthlmn1k.b[27][1]++;
cov_1cgthlmn1k.s[152]++;
gl.uniform1f(location, data);
}
cov_1cgthlmn1k.s[153]++;
break;
case gl.FLOAT_MAT3:
cov_1cgthlmn1k.b[23][3]++;
cov_1cgthlmn1k.s[154]++;
gl.uniformMatrix3fv(location, false, data);
cov_1cgthlmn1k.s[155]++;
break;
case gl.FLOAT_MAT4:
cov_1cgthlmn1k.b[23][4]++;
cov_1cgthlmn1k.s[156]++;
gl.uniformMatrix4fv(location, false, data);
cov_1cgthlmn1k.s[157]++;
break;
case gl.FLOAT_VEC2:
cov_1cgthlmn1k.b[23][5]++;
cov_1cgthlmn1k.s[158]++;
if (uniform.size > 1) {
cov_1cgthlmn1k.b[29][0]++;
cov_1cgthlmn1k.s[159]++;
(cov_1cgthlmn1k.b[30][0]++, data.length) &&
(cov_1cgthlmn1k.b[30][1]++, gl.uniform2fv(location, data));
} else {
cov_1cgthlmn1k.b[29][1]++;
cov_1cgthlmn1k.s[160]++;
gl.uniform2f(location, data[0], data[1]);
}
cov_1cgthlmn1k.s[161]++;
break;
case gl.FLOAT_VEC3:
cov_1cgthlmn1k.b[23][6]++;
cov_1cgthlmn1k.s[162]++;
if (uniform.size > 1) {
cov_1cgthlmn1k.b[31][0]++;
cov_1cgthlmn1k.s[163]++;
(cov_1cgthlmn1k.b[32][0]++, data.length) &&
(cov_1cgthlmn1k.b[32][1]++, gl.uniform3fv(location, data));
} else {
cov_1cgthlmn1k.b[31][1]++;
cov_1cgthlmn1k.s[164]++;
gl.uniform3f(location, data[0], data[1], data[2]);
}
cov_1cgthlmn1k.s[165]++;
break;
case gl.FLOAT_VEC4:
cov_1cgthlmn1k.b[23][7]++;
cov_1cgthlmn1k.s[166]++;
if (uniform.size > 1) {
cov_1cgthlmn1k.b[33][0]++;
cov_1cgthlmn1k.s[167]++;
(cov_1cgthlmn1k.b[34][0]++, data.length) &&
(cov_1cgthlmn1k.b[34][1]++, gl.uniform4fv(location, data));
} else {
cov_1cgthlmn1k.b[33][1]++;
cov_1cgthlmn1k.s[168]++;
gl.uniform4f(location, data[0], data[1], data[2], data[3]);
}
cov_1cgthlmn1k.s[169]++;
break;
case gl.INT_VEC2:
cov_1cgthlmn1k.b[23][8]++;
cov_1cgthlmn1k.s[170]++;
if (uniform.size > 1) {
cov_1cgthlmn1k.b[35][0]++;
cov_1cgthlmn1k.s[171]++;
(cov_1cgthlmn1k.b[36][0]++, data.length) &&
(cov_1cgthlmn1k.b[36][1]++, gl.uniform2iv(location, data));
} else {
cov_1cgthlmn1k.b[35][1]++;
cov_1cgthlmn1k.s[172]++;
gl.uniform2i(location, data[0], data[1]);
}
cov_1cgthlmn1k.s[173]++;
break;
case gl.INT_VEC3:
cov_1cgthlmn1k.b[23][9]++;
cov_1cgthlmn1k.s[174]++;
if (uniform.size > 1) {
cov_1cgthlmn1k.b[37][0]++;
cov_1cgthlmn1k.s[175]++;
(cov_1cgthlmn1k.b[38][0]++, data.length) &&
(cov_1cgthlmn1k.b[38][1]++, gl.uniform3iv(location, data));
} else {
cov_1cgthlmn1k.b[37][1]++;
cov_1cgthlmn1k.s[176]++;
gl.uniform3i(location, data[0], data[1], data[2]);
}
cov_1cgthlmn1k.s[177]++;
break;
case gl.INT_VEC4:
cov_1cgthlmn1k.b[23][10]++;
cov_1cgthlmn1k.s[178]++;
if (uniform.size > 1) {
cov_1cgthlmn1k.b[39][0]++;
cov_1cgthlmn1k.s[179]++;
(cov_1cgthlmn1k.b[40][0]++, data.length) &&
(cov_1cgthlmn1k.b[40][1]++, gl.uniform4iv(location, data));
} else {
cov_1cgthlmn1k.b[39][1]++;
cov_1cgthlmn1k.s[180]++;
gl.uniform4i(location, data[0], data[1], data[2], data[3]);
}
cov_1cgthlmn1k.s[181]++;
break;
case gl.SAMPLER_2D:
cov_1cgthlmn1k.b[23][11]++;
cov_1cgthlmn1k.s[182]++;
gl.activeTexture(gl.TEXTURE0 + uniform.samplerIndex);
cov_1cgthlmn1k.s[183]++;
uniform.texture = this._renderer.getTexture(data);
cov_1cgthlmn1k.s[184]++;
gl.uniform1i(uniform.location, uniform.samplerIndex);
cov_1cgthlmn1k.s[185]++;
break;
//@todo complete all types
}
cov_1cgthlmn1k.s[186]++;
return this;
};
/* NONE OF THIS IS FAST OR EFFICIENT BUT BEAR WITH ME
*
* these shader "type" query methods are used by various
* facilities of the renderer to determine if changing
* the shader type for the required action (for example,
* do we need to load the default lighting shader if the
* current shader cannot handle lighting?)
*
**/ cov_1cgthlmn1k
.s[187]++;
_main.default.Shader.prototype.isLightShader = function() {
cov_1cgthlmn1k.f[13]++;
cov_1cgthlmn1k.s[188]++;
return (
(cov_1cgthlmn1k.b[41][0]++, this.attributes.aNormal !== undefined) ||
(cov_1cgthlmn1k.b[41][1]++, this.uniforms.uUseLighting !== undefined) ||
(cov_1cgthlmn1k.b[41][2]++, this.uniforms.uAmbientLightCount !== undefined) ||
(cov_1cgthlmn1k.b[41][3]++,
this.uniforms.uDirectionalLightCount !== undefined) ||
(cov_1cgthlmn1k.b[41][4]++, this.uniforms.uPointLightCount !== undefined) ||
(cov_1cgthlmn1k.b[41][5]++, this.uniforms.uAmbientColor !== undefined) ||
(cov_1cgthlmn1k.b[41][6]++,
this.uniforms.uDirectionalDiffuseColors !== undefined) ||
(cov_1cgthlmn1k.b[41][7]++,
this.uniforms.uDirectionalSpecularColors !== undefined) ||
(cov_1cgthlmn1k.b[41][8]++,
this.uniforms.uPointLightLocation !== undefined) ||
(cov_1cgthlmn1k.b[41][9]++,
this.uniforms.uPointLightDiffuseColors !== undefined) ||
(cov_1cgthlmn1k.b[41][10]++,
this.uniforms.uPointLightSpecularColors !== undefined) ||
(cov_1cgthlmn1k.b[41][11]++,
this.uniforms.uLightingDirection !== undefined) ||
(cov_1cgthlmn1k.b[41][12]++, this.uniforms.uSpecular !== undefined)
);
};
cov_1cgthlmn1k.s[189]++;
_main.default.Shader.prototype.isNormalShader = function() {
cov_1cgthlmn1k.f[14]++;
cov_1cgthlmn1k.s[190]++;
return this.attributes.aNormal !== undefined;
};
cov_1cgthlmn1k.s[191]++;
_main.default.Shader.prototype.isTextureShader = function() {
cov_1cgthlmn1k.f[15]++;
cov_1cgthlmn1k.s[192]++;
return this.samplerIndex > 0;
};
cov_1cgthlmn1k.s[193]++;
_main.default.Shader.prototype.isColorShader = function() {
cov_1cgthlmn1k.f[16]++;
cov_1cgthlmn1k.s[194]++;
return (
(cov_1cgthlmn1k.b[42][0]++, this.attributes.aVertexColor !== undefined) ||
(cov_1cgthlmn1k.b[42][1]++, this.uniforms.uMaterialColor !== undefined)
);
};
cov_1cgthlmn1k.s[195]++;
_main.default.Shader.prototype.isTexLightShader = function() {
cov_1cgthlmn1k.f[17]++;
cov_1cgthlmn1k.s[196]++;
return (
(cov_1cgthlmn1k.b[43][0]++, this.isLightShader()) &&
(cov_1cgthlmn1k.b[43][1]++, this.isTextureShader())
);
};
cov_1cgthlmn1k.s[197]++;
_main.default.Shader.prototype.isStrokeShader = function() {
cov_1cgthlmn1k.f[18]++;
cov_1cgthlmn1k.s[198]++;
return this.uniforms.uStrokeWeight !== undefined;
};
/**
* @method enableAttrib
* @chainable
* @private
*/ cov_1cgthlmn1k.s[199]++;
_main.default.Shader.prototype.enableAttrib = function(
attr,
size,
type,
normalized,
stride,
offset
) {
cov_1cgthlmn1k.f[19]++;
cov_1cgthlmn1k.s[200]++;
if (attr) {
cov_1cgthlmn1k.b[44][0]++;
cov_1cgthlmn1k.s[201]++;
if (
(cov_1cgthlmn1k.b[46][0]++, typeof IS_MINIFIED === 'undefined') &&
(cov_1cgthlmn1k.b[46][1]++, this.attributes[attr.name] !== attr)
) {
cov_1cgthlmn1k.b[45][0]++;
cov_1cgthlmn1k.s[202]++;
console.warn(
'The attribute "'.concat(
attr.name,
'"passed to enableAttrib does not belong to this shader.'
)
);
} else {
cov_1cgthlmn1k.b[45][1]++;
}
var loc = (cov_1cgthlmn1k.s[203]++, attr.location);
cov_1cgthlmn1k.s[204]++;
if (loc !== -1) {
cov_1cgthlmn1k.b[47][0]++;
var gl = (cov_1cgthlmn1k.s[205]++, this._renderer.GL);
cov_1cgthlmn1k.s[206]++;
if (!attr.enabled) {
cov_1cgthlmn1k.b[48][0]++;
cov_1cgthlmn1k.s[207]++;
gl.enableVertexAttribArray(loc);
cov_1cgthlmn1k.s[208]++;
attr.enabled = true;
} else {
cov_1cgthlmn1k.b[48][1]++;
}
cov_1cgthlmn1k.s[209]++;
this._renderer.GL.vertexAttribPointer(
loc,
size,
(cov_1cgthlmn1k.b[49][0]++, type) ||
(cov_1cgthlmn1k.b[49][1]++, gl.FLOAT),
(cov_1cgthlmn1k.b[50][0]++, normalized) ||
(cov_1cgthlmn1k.b[50][1]++, false),
(cov_1cgthlmn1k.b[51][0]++, stride) || (cov_1cgthlmn1k.b[51][1]++, 0),
(cov_1cgthlmn1k.b[52][0]++, offset) || (cov_1cgthlmn1k.b[52][1]++, 0)
);
} else {
cov_1cgthlmn1k.b[47][1]++;
}
} else {
cov_1cgthlmn1k.b[44][1]++;
}
cov_1cgthlmn1k.s[210]++;
return this;
};
var _default = _main.default.Shader;
exports.default = _default;
},
{ '../core/main': 54 }
],
110: [
function(_dereq_, module, exports) {
'use strict';
function _typeof(obj) {
if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj &&
typeof Symbol === 'function' &&
obj.constructor === Symbol &&
obj !== Symbol.prototype
? 'symbol'
: typeof obj;
};
}
return _typeof(obj);
}
var cov_qfkuvw4wj = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.Texture.js';
var hash = 'd397b1eca5796e1731181f35b9d0c8a7bde0b5b7';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/p5.Texture.js',
statementMap: {
'0': { start: { line: 21, column: 0 }, end: { line: 56, column: 2 } },
'1': { start: { line: 22, column: 2 }, end: { line: 22, column: 28 } },
'2': { start: { line: 24, column: 13 }, end: { line: 24, column: 30 } },
'3': { start: { line: 26, column: 2 }, end: { line: 26, column: 17 } },
'4': { start: { line: 27, column: 2 }, end: { line: 27, column: 25 } },
'5': { start: { line: 28, column: 2 }, end: { line: 28, column: 32 } },
'6': { start: { line: 29, column: 2 }, end: { line: 29, column: 26 } },
'7': { start: { line: 30, column: 2 }, end: { line: 30, column: 23 } },
'8': { start: { line: 31, column: 2 }, end: { line: 31, column: 31 } },
'9': { start: { line: 32, column: 2 }, end: { line: 32, column: 31 } },
'10': { start: { line: 33, column: 2 }, end: { line: 33, column: 34 } },
'11': { start: { line: 34, column: 2 }, end: { line: 34, column: 34 } },
'12': { start: { line: 38, column: 2 }, end: { line: 39, column: 77 } },
'13': { start: { line: 40, column: 2 }, end: { line: 40, column: 32 } },
'14': { start: { line: 41, column: 2 }, end: { line: 44, column: 34 } },
'15': { start: { line: 45, column: 2 }, end: { line: 45, column: 46 } },
'16': { start: { line: 46, column: 2 }, end: { line: 46, column: 52 } },
'17': { start: { line: 47, column: 2 }, end: { line: 48, column: 65 } },
'18': { start: { line: 50, column: 22 }, end: { line: 50, column: 54 } },
'19': { start: { line: 51, column: 2 }, end: { line: 51, column: 33 } },
'20': { start: { line: 52, column: 2 }, end: { line: 52, column: 35 } },
'21': { start: { line: 54, column: 2 }, end: { line: 54, column: 25 } },
'22': { start: { line: 55, column: 2 }, end: { line: 55, column: 14 } },
'23': { start: { line: 58, column: 0 }, end: { line: 74, column: 2 } },
'24': { start: { line: 60, column: 2 }, end: { line: 72, column: 3 } },
'25': { start: { line: 62, column: 4 }, end: { line: 62, column: 34 } },
'26': { start: { line: 63, column: 9 }, end: { line: 72, column: 3 } },
'27': { start: { line: 69, column: 4 }, end: { line: 69, column: 31 } },
'28': { start: { line: 70, column: 9 }, end: { line: 72, column: 3 } },
'29': { start: { line: 71, column: 4 }, end: { line: 71, column: 27 } },
'30': { start: { line: 73, column: 2 }, end: { line: 73, column: 21 } },
'31': { start: { line: 83, column: 0 }, end: { line: 127, column: 2 } },
'32': { start: { line: 84, column: 13 }, end: { line: 84, column: 30 } },
'33': { start: { line: 85, column: 2 }, end: { line: 85, column: 34 } },
'34': { start: { line: 87, column: 2 }, end: { line: 87, column: 45 } },
'35': { start: { line: 88, column: 2 }, end: { line: 88, column: 45 } },
'36': { start: { line: 90, column: 2 }, end: { line: 90, column: 47 } },
'37': { start: { line: 91, column: 2 }, end: { line: 91, column: 21 } },
'38': { start: { line: 94, column: 2 }, end: { line: 94, column: 75 } },
'39': { start: { line: 95, column: 2 }, end: { line: 95, column: 75 } },
'40': { start: { line: 97, column: 2 }, end: { line: 126, column: 3 } },
'41': { start: { line: 104, column: 20 }, end: { line: 104, column: 48 } },
'42': { start: { line: 105, column: 4 }, end: { line: 115, column: 6 } },
'43': { start: { line: 118, column: 4 }, end: { line: 125, column: 6 } },
'44': { start: { line: 136, column: 0 }, end: { line: 220, column: 2 } },
'45': { start: { line: 137, column: 15 }, end: { line: 137, column: 23 } },
'46': { start: { line: 138, column: 2 }, end: { line: 140, column: 3 } },
'47': { start: { line: 139, column: 4 }, end: { line: 139, column: 17 } },
'48': { start: { line: 142, column: 22 }, end: { line: 142, column: 54 } },
'49': { start: { line: 143, column: 16 }, end: { line: 143, column: 21 } },
'50': { start: { line: 145, column: 13 }, end: { line: 145, column: 30 } },
'51': { start: { line: 147, column: 2 }, end: { line: 205, column: 3 } },
'52': { start: { line: 148, column: 4 }, end: { line: 148, column: 19 } },
'53': { start: { line: 152, column: 4 }, end: { line: 152, column: 35 } },
'54': { start: { line: 153, column: 4 }, end: { line: 153, column: 37 } },
'55': { start: { line: 155, column: 4 }, end: { line: 164, column: 5 } },
'56': { start: { line: 156, column: 6 }, end: { line: 156, column: 30 } },
'57': { start: { line: 157, column: 11 }, end: { line: 164, column: 5 } },
'58': { start: { line: 163, column: 6 }, end: { line: 163, column: 29 } },
'59': { start: { line: 165, column: 9 }, end: { line: 205, column: 3 } },
'60': { start: { line: 168, column: 4 }, end: { line: 171, column: 5 } },
'61': { start: { line: 169, column: 6 }, end: { line: 169, column: 21 } },
'62': { start: { line: 170, column: 6 }, end: { line: 170, column: 30 } },
'63': { start: { line: 172, column: 9 }, end: { line: 205, column: 3 } },
'64': { start: { line: 177, column: 4 }, end: { line: 194, column: 5 } },
'65': { start: { line: 181, column: 6 }, end: { line: 181, column: 21 } },
'66': { start: { line: 182, column: 6 }, end: { line: 182, column: 30 } },
'67': { start: { line: 183, column: 11 }, end: { line: 194, column: 5 } },
'68': { start: { line: 186, column: 6 }, end: { line: 193, column: 7 } },
'69': { start: { line: 191, column: 8 }, end: { line: 191, column: 48 } },
'70': { start: { line: 192, column: 8 }, end: { line: 192, column: 23 } },
'71': { start: { line: 195, column: 9 }, end: { line: 205, column: 3 } },
'72': { start: { line: 196, column: 4 }, end: { line: 199, column: 5 } },
'73': { start: { line: 197, column: 6 }, end: { line: 197, column: 26 } },
'74': { start: { line: 198, column: 6 }, end: { line: 198, column: 21 } },
'75': { start: { line: 204, column: 4 }, end: { line: 204, column: 19 } },
'76': { start: { line: 207, column: 2 }, end: { line: 217, column: 3 } },
'77': { start: { line: 208, column: 4 }, end: { line: 208, column: 23 } },
'78': { start: { line: 209, column: 4 }, end: { line: 216, column: 6 } },
'79': { start: { line: 219, column: 2 }, end: { line: 219, column: 17 } },
'80': { start: { line: 226, column: 0 }, end: { line: 233, column: 2 } },
'81': { start: { line: 229, column: 13 }, end: { line: 229, column: 30 } },
'82': { start: { line: 230, column: 2 }, end: { line: 230, column: 44 } },
'83': { start: { line: 232, column: 2 }, end: { line: 232, column: 14 } },
'84': { start: { line: 239, column: 0 }, end: { line: 243, column: 2 } },
'85': { start: { line: 241, column: 13 }, end: { line: 241, column: 30 } },
'86': { start: { line: 242, column: 2 }, end: { line: 242, column: 38 } },
'87': { start: { line: 256, column: 0 }, end: { line: 275, column: 2 } },
'88': { start: { line: 257, column: 13 }, end: { line: 257, column: 30 } },
'89': { start: { line: 259, column: 2 }, end: { line: 263, column: 3 } },
'90': { start: { line: 260, column: 4 }, end: { line: 260, column: 34 } },
'91': { start: { line: 262, column: 4 }, end: { line: 262, column: 33 } },
'92': { start: { line: 265, column: 2 }, end: { line: 269, column: 3 } },
'93': { start: { line: 266, column: 4 }, end: { line: 266, column: 34 } },
'94': { start: { line: 268, column: 4 }, end: { line: 268, column: 33 } },
'95': { start: { line: 271, column: 2 }, end: { line: 271, column: 21 } },
'96': { start: { line: 272, column: 2 }, end: { line: 272, column: 75 } },
'97': { start: { line: 273, column: 2 }, end: { line: 273, column: 75 } },
'98': { start: { line: 274, column: 2 }, end: { line: 274, column: 23 } },
'99': { start: { line: 286, column: 0 }, end: { line: 347, column: 2 } },
'100': { start: { line: 287, column: 13 }, end: { line: 287, column: 30 } },
'101': { start: { line: 292, column: 23 }, end: { line: 292, column: 47 } },
'102': { start: { line: 292, column: 28 }, end: { line: 292, column: 47 } },
'103': { start: { line: 294, column: 26 }, end: { line: 294, column: 50 } },
'104': { start: { line: 295, column: 27 }, end: { line: 295, column: 52 } },
'105': { start: { line: 297, column: 2 }, end: { line: 318, column: 3 } },
'106': { start: { line: 298, column: 4 }, end: { line: 305, column: 5 } },
'107': { start: { line: 299, column: 6 }, end: { line: 299, column: 31 } },
'108': { start: { line: 301, column: 6 }, end: { line: 303, column: 8 } },
'109': { start: { line: 304, column: 6 }, end: { line: 304, column: 38 } },
'110': { start: { line: 306, column: 9 }, end: { line: 318, column: 3 } },
'111': { start: { line: 307, column: 4 }, end: { line: 314, column: 5 } },
'112': { start: { line: 308, column: 6 }, end: { line: 308, column: 40 } },
'113': { start: { line: 310, column: 6 }, end: { line: 312, column: 8 } },
'114': { start: { line: 313, column: 6 }, end: { line: 313, column: 38 } },
'115': { start: { line: 317, column: 4 }, end: { line: 317, column: 36 } },
'116': { start: { line: 320, column: 2 }, end: { line: 341, column: 3 } },
'117': { start: { line: 321, column: 4 }, end: { line: 328, column: 5 } },
'118': { start: { line: 322, column: 6 }, end: { line: 322, column: 31 } },
'119': { start: { line: 324, column: 6 }, end: { line: 326, column: 8 } },
'120': { start: { line: 327, column: 6 }, end: { line: 327, column: 38 } },
'121': { start: { line: 329, column: 9 }, end: { line: 341, column: 3 } },
'122': { start: { line: 330, column: 4 }, end: { line: 337, column: 5 } },
'123': { start: { line: 331, column: 6 }, end: { line: 331, column: 40 } },
'124': { start: { line: 333, column: 6 }, end: { line: 335, column: 8 } },
'125': { start: { line: 336, column: 6 }, end: { line: 336, column: 38 } },
'126': { start: { line: 340, column: 4 }, end: { line: 340, column: 36 } },
'127': { start: { line: 343, column: 2 }, end: { line: 343, column: 21 } },
'128': { start: { line: 344, column: 2 }, end: { line: 344, column: 67 } },
'129': { start: { line: 345, column: 2 }, end: { line: 345, column: 67 } },
'130': { start: { line: 346, column: 2 }, end: { line: 346, column: 23 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 21, column: 13 }, end: { line: 21, column: 14 } },
loc: { start: { line: 21, column: 37 }, end: { line: 56, column: 1 } },
line: 21
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 58, column: 49 }, end: { line: 58, column: 50 } },
loc: { start: { line: 58, column: 60 }, end: { line: 74, column: 1 } },
line: 58
},
'2': {
name: '(anonymous_2)',
decl: { start: { line: 83, column: 28 }, end: { line: 83, column: 29 } },
loc: { start: { line: 83, column: 43 }, end: { line: 127, column: 1 } },
line: 83
},
'3': {
name: '(anonymous_3)',
decl: {
start: { line: 136, column: 30 },
end: { line: 136, column: 31 }
},
loc: { start: { line: 136, column: 41 }, end: { line: 220, column: 1 } },
line: 136
},
'4': {
name: '(anonymous_4)',
decl: {
start: { line: 226, column: 35 },
end: { line: 226, column: 36 }
},
loc: { start: { line: 226, column: 46 }, end: { line: 233, column: 1 } },
line: 226
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 239, column: 37 },
end: { line: 239, column: 38 }
},
loc: { start: { line: 239, column: 48 }, end: { line: 243, column: 1 } },
line: 239
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 256, column: 40 },
end: { line: 256, column: 41 }
},
loc: { start: { line: 256, column: 69 }, end: { line: 275, column: 1 } },
line: 256
},
'7': {
name: '(anonymous_7)',
decl: {
start: { line: 286, column: 35 },
end: { line: 286, column: 36 }
},
loc: { start: { line: 286, column: 58 }, end: { line: 347, column: 1 } },
line: 286
},
'8': {
name: '(anonymous_8)',
decl: {
start: { line: 292, column: 23 },
end: { line: 292, column: 24 }
},
loc: { start: { line: 292, column: 28 }, end: { line: 292, column: 47 } },
line: 292
}
},
branchMap: {
'0': {
loc: { start: { line: 39, column: 4 }, end: { line: 39, column: 76 } },
type: 'binary-expr',
locations: [
{ start: { line: 39, column: 4 }, end: { line: 39, column: 42 } },
{ start: { line: 39, column: 46 }, end: { line: 39, column: 76 } }
],
line: 39
},
'1': {
loc: { start: { line: 42, column: 4 }, end: { line: 44, column: 33 } },
type: 'binary-expr',
locations: [
{ start: { line: 42, column: 4 }, end: { line: 42, column: 37 } },
{ start: { line: 43, column: 4 }, end: { line: 43, column: 29 } },
{ start: { line: 44, column: 4 }, end: { line: 44, column: 33 } }
],
line: 42
},
'2': {
loc: { start: { line: 48, column: 4 }, end: { line: 48, column: 64 } },
type: 'binary-expr',
locations: [
{ start: { line: 48, column: 4 }, end: { line: 48, column: 36 } },
{ start: { line: 48, column: 40 }, end: { line: 48, column: 64 } }
],
line: 48
},
'3': {
loc: { start: { line: 60, column: 2 }, end: { line: 72, column: 3 } },
type: 'if',
locations: [
{ start: { line: 60, column: 2 }, end: { line: 72, column: 3 } },
{ start: { line: 60, column: 2 }, end: { line: 72, column: 3 } }
],
line: 60
},
'4': {
loc: { start: { line: 63, column: 9 }, end: { line: 72, column: 3 } },
type: 'if',
locations: [
{ start: { line: 63, column: 9 }, end: { line: 72, column: 3 } },
{ start: { line: 63, column: 9 }, end: { line: 72, column: 3 } }
],
line: 63
},
'5': {
loc: { start: { line: 64, column: 4 }, end: { line: 66, column: 25 } },
type: 'binary-expr',
locations: [
{ start: { line: 64, column: 4 }, end: { line: 64, column: 26 } },
{ start: { line: 65, column: 4 }, end: { line: 65, column: 24 } },
{ start: { line: 66, column: 4 }, end: { line: 66, column: 25 } }
],
line: 64
},
'6': {
loc: { start: { line: 70, column: 9 }, end: { line: 72, column: 3 } },
type: 'if',
locations: [
{ start: { line: 70, column: 9 }, end: { line: 72, column: 3 } },
{ start: { line: 70, column: 9 }, end: { line: 72, column: 3 } }
],
line: 70
},
'7': {
loc: { start: { line: 97, column: 2 }, end: { line: 126, column: 3 } },
type: 'if',
locations: [
{ start: { line: 97, column: 2 }, end: { line: 126, column: 3 } },
{ start: { line: 97, column: 2 }, end: { line: 126, column: 3 } }
],
line: 97
},
'8': {
loc: { start: { line: 98, column: 4 }, end: { line: 100, column: 56 } },
type: 'binary-expr',
locations: [
{ start: { line: 98, column: 4 }, end: { line: 98, column: 20 } },
{ start: { line: 99, column: 4 }, end: { line: 99, column: 21 } },
{ start: { line: 100, column: 5 }, end: { line: 100, column: 27 } },
{ start: { line: 100, column: 31 }, end: { line: 100, column: 55 } }
],
line: 98
},
'9': {
loc: { start: { line: 138, column: 2 }, end: { line: 140, column: 3 } },
type: 'if',
locations: [
{ start: { line: 138, column: 2 }, end: { line: 140, column: 3 } },
{ start: { line: 138, column: 2 }, end: { line: 140, column: 3 } }
],
line: 138
},
'10': {
loc: { start: { line: 138, column: 6 }, end: { line: 138, column: 43 } },
type: 'binary-expr',
locations: [
{ start: { line: 138, column: 6 }, end: { line: 138, column: 22 } },
{ start: { line: 138, column: 26 }, end: { line: 138, column: 43 } }
],
line: 138
},
'11': {
loc: { start: { line: 147, column: 2 }, end: { line: 205, column: 3 } },
type: 'if',
locations: [
{ start: { line: 147, column: 2 }, end: { line: 205, column: 3 } },
{ start: { line: 147, column: 2 }, end: { line: 205, column: 3 } }
],
line: 147
},
'12': {
loc: { start: { line: 147, column: 6 }, end: { line: 147, column: 76 } },
type: 'binary-expr',
locations: [
{ start: { line: 147, column: 6 }, end: { line: 147, column: 38 } },
{ start: { line: 147, column: 42 }, end: { line: 147, column: 76 } }
],
line: 147
},
'13': {
loc: { start: { line: 155, column: 4 }, end: { line: 164, column: 5 } },
type: 'if',
locations: [
{ start: { line: 155, column: 4 }, end: { line: 164, column: 5 } },
{ start: { line: 155, column: 4 }, end: { line: 164, column: 5 } }
],
line: 155
},
'14': {
loc: { start: { line: 157, column: 11 }, end: { line: 164, column: 5 } },
type: 'if',
locations: [
{ start: { line: 157, column: 11 }, end: { line: 164, column: 5 } },
{ start: { line: 157, column: 11 }, end: { line: 164, column: 5 } }
],
line: 157
},
'15': {
loc: { start: { line: 157, column: 15 }, end: { line: 157, column: 62 } },
type: 'binary-expr',
locations: [
{ start: { line: 157, column: 15 }, end: { line: 157, column: 37 } },
{ start: { line: 157, column: 41 }, end: { line: 157, column: 62 } }
],
line: 157
},
'16': {
loc: { start: { line: 165, column: 9 }, end: { line: 205, column: 3 } },
type: 'if',
locations: [
{ start: { line: 165, column: 9 }, end: { line: 205, column: 3 } },
{ start: { line: 165, column: 9 }, end: { line: 205, column: 3 } }
],
line: 165
},
'17': {
loc: { start: { line: 168, column: 4 }, end: { line: 171, column: 5 } },
type: 'if',
locations: [
{ start: { line: 168, column: 4 }, end: { line: 171, column: 5 } },
{ start: { line: 168, column: 4 }, end: { line: 171, column: 5 } }
],
line: 168
},
'18': {
loc: { start: { line: 172, column: 9 }, end: { line: 205, column: 3 } },
type: 'if',
locations: [
{ start: { line: 172, column: 9 }, end: { line: 205, column: 3 } },
{ start: { line: 172, column: 9 }, end: { line: 205, column: 3 } }
],
line: 172
},
'19': {
loc: { start: { line: 177, column: 4 }, end: { line: 194, column: 5 } },
type: 'if',
locations: [
{ start: { line: 177, column: 4 }, end: { line: 194, column: 5 } },
{ start: { line: 177, column: 4 }, end: { line: 194, column: 5 } }
],
line: 177
},
'20': {
loc: { start: { line: 183, column: 11 }, end: { line: 194, column: 5 } },
type: 'if',
locations: [
{ start: { line: 183, column: 11 }, end: { line: 194, column: 5 } },
{ start: { line: 183, column: 11 }, end: { line: 194, column: 5 } }
],
line: 183
},
'21': {
loc: { start: { line: 186, column: 6 }, end: { line: 193, column: 7 } },
type: 'if',
locations: [
{ start: { line: 186, column: 6 }, end: { line: 193, column: 7 } },
{ start: { line: 186, column: 6 }, end: { line: 193, column: 7 } }
],
line: 186
},
'22': {
loc: { start: { line: 195, column: 9 }, end: { line: 205, column: 3 } },
type: 'if',
locations: [
{ start: { line: 195, column: 9 }, end: { line: 205, column: 3 } },
{ start: { line: 195, column: 9 }, end: { line: 205, column: 3 } }
],
line: 195
},
'23': {
loc: { start: { line: 196, column: 4 }, end: { line: 199, column: 5 } },
type: 'if',
locations: [
{ start: { line: 196, column: 4 }, end: { line: 199, column: 5 } },
{ start: { line: 196, column: 4 }, end: { line: 199, column: 5 } }
],
line: 196
},
'24': {
loc: { start: { line: 207, column: 2 }, end: { line: 217, column: 3 } },
type: 'if',
locations: [
{ start: { line: 207, column: 2 }, end: { line: 217, column: 3 } },
{ start: { line: 207, column: 2 }, end: { line: 217, column: 3 } }
],
line: 207
},
'25': {
loc: { start: { line: 259, column: 2 }, end: { line: 263, column: 3 } },
type: 'if',
locations: [
{ start: { line: 259, column: 2 }, end: { line: 263, column: 3 } },
{ start: { line: 259, column: 2 }, end: { line: 263, column: 3 } }
],
line: 259
},
'26': {
loc: { start: { line: 265, column: 2 }, end: { line: 269, column: 3 } },
type: 'if',
locations: [
{ start: { line: 265, column: 2 }, end: { line: 269, column: 3 } },
{ start: { line: 265, column: 2 }, end: { line: 269, column: 3 } }
],
line: 265
},
'27': {
loc: { start: { line: 297, column: 2 }, end: { line: 318, column: 3 } },
type: 'if',
locations: [
{ start: { line: 297, column: 2 }, end: { line: 318, column: 3 } },
{ start: { line: 297, column: 2 }, end: { line: 318, column: 3 } }
],
line: 297
},
'28': {
loc: { start: { line: 298, column: 4 }, end: { line: 305, column: 5 } },
type: 'if',
locations: [
{ start: { line: 298, column: 4 }, end: { line: 305, column: 5 } },
{ start: { line: 298, column: 4 }, end: { line: 305, column: 5 } }
],
line: 298
},
'29': {
loc: { start: { line: 298, column: 8 }, end: { line: 298, column: 43 } },
type: 'binary-expr',
locations: [
{ start: { line: 298, column: 8 }, end: { line: 298, column: 23 } },
{ start: { line: 298, column: 27 }, end: { line: 298, column: 43 } }
],
line: 298
},
'30': {
loc: { start: { line: 306, column: 9 }, end: { line: 318, column: 3 } },
type: 'if',
locations: [
{ start: { line: 306, column: 9 }, end: { line: 318, column: 3 } },
{ start: { line: 306, column: 9 }, end: { line: 318, column: 3 } }
],
line: 306
},
'31': {
loc: { start: { line: 307, column: 4 }, end: { line: 314, column: 5 } },
type: 'if',
locations: [
{ start: { line: 307, column: 4 }, end: { line: 314, column: 5 } },
{ start: { line: 307, column: 4 }, end: { line: 314, column: 5 } }
],
line: 307
},
'32': {
loc: { start: { line: 307, column: 8 }, end: { line: 307, column: 43 } },
type: 'binary-expr',
locations: [
{ start: { line: 307, column: 8 }, end: { line: 307, column: 23 } },
{ start: { line: 307, column: 27 }, end: { line: 307, column: 43 } }
],
line: 307
},
'33': {
loc: { start: { line: 320, column: 2 }, end: { line: 341, column: 3 } },
type: 'if',
locations: [
{ start: { line: 320, column: 2 }, end: { line: 341, column: 3 } },
{ start: { line: 320, column: 2 }, end: { line: 341, column: 3 } }
],
line: 320
},
'34': {
loc: { start: { line: 321, column: 4 }, end: { line: 328, column: 5 } },
type: 'if',
locations: [
{ start: { line: 321, column: 4 }, end: { line: 328, column: 5 } },
{ start: { line: 321, column: 4 }, end: { line: 328, column: 5 } }
],
line: 321
},
'35': {
loc: { start: { line: 321, column: 8 }, end: { line: 321, column: 43 } },
type: 'binary-expr',
locations: [
{ start: { line: 321, column: 8 }, end: { line: 321, column: 23 } },
{ start: { line: 321, column: 27 }, end: { line: 321, column: 43 } }
],
line: 321
},
'36': {
loc: { start: { line: 329, column: 9 }, end: { line: 341, column: 3 } },
type: 'if',
locations: [
{ start: { line: 329, column: 9 }, end: { line: 341, column: 3 } },
{ start: { line: 329, column: 9 }, end: { line: 341, column: 3 } }
],
line: 329
},
'37': {
loc: { start: { line: 330, column: 4 }, end: { line: 337, column: 5 } },
type: 'if',
locations: [
{ start: { line: 330, column: 4 }, end: { line: 337, column: 5 } },
{ start: { line: 330, column: 4 }, end: { line: 337, column: 5 } }
],
line: 330
},
'38': {
loc: { start: { line: 330, column: 8 }, end: { line: 330, column: 43 } },
type: 'binary-expr',
locations: [
{ start: { line: 330, column: 8 }, end: { line: 330, column: 23 } },
{ start: { line: 330, column: 27 }, end: { line: 330, column: 43 } }
],
line: 330
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0,
'123': 0,
'124': 0,
'125': 0,
'126': 0,
'127': 0,
'128': 0,
'129': 0,
'130': 0
},
f: { '0': 0, '1': 0, '2': 0, '3': 0, '4': 0, '5': 0, '6': 0, '7': 0, '8': 0 },
b: {
'0': [0, 0],
'1': [0, 0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0, 0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0],
'20': [0, 0],
'21': [0, 0],
'22': [0, 0],
'23': [0, 0],
'24': [0, 0],
'25': [0, 0],
'26': [0, 0],
'27': [0, 0],
'28': [0, 0],
'29': [0, 0],
'30': [0, 0],
'31': [0, 0],
'32': [0, 0],
'33': [0, 0],
'34': [0, 0],
'35': [0, 0],
'36': [0, 0],
'37': [0, 0],
'38': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: 'd397b1eca5796e1731181f35b9d0c8a7bde0b5b7'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _main = _interopRequireDefault(_dereq_('../core/main'));
var constants = _interopRequireWildcard(_dereq_('../core/constants'));
function _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function _getRequireWildcardCache() {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || (_typeof(obj) !== 'object' && typeof obj !== 'function')) {
return { default: obj };
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_qfkuvw4wj.s[0]++;
/**
* Texture class for WEBGL Mode
* @private
* @class p5.Texture
* @param {p5.RendererGL} renderer an instance of p5.RendererGL that
* will provide the GL context for this new p5.Texture
* @param {p5.Image|p5.Graphics|p5.Element|p5.MediaElement|ImageData} [obj] the
* object containing the image data to store in the texture.
*/
_main.default.Texture = function(renderer, obj) {
cov_qfkuvw4wj.f[0]++;
cov_qfkuvw4wj.s[1]++;
this._renderer = renderer;
var gl = (cov_qfkuvw4wj.s[2]++, this._renderer.GL);
cov_qfkuvw4wj.s[3]++;
this.src = obj;
cov_qfkuvw4wj.s[4]++;
this.glTex = undefined;
cov_qfkuvw4wj.s[5]++;
this.glTarget = gl.TEXTURE_2D;
cov_qfkuvw4wj.s[6]++;
this.glFormat = gl.RGBA;
cov_qfkuvw4wj.s[7]++;
this.mipmaps = false;
cov_qfkuvw4wj.s[8]++;
this.glMinFilter = gl.LINEAR;
cov_qfkuvw4wj.s[9]++;
this.glMagFilter = gl.LINEAR;
cov_qfkuvw4wj.s[10]++;
this.glWrapS = gl.CLAMP_TO_EDGE;
cov_qfkuvw4wj.s[11]++;
this.glWrapT = gl.CLAMP_TO_EDGE;
// used to determine if this texture might need constant updating
// because it is a video or gif.
cov_qfkuvw4wj.s[12]++;
this.isSrcMediaElement =
(cov_qfkuvw4wj.b[0][0]++,
typeof _main.default.MediaElement !== 'undefined') &&
(cov_qfkuvw4wj.b[0][1]++, obj instanceof _main.default.MediaElement);
cov_qfkuvw4wj.s[13]++;
this._videoPrevUpdateTime = 0;
cov_qfkuvw4wj.s[14]++;
this.isSrcHTMLElement =
(cov_qfkuvw4wj.b[1][0]++, typeof _main.default.Element !== 'undefined') &&
(cov_qfkuvw4wj.b[1][1]++, obj instanceof _main.default.Element) &&
(cov_qfkuvw4wj.b[1][2]++, !(obj instanceof _main.default.Graphics));
cov_qfkuvw4wj.s[15]++;
this.isSrcP5Image = obj instanceof _main.default.Image;
cov_qfkuvw4wj.s[16]++;
this.isSrcP5Graphics = obj instanceof _main.default.Graphics;
cov_qfkuvw4wj.s[17]++;
this.isImageData =
(cov_qfkuvw4wj.b[2][0]++, typeof ImageData !== 'undefined') &&
(cov_qfkuvw4wj.b[2][1]++, obj instanceof ImageData);
var textureData = (cov_qfkuvw4wj.s[18]++, this._getTextureDataFromSource());
cov_qfkuvw4wj.s[19]++;
this.width = textureData.width;
cov_qfkuvw4wj.s[20]++;
this.height = textureData.height;
cov_qfkuvw4wj.s[21]++;
this.init(textureData);
cov_qfkuvw4wj.s[22]++;
return this;
};
cov_qfkuvw4wj.s[23]++;
_main.default.Texture.prototype._getTextureDataFromSource = function() {
cov_qfkuvw4wj.f[1]++;
var textureData;
cov_qfkuvw4wj.s[24]++;
if (this.isSrcP5Image) {
cov_qfkuvw4wj.b[3][0]++;
cov_qfkuvw4wj.s[25]++;
// param is a p5.Image
textureData = this.src.canvas;
} else {
cov_qfkuvw4wj.b[3][1]++;
cov_qfkuvw4wj.s[26]++;
if (
(cov_qfkuvw4wj.b[5][0]++, this.isSrcMediaElement) ||
(cov_qfkuvw4wj.b[5][1]++, this.isSrcP5Graphics) ||
(cov_qfkuvw4wj.b[5][2]++, this.isSrcHTMLElement)
) {
cov_qfkuvw4wj.b[4][0]++;
cov_qfkuvw4wj.s[27]++;
// if param is a video HTML element
textureData = this.src.elt;
} else {
cov_qfkuvw4wj.b[4][1]++;
cov_qfkuvw4wj.s[28]++;
if (this.isImageData) {
cov_qfkuvw4wj.b[6][0]++;
cov_qfkuvw4wj.s[29]++;
textureData = this.src;
} else {
cov_qfkuvw4wj.b[6][1]++;
}
}
}
cov_qfkuvw4wj.s[30]++;
return textureData;
};
/**
* Initializes common texture parameters, creates a gl texture,
* tries to upload the texture for the first time if data is
* already available.
* @private
* @method init
*/ cov_qfkuvw4wj.s[31]++;
_main.default.Texture.prototype.init = function(data) {
cov_qfkuvw4wj.f[2]++;
var gl = (cov_qfkuvw4wj.s[32]++, this._renderer.GL);
cov_qfkuvw4wj.s[33]++;
this.glTex = gl.createTexture();
cov_qfkuvw4wj.s[34]++;
this.glWrapS = this._renderer.textureWrapX;
cov_qfkuvw4wj.s[35]++;
this.glWrapT = this._renderer.textureWrapY;
cov_qfkuvw4wj.s[36]++;
this.setWrapMode(this.glWrapS, this.glWrapT);
cov_qfkuvw4wj.s[37]++;
this.bindTexture();
//gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
cov_qfkuvw4wj.s[38]++;
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, this.glMagFilter);
cov_qfkuvw4wj.s[39]++;
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, this.glMinFilter);
cov_qfkuvw4wj.s[40]++;
if (
(cov_qfkuvw4wj.b[8][0]++, this.width === 0) ||
(cov_qfkuvw4wj.b[8][1]++, this.height === 0) ||
((cov_qfkuvw4wj.b[8][2]++, this.isSrcMediaElement) &&
(cov_qfkuvw4wj.b[8][3]++, !this.src.loadedmetadata))
) {
cov_qfkuvw4wj.b[7][0]++;
// assign a 1x1 empty texture initially, because data is not yet ready,
// so that no errors occur in gl console!
var tmpdata = (cov_qfkuvw4wj.s[41]++, new Uint8Array([1, 1, 1, 1]));
cov_qfkuvw4wj.s[42]++;
gl.texImage2D(
this.glTarget,
0,
gl.RGBA,
1,
1,
0,
this.glFormat,
gl.UNSIGNED_BYTE,
tmpdata
);
} else {
cov_qfkuvw4wj.b[7][1]++;
cov_qfkuvw4wj.s[43]++;
// data is ready: just push the texture!
gl.texImage2D(
this.glTarget,
0,
this.glFormat,
this.glFormat,
gl.UNSIGNED_BYTE,
data
);
}
};
/**
* Checks if the source data for this texture has changed (if it's
* easy to do so) and reuploads the texture if necessary. If it's not
* possible or to expensive to do a calculation to determine wheter or
* not the data has occurred, this method simply re-uploads the texture.
* @method update
*/ cov_qfkuvw4wj.s[44]++;
_main.default.Texture.prototype.update = function() {
cov_qfkuvw4wj.f[3]++;
var data = (cov_qfkuvw4wj.s[45]++, this.src);
cov_qfkuvw4wj.s[46]++;
if (
(cov_qfkuvw4wj.b[10][0]++, data.width === 0) ||
(cov_qfkuvw4wj.b[10][1]++, data.height === 0)
) {
cov_qfkuvw4wj.b[9][0]++;
cov_qfkuvw4wj.s[47]++;
return false; // nothing to do!
} else {
cov_qfkuvw4wj.b[9][1]++;
}
var textureData = (cov_qfkuvw4wj.s[48]++, this._getTextureDataFromSource());
var updated = (cov_qfkuvw4wj.s[49]++, false);
var gl = (cov_qfkuvw4wj.s[50]++, this._renderer.GL);
// pull texture from data, make sure width & height are appropriate
cov_qfkuvw4wj.s[51]++;
if (
(cov_qfkuvw4wj.b[12][0]++, textureData.width !== this.width) ||
(cov_qfkuvw4wj.b[12][1]++, textureData.height !== this.height)
) {
cov_qfkuvw4wj.b[11][0]++;
cov_qfkuvw4wj.s[52]++;
updated = true;
// make sure that if the width and height of this.src have changed
// for some reason, we update our metadata and upload the texture again
cov_qfkuvw4wj.s[53]++;
this.width = textureData.width;
cov_qfkuvw4wj.s[54]++;
this.height = textureData.height;
cov_qfkuvw4wj.s[55]++;
if (this.isSrcP5Image) {
cov_qfkuvw4wj.b[13][0]++;
cov_qfkuvw4wj.s[56]++;
data.setModified(false);
} else {
cov_qfkuvw4wj.b[13][1]++;
cov_qfkuvw4wj.s[57]++;
if (
(cov_qfkuvw4wj.b[15][0]++, this.isSrcMediaElement) ||
(cov_qfkuvw4wj.b[15][1]++, this.isSrcHTMLElement)
) {
cov_qfkuvw4wj.b[14][0]++;
cov_qfkuvw4wj.s[58]++;
// on the first frame the metadata comes in, the size will be changed
// from 0 to actual size, but pixels may not be available.
// flag for update in a future frame.
// if we don't do this, a paused video, for example, may not
// send the first frame to texture memory.
data.setModified(true);
} else {
cov_qfkuvw4wj.b[14][1]++;
}
}
} else {
cov_qfkuvw4wj.b[11][1]++;
cov_qfkuvw4wj.s[59]++;
if (this.isSrcP5Image) {
cov_qfkuvw4wj.b[16][0]++;
cov_qfkuvw4wj.s[60]++;
// for an image, we only update if the modified field has been set,
// for example, by a call to p5.Image.set
if (data.isModified()) {
cov_qfkuvw4wj.b[17][0]++;
cov_qfkuvw4wj.s[61]++;
updated = true;
cov_qfkuvw4wj.s[62]++;
data.setModified(false);
} else {
cov_qfkuvw4wj.b[17][1]++;
}
} else {
cov_qfkuvw4wj.b[16][1]++;
cov_qfkuvw4wj.s[63]++;
if (this.isSrcMediaElement) {
cov_qfkuvw4wj.b[18][0]++;
cov_qfkuvw4wj.s[64]++;
// for a media element (video), we'll check if the current time in
// the video frame matches the last time. if it doesn't match, the
// video has advanced or otherwise been taken to a new frame,
// and we need to upload it.
if (data.isModified()) {
cov_qfkuvw4wj.b[19][0]++;
cov_qfkuvw4wj.s[65]++;
// p5.MediaElement may have also had set/updatePixels, etc. called
// on it and should be updated, or may have been set for the first
// time!
updated = true;
cov_qfkuvw4wj.s[66]++;
data.setModified(false);
} else {
cov_qfkuvw4wj.b[19][1]++;
cov_qfkuvw4wj.s[67]++;
if (data.loadedmetadata) {
cov_qfkuvw4wj.b[20][0]++;
cov_qfkuvw4wj.s[68]++;
// if the meta data has been loaded, we can ask the video
// what it's current position (in time) is.
if (this._videoPrevUpdateTime !== data.time()) {
cov_qfkuvw4wj.b[21][0]++;
cov_qfkuvw4wj.s[69]++;
// update the texture in gpu mem only if the current
// video timestamp does not match the timestamp of the last
// time we uploaded this texture (and update the time we
// last uploaded, too)
this._videoPrevUpdateTime = data.time();
cov_qfkuvw4wj.s[70]++;
updated = true;
} else {
cov_qfkuvw4wj.b[21][1]++;
}
} else {
cov_qfkuvw4wj.b[20][1]++;
}
}
} else {
cov_qfkuvw4wj.b[18][1]++;
cov_qfkuvw4wj.s[71]++;
if (this.isImageData) {
cov_qfkuvw4wj.b[22][0]++;
cov_qfkuvw4wj.s[72]++;
if (data._dirty) {
cov_qfkuvw4wj.b[23][0]++;
cov_qfkuvw4wj.s[73]++;
data._dirty = false;
cov_qfkuvw4wj.s[74]++;
updated = true;
} else {
cov_qfkuvw4wj.b[23][1]++;
}
} else {
cov_qfkuvw4wj.b[22][1]++;
cov_qfkuvw4wj.s[75]++;
/* data instanceof p5.Graphics, probably */
// there is not enough information to tell if the texture can be
// conditionally updated; so to be safe, we just go ahead and upload it.
updated = true;
}
}
}
}
cov_qfkuvw4wj.s[76]++;
if (updated) {
cov_qfkuvw4wj.b[24][0]++;
cov_qfkuvw4wj.s[77]++;
this.bindTexture();
cov_qfkuvw4wj.s[78]++;
gl.texImage2D(
this.glTarget,
0,
this.glFormat,
this.glFormat,
gl.UNSIGNED_BYTE,
textureData
);
} else {
cov_qfkuvw4wj.b[24][1]++;
}
cov_qfkuvw4wj.s[79]++;
return updated;
};
/**
* Binds the texture to the appropriate GL target.
* @method bindTexture
*/ cov_qfkuvw4wj.s[80]++;
_main.default.Texture.prototype.bindTexture = function() {
cov_qfkuvw4wj.f[4]++;
// bind texture using gl context + glTarget and
// generated gl texture object
var gl = (cov_qfkuvw4wj.s[81]++, this._renderer.GL);
cov_qfkuvw4wj.s[82]++;
gl.bindTexture(this.glTarget, this.glTex);
cov_qfkuvw4wj.s[83]++;
return this;
};
/**
* Unbinds the texture from the appropriate GL target.
* @method unbindTexture
*/ cov_qfkuvw4wj.s[84]++;
_main.default.Texture.prototype.unbindTexture = function() {
cov_qfkuvw4wj.f[5]++;
// unbind per above, disable texturing on glTarget
var gl = (cov_qfkuvw4wj.s[85]++, this._renderer.GL);
cov_qfkuvw4wj.s[86]++;
gl.bindTexture(this.glTarget, null);
};
/**
* Sets how a texture is be interpolated when upscaled or downscaled.
* Nearest filtering uses nearest neighbor scaling when interpolating
* Linear filtering uses WebGL's linear scaling when interpolating
* @method setInterpolation
* @param {String} downScale Specifies the texture filtering when
* textures are shrunk. Options are LINEAR or NEAREST
* @param {String} upScale Specifies the texture filtering when
* textures are magnified. Options are LINEAR or NEAREST
* @todo implement mipmapping filters
*/ cov_qfkuvw4wj.s[87]++;
_main.default.Texture.prototype.setInterpolation = function(downScale, upScale) {
cov_qfkuvw4wj.f[6]++;
var gl = (cov_qfkuvw4wj.s[88]++, this._renderer.GL);
cov_qfkuvw4wj.s[89]++;
if (downScale === constants.NEAREST) {
cov_qfkuvw4wj.b[25][0]++;
cov_qfkuvw4wj.s[90]++;
this.glMinFilter = gl.NEAREST;
} else {
cov_qfkuvw4wj.b[25][1]++;
cov_qfkuvw4wj.s[91]++;
this.glMinFilter = gl.LINEAR;
}
cov_qfkuvw4wj.s[92]++;
if (upScale === constants.NEAREST) {
cov_qfkuvw4wj.b[26][0]++;
cov_qfkuvw4wj.s[93]++;
this.glMagFilter = gl.NEAREST;
} else {
cov_qfkuvw4wj.b[26][1]++;
cov_qfkuvw4wj.s[94]++;
this.glMagFilter = gl.LINEAR;
}
cov_qfkuvw4wj.s[95]++;
this.bindTexture();
cov_qfkuvw4wj.s[96]++;
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, this.glMinFilter);
cov_qfkuvw4wj.s[97]++;
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, this.glMagFilter);
cov_qfkuvw4wj.s[98]++;
this.unbindTexture();
};
/**
* Sets the texture wrapping mode. This controls how textures behave
* when their uv's go outside of the 0 - 1 range. There are three options:
* CLAMP, REPEAT, and MIRROR. REPEAT & MIRROR are only available if the texture
* is a power of two size (128, 256, 512, 1024, etc.).
* @method setWrapMode
* @param {String} wrapX Controls the horizontal texture wrapping behavior
* @param {String} wrapY Controls the vertical texture wrapping behavior
*/ cov_qfkuvw4wj.s[99]++;
_main.default.Texture.prototype.setWrapMode = function(wrapX, wrapY) {
cov_qfkuvw4wj.f[7]++;
var gl = (cov_qfkuvw4wj.s[100]++, this._renderer.GL);
// for webgl 1 we need to check if the texture is power of two
// if it isn't we will set the wrap mode to CLAMP
// webgl2 will support npot REPEAT and MIRROR but we don't check for it yet
cov_qfkuvw4wj.s[101]++;
var isPowerOfTwo = function isPowerOfTwo(x) {
cov_qfkuvw4wj.f[8]++;
cov_qfkuvw4wj.s[102]++;
return (x & (x - 1)) === 0;
};
var widthPowerOfTwo = (cov_qfkuvw4wj.s[103]++, isPowerOfTwo(this.width));
var heightPowerOfTwo = (cov_qfkuvw4wj.s[104]++, isPowerOfTwo(this.height));
cov_qfkuvw4wj.s[105]++;
if (wrapX === constants.REPEAT) {
cov_qfkuvw4wj.b[27][0]++;
cov_qfkuvw4wj.s[106]++;
if (
(cov_qfkuvw4wj.b[29][0]++, widthPowerOfTwo) &&
(cov_qfkuvw4wj.b[29][1]++, heightPowerOfTwo)
) {
cov_qfkuvw4wj.b[28][0]++;
cov_qfkuvw4wj.s[107]++;
this.glWrapS = gl.REPEAT;
} else {
cov_qfkuvw4wj.b[28][1]++;
cov_qfkuvw4wj.s[108]++;
console.warn(
'You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead'
);
cov_qfkuvw4wj.s[109]++;
this.glWrapS = gl.CLAMP_TO_EDGE;
}
} else {
cov_qfkuvw4wj.b[27][1]++;
cov_qfkuvw4wj.s[110]++;
if (wrapX === constants.MIRROR) {
cov_qfkuvw4wj.b[30][0]++;
cov_qfkuvw4wj.s[111]++;
if (
(cov_qfkuvw4wj.b[32][0]++, widthPowerOfTwo) &&
(cov_qfkuvw4wj.b[32][1]++, heightPowerOfTwo)
) {
cov_qfkuvw4wj.b[31][0]++;
cov_qfkuvw4wj.s[112]++;
this.glWrapS = gl.MIRRORED_REPEAT;
} else {
cov_qfkuvw4wj.b[31][1]++;
cov_qfkuvw4wj.s[113]++;
console.warn(
'You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead'
);
cov_qfkuvw4wj.s[114]++;
this.glWrapS = gl.CLAMP_TO_EDGE;
}
} else {
cov_qfkuvw4wj.b[30][1]++;
cov_qfkuvw4wj.s[115]++;
// falling back to default if didn't get a proper mode
this.glWrapS = gl.CLAMP_TO_EDGE;
}
}
cov_qfkuvw4wj.s[116]++;
if (wrapY === constants.REPEAT) {
cov_qfkuvw4wj.b[33][0]++;
cov_qfkuvw4wj.s[117]++;
if (
(cov_qfkuvw4wj.b[35][0]++, widthPowerOfTwo) &&
(cov_qfkuvw4wj.b[35][1]++, heightPowerOfTwo)
) {
cov_qfkuvw4wj.b[34][0]++;
cov_qfkuvw4wj.s[118]++;
this.glWrapT = gl.REPEAT;
} else {
cov_qfkuvw4wj.b[34][1]++;
cov_qfkuvw4wj.s[119]++;
console.warn(
'You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead'
);
cov_qfkuvw4wj.s[120]++;
this.glWrapT = gl.CLAMP_TO_EDGE;
}
} else {
cov_qfkuvw4wj.b[33][1]++;
cov_qfkuvw4wj.s[121]++;
if (wrapY === constants.MIRROR) {
cov_qfkuvw4wj.b[36][0]++;
cov_qfkuvw4wj.s[122]++;
if (
(cov_qfkuvw4wj.b[38][0]++, widthPowerOfTwo) &&
(cov_qfkuvw4wj.b[38][1]++, heightPowerOfTwo)
) {
cov_qfkuvw4wj.b[37][0]++;
cov_qfkuvw4wj.s[123]++;
this.glWrapT = gl.MIRRORED_REPEAT;
} else {
cov_qfkuvw4wj.b[37][1]++;
cov_qfkuvw4wj.s[124]++;
console.warn(
'You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead'
);
cov_qfkuvw4wj.s[125]++;
this.glWrapT = gl.CLAMP_TO_EDGE;
}
} else {
cov_qfkuvw4wj.b[36][1]++;
cov_qfkuvw4wj.s[126]++;
// falling back to default if didn't get a proper mode
this.glWrapT = gl.CLAMP_TO_EDGE;
}
}
cov_qfkuvw4wj.s[127]++;
this.bindTexture();
cov_qfkuvw4wj.s[128]++;
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, this.glWrapS);
cov_qfkuvw4wj.s[129]++;
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, this.glWrapT);
cov_qfkuvw4wj.s[130]++;
this.unbindTexture();
};
var _default = _main.default.Texture;
exports.default = _default;
},
{ '../core/constants': 43, '../core/main': 54 }
],
111: [
function(_dereq_, module, exports) {
'use strict';
function _typeof(obj) {
if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj &&
typeof Symbol === 'function' &&
obj.constructor === Symbol &&
obj !== Symbol.prototype
? 'symbol'
: typeof obj;
};
}
return _typeof(obj);
}
var cov_hc5p7sa2z = (function() {
var path = '/Users/lmccart/Documents/p5/p5.js/src/webgl/text.js';
var hash = '6609005f87027e94c15b82e237b26b589f621171';
var global = new Function('return this')();
var gcv = '__coverage__';
var coverageData = {
path: '/Users/lmccart/Documents/p5/p5.js/src/webgl/text.js',
statementMap: {
'0': { start: { line: 8, column: 0 }, end: { line: 11, column: 2 } },
'1': { start: { line: 13, column: 0 }, end: { line: 19, column: 2 } },
'2': { start: { line: 14, column: 2 }, end: { line: 16, column: 3 } },
'3': { start: { line: 15, column: 4 }, end: { line: 15, column: 56 } },
'4': { start: { line: 18, column: 2 }, end: { line: 18, column: 11 } },
'5': { start: { line: 24, column: 22 }, end: { line: 24, column: 23 } },
'6': { start: { line: 25, column: 23 }, end: { line: 25, column: 36 } },
'7': { start: { line: 28, column: 25 }, end: { line: 28, column: 27 } },
'8': { start: { line: 29, column: 26 }, end: { line: 29, column: 28 } },
'9': { start: { line: 32, column: 23 }, end: { line: 32, column: 25 } },
'10': { start: { line: 33, column: 24 }, end: { line: 33, column: 26 } },
'11': { start: { line: 36, column: 23 }, end: { line: 36, column: 25 } },
'12': { start: { line: 37, column: 24 }, end: { line: 37, column: 26 } },
'13': { start: { line: 48, column: 2 }, end: { line: 48, column: 21 } },
'14': { start: { line: 49, column: 2 }, end: { line: 49, column: 23 } },
'15': { start: { line: 50, column: 2 }, end: { line: 50, column: 18 } },
'16': { start: { line: 61, column: 2 }, end: { line: 112, column: 4 } },
'17': { start: { line: 62, column: 22 }, end: { line: 62, column: 46 } },
'18': { start: { line: 63, column: 4 }, end: { line: 64, column: 61 } },
'19': { start: { line: 64, column: 6 }, end: { line: 64, column: 61 } },
'20': { start: { line: 69, column: 4 }, end: { line: 77, column: 5 } },
'21': { start: { line: 69, column: 18 }, end: { line: 69, column: 39 } },
'22': { start: { line: 70, column: 28 }, end: { line: 70, column: 42 } },
'23': { start: { line: 71, column: 6 }, end: { line: 76, column: 7 } },
'24': { start: { line: 73, column: 8 }, end: { line: 73, column: 34 } },
'25': { start: { line: 74, column: 8 }, end: { line: 74, column: 44 } },
'26': { start: { line: 75, column: 8 }, end: { line: 75, column: 14 } },
'27': { start: { line: 79, column: 4 }, end: { line: 106, column: 5 } },
'28': { start: { line: 80, column: 6 }, end: { line: 102, column: 7 } },
'29': { start: { line: 82, column: 8 }, end: { line: 82, column: 59 } },
'30': { start: { line: 86, column: 21 }, end: { line: 86, column: 63 } },
'31': { start: { line: 87, column: 24 }, end: { line: 87, column: 31 } },
'32': { start: { line: 88, column: 8 }, end: { line: 93, column: 9 } },
'33': { start: { line: 90, column: 10 }, end: { line: 90, column: 52 } },
'34': { start: { line: 91, column: 10 }, end: { line: 91, column: 40 } },
'35': { start: { line: 92, column: 10 }, end: { line: 92, column: 44 } },
'36': { start: { line: 94, column: 20 }, end: { line: 94, column: 43 } },
'37': { start: { line: 95, column: 8 }, end: { line: 97, column: 9 } },
'38': { start: { line: 96, column: 10 }, end: { line: 96, column: 67 } },
'39': { start: { line: 98, column: 8 }, end: { line: 101, column: 9 } },
'40': { start: { line: 100, column: 10 }, end: { line: 100, column: 44 } },
'41': { start: { line: 104, column: 6 }, end: { line: 104, column: 42 } },
'42': { start: { line: 105, column: 6 }, end: { line: 105, column: 33 } },
'43': { start: { line: 108, column: 18 }, end: { line: 108, column: 33 } },
'44': { start: { line: 109, column: 4 }, end: { line: 109, column: 29 } },
'45': { start: { line: 110, column: 4 }, end: { line: 110, column: 28 } },
'46': { start: { line: 111, column: 4 }, end: { line: 111, column: 32 } },
'47': { start: { line: 126, column: 20 }, end: { line: 126, column: 39 } },
'48': { start: { line: 127, column: 17 }, end: { line: 127, column: 31 } },
'49': { start: { line: 128, column: 14 }, end: { line: 128, column: 35 } },
'50': { start: { line: 129, column: 2 }, end: { line: 129, column: 22 } },
'51': { start: { line: 130, column: 2 }, end: { line: 130, column: 22 } },
'52': { start: { line: 131, column: 2 }, end: { line: 131, column: 22 } },
'53': { start: { line: 132, column: 2 }, end: { line: 132, column: 22 } },
'54': { start: { line: 135, column: 14 }, end: { line: 135, column: 26 } },
'55': { start: { line: 144, column: 17 }, end: { line: 622, column: 1 } },
'56': { start: { line: 145, column: 2 }, end: { line: 145, column: 19 } },
'57': { start: { line: 147, column: 2 }, end: { line: 147, column: 78 } },
'58': { start: { line: 149, column: 2 }, end: { line: 149, column: 74 } },
'59': { start: { line: 150, column: 2 }, end: { line: 150, column: 74 } },
'60': { start: { line: 152, column: 2 }, end: { line: 152, column: 75 } },
'61': { start: { line: 153, column: 2 }, end: { line: 153, column: 75 } },
'62': { start: { line: 156, column: 2 }, end: { line: 156, column: 23 } },
'63': { start: { line: 167, column: 2 }, end: { line: 621, column: 4 } },
'64': { start: { line: 169, column: 13 }, end: { line: 169, column: 41 } },
'65': { start: { line: 170, column: 4 }, end: { line: 170, column: 22 } },
'66': { start: { line: 170, column: 12 }, end: { line: 170, column: 22 } },
'67': { start: { line: 173, column: 15 }, end: { line: 173, column: 37 } },
'68': { start: { line: 174, column: 17 }, end: { line: 174, column: 22 } },
'69': { start: { line: 175, column: 17 }, end: { line: 175, column: 22 } },
'70': { start: { line: 176, column: 19 }, end: { line: 176, column: 31 } },
'71': { start: { line: 177, column: 20 }, end: { line: 177, column: 32 } },
'72': { start: { line: 178, column: 17 }, end: { line: 178, column: 36 } },
'73': { start: { line: 180, column: 4 }, end: { line: 182, column: 5 } },
'74': { start: { line: 181, column: 6 }, end: { line: 181, column: 49 } },
'75': { start: { line: 185, column: 20 }, end: { line: 185, column: 22 } },
'76': { start: { line: 186, column: 17 }, end: { line: 186, column: 19 } },
'77': { start: { line: 187, column: 17 }, end: { line: 187, column: 19 } },
'78': { start: { line: 188, column: 4 }, end: { line: 188, column: 59 } },
'79': { start: { line: 188, column: 45 }, end: { line: 188, column: 59 } },
'80': { start: { line: 189, column: 4 }, end: { line: 189, column: 60 } },
'81': { start: { line: 189, column: 46 }, end: { line: 189, column: 60 } },
'82': { start: { line: 200, column: 20 }, end: { line: 200, column: 34 } },
'83': { start: { line: 201, column: 6 }, end: { line: 201, column: 22 } },
'84': { start: { line: 212, column: 8 }, end: { line: 216, column: 9 } },
'85': { start: { line: 212, column: 21 }, end: { line: 212, column: 30 } },
'86': { start: { line: 213, column: 20 }, end: { line: 213, column: 25 } },
'87': { start: { line: 214, column: 10 }, end: { line: 214, column: 31 } },
'88': { start: { line: 214, column: 23 }, end: { line: 214, column: 31 } },
'89': { start: { line: 215, column: 10 }, end: { line: 215, column: 31 } },
'90': { start: { line: 215, column: 23 }, end: { line: 215, column: 31 } },
'91': { start: { line: 217, column: 8 }, end: { line: 217, column: 28 } },
'92': { start: { line: 222, column: 18 }, end: { line: 222, column: 34 } },
'93': { start: { line: 223, column: 20 }, end: { line: 223, column: 68 } },
'94': { start: { line: 224, column: 20 }, end: { line: 224, column: 79 } },
'95': { start: { line: 225, column: 6 }, end: { line: 225, column: 74 } },
'96': { start: { line: 225, column: 22 }, end: { line: 225, column: 27 } },
'97': { start: { line: 225, column: 51 }, end: { line: 225, column: 74 } },
'98': { start: { line: 227, column: 18 }, end: { line: 227, column: 34 } },
'99': { start: { line: 228, column: 20 }, end: { line: 228, column: 69 } },
'100': { start: { line: 229, column: 20 }, end: { line: 232, column: 7 } },
'101': { start: { line: 233, column: 6 }, end: { line: 233, column: 74 } },
'102': { start: { line: 233, column: 22 }, end: { line: 233, column: 27 } },
'103': { start: { line: 233, column: 51 }, end: { line: 233, column: 74 } },
'104': { start: { line: 245, column: 6 }, end: { line: 245, column: 30 } },
'105': { start: { line: 245, column: 19 }, end: { line: 245, column: 30 } },
'106': { start: { line: 246, column: 6 }, end: { line: 246, column: 30 } },
'107': { start: { line: 246, column: 19 }, end: { line: 246, column: 30 } },
'108': { start: { line: 247, column: 6 }, end: { line: 247, column: 15 } },
'109': { start: { line: 257, column: 6 }, end: { line: 257, column: 36 } },
'110': { start: { line: 271, column: 6 }, end: { line: 271, column: 19 } },
'111': { start: { line: 272, column: 6 }, end: { line: 272, column: 19 } },
'112': { start: { line: 273, column: 6 }, end: { line: 273, column: 19 } },
'113': { start: { line: 274, column: 6 }, end: { line: 274, column: 19 } },
'114': { start: { line: 283, column: 6 }, end: { line: 292, column: 8 } },
'115': { start: { line: 284, column: 8 }, end: { line: 291, column: 10 } },
'116': { start: { line: 301, column: 6 }, end: { line: 308, column: 8 } },
'117': { start: { line: 302, column: 8 }, end: { line: 307, column: 10 } },
'118': { start: { line: 319, column: 6 }, end: { line: 330, column: 8 } },
'119': { start: { line: 320, column: 19 }, end: { line: 320, column: 54 } },
'120': { start: { line: 321, column: 19 }, end: { line: 321, column: 54 } },
'121': { start: { line: 322, column: 20 }, end: { line: 322, column: 45 } },
'122': { start: { line: 324, column: 8 }, end: { line: 324, column: 54 } },
'123': { start: { line: 325, column: 8 }, end: { line: 325, column: 49 } },
'124': { start: { line: 326, column: 19 }, end: { line: 326, column: 50 } },
'125': { start: { line: 327, column: 22 }, end: { line: 327, column: 53 } },
'126': { start: { line: 328, column: 8 }, end: { line: 328, column: 21 } },
'127': { start: { line: 329, column: 8 }, end: { line: 329, column: 21 } },
'128': { start: { line: 340, column: 6 }, end: { line: 385, column: 8 } },
'129': { start: { line: 341, column: 18 }, end: { line: 341, column: 49 } },
'130': { start: { line: 342, column: 18 }, end: { line: 342, column: 67 } },
'131': { start: { line: 343, column: 18 }, end: { line: 346, column: 9 } },
'132': { start: { line: 348, column: 23 }, end: { line: 348, column: 25 } },
'133': { start: { line: 351, column: 16 }, end: { line: 351, column: 37 } },
'134': { start: { line: 352, column: 8 }, end: { line: 381, column: 9 } },
'135': { start: { line: 353, column: 18 }, end: { line: 353, column: 39 } },
'136': { start: { line: 354, column: 18 }, end: { line: 354, column: 39 } },
'137': { start: { line: 355, column: 23 }, end: { line: 355, column: 40 } },
'138': { start: { line: 356, column: 10 }, end: { line: 380, column: 11 } },
'139': { start: { line: 357, column: 12 }, end: { line: 361, column: 13 } },
'140': { start: { line: 358, column: 14 }, end: { line: 358, column: 21 } },
'141': { start: { line: 359, column: 14 }, end: { line: 359, column: 21 } },
'142': { start: { line: 360, column: 14 }, end: { line: 360, column: 21 } },
'143': { start: { line: 363, column: 22 }, end: { line: 363, column: 37 } },
'144': { start: { line: 364, column: 23 }, end: { line: 364, column: 41 } },
'145': { start: { line: 365, column: 21 }, end: { line: 365, column: 39 } },
'146': { start: { line: 368, column: 12 }, end: { line: 373, column: 13 } },
'147': { start: { line: 370, column: 14 }, end: { line: 370, column: 42 } },
'148': { start: { line: 372, column: 14 }, end: { line: 372, column: 43 } },
'149': { start: { line: 376, column: 12 }, end: { line: 379, column: 13 } },
'150': { start: { line: 378, column: 14 }, end: { line: 378, column: 42 } },
'151': { start: { line: 383, column: 8 }, end: { line: 383, column: 26 } },
'152': { start: { line: 384, column: 8 }, end: { line: 384, column: 22 } },
'153': { start: { line: 405, column: 21 }, end: { line: 410, column: 26 } },
'154': { start: { line: 412, column: 17 }, end: { line: 412, column: 19 } },
'155': { start: { line: 413, column: 24 }, end: { line: 413, column: 34 } },
'156': { start: { line: 416, column: 6 }, end: { line: 451, column: 7 } },
'157': { start: { line: 421, column: 21 }, end: { line: 421, column: 23 } },
'158': { start: { line: 424, column: 8 }, end: { line: 440, column: 9 } },
'159': { start: { line: 426, column: 10 }, end: { line: 426, column: 45 } },
'160': { start: { line: 427, column: 10 }, end: { line: 429, column: 11 } },
'161': { start: { line: 428, column: 12 }, end: { line: 428, column: 18 } },
'162': { start: { line: 432, column: 20 }, end: { line: 432, column: 43 } },
'163': { start: { line: 434, column: 24 }, end: { line: 434, column: 38 } },
'164': { start: { line: 435, column: 25 }, end: { line: 435, column: 53 } },
'165': { start: { line: 437, column: 10 }, end: { line: 437, column: 25 } },
'166': { start: { line: 438, column: 10 }, end: { line: 438, column: 27 } },
'167': { start: { line: 439, column: 10 }, end: { line: 439, column: 25 } },
'168': { start: { line: 442, column: 8 }, end: { line: 445, column: 9 } },
'169': { start: { line: 444, column: 10 }, end: { line: 444, column: 36 } },
'170': { start: { line: 447, column: 8 }, end: { line: 447, column: 23 } },
'171': { start: { line: 450, column: 8 }, end: { line: 450, column: 55 } },
'172': { start: { line: 453, column: 6 }, end: { line: 453, column: 16 } },
'173': { start: { line: 466, column: 17 }, end: { line: 466, column: 30 } },
'174': { start: { line: 467, column: 17 }, end: { line: 467, column: 30 } },
'175': { start: { line: 468, column: 6 }, end: { line: 468, column: 65 } },
'176': { start: { line: 482, column: 6 }, end: { line: 482, column: 72 } },
'177': { start: { line: 487, column: 4 }, end: { line: 543, column: 5 } },
'178': { start: { line: 489, column: 17 }, end: { line: 489, column: 40 } },
'179': { start: { line: 490, column: 17 }, end: { line: 490, column: 41 } },
'180': { start: { line: 493, column: 6 }, end: { line: 493, column: 46 } },
'181': { start: { line: 493, column: 37 }, end: { line: 493, column: 46 } },
'182': { start: { line: 495, column: 6 }, end: { line: 540, column: 7 } },
'183': { start: { line: 498, column: 10 }, end: { line: 498, column: 18 } },
'184': { start: { line: 499, column: 10 }, end: { line: 499, column: 18 } },
'185': { start: { line: 500, column: 10 }, end: { line: 500, column: 16 } },
'186': { start: { line: 504, column: 10 }, end: { line: 504, column: 35 } },
'187': { start: { line: 505, column: 10 }, end: { line: 505, column: 16 } },
'188': { start: { line: 509, column: 21 }, end: { line: 509, column: 45 } },
'189': { start: { line: 510, column: 21 }, end: { line: 510, column: 46 } },
'190': { start: { line: 511, column: 10 }, end: { line: 511, column: 69 } },
'191': { start: { line: 512, column: 10 }, end: { line: 512, column: 16 } },
'192': { start: { line: 516, column: 10 }, end: { line: 522, column: 11 } },
'193': { start: { line: 518, column: 12 }, end: { line: 518, column: 37 } },
'194': { start: { line: 519, column: 12 }, end: { line: 519, column: 43 } },
'195': { start: { line: 521, column: 12 }, end: { line: 521, column: 43 } },
'196': { start: { line: 523, column: 10 }, end: { line: 523, column: 16 } },
'197': { start: { line: 527, column: 22 }, end: { line: 527, column: 46 } },
'198': { start: { line: 528, column: 22 }, end: { line: 528, column: 47 } },
'199': { start: { line: 529, column: 22 }, end: { line: 529, column: 46 } },
'200': { start: { line: 530, column: 22 }, end: { line: 530, column: 47 } },
'201': { start: { line: 531, column: 21 }, end: { line: 531, column: 74 } },
'202': { start: { line: 532, column: 10 }, end: { line: 535, column: 11 } },
'203': { start: { line: 532, column: 24 }, end: { line: 532, column: 25 } },
'204': { start: { line: 533, column: 22 }, end: { line: 533, column: 42 } },
'205': { start: { line: 534, column: 12 }, end: { line: 534, column: 58 } },
'206': { start: { line: 536, column: 10 }, end: { line: 536, column: 16 } },
'207': { start: { line: 539, column: 10 }, end: { line: 539, column: 63 } },
'208': { start: { line: 541, column: 6 }, end: { line: 541, column: 14 } },
'209': { start: { line: 542, column: 6 }, end: { line: 542, column: 14 } },
'210': { start: { line: 546, column: 24 }, end: { line: 546, column: 38 } },
'211': { start: { line: 547, column: 28 }, end: { line: 547, column: 72 } },
'212': { start: { line: 548, column: 25 }, end: { line: 548, column: 46 } },
'213': { start: { line: 551, column: 4 }, end: { line: 554, column: 5 } },
'214': { start: { line: 551, column: 18 }, end: { line: 551, column: 19 } },
'215': { start: { line: 552, column: 16 }, end: { line: 552, column: 27 } },
'216': { start: { line: 553, column: 6 }, end: { line: 553, column: 78 } },
'217': { start: { line: 568, column: 24 }, end: { line: 568, column: 34 } },
'218': { start: { line: 569, column: 27 }, end: { line: 569, column: 61 } },
'219': { start: { line: 570, column: 24 }, end: { line: 570, column: 42 } },
'220': { start: { line: 572, column: 25 }, end: { line: 572, column: 26 } },
'221': { start: { line: 573, column: 6 }, end: { line: 575, column: 7 } },
'222': { start: { line: 573, column: 20 }, end: { line: 573, column: 21 } },
'223': { start: { line: 574, column: 8 }, end: { line: 574, column: 39 } },
'224': { start: { line: 578, column: 28 }, end: { line: 578, column: 66 } },
'225': { start: { line: 581, column: 6 }, end: { line: 601, column: 7 } },
'226': { start: { line: 581, column: 19 }, end: { line: 581, column: 20 } },
'227': { start: { line: 582, column: 30 }, end: { line: 582, column: 36 } },
'228': { start: { line: 583, column: 28 }, end: { line: 583, column: 48 } },
'229': { start: { line: 584, column: 30 }, end: { line: 584, column: 49 } },
'230': { start: { line: 587, column: 8 }, end: { line: 593, column: 10 } },
'231': { start: { line: 596, column: 8 }, end: { line: 600, column: 9 } },
'232': { start: { line: 596, column: 23 }, end: { line: 596, column: 24 } },
'233': { start: { line: 598, column: 30 }, end: { line: 598, column: 63 } },
'234': { start: { line: 599, column: 10 }, end: { line: 599, column: 78 } },
'235': { start: { line: 603, column: 6 }, end: { line: 607, column: 8 } },
'236': { start: { line: 611, column: 4 }, end: { line: 618, column: 6 } },
'237': { start: { line: 619, column: 4 }, end: { line: 619, column: 66 } },
'238': { start: { line: 620, column: 4 }, end: { line: 620, column: 14 } },
'239': { start: { line: 624, column: 0 }, end: { line: 747, column: 2 } },
'240': { start: { line: 625, column: 2 }, end: { line: 630, column: 3 } },
'241': { start: { line: 626, column: 4 }, end: { line: 628, column: 6 } },
'242': { start: { line: 629, column: 4 }, end: { line: 629, column: 11 } },
'243': { start: { line: 631, column: 2 }, end: { line: 633, column: 3 } },
'244': { start: { line: 632, column: 4 }, end: { line: 632, column: 11 } },
'245': { start: { line: 635, column: 2 }, end: { line: 640, column: 3 } },
'246': { start: { line: 636, column: 4 }, end: { line: 638, column: 6 } },
'247': { start: { line: 639, column: 4 }, end: { line: 639, column: 13 } },
'248': { start: { line: 642, column: 2 }, end: { line: 642, column: 11 } },
'249': { start: { line: 645, column: 19 }, end: { line: 645, column: 33 } },
'250': { start: { line: 646, column: 19 }, end: { line: 646, column: 32 } },
'251': { start: { line: 648, column: 2 }, end: { line: 648, column: 25 } },
'252': { start: { line: 649, column: 2 }, end: { line: 649, column: 36 } },
'253': { start: { line: 652, column: 15 }, end: { line: 652, column: 34 } },
'254': { start: { line: 653, column: 17 }, end: { line: 653, column: 41 } },
'255': { start: { line: 654, column: 2 }, end: { line: 656, column: 3 } },
'256': { start: { line: 655, column: 4 }, end: { line: 655, column: 61 } },
'257': { start: { line: 659, column: 14 }, end: { line: 659, column: 63 } },
'258': { start: { line: 660, column: 19 }, end: { line: 660, column: 33 } },
'259': { start: { line: 661, column: 16 }, end: { line: 661, column: 42 } },
'260': { start: { line: 662, column: 2 }, end: { line: 662, column: 34 } },
'261': { start: { line: 663, column: 2 }, end: { line: 663, column: 30 } },
'262': { start: { line: 666, column: 13 }, end: { line: 666, column: 20 } },
'263': { start: { line: 667, column: 27 }, end: { line: 667, column: 51 } },
'264': { start: { line: 668, column: 13 }, end: { line: 668, column: 34 } },
'265': { start: { line: 669, column: 2 }, end: { line: 669, column: 12 } },
'266': { start: { line: 670, column: 2 }, end: { line: 670, column: 18 } },
'267': { start: { line: 672, column: 2 }, end: { line: 678, column: 3 } },
'268': { start: { line: 674, column: 4 }, end: { line: 674, column: 71 } },
'269': { start: { line: 675, column: 4 }, end: { line: 675, column: 72 } },
'270': { start: { line: 676, column: 4 }, end: { line: 676, column: 77 } },
'271': { start: { line: 677, column: 4 }, end: { line: 677, column: 64 } },
'272': { start: { line: 679, column: 2 }, end: { line: 679, column: 43 } },
'273': { start: { line: 681, column: 10 }, end: { line: 681, column: 45 } },
'274': { start: { line: 682, column: 2 }, end: { line: 694, column: 3 } },
'275': { start: { line: 684, column: 18 }, end: { line: 691, column: 6 } },
'276': { start: { line: 685, column: 6 }, end: { line: 690, column: 7 } },
'277': { start: { line: 685, column: 19 }, end: { line: 685, column: 20 } },
'278': { start: { line: 686, column: 8 }, end: { line: 689, column: 9 } },
'279': { start: { line: 686, column: 21 }, end: { line: 686, column: 22 } },
'280': { start: { line: 687, column: 10 }, end: { line: 687, column: 53 } },
'281': { start: { line: 688, column: 10 }, end: { line: 688, column: 30 } },
'282': { start: { line: 692, column: 4 }, end: { line: 692, column: 41 } },
'283': { start: { line: 693, column: 4 }, end: { line: 693, column: 42 } },
'284': { start: { line: 697, column: 2 }, end: { line: 699, column: 3 } },
'285': { start: { line: 698, column: 4 }, end: { line: 698, column: 31 } },
'286': { start: { line: 700, column: 2 }, end: { line: 700, column: 59 } },
'287': { start: { line: 703, column: 2 }, end: { line: 703, column: 53 } },
'288': { start: { line: 705, column: 2 }, end: { line: 744, column: 3 } },
'289': { start: { line: 706, column: 13 }, end: { line: 706, column: 14 } },
'290': { start: { line: 707, column: 20 }, end: { line: 707, column: 24 } },
'291': { start: { line: 709, column: 19 }, end: { line: 709, column: 44 } },
'292': { start: { line: 711, column: 4 }, end: { line: 735, column: 5 } },
'293': { start: { line: 713, column: 6 }, end: { line: 713, column: 66 } },
'294': { start: { line: 713, column: 21 }, end: { line: 713, column: 66 } },
'295': { start: { line: 715, column: 17 }, end: { line: 715, column: 45 } },
'296': { start: { line: 716, column: 6 }, end: { line: 732, column: 7 } },
'297': { start: { line: 717, column: 24 }, end: { line: 717, column: 34 } },
'298': { start: { line: 718, column: 24 }, end: { line: 718, column: 34 } },
'299': { start: { line: 719, column: 8 }, end: { line: 719, column: 71 } },
'300': { start: { line: 720, column: 8 }, end: { line: 720, column: 77 } },
'301': { start: { line: 721, column: 8 }, end: { line: 721, column: 70 } },
'302': { start: { line: 722, column: 8 }, end: { line: 722, column: 77 } },
'303': { start: { line: 723, column: 8 }, end: { line: 723, column: 70 } },
'304': { start: { line: 724, column: 8 }, end: { line: 724, column: 53 } },
'305': { start: { line: 725, column: 8 }, end: { line: 725, column: 51 } },
'306': { start: { line: 726, column: 8 }, end: { line: 726, column: 42 } },
'307': { start: { line: 728, column: 8 }, end: { line: 728, column: 26 } },
'308': { start: { line: 731, column: 8 }, end: { line: 731, column: 68 } },
'309': { start: { line: 733, column: 6 }, end: { line: 733, column: 31 } },
'310': { start: { line: 734, column: 6 }, end: { line: 734, column: 24 } },
'311': { start: { line: 738, column: 4 }, end: { line: 738, column: 22 } },
'312': { start: { line: 740, column: 4 }, end: { line: 740, column: 30 } },
'313': { start: { line: 741, column: 4 }, end: { line: 741, column: 29 } },
'314': { start: { line: 743, column: 4 }, end: { line: 743, column: 12 } },
'315': { start: { line: 746, column: 2 }, end: { line: 746, column: 11 } }
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: { start: { line: 8, column: 47 }, end: { line: 8, column: 48 } },
loc: { start: { line: 8, column: 58 }, end: { line: 11, column: 1 } },
line: 8
},
'1': {
name: '(anonymous_1)',
decl: { start: { line: 13, column: 36 }, end: { line: 13, column: 37 } },
loc: { start: { line: 13, column: 48 }, end: { line: 19, column: 1 } },
line: 13
},
'2': {
name: 'ImageInfos',
decl: { start: { line: 47, column: 9 }, end: { line: 47, column: 19 } },
loc: { start: { line: 47, column: 35 }, end: { line: 113, column: 1 } },
line: 47
},
'3': {
name: '(anonymous_3)',
decl: { start: { line: 61, column: 19 }, end: { line: 61, column: 20 } },
loc: { start: { line: 61, column: 35 }, end: { line: 112, column: 3 } },
line: 61
},
'4': {
name: 'setPixel',
decl: { start: { line: 125, column: 9 }, end: { line: 125, column: 17 } },
loc: { start: { line: 125, column: 41 }, end: { line: 133, column: 1 } },
line: 125
},
'5': {
name: '(anonymous_5)',
decl: {
start: { line: 144, column: 17 },
end: { line: 144, column: 18 }
},
loc: { start: { line: 144, column: 32 }, end: { line: 622, column: 1 } },
line: 144
},
'6': {
name: '(anonymous_6)',
decl: {
start: { line: 167, column: 22 },
end: { line: 167, column: 23 }
},
loc: { start: { line: 167, column: 38 }, end: { line: 621, column: 3 } },
line: 167
},
'7': {
name: 'push',
decl: {
start: { line: 199, column: 13 },
end: { line: 199, column: 17 }
},
loc: { start: { line: 199, column: 29 }, end: { line: 234, column: 5 } },
line: 199
},
'8': {
name: 'minMax',
decl: {
start: { line: 211, column: 15 },
end: { line: 211, column: 21 }
},
loc: { start: { line: 211, column: 36 }, end: { line: 218, column: 7 } },
line: 211
},
'9': {
name: 'clamp',
decl: {
start: { line: 244, column: 13 },
end: { line: 244, column: 18 }
},
loc: { start: { line: 244, column: 32 }, end: { line: 248, column: 5 } },
line: 244
},
'10': {
name: 'byte',
decl: {
start: { line: 256, column: 13 },
end: { line: 256, column: 17 }
},
loc: { start: { line: 256, column: 21 }, end: { line: 258, column: 5 } },
line: 256
},
'11': {
name: 'Cubic',
decl: {
start: { line: 270, column: 13 },
end: { line: 270, column: 18 }
},
loc: { start: { line: 270, column: 35 }, end: { line: 386, column: 5 } },
line: 270
},
'12': {
name: '(anonymous_12)',
decl: {
start: { line: 283, column: 25 },
end: { line: 283, column: 26 }
},
loc: { start: { line: 283, column: 36 }, end: { line: 292, column: 7 } },
line: 283
},
'13': {
name: '(anonymous_13)',
decl: {
start: { line: 301, column: 23 },
end: { line: 301, column: 24 }
},
loc: { start: { line: 301, column: 34 }, end: { line: 308, column: 7 } },
line: 301
},
'14': {
name: '(anonymous_14)',
decl: {
start: { line: 319, column: 19 },
end: { line: 319, column: 20 }
},
loc: { start: { line: 319, column: 31 }, end: { line: 330, column: 7 } },
line: 319
},
'15': {
name: '(anonymous_15)',
decl: {
start: { line: 340, column: 30 },
end: { line: 340, column: 31 }
},
loc: { start: { line: 340, column: 41 }, end: { line: 385, column: 7 } },
line: 340
},
'16': {
name: 'cubicToQuadratics',
decl: {
start: { line: 403, column: 13 },
end: { line: 403, column: 30 }
},
loc: { start: { line: 403, column: 67 }, end: { line: 454, column: 5 } },
line: 403
},
'17': {
name: 'pushLine',
decl: {
start: { line: 465, column: 13 },
end: { line: 465, column: 21 }
},
loc: { start: { line: 465, column: 38 }, end: { line: 469, column: 5 } },
line: 465
},
'18': {
name: 'samePoint',
decl: {
start: { line: 481, column: 13 },
end: { line: 481, column: 22 }
},
loc: { start: { line: 481, column: 39 }, end: { line: 483, column: 5 } },
line: 481
},
'19': {
name: 'layout',
decl: {
start: { line: 567, column: 13 },
end: { line: 567, column: 19 }
},
loc: { start: { line: 567, column: 56 }, end: { line: 608, column: 5 } },
line: 567
},
'20': {
name: '(anonymous_20)',
decl: {
start: { line: 624, column: 38 },
end: { line: 624, column: 39 }
},
loc: { start: { line: 624, column: 68 }, end: { line: 747, column: 1 } },
line: 624
},
'21': {
name: '(anonymous_21)',
decl: {
start: { line: 684, column: 57 },
end: { line: 684, column: 58 }
},
loc: { start: { line: 684, column: 68 }, end: { line: 691, column: 5 } },
line: 684
}
},
branchMap: {
'0': {
loc: { start: { line: 14, column: 2 }, end: { line: 16, column: 3 } },
type: 'if',
locations: [
{ start: { line: 14, column: 2 }, end: { line: 16, column: 3 } },
{ start: { line: 14, column: 2 }, end: { line: 16, column: 3 } }
],
line: 14
},
'1': {
loc: { start: { line: 63, column: 4 }, end: { line: 64, column: 61 } },
type: 'if',
locations: [
{ start: { line: 63, column: 4 }, end: { line: 64, column: 61 } },
{ start: { line: 63, column: 4 }, end: { line: 64, column: 61 } }
],
line: 63
},
'2': {
loc: { start: { line: 71, column: 6 }, end: { line: 76, column: 7 } },
type: 'if',
locations: [
{ start: { line: 71, column: 6 }, end: { line: 76, column: 7 } },
{ start: { line: 71, column: 6 }, end: { line: 76, column: 7 } }
],
line: 71
},
'3': {
loc: { start: { line: 79, column: 4 }, end: { line: 106, column: 5 } },
type: 'if',
locations: [
{ start: { line: 79, column: 4 }, end: { line: 106, column: 5 } },
{ start: { line: 79, column: 4 }, end: { line: 106, column: 5 } }
],
line: 79
},
'4': {
loc: { start: { line: 88, column: 8 }, end: { line: 93, column: 9 } },
type: 'if',
locations: [
{ start: { line: 88, column: 8 }, end: { line: 93, column: 9 } },
{ start: { line: 88, column: 8 }, end: { line: 93, column: 9 } }
],
line: 88
},
'5': {
loc: { start: { line: 95, column: 8 }, end: { line: 97, column: 9 } },
type: 'if',
locations: [
{ start: { line: 95, column: 8 }, end: { line: 97, column: 9 } },
{ start: { line: 95, column: 8 }, end: { line: 97, column: 9 } }
],
line: 95
},
'6': {
loc: { start: { line: 98, column: 8 }, end: { line: 101, column: 9 } },
type: 'if',
locations: [
{ start: { line: 98, column: 8 }, end: { line: 101, column: 9 } },
{ start: { line: 98, column: 8 }, end: { line: 101, column: 9 } }
],
line: 98
},
'7': {
loc: { start: { line: 170, column: 4 }, end: { line: 170, column: 22 } },
type: 'if',
locations: [
{ start: { line: 170, column: 4 }, end: { line: 170, column: 22 } },
{ start: { line: 170, column: 4 }, end: { line: 170, column: 22 } }
],
line: 170
},
'8': {
loc: { start: { line: 180, column: 4 }, end: { line: 182, column: 5 } },
type: 'if',
locations: [
{ start: { line: 180, column: 4 }, end: { line: 182, column: 5 } },
{ start: { line: 180, column: 4 }, end: { line: 182, column: 5 } }
],
line: 180
},
'9': {
loc: { start: { line: 180, column: 8 }, end: { line: 180, column: 53 } },
type: 'binary-expr',
locations: [
{ start: { line: 180, column: 8 }, end: { line: 180, column: 20 } },
{ start: { line: 180, column: 24 }, end: { line: 180, column: 37 } },
{ start: { line: 180, column: 41 }, end: { line: 180, column: 53 } }
],
line: 180
},
'10': {
loc: { start: { line: 214, column: 10 }, end: { line: 214, column: 31 } },
type: 'if',
locations: [
{ start: { line: 214, column: 10 }, end: { line: 214, column: 31 } },
{ start: { line: 214, column: 10 }, end: { line: 214, column: 31 } }
],
line: 214
},
'11': {
loc: { start: { line: 215, column: 10 }, end: { line: 215, column: 31 } },
type: 'if',
locations: [
{ start: { line: 215, column: 10 }, end: { line: 215, column: 31 } },
{ start: { line: 215, column: 10 }, end: { line: 215, column: 31 } }
],
line: 215
},
'12': {
loc: { start: { line: 245, column: 6 }, end: { line: 245, column: 30 } },
type: 'if',
locations: [
{ start: { line: 245, column: 6 }, end: { line: 245, column: 30 } },
{ start: { line: 245, column: 6 }, end: { line: 245, column: 30 } }
],
line: 245
},
'13': {
loc: { start: { line: 246, column: 6 }, end: { line: 246, column: 30 } },
type: 'if',
locations: [
{ start: { line: 246, column: 6 }, end: { line: 246, column: 30 } },
{ start: { line: 246, column: 6 }, end: { line: 246, column: 30 } }
],
line: 246
},
'14': {
loc: { start: { line: 352, column: 8 }, end: { line: 381, column: 9 } },
type: 'if',
locations: [
{ start: { line: 352, column: 8 }, end: { line: 381, column: 9 } },
{ start: { line: 352, column: 8 }, end: { line: 381, column: 9 } }
],
line: 352
},
'15': {
loc: { start: { line: 356, column: 10 }, end: { line: 380, column: 11 } },
type: 'if',
locations: [
{ start: { line: 356, column: 10 }, end: { line: 380, column: 11 } },
{ start: { line: 356, column: 10 }, end: { line: 380, column: 11 } }
],
line: 356
},
'16': {
loc: { start: { line: 357, column: 12 }, end: { line: 361, column: 13 } },
type: 'if',
locations: [
{ start: { line: 357, column: 12 }, end: { line: 361, column: 13 } },
{ start: { line: 357, column: 12 }, end: { line: 361, column: 13 } }
],
line: 357
},
'17': {
loc: { start: { line: 368, column: 12 }, end: { line: 373, column: 13 } },
type: 'if',
locations: [
{ start: { line: 368, column: 12 }, end: { line: 373, column: 13 } },
{ start: { line: 368, column: 12 }, end: { line: 373, column: 13 } }
],
line: 368
},
'18': {
loc: { start: { line: 368, column: 16 }, end: { line: 368, column: 32 } },
type: 'binary-expr',
locations: [
{ start: { line: 368, column: 16 }, end: { line: 368, column: 22 } },
{ start: { line: 368, column: 26 }, end: { line: 368, column: 32 } }
],
line: 368
},
'19': {
loc: { start: { line: 376, column: 12 }, end: { line: 379, column: 13 } },
type: 'if',
locations: [
{ start: { line: 376, column: 12 }, end: { line: 379, column: 13 } },
{ start: { line: 376, column: 12 }, end: { line: 379, column: 13 } }
],
line: 376
},
'20': {
loc: { start: { line: 376, column: 16 }, end: { line: 376, column: 32 } },
type: 'binary-expr',
locations: [
{ start: { line: 376, column: 16 }, end: { line: 376, column: 22 } },
{ start: { line: 376, column: 26 }, end: { line: 376, column: 32 } }
],
line: 376
},
'21': {
loc: { start: { line: 427, column: 10 }, end: { line: 429, column: 11 } },
type: 'if',
locations: [
{ start: { line: 427, column: 10 }, end: { line: 429, column: 11 } },
{ start: { line: 427, column: 10 }, end: { line: 429, column: 11 } }
],
line: 427
},
'22': {
loc: { start: { line: 442, column: 8 }, end: { line: 445, column: 9 } },
type: 'if',
locations: [
{ start: { line: 442, column: 8 }, end: { line: 445, column: 9 } },
{ start: { line: 442, column: 8 }, end: { line: 445, column: 9 } }
],
line: 442
},
'23': {
loc: { start: { line: 482, column: 13 }, end: { line: 482, column: 71 } },
type: 'binary-expr',
locations: [
{ start: { line: 482, column: 13 }, end: { line: 482, column: 40 } },
{ start: { line: 482, column: 44 }, end: { line: 482, column: 71 } }
],
line: 482
},
'24': {
loc: { start: { line: 493, column: 6 }, end: { line: 493, column: 46 } },
type: 'if',
locations: [
{ start: { line: 493, column: 6 }, end: { line: 493, column: 46 } },
{ start: { line: 493, column: 6 }, end: { line: 493, column: 46 } }
],
line: 493
},
'25': {
loc: { start: { line: 495, column: 6 }, end: { line: 540, column: 7 } },
type: 'switch',
locations: [
{ start: { line: 496, column: 8 }, end: { line: 501, column: 9 } },
{ start: { line: 502, column: 8 }, end: { line: 506, column: 9 } },
{ start: { line: 507, column: 8 }, end: { line: 513, column: 9 } },
{ start: { line: 514, column: 8 }, end: { line: 524, column: 9 } },
{ start: { line: 525, column: 8 }, end: { line: 537, column: 9 } },
{ start: { line: 538, column: 8 }, end: { line: 539, column: 63 } }
],
line: 495
},
'26': {
loc: { start: { line: 516, column: 10 }, end: { line: 522, column: 11 } },
type: 'if',
locations: [
{ start: { line: 516, column: 10 }, end: { line: 522, column: 11 } },
{ start: { line: 516, column: 10 }, end: { line: 522, column: 11 } }
],
line: 516
},
'27': {
loc: { start: { line: 625, column: 2 }, end: { line: 630, column: 3 } },
type: 'if',
locations: [
{ start: { line: 625, column: 2 }, end: { line: 630, column: 3 } },
{ start: { line: 625, column: 2 }, end: { line: 630, column: 3 } }
],
line: 625
},
'28': {
loc: { start: { line: 625, column: 6 }, end: { line: 625, column: 59 } },
type: 'binary-expr',
locations: [
{ start: { line: 625, column: 6 }, end: { line: 625, column: 21 } },
{ start: { line: 625, column: 25 }, end: { line: 625, column: 59 } }
],
line: 625
},
'29': {
loc: { start: { line: 631, column: 2 }, end: { line: 633, column: 3 } },
type: 'if',
locations: [
{ start: { line: 631, column: 2 }, end: { line: 633, column: 3 } },
{ start: { line: 631, column: 2 }, end: { line: 633, column: 3 } }
],
line: 631
},
'30': {
loc: { start: { line: 631, column: 6 }, end: { line: 631, column: 32 } },
type: 'binary-expr',
locations: [
{ start: { line: 631, column: 6 }, end: { line: 631, column: 15 } },
{ start: { line: 631, column: 19 }, end: { line: 631, column: 32 } }
],
line: 631
},
'31': {
loc: { start: { line: 635, column: 2 }, end: { line: 640, column: 3 } },
type: 'if',
locations: [
{ start: { line: 635, column: 2 }, end: { line: 640, column: 3 } },
{ start: { line: 635, column: 2 }, end: { line: 640, column: 3 } }
],
line: 635
},
'32': {
loc: { start: { line: 654, column: 2 }, end: { line: 656, column: 3 } },
type: 'if',
locations: [
{ start: { line: 654, column: 2 }, end: { line: 656, column: 3 } },
{ start: { line: 654, column: 2 }, end: { line: 656, column: 3 } }
],
line: 654
},
'33': {
loc: { start: { line: 672, column: 2 }, end: { line: 678, column: 3 } },
type: 'if',
locations: [
{ start: { line: 672, column: 2 }, end: { line: 678, column: 3 } },
{ start: { line: 672, column: 2 }, end: { line: 678, column: 3 } }
],
line: 672
},
'34': {
loc: { start: { line: 682, column: 2 }, end: { line: 694, column: 3 } },
type: 'if',
locations: [
{ start: { line: 682, column: 2 }, end: { line: 694, column: 3 } },
{ start: { line: 682, column: 2 }, end: { line: 694, column: 3 } }
],
line: 682
},
'35': {
loc: { start: { line: 713, column: 6 }, end: { line: 713, column: 66 } },
type: 'if',
locations: [
{ start: { line: 713, column: 6 }, end: { line: 713, column: 66 } },
{ start: { line: 713, column: 6 }, end: { line: 713, column: 66 } }
],
line: 713
},
'36': {
loc: { start: { line: 716, column: 6 }, end: { line: 732, column: 7 } },
type: 'if',
locations: [
{ start: { line: 716, column: 6 }, end: { line: 732, column: 7 } },
{ start: { line: 716, column: 6 }, end: { line: 732, column: 7 } }
],
line: 716
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0,
'123': 0,
'124': 0,
'125': 0,
'126': 0,
'127': 0,
'128': 0,
'129': 0,
'130': 0,
'131': 0,
'132': 0,
'133': 0,
'134': 0,
'135': 0,
'136': 0,
'137': 0,
'138': 0,
'139': 0,
'140': 0,
'141': 0,
'142': 0,
'143': 0,
'144': 0,
'145': 0,
'146': 0,
'147': 0,
'148': 0,
'149': 0,
'150': 0,
'151': 0,
'152': 0,
'153': 0,
'154': 0,
'155': 0,
'156': 0,
'157': 0,
'158': 0,
'159': 0,
'160': 0,
'161': 0,
'162': 0,
'163': 0,
'164': 0,
'165': 0,
'166': 0,
'167': 0,
'168': 0,
'169': 0,
'170': 0,
'171': 0,
'172': 0,
'173': 0,
'174': 0,
'175': 0,
'176': 0,
'177': 0,
'178': 0,
'179': 0,
'180': 0,
'181': 0,
'182': 0,
'183': 0,
'184': 0,
'185': 0,
'186': 0,
'187': 0,
'188': 0,
'189': 0,
'190': 0,
'191': 0,
'192': 0,
'193': 0,
'194': 0,
'195': 0,
'196': 0,
'197': 0,
'198': 0,
'199': 0,
'200': 0,
'201': 0,
'202': 0,
'203': 0,
'204': 0,
'205': 0,
'206': 0,
'207': 0,
'208': 0,
'209': 0,
'210': 0,
'211': 0,
'212': 0,
'213': 0,
'214': 0,
'215': 0,
'216': 0,
'217': 0,
'218': 0,
'219': 0,
'220': 0,
'221': 0,
'222': 0,
'223': 0,
'224': 0,
'225': 0,
'226': 0,
'227': 0,
'228': 0,
'229': 0,
'230': 0,
'231': 0,
'232': 0,
'233': 0,
'234': 0,
'235': 0,
'236': 0,
'237': 0,
'238': 0,
'239': 0,
'240': 0,
'241': 0,
'242': 0,
'243': 0,
'244': 0,
'245': 0,
'246': 0,
'247': 0,
'248': 0,
'249': 0,
'250': 0,
'251': 0,
'252': 0,
'253': 0,
'254': 0,
'255': 0,
'256': 0,
'257': 0,
'258': 0,
'259': 0,
'260': 0,
'261': 0,
'262': 0,
'263': 0,
'264': 0,
'265': 0,
'266': 0,
'267': 0,
'268': 0,
'269': 0,
'270': 0,
'271': 0,
'272': 0,
'273': 0,
'274': 0,
'275': 0,
'276': 0,
'277': 0,
'278': 0,
'279': 0,
'280': 0,
'281': 0,
'282': 0,
'283': 0,
'284': 0,
'285': 0,
'286': 0,
'287': 0,
'288': 0,
'289': 0,
'290': 0,
'291': 0,
'292': 0,
'293': 0,
'294': 0,
'295': 0,
'296': 0,
'297': 0,
'298': 0,
'299': 0,
'300': 0,
'301': 0,
'302': 0,
'303': 0,
'304': 0,
'305': 0,
'306': 0,
'307': 0,
'308': 0,
'309': 0,
'310': 0,
'311': 0,
'312': 0,
'313': 0,
'314': 0,
'315': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0],
'20': [0, 0],
'21': [0, 0],
'22': [0, 0],
'23': [0, 0],
'24': [0, 0],
'25': [0, 0, 0, 0, 0, 0],
'26': [0, 0],
'27': [0, 0],
'28': [0, 0],
'29': [0, 0],
'30': [0, 0],
'31': [0, 0],
'32': [0, 0],
'33': [0, 0],
'34': [0, 0],
'35': [0, 0],
'36': [0, 0]
},
_coverageSchema: '43e27e138ebf9cfc5966b082cf9a028302ed4184',
hash: '6609005f87027e94c15b82e237b26b589f621171'
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return (coverage[path] = coverageData);
})();
var _main = _interopRequireDefault(_dereq_('../core/main'));
var constants = _interopRequireWildcard(_dereq_('../core/constants'));
_dereq_('./p5.Shader');
_dereq_('./p5.RendererGL.Retained');
function _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function _getRequireWildcardCache() {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || (_typeof(obj) !== 'object' && typeof obj !== 'function')) {
return { default: obj };
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
cov_hc5p7sa2z.s[0]++;
// Text/Typography
// @TODO:
_main.default.RendererGL.prototype._applyTextProperties = function() {
//@TODO finish implementation
//console.error('text commands not yet implemented in webgl');
cov_hc5p7sa2z.f[0]++;
};
cov_hc5p7sa2z.s[1]++;
_main.default.RendererGL.prototype.textWidth = function(s) {
cov_hc5p7sa2z.f[1]++;
cov_hc5p7sa2z.s[2]++;
if (this._isOpenType()) {
cov_hc5p7sa2z.b[0][0]++;
cov_hc5p7sa2z.s[3]++;
return this._textFont._textWidth(s, this._textSize);
} else {
cov_hc5p7sa2z.b[0][1]++;
}
cov_hc5p7sa2z.s[4]++;
return 0; // TODO: error
};
// rendering constants
// the number of rows/columns dividing each glyph
var charGridWidth = (cov_hc5p7sa2z.s[5]++, 9);
var charGridHeight = (cov_hc5p7sa2z.s[6]++, charGridWidth);
// size of the image holding the bezier stroke info
var strokeImageWidth = (cov_hc5p7sa2z.s[7]++, 64);
var strokeImageHeight = (cov_hc5p7sa2z.s[8]++, 64);
// size of the image holding the stroke indices for each row/col
var gridImageWidth = (cov_hc5p7sa2z.s[9]++, 64);
var gridImageHeight = (cov_hc5p7sa2z.s[10]++, 64);
// size of the image holding the offset/length of each row/col stripe
var cellImageWidth = (cov_hc5p7sa2z.s[11]++, 64);
var cellImageHeight = (cov_hc5p7sa2z.s[12]++, 64);
/**
* @private
* @class ImageInfos
* @param {Integer} width
* @param {Integer} height
*
* the ImageInfos class holds a list of ImageDatas of a given size.
*/
function ImageInfos(width, height) {
cov_hc5p7sa2z.f[2]++;
cov_hc5p7sa2z.s[13]++;
this.width = width;
cov_hc5p7sa2z.s[14]++;
this.height = height;
cov_hc5p7sa2z.s[15]++;
this.infos = []; // the list of images
/**
*
* @method findImage
* @param {Integer} space
* @return {Object} contains the ImageData, and pixel index into that
* ImageData where the free space was allocated.
*
* finds free space of a given size in the ImageData list
*/ cov_hc5p7sa2z.s[16]++;
this.findImage = function(space) {
cov_hc5p7sa2z.f[3]++;
var imageSize = (cov_hc5p7sa2z.s[17]++, this.width * this.height);
cov_hc5p7sa2z.s[18]++;
if (space > imageSize) {
cov_hc5p7sa2z.b[1][0]++;
cov_hc5p7sa2z.s[19]++;
throw new Error('font is too complex to render in 3D');
} else {
cov_hc5p7sa2z.b[1][1]++;
}
// search through the list of images, looking for one with
// anough unused space.
var imageInfo, imageData;
cov_hc5p7sa2z.s[20]++;
for (var ii = (cov_hc5p7sa2z.s[21]++, this.infos.length - 1); ii >= 0; --ii) {
var imageInfoTest = (cov_hc5p7sa2z.s[22]++, this.infos[ii]);
cov_hc5p7sa2z.s[23]++;
if (imageInfoTest.index + space < imageSize) {
cov_hc5p7sa2z.b[2][0]++;
cov_hc5p7sa2z.s[24]++;
// found one
imageInfo = imageInfoTest;
cov_hc5p7sa2z.s[25]++;
imageData = imageInfoTest.imageData;
cov_hc5p7sa2z.s[26]++;
break;
} else {
cov_hc5p7sa2z.b[2][1]++;
}
}
cov_hc5p7sa2z.s[27]++;
if (!imageInfo) {
cov_hc5p7sa2z.b[3][0]++;
cov_hc5p7sa2z.s[28]++;
try {
cov_hc5p7sa2z.s[29]++;
// create a new image
imageData = new ImageData(this.width, this.height);
} catch (err) {
// for browsers that don't support ImageData constructors (ie IE11)
// create an ImageData using the old method
var canvas = (cov_hc5p7sa2z.s[30]++,
document.getElementsByTagName('canvas')[0]);
var created = (cov_hc5p7sa2z.s[31]++, !canvas);
cov_hc5p7sa2z.s[32]++;
if (!canvas) {
cov_hc5p7sa2z.b[4][0]++;
cov_hc5p7sa2z.s[33]++;
// create a temporary canvas
canvas = document.createElement('canvas');
cov_hc5p7sa2z.s[34]++;
canvas.style.display = 'none';
cov_hc5p7sa2z.s[35]++;
document.body.appendChild(canvas);
} else {
cov_hc5p7sa2z.b[4][1]++;
}
var ctx = (cov_hc5p7sa2z.s[36]++, canvas.getContext('2d'));
cov_hc5p7sa2z.s[37]++;
if (ctx) {
cov_hc5p7sa2z.b[5][0]++;
cov_hc5p7sa2z.s[38]++;
imageData = ctx.createImageData(this.width, this.height);
} else {
cov_hc5p7sa2z.b[5][1]++;
}
cov_hc5p7sa2z.s[39]++;
if (created) {
cov_hc5p7sa2z.b[6][0]++;
cov_hc5p7sa2z.s[40]++;
// distroy the temporary canvas, if necessary
document.body.removeChild(canvas);
} else {
cov_hc5p7sa2z.b[6][1]++;
}
}
// construct & dd the new image info
cov_hc5p7sa2z.s[41]++;
imageInfo = { index: 0, imageData: imageData };
cov_hc5p7sa2z.s[42]++;
this.infos.push(imageInfo);
} else {
cov_hc5p7sa2z.b[3][1]++;
}
var index = (cov_hc5p7sa2z.s[43]++, imageInfo.index);
cov_hc5p7sa2z.s[44]++;
imageInfo.index += space; // move to the start of the next image
cov_hc5p7sa2z.s[45]++;
imageData._dirty = true;
cov_hc5p7sa2z.s[46]++;
return { imageData: imageData, index: index };
};
}
/**
* @function setPixel
* @param {Object} imageInfo
* @param {Number} r
* @param {Number} g
* @param {Number} b
* @param {Number} a
*
* writes the next pixel into an indexed ImageData
*/
function setPixel(imageInfo, r, g, b, a) {
cov_hc5p7sa2z.f[4]++;
var imageData = (cov_hc5p7sa2z.s[47]++, imageInfo.imageData);
var pixels = (cov_hc5p7sa2z.s[48]++, imageData.data);
var index = (cov_hc5p7sa2z.s[49]++, imageInfo.index++ * 4);
cov_hc5p7sa2z.s[50]++;
pixels[index++] = r;
cov_hc5p7sa2z.s[51]++;
pixels[index++] = g;
cov_hc5p7sa2z.s[52]++;
pixels[index++] = b;
cov_hc5p7sa2z.s[53]++;
pixels[index++] = a;
}
var SQRT3 = (cov_hc5p7sa2z.s[54]++, Math.sqrt(3));
/**
* @private
* @class FontInfo
* @param {Object} font an opentype.js font object
*
* contains cached images and glyph information for an opentype font
*/ cov_hc5p7sa2z.s[55]++;
var FontInfo = function FontInfo(font) {
cov_hc5p7sa2z.f[5]++;
cov_hc5p7sa2z.s[56]++;
this.font = font;
// the bezier curve coordinates
cov_hc5p7sa2z.s[57]++;
this.strokeImageInfos = new ImageInfos(strokeImageWidth, strokeImageHeight);
// lists of curve indices for each row/column slice
cov_hc5p7sa2z.s[58]++;
this.colDimImageInfos = new ImageInfos(gridImageWidth, gridImageHeight);
cov_hc5p7sa2z.s[59]++;
this.rowDimImageInfos = new ImageInfos(gridImageWidth, gridImageHeight);
// the offset & length of each row/col slice in the glyph
cov_hc5p7sa2z.s[60]++;
this.colCellImageInfos = new ImageInfos(cellImageWidth, cellImageHeight);
cov_hc5p7sa2z.s[61]++;
this.rowCellImageInfos = new ImageInfos(cellImageWidth, cellImageHeight);
// the cached information for each glyph
cov_hc5p7sa2z.s[62]++;
this.glyphInfos = {};
/**
* @method getGlyphInfo
* @param {Glyph} glyph the x positions of points in the curve
* @returns {Object} the glyphInfo for that glyph
*
* calculates rendering info for a glyph, including the curve information,
* row & column stripes compiled into textures.
*/ cov_hc5p7sa2z.s[63]++;
this.getGlyphInfo = function(glyph) {
cov_hc5p7sa2z.f[6]++;
// check the cache
var gi = (cov_hc5p7sa2z.s[64]++, this.glyphInfos[glyph.index]);
cov_hc5p7sa2z.s[65]++;
if (gi) {
cov_hc5p7sa2z.b[7][0]++;
cov_hc5p7sa2z.s[66]++;
return gi;
} else {
cov_hc5p7sa2z.b[7][1]++;
}
// get the bounding box of the glyph from opentype.js
var bb = (cov_hc5p7sa2z.s[67]++, glyph.getBoundingBox());
var xMin = (cov_hc5p7sa2z.s[68]++, bb.x1);
var yMin = (cov_hc5p7sa2z.s[69]++, bb.y1);
var gWidth = (cov_hc5p7sa2z.s[70]++, bb.x2 - xMin);
var gHeight = (cov_hc5p7sa2z.s[71]++, bb.y2 - yMin);
var cmds = (cov_hc5p7sa2z.s[72]++, glyph.path.commands);
// don't bother rendering invisible glyphs
cov_hc5p7sa2z.s[73]++;
if (
(cov_hc5p7sa2z.b[9][0]++, gWidth === 0) ||
(cov_hc5p7sa2z.b[9][1]++, gHeight === 0) ||
(cov_hc5p7sa2z.b[9][2]++, !cmds.length)
) {
cov_hc5p7sa2z.b[8][0]++;
cov_hc5p7sa2z.s[74]++;
return (this.glyphInfos[glyph.index] = {});
} else {
cov_hc5p7sa2z.b[8][1]++;
}
var i;
var strokes = (cov_hc5p7sa2z.s[75]++, []); // the strokes in this glyph
var rows = (cov_hc5p7sa2z.s[76]++, []); // the indices of strokes in each row
var cols = (cov_hc5p7sa2z.s[77]++, []); // the indices of strokes in each column
cov_hc5p7sa2z.s[78]++;
for (i = charGridWidth - 1; i >= 0; --i) {
cov_hc5p7sa2z.s[79]++;
cols.push([]);
}
cov_hc5p7sa2z.s[80]++;
for (i = charGridHeight - 1; i >= 0; --i) {
cov_hc5p7sa2z.s[81]++;
rows.push([]);
}
/**
* @function push
* @param {Number[]} xs the x positions of points in the curve
* @param {Number[]} ys the y positions of points in the curve
* @param {Object} v the curve information
*
* adds a curve to the rows & columns that it intersects with
*/
function push(xs, ys, v) {
cov_hc5p7sa2z.f[7]++;
var index = (cov_hc5p7sa2z.s[82]++, strokes.length); // the index of this stroke
cov_hc5p7sa2z.s[83]++;
strokes.push(v); // add this stroke to the list
/**
* @function minMax
* @param {Number[]} rg the list of values to compare
* @param {Number} min the initial minimum value
* @param {Number} max the initial maximum value
*
* find the minimum & maximum value in a list of values
*/
function minMax(rg, min, max) {
cov_hc5p7sa2z.f[8]++;
cov_hc5p7sa2z.s[84]++;
for (var _i = (cov_hc5p7sa2z.s[85]++, rg.length); _i-- > 0; ) {
var _v = (cov_hc5p7sa2z.s[86]++, rg[_i]);
cov_hc5p7sa2z.s[87]++;
if (min > _v) {
cov_hc5p7sa2z.b[10][0]++;
cov_hc5p7sa2z.s[88]++;
min = _v;
} else {
cov_hc5p7sa2z.b[10][1]++;
}
cov_hc5p7sa2z.s[89]++;
if (max < _v) {
cov_hc5p7sa2z.b[11][0]++;
cov_hc5p7sa2z.s[90]++;
max = _v;
} else {
cov_hc5p7sa2z.b[11][1]++;
}
}
cov_hc5p7sa2z.s[91]++;
return { min: min, max: max };
}
// loop through the rows & columns that the curve intersects
// adding the curve to those slices
var mmX = (cov_hc5p7sa2z.s[92]++, minMax(xs, 1, 0));
var ixMin = (cov_hc5p7sa2z.s[93]++,
Math.max(Math.floor(mmX.min * charGridWidth), 0));
var ixMax = (cov_hc5p7sa2z.s[94]++,
Math.min(Math.ceil(mmX.max * charGridWidth), charGridWidth));
cov_hc5p7sa2z.s[95]++;
for (var iCol = (cov_hc5p7sa2z.s[96]++, ixMin); iCol < ixMax; ++iCol) {
cov_hc5p7sa2z.s[97]++;
cols[iCol].push(index);
}
var mmY = (cov_hc5p7sa2z.s[98]++, minMax(ys, 1, 0));
var iyMin = (cov_hc5p7sa2z.s[99]++,
Math.max(Math.floor(mmY.min * charGridHeight), 0));
var iyMax = (cov_hc5p7sa2z.s[100]++,
Math.min(Math.ceil(mmY.max * charGridHeight), charGridHeight));
cov_hc5p7sa2z.s[101]++;
for (var iRow = (cov_hc5p7sa2z.s[102]++, iyMin); iRow < iyMax; ++iRow) {
cov_hc5p7sa2z.s[103]++;
rows[iRow].push(index);
}
}
/**
* @function clamp
* @param {Number} v the value to clamp
* @param {Number} min the minimum value
* @param {Number} max the maxmimum value
*
* clamps a value between a minimum & maximum value
*/
function clamp(v, min, max) {
cov_hc5p7sa2z.f[9]++;
cov_hc5p7sa2z.s[104]++;
if (v < min) {
cov_hc5p7sa2z.b[12][0]++;
cov_hc5p7sa2z.s[105]++;
return min;
} else {
cov_hc5p7sa2z.b[12][1]++;
}
cov_hc5p7sa2z.s[106]++;
if (v > max) {
cov_hc5p7sa2z.b[13][0]++;
cov_hc5p7sa2z.s[107]++;
return max;
} else {
cov_hc5p7sa2z.b[13][1]++;
}
cov_hc5p7sa2z.s[108]++;
return v;
}
/**
* @function byte
* @param {Number} v the value to scale
*
* converts a floating-point number in the range 0-1 to a byte 0-255
*/
function byte(v) {
cov_hc5p7sa2z.f[10]++;
cov_hc5p7sa2z.s[109]++;
return clamp(255 * v, 0, 255);
}
/**
* @private
* @class Cubic
* @param {Number} p0 the start point of the curve
* @param {Number} c0 the first control point
* @param {Number} c1 the second control point
* @param {Number} p1 the end point
*
* a cubic curve
*/
function Cubic(p0, c0, c1, p1) {
cov_hc5p7sa2z.f[11]++;
cov_hc5p7sa2z.s[110]++;
this.p0 = p0;
cov_hc5p7sa2z.s[111]++;
this.c0 = c0;
cov_hc5p7sa2z.s[112]++;
this.c1 = c1;
cov_hc5p7sa2z.s[113]++;
this.p1 = p1;
/**
* @method toQuadratic
* @return {Object} the quadratic approximation
*
* converts the cubic to a quadtratic approximation by
* picking an appropriate quadratic control point
*/ cov_hc5p7sa2z.s[114]++;
this.toQuadratic = function() {
cov_hc5p7sa2z.f[12]++;
cov_hc5p7sa2z.s[115]++;
return {
x: this.p0.x,
y: this.p0.y,
x1: this.p1.x,
y1: this.p1.y,
cx: ((this.c0.x + this.c1.x) * 3 - (this.p0.x + this.p1.x)) / 4,
cy: ((this.c0.y + this.c1.y) * 3 - (this.p0.y + this.p1.y)) / 4
};
};
/**
* @method quadError
* @return {Number} the error
*
* calculates the magnitude of error of this curve's
* quadratic approximation.
*/ cov_hc5p7sa2z.s[116]++;
this.quadError = function() {
cov_hc5p7sa2z.f[13]++;
cov_hc5p7sa2z.s[117]++;
return (
_main.default.Vector.sub(
_main.default.Vector.sub(this.p1, this.p0),
_main.default.Vector.mult(
_main.default.Vector.sub(this.c1, this.c0),
3
)
).mag() / 2
);
};
/**
* @method split
* @param {Number} t the value (0-1) at which to split
* @return {Cubic} the second part of the curve
*
* splits the cubic into two parts at a point 't' along the curve.
* this cubic keeps its start point and its end point becomes the
* point at 't'. the 'end half is returned.
*/ cov_hc5p7sa2z.s[118]++;
this.split = function(t) {
cov_hc5p7sa2z.f[14]++;
var m1 = (cov_hc5p7sa2z.s[119]++,
_main.default.Vector.lerp(this.p0, this.c0, t));
var m2 = (cov_hc5p7sa2z.s[120]++,
_main.default.Vector.lerp(this.c0, this.c1, t));
var mm1 = (cov_hc5p7sa2z.s[121]++, _main.default.Vector.lerp(m1, m2, t));
cov_hc5p7sa2z.s[122]++;
this.c1 = _main.default.Vector.lerp(this.c1, this.p1, t);
cov_hc5p7sa2z.s[123]++;
this.c0 = _main.default.Vector.lerp(m2, this.c1, t);
var pt = (cov_hc5p7sa2z.s[124]++,
_main.default.Vector.lerp(mm1, this.c0, t));
var part1 = (cov_hc5p7sa2z.s[125]++, new Cubic(this.p0, m1, mm1, pt));
cov_hc5p7sa2z.s[126]++;
this.p0 = pt;
cov_hc5p7sa2z.s[127]++;
return part1;
};
/**
* @method splitInflections
* @return {Cubic[]} the non-inflecting pieces of this cubic
*
* returns an array containing 0, 1 or 2 cubics split resulting
* from splitting this cubic at its inflection points.
* this cubic is (potentially) altered and returned in the list.
*/ cov_hc5p7sa2z.s[128]++;
this.splitInflections = function() {
cov_hc5p7sa2z.f[15]++;
var a = (cov_hc5p7sa2z.s[129]++,
_main.default.Vector.sub(this.c0, this.p0));
var b = (cov_hc5p7sa2z.s[130]++,
_main.default.Vector.sub(_main.default.Vector.sub(this.c1, this.c0), a));
var c = (cov_hc5p7sa2z.s[131]++,
_main.default.Vector.sub(
_main.default.Vector.sub(_main.default.Vector.sub(this.p1, this.c1), a),
_main.default.Vector.mult(b, 2)
));
var cubics = (cov_hc5p7sa2z.s[132]++, []);
// find the derivative coefficients
var A = (cov_hc5p7sa2z.s[133]++, b.x * c.y - b.y * c.x);
cov_hc5p7sa2z.s[134]++;
if (A !== 0) {
cov_hc5p7sa2z.b[14][0]++;
var B = (cov_hc5p7sa2z.s[135]++, a.x * c.y - a.y * c.x);
var C = (cov_hc5p7sa2z.s[136]++, a.x * b.y - a.y * b.x);
var disc = (cov_hc5p7sa2z.s[137]++, B * B - 4 * A * C);
cov_hc5p7sa2z.s[138]++;
if (disc >= 0) {
cov_hc5p7sa2z.b[15][0]++;
cov_hc5p7sa2z.s[139]++;
if (A < 0) {
cov_hc5p7sa2z.b[16][0]++;
cov_hc5p7sa2z.s[140]++;
A = -A;
cov_hc5p7sa2z.s[141]++;
B = -B;
cov_hc5p7sa2z.s[142]++;
C = -C;
} else {
cov_hc5p7sa2z.b[16][1]++;
}
var Q = (cov_hc5p7sa2z.s[143]++, Math.sqrt(disc));
var t0 = (cov_hc5p7sa2z.s[144]++, (-B - Q) / (2 * A)); // the first inflection point
var t1 = (cov_hc5p7sa2z.s[145]++, (-B + Q) / (2 * A)); // the second inflection point
// test if the first inflection point lies on the curve
cov_hc5p7sa2z.s[146]++;
if (
(cov_hc5p7sa2z.b[18][0]++, t0 > 0) &&
(cov_hc5p7sa2z.b[18][1]++, t0 < 1)
) {
cov_hc5p7sa2z.b[17][0]++;
cov_hc5p7sa2z.s[147]++;
// split at the first inflection point
cubics.push(this.split(t0));
// scale t2 into the second part
cov_hc5p7sa2z.s[148]++;
t1 = 1 - (1 - t1) / (1 - t0);
} else {
cov_hc5p7sa2z.b[17][1]++;
}
// test if the second inflection point lies on the curve
cov_hc5p7sa2z.s[149]++;
if (
(cov_hc5p7sa2z.b[20][0]++, t1 > 0) &&
(cov_hc5p7sa2z.b[20][1]++, t1 < 1)
) {
cov_hc5p7sa2z.b[19][0]++;
cov_hc5p7sa2z.s[150]++;
// split at the second inflection point
cubics.push(this.split(t1));
} else {
cov_hc5p7sa2z.b[19][1]++;
}
} else {
cov_hc5p7sa2z.b[15][1]++;
}
} else {
cov_hc5p7sa2z.b[14][1]++;
}
cov_hc5p7sa2z.s[151]++;
cubics.push(this);
cov_hc5p7sa2z.s[152]++;
return cubics;
};
}
/**
* @function cubicToQuadratics
* @param {Number} x0
* @param {Number} y0
* @param {Number} cx0
* @param {Number} cy0
* @param {Number} cx1
* @param {Number} cy1
* @param {Number} x1
* @param {Number} y1
* @returns {Cubic[]} an array of cubics whose quadratic approximations
* closely match the civen cubic.
*
* converts a cubic curve to a list of quadratics.
*/
function cubicToQuadratics(x0, y0, cx0, cy0, cx1, cy1, x1, y1) {
cov_hc5p7sa2z.f[16]++;
// create the Cubic object and split it at its inflections
var cubics = (cov_hc5p7sa2z.s[153]++,
new Cubic(
new _main.default.Vector(x0, y0),
new _main.default.Vector(cx0, cy0),
new _main.default.Vector(cx1, cy1),
new _main.default.Vector(x1, y1)
).splitInflections());
var qs = (cov_hc5p7sa2z.s[154]++, []); // the final list of quadratics
var precision = (cov_hc5p7sa2z.s[155]++, 30 / SQRT3);
// for each of the non-inflected pieces of the original cubic
cov_hc5p7sa2z.s[156]++;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (
var _iterator = cubics[Symbol.iterator](), _step;
!(_iteratorNormalCompletion = (_step = _iterator.next()).done);
_iteratorNormalCompletion = true
) {
var cubic = _step.value;
// the cubic is iteratively split in 3 pieces:
// the first piece is accumulated in 'qs', the result.
// the last piece is accumulated in 'tail', temporarily.
// the middle piece is repeatedly split again, while necessary.
var tail = (cov_hc5p7sa2z.s[157]++, []);
var t3 = void 0;
cov_hc5p7sa2z.s[158]++;
for (;;) {
cov_hc5p7sa2z.s[159]++;
// calculate this cubic's precision
t3 = precision / cubic.quadError();
cov_hc5p7sa2z.s[160]++;
if (t3 >= 0.5 * 0.5 * 0.5) {
cov_hc5p7sa2z.b[21][0]++;
cov_hc5p7sa2z.s[161]++;
break; // not too bad, we're done
} else {
cov_hc5p7sa2z.b[21][1]++;
}
// find a split point based on the error
var t = (cov_hc5p7sa2z.s[162]++, Math.pow(t3, 1.0 / 3.0));
// split the cubic in 3
var start = (cov_hc5p7sa2z.s[163]++, cubic.split(t));
var middle = (cov_hc5p7sa2z.s[164]++, cubic.split(1 - t / (1 - t)));
cov_hc5p7sa2z.s[165]++;
qs.push(start); // the first part
cov_hc5p7sa2z.s[166]++;
tail.push(cubic); // the last part
cov_hc5p7sa2z.s[167]++;
cubic = middle; // iterate on the middle piece
}
cov_hc5p7sa2z.s[168]++;
if (t3 < 1) {
cov_hc5p7sa2z.b[22][0]++;
cov_hc5p7sa2z.s[169]++;
// a little excess error, split the middle in two
qs.push(cubic.split(0.5));
} else {
cov_hc5p7sa2z.b[22][1]++;
}
// add the middle piece to the result
cov_hc5p7sa2z.s[170]++;
qs.push(cubic);
// finally add the tail, reversed, onto the result
cov_hc5p7sa2z.s[171]++;
Array.prototype.push.apply(qs, tail.reverse());
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
cov_hc5p7sa2z.s[172]++;
return qs;
}
/**
* @function pushLine
* @param {Number} x0
* @param {Number} y0
* @param {Number} x1
* @param {Number} y1
*
* add a straight line to the row/col grid of a glyph
*/
function pushLine(x0, y0, x1, y1) {
cov_hc5p7sa2z.f[17]++;
var mx = (cov_hc5p7sa2z.s[173]++, (x0 + x1) / 2);
var my = (cov_hc5p7sa2z.s[174]++, (y0 + y1) / 2);
cov_hc5p7sa2z.s[175]++;
push([x0, x1], [y0, y1], { x: x0, y: y0, cx: mx, cy: my });
}
/**
* @function samePoint
* @param {Number} x0
* @param {Number} y0
* @param {Number} x1
* @param {Number} y1
* @return {Boolean} true if the two points are sufficiently close
*
* tests if two points are close enough to be considered the same
*/
function samePoint(x0, y0, x1, y1) {
cov_hc5p7sa2z.f[18]++;
cov_hc5p7sa2z.s[176]++;
return (
(cov_hc5p7sa2z.b[23][0]++, Math.abs(x1 - x0) < 0.00001) &&
(cov_hc5p7sa2z.b[23][1]++, Math.abs(y1 - y0) < 0.00001)
);
}
var x0, y0, xs, ys;
cov_hc5p7sa2z.s[177]++;
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (
var _iterator2 = cmds[Symbol.iterator](), _step2;
!(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done);
_iteratorNormalCompletion2 = true
) {
var cmd = _step2.value;
// scale the coordinates to the range 0-1
var x1 = (cov_hc5p7sa2z.s[178]++, (cmd.x - xMin) / gWidth);
var y1 = (cov_hc5p7sa2z.s[179]++, (cmd.y - yMin) / gHeight);
// don't bother if this point is the same as the last
cov_hc5p7sa2z.s[180]++;
if (samePoint(x0, y0, x1, y1)) {
cov_hc5p7sa2z.b[24][0]++;
cov_hc5p7sa2z.s[181]++;
continue;
} else {
cov_hc5p7sa2z.b[24][1]++;
}
cov_hc5p7sa2z.s[182]++;
switch (cmd.type) {
case 'M':
cov_hc5p7sa2z.b[25][0]++;
{
cov_hc5p7sa2z.s[183]++;
// move
xs = x1;
cov_hc5p7sa2z.s[184]++;
ys = y1;
cov_hc5p7sa2z.s[185]++;
break;
}
case 'L':
cov_hc5p7sa2z.b[25][1]++;
{
cov_hc5p7sa2z.s[186]++;
// line
pushLine(x0, y0, x1, y1);
cov_hc5p7sa2z.s[187]++;
break;
}
case 'Q':
cov_hc5p7sa2z.b[25][2]++;
{
// quadratic
var cx = (cov_hc5p7sa2z.s[188]++, (cmd.x1 - xMin) / gWidth);
var cy = (cov_hc5p7sa2z.s[189]++, (cmd.y1 - yMin) / gHeight);
cov_hc5p7sa2z.s[190]++;
push([x0, x1, cx], [y0, y1, cy], { x: x0, y: y0, cx: cx, cy: cy });
cov_hc5p7sa2z.s[191]++;
break;
}
case 'Z':
cov_hc5p7sa2z.b[25][3]++;
{
cov_hc5p7sa2z.s[192]++;
// end
if (!samePoint(x0, y0, xs, ys)) {
cov_hc5p7sa2z.b[26][0]++;
cov_hc5p7sa2z.s[193]++;
// add an extra line closing the loop, if necessary
pushLine(x0, y0, xs, ys);
cov_hc5p7sa2z.s[194]++;
strokes.push({ x: xs, y: ys });
} else {
cov_hc5p7sa2z.b[26][1]++;
cov_hc5p7sa2z.s[195]++;
strokes.push({ x: x0, y: y0 });
}
cov_hc5p7sa2z.s[196]++;
break;
}
case 'C':
cov_hc5p7sa2z.b[25][4]++;
{
// cubic
var cx1 = (cov_hc5p7sa2z.s[197]++, (cmd.x1 - xMin) / gWidth);
var cy1 = (cov_hc5p7sa2z.s[198]++, (cmd.y1 - yMin) / gHeight);
var cx2 = (cov_hc5p7sa2z.s[199]++, (cmd.x2 - xMin) / gWidth);
var cy2 = (cov_hc5p7sa2z.s[200]++, (cmd.y2 - yMin) / gHeight);
var qs = (cov_hc5p7sa2z.s[201]++,
cubicToQuadratics(x0, y0, cx1, cy1, cx2, cy2, x1, y1));
cov_hc5p7sa2z.s[202]++;
for (var iq = (cov_hc5p7sa2z.s[203]++, 0); iq < qs.length; iq++) {
var q = (cov_hc5p7sa2z.s[204]++, qs[iq].toQuadratic());
cov_hc5p7sa2z.s[205]++;
push([q.x, q.x1, q.cx], [q.y, q.y1, q.cy], q);
}
cov_hc5p7sa2z.s[206]++;
break;
}
default:
cov_hc5p7sa2z.b[25][5]++;
cov_hc5p7sa2z.s[207]++;
throw new Error('unknown command type: '.concat(cmd.type));
}
cov_hc5p7sa2z.s[208]++;
x0 = x1;
cov_hc5p7sa2z.s[209]++;
y0 = y1;
}
// allocate space for the strokes
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
var strokeCount = (cov_hc5p7sa2z.s[210]++, strokes.length);
var strokeImageInfo = (cov_hc5p7sa2z.s[211]++,
this.strokeImageInfos.findImage(strokeCount));
var strokeOffset = (cov_hc5p7sa2z.s[212]++, strokeImageInfo.index);
// fill the stroke image
cov_hc5p7sa2z.s[213]++;
for (var il = (cov_hc5p7sa2z.s[214]++, 0); il < strokeCount; ++il) {
var s = (cov_hc5p7sa2z.s[215]++, strokes[il]);
cov_hc5p7sa2z.s[216]++;
setPixel(strokeImageInfo, byte(s.x), byte(s.y), byte(s.cx), byte(s.cy));
}
/**
* @function layout
* @param {Number[][]} dim
* @param {ImageInfo[]} dimImageInfos
* @param {ImageInfo[]} cellImageInfos
* @return {Object}
*
* lays out the curves in a dimension (row or col) into two
* images, one for the indices of the curves themselves, and
* one containing the offset and length of those index spans.
*/
function layout(dim, dimImageInfos, cellImageInfos) {
cov_hc5p7sa2z.f[19]++;
var dimLength = (cov_hc5p7sa2z.s[217]++, dim.length); // the number of slices in this dimension
var dimImageInfo = (cov_hc5p7sa2z.s[218]++,
dimImageInfos.findImage(dimLength));
var dimOffset = (cov_hc5p7sa2z.s[219]++, dimImageInfo.index);
// calculate the total number of stroke indices in this dimension
var totalStrokes = (cov_hc5p7sa2z.s[220]++, 0);
cov_hc5p7sa2z.s[221]++;
for (var id = (cov_hc5p7sa2z.s[222]++, 0); id < dimLength; ++id) {
cov_hc5p7sa2z.s[223]++;
totalStrokes += dim[id].length;
}
// allocate space for the stroke indices
var cellImageInfo = (cov_hc5p7sa2z.s[224]++,
cellImageInfos.findImage(totalStrokes));
// for each slice in the glyph
cov_hc5p7sa2z.s[225]++;
for (var _i2 = (cov_hc5p7sa2z.s[226]++, 0); _i2 < dimLength; ++_i2) {
var strokeIndices = (cov_hc5p7sa2z.s[227]++, dim[_i2]);
var _strokeCount = (cov_hc5p7sa2z.s[228]++, strokeIndices.length);
var cellLineIndex = (cov_hc5p7sa2z.s[229]++, cellImageInfo.index);
// write the offset and count into the glyph slice image
cov_hc5p7sa2z.s[230]++;
setPixel(
dimImageInfo,
cellLineIndex >> 7,
cellLineIndex & 0x7f,
_strokeCount >> 7,
_strokeCount & 0x7f
);
// for each stroke index in that slice
cov_hc5p7sa2z.s[231]++;
for (var iil = (cov_hc5p7sa2z.s[232]++, 0); iil < _strokeCount; ++iil) {
// write the stroke index into the slice's image
var strokeIndex = (cov_hc5p7sa2z.s[233]++,
strokeIndices[iil] + strokeOffset);
cov_hc5p7sa2z.s[234]++;
setPixel(cellImageInfo, strokeIndex >> 7, strokeIndex & 0x7f, 0, 0);
}
}
cov_hc5p7sa2z.s[235]++;
return {
cellImageInfo: cellImageInfo,
dimOffset: dimOffset,
dimImageInfo: dimImageInfo
};
}
// initialize the info for this glyph
cov_hc5p7sa2z.s[236]++;
gi = this.glyphInfos[glyph.index] = {
glyph: glyph,
uGlyphRect: [bb.x1, -bb.y1, bb.x2, -bb.y2],
strokeImageInfo: strokeImageInfo,
strokes: strokes,
colInfo: layout(cols, this.colDimImageInfos, this.colCellImageInfos),
rowInfo: layout(rows, this.rowDimImageInfos, this.rowCellImageInfos)
};
cov_hc5p7sa2z.s[237]++;
gi.uGridOffset = [gi.colInfo.dimOffset, gi.rowInfo.dimOffset];
cov_hc5p7sa2z.s[238]++;
return gi;
};
};
cov_hc5p7sa2z.s[239]++;
_main.default.RendererGL.prototype._renderText = function(p, line, x, y, maxY) {
cov_hc5p7sa2z.f[20]++;
cov_hc5p7sa2z.s[240]++;
if (
(cov_hc5p7sa2z.b[28][0]++, !this._textFont) ||
(cov_hc5p7sa2z.b[28][1]++, typeof this._textFont === 'string')
) {
cov_hc5p7sa2z.b[27][0]++;
cov_hc5p7sa2z.s[241]++;
console.log(
'WEBGL: you must load and set a font before drawing text. See `loadFont` and `textFont` for more details.'
);
cov_hc5p7sa2z.s[242]++;
return;
} else {
cov_hc5p7sa2z.b[27][1]++;
}
cov_hc5p7sa2z.s[243]++;
if (
(cov_hc5p7sa2z.b[30][0]++, y >= maxY) ||
(cov_hc5p7sa2z.b[30][1]++, !this._doFill)
) {
cov_hc5p7sa2z.b[29][0]++;
cov_hc5p7sa2z.s[244]++;
return; // don't render lines beyond our maxY position
} else {
cov_hc5p7sa2z.b[29][1]++;
}
cov_hc5p7sa2z.s[245]++;
if (!this._isOpenType()) {
cov_hc5p7sa2z.b[31][0]++;
cov_hc5p7sa2z.s[246]++;
console.log(
'WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts are supported'
);
cov_hc5p7sa2z.s[247]++;
return p;
} else {
cov_hc5p7sa2z.b[31][1]++;
}
cov_hc5p7sa2z.s[248]++;
p.push(); // fix to #803
// remember this state, so it can be restored later
var doStroke = (cov_hc5p7sa2z.s[249]++, this._doStroke);
var drawMode = (cov_hc5p7sa2z.s[250]++, this.drawMode);
cov_hc5p7sa2z.s[251]++;
this._doStroke = false;
cov_hc5p7sa2z.s[252]++;
this.drawMode = constants.TEXTURE;
// get the cached FontInfo object
var font = (cov_hc5p7sa2z.s[253]++, this._textFont.font);
var fontInfo = (cov_hc5p7sa2z.s[254]++, this._textFont._fontInfo);
cov_hc5p7sa2z.s[255]++;
if (!fontInfo) {
cov_hc5p7sa2z.b[32][0]++;
cov_hc5p7sa2z.s[256]++;
fontInfo = this._textFont._fontInfo = new FontInfo(font);
} else {
cov_hc5p7sa2z.b[32][1]++;
}
// calculate the alignment and move/scale the view accordingly
var pos = (cov_hc5p7sa2z.s[257]++,
this._textFont._handleAlignment(this, line, x, y));
var fontSize = (cov_hc5p7sa2z.s[258]++, this._textSize);
var scale = (cov_hc5p7sa2z.s[259]++, fontSize / font.unitsPerEm);
cov_hc5p7sa2z.s[260]++;
this.translate(pos.x, pos.y, 0);
cov_hc5p7sa2z.s[261]++;
this.scale(scale, scale, 1);
// initialize the font shader
var gl = (cov_hc5p7sa2z.s[262]++, this.GL);
var initializeShader = (cov_hc5p7sa2z.s[263]++, !this._defaultFontShader);
var sh = (cov_hc5p7sa2z.s[264]++, this._getFontShader());
cov_hc5p7sa2z.s[265]++;
sh.init();
cov_hc5p7sa2z.s[266]++;
sh.bindShader(); // first time around, bind the shader fully
cov_hc5p7sa2z.s[267]++;
if (initializeShader) {
cov_hc5p7sa2z.b[33][0]++;
cov_hc5p7sa2z.s[268]++;
// these are constants, really. just initialize them one-time.
sh.setUniform('uGridImageSize', [gridImageWidth, gridImageHeight]);
cov_hc5p7sa2z.s[269]++;
sh.setUniform('uCellsImageSize', [cellImageWidth, cellImageHeight]);
cov_hc5p7sa2z.s[270]++;
sh.setUniform('uStrokeImageSize', [strokeImageWidth, strokeImageHeight]);
cov_hc5p7sa2z.s[271]++;
sh.setUniform('uGridSize', [charGridWidth, charGridHeight]);
} else {
cov_hc5p7sa2z.b[33][1]++;
}
cov_hc5p7sa2z.s[272]++;
this._applyColorBlend(this.curFillColor);
var g = (cov_hc5p7sa2z.s[273]++, this.retainedMode.geometry['glyph']);
cov_hc5p7sa2z.s[274]++;
if (!g) {
cov_hc5p7sa2z.b[34][0]++;
// create the geometry for rendering a quad
var geom = (cov_hc5p7sa2z.s[275]++,
(this._textGeom = new _main.default.Geometry(1, 1, function() {
cov_hc5p7sa2z.f[21]++;
cov_hc5p7sa2z.s[276]++;
for (var i = (cov_hc5p7sa2z.s[277]++, 0); i <= 1; i++) {
cov_hc5p7sa2z.s[278]++;
for (var j = (cov_hc5p7sa2z.s[279]++, 0); j <= 1; j++) {
cov_hc5p7sa2z.s[280]++;
this.vertices.push(new _main.default.Vector(j, i, 0));
cov_hc5p7sa2z.s[281]++;
this.uvs.push(j, i);
}
}
})));
cov_hc5p7sa2z.s[282]++;
geom.computeFaces().computeNormals();
cov_hc5p7sa2z.s[283]++;
g = this.createBuffers('glyph', geom);
} else {
cov_hc5p7sa2z.b[34][1]++;
}
// bind the shader buffers
cov_hc5p7sa2z.s[284]++;
var _iteratorNormalCompletion3 = true;
var _didIteratorError3 = false;
var _iteratorError3 = undefined;
try {
for (
var _iterator3 = this.retainedMode.buffers.text[Symbol.iterator](), _step3;
!(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done);
_iteratorNormalCompletion3 = true
) {
var buff = _step3.value;
cov_hc5p7sa2z.s[285]++;
buff._prepareBuffer(g, sh);
}
} catch (err) {
_didIteratorError3 = true;
_iteratorError3 = err;
} finally {
try {
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
_iterator3.return();
}
} finally {
if (_didIteratorError3) {
throw _iteratorError3;
}
}
}
cov_hc5p7sa2z.s[286]++;
this._bindBuffer(g.indexBuffer, gl.ELEMENT_ARRAY_BUFFER);
// this will have to do for now...
cov_hc5p7sa2z.s[287]++;
sh.setUniform('uMaterialColor', this.curFillColor);
cov_hc5p7sa2z.s[288]++;
try {
var dx = (cov_hc5p7sa2z.s[289]++, 0); // the x position in the line
var glyphPrev = (cov_hc5p7sa2z.s[290]++, null); // the previous glyph, used for kerning
// fetch the glyphs in the line of text
var glyphs = (cov_hc5p7sa2z.s[291]++, font.stringToGlyphs(line));
cov_hc5p7sa2z.s[292]++;
var _iteratorNormalCompletion4 = true;
var _didIteratorError4 = false;
var _iteratorError4 = undefined;
try {
for (
var _iterator4 = glyphs[Symbol.iterator](), _step4;
!(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done);
_iteratorNormalCompletion4 = true
) {
var glyph = _step4.value;
cov_hc5p7sa2z.s[293]++;
// kern
if (glyphPrev) {
cov_hc5p7sa2z.b[35][0]++;
cov_hc5p7sa2z.s[294]++;
dx += font.getKerningValue(glyphPrev, glyph);
} else {
cov_hc5p7sa2z.b[35][1]++;
}
var gi = (cov_hc5p7sa2z.s[295]++, fontInfo.getGlyphInfo(glyph));
cov_hc5p7sa2z.s[296]++;
if (gi.uGlyphRect) {
cov_hc5p7sa2z.b[36][0]++;
var rowInfo = (cov_hc5p7sa2z.s[297]++, gi.rowInfo);
var colInfo = (cov_hc5p7sa2z.s[298]++, gi.colInfo);
cov_hc5p7sa2z.s[299]++;
sh.setUniform('uSamplerStrokes', gi.strokeImageInfo.imageData);
cov_hc5p7sa2z.s[300]++;
sh.setUniform('uSamplerRowStrokes', rowInfo.cellImageInfo.imageData);
cov_hc5p7sa2z.s[301]++;
sh.setUniform('uSamplerRows', rowInfo.dimImageInfo.imageData);
cov_hc5p7sa2z.s[302]++;
sh.setUniform('uSamplerColStrokes', colInfo.cellImageInfo.imageData);
cov_hc5p7sa2z.s[303]++;
sh.setUniform('uSamplerCols', colInfo.dimImageInfo.imageData);
cov_hc5p7sa2z.s[304]++;
sh.setUniform('uGridOffset', gi.uGridOffset);
cov_hc5p7sa2z.s[305]++;
sh.setUniform('uGlyphRect', gi.uGlyphRect);
cov_hc5p7sa2z.s[306]++;
sh.setUniform('uGlyphOffset', dx);
cov_hc5p7sa2z.s[307]++;
sh.bindTextures(); // afterwards, only textures need updating
// draw it
cov_hc5p7sa2z.s[308]++;
gl.drawElements(gl.TRIANGLES, 6, this.GL.UNSIGNED_SHORT, 0);
} else {
cov_hc5p7sa2z.b[36][1]++;
}
cov_hc5p7sa2z.s[309]++;
dx += glyph.advanceWidth;
cov_hc5p7sa2z.s[310]++;
glyphPrev = glyph;
}
} catch (err) {
_didIteratorError4 = true;
_iteratorError4 = err;
} finally {
try {
if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
_iterator4.return();
}
} finally {
if (_didIteratorError4) {
throw _iteratorError4;
}
}
}
} finally {
cov_hc5p7sa2z.s[311]++;
// clean up
sh.unbindShader();
cov_hc5p7sa2z.s[312]++;
this._doStroke = doStroke;
cov_hc5p7sa2z.s[313]++;
this.drawMode = drawMode;
cov_hc5p7sa2z.s[314]++;
p.pop();
}
cov_hc5p7sa2z.s[315]++;
return p;
};
},
{
'../core/constants': 43,
'../core/main': 54,
'./p5.RendererGL.Retained': 107,
'./p5.Shader': 109
}
],
112: [
function(_dereq_, module, exports) {
module.exports = {
fes: {
autoplay:
"The media that tried to play (with '{{src}}') wasn't allowed to by this browser, most likely due to the browser's autoplay policy. Check out {{link}} for more information about why.",
checkUserDefinedFns:
"It seems that you may have accidently written {{name}} instead of {{actualName}}.\n\nPlease correct it if it's not intentional.",
fileLoadError: {
bytes:
'It looks like there was a problem loading your file. {{suggestion}}',
font: 'It looks like there was a problem loading your font. {{suggestion}}',
gif:
'There was some trouble loading your GIF. Make sure that your GIF is using 87a or 89a encoding.',
image:
'It looks like there was a problem loading your image. {{suggestion}}',
json:
'It looks like there was a problem loading your JSON file. {{suggestion}}',
large:
"If your large file isn't fetched successfully, we recommend splitting the file into smaller segments and fetching those.",
strings:
'It looks like there was a problem loading your text file. {{suggestion}}',
suggestion:
'Try checking if the file path ({{filePath}}) is correct, hosting the file online, or running a local server. (More info at {{link}})',
table:
'It looks like there was a problem loading your table file. {{suggestion}}',
xml:
'It looks like there was a problem loading your XML file. {{suggestion}}'
},
friendlyParamError: {
type_EMPTY_VAR:
'{{func}}() was expecting {{formatType}} for the {{position}} parameter, received an empty variable instead. {{location}}\n\nIf not intentional, this is often a problem with scope: {{link}}',
type_TOO_FEW_ARGUMENTS:
'{{func}}() was expecting at least {{minParams}} arguments, but received only {{argCount}}. {{location}}',
type_TOO_MANY_ARGUMENTS:
'{{func}}() was expecting no more than {{maxParams}} arguments, but received {{argCount}}. {{location}}',
type_WRONG_TYPE:
'{{func}}() was expecting {{formatType}} for the {{position}} parameter, received {{argType}} instead. {{location}}'
},
globalErrors: {
reference: {
notDefined:
'There\'s an error due to "{{symbol}}" not being defined in the current scope {{location}}.\n\nIf you have defined it in your code, you should check its scope, spelling, and letter-casing (JavaScript is case-sensitive). For more:\n{{url1}}\n{{url2}}'
},
stackSubseq:
'▶️ Called from line {{line}} in "{{func}}" in {{file}} ({{location}})\n\n',
stackTop:
'▶️ Error at line {{line}} in "{{func}}" in {{file}} ({{location}})\n\n',
syntax: {
invalidToken:
"There's a syntax error due to a symbol that JavaScript doesn't recognize or didn't expect at it's place.\nFor more: {{url}}",
unexpectedToken:
"There's a syntax error due to a symbol that wasn't expected at it's place.\nUsually this is due to a typo. Check the line number in the error below for anything missing/extra.\nFor more: {{url}}"
},
type: {
notfunc:
'There\'s an error as "{{symbol}}" could not be called as a function {{location}}.\nCheck the spelling, letter-casing (Javacript is case-sensitive) and its type.\nFor more: {{url}}',
notfuncObj:
'There\'s an error as "{{symbol}}" could not be called as a function {{location}}.\nVerify whether "{{obj}}" has "{{symbol}}" in it and check the spelling, letter-casing (Javacript is case-sensitive) and its type.\nFor more: {{url}}'
}
},
libraryError:
'An error with message "{{error}}" occured inside the p5js library when {{func}} was called {{location}}\n\nIf not stated otherwise, it might be an issue with the arguments passed to {{func}}.',
location: '(on line {{line}} in {{file}} [{{location}}])',
misspelling:
'It seems that you may have accidently written {{name}} instead of {{actualName}} {{location}}.\n\nPlease correct it to {{actualName}} if you wish to use the {{type}} from p5.js',
misusedTopLevel:
"Did you just try to use p5.js's {{symbolName}} {{symbolType}}? If so, you may want to move it into your sketch's setup() function.\n\nFor more details, see: {{link}}",
positions: {
p_1: 'first',
p_10: 'tenth',
p_11: 'eleventh',
p_12: 'twelfth',
p_2: 'second',
p_3: 'third',
p_4: 'fourth',
p_5: 'fifth',
p_6: 'sixth',
p_7: 'seventh',
p_8: 'eighth',
p_9: 'ninth'
},
pre: '\n🌸 p5.js says: {{message}}',
welcome:
'Welcome! This is your friendly debugger. To turn me off, switch to using p5.min.js.',
wrongPreload:
'An error with message "{{error}}" occured inside the p5js library when "{{func}}" was called {{location}}.\n\nIf not stated otherwise, it might be due to "{{func}}" being called from preload. Nothing besides load calls (loadImage, loadJSON, loadFont, loadStrings, etc.) should be inside the preload function.'
}
};
},
{}
],
113: [
function(_dereq_, module, exports) {
module.exports = {
fes: {
autoplay:
"Su browser impidío un medio tocar (de '{{src}}'), posiblemente porque las reglas de autoplay. Para aprender más, visite {{link}}.",
checkUserDefinedFns: '',
fileLoadError: {
bytes: '',
font: '',
gif: '',
image: '',
json: '',
large: '',
strings: '',
suggestion: '',
table: '',
xml: ''
},
friendlyParamError: {
type_EMPTY_VAR: '',
type_TOO_FEW_ARGUMENTS: '',
type_TOO_MANY_ARGUMENTS: '',
type_WRONG_TYPE: ''
},
globalErrors: {
reference: {
notDefined: ''
},
stackSubseq: '',
stackTop: '',
syntax: {
invalidToken: '',
unexpectedToken: ''
},
type: {
notfunc: '',
notfuncObj: ''
}
},
libraryError: '',
location: '',
misspelling: '',
misusedTopLevel: '',
positions: {
p_1: '',
p_10: '',
p_11: '',
p_12: '',
p_2: '',
p_3: '',
p_4: '',
p_5: '',
p_6: '',
p_7: '',
p_8: '',
p_9: ''
},
pre: '🌸 p5.js dice: {{message}}',
welcome: '',
wrongPreload: ''
}
};
},
{}
],
114: [
function(_dereq_, module, exports) {
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
exports.default = void 0;
var _translation = _interopRequireDefault(_dereq_('./en/translation'));
var _translation2 = _interopRequireDefault(_dereq_('./es/translation'));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
/**
* Maps our translations to their language key
* (`en` is english, `es` es español)
*
* `translation` is the namespace we're using for
* our initial set of translation strings.
*/ var _default = {
en: {
translation: _translation.default
},
es: {
translation: _translation2.default
}
};
exports.default = _default;
},
{ './en/translation': 112, './es/translation': 113 }
]
},
{},
[38]
)(38);
});