diff --git a/CNAME b/CNAME deleted file mode 100644 index 1c989db..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -processingjs.org diff --git a/_config.yml b/_config.yml index 93a2530..1eb1c01 100644 --- a/_config.yml +++ b/_config.yml @@ -2,3 +2,4 @@ safe: true lsi: false highlighter: rouge +url: /processing-js.github.io/ diff --git a/_layouts/default.html b/_layouts/default.html index 38c85c6..c602f30 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,50 +1,37 @@ - + + {% if page.title %}{{ page.title }} | {% endif %}Processing.js - - - - - - - - - + + + + + + +
- +
a port of the Processing Visualization Language
@@ -52,50 +39,51 @@ {{ content }}
- - Fork me on GitHub + + Fork me on GitHub diff --git a/_layouts/withcc.html b/_layouts/withcc.html index fe6c216..443bb85 100644 --- a/_layouts/withcc.html +++ b/_layouts/withcc.html @@ -4,7 +4,7 @@ {{ content }}

This reference is licensed under the CC BY-NC-SA 2.0 license:

- - Creative Commons License + + Creative Commons License -
\ No newline at end of file + diff --git a/articles/_posts/2011-12-01-PomaxGuide.html b/articles/_posts/2011-12-01-PomaxGuide.html index 96b91b6..5a5c932 100644 --- a/articles/_posts/2011-12-01-PomaxGuide.html +++ b/articles/_posts/2011-12-01-PomaxGuide.html @@ -2,7 +2,7 @@ layout: default desc: Pomax's guide to Processing.js title: Pomax Guide -permalink: /articles/PomaxGuide.html +permalink: ./articles/PomaxGuide.html --- + -

My Life Aquatic (2012) -by David Leibovic and Sunah Suh
-Koi designed by nardove

+

My Life Aquatic (2012) +by David Leibovic and Sunah Suh
+Koi designed by nardove

diff --git a/reference/HALF_PI/index.html b/reference/HALF_PI/index.html index 561b8cc..2a2b745 100644 --- a/reference/HALF_PI/index.html +++ b/reference/HALF_PI/index.html @@ -20,7 +20,7 @@ Examples -
example pic
float f = 0.0;
+		
example pic
float f = 0.0;
 
 beginShape(POLYGON);
 
@@ -100,9 +100,9 @@
 
 		Related
 
-		PI
+ PI
- TWO_PI
+ TWO_PI
diff --git a/reference/HashMap/index.html b/reference/HashMap/index.html index 866c17f..01e8959 100644 --- a/reference/HashMap/index.html +++ b/reference/HashMap/index.html @@ -38,7 +38,7 @@ Constructor
HashMap()

HashMap(initialCapacity)

-
HashMap(initialCapacity,loadFactor)

+
HashMap(initialCapacity, loadFactor)

HashMap(m)

diff --git a/reference/Object/index.html b/reference/Object/index.html index 3b26e82..448ca27 100644 --- a/reference/Object/index.html +++ b/reference/Object/index.html @@ -154,7 +154,7 @@ Related - class
+ class
diff --git a/reference/PFont/index.html b/reference/PFont/index.html index d61b8bb..08bf90d 100644 --- a/reference/PFont/index.html +++ b/reference/PFont/index.html @@ -10,13 +10,13 @@ Processing.js Behavior Font support for the Canvas element varies across browsers. FireFox currently has the best support, but still uses a pre-defined set of fonts. (Documentation to follow soon.) Good alternatives to the browser's Canvas-font functions are available: such as the Glyph method. See also: Canvas Text, BurntToys Bauhaus. -

Please use the following demos to learn how fonts can be rendered in Firefox with Processing.js: Letters, Words, width()

+

Please use the following demos to learn how fonts can be rendered in Firefox with Processing.js: Letters, Words, textWidth()

Examples -
example pic
PFont font;
+		
example pic
PFont font;
 // The font must be located in the sketch's 
 // "data" directory to load successfully
 font = loadFont("FFScala.ttf"); 
@@ -37,7 +37,7 @@
 		Methods
 		
-				
+				
 		
