Código de JavaScript - Crear textos en ASCII

Imágen de perfil
Val: 311
Bronce
Ha aumentado 1 puesto en JavaScript (en relación al último mes)
Gráfica de JavaScript

Crear textos en ASCIIgráfica de visualizaciones


JavaScript

Publicado el 29 de Abril del 2019 por Info (85 códigos)
1.092 visualizaciones desde el 29 de Abril del 2019
Este código permite crear textos en ASCII.

javascript-ascii-block

javascript-ascii-metalica

javascript-ascii-futurista

Versión 1.0
estrellaestrellaestrellaestrellaestrella(3)

Publicado el 29 de Abril del 2019gráfica de visualizaciones de la versión: Versión 1.0
1.093 visualizaciones desde el 29 de Abril del 2019
estrellaestrellaestrellaestrellaestrella
estrellaestrellaestrellaestrella
estrellaestrellaestrella
estrellaestrella
estrella

Este código lo descargue de Internet hace tiempo, y lo modifique para adaptarlo a mis necesidades
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <style>
    .ascii {text-align:center;}
    .ascii>div {display:inline-block;}
    .ascii>div>div:nth-child(1) {float:left;}
    .ascii>div>div:nth-child(2) {float:right;}
    .ascii>div>div:nth-child(3) {clear:both;padding-top:20px;}
    </style>
</head>
 
<body>
 
    <div class="ascii">
        <div>
            <div>
                <input type="text">
                <input type="submit" value="Mostrar ASCII text">
            </div>
            <div>
                <input type="radio" name="type" value=1 checked>Futurista
                <input type="radio" name="type" value=2>Block
                <input type="radio" name="type" value=3>metalica
            </div>
 
            <div>
                <textarea id="outputField" cols="100" rows="10" wrap="off"></textarea>
            </div>
        </div>
    </div>
</body>
</html>
 
<script>
document.querySelector("input[type=submit]").addEventListener("click", () => {
    let validChars = true;
    let inputText = document.querySelector("input[type=text]").value.toLowerCase();
    const regExp=/^[a-zA-Z0-9 ]*$/
 
    if (!inputText.match(regExp)) {
        alert('Caracter invalido. Solo se permiten los caracters a-z y 0-9');
    } else {
        if(document.querySelector("input[name=type]:checked").value=="1") {buildStyle1(inputText)}
        if(document.querySelector("input[name=type]:checked").value=="2") {buildStyle2(inputText)}
        if(document.querySelector("input[name=type]:checked").value=="3") {buildStyle3(inputText)}
    }
});
 
