Código de HTML - Corredor_ Dance

Imágen de perfil

Corredor_ Dancegráfica de visualizaciones


HTML

Actualizado el 5 de Marzo del 2022 por Javier (Publicado el 28 de Febrero del 2022)
1.905 visualizaciones desde el 28 de Febrero del 2022
Se basa en la aplicación de la API de animaciones de javascript API ANIMATE.
En este caso se trata de un muñeco, Corredor lo llamo, que hace eso, correr.
Pero ademas puedes interactuar con el con una serie de inputs range, para darle mas o menos velocidad a cada parte de su cuerpo, y hasta lo puedes hacer como bailar.

Requerimientos

Solo ejecutar el archivo en tu PC o Teléfono.

Versión 1.0

Publicado el 28 de Febrero del 2022gráfica de visualizaciones de la versión: Versión 1.0
248 visualizaciones desde el 28 de Febrero del 2022
estrellaestrellaestrellaestrellaestrella
estrellaestrellaestrellaestrella
estrellaestrellaestrella
estrellaestrella
estrella

Todo se puede mejorar, esta versión es una mas hasta que consigo una animación fluida.
Se basa en la aplicación de la API de animaciones de javascript API ANIMATE.
En este caso se trata de un muñeco, Corredor lo llamo, que hace eso, correr.
Pero ademas puedes interactuar con el con una serie de inputs range, para darle mas o menos velocidad a cada parte de su cuerpo, y hasta lo puedes hacer como bailar.
Y eso es todo, espero que aprendáis como yo aprendo de vosotros gracias a vuestras colaboraciones.
Por que yo digo que yo se lo que se, gracias a todos vosotros y a paginas como LWP.
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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
<!DOCTYPE html>
<html>
 
<head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>C O R R E D O R</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <style>
body {
    background-color: black;
}
 
#Pause {
    position: fixed;
    margin-left: 125px;
    margin-top: 10px;
    width: 90px;
    height: 35px;
    background-color: black;
    color: antiquewhite;
    border: 1px solid #ddd;
}
 
#Play {
    position: fixed;
    margin-left: 15px;
    margin-top: 10px;
    width: 90px;
    height: 35px;
    background-color: black;
    color: antiquewhite;
    border: 1px solid #ddd;
}
 
#dance {
    position: fixed;
    margin-left: 15px;
    margin-top: 60px;
    width: 90px;
    height: 35px;
    background-color: black;
    color: antiquewhite;
    border: 1px solid #ddd;
}
 
#reset {
    position: fixed;
    margin-left: 15px;
    margin-top: 60px;
    width: 90px;
    height: 35px;
    background-color: black;
    color: antiquewhite;
    border: 1px solid #ddd;
    visibility: hidden;
    display: none;
}
 
#Velocidad {
    text-align: center;
    background-color: black;
    position: fixed;
    margin-top: 8px;
    margin-left: 235px;
    width: 180px;
    height: 70px;
    border: 1px solid #ddd;
}
 
#label_Max_Min, #label_HD, #label_AD, #label_HI, #label_AI, #label_MD, #label_TD, #label_MI, #label_TI {
    font-size: 14px;
    color: chartreuse;
}
 
#Max_Min ,#HD, #AD, #HI, #AI, #MD, #TD, #MI, #TI {
    margin:calc(5%);
}
 
#Displaydance {
    text-align: center;
    background-color: transparent;
    position: fixed;
    margin-top: 90px;
    margin-left: 235px;
    width: 180px;
    height: 440px;
    border: 1px solid #ddd;
    visibility: hidden;
    display: none;
}
 
#humero_der {
    background-color: blue;
    width: 22px;
    height: 90px;
    border-radius: 20px;
    border: 5px solid red;
    position: fixed;
    margin-top: 180px;
    margin-left: 200px;
    transform-origin: 50% 0%; /*transform-origin: 50% 20%; CENTRADO*/
    transform: rotate(0deg);
    z-index: -1;
}
 