@@ -69,8 +69,8 @@
 
 	
-		
+		
PFont_list()PFont.list() Gets a list of the fonts installed on the system.
RelatedloadFont()
- textFont()
- createGraphics()
loadFont()
+ textFont()
+ createGraphics()
diff --git a/reference/PFont_list_/index.html b/reference/PFont_list_/index.html index da9f992..ba3e55c 100644 --- a/reference/PFont_list_/index.html +++ b/reference/PFont_list_/index.html @@ -14,7 +14,7 @@ Processing.js Behavior Font support for the Canvas element varies across browsers. FireFox currently has the best support, but still uses a pre-defined set of fonts. (Documentation to follow soon.) Good alternatives to the browser's Canvas-font functions are available: such as the Glyph method. See also: Canvas Text, BurntToys Bauhaus. -

Please use the following demos to learn how fonts can be rendered in Firefox with Processing.js: Letters, Words, width()

+

Please use the following demos to learn how fonts can be rendered in Firefox with Processing.js: Letters, Words, textWidth()

diff --git a/reference/PGraphics/index.html b/reference/PGraphics/index.html index a64cbd9..a1970d2 100644 --- a/reference/PGraphics/index.html +++ b/reference/PGraphics/index.html @@ -11,7 +11,7 @@ Examples -
example pic
PGraphics pg;
+		
example pic
PGraphics pg;
 
 void setup() {
   size(100, 100);
@@ -43,13 +43,13 @@
 		
 		
-				
+				
-				
+				
beginDraw()beginDraw() Sets up the rendering context
endDraw()endDraw() Finalizes the renderering context
@@ -90,6 +90,6 @@ Related - createGraphics() + createGraphics() diff --git a/reference/PImage/index.html b/reference/PImage/index.html index a070fc5..969f1a3 100644 --- a/reference/PImage/index.html +++ b/reference/PImage/index.html @@ -11,7 +11,7 @@ Examples -
example pic
PImage b;
+		
example pic
PImage b;
 b = loadImage("laDefense.jpg");
 image(b, 0, 0);
@@ -33,16 +33,16 @@ - + - + - + @@ -54,49 +54,49 @@ @@ -140,8 +140,8 @@ - +
widthwidth Shape document width
heightheight Shape document width
pixels[]pixels[] Shape document width
Methods - + - + - + - + - + - + - + - + - + - +
get()get() Reads the color of any pixel or grabs a rectangle of pixels
set()set() Writes a color to any pixel or writes an image into another
copy()copy() Copies the entire image
mask()mask() Masks part of the image from displaying
blend()blend() Copies a pixel or rectangle of pixels using different blending modes
filter()filter() Converts the image to grayscale or black and white
save()save() Saves the image to a TIFF, TARGA, PNG, or JPEG file
resize()resize() Changes the size of an image to a new width and height
loadPixels()loadPixels() Loads the pixel data for the image into its pixels[] array
updatePixels()updatePixels() Updates the image with the data in its pixels[] array
RelatedloadImage()
- imageMode()
- createImage()
loadImage()
+ imageMode()
+ createImage()
diff --git a/reference/PVector/index.html b/reference/PVector/index.html index 83e364c..637ba90 100644 --- a/reference/PVector/index.html +++ b/reference/PVector/index.html @@ -46,16 +46,16 @@ - + - + - + @@ -67,65 +67,65 @@ diff --git a/reference/background_/index.html b/reference/background_/index.html index 1e243ce..22ec0b8 100644 --- a/reference/background_/index.html +++ b/reference/background_/index.html @@ -20,7 +20,7 @@ - + colorMode()
diff --git a/reference/createGraphics_/index.html b/reference/createGraphics_/index.html index 25a8563..fb487c6 100644 --- a/reference/createGraphics_/index.html +++ b/reference/createGraphics_/index.html @@ -20,7 +20,7 @@ - - + diff --git a/reference/createImage_/index.html b/reference/createImage_/index.html index 408cca1..4c9b176 100644 --- a/reference/createImage_/index.html +++ b/reference/createImage_/index.html @@ -20,7 +20,7 @@ - - + PGraphics
diff --git a/reference/font/index.html b/reference/font/index.html index 197025e..ec01b14 100644 --- a/reference/font/index.html +++ b/reference/font/index.html @@ -34,7 +34,7 @@ -
xx x component of the vector
yy y component of the vector
zz z component of the vector
Methods - + - + - + - + - + - + - + - + - + - + - + - + - + - +
get()get() Gets the x, y, z component of the vector
set()set() Sets the x, y, z component of the vector
mag()mag() Calculates the magnitude (length) of the vector and returns the result as a float
add()add() Adds one vector to another
sub()sub() Subtracts one vector from another
mult()mult() Multiplies the vector by a scalar
div()div() Divides the vector by a scalar
dist()dist() Calculate the Euclidean distance between two points
dot()dot() Calculates the dot product
cross()cross() Calculates the cross product
normalize()normalize() Normalizes the vector
limit()limit() Limits the magnitude of the vector
angleBetween()angleBetween() Calculates the angle between two vectors
array()array() Return a representation of the vector as an array
Examples
example pic
background(51);
example pic
background(255, 204, 0);
example pic
+		
example pic
background(51);
example pic
background(255, 204, 0);
example pic
 
 // @pjs preload must be used to preload the image
 
@@ -188,11 +188,11 @@
 
 		
stroke()
- fill()
+ fill()
- tint()
+ tint()
- colorMode()
Examples
example pic
PGraphics pg;
+		
example pic
PGraphics pg;
 
 
 
@@ -160,7 +160,7 @@
 
 		
RelatedPGraphics
PGraphics
Examples
example pic
PImage img = createImage(66, 66, RGB);
+		
example pic
PImage img = createImage(66, 66, RGB);
 
 for(int i=0; i < img.pixels.length; i++) {
 
@@ -28,7 +28,7 @@
 
 }
 
-image(img, 17, 17);
example pic
PImage img = createImage(66, 66, RGB);
+image(img, 17, 17);
example pic
PImage img = createImage(66, 66, RGB);
 
 for(int i=0; i < img.pixels.length; i++) {
 
@@ -132,9 +132,9 @@
 
 		
RelatedPImage
+
PImage
- PGraphics
Description

If you wish to use custom fonts in your sketch, these must be preloaded using the font @pjs directive. Preloading fonts uses its own command, - rather than the standard preload command, because unlike images a font must not just be cached, but must also be loaded into memory for the browser + rather than the standard preload command, because unlike images a font must not just be cached, but must also be loaded into memory for the browser to make use of. Processing.js does this by relying on the browser to load the font via a CSS @font-face rule. While most browsers support a large number of font formats for use with @font-face (woff, svg, eot, ttf and otf), relying on "truetype" (ttf) and "opentype" (otf) font formats offer the greatest interoperability between Processing and Processing.js.

@@ -90,8 +90,8 @@
Related - @pjs directives -
createFont() + @pjs directives +
createFont()
\ No newline at end of file + diff --git a/reference/globalKeyEvents/index.html b/reference/globalKeyEvents/index.html index 85c3a25..9c2620b 100644 --- a/reference/globalKeyEvents/index.html +++ b/reference/globalKeyEvents/index.html @@ -120,7 +120,7 @@ Related - @pjs directives + @pjs directives diff --git a/reference/imageMode_/index.html b/reference/imageMode_/index.html index c3fe70b..d9ebfd1 100644 --- a/reference/imageMode_/index.html +++ b/reference/imageMode_/index.html @@ -12,7 +12,7 @@ Examples -
example pic
// @pjs preload must be used to preload the image
+		
example pic
// @pjs preload must be used to preload the image
     /* @pjs preload="laDefense_crop.jpg"; */
     PImage b;
 b = loadImage("laDefense_crop.jpg");
@@ -60,9 +60,9 @@
 	
 
 		Related
-		loadImage()
- PImage
- image()
- background()
+ loadImage()
+ PImage
+ image()
+ background()
diff --git a/reference/image_/index.html b/reference/image_/index.html index 185fbd9..bbb556c 100644 --- a/reference/image_/index.html +++ b/reference/image_/index.html @@ -20,7 +20,7 @@ Examples -
example pic
+		
example pic
 
     // @pjs preload must be used to preload the image
 
@@ -30,7 +30,7 @@
 
     b = loadImage("laDefense.jpg");
 
-    image(b, 0, 0);
example pic
+    image(b, 0, 0);
example pic
 
     // @pjs preload must be used to preload the image
 
@@ -170,17 +170,17 @@
 
 		
 
-    loadImage() 
+ loadImage()
- PImage
+ PImage
- imageMode()
+ imageMode()
- tint()
+ tint()
- background()
+ background()
- alpha()
+ alpha()
diff --git a/reference/index.html b/reference/index.html index 9590788..11f0c4d 100644 --- a/reference/index.html +++ b/reference/index.html @@ -7,152 +7,153 @@

Reference

This page references all the commands available to Processing.js. Regular Javascript commands will work in Processing.js script.

The Processing.js community is working towards a 100% compatible API, allowing all native Java code to run in Javascript. Items highlighted in red are not yet implemented.

-

The original Processing reference can be found on the Processing website

-

If you encounter any problems with these commands or their documentation please file a bug +

The original Processing reference can be found on the Processing website

+

If you encounter any problems with these commands or their documentation please file a +bug

@@ -160,173 +161,173 @@
Logical Operators
@@ -334,139 +335,139 @@
Material Properties
diff --git a/reference/loadImage_/index.html b/reference/loadImage_/index.html index 4d98c04..fa0204e 100644 --- a/reference/loadImage_/index.html +++ b/reference/loadImage_/index.html @@ -20,7 +20,7 @@ Examples -
example pic
+		
example pic
 
     // @pjs preload must be used to preload the image 
 
@@ -32,7 +32,7 @@
 
     image(b, 0, 0);
 
-
example pic
+
example pic
 
 // @pjs preload must be used to preload the image
 
@@ -160,13 +160,13 @@
 
 		Related
 
-		PImage 
+		PImage 
 
-        
image() +
image() -
imageMode() +
imageMode() -
background()
+
background()
diff --git a/reference/pauseOnBlur/index.html b/reference/pauseOnBlur/index.html index ab3ffe8..864c3f3 100644 --- a/reference/pauseOnBlur/index.html +++ b/reference/pauseOnBlur/index.html @@ -86,7 +86,7 @@ Related - @pjs directives + @pjs directives - \ No newline at end of file + diff --git a/reference/pjs directive/index.html b/reference/pjs directive/index.html index 7e392d9..5d3da1d 100644 --- a/reference/pjs directive/index.html +++ b/reference/pjs directive/index.html @@ -34,9 +34,9 @@

As Processing.js offers a tighter integration between Processing sketches and webpages than the traditional applet approach, certain functions that are normally regulated by Processing are left to be handled by the browser. This approach means that certain behaviour that is expected from a sketch may not work without additional "outside the sketch" instructions, for which /* @pjs */ directives must be used. There - are two types of directives: directives that tell Processing.js to buffer data that must be available to a sketch when it is run (preload, - font), and directives that tell Processing.js how to behave once the sketch is running (crisp, - globalKeyEvents, pauseOnBlur).

+ are two types of directives: directives that tell Processing.js to buffer data that must be available to a sketch when it is run (preload, + font), and directives that tell Processing.js how to behave once the sketch is running (crisp, + globalKeyEvents, pauseOnBlur).

These directives are in block comment syntax so that they do not interfere with a sketch when it runs as native Processing, but if you do not wish to pollute your source with @pjs directives, you can also store your directives in a separate file, and only call this file on your page:

directives.pde:

@@ -87,11 +87,11 @@ Related - font -
crisp -
pauseOnBlur -
globalKeyEvents -
preload + font +
crisp +
pauseOnBlur +
globalKeyEvents +
preload diff --git a/reference/preload/index.html b/reference/preload/index.html index cd30749..bf7714a 100644 --- a/reference/preload/index.html +++ b/reference/preload/index.html @@ -30,7 +30,7 @@ Description -

This directive regulates image preloading, which is required when using loadImage() or requestImage() in a sketch. +

This directive regulates image preloading, which is required when using loadImage() or requestImage() in a sketch. Using this directive will preload all images indicated between quotes, and comma separated if multiple images are used, so that they will be ready for use when the sketch begins running. As resources are loaded via the AJAX approach, not using this directive will result in the sketch loading an image, and then immediately trying to use this image in some way, even though the browser has not finished downloading and caching it. Images @@ -80,9 +80,9 @@ Related - @pjs directives -
loadImage() -
requestImage() + @pjs directives +
loadImage() +
requestImage() - \ No newline at end of file + diff --git a/reference/requestImage_/index.html b/reference/requestImage_/index.html index 328c51f..021aafc 100644 --- a/reference/requestImage_/index.html +++ b/reference/requestImage_/index.html @@ -76,7 +76,7 @@ Related - loadImage()
- PImage
+ loadImage()
+ PImage
diff --git a/tools/processing-helper.html b/tools/processing-helper.html index 251b244..d6500d8 100644 --- a/tools/processing-helper.html +++ b/tools/processing-helper.html @@ -31,5 +31,5 @@

Canvas

Output

- - + +