function buildStyle1(inputText) {
 
    let line0 = ""; let line1 = ""; let line2 = ""; let line3 = ""; let space = "    "; let a = new Array(4); let b = new Array(4); let c = new Array(4); let d = new Array(4); let e = new Array(4); let f = new Array(4); let g = new Array(4); let h = new Array(4); let I = new Array(4); let j = new Array(4); let k = new Array(4); let l = new Array(4); let m = new Array(4); let n = new Array(4); let o = new Array(4); let p = new Array(4); let q = new Array(4); let r = new Array(4); let s = new Array(4); let t = new Array(4); let u = new Array(4); let v = new Array(4); let w = new Array(4); let x = new Array(4); let y = new Array(4); let z = new Array(4); let zero = new Array(4); let one = new Array(4); let two = new Array(4); let three = new Array(4); let four = new Array(4); let five = new Array(4); let six = new Array(4); let seven = new Array(4); let eight = new Array(4); let nine = new Array(4);
    a[0] = "     ";		a[1] = " __  ";		a[2] = "(__( ";		a[3] = "     ";
    b[0] = "     ";		b[1] = "|__  ";		b[2] = "|__) ";		b[3] = "     ";
    c[0] = "     ";		c[1] = " __  ";		c[2] = "(___ ";		c[3] = "     ";
    d[0] = "     ";		d[1] = " __| ";		d[2] = "(__| ";		d[3] = "     ";
    e[0] = "      ";	e[1] = " ___  ";	e[2] = "(__/_ ";	e[3] = "      ";
    f[0] = "  _ ";		f[1] = "_|_ ";		f[2] = " |  ";		f[3] = "    ";
    g[0] = "     ";		g[1] = " __  ";		g[2] = "(__| ";		g[3] = " __/ ";
    h[0] = "     ";		h[1] = "|__  ";		h[2] = "|  ) ";		h[3] = "     ";
    I[0] = "  ";		I[1] = "o ";		I[2] = "| ";		I[3] = "  ";
    j[0] = "     ";		j[1] = "   | ";		j[2] = "(__, ";		j[3] = "     ";
    k[0] = "     ";		k[1] = "|__, ";		k[2] = "|  \\ ";	k[3] = "     ";
    l[0] = "    ";		l[1] = "|   ";		l[2] = "|_, ";		l[3] = "    ";
    m[0] = "        ";	m[1] = " __ __  ";	m[2] = "|  )  ) ";	m[3] = "        ";
    n[0] = "     ";		n[1] = " __  ";		n[2] = "|  ) ";		n[3] = "     ";
    o[0] = "     ";		o[1] = " __  ";		o[2] = "(__) ";		o[3] = "     ";
    p[0] = "     ";		p[1] = " __  ";		p[2] = "|__) ";		p[3] = "|    ";
    q[0] = "     ";		q[1] = " __  ";		q[2] = "(__| ";		q[3] = "   | ";
    r[0] = "     ";		r[1] = " __  ";		r[2] = "|  ' ";		r[3] = "     ";
    s[0] = "     ";		s[1] = "  __ ";		s[2] = "__)  ";		s[3] = "     ";
    t[0] = "     ";		t[1] = "_|_  ";		t[2] = " |_, ";		t[3] = "     ";
    u[0] = "      ";	u[1] = "      ";	u[2] = "(__(_ ";	u[3] = "      ";
    v[0] = "     ";		v[1] = "     ";		v[2] = "(__| ";		v[3] = "     ";
    w[0] = "        ";	w[1] = "        ";	w[2] = "(__(__( ";	w[3] = "        ";
    x[0] = "    ";		x[1] = "\\_' ";		x[2] = "/ \\ ";		x[3] = "    ";
    y[0] = "     ";		y[1] = "     ";		y[2] = "(__| ";		y[3] = "   | ";
    z[0] = "     ";		z[1] = "__   ";		z[2] = " (__ ";		z[3] = "     ";
    zero[0] = " __  ";	zero[1] = "|  | ";	zero[2] = "|__| ";	zero[3] = "     ";
    one[0] = "   ";		one[1] = "'| ";		one[2] = " | ";		one[3] = "   ";
    two[0] = " __  ";	two[1] = " __) ";	two[2] = "(___ ";	two[3] = "     ";
    three[0] = "___ ";	three[1] = " _/ ";	three[2] = "__) ";	three[3] = "    ";
    four[0] = "     ";	four[1] = "(__| ";	four[2] = "   | ";	four[3] = "     ";
    five[0] = " __  ";	five[1] = "(__  ";	five[2] = "___) ";	five[3] = "     ";
    six[0] = "     ";	six[1] = " /_  ";	six[2] = "(__) ";	six[3] = "     ";
    seven[0] = "__  ";	seven[1] = "  / ";	seven[2] = " /  ";	seven[3] = "    ";
    eight[0] = " __  ";	eight[1] = "(__) ";	eight[2] = "(__) ";	eight[3] = "     ";
    nine[0] = " __  ";	nine[1] = "(__) ";	nine[2] = "  /  ";	nine[3] = "     ";
 
    for(i=0; i < inputText.length; i++) {
        if(inputText.charAt(i) == " ") {line0 += space; 	line1 += space; 	line2 += space; 	line3 += space}
        if(inputText.charAt(i) == "a") {line0 += a[0]; 		line1 += a[1];		line2 += a[2]; 		line3 += a[3]}
        if(inputText.charAt(i) == "b") {line0 += b[0]; 		line1 += b[1]; 		line2 += b[2]; 		line3 += b[3]}
        if(inputText.charAt(i) == "c") {line0 += c[0]; 		line1 += c[1]; 		line2 += c[2]; 		line3 += c[3]}
        if(inputText.charAt(i) == "d") {line0 += d[0]; 		line1 += d[1]; 		line2 += d[2]; 		line3 += d[3]}
        if(inputText.charAt(i) == "e") {line0 += e[0]; 		line1 += e[1]; 		line2 += e[2]; 		line3 += e[3]}
        if(inputText.charAt(i) == "f") {line0 += f[0]; 		line1 += f[1]; 		line2 += f[2]; 		line3 += f[3]}
        if(inputText.charAt(i) == "g") {line0 += g[0]; 		line1 += g[1];	 	line2 += g[2]; 		line3 += g[3]}
        if(inputText.charAt(i) == "h") {line0 += h[0]; 		line1 += h[1]; 		line2 += h[2]; 		line3 += h[3]}
        if(inputText.charAt(i) == "i") {line0 += I[0]; 		line1 += I[1]; 		line2 += I[2]; 		line3 += I[3]}
        if(inputText.charAt(i) == "j") {line0 += j[0]; 		line1 += j[1]; 		line2 += j[2]; 		line3 += j[3]}
        if(inputText.charAt(i) == "k") {line0 += k[0]; 		line1 += k[1];		line2 += k[2]; 		line3 += k[3]}
        if(inputText.charAt(i) == "l") {line0 += l[0]; 		line1 += l[1]; 		line2 += l[2]; 		line3 += l[3]}
        if(inputText.charAt(i) == "m") {line0 += m[0]; 		line1 += m[1]; 		line2 += m[2]; 		line3 += m[3]}
        if(inputText.charAt(i) == "n") {line0 += n[0];	 	line1 += n[1]; 		line2 += n[2]; 		line3 += n[3]}
        if(inputText.charAt(i) == "o") {line0 += o[0]; 		line1 += o[1];	 	line2 += o[2]; 		line3 += o[3]}
        if(inputText.charAt(i) == "p") {line0 += p[0]; 		line1 += p[1]; 		line2 += p[2]; 		line3 += p[3]}
        if(inputText.charAt(i) == "q") {line0 += q[0]; 		line1 += q[1];	 	line2 += q[2]; 		line3 += q[3]}
        if(inputText.charAt(i) == "r") {line0 += r[0]; 		line1 += r[1];	 	line2 += r[2]; 		line3 += r[3]}
        if(inputText.charAt(i) == "s") {line0 += s[0]; 		line1 += s[1];	 	line2 += s[2]; 		line3 += s[3]}
        if(inputText.charAt(i) == "t") {line0 += t[0]; 		line1 += t[1];	 	line2 += t[2]; 		line3 += t[3]}
        if(inputText.charAt(i) == "u") {line0 += u[0]; 		line1 += u[1]; 		line2 += u[2]; 		line3 += u[3]}
        if(inputText.charAt(i) == "v") {line0 += v[0];	 	line1 += v[1]; 		line2 += v[2]; 		line3 += v[3]}
        if(inputText.charAt(i) == "w") {line0 += w[0]; 		line1 += w[1]; 		line2 += w[2]; 		line3 += w[3]}
        if(inputText.charAt(i) == "x") {line0 += x[0]; 		line1 += x[1]; 		line2 += x[2]; 		line3 += x[3]}
        if(inputText.charAt(i) == "y") {line0 += y[0]; 		line1 += y[1]; 		line2 += y[2]; 		line3 += y[3]}
        if(inputText.charAt(i) == "z") {line0 += z[0];	 	line1 += z[1]; 		line2 += z[2]; 		line3 += z[3]}
        if(inputText.charAt(i) == "0") {line0 += zero[0]; 	line1 += zero[1]; 	line2 += zero[2]; 	line3 += zero[3]}
        if(inputText.charAt(i) == "1") {line0 += one[0]; 	line1 += one[1]; 	line2 += one[2]; 	line3 += one[3]}
        if(inputText.charAt(i) == "2") {line0 += two[0]; 	line1 += two[1]; 	line2 += two[2]; 	line3 += two[3]}
        if(inputText.charAt(i) == "3") {line0 += three[0];	line1 += three[1];	line2 += three[2]; 	line3 += three[3]}
        if(inputText.charAt(i) == "4") {line0 += four[0]; 	line1 += four[1]; 	line2 += four[2]; 	line3 += four[3]}
        if(inputText.charAt(i) == "5") {line0 += five[0]; 	line1 += five[1]; 	line2 += five[2]; 	line3 += five[3]}
        if(inputText.charAt(i) == "6") {line0 += six[0]; 	line1 += six[1]; 	line2 += six[2]; 	line3 += six[3]}
        if(inputText.charAt(i) == "7") {line0 += seven[0];	line1 += seven[1];	line2 += seven[2]; 	line3 += seven[3]}
        if(inputText.charAt(i) == "8") {line0 += eight[0];	line1 += eight[1];	line2 += eight[2]; 	line3 += eight[3]}
        if(inputText.charAt(i) == "9") {line0 += nine[0]; 	line1 += nine[1]; 	line2 += nine[2]; 	line3 += nine[3]}
    }
    let outputText = line0+"\n"+line1+"\n"+line2+"\n"+line3;
    document.getElementById("outputField").value = outputText;
}
 
 
function buildStyle2(inputText,booleanRepeat) {
    let line0 = ""; let line1 = ""; let line2 = ""; let line3 = ""; let line4 = ""; let line5 = ""; let space = "     "; let a = new Array(6); let b = new Array(6); let c = new Array(6); let d = new Array(6); let e = new Array(6); let f = new Array(6); let g = new Array(6); let h = new Array(6); let I = new Array(6); let j = new Array(6); let k = new Array(6); let l = new Array(6); let m = new Array(6); let n = new Array(6); let o = new Array(6); let p = new Array(6); let q = new Array(6); let r = new Array(6); let s = new Array(6); let t = new Array(6); let u = new Array(6); let v = new Array(6); let w = new Array(6); let x = new Array(6); let y = new Array(6); let z = new Array(6); let zero = new Array(6); let one = new Array(6); let two = new Array(6); let three = new Array(6); let four = new Array(6); let five = new Array(6); let six = new Array(6); let seven = new Array(6); let eight = new Array(6); let nine = new Array(6);
    a[0] = "     ___  ";	a[1] = "    /   | ";	a[2] = "   / /| | ";	a[3] = "  / / | | ";	a[4] = " / /  | | ";	a[5] = "/_/   |_| ";
    b[0] = " _____  ";		b[1] = "|  _  \\ ";		b[2] = "| |_| | ";		b[3] = "|  _  { ";		b[4] = "| |_| | ";		b[5] = "|_____/ ";
    c[0] = " _____  ";		c[1] = "/  ___| ";		c[2] = "| |     ";		c[3] = "| |     ";		c[4] = "| |___  ";		c[5] = "\\_____| ";
    d[0] = " _____  ";		d[1] = "|  _  \\ ";		d[2] = "| | | | ";		d[3] = "| | | | ";		d[4] = "| |_| | ";		d[5] = "|_____/ ";
    e[0] = " _____  ";		e[1] = "| ____| ";		e[2] = "| |__   ";		e[3] = "|  __|  ";		e[4] = "| |___  ";		e[5] = "|_____| ";
    f[0] = " _____  ";		f[1] = "|  ___| ";		f[2] = "| |__   ";		f[3] = "|  __|  ";		f[4] = "| |     ";		f[5] = "|_|     ";
    g[0] = " _____  ";		g[1] = "/  ___| ";		g[2] = "| |     ";		g[3] = "| |  _  ";		g[4] = "| |_| | ";		g[5] = "\\_____/ ";
    h[0] = " _   _  ";		h[1] = "| | | | ";		h[2] = "| |_| | ";		h[3] = "|  _  | ";		h[4] = "| | | | ";		h[5] = "|_| |_| ";
    I[0] = " _  ";			I[1] = "| | ";			I[2] = "| | ";			I[3] = "| | ";			I[4] = "| | ";			I[5] = "|_| ";
    j[0] = "     _  ";		j[1] = "    | | ";		j[2] = "    | | ";		j[3] = " _  | | ";		j[4] = "| |_| | ";		j[5] = "\\_____/ ";
    k[0] = " _   _   ";		k[1] = "| | / /  ";		k[2] = "| |/ /   ";		k[3] = "| |\\ \\   ";	k[4] = "| | \\ \\  ";	k[5] = "|_|  \\_\\ ";
    l[0] = " _      ";		l[1] = "| |     ";		l[2] = "| |     ";		l[3] = "| |     ";		l[4] = "| |___  ";		l[5] = "|_____| ";
    m[0] = "     ___  ___  ";	m[1] = "    /   |/   | ";	m[2] = "   / /|   /| | ";	m[3] = "  / / |__/ | | ";	m[4] = " / /       | | ";	m[5] = "/_/        |_| ";
    n[0] = " __   _  ";		n[1] = "|  \\ | | ";	n[2] = "|   \\| | ";	n[3] = "| |\\   | ";	n[4] = "| | \\  | ";	n[5] = "|_|  \\_| ";
    o[0] = " _____  ";		o[1] = "/  _  \\ ";		o[2] = "| | | | ";		o[3] = "| | | | ";		o[4] = "| |_| | ";		o[5] = "\\_____/ ";
    p[0] = " _____  ";		p[1] = "|  _  \\ ";		p[2] = "| |_| | ";		p[3] = "|  ___/ ";		p[4] = "| |     ";		p[5] = "|_|     ";
    q[0] = " _____    ";	q[1] = "/  _  \\   ";	q[2] = "| | | |   ";	q[3] = "| | | |   ";	q[4] = "| |_| |_  ";	q[5] = "\\_______| ";
    r[0] = " _____   ";		r[1] = "|  _  \\  ";	r[2] = "| |_| |  ";		r[3] = "|  _  /  ";		r[4] = "| | \\ \\  ";	r[5] = "|_|  \\_\\ ";
    s[0] = " _____  ";		s[1] = "/  ___/ ";		s[2] = "| |___  ";		s[3] = "\\___  \\ ";	s[4] = " ___| | ";		s[5] = "/_____/ ";
    t[0] = " _____  ";		t[1] = "|_   _| ";		t[2] = "  | |   ";		t[3] = "  | |   ";		t[4] = "  | |   ";		t[5] = "  |_|   ";
    u[0] = " _   _  ";		u[1] = "| | | | ";		u[2] = "| | | | ";		u[3] = "| | | | ";		u[4] = "| |_| | ";		u[5] = "\\_____/ ";
    v[0] = " _     _  ";	v[1] = "| |   / / ";	v[2] = "| |  / /  ";	v[3] = "| | / /   ";	v[4] = "| |/ /    ";	v[5] = "|___/     ";
    w[0] = " _          __ ";	w[1] = "| |        / / ";	w[2] = "| |  __   / /  ";	w[3] = "| | /  | / /   ";	w[4] = "| |/   |/ /    ";	w[5] = "|___/|___/     ";
    x[0] = "__    __ ";		x[1] = "\\ \\  / / ";	x[2] = " \\ \\/ /  ";	x[3] = "  }  {   ";		x[4] = " / /\\ \\  ";	x[5] = "/_/  \\_\\ ";
    y[0] = "__    __ ";		y[1] = "\\ \\  / / ";	y[2] = " \\ \\/ /  ";	y[3] = "  \\  /   ";	y[4] = "  / /    ";		y[5] = " /_/     ";
    z[0] = " ______ ";		z[1] = "|___  / ";		z[2] = "   / /  ";		z[3] = "  / /   ";		z[4] = " / /__  ";		z[5] = "/_____| ";
    zero[0] = " _____  ";	zero[1] = "/  _  \\ ";	zero[2] = "| | | | ";	zero[3] = "| |/| | ";	zero[4] = "| |_| | ";	zero[5] = "\\_____/ ";
    one[0] = " ___  ";		one[1] = "|_  | ";		one[2] = "  | | ";		one[3] = "  | | ";		one[4] = "  | | ";		one[5] = "  |_| ";
    two[0] = " _____  ";	two[1] = "/___  \\ ";	two[2] = " ___| | ";	two[3] = "/  ___/ ";	two[4] = "| |___  ";	two[5] = "|_____| ";
    three[0] = " _____  ";	three[1] = "|___  | ";	three[2] = "   _| | ";	three[3] = "  |_  { ";	three[4] = " ___| | ";	three[5] = "|_____/ ";
    four[0] = " _   _  ";	four[1] = "| | | | ";	four[2] = "| |_| | ";	four[3] = "\\___  | ";	four[4] = "    | | ";	four[5] = "    |_| ";
    five[0] = " _____  ";	five[1] = "|  ___| ";	five[2] = "| |___  ";	five[3] = "\\___  \\ ";	five[4] = " ___| | ";	five[5] = "\\_____| ";
    six[0] = " _____  ";	six[1] = "/  ___| ";	six[2] = "| |___  ";	six[3] = "|  _  \\ ";	six[4] = "| |_| | ";	six[5] = "\\_____/ ";
    seven[0] = " _____  ";	seven[1] = "|___  | ";	seven[2] = "    / / ";	seven[3] = "   / /  ";	seven[4] = "  / /   ";	seven[5] = " /_/    ";
    eight[0] = " _____  ";	eight[1] = "/  _  \\ ";	eight[2] = "| |_| | ";	eight[3] = "}  _  { ";	eight[4] = "| |_| | ";	eight[5] = "\\_____/ ";
    nine[0] = " _____  ";	nine[1] = "/  _  \\ ";	nine[2] = "| |_| | ";	nine[3] = "\\___  | ";	nine[4] = " ___| | ";	nine[5] = "|_____/ ";
 
    for(i=0; i < inputText.length; i++) {
        if(inputText.charAt(i) == " ") {line0 += space; 	line1 += space; 	line2 += space; 	line3 += space;		line4 += space;		line5 += space}
        if(inputText.charAt(i) == "a") {line0 += a[0]; 		line1 += a[1];		line2 += a[2]; 		line3 += a[3];		line4 += a[4];		line5 += a[5]}
        if(inputText.charAt(i) == "b") {line0 += b[0]; 		line1 += b[1]; 		line2 += b[2]; 		line3 += b[3];		line4 += b[4];		line5 += b[5]}
        if(inputText.charAt(i) == "c") {line0 += c[0]; 		line1 += c[1]; 		line2 += c[2]; 		line3 += c[3];		line4 += c[4];		line5 += c[5]}
        if(inputText.charAt(i) == "d") {line0 += d[0]; 		line1 += d[1]; 		line2 += d[2]; 		line3 += d[3];		line4 += d[4];		line5 += d[5]}
        if(inputText.charAt(i) == "e") {line0 += e[0]; 		line1 += e[1]; 		line2 += e[2]; 		line3 += e[3];		line4 += e[4];		line5 += e[5]}
        if(inputText.charAt(i) == "f") {line0 += f[0]; 		line1 += f[1]; 		line2 += f[2]; 		line3 += f[3];		line4 += f[4];		line5 += f[5]}
        if(inputText.charAt(i) == "g") {line0 += g[0]; 		line1 += g[1];	 	line2 += g[2]; 		line3 += g[3];		line4 += g[4];		line5 += g[5]}
        if(inputText.charAt(i) == "h") {line0 += h[0]; 		line1 += h[1]; 		line2 += h[2]; 		line3 += h[3];		line4 += h[4];		line5 += h[5]}
        if(inputText.charAt(i) == "i") {line0 += I[0]; 		line1 += I[1]; 		line2 += I[2]; 		line3 += I[3];		line4 += I[4];		line5 += I[5]}
        if(inputText.charAt(i) == "j") {line0 += j[0]; 		line1 += j[1]; 		line2 += j[2]; 		line3 += j[3];		line4 += j[4];		line5 += j[5]}
        if(inputText.charAt(i) == "k") {line0 += k[0]; 		line1 += k[1];		line2 += k[2]; 		line3 += k[3];		line4 += k[4];		line5 += k[5]}
        if(inputText.charAt(i) == "l") {line0 += l[0]; 		line1 += l[1]; 		line2 += l[2]; 		line3 += l[3];		line4 += l[4];		line5 += l[5]}
        if(inputText.charAt(i) == "m") {line0 += m[0]; 		line1 += m[1]; 		line2 += m[2]; 		line3 += m[3];		line4 += m[4];		line5 += m[5]}
        if(inputText.charAt(i) == "n") {line0 += n[0];	 	line1 += n[1]; 		line2 += n[2]; 		line3 += n[3];		line4 += n[4];		line5 += n[5]}
        if(inputText.charAt(i) == "o") {line0 += o[0]; 		line1 += o[1];	 	line2 += o[2]; 		line3 += o[3];		line4 += o[4];		line5 += o[5]}
        if(inputText.charAt(i) == "p") {line0 += p[0]; 		line1 += p[1]; 		line2 += p[2]; 		line3 += p[3];		line4 += p[4];		line5 += p[5]}
        if(inputText.charAt(i) == "q") {line0 += q[0]; 		line1 += q[1];	 	line2 += q[2]; 		line3 += q[3];		line4 += q[4];		line5 += q[5]}
        if(inputText.charAt(i) == "r") {line0 += r[0]; 		line1 += r[1];	 	line2 += r[2]; 		line3 += r[3];		line4 += r[4];		line5 += r[5]}
        if(inputText.charAt(i) == "s") {line0 += s[0]; 		line1 += s[1];	 	line2 += s[2]; 		line3 += s[3];		line4 += s[4];		line5 += s[5]}
        if(inputText.charAt(i) == "t") {line0 += t[0]; 		line1 += t[1];	 	line2 += t[2]; 		line3 += t[3];		line4 += t[4];		line5 += t[5]}
        if(inputText.charAt(i) == "u") {line0 += u[0]; 		line1 += u[1]; 		line2 += u[2]; 		line3 += u[3];		line4 += u[4];		line5 += u[5]}
        if(inputText.charAt(i) == "v") {line0 += v[0];	 	line1 += v[1]; 		line2 += v[2]; 		line3 += v[3];		line4 += v[4];		line5 += v[5]}
        if(inputText.charAt(i) == "w") {line0 += w[0]; 		line1 += w[1]; 		line2 += w[2]; 		line3 += w[3];		line4 += w[4];		line5 += w[5]}
        if(inputText.charAt(i) == "x") {line0 += x[0]; 		line1 += x[1]; 		line2 += x[2]; 		line3 += x[3];		line4 += x[4];		line5 += x[5]}
        if(inputText.charAt(i) == "y") {line0 += y[0]; 		line1 += y[1]; 		line2 += y[2]; 		line3 += y[3];		line4 += y[4];		line5 += y[5]}
        if(inputText.charAt(i) == "z") {line0 += z[0];	 	line1 += z[1]; 		line2 += z[2]; 		line3 += z[3];		line4 += z[4];		line5 += z[5]}
        if(inputText.charAt(i) == "0") {line0 += zero[0]; 	line1 += zero[1]; 	line2 += zero[2]; 	line3 += zero[3];	line4 += zero[4];	line5 += zero[5]}
        if(inputText.charAt(i) == "1") {line0 += one[0]; 	line1 += one[1]; 	line2 += one[2]; 	line3 += one[3];	line4 += one[4];	line5 += one[5]}
        if(inputText.charAt(i) == "2") {line0 += two[0]; 	line1 += two[1]; 	line2 += two[2]; 	line3 += two[3];	line4 += two[4];	line5 += two[5]}
        if(inputText.charAt(i) == "3") {line0 += three[0];	line1 += three[1];	line2 += three[2]; 	line3 += three[3];	line4 += three[4];	line5 += three[5]}
        if(inputText.charAt(i) == "4") {line0 += four[0]; 	line1 += four[1]; 	line2 += four[2]; 	line3 += four[3];	line4 += four[4];	line5 += four[5]}
        if(inputText.charAt(i) == "5") {line0 += five[0]; 	line1 += five[1]; 	line2 += five[2]; 	line3 += five[3];	line4 += five[4];	line5 += five[5]}
        if(inputText.charAt(i) == "6") {line0 += six[0]; 	line1 += six[1]; 	line2 += six[2]; 	line3 += six[3];	line4 += six[4];	line5 += six[5]}
        if(inputText.charAt(i) == "7") {line0 += seven[0];	line1 += seven[1];	line2 += seven[2]; 	line3 += seven[3];	line4 += seven[4];	line5 += seven[5]}
        if(inputText.charAt(i) == "8") {line0 += eight[0];	line1 += eight[1];	line2 += eight[2]; 	line3 += eight[3];	line4 += eight[4];	line5 += eight[5]}
        if(inputText.charAt(i) == "9") {line0 += nine[0]; 	line1 += nine[1]; 	line2 += nine[2]; 	line3 += nine[3];	line4 += nine[4];	line5 += nine[5]}
    }
    let outputText = line0+"\n"+line1+"\n"+line2+"\n"+line3+"\n"+line4+"\n"+line5;
    document.getElementById("outputField").value = outputText;
}
 
