-1
I have the source code below, but to work I need a library I can’t find, what I can do to solve?
import ddf.minim.*;
import ddf.minim.analysis.*;
import processing.opengl.*;
import javax.media.opengl.*;
import netscape.javascript.*;
import processing.video.*;
Bola bolinhas[];
PImage imagemparticula;
PGraphicsOpenGL pgl;
GL gl;
MovieMaker mm;
Minim minim;
AudioPlayer musica;
FFT fft;
void setup() {
size(800, 600, OPENGL);
//mm = new MovieMaker(this, width, height, "hiphop_processing.mov",30, MovieMaker.H263, MovieMaker.HIGH);
mm = null;
imagemparticula = loadImage("particula.png");
minim = new Minim(this);
musica = minim.loadFile("music.mp3");
musica.play();
musica.loop();
fft = new FFT(musica.bufferSize(), musica.sampleRate());
bolinhas = new Bola [fft.specSize()];
for (int i=0; i<bolinhas.length; i++) {
bolinhas[i] = new Bola();
}
hint(DISABLE_DEPTH_TEST);
background( 0 );
image( bg, 0, 0, width, height);
}
void draw() {
//background(bg);
fill( 0, 30 );
//image( bg, 0, 0, width, height );
rect( 0, 0, width, height );
image( bg, 0, 0, width, height);
fft.forward(musica.mix);
float centroX = width / 2;
float centroY = height / 2;
pgl = (PGraphicsOpenGL) g;
gl = pgl.beginGL();
gl.glEnable(GL.GL_BLEND);
gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
pgl.endGL();
fill(255);
text("Press space to record a video", 20, 20);
for (int i=0; i<bolinhas.length; i++) {
bolinhas[i].mover();
bolinhas[i].desenhar();
bolinhas[i].elastico(centroX, centroY, 100);
float val = fft.getBand( i ) + 1;
float forcaX = random( -val, val );
float forcaY = random( -val, val );
bolinhas[i].forca(forcaX, forcaY);
}
if ( mm != null ) {
mm.addFrame();
}
}
void keyPressed() {
if (key == ' ') {
if ( mm == null ) {
mm = new MovieMaker(this, width, height, "hiphop_processing.mov",30, MovieMaker.H263, MovieMaker.HIGH);
}
else {
mm.finish(); // Finish the movie if space bar is pressed!
}
}
}
this and Processing and the library you ask for is NETSCAPE
– Barofscas
@Barofscas Give more details about what you need (what error is occurring), because the information in your question is very vague.
– Laerte
the mistake it gives me is the lack of the library which I can not find internet
– Barofscas
What is the name of the library?
– Laerte
NETSCAPE is the library name
– Barofscas
Would that be here?
– Laerte
I can’t get it out of you
– Barofscas
Can’t get down?
– Laerte
can’t
– Barofscas
Try to download individually: Jsexception, Jsobject, Jsutil
– Laerte
and add these files where?
– Barofscas