help please i want to create a button

edited May 2016 in Library Questions

greeting, I want to know how to create a button event in code out the one cam is active .. the button is used to change an object displayed in the execution with another object in the database and given thank you :)

**this is my code and it's work, but i missed the button event to chande the objet 3D from the data base **

import saito.objloader.*;
import codeanticode.gsvideo.*;

OBJModel model;
GSCapture cam;
//String camPara = "C:/Users/";

void setup(){
size(640, 480, P3D);
model = new OBJModel(this,"mankey.obj");
cam = new GSCapture(this, 640, 480); // initialize the webcam capture at a specific resolution (correct and/or possible settings depend on YOUR webcam)
cam.start(); // start capturing

void draw(){
  if (cam.available()) {; // read the cam image
background(cam); // a background call is needed for correct display of the marker results
//image(cam, 0, 0, width, height); // display the image at the width and height of the sketch window
// create a copy of the cam image at the resolution of the AR detection (otherwise nya.detect will throw an assertion error!)
//translate (width/2, height/2, 0);
 fill(180, 0, 0, 127);
  translate(mouseX, mouseY);
 // scale(40);
 // translate (width/2, height/2, 0);
Sign In or Register to comment.