From 9a5d1d4be3babe42770c28615b39617fae3e2bce Mon Sep 17 00:00:00 2001 From: benfry Date: Sun, 1 May 2005 18:52:27 +0000 Subject: [PATCH] changes in progress for 86 --- processing/app/Editor.java | 15 +++++++------ processing/app/Sketch.java | 32 +++++++++++++++------------- processing/core/PGraphics2.java | 26 ++++++++++++----------- processing/core/PGraphics3.java | 13 ++++++------ processing/core/todo.txt | 37 ++++++++++++++++++++------------- processing/todo.txt | 30 ++++++++++++++------------ 6 files changed, 86 insertions(+), 67 deletions(-) diff --git a/processing/app/Editor.java b/processing/app/Editor.java index 8587970dc..9193fe224 100644 --- a/processing/app/Editor.java +++ b/processing/app/Editor.java @@ -1359,8 +1359,9 @@ public class Editor extends JFrame sketch = new Sketch(this, path); // TODO re-enable this once export application works - exportAppItem.setEnabled(false && !sketch.isLibrary()); - buttons.disableRun(sketch.isLibrary()); + exportAppItem.setEnabled(false); + //exportAppItem.setEnabled(false && !sketch.isLibrary()); + //buttons.disableRun(sketch.isLibrary()); header.rebuild(); if (Preferences.getBoolean("console.auto_clear")) { console.clear(); @@ -1425,11 +1426,13 @@ public class Editor extends JFrame * hitting export twice, quickly, and horking things up. */ synchronized public void handleExport() { - String what = sketch.isLibrary() ? "Applet" : "Library"; - message("Exporting " + what + "..."); + //String what = sketch.isLibrary() ? "Applet" : "Library"; + //message("Exporting " + what + "..."); + message("Exporting applet..."); try { - boolean success = sketch.isLibrary() ? - sketch.exportLibrary() : sketch.exportApplet(); + //boolean success = sketch.isLibrary() ? + //sketch.exportLibrary() : sketch.exportApplet(); + boolean success = sketch.exportApplet(); if (success) { message("Done exporting."); } else { diff --git a/processing/app/Sketch.java b/processing/app/Sketch.java index ba82d7007..444f41149 100644 --- a/processing/app/Sketch.java +++ b/processing/app/Sketch.java @@ -40,23 +40,25 @@ import com.oroinc.text.regex.*; * Stores information about files in the current sketch */ public class Sketch { - //static String TEMP_BUILD_PATH = "lib" + File.separator + "build"; static File tempBuildFolder; Editor editor; - // name of sketch, which is the name of main file - // (without .pde or .java extension) + /** + * Name of sketch, which is the name of main file + * (without .pde or .java extension) + */ String name; - // name of 'main' file, used by load(), such as sketch_04040.pde + /** + * Name of 'main' file, used by load(), such as sketch_04040.pde + */ String mainFilename; - //String path; // path to 'main' file for this sketch - // true if any of the files have been modified + /// true if any of the files have been modified boolean modified; - boolean library; // true if it's a library + //boolean library; // true if it's a library public File folder; //sketchFolder; public File dataFolder; @@ -146,10 +148,10 @@ public class Sketch { codeFolder = new File(folder, "code"); dataFolder = new File(folder, "data"); - File libraryFolder = new File(folder, "library"); - if (libraryFolder.exists()) { - library = true; - } + //File libraryFolder = new File(folder, "library"); + //if (libraryFolder.exists()) { + //library = true; + //} // get list of files in the sketch folder String list[] = folder.list(); @@ -599,9 +601,9 @@ public class Sketch { /** * Return true if this sketch is a library. */ - public boolean isLibrary() { - return library; - } + //public boolean isLibrary() { + //return library; + //} /** @@ -798,7 +800,7 @@ public class Sketch { // otherwise their .class and .jar files can cause conflicts. Base.removeDir(new File(folder, "applet")); Base.removeDir(new File(folder, "application")); - Base.removeDir(new File(folder, "library")); + //Base.removeDir(new File(folder, "library")); // do a "save" // this will take care of the unsaved changes in each of the tabs diff --git a/processing/core/PGraphics2.java b/processing/core/PGraphics2.java index cf63703b9..4637086f3 100644 --- a/processing/core/PGraphics2.java +++ b/processing/core/PGraphics2.java @@ -343,20 +343,22 @@ public class PGraphics2 extends PGraphics { public void endShape() { - switch (shape) { - case LINE_STRIP: - stroke_shape(gpath); - break; + if (gpath != null) { // make sure something has been drawn + switch (shape) { + case LINE_STRIP: + stroke_shape(gpath); + break; - case LINE_LOOP: - gpath.closePath(); - stroke_shape(gpath); - break; + case LINE_LOOP: + gpath.closePath(); + stroke_shape(gpath); + break; - case POLYGON: - gpath.closePath(); - draw_shape(gpath); - break; + case POLYGON: + gpath.closePath(); + draw_shape(gpath); + break; + } } shape = 0; } diff --git a/processing/core/PGraphics3.java b/processing/core/PGraphics3.java index 26c1479a0..8acea656e 100644 --- a/processing/core/PGraphics3.java +++ b/processing/core/PGraphics3.java @@ -107,7 +107,7 @@ public class PGraphics3 extends PGraphics { public boolean manipulatingCamera; // projection matrix - public PMatrix projection = new PMatrix(); + public PMatrix projection; // = new PMatrix(); // These two matrices always point to either the modelview // or the modelviewInv, but they are swapped during @@ -350,6 +350,7 @@ public class PGraphics3 extends PGraphics { // making this again here because things are weird projection = new PMatrix(); + modelview = new PMatrix(MATRIX_STACK_DEPTH); modelviewInv = new PMatrix(MATRIX_STACK_DEPTH); @@ -2801,11 +2802,9 @@ public class PGraphics3 extends PGraphics { throw new RuntimeException("cannot call beginCamera while already "+ "in camera manipulation mode"); } else { - //projection.identity(); manipulatingCamera = true; - forwardTransform = cameraInv; //modelviewInv; - reverseTransform = camera; //modelview; - //cameraMode = CUSTOM; + forwardTransform = cameraInv; + reverseTransform = camera; } } @@ -2825,8 +2824,8 @@ public class PGraphics3 extends PGraphics { "in camera manipulation mode"); } // reset the modelview to use this new camera matrix - modelview.set(camera); - modelviewInv.set(cameraInv); + modelview.set(forwardTransform); // cameraInv + modelviewInv.set(reverseTransform); // camera // set matrix mode back to modelview forwardTransform = modelview; diff --git a/processing/core/todo.txt b/processing/core/todo.txt index 77acbd1a5..349068b98 100644 --- a/processing/core/todo.txt +++ b/processing/core/todo.txt @@ -9,8 +9,25 @@ X saveFrame with a filename still causing trouble: X http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1114097641;start=0 X fov should be in radians -_ ex on endshape if no calls to vertex -_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1113940972 +X ex on endshape if no calls to vertex +X http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1113940972 + +_ polygons perpendicular to axis not drawing +_ is this a clipping error? +_ probably a triangulation error, because triangles work ok +_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1114158993;start=0 + +_ is camera backwards, or staying fixed and moving the scene? +_ camera() is broken, should be ok to call it at beinning of loop +_ end of lookat might be backwards +_ or endCamera might be swapping camera and cameraInv +_ beginCamera also grabs it backwards + + +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + +high priority but not *required* for 86 _ createGraphics(200, 200) to create same as source _ createGraphics(200, 200, P2D) to create 2D from 3D @@ -20,18 +37,8 @@ _ new PGraphics2 objects are set as RGB, but on loadPixels/updatePixels _ they're drawn as transparent and don't have their high bits set http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1113933055;start=0 -_ polygons perpendicular to axis not drawing -_ is this a clipping error? -_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1114158993;start=0 - -_ is camera backwards, or staying fixed and moving the scene? -_ end of lookat might be backwards -_ or endCamera might be swapping camera and cameraInv - -. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - - -high priority but not *required* for 86 +_ vars like cameraX etc need to be in PGraphics +_ otherwise g.xxxx won't work _ is mousePressed broken because of event queue? _ or at least w/ framerate? or redraw and noLoop? @@ -42,6 +49,8 @@ _ append(), shorten(), splice, slice, subset, concat, reverse _ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Suggestions;action=display;num=1114443601;start=0 present mode fixes +_ not working on macosx 10.2? +_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1114381302;start=0 _ for present mode, need to set a default display _ currently crashes if only --present is specified w/o --display _ present mode is flakey.. applet doesn't always come up diff --git a/processing/todo.txt b/processing/todo.txt index bf996ebba..3cd153541 100644 --- a/processing/todo.txt +++ b/processing/todo.txt @@ -17,24 +17,22 @@ o if p5 is running 1.5, let them know to use the standard install o check to see if when running externally, will be using a 1.5 vm X nah, this seems like overkill.. problems haven't been *that* bad (yet) X make sure that when running ext, using the local java - -_ get these two todo lists into their bugzilla categories +X macosx 10.2 needs libiconv to run jikes +X http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1114113204;start=0 +o either compile jikes not to use it: +o http://jikes.sourceforge.net/faq/dev-win32.shtml +o or maybe include an installer: +o http://www.bluem.net/downloads/libiconv_en/ +o gnu page for libiconv +o http://www.gnu.org/software/libiconv/ +X on 10.2, the version of jikes from 69 (the cvs build) works fine +_ update the faq when doing the release _ make simple tool for casey to rebuild all the examples at once _ need to rebuild with this release because of 1.3/1.4 issues -_ macosx 10.2 needs libiconv to run jikes -_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1114113204;start=0 -_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1114381302;start=0 -_ either compile jikes not to use it: -_ http://jikes.sourceforge.net/faq/dev-win32.shtml -_ or maybe include an installer: -_ http://www.bluem.net/downloads/libiconv_en/ -_ gnu page for libiconv -_ http://www.gnu.org/software/libiconv/ -_ on 10.2, the version of jikes from 69 (the cvs build) works fine - _ "are you trying to f-- with me" on quitting the app is super problem +_ look into canceling a quit instead? _ "save as" not quite working http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1113944897;start=0 @@ -55,6 +53,8 @@ I get it. But i wonder if this will catch others off guard. Not suggesting a change to the way it works... but thoughts on if this might screw people in the long run? +_ sketch "delete" not working.. grrr.. + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @@ -125,6 +125,8 @@ _ and re-copy the css in after generating the doc each time HIGH PRIORITY BUT NOT NECESSITY +_ get these two todo lists into their bugzilla categories + _ println() can hose the app for the first 20-30 frames _ need to figure out threading etc _ problem with it launching a new thread for every single update! @@ -405,6 +407,8 @@ _ shortcut to walk through history, ala photoshop (ctrl-alt-z) editor tools menu +_ how to handle command keys +_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Suggestions;action=display;num=1114885272;start=0 _ make dynamically loaded plugins and "tools" menu _ break out beautify as its own plugin _ make beautify plugin "Auto Format"