#antebrazo_der {
    background-color: blue;
    width: 22px;
    height: 60px;
    border-radius: 20px;
    border: 5px solid red;
    position: relative;
    margin-top: 77px;
    margin-left: 0px;
    transform-origin: 50% 0%;
    transform: rotate(0deg);
    z-index: -1;
}
 
#humero_izq {
    background-color: chartreuse;
    width: 22px;
    height: 90px;
    border-radius: 20px;
    border: 5px solid red;
    position: fixed;
    margin-top: 180px;
    margin-left: 200px;
    transform-origin: 50% 0%; /*transform-origin: 50% 20%; CENTRADO*/
    transform: rotate(0deg);
}
 
#antebrazo_izq {
    background-color: chartreuse;
    width: 22px;
    height: 60px;
    border-radius: 20px;
    border: 5px solid red;
    position: fixed;
    margin-top: 77px;
    margin-left: 0px;
    transform-origin: 50% 0%;
    transform: rotate(0deg);
    z-index: 1;
}
 
#muslo_der {
    background-color: blue;
    width: 30px;
    height: 110px;
    border-radius: 20px;
    border: 5px solid red;
    position: fixed;
    margin-top: 300px;
    margin-left: 200px;
    transform-origin: 50% 5%; /*transform-origin: 50% 20%; CENTRADO*/
    transform: rotate(0deg);
    z-index: -1;
}
 
#muslo_izq {
    background-color: chartreuse;
    width: 30px;
    height: 110px;
    border-radius: 20px;
    border: 5px solid red;
    position: fixed;
    margin-top: 300px;
    margin-left: 200px;
    transform-origin: 50% 5%; /*transform-origin: 50% 20%; CENTRADO*/
    transform: rotate(0deg);
    z-index: -1;
}
 
#tibia_der {
    background-color: blue;
    width: 25px;
    height: 110px;
    border-radius: 20px;
    border: 5px solid red;
    position: relative;
    margin-top: 100px;
    margin-left: -6px;
    transform-origin: 50% 0%; /*transform-origin: 50% 20%; CENTRADO*/
    transform: rotate(0deg);
}
 
#tibia_izq {
    background-color: chartreuse;
    width: 25px;
    height: 110px;
    border-radius: 20px;
    border: 5px solid red;
    position: relative;
    margin-top: 100px;
    margin-left: -6px;
    transform-origin: 50% 0%;
    transform: rotate(0deg);
}
 
#pie_der {
    background-color: blue;
    width: 20px;
    height: 65px;
    border-radius: 15px;
    border: 5px solid red;
    position: relative;
    margin-top: 100px;
    margin-left: 16px;
    transform-origin: 50% 0%;
    transform: rotate(90deg);
}
 
#pie_izq {
    background-color: chartreuse;
    width: 20px;
    height: 65px;
    border-radius: 15px;
    border: 5px solid red;
    position: relative;
    margin-top: 100px;
    margin-left: 16px;
    transform-origin: 50% 0%;
    transform: rotate(90deg);
}
 
#mano_der {
    background-color: blue;
    width: 20px;
    height: 35px;
    border-radius: 15px;
    border: 5px solid red;
    position: relative;
    margin-top: 40px;
    margin-left: 5px;
    transform-origin: 50% 0%;
    transform: rotate(30deg);
}
 
#mano_izq {
    background-color: chartreuse;
    width: 20px;
    height: 35px;
    border-radius: 15px;
    border: 5px solid red;
    position: relative;
    margin-top: 40px;
    margin-left: 5px;
    transform-origin: 50% 0%;
    transform: rotate(30deg);
}
 
</style>
</head>
 
