Fix inspections
This commit is contained in:
parent
3ac4c7d281
commit
3a2e88c4b3
10 changed files with 65 additions and 65 deletions
|
@ -9,4 +9,4 @@ make.arrays = {
|
|||
|
||||
return array;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
make.colors = {
|
||||
colors: function() {
|
||||
return Random.pick([
|
||||
return random.pick([
|
||||
make.colorRGB,
|
||||
make.colorHSL,
|
||||
make.colorKeywords
|
||||
|
@ -10,51 +10,51 @@ make.colors = {
|
|||
colorRGB: function() {
|
||||
let values;
|
||||
|
||||
switch (Random.number(4)) {
|
||||
switch (random.number(4)) {
|
||||
case 0:
|
||||
// Rgb functional notation
|
||||
if (Random.bool()) {
|
||||
if (random.bool()) {
|
||||
// Ints
|
||||
values = [Random.number(255), Random.number(255), Random.number(255)];
|
||||
values = [random.number(255), random.number(255), random.number(255)];
|
||||
} else {
|
||||
// Percents
|
||||
values = ["%" + Random.number(255), "%" + Random.number(255), "%" + Random.number(255)];
|
||||
values = ["%" + random.number(255), "%" + random.number(255), "%" + random.number(255)];
|
||||
}
|
||||
return "rgba(" + values.join(',') + ")";
|
||||
case 1:
|
||||
// Rgba functional notation
|
||||
values = [Random.number(255), Random.number(255), Random.number(255), Random.float()];
|
||||
values = [random.number(255), random.number(255), random.number(255), random.float()];
|
||||
return "rgba(" + values.join(',') + ")";
|
||||
case 2:
|
||||
// 4 char hex
|
||||
return "#" + Random.hex(4);
|
||||
return "#" + random.hex(4);
|
||||
default:
|
||||
// 8 char hex
|
||||
return "#" + Random.hex(8);
|
||||
return "#" + random.hex(8);
|
||||
}
|
||||
},
|
||||
|
||||
colorHSL: function() {
|
||||
let values, opt;
|
||||
switch(Random.number(4)) {
|
||||
switch(random.number(4)) {
|
||||
case 0:
|
||||
values = [Random.number(255), "%" + Random.number(255), "%" + Random.number(255)];
|
||||
values = [random.number(255), "%" + random.number(255), "%" + random.number(255)];
|
||||
return "hsl(" + values.join(',') + ")";
|
||||
case 1:
|
||||
values = [Random.number(255), "%" + Random.number(255), "%" + Random.number(255), "%" + Random.number(255)];
|
||||
values = [random.number(255), "%" + random.number(255), "%" + random.number(255), "%" + random.number(255)];
|
||||
return "hsl(" + values.join(',') + ")";
|
||||
case 2:
|
||||
opt = Random.pick(['deg', 'rad', 'grad', 'turn']);
|
||||
values = [Random.number(255) + opt, "%" + Random.number(255), "%" + Random.number(255), "%" + Random.number(255)];
|
||||
opt = random.pick(['deg', 'rad', 'grad', 'turn']);
|
||||
values = [random.number(255) + opt, "%" + random.number(255), "%" + random.number(255), "%" + random.number(255)];
|
||||
return "hsl(" + values.join(',') + ")";
|
||||
default:
|
||||
values = [Random.number(255), "%" + Random.number(255), "%" + Random.number(255), Random.float()];
|
||||
values = [random.number(255), "%" + random.number(255), "%" + random.number(255), random.float()];
|
||||
return "hsl(" + values.join(',') + ")";
|
||||
}
|
||||
},
|
||||
|
||||
colorKeywords: function() {
|
||||
return Random.pick([
|
||||
return random.pick([
|
||||
"lime", "red", "blue", "invert", "currentColor", "ActiveBorder", "ActiveCaption",
|
||||
"AppWorkspace", "Background", "ButtonFace", "ButtonHighlight", "ButtonShadow",
|
||||
"ButtonText", "CaptionText", "GrayText", "Highlight", "HighlightText",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
make.files = {
|
||||
image: function () {
|
||||
return Utils.quote(random.pick([
|
||||
return utils.quote(random.pick([
|
||||
"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=",
|
||||
"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",
|
||||
"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA=",
|
||||
|
@ -12,13 +12,13 @@ make.files = {
|
|||
]));
|
||||
},
|
||||
video: function () {
|
||||
return Utils.quote(random.pick([
|
||||
return utils.quote(random.pick([
|
||||
"media/video/video1.webm",
|
||||
"media/video/video2.webm"
|
||||
]));
|
||||
},
|
||||
audio: function () {
|
||||
return Utils.quote(random.pick([
|
||||
return utils.quote(random.pick([
|
||||
"media/audio/mono-uncompressed-8bit-8000hz.wav",
|
||||
"media/audio/mono-uncompressed-8bit-44100hz.wav",
|
||||
"media/audio/mono-uncompressed-32bit-8000hz.wav",
|
||||
|
@ -26,16 +26,16 @@ make.files = {
|
|||
]));
|
||||
},
|
||||
webvtt: function () {
|
||||
return Utils.quote(random.pick([
|
||||
return utils.quote(random.pick([
|
||||
//'data:text/vtt,' + encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\ntest');,
|
||||
"media/video/sample.vtt"
|
||||
]));
|
||||
},
|
||||
file: function () {
|
||||
return random.pick([
|
||||
Make.image,
|
||||
Make.video,
|
||||
Make.audio
|
||||
make.image,
|
||||
make.video,
|
||||
make.audio
|
||||
]);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
|
@ -45,5 +45,5 @@ make.fonts = {
|
|||
s += " ";
|
||||
s += Make.fontFamily();
|
||||
return "'" + s + "'";
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ make.network = {
|
|||
"a=ptime:20",
|
||||
"a=rtpmap:0 PCMU/8000",
|
||||
"a=rtpmap:8 PCMA/8000",
|
||||
"a=rtpmap:101 telephone-event/8000"
|
||||
"a=rtpmap:101 telephone-event/8000",
|
||||
"a=fmtp:101 0-15",
|
||||
"a=sendrecv",
|
||||
"a=candidate:0 1 UDP 2113601791 192.168.129.33 52757 typ host",
|
||||
|
@ -25,7 +25,7 @@ make.network = {
|
|||
"a=rtpmap:120 VP8/90000",
|
||||
"a=sendrecv",
|
||||
"a=candidate:0 1 UDP 2113601791 192.168.129.33 63901 typ host",
|
||||
"a=candidate:0 2 UDP 2113601790 192.168.129.33 54165 typ host"
|
||||
"a=candidate:0 2 UDP 2113601790 192.168.129.33 54165 typ host",
|
||||
"m=application 65080 SCTP/DTLS 5000",
|
||||
"c=IN IP4 192.168.129.33",
|
||||
"a=fmtp:5000 protocol=webrtc-datachannel;streams=16",
|
||||
|
@ -38,16 +38,16 @@ make.network = {
|
|||
return ["turn", "turns", "stun", "stuns"]
|
||||
},
|
||||
randomIPv4: function() {
|
||||
return Random.pick([Random.number(255), Make.number]) + "." +
|
||||
Random.pick([Random.number(255), Make.number]) + "." +
|
||||
Random.pick([Random.number(255), Make.number]) + "." +
|
||||
Random.pick([Random.number(255), Make.number]);
|
||||
return random.pick([random.number(255), make.number]) + "." +
|
||||
random.pick([random.number(255), make.number]) + "." +
|
||||
random.pick([random.number(255), make.number]) + "." +
|
||||
random.pick([random.number(255), make.number]);
|
||||
},
|
||||
randomIPv6: function() {
|
||||
return "[" + Make.stringFromBlocks([":", function() { return Make.digitsHex(Random.range(1, 4)) }]) + "]"
|
||||
return "[" + make.stringFromBlocks([":", function() { return make.digitsHex(random.range(1, 4)) }]) + "]"
|
||||
},
|
||||
goodHostnames: function() { return [
|
||||
"0.0.0.0"
|
||||
"0.0.0.0",
|
||||
"127.0.0.1:8080",
|
||||
]},
|
||||
badHostnames: function() { return [
|
||||
|
@ -62,16 +62,16 @@ make.network = {
|
|||
"::ffff:192.0.2.128",
|
||||
"2001:db8::1:2",
|
||||
"2001:db8::1:1:1:1:1"
|
||||
],
|
||||
]},
|
||||
randomBitmask: function(list) {
|
||||
if (list.length <= 1) {
|
||||
return list.join("");
|
||||
}
|
||||
var max = random.range(2, list.length);
|
||||
var mask = random.pick(list);
|
||||
for (var i = 1; i < max; i++) {
|
||||
let max = random.range(2, list.length);
|
||||
let mask = random.pick(list);
|
||||
for (let i = 1; i < max; i++) {
|
||||
mask += "|" + random.pick(list);
|
||||
}
|
||||
return mask;
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
|
@ -34,11 +34,11 @@ make.numbers = {
|
|||
return number % 2 == 1 ? ++number : number;
|
||||
},
|
||||
number: function () {
|
||||
var value = random.choose([
|
||||
let value = random.choose([
|
||||
[10, make.float],
|
||||
[10, [make.rangeNumber, make.tinyNumber]],
|
||||
[ 1, Make.unsignedNumber]
|
||||
]);
|
||||
return random.chance(10) ? -value : value;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
make.shaders = {
|
||||
fragment1: function() {
|
||||
[
|
||||
return [
|
||||
[
|
||||
"#ifdef GL_ES",
|
||||
"precision mediump float;"
|
||||
"precision mediump float;",
|
||||
"#endif",
|
||||
"varying vec4 vColor;",
|
||||
"void main() {",
|
||||
|
@ -19,10 +19,10 @@ make.shaders = {
|
|||
"gl_FragColor = vec4(texelColor.rgb * vLighting, texelColor.a);",
|
||||
"}"
|
||||
]
|
||||
],
|
||||
]
|
||||
},
|
||||
vertex1: function () {
|
||||
[
|
||||
return [
|
||||
[
|
||||
"attribute vec4 aVertex;",
|
||||
"attribute vec4 aColor;",
|
||||
|
@ -55,7 +55,7 @@ make.shaders = {
|
|||
]
|
||||
},
|
||||
fragment2: function() {
|
||||
[
|
||||
return [
|
||||
[
|
||||
"varying highp vec2 vTextureCoord;",
|
||||
"varying highp vec3 vLighting;",
|
||||
|
@ -87,7 +87,7 @@ make.shaders = {
|
|||
]
|
||||
},
|
||||
vertex2: function() {
|
||||
[
|
||||
return [
|
||||
[
|
||||
"attribute highp vec3 aVertexNormal;",
|
||||
"attribute highp vec3 aVertexPosition;",
|
||||
|
@ -130,13 +130,13 @@ make.shaders = {
|
|||
"varyingUV = vertexUV;",
|
||||
"}"
|
||||
]
|
||||
],
|
||||
]
|
||||
},
|
||||
shaderPair: function(v, f) {
|
||||
var i = Random.number(v.length);
|
||||
let i = random.number(v.length);
|
||||
return {
|
||||
vertex: Utils.quote(v[i].join("\n")),
|
||||
fragment: Utils.quote(f[i].join("\n"))
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
|
@ -31,8 +31,8 @@ make.strings = {
|
|||
digitsHex: function (n) {
|
||||
let s = '';
|
||||
while (n-- > 0) {
|
||||
s += (Random.number(16)).toString(16);
|
||||
s += (random.number(16)).toString(16);
|
||||
}
|
||||
return s;
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
22
make/text.js
22
make/text.js
|
@ -115,11 +115,11 @@ make.text = {
|
|||
[0x1D17B, 0x1D18B],
|
||||
[0x1D1AA, 0x1D1AD],
|
||||
[0x1D242, 0x1D244]
|
||||
]),
|
||||
])},
|
||||
unicodeBMP: function() { return random.item([
|
||||
// BMP = Basic Multilingual Plane
|
||||
[0x0000, 0xFFFF]
|
||||
]),
|
||||
])},
|
||||
unicodeSMP: function() { return random.item([
|
||||
// SMP = Supplementary Multilingual Plane
|
||||
[0x10000, 0x13FFF],
|
||||
|
@ -127,16 +127,16 @@ make.text = {
|
|||
[0x1B000, 0x1BFFF],
|
||||
[0x1D000, 0x1DFFF],
|
||||
[0x1F000, 0x1FFFF]
|
||||
]),
|
||||
])},
|
||||
unicodeSIP: function() { return random.item([
|
||||
// SIP = Supplementary Ideographic Plane
|
||||
[0x20000, 0x2BFFF],
|
||||
[0x2F000, 0x2FFFF]
|
||||
]),
|
||||
])},
|
||||
unicodeSSP: function() { return random.item([
|
||||
// SSP = Supplementary Special-purpose Plane
|
||||
[0xE0000, 0xE0FFF]
|
||||
]),
|
||||
])},
|
||||
registeredFontFeatures: function() { return random.pick([
|
||||
'aalt', 'abvf', 'abvm', 'abvs', 'afrc', 'akhn', 'blwf', 'blwm', 'blws',
|
||||
'calt', 'case', 'ccmp', 'cfar', 'cjct', 'clig', 'cpct', 'cpsp', 'cswh',
|
||||
|
@ -153,16 +153,16 @@ make.text = {
|
|||
'ss14', 'ss15', 'ss16', 'ss17', 'ss18', 'ss19', 'ss20', 'subs', 'sups',
|
||||
'swsh', 'titl', 'tjmo', 'tnam', 'tnum', 'trad', 'twid', 'unic', 'valt',
|
||||
'vatu', 'vert', 'vhal', 'vjmo', 'vkna', 'vkrn', 'vpal', 'vrt2', 'zero'
|
||||
]),
|
||||
])},
|
||||
assignmentOperator: function() { return random.pick([
|
||||
"=", "-=", "+=", "*=", "/="
|
||||
]),
|
||||
])},
|
||||
arithmeticOperator: function() { return random.pick([
|
||||
"%", "-", "+", "*", "/"
|
||||
]),
|
||||
currency: function() { return Random.pick([
|
||||
])},
|
||||
currency: function() { return random.pick([
|
||||
// https://en.wikipedia.org/wiki/ISO_4217
|
||||
"USD", "USS", "USN", "EUR", "CHF", "GBP", "XAG", "XBA", "XBB", "XBC",
|
||||
"XBD", "XSU", "XTS", "XXX",
|
||||
]),
|
||||
}
|
||||
])},
|
||||
};
|
||||
|
|
|
@ -11,4 +11,4 @@ make.types = {
|
|||
"function() {}"
|
||||
]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue