Hi everyone, in this thread, I’ll post updates how Processing updates affect the example code in the book. There is no question that updates will keep us busy, and exited, so here is where I’ll report the minor and medium-sized issues that go along with that. Major changes to Processing will likely result in an updated example code folder available for download. Best, Daniel
Processing Beta 8 changed the way Tables and PShapes are constructed and drawn, and the MotionEvent class has been depricated along with the motionPressure constant in Beta 7.
By the end of the week, I’ll release a new example code that addresses some of those changes that affect mostly the Data and Shape sections. Stay tuned, Daniel
Table class: Changes in Processing Beta 8. Constructor: tsv = new Table(new File(sketchPath(“”)+”data.tsv”));
load a Table: colors = loadTable(“colors.csv”);
write a Table (formerly writeTSV()): tsv.save(new File(sketchPath(“”)+”data.tsv”), “tsv”);
PShape Issue With Textured Primitives:
In Processing Beta 8, the assignment to a 3D primitive (e.g. SHERE, BOX) is dysfunctional. This affects the Mobile3D examples TexturedSphere and CameraTexture, as well as LifeFaceDetectionAndroid in ShapeObjects.
sphereTexture = loadImage(“earth_lights.jpg”); sphereShape = createShape(SPHERE, height/3); sphereShape.texture(sphereTexture);
Because no primitives can be textured currently without building the “primitive” from scratch (~100 lines for a sphere), it is reasonable to believe that this is a temporary issue to be resolved.
You can find examples for building shapes recording vertices in the Processing example package shipped with your IDE under: Topics/Textures/TexturedSphere Topics/Textures/TexturedCube
I’ve been trying to get texture() function working for 2D primitives and it won’t run on my Android. Is this a related issue to the texture of 3D primitives?
Hi Greg, yes it is. I’m very much looking forward to being able to use textures on 3D primitives again, as opposed to creating them with vertices from scratch. Best, Daniel
|You must be logged in to comment|