Skip to content

Commit eeab2c9

Browse files
committed
Mods to examples
1 parent 7164884 commit eeab2c9

File tree

41 files changed

+302
-324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+302
-324
lines changed

content/examples/3D and OpenGL/Lights/Lights2/Lights2.pde

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* Lights 2.
3-
* By Simon Greenwold.
4-
*
2+
* Lights 2
3+
* by Simon Greenwold.
4+
*
55
* Display a box with three different kinds of lights.
66
*
77
* Created 27 May 2007.

content/examples/3D and OpenGL/OpenGL/TexturedSphere/TexturedSphere.pde

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void renderGlobe()
7171
// Implements mouse control (interaction will be inverse when sphere is upside down)
7272
if(mousePressed){
7373
velocityX += (mouseY-pmouseY) * 0.01;
74-
velocityY += (mouseX-pmouseX) * 0.01;
74+
velocityY -= (mouseX-pmouseX) * 0.01;
7575
}
7676
}
7777

content/examples/Libraries/Candy (SVG Import)/GettingStartedSVG/GettingStartedSVG.pde

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Getting Started.
3-
* Illustration by George Brower
3+
* Illustration by George Brower.
44
*
55
* The Candy SVG Import library is used for loading SVG (Scalable Vector Graphics)
66
* files into Processing. This library was specifically tested under SVG files created
@@ -14,7 +14,7 @@
1414
* setting, but the CSS properties set to "Presentation Attributes"
1515
* Saving it any other way will most likely break Candy.
1616
*
17-
* For more information, visit this page:
17+
* For more information, visit:
1818
* http://www.processing.org/reference/libraries/candy/
1919
*/
2020

@@ -24,7 +24,7 @@ import processing.xml.*;
2424
SVG bot;
2525

2626
void setup(){
27-
size(640, 480);
27+
size(200, 200);
2828
smooth();
2929
// The file "bot1.svg" must be in the data folder
3030
// of the current sketch to load successfully
@@ -33,6 +33,6 @@ void setup(){
3333

3434
void draw(){
3535
background(102);
36-
bot.draw(110, 180, 100, 100); // Draw at coordinate [110,180] at size 100 x 100
37-
bot.draw(282, 100); // Draw at coordinate [282,100] at the default size
36+
bot.draw(10, 10, 100, 100); // Draw at coordinate [10, 10] at size 100 x 100
37+
bot.draw(70, 60); // Draw at coordinate [70, 60] at the default size
3838
}
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
/**
22
* Ignore Styles.
3-
* Illustration by George Brower
3+
* Illustration by George Brower.
44
*
55
* Move the mouse left and right to zoom the SVG file.
66
* This shows how, unlike an imported image, the lines
77
* remain smooth at any size.
88
*/
99

10+
1011
import processing.candy.*;
1112
import processing.xml.*;
1213

1314
SVG bot;
1415

1516
void setup(){
16-
size(640, 480);
17+
size(200, 200);
1718
smooth();
1819
// The file "bot1.svg" must be in the data folder
1920
// of the current sketch to load successfully
@@ -24,15 +25,12 @@ void draw(){
2425
background(102);
2526

2627
// Draw left bot
27-
bot.draw(50, 140, 160, 160);
28-
29-
// Draw middle bot
3028
bot.ignoreStyles(); // Ignore the colors in the SVG
3129
fill(0, 102, 153); // Set the SVG fill to blue
3230
stroke(255); // Set the SVG fill to white
33-
bot.draw(240, 140, 160, 160);
34-
31+
bot.draw(-60, 25, 150, 150);
32+
3533
// Draw right bot
36-
bot.ignoreStyles(false); // Start using the SVG's original colors again
37-
bot.draw(430, 140, 160, 160);
34+
bot.ignoreStyles(false);
35+
bot.draw(110, 25, 150, 150);
3836
}

content/examples/Libraries/Candy (SVG Import)/Scale/Scale.pde

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
* remain smooth at any size.
88
*/
99

10+
1011
import processing.candy.*;
1112
import processing.xml.*;
1213

1314
SVG bot;
1415

1516
void setup(){
16-
size(640, 480);
17+
size(200, 200);
1718
smooth();
1819
// The file "bot1.svg" must be in the data folder
1920
// of the current sketch to load successfully

content/examples/Libraries/DXF Export/SimpleExport/SimpleExport.pde

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
/**
2-
* Simple Export
3-
* by Simon Greenwold
2+
* Simple DXF Export
3+
* by Simon Greenwold.
44
*
5-
* Press the 'r' key to export a DXF file.
6-
*
7-
* Created 27 May 2007
5+
* Press the 'R' key to export a DXF file.
86
*/
97

8+
109
import processing.dxf.*;
1110
boolean record = false;
1211

content/examples/Libraries/Ess (Sound)/AudioAnalysis/AudioAnalysis.pde

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Audio Analysis.
3-
* By R. Luke DuBois.
2+
* Audio Analysis
3+
* by R. Luke DuBois.
44
*
55
* Analyzes a sound file using a Fast Fourier Transform, and plots both the current
66
* spectral frame and a "peak-hold" plot of the maximum over time using logarithmic
@@ -11,6 +11,7 @@
1111
* http://www.tree-axis.com/Ess/
1212
*/
1313

14+
1415
import krister.Ess.*;
1516

1617
AudioChannel myChannel;

content/examples/Libraries/Ess (Sound)/EffectsProcessor/EffectsProcessor.pde

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Effects Processor.
3-
* By R. Luke DuBois.
2+
* Effects Processor
3+
* by R. Luke DuBois.
44
*
55
* Applies reverb 10 times to a succession of guitar chords.
66
* Inspired by Alvin Lucier's "I am Sitting in a Room."
@@ -11,6 +11,7 @@
1111
* http://www.tree-axis.com/Ess/
1212
*/
1313

14+
1415
import krister.Ess.*;
1516

1617
AudioChannel myChannel;

content/examples/Libraries/Ess (Sound)/SamplePlayback/SamplePlayback.pde

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Sample Playback.
3-
* By R. Luke DuBois.
2+
* Sample Playback
3+
* by R. Luke DuBois.
44
*
55
* Loads a sound file off disk and plays it in multiple voices at multiple sampling
66
* increments (demonstrating voice allocation), panning it back and forth between
@@ -11,6 +11,7 @@
1111
* http://www.tree-axis.com/Ess/
1212
*/
1313

14+
1415
import krister.Ess.*;
1516

1617
AudioChannel[] mySound = new AudioChannel[6]; // Six channels of audio playback

content/examples/Libraries/Ess (Sound)/Synthesizer1/Synthesizer1.pde

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Synthesizer 1.
3-
* By R. Luke DuBois.
2+
* Synthesizer 1
3+
* by R. Luke DuBois.
44
*
55
* Sound is generated in real time by summing together harmonically related
66
* sine tones. Overall pitch and harmonic detuning is controlled by the mouse.
@@ -11,6 +11,7 @@
1111
* http://www.tree-axis.com/Ess/
1212
*/
1313

14+
1415
import krister.Ess.*;
1516

1617
int numSines = 5; // Number of oscillators to use

0 commit comments

Comments
 (0)