mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge branch 'master' of https://github.com/joshgiesbrecht/processing
This commit is contained in:
+5
-7
@@ -129,9 +129,6 @@
|
||||
<subant buildpath="../java/libraries/serial" target="clean"/>
|
||||
<subant buildpath="../java/libraries/video" target="clean"/>
|
||||
<subant buildpath="../experimental" target="clean"/>
|
||||
<!--
|
||||
<subant buildpath="../android/core" target="clean"/>
|
||||
-->
|
||||
<subant buildpath="shared/tools/MovieMaker" target="clean"/>
|
||||
</target>
|
||||
|
||||
@@ -144,9 +141,6 @@
|
||||
<subant buildpath="../java/libraries/serial" target="build"/>
|
||||
<subant buildpath="../java/libraries/video" target="build"/>
|
||||
<subant buildpath="../experimental" target="build"/>
|
||||
<!--
|
||||
<subant buildpath="../android/core" target="build"/>
|
||||
-->
|
||||
<subant buildpath="shared/tools/MovieMaker" target="build"/>
|
||||
</target>
|
||||
|
||||
@@ -177,6 +171,8 @@
|
||||
|
||||
<copy todir="${target.path}/modes/java">
|
||||
<fileset dir="../java">
|
||||
<!-- don't include LWJGL, it's not operational -->
|
||||
<exclude name="libraries/lwjgl/**" />
|
||||
<!--
|
||||
<exclude name="**/bin/*" />
|
||||
<exclude name="**/src/*" />
|
||||
@@ -452,7 +448,9 @@
|
||||
|
||||
<target name="macosx-dist-sign" if="codesign">
|
||||
<echo>
|
||||
It code signing fails, may need to use:
|
||||
Code signing will only work if you have a $99/yr Apple developer ID.
|
||||
|
||||
With a proper ID, if code signing fails, you may need to use:
|
||||
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate"
|
||||
</echo>
|
||||
<exec executable="codesign" dir="macosx/work">
|
||||
|
||||
@@ -26,12 +26,6 @@ And just like that, here we are at 2.0.
|
||||
+ patch to make font textures smaller in P2D/P3D
|
||||
https://github.com/processing/processing/pull/1775
|
||||
|
||||
+ A handful of tweaks to the user interface, also incorporating
|
||||
built-in fonts for the UI and for the default editor font.
|
||||
Incorporates some of the feedback suggested here,
|
||||
while trying to preserve the look & feel of the PDE.
|
||||
https://github.com/processing/processing/pull/1822
|
||||
|
||||
+ .png data written when .jpg file specified with save/saveFrame()
|
||||
https://github.com/processing/processing/issues/1810
|
||||
|
||||
@@ -41,6 +35,20 @@ And just like that, here we are at 2.0.
|
||||
+ PGraphics objects that used JAVA2D weren't updating when used with OpenGL
|
||||
https://github.com/processing/processing/issues/1786
|
||||
|
||||
[ changes ]
|
||||
|
||||
+ A handful of tweaks to smooth out the 2.0 user interface.
|
||||
Incorporates some of the feedback suggested here:
|
||||
https://github.com/processing/processing/pull/1822
|
||||
while trying to preserve the look & feel of our PDE design.
|
||||
|
||||
+ Added built-in fonts (Source Sans and Source Code from Adobe)
|
||||
as the default font for the UI and editor. As usual, the editor
|
||||
font can be changed in preferences.txt. And if you already have
|
||||
a preferences.txt file, the new font won't override it. Fonts
|
||||
for GUI elements can be modified in lib/theme.txt, but be careful
|
||||
with those, and don't complain if/when they break.
|
||||
|
||||
[ andres on the attack ]
|
||||
|
||||
+ PImage not drawn after resize()/get() in P2D/P3D
|
||||
@@ -79,6 +87,15 @@ And just like that, here we are at 2.0.
|
||||
+ textureWrap(REPEAT) + textureMode(IMAGE) clamps positive coordinates
|
||||
https://github.com/processing/processing/issues/1809
|
||||
|
||||
+ P2D, P3D drawing errors in static mode, gray screen
|
||||
https://github.com/processing/processing/issues/1648
|
||||
|
||||
+ Window shorter than 127 pixels high is not rendered correctly in P2D/P3D
|
||||
https://github.com/processing/processing/issues/1683
|
||||
|
||||
+ Multiple screen crash with OpenGL
|
||||
https://github.com/processing/processing/issues/1515
|
||||
|
||||
|
||||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
@@ -6119,7 +6119,7 @@ public class PApplet extends Applet
|
||||
}
|
||||
|
||||
/**
|
||||
* @webref output:files
|
||||
* @webref input:files
|
||||
* @param filename name of a file in the data folder or a URL
|
||||
* @see JSONObject
|
||||
* @see JSONArray
|
||||
@@ -6154,7 +6154,7 @@ public class PApplet extends Applet
|
||||
}
|
||||
|
||||
/**
|
||||
* @webref output:files
|
||||
* @webref input:files
|
||||
* @param filename name of a file in the data folder or a URL
|
||||
* @see JSONObject
|
||||
* @see JSONArray
|
||||
|
||||
@@ -418,8 +418,8 @@ public class PImage implements PConstants, Cloneable {
|
||||
modified = true;
|
||||
mx1 = 0;
|
||||
my1 = 0;
|
||||
mx2 = width;
|
||||
my2 = height;
|
||||
mx2 = width - 1;
|
||||
my2 = height - 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2559,8 +2559,6 @@ public class PGL {
|
||||
|
||||
@Override
|
||||
public void display(GLAutoDrawable glDrawable) {
|
||||
if (drawLatch == null || drawLatch.getCount() == 0) return;
|
||||
|
||||
drawable = glDrawable;
|
||||
context = glDrawable.getContext();
|
||||
|
||||
@@ -2636,9 +2634,7 @@ public class PGL {
|
||||
}
|
||||
|
||||
pg.parent.handleDraw();
|
||||
if (drawLatch != null) {
|
||||
drawLatch.countDown();
|
||||
}
|
||||
drawLatch.countDown();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -41,6 +41,12 @@ A https://github.com/processing/processing/issues/1700
|
||||
o warning message present
|
||||
o Deleted 1 texture objects, 0 remaining
|
||||
A fixed in last round
|
||||
A P2D, P3D drawing errors in static mode, gray screen
|
||||
A https://github.com/processing/processing/issues/1648
|
||||
A Window shorter than 127 pixels high is not rendered correctly in P2D/P3D
|
||||
A https://github.com/processing/processing/issues/1683
|
||||
A Multiple screen crash with OpenGL
|
||||
A https://github.com/processing/processing/issues/1515
|
||||
|
||||
|
||||
_ data decision stuff
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Perspective vs. Ortho
|
||||
*
|
||||
* Move the mouse left to right to change the "far"
|
||||
* parameter for the perspective() and ortho() functions.
|
||||
* This parameter sets the maximum distance from the
|
||||
* origin away from the viewer and will clip the geometry.
|
||||
* Click a mouse button to switch between the perspective and
|
||||
* orthographic projections.
|
||||
*/
|
||||
|
||||
|
||||
boolean showPerspective = false;
|
||||
|
||||
void setup() {
|
||||
size(600, 360, P3D);
|
||||
noFill();
|
||||
fill(255);
|
||||
noStroke();
|
||||
}
|
||||
|
||||
void draw() {
|
||||
lights();
|
||||
background(0);
|
||||
float far = map(mouseX, 0, width, 120, 400);
|
||||
if (showPerspective == true) {
|
||||
perspective(PI/3.0, float(width)/float(height), 10, far);
|
||||
} else {
|
||||
ortho(0, width, 0, height, 10, far);
|
||||
}
|
||||
translate(width/2, height/2, 0);
|
||||
rotateX(-PI/6);
|
||||
rotateY(PI/3);
|
||||
box(180);
|
||||
}
|
||||
|
||||
void mousePressed() {
|
||||
showPerspective = !showPerspective;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
|
||||
/**
|
||||
* IntList Lottery example
|
||||
* by Daniel Shiffman.
|
||||
*
|
||||
* This example demonstrates an IntList can be used to store a list of numbers.
|
||||
* While an array of integers serves a similar purpose it is of fixed size. The
|
||||
* An IntList can easily have values added or deleted and it can also be
|
||||
* shuffled and sorted. For lists of floats or Strings, you can use FloatList
|
||||
* and StringList. For lists of objects, use ArrayList.
|
||||
*
|
||||
* In this example, three lists of integers are created. One is a pool of numbers
|
||||
* that is shuffled and picked randomly from. One is the list of "picked" numbers.
|
||||
* And one is a lottery "ticket" which includes 5 numbers that are trying to be matched.
|
||||
*/
|
||||
|
||||
// Three lists of integers
|
||||
IntList lottery;
|
||||
IntList results;
|
||||
IntList ticket;
|
||||
@@ -6,14 +21,18 @@ IntList ticket;
|
||||
void setup() {
|
||||
size(640, 360);
|
||||
frameRate(30);
|
||||
// Create empy lists
|
||||
lottery = new IntList();
|
||||
results = new IntList();
|
||||
ticket = new IntList();
|
||||
// Let's add some numbers to our list
|
||||
|
||||
|
||||
// Add 20 integers in order to the lottery list
|
||||
for (int i = 0; i < 20; i++) {
|
||||
lottery.append(i);
|
||||
}
|
||||
|
||||
|
||||
// Pick five numbers from the lottery list to go into the Ticket list
|
||||
for (int i = 0; i < 5; i++) {
|
||||
int index = int(random(lottery.size()));
|
||||
ticket.append(lottery.get(index));
|
||||
@@ -22,41 +41,54 @@ void setup() {
|
||||
|
||||
void draw() {
|
||||
background(51);
|
||||
|
||||
|
||||
// The shuffle() method randomly shuffles the order of the values in the list
|
||||
lottery.shuffle();
|
||||
|
||||
|
||||
// Call a method that will display the integers in the list at an x,y location
|
||||
showList(lottery, 16, 48);
|
||||
showList(results, 16, 100);
|
||||
showList(ticket, 16, 140);
|
||||
|
||||
|
||||
|
||||
// This loop checks if the picked numbers (results)
|
||||
// match the ticket numbers
|
||||
for (int i = 0; i < results.size(); i++) {
|
||||
// Are the integers equal?
|
||||
if (results.get(i) == ticket.get(i)) {
|
||||
fill(0, 255, 0, 100);
|
||||
}
|
||||
else {
|
||||
fill(255, 0, 0, 100);
|
||||
fill(0, 255, 0, 100); // if so green
|
||||
} else {
|
||||
fill(255, 0, 0, 100); // if not red
|
||||
}
|
||||
ellipse(16+i*32, 140, 24, 24);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// One every 30 frames we pick a new lottery number to go in results
|
||||
if (frameCount % 30 == 0) {
|
||||
// Pick a new lottery number!
|
||||
if (results.size() < 5) {
|
||||
// Get the first value in the lottery list
|
||||
int val = lottery.get(0);
|
||||
// Remove it from the lottery list
|
||||
lottery.remove(0);
|
||||
// Put it in the results
|
||||
results.append(val);
|
||||
} else {
|
||||
// Ok we picked five numbers, let's reset
|
||||
for (int i = 0; i < results.size(); i++) {
|
||||
// Put the picked results back into the lottery
|
||||
lottery.append(results.get(i));
|
||||
}
|
||||
// Clear the results and start over
|
||||
results.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Draw a list of numbers starting at an x,y location
|
||||
void showList(IntList list, float x, float y) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
// Use get() to pull a value from the list at the specified index
|
||||
int val = list.get(i);
|
||||
stroke(255);
|
||||
noFill();
|
||||
|
||||
@@ -766,15 +766,18 @@ How the environment gets packed up, downloaded, and installed.
|
||||
|
||||
DIST / General
|
||||
|
||||
_ should be able to build p5 without a JDK install, just a JRE
|
||||
_ https://github.com/processing/processing/issues/1840
|
||||
_ need to have ecj.jar accessible to ant, then modify build.xml to use this:
|
||||
_ <property name="build.compiler"
|
||||
_ value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
|
||||
_ Update Java version in the download to be the latest Java 6
|
||||
_ https://github.com/processing/processing/issues/1841
|
||||
_ line ending issues
|
||||
_ doesn't really help on Windows since we use Cygwin
|
||||
_ but it would be helpful for people not using it (ant/other LF issues)
|
||||
_ https://help.github.com/articles/dealing-with-line-endings
|
||||
_ http://stackoverflow.com/questions/170961/whats-the-best-crlf-handling-strategy-with-git
|
||||
_ should be able to build p5 without a JDK install, just a JRE
|
||||
_ need to have ecj.jar accessible to ant, then modify build.xml to use this:
|
||||
_ <property name="build.compiler"
|
||||
_ value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
|
||||
_ add means to move changes from desktop to Android (and vice-versa)
|
||||
_ add bootclasspath for 1.6
|
||||
_ would require --install for command line on OS X
|
||||
|
||||
Reference in New Issue
Block a user