So I'm a total noob when it comes to working with Processing and CSS. I want to create a sketch that fills the whole browser window, and I'm assuming the best way to accomplish this is to somehow pass the size of the div to the sketch via
param
. How would I go about doing this?
Hey all, hope I'm posting this in the right spot. I'm trying to make a series of planes in 3D with varying alpha levels. When viewed from one side you can see the planes through each other, but from the other the planes with the lowest alpha level cover up the other planes entirely. I know that changing the order in which they're drawn does change how the transparency looks, but I'd like to be able to see through all the planes from both sides.
The main .pde:
/* Cool shape thingie made of planes created via basic 'for' loop */
import processing.opengl.*; HoloRect[] holo = new HoloRect[3];
Hey all, relatively new guy here. I've been playing around with 3D environments in Processing using OCD to control the camera. What I want to do is overlay an image on top of the 3D view to frame it, and I figured the easiest way to do this would be to create a PGraphic of the 3D view and display the image on top of it. However, when trying to use the OCD cameras within beginDraw(), it tells me the camera "cannot be resolved or is not a field". Here's the code:
import damkjer.ocd.*;
PGraphics viewport;
public Camera cam;
void setup(){
size(400,400);
viewport = createGraphics(400,400,P3D);
cam = new Camera(this, 0,0,50,0,0,0);
}
void draw(){
viewport.beginDraw();
viewport.background(255);
viewport.box(50);
viewport.cam.feed();
viewport.endDraw();
image(viewport, 0,0);
}
Am I making some basic mistake, or does the library not support use within PGraphics, or is it something else entirely? Thanks!