Skip to content

Commit 73c02b0

Browse files
committed
change resolution for game on, loads faster, camera and video work together
1 parent 209fff1 commit 73c02b0

File tree

1 file changed

+24
-118
lines changed

1 file changed

+24
-118
lines changed

videosOrginalFuncional.js

Lines changed: 24 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ let randomFrameEffect = true;
4040
let playSimpleVideo = false; //random videos
4141
let oneVideo = true; // efects wonk work when false // just 1.mp4
4242

43-
let cameraVideo = false; //estaba true
43+
let cameraVideo = true; //estaba true
4444
let OnlyCamera = false; // GETS ERROR FROM GENERATOR // maybe because generator ins embeded into renderVIdeos()
45-
let cameraEffect = false; // estaba true
45+
let cameraEffect = true; // estaba true
4646

4747

4848
/////////------------------------------------------------- MOBILE NET VIDEO ----------
@@ -245,7 +245,9 @@ function preload() { // To add things that take time to load
245245
function setup() {
246246
noCursor();
247247

248-
createCanvas(windowWidth, windowHeight);
248+
// createCanvas(windowWidth, windowHeight);
249+
createCanvas(1920, 1080);
250+
249251
frameRate(30);
250252
pixelDensity(1);
251253

@@ -266,7 +268,9 @@ function setup() {
266268
if (OnlyCamera || cameraVideo) {
267269
v_Cam_Scale = 1;
268270

269-
myCamera.size(width / v_Cam_Scale, height / v_Cam_Scale);
271+
// myCamera.size(width / v_Cam_Scale, height / v_Cam_Scale);
272+
myCamera.size(1920 / v_Cam_Scale, 1080 / v_Cam_Scale);
273+
270274
myCamera.hide();
271275
}
272276

@@ -331,6 +335,7 @@ function draw() {
331335

332336
// // terminal = false;
333337

338+
334339
// if (showCamera == 200) {
335340
// cameraON = false;
336341
// videoON = true;
@@ -373,6 +378,20 @@ function draw() {
373378
renderVideos();
374379
// }
375380

381+
// showCamera++;
382+
// console.log('camera: ' + showCamera++);
383+
//
384+
// if (showCamera == 700) {
385+
// renderCamera(); // FUNCIONA PERO SIN TEXTO
386+
387+
// cameraON = false;
388+
// videoON = true;
389+
// console.log('render camera is 200');
390+
391+
392+
// }
393+
394+
376395
// extraText();
377396

378397

@@ -381,7 +400,7 @@ function draw() {
381400
// DoTextHiperpoesia();
382401
// console.log(rnnSub);
383402

384-
//cuadradito para subtitulos
403+
//cuadradito para acentuar subtitulos
385404
fill(0, 95);
386405
rect(0, windowHeight - 160, windowWidth, 200);
387406

@@ -426,119 +445,6 @@ function menuComands() {
426445

427446
// ---------------------------------------
428447

429-
// function DoText() {
430-
// // TERMINAL TEXT
431-
// let posXtextT = windowWidth - (windowWidth - 100);
432-
// let posYtextT = windowHeight - 600;
433-
// let w = 325;
434-
// let h = 400;
435-
// let color = 250;
436-
437-
// textAlign(LEFT);
438-
// if (offline) {
439-
// textFont("Arial");
440-
// } else {
441-
// textFont("Ubuntu Mono");
442-
// }
443-
444-
// textSize(20);
445-
// fill(color);
446-
// noStroke();
447-
// textLeading(30);
448-
449-
// if (translate) {
450-
// sourceText = 'Generando narrativa...' +
451-
// '\nElemento encontrado: ' +
452-
// translatedRes + //latinamerican model
453-
// '. \nEnviando a narrador.. ' +
454-
// // ' \nTambién he encontrado un ' +
455-
// // mbNetLabel1 +
456-
// '\nCreo estar ' +
457-
// mbNetConfidence +
458-
// ' segure...' +
459-
// '\nActualizando narrativa...';
460-
// } else {
461-
// sourceText = 'Generating narrative...' +
462-
// '\nElements found: ' +
463-
// mbNetLabel0 + // XIX travel model
464-
// '. \nSending to narrator.. ' +
465-
// ' \nAlso found a ' +
466-
// mbNetLabel1 +
467-
// ', I am ' +
468-
// mbNetConfidence +
469-
// ' sure of that...' +
470-
// '\nUpdating narrative...';
471-
// }
472-
473-
// // Speed of the text being generated
474-
475-
// if (textSpeed < sourceText.length) {
476-
// textSpeed += 0.3;
477-
// } else {
478-
// textSpeed = 0;
479-
// textSpeed += 0.3;
480-
// }
481-
482-
// // ------------------------------- END OF TERMINAL TEXT
483-
484-
485-
// //CODE TO SIMULATE WRITING
486-
// // https://creative-coding.decontextualize.com/text-and-type/
487-
488-
// var startWriting = 0;
489-
// // var left = startWriting - textSpeed ;
490-
// var right = startWriting + textSpeed;
491-
492-
// //COUNTER TO SLOW APPEARANCES
493-
494-
495-
// // if (frameCount % 100 || keyCode === DOWN_ARROW) { //time for the music to change
496-
497-
// // fill(0);
498-
499-
// // text(sourceText.substring(startWriting, right + 1), posXtextT, posYtextT + 100, w, h);
500-
501-
// // } else {
502-
503-
504-
// text(sourceText.substring(startWriting, right + 1), posXtextT, posYtextT + 100, w, h);
505-
// console.log('Entered Frame Song: ' + frameCount);
506-
507-
508-
// // }
509-
// // text(sourceText.substring(startWriting, right + 1), posXtextT, posYtextT + 100, w, h);
510-
511-
512-
// //this is static text
513-
514-
// // text(sourceText, posXtextT, posYtextT + 100, w, h);
515-
516-
// // Add cursor
517-
// // fill(color + sin(frameCount * 0.1) * 128);
518-
// // text('_', posXtextT, posYtextT + 100, w, h);
519-
520-
// // SUBTITLE TEXT
521-
522-
// posYtextS = windowHeight - 150;
523-
// line = 70;
524-
// textAlign(CENTER);
525-
// textFont("Verdana");
526-
// textSize(47);
527-
// textLeading(50); // pixels between each line
528-
529-
// fill(0, 0, 0, 5); //shadow for subtitle
530-
// // text('I can tell you that' + rnnSub, line + 2, posYtextS + 2, windowWidth, 300);
531-
// stroke(0);
532-
// fill(255, 255, 64);
533-
534-
// text(regexRnnSub, line, posYtextS, windowWidth - 100, 300);
535-
536-
// // text(rnnSub, line, posYtextS, windowWidth - 100, 300);
537-
// }
538-
539-
540-
541-
542448

543449
// ------------------------------------------------------------------------------------------------------------
544450
// ------------------------------------------------- INSTRUCTIONS ---------------------------------------------

0 commit comments

Comments
 (0)