function buildStyle3(inputText,booleanRepeat) {
    let line0 = ""; let line1 = ""; let line2 = ""; let space = "  "; let a = new Array(3); let b = new Array(3); let c = new Array(3); let d = new Array(3); let e = new Array(3); let f = new Array(3); let g = new Array(3); let h = new Array(3); let I = new Array(3); let j = new Array(3); let k = new Array(3); let l = new Array(3); let m = new Array(3); let n = new Array(3); let o = new Array(3); let p = new Array(3); let q = new Array(3); let r = new Array(3); let s = new Array(3); let t = new Array(3); let u = new Array(3); let v = new Array(3); let w = new Array(3); let x = new Array(3); let y = new Array(3); let z = new Array(3); let zero = new Array(3); let one = new Array(3); let two = new Array(3); let three = new Array(3); let four = new Array(3); let five = new Array(3); let six = new Array(3); let seven = new Array(3); let eight = new Array(3); let nine = new Array(3);
    a[0] = "/¯\\ ";		a[1] = "|¯| ";		a[2] = "    ";
    b[0] = "|¯/ ";		b[1] = "|¯/ ";		b[2] = " ¯  ";
    c[0] = "|¯ ";		c[1] = "|_ ";		c[2] = "   ";
    d[0] = "|¯\\ ";		d[1] = "|_/ ";		d[2] = "    ";
    e[0] = "|¯ ";		e[1] = "|¯ ";		e[2] = " ¯ ";
    f[0] = "|¯ ";		f[1] = "|¯ ";		f[2] = "   ";
    g[0] = "|¯  ";		g[1] = "| | ";		g[2] = " ¯  ";
    h[0] = "| | ";		h[1] = "|¯| ";		h[2] = "    ";
    I[0] = "| ";		I[1] = "| ";		I[2] = "  ";
    j[0] = " ¯|¯ ";		j[1] = "|_|  ";		j[2] = "     ";
    k[0] = "|/  ";		k[1] = "|¯\\ ";		k[2] = "    ";
    l[0] = "|  ";		l[1] = "|_ ";		l[2] = "   ";
    m[0] = "|\\/| ";	m[1] = "|  | ";		m[2] = "     ";
    n[0] = "|\\| ";		n[1] = "| | ";		n[2] = "    ";
    o[0] = "|¯| ";		o[1] = "|_| ";		o[2] = "    ";
    p[0] = "|¯| ";		p[1] = "|¯  ";		p[2] = "    ";
    q[0] = "|¯|  ";		q[1] = "|_|¬ ";		q[2] = "     ";
    r[0] = "|¯| ";		r[1] = "|¯\\ ";		r[2] = "    ";
    s[0] = "|¯  ";		s[1] = " ¯| ";		s[2] = " ¯  ";
    t[0] = |¯ ";		t[1] = " |  ";		t[2] = "    ";
    u[0] = "| | ";		u[1] = "|_| ";		u[2] = "    ";
    v[0] = "\\ | ";		v[1] = " \\| ";		v[2] = "    ";
    w[0] = "\\ |\\ | ";	w[1] = " \\| \\| ";	w[2] = "       ";
    x[0] = "\\/ ";		x[1] = "/\\ ";		x[2] = "   ";
    y[0] = "\\| ";		y[1] = " | ";		y[2] = "   ";
    z[0] = "¯/ ";		z[1] = "/_ ";		z[2] = "   ";
    zero[0] = "|¯| ";	zero[1] = "|/| ";	zero[2] = " ¯  ";
    one[0] = "'| ";		one[1] = " | ";		one[2] = "   ";
    two[0] = " ¯| ";	two[1] = "|¯  ";	two[2] = " ¯  ";
    three[0] = | ";	three[1] = | ";	three[2] = "¯  ";
    four[0] = "/ | ";	four[1] = " ¯| ";	four[2] = "    ";
    five[0] = "|¯  ";	five[1] = " ¯| ";	five[2] = " ¯  ";
    six[0] = "|¯  ";	six[1] = "|¯| ";	six[2] = " ¯  ";
    seven[0] = "¯/ ";	seven[1] = "/  ";	seven[2] = "   ";
    eight[0] = "|¯| ";	eight[1] = "|¯| ";	eight[2] = " ¯  ";
    nine[0] = "|¯| ";	nine[1] = " ¯| ";	nine[2] = "    ";
 
    for(i=0; i < inputText.length; i++) {
        if(inputText.charAt(i) == " ") {line0 += space; 	line1 += space; 	line2 += space}
        if(inputText.charAt(i) == "a") {line0 += a[0]; 		line1 += a[1];		line2 += a[2]}
        if(inputText.charAt(i) == "b") {line0 += b[0]; 		line1 += b[1]; 		line2 += b[2]}
        if(inputText.charAt(i) == "c") {line0 += c[0]; 		line1 += c[1]; 		line2 += c[2]}
        if(inputText.charAt(i) == "d") {line0 += d[0]; 		line1 += d[1]; 		line2 += d[2]}
        if(inputText.charAt(i) == "e") {line0 += e[0]; 		line1 += e[1]; 		line2 += e[2]}
        if(inputText.charAt(i) == "f") {line0 += f[0]; 		line1 += f[1]; 		line2 += f[2]}
        if(inputText.charAt(i) == "g") {line0 += g[0]; 		line1 += g[1];	 	line2 += g[2]}
        if(inputText.charAt(i) == "h") {line0 += h[0]; 		line1 += h[1]; 		line2 += h[2]}
        if(inputText.charAt(i) == "i") {line0 += I[0]; 		line1 += I[1]; 		line2 += I[2]}
        if(inputText.charAt(i) == "j") {line0 += j[0]; 		line1 += j[1]; 		line2 += j[2]}
        if(inputText.charAt(i) == "k") {line0 += k[0]; 		line1 += k[1];		line2 += k[2]}
        if(inputText.charAt(i) == "l") {line0 += l[0]; 		line1 += l[1]; 		line2 += l[2]}
        if(inputText.charAt(i) == "m") {line0 += m[0]; 		line1 += m[1]; 		line2 += m[2]}
        if(inputText.charAt(i) == "n") {line0 += n[0];	 	line1 += n[1]; 		line2 += n[2]}
        if(inputText.charAt(i) == "o") {line0 += o[0]; 		line1 += o[1];	 	line2 += o[2]}
        if(inputText.charAt(i) == "p") {line0 += p[0]; 		line1 += p[1]; 		line2 += p[2]}
        if(inputText.charAt(i) == "q") {line0 += q[0]; 		line1 += q[1];	 	line2 += q[2]}
        if(inputText.charAt(i) == "r") {line0 += r[0]; 		line1 += r[1];	 	line2 += r[2]}
        if(inputText.charAt(i) == "s") {line0 += s[0]; 		line1 += s[1];	 	line2 += s[2]}
        if(inputText.charAt(i) == "t") {line0 += t[0]; 		line1 += t[1];	 	line2 += t[2]}
        if(inputText.charAt(i) == "u") {line0 += u[0]; 		line1 += u[1]; 		line2 += u[2]}
        if(inputText.charAt(i) == "v") {line0 += v[0];	 	line1 += v[1]; 		line2 += v[2]}
        if(inputText.charAt(i) == "w") {line0 += w[0]; 		line1 += w[1]; 		line2 += w[2]}
        if(inputText.charAt(i) == "x") {line0 += x[0]; 		line1 += x[1]; 		line2 += x[2]}
        if(inputText.charAt(i) == "y") {line0 += y[0]; 		line1 += y[1]; 		line2 += y[2]}
        if(inputText.charAt(i) == "z") {line0 += z[0];	 	line1 += z[1]; 		line2 += z[2]}
        if(inputText.charAt(i) == "0") {line0 += zero[0]; 	line1 += zero[1]; 	line2 += zero[2]}
        if(inputText.charAt(i) == "1") {line0 += one[0]; 	line1 += one[1]; 	line2 += one[2]}
        if(inputText.charAt(i) == "2") {line0 += two[0]; 	line1 += two[1]; 	line2 += two[2]}
        if(inputText.charAt(i) == "3") {line0 += three[0];	line1 += three[1];	line2 += three[2]}
        if(inputText.charAt(i) == "4") {line0 += four[0]; 	line1 += four[1]; 	line2 += four[2]}
        if(inputText.charAt(i) == "5") {line0 += five[0]; 	line1 += five[1]; 	line2 += five[2]}
        if(inputText.charAt(i) == "6") {line0 += six[0]; 	line1 += six[1]; 	line2 += six[2]}
        if(inputText.charAt(i) == "7") {line0 += seven[0];	line1 += seven[1];	line2 += seven[2]}
        if(inputText.charAt(i) == "8") {line0 += eight[0];	line1 += eight[1];	line2 += eight[2]}
        if(inputText.charAt(i) == "9") {line0 += nine[0]; 	line1 += nine[1]; 	line2 += nine[2]}
    }
    let outputText = line0+"\n"+line1+"\n"+line2;
    document.getElementById("outputField").value = outputText;
}
 