<body>
 
    <div id="humero_der">
        <div id="antebrazo_der">
            <div id="mano_der"></div>
        </div>
    </div>
 
    <div id="humero_izq">
        <div id="antebrazo_izq">
            <div id="mano_izq"></div>
        </div>
    </div>
 
    <div id="muslo_der">
        <div id="tibia_der">
            <div id="pie_der"></div>
        </div>
    </div>
 
    <div id="muslo_izq">
        <div id="tibia_izq">
            <div id="pie_izq"></div>
        </div>
    </div>
 
 
    <button type="button" id="Play" onclick="corredor()"> Play </button>
    <button type="button" id="Pause" onclick="pause()"> Pause </button>
    <button type="button" id="dance" onclick="dance()"> Dance </button>
    <button type="button" id="reset" onclick="reset()"> Reset </button>
 
    <div id="Velocidad">
        <br>
        <label id="label_Max_Min">Mas / Menos ( Velocidad )</label>
        <input type="range" value="1" id="Max_Min" max="2" min="0" step="0.1" onchange="DisplayChange()">
    </div>
 
    <div id="Displaydance">
        <br>
        <label id="label_HD">Humero Der</label>
        <input type="range" value="1" id="HD" max="2" min="0" step="0.1" onchange="corredor()">
 
        <label id="label_AD">Antebrazo Der</label>
        <input type="range" value="1" id="AD" max="2" min="0" step="0.1" onchange="corredor()">
 
        <label id="label_HI">Humero Izq</label>
        <input type="range" value="1" id="HI" max="2" min="0" step="0.1" onchange="corredor()">
 
        <label id="label_AI">Antebrazo Izq</label>
        <input type="range" value="1" id="AI" max="2" min="0" step="0.1" onchange="corredor()">
 
        <label id="label_MD">Muslo Der</label>
        <input type="range" value="1" id="MD" max="2" min="0" step="0.1" onchange="corredor()">
 
        <label id="label_TD">Tibia Der</label>
        <input type="range" value="1" id="TD" max="2" min="0" step="0.1" onchange="corredor()">
 
        <label id="label_MI">Muslo Izq</label>
        <input type="range" value="1" id="MI" max="2" min="0" step="0.1" onchange="corredor()">
 
        <label id="label_TI">Tibia Izq</label>
        <input type="range" value="1" id="TI" max="2" min="0" step="0.1" onchange="corredor()">
    </div>