</script>



Comentarios sobre la versión: Versión 1.0 (3)

Imágen de perfil
4 de Mayo del 2019
estrellaestrellaestrellaestrellaestrella
No ha dejado ningún comentario
Responder
Jose Enrique
31 de Mayo del 2019
estrellaestrellaestrellaestrellaestrella
Super Bueno que está, tanto que hasta se lo enseñé a mis amigos.
Responder
Imágen de perfil
5 de Agosto del 2019
estrellaestrellaestrellaestrellaestrella
No ha dejado ningún comentario
Responder

Comentar la versión: Versión 1.0

Nombre
Correo (no se visualiza en la web)
Valoración
Comentarios...
CerrarCerrar
CerrarCerrar
Cerrar

Tienes que ser un usuario registrado para poder insertar imágenes, archivos y/o videos.

Puedes registrarte o validarte desde aquí.

Codigo
Negrita
Subrayado
Tachado
Cursiva
Insertar enlace
Imagen externa
Emoticon
Tabular
Centrar
Titulo
Linea
Disminuir
Aumentar
Vista preliminar
sonreir
dientes
lengua
guiño
enfadado
confundido
llorar
avergonzado
sorprendido
triste
sol
estrella
jarra
camara
taza de cafe
email
beso
bombilla
amor
mal
bien
Es necesario revisar y aceptar las políticas de privacidad

http://lwp-l.com/s5288