<script>
//PLAY BOTON
function corredor() {
 
    document.getElementById('dance').style.display = 'block'
    document.getElementById('dance').style.visibility = 'visible'
 
    var H_D = document.getElementById('HD').value * 1000;
    var A_D = document.getElementById('AD').value * 1000;
    var H_I = document.getElementById('HI').value * 1000;
    var A_I = document.getElementById('AI').value * 1000;
    var M_D = document.getElementById('MD').value * 1000;
    var T_D = document.getElementById('TD').value * 1000;
    var M_I = document.getElementById('MI').value * 1000;
    var T_I = document.getElementById('TI').value * 1000;
 
    var HD = document.getElementById('humero_der')
    var AD = document.getElementById('antebrazo_der')
    var HI = document.getElementById('humero_izq')
    var AI = document.getElementById('antebrazo_izq')
    var MD = document.getElementById('muslo_der')
    var TD = document.getElementById('tibia_der')
    var MI = document.getElementById('muslo_izq')
    var TI = document.getElementById('tibia_izq')
 
    document.getElementById('Max_Min').value = 1;
 
    // HUMERO DERECHO 0
    HD.animate([
        { transform: 'rotate(0deg)' },
        { transform: 'rotate(-60deg)' },
        { transform: 'rotate(0deg)' },
        { transform: 'rotate(50deg)' },
        { transform: 'rotate(0deg)' }
    ],
        { duration: H_D, iterations: 'Infinity', easing: 'linear', fill: 'forwards' });
 
    // ANTEBRAZO DERECHO 1
    AD.animate([
        { transform: 'rotate(0deg)' },
        { transform: 'rotate(70deg)' },
        { transform: 'rotate(90deg)' },
        { transform: 'rotate(40deg)' },
        { transform: 'rotate(0deg)' }
    ],
        { duration: A_D, iterations: 'Infinity', easing: 'linear', fill: 'forwards' });
    //, direction: 'alternate'
 
    // HUMERO IZQUIERDO 2
    HI.animate([
        { transform: 'rotate(0deg)' },
        { transform: 'rotate(60deg)' },
        { transform: 'rotate(0deg)' },
        { transform: 'rotate(-50deg)' },
        { transform: 'rotate(0deg)' }
    ],
        { duration: H_I, iterations: 'Infinity', easing: 'linear', fill: 'forwards' });
 
    // ANTEBRAZO IZQUIERDO 3
    AI.animate([
        { transform: 'rotate(0deg)' },
        { transform: 'rotate(70deg)' },
        { transform: 'rotate(90deg)' },
        { transform: 'rotate(40deg)' },
        { transform: 'rotate(0deg)' }
    ],
        { duration: A_I, iterations: 'Infinity', easing: 'linear', fill: 'forwards' });
 
    // MUSLO DERECHO 4
    MD.animate([
        { transform: 'rotate(0deg)' },
        { transform: 'rotate(50deg)' },
        { transform: 'rotate(20deg)' },
        { transform: 'rotate(-40deg)' },
        { transform: 'rotate(0deg)' }
    ],
        { duration: M_D, iterations: 'Infinity', easing: 'linear', fill: 'forwards' });
 
    // TIBIA DERECHO 5
    TD.animate([
        { transform: 'rotate(0deg)' },
        { transform: 'rotate(-30deg)' },
        { transform: 'rotate(-60deg)' },
        { transform: 'rotate(0deg)' }
    ],
        { duration: T_D, iterations: 'Infinity', easing: 'linear', fill: 'forwards' });
 
    // MUSLO IZQUIERDO 6
    MI.animate([
        { transform: 'rotate(0deg)' },
        { transform: 'rotate(-40deg)' },
        { transform: 'rotate(20deg)' },
        { transform: 'rotate(50deg)' },
        { transform: 'rotate(0deg)' }
    ],
        { duration: M_I, iterations: 'Infinity', easing: 'linear', fill: 'forwards' });
 
    // TIBIA IZQUIERDO 7
    TI.animate([
        { transform: 'rotate(0deg)' },
        { transform: 'rotate(-60deg)' },
        { transform: 'rotate(-30deg)' },
        { transform: 'rotate(0deg)' }
    ],
        { duration: T_I, iterations: 'Infinity', easing: 'linear', fill: 'forwards' });
}
 
//PAUSE BOTON
function pause() {
    var x = document.getAnimations();
    var i;
    for (i = 0; i < x.length; i++) { x[i].pause(); }
}
 
//VELOCIDAD RANGE
function DisplayChange() {
    var x = document.getAnimations();
    var c = document.getElementById('Max_Min');
    var i;
    for (i = 0; i < x.length; i++) { x[i].playbackRate = c.value; }
}
 
function reset() {
 
    document.getElementById('Displaydance').style.display = 'none'
    document.getElementById('Displaydance').style.visibility = 'hidden'
 
    document.getElementById('reset').style.display = 'none'
    document.getElementById('reset').style.visibility = 'hidden'
 
    document.getElementById('HD').value = 1;
    document.getElementById('AD').value = 1;
    document.getElementById('HI').value = 1;
    document.getElementById('AI').value = 1;
    document.getElementById('MD').value = 1;
    document.getElementById('TD').value = 1;
    document.getElementById('MI').value = 1;
    document.getElementById('TI').value = 1;
 
    corredor();
}
 
function dance() {
 
    document.getElementById('Displaydance').style.display = 'block'
    document.getElementById('Displaydance').style.visibility = 'visible'
 
    document.getElementById('dance').style.display = 'none'
    document.getElementById('dance').style.visibility = 'hidden'
 
    document.getElementById('reset').style.display = 'block'
    document.getElementById('reset').style.visibility = 'visible'
}
 
</script>
</body>
 
</html>



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


No hay comentarios
 

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

Versión 1.0 rar

Publicado el 28 de Febrero del 2022gráfica de visualizaciones de la versión: Versión 1.0 rar
1.659 visualizaciones desde el 28 de Febrero del 2022
http://lwp-l.com/s7202