diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 22fa762ad..fd4f2b066 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,2 @@ -release/ -dist/ -logs/ - -Unsaved\ Document* +node_modules .DS_Store -*.swp -*~ -*.pyc diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 0393283fb..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "test/parser/The-Nature-of-Code"] - path = test/parser/The-Nature-of-Code - url = git://github.com/shiffman/The-Nature-of-Code.git diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..419ff554c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,102 @@ +# How to contribute to Processing.js + +If you want to contribute to Processing.js in any form, that's great! This document explains the fundamental philosophy behind Processing.js, what kind of contributions are welcome, and how to interact with each other on the issue tracker and on IRC + +## The fundamental rule for Processing.js + +The fundamental rule for Processing.js is: **Processing.js should allow Processing code to run on the web**. + +Any contributions to Processing.js are evaluated in terms of getting the library as close to "parity" with Processing as possible. + +Parity means that if it works in Processing, it should work in Processing.js too, *provided the limitations of JavaScript, compared to java, allow for that*. + +However, very importantly "parity" does **not** mean that Processing.js's code needs to do exactly the same thing for code that does *not* work in Processing, so code that causes errors to be thrown in Processing might actually "do something" in Processing.js, just not the right thing at all. + +Processing.js is not a "general purpose graphics library" like other JavaScript libraries, it is specifically meant to make Processing source code run on the web, and so if you run across bugs because you're using Processing.js as a pure JS library, then please first make sure that the code you wrote works in regular Processing. If it doesn't, then you'll first have to rewrite your code to work there, before concluding there is a bug in Processing.js + +## How can I contribute? + +There are a few categories of contribution that help improve Processing.js: + +### Writing code fixes + +This is the big one: if parts of Processing.js do the wrong thing, compared to Processing, or there are functions missing from Processing.js that are in the Processing API, or they exist but they don't support all the different ways that function can behave, then fixing that is the primary way to contribute to Processing.js + +Fork the repository to your account, clone your copy, fix up the code you want to fix up (in a branch dedicated to that one thing you're fixing), and then if you also want to contribute that fix back to Processing.js: + +- find the issue that is associated with the problem you solved +- if there is no issue, file one! +- write, or extend, one or more test cases for the code that you fixed. The test should fail without your fixes, but pass with your fixes. +- file a pull request for your branch with the fix against the "processing-js" account (not jeresig, which github will probably pick for you) + +After that, people can comment on your pull request to improve it so that it will neatly fit in with the rest of the code base. + +### Writing or improving tests + +Even if you don't know how to write JavaScript all that well, if you run into some code that you know works in Processing, but does not work in Processing.js, having a test with that code is super useful! + +- reduce your code to ideally fewer than 10 lines of code that still reproduces the bad behaviour you see +- find a test for the part of the code in Processing.js that breaks for your +- add your code to that test and submit a pull request for it! + +### Writing or improving documentation + +Keeping documentation up to date is one of the hardest problems in open source software. If you want to help improve the documentation: hurray! + +- code documentation is in the form of comments in the source code +- reference and website documentation can be found over on the processing-js.github.io repository, and PRs are always welcome! + +### Finding bugs and writing issues for others + +Even if you don't want to write code at all, you can write a bug with some code that works in Processing but does not work in Processing.js, with a description of what it should do, what Processing does, and what you see Processing.js do instead. You probably found something that no one else has found yet, so reporting it will help people track down the problem even if they've never run across it themselves. + +### Help debug problems to uncover + +If you do like coding, but you don't want to write patches and go through the process of getting those landed, you can still help out by investigating what might be wrong, and simply reporting your findings in the issue associated with the problem. Things like "This seems to be caused by the caching mechanism used in the Parser.js module, in the StringAST parse function" are valuable information for others to know: it helps save a ton of time just knowing where to start looking. + +## How do I interact with others? + +Open source is a collaborative efforts, so try to interact with others in an open and friendly way. Pointing out things are wrong is fine, but be polite about it: there is a normal, real human being on the other side of the table, and they have feelings, too. Don't just say what is wrong, but explain why you think so, so that people can learn from that and can have a discussion to get to the root of what is wrong. + +### Remember: you are not your code + +It is hard to not feel attacked personally when someone points out a problem with the code you wrote, but remember that you are not your code. We all make mistakes, have typos, forget about a particular pattern that "would have been much better to use" etc. etc. so when someone points out mistakes in your code, as long as they're polite about it they're helping you get better, not telling you that you are bad at writing code. + +### Have a normal conversation + +It is tempting to just list comments and critique, such as a bullet list of things that wrong, or points you agree/disagree with, but you're not talking to machines, so please don't do this. Use normal language to describe what you're thinking of and what you'd recommend be done in normal paragraphs of text. If you have multiple points to make, just write multiple paragraphs. They can be short, but unless someone asked a question and you're supplying the answer and that answer is short, don't just list factoids. + +### If someone tells you they feel uncomfortable with things you do, listen + +It's easy to think that the way you communicate is fine, and that when someone says they are uncomfortable with it, then that's their problem. That is, however, not acceptable in this project. Respect other contributors, and behave in a way that does not make them feel uncomfortable. If someone points out that the way you communicate is curt and even rude, ask them what they mean and how they think you could improve your communication. Don't tell them off for being too sensitive, and also don't just go "ok" and then try to figure out how to fix it on your own: ask people to help you improve when they point out there is room for improvement. This is true for code, but it's just as true for behaviour. + +### And if someone makes you feel uncomfortable, tell them + +The reserve of the previous point is also true: if someone is behaving in a way that makes you uncomfortable, tell them that. And then also tell them why that is and what you think they can do to overcome that. Don't wait for them to acknowledge you before telling them how you would like to be treated instead. Working in a group is not just about getting good code, tests, and documentation written, but also about making sure that everyone in the group can work together without animosity or resentment. You can always walk out on a project whenever you want, so it's worth first trying to address problems before giving up on someone. You might be surprised how much they listen. + +### Don't "derail" conversations with side issues + +Each issue is for, not surprisingly, one issue. If while discussing an issue you find a new bug, file a new issue for it so that you can have two conversations, each about its own dedicated topic. + +If you are discussion an issue and you find yourself talking about things that are only tangentially related to that issue, again: please file a new issue instead, or if the tangent isn't all that important, simply stop talking about it can get the issue back on track. + +While having discussions is natural, open source development is not about having discussions, it's about having discussions that lead to actions that can be taken to improve the open source project. If you want to have a discussion that you think needs to be had: **file an issue for it**. Filing an issue like "discuss what parity means" or "should Processing.js be more informative if it's given broken code" is a perfectly legitimate course of action, and then a meaningful, on-topc discussion can be had there. + +#### "derailing" comments may be deleted, and fully derailed issues may get closed + +In order to keep things focussed on developing Processing.js, comments that are intended to derail an issue, or derailed discussions that keep going in issues, may end up getting deleted, or have the issue closed and a new one made with all the information that was relevant to the issue copied over, but nothing else. + +### "No one complains in any of the other projects I contribute to about this" + +Code of conduct may vary from place to place, so if you want to contribute to Processing.js, this is the code of conduct we all promise to abide by. If you can't (and sometimes, you really can't), then there are tons of other projects that you can contribute to. + +## If you use IRC: IRC is asynchronous - if you won't be able to stick around, file issues instead + +If you're using the IRC channel (#processingjs on irc.mozilla.org) and you want to discuss any of the contribution steps, be aware that IRC is asynchronous: people are in different timezones and many use "bouncers" which allow their IRC connection to stay open even when they are not behind the computer right now. If you want to ask a question, ask your question and then wait for someone to look in to answer it. Don't ask "is anyone here" or say "I have a question" and then wait for people to respond: people will look into the channel and have no idea when you asked that, so unless there is a real question or comment they can meaningfully respond to, they will just look away again and you will probably never get a response when the channel is quiet. + +Also, reporting bugs in IRC is useful, but always also file an issue, so that when people leave IRC, that information can still be found somewhere. + + +## What happens with my contributions? Will I get credit? + +As an open source project, everything you send to be merged into Processing.js becomes part of Processing.js, without any ownership attached to it. Code and documentation, insofar as it is unique to Processing.js, simply becomes part of "Processing.js", without authorship, and covered by an MIT license. diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100755 index 000000000..e7371c362 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,26 @@ +module.exports = function( grunt ) { + "use strict"; + grunt.initConfig({ + pkg: grunt.file.readJSON( "package.json" ), + jshint: { + options: { + browser: true, + globals: { + window: true, + document: true + }, + "-W054": true, // new Function() warning + "-W079": true // var redefinition warning + }, + files: [ + "./*.js", + "./lib/**/*.js", + "./src/**/*.js", + "!./processing.js", + "!./processing.min.js" + ] + } + }); + grunt.loadNpmTasks( "grunt-contrib-jshint" ); + grunt.registerTask( "default", [ "jshint" ]); +}; diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..8ed64b693 --- /dev/null +++ b/ISSUE_TEMPLATE.md @@ -0,0 +1,7 @@ +Thank you for finding a bug in Processing.js, or having a feature request you'd like to see added. + +Processing.js is not under active maintenance at the moment, lacking developers that have the time +to work on it. As such, any bug you find might take a long time to get a fix. However, if you're +interested in fixing things yourself, I (Pomax) will be more than happy to review your suggested +code changes and merge them in if they fix the problem you were having without introducing problems +due to side effects your code might have. diff --git a/LICENSE-HEADER b/LICENSE-HEADER deleted file mode 100644 index b0f0d1512..000000000 --- a/LICENSE-HEADER +++ /dev/null @@ -1,12 +0,0 @@ -/*** - - P R O C E S S I N G . J S - @VERSION@ - a port of the Processing visualization language - - Processing.js is licensed under the MIT License, see LICENSE. - For a list of copyright holders, please refer to AUTHORS. - - http://processingjs.org - -***/ - diff --git a/Makefile b/Makefile deleted file mode 100644 index 1e06f4016..000000000 --- a/Makefile +++ /dev/null @@ -1,230 +0,0 @@ -############################################################################################# -# NOTES: -# -# This Makefile assumes that you have the following installed, setup: -# -# python -# java -# Unixy shell (use msys on Windows) -# $JSSHELL environment variable in .profile or .bashrc pointing to a SpiderMonkey binary -# If on Windows, $FIND environment variable in .profile or .bashrc for unixy find cmd -############################################################################################# - -JSSHELL ?= $(error Specify a valid path to a js shell binary in ~/.profile: export JSSHELL=C:\path\js.exe or /path/js) - -# If you want to test just one file or dir, use |make check-one TEST=| -TEST ?= $(error Specify a test filename/dir in TEST when using check-test) - -# Version number used in naming release files. Defaults to git commit sha. -VERSION ?= $(shell git show -s --pretty=format:%h) - -# On Windows? You can specify a FIND value for your cygwin/msys find command -FIND ?= /usr/bin/find - -TMP := .__tmp_file__ -QUIET := > $(TMP) ; rm -f $(TMP) - -EMPTY := -SRC_DIR :=. -P5 :=processing -PJS :=$(P5).js -PJS_SRC :=$(SRC_DIR)/$(PJS) -PJS_VERSION :=$(P5)-$(VERSION) -PJS_VERSION_FULL :=$(P5)-js-$(VERSION) -PJS_API_SUFFIX := -API - -RELEASE_DIR :=$(SRC_DIR)/release -PJS_RELEASE_PREFIX :=$(RELEASE_DIR)/$(PJS_VERSION) -PJS_RELEASE_SRC :=$(PJS_RELEASE_PREFIX).js -PJS_RELEASE_MIN :=$(PJS_RELEASE_PREFIX).min.js -EXAMPLE_HTML :=$(RELEASE_DIR)/example.html -EXAMPLES_DIR :=$(PJS_RELEASE_PREFIX)-examples - -TOOLS_DIR :=$(SRC_DIR)/tools -FAKE_DOM :=$(TOOLS_DIR)/fake-dom.js -CLOSUREJAR :=$(TOOLS_DIR)/closure/compiler.jar -YUIJAR :=$(TOOLS_DIR)/yui/yuicompressor-2.4.6.jar -RUNTESTS :=@@$(TOOLS_DIR)/runtests.py $(JSSHELL) -RUNJS :=@@$(JSSHELL) -f $(FAKE_DOM) -f - -SKETCHRUN :=runSketch -SKETCHINPUT ?=$(error Specify an input filename in SKETCHINPUT when using package-sketch) -SKETCHOUTPUTSRC ?=$(SKETCHINPUT).src -SKETCHOUTPUT ?=$(SKETCHINPUT).js - -preprocess =@@$(JSSHELL) -f $(TOOLS_DIR)/jspreprocess.js -e "PARSER=false;preprocess();" < $(2) >> $(1) - -# Both Google Closure and YUI are in our tree. Switch compile below to whichever. -compile_closure =@@java -jar $(CLOSUREJAR) --js="$(1)" --js_output_file="$(2)" $(3) --jscomp_off=nonStandardJsDocs -compile_yui =@@java -jar $(YUIJAR) -o "$(2)" "$(1)" -compile=$(compile_yui) - -copydir = @@cp -R "$(1)" "$(2)" $(QUIET) && $(FIND) $(RELEASE_DIR) -type f \( -iname '*.DS_Store' -o \ - -iname 'desktop.ini' -o \ - -iname 'Thumbs.db' \) -delete -addlicense = @@cat $(SRC_DIR)/LICENSE-HEADER | sed -e 's/@VERSION@/$(VERSION)$(2)/' > $(RELEASE_DIR)/addlicense.tmp && \ - cat $(1) >> $(RELEASE_DIR)/addlicense.tmp && \ - rm -f $(1) && \ - mv $(RELEASE_DIR)/addlicense.tmp $(1) -addversion = @@cp $(1) addversion.tmp && \ - rm -f $(1) && \ - cat addversion.tmp | sed -e 's/@VERSION@/$(VERSION)$(2)/' > $(1) && \ - rm -f addversion.tmp - -# Rule for making pure JS code from a .pde (runs through parser + beautify) -%.js : %.pde - @@$(TOOLS_DIR)/pde2js.py $(JSSHELL) $? - -release: release-files zipped examples check-release ref-testing - @@echo "Release Created, see $(RELEASE_DIR)" - -check: check-lint check-closure check-globals check-submodules check-summary - -release-dir: clean - @@mkdir $(RELEASE_DIR) - -all: release - -release-files: $(PJS_RELEASE_SRC) closure api-only example release-docs extensions web-server - -web-server: release-dir - @@echo "Copying httpd.py to release..." - @@cp $(TOOLS_DIR)/httpd.py $(RELEASE_DIR) - -zipped: release-files - @@echo "Creating zipped archives..." - @@gzip -9 -c $(PJS_RELEASE_MIN) > $(PJS_RELEASE_MIN).gz - @@cd $(RELEASE_DIR); $(FIND) . -print | zip $(PJS_VERSION_FULL).zip -@ $(QUIET) - -release-docs: release-dir - @@echo "Copying project release docs..." - @@cp $(SRC_DIR)/AUTHORS $(RELEASE_DIR) - @@cp $(SRC_DIR)/README.md $(RELEASE_DIR)/README.md - @@$(call addversion,$(RELEASE_DIR)/README.md,$(EMPTY)) - @@cp $(SRC_DIR)/LICENSE $(RELEASE_DIR) $(QUIET) - @@cp $(SRC_DIR)/CHANGELOG $(RELEASE_DIR) $(QUIET) - -example: $(PJS_RELEASE_SRC) - @@echo "Creating example.html..." - @@cat $(SRC_DIR)/example.html | sed -e 's/src="processing.js"/src="$(PJS_VERSION).js"/' > $(EXAMPLE_HTML) - @@cp $(SRC_DIR)/example.pde $(RELEASE_DIR) - -examples: $(PJS_RELEASE_SRC) - @@echo "Copying examples..." - @@mkdir $(EXAMPLES_DIR) - @@cp $(PJS_RELEASE_SRC) $(EXAMPLES_DIR)/$(PJS) - @@$(call copydir,$(SRC_DIR)/examples,$(EXAMPLES_DIR)) - @@cd $(RELEASE_DIR); zip -r $(PJS_VERSION_FULL)-examples.zip $(PJS_VERSION)-examples $(QUIET) - @@rm -fr $(EXAMPLES_DIR) - -extensions: release-dir - @@echo "Copying extensions..." - @@$(call copydir,$(SRC_DIR)/extensions,$(RELEASE_DIR)) - -$(PJS_RELEASE_SRC): $(PJS_SRC) release-dir - @@echo "Creating $(PJS_RELEASE_SRC)..." - @@$(call compile_closure,$(PJS_SRC),$(RELEASE_DIR)/closurecompile.out,--compilation_level WHITESPACE_ONLY) - @@$(JSSHELL) -f $(TOOLS_DIR)/fake-dom.js \ - -f $(PJS_SRC) \ - $(TOOLS_DIR)/rewrite-pconstants.js < $(RELEASE_DIR)/closurecompile.out > \ - $(RELEASE_DIR)/processing.js-no-pconstants - @@$(TOOLS_DIR)/jsbeautify.py $(JSSHELL) $(RELEASE_DIR)/processing.js-no-pconstants > $(PJS_RELEASE_SRC) - @@rm -f $(RELEASE_DIR)/closurecompile.out - @@rm -f $(RELEASE_DIR)/processing.js-no-pconstants - @@$(call addlicense,$(PJS_RELEASE_SRC),$(EMPTY)) - @@$(call addversion,$(PJS_RELEASE_SRC),$(EMPTY)) - @@$(RUNJS) $(PJS_RELEASE_SRC) - -check-tests: - $(RUNTESTS) - -check-release: closure - $(RUNTESTS) -s -l $(PJS_RELEASE_MIN) - -check-submodules: - @@echo "\nChecking for git submodules" - @@git submodule status | awk '/^-/ { print $$2, "not found"; printMsg=1 } \ - /^ / { print $$2, "included" } \ - END { if (printMsg==1) { print "To add these tests to your repository, run git submodule init && git submodule update" } }' - -check-summary: - $(RUNTESTS) -s - -check-lint: - @@echo "\nRunning jslint on processing.js:" - @@$(TOOLS_DIR)/jslint.py $(JSSHELL) $(PJS_SRC) - -check-closure: release-dir - @@echo "\nRunning closure compiler on processing.js:" - @@$(call compile,$(PJS_SRC),$(RELEASE_DIR)/closurecompile.out,$(EMPTY)) - @@rm -f $(RELEASE_DIR)/closurecompile.out - -check-parser: - $(RUNTESTS) -p - -check-unit: - $(RUNTESTS) -u - -add-coverage: release-dir - @@cat $(PJS_SRC) | $(JSSHELL) -f $(TOOLS_DIR)/jscoverage.js > $(RELEASE_DIR)/$(P5)-cv.js - -check-one: - $(RUNTESTS) -t $(TEST) - -check-coverage: add-coverage - @@echo "Creating codecoverate.txt..." - @@$(RUNTESTS) -l $(RELEASE_DIR)/$(P5)-cv.js -c $(RELEASE_DIR)/codecoverage.txt - -check-globals: - @@echo "\nRunning jsglobals on processing.js:" - @@$(RUNJS) $(TOOLS_DIR)/jsglobals.js -e "findDifference()" < $(PJS_SRC) - -print-globals: - @@$(RUNJS) $(TOOLS_DIR)/jsglobals.js -e "printNames()" < $(PJS_SRC) - -closure: $(PJS_RELEASE_SRC) release-dir - @@echo "Compiling processing.js with closure..." - @@$(call compile,$(PJS_RELEASE_SRC),$(PJS_RELEASE_MIN),$(EMPTY)) - @@$(call addlicense,$(PJS_RELEASE_MIN),$(EMPTY)) - @@$(call addversion,$(PJS_RELEASE_MIN),$(EMPTY)) - @@$(RUNJS) $(PJS_RELEASE_MIN) - -compile-sketch: - @@$(RUNJS) $(PJS_SRC) -f $(TOOLS_DIR)/jscompile.js < $(SKETCHINPUT) > $(SKETCHOUTPUT) - @@echo "Created $(SKETCHOUTPUT)" - -package-sketch: $(PJS_SRC) - @@echo "function $(SKETCHRUN)(canvas) {" > $(SKETCHOUTPUTSRC) - @@$(call preprocess,$(SKETCHOUTPUTSRC),$(PJS_SRC)) - @@echo "return new Processing(canvas," >> $(SKETCHOUTPUTSRC) - @@$(RUNJS) $(PJS_SRC) -f $(TOOLS_DIR)/jscompile.js < $(SKETCHINPUT) >> $(SKETCHOUTPUTSRC) - @@echo "); } window['$(SKETCHRUN)']=$(SKETCHRUN);" >> $(SKETCHOUTPUTSRC) - @@$(call compile_closure,$(SKETCHOUTPUTSRC),$(SKETCHOUTPUT),--compilation_level ADVANCED_OPTIMIZATIONS) - @@$(call addlicense,$(SKETCHOUTPUT),-Packaged) - @@$(call addversion,$(SKETCHOUTPUT),-Packaged) - @@rm -f $(SKETCHOUTPUTSRC) - @@echo "Created $(SKETCHOUTPUT)" - -api-only: $(PJS_SRC) release-dir - @@echo "Creating processing.js API version..." - @@$(call preprocess,$(PJS_RELEASE_PREFIX)-api.js,$(PJS_SRC)) - @@$(JSSHELL) -f $(TOOLS_DIR)/fake-dom.js \ - -f $(PJS_SRC) \ - $(TOOLS_DIR)/rewrite-pconstants.js < $(PJS_RELEASE_PREFIX)-api.js > \ - $(RELEASE_DIR)/processing.js-no-pconstants - @@$(call compile_closure,$(RELEASE_DIR)/processing.js-no-pconstants,$(PJS_RELEASE_PREFIX)-api.tmp.js,--compilation_level WHITESPACE_ONLY) - @@$(TOOLS_DIR)/jsbeautify.py $(JSSHELL) $(PJS_RELEASE_PREFIX)-api.tmp.js > $(PJS_RELEASE_PREFIX)-api.js - @@$(call addlicense,$(PJS_RELEASE_PREFIX)-api.js,-API) - @@$(call addversion,$(PJS_RELEASE_PREFIX)-api.js,-API) - @@$(call compile,$(PJS_RELEASE_PREFIX)-api.js,$(PJS_RELEASE_PREFIX)-api.min.js,$(EMPTY)) - @@$(call addlicense,$(PJS_RELEASE_PREFIX)-api.min.js,$(PJS_API_SUFFIX)) - @@rm -f $(PJS_RELEASE_PREFIX)-api.tmp.js - @@rm -f $(RELEASE_DIR)/processing.js-no-pconstants - -ref-testing: closure - @@cp -R test release - @@cp $(PJS_RELEASE_MIN) $(RELEASE_DIR)/$(PJS) - @@echo "Created ref-testing distribution, see $(RELEASE_DIR)/test/ref/" - -clean: - @@rm -fr $(RELEASE_DIR) diff --git a/README.md b/README.md old mode 100644 new mode 100755 index dce6ca7a1..5d8eaf790 --- a/README.md +++ b/README.md @@ -1,139 +1,7 @@ -Processing.js - @VERSION@ -========================= -a port of the Processing visualization language +# ⚠️ This project has been archived ⚠️ -About Us --------- -* License: MIT (see included LICENSE file for full license) -* Original Author: John Resig (http://ejohn.org) -* Maintainers: See included AUTHORS file for contributor list -* Web Site: http://processingjs.org -* Github Repo: http://github.com/jeresig/processing-js -* Bug Tracker: http://processing-js.lighthouseapp.com +With the development of [p5js](https://p5js.org/) and the API advances in [Processing](https://processing.org/) itself, as well as Processing.js itself having been in maintenance mode for quite a few years now, this project has been archived as of December 2018. -Contributing and/or Participating Organizations ------------------------------------------------ -* The Processing Project and Community: http://processing.org -* The Mozilla Foundation: https://www.mozilla.org/foundation/ -* Seneca College (CDOT): http://zenit.senecac.on.ca/wiki/ +Processing.js would like to thank everyone who contributed over the years: it's been an amazing project! The code will still be available in read-only mode, no releases will be pulled from any of the places it was distributed through, but the last version is, and will forever be, [v1.6.6](https://github.com/processing-js/processing-js/tree/v1.6.6). -Contact Us ----------- -* IRC Channel: Join the development team at irc://irc.mozilla.org/processing.js -* Mailing List: User discussions happen at http://groups.google.com/group/processingjs -* Twitter: http://twitter.com/processingjs - -What is Processing.js? ----------------------- -Processing.js is the sister project of the popular visual programming language -Processing, designed for the web. Processing.js makes your data visualizations, -digital art, interactive animations, educational graphs, video games, etc. work -using web standards and without any plug-ins. You write code using the Processing -language (or JavaScript), include it in your web page, and Processing.js does the -rest. - -Processing.js is perhaps best thought of as a JavaScript runtime for the Processing -language. Where Processing relies upon Java for its graphics back-end, Processing.js -uses the web--HTML5, canvas, and WebGL--to create 2D and 3D graphics, without -developers having to learn those APIs and technologies. - -Originally developed by Ben Fry and Casey Reas, Processing started as an open -source programming language based on Java to help the electronic arts and visual -design communities learn the basics of computer programming in a visual context. -Processing.js takes this to the next level, allowing Processing code to be run by -any HTML5 compatible browser, including current versions of Firefox, Safari, -Chrome, Opera, and Internet Explorer. Processing.js brings the best of visual -programming to the web, both for Processing and web developers. - -Much like the native language, Processing.js is a community driven project, -and continues to grow as browser technology advances. Processing.js is now -compatible with Processing, and has an active developer and user community. - -Platform and Browser Compatibility ----------------------------------- -Processing.js is explicitly developed for and actively tested on browsers that -support the HTML5 canvas element. Processing.js runs in FireFox, Safari, -Chrome, Opera, and Internet Explorer. - -Processing.js aims for 100 percent compatibility across all supported browsers; -however, differences between individual canvas implementations may give -slightly different results in your sketches. - -Setting up a Simple Sketch --------------------------- -In order to get a sketch going in the browser you will need to download the -processing.js file and make two new files - one with the extension .html and -the other with the extension .pde. - -The .html file will have a link to the processing.js file you have downloaded, -and a canvas tag with a link to the .pde file that you made. - -Here is an example of an .html file: - - - - - - - - - - - -The custom attribute _data-processing-sources_ is used to link the sketch to -the canvas. - -Here is an example of a Processing sketch: - - void setup() { - size(200, 200); - background(125); - fill(255); - noLoop(); - PFont fontA = loadFont("courier"); - textFont(fontA, 14); - } - - void draw() { - text("Hello Web!", 20, 20); - println("Hello Error Log!"); - } - -Many more examples are available on the Processing.js website, http://processingjs.org/. - -Loading Processing.js Sketches Locally --------------------------------------- -Some web browsers (e.g., Chrome) require secondary files to be loaded from a -web server for security reasons. This means loading a web page that references -a Processing.js sketch in a file via a file:/// URL vs. http:// will fail. You -are particularly likely to run into this problem when you try to view your -webpage directly from file, as this makes all relatively links file:/// links. - -There are several ways to get around this problem. You can use a browser which -does allow file:/// access, although most current browsers either have, or plan -to, no longer allow this by default. Another option is to run your own localhost -webserver so that you can test your page from http://localhost, thus avoiding -file:/// URLs. If you do not have a webserver installed, you can use the simple -webserver that is bundled with Processing.js. This requires Python to be installed, -and can be started by running the "httpd.py" script. This will set up a localhost -webserver instance for as long as you keep it running, so that you can easily -test your page in any browser of your choosing. - -Finally, most browsers can be told to turn off their same-origin policy -restrictions, allowing you to test your page without running a localhost -webserver. However, we strongly advise against this as it will disable -same-origin policy checking for any and all websites that you visit until -you turn it back on. While "easy", this is unsafe. - -Learn More About Processing.js -------------------------------- -Processing developers should start with the Processing.js Quick Start Guide for -Processing Developers at http://processingjs.org/reference/articles/p5QuickStart. - -JavaScript developers should start with the Processing.js Quick Start Guide for -JavaScript Developers at http://processingjs.org/reference/articles/jsQuickStart - -A more detailed guide is http://processingjs.org/articles/PomaxGuide.html - -A complete reference of all Processing.js functions and variables is available -at http://processingjs.org/reference. +Thank you for your support, and happy coding (with newer solutions)! diff --git a/bower.json b/bower.json new file mode 100644 index 000000000..7c88784f4 --- /dev/null +++ b/bower.json @@ -0,0 +1,19 @@ +{ + "name": "Processing.js", + "version": "1.4.16", + "main": "processing.js", + "ignore": [ + "bundle", + "lib", + "node_modules", + "src", + "test", + "test.js", + "test.html", + "build.js", + "Gruntfile.js", + "minify.js", + "package.json", + "server.js" + ] +} diff --git a/build.js b/build.js new file mode 100755 index 000000000..c892531ea --- /dev/null +++ b/build.js @@ -0,0 +1,22 @@ +// build script for generating processing.js + +var Browser = { + isDomPresent: true, + navigator: navigator, + window: window, + document: document, + ajax: function(url) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, false); + if (xhr.overrideMimeType) { + xhr.overrideMimeType("text/plain"); + } + xhr.setRequestHeader("If-Modified-Since", "Fri, 01 Jan 1960 00:00:00 GMT"); + xhr.send(null); + // failed request? + if (xhr.status !== 200 && xhr.status !== 0) { throw ("XMLHttpRequest failed, status code " + xhr.status); } + return xhr.responseText; + } +}; + +window.Processing = require('./src/')(Browser); diff --git a/AUTHORS b/bundle/AUTHORS old mode 100644 new mode 100755 similarity index 100% rename from AUTHORS rename to bundle/AUTHORS diff --git a/CHANGELOG b/bundle/CHANGELOG old mode 100644 new mode 100755 similarity index 99% rename from CHANGELOG rename to bundle/CHANGELOG index 50f19ec0b..1a3307fd7 --- a/CHANGELOG +++ b/bundle/CHANGELOG @@ -1,3 +1,8 @@ +August 9, 2012 - Release 1.4.1 + + * Added String.matches() [#1886] + * Fixed canvas not receiving focus [#1883] + July 31, 2012 - Release 1.4.0 * Added a PJS object inspector [#1867] diff --git a/bundle/LICENSE b/bundle/LICENSE new file mode 100755 index 000000000..70575be1d --- /dev/null +++ b/bundle/LICENSE @@ -0,0 +1,28 @@ +Processing.js +Copyright (C) 2008 John Resig +Copyright (C) 2009-2011; see the AUTHORS file for authors and +copyright holders. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +tinylog lite JavaScript library +Copyright (C) 2010 Eli Grey +https://github.com/eligrey/tinylog diff --git a/bundle/LICENSE-HEADER b/bundle/LICENSE-HEADER new file mode 100755 index 000000000..50eb9546b --- /dev/null +++ b/bundle/LICENSE-HEADER @@ -0,0 +1,12 @@ +/*** + + P R O C E S S I N G . J S - @VERSION@ + a port of the Processing visualization language + + Processing.js is licensed under the MIT License, see https://github.com/processing-js/processing-js/blob/master/bundle/LICENSE + For a list of copyright holders, please refer to https://github.com/processing-js/processing-js/blob/master/bundle/AUTHORS + + http://processingjs.org + +***/ + diff --git a/example.html b/example.html deleted file mode 100644 index 1aa3a6b45..000000000 --- a/example.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - Processing.js Example Page - - - - - - - - -

Processing.js Example Page - Loading Sketches

- -

This is a sketch that is loaded from source. If you want to be able - to use this sketch after loading, for instance in your own JavaScript - code, it needs an id='...' so that you can request it using:

- -
   Processing.getIntanceById('...')
- -

You can also load a sketch from multiple source files by putting - them all in a canvas data-processing-sources attribute string, separated - with spaces:

- -
   <canvas ... data-processing-sources="file1.pde file2.pde file3.pde" ...>
- - - -
- -

This is a source-less sketch, loaded from inline source code. Note - that in order for an on-page inline sketch to be loaded into a canvas, - the sketch must either immediately preceed the <canvas> it is to be - loaded in, or the script needs to indicate the id for the canvas.

- -

This means you can either place your script inside the <body> element, - above its associated <canvas>, or in the <head> element, pointing to - its associated <canvas> element.

- - - - -
- -

This sketch is loaded from a <script> in the html header block - which specifies this canvas as its target, referencing its id:

- -
   <script type="text/processing" data-processing-target="targetcanvas">...</script>
- - - - diff --git a/example.pde b/example.pde deleted file mode 100644 index 2db2c11ae..000000000 --- a/example.pde +++ /dev/null @@ -1,18 +0,0 @@ -// Processing.js example sketch - -int fontsize = 24; - -void setup() { - size(200, 200); - stroke(0); - fill(0); - textFont(createFont("Arial",fontsize)); - noLoop(); -} - -void draw() { - background(#F0F0E0); - String textstring = "source example"; - float twidth = textWidth(textstring); - text(textstring, (width-twidth)/2, height/2); -} diff --git a/examples/basic/additivewave.html b/examples/basic/additivewave.html deleted file mode 100644 index e6a50d05b..000000000 --- a/examples/basic/additivewave.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - -

Processing.js

-

AdditiveWave

- -

by Daniel Shiffman. - -Create a more complex wave by adding two waves together.

- -

Original Processing.org Example: AdditiveWave
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int xspacing = 8;   // How far apart should each horizontal location be spaced
-int w;              // Width of entire wave
-int maxwaves = 4;   // total # of waves to add together
-
-float theta = 0.0f;
-float[] amplitude = new float[maxwaves];   // Height of wave
-float[] dx = new float[maxwaves];          // Value for incrementing X, to be calculated as a function of period and xspacing
-float[] yvalues;                           // Using an array to store height values for the wave (not entirely necessary)
-
-void setup() {
-  size(200,200);
-  frameRate(30);
-  colorMode(RGB,255,255,255,100);
-  smooth();
-  w = width+16;
-
-  for (int i = 0; i < maxwaves; i++) {
-    amplitude[i] = random(10,30);
-    float period = random(100,300); // How many pixels before the wave repeats
-    dx[i] = (TWO_PI / period) * xspacing;
-  }
-
-  yvalues = new float[w/xspacing];
-}
-
-void draw() {
-  background(0);
-  calcWave();
-  renderWave();
-}
-
-void calcWave() {
-  // Increment theta (try different values for 'angular velocity' here
-  theta += 0.02;
-
-  // Set all height values to zero
-  for (int i = 0; i < yvalues.length; i++) {
-    yvalues[i] = 0.0f;
-  }
- 
-  // Accumulate wave height values
-  for (int j = 0; j < maxwaves; j++) {
-    float x = theta;
-    for (int i = 0; i < yvalues.length; i++) {
-      // Every other wave is cosine instead of sine
-      if (j % 2 == 0)  yvalues[i] += sin(x)*amplitude[j];
-      else yvalues[i] += cos(x)*amplitude[j];
-      x+=dx[j];
-    }
-  }
-}
-
-void renderWave() {
-  // A simple way to draw the wave with an ellipse at each location
-  noStroke();
-  fill(255,50);
-  ellipseMode(CENTER);
-  for (int x = 0; x < yvalues.length; x++) {
-    ellipse(x*xspacing,width/2+yvalues[x],16,16);
-  }
-}
- - diff --git a/examples/basic/alphamask.html b/examples/basic/alphamask.html deleted file mode 100644 index 6bf82c34f..000000000 --- a/examples/basic/alphamask.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - -

Processing.js

-

Alphamask

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading. Not sure image masks were ever implemented in Processing.js.-F1LT3R

- - -

Loads a "mask" for an image to specify the transparency -in different parts of the image. The two images are blended -together using the mask() method of PImage. - -Created 29 April 2003.

- -

Original Processing.org Example: Alphamask
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-
-/* @pjs preload="data/test.jpg,data/mask.jpg"; */
-
-PImage img;
-PImage maskImg;
-
-void setup() 
-{
-  size(200,200);
-  img = loadImage("test.jpg");
-  maskImg = loadImage("mask.jpg");
-  img.mask(maskImg);
-}
-
-void draw() 
-{
-  background((mouseX+mouseY)/1.5);
-  image(img, 50, 50);
-  image(img, mouseX-50, mouseY-50);
-}
- - diff --git a/examples/basic/arctangent.html b/examples/basic/arctangent.html deleted file mode 100644 index 1e98d3759..000000000 --- a/examples/basic/arctangent.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - -

Processing.js

-

Arctangent

- -

Move the mouse to change the direction of the eyes. -The atan2() function computes the angle from each eye -to the cursor. - -Created 1 September 2002

- -

Original Processing.org Example: Arctangent
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-Eye e1, e2, e3, e4, e5;
-
-void setup() 
-{
-  size(200, 200);
-  smooth();
-  noStroke();
-  e1 = new Eye( 50,  16,  80);
-  e2 = new Eye( 64,  85,  40);  
-  e3 = new Eye( 90, 200, 120);
-  e4 = new Eye(150,  44,  40); 
-  e5 = new Eye(175, 120,  80);
-}
-
-void draw() 
-{
-  background(102);
-  
-  e1.update(mouseX, mouseY);
-  e2.update(mouseX, mouseY);
-  e3.update(mouseX, mouseY);
-  e4.update(mouseX, mouseY);
-  e5.update(mouseX, mouseY);
-
-  e1.display();
-  e2.display();
-  e3.display();
-  e4.display();
-  e5.display();
-}
-
-class Eye 
-{
-  int ex, ey;
-  int size;
-  float angle = 0.0;
-  
-  Eye(int x, int y, int s) {
-    ex = x;
-    ey = y;
-    size = s;
- }
-
-  void update(int mx, int my) {
-    angle = atan2(my-ey, mx-ex);
-  }
-  
-  void display() {
-    pushMatrix();
-    translate(ex, ey);
-    fill(255);
-    ellipse(0, 0, size, size);
-    rotate(angle);
-    fill(153);
-    ellipse(size/4, 0, size/2, size/2);
-    popMatrix();
-  }
-}
- - diff --git a/examples/basic/arm.html b/examples/basic/arm.html deleted file mode 100644 index 0d3784ed6..000000000 --- a/examples/basic/arm.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - -

Processing.js

-

Arm

- -

The angle of each segment is controlled with the mouseX and -mouseY position. The transformations applied to the first segment -are also applied to the second segment because they are inside -the same pushMatrix() and popMatrix() group.

- -

Original Processing.org Example: Arm
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float x = 50;
-float y = 100;
-float angle1 = 0.0;
-float angle2 = 0.0;
-float segLength = 50;
-
-void setup() {
-  size(200, 200);
-  smooth(); 
-  strokeWeight(20.0);
-  stroke(0, 100);
-}
-
-void draw() {
-  background(226);
-  
-  angle1 = (mouseX/float(width) - 0.5) * -PI;
-  angle2 = (mouseY/float(height) - 0.5) * PI;
-  
-  pushMatrix();
-  segment(x, y, angle1); 
-  segment(segLength, 0, angle2);
-  popMatrix();
-}
-
-void segment(float x, float y, float a) {
-  translate(x, y);
-  rotate(a);
-  line(0, 0, segLength, 0);
-}
- - diff --git a/examples/basic/array.html b/examples/basic/array.html deleted file mode 100644 index 620f8ac7a..000000000 --- a/examples/basic/array.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - -

Processing.js

-

Array

- -

An array is a list of data. Each piece of data in an array -is identified by an index number representing its position in -the array. Arrays are zero based, which means that the first -element in the array is [0], the second element is [1], and so on. -In this example, an array named "coswav" is created and -filled with the cosine values. This data is displayed three -separate ways on the screen.

- -

Original Processing.org Example: Array
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-
-float[] coswave = new float[width];
-
-for(int i=0; i<width; i++) {
-  float ratio = (float)i/(float)width;
-  coswave[i] = abs( cos(ratio*PI) );
-}
-
-for(int i=0; i<width; i++) {
-  stroke(coswave[i]*255);
-  line(i, 0, i, width/3);
-}
-
-for(int i=0; i<width; i++) {
-  stroke(coswave[i]*255/4);
-  line(i, width/3, i, width/3*2);
-}
-
-for(int i=0; i<width; i++) {
-  stroke(255-coswave[i]*255);
-  line(i, width/3*2, i, height);
-}
- - diff --git a/examples/basic/array2d.html b/examples/basic/array2d.html deleted file mode 100644 index 22fec86fa..000000000 --- a/examples/basic/array2d.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - -

Processing.js

-

Array2D

- -

Demonstrates the syntax for creating a two-dimensional (2D) array. -Values in a 2D array are accessed through two index values. -2D arrays are useful for storing images. In this example, each dot -is colored in relation to its distance from the center of the image.

- -

Original Processing.org Example: Array2D
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float[][] distances;
-float maxDistance;
-
-size(200, 200);
-background(0);
-maxDistance = dist(width/2, height/2, width, height);
-distances = new float[width][height];
-for(int i=0; i<height; i++) {
-  for(int j=0; j<width; j++) {
-    float d = dist(width/2, height/2, j, i);
-    distances[j][i] = d/maxDistance * 255; 
-  }
-}
-
-for(int i=0; i<height; i+=2) {
-  for(int j=0; j<width; j+=2) {
-    stroke(distances[j][i]);
-    point(j, i);
-  }
-}
- - diff --git a/examples/basic/arrayobjects.html b/examples/basic/arrayobjects.html deleted file mode 100644 index 0d18c4616..000000000 --- a/examples/basic/arrayobjects.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - -

Processing.js

-

ArrayObjects

- -

Demonstrates the syntax for creating an array of custom objects.

- -

Original Processing.org Example: ArrayObjects
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int unit = 40;
-int num;
-Module[] mods;
-
-void setup() 
-{
-  size(200, 200);
-  background(176);
-  noStroke();
-  
-  num = width/unit * width/unit;
-  mods = new Module[num];
-  
-  for (int i=0; i<height/unit; i++) {
-    for(int j=0; j<height/unit; j++) {
-      int index = i*height/unit + j;
-      mods[index] = new Module(j*unit, i*unit, unit/2, unit/2, random(0.05, 0.8));  
-    }
-  }
-}
-
-void draw() 
-{
-  for(int i=0; i<num; i++) {
-    mods[i].update();
-    mods[i].draw();
-  }
-}
-
-class Module {
-  float mx, my;
-  int size = unit;
-  float x, y = 0;
-  int xdir = 1;
-  int ydir = 1;
-  float speed; 
-  
-  // Contructor (required)
-  Module(float imx, float imy, float ix, float iy, float ispeed) {
-    mx = imy;
-    my = imx;
-    x = int(ix);
-    y = int(iy);
-    speed = ispeed;
-  }
-  
-  // Custom method for updating the variables
-  void update() {
-    x = x + (speed * xdir);
-    if (x >= size || x <= 0) {
-      xdir *= -1;
-      x = x + (1 * xdir);
-      y = y + (1 * ydir);
-    }
-    if (y >= size || y <= 0) {
-      ydir *= -1;
-      y = y + (1 * ydir);
-    }
-  }
-  
-  // Custom method for drawing the object
-  void draw() {
-    stroke(second()*4);
-    point(mx+x-1, my+y-1);
-  }
-}
- - diff --git a/examples/basic/backgroundimage.html b/examples/basic/backgroundimage.html deleted file mode 100644 index 8198fc5ed..000000000 --- a/examples/basic/backgroundimage.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - -

Processing.js

-

BackgroundImage

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading. -F1LT3R

- -

This example presents the fastest way to load a background image -into Processing. To load an image as the background, it must be -the same width and height as the program.

- -

Original Processing.org Example: BackgroundImage
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-
-/* @pjs preload="data/milan_rubbish.jpg"; */
-
-PImage bg;
-int a; 
-
-void setup() 
-{
-  size(200,200);
-  frameRate(30);
-  // The background image must be the same size as the parameters
-  // into the size() method. In this program, the size of "milan_rubbish.jpg"
-  // is 200 x 200 pixels.
-  bg = loadImage("milan_rubbish.jpg");
-}
-
-void draw() 
-{
-  background(bg);
-
-  a = (a + 1)%(width+32);
-  stroke(226, 204, 0);
-  line(0, a, width, a-26);
-  line(0, a-6, width, a-32);
-}
- - diff --git a/examples/basic/bezier.html b/examples/basic/bezier.html deleted file mode 100644 index 6bd01c1e0..000000000 --- a/examples/basic/bezier.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - -

Processing.js

-

Bezier

- -

The first two parameters for the bezier() function specify the -first point in the curve and the last two parameters specify -the last point. The middle parameters set the control points -that define the shape of the curve.

- -

Original Processing.org Example: Bezier
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200); 
-background(0); 
-stroke(255);
-noFill();
-smooth(); 
-
-for(int i = 0; i < 100; i += 20) {
-  bezier(90-(i/2.0), 20+i, 210, 10, 220, 150, 120-(i/8.0), 150+(i/4.0));
-}
- - diff --git a/examples/basic/bezierellipse.html b/examples/basic/bezierellipse.html deleted file mode 100644 index 0ad03457d..000000000 --- a/examples/basic/bezierellipse.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - -

Processing.js

-

BezierEllipse

- -

By Ira Greenberg - -Generates an ellipse using bezier() and -trig functions. Approximately every 1/2 -second a new ellipse is plotted using -random values for control/anchor points.

- -

Original Processing.org Example: BezierEllipse
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// arrays to hold ellipse coordinate data
-float[] px, py, cx, cy, cx2, cy2;
-
-// global variable-points in ellipse
-int pts = 4;
-
-color controlPtCol = #222222;
-color anchorPtCol = #BBBBBB;
-
-void setup(){
-  size(200, 200);
-  smooth();
-  setEllipse(pts, 65, 65);
-  frameRate(0.5);
-}
-
-void draw(){
-  background(145);
-  drawEllipse();
-  setEllipse(int(random(3, 12)), random(-100, 150), random(-100, 150));
-}
-
-// draw ellipse with anchor/control points
-void drawEllipse(){
-  strokeWeight(1.125);
-  stroke(255);
-  noFill();
-  // create ellipse
-  for (int i=0; i<pts; i++){
-    if (i==pts-1) {
-      bezier(px[i], py[i], cx[i], cy[i], cx2[i], cy2[i],  px[0], py[0]);
-    }
-    else{
-      bezier(px[i], py[i], cx[i], cy[i], cx2[i], cy2[i],  px[i+1], py[i+1]);
-    }
-  }
-  strokeWeight(.75);
-  stroke(0);
-  rectMode(CENTER);
-
-  // control handles and tangent lines
-  for ( int i=0; i< pts; i++){
-    if (i==pts-1){  // last loop iteration-close path
-      line(px[0], py[0], cx2[i], cy2[i]);
-    }
-    if (i>0){
-      line(px[i], py[i], cx2[i-1], cy2[i-1]);
-    }
-    line(px[i], py[i], cx[i], cy[i]);
-  }
-
-  for ( int i=0; i< pts; i++){
-    fill(controlPtCol);
-    noStroke();
-    //control handles
-    ellipse(cx[i], cy[i], 4, 4);
-    ellipse(cx2[i], cy2[i], 4, 4);
-
-    fill(anchorPtCol);
-    stroke(0);
-    //anchor points
-    rect(px[i], py[i], 5, 5);
-  }
-}
-
-// fill up arrays with ellipse coordinate data
-void setEllipse(int points, float radius, float controlRadius){
-  pts = points;
-  px = new float[points];
-  py = new float[points];
-  cx = new float[points];
-  cy = new float[points];
-  cx2 = new float[points];
-  cy2 = new float[points];
-  float angle = 360.0/points;
-  float controlAngle1 = angle/3.0;
-  float controlAngle2 = controlAngle1*2.0;
-  for ( int i=0; i<points; i++){
-    px[i] = width/2+cos(radians(angle))*radius;
-    py[i] = height/2+sin(radians(angle))*radius;
-    cx[i] = width/2+cos(radians(angle+controlAngle1))* 
-      controlRadius/cos(radians(controlAngle1));
-    cy[i] = height/2+sin(radians(angle+controlAngle1))* 
-      controlRadius/cos(radians(controlAngle1));
-    cx2[i] = width/2+cos(radians(angle+controlAngle2))* 
-      controlRadius/cos(radians(controlAngle1));
-    cy2[i] = height/2+sin(radians(angle+controlAngle2))* 
-      controlRadius/cos(radians(controlAngle1));
-
-    //increment angle so trig functions keep chugging along
-    angle+=360.0/points;
-  }
-}
- - diff --git a/examples/basic/brightness.html b/examples/basic/brightness.html deleted file mode 100644 index dd38adc18..000000000 --- a/examples/basic/brightness.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - -

Processing.js

-

Brightness

- -

by Rusty Robison. - -Brightness is the relative lightness or darkness of a color. -Move the cursor vertically over each bar to alter its brightness.

- -

Original Processing.org Example: Brightness
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int barWidth = 5;
-int[] brightness;
-
-void setup() 
-{
-  size(200, 200);
-  colorMode(HSB, 360, height, height);  
-  brightness = new int[width/barWidth];
-}
-
-void draw() 
-{
-  int j = 0;
-  for (int i = 0; i <= (width-barWidth); i += barWidth) {  
-    noStroke();
-    if ((mouseX > i) && (mouseX < i+barWidth)) {
-      brightness[j] = mouseY;
-    }
-    fill(i, height, brightness[j]);
-    rect(i, 0, barWidth, height);  
-    j++;
-  }
-}
- - diff --git a/examples/basic/charactersstrings.html b/examples/basic/charactersstrings.html deleted file mode 100644 index a21ed36d3..000000000 --- a/examples/basic/charactersstrings.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - -

Processing.js

-

CharactersStrings

- -

Click on the image to give it focus and then type letters to -shift the location of the image. -Characters are typographic symbols such as A, d, and %. -The character datatype, abbreviated as char, stores letters and -symbols in the Unicode format, a coding system developed to support -a variety of world languages. Characters are distinguished from other -symbols by putting them between single quotes ('P'). -A string is a sequence of characters. A string is noted by surrounding -a group of letters with double quotes ("Processing"). -Chars and strings are most often used with the keyboard methods, -to display text to the screen, and to load images or files.

- -

Original Processing.org Example: CharactersStrings
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-PImage frog;
-PFont fontA;
-int lettersize = 90;
-int xoffset;
-char letter;
-
-void setup() 
-{
-  size(200, 200);
-  fontA = loadFont("Arial"); 
-  textFont(fontA); 
-  textSize(lettersize);
-    
-  // The String datatype must be capitalized because it is a complex datatype.
-  // A String is actually a class with its own methods, some of which are
-  // featured below.
-  String name= "rathausFrog";
-  String extension = ".jpg";
-  int nameLength = name.length();
-  println("The length of " + name + " is " + nameLength + ".");
-  name = name.concat(extension);
-  nameLength = name.length();
-  println("The length of " + name + " is " + nameLength + ".");
-
-  // The parameter for the loadImage() method must be a string
-  // This line could also be written "frog = loadImage("rathausFrog.jpg");
-  frog = loadImage(name);
-}
-
-void draw() 
-{
-  background(51); // Set background to dark gray
-  
-  image(frog, xoffset, 0);
-  
-  // Draw an X
-  line(0, 0, width, height);  
-  line(0, height, width, 0); 
-  
-  // Get the width of the letter
-  int letterWidth = int(fontA.width(letter) * lettersize);
-      
-  // Draw the letter to the center of the screen
-  text(letter, width/2-letterWidth/2, height/2);
-}
-
-void keyPressed()
-{
-  // The variable "key" always contains the value of the most recent key pressed.
-  // If the key is an upper or lowercase letter between 'A' and 'z'
-  // the image is shifted to the corresponding value of that key
-  if(key >= 'A' && key <= 'z') {
-    letter = char(key);
-    // Scale the values to numbers between 0 and 100
-    float scale = 100.0/57.0;
-    int temp = int((key - 'A') * scale);
-    // Set the offset for the image
-    xoffset = temp;
-    println(key);
-  }
-}
- - diff --git a/examples/basic/clock.html b/examples/basic/clock.html deleted file mode 100644 index db6771f1e..000000000 --- a/examples/basic/clock.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - -

Processing.js

-

Clock

- -

The current time can be read with the second(), minute(), -and hour() functions. In this example, sin() and cos() values -are used to set the position of the hands. - *

- -

Original Processing.org Example: Clock
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup() {
-  size(200, 200);
-  stroke(255);
-  smooth();
-}
-void draw() {
-  background(0);
-  fill(80);
-  noStroke();
-  // Angles for sin() and cos() start at 3 o'clock;
-  // subtract HALF_PI to make them start at the top
-  ellipse(100, 100, 160, 160);
-  float s = map(second(), 0, 60, 0, TWO_PI) - HALF_PI;
-  float m = map(minute(), 0, 60, 0, TWO_PI) - HALF_PI;
-  float h = map(hour() % 12, 0, 12, 0, TWO_PI) - HALF_PI;
-  stroke(255);
-  strokeWeight(1);
-  line(100, 100, cos(s) * 72 + 100, sin(s) * 72 + 100);
-  strokeWeight(2);
-  line(100, 100, cos(m) * 60 + 100, sin(m) * 60 + 100);
-  strokeWeight(4);
-  line(100, 100, cos(h) * 50 + 100, sin(h) * 50 + 100);
-}
- - diff --git a/examples/basic/colorwheel.html b/examples/basic/colorwheel.html deleted file mode 100644 index 361ba3eee..000000000 --- a/examples/basic/colorwheel.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - -

Processing.js

-

ColorWheel

- -

by Ira Greenberg. - -The primaries are red, yellow, and blue. The -secondaries are green, purple, and orange. The -tertiaries are yellow-orange, red-orange, red-purple, -blue-purple, blue-green, and yellow-green. - -Create a shade or tint of the -subtractive color wheel using -SHADE or TINT parameters.

- -

Original Processing.org Example: ColorWheel
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int segs = 12;
-int steps = 6;
-float rotAdjust = radians(360.0/segs/2.0);
-float radius = 95.0;
-float segWidth = radius/steps;
-float interval = TWO_PI/segs;
-int SHADE = 0;
-int TINT = 1;
-
-void setup(){
-  size(200, 200);
-  background(127);
-  smooth();
-  ellipseMode(CENTER_RADIUS);
-  noStroke();
- // you can substitue TINT for SHADE argument
- createWheel(width/2, height/2, SHADE);
-}
-
-void createWheel(int x, int y, int valueShift){
-  if (valueShift == SHADE){
-    for (int j=0; j<steps; j++){
-      color[]cols = { 
-        color(255-(255/steps)*j, 255-(255/steps)*j, 0), 
-        color(255-(255/steps)*j, (255/1.5)-((255/1.5)/steps)*j, 0), 
-        color(255-(255/steps)*j, (255/2)-((255/2)/steps)*j, 0), 
-        color(255-(255/steps)*j, (255/2.5)-((255/2.5)/steps)*j, 0), 
-        color(255-(255/steps)*j, 0, 0), 
-        color(255-(255/steps)*j, 0, (255/2)-((255/2)/steps)*j), 
-        color(255-(255/steps)*j, 0, 255-(255/steps)*j), 
-        color((255/2)-((255/2)/steps)*j, 0, 255-(255/steps)*j), 
-        color(0, 0, 255-(255/steps)*j),
-        color(0, 255-(255/steps)*j, (255/2.5)-((255/2.5)/steps)*j), 
-        color(0, 255-(255/steps)*j, 0), 
-        color((255/2)-((255/2)/steps)*j, 255-(255/steps)*j, 0) };
-      for (int i=0; i< segs; i++){
-        fill(cols[i]);
-        arc(x, y, radius, radius, interval*i+rotAdjust, interval*(i+1)+rotAdjust);
-      }
-      radius -= segWidth;
-    }
-  } else  if (valueShift == TINT){
-    for (int j=0; j<steps; j++){
-      color[]cols = { 
-        color((255/steps)*j, (255/steps)*j, 0), 
-        color((255/steps)*j, ((255/1.5)/steps)*j, 0), 
-        color((255/steps)*j, ((255/2)/steps)*j, 0), 
-        color((255/steps)*j, ((255/2.5)/steps)*j, 0), 
-        color((255/steps)*j, 0, 0), 
-        color((255/steps)*j, 0, ((255/2)/steps)*j), 
-        color((255/steps)*j, 0, (255/steps)*j), 
-        color(((255/2)/steps)*j, 0, (255/steps)*j), 
-        color(0, 0, (255/steps)*j),
-        color(0, (255/steps)*j, ((255/2.5)/steps)*j), 
-        color(0, (255/steps)*j, 0), 
-        color(((255/2)/steps)*j, (255/steps)*j, 0) };
-      for (int i=0; i< segs; i++){
-        fill(cols[i]);
-        arc(x, y, radius, radius, interval*i+rotAdjust, interval*(i+1)+rotAdjust);
-      }
-      radius -= segWidth;
-    }
-  } 
-}
- - diff --git a/examples/basic/compositeobjects.html b/examples/basic/compositeobjects.html deleted file mode 100644 index 17dae95be..000000000 --- a/examples/basic/compositeobjects.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - -

Processing.js

-

CompositeObjects

- -

An object can include several other objects. Creating such composite objects -is a good way to use the principles of modularity and build higher levels of -abstraction within a program.

- -

Original Processing.org Example: CompositeObjects
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-EggRing er1, er2;
-
-void setup() 
-{
-  size(200, 200);
-  smooth();
-  er1 = new EggRing(66, 132, 0.1, 66);
-  er2 = new EggRing(132, 180, 0.05, 132);
-}
-
-void draw() 
-{
-  background(0);
-  er1.transmit();
-  er2.transmit();
-}
-
-class EggRing 
-{
-  Egg ovoid;
-  Ring circle = new Ring();
-  EggRing(int x, int y, float t, float sp) {
-    ovoid = new Egg(x, y, t, sp);
-    circle.start(x, y - sp/2);
-  }
-  void transmit() {
-    ovoid.wobble();
-    ovoid.display();
-    circle.grow();
-    circle.display();
-    if (circle.on == false) {
-      circle.on = true;
-    }
-  }
-}
-
-class Egg {
-  float x, y; // X-coordinate, y-coordinate
-  float tilt; // Left and right angle offset
-  float angle; // Used to define the tilt
-  float scalar; // Height of the egg
-  // Constructor
-  Egg(int xpos, int ypos, float t, float s) {
-    x = xpos;
-    y = ypos;
-    tilt = t;
-    scalar = s / 100.0;
-  }
-  void wobble() {
-    tilt = cos(angle) / 8;
-    angle += 0.1;
-  }
-  void display() {
-    noStroke();
-    fill(255);
-    pushMatrix();
-    translate(x, y);
-    rotate(tilt);
-    scale(scalar);
-    beginShape();
-    vertex(0, -100);
-    bezierVertex(25, -100, 40, -65, 40, -40);
-    bezierVertex(40, -15, 25, 0, 0, 0);
-    bezierVertex(-25, 0, -40, -15, -40, -40);
-    bezierVertex(-40, -65, -25, -100, 0, -100);
-    endShape();
-    popMatrix();
-  }
-}
-
-class Ring {
-  float x, y; // X-coordinate, y-coordinate
-  float diameter; // Diameter of the ring
-  boolean on = false; // Turns the display on and off
-  void start(float xpos, float ypos) {
-    x = xpos;
-    y = ypos;
-    on = true;
-    diameter = 1;
-  }
-  void grow() {
-    if (on == true) {
-      diameter += 0.5;
-      if (diameter > width*2) {
-        diameter = 0.0;
-      }
-    }
-  }
-  void display() {
-    if (on == true) {
-      noFill();
-      strokeWeight(4);
-      stroke(155, 153);
-      ellipse(x, y, diameter, diameter);
-    }
-  }
-}
- - diff --git a/examples/basic/conditionals1.html b/examples/basic/conditionals1.html deleted file mode 100644 index adf404be7..000000000 --- a/examples/basic/conditionals1.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - -

Processing.js

-

Conditionals1

- -

Conditions are like questions. -They allow a program to decide to take one action if -the answer to a question is true or to do another action -if the answer to the question is false. -The questions asked within a program are always logical -or relational statements. For example, if the variable 'i' is -equal to zero then draw a line.

- -

Original Processing.org Example: Conditionals1
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-background(0);
-
-for(int i=10; i<width; i+=10) {
-  // If 'i' divides by 20 with no remainder draw the first line
-  // else draw the second line
-  if(i%20 == 0) {
-    stroke(153);
-    line(i, 40, i, height/2);
-  } else {
-    stroke(102);
-    line(i, 20, i, 180); 
-  }
-}
- - diff --git a/examples/basic/conditionals2.html b/examples/basic/conditionals2.html deleted file mode 100644 index 2c52e75b0..000000000 --- a/examples/basic/conditionals2.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - -

Processing.js

-

Conditionals2

- -

We extend the language of conditionals by adding the -keyword "else". This allows conditionals to ask -two or more sequential questions, each with a different -action.

- -

Original Processing.org Example: Conditionals2
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-background(0);
-
-for(int i=2; i<width-2; i+=2) {
-  // If 'i' divides by 20 with no remainder 
-  // draw the first line else draw the second line
-  if(i%20 == 0) {
-    stroke(255);
-    line(i, 40, i, height/2);
-  } else if (i%10 == 0) {
-    stroke(153);
-    line(i, 20, i, 180); 
-  } else {
-    stroke(102);
-    line(i, height/2, i, height-40);
-  }
-}
- - diff --git a/examples/basic/constrain.html b/examples/basic/constrain.html deleted file mode 100644 index 7691b3c87..000000000 --- a/examples/basic/constrain.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - -

Processing.js

-

Constrain

- -

Move the mouse across the screen to move the circle. -The program constrains the circle to its box.

- -

Original Processing.org Example: Constrain
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float mx;
-float my;
-float easing = 0.05;
-float esize = 25.0;
-int box = 30;
-
-void setup() 
-{
-  size(200, 200);
-  noStroke(); 
-  smooth();
-  ellipseMode(CENTER_RADIUS);  
-}
-
-void draw() 
-{ 
-  background(51);
-  
-  if(abs(mouseX - mx) > 0.1) {
-    mx = mx + (mouseX - mx) * easing;
-  }
-  if(abs(mouseY - my) > 0.1) {
-    my = my + (mouseY- my) * easing;
-  }
-  
-  float distance = esize * 2;
-  mx = constrain(mx, box+distance, width-box-distance);
-  my = constrain(my, box+distance, height-box-distance);
-  fill(76);
-  rect(box+esize, box+esize, box*3, box*3);
-  fill(255);  
-  ellipse(mx, my, esize, esize);
-}
- - diff --git a/examples/basic/coordinates.html b/examples/basic/coordinates.html deleted file mode 100644 index d3500a4b8..000000000 --- a/examples/basic/coordinates.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - -

Processing.js

-

Coordinates

- -

All shapes drawn to the screen have a position that is specified as a coordinate. -All coordinates are measured as the distance from the origin in units of pixels. -The origin [0, 0] is the coordinate is in the upper left of the window -and the coordinate in the lower right is [width-1, height-1].

- -

Original Processing.org Example: Coordinates
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// Sets the screen to be 200, 200, so the width of the window is 200 pixels
-// and the height of the window is 200 pixels
-size(200, 200);
-background(0);
-noFill();
-stroke(255);
-
-// The two parameters of the point() method each specify coordinates.
-// This call to point() draws at the position [100, 100]
-point(width/2, height/2);
-
-// Draws to the position [100, 50]
-point(width/2, height/4); 
-
-// It is also possible to specify a point with any parameter, 
-// but only coordinates on the screen are visible
-point(60, 30);
-point(60, 134);
-point(160, 50);
-point(280, -800);
-point(201, 100);
-
-// Coordinates are used for drawing all shapes, not just points.
-// Parameters for different methods are used for different purposes.
-// For example, the first two parameters to line() specify the coordinates of the 
-// first point and the second two parameters specify the second point
-stroke(204);
-line(0, 73, width, 73);
-
-// The first two parameters to rect() are coordinates
-// and the second two are the width and height
-rect(110, 55, 40, 36);
- - diff --git a/examples/basic/creategraphics.html b/examples/basic/creategraphics.html deleted file mode 100644 index b5951b5cb..000000000 --- a/examples/basic/creategraphics.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - -

Processing.js

-

CreateGraphics

- -

The createGraphics() function creates an object from the PGraphics class -(PGraphics is the main graphics and rendering context for Processing). -The beginDraw() method is necessary to prepare for drawing and endDraw() is -necessary to finish. Use this class if you need to draw into an off-screen -graphics buffer or to maintain two contexts with different properties.

- -

Original Processing.org Example: CreateGraphics
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-PGraphics pg;
-
-void setup() {
-  size(200, 200);
-  pg = createGraphics(80, 80);
-}
-
-void draw() {
-  fill(0, 12);
-  rect(0, 0, width, height);
-  fill(255);
-  noStroke();
-  ellipse(mouseX, mouseY, 60, 60);
-  
-  pg.beginDraw();
-  pg.background(102);
-  pg.noFill();
-  pg.stroke(255);
-  pg.ellipse(mouseX-60, mouseY-60, 60, 60);
-  pg.endDraw();
-  
-  image(pg, 60, 60); 
-}
- - diff --git a/examples/basic/createimage.html b/examples/basic/createimage.html deleted file mode 100644 index d4b2db798..000000000 --- a/examples/basic/createimage.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - -

Processing.js

-

CreateImage

- -

The createImage() function provides a fresh buffer of pixels to play with. -This example creates an image gradient.

- -

Original Processing.org Example: CreateImage
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-PImage img;
-
-void setup() 
-{
-  size(200, 200);  
-  img = createImage(120, 120, RGB);
-  for(int i=0; i < img.pixels.length; i++) {
-    img.pixels[i] = color(0, 90, 102, i%img.width * 2); 
-  }
-}
-
-void draw() 
-{
-  background(204);
-  image(img, 33, 33);
-  image(img, mouseX-60, mouseY-60);
-}
- - diff --git a/examples/basic/creating.html b/examples/basic/creating.html deleted file mode 100644 index 7e0176227..000000000 --- a/examples/basic/creating.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - -

Processing.js

-

Creating

- -

Creating variables for colors that may be referred to -in the program by their name, rather than a number.

- -

Original Processing.org Example: Creating
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-noStroke();
-
-color inside = color(204, 102, 0);
-color middle = color(204, 153, 0);
-color outside = color(153, 51, 0);
-
-// These statements are equivalent to the statements above.
-// Programmers may use the format they prefer.
-//color inside = #CC6600;
-//color middle = #CC9900;
-//color outside = #993300;
-
-fill(outside);
-rect(0, 0, 200, 200);
-fill(middle);
-rect(40, 60, 120, 120);
-fill(inside);
-rect(60, 90, 80, 80);
- - diff --git a/examples/basic/data/brugges.jpg b/examples/basic/data/brugges.jpg deleted file mode 100644 index fa723f9da..000000000 Binary files a/examples/basic/data/brugges.jpg and /dev/null differ diff --git a/examples/basic/data/cait.jpg b/examples/basic/data/cait.jpg deleted file mode 100644 index bc15e16a5..000000000 Binary files a/examples/basic/data/cait.jpg and /dev/null differ diff --git a/examples/basic/data/construct.jpg b/examples/basic/data/construct.jpg deleted file mode 100644 index 648678bb9..000000000 Binary files a/examples/basic/data/construct.jpg and /dev/null differ diff --git a/examples/basic/data/eames.jpg b/examples/basic/data/eames.jpg deleted file mode 100644 index c89377e40..000000000 Binary files a/examples/basic/data/eames.jpg and /dev/null differ diff --git a/examples/basic/data/jelly.jpg b/examples/basic/data/jelly.jpg deleted file mode 100644 index a881c7e8b..000000000 Binary files a/examples/basic/data/jelly.jpg and /dev/null differ diff --git a/examples/basic/data/mask.jpg b/examples/basic/data/mask.jpg deleted file mode 100644 index bbd138254..000000000 Binary files a/examples/basic/data/mask.jpg and /dev/null differ diff --git a/examples/basic/data/milan_rubbish.jpg b/examples/basic/data/milan_rubbish.jpg deleted file mode 100644 index 516d46d5d..000000000 Binary files a/examples/basic/data/milan_rubbish.jpg and /dev/null differ diff --git a/examples/basic/data/rathausFrog.jpg b/examples/basic/data/rathausFrog.jpg deleted file mode 100644 index 220deece8..000000000 Binary files a/examples/basic/data/rathausFrog.jpg and /dev/null differ diff --git a/examples/basic/data/sky.jpg b/examples/basic/data/sky.jpg deleted file mode 100644 index 57371b9f4..000000000 Binary files a/examples/basic/data/sky.jpg and /dev/null differ diff --git a/examples/basic/data/sunflower.jpg b/examples/basic/data/sunflower.jpg deleted file mode 100644 index 88398d188..000000000 Binary files a/examples/basic/data/sunflower.jpg and /dev/null differ diff --git a/examples/basic/data/teddy.gif b/examples/basic/data/teddy.gif deleted file mode 100644 index 8994c1bdd..000000000 Binary files a/examples/basic/data/teddy.gif and /dev/null differ diff --git a/examples/basic/data/test.jpg b/examples/basic/data/test.jpg deleted file mode 100644 index 04d3fc56d..000000000 Binary files a/examples/basic/data/test.jpg and /dev/null differ diff --git a/examples/basic/data/wash.jpg b/examples/basic/data/wash.jpg deleted file mode 100644 index 03beb544d..000000000 Binary files a/examples/basic/data/wash.jpg and /dev/null differ diff --git a/examples/basic/datatypeconversion.html b/examples/basic/datatypeconversion.html deleted file mode 100644 index 1051045c9..000000000 --- a/examples/basic/datatypeconversion.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - -

Processing.js

-

DatatypeConversion

- -

It is sometimes beneficial to convert a value from one type of -data to another. Each of the conversion functions converts its parameter -to an equivalent representation within its datatype. -The conversion functions include int(), float(), char(), byte(), and others.

- -

Original Processing.org Example: DatatypeConversion
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-background(51);
-noStroke();
-
-char c;    // Chars are used for storing typographic symbols
-float f;   // Floats are decimal numbers
-int i;     // Ints are values between 2,147,483,647 and -2147483648
-byte b;    // Bytes are values between -128 and 128
-
-c = 'A';
-f = float(c);     // Sets f = 65.0
-i = int(f * 1.4); // Sets i to 91
-b = byte(c / 2);  // Sets b to 32
-
-rect(f, 0, 40, 66);
-fill(204);
-rect(i, 67, 40, 66);
-fill(255);
-rect(b, 134, 40, 66);
- - diff --git a/examples/basic/displaying.html b/examples/basic/displaying.html deleted file mode 100644 index 935b1aabf..000000000 --- a/examples/basic/displaying.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - -

Processing.js

-

Displaying

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading. - F1LT3R

- -

Images can be displayed to the screen at their actual size -or any other size.

- -

Original Processing.org Example: Displaying
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-/* @pjs preload="data/jelly.jpg"; */
-
-size(200, 200);
-PImage a;  // Declare variable "a" of type PImage
-a = loadImage("data/jelly.jpg");  // Load the images into the program
-image(a, 0, 0); // Displays the image from point (0,0) when image data has been loaded
-image(a, width/2, 0, a.width/2, a.height/2);
-
- - diff --git a/examples/basic/distance1d.html b/examples/basic/distance1d.html deleted file mode 100644 index 59b8270ce..000000000 --- a/examples/basic/distance1d.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - -

Processing.js

-

Distance1D

- -

Move the mouse left and right to control the speed and direction of the moving shapes.

- -

Original Processing.org Example: Distance1D
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int thin = 8;
-int thick = 36;
-float xpos1 = 134.0;
-float xpos2 = 44.0;
-float xpos3 = 58.0;
-float xpos4 = 120.0;
-
-void setup() 
-{
-  size(200, 200);
-  noStroke();
-  frameRate(60);
-}
-
-void draw() 
-{
-  background(0);
-  
-  float mx = mouseX * 0.4 - width/5.0;
-  
-  fill(102);
-  rect(xpos2, 0, thick, height/2);
-  fill(204);
-  rect(xpos1, 0, thin, height/2);
-  fill(102);
-  rect(xpos4, height/2, thick, height/2);
-  fill(204);
-  rect(xpos3, height/2, thin, height/2);
-	
-  xpos1 += mx/16;
-  xpos2 += mx/64;
-  xpos3 -= mx/16;
-  xpos4 -= mx/64;
-  
-  if(xpos1 < -thin)  { xpos1 =  width; }
-  if(xpos1 >  width) { xpos1 = -thin; }
-  if(xpos2 < -thick) { xpos2 =  width; }
-  if(xpos2 >  width) { xpos2 = -thick; }
-  if(xpos3 < -thin)  { xpos3 =  width; }
-  if(xpos3 >  width) { xpos3 = -thin; }
-  if(xpos4 < -thick) { xpos4 =  width; }
-  if(xpos4 >  width) { xpos4 = -thick; }
-}
- - diff --git a/examples/basic/distance2d.html b/examples/basic/distance2d.html deleted file mode 100644 index d16e8b5b7..000000000 --- a/examples/basic/distance2d.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - -

Processing.js

-

Distance2D

- -

Move the mouse across the image to obscure and reveal the matrix. -Measures the distance from the mouse to each square and sets the -size proportionally.

- -

Original Processing.org Example: Distance2D
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float max_distance;
-
-void setup() {
-  size(200, 200); 
-  smooth();
-  noStroke();
-  max_distance = dist(0, 0, width, height);
-}
-
-void draw() 
-{
-  background(51);
-
-  for(int i = 0; i <= width; i += 20) {
-    for(int j = 0; j <= width; j += 20) {
-      float size = dist(mouseX, mouseY, i, j);
-      size = size/max_distance * 66;
-      ellipse(i, j, size, size);
-    }
-  }
-}
- - diff --git a/examples/basic/doublerandom.html b/examples/basic/doublerandom.html deleted file mode 100644 index a78259cf5..000000000 --- a/examples/basic/doublerandom.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - -

Processing.js

-

DoubleRandom

- -

by Ira Greenberg. - -Using 2 random() calls the and point() function -to create an irregular sawtooth line.

- -

Original Processing.org Example: DoubleRandom
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-background(0);
-int totalPts = 300;
-float steps = totalPts+1;
-stroke(255);
-float rand = 0;
-
-for  (int i=1; i< steps; i++){
-  point( (width/steps) * i, (height/2) + random(-rand, rand) );
-  rand += random(-5, 5);
-}
- - diff --git a/examples/basic/easing.html b/examples/basic/easing.html deleted file mode 100644 index ce1d33e50..000000000 --- a/examples/basic/easing.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - -

Processing.js

-

Easing

- -

Move the mouse across the screen and the symbol will follow. -Between drawing each frame of the animation, the program -calculates the difference between the position of the -symbol and the cursor. If the distance is larger than -1 pixel, the symbol moves half of the distance from its -current position toward the cursor.

- -

Original Processing.org Example: Easing
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float x;
-float y;
-float targetX, targetY;
-float easing = 0.05;
-
-void setup() 
-{
-  size(200, 200); 
-  smooth();
-  noStroke();  
-}
-
-void draw() 
-{ 
-  background( 51 );
-  
-  targetX = mouseX;
-  float dx = mouseX - x;
-  if(abs(dx) > 1) {
-    x += dx * easing;
-  }
-  
-  targetY = mouseY;
-  float dy = mouseY - y;
-  if(abs(dy) > 1) {
-    y += dy * easing;
-  }
-  
-  ellipse(x, y, 33, 33);
-}
- - diff --git a/examples/basic/embeddediteration.html b/examples/basic/embeddediteration.html deleted file mode 100644 index cfd2474ee..000000000 --- a/examples/basic/embeddediteration.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - -

Processing.js

-

EmbeddedIteration

- -

Embedding "for" structures allows repetition in two dimensions.

- -

Original Processing.org Example: EmbeddedIteration
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float box_size = 11; 
-float box_space = 12; 
-int margin = 7; 
- 
-size(200, 200); 
-background(0); 
-noStroke(); 
- 
-// Draw gray boxes 
- 
-for(int i = margin; i < width-margin; i += box_space) { 
-  for(int j = margin; j < height-margin; j += box_space) { 
-    fill(255 - box_size*10); 
-    rect(j, i, box_size, box_size); 
-  } 
-  box_size = box_size - 0.6; 
-}
- - diff --git a/examples/basic/embeddedlinks.html b/examples/basic/embeddedlinks.html deleted file mode 100644 index 0f196f5bb..000000000 --- a/examples/basic/embeddedlinks.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - -

Processing.js

-

EmbeddedLinks

- -

Click on the left button to open a different URL in the same window (Only -works online). Click on the right button to open a URL in a new browser window. - -Created 21 June 2003.

- -

Original Processing.org Example: EmbeddedLinks
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-boolean overLeftButton = false;
-boolean overRightButton = false;
-
-void setup()
-{
-  size(200, 200);
-}
-
-void draw()
-{
-  background(204);
-  
-  // Left buttom
-  if(overLeftButton == true) {
-    fill(255);
-  } else {
-    noFill();
-  }
-  rect(20, 60, 75, 75);
-  rect(50, 90, 15, 15);
-  
-  // Right button
-  if(overRightButton == true) {
-    fill(255);
-  } else {
-    noFill();
-  }
-  rect(105, 60, 75, 75);
-  line(135, 105, 155, 85);
-  line(140, 85, 155, 85);
-  line(155, 85, 155, 100);
-}
-
-void mousePressed() 
-{
-  if(overLeftButton) { 
-    link("http://www.processing.org");
-  } else if (overRightButton) {
-    link("http://www.processing.org", "_new");
-  }
-}
-
-void mouseMoved() { 
-  checkButtons(); 
-}
-  
-void mouseDragged() {
-  checkButtons(); 
-}
-
-void checkButtons() {
-  if(mouseX > 20 && mouseX < 95 &&
-     mouseY > 60 && mouseY <135) {
-    overLeftButton = true;   
-  }  else if (mouseX > 105 && mouseX < 180 &&
-     mouseY > 60 && mouseY <135) {
-    overRightButton = true; 
-  } else {
-    overLeftButton = overRightButton = false;
-  }
-
-}
- - diff --git a/examples/basic/functions.html b/examples/basic/functions.html deleted file mode 100644 index 57867fc91..000000000 --- a/examples/basic/functions.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - -

Processing.js

-

Functions

- -

The draw_target() function makes it easy to draw many distinct targets. -Each call to draw_target() specifies the position, size, and number of -rings for each target.

- -

Original Processing.org Example: Functions
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup() 
-{
-  size(200, 200);
-  background(51);
-  noStroke();
-  smooth();
-  noLoop();
-}
-
-void draw() 
-{
-  draw_target(68, 34, 200, 10);
-  draw_target(152, 16, 100, 3);
-  draw_target(100, 144, 80, 5);
-}
-
-void draw_target(int xloc, int yloc, int size, int num) 
-{
-  float grayvalues = 255/num;
-  float steps = size/num;
-  for(int i=0; i<num; i++) {
-    fill(i*grayvalues);
-    ellipse(xloc, yloc, size-i*steps, size-i*steps);
-  }
-}
- - diff --git a/examples/basic/graphing2dequation.html b/examples/basic/graphing2dequation.html deleted file mode 100644 index a48d79653..000000000 --- a/examples/basic/graphing2dequation.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - -

Processing.js

- -

There is a known bug in this example on some versions of Firefox: https://processing-js.lighthouseapp.com/projects/41284/tickets/240-graphing2dequation-fails-in-firefox#ticket-240-1

- -

Graphing2DEquation

- -

by Daniel Shiffman. - -Graphics the following equation: -sin(n*cos(r) + 5*theta) -where n is a function of horizontal mouse location.

- -

Original Processing.org Example: Graphing2DEquation
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup() {
-  size(200,200);
-  frameRate(30);
-}
-
-void draw() {
-  loadPixels();
-  float n = (mouseX * 10.0) / width;
-  float w = 16.0;         // 2D space width
-  float h = 16.0;         // 2D space height
-  float dx = w / width;    // Increment x this amount per pixel
-  float dy = h / height;   // Increment y this amount per pixel
-  float x = -w/2;          // Start x at -1 * width / 2
-  for (int i = 0; i < width; i++) {
-    float y = -h/2;        // Start y at -1 * height / 2
-    for (int j = 0; j < height; j++) {
-      float r = sqrt((x*x) + (y*y));    // Convert cartesian to polar
-      float theta = atan2(y,x);         // Convert cartesian to polar
-      // Compute 2D polar coordinate function
-      float val = sin(n*cos(r) + 5 * theta);           // Results in a value between -1 and 1
-      //float val = cos(r);                            // Another simple function
-      //float val = sin(theta);                        // Another simple function
-      // Map resulting vale to grayscale value
-      pixels[i+j*width] = color((val + 1.0) * 255.0/2.0);     // Scale to between 0 and 255
-      y += dy;                // Increment y
-    }
-    x += dx;                  // Increment x
-  }
-  updatePixels();
-}
- - diff --git a/examples/basic/hue.html b/examples/basic/hue.html deleted file mode 100644 index ef3fec80a..000000000 --- a/examples/basic/hue.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - -

Processing.js

-

Hue

- -

Hue is the color reflected from or transmitted through an object -and is typically referred to as the name of the color (red, blue, yellow, etc.) -Move the cursor vertically over each bar to alter its hue.

- -

Original Processing.org Example: Hue
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int barWidth = 5;
-int[] hue;
-
-void setup() 
-{
-  size(400, 400);
-  colorMode(HSB, 360, height, height);  
-  hue = new int[width/barWidth];
-  noStroke();
-}
-
-void draw() 
-{
-  int j = 0;
-  for (int i=0; i<=(width-barWidth); i+=barWidth) {  
-    if ((mouseX > i) && (mouseX < i+barWidth)) {
-      hue[j] = mouseY;
-    }
-    fill(hue[j], height/1.2, height/1.2);
-    rect(i, 0, barWidth, height);  
-    j++;
-  }
-}
- - diff --git a/examples/basic/incrementdecrement.html b/examples/basic/incrementdecrement.html deleted file mode 100644 index 28a2eaa27..000000000 --- a/examples/basic/incrementdecrement.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - -

Processing.js

-

IncrementDecrement

- -

Writing "a++" is equivalent to "a = a + 1". -Writing "a--" is equivalent to "a = a - 1".

- -

Original Processing.org Example: IncrementDecrement
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int a;
-int b;
-boolean direction;
-
-void setup()
-{
-  size(200, 200);
-  colorMode(RGB, width);
-  a = 0;
-  b = width;
-  direction = true;
-  frameRate(30);
-}
-
-void draw()
-{
-  a++;
-  if(a > width) {
-    a = 0;
-    direction = !direction;
-  }
-  if(direction == true){
-    stroke(a);
-  } else {
-    stroke(width-a);
-  }
-  line(a, 0, a, height/2);
-
-  b--;
-  if(b < 0) {
-    b = width;
-  }
-  if(direction == true) {
-    stroke(width-b);
-  } else {
-    stroke(b);
-  }
-  line(b, height/2+1, b, height);
-}
- - diff --git a/examples/basic/index.html b/examples/basic/index.html deleted file mode 100644 index 5c4001274..000000000 --- a/examples/basic/index.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - -

Processing.js

-

Basic Demos

- -

Basic demonstrations of how Processing works, from the Processing.org web site. All of the following demos were written by Casey Reas and Ben Fry unless otherwise stated.

- -

Processing.org Basic Demos

- -


Structure

Statements and Comments
- - Coordinates
- Width and Height
- Setup and Draw
- No Loop
- Loop
- Redraw
- - Functions
- Recursion
- Recursion 2
- CreateGraphics
-


Form

Points and Lines
- Shape Primitives
- - Simple Curves
- Pie Chart
- Vertices (Note: Canvas can't do all styles of curved vertex.)
- Triangle Strip (Note: Only normal triangles are drawn.)
- Bezier
- Bezier Ellipse
- -


Data

Variables
- Integers and Floats
- True/False
- Characters and Strings (Firefox 3)
- Datatype Conversion
- Variable Scope
- -


Control

Iteration
- Embedded Iteration
- Conditionals 1
- Conditionals 2
- Logical Operators
-


Math

Increment/Decrement
- - Operator Precedence
- Modulo
- Distance 1D
- Distance 2D
- Sine
- Sine and Cosine
- - Sine Wave
- Additive Wave
- Polar to Cartesian
- Arctangent
- Graphing 2D Equation
- Random
- - Double Random
- Noise 1D
- Noise 2D
- Noise 3D
- NoiseWave
-


Typography

Letters (Firefox 3)
- - Words (Firefox 3)
-


Image

Displaying
- Background Image
- Pointillism
- Transparency
- Sprite
- - Alphamask (Note: Canvas can't alpha-blend properly.)
- CreateImage
-


Color

Hue
- Saturation
- Brightness
- Color Wheel
- - Reading
- Creating
- Relativity
- Linear Gradient
- - -


Transform

Translate
- Scale
- Rotate
- Triangle Flower
- Arm
-


Input

Mouse 1D
- - Mouse 2D
- MousePress
- Mouse Signals
- Easing
- Constrain
- Storing Input
- - Mouse Functions
- Keyboard
- Keyboard Functions
- Milliseconds
- Clock
-


Arrays

Array
- - Array 2D
- Array Objects
-


Objects

Objects
- Multiple Constructors
- Composite Objects (Note: Canvas can't do all styles of curved vertex.)
- Inheritance
- - Neighborhood
-


Web

Embedded Links
- -

- - diff --git a/examples/basic/inheritance.html b/examples/basic/inheritance.html deleted file mode 100644 index a6f56915c..000000000 --- a/examples/basic/inheritance.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - -

Processing.js

-

Inheritance

- -

A class can be defined using another class as a foundation. In object-oriented -programming terminology, one class can inherit fi elds and methods from another. -An object that inherits from another is called a subclass, and the object it -inherits from is called a superclass. A subclass extends the superclass.

- -

Original Processing.org Example: Inheritance
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-SpinSpots spots;
-SpinArm arm;
-
-void setup() 
-{
-  size(200, 200);
-  smooth();
-  arm = new SpinArm(width/2, height/2, 0.01);
-  spots = new SpinSpots(width/2, height/2, -0.02, 33.0);
-}
-
-void draw() 
-{
-  background(204);
-  arm.update();
-  arm.display();
-  spots.update();
-  spots.display();
-}
-
-class Spin 
-{
-  float x, y, speed;
-  float angle = 0.0;
-  Spin(float xpos, float ypos, float s) {
-    x = xpos;
-    y = ypos;
-    speed = s;
-  }
-  void update() {
-    angle += speed;
-  }
-}
-
-class SpinArm extends Spin 
-{
-  SpinArm(float x, float y, float s) {
-    super(x, y, s);
-  }
-  void display() {
-    strokeWeight(1);
-    stroke(0);
-    pushMatrix();
-    translate(x, y);
-    angle += speed;
-    rotate(angle);
-    line(0, 0, 66, 0);
-    popMatrix();
-  }
-}
-
-class SpinSpots extends Spin 
-{
-  float dim;
-  SpinSpots(float x, float y, float s, float d) {
-    super(x, y, s);
-    dim = d;
-  }
-  void display() {
-    noStroke();
-    pushMatrix();
-    translate(x, y);
-    angle += speed;
-    rotate(angle);
-    ellipse(-dim/2, 0, dim, dim);
-    ellipse(dim/2, 0, dim, dim);
-    popMatrix();
-  }
-}
- - diff --git a/examples/basic/integersfloats.html b/examples/basic/integersfloats.html deleted file mode 100644 index 9f1c45e64..000000000 --- a/examples/basic/integersfloats.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - -

Processing.js

-

IntegersFloats

- -

Integers and floats are two different kinds of numerical data. -An integer (more commonly called an int) is a number without -a decimal point. A float is a floating-point number, which means -it is a number that has a decimal place. Floats are used when -more precision is needed.

- -

Original Processing.org Example: IntegersFloats
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int a = 0;      // Create a variable "a" of the datatype "int"
-float b = 0.0;  // Create a variable "b" of the datatype "float"
-
-void setup()
-{
-  size(200, 200);
-  stroke(255);
-  frameRate(30);
-}
-
-void draw()
-{
-  background(51);
-  
-  a = a + 1;
-  b = b + 0.2; 
-  line(a, 0, a, height/2);
-  line(b, height/2, b, height);
-  
-  if(a > width) {
-    a = 0;
-  }
-  if(b > width) {
-    b = 0;
-  }
-}
- - diff --git a/examples/basic/iteration.html b/examples/basic/iteration.html deleted file mode 100644 index 51ea28c13..000000000 --- a/examples/basic/iteration.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - -

Processing.js

-

Iteration

- -

Iteration with a "for" structure constructs repetitive forms.

- -

Original Processing.org Example: Iteration
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int k;
-int xpos1 = 100; 
-int xpos2 = 118; 
-int count = 0; 
-int timey = 0;
-int num = 12;
-
-size(200, 200);
-background(102);
-noStroke();
- 
-// Draw gray bars 
-fill(255);
-k=60;
-for(int i=0; i < num/3; i++) {
-  rect(25, k, 155, 5);
-  k+=10;
-}
-
-// Black bars
-fill(51);
-k = 40;
-for(int i=0; i < num; i++) {
-  rect(105, k, 30, 5);
-  k += 10;
-}
-k = 15;
-for(int i = 0; i < num; i++) {
-  rect(125, k, 30, 5);
-  k +=10;
-}
-  
-// Thin lines
-k = 42;
-fill(0);
-for(int i=0; i < num-1; i++) {
-  rect(36, k, 20, 1);
-  k+=10;
-}
- - diff --git a/examples/basic/keyboard.html b/examples/basic/keyboard.html deleted file mode 100644 index 2efeeec3f..000000000 --- a/examples/basic/keyboard.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - -

Processing.js

-

Keyboard

- -

Click on the image to give it focus and press the letter keys -to create forms in time and space. Each key has a unique identifying -number called it's ASCII value. These numbers can be used to position -shapes in space.

- -

Original Processing.org Example: Keyboard
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int numChars = 26;
-color[] colors = new color[numChars];
-int keyIndex;
-float keyScale;
-int rectWidth;
-
-    
-void setup()
-{
-  size(200, 200);
-  noStroke();
-  background(0);
-  keyScale = 200/numChars-1.0;
-  rectWidth = width/4;
-}
-
-void draw()
-{ 
-  if(keyPressed) {
-    if(key >= 'A' && key <= 'z') {
-      if(key <= 'Z') {
-        keyIndex = key-'A';
-      } else {
-        keyIndex = key-'a';
-      }
-      fill(millis()%255);
-      float beginRect = rectWidth/2 + keyIndex*keyScale-rectWidth/2;
-      rect(beginRect, 0.0, rectWidth, height);
-    }
-  }
-}
- - diff --git a/examples/basic/keyboardfunctions.html b/examples/basic/keyboardfunctions.html deleted file mode 100644 index 36cc1b45b..000000000 --- a/examples/basic/keyboardfunctions.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - -

Processing.js

-

KeyboardFunctions

- -

Modified from code by Martin. -Original 'Color Typewriter' concept by John Maeda. - -Click on the window to give it focus and press the letter keys to type colors. -The keyboard function keyPressed() is called whenever -a key is pressed. keyReleased() is another keyboard -function that is called when a key is released.

- -

Original Processing.org Example: KeyboardFunctions
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int max_height = 20;
-int min_height = 10;
-int letter_height = max_height; // Height of the letters
-int letter_width = 10;          // Width of the letter
-
-int x = -letter_width;          // X position of the letters
-int y = 0;                      // Y position of the letters
-
-boolean newletter;              
-
-int numChars = 26;      // There are 26 characters in the alphabet
-color[] colors = new color[numChars];
-
-void setup()
-{
-  size(200, 200);
-  noStroke();
-  colorMode(RGB, numChars);
-  background(numChars/2);
-  // Set a gray value for each key
-  for(int i=0; i<numChars; i++) {
-    colors[i] = color(i, i, i);    
-  }
-}
-
-void draw()
-{
-  if(newletter == true) {
-    // Draw the "letter"
-    int y_pos;
-    if (letter_height == max_height) {
-      y_pos = y;
-      rect( x, y_pos, letter_width, letter_height );
-    } else {
-      y_pos = y + min_height;
-      rect( x, y_pos, letter_width, letter_height );
-      fill(numChars/2);
-      rect( x, y_pos-min_height, letter_width, letter_height );
-    }
-    newletter = false;
-  }
-}
-
-void keyPressed()
-{
-  // if the key is between 'A'(65) and 'z'(122)
-  if( key >= 'A' && key <= 'z') {
-    int keyIndex;
-    if(key <= 'Z') {
-      keyIndex = key-'A';
-      letter_height = max_height;
-      fill(colors[key-'A']);
-    } else {
-      keyIndex = key-'a';
-      letter_height = min_height;
-      fill(colors[key-'a']);
-    }
-  } else {
-    fill(0);
-    letter_height = 10;
-  }
-
-  newletter = true;
-
-  // Update the "letter" position
-  x = ( x + letter_width ); 
-
-  // Wrap horizontally
-  if (x > width - letter_width) {
-    x = 0;
-    y+= max_height;
-  }
-
-  // Wrap vertically
-  if( y > height - letter_height) {
-    y = 0;      // reset y to 0
-  }
-}
- - diff --git a/examples/basic/letters.html b/examples/basic/letters.html deleted file mode 100644 index 4fadadd24..000000000 --- a/examples/basic/letters.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - -

Processing.js

-

Letters

- -

Drawing letters to the screen in Processing -uses a technology developed in the mid 1990s -at the Visual Language Workshop at the MIT -Media Laboratory. It is a closed system, -but we have supplied a number of fonts -located in the "font" directory in the main -"processing" directory. We expect to change -the Processing font technology in the future.

- -

Original Processing.org Example: Letters
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-background(0);
-
-// Load the font. Fonts are located within the 
-// main Processing directory/folder and they
-// must be placed within the data directory
-// of your sketch for them to load
-PFont fontA = loadFont("Courier New");
-textFont(fontA, 36);
-textAlign(CENTER);
-
-// Set the gray value of the letters
-fill(255);
-
-// Set the left and top margin
-int margin = 6;
-int gap = 30;
-translate(margin*1.5, margin*2);
-
-// Create a matrix of letterforms
-int counter = 0;
-for(int i=0; i<margin; i++) {
-  for(int j=0; j<margin; j++) {
-    char letter;
-    
-    // Select the letter
-    int count = 65+(i*margin)+j;
-    if(count <= 90) {
-      letter = char(65+counter);
-      if(letter == 'A' || letter == 'E' || letter == 'I' || 
-         letter == 'O' || letter == 'U') {
-           fill(204, 204, 0);
-      } else {
-        fill(255);
-      }
-    } else {
-      fill(153);
-      letter = char(48+counter);
-    }
- 
-    // Draw the letter to the screen
-    text(letter, 15+j*gap, 20+i*gap);
- 
-    // Increment the counter
-    counter++;
-    if(counter >= 26) {
-      counter = 0;
-    }
-  }
-}
- - diff --git a/examples/basic/lineargradient.html b/examples/basic/lineargradient.html deleted file mode 100644 index 34e0e8d67..000000000 --- a/examples/basic/lineargradient.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - -

Processing.js

-

LinearGradient

- -

by Ira Greenberg. - -Using the convenient red(), green() -and blue() component functions, -generate some linear gradients.

- -

Original Processing.org Example: LinearGradient
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// constants
-int Y_AXIS = 1;
-int X_AXIS = 2;
-
-void setup(){
-  size(200, 200);
-
-  // create some gradients
-  // background
-  color b1 = color(190, 190, 190);
-  color b2 = color(20, 20, 20);
-  setGradient(0, 0, width, height, b1, b2, Y_AXIS);
-  //center squares
-  color c1 = color(255, 120, 0);
-  color c2 = color(10, 45, 255);
-  color c3 = color(10, 255, 15);
-  color c4 = color(125, 2, 140);
-  color c5 = color(255, 255, 0);
-  color c6 = color(25, 255, 200);
-  setGradient(25, 25, 75, 75, c1, c2, Y_AXIS);
-  setGradient(100, 25, 75, 75, c3, c4, X_AXIS);
-  setGradient(25, 100, 75, 75, c2, c5, X_AXIS);
-  setGradient(100, 100, 75, 75, c4, c6, Y_AXIS);
-}
-
-void setGradient(int x, int y, float w, float h, color c1, color c2, int axis ){
-  // calculate differences between color components 
-  float deltaR = red(c2)-red(c1);
-  float deltaG = green(c2)-green(c1);
-  float deltaB = blue(c2)-blue(c1);
-
-  // choose axis
-  if(axis == Y_AXIS){
-    /*nested for loops set pixels
-     in a basic table structure */
-    // column
-    for (int i=x; i<=(x+w); i++){
-      // row
-      for (int j = y; j<=(y+h); j++){
-        color c = color(
-        (red(c1)+(j-y)*(deltaR/h)),
-        (green(c1)+(j-y)*(deltaG/h)),
-        (blue(c1)+(j-y)*(deltaB/h)) 
-          );
-        set(i, j, c);
-      }
-    }  
-  }  
-  else if(axis == X_AXIS){
-    // column 
-    for (int i=y; i<=(y+h); i++){
-      // row
-      for (int j = x; j<=(x+w); j++){
-        color c = color(
-        (red(c1)+(j-x)*(deltaR/h)),
-        (green(c1)+(j-x)*(deltaG/h)),
-        (blue(c1)+(j-x)*(deltaB/h)) 
-          );
-        set(j, i, c);
-      }
-    }  
-  }
-}
- - diff --git a/examples/basic/loadingimages.html b/examples/basic/loadingimages.html deleted file mode 100644 index 31c950829..000000000 --- a/examples/basic/loadingimages.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -

Processing.js

-

LoadingImages

- -

Loading a recent image from the US National Weather Service. -Notice the date in the upper left corner of the image. -Processing applications can only load images from the network -while running in the Processing environment. This example will -not run in a web broswer and will only work when the computer -is connected to the Internet.

- -

Original Processing.org Example: LoadingImages
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-PImage img1;
-img1 = loadImage("http://iwin.nws.noaa.gov/iwin/images/ecir.jpg");
-image(img1, 0, 0);
- - diff --git a/examples/basic/logicaloperators.html b/examples/basic/logicaloperators.html deleted file mode 100644 index 685122bc1..000000000 --- a/examples/basic/logicaloperators.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - -

Processing.js

-

LogicalOperators

- -

The logical operators for AND (&&) and OR (||) are used to -combine simple relational statements into more complex expressions. -The NOT (!) operator is used to negate a boolean statement.

- -

Original Processing.org Example: LogicalOperators
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-background(126);
-
-boolean op = false;
-
-for(int i=5; i<=195; i+=5) {
-  // Logical AND
-  stroke(0);
-  if((i > 35) && (i < 100)) {
-    line(5, i, 95, i);
-    op = false;
-  }
-  
-  // Logical OR
-  stroke(76);
-  if((i <= 35) || (i >= 100)) {
-    line(105, i, 195, i);
-    op = true;
-  }
-  
-  // Testing if a boolean value is "true"
-  // The expression "if(op)" is equivalent to "if(op == true)"
-  if(op) {
-    stroke(0);
-    point(width/2, i);
-  }
-    
-  // Testing if a boolean value is "false"
-  // The expression "if(!op)" is equivalent to "if(op == false)"
-  if(!op) {
-    stroke(255);
-    point(width/4, i);
-  }
-}
- - diff --git a/examples/basic/loop.html b/examples/basic/loop.html deleted file mode 100644 index 76c0e47eb..000000000 --- a/examples/basic/loop.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - -

Processing.js

-

Loop

- -

The loop() function causes draw() to execute -continuously. If noLoop is called in setup() -the draw() is only executed once. In this example -click the mouse to execute loop(), which will -cause the draw() the execute continuously.

- -

Original Processing.org Example: Loop
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// The statements in the setup() function 
-// execute once when the program begins
-void setup() 
-{
-  size(200, 200);  // Size should be the first statement
-  stroke(255);     // Set stroke color to white
-  noLoop();
-}
-
-float y = 100;
-
-// The statements in draw() are run until the 
-// program is stopped. Each statement is run in 
-// sequence and after the last line is read, the first 
-// line is run again.
-void draw() 
-{ 
-  background(0);   // Set the background to black
-  line(0, y, width, y);  
-  
-  y = y - 1; 
-  if (y < 0) { 
-    y = height; 
-  } 
-} 
-
-void mousePressed() 
-{
-  loop();
-}
- - diff --git a/examples/basic/milliseconds.html b/examples/basic/milliseconds.html deleted file mode 100644 index 0b3fe43dd..000000000 --- a/examples/basic/milliseconds.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - -

Processing.js

-

Milliseconds

- -

A millisecond is 1/1000 of a second. -Processing keeps track of the number of milliseconds a program has run. -By modifying this number with the modulo(%) operator, -different patterns in time are created.

- -

Original Processing.org Example: Milliseconds
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float scale;
-
-void setup()
-{
-  size(200, 200);
-  noStroke();
-  scale = width/10;
-}
-
-void draw()
-{ 
-  for(int i=0; i<scale; i++) {
-    colorMode(RGB, (i+1) * scale * 10);
-    fill(millis()%((i+1) * scale * 10) );
-    rect(i*scale, 0, scale, height);
-  }
-}
- - diff --git a/examples/basic/modulo.html b/examples/basic/modulo.html deleted file mode 100644 index 81b3f4197..000000000 --- a/examples/basic/modulo.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - -

Processing.js

-

Modulo

- -

The modulo operator (%) returns the remainder of a number -divided by another. As in this example, it is often used -to keep numerical values within a set range. - -Created 12 January 2003.

- -

Original Processing.org Example: Modulo
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int num = 20;
-float c;
-
-void setup()
-{
-  size(200,200);
-  fill(255);
-  frameRate(30);
-}
-
-void draw() 
-{ 
-  background(0);
-  c+=0.1;
-  for(int i=1; i<height/num; i++) { 
-    float x = (c%i)*i*i;
-    stroke(102);
-    line(0, i*num, x, i*num);
-    noStroke();
-    rect(x, i*num-num/2, 8, num);
-  } 
-}
- - diff --git a/examples/basic/mouse1d.html b/examples/basic/mouse1d.html deleted file mode 100644 index 6e996f40b..000000000 --- a/examples/basic/mouse1d.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - -

Processing.js

-

Mouse1D

- -

Move the mouse left and right to shift the balance. -The "mouseX" variable is used to control both the -size and color of the rectangles.

- -

Original Processing.org Example: Mouse1D
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int gx = 15;
-int gy = 35;
-float leftColor = 0.0;
-float rightColor = 0.0;
-
-void setup() 
-{
-  size(200, 200);
-  colorMode(RGB, 1.0);
-  noStroke();
-}
-
-void draw() 
-{
-  background(0.0);
-  update(mouseX); 
-  fill(0.0, leftColor + 0.4, leftColor + 0.6); 
-  rect(width/4-gx, width/2-gx, gx*2, gx*2); 
-  fill(0.0, rightColor + 0.2, rightColor + 0.4); 
-  rect(width/1.33-gy, width/2-gy, gy*2, gy*2);
-}
-
-void update(int x) 
-{
-  leftColor = -0.002 * x/2 + 0.06;
-  rightColor =  0.002 * x/2 + 0.06;
-	
-  gx = x/2;
-  gy = 100-x/2;
-
-  if (gx < 10) {
-    gx = 10;
-  } else if (gx > 90) {
-    gx = 90;
-  }
-
-  if (gy > 90) {
-    gy = 90;
-  } else if (gy < 10) {
-    gy = 10;
-  }
-}
- - diff --git a/examples/basic/mouse2d.html b/examples/basic/mouse2d.html deleted file mode 100644 index d0a1758ad..000000000 --- a/examples/basic/mouse2d.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - -

Processing.js

-

Mouse2D

- -

Moving the mouse changes the position and size of each box.

- -

Original Processing.org Example: Mouse2D
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup() 
-{
-  size(200, 200); 
-  noStroke();
-  colorMode(RGB, 255, 255, 255, 100);
-  rectMode(CENTER);
-}
-
-void draw() 
-{   
-  background(51); 
-  fill(255, 80);
-  rect(mouseX, height/2, mouseY/2+10, mouseY/2+10);
-  fill(255, 80);
-  rect(width-mouseX, height/2, ((height-mouseY)/2)+10, ((height-mouseY)/2)+10);
-}
- - diff --git a/examples/basic/mousefunctions.html b/examples/basic/mousefunctions.html deleted file mode 100644 index 813bfa306..000000000 --- a/examples/basic/mousefunctions.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - -

Processing.js

-

MouseFunctions

- -

Click on the box and drag it across the screen.

- -

Original Processing.org Example: MouseFunctions
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float bx;
-float by;
-int bs = 20;
-boolean bover = false;
-boolean locked = false;
-float bdifx = 0.0; 
-float bdify = 0.0; 
-
-
-void setup() 
-{
-  size(200, 200);
-  bx = width/2.0;
-  by = height/2.0;
-  rectMode(CENTER_RADIUS);  
-}
-
-void draw() 
-{ 
-  background(0);
-  
-  // Test if the cursor is over the box 
-  if (mouseX > bx-bs && mouseX < bx+bs && 
-      mouseY > by-bs && mouseY < by+bs) {
-    bover = true;  
-    if(!locked) { 
-      stroke(255); 
-      fill(153);
-    } 
-  } else {
-    stroke(153);
-    fill(153);
-    bover = false;
-  }
-  
-  // Draw the box
-  rect(bx, by, bs, bs);
-}
-
-void mousePressed() {
-  if(bover) { 
-    locked = true; 
-    fill(255, 255, 255);
-  } else {
-    locked = false;
-  }
-  bdifx = mouseX-bx; 
-  bdify = mouseY-by; 
-
-}
-
-void mouseDragged() {
-  if(locked) {
-    bx = mouseX-bdifx; 
-    by = mouseY-bdify; 
-  }
-}
-
-void mouseReleased() {
-  locked = false;
-}
- - diff --git a/examples/basic/mouseoverandout.html b/examples/basic/mouseoverandout.html deleted file mode 100644 index 113578d95..000000000 --- a/examples/basic/mouseoverandout.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - -

Processing.js

-

MouseOver and MouseOut

- -

Mouse over the sketch, then mouse out. The background color should change for each.

- -

Processing.js only
-

-
- -
// written by Chris Lonnen
-// Issue 670 
-
-// Mouse over the window. Then move the mouse out.
-// Does the background change color?
-
-void setup() {
-  size(200,200);
-  background(10);
-}
-
-void draw() {}
-
-void mouseOut() {
-  background(140,50,80);
-}
-
-void mouseOver() {
-  background(50,80,140);
-}
- - diff --git a/examples/basic/mousepress.html b/examples/basic/mousepress.html deleted file mode 100644 index d54534ba9..000000000 --- a/examples/basic/mousepress.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - -

Processing.js

-

MousePress

- -

Move the mouse to position the shape. -Press the mouse button to invert the color.

- -

Original Processing.org Example: MousePress
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup() {
-  size(200, 200);
-  fill(126);
-  background(102);
-}
-
-void draw() {
-  if(mousePressed) {
-    stroke(255);
-  } else {
-    stroke(0);
-  }
-  line(mouseX-66, mouseY, mouseX+66, mouseY);
-  line(mouseX, mouseY-66, mouseX, mouseY+66); 
-}
- - diff --git a/examples/basic/mousesignals.html b/examples/basic/mousesignals.html deleted file mode 100644 index 3fb74d882..000000000 --- a/examples/basic/mousesignals.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - -

Processing.js

-

MouseSignals

- -

Move and click the mouse to generate signals. -The top row is the signal from "mouseX", -the middle row is the signal from "mouseY", -and the bottom row is the signal from "mousePressed".

- -

Original Processing.org Example: MouseSignals
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int[] xvals;
-int[] yvals;
-int[] bvals;
-
-void setup() 
-{
-  size(200, 200);
-  xvals = new int[width];
-  yvals = new int[width];
-  bvals = new int[width];
-}
-
-int arrayindex = 0;
-
-void draw()
-{
-  background(102);
-  
-  for(int i=1; i<width; i++) { 
-    xvals[i-1] = xvals[i]; 
-    yvals[i-1] = yvals[i];
-    bvals[i-1] = bvals[i];
-  } 
-  // Add the new values to the end of the array 
-  xvals[width-1] = mouseX; 
-  yvals[width-1] = mouseY;
-  if(mousePressed) {
-    bvals[width-1] = 0;
-  } else {
-    bvals[width-1] = 255;
-  }
-  
-  fill(255);
-  noStroke();
-  rect(0, height/3, width, height/3+1);
-
-  for(int i=1; i<width; i++) {
-    stroke(255);
-    point(i, xvals[i]/3);
-    stroke(0);
-    point(i, height/3+yvals[i]/3);
-    stroke(255);
-    line(i, 2*height/3+bvals[i]/3, i, (2*height/3+bvals[i-1]/3));
-  }
-}
- - diff --git a/examples/basic/multipleconstructors.html b/examples/basic/multipleconstructors.html deleted file mode 100644 index fc7ddcfe7..000000000 --- a/examples/basic/multipleconstructors.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - -

Processing.js

-

MultipleConstructors

- -

A class can have multiple constructors that assign the fields in different ways. -Sometimes it's beneficial to specify every aspect of an objects data by assigning -parameters to the fields, but other times it might be appropriate to define only -one or a few.

- -

Original Processing.org Example: MultipleConstructors
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-Spot sp1, sp2;
-void setup() 
-{
-  size(200, 200);
-  background(204);
-  smooth();
-  noLoop();
-  // Run the constructor without parameters
-  sp1 = new Spot();
-  // Run the constructor with three parameters
-  sp2 = new Spot(122, 100, 40);
-}
-
-void draw() {
-  sp1.display();
-  sp2.display();
-}
-
-class Spot {
-  float x, y, radius;
-  // First version of the Spot constructor;
-  // the fields are assigned default values
-  Spot() {
-    x = 66;
-    y = 100;
-    radius = 16;
-  }
-  // Second version of the Spot constructor;
-  // the fields are assigned with parameters
-  Spot(float xpos, float ypos, float r) {
-    x = xpos;
-    y = ypos;
-    radius = r;
-  }
-  void display() {
-    ellipse(x, y, radius*2, radius*2);
-  }
-}
- - diff --git a/examples/basic/neighborhood.html b/examples/basic/neighborhood.html deleted file mode 100644 index 481815a90..000000000 --- a/examples/basic/neighborhood.html +++ /dev/null @@ -1,604 +0,0 @@ - - - - - -

Processing.js

-

Neighborhood

- -

By Ira Greenberg - -Draw a neighborhood of houses using -Door, Window, Roof and House classes. -Good example of class composition, with component -Door, Window, Roof class references encapsulated -within House class. This arrangement allows -House class to handle placement and sizing of -its components, while still allowing user -customization of the individual components.

- -

Original Processing.org Example: Neighborhood
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup(){
-  size(200, 200);
-  background(190);
-  smooth();
-  // Ground plane
-  int groundHeight = 10;
-  fill(0);
-  rect(0, height-groundHeight, width, groundHeight);
-  fill(255);
-  
-  // Center the houses
-  translate(12, 0);
-
-  // Houses
-  Door door1 = new Door(20, 40);
-  Window window1 = new Window(50, 62, false, Window.DOUBLE);
-  Roof roof1 = new Roof(Roof.DOME);
-  House house1 = new House(75, 75, door1, window1, roof1, House.MIDDLE_DOOR);
-  house1.drawHouse(0, height-groundHeight-house1.h, true);
-
-  Door door2 = new Door(20, 40);
-  Window window2 = new Window(50, 62, true, Window.QUAD);
-  Roof roof2 = new Roof(Roof.GAMBREL);
-  House house2 = new House(100, 60, door2, window2, roof2, House.LEFT_DOOR);
-  house2.drawHouse(house1.x + house1.w, height-groundHeight-house2.h, true);
-}
-
-class Door{
-  //door properties
-  int x;
-  int y;
-  int w;
-  int h;
-
-  // for knob
-  int knobLoc = 1;
-  //constants
-  final static int RT = 0;
-  final static int LFT = 1;
-
-  // constructor
-  Door(int w, int h){
-    this.w = w;
-    this.h = h;
-  }
-
-  // draw the door
-  void drawDoor(int x, int y) {
-    rect(x, y, w, h);
-    int knobsize = w/10;
-    if (knobLoc == 0){
-      //right side
-      ellipse(x+w-knobsize, y+h/2, knobsize, knobsize);
-    }
-    else {
-      //left side
-      ellipse(x+knobsize, y+h/2, knobsize, knobsize);
-    }
-  }
-
-  // set knob position
-  void setKnob(int knobLoc){
-    this. knobLoc = knobLoc;
-  }
-}
-
-class Window{
-  //window properties
-  int x;
-  int y;
-  int w;
-  int h;
-
-  // customized features
-  boolean hasSash = false;
-
-  // single, double, quad pane
-  int style = 0;
-  //constants
-  final static int SINGLE = 0;
-  final static int DOUBLE = 1;
-  final static int QUAD = 2;
-
-  // constructor 1
-  Window(int w, int h){
-    this.w = w;
-    this.h = h;
-  }
-  // constructor 2
-  Window(int w, int h, int style){
-    this.w = w;
-    this.h = h;
-    this.style = style;
-  }
-  // constructor 3
-  Window(int w, int h, boolean hasSash, int style){
-    this.w = w;
-    this.h = h;
-    this.hasSash = hasSash;
-    this.style = style;
-  }
-
-  // draw the window
-  void drawWindow(int x, int y) {
-    //local variables
-    int margin = 0;
-    int winHt = 0;
-    int winWdth = 0;
-
-    if (hasSash){
-      margin = w/15;
-    }
-
-    switch(style){
-    case 0:
-      //outer window (sash)
-      rect(x, y, w, h);
-      //inner window
-      rect(x+margin, y+margin, w-margin*2, h-margin*2);
-      break;
-    case 1:
-      winHt = (h-margin*3)/2;
-      //outer window (sash)
-      rect(x, y, w, h);
-      //inner window (top)
-      rect(x+margin, y+margin, w-margin*2, winHt);
-      //inner windows (bottom)
-      rect(x+margin, y+winHt+margin*2, w-margin*2, winHt);
-      break;
-    case 2:
-      winWdth = (w-margin*3)/2;
-      winHt = (h-margin*3)/2;
-      //outer window (sash)
-      rect(x, y, w, h);
-      //inner window (top-left)
-      rect(x+margin, y+margin, winWdth, winHt);
-      //inner window (top-right)
-      rect(x+winWdth+margin*2,  y+margin, winWdth, winHt);
-      //inner windows (bottom-left)
-      rect(x+margin, y+winHt+margin*2, winWdth, winHt);
-      //inner windows (bottom-right)
-      rect(x+winWdth+margin*2,  y+winHt+margin*2, winWdth, winHt);
-      break;
-    }
-  }
-
-  // set window style (number of panes)
-  void setStyle(int style){
-    this.style = style;
-  }
-}
-
-class Roof{
-  //roof properties
-  int x;
-  int y;
-  int w;
-  int h;
-
-  // roof style
-  int style = 0;
-  //constants  
-  final static int CATHEDRAL = 0;
-  final static int GAMBREL = 1;
-  final static int DOME = 2;
-
-  // default constructor
-  Roof(){
-  }
-   
-   // constructor 2
-   Roof(int style){
-    this.style = style;
-  }
-
-  // draw the roof
-  void drawRoof(int x, int y, int w, int h) {
-    switch(style){
-    case 0:
-      beginShape();
-      vertex(x, y);
-      vertex(x+w/2, y-h/3);
-      vertex(x+w, y);
-      endShape(CLOSE);
-      break;
-    case 1:
-     beginShape();
-      vertex(x, y);
-      vertex(x+w/7, y-h/4);
-      vertex(x+w/2, y-h/2);
-      vertex(x+(w-w/7), y-h/4);
-      vertex(x+w, y);
-      endShape(CLOSE);
-      break;
-    case 2:
-      ellipseMode(CORNER);
-      arc(x, y-h/2, w, h, PI, TWO_PI);
-      line(x, y, x+w, y);
-      break;
-    }
-
-  }
-
-  // set roof style
-  void setStyle(int style){
-    this.style = style;
-  }
-}
-
-class House{
-  //house properties
-  int x;
-  int y;
-  int w;
-  int h;
-
-  //component reference variables
-  Door door;
-  Window window;
-  Roof roof;
-
-  //optional autosize variable
-  boolean AutoSizeComponents = false;
-
-  //door placement
-  int doorLoc = 0;
-  //constants
-  final static int MIDDLE_DOOR = 0;
-  final static int LEFT_DOOR = 1;
-  final static int RIGHT_DOOR = 2;
-
-  //constructor
-  House(int w, int h, Door door, Window window, Roof roof, int doorLoc) {
-    this.w = w;
-    this.h = h;
-    this.door = door;
-    this.window = window;
-    this.roof = roof;
-    this.doorLoc = doorLoc;
-  }
-
-  void drawHouse(int x, int y, boolean AutoSizeComponents) {
-    this.x = x;
-    this.y =y;
-    this.AutoSizeComponents = AutoSizeComponents;
-
-    //automatically sizes doors and windows
-    if(AutoSizeComponents){
-      //autosize door
-      door.h = h/4;
-      door.w = door.h/2;
-
-      //autosize windows
-      window.h = h/3;
-      window.w = window.h/2;
-
-    }
-    // draw bldg block
-    rect(x, y, w, h);
-
-    // draw door
-    switch(doorLoc){
-    case 0:
-      door.drawDoor(x+w/2-door.w/2, y+h-door.h);
-      break;
-    case 1:
-      door.drawDoor(x+w/8, y+h-door.h);
-      break;
-    case 2:
-      door.drawDoor(x+w-w/8-door.w,  y+h-door.h);
-      break;
-    }
-
-    // draw windows
-    int windowMargin = (w-window.w*2)/3;
-    window.drawWindow(x+windowMargin, y+h/6);
-    window.drawWindow(x+windowMargin*2+window.w, y+h/6);
-
-    // draw roof
-    roof.drawRoof(x, y, w, h);
-  }
-
-  // catch drawHouse method without boolean argument
-  void drawHouse(int x, int y){
-    // recall with required 3rd argument
-    drawHouse(x, y, false);
-  }
-}
- - diff --git a/examples/basic/noise1d.html b/examples/basic/noise1d.html deleted file mode 100644 index cf31c42e5..000000000 --- a/examples/basic/noise1d.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - -

Processing.js

-

Noise1D

- -

Using 1D Perlin Noise to assign location.

- -

Original Processing.org Example: Noise1D
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float xoff = 0.0;
-float xincrement = 0.01; 
-
-void setup() {
-  size(200,200);
-  background(0);
-  frameRate(30);
-  smooth();
-  noStroke();
-}
-
-void draw()
-{
-  // Create an alpha blended background
-  fill(0, 10);
-  rect(0,0,width,height);
-  
-  //float n = random(0,width);  // Try this line instead of noise
-  
-  // Get a noise value based on xoff and scale it according to the window's width
-  float n = noise(xoff)*width;
-  
-  // With each cycle, increment xoff
-  xoff += xincrement;
-  
-  // Draw the ellipse at the value produced by perlin noise
-  fill(200);
-  ellipse(n,height/2,16,16);
-}
- - diff --git a/examples/basic/noise2d.html b/examples/basic/noise2d.html deleted file mode 100644 index 18376f0ee..000000000 --- a/examples/basic/noise2d.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - -

Processing.js

-

Noise2D

- -

by Daniel Shiffman. - -Using 2D noise to create simple texture.

- -

Original Processing.org Example: Noise2D
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float increment = 0.02;
-
-void setup() {
-  size(200,200);
-  noLoop();
-}
-
-void draw() {
-  background(0);
-  
-  // Optional: adjust noise detail here
-  // noiseDetail(8,0.65f);
-  
-  loadPixels();
-
-  float xoff = 0.0; // Start xoff at 0
-  
-  // For every x,y coordinate in a 2D space, calculate a noise value and produce a brightness value
-  for (int x = 0; x < width; x++) {
-    xoff += increment;   // Increment xoff 
-    float yoff = 0.0;   // For every xoff, start yoff at 0
-    for (int y = 0; y < height; y++) {
-      yoff += increment; // Increment yoff
-      
-      // Calculate noise and scale by 255
-      float bright = noise(xoff,yoff)*255;
-
-      // Try using this line instead
-      //float bright = random(0,255);
-      
-      // Set each pixel onscreen to a grayscale value
-      pixels[x+y*width] = color(bright);
-    }
-  }
-  
-  updatePixels();
-}
- - diff --git a/examples/basic/noise3d.html b/examples/basic/noise3d.html deleted file mode 100644 index 9cfec4854..000000000 --- a/examples/basic/noise3d.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - -

Processing.js

-

Noise3D

- -

Using 3D noise to create simple animated texture. -Here, the third dimension ('z') is treated as time.

- -

Original Processing.org Example: Noise3D
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float increment = 0.01;
-// The noise function's 3rd argument, a global variable that increments once per cycle
-float zoff = 0.0;  
-// We will increment zoff differently than xoff and yoff
-float zincrement = 0.02; 
-
-void setup() {
-  size(200,200);
-  frameRate(30);
-}
-
-void draw() {
-  background(0);
-  
-  // Optional: adjust noise detail here
-  // noiseDetail(8,0.65f);
-  
-  loadPixels();
-
-  float xoff = 0.0; // Start xoff at 0
-  
-  // For every x,y coordinate in a 2D space, calculate a noise value and produce a brightness value
-  for (int x = 0; x < width; x++) {
-    xoff += increment;   // Increment xoff 
-    float yoff = 0.0f;   // For every xoff, start yoff at 0
-    for (int y = 0; y < height; y++) {
-      yoff += increment; // Increment yoff
-      
-      // Calculate noise and scale by 255
-      float bright = noise(xoff,yoff,zoff)*255;
-
-      // Try using this line instead
-      //float bright = random(0,255);
-      
-      // Set each pixel onscreen to a grayscale value
-      pixels[x+y*width] = color(bright,bright,bright);
-    }
-  }
-  updatePixels();
-  
-  zoff += zincrement; // Increment zoff
-  
-  
-}
- - diff --git a/examples/basic/noisewave.html b/examples/basic/noisewave.html deleted file mode 100644 index 21127636e..000000000 --- a/examples/basic/noisewave.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - -

Processing.js

-

NoiseWave

- -

by Daniel Shiffman. - -Using Perlin Noise to generate a wave-like pattern.

- -

Original Processing.org Example: NoiseWave
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int xspacing = 8;   // How far apart should each horizontal location be spaced
-int w;              // Width of entire wave
-
-float yoff = 0.0f;        // 2nd dimension of perlin noise
-float[] yvalues;          // Using an array to store height values for the wave (not entirely necessary)
-
-void setup() {
-  size(200,200);
-  frameRate(30);
-  colorMode(RGB,255,255,255,100);
-  smooth();
-  w = width+16;
-  yvalues = new float[w/xspacing];
-}
-
-void draw() {
-  background(0);
-  calcWave();
-  renderWave();
-
-}
-
-void calcWave() {
-  float dx = 0.05f;
-  float dy = 0.01f;
-  float amplitude = 100.0f;
-
-  // Increment y ('time')
-  yoff += dy;
-
-  //float xoff = 0.0;  // Option #1
-  float xoff = yoff; // Option #2
-
-  for (int i = 0; i < yvalues.length; i++) {
-    // Using 2D noise function
-    //yvalues[i] = (2*noise(xoff,yoff)-1)*amplitude; // Option #1
-    // Using 1D noise function
-    yvalues[i] = (2*noise(xoff)-1)*amplitude;    // Option #2
-    xoff+=dx;
-  }
-
-}
-
-void renderWave() {
-  // A simple way to draw the wave with an ellipse at each location
-  for (int x = 0; x < yvalues.length; x++) {
-    noStroke();
-    fill(255,50);
-    ellipseMode(CENTER);
-    ellipse(x*xspacing,width/2+yvalues[x],16,16);
-  }
-}
- - diff --git a/examples/basic/noloop.html b/examples/basic/noloop.html deleted file mode 100644 index 758a9adc2..000000000 --- a/examples/basic/noloop.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - -

Processing.js

-

NoLoop

- -

The noLoop() function causes draw() to only -execute once. Without calling noLoop(), draw() -executed continually.

- -

Original Processing.org Example: NoLoop
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// The statements in the setup() function 
-// execute once when the program begins
-void setup() 
-{
-  size(200, 200);  // Size should be the first statement
-  stroke(255);     // Set line drawing color to white
-  frameRate(30);
-  noLoop();
-}
-
-float y = 100;
-
-// The statements in draw() are executed until the 
-// program is stopped. Each statement is executed in 
-// sequence and after the last line is read, the first 
-// line is executed again.
-void draw() 
-{ 
-  background(0);   // Set the background to black
-  y = y - 1; 
-  if (y < 0) { y = height; } 
-  line(0, y, width, y);  
-}
- - diff --git a/examples/basic/objects.html b/examples/basic/objects.html deleted file mode 100644 index 58963f1b7..000000000 --- a/examples/basic/objects.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - -

Processing.js

-

Objects

- -

by hbarragan - -Move the cursor across the image to change the speed and positions -of the geometry. The class MRect defines a group of lines.

- -

Original Processing.org Example: Objects
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-MRect r1, r2, r3, r4;
- 
-void setup()
-{
-  size(200, 200);
-  fill(255, 204);
-  noStroke();
-  r1 = new MRect(1, 134.0, 0.532, 0.083*height, 10.0, 60.0);
-  r2 = new MRect(2, 44.0, 0.166, 0.332*height, 5.0, 50.0);
-  r3 = new MRect(2, 58.0, 0.332, 0.4482*height, 10.0, 35.0);
-  r4 = new MRect(1, 120.0, 0.0498, 0.913*height, 15.0, 60.0);
-}
- 
-void draw()
-{
-  background(0);
-  
-  r1.display();
-  r2.display();
-  r3.display();
-  r4.display();
- 
-  r1.move(mouseX-(width/2), mouseY+(height*0.1), 30);
-  r2.move((mouseX+(width*0.05))%width, mouseY+(height*0.025), 20);
-  r3.move(mouseX/4, mouseY-(height*0.025), 40);
-  r4.move(mouseX-(width/2), (height-mouseY), 50);
-}
- 
-class MRect 
-{
-  int w; // single bar width
-  float xpos; // rect xposition
-  float h; // rect height
-  float ypos ; // rect yposition
-  float d; // single bar distance
-  float t; // number of bars
- 
-  MRect(int iw, float ixp, float ih, float iyp, float id, float it) {
-    w = iw;
-    xpos = ixp;
-    h = ih;
-    ypos = iyp;
-    d = id;
-    t = it;
-  }
- 
-  void move (float posX, float posY, float damping) {
-    float dif = ypos - posY;
-    if (abs(dif) > 1) {
-      ypos -= dif/damping;
-    }
-    dif = xpos - posX;
-    if (abs(dif) > 1) {
-      xpos -= dif/damping;
-    }
-  }
- 
-  void display() {
-    for (int i=0; i<t; i++) {
-      rect(xpos+(i*(d+w)), ypos, w, height*h);
-    }
-  }
-}
- - diff --git a/examples/basic/operatorprecedence.html b/examples/basic/operatorprecedence.html deleted file mode 100644 index e885f90d8..000000000 --- a/examples/basic/operatorprecedence.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - -

Processing.js

-

OperatorPrecedence

- -

by REAS - -If you don't explicitly state the order in which -an expression is evaluated, they are evaluated based -on the operator precedence. For example, in the statement -"4 + 28", the 2 will first be multiplied by 8 and then the result will -be added to 4. This is because the "*" has a higher precedence -than the "+". To avoid ambiguity in reading the program, -it is recommended that is statement is written as "4 + (28)". -The order of evaluation can be controlled through placement of -parenthesis in the code. A table of operator precedence follows below.

- -

Original Processing.org Example: OperatorPrecedence
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// The highest precedence is at the top of the list and 
-// the lowest is at the bottom.
-// Multiplicative: * / %
-// Additive: + -
-// Relational: < > <= >=
-// Equality: == !=
-// Logical AND: &&
-// Logical OR: ||
-// Assignment: = += -= *= /= %=
-
-size(200, 200);
-background(51);
-noFill();
-stroke(51);
-
-stroke(204);
-for(int i=0; i< width-20; i+= 4) {
-  // The 30 is added to 70 and then evaluated
-  // if it is greater than the current value of "i"
-  // For clarity, write as "if(i > (30 + 70)) {"
-  if(i > 30 + 70) {
-    line(i, 0, i, 50);
-  }
-}
-
-stroke(255);
-// The 2 is multiplied by the 8 and the result is added to the 5
-// For clarity, write as "rect(5 + (2 * 8), 0, 90, 20);"
-rect(4 + 2 * 8, 52, 90, 48);
-rect((4 + 2) * 8, 100, 90, 49);
-  
-stroke(153);
-for(int i=0; i< width; i+= 2) {
-  // The relational statements are evaluated 
-  // first, and then the logical AND statements and 
-  // finally the logical OR. For clarity, write as:
-  // "if(((i > 10) && (i < 50)) || ((i > 80) && (i < 160))) {"
-  if(i > 20 && i < 50 || i > 100 && i < width-20) {
-    line(i, 151, i, height-1);
-  } 
-}
- - diff --git a/examples/basic/piechart.html b/examples/basic/piechart.html deleted file mode 100644 index 00e087a67..000000000 --- a/examples/basic/piechart.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - -

Processing.js

-

PieChart

- -

By Ira Greenberg - -Uses the arc() function to generate a pie chart from the data -stored in an array.

- -

Original Processing.org Example: PieChart
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-background(100);
-smooth();
-noStroke();
-
-int diameter = 150;
-int[] angs = {30, 10, 45, 35, 60, 38, 75, 67};
-float lastAng = 0;
-
-for (int i=0; i<angs.length; i++){
-  fill(angs[i] * 3.0);
-  arc(width/2, height/2, diameter, diameter, lastAng, lastAng+radians(angs[i]));
-  lastAng += radians(angs[i]);  
-}
- - diff --git a/examples/basic/pointillism.html b/examples/basic/pointillism.html deleted file mode 100644 index 5b5db2b1c..000000000 --- a/examples/basic/pointillism.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - -

Processing.js

-

Pointillism

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading. -F1LT3R

- -

by Daniel Shiffman. - -Mouse horizontal location controls size of dots. -Creates a simple pointillist effect using ellipses colored -according to pixels in an image.

- -

Original Processing.org Example: Pointillism
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-
-/* @pjs preload="data/eames.jpg"; */
-
-PImage a;
-
-void setup()
-{
-  a = loadImage("eames.jpg");
-  size(200,200);
-  noStroke();
-  background(255);
-  smooth();
-}
-
-void draw()
-{ 
-  float pointillize = map(mouseX, 0, width, 2, 18);
-  int x = int(random(a.width));
-  int y = int(random(a.height));
-  color pix = a.get(x, y);
-  fill(pix, 126);
-  ellipse(x, y, pointillize, pointillize);
-}
- - diff --git a/examples/basic/pointslines.html b/examples/basic/pointslines.html deleted file mode 100644 index a171e1c93..000000000 --- a/examples/basic/pointslines.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - -

Processing.js

-

PointsLines

- -

Constructing a simple dimensional form with lines and rectangles. -Changing the value of the variable 'd' scales the image. -The four variables set the positions based on the value of 'd'.

- -

Original Processing.org Example: PointsLines
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int d = 40;
-int p1 = d;
-int p2 = p1+d;
-int p3 = p2+d;
-int p4 = p3+d;
-
-size(200, 200);
-background(0);
-
-// Draw gray box
-stroke(153);
-line(p3, p3, p2, p3);
-line(p2, p3, p2, p2);
-line(p2, p2, p3, p2);
-line(p3, p2, p3, p3);
-
-// Draw white points
-stroke(255);
-point(p1, p1);
-point(p1, p3); 
-point(p2, p4);
-point(p3, p1); 
-point(p4, p2);
-point(p4, p4);
- - diff --git a/examples/basic/polartocartesian.html b/examples/basic/polartocartesian.html deleted file mode 100644 index c7e951a99..000000000 --- a/examples/basic/polartocartesian.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - -

Processing.js

-

PolarToCartesian

- -

by Daniel Shiffman. - -Convert a polar coordinate (r,theta) to cartesian (x,y): -x = rcos(theta) -y = rsin(theta)

- -

Original Processing.org Example: PolarToCartesian
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float r;
-
-// Angle and angular velocity, accleration
-float theta;
-float theta_vel;
-float theta_acc;
-
-void setup() {
-  size(200,200);
-  frameRate(30);
-  smooth();
-  
-  // Initialize all values
-  r = 50.0f;
-  theta = 0.0f;
-  theta_vel = 0.0f;
-  theta_acc = 0.0001f;
-}
-
-void draw() {
-  background(0);
-  // Translate the origin point to the center of the screen
-  translate(width/2,height/2);
-  
-  // Convert polar to cartesian
-  float x = r * cos(theta);
-  float y = r * sin(theta);
-  
-  // Draw the ellipse at the cartesian coordinate
-  ellipseMode(CENTER);
-  noStroke();
-  fill(200);
-  ellipse(x,y,16,16);
-  
-  // Apply acceleration and velocity to angle (r remains static in this example)
-  theta_vel += theta_acc;
-  theta += theta_vel;
-
-}
- - diff --git a/examples/basic/radialgradient.html b/examples/basic/radialgradient.html deleted file mode 100644 index 0a9bf863a..000000000 --- a/examples/basic/radialgradient.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - -

Processing.js

-

RadialGradient

- -

by Ira Greenberg. - -Using the convenient red(), green() -and blue() component functions, -generate an array of radial gradients.

- -

Original Processing.org Example: RadialGradient
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup(){
-  size(200, 200);
-  background(0);
-  smooth();
-
-  // create a simple table of gradients
-  int columns = 4;
-  int radius = (width/columns)/2;
-  // create some gradients
-  for (int i=radius; i< width; i+=radius*2){
-    for (int j =radius; j< height; j+=radius*2){
-      createGradient(i, j, radius, 
-      color(int(random(255)), int(random(255)), int(random(255))), 
-      color(int(random(255)), int(random(255)), int(random(255))));
-    }
-  }
-}
-
-void createGradient (float x, float y, float radius, color c1, color c2){
-  float px = 0, py = 0, angle = 0;
-
-  // calculate differences between color components 
-  float deltaR = red(c2)-red(c1);
-  float deltaG = green(c2)-green(c1);
-  float deltaB = blue(c2)-blue(c1);
-  // hack to ensure there are no holes in gradient
-  // needs to be increased, as radius increases
-  float gapFiller = 8.0;
-
-  for (int i=0; i< radius; i++){
-    for (float j=0; j<360; j+=1.0/gapFiller){
-      px = x+cos(radians(angle))*i;
-      py = y+sin(radians(angle))*i;
-      angle+=1.0/gapFiller;
-      color c = color(
-      (red(c1)+(i)*(deltaR/radius)),
-      (green(c1)+(i)*(deltaG/radius)),
-      (blue(c1)+(i)*(deltaB/radius)) 
-        );
-      set(int(px), int(py), c);      
-    }
-  }
-  // adds smooth edge 
-  // hack anti-aliasing
-  noFill();
-  strokeWeight(3);
-  ellipse(x, y, radius*2, radius*2);
-}
- - diff --git a/examples/basic/random.html b/examples/basic/random.html deleted file mode 100644 index ca02fdb58..000000000 --- a/examples/basic/random.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - -

Processing.js

-

Random

- -

Random numbers create the basis of this image. -Each time the program is loaded the result is different.

- -

Original Processing.org Example: Random
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-smooth();
-background(0);
-strokeWeight(10);
-
-for(int i = 0; i < width; i++) {
-  float r = random(255);
-  float x = random(0, width);
-  stroke(r, 100);
-  line(i, 0, x, height);
-}
- - diff --git a/examples/basic/reading.html b/examples/basic/reading.html deleted file mode 100644 index f970df4df..000000000 --- a/examples/basic/reading.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - -

Processing.js

-

Reading

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading.

- -

An image is recreated from its individual component colors. -The many colors of the image are created through modulating the -red, green, and blue values. This is an exageration of an LCD display.

- -

Original Processing.org Example: Reading
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-noStroke();
-background(0);
-
-// Load an image from the data directory
-PImage c;
-c = loadImage("cait.jpg");
-
-int xoff = 0;
-int yoff = 0;
-int p = 2;
-int pix = p*3;
-
-
-for(int i = 0; i < c.width*c.height; i += 1) 
-{  
-  int here = c.pixels[i];
-  
-  fill(red(here), 0, 0);
-  rect(xoff, yoff, p, pix);
-  
-  fill(0, green(here), 0);
-  rect(xoff+p, yoff, p, pix);
-  
-  fill(0, 0, blue(here));
-  rect(xoff+p*2, yoff, p, pix);
-  
-  xoff+=pix;
-  if(xoff >= width-pix) {
-    xoff = 0;
-    yoff += pix;
-  }
-}
- - diff --git a/examples/basic/recursion.html b/examples/basic/recursion.html deleted file mode 100644 index e73fbc9b0..000000000 --- a/examples/basic/recursion.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - -

Processing.js

-

Recursion

- -

A demonstration of recursion, which means functions call themselves. -Notice how the drawCircle() function calls itself at the end of its block. -It continues to do this until the variable "level" is equal to 1.

- -

Original Processing.org Example: Recursion
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup() 
-{
-  size(200, 200);
-  noStroke();
-  smooth();
-  noLoop();
-}
-
-void draw() 
-{
-  drawCircle(126, 170, 6);
-}
-
-void drawCircle(int x, int radius, int level) 
-{                    
-  float tt = 126 * level/4.0;
-  fill(tt);
-  ellipse(x, 100, radius*2, radius*2);      
-  if(level > 1) {
-    level = level - 1;
-    drawCircle(x - radius/2, radius/2, level);
-    drawCircle(x + radius/2, radius/2, level);
-  }
-}
- - diff --git a/examples/basic/recursion2.html b/examples/basic/recursion2.html deleted file mode 100644 index 90e8e87ad..000000000 --- a/examples/basic/recursion2.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - -

Processing.js

-

Recursion2

- -

A demonstration of recursion, which means functions call themselves. -Notice how the drawCircle() function calls itself at the end of its block. -It continues to do this until the variable "level" is equal to 1.

- -

Original Processing.org Example: Recursion2
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup() 
-{
-  size(200, 200);
-  noStroke();
-  smooth();
-  drawCircle(100, 100, 80, 8);
-}
-
-void drawCircle(float x, float y, int radius, int level) 
-{                    
-  float tt = 126 * level/6.0;
-  fill(tt, 153);
-  ellipse(x, y, radius*2, radius*2);      
-  if(level > 1) {
-    level = level - 1;
-    int num = int(random(2, 6));
-    for(int i=0; i<num; i++) {
-      float a = random(0, TWO_PI);
-      float nx = x + cos(a) * 6.0 * level;
-      float ny = y + sin(a) * 6.0 * level;
-      drawCircle(nx, ny, radius/2, level);
-    }
-  }
-}
- - diff --git a/examples/basic/redraw.html b/examples/basic/redraw.html deleted file mode 100644 index f8e95366a..000000000 --- a/examples/basic/redraw.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - -

Processing.js

-

Redraw

- -

The redraw() function makes draw() execute once. -In this example, draw() is executed once every time -the mouse is clicked.

- -

Original Processing.org Example: Redraw
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// The statements in the setup() function 
-// execute once when the program begins
-void setup() 
-{
-  size(200, 200);  // Size should be the first statement
-  stroke(255);     // Set line drawing color to white
-  noLoop();
-}
-
-float y = 100;
-
-// The statements in draw() are executed until the 
-// program is stopped. Each statement is executed in 
-// sequence and after the last line is read, the first 
-// line is executed again.
-void draw() 
-{ 
-  background(0);   // Set the background to black
-  y = y - 1; 
-  if (y < 0) { y = height; } 
-  line(0, y, width, y);  
-} 
-
-void mousePressed() 
-{
-  redraw();
-}
- - diff --git a/examples/basic/relativity.html b/examples/basic/relativity.html deleted file mode 100644 index 5cd7debcf..000000000 --- a/examples/basic/relativity.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - -

Processing.js

-

Relativity

- -

Each color is perceived in relation to other colors. -The top and bottom bars each contain the same component colors, -but a different display order causes individual colors to appear differently.

- -

Original Processing.org Example: Relativity
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-color a, b, c, d, e;
-
-void setup() {
-  size(200, 200);
-  noStroke();
-  a = color(165, 167, 20);
-  b = color(77, 86, 59);
-  c = color(42, 106, 105);
-  d = color(165, 89, 20);
-  e = color(146, 150, 127);
-  noLoop();
-}
-
-void draw() {
-  drawBand(a, b, c, d, e, 0, 4);
-  drawBand(c, a, d, b, e, height/2, 4);
-}
-
-void drawBand(color v, color w, color x, color y, color z, int ypos, int barWidth) {
-  int num = 5;
-  color[] colorOrder = { v, w, x, y, z };
-  for(int i = 0; i < width; i += barWidth*num) {
-    for(int j = 0; j < num; j++) {
-      fill(colorOrder[j]);
-      rect(i+j*barWidth, ypos, barWidth, height/2);
-    }
-  }
-}
- - diff --git a/examples/basic/rotate.html b/examples/basic/rotate.html deleted file mode 100644 index a8f358b99..000000000 --- a/examples/basic/rotate.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - -

Processing.js

-

Rotate

- -

Rotating a square around the Z axis. To get the results -you expect, send the rotate function angle parameters that are -values between 0 and PI*2 (TWO_PI which is roughly 6.28). If you prefer to -think about angles as degrees (0-360), you can use the radians() -method to convert your values. For example: scale(radians(90)) -is identical to the statement scale(PI/2).

- -

Original Processing.org Example: Rotate
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup()
-{
-  size(200,200);
-  noStroke();
-  fill(255);
-  frameRate(30);
-}
-
-float angle;
-float cosine;
-float jitter;
-
-void draw()
-{
-  background(102);
-  
-  if(second()%2 == 0){
-    jitter = (random(-0.1, 0.1));
-  }
-  angle = angle + jitter;
-  cosine = cos(angle);
-  
-  translate(width/2, height/2);
-  rotate(cosine);
-  rectMode(CENTER);
-  rect(0, 0, 115, 115);   
-}
- - diff --git a/examples/basic/saturation.html b/examples/basic/saturation.html deleted file mode 100644 index f690a2831..000000000 --- a/examples/basic/saturation.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - -

Processing.js

-

Saturation

- -

Saturation is the strength or purity of the color and represents the -amount of gray in proportion to the hue. A "saturated" color is pure -and an "unsaturated" color has a large percentage of gray. -Move the cursor vertically over each bar to alter its saturation.

- -

Original Processing.org Example: Saturation
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int barWidth = 5;
-int[] saturation;
-
-void setup() 
-{
-  size(200, 200);
-  colorMode(HSB, 360, height, height); 
-  saturation = new int[width/barWidth];
-}
-
-void draw() 
-{
-  int j = 0;
-  for (int i=0; i<=(width-barWidth); i+=barWidth) {  
-    noStroke();
-    if ((mouseX > i) && (mouseX < i+barWidth)) {
-      saturation[j] = mouseY;
-    }
-    fill(i, saturation[j], height/1.5);
-    rect(i, 0, barWidth, height);  
-    j++;
-  }
-}
- - diff --git a/examples/basic/scale.html b/examples/basic/scale.html deleted file mode 100644 index 0b95f1d3d..000000000 --- a/examples/basic/scale.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - -

Processing.js

-

Scale

- -

by Denis Grutze. - -Paramenters for the scale() function are values specified -as decimal percentages. For example, the method call scale(2.0) -will increase the dimension of the shape by 200 percent. -Objects always scale from the origin.

- -

Original Processing.org Example: Scale
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float a = 0.0;
-float s = 0.0;
-
-void setup()
-{
-  size(200,200);
-  noStroke();
-  rectMode(CENTER);
-  frameRate(30);
-}
-
-void draw()
-{
-  background(102);
-  
-  a = a + 0.04;
-  s = cos(a)*2;
-  
-  translate(width/2, height/2);
-  scale(s); 
-  fill(51);
-  rect(0, 0, 50, 50); 
-  
-  translate(75, 0);
-  fill(255);
-  scale(s);
-  rect(0, 0, 50, 50);       
-}
- - diff --git a/examples/basic/setupdraw.html b/examples/basic/setupdraw.html deleted file mode 100644 index 1b70273e4..000000000 --- a/examples/basic/setupdraw.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - -

Processing.js

-

SetupDraw

- -

The draw() function creates a structure in which -to write programs that change with time.

- -

Original Processing.org Example: SetupDraw
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// The statements in the setup() function 
-// execute once when the program begins
-void setup() 
-{
-  size(200, 200);  // Size should be the first statement
-  stroke(255);     // Set line drawing color to white
-  frameRate(30);
-}
-
-float y = 100;
-
-// The statements in draw() are executed until the 
-// program is stopped. Each statement is executed in 
-// sequence and after the last line is read, the first 
-// line is executed again.
-void draw() 
-{ 
-  background(0);   // Set the background to black
-  y = y - 1; 
-  if (y < 0) { y = height; } 
-  line(0, y, width, y);  
-}
- - diff --git a/examples/basic/shapeprimitives.html b/examples/basic/shapeprimitives.html deleted file mode 100644 index 3a1637a95..000000000 --- a/examples/basic/shapeprimitives.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - -

Processing.js

-

ShapePrimitives

- -

The basic shape primitive functions are triangle(), -rect(), quad(), and ellipse(). Squares are made -with rect() and circles are made with -ellise(). Each of these functions requires a number -of parameters which determines their position and size.

- -

Original Processing.org Example: ShapePrimitives
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-smooth(); 
-background(0);
-noStroke();
-fill(226);
-triangle(10, 10, 10, 200, 45, 200);
-rect(45, 45, 35, 35);
-quad(105, 10, 120, 10, 120, 200, 80, 200);
-ellipse(140, 80, 40, 40);
-triangle(160, 10, 195, 200, 160, 200);
- - diff --git a/examples/basic/simplecurves.html b/examples/basic/simplecurves.html deleted file mode 100644 index cbe97d914..000000000 --- a/examples/basic/simplecurves.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - -

Processing.js

-

SimpleCurves

- -

Simple curves are drawn with simple equations. -By using numbers with values between 0 and 1 in -the equations, a series of elegant curves -are created. The numbers are then scaled to fill the screen.

- -

Original Processing.org Example: SimpleCurves
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup() {
-  size(200, 200);
-  colorMode(RGB, 100);
-  background(0);
-  noFill();
-  noLoop();
-}
-
-void draw() {
-  stroke(40);
-  beginShape();
-  for(int i=0; i<width; i++) {
-   vertex(i, singraph((float)i/width)*height);
-  }
-  endShape();
-  
-  stroke(55);
-  beginShape();
-  for(int i=0; i<width; i++) {
-   vertex(i, quad((float)i/width)*height);
-  }
-  endShape();
-  
-  stroke(70);
-  beginShape();
-  for(int i=0; i<width; i++) {
-   vertex(i, quadHump((float)i/width)*height);
-  }
-  endShape();
-  
-  stroke(85);
-  beginShape();
-  for(int i=0; i<width; i++) {
-   vertex(i, hump((float)i/width)*height);
-  }
-  endShape();
-  
-  stroke(100);
-  beginShape();
-  for(int i=0; i<width; i++) {
-   vertex(i, squared((float)i/width)*height);
-  }
-  endShape();
-}
-
-float singraph(float sa) {
-  sa = (sa - 0.5) * 1.0; //scale from -1 to 1
-  sa = sin(sa*PI)/2 + 0.5;
-  return sa;
-}
-
-float quad(float sa) {
-  return sa*sa*sa*sa;
-}
-
-float quadHump(float sa) {
-  sa = (sa - 0.5); //scale from -2 to 2
-  sa = sa*sa*sa*sa * 16;
-  return sa;
-}
-
-float hump(float sa) {
-  sa = (sa - 0.5) * 2; //scale from -2 to 2
-  sa = sa*sa;
-  if(sa > 1) { sa = 1; }
-  return 1-sa;
-}
-
-float squared(float sa) {
-  sa = sa*sa;
-  return sa;
-}
- - diff --git a/examples/basic/sine.html b/examples/basic/sine.html deleted file mode 100644 index 82f4747f7..000000000 --- a/examples/basic/sine.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - -

Processing.js

-

Sine

- -

Smoothly scaling size with the sin() function.

- -

Original Processing.org Example: Sine
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float spin = 0.0; 
-float diameter = 84.0; 
-float angle;
-
-float angle_rot; 
-int rad_points = 90;
-
-void setup() 
-{
-  size(200, 200);
-  noStroke();
-  smooth();
-}
-
-void draw() 
-{ 
-  background(153);
-  
-  translate(130, 65);
-  
-  fill(255);
-  ellipse(0, 0, 16, 16);
-  
-  angle_rot = 0;
-  fill(51);
-
-  for(int i=0; i<5; i++) {
-    pushMatrix();
-    rotate(angle_rot + -45);
-    ellipse(-116, 0, diameter, diameter);
-    popMatrix();
-    angle_rot += PI*2/5;
-  }
-
-  diameter = 34 * sin(angle) + 168;
-  
-  angle += 0.02;
-  if (angle > TWO_PI) { angle = 0; }
-}
- - diff --git a/examples/basic/sinecosine.html b/examples/basic/sinecosine.html deleted file mode 100644 index 10ffc683b..000000000 --- a/examples/basic/sinecosine.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - -

Processing.js

-

SineCosine

- -

Linear movement with sin() and cos(). -Numbers between 0 and PI*2 (TWO_PI which is roughly 6.28) -are put into these functions and numbers between -1 and 1 are -returned. These values are then scaled to produce larger movements.

- -

Original Processing.org Example: SineCosine
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int i = 45;
-int j = 225; 
-float pos1 = 0; 
-float pos2 = 0; 
-float pos3 = 0; 
-float pos4 = 0;
-int sc = 40;
-
-void setup() 
-{
-  size(200, 200);
-  noStroke();
-  smooth();
-}
-
-void draw() 
-{
-  background(0);
-  
-  fill(51);
-  rect(60, 60, 80, 80);
-
-  fill(255);
-  ellipse(pos1, 36, 32, 32);
-
-  fill(153);
-  ellipse(36, pos2, 32, 32);
-
-  fill(255);
-  ellipse(pos3, 164, 32, 32);
-
-  fill(153);
-  ellipse(164, pos4, 32, 32);
-
-  i += 3;
-  j -= 3;
-
-  if(i > 405) {
-    i = 45;
-    j = 225;
-  }
-
-  float ang1 = radians(i); // convert degrees to radians
-  float ang2 = radians(j); // convert degrees to radians
-  pos1 = width/2 + (sc * cos(ang1));
-  pos2 = width/2 + (sc * sin(ang1));
-  pos3 = width/2 + (sc * cos(ang2));
-  pos4 = width/2 + (sc * sin(ang2));
-}
- - diff --git a/examples/basic/sinewave.html b/examples/basic/sinewave.html deleted file mode 100644 index 74115d3dc..000000000 --- a/examples/basic/sinewave.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - -

Processing.js

-

SineWave

- -

by Daniel Shiffman. - -Render a simple sine wave.

- -

Original Processing.org Example: SineWave
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int xspacing = 8;   // How far apart should each horizontal location be spaced
-int w;              // Width of entire wave
-
-float theta = 0.0;       // Start angle at 0
-float amplitude = 75.0;  // Height of wave
-float period = 500.0;    // How many pixels before the wave repeats
-float dx;                 // Value for incrementing X, to be calculated as a function of period and xspacing
-float[] yvalues;          // Using an array to store height values for the wave (not entirely necessary)
-
-void setup() {
-  size(200,200);
-  frameRate(30);
-  colorMode(RGB,255,255,255,100);
-  smooth();
-  w = width+16;
-  dx = (TWO_PI / period) * xspacing;
-  yvalues = new float[w/xspacing];
-}
-
-void draw() {
-  background(0);
-  calcWave();
-  renderWave();
-
-}
-
-void calcWave() {
-  // Increment theta (try different values for 'angular velocity' here
-  theta += 0.02;
-
-  // For every x value, calculate a y value with sine function
-  float x = theta;
-  for (int i = 0; i < yvalues.length; i++) {
-    yvalues[i] = sin(x)*amplitude;
-    x+=dx;
-  }
-}
-
-void renderWave() {
-  // A simple way to draw the wave with an ellipse at each location
-  for (int x = 0; x < yvalues.length; x++) {
-    noStroke();
-    fill(255,50);
-    ellipseMode(CENTER);
-    ellipse(x*xspacing,width/2+yvalues[x],16,16);
-  }
-}
- - diff --git a/examples/basic/sprite.html b/examples/basic/sprite.html deleted file mode 100644 index 139a02ab6..000000000 --- a/examples/basic/sprite.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - -

Processing.js

-

Sprite

- -

by James Patterson. - -Demonstrates loading and displaying a transparent GIF image. - -Created 27 January 2003.

- -

Original Processing.org Example: Sprite
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-
-/* @pjs preload="data/teddy.gif"; */
-
-PImage teddy;
-
-float xpos;
-float ypos;
-float drag = 30.0;
-
-void setup() 
-{
-  size(200,200);
-  teddy = loadImage("data/teddy.gif");
-  xpos = width/2;
-  ypos = height/2;
-  frameRate(60);
-}
-
-void draw() 
-{ 
-  background(102);
-  
-  float difx = mouseX - xpos-teddy.width/2;
-  if(abs(difx) > 1.0) {
-    xpos = xpos + difx/drag;
-    xpos = constrain(xpos, 0, width-teddy.width);
-  }  
-  
-  float dify = mouseY - ypos-teddy.height/2;
-  if(abs(dify) > 1.0) {
-    ypos = ypos + dify/drag;
-    ypos = constrain(ypos, 0, height-teddy.height);
-  }  
-  
-  // Display the sprite at the position xpos, ypos
-  image(teddy, xpos, ypos);
-}
- - diff --git a/examples/basic/statementscomments.html b/examples/basic/statementscomments.html deleted file mode 100644 index 9e7c0bbc6..000000000 --- a/examples/basic/statementscomments.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - -

Processing.js

-

StatementsComments

- -

Statements are the elements that make up programs. -The ";" (semi-colon) symbol is used to end statements. -It is called the "statement terminator." -Comments are used for making notes to help people better understand programs. -A comment begins with two forward slashes ("//").

- -

Original Processing.org Example: StatementsComments
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// The size function is a statement that tells the computer 
-// how large to make the window.
-// Each function statement has zero or more parameters. 
-// Parameters are data passed into the function
-// and used as values for specifying what the computer will do.
-size(200, 200);
-
-// The background function is a statement that tells the computer
-// which color to make the background of the window 
-background(102);
- - diff --git a/examples/basic/storinginput.html b/examples/basic/storinginput.html deleted file mode 100644 index 53c5ea1b4..000000000 --- a/examples/basic/storinginput.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - -

Processing.js

-

StoringInput

- -

Move the mouse across the screen to change the position -of the circles. The positions of the mouse are recorded -into an array and played back every frame. Between each -frame, the newest value are added to the end of each array -and the oldest value is deleted.

- -

Original Processing.org Example: StoringInput
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int num = 60;
-float mx[] = new float[num];
-float my[] = new float[num];
-
-void setup() 
-{
-  size(200, 200);
-  smooth();
-  noStroke();
-  fill(255, 153); 
-}
-
-void draw() 
-{
-  background(51); 
-  
-  // Reads throught the entire array
-  // and shifts the values to the left
-  for(int i=1; i<num; i++) {
-    mx[i-1] = mx[i];
-    my[i-1] = my[i];
-  } 
-  // Add the new values to the end of the array
-  mx[num-1] = mouseX;
-  my[num-1] = mouseY;
-  
-  for(int i=0; i<num; i++) {
-    ellipse(mx[i], my[i], i/2, i/2);
-  }
-}
- - diff --git a/examples/basic/translate.html b/examples/basic/translate.html deleted file mode 100644 index af23df6e2..000000000 --- a/examples/basic/translate.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - -

Processing.js

-

Translate

- -

The translate() function allows objects to be moved -to any location within the window. The first parameter -sets the x-axis offset and the second parameter sets the -y-axis offset.

- -

Original Processing.org Example: Translate
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float x, y;
-float s = 40.0;
-
-void setup() 
-{
-  size(200,200);
-  noStroke();
-  frameRate(30);
-}
-
-void draw() 
-{
-  background(102);
-  
-  x = x + 0.8;
-  
-  if (x > width + s) {
-    x = -s;
-  } 
-  
-  translate(x, height/2-s/2);
-  fill(255);
-  rect(-s/2, -s/2, s, s);
-  
-  // Transforms accumulate.
-  // Notice how this rect moves twice
-  // as fast as the other, but it has
-  // the same parameter for the x-axis value
-  translate(x, s);
-  fill(0);
-  rect(-s/2, -s/2, s, s);
-}
- - diff --git a/examples/basic/transparency.html b/examples/basic/transparency.html deleted file mode 100644 index 0a0b08f33..000000000 --- a/examples/basic/transparency.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - -

Processing.js

-

Transparency

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading. -F1LT3R

- -

Move the pointer left and right across the image to change -its position. This program overlays one image over another -by modifying the alpha value of the image with the tint() function.

- -

Original Processing.org Example: Transparency
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-
-/* @pjs preload="data/construct.jpg,data/wash.jpg"; */
-
-PImage a, b;
-float offset;
-
-void setup() 
-{
-  size(200, 200);
-  a = loadImage("construct.jpg");  // Load an image into the program 
-  b = loadImage("wash.jpg");   // Load an image into the program 
-  frameRate(60);
-}
-
-void draw() 
-{ 
-  image(a, 0, 0);
-  float offsetTarget = map(mouseX, 0, width, -b.width/2 - width/2, 0);
-  offset += (offsetTarget-offset)*0.05; 
-  tint(255, 153);
-  image(b, offset, 20);
-}
- - diff --git a/examples/basic/triangleflower.html b/examples/basic/triangleflower.html deleted file mode 100644 index 4407887cb..000000000 --- a/examples/basic/triangleflower.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - -

Processing.js

-

TriangleFlower

- -

By Ira Greenberg - -Using rotate() and triangle() -functions generate a pretty -flower. Uncomment the line -// rotate(rot+=radians(spin)); -in the triBlur() function for -a nice variation.

- -

Original Processing.org Example: TriangleFlower
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-Point[]p = new Point[3];
-float shift = 1.0;
-float fade = 0;
-float fillCol = 0;
-float rot = 0;
-float spin = 0;
-
-void setup(){
-  size(200, 200);
-  background(0);
-  smooth();
-  fade = 255.0/(width/2.0/shift);
-  spin = 360.0/(width/2.0/shift);
-  p[0] = new Point(-width/2, height/2);
-  p[1] = new Point(width/2, height/2);
-  p[2] = new Point(0, -height/2);
-  noStroke();
-  translate(width/2, height/2);
-  triBlur();
-}
-
-void triBlur(){
-  fill(fillCol);
-  fillCol+=fade;
-  rotate(spin);
-  // another interesting variation: uncomment the line below 
-  // rotate(rot+=radians(spin));
-  triangle(p[0].x+=shift, p[0].y-=shift/2, p[1].x-=shift, p[1].y-=shift/2, p[2].x, p[2].y+=shift); 
-  if(p[0].x<0){
-    // recursive call
-    triBlur();
-  }
-}
- - diff --git a/examples/basic/trianglestrip.html b/examples/basic/trianglestrip.html deleted file mode 100644 index 115d16a7b..000000000 --- a/examples/basic/trianglestrip.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - -

Processing.js

-

TriangleStrip

- -

By Ira Greenberg - -Generate a closed ring using vertex() -function and beginShape(TRIANGLE_STRIP) -mode. outerRad and innerRad variables -control ring's outer/inner radii respectively. -Trig functions generate ring.

- -

Original Processing.org Example: TriangleStrip
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-background(204);
-smooth();
-
-int x = width/2;
-int y = height/2;
-int outerRad = 80;
-int innerRad = 50;
-float px = 0, py = 0, angle = 0;
-float pts = 36;
-float rot = 360.0/pts;
-
-beginShape(TRIANGLE_STRIP); 
-for (int i=0; i<pts; i++) {
-  px = x+cos(radians(angle))*outerRad;
-  py = y+sin(radians(angle))*outerRad;
-  angle+=rot;
-  vertex(px, py);
-  px = x+cos(radians(angle))*innerRad;
-  py = y+sin(radians(angle))*innerRad;
-  vertex(px, py); 
-  angle+=rot;
-}
-endShape();
- - diff --git a/examples/basic/truefalse.html b/examples/basic/truefalse.html deleted file mode 100644 index 1d6d62c32..000000000 --- a/examples/basic/truefalse.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - -

Processing.js

-

TrueFalse

- -

Boolean data is one bit of information. True or false. -It is common to use Booleans with control statements to -determine the flow of a program. In this example, when the -boolean value "x" is true, vertical black lines are drawn and when -the boolean value "x" is false, horizontal gray lines are drawn.

- -

Original Processing.org Example: TrueFalse
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-boolean x = false;
-
-size(200, 200);
-background(0);
-stroke(0);
-
-for (int i = 1; i < width; i += 2) 
-{
-  if (i < width/2) {
-    x = true;
-  } else {
-    x = false;
-  }
-  
-  if (x) {
-    stroke(255);
-    line(i, 1, i, height-1);
-  }
-  
-  if (!x) {
-    stroke(126);
-    line(width/2 , i, width-2, i);
-  }
-}
- - diff --git a/examples/basic/variables.html b/examples/basic/variables.html deleted file mode 100644 index 0d967aa72..000000000 --- a/examples/basic/variables.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - -

Processing.js

-

Variables

- -

Variables are used for storing values. In this example, changing -the values of variables 'a' and 'b' significantly change the composition.

- -

Original Processing.org Example: Variables
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-background(0);
-stroke(153);
-
-int a = 20;
-int b = 50;
-int c = a*8;
-int d = a*9;
-int e = b-a;
-int f = b*2;
-int g = f+e;
-
-line(a, f, b, g);
-line(b, e, b, g);
-line(b, e, d, c);
-line(a, e, d-e, c);
- - diff --git a/examples/basic/variablescope.html b/examples/basic/variablescope.html deleted file mode 100644 index 08ed0eda3..000000000 --- a/examples/basic/variablescope.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - -

Processing.js

-

VariableScope

- -

Variables may either have a global or local "scope". -For example, variables declared within either the -setup() or loop() functions may be only used in these -functions. Global variables, variables declared outside -of setup() and loop(), may be used anywhere within the program. -If a local variable is declared with the same name as a -global variable, the program will use the local variable to make -its calculations within the current scope. Variables may be localized -within classes, functions, and iterative statements.

- -

Original Processing.org Example: VariableScope
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int a = 20;  // Create a global variable "a"
-
-void setup() 
-{
-  size(200, 200);
-  background(51);
-  stroke(255);
-  noLoop();
-}
-
-void draw()
-{
-  // Draw a line using the global variable "a"
-  line(a, 0, a, height);
-  
-  // Create a new variable "a" local to the for() statement 
-  for(int a=50; a<80; a += 2) {
-    line(a, 0, a, height);
-  }
-  
-  // Create a new variable "a" local to the loop() method
-  int a = 100;
-  // Draw a line using the new local variable "a"
-  line(a, 0, a, height);  
-  
-  // Make a call to the custom function drawAnotherLine()
-  drawAnotherLine();
-  
-  // Make a call to the custom function setYetAnotherLine()
-  drawYetAnotherLine();
-}
-
-void drawAnotherLine() 
-{
-  // Create a new variable "a" local to this method
-  int a = 185;
-  // Draw a line using the local variable "a"
-  line(a, 0, a, height);
-}
-
-void drawYetAnotherLine() 
-{
-  // Because no new local variable "a" is set, 
-  // this lines draws using the original global
-  // variable "a" which is set to the value 20.
-  line(a+2, 0, a+2, height);
-}
- - diff --git a/examples/basic/vertices.html b/examples/basic/vertices.html deleted file mode 100644 index b3605f952..000000000 --- a/examples/basic/vertices.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - -

Processing.js

-

Vertices

- -

The beginShape() function begins recording vertices -for a shape and endShape() stops recording. -A vertex is a location in space specified by X, Y, -and sometimes Z coordinates. After calling the beginShape() function, -a series of vertex() functions must follow. -To stop drawing the shape, call the endShape() functions.

- -

Original Processing.org Example: Vertices
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-background(0);
-noFill();
-
-stroke(102);
-beginShape();
-curveVertex(168, 182);
-curveVertex(168, 182);
-curveVertex(136, 38);
-curveVertex(42, 34);
-curveVertex(64, 200);
-curveVertex(64, 200);
-endShape();
-
-stroke(51);
-beginShape(LINES);
-vertex(60, 40);
-vertex(160, 10);
-vertex(170, 150);
-vertex(60, 150);
-endShape();
-
-stroke(126);
-beginShape();
-vertex(60, 40);
-bezierVertex(160, 10, 170, 150, 60, 150);
-endShape();
-
-stroke(255);
-beginShape(POINTS);
-vertex(60, 40);
-vertex(160, 10);
-vertex(170, 150);
-vertex(60, 150);
-endShape();
- - diff --git a/examples/basic/wavegradient.html b/examples/basic/wavegradient.html deleted file mode 100644 index 376acf2c6..000000000 --- a/examples/basic/wavegradient.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - -

Processing.js

-

WaveGradient

- -

by Ira Greenberg. - -Generate a gradient along a sin() wave.

- -

Original Processing.org Example: WaveGradient
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-background(200,200,200);
-float angle = 0;
-float px = 0, py = 0;
-float amplitude = 30;
-float frequency = 0;
-float fillGap = 2.5;
-color c;
-
-for (int i =- 75; i < height+75; i++){
-  // reset angle to 0, so waves stack properly
-  angle = 0;
-  // increasing frequency causes more gaps
-  frequency+=.006;
-  for (float j=0; j<width+75; j++){
-    py = i+sin(radians(angle))*amplitude;
-    angle+=frequency;
-    c =  color(abs(py-i)*255/amplitude, 255-abs(py-i)*255/amplitude, j*(255.0/(width+50)));
-    // hack to fill gaps. Raise value of fillGap
-    // if you increase frequency
-    for (int filler = 0; filler<fillGap; filler++){
-      set(int(j-filler), int(py)-filler, c);
-      set(int(j), int(py), c);
-      set(int(j+filler), int(py)+filler, c);
-    }
-  }
-}
- - diff --git a/examples/basic/widthheight.html b/examples/basic/widthheight.html deleted file mode 100644 index 93785e6ad..000000000 --- a/examples/basic/widthheight.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - -

Processing.js

-

WidthHeight

- -

The 'width' and 'height' variables contain the width and height -of the display window as defined in the size() function.

- -

Original Processing.org Example: WidthHeight
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-background(127);
-noStroke();
-for(int i=0; i<height; i+=20) {
-  fill(0);
-  rect(0, i, width, 10);
-  fill(255);
-  rect(i, 0, 10, height);
-}
- - diff --git a/examples/basic/words.html b/examples/basic/words.html deleted file mode 100644 index 6d2816544..000000000 --- a/examples/basic/words.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - -

Processing.js

-

Words

- -

The text() function is used for writing words to the screen.

- -

Original Processing.org Example: Words
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-background(102);
-
-// Load the font. Fonts are located within the 
-// main Processing directory/folder and they
-// must be placed within the data directory
-// of your sketch for them to load
-PFont fontA = loadFont("Arial");
-
-// Set the font and its size (in units of pixels)
-textFont(fontA, 32);
-
-int x = 30;
-
-// Use fill() to change the value or color of the text
-fill(0);
-text("ichi", x, 60);
-fill(51);
-text("ni", x, 95);
-fill(204);
-text("san", x, 130);
-fill(255);
-text("shi", x, 165);
- - diff --git a/examples/custom/data/dirt.jpg b/examples/custom/data/dirt.jpg deleted file mode 100644 index 3eed59743..000000000 Binary files a/examples/custom/data/dirt.jpg and /dev/null differ diff --git a/examples/custom/data/pollockShimmering.gif b/examples/custom/data/pollockShimmering.gif deleted file mode 100644 index 9ccdb6f17..000000000 Binary files a/examples/custom/data/pollockShimmering.gif and /dev/null differ diff --git a/examples/custom/fullscreen.html b/examples/custom/fullscreen.html deleted file mode 100644 index b55a3ef57..000000000 --- a/examples/custom/fullscreen.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - Full Screen Sketch with screenWidth and screenHeight - - - - - - - diff --git a/examples/custom/index.html b/examples/custom/index.html deleted file mode 100644 index 7be7ac66d..000000000 --- a/examples/custom/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - -

Processing.js

-

Custom Demos

- -

Demonstrations built from scratch or found in the wild.

- -

Processing.org Topic Demos

- -


Custom Built

Snake
- - Molten Bar Chart
-


Found "In The Wild"

Line Intersection
- - Substrate
-

- - \ No newline at end of file diff --git a/examples/custom/intersect.html b/examples/custom/intersect.html deleted file mode 100644 index f06a88c1f..000000000 --- a/examples/custom/intersect.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - -

Processing.js

-

Line Intersections

- -

Move mouse to view line intersections.

- -

Original Example: Line Intersections
-

-
- -
int DONT_INTERSECT = 0;
-int COLLINEAR = 1;
-int DO_INTERSECT = 2;
-
-float x =0, y=0;
-
-void setup(){
-  size(320,320);
-  fill(255,0,0);
-}
-
-void draw(){
-
-  int intersected;
-
-  background(255);
-  
-  // lignes
-  stroke(0);
-  
-  // ligne fixe
-  line(20,height/2, width-20, (height/2)-20);
-  
-  // ligne en mouvement
-  line(10,10,mouseX, mouseY);
-  
-  intersected = intersect(20, height/2, width, (height/2)-20, 10, 10, mouseX, mouseY);
-  
-  // dessiner le point d'intersection
-  noStroke();
-  if (intersected == DO_INTERSECT) ellipse(x, y, 5, 5);
-
-}
-
-
-int intersect(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4){
-
-  float a1, a2, b1, b2, c1, c2;
-  float r1, r2 , r3, r4;
-  float denom, offset, num;
-
-  // Compute a1, b1, c1, where line joining points 1 and 2
-  // is "a1 x + b1 y + c1 = 0".
-  a1 = y2 - y1;
-  b1 = x1 - x2;
-  c1 = (x2 * y1) - (x1 * y2);
-
-  // Compute r3 and r4.
-  r3 = ((a1 * x3) + (b1 * y3) + c1);
-  r4 = ((a1 * x4) + (b1 * y4) + c1);
-
-  // Check signs of r3 and r4. If both point 3 and point 4 lie on
-  // same side of line 1, the line segments do not intersect.
-  if ((r3 != 0) && (r4 != 0) && same_sign(r3, r4)){
-    return DONT_INTERSECT;
-  }
-
-  // Compute a2, b2, c2
-  a2 = y4 - y3;
-  b2 = x3 - x4;
-  c2 = (x4 * y3) - (x3 * y4);
-
-  // Compute r1 and r2
-  r1 = (a2 * x1) + (b2 * y1) + c2;
-  r2 = (a2 * x2) + (b2 * y2) + c2;
-
-  // Check signs of r1 and r2. If both point 1 and point 2 lie
-  // on same side of second line segment, the line segments do
-  // not intersect.
-  if ((r1 != 0) && (r2 != 0) && (same_sign(r1, r2))){
-    return DONT_INTERSECT;
-  }
-
-  //Line segments intersect: compute intersection point.
-  denom = (a1 * b2) - (a2 * b1);
-
-  if (denom == 0) {
-    return COLLINEAR;
-  }
-
-  if (denom < 0){ 
-    offset = -denom / 2; 
-  } 
-  else {
-    offset = denom / 2 ;
-  }
-
-  // The denom/2 is to get rounding instead of truncating. It
-  // is added or subtracted to the numerator, depending upon the
-  // sign of the numerator.
-  num = (b1 * c2) - (b2 * c1);
-  if (num < 0){
-    x = (num - offset) / denom;
-  } 
-  else {
-    x = (num + offset) / denom;
-  }
-
-  num = (a2 * c1) - (a1 * c2);
-  if (num < 0){
-    y = ( num - offset) / denom;
-  } 
-  else {
-    y = (num + offset) / denom;
-  }
-
-  // lines_intersect
-  return DO_INTERSECT;
-}
-
-
-boolean same_sign(float a, float b){
-
-  return (( a * b) >= 0);
-}
- - diff --git a/examples/custom/molten.html b/examples/custom/molten.html deleted file mode 100644 index 25fa05022..000000000 --- a/examples/custom/molten.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - -

Processing.js

-

Molten Bar Chart

- -

A dynamically-generated bar chart. Move mouse to view dynamic pie chart.

- -

Molten Bar Chart
-

-
- -
int xspacing = 16;   // How far apart should each horizontal location be spaced
-int w;              // Width of entire wave
-int maxwaves = 4;   // total # of waves to add together
-int total = 0;
-
-float theta = 0.0f;
-float[] amplitude = new float[maxwaves];   // Height of wave
-float[] dx = new float[maxwaves];          // Value for incrementing X, to be calculated as a function of period and xspacing
-float[] yvalues;                           // Using an array to store height values for the wave (not entirely necessary)
-float[] last;
-
-int pos;
-int rel;
-int numLines;
-int idealLines;
-int idealSpacing;
-int targetX;
-
-void setup() {
-  size(600, 150);
-  //frameRate(24);
-  colorMode(RGB,255,255,255,100);
-  //background(0);
-  smooth();
-  w = width+16;
-
-  for (int i = 0; i < maxwaves; i++) {
-    amplitude[i] = random(20,30);
-    float period = random(100,300); // How many pixels before the wave repeats
-    dx[i] = (TWO_PI / period) * xspacing;
-  }
-
-  last = new float[maxwaves];
-  idealLines = numLines = int(w/xspacing);
-  idealSpacing = xspacing;
-  yvalues = new float[numLines];
-}
-
-void draw() {
-  pos = constrain(mouseX, 75, width-75);
-  rel = 1 - ((pos - 75) / (width - 150));
-  
-  //background(0);
-  fill(0, 10 + ((1 - rel) * 100));
-  rect(0, 0, width, height);
-  
-  //numLines = idealLines + ((1 - rel) * idealLines);
-  //xspacing = idealSpacing - (((1 - rel) * idealSpacing) / 2);
-  
-  calcWave();
-  renderWave();
-  renderChart();
-}
-
-void calcWave() {
-  // Increment theta (try different values for 'angular velocity' here
-  theta += 0.02;
-
-  // Set all height values to zero
-  for (int i = 0; i < numLines; i++) {
-    yvalues[i] = 0.0f;
-  }
-  
-  total = 0;
- 
-  // Accumulate wave height values
-  for (int j = 0; j < maxwaves; j++) {
-    float x = theta;
-    last[j] = 0;
-    
-    for (int i = 0; i < numLines; i++) {
-      // Every other wave is cosine instead of sine
-      int diff = j % 2 == 0 ? sin(x) : cos(x);
-      int add = diff*amplitude[j];
-      
-      last[j] += add;
-      
-      yvalues[i] += add;
-      
-      total += add;
-      
-      x+=dx[j]; // - (((1 - rel) * dx[j]) / 2);
-    }
-  }
-}
-
-void renderWave() {
-  noStroke();
-  
-  fill(254,60,0, 120 * rel);
-  beginShape();
-  vertex(0,height);
-  for (int x = 0; x < numLines; x++) {
-    vertex(x*xspacing,height/2+yvalues[x]+-5);
-    vertex((x*xspacing) + 10,height/2+yvalues[x]-5);
-  }
-  vertex(width,height);
-  endShape(CLOSE);
-  
-  fill(255,0,0, 120 * rel);
-  beginShape();
-  vertex(0,height);
-  for (int x = 0; x < numLines; x++) {
-    vertex(x*xspacing,height/2+yvalues[x]);
-    vertex((x*xspacing) + 10,height/2+yvalues[x]);
-  }
-  vertex(width,height);
-  endShape(CLOSE);
-  
-  //fill(255,0,0,255 - ((x/numLines)*200));
-  //rect(x*xspacing,height/2+yvalues[x],10,height*2);
-  // - ((1-rel) * 4)
-  
-  for (int x = 0; x < numLines; x++) {
-    fill(255,0,0,255 - ((x/numLines)*200));
-    rect(x*xspacing,height/2+yvalues[x],10,height*2);
-    // - ((1-rel) * 4)
-  }
-}
-
-void renderChart() {
-  int h = 0;
-  
-  for (int i=0; i
-
-
diff --git a/examples/custom/snake.html b/examples/custom/snake.html
deleted file mode 100644
index 93d2ada66..000000000
--- a/examples/custom/snake.html
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
-  
-
-

Processing.js

-

Snake

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading.

- -

A snake that follows your cursor.

- -

Snake
-

-
- -
float[] x = new float[20];
-float[] y = new float[20];
-float segLength = 10;
-
-void setup() {
-  size(320, 240);
-  smooth();
-}
-
-void draw() {
-  background(226);
-  image( loadImage("dirt.jpg"), 0, 0 );
-  dragSegment(0, mouseX - 8, mouseY - 8);
-  for(int i=0; i < x.length-1; i++) {
-    dragSegment(i+1, x[i], y[i]);
-  }
-}
-
-void dragSegment(int i, float xin, float yin) {
-  float dx = xin - x[i];
-  float dy = yin - y[i];
-  float angle = atan2(dy, dx);  
-  x[i] = xin - cos(angle) * segLength;
-  y[i] = yin - sin(angle) * segLength;
-  //stroke(23, 79, 4, 220);
-  
-  pushMatrix();
-  translate(x[i], y[i]);
-  rotate(angle);
-  
-  color c;
-  
-  if ( i % 3 == 1 )
-    c = color(0, 0, 0, 255);
-  else if ( i % 3 == 2 )
-    c = color(255, 255, 0, 255);
-  else
-    c = color(255, 0, 0, 255);
-
-  stroke( c );
-  strokeWeight(10);
-  line(0, 0, segLength, 0);
-  
-  if ( i == x.length - 1 )
-  {
-    fill( c );
-    noStroke();
-    beginShape(TRIANGLES);
-    vertex(0, 5);
-    vertex(-2 * segLength, 0);
-    vertex(0, -5);
-    endShape();
-  }
-  
-  if ( i == 0 )
-  {
-   // stroke(0, 255);
-   noStroke();
-   fill(0, 255);
-   ellipse(segLength, -2, 3, 3);
-   ellipse(segLength, 2, 3, 3);
-    //point(segLength, -2);
-    //point(segLength, 2);
-  }
-  
-  popMatrix();
-}
- - diff --git a/examples/custom/substrate.html b/examples/custom/substrate.html deleted file mode 100644 index 8b63f9234..000000000 --- a/examples/custom/substrate.html +++ /dev/null @@ -1,571 +0,0 @@ - - - - - -

Processing.js

-

Substrate

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading. -F1LT3R

- -

An artistic watercolor visualization by J. Tarbell.

- -

Original Example: Substrate
-

-
- -
// Substrate Watercolor
-// j.tarbell   June, 2004
-// Albuquerque, New Mexico
-// complexification.net
-
-// Processing 0085 Beta syntax update
-// j.tarbell   April, 2005
-
-int dimx = 250;
-int dimy = 250;
-int num = 0;
-int maxnum = 100;
-
-// grid of cracks
-int[] cgrid;
-Crack[] cracks;
-
-// color parameters
-int maxpal = 512;
-int numpal = 0;
-color[] goodcolor = new color[maxpal];
-
-// sand painters
-SandPainter[] sands;
-
-// MAIN METHODS ---------------------------------------------
-
-void setup() {
-  size(250,250,P3D);
-
-  background(255);
-  takecolor("pollockShimmering.gif");
-  
-  cgrid = new int[dimx*dimy];
-  cracks = new Crack[maxnum];
-  
-  begin();  
-}
-
-void draw() {
-  // crack all cracks
-  for (int n=0;n1000)) {
-      px = int(random(dimx));
-      py = int(random(dimy));
-      if (cgrid[py*dimx+px]<10000) {
-        found=true;
-      }
-    }
-    
-    if (found) {
-      // start crack
-      int a = cgrid[py*dimx+px];
-      if (random(100)<50) {
-        a-=90+int(random(-2,2.1));
-      } else {
-        a+=90+int(random(-2,2.1));
-      }
-      startCrack(px,py,a);
-    } else {
-      //println("timeout: "+timeout);
-    }
-  }
-   
-  void startCrack(int X, int Y, int T) {
-    x=X;
-    y=Y;
-    t=T;//%360;
-    x+=0.61*cos(t*PI/180);
-    y+=0.61*sin(t*PI/180);  
-  }
-             
-  void move() {
-    // continue cracking
-    x+=0.42*cos(t*PI/180);
-    y+=0.42*sin(t*PI/180); 
-    
-    // bound check
-    float z = 0.33;
-    int cx = int(x+random(-z,z));  // add fuzz
-    int cy = int(y+random(-z,z));
-    
-    // draw sand painter
-    regionColor();
-    
-    // draw black crack
-    stroke(0,85);
-    point(x+random(-z,z),y+random(-z,z));
-    
-    
-    if ((cx>=0) && (cx=0) && (cy10000) || (abs(cgrid[cy*dimx+cx]-t)<5)) {
-        // continue cracking
-        cgrid[cy*dimx+cx]=int(t);
-      } else if (abs(cgrid[cy*dimx+cx]-t)>2) {
-        // crack encountered (not self), stop cracking
-        findStart();
-        //makeCrack();
-      }
-    } else {
-      // out of bounds, stop cracking
-      findStart();
-      //makeCrack();
-    }
-  }
-  
-  void regionColor() {
-    // start checking one step away
-    float rx=x;
-    float ry=y;
-    boolean openspace=true;
-    
-    // find extents of open space
-    while (openspace) {
-      // move perpendicular to crack
-      rx+=0.81*sin(t*PI/180);
-      ry-=0.81*cos(t*PI/180);
-      int cx = int(rx);
-      int cy = int(ry);
-      if ((cx>=0) && (cx=0) && (cy10000) {
-          // space is open
-        } else {
-          openspace=false;
-        }
-      } else {
-        openspace=false;
-      }
-    }
-    // draw sand painter
-    sp.render(rx,ry,x,y);
-  }
-}
-
-
-class SandPainter {
-
-  color c;
-  float g;
-
-  SandPainter() {
-
-    c = somecolor();
-    g = random(0.01,0.1);
-  }
-  void render(float x, float y, float ox, float oy) {
-    // modulate gain
-    g+=random(-0.050,0.050);
-    float maxg = 1.0;
-    if (g<0) g=0;
-    if (g>maxg) g=maxg;
-    
-    // calculate grains by distance
-    //int grains = int(sqrt((ox-x)*(ox-x)+(oy-y)*(oy-y)));
-    int grains = 64;
-
-    // lay down grains of sand (transparent pixels)
-    float w = g/(grains-1);
-    for (int i=0;i
-
-
diff --git a/examples/js/3d.html b/examples/js/3d.html
deleted file mode 100644
index aa3f9ec11..000000000
--- a/examples/js/3d.html
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-  
-  
-

Processing.js

-

Advanced processing.js via JavaScript

- -

Processing.js Cube

-

Note: runs via a web server or requres local files access in the web browser settings.

-

Converted to the JavaScript language from the Processing code
-Original souce code : TexturedCube by Dave Bollinger.
- -

- - - -
- -

-
-
-
diff --git a/examples/js/compile-lib.html b/examples/js/compile-lib.html
deleted file mode 100644
index 06a510632..000000000
--- a/examples/js/compile-lib.html
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-  
-  
-

Processing.js

-

Compiling Java code to be used as a library for the web page sketches.

- -

Let's say we have the following library:

-

-

-public class TheLib {
-  public String greet() {
-    return "Hello, world";
-  }
-}
- -

And the sketch to use it with:

-
background(0);
-TheLib lib = new TheLib();
-String s = lib.greet();
-text(s,10,40);
- -

Load the library code as a string and call the Processing.compile method. The returned object is a Processing.Sketch object. -Its sourceCode property returns the code for the "attach" function.

-
var attachCode = Processing.compile(libraryCode).sourceCode;
- -

This code can be used to call in the form attachFunction(Processing.prototype). -That will let all library classes and methods be registered with the default scope.

- -

So the library source code will look like:

-

-  
-

The code above that can be used as a stanalone js-file and be loaded in the <head> after the processing.js.

-

The sketch execution results:

-

-

- - - - \ No newline at end of file diff --git a/examples/js/imagecache-js.html b/examples/js/imagecache-js.html deleted file mode 100644 index 6d38c54a7..000000000 --- a/examples/js/imagecache-js.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - -

Processing.js

-

Adding existing images to a Sketch's ImageCache

- -
-

Example 1. Loading an image from the DOM

-

Sometimes a developer wants to share images between a Processing sketch and the web page in which it lives. This might happen in a complex page where images are loaded at different times, and a sketch runs after the images are loaded by the web page itself. In such cases, it is helpful to be able to pass a preloaded image into the sketch's image cache, so it won't get loaded a second time before the sketch starts. The following example demonstrates this, by loading an image into the DOM by means of the img element, and then creating a Processing Sketch object in JavaScript that uses this image, without doing any other preloading.

-

Image Element

-

Processing Sketch in Canvas

- - -

-
-
- -
-

Example 2. Loading an image using only JavaScript

-

This example is similar to Example 1, but bypasses the DOM altogether and creates an image using JavaScript. This technique is useful when you want to background load images, but not display them yet.

- - - -

-
-
- - diff --git a/examples/js/instancelib.js b/examples/js/instancelib.js deleted file mode 100644 index 83f7499a5..000000000 --- a/examples/js/instancelib.js +++ /dev/null @@ -1,30 +0,0 @@ -// Instance libraries are useful in case if there is a need -// in knowing the processing instance - -// Registering browser utility library -Processing.registerLibrary("browser", { - attach: function(p) { - p.clientWidth = 0; - p.clientHeight = 0; - - p.windowResized = function() { }; - - function updateSize() { - p.clientWidth = document.body.clientWidth; - p.clientHeight = document.body.clientHeight; - } - - p.externals.onresize = function() { - updateSize(); - p.windowResized(); - }; - - window.addEventListener("resize", p.externals.onresize, false); - updateSize(); - }, - detach: function(p) { - window.removeEventListener("resize", p.externals.onresize, false); - delete p.externals.onresize; - }, - exports : [ "clientWidth", "clientHeight", "windowResized" ] -}); diff --git a/examples/js/libraries.html b/examples/js/libraries.html deleted file mode 100644 index ae02ac859..000000000 --- a/examples/js/libraries.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - -

Processing.js

-

processing.js libraries

- -

Static and Instance Libraries

- -

- - -

- -

-
-
-
diff --git a/examples/js/pjs.png b/examples/js/pjs.png
deleted file mode 100644
index 8c3dbe3f9..000000000
Binary files a/examples/js/pjs.png and /dev/null differ
diff --git a/examples/js/simple.html b/examples/js/simple.html
deleted file mode 100644
index d85514870..000000000
--- a/examples/js/simple.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-  
-  
-

Processing.js

-

Simple processing.js via JavaScript

- -

Clock

- -

- -

- - - -
- -

-
-
-
diff --git a/examples/js/simpler.html b/examples/js/simpler.html
deleted file mode 100644
index d5e089d61..000000000
--- a/examples/js/simpler.html
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-  
-  
-

Processing.js

-

Simple processing.js via JavaScript

- -

Clock

- -

- -

- - - -
- -

-
-
-
diff --git a/examples/js/sketch-event-hooks.html b/examples/js/sketch-event-hooks.html
deleted file mode 100644
index 9b46a502a..000000000
--- a/examples/js/sketch-event-hooks.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-  
-  
-

Processing.js

-

Sketch Event Hooks via JavaScript

- -

Clock

- -

- -

-
- - - - -
-
Sketch Events:
- - - -

-
-
-
diff --git a/examples/js/staticlib.js b/examples/js/staticlib.js
deleted file mode 100644
index 219602b06..000000000
--- a/examples/js/staticlib.js
+++ /dev/null
@@ -1,24 +0,0 @@
-// Simple classes and functions can be declared in a static library
-
-// Registering complex numbers library
-Processing.registerLibrary("complex", {
-  init: function(defaultScope) {
-    function ComplexNumber(re, im) {
-      this.re = re;
-      this.im = im || 0;
-    }
-    ComplexNumber.prototype.add = function(other) {
-      return new ComplexNumber(this.re + other.re, this.im + other.im);
-    };
-    ComplexNumber.prototype.mul = function(other) {
-      return new ComplexNumber(this.re * other.re - this.im * other.im, 
-        this.im * other.re + this.re * other.im);
-    };
-    // etc
-    ComplexNumber.prototype.toString = function(other) {
-      return this.re + " " + this.im + "i";
-    };
-    // attaching class to the default scope
-    defaultScope.ComplexNumber = ComplexNumber;
-  }
-});
diff --git a/examples/screens/Picture 14.png b/examples/screens/Picture 14.png
deleted file mode 100644
index 018cfffdd..000000000
Binary files a/examples/screens/Picture 14.png and /dev/null differ
diff --git a/examples/screens/Picture 15.png b/examples/screens/Picture 15.png
deleted file mode 100644
index 7aed39afc..000000000
Binary files a/examples/screens/Picture 15.png and /dev/null differ
diff --git a/examples/screens/Picture 16.png b/examples/screens/Picture 16.png
deleted file mode 100644
index 55ee2af24..000000000
Binary files a/examples/screens/Picture 16.png and /dev/null differ
diff --git a/examples/screens/Picture 17.png b/examples/screens/Picture 17.png
deleted file mode 100644
index a34fe253d..000000000
Binary files a/examples/screens/Picture 17.png and /dev/null differ
diff --git a/examples/screens/Picture 18.png b/examples/screens/Picture 18.png
deleted file mode 100644
index f9511eaa8..000000000
Binary files a/examples/screens/Picture 18.png and /dev/null differ
diff --git a/examples/screens/Picture 19.png b/examples/screens/Picture 19.png
deleted file mode 100644
index 286d13241..000000000
Binary files a/examples/screens/Picture 19.png and /dev/null differ
diff --git a/examples/screens/Picture 20.png b/examples/screens/Picture 20.png
deleted file mode 100644
index 20f1b5d45..000000000
Binary files a/examples/screens/Picture 20.png and /dev/null differ
diff --git a/examples/screens/Picture 21.png b/examples/screens/Picture 21.png
deleted file mode 100644
index 8b1b864ae..000000000
Binary files a/examples/screens/Picture 21.png and /dev/null differ
diff --git a/examples/screens/Picture 22.png b/examples/screens/Picture 22.png
deleted file mode 100644
index 4b05cc95f..000000000
Binary files a/examples/screens/Picture 22.png and /dev/null differ
diff --git a/examples/screens/Picture 23.png b/examples/screens/Picture 23.png
deleted file mode 100644
index 36b61dd31..000000000
Binary files a/examples/screens/Picture 23.png and /dev/null differ
diff --git a/examples/screens/Picture 24.png b/examples/screens/Picture 24.png
deleted file mode 100644
index fcf04283e..000000000
Binary files a/examples/screens/Picture 24.png and /dev/null differ
diff --git a/examples/screens/Picture 25.png b/examples/screens/Picture 25.png
deleted file mode 100644
index d75726b94..000000000
Binary files a/examples/screens/Picture 25.png and /dev/null differ
diff --git a/examples/screens/Picture 26.png b/examples/screens/Picture 26.png
deleted file mode 100644
index ac93be081..000000000
Binary files a/examples/screens/Picture 26.png and /dev/null differ
diff --git a/examples/screens/Picture 27.png b/examples/screens/Picture 27.png
deleted file mode 100644
index d52e11730..000000000
Binary files a/examples/screens/Picture 27.png and /dev/null differ
diff --git a/examples/screens/Picture 28.png b/examples/screens/Picture 28.png
deleted file mode 100644
index 69b07e10d..000000000
Binary files a/examples/screens/Picture 28.png and /dev/null differ
diff --git a/examples/screens/Picture 29.png b/examples/screens/Picture 29.png
deleted file mode 100644
index accb0f21f..000000000
Binary files a/examples/screens/Picture 29.png and /dev/null differ
diff --git a/examples/screens/Picture 30.png b/examples/screens/Picture 30.png
deleted file mode 100644
index 318ae2fee..000000000
Binary files a/examples/screens/Picture 30.png and /dev/null differ
diff --git a/examples/screens/Picture 31.png b/examples/screens/Picture 31.png
deleted file mode 100644
index debfcdf3d..000000000
Binary files a/examples/screens/Picture 31.png and /dev/null differ
diff --git a/examples/screens/Picture 32.png b/examples/screens/Picture 32.png
deleted file mode 100644
index 31f510413..000000000
Binary files a/examples/screens/Picture 32.png and /dev/null differ
diff --git a/examples/screens/Picture 33.png b/examples/screens/Picture 33.png
deleted file mode 100644
index cb27def82..000000000
Binary files a/examples/screens/Picture 33.png and /dev/null differ
diff --git a/examples/screens/Picture 34.png b/examples/screens/Picture 34.png
deleted file mode 100644
index 10e12ea16..000000000
Binary files a/examples/screens/Picture 34.png and /dev/null differ
diff --git a/examples/screens/Picture 35.png b/examples/screens/Picture 35.png
deleted file mode 100644
index b4d29718f..000000000
Binary files a/examples/screens/Picture 35.png and /dev/null differ
diff --git a/examples/screens/Picture 36.png b/examples/screens/Picture 36.png
deleted file mode 100644
index e67f82e4c..000000000
Binary files a/examples/screens/Picture 36.png and /dev/null differ
diff --git a/examples/screens/Picture 37.png b/examples/screens/Picture 37.png
deleted file mode 100644
index 7c2b8b917..000000000
Binary files a/examples/screens/Picture 37.png and /dev/null differ
diff --git a/examples/screens/Picture 38.png b/examples/screens/Picture 38.png
deleted file mode 100644
index 14cfb7b3a..000000000
Binary files a/examples/screens/Picture 38.png and /dev/null differ
diff --git a/examples/screens/Picture 39.png b/examples/screens/Picture 39.png
deleted file mode 100644
index 88ff987d3..000000000
Binary files a/examples/screens/Picture 39.png and /dev/null differ
diff --git a/examples/screens/Picture 40.png b/examples/screens/Picture 40.png
deleted file mode 100644
index 64436d5e3..000000000
Binary files a/examples/screens/Picture 40.png and /dev/null differ
diff --git a/examples/screens/Picture 41.png b/examples/screens/Picture 41.png
deleted file mode 100644
index 37e26518b..000000000
Binary files a/examples/screens/Picture 41.png and /dev/null differ
diff --git a/examples/screens/Picture 42.png b/examples/screens/Picture 42.png
deleted file mode 100644
index 0c1ff6d82..000000000
Binary files a/examples/screens/Picture 42.png and /dev/null differ
diff --git a/examples/screens/Picture 43.png b/examples/screens/Picture 43.png
deleted file mode 100644
index 3e6d5386b..000000000
Binary files a/examples/screens/Picture 43.png and /dev/null differ
diff --git a/examples/screens/Picture 44.png b/examples/screens/Picture 44.png
deleted file mode 100644
index 8bc56e30f..000000000
Binary files a/examples/screens/Picture 44.png and /dev/null differ
diff --git a/examples/screens/Picture 45.png b/examples/screens/Picture 45.png
deleted file mode 100644
index 8534dcaa1..000000000
Binary files a/examples/screens/Picture 45.png and /dev/null differ
diff --git a/examples/screens/Picture 46.png b/examples/screens/Picture 46.png
deleted file mode 100644
index 83181552d..000000000
Binary files a/examples/screens/Picture 46.png and /dev/null differ
diff --git a/examples/screens/Picture 47.png b/examples/screens/Picture 47.png
deleted file mode 100644
index 25247f9ec..000000000
Binary files a/examples/screens/Picture 47.png and /dev/null differ
diff --git a/examples/screens/Picture 48.png b/examples/screens/Picture 48.png
deleted file mode 100644
index 95c165fd3..000000000
Binary files a/examples/screens/Picture 48.png and /dev/null differ
diff --git a/examples/screens/Picture 49.png b/examples/screens/Picture 49.png
deleted file mode 100644
index 471824a29..000000000
Binary files a/examples/screens/Picture 49.png and /dev/null differ
diff --git a/examples/screens/Picture 50.png b/examples/screens/Picture 50.png
deleted file mode 100644
index e231047e0..000000000
Binary files a/examples/screens/Picture 50.png and /dev/null differ
diff --git a/examples/screens/Picture 51.png b/examples/screens/Picture 51.png
deleted file mode 100644
index 0fb31529e..000000000
Binary files a/examples/screens/Picture 51.png and /dev/null differ
diff --git a/examples/screens/Picture 52.png b/examples/screens/Picture 52.png
deleted file mode 100644
index 9908b88bd..000000000
Binary files a/examples/screens/Picture 52.png and /dev/null differ
diff --git a/examples/seneca/Processing.reload/index.html b/examples/seneca/Processing.reload/index.html
deleted file mode 100755
index b71de7b99..000000000
--- a/examples/seneca/Processing.reload/index.html
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-  
-    Processing.reload() demonstrator
-    
-    
-    
-  
-  
-    

Processing.reload()

- -

This example shows the use of Processing.reload(), - used to tell Processing to rescan the DOM for sketches - that should be loaded after DOM manipulations such as - swapping content in/out. Sketches are unloaded after - calling sketch.exit() on them, and their sketch bindings - are removed from Processing's instances list.

- -
    <script type="text/javascript">
-      function swap_content() {
-        var html = "<... ... ...>";
-        document.getElementById('content').innerHTML = html;
-        Processing.reload();
-      }
-    </script>
-    <input type="button" onclick="swap_content()">
- -
-

sketch 1

- - -

sketch 2

- - -

sketch 3

- -
- -

Press the button to swap the content for three different sketches

- - - \ No newline at end of file diff --git a/examples/seneca/Processing.reload/sketch1.pde b/examples/seneca/Processing.reload/sketch1.pde deleted file mode 100755 index 721f578d3..000000000 --- a/examples/seneca/Processing.reload/sketch1.pde +++ /dev/null @@ -1 +0,0 @@ -text("1",50,50); \ No newline at end of file diff --git a/examples/seneca/Processing.reload/sketch2.pde b/examples/seneca/Processing.reload/sketch2.pde deleted file mode 100755 index 8b28f71c2..000000000 --- a/examples/seneca/Processing.reload/sketch2.pde +++ /dev/null @@ -1 +0,0 @@ -text("2",50,50); \ No newline at end of file diff --git a/examples/seneca/Processing.reload/sketch3.pde b/examples/seneca/Processing.reload/sketch3.pde deleted file mode 100755 index 1d30138c0..000000000 --- a/examples/seneca/Processing.reload/sketch3.pde +++ /dev/null @@ -1 +0,0 @@ -text("3",50,50); \ No newline at end of file diff --git a/examples/seneca/Processing.reload/sketch4.pde b/examples/seneca/Processing.reload/sketch4.pde deleted file mode 100755 index 683c52a2a..000000000 --- a/examples/seneca/Processing.reload/sketch4.pde +++ /dev/null @@ -1 +0,0 @@ -text("4",50,50); \ No newline at end of file diff --git a/examples/seneca/Processing.reload/sketch5.pde b/examples/seneca/Processing.reload/sketch5.pde deleted file mode 100755 index f424abeb8..000000000 --- a/examples/seneca/Processing.reload/sketch5.pde +++ /dev/null @@ -1 +0,0 @@ -text("5",50,50); \ No newline at end of file diff --git a/examples/seneca/Processing.reload/sketch6.pde b/examples/seneca/Processing.reload/sketch6.pde deleted file mode 100755 index aee322fd0..000000000 --- a/examples/seneca/Processing.reload/sketch6.pde +++ /dev/null @@ -1 +0,0 @@ -text("6",50,50); \ No newline at end of file diff --git a/examples/seneca/XMLElement/menu.xml b/examples/seneca/XMLElement/menu.xml deleted file mode 100644 index fa43610e3..000000000 --- a/examples/seneca/XMLElement/menu.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Belgian Waffles - $5.95 - two of our famous Belgian Waffles with plenty of real maple syrup - 650 - - - Strawberry Belgian Waffles - $7.95 - light Belgian waffles covered with strawberrys and whipped cream - 900 - - - \ No newline at end of file diff --git a/examples/seneca/XMLElement/sites.xml b/examples/seneca/XMLElement/sites.xml deleted file mode 100644 index 167d56f72..000000000 --- a/examples/seneca/XMLElement/sites.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Processing - Processing Mobile - \ No newline at end of file diff --git a/examples/seneca/XMLElement/sites2.xml b/examples/seneca/XMLElement/sites2.xml deleted file mode 100644 index 81df77551..000000000 --- a/examples/seneca/XMLElement/sites2.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - Processing - www.processing.org - - \ No newline at end of file diff --git a/examples/seneca/XMLElement/xmlElementAddChild.html b/examples/seneca/XMLElement/xmlElementAddChild.html deleted file mode 100644 index 718bcc440..000000000 --- a/examples/seneca/XMLElement/xmlElementAddChild.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - Processing.js test of xmlElement getChildCount(), addChild(), getContent() - - - - - - - -

XMLElement Test5: getChildCount(), addChild(), getContent()

-

Source

-// The following short XML file called "sites.xml" is parsed 
-// in the code below. It must be in the project's "data" directory
-//<?xml version="1.0"?> 
-// <websites> 
-//   <site id="0" url="processing.org"> Processing</site> 
-//   <site id="1" url="mobile.processing.org"> Processing Mobile</site> 
-// </websites> 
-
-XMLElement xml;
-XMLElement child;
-
-void setup() {
-  size(200, 200);
-  xml = new XMLElement(this, "sites.xml");
-  child = new XMLElement("Processing JavaScript");
-  int numSites = xml.getChildCount();
-  println("Number of Children before add: " + numSites);
-  xml.addChild(child);
-  println("adding Processing JavaScript");
-  numSites = xml.getChildCount();
-  println("Number of Children after add: " + numSites);
-  println("Content:");
-  for (int i = 0; i < numSites; i++) {
-    XMLElement kid = xml.getChild(i);
-    String site = kid.getContent();
-    println(site);    
-  }
-  
-  
-}
-
- - - - diff --git a/examples/seneca/XMLElement/xmlElementEquals.html b/examples/seneca/XMLElement/xmlElementEquals.html deleted file mode 100755 index d3629bca0..000000000 --- a/examples/seneca/XMLElement/xmlElementEquals.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - Processing.js test of xmlElement equals() - - - -

XMLElement Test for Equality

- -

Source

-
  String xmlstring1 = "<xml test='monkey'>lalalas<b>moobles</b>ginger beer</xml>";
-  String xmlstring2 = "<xml test='monkey'>lalalas<b>moobles</b>ginger beeeer</xml>";
-  XMLElement xml1 = new XMLElement(xmlstring1);
-  XMLElement xml2 = new XMLElement(xmlstring2);
-  println("[original]\n"+xml1);
-  println("[reference]\n"+xml2);
-  println("original.toString().equals(reference.toString())? (should be false) " + xml1.toString().equals(xml2.toString()));
-  println("original.equals(reference)? (should be false) " + xml1.equals(xml2));
-  xml2 = new XMLElement(xmlstring1);
-  println("[reference]\n"+xml2);
-  println("original.toString().equals(reference.toString())? (should be true) " + xml1.toString().equals(xml2.toString()));
-  println("original.equals(reference)? (should be true) " + xml1.equals(xml2));
-  xml2 = new XMLElement(xml1.toString());
-  println("original.equals(new XMLElement(original.toString()))? (should be true) " + xml1.equals(xml2));
-
- - - - - - - diff --git a/examples/seneca/XMLElement/xmlElementGetChild.html b/examples/seneca/XMLElement/xmlElementGetChild.html deleted file mode 100644 index 674e25b96..000000000 --- a/examples/seneca/XMLElement/xmlElementGetChild.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - Processing.js test of xmlElement getChild(), getChildCount(), getIntAttribute(), getStringAttribute() and getContent() - - - - - - - -

XMLElement Test: getChild(), getChildCount(), getIntAttribute(), getStringAttribute() and getContent()

-

Source

-// The following short XML file called "sites.xml" is parsed 
-// in the code below. It must be in the project's "data" directory
-//<?xml version="1.0"?> 
-// <websites> 
-//   <site id="0" url="processing.org"> Processing</site> 
-//   <site id="1" url="mobile.processing.org"> Processing Mobile</site> 
-// </websites> 
-
-XMLElement xml;
-
-void setup() {
-  size(200, 200);
-  xml = new XMLElement(this, "sites.xml");
-  int numSites = xml.getChildCount();
-  for (int i = 0; i < numSites; i++) {
-    XMLElement kid = xml.getChild(i);
-    int id = kid.getIntAttribute("id"); 
-    String url = kid.getStringAttribute("url"); 
-    String site = kid.getContent();
-    println(id + " : " + url + " : " + site);    
-  }
-}
-
- - - - diff --git a/examples/seneca/XMLElement/xmlElementGetChildCount.html b/examples/seneca/XMLElement/xmlElementGetChildCount.html deleted file mode 100644 index f325a04c0..000000000 --- a/examples/seneca/XMLElement/xmlElementGetChildCount.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - Processing.js test of xmlElement, getChildCount() - - - - - - - -

XMLElement Test2: getChildCount

-

Source

-// The following short XML file called "sites.xml" is parsed 
-// in the code below. It must be in the project's "data" directory
-//<?xml version="1.0"?> 
-// <websites> 
-//   <site id="0" url="processing.org"> Processing</site> 
-//   <site id="1" url="mobile.processing.org"> Processing Mobile</site> 
-// </websites> 
-
-XMLElement xml;
-
-void setup() {
-  size(200, 200);
-  xml = new XMLElement(this, "sites.xml");
-  int numSites = xml.getChildCount();
-  println(numSites); // Prints "2"
-}
-
- - - - diff --git a/examples/seneca/XMLElement/xmlElementGetContent.html b/examples/seneca/XMLElement/xmlElementGetContent.html deleted file mode 100644 index 597d3c2a5..000000000 --- a/examples/seneca/XMLElement/xmlElementGetContent.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - Processing.js test of xmlElement, getChild(), getContent() - - - - - - - -

XMLElement Test3 getChild(): getChild(), getContent()

-

Source

-// The following short XML file called "sites.xml" is parsed 
-// in the code below. It must be in the project's "data" directory
-//<?xml version="1.0"?> 
-// <websites> 
-//   <site id="0" url="processing.org"> Processing</site> 
-//   <site id="1" url="mobile.processing.org"> Processing Mobile</site> 
-// </websites> 
-
-XMLElement xml;
-
-void setup() {
-  size(200, 200);
-  xml = new XMLElement(this, "sites.xml");
-  XMLElement kid = xml.getChild(0);
-  String site = kid.getContent();
-  println(site);    
-}
-
- - - - diff --git a/examples/seneca/XMLElement/xmlElementGetName.html b/examples/seneca/XMLElement/xmlElementGetName.html deleted file mode 100644 index dca125986..000000000 --- a/examples/seneca/XMLElement/xmlElementGetName.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - Processing.js test of xmlElement,getChildren(), getName() - - - - - - - -

XMLElement Test4 getChildren(): getChildren(), getName()

-

Source

-// The following short XML file called "sites.xml" is parsed 
-// in the code below. It must be in the project's "data" directory
-//<?xml version="1.0"?> 
-// <menu> 
-//  <breakfast-menu>
-//    <food>
-//      <name id="0"> Belgian Waffles</name> 
-//      <price id="1"> $5.95</price>
-//      <description id="2"> two of our famous Belgian Waffles with plenty of real maple syrup</description> 
-//      <calories id="3"> 650</calories>
-//    </food> 
-//      <food>
-//      <name id="0"> Strawberry Belgian Waffles</name> 
-//      <price id="1"> $7.95</price>
-//      <description id="2"> light Belgian waffles covered with strawberrys and whipped cream</description> 
-//      <calories id="3"> 900</calories>
-//    </food> 
-//  </breakfast-menu> 
-// </menu> 
-
-XMLElement xml;
-
-void setup() {
-  size(200, 200);
-  xml = new XMLElement(this, "menu.xml");
-  XMLElement[] kids = xml.getChildren("breakfast-menu/food");
-  for (int i=0; i < kids.length; i++) {
-    String site = kids[i].getName();
-    println(site); //prints food food
-  }
-}
-
- - - - diff --git a/examples/seneca/XMLElement/xmlElementInsertChild.html b/examples/seneca/XMLElement/xmlElementInsertChild.html deleted file mode 100644 index 8aafd4005..000000000 --- a/examples/seneca/XMLElement/xmlElementInsertChild.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - Processing.js test of xmlElement getChildCount(), insertChild(), getContent() - - - - - - - -

XMLElement Test5: getChildCount(), insertChild(), getContent()

-

Source

-// The following short XML file called "sites.xml" is parsed 
-// in the code below. It must be in the project's "data" directory
-//<?xml version="1.0"?> 
-// <websites> 
-//   <site id="0" url="processing.org"> Processing</site> 
-//   <site id="1" url="mobile.processing.org"> Processing Mobile</site> 
-// </websites> 
-
-XMLElement xml;
-XMLElement child;
-
-void setup() {
-  size(200, 200);
-  xml = new XMLElement(this, "sites.xml");
-  child = new XMLElement("Processing JavaScript");
-  int numSites = xml.getChildCount();
-  println("Number of Children before insert at index 1: " + numSites);
-  xml.insertChild(child,1);
-  println("adding Processing JavaScript");
-  numSites = xml.getChildCount();
-  println("Number of Children after add: " + numSites);
-  println("Content:");
-  for (int i = 0; i < numSites; i++) {
-    XMLElement kid = xml.getChild(i);
-    String site = kid.getContent();
-    println(site);    // prints Processing
-                      // Processing JavaScript
-                      // Processing Mobile
-  }
-}
-
- - - - diff --git a/examples/seneca/XMLElement/xmlElementListChildren.html b/examples/seneca/XMLElement/xmlElementListChildren.html deleted file mode 100644 index df92a2923..000000000 --- a/examples/seneca/XMLElement/xmlElementListChildren.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - Processing.js test of xmlElement listChildren() - - - - - - - -

XMLElement Test8: listChildren()

-

Source

-// The following short XML file called "sites.xml" is parsed 
-// in the code below. It must be in the project's "data" directory
-//<?xml version="1.0"?> 
-// <websites> 
-//  <site> 
-//   <name> Processing</name> 
-//   <url> www.processing.org</url> 
-//  </site> 
-// </websites> 
-
-XMLElement xml;
-var array[];
-void setup() {
-  size(200, 200);
-  xml = new XMLElement(this, "sites2.xml");
-  array = xml.listChildren();
-  
-  println(array);  // Prints "site"
-}
-
- - - - diff --git a/examples/seneca/XMLElement/xmlElementRemoveAttribute.html b/examples/seneca/XMLElement/xmlElementRemoveAttribute.html deleted file mode 100644 index 5821eaefb..000000000 --- a/examples/seneca/XMLElement/xmlElementRemoveAttribute.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - Processing.js test of xmlElement getChild(), getAttributeCount(), removeAttribute() - - - - - - - -

XMLElement Test5: getChildCount(), insertChild(), getContent()

-

Source

-// The following short XML file called "sites.xml" is parsed 
-// in the code below. It must be in the project's "data" directory
-//<?xml version="1.0"?> 
-// <websites> 
-//   <site id="0" url="processing.org"> Processing</site> 
-//   <site id="1" url="mobile.processing.org"> Processing Mobile</site> 
-// </websites> 
-
-XMLElement xml;
-XMLElement child;
-void setup() {
-  size(200, 200);
-  xml = new XMLElement(this, "sites.xml");
-  child = xml.getChild(0);
-  int numSites = child.getAttributeCount();
-  println("Number of first child attributes before remove: " + numSites);
-  child.removeAttribute("id");
-  numSites = child.getAttributeCount();
-  println("Number of first child attributes after remove: " + numSites);   
-  println("Does the 'id' attribute exist?: " +child.hasAttribute("id")); // prints flase;
-  println("Get url attribute: " +child.getAttribute("url", null, "anna")); // prints processing.org
-}
-
- - - - diff --git a/examples/seneca/XMLElement/xmlElementRemoveChild.html b/examples/seneca/XMLElement/xmlElementRemoveChild.html deleted file mode 100644 index 9cd77dca1..000000000 --- a/examples/seneca/XMLElement/xmlElementRemoveChild.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - Processing.js test of xmlElement removeChild() - - - - - - - -

XMLElement Test6: removeChild()

-

Source

-// The following short XML file called "sites.xml" is parsed 
-// in the code below. It must be in the project's "data" directory
-//<?xml version="1.0"?> 
-// <websites> 
-//   <site id="0" url="processing.org"> Processing</site> 
-//   <site id="1" url="mobile.processing.org"> Processing Mobile</site> 
-// </websites> 
-
-XMLElement xml;
-XMLElement child;
-void setup() {
-  size(200, 200);
-  xml = new XMLElement(this, "sites.xml");
-  child = new XMLElement("Processing Mobile");
-  int numSites = xml.getChildCount();
-  println("Number of Children before add: " + numSites);
-  xml.removeChild(child);
-  println("removing Processing Mobile");
-  numSites = xml.getChildCount();
-  println("Number of Children after remove: " + numSites);
-  println("Content:");
-  for (int i = 0; i < numSites; i++) {
-    XMLElement kid = xml.getChild(i);
-    String site = kid.getContent();
-    println(site);    //prints Processing
-
-  }
-}
-
- - - - diff --git a/examples/seneca/XMLElement/xmlElementRemoveChild2.html b/examples/seneca/XMLElement/xmlElementRemoveChild2.html deleted file mode 100644 index 2f2e898f9..000000000 --- a/examples/seneca/XMLElement/xmlElementRemoveChild2.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - Processing.js test of xmlElement removeChild() - - - - - - - -

XMLElement Test6: removeChild()

-

Source

-
-XMLElement xml;
-XMLElement child;
-void setup() {
-  size(200, 200);
-  xml = new XMLElement("<sites><site id='0' url='a'>A</site><site id='1' url='b'>B</site></sites>");
-  child = new XMLElement("<site id='1' url='b'>B</site>");
-
-  int numSites = xml.getChildCount();
-  println("Number of Children before remove: " + numSites);
-
-  println("removing "+child.getContent());
-  xml.removeChild(child);
-
-  numSites = xml.getChildCount();
-  println("Number of Children after remove: " + numSites);
-
-  println("Content:");
-  for (int i = 0; i < numSites; i++) {
-    XMLElement kid = xml.getChild(i);
-    String site = kid.getContent();
-    println(site);    
-  }
-}
-
- - - - diff --git a/examples/seneca/XMLElement/xmlElementRemoveChildAtIndex.html b/examples/seneca/XMLElement/xmlElementRemoveChildAtIndex.html deleted file mode 100644 index a71715034..000000000 --- a/examples/seneca/XMLElement/xmlElementRemoveChildAtIndex.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - Processing.js test of xmlElement removeChildAtIndex() - - - - - - - -

XMLElement Test6: removeChildAtIndex()

-

Source

-// The following short XML file called "sites.xml" is parsed 
-// in the code below. It must be in the project's "data" directory
-//<?xml version="1.0"?> 
-// <websites> 
-//   <site id="0" url="processing.org"> Processing</site> 
-//   <site id="1" url="mobile.processing.org"> Processing Mobile</site> 
-// </websites> 
-
-XMLElement xml;
-void setup() {
-  size(200, 200);
-  xml = new XMLElement(this, "sites.xml");
-  int numSites = xml.getChildCount();
-  println("Number of Children before remove: " + numSites);
-  xml.removeChildAtIndex(0);
-  println("removeChildAtIndex(0)");
-  numSites = xml.getChildCount();
-  println("Number of Children after remove: " + numSites);
-  println("Content:");
-  for (int i = 0; i < numSites; i++) {
-    XMLElement kid = xml.getChild(i);
-    String site = kid.getContent();
-    println(site);    //prints Processing Mobile
-
-  }
-}
-
- - - - diff --git a/examples/seneca/XMLElement/xmlElementSetAttribute.html b/examples/seneca/XMLElement/xmlElementSetAttribute.html deleted file mode 100644 index f32dde450..000000000 --- a/examples/seneca/XMLElement/xmlElementSetAttribute.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - Processing.js test of xmlElement getChild(), getAttributeCount(), removeAttribute() - - - - - - - -

XMLElement Test5: setAttribute(), getAttributeCount(), hasAttribute()

-

Source

-// The following short XML file called "sites.xml" is parsed 
-// in the code below. It must be in the project's "data" directory
-//<?xml version="1.0"?> 
-// <websites> 
-//   <site id="0" url="processing.org"> Processing</site> 
-//   <site id="1" url="mobile.processing.org"> Processing Mobile</site> 
-// </websites> 
-
-XMLElement xml;
-XMLAttribute atrib;
-void setup() {
-  size(200, 200);
-  xml = new XMLElement(this, "sites.xml");
-  xml.setAttribute("width", "100");
-  xml.setAttribute("height","100");
-  println("adding width and height attribute");
-  println("xml.getAttributeCount:" +xml.getAttributeCount());
-  xml.setAttribute("height","200");
-  println("this element have the attribute width:" +xml.hasAttribute("width"));
-  println("this element have the attribute height:" +xml.hasAttribute("height"));
-  println("this element have the attribute style:" +xml.hasAttribute("style"));
-}
-
- - - - diff --git a/examples/seneca/arrayCopy/arrayCopy.htm b/examples/seneca/arrayCopy/arrayCopy.htm deleted file mode 100644 index 373ffc233..000000000 --- a/examples/seneca/arrayCopy/arrayCopy.htm +++ /dev/null @@ -1,106 +0,0 @@ - - - - Processing.js test of arrayCopy() - - - - - -

- - arrayCopy() test

-

- This is a test of arrayCopy(src, srcPos, dest, destPos, length)

-

- Copies an array (or part of an array) to another array. The src array is copied to the dst array, beginning at the position specified by srcPos and into the position specified by dstPos. The number of elements to copy is determined by length. The simplified version with two arguments copies an entire array to another of the same size. It is equivalent to "arrayCopy(src, 0, dst, 0, src.length)". This function is far more efficient for copying array data than iterating through a for and copying each element.

- - - Test written by Daniel Hodgin
-

- Source Code:

-
-// 	arrayCopy example
-String[] north = { "OH", "IN", "MI"};
-String[] south = { "GA", "FL", "NC"}; 
-arrayCopy(north, 1, south, 0, 2);
-println(south);  // Prints IN, MI, NC
-
-int[] numbers = new int[3];
-numbers[0] = 90;
-numbers[1] = 150;
-numbers[2] = 30;
-int[] added = new int[3];
-arrayCopy(numbers,added);
-added[1] = added[0] + added[1]; // Sets added[1] to 240
-added[2] = added[1] + added[2]; // Sets added[2] to 270
-println(added);
-
-String[][] codes = {{"ON", "QC", "PE", "NB"}, {"FL", "NY", "TX", "CA"}};
-println(codes[0]);
-println(codes[1]);
-String[][] codes2 = {{"NS", "MN", "BC", "NF"}, {"IL", "NJ", "WY", "OH"}};
-println(codes2[0]);
-println(codes2[1]);
-String[][] combined = new String[4][4];
-arrayCopy(codes, combined);
-println(combined);
-arrayCopy(codes2, 0, combined, 2, 2);
-println(combined);
-        
-
- - diff --git a/examples/seneca/arrayCopy/arrayCopy.pjs b/examples/seneca/arrayCopy/arrayCopy.pjs deleted file mode 100644 index 6dbe072dd..000000000 --- a/examples/seneca/arrayCopy/arrayCopy.pjs +++ /dev/null @@ -1,26 +0,0 @@ -String[] north = { "OH", "IN", "MI"}; -String[] south = { "GA", "FL", "NC"}; -arrayCopy(north, 1, south, 0, 2); -println(south); // Prints IN, MI, NC - -int[] numbers = new int[3]; -numbers[0] = 90; -numbers[1] = 150; -numbers[2] = 30; -int[] added = new int[3]; -arrayCopy(numbers,added); -added[1] = added[0] + added[1]; // Sets added[1] to 240 -added[2] = added[1] + added[2]; // Sets added[2] to 270 -println(added); - -String[][] codes = {{"ON", "QC", "PE", "NB"}, {"FL", "NY", "TX", "CA"}}; -println(codes[0]); -println(codes[1]); -String[][] codes2 = {{"NS", "MN", "BC", "NF"}, {"IL", "NJ", "WY", "OH"}}; -println(codes2[0]); -println(codes2[1]); -String[][] combined = new String[4][4]; -arrayCopy(codes, combined); -println(combined); -arrayCopy(codes2, 0, combined, 2, 2); -println(combined); \ No newline at end of file diff --git a/examples/seneca/begin-endShape/2d/774.html b/examples/seneca/begin-endShape/2d/774.html deleted file mode 100644 index 5b21ff9bc..000000000 --- a/examples/seneca/begin-endShape/2d/774.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/examples/seneca/begin-endShape/2d/774.pjs b/examples/seneca/begin-endShape/2d/774.pjs deleted file mode 100644 index e09984d19..000000000 --- a/examples/seneca/begin-endShape/2d/774.pjs +++ /dev/null @@ -1,134 +0,0 @@ -void setup() { - size(220, 800); - strokeWeight(2); - beginShape(TRIANGLE_STRIP); - fill(255, 0, 0); - vertex(0, 0); - - vertex(50, 50); - vertex(100, 0); - - stroke(255, 0, 255); - fill(0, 255, 0); - vertex(150, 50); - - stroke(0, 255, 255); - fill(0, 0, 255); - vertex(200, 0); - endShape(); - - beginShape(QUAD_STRIP); - stroke(0); - fill(255, 0, 0); - vertex(0, 100); - vertex(0, 150); - vertex(50, 100); - vertex(50, 150); - - stroke(255, 0, 255); - fill(0, 255, 0); - vertex(150, 100); - vertex(150, 150); - - stroke(0, 255, 255); - fill(0, 0, 255); - vertex(200, 100); - vertex(200, 150); - endShape(); - - beginShape(TRIANGLES); - stroke(0); - fill(255, 0, 0); - vertex(0, 200); - vertex(0, 250); - vertex(50, 250); - - stroke(255,0, 255); - fill(0, 255, 0); - vertex(50, 200); - vertex(50, 250); - vertex(150, 250); - - stroke(0,255, 255); - fill(0, 0, 255); - vertex(150, 200); - vertex(150, 250); - vertex(200, 250); - endShape(); - - beginShape(QUADS); - stroke(0); - fill(255, 0, 0); - vertex(0, 300); - vertex(0, 350); - vertex(50, 350); - vertex(50, 300); - - stroke(255,0, 255); - fill(0, 255, 0); - vertex(50, 300); - vertex(50, 350); - vertex(150, 350); - vertex(150, 300); - - stroke(0,255, 255); - fill(0, 0, 255); - vertex(150, 300); - vertex(150, 350); - vertex(200, 350); - vertex(200, 300); - endShape(); - - beginShape(TRIANGLE_FAN); - stroke(0); - fill(255, 0, 0); - - vertex(100, 400); // center point - - vertex(100, 450); // south - vertex(50, 400); // west - - stroke(255, 0, 255); - fill(0, 255, 0); - vertex(100, 350); // north - - stroke(0, 255, 255); - fill(0, 0, 255); - vertex(150, 400); // east - - stroke(255, 255, 0); - fill(255, 0, 255); - vertex(100, 450); // south - endShape(); - - strokeWeight(3); - beginShape(LINES); - stroke(0); - vertex(150, 500); - - stroke(255, 0, 0); - vertex(200, 500); - - stroke(255, 0, 255); - vertex(200, 550); - - stroke(0, 255, 255); - vertex(150, 550); - endShape(); - strokeWeight(3); - beginShape(POINTS); - stroke(0); - vertex(30, 500); - - stroke(255, 0, 0); - vertex(85, 500); - - stroke(255, 0, 255); - vertex(85, 550); - - stroke(0, 255, 255); - vertex(30, 550); - endShape(); -} - - diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-lines/endShape-2dtest-lines.html b/examples/seneca/begin-endShape/2d/endShape-2dtest-lines/endShape-2dtest-lines.html deleted file mode 100644 index 22ae7f3be..000000000 --- a/examples/seneca/begin-endShape/2d/endShape-2dtest-lines/endShape-2dtest-lines.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
-size(500, 100);
-beginShape(LINES);
-vertex(20, 20);
-vertex(40, 20);
-vertex(40, 40);
-vertex(60, 40);
-vertex(60, 60);
-vertex(20, 60);
-endShape();
-
-beginShape(LINES);
-vertex(120, 20);
-vertex(140, 20);
-vertex(140, 40);
-vertex(160, 40);
-vertex(160, 60);
-//vertex(120, 60);
-endShape();
-
-beginShape(LINES);
-vertex(220, 20);
-vertex(240, 20);
-vertex(240, 40);
-vertex(260, 40);
-//vertex(260, 60);
-//vertex(220, 60);
-endShape();
-
-beginShape(LINES);
-vertex(320, 20);
-vertex(340, 20);
-vertex(340, 40);
-//vertex(360, 40);
-//vertex(360, 60);
-//vertex(320, 60);
-endShape();
-
-beginShape(LINES);
-vertex(420, 20);
-vertex(440, 20);
-//vertex(440, 40);
-//vertex(460, 40);
-//vertex(460, 60);
-//vertex(420, 60);
-endShape();
-    
- - \ No newline at end of file diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-lines/endShape-2dtest-lines.pjs b/examples/seneca/begin-endShape/2d/endShape-2dtest-lines/endShape-2dtest-lines.pjs deleted file mode 100644 index 09b2fc73d..000000000 --- a/examples/seneca/begin-endShape/2d/endShape-2dtest-lines/endShape-2dtest-lines.pjs +++ /dev/null @@ -1,46 +0,0 @@ -size(500, 100); -background(200); -beginShape(LINES); -vertex(20, 20); -vertex(40, 20); -vertex(40, 40); -vertex(60, 40); -vertex(60, 60); -vertex(20, 60); -endShape(); - -beginShape(LINES); -vertex(120, 20); -vertex(140, 20); -vertex(140, 40); -vertex(160, 40); -vertex(160, 60); -//vertex(120, 60); -endShape(); - -beginShape(LINES); -vertex(220, 20); -vertex(240, 20); -vertex(240, 40); -vertex(260, 40); -//vertex(260, 60); -//vertex(220, 60); -endShape(); - -beginShape(LINES); -vertex(320, 20); -vertex(340, 20); -vertex(340, 40); -//vertex(360, 40); -//vertex(360, 60); -//vertex(320, 60); -endShape(); - -beginShape(LINES); -vertex(420, 20); -vertex(440, 20); -//vertex(440, 40); -//vertex(460, 40); -//vertex(460, 60); -//vertex(420, 60); -endShape(); \ No newline at end of file diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-lines/p5_result.png b/examples/seneca/begin-endShape/2d/endShape-2dtest-lines/p5_result.png deleted file mode 100644 index 2d2465513..000000000 Binary files a/examples/seneca/begin-endShape/2d/endShape-2dtest-lines/p5_result.png and /dev/null differ diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-noclose/endShape-2dtest-noclose.html b/examples/seneca/begin-endShape/2d/endShape-2dtest-noclose/endShape-2dtest-noclose.html deleted file mode 100644 index b6dbce45b..000000000 --- a/examples/seneca/begin-endShape/2d/endShape-2dtest-noclose/endShape-2dtest-noclose.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
-size(500, 100);
-beginShape();
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape();
-
-beginShape();
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape();
-
-beginShape();
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape();
-
-beginShape();
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape();
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-noclose/endShape-2dtest-noclose.pjs b/examples/seneca/begin-endShape/2d/endShape-2dtest-noclose/endShape-2dtest-noclose.pjs
deleted file mode 100644
index 811d057ad..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-noclose/endShape-2dtest-noclose.pjs
+++ /dev/null
@@ -1,29 +0,0 @@
-size(500, 100);
-background(200);
-beginShape();
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape();
-
-beginShape();
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape();
-
-beginShape();
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape();
-
-beginShape();
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape();
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-noclose/p5_result.png b/examples/seneca/begin-endShape/2d/endShape-2dtest-noclose/p5_result.png
deleted file mode 100644
index da2399dc4..000000000
Binary files a/examples/seneca/begin-endShape/2d/endShape-2dtest-noclose/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-nomod/endShape-2dtest-nomod.html b/examples/seneca/begin-endShape/2d/endShape-2dtest-nomod/endShape-2dtest-nomod.html
deleted file mode 100644
index ceac0c104..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-nomod/endShape-2dtest-nomod.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 100);
-beginShape();
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape(CLOSE);
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-nomod/endShape-2dtest-nomod.pjs b/examples/seneca/begin-endShape/2d/endShape-2dtest-nomod/endShape-2dtest-nomod.pjs
deleted file mode 100644
index 0dd4a7088..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-nomod/endShape-2dtest-nomod.pjs
+++ /dev/null
@@ -1,29 +0,0 @@
-size(500, 100);
-background(200);
-beginShape();
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape(CLOSE);
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-nomod/p5_result.png b/examples/seneca/begin-endShape/2d/endShape-2dtest-nomod/p5_result.png
deleted file mode 100644
index 079ef25f1..000000000
Binary files a/examples/seneca/begin-endShape/2d/endShape-2dtest-nomod/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-nomodnofill/endShape-2dtest-nomodnofill.html b/examples/seneca/begin-endShape/2d/endShape-2dtest-nomodnofill/endShape-2dtest-nomodnofill.html
deleted file mode 100644
index 37e324b8f..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-nomodnofill/endShape-2dtest-nomodnofill.html
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 100);
-background(200);
-nofill();
-beginShape();
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape(CLOSE);
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-nomodnofill/endShape-2dtest-nomodnofill.pjs b/examples/seneca/begin-endShape/2d/endShape-2dtest-nomodnofill/endShape-2dtest-nomodnofill.pjs
deleted file mode 100644
index 84fd5d48b..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-nomodnofill/endShape-2dtest-nomodnofill.pjs
+++ /dev/null
@@ -1,30 +0,0 @@
-size(500, 100);
-background(200);
-noFill();
-beginShape();
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape(CLOSE);
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-nomodnofill/p5_result.png b/examples/seneca/begin-endShape/2d/endShape-2dtest-nomodnofill/p5_result.png
deleted file mode 100644
index fe72977bb..000000000
Binary files a/examples/seneca/begin-endShape/2d/endShape-2dtest-nomodnofill/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-points/endShape-2dtest-points.html b/examples/seneca/begin-endShape/2d/endShape-2dtest-points/endShape-2dtest-points.html
deleted file mode 100644
index 8e64b70fb..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-points/endShape-2dtest-points.html
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 100);
-background(200);
-beginShape(POINTS);
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape(CLOSE);
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-points/endShape-2dtest-points.pjs b/examples/seneca/begin-endShape/2d/endShape-2dtest-points/endShape-2dtest-points.pjs
deleted file mode 100644
index 85085d455..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-points/endShape-2dtest-points.pjs
+++ /dev/null
@@ -1,29 +0,0 @@
-size(500, 100);
-background(200);
-beginShape(POINTS);
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape(CLOSE);
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-points/p5_result.png b/examples/seneca/begin-endShape/2d/endShape-2dtest-points/p5_result.png
deleted file mode 100644
index 7cd8001d8..000000000
Binary files a/examples/seneca/begin-endShape/2d/endShape-2dtest-points/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-polygon/endShape-2dtest-polygon.html b/examples/seneca/begin-endShape/2d/endShape-2dtest-polygon/endShape-2dtest-polygon.html
deleted file mode 100644
index 7085c37b4..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-polygon/endShape-2dtest-polygon.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 100);
-background(200);
-beginShape();
-vertex(20, 20);
-vertex(40, 20);
-vertex(40, 40);
-vertex(60, 40);
-vertex(60, 60);
-vertex(20, 60);
-endShape(CLOSE);
-
-beginShape();
-vertex(120, 20);
-vertex(140, 20);
-vertex(140, 40);
-vertex(160, 40);
-vertex(160, 60);
-//vertex(120, 60);
-endShape(CLOSE);
-
-beginShape();
-vertex(220, 20);
-vertex(240, 20);
-vertex(240, 40);
-vertex(260, 40);
-//vertex(260, 60);
-//vertex(220, 60);
-endShape(CLOSE);
-
-beginShape();
-vertex(320, 20);
-vertex(340, 20);
-vertex(340, 40);
-//vertex(360, 40);
-//vertex(360, 60);
-//vertex(320, 60);
-endShape(CLOSE);
-
-beginShape();
-vertex(420, 20);
-vertex(440, 20);
-//vertex(440, 40);
-//vertex(460, 40);
-//vertex(460, 60);
-//vertex(420, 60);
-endShape(CLOSE);
-    
- - \ No newline at end of file diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-polygon/endShape-2dtest-polygon.pjs b/examples/seneca/begin-endShape/2d/endShape-2dtest-polygon/endShape-2dtest-polygon.pjs deleted file mode 100644 index dc41e5dec..000000000 --- a/examples/seneca/begin-endShape/2d/endShape-2dtest-polygon/endShape-2dtest-polygon.pjs +++ /dev/null @@ -1,46 +0,0 @@ -size(500, 100); -background(200); -beginShape(); -vertex(20, 20); -vertex(40, 20); -vertex(40, 40); -vertex(60, 40); -vertex(60, 60); -vertex(20, 60); -endShape(CLOSE); - -beginShape(); -vertex(120, 20); -vertex(140, 20); -vertex(140, 40); -vertex(160, 40); -vertex(160, 60); -//vertex(120, 60); -endShape(CLOSE); - -beginShape(); -vertex(220, 20); -vertex(240, 20); -vertex(240, 40); -vertex(260, 40); -//vertex(260, 60); -//vertex(220, 60); -endShape(CLOSE); - -beginShape(); -vertex(320, 20); -vertex(340, 20); -vertex(340, 40); -//vertex(360, 40); -//vertex(360, 60); -//vertex(320, 60); -endShape(CLOSE); - -beginShape(); -vertex(420, 20); -vertex(440, 20); -//vertex(440, 40); -//vertex(460, 40); -//vertex(460, 60); -//vertex(420, 60); -endShape(CLOSE); \ No newline at end of file diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-polygon/p5_result.png b/examples/seneca/begin-endShape/2d/endShape-2dtest-polygon/p5_result.png deleted file mode 100644 index 72974d7c3..000000000 Binary files a/examples/seneca/begin-endShape/2d/endShape-2dtest-polygon/p5_result.png and /dev/null differ diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-quads/endShape-2dtest-quads.html b/examples/seneca/begin-endShape/2d/endShape-2dtest-quads/endShape-2dtest-quads.html deleted file mode 100644 index bd39daafa..000000000 --- a/examples/seneca/begin-endShape/2d/endShape-2dtest-quads/endShape-2dtest-quads.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
-size(500, 200);
-background(200);
-beginShape(QUADS);
-vertex(30, 20);
-vertex(30, 75);
-vertex(50, 75);
-vertex(50, 20);
-vertex(65, 20);
-vertex(65, 75);
-vertex(85, 75);
-vertex(85, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(130, 20);
-vertex(130, 75);
-vertex(150, 75);
-vertex(150, 20);
-vertex(165, 20);
-vertex(165, 75);
-vertex(185, 75);
-//vertex(185, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 20);
-vertex(230, 75);
-vertex(250, 75);
-vertex(250, 20);
-vertex(265, 20);
-//vertex(265, 75);
-vertex(285, 75);
-vertex(285, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 20);
-vertex(330, 75);
-vertex(350, 75);
-//vertex(350, 20);
-vertex(365, 20);
-vertex(365, 75);
-vertex(385, 75);
-vertex(385, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(430, 20);
-//vertex(430, 75);
-vertex(450, 75);
-vertex(450, 20);
-vertex(465, 20);
-vertex(465, 75);
-vertex(485, 75);
-vertex(485, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(30, 120);
-vertex(30, 175);
-vertex(50, 175);
-vertex(50, 120);
-vertex(65, 120);
-vertex(65, 175);
-//vertex(85, 175);
-//vertex(85, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(130, 120);
-vertex(130, 175);
-vertex(150, 175);
-vertex(150, 120);
-vertex(165, 120);
-//vertex(165, 175);
-//vertex(185, 175);
-//vertex(185, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 120);
-vertex(230, 175);
-vertex(250, 175);
-vertex(250, 120);
-//vertex(265, 120);
-//vertex(265, 175);
-//vertex(285, 175);
-//vertex(285, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 120);
-vertex(330, 175);
-vertex(350, 175);
-//vertex(350, 120);
-//vertex(365, 120);
-//vertex(365, 175);
-//vertex(385, 175);
-//vertex(385, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(430, 120);
-vertex(430, 175);
-//vertex(450, 175);
-//vertex(450, 120);
-//vertex(465, 120);
-//vertex(465, 175);
-//vertex(485, 175);
-//vertex(485, 120);
-endShape();
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-quads/endShape-2dtest-quads.pjs b/examples/seneca/begin-endShape/2d/endShape-2dtest-quads/endShape-2dtest-quads.pjs
deleted file mode 100644
index a0a1812fc..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-quads/endShape-2dtest-quads.pjs
+++ /dev/null
@@ -1,111 +0,0 @@
-size(500, 200);
-background(200);
-beginShape(QUADS);
-vertex(30, 20);
-vertex(30, 75);
-vertex(50, 75);
-vertex(50, 20);
-vertex(65, 20);
-vertex(65, 75);
-vertex(85, 75);
-vertex(85, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(130, 20);
-vertex(130, 75);
-vertex(150, 75);
-vertex(150, 20);
-vertex(165, 20);
-vertex(165, 75);
-vertex(185, 75);
-//vertex(185, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 20);
-vertex(230, 75);
-vertex(250, 75);
-vertex(250, 20);
-vertex(265, 20);
-//vertex(265, 75);
-vertex(285, 75);
-vertex(285, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 20);
-vertex(330, 75);
-vertex(350, 75);
-//vertex(350, 20);
-vertex(365, 20);
-vertex(365, 75);
-vertex(385, 75);
-vertex(385, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(430, 20);
-//vertex(430, 75);
-vertex(450, 75);
-vertex(450, 20);
-vertex(465, 20);
-vertex(465, 75);
-vertex(485, 75);
-vertex(485, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(30, 120);
-vertex(30, 175);
-vertex(50, 175);
-vertex(50, 120);
-vertex(65, 120);
-vertex(65, 175);
-//vertex(85, 175);
-//vertex(85, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(130, 120);
-vertex(130, 175);
-vertex(150, 175);
-vertex(150, 120);
-vertex(165, 120);
-//vertex(165, 175);
-//vertex(185, 175);
-//vertex(185, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 120);
-vertex(230, 175);
-vertex(250, 175);
-vertex(250, 120);
-//vertex(265, 120);
-//vertex(265, 175);
-//vertex(285, 175);
-//vertex(285, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 120);
-vertex(330, 175);
-vertex(350, 175);
-//vertex(350, 120);
-//vertex(365, 120);
-//vertex(365, 175);
-//vertex(385, 175);
-//vertex(385, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(430, 120);
-vertex(430, 175);
-//vertex(450, 175);
-//vertex(450, 120);
-//vertex(465, 120);
-//vertex(465, 175);
-//vertex(485, 175);
-//vertex(485, 120);
-endShape();
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-quads/p5_result.png b/examples/seneca/begin-endShape/2d/endShape-2dtest-quads/p5_result.png
deleted file mode 100644
index c530486ad..000000000
Binary files a/examples/seneca/begin-endShape/2d/endShape-2dtest-quads/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-quadstrip/endShape-2dtest-quadstrip.html b/examples/seneca/begin-endShape/2d/endShape-2dtest-quadstrip/endShape-2dtest-quadstrip.html
deleted file mode 100644
index 91be7d20a..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-quadstrip/endShape-2dtest-quadstrip.html
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 200);
-background(200);
-beginShape(QUAD_STRIP); 
-vertex(30, 20); 
-vertex(30, 75); 
-vertex(50, 20);
-vertex(50, 75);
-vertex(65, 20); 
-vertex(65, 75); 
-vertex(85, 20);
-vertex(85, 75); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(130, 20); 
-vertex(130, 75); 
-vertex(150, 20);
-vertex(150, 75);
-vertex(165, 20); 
-vertex(165, 75); 
-vertex(185, 20);
-//vertex(185, 75); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(230, 20); 
-vertex(230, 75); 
-vertex(250, 20);
-vertex(250, 75);
-vertex(265, 20); 
-//vertex(265, 75); 
-vertex(285, 20);
-vertex(285, 75); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(330, 20); 
-vertex(330, 75); 
-vertex(350, 20);
-//vertex(350, 75);
-vertex(365, 20); 
-vertex(365, 75); 
-vertex(385, 20);
-vertex(385, 75); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(430, 20); 
-//vertex(430, 75); 
-vertex(450, 20);
-vertex(450, 75);
-vertex(465, 20); 
-vertex(465, 75); 
-vertex(485, 20);
-vertex(485, 75); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(30, 120); 
-vertex(30, 175); 
-vertex(50, 120);
-vertex(50, 175);
-vertex(65, 120); 
-vertex(65, 175); 
-//vertex(85, 120);
-//vertex(85, 175); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(130, 120); 
-vertex(130, 175); 
-vertex(150, 120);
-vertex(150, 175);
-vertex(165, 120); 
-//vertex(165, 175); 
-//vertex(185, 120);
-//vertex(185, 175); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(230, 120); 
-vertex(230, 175); 
-vertex(250, 120);
-vertex(250, 175);
-//vertex(265, 120); 
-//vertex(265, 175); 
-//vertex(285, 120);
-//vertex(285, 175); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(330, 120); 
-vertex(330, 175); 
-vertex(350, 120);
-//vertex(350, 175);
-//vertex(365, 120); 
-//vertex(365, 175); 
-//vertex(385, 120);
-//vertex(385, 175); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(430, 120); 
-vertex(430, 175); 
-//vertex(450, 120);
-//vertex(450, 175);
-//vertex(465, 120); 
-//vertex(465, 175); 
-//vertex(485, 120);
-//vertex(485, 175); 
-endShape();
-    
- - \ No newline at end of file diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-quadstrip/endShape-2dtest-quadstrip.pjs b/examples/seneca/begin-endShape/2d/endShape-2dtest-quadstrip/endShape-2dtest-quadstrip.pjs deleted file mode 100644 index c1175eb3d..000000000 --- a/examples/seneca/begin-endShape/2d/endShape-2dtest-quadstrip/endShape-2dtest-quadstrip.pjs +++ /dev/null @@ -1,111 +0,0 @@ -size(500, 200); -background(200); -beginShape(QUAD_STRIP); -vertex(30, 20); -vertex(30, 75); -vertex(50, 20); -vertex(50, 75); -vertex(65, 20); -vertex(65, 75); -vertex(85, 20); -vertex(85, 75); -endShape(); - -beginShape(QUAD_STRIP); -vertex(130, 20); -vertex(130, 75); -vertex(150, 20); -vertex(150, 75); -vertex(165, 20); -vertex(165, 75); -vertex(185, 20); -//vertex(185, 75); -endShape(); - -beginShape(QUAD_STRIP); -vertex(230, 20); -vertex(230, 75); -vertex(250, 20); -vertex(250, 75); -vertex(265, 20); -//vertex(265, 75); -vertex(285, 20); -vertex(285, 75); -endShape(); - -beginShape(QUAD_STRIP); -vertex(330, 20); -vertex(330, 75); -vertex(350, 20); -//vertex(350, 75); -vertex(365, 20); -vertex(365, 75); -vertex(385, 20); -vertex(385, 75); -endShape(); - -beginShape(QUAD_STRIP); -vertex(430, 20); -//vertex(430, 75); -vertex(450, 20); -vertex(450, 75); -vertex(465, 20); -vertex(465, 75); -vertex(485, 20); -vertex(485, 75); -endShape(); - -beginShape(QUAD_STRIP); -vertex(30, 120); -vertex(30, 175); -vertex(50, 120); -vertex(50, 175); -vertex(65, 120); -vertex(65, 175); -//vertex(85, 120); -//vertex(85, 175); -endShape(); - -beginShape(QUAD_STRIP); -vertex(130, 120); -vertex(130, 175); -vertex(150, 120); -vertex(150, 175); -vertex(165, 120); -//vertex(165, 175); -//vertex(185, 120); -//vertex(185, 175); -endShape(); - -beginShape(QUAD_STRIP); -vertex(230, 120); -vertex(230, 175); -vertex(250, 120); -vertex(250, 175); -//vertex(265, 120); -//vertex(265, 175); -//vertex(285, 120); -//vertex(285, 175); -endShape(); - -beginShape(QUAD_STRIP); -vertex(330, 120); -vertex(330, 175); -vertex(350, 120); -//vertex(350, 175); -//vertex(365, 120); -//vertex(365, 175); -//vertex(385, 120); -//vertex(385, 175); -endShape(); - -beginShape(QUAD_STRIP); -vertex(430, 120); -vertex(430, 175); -//vertex(450, 120); -//vertex(450, 175); -//vertex(465, 120); -//vertex(465, 175); -//vertex(485, 120); -//vertex(485, 175); -endShape(); \ No newline at end of file diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-quadstrip/p5_result.png b/examples/seneca/begin-endShape/2d/endShape-2dtest-quadstrip/p5_result.png deleted file mode 100644 index d22d6a5d3..000000000 Binary files a/examples/seneca/begin-endShape/2d/endShape-2dtest-quadstrip/p5_result.png and /dev/null differ diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglefan/endShape-2dtest-trianglefan.html b/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglefan/endShape-2dtest-trianglefan.html deleted file mode 100644 index 64672fb7d..000000000 --- a/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglefan/endShape-2dtest-trianglefan.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
-size(500, 200);
-background(200);
-beginShape(TRIANGLE_FAN);
-vertex(60, 50);
-vertex(60, 15); 
-vertex(95, 50); 
-vertex(60, 85); 
-vertex(25, 50); 
-vertex(60, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(160, 50);
-vertex(160, 15); 
-vertex(195, 50); 
-vertex(160, 85); 
-vertex(125, 50); 
-//vertex(160, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(260, 50);
-vertex(260, 15); 
-vertex(295, 50); 
-vertex(260, 85); 
-//vertex(225, 50); 
-vertex(260, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(360, 50);
-vertex(360, 15); 
-vertex(395, 50); 
-//vertex(360, 85); 
-vertex(325, 50); 
-vertex(360, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(460, 50);
-vertex(460, 15); 
-//vertex(495, 50); 
-vertex(460, 85); 
-vertex(425, 50); 
-vertex(460, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(60, 150);
-//vertex(60, 115); 
-vertex(95, 150); 
-vertex(60, 185); 
-vertex(25, 150); 
-vertex(60, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-//vertex(160, 150);
-vertex(160, 115); 
-vertex(195, 150); 
-vertex(160, 185); 
-vertex(125, 150); 
-vertex(160, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(260, 150);
-vertex(260, 115); 
-vertex(295, 150); 
-vertex(260, 185); 
-//vertex(225, 150); 
-//vertex(260, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(360, 150);
-vertex(360, 115); 
-vertex(395, 150); 
-//vertex(360, 185); 
-//vertex(325, 150); 
-//vertex(360, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(460, 150);
-vertex(460, 115); 
-//vertex(495, 150); 
-//vertex(460, 185); 
-//vertex(425, 150); 
-//vertex(460, 115); 
-endShape();
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglefan/endShape-2dtest-trianglefan.pjs b/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglefan/endShape-2dtest-trianglefan.pjs
deleted file mode 100644
index 6fd3b5e01..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglefan/endShape-2dtest-trianglefan.pjs
+++ /dev/null
@@ -1,91 +0,0 @@
-size(500, 200);
-background(200);
-beginShape(TRIANGLE_FAN);
-vertex(60, 50);
-vertex(60, 15); 
-vertex(95, 50); 
-vertex(60, 85); 
-vertex(25, 50); 
-vertex(60, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(160, 50);
-vertex(160, 15); 
-vertex(195, 50); 
-vertex(160, 85); 
-vertex(125, 50); 
-//vertex(160, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(260, 50);
-vertex(260, 15); 
-vertex(295, 50); 
-vertex(260, 85); 
-//vertex(225, 50); 
-vertex(260, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(360, 50);
-vertex(360, 15); 
-vertex(395, 50); 
-//vertex(360, 85); 
-vertex(325, 50); 
-vertex(360, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(460, 50);
-vertex(460, 15); 
-//vertex(495, 50); 
-vertex(460, 85); 
-vertex(425, 50); 
-vertex(460, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(60, 150);
-//vertex(60, 115); 
-vertex(95, 150); 
-vertex(60, 185); 
-vertex(25, 150); 
-vertex(60, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-//vertex(160, 150);
-vertex(160, 115); 
-vertex(195, 150); 
-vertex(160, 185); 
-vertex(125, 150); 
-vertex(160, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(260, 150);
-vertex(260, 115); 
-vertex(295, 150); 
-vertex(260, 185); 
-//vertex(225, 150); 
-//vertex(260, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(360, 150);
-vertex(360, 115); 
-vertex(395, 150); 
-//vertex(360, 185); 
-//vertex(325, 150); 
-//vertex(360, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(460, 150);
-vertex(460, 115); 
-//vertex(495, 150); 
-//vertex(460, 185); 
-//vertex(425, 150); 
-//vertex(460, 115); 
-endShape();
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglefan/p5_result.png b/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglefan/p5_result.png
deleted file mode 100644
index c9c486ba2..000000000
Binary files a/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglefan/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-triangles/endShape-2dtest-triangles.html b/examples/seneca/begin-endShape/2d/endShape-2dtest-triangles/endShape-2dtest-triangles.html
deleted file mode 100644
index b02b54fe5..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-triangles/endShape-2dtest-triangles.html
+++ /dev/null
@@ -1,128 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 200);
-background(200);
-beginShape(QUADS);
-vertex(30, 20);
-vertex(30, 75);
-vertex(50, 75);
-vertex(50, 20);
-vertex(65, 20);
-vertex(65, 75);
-vertex(85, 75);
-vertex(85, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(130, 20);
-vertex(130, 75);
-vertex(150, 75);
-vertex(150, 20);
-vertex(165, 20);
-vertex(165, 75);
-vertex(185, 75);
-//vertex(185, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 20);
-vertex(230, 75);
-vertex(250, 75);
-vertex(250, 20);
-vertex(265, 20);
-//vertex(265, 75);
-vertex(285, 75);
-vertex(285, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 20);
-vertex(330, 75);
-vertex(350, 75);
-//vertex(350, 20);
-vertex(365, 20);
-vertex(365, 75);
-vertex(385, 75);
-vertex(385, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(430, 20);
-//vertex(430, 75);
-vertex(450, 75);
-vertex(450, 20);
-vertex(465, 20);
-vertex(465, 75);
-vertex(485, 75);
-vertex(485, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(30, 120);
-vertex(30, 175);
-vertex(50, 175);
-vertex(50, 120);
-vertex(65, 120);
-vertex(65, 175);
-//vertex(85, 175);
-//vertex(85, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(130, 120);
-vertex(130, 175);
-vertex(150, 175);
-vertex(150, 120);
-vertex(165, 120);
-//vertex(165, 175);
-//vertex(185, 175);
-//vertex(185, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 120);
-vertex(230, 175);
-vertex(250, 175);
-vertex(250, 120);
-//vertex(265, 120);
-//vertex(265, 175);
-//vertex(285, 175);
-//vertex(285, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 120);
-vertex(330, 175);
-vertex(350, 175);
-//vertex(350, 120);
-//vertex(365, 120);
-//vertex(365, 175);
-//vertex(385, 175);
-//vertex(385, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(430, 120);
-vertex(430, 175);
-//vertex(450, 175);
-//vertex(450, 120);
-//vertex(465, 120);
-//vertex(465, 175);
-//vertex(485, 175);
-//vertex(485, 120);
-endShape();
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-triangles/endShape-2dtest-triangles.pjs b/examples/seneca/begin-endShape/2d/endShape-2dtest-triangles/endShape-2dtest-triangles.pjs
deleted file mode 100644
index fced6a5d0..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-triangles/endShape-2dtest-triangles.pjs
+++ /dev/null
@@ -1,91 +0,0 @@
-size(500, 200);
-background(200);
-beginShape(TRIANGLES);
-vertex(30, 75);
-vertex(40, 20);
-vertex(50, 75);
-vertex(60, 20);
-vertex(70, 75);
-vertex(80, 20);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(130, 75);
-vertex(140, 20);
-vertex(150, 75);
-vertex(160, 20);
-vertex(170, 75);
-//vertex(180, 20);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(230, 75);
-vertex(240, 20);
-vertex(250, 75);
-//vertex(260, 20);
-vertex(270, 75);
-vertex(280, 20);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(330, 75);
-//vertex(340, 20);
-vertex(350, 75);
-vertex(360, 20);
-vertex(370, 75);
-vertex(380, 20);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(430, 75);
-vertex(440, 20);
-vertex(450, 75);
-vertex(460, 20);
-//vertex(470, 75);
-//vertex(480, 20);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(30, 175);
-vertex(40, 120);
-vertex(50, 175);
-//vertex(60, 120);
-//vertex(70, 175);
-//vertex(80, 120);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(130, 175);
-vertex(140, 120);
-//vertex(150, 175);
-//vertex(160, 120);
-//vertex(170, 175);
-//vertex(180, 120);
-endShape();
-
-beginShape(TRIANGLES);
-//vertex(230, 175);
-vertex(240, 120);
-vertex(250, 175);
-vertex(260, 120);
-vertex(270, 175);
-vertex(280, 120);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(330, 175);
-vertex(340, 120);
-//vertex(350, 175);
-vertex(360, 120);
-vertex(370, 175);
-vertex(380, 120);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(430, 175);
-vertex(440, 120);
-vertex(450, 175);
-vertex(460, 120);
-//vertex(470, 175);
-vertex(480, 120);
-endShape();
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-triangles/p5_result.png b/examples/seneca/begin-endShape/2d/endShape-2dtest-triangles/p5_result.png
deleted file mode 100644
index 14fb854b6..000000000
Binary files a/examples/seneca/begin-endShape/2d/endShape-2dtest-triangles/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglestrip/endShape-2dtest-trianglestrip.html b/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglestrip/endShape-2dtest-trianglestrip.html
deleted file mode 100644
index bd51261e7..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglestrip/endShape-2dtest-trianglestrip.html
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 200);
-background(200);
-beginShape(TRIANGLE_STRIP);
-vertex(30, 75);
-vertex(40, 20);
-vertex(50, 75);
-vertex(60, 20);
-vertex(70, 75);
-vertex(80, 20);
-vertex(90, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(130, 75);
-vertex(140, 20);
-vertex(150, 75);
-vertex(160, 20);
-vertex(170, 75);
-vertex(180, 20);
-//vertex(190, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(230, 75);
-vertex(240, 20);
-vertex(250, 75);
-vertex(260, 20);
-vertex(270, 75);
-//vertex(280, 20);
-vertex(290, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(330, 75);
-vertex(340, 20);
-vertex(350, 75);
-vertex(360, 20);
-//vertex(370, 75);
-vertex(380, 20);
-vertex(390, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(430, 75);
-vertex(440, 20);
-vertex(450, 75);
-//vertex(460, 20);
-vertex(470, 75);
-vertex(480, 20);
-vertex(490, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(30, 175);
-vertex(40, 120);
-//vertex(50, 175);
-vertex(60, 120);
-vertex(70, 175);
-vertex(80, 120);
-vertex(90, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(130, 175);
-//vertex(140, 120);
-vertex(150, 175);
-vertex(160, 120);
-vertex(170, 175);
-vertex(180, 120);
-vertex(190, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-//vertex(230, 175);
-vertex(240, 120);
-vertex(250, 175);
-vertex(260, 120);
-vertex(270, 175);
-vertex(280, 120);
-vertex(290, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(330, 175);
-vertex(340, 120);
-vertex(350, 175);
-vertex(360, 120);
-vertex(370, 175);
-//vertex(380, 120);
-//vertex(390, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(430, 175);
-vertex(440, 120);
-vertex(450, 175);
-vertex(460, 120);
-//vertex(470, 175);
-//vertex(480, 120);
-//vertex(490, 175);
-endShape();
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglestrip/endShape-2dtest-trianglestrip.pjs b/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglestrip/endShape-2dtest-trianglestrip.pjs
deleted file mode 100644
index 68b3d7db0..000000000
--- a/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglestrip/endShape-2dtest-trianglestrip.pjs
+++ /dev/null
@@ -1,101 +0,0 @@
-size(500, 200);
-background(200);
-beginShape(TRIANGLE_STRIP);
-vertex(30, 75);
-vertex(40, 20);
-vertex(50, 75);
-vertex(60, 20);
-vertex(70, 75);
-vertex(80, 20);
-vertex(90, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(130, 75);
-vertex(140, 20);
-vertex(150, 75);
-vertex(160, 20);
-vertex(170, 75);
-vertex(180, 20);
-//vertex(190, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(230, 75);
-vertex(240, 20);
-vertex(250, 75);
-vertex(260, 20);
-vertex(270, 75);
-//vertex(280, 20);
-vertex(290, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(330, 75);
-vertex(340, 20);
-vertex(350, 75);
-vertex(360, 20);
-//vertex(370, 75);
-vertex(380, 20);
-vertex(390, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(430, 75);
-vertex(440, 20);
-vertex(450, 75);
-//vertex(460, 20);
-vertex(470, 75);
-vertex(480, 20);
-vertex(490, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(30, 175);
-vertex(40, 120);
-//vertex(50, 175);
-vertex(60, 120);
-vertex(70, 175);
-vertex(80, 120);
-vertex(90, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(130, 175);
-//vertex(140, 120);
-vertex(150, 175);
-vertex(160, 120);
-vertex(170, 175);
-vertex(180, 120);
-vertex(190, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-//vertex(230, 175);
-vertex(240, 120);
-vertex(250, 175);
-vertex(260, 120);
-vertex(270, 175);
-vertex(280, 120);
-vertex(290, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(330, 175);
-vertex(340, 120);
-vertex(350, 175);
-vertex(360, 120);
-vertex(370, 175);
-//vertex(380, 120);
-//vertex(390, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(430, 175);
-vertex(440, 120);
-vertex(450, 175);
-vertex(460, 120);
-//vertex(470, 175);
-//vertex(480, 120);
-//vertex(490, 175);
-endShape();
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglestrip/p5_result.png b/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglestrip/p5_result.png
deleted file mode 100644
index 43bc59488..000000000
Binary files a/examples/seneca/begin-endShape/2d/endShape-2dtest-trianglestrip/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-lines/endShape-3dtest-lines.html b/examples/seneca/begin-endShape/3d/endShape-3dtest-lines/endShape-3dtest-lines.html
deleted file mode 100644
index 859db10bd..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-lines/endShape-3dtest-lines.html
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 100, P3D);
-background(200);
-box(10);
-beginShape(LINES);
-vertex(20, 20);
-vertex(40, 20);
-vertex(40, 40);
-vertex(60, 40);
-vertex(60, 60);
-vertex(20, 60);
-endShape();
-
-beginShape(LINES);
-vertex(120, 20);
-vertex(140, 20);
-vertex(140, 40);
-vertex(160, 40);
-vertex(160, 60);
-//vertex(120, 60);
-endShape();
-
-beginShape(LINES);
-vertex(220, 20);
-vertex(240, 20);
-vertex(240, 40);
-vertex(260, 40);
-//vertex(260, 60);
-//vertex(220, 60);
-endShape();
-
-beginShape(LINES);
-vertex(320, 20);
-vertex(340, 20);
-vertex(340, 40);
-//vertex(360, 40);
-//vertex(360, 60);
-//vertex(320, 60);
-endShape();
-
-beginShape(LINES);
-vertex(420, 20);
-vertex(440, 20);
-//vertex(440, 40);
-//vertex(460, 40);
-//vertex(460, 60);
-//vertex(420, 60);
-endShape();
-    
- - \ No newline at end of file diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-lines/endShape-3dtest-lines.pjs b/examples/seneca/begin-endShape/3d/endShape-3dtest-lines/endShape-3dtest-lines.pjs deleted file mode 100644 index d7aceb701..000000000 --- a/examples/seneca/begin-endShape/3d/endShape-3dtest-lines/endShape-3dtest-lines.pjs +++ /dev/null @@ -1,47 +0,0 @@ -size(500, 100, P3D); -background(200); -box(10); -beginShape(LINES); -vertex(20, 20); -vertex(40, 20); -vertex(40, 40); -vertex(60, 40); -vertex(60, 60); -vertex(20, 60); -endShape(); - -beginShape(LINES); -vertex(120, 20); -vertex(140, 20); -vertex(140, 40); -vertex(160, 40); -vertex(160, 60); -//vertex(120, 60); -endShape(); - -beginShape(LINES); -vertex(220, 20); -vertex(240, 20); -vertex(240, 40); -vertex(260, 40); -//vertex(260, 60); -//vertex(220, 60); -endShape(); - -beginShape(LINES); -vertex(320, 20); -vertex(340, 20); -vertex(340, 40); -//vertex(360, 40); -//vertex(360, 60); -//vertex(320, 60); -endShape(); - -beginShape(LINES); -vertex(420, 20); -vertex(440, 20); -//vertex(440, 40); -//vertex(460, 40); -//vertex(460, 60); -//vertex(420, 60); -endShape(); \ No newline at end of file diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-lines/p5_result.png b/examples/seneca/begin-endShape/3d/endShape-3dtest-lines/p5_result.png deleted file mode 100644 index 0a5a1df28..000000000 Binary files a/examples/seneca/begin-endShape/3d/endShape-3dtest-lines/p5_result.png and /dev/null differ diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-noclose/endShape-3dtest-noclose.html b/examples/seneca/begin-endShape/3d/endShape-3dtest-noclose/endShape-3dtest-noclose.html deleted file mode 100644 index 548fb0027..000000000 --- a/examples/seneca/begin-endShape/3d/endShape-3dtest-noclose/endShape-3dtest-noclose.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
-size(500, 100, P3D);
-background(200);
-box(10);
-beginShape();
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape();
-
-beginShape();
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape();
-
-beginShape();
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape();
-
-beginShape();
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape();
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-noclose/endShape-3dtest-noclose.pjs b/examples/seneca/begin-endShape/3d/endShape-3dtest-noclose/endShape-3dtest-noclose.pjs
deleted file mode 100644
index 9308f34cb..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-noclose/endShape-3dtest-noclose.pjs
+++ /dev/null
@@ -1,30 +0,0 @@
-size(500, 100, P3D);
-background(200);
-box(10);
-beginShape();
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape();
-
-beginShape();
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape();
-
-beginShape();
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape();
-
-beginShape();
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape();
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-noclose/p5_result.png b/examples/seneca/begin-endShape/3d/endShape-3dtest-noclose/p5_result.png
deleted file mode 100644
index 1a287eb25..000000000
Binary files a/examples/seneca/begin-endShape/3d/endShape-3dtest-noclose/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-nomod/endShape-3dtest-nomod.html b/examples/seneca/begin-endShape/3d/endShape-3dtest-nomod/endShape-3dtest-nomod.html
deleted file mode 100644
index a2366028d..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-nomod/endShape-3dtest-nomod.html
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 100, P3D);
-background(200);
-box(10);
-beginShape();
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape(CLOSE);
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-nomod/endShape-3dtest-nomod.pjs b/examples/seneca/begin-endShape/3d/endShape-3dtest-nomod/endShape-3dtest-nomod.pjs
deleted file mode 100644
index 72f135ae4..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-nomod/endShape-3dtest-nomod.pjs
+++ /dev/null
@@ -1,30 +0,0 @@
-size(500, 100, P3D);
-background(200);
-box(10);
-beginShape();
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape(CLOSE);
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-nomod/p5_result.png b/examples/seneca/begin-endShape/3d/endShape-3dtest-nomod/p5_result.png
deleted file mode 100644
index 75eaad29d..000000000
Binary files a/examples/seneca/begin-endShape/3d/endShape-3dtest-nomod/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-nomodnofill/endShape-3dtest-nomodnofill.html b/examples/seneca/begin-endShape/3d/endShape-3dtest-nomodnofill/endShape-3dtest-nomodnofill.html
deleted file mode 100644
index 3b1b437a0..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-nomodnofill/endShape-3dtest-nomodnofill.html
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 100, P3D);
-background(200);
-box(10);
-background(200);
-nofill();
-beginShape();
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape(CLOSE);
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-nomodnofill/endShape-3dtest-nomodnofill.pjs b/examples/seneca/begin-endShape/3d/endShape-3dtest-nomodnofill/endShape-3dtest-nomodnofill.pjs
deleted file mode 100644
index f0e254631..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-nomodnofill/endShape-3dtest-nomodnofill.pjs
+++ /dev/null
@@ -1,31 +0,0 @@
-size(500, 100, P3D);
-background(200);
-box(10);
-noFill();
-beginShape();
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape(CLOSE);
-
-beginShape();
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape(CLOSE);
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-nomodnofill/p5_result.png b/examples/seneca/begin-endShape/3d/endShape-3dtest-nomodnofill/p5_result.png
deleted file mode 100644
index 5296757f2..000000000
Binary files a/examples/seneca/begin-endShape/3d/endShape-3dtest-nomodnofill/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-points/endShape-3dtest-points.html b/examples/seneca/begin-endShape/3d/endShape-3dtest-points/endShape-3dtest-points.html
deleted file mode 100644
index 012d3697e..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-points/endShape-3dtest-points.html
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 100, P3D);
-background(200);
-box(10);
-beginShape(POINTS);
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape(CLOSE);
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-points/endShape-3dtest-points.pjs b/examples/seneca/begin-endShape/3d/endShape-3dtest-points/endShape-3dtest-points.pjs
deleted file mode 100644
index fd1a37493..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-points/endShape-3dtest-points.pjs
+++ /dev/null
@@ -1,30 +0,0 @@
-size(500, 100, P3D);
-background(200);
-box(10);
-beginShape(POINTS);
-vertex(30, 20);
-vertex(85, 20);
-vertex(85, 75);
-vertex(30, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-vertex(130, 20);
-vertex(185, 20);
-vertex(185, 75);
-//vertex(130, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-vertex(230, 20);
-vertex(285, 20);
-//vertex(285, 75);
-//vertex(230, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-vertex(330, 20);
-//vertex(385, 20);
-//vertex(385, 75);
-//vertex(330, 75);
-endShape(CLOSE);
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-points/p5_result.png b/examples/seneca/begin-endShape/3d/endShape-3dtest-points/p5_result.png
deleted file mode 100644
index 73b6edb6b..000000000
Binary files a/examples/seneca/begin-endShape/3d/endShape-3dtest-points/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-polygon/endShape-3dtest-polygon.html b/examples/seneca/begin-endShape/3d/endShape-3dtest-polygon/endShape-3dtest-polygon.html
deleted file mode 100644
index f22a60515..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-polygon/endShape-3dtest-polygon.html
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 100, P3D);
-background(200);
-box(10);
-beginShape();
-vertex(20, 20);
-vertex(40, 20);
-vertex(40, 40);
-vertex(60, 40);
-vertex(60, 60);
-vertex(20, 60);
-endShape(CLOSE);
-
-beginShape();
-vertex(120, 20);
-vertex(140, 20);
-vertex(140, 40);
-vertex(160, 40);
-vertex(160, 60);
-//vertex(120, 60);
-endShape(CLOSE);
-
-beginShape();
-vertex(220, 20);
-vertex(240, 20);
-vertex(240, 40);
-vertex(260, 40);
-//vertex(260, 60);
-//vertex(220, 60);
-endShape(CLOSE);
-
-beginShape();
-vertex(320, 20);
-vertex(340, 20);
-vertex(340, 40);
-//vertex(360, 40);
-//vertex(360, 60);
-//vertex(320, 60);
-endShape(CLOSE);
-
-beginShape();
-vertex(420, 20);
-vertex(440, 20);
-//vertex(440, 40);
-//vertex(460, 40);
-//vertex(460, 60);
-//vertex(420, 60);
-endShape(CLOSE);
-    
- - \ No newline at end of file diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-polygon/endShape-3dtest-polygon.pjs b/examples/seneca/begin-endShape/3d/endShape-3dtest-polygon/endShape-3dtest-polygon.pjs deleted file mode 100644 index 22d536396..000000000 --- a/examples/seneca/begin-endShape/3d/endShape-3dtest-polygon/endShape-3dtest-polygon.pjs +++ /dev/null @@ -1,47 +0,0 @@ -size(500, 100, P3D); -background(200); -box(10); -beginShape(); -vertex(20, 20); -vertex(40, 20); -vertex(40, 40); -vertex(60, 40); -vertex(60, 60); -vertex(20, 60); -endShape(CLOSE); - -beginShape(); -vertex(120, 20); -vertex(140, 20); -vertex(140, 40); -vertex(160, 40); -vertex(160, 60); -//vertex(120, 60); -endShape(CLOSE); - -beginShape(); -vertex(220, 20); -vertex(240, 20); -vertex(240, 40); -vertex(260, 40); -//vertex(260, 60); -//vertex(220, 60); -endShape(CLOSE); - -beginShape(); -vertex(320, 20); -vertex(340, 20); -vertex(340, 40); -//vertex(360, 40); -//vertex(360, 60); -//vertex(320, 60); -endShape(CLOSE); - -beginShape(); -vertex(420, 20); -vertex(440, 20); -//vertex(440, 40); -//vertex(460, 40); -//vertex(460, 60); -//vertex(420, 60); -endShape(CLOSE); \ No newline at end of file diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-polygon/p5_result.png b/examples/seneca/begin-endShape/3d/endShape-3dtest-polygon/p5_result.png deleted file mode 100644 index 47109e9b0..000000000 Binary files a/examples/seneca/begin-endShape/3d/endShape-3dtest-polygon/p5_result.png and /dev/null differ diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-quads/endShape-3dtest-quads.html b/examples/seneca/begin-endShape/3d/endShape-3dtest-quads/endShape-3dtest-quads.html deleted file mode 100644 index fe4bf64f7..000000000 --- a/examples/seneca/begin-endShape/3d/endShape-3dtest-quads/endShape-3dtest-quads.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
-size(500, 200, P3D);
-background(200);
-box(10);
-beginShape(QUADS);
-vertex(30, 20);
-vertex(30, 75);
-vertex(50, 75);
-vertex(50, 20);
-vertex(65, 20);
-vertex(65, 75);
-vertex(85, 75);
-vertex(85, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(130, 20);
-vertex(130, 75);
-vertex(150, 75);
-vertex(150, 20);
-vertex(165, 20);
-vertex(165, 75);
-vertex(185, 75);
-//vertex(185, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 20);
-vertex(230, 75);
-vertex(250, 75);
-vertex(250, 20);
-vertex(265, 20);
-//vertex(265, 75);
-vertex(285, 75);
-vertex(285, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 20);
-vertex(330, 75);
-vertex(350, 75);
-//vertex(350, 20);
-vertex(365, 20);
-vertex(365, 75);
-vertex(385, 75);
-vertex(385, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(430, 20);
-//vertex(430, 75);
-vertex(450, 75);
-vertex(450, 20);
-vertex(465, 20);
-vertex(465, 75);
-vertex(485, 75);
-vertex(485, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(30, 120);
-vertex(30, 175);
-vertex(50, 175);
-vertex(50, 120);
-vertex(65, 120);
-vertex(65, 175);
-//vertex(85, 175);
-//vertex(85, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(130, 120);
-vertex(130, 175);
-vertex(150, 175);
-vertex(150, 120);
-vertex(165, 120);
-//vertex(165, 175);
-//vertex(185, 175);
-//vertex(185, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 120);
-vertex(230, 175);
-vertex(250, 175);
-vertex(250, 120);
-//vertex(265, 120);
-//vertex(265, 175);
-//vertex(285, 175);
-//vertex(285, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 120);
-vertex(330, 175);
-vertex(350, 175);
-//vertex(350, 120);
-//vertex(365, 120);
-//vertex(365, 175);
-//vertex(385, 175);
-//vertex(385, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(430, 120);
-vertex(430, 175);
-//vertex(450, 175);
-//vertex(450, 120);
-//vertex(465, 120);
-//vertex(465, 175);
-//vertex(485, 175);
-//vertex(485, 120);
-endShape();
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-quads/endShape-3dtest-quads.pjs b/examples/seneca/begin-endShape/3d/endShape-3dtest-quads/endShape-3dtest-quads.pjs
deleted file mode 100644
index 61797e79f..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-quads/endShape-3dtest-quads.pjs
+++ /dev/null
@@ -1,112 +0,0 @@
-size(500, 200, P3D);
-background(200);
-box(10);
-beginShape(QUADS);
-vertex(30, 20);
-vertex(30, 75);
-vertex(50, 75);
-vertex(50, 20);
-vertex(65, 20);
-vertex(65, 75);
-vertex(85, 75);
-vertex(85, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(130, 20);
-vertex(130, 75);
-vertex(150, 75);
-vertex(150, 20);
-vertex(165, 20);
-vertex(165, 75);
-vertex(185, 75);
-//vertex(185, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 20);
-vertex(230, 75);
-vertex(250, 75);
-vertex(250, 20);
-vertex(265, 20);
-//vertex(265, 75);
-vertex(285, 75);
-vertex(285, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 20);
-vertex(330, 75);
-vertex(350, 75);
-//vertex(350, 20);
-vertex(365, 20);
-vertex(365, 75);
-vertex(385, 75);
-vertex(385, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(430, 20);
-//vertex(430, 75);
-vertex(450, 75);
-vertex(450, 20);
-vertex(465, 20);
-vertex(465, 75);
-vertex(485, 75);
-vertex(485, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(30, 120);
-vertex(30, 175);
-vertex(50, 175);
-vertex(50, 120);
-vertex(65, 120);
-vertex(65, 175);
-//vertex(85, 175);
-//vertex(85, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(130, 120);
-vertex(130, 175);
-vertex(150, 175);
-vertex(150, 120);
-vertex(165, 120);
-//vertex(165, 175);
-//vertex(185, 175);
-//vertex(185, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 120);
-vertex(230, 175);
-vertex(250, 175);
-vertex(250, 120);
-//vertex(265, 120);
-//vertex(265, 175);
-//vertex(285, 175);
-//vertex(285, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 120);
-vertex(330, 175);
-vertex(350, 175);
-//vertex(350, 120);
-//vertex(365, 120);
-//vertex(365, 175);
-//vertex(385, 175);
-//vertex(385, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(430, 120);
-vertex(430, 175);
-//vertex(450, 175);
-//vertex(450, 120);
-//vertex(465, 120);
-//vertex(465, 175);
-//vertex(485, 175);
-//vertex(485, 120);
-endShape();
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-quads/p5_result.png b/examples/seneca/begin-endShape/3d/endShape-3dtest-quads/p5_result.png
deleted file mode 100644
index 1bb5ce01c..000000000
Binary files a/examples/seneca/begin-endShape/3d/endShape-3dtest-quads/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-quadstrip/endShape-3dtest-quadstrip.html b/examples/seneca/begin-endShape/3d/endShape-3dtest-quadstrip/endShape-3dtest-quadstrip.html
deleted file mode 100644
index 52b54e1c4..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-quadstrip/endShape-3dtest-quadstrip.html
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 200, P3D);
-background(200);
-box(10);
-beginShape(QUAD_STRIP); 
-vertex(30, 20); 
-vertex(30, 75); 
-vertex(50, 20);
-vertex(50, 75);
-vertex(65, 20); 
-vertex(65, 75); 
-vertex(85, 20);
-vertex(85, 75); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(130, 20); 
-vertex(130, 75); 
-vertex(150, 20);
-vertex(150, 75);
-vertex(165, 20); 
-vertex(165, 75); 
-vertex(185, 20);
-//vertex(185, 75); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(230, 20); 
-vertex(230, 75); 
-vertex(250, 20);
-vertex(250, 75);
-vertex(265, 20); 
-//vertex(265, 75); 
-vertex(285, 20);
-vertex(285, 75); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(330, 20); 
-vertex(330, 75); 
-vertex(350, 20);
-//vertex(350, 75);
-vertex(365, 20); 
-vertex(365, 75); 
-vertex(385, 20);
-vertex(385, 75); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(430, 20); 
-//vertex(430, 75); 
-vertex(450, 20);
-vertex(450, 75);
-vertex(465, 20); 
-vertex(465, 75); 
-vertex(485, 20);
-vertex(485, 75); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(30, 120); 
-vertex(30, 175); 
-vertex(50, 120);
-vertex(50, 175);
-vertex(65, 120); 
-vertex(65, 175); 
-//vertex(85, 120);
-//vertex(85, 175); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(130, 120); 
-vertex(130, 175); 
-vertex(150, 120);
-vertex(150, 175);
-vertex(165, 120); 
-//vertex(165, 175); 
-//vertex(185, 120);
-//vertex(185, 175); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(230, 120); 
-vertex(230, 175); 
-vertex(250, 120);
-vertex(250, 175);
-//vertex(265, 120); 
-//vertex(265, 175); 
-//vertex(285, 120);
-//vertex(285, 175); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(330, 120); 
-vertex(330, 175); 
-vertex(350, 120);
-//vertex(350, 175);
-//vertex(365, 120); 
-//vertex(365, 175); 
-//vertex(385, 120);
-//vertex(385, 175); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(430, 120); 
-vertex(430, 175); 
-//vertex(450, 120);
-//vertex(450, 175);
-//vertex(465, 120); 
-//vertex(465, 175); 
-//vertex(485, 120);
-//vertex(485, 175); 
-endShape();
-    
- - \ No newline at end of file diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-quadstrip/endShape-3dtest-quadstrip.pjs b/examples/seneca/begin-endShape/3d/endShape-3dtest-quadstrip/endShape-3dtest-quadstrip.pjs deleted file mode 100644 index 82c659e18..000000000 --- a/examples/seneca/begin-endShape/3d/endShape-3dtest-quadstrip/endShape-3dtest-quadstrip.pjs +++ /dev/null @@ -1,112 +0,0 @@ -size(500, 200, P3D); -background(200); -box(10); -beginShape(QUAD_STRIP); -vertex(30, 20); -vertex(30, 75); -vertex(50, 20); -vertex(50, 75); -vertex(65, 20); -vertex(65, 75); -vertex(85, 20); -vertex(85, 75); -endShape(); - -beginShape(QUAD_STRIP); -vertex(130, 20); -vertex(130, 75); -vertex(150, 20); -vertex(150, 75); -vertex(165, 20); -vertex(165, 75); -vertex(185, 20); -//vertex(185, 75); -endShape(); - -beginShape(QUAD_STRIP); -vertex(230, 20); -vertex(230, 75); -vertex(250, 20); -vertex(250, 75); -vertex(265, 20); -//vertex(265, 75); -vertex(285, 20); -vertex(285, 75); -endShape(); - -beginShape(QUAD_STRIP); -vertex(330, 20); -vertex(330, 75); -vertex(350, 20); -//vertex(350, 75); -vertex(365, 20); -vertex(365, 75); -vertex(385, 20); -vertex(385, 75); -endShape(); - -beginShape(QUAD_STRIP); -vertex(430, 20); -//vertex(430, 75); -vertex(450, 20); -vertex(450, 75); -vertex(465, 20); -vertex(465, 75); -vertex(485, 20); -vertex(485, 75); -endShape(); - -beginShape(QUAD_STRIP); -vertex(30, 120); -vertex(30, 175); -vertex(50, 120); -vertex(50, 175); -vertex(65, 120); -vertex(65, 175); -//vertex(85, 120); -//vertex(85, 175); -endShape(); - -beginShape(QUAD_STRIP); -vertex(130, 120); -vertex(130, 175); -vertex(150, 120); -vertex(150, 175); -vertex(165, 120); -//vertex(165, 175); -//vertex(185, 120); -//vertex(185, 175); -endShape(); - -beginShape(QUAD_STRIP); -vertex(230, 120); -vertex(230, 175); -vertex(250, 120); -vertex(250, 175); -//vertex(265, 120); -//vertex(265, 175); -//vertex(285, 120); -//vertex(285, 175); -endShape(); - -beginShape(QUAD_STRIP); -vertex(330, 120); -vertex(330, 175); -vertex(350, 120); -//vertex(350, 175); -//vertex(365, 120); -//vertex(365, 175); -//vertex(385, 120); -//vertex(385, 175); -endShape(); - -beginShape(QUAD_STRIP); -vertex(430, 120); -vertex(430, 175); -//vertex(450, 120); -//vertex(450, 175); -//vertex(465, 120); -//vertex(465, 175); -//vertex(485, 120); -//vertex(485, 175); -endShape(); \ No newline at end of file diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-quadstrip/p5_result.png b/examples/seneca/begin-endShape/3d/endShape-3dtest-quadstrip/p5_result.png deleted file mode 100644 index c4a0a9b8d..000000000 Binary files a/examples/seneca/begin-endShape/3d/endShape-3dtest-quadstrip/p5_result.png and /dev/null differ diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglefan/endShape-3dtest-trianglefan.html b/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglefan/endShape-3dtest-trianglefan.html deleted file mode 100644 index 4544f94da..000000000 --- a/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglefan/endShape-3dtest-trianglefan.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
-size(500, 200, P3D);
-background(200);
-box(10);
-beginShape(TRIANGLE_FAN);
-vertex(60, 50);
-vertex(60, 15); 
-vertex(95, 50); 
-vertex(60, 85); 
-vertex(25, 50); 
-vertex(60, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(160, 50);
-vertex(160, 15); 
-vertex(195, 50); 
-vertex(160, 85); 
-vertex(125, 50); 
-//vertex(160, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(260, 50);
-vertex(260, 15); 
-vertex(295, 50); 
-vertex(260, 85); 
-//vertex(225, 50); 
-vertex(260, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(360, 50);
-vertex(360, 15); 
-vertex(395, 50); 
-//vertex(360, 85); 
-vertex(325, 50); 
-vertex(360, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(460, 50);
-vertex(460, 15); 
-//vertex(495, 50); 
-vertex(460, 85); 
-vertex(425, 50); 
-vertex(460, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(60, 150);
-//vertex(60, 115); 
-vertex(95, 150); 
-vertex(60, 185); 
-vertex(25, 150); 
-vertex(60, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-//vertex(160, 150);
-vertex(160, 115); 
-vertex(195, 150); 
-vertex(160, 185); 
-vertex(125, 150); 
-vertex(160, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(260, 150);
-vertex(260, 115); 
-vertex(295, 150); 
-vertex(260, 185); 
-//vertex(225, 150); 
-//vertex(260, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(360, 150);
-vertex(360, 115); 
-vertex(395, 150); 
-//vertex(360, 185); 
-//vertex(325, 150); 
-//vertex(360, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(460, 150);
-vertex(460, 115); 
-//vertex(495, 150); 
-//vertex(460, 185); 
-//vertex(425, 150); 
-//vertex(460, 115); 
-endShape();
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglefan/endShape-3dtest-trianglefan.pjs b/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglefan/endShape-3dtest-trianglefan.pjs
deleted file mode 100644
index a6e0ee607..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglefan/endShape-3dtest-trianglefan.pjs
+++ /dev/null
@@ -1,92 +0,0 @@
-size(500, 200, P3D);
-background(200);
-box(10);
-beginShape(TRIANGLE_FAN);
-vertex(60, 50);
-vertex(60, 15); 
-vertex(95, 50); 
-vertex(60, 85); 
-vertex(25, 50); 
-vertex(60, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(160, 50);
-vertex(160, 15); 
-vertex(195, 50); 
-vertex(160, 85); 
-vertex(125, 50); 
-//vertex(160, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(260, 50);
-vertex(260, 15); 
-vertex(295, 50); 
-vertex(260, 85); 
-//vertex(225, 50); 
-vertex(260, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(360, 50);
-vertex(360, 15); 
-vertex(395, 50); 
-//vertex(360, 85); 
-vertex(325, 50); 
-vertex(360, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(460, 50);
-vertex(460, 15); 
-//vertex(495, 50); 
-vertex(460, 85); 
-vertex(425, 50); 
-vertex(460, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(60, 150);
-//vertex(60, 115); 
-vertex(95, 150); 
-vertex(60, 185); 
-vertex(25, 150); 
-vertex(60, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-//vertex(160, 150);
-vertex(160, 115); 
-vertex(195, 150); 
-vertex(160, 185); 
-vertex(125, 150); 
-vertex(160, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(260, 150);
-vertex(260, 115); 
-vertex(295, 150); 
-vertex(260, 185); 
-//vertex(225, 150); 
-//vertex(260, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(360, 150);
-vertex(360, 115); 
-vertex(395, 150); 
-//vertex(360, 185); 
-//vertex(325, 150); 
-//vertex(360, 115); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(460, 150);
-vertex(460, 115); 
-//vertex(495, 150); 
-//vertex(460, 185); 
-//vertex(425, 150); 
-//vertex(460, 115); 
-endShape();
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglefan/p5_result.png b/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglefan/p5_result.png
deleted file mode 100644
index 7a0ab0182..000000000
Binary files a/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglefan/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-triangles/endShape-3dtest-triangles.html b/examples/seneca/begin-endShape/3d/endShape-3dtest-triangles/endShape-3dtest-triangles.html
deleted file mode 100644
index b4feda164..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-triangles/endShape-3dtest-triangles.html
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 200, P3D);
-background(200);
-box(10);
-beginShape(QUADS);
-vertex(30, 20);
-vertex(30, 75);
-vertex(50, 75);
-vertex(50, 20);
-vertex(65, 20);
-vertex(65, 75);
-vertex(85, 75);
-vertex(85, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(130, 20);
-vertex(130, 75);
-vertex(150, 75);
-vertex(150, 20);
-vertex(165, 20);
-vertex(165, 75);
-vertex(185, 75);
-//vertex(185, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 20);
-vertex(230, 75);
-vertex(250, 75);
-vertex(250, 20);
-vertex(265, 20);
-//vertex(265, 75);
-vertex(285, 75);
-vertex(285, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 20);
-vertex(330, 75);
-vertex(350, 75);
-//vertex(350, 20);
-vertex(365, 20);
-vertex(365, 75);
-vertex(385, 75);
-vertex(385, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(430, 20);
-//vertex(430, 75);
-vertex(450, 75);
-vertex(450, 20);
-vertex(465, 20);
-vertex(465, 75);
-vertex(485, 75);
-vertex(485, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(30, 120);
-vertex(30, 175);
-vertex(50, 175);
-vertex(50, 120);
-vertex(65, 120);
-vertex(65, 175);
-//vertex(85, 175);
-//vertex(85, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(130, 120);
-vertex(130, 175);
-vertex(150, 175);
-vertex(150, 120);
-vertex(165, 120);
-//vertex(165, 175);
-//vertex(185, 175);
-//vertex(185, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 120);
-vertex(230, 175);
-vertex(250, 175);
-vertex(250, 120);
-//vertex(265, 120);
-//vertex(265, 175);
-//vertex(285, 175);
-//vertex(285, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 120);
-vertex(330, 175);
-vertex(350, 175);
-//vertex(350, 120);
-//vertex(365, 120);
-//vertex(365, 175);
-//vertex(385, 175);
-//vertex(385, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(430, 120);
-vertex(430, 175);
-//vertex(450, 175);
-//vertex(450, 120);
-//vertex(465, 120);
-//vertex(465, 175);
-//vertex(485, 175);
-//vertex(485, 120);
-endShape();
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-triangles/endShape-3dtest-triangles.pjs b/examples/seneca/begin-endShape/3d/endShape-3dtest-triangles/endShape-3dtest-triangles.pjs
deleted file mode 100644
index 074bbec98..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-triangles/endShape-3dtest-triangles.pjs
+++ /dev/null
@@ -1,92 +0,0 @@
-size(500, 200, P3D);
-background(200);
-box(10);
-beginShape(TRIANGLES);
-vertex(30, 75);
-vertex(40, 20);
-vertex(50, 75);
-vertex(60, 20);
-vertex(70, 75);
-vertex(80, 20);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(130, 75);
-vertex(140, 20);
-vertex(150, 75);
-vertex(160, 20);
-vertex(170, 75);
-//vertex(180, 20);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(230, 75);
-vertex(240, 20);
-vertex(250, 75);
-//vertex(260, 20);
-vertex(270, 75);
-vertex(280, 20);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(330, 75);
-//vertex(340, 20);
-vertex(350, 75);
-vertex(360, 20);
-vertex(370, 75);
-vertex(380, 20);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(430, 75);
-vertex(440, 20);
-vertex(450, 75);
-vertex(460, 20);
-//vertex(470, 75);
-//vertex(480, 20);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(30, 175);
-vertex(40, 120);
-vertex(50, 175);
-//vertex(60, 120);
-//vertex(70, 175);
-//vertex(80, 120);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(130, 175);
-vertex(140, 120);
-//vertex(150, 175);
-//vertex(160, 120);
-//vertex(170, 175);
-//vertex(180, 120);
-endShape();
-
-beginShape(TRIANGLES);
-//vertex(230, 175);
-vertex(240, 120);
-vertex(250, 175);
-vertex(260, 120);
-vertex(270, 175);
-vertex(280, 120);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(330, 175);
-vertex(340, 120);
-//vertex(350, 175);
-vertex(360, 120);
-vertex(370, 175);
-vertex(380, 120);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(430, 175);
-vertex(440, 120);
-vertex(450, 175);
-vertex(460, 120);
-//vertex(470, 175);
-vertex(480, 120);
-endShape();
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-triangles/p5_result.png b/examples/seneca/begin-endShape/3d/endShape-3dtest-triangles/p5_result.png
deleted file mode 100644
index 59c85bb0d..000000000
Binary files a/examples/seneca/begin-endShape/3d/endShape-3dtest-triangles/p5_result.png and /dev/null differ
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglestrip/endShape-3dtest-trianglestrip.html b/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglestrip/endShape-3dtest-trianglestrip.html
deleted file mode 100644
index fe69b9e67..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglestrip/endShape-3dtest-trianglestrip.html
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-  
-    
-    
-  
-  
-    

beginShape() and endShape() test

- -

- - -

- -
-size(500, 200, P3D);
-background(200);
-box(10);
-beginShape(TRIANGLE_STRIP);
-vertex(30, 75);
-vertex(40, 20);
-vertex(50, 75);
-vertex(60, 20);
-vertex(70, 75);
-vertex(80, 20);
-vertex(90, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(130, 75);
-vertex(140, 20);
-vertex(150, 75);
-vertex(160, 20);
-vertex(170, 75);
-vertex(180, 20);
-//vertex(190, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(230, 75);
-vertex(240, 20);
-vertex(250, 75);
-vertex(260, 20);
-vertex(270, 75);
-//vertex(280, 20);
-vertex(290, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(330, 75);
-vertex(340, 20);
-vertex(350, 75);
-vertex(360, 20);
-//vertex(370, 75);
-vertex(380, 20);
-vertex(390, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(430, 75);
-vertex(440, 20);
-vertex(450, 75);
-//vertex(460, 20);
-vertex(470, 75);
-vertex(480, 20);
-vertex(490, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(30, 175);
-vertex(40, 120);
-//vertex(50, 175);
-vertex(60, 120);
-vertex(70, 175);
-vertex(80, 120);
-vertex(90, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(130, 175);
-//vertex(140, 120);
-vertex(150, 175);
-vertex(160, 120);
-vertex(170, 175);
-vertex(180, 120);
-vertex(190, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-//vertex(230, 175);
-vertex(240, 120);
-vertex(250, 175);
-vertex(260, 120);
-vertex(270, 175);
-vertex(280, 120);
-vertex(290, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(330, 175);
-vertex(340, 120);
-vertex(350, 175);
-vertex(360, 120);
-vertex(370, 175);
-//vertex(380, 120);
-//vertex(390, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(430, 175);
-vertex(440, 120);
-vertex(450, 175);
-vertex(460, 120);
-//vertex(470, 175);
-//vertex(480, 120);
-//vertex(490, 175);
-endShape();
-  
-
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglestrip/endShape-3dtest-trianglestrip.pjs b/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglestrip/endShape-3dtest-trianglestrip.pjs
deleted file mode 100644
index 1c33aeb78..000000000
--- a/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglestrip/endShape-3dtest-trianglestrip.pjs
+++ /dev/null
@@ -1,102 +0,0 @@
-size(500, 200, P3D);
-background(200);
-box(10);
-beginShape(TRIANGLE_STRIP);
-vertex(30, 75);
-vertex(40, 20);
-vertex(50, 75);
-vertex(60, 20);
-vertex(70, 75);
-vertex(80, 20);
-vertex(90, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(130, 75);
-vertex(140, 20);
-vertex(150, 75);
-vertex(160, 20);
-vertex(170, 75);
-vertex(180, 20);
-//vertex(190, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(230, 75);
-vertex(240, 20);
-vertex(250, 75);
-vertex(260, 20);
-vertex(270, 75);
-//vertex(280, 20);
-vertex(290, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(330, 75);
-vertex(340, 20);
-vertex(350, 75);
-vertex(360, 20);
-//vertex(370, 75);
-vertex(380, 20);
-vertex(390, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(430, 75);
-vertex(440, 20);
-vertex(450, 75);
-//vertex(460, 20);
-vertex(470, 75);
-vertex(480, 20);
-vertex(490, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(30, 175);
-vertex(40, 120);
-//vertex(50, 175);
-vertex(60, 120);
-vertex(70, 175);
-vertex(80, 120);
-vertex(90, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(130, 175);
-//vertex(140, 120);
-vertex(150, 175);
-vertex(160, 120);
-vertex(170, 175);
-vertex(180, 120);
-vertex(190, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-//vertex(230, 175);
-vertex(240, 120);
-vertex(250, 175);
-vertex(260, 120);
-vertex(270, 175);
-vertex(280, 120);
-vertex(290, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(330, 175);
-vertex(340, 120);
-vertex(350, 175);
-vertex(360, 120);
-vertex(370, 175);
-//vertex(380, 120);
-//vertex(390, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-vertex(430, 175);
-vertex(440, 120);
-vertex(450, 175);
-vertex(460, 120);
-//vertex(470, 175);
-//vertex(480, 120);
-//vertex(490, 175);
-endShape();
\ No newline at end of file
diff --git a/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglestrip/p5_result.png b/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglestrip/p5_result.png
deleted file mode 100644
index b3cd8d7a6..000000000
Binary files a/examples/seneca/begin-endShape/3d/endShape-3dtest-trianglestrip/p5_result.png and /dev/null differ
diff --git a/examples/seneca/bezier/bezier.html b/examples/seneca/bezier/bezier.html
deleted file mode 100644
index 09d19b389..000000000
--- a/examples/seneca/bezier/bezier.html
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-    Processing.js test of bezier()
-    
-   
-
-
-    

- - bezier() -

- -

- Draws a Bezier curve on the screen. -

- - - - -
- - - - - -

- Source Code:

-
-noFill();
-stroke(255, 102, 0);
-line(30, 20, 80, 5);
-line(80, 75, 30, 75);
-stroke(0, 0, 0);
-bezier(30, 20,  80, 5,  80, 75,  30, 75);
-
-noFill();
-stroke(255, 102, 0);
-line(85, 20, 10, 10);
-line(90, 90, 15, 80);
-stroke(0, 0, 0);
-bezier(85, 20, 10, 10, 90, 90, 15, 80);
-        
-
- - \ No newline at end of file diff --git a/examples/seneca/bezier/bezier.pjs b/examples/seneca/bezier/bezier.pjs deleted file mode 100644 index f1a756acb..000000000 --- a/examples/seneca/bezier/bezier.pjs +++ /dev/null @@ -1,6 +0,0 @@ -noFill(); -stroke(255, 102, 0); -line(30, 20, 80, 5); -line(80, 75, 30, 75); -stroke(0, 0, 0); -bezier(30, 20, 80, 5, 80, 75, 30, 75); \ No newline at end of file diff --git a/examples/seneca/bezier/bezier2.pjs b/examples/seneca/bezier/bezier2.pjs deleted file mode 100644 index 4c99bea5f..000000000 --- a/examples/seneca/bezier/bezier2.pjs +++ /dev/null @@ -1,6 +0,0 @@ -noFill(); -stroke(255, 102, 0); -line(85, 20, 10, 10); -line(90, 90, 15, 80); -stroke(0, 0, 0); -bezier(85, 20, 10, 10, 90, 90, 15, 80); \ No newline at end of file diff --git a/examples/seneca/bezier/bezier_.gif b/examples/seneca/bezier/bezier_.gif deleted file mode 100644 index 5d71c005b..000000000 Binary files a/examples/seneca/bezier/bezier_.gif and /dev/null differ diff --git a/examples/seneca/bezier/bezier_2.gif b/examples/seneca/bezier/bezier_2.gif deleted file mode 100644 index fdbdfc8fd..000000000 Binary files a/examples/seneca/bezier/bezier_2.gif and /dev/null differ diff --git a/examples/seneca/bezier3D/bezier.html b/examples/seneca/bezier3D/bezier.html deleted file mode 100644 index a14be3075..000000000 --- a/examples/seneca/bezier3D/bezier.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - Processing.js test of bezier() 3D - - - - -

- - bezier() -

- -

- Draws a Bezier curve on the screen. -

- - - - -
- - - - - -

- Source Code:

-
-size(100, 100, P3D);
-noFill();
-stroke(255, 102, 0);
-line(30, 20, 80, 5);
-line(80, 75, 30, 75);
-stroke(0, 0, 0);
-bezier(30, 20, 0,  80, 5, 0,  80, 75, 0,  30, 75, 0);
-
-size(100, 100, P3D);
-noFill();
-stroke(255, 102, 0);
-line(85, 20, 10, 10);
-line(90, 90, 15, 80);
-stroke(0, 0, 0);
-bezier(85, 20, 0, 10, 10, 0, 90, 90, 0, 15, 80, 0);
-        
-
- - diff --git a/examples/seneca/bezier3D/bezier.pjs b/examples/seneca/bezier3D/bezier.pjs deleted file mode 100644 index aa80e2f2e..000000000 --- a/examples/seneca/bezier3D/bezier.pjs +++ /dev/null @@ -1,7 +0,0 @@ -size(100, 100, P3D); -noFill(); -stroke(255, 102, 0); -line(30, 20, 80, 5); -line(80, 75, 30, 75); -stroke(0, 0, 0); -bezier(30, 20, 0, 80, 5, 0, 80, 75, 0, 30, 75, 0); diff --git a/examples/seneca/bezier3D/bezier2.pjs b/examples/seneca/bezier3D/bezier2.pjs deleted file mode 100644 index 03418a867..000000000 --- a/examples/seneca/bezier3D/bezier2.pjs +++ /dev/null @@ -1,7 +0,0 @@ -size(100, 100, P3D); -noFill(); -stroke(255, 102, 0); -line(85, 20, 10, 10); -line(90, 90, 15, 80); -stroke(0, 0, 0); -bezier(85, 20, 0, 10, 10, 0, 90, 90, 0, 15, 80, 0); diff --git a/examples/seneca/bezier3D/bezier_.gif b/examples/seneca/bezier3D/bezier_.gif deleted file mode 100644 index 5d71c005b..000000000 Binary files a/examples/seneca/bezier3D/bezier_.gif and /dev/null differ diff --git a/examples/seneca/bezier3D/bezier_2.gif b/examples/seneca/bezier3D/bezier_2.gif deleted file mode 100644 index fdbdfc8fd..000000000 Binary files a/examples/seneca/bezier3D/bezier_2.gif and /dev/null differ diff --git a/examples/seneca/bezier3D/jellyfish.html b/examples/seneca/bezier3D/jellyfish.html deleted file mode 100644 index 4796ad0eb..000000000 --- a/examples/seneca/bezier3D/jellyfish.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - -

bezier 3D demo

- -

- -

- -
-int numSystems = 40;
-PSystem[] ps = new PSystem[numSystems];
-float theta, theta2 = 0.0f;
-float r;
-float amplitude;  
-float x, y,z;
-float inx, iny, inz;
-PVector centerLoc;
-float rotx,roty;
-int bounds = 1000;
-float jx,jy,jz;
-float jxSpeed, jySpeed, jzSpeed, jxRot,jyRot,jzRot;
-int zoom;
- 
-void setup()
-{
-  size(640, 480, P3D);
-  colorMode(HSB, 360, 100, 100, 100);
-  inx = 0;
-  iny = 0;
-  centerLoc = new PVector(width/2, height/2, 0);
-  for(int i=0; i= 0; i--) {        
-      jParticle prt = (jParticle) particles.get(i);
-      prt.run();
-      //      ps_loc.z = inz+i*10;
-      prt.move(new PVector(ps_loc.x,ps_loc.y,ps_loc.z));
-       
-       
-    }
-    //ellipse(ps_loc.x,ps_loc.y, 10, 10);
-  }
- 
-  void update()
-  {
-    th += 0.0025f;
-    ps_loc.x = inx + r * cos(th);
-    ps_loc.y = iny + r * sin(th);
-    ps_loc.z = inz - r/2;
-    ps_loc.x += random(-30.0f, 30.0f);
-    ps_loc.y += random(-30.0f, 30.0f);
-    //    ps_loc.z += random(-30.0f, 30.0f);
- 
-  }
- 
-}
-class jParticle {
-  PVector loc;
-  PVector vel;
-  PVector acc;
-  float ms;
-  float counter;
-  float lengthVar;
- 
-  jParticle(PVector a, PVector v, PVector l, float ms_, float counter_) {
-    acc = a;
-    vel = v;
-    loc = l;
-    ms = ms_;
-    counter = counter_;
-    lengthVar = random (30);
-  }
- 
-  void run() {
-    update();
-    render();
-    //    print (counter);
-  }
- 
-  void update() {
-    vel.add(acc);
-    loc.add(vel);
-    acc = new PVector();
-  }
- 
-  void render() {
-    noStroke();
-    fill(257, 28, 65, 10);
-    float tenticleSize = ms/30 + 1;
-    strokeWeight(tenticleSize);
-    //    ellipse(loc.x,loc.y, ms/8, ms/8);
-    stroke(238, 14, 85, 30);
-    point(loc.x,loc.y,loc.z-ms*4);
-    float al = map(vel.mag(), 0, 1.2, .1, 3);
- 
-    stroke(238, 14, 85, al);
-//    stroke(238, 14, 85, 100);
-    //print(counter%5 + " ");
-    //    if(ms >= 69.5)
-    noFill();
-    strokeWeight(1.5);
-    if(ms <= 5) {
-      bezier(inx,iny,inz+70, loc.x - (inx-loc.x)/20,loc.y - (iny-loc.y)/20,inz+60,loc.x - (inx-loc.x)/3,loc.y - (iny-loc.y)/3,inz-10,loc.x,loc.y,loc.z + lengthVar);
-       bezier(loc.x + (inx-loc.x)/1.5,loc.y + (iny-loc.y)/1.5,inz+20, loc.x - (inx-loc.x)/40,loc.y - (iny-loc.y)/40,inz+40,loc.x - (inx-loc.x)/3,loc.y - (iny-loc.y)/3,inz-10,loc.x,loc.y,loc.z + lengthVar);
-    }
-  }
- 
-  void move(PVector target) {
-    acc.add(steer(target));
-  }    
- 
-  PVector getLocation() {
-    return loc;
-  } 
- 
-  PVector steer(PVector target) {
-    PVector steer;
-    PVector desired = PVector.sub(target,loc);
-    float d = desired.mag();
-    desired.normalize();
-    desired.mult(3.5f);
-    steer = PVector.sub(desired,vel);
-    steer.limit(3.0f);
-    steer.div(ms);
-    return steer;
-  }
-} 
-    
- - diff --git a/examples/seneca/bezier3D/jellyfish.pjs b/examples/seneca/bezier3D/jellyfish.pjs deleted file mode 100644 index 18bcd4dba..000000000 --- a/examples/seneca/bezier3D/jellyfish.pjs +++ /dev/null @@ -1,193 +0,0 @@ -int numSystems = 40; -PSystem[] ps = new PSystem[numSystems]; -float theta, theta2 = 0.0f; -float r; -float amplitude; -float x, y,z; -float inx, iny, inz; -PVector centerLoc; -float rotx,roty; -int bounds = 1000; -float jx,jy,jz; -float jxSpeed, jySpeed, jzSpeed, jxRot,jyRot,jzRot; -int zoom; - -void setup() -{ - size(640, 480, P3D); - colorMode(HSB, 360, 100, 100, 100); - inx = 0; - iny = 0; - centerLoc = new PVector(width/2, height/2, 0); - for(int i=0; i= 0; i--) { - jParticle prt = (jParticle) particles.get(i); - prt.run(); - // ps_loc.z = inz+i*10; - prt.move(new PVector(ps_loc.x,ps_loc.y,ps_loc.z)); - - - } - //ellipse(ps_loc.x,ps_loc.y, 10, 10); - } - - void update() - { - th += 0.0025f; - ps_loc.x = inx + r * cos(th); - ps_loc.y = iny + r * sin(th); - ps_loc.z = inz - r/2; - ps_loc.x += random(-30.0f, 30.0f); - ps_loc.y += random(-30.0f, 30.0f); - // ps_loc.z += random(-30.0f, 30.0f); - - } - -} -class jParticle { - PVector loc; - PVector vel; - PVector acc; - float ms; - float counter; - float lengthVar; - - jParticle(PVector a, PVector v, PVector l, float ms_, float counter_) { - acc = a; - vel = v; - loc = l; - ms = ms_; - counter = counter_; - lengthVar = random (30); - } - - void run() { - update(); - render(); - // print (counter); - } - - void update() { - vel.add(acc); - loc.add(vel); - acc = new PVector(); - } - - void render() { - noStroke(); - fill(257, 28, 65, 10); - float tenticleSize = ms/30 + 1; - strokeWeight(tenticleSize); - // ellipse(loc.x,loc.y, ms/8, ms/8); - stroke(238, 14, 85, 30); - point(loc.x,loc.y,loc.z-ms*4); - float al = map(vel.mag(), 0, 1.2, .1, 3); - - stroke(238, 14, 85, al); -// stroke(238, 14, 85, 100); - //print(counter%5 + " "); - // if(ms >= 69.5) - noFill(); - strokeWeight(1.5); - if(ms <= 5) { - bezier(inx,iny,inz+70, loc.x - (inx-loc.x)/20,loc.y - (iny-loc.y)/20,inz+60,loc.x - (inx-loc.x)/3,loc.y - (iny-loc.y)/3,inz-10,loc.x,loc.y,loc.z + lengthVar); - bezier(loc.x + (inx-loc.x)/1.5,loc.y + (iny-loc.y)/1.5,inz+20, loc.x - (inx-loc.x)/40,loc.y - (iny-loc.y)/40,inz+40,loc.x - (inx-loc.x)/3,loc.y - (iny-loc.y)/3,inz-10,loc.x,loc.y,loc.z + lengthVar); - } - } - - void move(PVector target) { - acc.add(steer(target)); - } - - PVector getLocation() { - return loc; - } - - PVector steer(PVector target) { - PVector steer; - PVector desired = PVector.sub(target,loc); - float d = desired.mag(); - desired.normalize(); - desired.mult(3.5f); - steer = PVector.sub(desired,vel); - steer.limit(3.0f); - steer.div(ms); - return steer; - } -} diff --git a/examples/seneca/bezierDetail/bezierDetail.gif b/examples/seneca/bezierDetail/bezierDetail.gif deleted file mode 100644 index d315d5f2f..000000000 Binary files a/examples/seneca/bezierDetail/bezierDetail.gif and /dev/null differ diff --git a/examples/seneca/bezierDetail/bezierDetail.html b/examples/seneca/bezierDetail/bezierDetail.html deleted file mode 100644 index 0b036ca7e..000000000 --- a/examples/seneca/bezierDetail/bezierDetail.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - -

bezierDetail() test

- -

- - -

- -
-void setup() {
-  size(100, 100, P3D);
-  noFill();
-  noLoop();
-}
-
-void draw() {
-  bezierDetail(1);
-  bezier(85, 20, 0, 10, 10, 0, 90, 90, 0, 15, 80, 0);
-  stroke(126);
-  bezierDetail(3);
-  bezier(85, 20, 0, 10, 10, 0, 90, 90, 0, 15, 80, 0);
-  stroke(255);
-  bezierDetail(12);
-  bezier(85, 20, 0, 10, 10, 0, 90, 90, 0, 15, 80, 0);
-}
-    
- - diff --git a/examples/seneca/bezierDetail/bezierDetail.pjs b/examples/seneca/bezierDetail/bezierDetail.pjs deleted file mode 100644 index 04eda47f2..000000000 --- a/examples/seneca/bezierDetail/bezierDetail.pjs +++ /dev/null @@ -1,16 +0,0 @@ -void setup() { - size(100, 100, P3D); - noFill(); - noLoop(); -} - -void draw() { - bezierDetail(1); - bezier(85, 20, 0, 10, 10, 0, 90, 90, 0, 15, 80, 0); - stroke(126); - bezierDetail(3); - bezier(85, 20, 0, 10, 10, 0, 90, 90, 0, 15, 80, 0); - stroke(255); - bezierDetail(12); - bezier(85, 20, 0, 10, 10, 0, 90, 90, 0, 15, 80, 0); -} diff --git a/examples/seneca/bezierTangent/bezierTangent.html b/examples/seneca/bezierTangent/bezierTangent.html deleted file mode 100644 index 206d45c0a..000000000 --- a/examples/seneca/bezierTangent/bezierTangent.html +++ /dev/null @@ -1,60 +0,0 @@ - -A Processing.js Example - - - - - - - - - -
-

A Processing.js bezierTangent() Example

- - - -
- - diff --git a/examples/seneca/bezierVertex/bezierVertex.html b/examples/seneca/bezierVertex/bezierVertex.html deleted file mode 100644 index 082efd182..000000000 --- a/examples/seneca/bezierVertex/bezierVertex.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - -

bezierVertex() test

- -

- - -

- -
-size(200, 200);
-background(0);
-noFill();
-
-stroke(102);
-beginShape();
-curveVertex(168, 182);
-curveVertex(168, 182);
-curveVertex(136, 38);
-curveVertex(42, 34);
-curveVertex(64, 200);
-curveVertex(64, 200);
-endShape();
-
-stroke(51);
-beginShape(LINES);
-vertex(60, 40);
-vertex(160, 10);
-vertex(170, 150);
-vertex(60, 150);
-endShape();
-
-stroke(126);
-beginShape();
-vertex(60, 40);
-bezierVertex(160, 10, 170, 150, 60, 150);
-endShape();
-
-stroke(255);
-beginShape(POINTS);
-vertex(60, 40);
-vertex(160, 10);
-vertex(170, 150);
-vertex(60, 150);
-endShape();
-    
- - diff --git a/examples/seneca/bezierVertex/bezierVertex.pjs b/examples/seneca/bezierVertex/bezierVertex.pjs deleted file mode 100644 index 0e55ee9ff..000000000 --- a/examples/seneca/bezierVertex/bezierVertex.pjs +++ /dev/null @@ -1,36 +0,0 @@ -size(200, 200); -background(0); -noFill(); - -stroke(102); -beginShape(); -curveVertex(168, 182); -curveVertex(168, 182); -curveVertex(136, 38); -curveVertex(42, 34); -curveVertex(64, 200); -curveVertex(64, 200); -endShape(); - -stroke(51); -beginShape(LINES); -vertex(60, 40); -vertex(160, 10); -vertex(170, 150); -vertex(60, 150); -endShape(); - -stroke(126); -beginShape(); -vertex(60, 40); -bezierDetail(30); -bezierVertex(160, 10, 170, 150, 60, 150); -endShape(); - -stroke(255); -beginShape(POINTS); -vertex(60, 40); -vertex(160, 10); -vertex(170, 150); -vertex(60, 150); -endShape(); diff --git a/examples/seneca/bezierVertex/bezierVertex1.pjs b/examples/seneca/bezierVertex/bezierVertex1.pjs deleted file mode 100644 index 07064b6d0..000000000 --- a/examples/seneca/bezierVertex/bezierVertex1.pjs +++ /dev/null @@ -1,6 +0,0 @@ -background(125); -noFill(); -beginShape(); -vertex(30, 20); -bezierVertex(80, 0, 80, 75, 30, 75); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bezierVertex/bezierVertex2.html b/examples/seneca/bezierVertex/bezierVertex2.html deleted file mode 100644 index 5dc2cec42..000000000 --- a/examples/seneca/bezierVertex/bezierVertex2.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - Processing.js test of bezierVertex() - - - - -

- - bezier() -

- -

- Draws a Bezier curve on the screen. -

- - - - - - -
- -

- Source Code:

-
-background(125);
-noFill();
-beginShape();
-vertex(30, 20);
-bezierVertex(80, 0, 80, 75, 30, 75);
-endShape();
-
-background(125);
-beginShape();
-vertex(30, 20);
-bezierVertex(80, 0, 80, 75, 30, 75);
-bezierVertex(50, 80, 60, 25, 30, 20);
-endShape();
-        
-
- - diff --git a/examples/seneca/bezierVertex/bezierVertex2.pjs b/examples/seneca/bezierVertex/bezierVertex2.pjs deleted file mode 100644 index 6acc13350..000000000 --- a/examples/seneca/bezierVertex/bezierVertex2.pjs +++ /dev/null @@ -1,6 +0,0 @@ -background(125); -beginShape(); -vertex(30, 20); -bezierVertex(80, 0, 80, 75, 30, 75); -bezierVertex(50, 80, 60, 25, 30, 20); -endShape(); diff --git a/examples/seneca/bezierVertex/bezierVertex_.gif b/examples/seneca/bezierVertex/bezierVertex_.gif deleted file mode 100644 index e1bc2c0f5..000000000 Binary files a/examples/seneca/bezierVertex/bezierVertex_.gif and /dev/null differ diff --git a/examples/seneca/bezierVertex/bezierVertex_2.gif b/examples/seneca/bezierVertex/bezierVertex_2.gif deleted file mode 100644 index ada415de0..000000000 Binary files a/examples/seneca/bezierVertex/bezierVertex_2.gif and /dev/null differ diff --git a/examples/seneca/bezierVertex/p5_result.png b/examples/seneca/bezierVertex/p5_result.png deleted file mode 100644 index 15d5c6249..000000000 Binary files a/examples/seneca/bezierVertex/p5_result.png and /dev/null differ diff --git a/examples/seneca/bezierVertex3D/bezierVertex.html b/examples/seneca/bezierVertex3D/bezierVertex.html deleted file mode 100644 index 91bfdeab4..000000000 --- a/examples/seneca/bezierVertex3D/bezierVertex.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - -

bezierVertex() test

- -

- - -

- -
-size(200, 200, P3D);
-background(0);
-noFill();
-
-stroke(102);
-beginShape();
-curveVertex(168, 182);
-curveVertex(168, 182);
-curveVertex(136, 38);
-curveVertex(42, 34);
-curveVertex(64, 200);
-curveVertex(64, 200);
-endShape();
-
-stroke(51);
-beginShape(LINES);
-vertex(60, 40);
-vertex(160, 10);
-vertex(170, 150);
-vertex(60, 150);
-endShape();
-
-stroke(126);
-beginShape();
-vertex(60, 40);
-bezierVertex(160, 10, 0, 170, 150, 0, 60, 150, 0);
-endShape();
-
-stroke(255);
-beginShape(POINTS);
-vertex(60, 40);
-vertex(160, 10);
-vertex(170, 150);
-vertex(60, 150);
-endShape();
-    
- - diff --git a/examples/seneca/bezierVertex3D/bezierVertex.pjs b/examples/seneca/bezierVertex3D/bezierVertex.pjs deleted file mode 100644 index 401450142..000000000 --- a/examples/seneca/bezierVertex3D/bezierVertex.pjs +++ /dev/null @@ -1,36 +0,0 @@ -size(200, 200, P3D); -background(0); -noFill(); - -stroke(102); -beginShape(); -curveVertex(168, 182); -curveVertex(168, 182); -curveVertex(136, 38); -curveVertex(42, 34); -curveVertex(64, 200); -curveVertex(64, 200); -endShape(); - -stroke(51); -beginShape(LINES); -vertex(60, 40); -vertex(160, 10); -vertex(170, 150); -vertex(60, 150); -endShape(); - -stroke(126); -beginShape(); -vertex(60, 40); -bezierDetail(30); -bezierVertex(160, 10, 0, 170, 150, 0, 60, 150, 0); -endShape(); - -stroke(255); -beginShape(POINTS); -vertex(60, 40); -vertex(160, 10); -vertex(170, 150); -vertex(60, 150); -endShape(); diff --git a/examples/seneca/bezierVertex3D/bezierVertex1.pjs b/examples/seneca/bezierVertex3D/bezierVertex1.pjs deleted file mode 100644 index c8aa3424b..000000000 --- a/examples/seneca/bezierVertex3D/bezierVertex1.pjs +++ /dev/null @@ -1,7 +0,0 @@ -size(100, 100, P3D); -background(125); -noFill(); -beginShape(); -vertex(30, 20); -bezierVertex(80, 0, 0, 80, 75, 0, 30, 75, 0); -endShape(); diff --git a/examples/seneca/bezierVertex3D/bezierVertex2.html b/examples/seneca/bezierVertex3D/bezierVertex2.html deleted file mode 100644 index 46f2defb7..000000000 --- a/examples/seneca/bezierVertex3D/bezierVertex2.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - Processing.js test of bezierVertex() - - - - -

- - bezier() -

- -

- Draws a Bezier curve on the screen. -

- - - - - - -
- -

- Source Code:

-
-size(100, 100, P3D);
-background(125);
-noFill();
-beginShape();
-vertex(30, 20);
-bezierVertex(80, 0, 0, 80, 75, 0, 30, 75, 0);
-endShape();
-
-size(100, 100, P3D);
-background(125);
-beginShape();
-vertex(30, 20);
-bezierVertex(80, 0, 0, 80, 75, 0, 30, 75, 0);
-bezierVertex(50, 80, 0, 60, 25, 0, 30, 20, 0);
-endShape();
-        
-
- - diff --git a/examples/seneca/bezierVertex3D/bezierVertex2.pjs b/examples/seneca/bezierVertex3D/bezierVertex2.pjs deleted file mode 100644 index b83aa5d1c..000000000 --- a/examples/seneca/bezierVertex3D/bezierVertex2.pjs +++ /dev/null @@ -1,7 +0,0 @@ -size(100, 100, P3D); -background(125); -beginShape(); -vertex(30, 20); -bezierVertex(80, 0, 0, 80, 75, 0, 30, 75, 0); -bezierVertex(50, 80, 0, 60, 25, 0, 30, 20, 0); -endShape(); diff --git a/examples/seneca/bezierVertex3D/bezierVertex_.gif b/examples/seneca/bezierVertex3D/bezierVertex_.gif deleted file mode 100644 index e1bc2c0f5..000000000 Binary files a/examples/seneca/bezierVertex3D/bezierVertex_.gif and /dev/null differ diff --git a/examples/seneca/bezierVertex3D/bezierVertex_2.gif b/examples/seneca/bezierVertex3D/bezierVertex_2.gif deleted file mode 100644 index ada415de0..000000000 Binary files a/examples/seneca/bezierVertex3D/bezierVertex_2.gif and /dev/null differ diff --git a/examples/seneca/bezierVertex3D/p5_result.png b/examples/seneca/bezierVertex3D/p5_result.png deleted file mode 100644 index 15d5c6249..000000000 Binary files a/examples/seneca/bezierVertex3D/p5_result.png and /dev/null differ diff --git a/examples/seneca/binary/binary.html b/examples/seneca/binary/binary.html deleted file mode 100644 index 2276e62d7..000000000 --- a/examples/seneca/binary/binary.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - - - -

Andor Salga

-

binary test

- -

This page tests to make sure my implementation of binary works for the
- -Processing.js library. -

- -

- -

-
- -
// Test written by Andor Salga
-int testsPassed = 0;
-boolean failed = false;
-
-void setup()
-{
-    size(600,200);
-    fill(0);
-    
-    PFont fontA = loadFont("courier");
-    textFont(fontA, 14);
-    
-    int i1_32 = 0;
-    String si1_32 = "00000000000000000000000000000000";
-    
-    int i2_32 = 1;
-    String si2_32 = "00000000000000000000000000000001";
-    
-    int i3_32 = 5;
-    String si3_32 = "00000000000000000000000000000101";
-    
-    int i4_32 = 2;
-    String si4_32 ="00000000000000000000000000000010";
-    
-    int i5_32 = 255;
-    String si5_32 = "00000000000000000000000011111111";
-    
-    int i6_32 = -5;
-    String si6_32 = "11111111111111111111111111111011";
-    
-    int i7_32 = -255;
-    String si7_32 = "11111111111111111111111100000001";
-    
-    int i8_32 = -452343;
-    String si8_32 = "11111111111110010001100100001001";
-    
-    int i9_25 = 23847192;
-    String si9_25 = "1011010111110000100011000";
-    
-    int i10_31 = 1431655765;
-    String si10_31 = "1010101010101010101010101010101";
-    
-    
-    // BYTES
-    byte b1_32 = 0;
-    String sb1_32 = "00000000000000000000000000000000";
-    
-    byte b2_8 = 1;
-    String sb2_8 = "00000001";
-    
-    byte b3_3 = 5;
-    String sb3_3 = "101";
-    
-    byte b4_8 = -1;
-    String sb4_8 = "11111111";
-    
-    byte b5_8 = -5;
-    String sb5_8 = "11111011";
-    
-    byte b6_5 = -5;
-    String sb6_5 = "11011";
-    
-    byte b7_8 = 127;
-    String sb7_8 = "01111111";
-    
-    byte b8_8 = -127;
-    String sb8_8 = "10000001";
-    
-    byte b9_8 = 42;
-    String sb9_8 = "00101010";
-    
-    byte b10_4 = 42;
-    String sb10_4 = "1010";
-    
-    // CHARS
-    char c1_17 = '0';
-    String sc1_17 = "00000000000110000";
-    
-    char c2_32 = '0';
-    String sc2_32 = "00000000000000000000000000110000";
-    
-    char c3_32 = 'a';
-    String sc3_32 = "00000000000000000000000001100001";
-    
-    char c4_32 = 'A';
-    String sc4_32 = "00000000000000000000000001000001";
-    
-    char c5_15 = ' ';
-    String sc5_15 = "000000000100000";
-    
-    char c6_32 = ' ';
-    String sc6_32 = "00000000000000000000000000100000";
-    
-    char c7 = '!';
-    String sc7 = "0000000000100001";
-    
-    char c8 = char(255);
-    String sc8 = "00000000000000000000000011111111";
-    
-    char c9_32 = char(127);
-    String sc9_32 = "00000000000000000000000001111111";
-    
-    char c10_30 = 42;
-    String sc10_30 = "000000000000000000000000101010";
-    
-    char c11_12 = 42;
-    String sc11_12 = "000000101010";
-    
-    char c12_32 = (char)-1;
-    String sc12_32 = "00000000000000001111111111111111";
-    
-    // COLORS
-    color cr1 = color(0,0,0);
-    String scr1 = "11111111000000000000000000000000";
-    
-    color cr2 = color(0,0,0,0);
-    String scr2 = "0";
-    
-    color cr3_24 = color(0,0,0);
-    String scr3_24 = "000000000000000000000000";
-    
-    color cr4 = color(0,0,0,1);
-    String scr4 = "1000000000000000000000000";
-    
-    color cr5 = color(0,0,0,255);
-    String scr5 = "11111111000000000000000000000000";
-    
-    color cr6_32 = color(255,0,0,255);
-    String scr6_32 = "11111111111111110000000000000000";
-    
-    color cr7_32 = color(127,127,127,127);
-    String scr7_32 = "1111111011111110111111101111111";
-    
-    color cr8 = color(0,127,0,127);
-    String scr8 = "1111111000000000111111100000000";
-    
-    color cr9_32 = color(128,128,128,128);
-    String scr9_32 = "10000000100000001000000010000000";
-    
-    color cr10 = color(255,128,64,8);
-    String scr10 = "1000111111111000000001000000";
-    
-    color cr11_13 = color(255,128,64,8);
-    String scr11_13 = "0000001000000";
-    
-    color cr12_25 = color(0,0,0);
-    String scr12_25 = "1000000000000000000000000";
-    
-    color cr13_32 = color(0,0,0,0);
-    String scr13_32 = "00000000000000000000000000000000";
-    
-    color cr14_1 = color(0,0,0,0);
-    String scr14_1 = "0";
-    
-    color cr15_2 = color(0,0,2,0);
-    String scr15_2 = "10";
-    
-    if(
-    // color
-    assertEquals(binary(cr1,32), scr1 ) &&
-    assertEquals(binary(cr2), scr2 ) &&
-    assertEquals(binary(cr3_24,24), scr3_24 ) &&
-    assertEquals(binary(cr4), scr4 ) &&
-    assertEquals(binary(cr5), scr5 ) &&
-    assertEquals(binary(cr6_32), scr6_32 ) &&
-    assertEquals(binary(cr7_32), scr7_32 ) &&
-    assertEquals(binary(cr8), scr8 ) &&
-    assertEquals(binary(cr9_32,32), scr9_32 ) &&
-    assertEquals(binary(cr10), scr10 ) &&
-    assertEquals(binary(cr11_13,13), scr11_13 ) &&
-    assertEquals(binary(cr12_25,25), scr12_25 ) &&
-    assertEquals(binary(cr13_32,32), scr13_32 ) &&
-    assertEquals(binary(cr14_1,1), scr14_1 ) &&
-    assertEquals(binary(cr15_2,2), scr15_2 ) &&
-    
-    // bytes
-    assertEquals(binary(b1_32,32), sb1_32 ) &&
-    assertEquals(binary(b2_8,8), sb2_8 ) &&
-    assertEquals(binary(b3_3,3), sb3_3 ) &&
-    assertEquals(binary(b4_8,8), sb4_8 ) &&
-    assertEquals(binary(b5_8,8), sb5_8 ) &&
-    assertEquals(binary(b6_5,5), sb6_5 ) &&
-    assertEquals(binary(b7_8,8), sb7_8 ) &&
-    assertEquals(binary(b8_8,8), sb8_8 ) &&
-    assertEquals(binary(b9_8,8), sb9_8 ) &&
-    assertEquals(binary(b10_4, 4), sb10_4 ) &&
-    
-    // chars
-    assertEquals(binary(c1_17,17), sc1_17 ) &&
-    assertEquals(binary(c2_32,32), sc2_32 ) &&
-    assertEquals(binary(c3_32,32), sc3_32 ) &&
-    assertEquals(binary(c4_32,32), sc4_32 ) &&
-    assertEquals(binary(c5_15,15), sc5_15 ) &&
-    assertEquals(binary(c6_32,32), sc6_32 ) &&
-    assertEquals(binary(c7), sc7 ) &&
-    assertEquals(binary(c8), sc8 ) &&
-    assertEquals(binary(c9_32,32), sc9_32 ) &&
-    assertEquals(binary(c10_30,30), sc10_30 ) &&
-    
-    // ints
-    assertEquals(binary(i1_32,32), si1_32 ) &&
-    assertEquals(binary(i2_32,32), si2_32 ) &&
-    assertEquals(binary(i3_32,32), si3_32 ) &&
-    assertEquals(binary(i4_32,32), si4_32 ) &&
-    assertEquals(binary(i5_32,32), si5_32 ) &&
-    assertEquals(binary(i6_32,32), si6_32 ) &&
-    assertEquals(binary(i7_32,32), si7_32 ) &&
-    assertEquals(binary(i8_32,32), si8_32 ) &&
-    assertEquals(binary(i9_25,25), si9_25 ) &&
-    assertEquals(binary(i10_31,31), si10_31 )
-    )
-    {
-        text("All " + testsPassed + " tests have passed.",30,30);
-    }
-    else
-    {
-        text("Failed on test " + (testsPassed+1),30,30);
-    }
-}
-
-boolean assertEquals(String str1, String str2)
-{
-    if(!failed && stringsEqual(str1, str2))
-    {
-        testsPassed++;
-        return true;
-    }
-    else
-    {
-        failed = true;
-        return false;
-    }
-}
-
-boolean stringsEqual(String str1, String str2)
-{
-    if(str1.length() != str2.length())
-    {
-        text("Value should have been -> " + str2, 30,60);
-        text("Value was actually     -> " + str1, 30,80);
-        return false;
-    }
-    
-    for(int i = 0; i <; str1.length(); i++)
-    {
-        char ai = str1[i];
-        char bi = str2[i];
-        
-        if( ai != bi )
-        {
-            text("Should have been -> " + str2, 30,60);
-            text("Was actually     -> " + str1, 30,80);
-            return false;
-        }
-    }
-    
-    return true;
-}
-
-
- - - \ No newline at end of file diff --git a/examples/seneca/blendColor/blendColor.htm b/examples/seneca/blendColor/blendColor.htm deleted file mode 100644 index 395954e2d..000000000 --- a/examples/seneca/blendColor/blendColor.htm +++ /dev/null @@ -1,11 +0,0 @@ - - - - blendColor() test - - - - -
- - diff --git a/examples/seneca/blendColor/blendColor.pjs b/examples/seneca/blendColor/blendColor.pjs deleted file mode 100644 index e3a69314d..000000000 --- a/examples/seneca/blendColor/blendColor.pjs +++ /dev/null @@ -1,162 +0,0 @@ -size(400,420); -color orange = color(204, 102, 0); -color blue = color(0, 102, 153); -color orangeblueblend = blendColor(orange, blue, BLEND); -color orangeblueadd = blendColor(orange, blue, ADD); -color orangebluesubtract = blendColor(orange, blue, SUBTRACT); -color orangebluelightest = blendColor(orange, blue, LIGHTEST); -color orangebluedarkest = blendColor(orange, blue, DARKEST); -color orangebluedifference = blendColor(orange, blue, DIFFERENCE); -color orangeblueexclusion = blendColor(orange, blue, EXCLUSION); -color orangebluemultiply = blendColor(orange, blue, MULTIPLY); -color orangebluescreen = blendColor(orange, blue, SCREEN); -color orangeblueoverlay = blendColor(orange, blue, OVERLAY); -color orangebluehard_light = blendColor(orange, blue, HARD_LIGHT); -color orangebluesoft_light = blendColor(orange, blue, SOFT_LIGHT); -color orangebluedodge = blendColor(orange, blue, DODGE); -color orangeblueburn = blendColor(orange, blue, BURN); -color red = color(255, 0, 0); -color green = color(0, 255, 0); -color redgreenadd = blendColor(red, green, ADD); -color redgreensubtract = blendColor(red, green, SUBTRACT); -color grey = color(128, 128, 128); -color bluegreyadd = blendColor(blue, grey, ADD); -color bluegreysubtract = blendColor(blue, grey, SUBTRACT); -color black = color(0,0,0); -color blackadd = blendColor(black, red, ADD); -color blacksubtract = blendColor(black, red, SUBTRACT); -background(51); -noStroke(); -fill(orange); -rect(14, 20, 60, 20); -fill(blue); -rect(14, 40, 60, 20); -fill(orangeblueadd); -rect(14, 60, 60, 20); -fill(red); -rect(112, 20, 60, 20); -fill(green); -rect(112, 40, 60, 20); -fill(redgreenadd); -rect(112, 60, 60, 20); -fill(grey); -rect(210, 20, 60, 20); -fill(blue); -rect(210, 40, 60, 20); -fill(bluegreyadd); -rect(210, 60, 60, 20); -fill(black); -rect(308, 20, 60, 20); -fill(blackadd); -rect(308, 40, 60, 20); -fill(red); -rect(308, 60, 60, 20); -// subtract tests -fill(orange); -rect(14, 100, 60, 20); -fill(blue); -rect(14, 120, 60, 20); -fill(orangebluesubtract); -rect(14, 140, 60, 20); -fill(red); -rect(112, 100, 60, 20); -fill(green); -rect(112, 120, 60, 20); -fill(redgreensubtract); -rect(112, 140, 60, 20); -fill(grey); -rect(210, 100, 60, 20); -fill(blue); -rect(210, 120, 60, 20); -fill(bluegreysubtract); -rect(210, 140, 60, 20); -fill(black); -rect(308, 100, 60, 20); -fill(blacksubtract); -rect(308, 120, 60, 20); -fill(red); -rect(308, 140, 60, 20); -//blend -fill(orange); -rect(14, 180, 60, 20); -fill(blue); -rect(14, 200, 60, 20); -fill(orangeblueblend); -rect(14, 220, 60, 20); -//lightest -fill(orange); -rect(112, 180, 60, 20); -fill(blue); -rect(112, 200, 60, 20); -fill(orangebluelightest); -rect(112, 220, 60, 20); -//darkest -fill(orange); -rect(210, 180, 60, 20); -fill(blue); -rect(210, 200, 60, 20); -fill(orangebluedarkest); -rect(210, 220, 60, 20); -//difference -fill(orange); -rect(308, 180, 60, 20); -fill(blue); -rect(308, 200, 60, 20); -fill(orangebluedifference); -rect(308, 220, 60, 20); -//exclusion -fill(orange); -rect(14, 260, 60, 20); -fill(blue); -rect(14, 280, 60, 20); -fill(orangeblueexclusion); -rect(14, 300, 60, 20); -//multiply -fill(orange); -rect(112, 260, 60, 20); -fill(blue); -rect(112, 280, 60, 20); -fill(orangebluemultiply); -rect(112, 300, 60, 20); -//screen -fill(orange); -rect(210, 260, 60, 20); -fill(blue); -rect(210, 280, 60, 20); -fill(orangebluescreen); -rect(210, 300, 60, 20); -//overlay -fill(orange); -rect(308, 260, 60, 20); -fill(blue); -rect(308, 280, 60, 20); -fill(orangeblueoverlay); -rect(308, 300, 60, 20); -//hard_light -fill(orange); -rect(14, 340, 60, 20); -fill(blue); -rect(14, 360, 60, 20); -fill(orangebluehard_light); -rect(14, 380, 60, 20); -//soft_light -fill(orange); -rect(112, 340, 60, 20); -fill(blue); -rect(112, 360, 60, 20); -fill(orangebluesoft_light); -rect(112, 380, 60, 20); -//dodge -fill(orange); -rect(210, 340, 60, 20); -fill(blue); -rect(210, 360, 60, 20); -fill(orangebluedodge); -rect(210, 380, 60, 20); -//burn -fill(orange); -rect(308, 340, 60, 20); -fill(blue); -rect(308, 360, 60, 20); -fill(orangeblueburn); -rect(308, 380, 60, 20); \ No newline at end of file diff --git a/examples/seneca/blendColor/swatches.png b/examples/seneca/blendColor/swatches.png deleted file mode 100644 index 7ce9882cc..000000000 Binary files a/examples/seneca/blendColor/swatches.png and /dev/null differ diff --git a/examples/seneca/bug1116/index.html b/examples/seneca/bug1116/index.html deleted file mode 100644 index ea02565ee..000000000 --- a/examples/seneca/bug1116/index.html +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/examples/seneca/bug1116/test.pjs b/examples/seneca/bug1116/test.pjs deleted file mode 100644 index 40d0ca894..000000000 --- a/examples/seneca/bug1116/test.pjs +++ /dev/null @@ -1,14 +0,0 @@ -void setup(){ - size(300, 300, P3D); - noStroke(); -} - -void draw(){ - background(0); - lights(); - translate(width/2, height/2, 0); - for(int i = 0; i < 100; i++){ - sphere(30); - } - document.getElementById('fps').innerHTML = Math.floor(frameRate); -} \ No newline at end of file diff --git a/examples/seneca/bug277/test1/test.html b/examples/seneca/bug277/test1/test.html deleted file mode 100644 index c11d7a659..000000000 --- a/examples/seneca/bug277/test1/test.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 277

- -

This page tests the fix for bug277 in Processing.js
- This page creates a canvas with a width and height of 100 and attempts to
- load a sketch which uses a call to size(100,100,P3D). That is, the dimensions in the HTML
- and Processing sketch are identical in this test case.
-
- If a sphere is rendered in the canvas, the test has passed.
-

- -

- -

- -
-// Test from Processing.org
-import processing.opengl.*;
-
-// next line tests the parser
-// size(100, 100, P3D); 
-
-void setup() {
-  size(100, 100, P3D);
-}
-
-void draw() {
-  background(33,66,99);
-  translate(width/2, height/2, 0);
-  sphere(30);
-}
- - - diff --git a/examples/seneca/bug277/test1/test.pjs b/examples/seneca/bug277/test1/test.pjs deleted file mode 100644 index 8c8c353e0..000000000 --- a/examples/seneca/bug277/test1/test.pjs +++ /dev/null @@ -1,14 +0,0 @@ -import processing.opengl.*; - -// next line tests the parser -// size(100, 100, P3D); - -void setup() { - size(100, 100, P3D); -} - -void draw() { - background(33,66,99); - translate(width/2, height/2, 0); - sphere(30); -} \ No newline at end of file diff --git a/examples/seneca/bug277/test2/test.html b/examples/seneca/bug277/test2/test.html deleted file mode 100644 index 7c53ec5cd..000000000 --- a/examples/seneca/bug277/test2/test.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 277

- -

This page tests the fix for bug277 in Processing.js
- This page creates a canvas with a width of 123 and height of height of 456 and attempts to
- load a sketch which uses a call to size(100,100,P3D). That is, the dimensions in the HTML
- and Processing sketch are not the same in this test case.
-
- If a sphere is rendered in the canvas, the test has passed.
-

- -

- -

- -
-// Test from Processing.org
-import processing.opengl.*;
-
-// next line tests the parser
-// size(100, 100, P3D); 
-
-void setup() {
-  size(100, 100, P3D);
-}
-
-void draw() {
-  background(33,66,99);
-  translate(width/2, height/2, 0);
-  sphere(30);
-}
- - - diff --git a/examples/seneca/bug277/test2/test.pjs b/examples/seneca/bug277/test2/test.pjs deleted file mode 100644 index 8c8c353e0..000000000 --- a/examples/seneca/bug277/test2/test.pjs +++ /dev/null @@ -1,14 +0,0 @@ -import processing.opengl.*; - -// next line tests the parser -// size(100, 100, P3D); - -void setup() { - size(100, 100, P3D); -} - -void draw() { - background(33,66,99); - translate(width/2, height/2, 0); - sphere(30); -} \ No newline at end of file diff --git a/examples/seneca/bug277/test3/test.html b/examples/seneca/bug277/test3/test.html deleted file mode 100644 index 89d8dbc12..000000000 --- a/examples/seneca/bug277/test3/test.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 277

- -

This page tests the fix for bug277 in Processing.js
- This page creates a canvas with a width of 123 of height of 456 and attempts to
- load a sketch which uses a call to size(100,100,P3D). That is, the dimensions in the HTML
- and Processing sketch are not the same in this test case.
- Also, instead of using the datasrc attribute, this page calls Processing(canvas, source);
-
- If a sphere is rendered in the canvas, the test has passed.
-

- -

- - -

- -
-// Test from Processing.org
-void setup() {
-  size(100, 100, P3D);
-}
-
-void draw() {
-  background(33,66,99);
-  translate(width/2, height/2, 0);
-  sphere(30);
-}
- - - diff --git a/examples/seneca/bug277/test3/test.pjs b/examples/seneca/bug277/test3/test.pjs deleted file mode 100644 index c90ad89d0..000000000 --- a/examples/seneca/bug277/test3/test.pjs +++ /dev/null @@ -1,9 +0,0 @@ -void setup() { - size(100, 100, P3D); -} - -void draw() { - background(33,66,99); - translate(width/2, height/2, 0); - sphere(30); -} \ No newline at end of file diff --git a/examples/seneca/bug277/test4/test.html b/examples/seneca/bug277/test4/test.html deleted file mode 100644 index 0f2d8af7e..000000000 --- a/examples/seneca/bug277/test4/test.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 277

- -

This page tests the fix for bug277 in Processing.js
- This page creates a canvas without a width and height and attempts to
- load a sketch which uses a call to size(100,100,P3D). That is, the dimensions in the HTML
- and Processing sketch are not the same in this test case.
- Also, instead of using the datasrc attribute, this page calls Processing(canvas, source);
-
- If a sphere is rendered in the canvas, the test has passed.
-

- -

- - -

- -
-// Test from Processing.org
-import processing.opengl.*;
-
-void setup() {
-  size(100, 100, P3D);
-}
-
-void draw() {
-  background(33,66,99);
-  translate(width/2, height/2, 0);
-  sphere(30);
-}
- - - diff --git a/examples/seneca/bug277/test4/test.pjs b/examples/seneca/bug277/test4/test.pjs deleted file mode 100644 index aebe3a6f0..000000000 --- a/examples/seneca/bug277/test4/test.pjs +++ /dev/null @@ -1,11 +0,0 @@ -import processing.opengl.*; - -void setup() { - size(100, 100, P3D); -} - -void draw() { - background(33,66,99); - translate(width/2, height/2, 0); - sphere(30); -} \ No newline at end of file diff --git a/examples/seneca/bug277/test5/test.html b/examples/seneca/bug277/test5/test.html deleted file mode 100644 index 89ccf294b..000000000 --- a/examples/seneca/bug277/test5/test.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 277

- -

This page tests the fix for bug277 in Processing.js
- This page creates a canvas without a width and height and attempts to
- load a sketch which uses a call to size(100,100,P3D). That is, the dimensions in the HTML
- and Processing sketch are not identical in this test case.
-
- If a lit sphere is rendered in the canvas, the test has passed.
-

- -

- -

- -
-// Test from Processing.org
-void setup() {
-  size(100, 100, P3D);
-}
-
-void draw() {
-  background(0);
-  noStroke();
-  pointLight(51, 102, 126, 35, 40, 36);
-  noStroke();
-  translate(80, 50, 0);
-  sphere(30);
-}
- - - diff --git a/examples/seneca/bug277/test5/test.pjs b/examples/seneca/bug277/test5/test.pjs deleted file mode 100644 index 3cc1e0bce..000000000 --- a/examples/seneca/bug277/test5/test.pjs +++ /dev/null @@ -1,12 +0,0 @@ -void setup() { - size( 100, 100, P3D); -} - -void draw() { - background(0); - noStroke(); - pointLight(51, 102, 126, 35, 40, 36); - noStroke(); - translate(80, 50, 0); - sphere(30); -} \ No newline at end of file diff --git a/examples/seneca/bug277/test6/test.html b/examples/seneca/bug277/test6/test.html deleted file mode 100644 index 55aed5502..000000000 --- a/examples/seneca/bug277/test6/test.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 277

- -

This page tests the fix for bug277 in Processing.js
- This page creates a canvas without width and height attributes, but sets
- a width and height of 200 using css. The page then attempts to
- load a sketch which uses a call to size(100,100,P3D). That is, the dimensions in the CSS
- and Processing sketch are not identical in this test case.
-
- If a lit sphere is rendered in the canvas, the test has passed.
-

- -

- -

- -
-// Test from Processing.org
-void setup() {
-  size(100, 100, P3D);
-}
-
-void draw() {
-  background(0);
-  noStroke();
-  pointLight(51, 102, 126, 35, 40, 36);
-  noStroke();
-  translate(80, 50, 0);
-  sphere(30);
-}
- - - diff --git a/examples/seneca/bug277/test6/test.pjs b/examples/seneca/bug277/test6/test.pjs deleted file mode 100644 index 1732d0a7a..000000000 --- a/examples/seneca/bug277/test6/test.pjs +++ /dev/null @@ -1,14 +0,0 @@ -// import processing.opengl.*; - -void setup() { - size(100, 100, P3D); -} - -void draw() { - background(0); - noStroke(); - pointLight(51, 102, 126, 35, 40, 36); - noStroke(); - translate(80, 50, 0); - sphere(30); -} \ No newline at end of file diff --git a/examples/seneca/bug596/test1/p5_result.jpg b/examples/seneca/bug596/test1/p5_result.jpg deleted file mode 100644 index 70f9723fa..000000000 Binary files a/examples/seneca/bug596/test1/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug596/test1/test.html b/examples/seneca/bug596/test1/test.html deleted file mode 100644 index bb7e4dc7b..000000000 --- a/examples/seneca/bug596/test1/test.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 596

- -

This page tests the fix for bug 596 in Processing.js
- This
-

- -

- - -

- -
-// Test by Andor Salga
-import processing.opengl.*;
-
-void setup(){
-  size(100, 100, OPENGL);
-  translate(width/2, height/2);
-  box(20);
-}
- - - diff --git a/examples/seneca/bug596/test1/test.pjs b/examples/seneca/bug596/test1/test.pjs deleted file mode 100644 index f32f1c59c..000000000 --- a/examples/seneca/bug596/test1/test.pjs +++ /dev/null @@ -1,7 +0,0 @@ -import processing.opengl.*; - -void setup(){ - size(100, 100, OPENGL); - translate(width/2, height/2); - box(10); -} diff --git a/examples/seneca/bug596/test2/p5_result.jpg b/examples/seneca/bug596/test2/p5_result.jpg deleted file mode 100644 index 70f9723fa..000000000 Binary files a/examples/seneca/bug596/test2/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug596/test2/test.html b/examples/seneca/bug596/test2/test.html deleted file mode 100644 index a4236bf31..000000000 --- a/examples/seneca/bug596/test2/test.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 596

- -

This page tests the fix for bug 596 in Processing.js
- This
-

- -

- - -

- -
-// Test by Andor Salga
-import processing.opengl.*;
-
-void setup(){
-  size(100, 100, OPENGL);
-  translate(width/2, height/2, 0);
-  box(20);
-}
- - - diff --git a/examples/seneca/bug596/test2/test.pjs b/examples/seneca/bug596/test2/test.pjs deleted file mode 100644 index 15256411c..000000000 --- a/examples/seneca/bug596/test2/test.pjs +++ /dev/null @@ -1,7 +0,0 @@ -import processing.opengl.*; - -void setup(){ - size(100, 100, OPENGL); - translate(width/2, height/2, 0); - box(10); -} diff --git a/examples/seneca/bug597/test1/p5_result.jpg b/examples/seneca/bug597/test1/p5_result.jpg deleted file mode 100644 index 84015d6e9..000000000 Binary files a/examples/seneca/bug597/test1/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug597/test1/test.html b/examples/seneca/bug597/test1/test.html deleted file mode 100644 index 18615db4f..000000000 --- a/examples/seneca/bug597/test1/test.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 597

- -

This page tests the fix for bug 597 for Processing.js
- If the canvas and image below are identical, the test has passed.
-

- -

- - -

- -
-// Test by Andor Salga
-import processing.opengl.*;
-
-void setup() {
-  size( 100, 100, OPENGL );
-  translate( width/2, height/2, 0 );
-  box( 20 );
-}
-
-void draw(){}
- - - diff --git a/examples/seneca/bug597/test1/test.pjs b/examples/seneca/bug597/test1/test.pjs deleted file mode 100644 index 34bf89488..000000000 --- a/examples/seneca/bug597/test1/test.pjs +++ /dev/null @@ -1,9 +0,0 @@ -import processing.opengl.*; - -void setup() { - size( 100, 100, OPENGL ); - translate( width/2, height/2, 0 ); - box( 20 ); -} - -void draw(){} \ No newline at end of file diff --git a/examples/seneca/bug597/test2/p5_result.jpg b/examples/seneca/bug597/test2/p5_result.jpg deleted file mode 100644 index 84015d6e9..000000000 Binary files a/examples/seneca/bug597/test2/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug597/test2/test.html b/examples/seneca/bug597/test2/test.html deleted file mode 100644 index 57049de95..000000000 --- a/examples/seneca/bug597/test2/test.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 597

- -

This page tests the fix for bug 597 for Processing.js
- If the canvas and image below are identical, the test has passed.
-

- -

- - -

- -
-// Test by Andor Salga
-import processing.opengl.*;
-
-void setup() {
-  size( 100, 100, OPENGL );
-  translate( width/2, height/2, 0 );
-  box( 20 );
-}
- - - diff --git a/examples/seneca/bug597/test2/test.pjs b/examples/seneca/bug597/test2/test.pjs deleted file mode 100644 index 8444e368f..000000000 --- a/examples/seneca/bug597/test2/test.pjs +++ /dev/null @@ -1,7 +0,0 @@ -import processing.opengl.*; - -void setup() { - size( 100, 100, OPENGL ); - translate( width/2, height/2, 0 ); - box( 20 ); -} \ No newline at end of file diff --git a/examples/seneca/bug597/test3/p5_result.jpg b/examples/seneca/bug597/test3/p5_result.jpg deleted file mode 100644 index abf339ef8..000000000 Binary files a/examples/seneca/bug597/test3/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug597/test3/test.html b/examples/seneca/bug597/test3/test.html deleted file mode 100644 index e15d38805..000000000 --- a/examples/seneca/bug597/test3/test.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 597

- -

This page tests the fix for bug 597 for Processing.js
- If the canvas and image below are identical, the test has passed.
-

- -

- - -

- -
-// Test by Andor Salga
-import processing.opengl.*;
-
-void setup() {
-  size( 100, 100, OPENGL );
-  translate( width/2, height/2, 0 );
-  box( 20, 20, 20 );
-}
-
-void draw(){
-  background( 0 );
-  fill( 200, 0, 0 );
-  translate( width/2, height/2, 0 );
-  box( 40, 20, 5 );
-}
- - - diff --git a/examples/seneca/bug597/test3/test.pjs b/examples/seneca/bug597/test3/test.pjs deleted file mode 100644 index 89f09850f..000000000 --- a/examples/seneca/bug597/test3/test.pjs +++ /dev/null @@ -1,14 +0,0 @@ -import processing.opengl.*; - -void setup() { - size( 100, 100, OPENGL ); - translate( width/2, height/2, 0 ); - box( 20, 20, 20 ); -} - -void draw(){ - background( 0 ); - fill( 200, 0, 0 ); - translate( width/2, height/2, 0 ); - box( 40, 20, 5 ); -} \ No newline at end of file diff --git a/examples/seneca/bug597/test4/p5_result.jpg b/examples/seneca/bug597/test4/p5_result.jpg deleted file mode 100644 index 6184d85ea..000000000 Binary files a/examples/seneca/bug597/test4/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug597/test4/test.html b/examples/seneca/bug597/test4/test.html deleted file mode 100644 index 774d8a95f..000000000 --- a/examples/seneca/bug597/test4/test.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 597

- -

This page tests the fix for bug 597 for Processing.js
- If the canvas and image below are identical, the test has passed.
-

- -

- - -

- -
-// Test by Andor Salga
-import processing.opengl.*;
-
-void setup() {
-  size( 100, 100, OPENGL );
-  translate( width/2, height/2, 0 );
-  box( 20, 20, 20 );
-}
-
-void draw(){
-  background( 0 );
-  fill( 200, 0, 0 );
-  translate( width/2, height/2, 0 );
-  box( 40, 20, 5 );
-}
- - - diff --git a/examples/seneca/bug597/test4/test.pjs b/examples/seneca/bug597/test4/test.pjs deleted file mode 100644 index bb0e1461d..000000000 --- a/examples/seneca/bug597/test4/test.pjs +++ /dev/null @@ -1,13 +0,0 @@ -import processing.opengl.*; - -void setup() { - size( 100, 100, OPENGL ); - translate( width/2, height/2, 0 ); - box( 20, 20, 20 ); -} - -void draw(){ - fill( 200, 0, 0 ); - translate( width/2, height/2, 0 ); - box( 40, 20, 5 ); -} \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-lines/endShape-3dtest-lines.html b/examples/seneca/bug634/endShape-3dtest-lines/endShape-3dtest-lines.html deleted file mode 100644 index a81cf3825..000000000 --- a/examples/seneca/bug634/endShape-3dtest-lines/endShape-3dtest-lines.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
-size(500, 100, P3D);
-background(200);
-
-beginShape(LINES);
-stroke(255,0,0);vertex(20, 20);
-stroke(0,0,255);vertex(40, 20);
-stroke(0,255,0);vertex(40, 40);
-stroke(255,0,0);vertex(60, 40);
-stroke(0,0,255);vertex(60, 60);
-stroke(255,0,255);vertex(20, 60);
-endShape();
-
-beginShape(LINES);
-stroke(255,0,255);vertex(120, 20);
-stroke(255,0,0);vertex(140, 20);
-stroke(0,0,255);vertex(140, 40);
-stroke(0,255,0);vertex(160, 40);
-stroke(255,0,0);vertex(160, 60);
-endShape();
-
-beginShape(LINES);
-stroke(0,255,0);vertex(220, 20);
-stroke(0,255,255);vertex(240, 20);
-stroke(255,0,0);vertex(240, 40);
-stroke(0,0,255);vertex(260, 40);
-endShape();
-
-beginShape(LINES);
-stroke(0,0,255);vertex(320, 20);
-stroke(0,0,255);vertex(340, 20);
-stroke(255,0,255);vertex(340, 40);
-endShape();
-
-beginShape(LINES);
-stroke(0,0,255);vertex(420, 20);
-stroke(0,255,0);vertex(440, 20);
-endShape();
-    
- - \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-lines/endShape-3dtest-lines.pjs b/examples/seneca/bug634/endShape-3dtest-lines/endShape-3dtest-lines.pjs deleted file mode 100644 index 2e7fd9f81..000000000 --- a/examples/seneca/bug634/endShape-3dtest-lines/endShape-3dtest-lines.pjs +++ /dev/null @@ -1,37 +0,0 @@ -size(500, 100, P3D); -background(200); - -beginShape(LINES); -stroke(255,0,0);vertex(20, 20); -stroke(0,0,255);vertex(40, 20); -stroke(0,255,0);vertex(40, 40); -stroke(255,0,0);vertex(60, 40); -stroke(0,0,255);vertex(60, 60); -stroke(255,0,255);vertex(20, 60); -endShape(); - -beginShape(LINES); -stroke(255,0,255);vertex(120, 20); -stroke(255,0,0);vertex(140, 20); -stroke(0,0,255);vertex(140, 40); -stroke(0,255,0);vertex(160, 40); -stroke(255,0,0);vertex(160, 60); -endShape(); - -beginShape(LINES); -stroke(0,255,0);vertex(220, 20); -stroke(0,255,255);vertex(240, 20); -stroke(255,0,0);vertex(240, 40); -stroke(0,0,255);vertex(260, 40); -endShape(); - -beginShape(LINES); -stroke(0,0,255);vertex(320, 20); -stroke(0,0,255);vertex(340, 20); -stroke(255,0,255);vertex(340, 40); -endShape(); - -beginShape(LINES); -stroke(0,0,255);vertex(420, 20); -stroke(0,255,0);vertex(440, 20); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-lines/p5_result.jpg b/examples/seneca/bug634/endShape-3dtest-lines/p5_result.jpg deleted file mode 100644 index 2b25a4b68..000000000 Binary files a/examples/seneca/bug634/endShape-3dtest-lines/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/endShape-3dtest-noclose/endShape-3dtest-noclose.html b/examples/seneca/bug634/endShape-3dtest-noclose/endShape-3dtest-noclose.html deleted file mode 100644 index 480f8ebdc..000000000 --- a/examples/seneca/bug634/endShape-3dtest-noclose/endShape-3dtest-noclose.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
size(300, 100, P3D);
-background(0);
-
-strokeWeight(3);
-
-beginShape();
-stroke(0,255,0);fill(255,0,0);vertex(30, 20);
-stroke(0,0,255);fill(0,255,0);vertex(85, 20);
-stroke(255,0,0);fill(0,0,255);vertex(85, 75);
-stroke(255,255,255);fill(0,128,128);vertex(30, 75);
-endShape();
-
-beginShape();
-stroke(0,255,0);fill(0,128,128);vertex(130, 20);
-stroke(255,255,255);fill(128,0,128);vertex(185, 20);
-stroke(0,128,128);fill(128,128,0);vertex(185, 75);
-endShape();
-
-beginShape();
-stroke(0,0,255);fill(0);vertex(230, 20);
-stroke(255,0,0);fill(255);vertex(285, 20);
-endShape();
-
-beginShape();
-fill(255,0,0);vertex(330, 20);
-endShape();
- - \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-noclose/endShape-3dtest-noclose.pjs b/examples/seneca/bug634/endShape-3dtest-noclose/endShape-3dtest-noclose.pjs deleted file mode 100644 index 2aafdb866..000000000 --- a/examples/seneca/bug634/endShape-3dtest-noclose/endShape-3dtest-noclose.pjs +++ /dev/null @@ -1,26 +0,0 @@ -size(300, 100, P3D); -background(0); - -strokeWeight(3); - -beginShape(); -stroke(0,255,0);fill(255,0,0);vertex(30, 20); -stroke(0,0,255);fill(0,255,0);vertex(85, 20); -stroke(255,0,0);fill(0,0,255);vertex(85, 75); -stroke(255,255,255);fill(0,128,128);vertex(30, 75); -endShape(); - -beginShape(); -stroke(0,255,0);fill(0,128,128);vertex(130, 20); -stroke(255,255,255);fill(128,0,128);vertex(185, 20); -stroke(0,128,128);fill(128,128,0);vertex(185, 75); -endShape(); - -beginShape(); -stroke(0,0,255);fill(0);vertex(230, 20); -stroke(255,0,0);fill(255);vertex(285, 20); -endShape(); - -beginShape(); -fill(255,0,0);vertex(330, 20); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-noclose/p5_result.jpg b/examples/seneca/bug634/endShape-3dtest-noclose/p5_result.jpg deleted file mode 100644 index a25ec8df5..000000000 Binary files a/examples/seneca/bug634/endShape-3dtest-noclose/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/endShape-3dtest-nomod/endShape-3dtest-nomod.html b/examples/seneca/bug634/endShape-3dtest-nomod/endShape-3dtest-nomod.html deleted file mode 100644 index fd13002c1..000000000 --- a/examples/seneca/bug634/endShape-3dtest-nomod/endShape-3dtest-nomod.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
size(300, 100, P3D);
-background(0);
-
-strokeWeight(3);
-
-beginShape();
-stroke(0,255,0);fill(255,0,0);vertex(30, 20);
-stroke(0,0,255);fill(0,255,0);vertex(85, 20);
-stroke(255,0,0);fill(0,0,255);vertex(85, 75);
-stroke(255,255,255);fill(0,128,128);vertex(30, 75);
-endShape(CLOSE);
-
-beginShape();
-stroke(0,255,0);fill(0,128,128);vertex(130, 20);
-stroke(255,255,255);fill(128,0,128);vertex(185, 20);
-stroke(0,128,128);fill(128,128,0);vertex(185, 75);
-endShape(CLOSE);
-
-beginShape();
-stroke(0,0,255);fill(0);vertex(230, 20);
-stroke(255,0,0);fill(255);vertex(285, 20);
-endShape(CLOSE);
-
-beginShape();
-fill(255,0,0);vertex(330, 20);
-endShape(CLOSE);
- - \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-nomod/endShape-3dtest-nomod.pjs b/examples/seneca/bug634/endShape-3dtest-nomod/endShape-3dtest-nomod.pjs deleted file mode 100644 index 753e6e90e..000000000 --- a/examples/seneca/bug634/endShape-3dtest-nomod/endShape-3dtest-nomod.pjs +++ /dev/null @@ -1,26 +0,0 @@ -size(300, 100, P3D); -background(0); - -strokeWeight(3); - -beginShape(); -stroke(0,255,0);fill(255,0,0);vertex(30, 20); -stroke(0,0,255);fill(0,255,0);vertex(85, 20); -stroke(255,0,0);fill(0,0,255);vertex(85, 75); -stroke(255,255,255);fill(0,128,128);vertex(30, 75); -endShape(CLOSE); - -beginShape(); -stroke(0,255,0);fill(0,128,128);vertex(130, 20); -stroke(255,255,255);fill(128,0,128);vertex(185, 20); -stroke(0,128,128);fill(128,128,0);vertex(185, 75); -endShape(CLOSE); - -beginShape(); -stroke(0,0,255);fill(0);vertex(230, 20); -stroke(255,0,0);fill(255);vertex(285, 20); -endShape(CLOSE); - -beginShape(); -fill(255,0,0);vertex(330, 20); -endShape(CLOSE); \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-nomod/p5_result.jpg b/examples/seneca/bug634/endShape-3dtest-nomod/p5_result.jpg deleted file mode 100644 index 434da4063..000000000 Binary files a/examples/seneca/bug634/endShape-3dtest-nomod/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/endShape-3dtest-nomodnofill/endShape-3dtest-nomod.html b/examples/seneca/bug634/endShape-3dtest-nomodnofill/endShape-3dtest-nomod.html deleted file mode 100644 index cf5a69bb9..000000000 --- a/examples/seneca/bug634/endShape-3dtest-nomodnofill/endShape-3dtest-nomod.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
size(300, 100, P3D);
-background(0);
-strokeWeight(7);
-
-noFill();
-beginShape();
-stroke(255,0,0);vertex(30, 20);
-stroke(128,0,128);vertex(85, 20);
-stroke(128,128,0);vertex(85, 75);
-stroke(0,0,128);vertex(30, 75);
-endShape(CLOSE);
-
-beginShape();
-stroke(0,0,128);vertex(130, 20);
-stroke(128,0,128);vertex(185, 20);
-stroke(128,128,0);vertex(185, 75);
-endShape(CLOSE);
-
-beginShape();
-stroke(128,128,0);vertex(230, 20);
-stroke(0,128,128);vertex(285, 20);
-endShape(CLOSE);
-
-beginShape();
-stroke(128,128,128);vertex(330, 20);
-endShape(CLOSE);
- - \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-nomodnofill/endShape-3dtest-nomod.pjs b/examples/seneca/bug634/endShape-3dtest-nomodnofill/endShape-3dtest-nomod.pjs deleted file mode 100644 index 896707a51..000000000 --- a/examples/seneca/bug634/endShape-3dtest-nomodnofill/endShape-3dtest-nomod.pjs +++ /dev/null @@ -1,26 +0,0 @@ -size(300, 100, P3D); -background(0); -strokeWeight(7); - -noFill(); -beginShape(); -stroke(255,0,0);vertex(30, 20); -stroke(128,0,128);vertex(85, 20); -stroke(128,128,0);vertex(85, 75); -stroke(0,0,128);vertex(30, 75); -endShape(CLOSE); - -beginShape(); -stroke(0,0,128);vertex(130, 20); -stroke(128,0,128);vertex(185, 20); -stroke(128,128,0);vertex(185, 75); -endShape(CLOSE); - -beginShape(); -stroke(128,128,0);vertex(230, 20); -stroke(0,128,128);vertex(285, 20); -endShape(CLOSE); - -beginShape(); -stroke(128,128,128);vertex(330, 20); -endShape(CLOSE); \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-nomodnofill/p5_result.jpg b/examples/seneca/bug634/endShape-3dtest-nomodnofill/p5_result.jpg deleted file mode 100644 index 259a61d6b..000000000 Binary files a/examples/seneca/bug634/endShape-3dtest-nomodnofill/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/endShape-3dtest-points/endShape-3dtest-points.html b/examples/seneca/bug634/endShape-3dtest-points/endShape-3dtest-points.html deleted file mode 100644 index fe40824b2..000000000 --- a/examples/seneca/bug634/endShape-3dtest-points/endShape-3dtest-points.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- -

- -
-size(500, 100, P3D);
-background(200);
-
-beginShape(POINTS);
-stroke(255,0,0);vertex(30, 20);
-stroke(0,0,255);vertex(85, 20);
-stroke(0,255,0);vertex(85, 75);
-stroke(255,0,0);vertex(30, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-stroke(0,0,255);vertex(130, 20);
-stroke(255,0,0);vertex(185, 20);
-stroke(255,0,0);vertex(185, 75);
-endShape(CLOSE);
-
-beginShape(POINTS);
-stroke(0,0,0);vertex(230, 20);
-stroke(255,0,0);vertex(285, 20);
-endShape(CLOSE);
-
-beginShape(POINTS);
-stroke(0,0,255);vertex(330, 20);
-endShape(CLOSE);
- - \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-points/endShape-3dtest-points.pjs b/examples/seneca/bug634/endShape-3dtest-points/endShape-3dtest-points.pjs deleted file mode 100644 index 66a7adf81..000000000 --- a/examples/seneca/bug634/endShape-3dtest-points/endShape-3dtest-points.pjs +++ /dev/null @@ -1,24 +0,0 @@ -size(500, 100, P3D); -background(200); - -beginShape(POINTS); -stroke(255,0,0);vertex(30, 20); -stroke(0,0,255);vertex(85, 20); -stroke(0,255,0);vertex(85, 75); -stroke(255,0,0);vertex(30, 75); -endShape(CLOSE); - -beginShape(POINTS); -stroke(0,0,255);vertex(130, 20); -stroke(255,0,0);vertex(185, 20); -stroke(255,0,0);vertex(185, 75); -endShape(CLOSE); - -beginShape(POINTS); -stroke(0,0,0);vertex(230, 20); -stroke(255,0,0);vertex(285, 20); -endShape(CLOSE); - -beginShape(POINTS); -stroke(0,0,255);vertex(330, 20); -endShape(CLOSE); \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-points_2/endShape-3dtest-points.html b/examples/seneca/bug634/endShape-3dtest-points_2/endShape-3dtest-points.html deleted file mode 100644 index 78fe31cf8..000000000 --- a/examples/seneca/bug634/endShape-3dtest-points_2/endShape-3dtest-points.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

-

P5 doesn't give the same result, is it broken?

- -

- - -

- - -
import processing.opengl.*;
-
-void setup(){
-  size(500, 500, P3D);
-
-  beginShape(POINTS);
-  for(int x = 0; x < 255; x++){
-    for(int y = 0; y < 255; y++){
-      stroke(x,y,255-x);
-      vertex( x * 2, y * 2, 0);
-    }
-  }
-  endShape(CLOSE);
-}
- - \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-points_2/endShape-3dtest-points.pjs b/examples/seneca/bug634/endShape-3dtest-points_2/endShape-3dtest-points.pjs deleted file mode 100644 index 7ddb760e7..000000000 --- a/examples/seneca/bug634/endShape-3dtest-points_2/endShape-3dtest-points.pjs +++ /dev/null @@ -1,15 +0,0 @@ - - -void setup(){ - size(500, 500, P3D); - strokeWeight(2); - - beginShape(POINTS); - for(int x = 0; x < 255; x++){ - for(int y = 0; y < 255; y++){ - stroke(x,y,255-x); - vertex( x * 2, y * 2); - } - } - endShape(CLOSE); -} \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-points_2/p5_result.jpg b/examples/seneca/bug634/endShape-3dtest-points_2/p5_result.jpg deleted file mode 100644 index b09d5ef3e..000000000 Binary files a/examples/seneca/bug634/endShape-3dtest-points_2/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/endShape-3dtest-polygon/endShape-3dtest-polygon.html b/examples/seneca/bug634/endShape-3dtest-polygon/endShape-3dtest-polygon.html deleted file mode 100644 index 6d0136ede..000000000 --- a/examples/seneca/bug634/endShape-3dtest-polygon/endShape-3dtest-polygon.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

-

The white triangles outside polygons is a known issue

-

- - -

- -
size(500, 100, P3D);
-background(200);
-
-strokeWeight(3);
-
-beginShape();
-stroke(255,0,0);vertex(20, 20);
-stroke(0,0,255);vertex(40, 20);
-stroke(0,255,0);vertex(40, 40);
-stroke(0,0,255);vertex(60, 40);
-stroke(128,0,255);vertex(60, 60);
-stroke(128,0,64);vertex(20, 60);
-endShape(CLOSE);
-
-beginShape();
-stroke(255,0,0);vertex(120, 20);
-stroke(128,0,64);vertex(140, 20);
-stroke(128,0,255);vertex(140, 40);
-vertex(160, 40);
-stroke(128,64,0);stroke(0);vertex(160, 60);
-endShape(CLOSE);
-
-beginShape();
-stroke(0,255,0);vertex(220, 20);
-vertex(240, 20);
-stroke(64,128,0);vertex(240, 40);
-stroke(255,0,255);vertex(260, 40);
-endShape(CLOSE);
-
-beginShape();
-stroke(0,255,64);vertex(320, 20);
-stroke(64,64,0);vertex(340, 20);
-stroke(0,255,0);vertex(340, 40);
-endShape(CLOSE);
-
-beginShape();
-stroke(128,64,255);vertex(420, 20);
-stroke(0,64,128);vertex(440, 20);
-endShape(CLOSE);
- - \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-polygon/endShape-3dtest-polygon.pjs b/examples/seneca/bug634/endShape-3dtest-polygon/endShape-3dtest-polygon.pjs deleted file mode 100644 index ca2b21f0a..000000000 --- a/examples/seneca/bug634/endShape-3dtest-polygon/endShape-3dtest-polygon.pjs +++ /dev/null @@ -1,39 +0,0 @@ -size(500, 100, P3D); -background(200); - -strokeWeight(3); - -beginShape(); -stroke(255,0,0);vertex(20, 20); -stroke(0,0,255);vertex(40, 20); -stroke(0,255,0);vertex(40, 40); -stroke(0,0,255);vertex(60, 40); -stroke(128,0,255);vertex(60, 60); -stroke(128,0,64);vertex(20, 60); -endShape(CLOSE); - -beginShape(); -stroke(255,0,0);vertex(120, 20); -stroke(128,0,64);vertex(140, 20); -stroke(128,0,255);vertex(140, 40); -vertex(160, 40); -stroke(128,64,0);stroke(0);vertex(160, 60); -endShape(CLOSE); - -beginShape(); -stroke(0,255,0);vertex(220, 20); -vertex(240, 20); -stroke(64,128,0);vertex(240, 40); -stroke(255,0,255);vertex(260, 40); -endShape(CLOSE); - -beginShape(); -stroke(0,255,64);vertex(320, 20); -stroke(64,64,0);vertex(340, 20); -stroke(0,255,0);vertex(340, 40); -endShape(CLOSE); - -beginShape(); -stroke(128,64,255);vertex(420, 20); -stroke(0,64,128);vertex(440, 20); -endShape(CLOSE); \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-polygon/p5_result.jpg b/examples/seneca/bug634/endShape-3dtest-polygon/p5_result.jpg deleted file mode 100644 index 377299f00..000000000 Binary files a/examples/seneca/bug634/endShape-3dtest-polygon/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/endShape-3dtest-quads/endShape-3dtest-quads.html b/examples/seneca/bug634/endShape-3dtest-quads/endShape-3dtest-quads.html deleted file mode 100644 index 04428d140..000000000 --- a/examples/seneca/bug634/endShape-3dtest-quads/endShape-3dtest-quads.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
size(500, 200, P3D);
-background(200);
-
-beginShape(QUADS);
-stroke(255,0,0);vertex(30, 20);
-vertex(30, 75);
-fill(0,255,0);vertex(50, 75);
-vertex(50, 20);
-endShape();
-
-beginShape(QUADS);
-stroke(0,0,255);vertex(65, 20);
-vertex(65, 75);
-fill(0,0,255);vertex(85, 75);
-stroke(0,255,0);vertex(85, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(130, 20);
-vertex(130, 75);
-fill(0,0,255);vertex(150, 75);
-fill(255,0,255);vertex(150, 20);
-endShape();
-
-beginShape(QUADS);
-fill(255,0,255);vertex(190, 20);
-vertex(165, 20);
-fill(255,0,0);vertex(165, 75);
-vertex(185, 75);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 20);
-fill(0,0,255);vertex(230, 75);
-vertex(250, 75);
-fill(255,0,0);vertex(250, 20);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 20);
-fill(0,0,255);vertex(330, 75);
-vertex(350, 75);
-fill(0,0,255);vertex(365, 20);
-endShape();
-
-stroke(255);
-
-
-
-beginShape(QUADS);
-vertex(445, 45);
-vertex(465, 75);
-vertex(485, 75);
-fill(255,0,255);vertex(485, 20);
-endShape();
-
-beginShape(QUADS);
-fill(255,0,0);vertex(30, 120);
-vertex(30, 175);
-vertex(50, 175);
-fill(255,0,255);vertex(50, 120);
-endShape();
-
-beginShape(QUADS);
-fill(255,128,64);vertex(130, 120);
-vertex(130, 175);
-vertex(150, 175);
-fill(0,128,255);vertex(150, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(230, 120);
-vertex(230, 175);
-fill(0,128,255);vertex(250, 175);
-vertex(250, 120);
-endShape();
-
-beginShape(QUADS);
-vertex(330, 120);
-fill(255,0,255);vertex(330, 175);
-vertex(350, 175);
-vertex(430, 120);
-endShape();
- - \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-quads/endShape-3dtest-quads.pjs b/examples/seneca/bug634/endShape-3dtest-quads/endShape-3dtest-quads.pjs deleted file mode 100644 index 90e460277..000000000 --- a/examples/seneca/bug634/endShape-3dtest-quads/endShape-3dtest-quads.pjs +++ /dev/null @@ -1,83 +0,0 @@ -size(500, 200, P3D); -background(200); - -beginShape(QUADS); -stroke(255,0,0);vertex(30, 20); -vertex(30, 75); -fill(0,255,0);vertex(50, 75); -vertex(50, 20); -endShape(); - -beginShape(QUADS); -stroke(0,0,255);vertex(65, 20); -vertex(65, 75); -fill(0,0,255);vertex(85, 75); -stroke(0,255,0);vertex(85, 20); -endShape(); - -beginShape(QUADS); -vertex(130, 20); -vertex(130, 75); -fill(0,0,255);vertex(150, 75); -fill(255,0,255);vertex(150, 20); -endShape(); - -beginShape(QUADS); -fill(255,0,255);vertex(190, 20); -vertex(165, 20); -fill(255,0,0);vertex(165, 75); -vertex(185, 75); -endShape(); - -beginShape(QUADS); -vertex(230, 20); -fill(0,0,255);vertex(230, 75); -vertex(250, 75); -fill(255,0,0);vertex(250, 20); -endShape(); - -beginShape(QUADS); -vertex(330, 20); -fill(0,0,255);vertex(330, 75); -vertex(350, 75); -fill(0,0,255);vertex(365, 20); -endShape(); - -stroke(255); - - - -beginShape(QUADS); -vertex(445, 45); -vertex(465, 75); -vertex(485, 75); -fill(255,0,255);vertex(485, 20); -endShape(); - -beginShape(QUADS); -fill(255,0,0);vertex(30, 120); -vertex(30, 175); -vertex(50, 175); -fill(255,0,255);vertex(50, 120); -endShape(); - -beginShape(QUADS); -fill(255,128,64);vertex(130, 120); -vertex(130, 175); -vertex(150, 175); -fill(0,128,255);vertex(150, 120); -endShape(); - -beginShape(QUADS); -vertex(230, 120); -vertex(230, 175); -fill(0,128,255);vertex(250, 175); -vertex(250, 120); -endShape(); - -beginShape(QUADS); -vertex(330, 120); -fill(255,0,255);vertex(330, 175); -vertex(350, 175); -vertex(430, 120); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-quads/p5_result.jpg b/examples/seneca/bug634/endShape-3dtest-quads/p5_result.jpg deleted file mode 100644 index 41daa3a93..000000000 Binary files a/examples/seneca/bug634/endShape-3dtest-quads/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/endShape-3dtest-quadstrip/endShape-3dtest-quadstrip.html b/examples/seneca/bug634/endShape-3dtest-quadstrip/endShape-3dtest-quadstrip.html deleted file mode 100644 index 82f020a95..000000000 --- a/examples/seneca/bug634/endShape-3dtest-quadstrip/endShape-3dtest-quadstrip.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
-size(500, 200, P3D);
-background(200);
-
-beginShape(QUAD_STRIP); 
-stroke(255,0,0);vertex(30, 20); 
-fill(0,255,0);vertex(30, 75); 
-vertex(50, 20);
-fill(128,0,128);vertex(50, 75);
-stroke(0,255,0);vertex(65, 20); 
-vertex(65, 75); 
-fill(0,255,255);vertex(85, 20);
-vertex(85, 75); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-fill(128,0,128);vertex(130, 20);
-vertex(130, 75);
-stroke(255,0,255);vertex(150, 20);
-vertex(150, 75);
-fill(0,0,255);vertex(165, 20);
-vertex(165, 75);
-stroke(255,0,255);vertex(185, 20);
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(230, 20);
-fill(0,0,255);vertex(230, 75);
-stroke(255,255,0);vertex(250, 20);
-vertex(250, 75);
-fill(0,128,0);vertex(265, 20);
-vertex(285, 20);
-stroke(255,255,0);vertex(285, 75);
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(330, 20); 
-vertex(330, 75);
-stroke(255,0,0);vertex(350, 20);
-vertex(365, 20); 
-stroke(0,0,255);vertex(365, 75); 
-fill(0,128,128);vertex(385, 20);
-vertex(385, 75); 
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(430, 20);
-fill(255,128,0);vertex(450, 20);
-vertex(450, 75);
-stroke(255,128,0);vertex(465, 20); 
-vertex(465, 75);
-fill(255,0,255);vertex(485, 20);
-stroke(255,128,128);vertex(485, 75);
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(30, 120);
-vertex(30, 175);
-fill(0,128,128);stroke(0,128,128);vertex(50, 120);
-vertex(50, 175);
-fill(255,0,0);vertex(65, 120); 
-stroke(0,255,128);vertex(65, 175);
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(130, 120);
-vertex(130, 175);
-stroke(0,255,0);vertex(150, 120);
-vertex(150, 175);
-stroke(255,128,0);vertex(165, 120);
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(230, 120);
-fill(0,128,64);vertex(230, 175);
-stroke(0,255,0);vertex(250, 120);
-vertex(250, 175);
-endShape();
-
-beginShape(QUAD_STRIP); 
-vertex(330, 120);
-stroke(0,255,125);vertex(330, 175);
-vertex(350, 120);
-endShape();
-
-beginShape(QUAD_STRIP); 
-fill(64,128,64);vertex(430, 120);
-endShape();
-    
- - \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-quadstrip/endShape-3dtest-quadstrip.pjs b/examples/seneca/bug634/endShape-3dtest-quadstrip/endShape-3dtest-quadstrip.pjs deleted file mode 100644 index 19f80861d..000000000 --- a/examples/seneca/bug634/endShape-3dtest-quadstrip/endShape-3dtest-quadstrip.pjs +++ /dev/null @@ -1,87 +0,0 @@ -size(500, 200, P3D); -background(200); - -beginShape(QUAD_STRIP); -stroke(255,0,0);vertex(30, 20); -fill(0,255,0);vertex(30, 75); -vertex(50, 20); -fill(128,0,128);vertex(50, 75); -stroke(0,255,0);vertex(65, 20); -vertex(65, 75); -fill(0,255,255);vertex(85, 20); -vertex(85, 75); -endShape(); - -beginShape(QUAD_STRIP); -fill(128,0,128);vertex(130, 20); -vertex(130, 75); -stroke(255,0,255);vertex(150, 20); -vertex(150, 75); -fill(0,0,255);vertex(165, 20); -vertex(165, 75); -stroke(255,0,255);vertex(185, 20); -endShape(); - -beginShape(QUAD_STRIP); -vertex(230, 20); -fill(0,0,255);vertex(230, 75); -stroke(255,255,0);vertex(250, 20); -vertex(250, 75); -fill(0,128,0);vertex(265, 20); -vertex(285, 20); -stroke(255,255,0);vertex(285, 75); -endShape(); - -beginShape(QUAD_STRIP); -vertex(330, 20); -vertex(330, 75); -stroke(255,0,0);vertex(350, 20); -vertex(365, 20); -stroke(0,0,255);vertex(365, 75); -fill(0,128,128);vertex(385, 20); -vertex(385, 75); -endShape(); - -beginShape(QUAD_STRIP); -vertex(430, 20); -fill(255,128,0);vertex(450, 20); -vertex(450, 75); -stroke(255,128,0);vertex(465, 20); -vertex(465, 75); -fill(255,0,255);vertex(485, 20); -stroke(255,128,128);vertex(485, 75); -endShape(); - -beginShape(QUAD_STRIP); -vertex(30, 120); -vertex(30, 175); -fill(0,128,128);stroke(0,128,128);vertex(50, 120); -vertex(50, 175); -fill(255,0,0);vertex(65, 120); -stroke(0,255,128);vertex(65, 175); -endShape(); - -beginShape(QUAD_STRIP); -vertex(130, 120); -vertex(130, 175); -stroke(0,255,0);vertex(150, 120); -vertex(150, 175); -stroke(255,128,0);vertex(165, 120); -endShape(); - -beginShape(QUAD_STRIP); -vertex(230, 120); -fill(0,128,64);vertex(230, 175); -stroke(0,255,0);vertex(250, 120); -vertex(250, 175); -endShape(); - -beginShape(QUAD_STRIP); -vertex(330, 120); -stroke(0,255,125);vertex(330, 175); -vertex(350, 120); -endShape(); - -beginShape(QUAD_STRIP); -fill(64,128,64);vertex(430, 120); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-quadstrip/p5_result.png b/examples/seneca/bug634/endShape-3dtest-quadstrip/p5_result.png deleted file mode 100644 index b5c06976a..000000000 Binary files a/examples/seneca/bug634/endShape-3dtest-quadstrip/p5_result.png and /dev/null differ diff --git a/examples/seneca/bug634/endShape-3dtest-trianglefan/endShape-3dtest-trianglefan.html b/examples/seneca/bug634/endShape-3dtest-trianglefan/endShape-3dtest-trianglefan.html deleted file mode 100644 index 2cdb4c582..000000000 --- a/examples/seneca/bug634/endShape-3dtest-trianglefan/endShape-3dtest-trianglefan.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
size(500, 200, P3D);
-background(200);
-strokeWeight(2);
-
-beginShape(TRIANGLE_FAN);
-fill(255,0,0);vertex(60, 50);
-fill(0,255,0);vertex(60, 15); 
-fill(0,0,255);vertex(95, 50); 
-fill(128,128,0);vertex(60, 85); 
-fill(128,0,128);vertex(25, 50); 
-fill(0,0,128);vertex(60, 15); 
-endShape();
-
-stroke(0,255,0);
-beginShape(TRIANGLE_FAN);
-fill(0);vertex(160, 50);
-fill(255);vertex(160, 15); 
-fill(0);vertex(195, 50); 
-fill(255);vertex(160, 85); 
-fill(0);vertex(125, 50);
-endShape();
-
-stroke(255,0,0);
-beginShape(TRIANGLE_FAN);
-fill(128,0,0);vertex(260, 50);
-fill(128,0,128);vertex(260, 15); 
-fill(0,0,128);vertex(295, 50); 
-fill(0,128,128);vertex(260, 85); 
-fill(128,128,128);vertex(260, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-stroke(0,128,128);fill(0,128,128);vertex(360, 50);
-stroke(0,0,128);fill(0,0,128);vertex(360, 15); 
-stroke(128,0,128);fill(128,0,128);vertex(395, 50); 
-stroke(0,128,0);fill(0,128,0);vertex(325, 50); 
-stroke(128,128,0);fill(128,128,0);vertex(360, 15); 
-endShape();
-
-stroke(0,128,128);
-beginShape(TRIANGLE_FAN);
-fill(0);vertex(460, 50);
-fill(255);vertex(460, 15); 
-fill(0);vertex(460, 85); 
-fill(255);vertex(425, 50); 
-fill(0);vertex(460, 15); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-stroke(0,255,128);vertex(60, 150);
-fill(0,128,255);vertex(95, 150); 
-vertex(60, 185); 
-stroke(255,0,128);vertex(25, 150); 
-fill(128,0,255);vertex(60, 115); 
-endShape();
-
-fill(255);
-beginShape(TRIANGLE_FAN);
-vertex(160, 115); 
-vertex(195, 150); 
-fill(255,0,255);vertex(160, 185); 
-vertex(125, 150); 
-vertex(160, 115); 
-endShape();
-
-stroke(0);
-beginShape(TRIANGLE_FAN);
-vertex(260, 150);
-vertex(260, 115); 
-fill(0,255,0);vertex(295, 150); 
-vertex(260, 185); 
-endShape();
-
-
-beginShape(TRIANGLE_FAN);
-vertex(360, 150);
-fill(255,128,0);vertex(360, 115); 
-vertex(395, 150); 
-endShape();
-
-beginShape(TRIANGLE_FAN);
-vertex(460, 150);
-fill(0,0,255);vertex(460, 115); 
-endShape();
- - \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-trianglefan/endShape-3dtest-trianglefan.pjs b/examples/seneca/bug634/endShape-3dtest-trianglefan/endShape-3dtest-trianglefan.pjs deleted file mode 100644 index 5a9d27f0d..000000000 --- a/examples/seneca/bug634/endShape-3dtest-trianglefan/endShape-3dtest-trianglefan.pjs +++ /dev/null @@ -1,84 +0,0 @@ -size(500, 200, P3D); -background(200); -strokeWeight(2); - -beginShape(TRIANGLE_FAN); -fill(255,0,0);vertex(60, 50); -fill(0,255,0);vertex(60, 15); -fill(0,0,255);vertex(95, 50); -fill(128,128,0);vertex(60, 85); -fill(128,0,128);vertex(25, 50); -fill(0,0,128);vertex(60, 15); -endShape(); - -stroke(0,255,0); -beginShape(TRIANGLE_FAN); -fill(0);vertex(160, 50); -fill(255);vertex(160, 15); -fill(0);vertex(195, 50); -fill(255);vertex(160, 85); -fill(0);vertex(125, 50); -endShape(); - -stroke(255,0,0); -beginShape(TRIANGLE_FAN); -fill(128,0,0);vertex(260, 50); -fill(128,0,128);vertex(260, 15); -fill(0,0,128);vertex(295, 50); -fill(0,128,128);vertex(260, 85); -fill(128,128,128);vertex(260, 15); -endShape(); - -beginShape(TRIANGLE_FAN); -stroke(0,128,128);fill(0,128,128);vertex(360, 50); -stroke(0,0,128);fill(0,0,128);vertex(360, 15); -stroke(128,0,128);fill(128,0,128);vertex(395, 50); -stroke(0,128,0);fill(0,128,0);vertex(325, 50); -stroke(128,128,0);fill(128,128,0);vertex(360, 15); -endShape(); - -stroke(0,128,128); -beginShape(TRIANGLE_FAN); -fill(0);vertex(460, 50); -fill(255);vertex(460, 15); -fill(0);vertex(460, 85); -fill(255);vertex(425, 50); -fill(0);vertex(460, 15); -endShape(); - -beginShape(TRIANGLE_FAN); -stroke(0,255,128);vertex(60, 150); -fill(0,128,255);vertex(95, 150); -vertex(60, 185); -stroke(255,0,128);vertex(25, 150); -fill(128,0,255);vertex(60, 115); -endShape(); - -fill(255); -beginShape(TRIANGLE_FAN); -vertex(160, 115); -vertex(195, 150); -fill(255,0,255);vertex(160, 185); -vertex(125, 150); -vertex(160, 115); -endShape(); - -stroke(0); -beginShape(TRIANGLE_FAN); -vertex(260, 150); -vertex(260, 115); -fill(0,255,0);vertex(295, 150); -vertex(260, 185); -endShape(); - - -beginShape(TRIANGLE_FAN); -vertex(360, 150); -fill(255,128,0);vertex(360, 115); -vertex(395, 150); -endShape(); - -beginShape(TRIANGLE_FAN); -vertex(460, 150); -fill(0,0,255);vertex(460, 115); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-trianglefan/p_result.jpg b/examples/seneca/bug634/endShape-3dtest-trianglefan/p_result.jpg deleted file mode 100644 index df36cce99..000000000 Binary files a/examples/seneca/bug634/endShape-3dtest-trianglefan/p_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/endShape-3dtest-triangles/endShape-3dtest-triangles.html b/examples/seneca/bug634/endShape-3dtest-triangles/endShape-3dtest-triangles.html deleted file mode 100644 index 996f11dfe..000000000 --- a/examples/seneca/bug634/endShape-3dtest-triangles/endShape-3dtest-triangles.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
size(500, 200, P3D);
-background(200);
-
-beginShape(TRIANGLES);
-stroke(255,0,0);fill(255,0,0);vertex(30, 75);
-vertex(40, 20);
-vertex(50, 75);
-stroke(255,0,255);fill(255,0,255);vertex(60, 20);
-vertex(70, 75);
-stroke(0,255,255);fill(0,255,255);vertex(80, 20);
-endShape();
-
-beginShape(TRIANGLES);
-stroke(0,0,128);vertex(130, 75);
-vertex(140, 20);
-stroke(128,0,255);vertex(150, 75);
-vertex(160, 20);
-stroke(0);vertex(170, 75);
-endShape();
-
-beginShape(TRIANGLES);
-fill(255);stroke(0);vertex(230, 75);
-fill(0);stroke(255);vertex(240, 20);
-fill(255);stroke(0);vertex(250, 75);
-fill(0);stroke(255);vertex(270, 75);
-fill(255);stroke(0);vertex(280, 20);
-endShape();
-
-beginShape(TRIANGLES);
-fill(128,0,128);vertex(330, 75);
-fill(0,128,128);vertex(350, 75);
-fill(0,128,0);vertex(360, 20);
-fill(128,128,0);vertex(370, 75);
-fill(128,0,128);vertex(380, 20);
-endShape();
-
-beginShape(TRIANGLES);
-fill(128,0,128);vertex(430, 75);
-fill(0,128,0);vertex(440, 20);
-fill(0,255,128);vertex(450, 75);
-fill(128,0,255);vertex(460, 20);
-endShape();
-
-beginShape(TRIANGLES);
-stroke(255,0,0);fill(0,255,255);vertex(30, 175);
-stroke(255,0,255);fill(0,255,0);vertex(40, 120);
-stroke(255,0,0);fill(255,255,0);vertex(50, 175);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(130, 175);
-vertex(140, 120);
-endShape();
-
-beginShape(TRIANGLES);
-vertex(240, 120);
-vertex(250, 175);
-vertex(260, 120);
-vertex(270, 175);
-vertex(280, 120);
-endShape();
-
-beginShape(TRIANGLES);
-fill(255);vertex(330, 175);
-vertex(340, 120);
-fill(0);vertex(360, 120);
-vertex(370, 175);
-fill(255);vertex(380, 120);
-endShape();
-
-beginShape(TRIANGLES);
-stroke(255,0,255);fill(0,255,255);vertex(430, 175);
-vertex(440, 120);
-vertex(450, 175);
-stroke(255,0,255);fill(0,255,255);vertex(460, 120);
-vertex(480, 120);
-endShape();
- - \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-triangles/endShape-3dtest-triangles.pjs b/examples/seneca/bug634/endShape-3dtest-triangles/endShape-3dtest-triangles.pjs deleted file mode 100644 index c0f725809..000000000 --- a/examples/seneca/bug634/endShape-3dtest-triangles/endShape-3dtest-triangles.pjs +++ /dev/null @@ -1,77 +0,0 @@ -size(500, 200, P3D); -background(200); - -beginShape(TRIANGLES); -stroke(255,0,0);fill(255,0,0);vertex(30, 75); -vertex(40, 20); -vertex(50, 75); -stroke(255,0,255);fill(255,0,255);vertex(60, 20); -vertex(70, 75); -stroke(0,255,255);fill(0,255,255);vertex(80, 20); -endShape(); - -beginShape(TRIANGLES); -stroke(0,0,128);vertex(130, 75); -vertex(140, 20); -stroke(128,0,255);vertex(150, 75); -vertex(160, 20); -stroke(0);vertex(170, 75); -endShape(); - -beginShape(TRIANGLES); -fill(255);stroke(0);vertex(230, 75); -fill(0);stroke(255);vertex(240, 20); -fill(255);stroke(0);vertex(250, 75); -fill(0);stroke(255);vertex(270, 75); -fill(255);stroke(0);vertex(280, 20); -endShape(); - -beginShape(TRIANGLES); -fill(128,0,128);vertex(330, 75); -fill(0,128,128);vertex(350, 75); -fill(0,128,0);vertex(360, 20); -fill(128,128,0);vertex(370, 75); -fill(128,0,128);vertex(380, 20); -endShape(); - -beginShape(TRIANGLES); -fill(128,0,128);vertex(430, 75); -fill(0,128,0);vertex(440, 20); -fill(0,255,128);vertex(450, 75); -fill(128,0,255);vertex(460, 20); -endShape(); - -beginShape(TRIANGLES); -stroke(255,0,0);fill(0,255,255);vertex(30, 175); -stroke(255,0,255);fill(0,255,0);vertex(40, 120); -stroke(255,0,0);fill(255,255,0);vertex(50, 175); -endShape(); - -beginShape(TRIANGLES); -vertex(130, 175); -vertex(140, 120); -endShape(); - -beginShape(TRIANGLES); -vertex(240, 120); -vertex(250, 175); -vertex(260, 120); -vertex(270, 175); -vertex(280, 120); -endShape(); - -beginShape(TRIANGLES); -fill(255);vertex(330, 175); -vertex(340, 120); -fill(0);vertex(360, 120); -vertex(370, 175); -fill(255);vertex(380, 120); -endShape(); - -beginShape(TRIANGLES); -stroke(255,0,255);fill(0,255,255);vertex(430, 175); -vertex(440, 120); -vertex(450, 175); -stroke(255,0,255);fill(0,255,255);vertex(460, 120); -vertex(480, 120); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-triangles/p5_result.png b/examples/seneca/bug634/endShape-3dtest-triangles/p5_result.png deleted file mode 100644 index 4330e7f02..000000000 Binary files a/examples/seneca/bug634/endShape-3dtest-triangles/p5_result.png and /dev/null differ diff --git a/examples/seneca/bug634/endShape-3dtest-trianglestrip/endShape-3dtest-trianglestrip.html b/examples/seneca/bug634/endShape-3dtest-trianglestrip/endShape-3dtest-trianglestrip.html deleted file mode 100644 index 8cb0ced3e..000000000 --- a/examples/seneca/bug634/endShape-3dtest-trianglestrip/endShape-3dtest-trianglestrip.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - -

beginShape() and endShape() test

- -

- - -

- -
-size(500, 200, P3D);
-background(200);
-strokeWeight(2);
-
-beginShape(TRIANGLE_STRIP);
-stroke(255,0,0);fill(0,255,255);
-vertex(30, 75);
-vertex(40, 20);
-stroke(255,255,0);fill(0,0,255);
-vertex(50, 75);
-vertex(60, 20);
-stroke(255,0,0);fill(0,255,255);
-vertex(70, 75);
-vertex(80, 20);
-stroke(255,0,255);fill(255,0,0);
-vertex(90, 75);
-endShape();
-
-stroke(0);
-fill(255);
-
-beginShape(TRIANGLE_STRIP);
-stroke(255,0,0);fill(255,0,0);
-vertex(130, 75);
-stroke(0,255,0);fill(0,255,0);
-vertex(140, 20);
-stroke(0,0,255);fill(0,0,255);
-vertex(150, 75);
-stroke(255,0,255);fill(255,0,255);
-vertex(160, 20);
-stroke(255,255,0);fill(255,255,0);
-vertex(170, 75);
-stroke(0,255,0);fill(0,255,0);
-vertex(180, 20);
-endShape();
-
-stroke(0);
-fill(255);
-
-beginShape(TRIANGLE_STRIP);
-fill(255,255,0);
-vertex(230, 75);
-vertex(240, 20);
-fill(0,255,0);
-vertex(250, 75);
-
-fill(255,0,0);
-vertex(260, 20);
-fill(0,0,255);
-vertex(270, 75);
-vertex(290, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-fill(0,255,0);
-vertex(330, 75);
-fill(128,128,255);
-vertex(340, 20);
-vertex(350, 75);
-fill(0,255,255);
-vertex(360, 20);
-vertex(380, 20);
-fill(0,128,0);
-vertex(390, 75);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-fill(255,0,0);vertex(430, 75);
-fill(255,128,0);vertex(440, 20);
-fill(255,0,128);vertex(450, 75);
-fill(255,128,128);vertex(470, 75);
-fill(128,0,255);vertex(480, 20);
-fill(128,0,128);vertex(490, 75);
-endShape();
-
-fill(255);
-beginShape(TRIANGLE_STRIP);
-stroke(128,0,128);vertex(30, 175);
-stroke(128,128,0);vertex(40, 120);
-stroke(0,128,0);vertex(60, 120);
-stroke(128,0,0);vertex(70, 175);
-stroke(128,128,128);vertex(80, 120);
-stroke(0,128,0);vertex(90, 175);
-endShape();
-
-stroke(0);
-beginShape(TRIANGLE_STRIP);
-vertex(130, 175);
-vertex(150, 175);
-vertex(160, 120);
-vertex(170, 175);
-vertex(180, 120);
-vertex(190, 175);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-stroke(128,0,255);
-vertex(240, 120);
-stroke(255,128,128);
-vertex(250, 175);
-stroke(255,0,128);
-vertex(260, 120);
-vertex(270, 175);
-stroke(0,128,128);
-vertex(280, 120);
-stroke(255);
-vertex(290, 175);
-endShape();
-
-fill(255);
-beginShape(TRIANGLE_STRIP);
-stroke(128,0,128);
-vertex(330, 175);
-stroke(128,128,0);
-vertex(340, 120);
-vertex(350, 175);
-stroke(128,0,0);
-vertex(360, 120);
-vertex(370, 175);
-endShape();
-
-fill(0);
-beginShape(TRIANGLE_STRIP);
-stroke(0,255,0);
-vertex(430, 175);
-vertex(440, 120);
-vertex(450, 175);
-stroke(0,0,255);
-vertex(460, 120);
-endShape();
-
- - \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-trianglestrip/endShape-3dtest-trianglestrip.pjs b/examples/seneca/bug634/endShape-3dtest-trianglestrip/endShape-3dtest-trianglestrip.pjs deleted file mode 100644 index 19b07bef4..000000000 --- a/examples/seneca/bug634/endShape-3dtest-trianglestrip/endShape-3dtest-trianglestrip.pjs +++ /dev/null @@ -1,131 +0,0 @@ -size(500, 200, P3D); -background(200); -strokeWeight(2); - -beginShape(TRIANGLE_STRIP); -stroke(255,0,0);fill(0,255,255); -vertex(30, 75); -vertex(40, 20); -stroke(255,255,0);fill(0,0,255); -vertex(50, 75); -vertex(60, 20); -stroke(255,0,0);fill(0,255,255); -vertex(70, 75); -vertex(80, 20); -stroke(255,0,255);fill(255,0,0); -vertex(90, 75); -endShape(); - -stroke(0); -fill(255); - -beginShape(TRIANGLE_STRIP); -stroke(255,0,0);fill(255,0,0); -vertex(130, 75); -stroke(0,255,0);fill(0,255,0); -vertex(140, 20); -stroke(0,0,255);fill(0,0,255); -vertex(150, 75); -stroke(255,0,255);fill(255,0,255); -vertex(160, 20); -stroke(255,255,0);fill(255,255,0); -vertex(170, 75); -stroke(0,255,0);fill(0,255,0); -vertex(180, 20); -endShape(); - -stroke(0); -fill(255); - -beginShape(TRIANGLE_STRIP); -fill(255,255,0); -vertex(230, 75); -vertex(240, 20); -fill(0,255,0); -vertex(250, 75); - -fill(255,0,0); -vertex(260, 20); -fill(0,0,255); -vertex(270, 75); -vertex(290, 75); -endShape(); - -beginShape(TRIANGLE_STRIP); -fill(0,255,0); -vertex(330, 75); -fill(128,128,255); -vertex(340, 20); -vertex(350, 75); -fill(0,255,255); -vertex(360, 20); -vertex(380, 20); -fill(0,128,0); -vertex(390, 75); -endShape(); - -beginShape(TRIANGLE_STRIP); -fill(255,0,0);vertex(430, 75); -fill(255,128,0);vertex(440, 20); -fill(255,0,128);vertex(450, 75); -fill(255,128,128);vertex(470, 75); -fill(128,0,255);vertex(480, 20); -fill(128,0,128);vertex(490, 75); -endShape(); - -fill(255); -beginShape(TRIANGLE_STRIP); -stroke(128,0,128);vertex(30, 175); -stroke(128,128,0);vertex(40, 120); -stroke(0,128,0);vertex(60, 120); -stroke(128,0,0);vertex(70, 175); -stroke(128,128,128);vertex(80, 120); -stroke(0,128,0);vertex(90, 175); -endShape(); - -stroke(0); -beginShape(TRIANGLE_STRIP); -vertex(130, 175); -//vertex(140, 120); -vertex(150, 175); -vertex(160, 120); -vertex(170, 175); -vertex(180, 120); -vertex(190, 175); -endShape(); - -beginShape(TRIANGLE_STRIP); -stroke(128,0,255); -vertex(240, 120); -stroke(255,128,128); -vertex(250, 175); -stroke(255,0,128); -vertex(260, 120); -vertex(270, 175); -stroke(0,128,128); -vertex(280, 120); -stroke(255); -vertex(290, 175); -endShape(); - -fill(255); -beginShape(TRIANGLE_STRIP); -stroke(128,0,128); -vertex(330, 175); -stroke(128,128,0); -vertex(340, 120); -vertex(350, 175); -stroke(128,0,0); -vertex(360, 120); -vertex(370, 175); -endShape(); - -fill(0); -beginShape(TRIANGLE_STRIP); -stroke(0,255,0); -vertex(430, 175); -vertex(440, 120); -vertex(450, 175); -stroke(0,0,255); -vertex(460, 120); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bug634/endShape-3dtest-trianglestrip/p5_result.jpg b/examples/seneca/bug634/endShape-3dtest-trianglestrip/p5_result.jpg deleted file mode 100644 index 2d55acf32..000000000 Binary files a/examples/seneca/bug634/endShape-3dtest-trianglestrip/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/test1/p5_result.jpg b/examples/seneca/bug634/test1/p5_result.jpg deleted file mode 100644 index 736a26798..000000000 Binary files a/examples/seneca/bug634/test1/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/test1/test.html b/examples/seneca/bug634/test1/test.html deleted file mode 100644 index aad6a2082..000000000 --- a/examples/seneca/bug634/test1/test.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 634

- -

This page tests the fix for bug 634 for Processing.js
- If the canvas and image below are identical, the test has passed.
-

- -

- - -

- -
-// Test by Andor Salga
-import processing.opengl.*;
-
-void setup(){
-  size(100,100,OPENGL);
-  translate(width/2, height/2,0);
-  stroke(0);
-
-  beginShape(TRIANGLES);
-  fill(256,0,0);
-  vertex(0,-20,0);
-  fill(0,256,0);
-  vertex(-30,20,0);
-  fill(0,0,256);
-  vertex(30,20,0);
-  endShape();
-}
- - - diff --git a/examples/seneca/bug634/test1/test.pjs b/examples/seneca/bug634/test1/test.pjs deleted file mode 100644 index 591c0f55c..000000000 --- a/examples/seneca/bug634/test1/test.pjs +++ /dev/null @@ -1,16 +0,0 @@ -import processing.opengl.*; - -void setup(){ - size(100,100,OPENGL); - translate(width/2, height/2,0); - stroke(0); - - beginShape(TRIANGLES); - fill(256,0,0); - vertex(0,-20,0); - fill(0,256,0); - vertex(-30,20,0); - fill(0,0,256); - vertex(30,20,0); - endShape(); -} \ No newline at end of file diff --git a/examples/seneca/bug634/test2/test.html b/examples/seneca/bug634/test2/test.html deleted file mode 100644 index 9afc0e112..000000000 --- a/examples/seneca/bug634/test2/test.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 634

- -

This page tests the fix for bug 634 for Processing.js
- If the canvas and image below are identical, the test has passed.
-

- -

- -

- -
-// Demo from www.Processing.org
-
- - - diff --git a/examples/seneca/bug634/test2/test.pjs b/examples/seneca/bug634/test2/test.pjs deleted file mode 100644 index fe8a8e012..000000000 --- a/examples/seneca/bug634/test2/test.pjs +++ /dev/null @@ -1,68 +0,0 @@ -float xmag, ymag = 0; -float newXmag, newYmag = 0; - -void setup() -{ - size(640, 360, P3D); - noStroke(); - colorMode(RGB, 1); -} - -void draw() -{ - background(0); - pushMatrix(); - - translate(width/2, height/2, -30); - - newXmag = mouseX/float(width) * TWO_PI; - newYmag = mouseY/float(height) * TWO_PI; - - float diff = xmag-newXmag; - if (abs(diff) > 0.01) { xmag -= diff/4.0; } - - diff = ymag-newYmag; - if (abs(diff) > 0.01) { ymag -= diff/4.0; } - - rotateX(-ymag); - rotateY(-xmag); - - scale(90); - stroke(120); - - beginShape(QUADS); - - fill(0, 1, 1); vertex(-1, 1, 1); - fill(1, 1, 1); vertex( 1, 1, 1); - fill(1, 0, 1); vertex( 1, -1, 1); - fill(0, 0, 1); vertex(-1, -1, 1); - - fill(1, 1, 1); vertex( 1, 1, 1); - fill(1, 1, 0); vertex( 1, 1, -1); - fill(1, 0, 0); vertex( 1, -1, -1); - fill(1, 0, 1); vertex( 1, -1, 1); - - fill(1, 1, 0); vertex( 1, 1, -1); - fill(0, 1, 0); vertex(-1, 1, -1); - fill(0, 0, 0); vertex(-1, -1, -1); - fill(1, 0, 0); vertex( 1, -1, -1); - - fill(0, 1, 0); vertex(-1, 1, -1); - fill(0, 1, 1); vertex(-1, 1, 1); - fill(0, 0, 1); vertex(-1, -1, 1); - fill(0, 0, 0); vertex(-1, -1, -1); - - fill(0, 1, 0); vertex(-1, 1, -1); - fill(1, 1, 0); vertex( 1, 1, -1); - fill(1, 1, 1); vertex( 1, 1, 1); - fill(0, 1, 1); vertex(-1, 1, 1); - - fill(0, 0, 0); vertex(-1, -1, -1); - fill(1, 0, 0); vertex( 1, -1, -1); - fill(1, 0, 1); vertex( 1, -1, 1); - fill(0, 0, 1); vertex(-1, -1, 1); - - endShape(); - - popMatrix(); -} diff --git a/examples/seneca/bug634/test3/p5_result.jpg b/examples/seneca/bug634/test3/p5_result.jpg deleted file mode 100644 index 37bfafd20..000000000 Binary files a/examples/seneca/bug634/test3/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/test3/test.html b/examples/seneca/bug634/test3/test.html deleted file mode 100644 index bb182a388..000000000 --- a/examples/seneca/bug634/test3/test.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 634

- -

This page tests the fix for bug 634 for Processing.js
- If the canvas and image below are identical, the test has passed.
-

- -

- - -

- -
-// Test by Andor Salga
-
- - - diff --git a/examples/seneca/bug634/test3/test.pjs b/examples/seneca/bug634/test3/test.pjs deleted file mode 100644 index 6a0c39507..000000000 --- a/examples/seneca/bug634/test3/test.pjs +++ /dev/null @@ -1,42 +0,0 @@ -void setup() -{ - size(100, 100, P3D); - background(0); - colorMode(RGB, 1); - strokeWeight(5); - - translate(width/2, height/2, 0); - scale(30); - - beginShape(LINES); - - stroke(0, 1, 1); vertex(-1, 1, 1); - stroke(1, 1, 1); vertex( 1, 1, 1); - stroke(0, 1, 1); vertex(-1, 1, 1); - stroke(0, 0, 1); vertex(-1, -1, 1); - stroke(1, 0, 1); vertex( 1, -1, 1); - stroke(0, 0, 1); vertex(-1, -1, 1); - - stroke(1, 1, 1); vertex( 1, 1, 1); - stroke(1, 1, 0); vertex( 1, 1, -1); - stroke(1, 1, 1); vertex( 1, 1, 1); - stroke(1, 0, 1); vertex( 1, -1, 1); - stroke(1, 0, 0); vertex( 1, -1, -1); - stroke(1, 0, 1); vertex( 1, -1, 1); - - stroke(1, 1, 0); vertex( 1, 1, -1); - stroke(0, 1, 0); vertex(-1, 1, -1); - stroke(1, 1, 0); vertex( 1, 1, -1); - stroke(1, 0, 0); vertex( 1, -1, -1); - stroke(0, 0, 0); vertex(-1, -1, -1); - stroke(1, 0, 0); vertex( 1, -1, -1); - - stroke(0, 1, 0); vertex(-1, 1, -1); - stroke(0, 1, 1); vertex(-1, 1, 1); - stroke(0, 1, 0); vertex(-1, 1, -1); - stroke(0, 0, 0); vertex(-1, -1, -1); - stroke(0, 0, 1); vertex(-1, -1, 1); - stroke(0, 0, 0); vertex(-1, -1, -1); - - endShape(); -} \ No newline at end of file diff --git a/examples/seneca/bug634/test4/p5_result.jpg b/examples/seneca/bug634/test4/p5_result.jpg deleted file mode 100644 index 62db9f037..000000000 Binary files a/examples/seneca/bug634/test4/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/test4/test.html b/examples/seneca/bug634/test4/test.html deleted file mode 100644 index 8f300d0a6..000000000 --- a/examples/seneca/bug634/test4/test.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 634

- -

This page tests the fix for bug 634 for Processing.js
- If the canvas and image below are identical, the test has passed.
-

- -

- - -

- -
-// Test by Andor Salga
-void setup() 
-{ 
-  size(100, 100, P3D); 
-  colorMode(RGB, 1); 
-} 
- 
-void draw() 
-{ 
-  background(0);
-  translate(width/2, height/2, -30); 
-  
-  rotateX(PI/4);
-  rotateZ(PI/4);
-  
-  strokeWeight(10);
-  stroke(1);
-
-  scale(30);
- 
-  beginShape(QUADS);
-
-  fill(0, 1, 1); vertex(-1,  1,  1);
-  fill(1, 1, 1); vertex( 1,  1,  1);
-  fill(1, 0, 1); vertex( 1, -1,  1);
-  fill(0, 0, 1); vertex(-1, -1,  1);
-
-  fill(1, 1, 1); vertex( 1,  1,  1);
-  fill(1, 1, 0); vertex( 1,  1, -1);
-  fill(1, 0, 0); vertex( 1, -1, -1);
-  fill(1, 0, 1); vertex( 1, -1,  1);
-
-  fill(1, 1, 0); vertex( 1,  1, -1);
-  fill(0, 1, 0); vertex(-1,  1, -1);
-  fill(0, 0, 0); vertex(-1, -1, -1);
-  fill(1, 0, 0); vertex( 1, -1, -1);
-
-  fill(0, 1, 0); vertex(-1,  1, -1);
-  fill(0, 1, 1); vertex(-1,  1,  1);
-  fill(0, 0, 1); vertex(-1, -1,  1);
-  fill(0, 0, 0); vertex(-1, -1, -1);
-
-  fill(0, 1, 0); vertex(-1,  1, -1);
-  fill(1, 1, 0); vertex( 1,  1, -1);
-  fill(1, 1, 1); vertex( 1,  1,  1);
-  fill(0, 1, 1); vertex(-1,  1,  1);
-
-  fill(0, 0, 0); vertex(-1, -1, -1);
-  fill(1, 0, 0); vertex( 1, -1, -1);
-  fill(1, 0, 1); vertex( 1, -1,  1);
-  fill(0, 0, 1); vertex(-1, -1,  1);
-
-  endShape();
-}
- - - diff --git a/examples/seneca/bug634/test4/test.pjs b/examples/seneca/bug634/test4/test.pjs deleted file mode 100644 index 45b7f99ba..000000000 --- a/examples/seneca/bug634/test4/test.pjs +++ /dev/null @@ -1,53 +0,0 @@ -void setup() -{ - size(100, 100, P3D); - colorMode(RGB, 1); -} - -void draw() -{ - background(0); - translate(width/2, height/2, -30); - - rotateX(PI/4); - rotateZ(PI/4); - - strokeWeight(10); - stroke(1); - - scale(30); - - beginShape(QUADS); - - fill(0, 1, 1); vertex(-1, 1, 1); - fill(1, 1, 1); vertex( 1, 1, 1); - fill(1, 0, 1); vertex( 1, -1, 1); - fill(0, 0, 1); vertex(-1, -1, 1); - - fill(1, 1, 1); vertex( 1, 1, 1); - fill(1, 1, 0); vertex( 1, 1, -1); - fill(1, 0, 0); vertex( 1, -1, -1); - fill(1, 0, 1); vertex( 1, -1, 1); - - fill(1, 1, 0); vertex( 1, 1, -1); - fill(0, 1, 0); vertex(-1, 1, -1); - fill(0, 0, 0); vertex(-1, -1, -1); - fill(1, 0, 0); vertex( 1, -1, -1); - - fill(0, 1, 0); vertex(-1, 1, -1); - fill(0, 1, 1); vertex(-1, 1, 1); - fill(0, 0, 1); vertex(-1, -1, 1); - fill(0, 0, 0); vertex(-1, -1, -1); - - fill(0, 1, 0); vertex(-1, 1, -1); - fill(1, 1, 0); vertex( 1, 1, -1); - fill(1, 1, 1); vertex( 1, 1, 1); - fill(0, 1, 1); vertex(-1, 1, 1); - - fill(0, 0, 0); vertex(-1, -1, -1); - fill(1, 0, 0); vertex( 1, -1, -1); - fill(1, 0, 1); vertex( 1, -1, 1); - fill(0, 0, 1); vertex(-1, -1, 1); - - endShape(); -} \ No newline at end of file diff --git a/examples/seneca/bug634/test5/p5_result.jpg b/examples/seneca/bug634/test5/p5_result.jpg deleted file mode 100644 index 902c9e1b2..000000000 Binary files a/examples/seneca/bug634/test5/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/test5/test.html b/examples/seneca/bug634/test5/test.html deleted file mode 100644 index e96ea9718..000000000 --- a/examples/seneca/bug634/test5/test.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 634

- -

This page tests the fix for bug 634 for Processing.js
- If the canvas and image below are identical, the test has passed.
-

- -

- - -

- -
-// Test by Andor Salga
-import processing.opengl.*;
-
-void setup() 
-{ 
-  size(100, 100, OPENGL);
-  background(0);
-  colorMode(RGB, 1);
-
-  beginShape(POINT);
-  pushMatrix();
-
-  for(int y = 0; y < 100; y+=5){
-  for(int x = 0; x < 100; x+=5){
-      stroke(x/100.0f,y/100.0f,100-x/100.0f);
-      vertex(x, y, 0);
-    }
-  }
-  popMatrix();
-
-  endShape();
-}
- - - diff --git a/examples/seneca/bug634/test5/test.pjs b/examples/seneca/bug634/test5/test.pjs deleted file mode 100644 index 6c1a93fd5..000000000 --- a/examples/seneca/bug634/test5/test.pjs +++ /dev/null @@ -1,21 +0,0 @@ -import processing.opengl.*; - -void setup() -{ - size(100, 100, OPENGL); - background(0); - colorMode(RGB, 1); - - beginShape(POINT); - pushMatrix(); - - for(int y = 0; y < 100; y+=5){ - for(int x = 0; x < 100; x+=5){ - stroke(x/100.0f,y/100.0f,100-x/100.0f); - vertex(x, y, 0); - } - } - popMatrix(); - - endShape(); -} \ No newline at end of file diff --git a/examples/seneca/bug634/test6/p5_result.jpg b/examples/seneca/bug634/test6/p5_result.jpg deleted file mode 100644 index 1703d9a3c..000000000 Binary files a/examples/seneca/bug634/test6/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug634/test6/test.html b/examples/seneca/bug634/test6/test.html deleted file mode 100644 index 4ff72c9a3..000000000 --- a/examples/seneca/bug634/test6/test.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 634

- -

This page tests the fix for bug 634 for Processing.js
- This test fails, but ticket has been filed.
-

- -

- - -

- -
-// Test by Andor Salga
-float o = 0.1;
-float c = 1;
-
-void setup() 
-{ 
-  size(200, 200, P3D); 
-
-  colorMode(RGB, 1); 
-  background(0);
-  stroke(1);
-  
-  translate(width/2, height/2, 0); 
-  rotateX(-PI/7); 
-  rotateY(PI/7); 
-  scale(50);
-
-  beginShape(QUADS);
-
-  fill(c, 0, 0,o); vertex(-1,  1,  1);
-  fill(c, 0, 0,o); vertex( 1,  1,  1);
-  fill(c, 0, 0,o); vertex( 1, -1,  1);
-  fill(c, 0, 0,o); vertex(-1, -1,  1);
-
-  fill(0, c, 0,o); vertex( 1,  1,  1);
-  fill(0, c, 0,o); vertex( 1,  1, -1);
-  fill(0, c, 0,o); vertex( 1, -1, -1);
-  fill(0, c, 0,o); vertex( 1, -1,  1);
-
-  fill(0, 0, c,o); vertex( 1,  1, -1);
-  fill(0, 0, c,o); vertex(-1,  1, -1);
-  fill(0, 0, c,o); vertex(-1, -1, -1);
-  fill(0, 0, c,o); vertex( 1, -1, -1);
-
-  fill(c, c, 0,o); vertex(-1,  1, -1);
-  fill(c, c, 0,o); vertex(-1,  1,  1);
-  fill(c, c, 0,o); vertex(-1, -1,  1);
-  fill(c, c, 0,o); vertex(-1, -1, -1);
-
-  endShape();
-}
- - - diff --git a/examples/seneca/bug634/test6/test.pjs b/examples/seneca/bug634/test6/test.pjs deleted file mode 100644 index 0ecedad2e..000000000 --- a/examples/seneca/bug634/test6/test.pjs +++ /dev/null @@ -1,40 +0,0 @@ -float o = 0.1; -float c = 1; - -void setup() -{ - size(200, 200, P3D); - - colorMode(RGB, 1); - background(0); - stroke(1); - - translate(width/2, height/2, 0); - rotateX(-PI/7); - rotateY(PI/7); - scale(50); - - beginShape(QUADS); - - fill(c, 0, 0,o); vertex(-1, 1, 1); - fill(c, 0, 0,o); vertex( 1, 1, 1); - fill(c, 0, 0,o); vertex( 1, -1, 1); - fill(c, 0, 0,o); vertex(-1, -1, 1); - - fill(0, c, 0,o); vertex( 1, 1, 1); - fill(0, c, 0,o); vertex( 1, 1, -1); - fill(0, c, 0,o); vertex( 1, -1, -1); - fill(0, c, 0,o); vertex( 1, -1, 1); - - fill(0, 0, c,o); vertex( 1, 1, -1); - fill(0, 0, c,o); vertex(-1, 1, -1); - fill(0, 0, c,o); vertex(-1, -1, -1); - fill(0, 0, c,o); vertex( 1, -1, -1); - - fill(c, c, 0,o); vertex(-1, 1, -1); - fill(c, c, 0,o); vertex(-1, 1, 1); - fill(c, c, 0,o); vertex(-1, -1, 1); - fill(c, c, 0,o); vertex(-1, -1, -1); - - endShape(); -} \ No newline at end of file diff --git a/examples/seneca/bug634/test7/test.html b/examples/seneca/bug634/test7/test.html deleted file mode 100644 index 8f5d74cc7..000000000 --- a/examples/seneca/bug634/test7/test.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 634

- -

This page tests the fix for bug 634 for Processing.js
- No P5 screenshot because it has issues with this test.
- Testing case when vertex is called without providing type (POINTS, TRIANGLES, etc)
-
- beginShape();
- vertex(0, 0, 0);
- endShape();
-

- -

- -

- -
-// Test by Andor Salga
-import processing.opengl.*;
-
-void setup() 
-{ 
-  size(100, 100, OPENGL);
-  background(0);
-
-  stroke(255, 0, 0);
-  for(int x = 0; x < 100; x++){
-    beginShape();
-    vertex(x, x, 0);
-    endShape();
-  }
-
-  stroke(0, 255, 0);
-  for(int x = 0; x < 100; x++){
-    beginShape();
-    vertex(100-x, x, 0);
-    endShape();
-  }
-
-  stroke(0 ,0, 255);
-  for(int x = 0; x < 100; x++){
-    beginShape();
-    vertex(100-x, 50, 0);
-    endShape();
-  }
-}
- - - diff --git a/examples/seneca/bug634/test7/test.pjs b/examples/seneca/bug634/test7/test.pjs deleted file mode 100644 index ea174741c..000000000 --- a/examples/seneca/bug634/test7/test.pjs +++ /dev/null @@ -1,29 +0,0 @@ -// Test by Andor Salga -import processing.opengl.*; - -void setup() -{ - size(100, 100, OPENGL); - background(0); - - stroke(255, 0, 0); - for(int x = 0; x < 100; x++){ - beginShape(); - vertex(x, x, 0); - endShape(); - } - - stroke(0, 255, 0); - for(int x = 0; x < 100; x++){ - beginShape(); - vertex(100-x, x, 0); - endShape(); - } - - stroke(0 ,0, 255); - for(int x = 0; x < 100; x++){ - beginShape(); - vertex(100-x, 50, 0); - endShape(); - } -} \ No newline at end of file diff --git a/examples/seneca/bug650/tests/noclose/berlin-1.jpg b/examples/seneca/bug650/tests/noclose/berlin-1.jpg deleted file mode 100644 index 2fae65a21..000000000 Binary files a/examples/seneca/bug650/tests/noclose/berlin-1.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/noclose/noclose.html b/examples/seneca/bug650/tests/noclose/noclose.html deleted file mode 100644 index b35ee505e..000000000 --- a/examples/seneca/bug650/tests/noclose/noclose.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for Textures

- -

This page tests PJS textures
-

- -

- - -

- -
-
-/* @pjs preload="berlin-1.jpg" */
-
-import processing.opengl.*;
-
-size(500, 200, P3D);
-background(200);
-
-PImage img = loadImage("berlin-1.jpg");
-textureMode(NORMALIZED);
-
-noFill();
-beginShape();
-texture(img);
-vertex(30, 20, 0, 0, 1);
-vertex(85, 20, 0, 1, 1);
-vertex(85, 75, 0, 1, 0);
-vertex(30, 75, 0, 0, 0);
-endShape();
-
-beginShape();
-texture(img);
-vertex(130, 20, 0, 0, 0);
-vertex(185, 20, 0, 0, 1);
-vertex(185, 75, 0, 1, 1);
-endShape();
-
-beginShape();
-texture(img);
-vertex(230, 20, 0, 0, 0);
-vertex(285, 20, 0, 1, 1);
-endShape();
-
-beginShape();
-texture(img);
-vertex(330, 20, 0, 1, 1);
-endShape();
- - - diff --git a/examples/seneca/bug650/tests/noclose/noclose.pjs b/examples/seneca/bug650/tests/noclose/noclose.pjs deleted file mode 100644 index 50abd4379..000000000 --- a/examples/seneca/bug650/tests/noclose/noclose.pjs +++ /dev/null @@ -1,36 +0,0 @@ -/* @pjs preload="berlin-1.jpg" */ - -import processing.opengl.*; - -size(500, 200, P3D); -background(200); - -PImage img = loadImage("berlin-1.jpg"); -textureMode(NORMALIZED); - -noFill(); -beginShape(); -texture(img); -vertex(30, 20, 0, 0, 1); -vertex(85, 20, 0, 1, 1); -vertex(85, 75, 0, 1, 0); -vertex(30, 75, 0, 0, 0); -endShape(); - -beginShape(); -texture(img); -vertex(130, 20, 0, 0, 0); -vertex(185, 20, 0, 0, 1); -vertex(185, 75, 0, 1, 1); -endShape(); - -beginShape(); -texture(img); -vertex(230, 20, 0, 0, 0); -vertex(285, 20, 0, 1, 1); -endShape(); - -beginShape(); -texture(img); -vertex(330, 20, 0, 1, 1); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bug650/tests/noclose/p5_result.jpg b/examples/seneca/bug650/tests/noclose/p5_result.jpg deleted file mode 100644 index 0cd97b6e7..000000000 Binary files a/examples/seneca/bug650/tests/noclose/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/nomod/berlin-1.jpg b/examples/seneca/bug650/tests/nomod/berlin-1.jpg deleted file mode 100644 index 2fae65a21..000000000 Binary files a/examples/seneca/bug650/tests/nomod/berlin-1.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/nomod/nomod.html b/examples/seneca/bug650/tests/nomod/nomod.html deleted file mode 100644 index 497a200e2..000000000 --- a/examples/seneca/bug650/tests/nomod/nomod.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for Textures

- -

This page tests PJS textures
-

- -

- - -

- -
-
-/* @pjs preload="berlin-1.jpg" */
-
-import processing.opengl.*;
-
-size(500, 200, P3D);
-background(200);
-
-PImage img = loadImage("berlin-1.jpg");
-textureMode(NORMALIZED);
-
-beginShape();
-texture(img);
-vertex(30, 20, 0, 0, 0);
-vertex(85, 20, 0, 1, 0);
-vertex(85, 75, 0, 1, 1);
-vertex(30, 75, 0, 0, 1);
-endShape(CLOSE);
-
-beginShape();
-texture(img);
-vertex(130, 20, 0, 0, 0);
-vertex(185, 20, 0, 1, 0);
-vertex(185, 75, 0, 1, 1);
-endShape(CLOSE);
-
-beginShape();
-texture(img);
-vertex(230, 20, 0, 0, 0);
-vertex(285, 20, 0, 1, 1);
-endShape(CLOSE);
-
-beginShape();
-texture(img);
-vertex(330, 20, 0, 0, 0);
-endShape(CLOSE);
- - - diff --git a/examples/seneca/bug650/tests/nomod/nomod.pjs b/examples/seneca/bug650/tests/nomod/nomod.pjs deleted file mode 100644 index 65e9bf613..000000000 --- a/examples/seneca/bug650/tests/nomod/nomod.pjs +++ /dev/null @@ -1,35 +0,0 @@ -/* @pjs preload="berlin-1.jpg" */ - -import processing.opengl.*; - -size(500, 200, P3D); -background(200); - -PImage img = loadImage("berlin-1.jpg"); -textureMode(NORMALIZED); - -beginShape(); -texture(img); -vertex(30, 20, 0, 0, 0); -vertex(85, 20, 0, 1, 0); -vertex(85, 75, 0, 1, 1); -vertex(30, 75, 0, 0, 1); -endShape(CLOSE); - -beginShape(); -texture(img); -vertex(130, 20, 0, 0, 0); -vertex(185, 20, 0, 1, 0); -vertex(185, 75, 0, 1, 1); -endShape(CLOSE); - -beginShape(); -texture(img); -vertex(230, 20, 0, 0, 0); -vertex(285, 20, 0, 1, 1); -endShape(CLOSE); - -beginShape(); -texture(img); -vertex(330, 20, 0, 0, 0); -endShape(CLOSE); \ No newline at end of file diff --git a/examples/seneca/bug650/tests/nomod/p5_result.jpg b/examples/seneca/bug650/tests/nomod/p5_result.jpg deleted file mode 100644 index 2893862e2..000000000 Binary files a/examples/seneca/bug650/tests/nomod/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/polygon/berlin-1.jpg b/examples/seneca/bug650/tests/polygon/berlin-1.jpg deleted file mode 100644 index 2fae65a21..000000000 Binary files a/examples/seneca/bug650/tests/polygon/berlin-1.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/polygon/p5_result.jpg b/examples/seneca/bug650/tests/polygon/p5_result.jpg deleted file mode 100644 index 788622eaf..000000000 Binary files a/examples/seneca/bug650/tests/polygon/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/polygon/polygon.html b/examples/seneca/bug650/tests/polygon/polygon.html deleted file mode 100644 index 488daaa28..000000000 --- a/examples/seneca/bug650/tests/polygon/polygon.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for Textures

- -

This page tests PJS textures
-

- -

- - -

- -
-
-/* @pjs preload="berlin-1.jpg" */
-
-import processing.opengl.*;
-
-size(500, 200, P3D);
-background(200);
-
-PImage img = loadImage("berlin-1.jpg");
-textureMode(NORMALIZED);
-
-beginShape();
-texture(img);
-vertex(20, 20, 0, 0, 0);
-vertex(40, 20, 0, 0, 1);
-vertex(40, 40, 0, 1, 1);
-vertex(60, 40, 0, 1, 0);
-vertex(60, 60, 0, 0, 1);
-vertex(20, 60, 0, 0, 0);
-endShape(CLOSE);
-
-beginShape();
-texture(img);
-vertex(120, 20, 0, 0, 1);
-vertex(140, 20, 0, 1, 0);
-vertex(140, 40, 0, 1, 1);
-vertex(160, 40, 0, 0, 1);
-vertex(160, 60, 0, 0, 0);
-endShape(CLOSE);
-
-beginShape();
-texture(img);
-vertex(220, 20, 0, 1, 1);
-vertex(240, 20, 0, 1, 0);
-vertex(240, 40, 0, 0, 1);
-vertex(260, 40, 0, 1, 0);
-endShape(CLOSE);
-
-beginShape();
-texture(img);
-vertex(320, 20, 0, 1, 1);
-vertex(340, 20, 0, 1, 0);
-vertex(340, 40, 0, 0, 0);
-endShape(CLOSE);
-
-beginShape();
-texture(img);
-vertex(420, 20, 0, 0, 0);
-vertex(440, 20, 0, 1, 1);
-endShape(CLOSE);
- - - diff --git a/examples/seneca/bug650/tests/polygon/polygon.pjs b/examples/seneca/bug650/tests/polygon/polygon.pjs deleted file mode 100644 index 9d2ad40aa..000000000 --- a/examples/seneca/bug650/tests/polygon/polygon.pjs +++ /dev/null @@ -1,49 +0,0 @@ -/* @pjs preload="berlin-1.jpg" */ - -import processing.opengl.*; - -size(500, 200, P3D); -background(200); - -PImage img = loadImage("berlin-1.jpg"); -textureMode(NORMALIZED); - -beginShape(); -texture(img); -vertex(20, 20, 0, 0, 0); -vertex(40, 20, 0, 0, 1); -vertex(40, 40, 0, 1, 1); -vertex(60, 40, 0, 1, 0); -vertex(60, 60, 0, 0, 1); -vertex(20, 60, 0, 0, 0); -endShape(CLOSE); - -beginShape(); -texture(img); -vertex(120, 20, 0, 0, 1); -vertex(140, 20, 0, 1, 0); -vertex(140, 40, 0, 1, 1); -vertex(160, 40, 0, 0, 1); -vertex(160, 60, 0, 0, 0); -endShape(CLOSE); - -beginShape(); -texture(img); -vertex(220, 20, 0, 1, 1); -vertex(240, 20, 0, 1, 0); -vertex(240, 40, 0, 0, 1); -vertex(260, 40, 0, 1, 0); -endShape(CLOSE); - -beginShape(); -texture(img); -vertex(320, 20, 0, 1, 1); -vertex(340, 20, 0, 1, 0); -vertex(340, 40, 0, 0, 0); -endShape(CLOSE); - -beginShape(); -texture(img); -vertex(420, 20, 0, 0, 0); -vertex(440, 20, 0, 1, 1); -endShape(CLOSE); \ No newline at end of file diff --git a/examples/seneca/bug650/tests/quad_strip/berlin-1.jpg b/examples/seneca/bug650/tests/quad_strip/berlin-1.jpg deleted file mode 100644 index 2fae65a21..000000000 Binary files a/examples/seneca/bug650/tests/quad_strip/berlin-1.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/quad_strip/p5_result.jpg b/examples/seneca/bug650/tests/quad_strip/p5_result.jpg deleted file mode 100644 index 690bdbff7..000000000 Binary files a/examples/seneca/bug650/tests/quad_strip/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/quad_strip/quad_strip.html b/examples/seneca/bug650/tests/quad_strip/quad_strip.html deleted file mode 100644 index 21db24edf..000000000 --- a/examples/seneca/bug650/tests/quad_strip/quad_strip.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for Textures

- -

This page tests PJS textures
-

- -

- - -

- -
-
-/* @pjs preload="berlin-1.jpg" */
-
-import processing.opengl.*;
-
-size(500, 200, P3D);
-background(200);
-
-PImage img = loadImage("berlin-1.jpg");
-textureMode(NORMALIZED);
-
-beginShape(QUAD_STRIP); 
-texture(img);
-vertex(30, 20, 0, 0, 0);
-vertex(30, 75, 0, 1, 1);
-vertex(50, 20, 0, 1, 0);
-vertex(50, 75, 0, 0, 0);
-
-vertex(65, 20, 0, 0, 0);
-vertex(65, 75, 0, 1, 0); 
-vertex(85, 20, 0, 1, 1);
-vertex(85, 75, 0, 0, 0);
-endShape();
-
-beginShape(QUAD_STRIP); 
-texture(img);
-vertex(130, 20, 0, 1, 1);
-vertex(130, 75, 0, 1, 0);
-vertex(150, 20, 0, 0, 0);
-vertex(150, 75, 0, 0, 1);
-vertex(165, 20, 0, 1, 0);
-vertex(165, 75, 0, 1, 1);
-vertex(185, 20, 0, 0, 1);
-endShape();
-
-beginShape(QUAD_STRIP); 
-texture(img);
-vertex(230, 20, 0, 1, 1); 
-vertex(230, 75, 0, 0, 0);
-vertex(250, 20, 0, 0, 1);
-vertex(250, 75, 0, 1, 0);
-vertex(265, 20, 0, 1, 1);
-vertex(285, 20, 0, 0, 1);
-vertex(285, 75, 0, 0, 0);
-endShape();
-
-beginShape(QUAD_STRIP); 
-texture(img);
-vertex(330, 20, 0, 0, 0);
-vertex(330, 75, 0, 0, 1);
-vertex(350, 20, 0, 1, 0);
-vertex(365, 20, 0, 0, 1);
-vertex(365, 75, 0, 1, 1);
-vertex(385, 20, 0, 0, 0);
-vertex(385, 75, 0, 1, 0);
-endShape();
-
-beginShape(QUAD_STRIP); 
-texture(img);
-vertex(430, 20, 0, 0, 0);
-vertex(450, 20, 0, 1, 1);
-vertex(450, 75, 0, 1, 1);
-vertex(465, 20, 0, 0, 1);
-vertex(465, 75, 0, 1, 0);
-vertex(485, 20, 0, 1, 1);
-vertex(485, 75, 0, 1, 0);
-endShape();
-
-beginShape(QUAD_STRIP); 
-texture(img);
-vertex(30, 120, 0, 0, 1); 
-vertex(30, 175, 0, 1, 0);
-vertex(50, 120, 0, 1, 1);
-vertex(50, 175, 0, 0, 1);
-vertex(65, 120, 0, 1, 0);
-vertex(65, 175, 0, 0, 1);
-endShape();
-
-beginShape(QUAD_STRIP); 
-texture(img);
-vertex(130, 120, 0, 0, 0);
-vertex(130, 175, 0, 0, 1);
-vertex(150, 120, 0, 1, 0);
-vertex(150, 175, 0, 1, 1);
-vertex(165, 120, 0, 1, 0);
-endShape();
-
-beginShape(QUAD_STRIP); 
-texture(img);
-vertex(230, 120, 0, 1, 0);
-vertex(230, 175, 0, 1, 1);
-vertex(250, 120, 0, 1, 0);
-vertex(250, 175, 0, 0, 1);
-endShape();
-
-beginShape(QUAD_STRIP); 
-texture(img);
-vertex(330, 120, 0, 1, 1);
-vertex(330, 175, 0, 0, 1);
-vertex(350, 120, 0, 1, 0);
-endShape();
-
-beginShape(QUAD_STRIP); 
-texture(img);
-vertex(430, 120, 0, 0, 0);
-vertex(430, 175, 0, 1, 1);
-endShape();
- - - diff --git a/examples/seneca/bug650/tests/quad_strip/quad_strip.pjs b/examples/seneca/bug650/tests/quad_strip/quad_strip.pjs deleted file mode 100644 index c3a5dbee9..000000000 --- a/examples/seneca/bug650/tests/quad_strip/quad_strip.pjs +++ /dev/null @@ -1,106 +0,0 @@ -/* @pjs preload="berlin-1.jpg" */ - -import processing.opengl.*; - -size(500, 200, P3D); -background(200); - -PImage img = loadImage("berlin-1.jpg"); -textureMode(NORMALIZED); - -beginShape(QUAD_STRIP); -texture(img); -vertex(30, 20, 0, 0, 0); -vertex(30, 75, 0, 1, 1); -vertex(50, 20, 0, 1, 0); -vertex(50, 75, 0, 0, 0); - -vertex(65, 20, 0, 0, 0); -vertex(65, 75, 0, 1, 0); -vertex(85, 20, 0, 1, 1); -vertex(85, 75, 0, 0, 0); -endShape(); - -beginShape(QUAD_STRIP); -texture(img); -vertex(130, 20, 0, 1, 1); -vertex(130, 75, 0, 1, 0); -vertex(150, 20, 0, 0, 0); -vertex(150, 75, 0, 0, 1); -vertex(165, 20, 0, 1, 0); -vertex(165, 75, 0, 1, 1); -vertex(185, 20, 0, 0, 1); -endShape(); - -beginShape(QUAD_STRIP); -texture(img); -vertex(230, 20, 0, 1, 1); -vertex(230, 75, 0, 0, 0); -vertex(250, 20, 0, 0, 1); -vertex(250, 75, 0, 1, 0); -vertex(265, 20, 0, 1, 1); -vertex(285, 20, 0, 0, 1); -vertex(285, 75, 0, 0, 0); -endShape(); - -beginShape(QUAD_STRIP); -texture(img); -vertex(330, 20, 0, 0, 0); -vertex(330, 75, 0, 0, 1); -vertex(350, 20, 0, 1, 0); -vertex(365, 20, 0, 0, 1); -vertex(365, 75, 0, 1, 1); -vertex(385, 20, 0, 0, 0); -vertex(385, 75, 0, 1, 0); -endShape(); - -beginShape(QUAD_STRIP); -texture(img); -vertex(430, 20, 0, 0, 0); -vertex(450, 20, 0, 1, 1); -vertex(450, 75, 0, 1, 1); -vertex(465, 20, 0, 0, 1); -vertex(465, 75, 0, 1, 0); -vertex(485, 20, 0, 1, 1); -vertex(485, 75, 0, 1, 0); -endShape(); - -beginShape(QUAD_STRIP); -texture(img); -vertex(30, 120, 0, 0, 1); -vertex(30, 175, 0, 1, 0); -vertex(50, 120, 0, 1, 1); -vertex(50, 175, 0, 0, 1); -vertex(65, 120, 0, 1, 0); -vertex(65, 175, 0, 0, 1); -endShape(); - -beginShape(QUAD_STRIP); -texture(img); -vertex(130, 120, 0, 0, 0); -vertex(130, 175, 0, 0, 1); -vertex(150, 120, 0, 1, 0); -vertex(150, 175, 0, 1, 1); -vertex(165, 120, 0, 1, 0); -endShape(); - -beginShape(QUAD_STRIP); -texture(img); -vertex(230, 120, 0, 1, 0); -vertex(230, 175, 0, 1, 1); -vertex(250, 120, 0, 1, 0); -vertex(250, 175, 0, 0, 1); -endShape(); - -beginShape(QUAD_STRIP); -texture(img); -vertex(330, 120, 0, 1, 1); -vertex(330, 175, 0, 0, 1); -vertex(350, 120, 0, 1, 0); -endShape(); - -beginShape(QUAD_STRIP); -texture(img); -vertex(430, 120, 0, 0, 0); -vertex(430, 175, 0, 1, 1); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bug650/tests/quads/berlin-1.jpg b/examples/seneca/bug650/tests/quads/berlin-1.jpg deleted file mode 100644 index 2fae65a21..000000000 Binary files a/examples/seneca/bug650/tests/quads/berlin-1.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/quads/p5_result.jpg b/examples/seneca/bug650/tests/quads/p5_result.jpg deleted file mode 100644 index aa8380065..000000000 Binary files a/examples/seneca/bug650/tests/quads/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/quads/quads.html b/examples/seneca/bug650/tests/quads/quads.html deleted file mode 100644 index 0671cd5bb..000000000 --- a/examples/seneca/bug650/tests/quads/quads.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for Textures

- -

This page tests PJS textures
-

- -

- - -

- -
-
-/* @pjs preload="berlin-1.jpg" */
-
-import processing.opengl.*;
-
-size(500, 200, P3D);
-background(200);
-
-PImage img = loadImage("berlin-1.jpg");
-textureMode(NORMALIZED);
-
-beginShape(QUADS);
-texture(img);
-vertex(30, 20, 0, 0, 0);
-vertex(30, 75, 0, 0, 1);
-vertex(50, 75, 0, 1, 1);
-vertex(50, 20, 0, 1, 0);
-vertex(65, 20, 0, 0, 0);
-vertex(65, 75, 0, 1, 0);
-vertex(85, 75, 0, 1, 1);
-vertex(85, 20, 0, 0, 1);
-endShape();
-
-beginShape(QUADS);
-texture(img);
-vertex(130, 20, 0, 0, 0);
-vertex(130, 75, 0, 0, 1);
-vertex(150, 75, 0, 0, 1);
-vertex(150, 20, 0, 1, 1);
-vertex(165, 20, 0, 1, 0);
-vertex(165, 75, 0, 1, 0);
-vertex(185, 75, 0, 0, 0);
-endShape();
-
-beginShape(QUADS);
-texture(img);
-vertex(230, 20, 0, 1, 1);
-vertex(230, 75, 0, 1, 0);
-vertex(250, 75, 0, 0, 1);
-vertex(250, 20, 0, 0, 0);
-vertex(265, 20, 0, 0, 1);
-vertex(285, 75, 0, 1, 0);
-vertex(285, 20, 0, 1, 1);
-endShape();
-
-beginShape(QUADS);
-texture(img);
-vertex(330, 20, 0, 0, 0);
-vertex(330, 75, 0, 0, 1);
-vertex(350, 75, 0, 1, 1);
-vertex(365, 20, 0, 1, 0);
-vertex(365, 75, 0, 0, 1);
-vertex(385, 75, 0, 0, 0);
-vertex(385, 20, 0, 0, 1);
-endShape();
-
-beginShape(QUADS);
-texture(img);
-vertex(430, 20, 0, 0, 0);
-vertex(450, 75, 0, 0, 1);
-vertex(450, 20, 0, 1, 1);
-vertex(465, 20, 0, 1, 0);
-vertex(465, 75, 0, 0, 1);
-vertex(485, 75, 0, 1, 1);
-vertex(485, 20, 0, 0, 0);
-endShape();
-
-beginShape(QUADS);
-texture(img);
-vertex(30, 120, 0, 1, 1);
-vertex(30, 175, 0, 1, 0);
-vertex(50, 175, 0, 0, 1);
-vertex(50, 120, 0, 1, 1);
-vertex(65, 120, 0, 0, 1);
-vertex(65, 175, 0, 0, 0);
-endShape();
-
-beginShape(QUADS);
-texture(img);
-vertex(130, 120, 0, 0, 0);
-vertex(130, 175, 0, 0, 1);
-vertex(150, 175, 0, 1, 0);
-vertex(150, 120, 0, 1, 1);
-vertex(165, 120, 0, 0, 1);
-endShape();
-
-beginShape(QUADS);
-texture(img);
-vertex(230, 120, 0, 1, 1);
-vertex(230, 175, 0, 1, 0);
-vertex(250, 175, 0, 0, 1);
-vertex(250, 120, 0, 1, 1);
-endShape();
-
-beginShape(QUADS);
-texture(img);
-vertex(330, 120, 0, 0, 0);
-vertex(330, 175, 0, 1, 1);
-vertex(350, 175, 0, 0, 1);
-endShape();
-
-beginShape(QUADS);
-texture(img);
-vertex(430, 120, 0, 0, 0);
-vertex(430, 175, 0, 0, 1);
-endShape();
- - - diff --git a/examples/seneca/bug650/tests/quads/quads.pjs b/examples/seneca/bug650/tests/quads/quads.pjs deleted file mode 100644 index 9d7f8418d..000000000 --- a/examples/seneca/bug650/tests/quads/quads.pjs +++ /dev/null @@ -1,105 +0,0 @@ -/* @pjs preload="berlin-1.jpg" */ - -import processing.opengl.*; - -size(500, 200, P3D); -background(200); - -PImage img = loadImage("berlin-1.jpg"); -textureMode(NORMALIZED); - -beginShape(QUADS); -texture(img); -vertex(30, 20, 0, 0, 0); -vertex(30, 75, 0, 0, 1); -vertex(50, 75, 0, 1, 1); -vertex(50, 20, 0, 1, 0); -vertex(65, 20, 0, 0, 0); -vertex(65, 75, 0, 1, 0); -vertex(85, 75, 0, 1, 1); -vertex(85, 20, 0, 0, 1); -endShape(); - -beginShape(QUADS); -texture(img); -vertex(130, 20); -vertex(130, 75); -vertex(150, 75); -vertex(150, 20); -vertex(165, 20); -vertex(165, 75); -vertex(185, 75); -endShape(); - -beginShape(QUADS); -texture(img); -vertex(230, 20, 0, 1, 1); -vertex(230, 75, 0, 1, 0); -vertex(250, 75, 0, 0, 1); -vertex(250, 20, 0, 0, 0); -vertex(265, 20, 0, 0, 1); -vertex(285, 75, 0, 1, 0); -vertex(285, 20, 0, 1, 1); -endShape(); - -beginShape(QUADS); -texture(img); -vertex(330, 20, 0, 0, 0); -vertex(330, 75, 0, 0, 1); -vertex(350, 75, 0, 1, 1); -vertex(365, 20, 0, 1, 0); -vertex(365, 75, 0, 0, 1); -vertex(385, 75, 0, 0, 0); -vertex(385, 20, 0, 0, 1); -endShape(); - -beginShape(QUADS); -texture(img); -vertex(430, 20, 0, 0, 0); -vertex(450, 75, 0, 0, 1); -vertex(450, 20, 0, 1, 1); -vertex(465, 20, 0, 1, 0); -vertex(465, 75, 0, 0, 1); -vertex(485, 75, 0, 1, 1); -vertex(485, 20, 0, 0, 0); -endShape(); - -beginShape(QUADS); -texture(img); -vertex(30, 120, 0, 1, 1); -vertex(30, 175, 0, 1, 0); -vertex(50, 175, 0, 0, 1); -vertex(50, 120, 0, 1, 1); -vertex(65, 120, 0, 0, 1); -vertex(65, 175, 0, 0, 0); -endShape(); - -beginShape(QUADS); -texture(img); -vertex(130, 120, 0, 0, 0); -vertex(130, 175, 0, 0, 1); -vertex(150, 175, 0, 1, 0); -vertex(150, 120, 0, 1, 1); -vertex(165, 120, 0, 0, 1); -endShape(); - -beginShape(QUADS); -texture(img); -vertex(230, 120, 0, 1, 1); -vertex(230, 175, 0, 1, 0); -vertex(250, 175, 0, 0, 1); -vertex(250, 120, 0, 1, 1); -endShape(); - -beginShape(QUADS); -texture(img); -vertex(330, 120, 0, 0, 0); -vertex(330, 175, 0, 1, 1); -vertex(350, 175, 0, 0, 1); -endShape(); - -beginShape(QUADS); -texture(img); -vertex(430, 120, 0, 0, 0); -vertex(430, 175, 0, 0, 1); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bug650/tests/triangle_fan/berlin-1.jpg b/examples/seneca/bug650/tests/triangle_fan/berlin-1.jpg deleted file mode 100644 index 2fae65a21..000000000 Binary files a/examples/seneca/bug650/tests/triangle_fan/berlin-1.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/triangle_fan/p5_result.jpg b/examples/seneca/bug650/tests/triangle_fan/p5_result.jpg deleted file mode 100644 index 57c07d4b8..000000000 Binary files a/examples/seneca/bug650/tests/triangle_fan/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/triangle_fan/triangle_fan.html b/examples/seneca/bug650/tests/triangle_fan/triangle_fan.html deleted file mode 100644 index 3a6c71117..000000000 --- a/examples/seneca/bug650/tests/triangle_fan/triangle_fan.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for Textures

- -

This page tests PJS textures
-

- -

- - -

- -
-
-/* @pjs preload="berlin-1.jpg" */
-
-import processing.opengl.*;
-
-size(500, 200, P3D);
-background(200);
-
-PImage img = loadImage("berlin-1.jpg");
-
-size(500, 200, P3D);
-background(200);
-
-textureMode(NORMALIZED);
-
-beginShape(TRIANGLE_FAN);
-texture(img);
-vertex(60, 50, 0, 0, 0);
-vertex(60, 15, 0, 0, 1); 
-vertex(95, 50, 0, 1, 1);
-vertex(60, 85, 0, 1, 0);
-vertex(25, 50, 0, 0, 0);
-vertex(60, 15, 0, 0, 1);
-endShape();
-
-noStroke();
-beginShape(TRIANGLE_FAN);
-texture(img);
-vertex(160, 50, 0, 1, 1);
-vertex(160, 15, 0, 0, 1);
-vertex(195, 50, 0, 1, 0);
-vertex(160, 85, 0, 0, 0);
-vertex(125, 50, 0, 0, 1);
-endShape();
-
-stroke(0,0,255);
-beginShape(TRIANGLE_FAN);
-texture(img);
-vertex(260, 50, 0, 1, 0);
-vertex(260, 15, 0, 0, 1);
-vertex(295, 50, 0, 1, 1);
-vertex(260, 85, 0, 1, 0);
-vertex(260, 15, 0, 0, 0);
-endShape();
-
-beginShape(TRIANGLE_FAN);
-texture(img);
-vertex(360, 50, 0, 0.5, 0.5);
-vertex(360, 15, 0, 0, 1);
-vertex(395, 50, 0, 1, 1);
-vertex(325, 50, 0, 1, 0);
-vertex(360, 15, 0, 0, 0);
-endShape();
-
-beginShape(TRIANGLE_FAN);
-texture(img);
-vertex(460, 50, 0, 1, 1);
-vertex(460, 15, 0, 0, 0);
-vertex(460, 85, 0, 0, 1);
-vertex(425, 50, 0, 1, 0);
-vertex(460, 15, 0, 1, 1); 
-endShape();
-
-strokeWeight(2);
-stroke(0,128,128);
-beginShape(TRIANGLE_FAN);
-texture(img);
-vertex(60, 150, 0, 1, 1);
-vertex(95, 150, 0, 1, 0);
-vertex(60, 185, 0, 0, 1);
-vertex(25, 150, 0, 0, 0);
-vertex(60, 115, 0, 0, 1);
-endShape();
-
-beginShape(TRIANGLE_FAN);
-texture(img);
-vertex(160, 115, 0, 0.5, 0.5);
-vertex(195, 150, 0, 0, 1);
-vertex(160, 185, 0, 0.5, 1); 
-vertex(125, 150, 0, 1, 0.5);
-vertex(160, 115, 0, 1, 1);
-endShape();
-
-noStroke();
-beginShape(TRIANGLE_FAN);
-texture(img);
-vertex(260, 150, 0, 0, 1);
-vertex(260, 115, 0, 1, 0); 
-vertex(295, 150, 0, 1, 1);
-vertex(260, 185, 0, 0, 0);
-endShape();
-
-noStroke();
-beginShape(TRIANGLE_FAN);
-texture(img);
-vertex(360, 150, 0, 1, 1);
-vertex(360, 115, 0, 0, 1);
-vertex(395, 150, 0, 1, 0);
-endShape();
-
-beginShape(TRIANGLE_FAN);
-texture(img);
-vertex(460, 150, 0, 1, 1);
-vertex(460, 115, 0, 0, 0);
-endShape();
- - - diff --git a/examples/seneca/bug650/tests/triangle_fan/triangle_fan.pjs b/examples/seneca/bug650/tests/triangle_fan/triangle_fan.pjs deleted file mode 100644 index dcbe81280..000000000 --- a/examples/seneca/bug650/tests/triangle_fan/triangle_fan.pjs +++ /dev/null @@ -1,101 +0,0 @@ -/* @pjs preload="berlin-1.jpg" */ - -import processing.opengl.*; - -size(500, 200, P3D); -background(200); - -PImage img = loadImage("berlin-1.jpg"); - -textureMode(NORMALIZED); - -beginShape(TRIANGLE_FAN); -texture(img); -vertex(60, 50, 0, 0, 0); -vertex(60, 15, 0, 0, 1); -vertex(95, 50, 0, 1, 1); -vertex(60, 85, 0, 1, 0); -vertex(25, 50, 0, 0, 0); -vertex(60, 15, 0, 0, 1); -endShape(); - -noStroke(); -beginShape(TRIANGLE_FAN); -texture(img); -vertex(160, 50, 0, 1, 1); -vertex(160, 15, 0, 0, 1); -vertex(195, 50, 0, 1, 0); -vertex(160, 85, 0, 0, 0); -vertex(125, 50, 0, 0, 1); -endShape(); - -stroke(0,0,255); -beginShape(TRIANGLE_FAN); -texture(img); -vertex(260, 50, 0, 1, 0); -vertex(260, 15, 0, 0, 1); -vertex(295, 50, 0, 1, 1); -vertex(260, 85, 0, 1, 0); -vertex(260, 15, 0, 0, 0); -endShape(); - -beginShape(TRIANGLE_FAN); -texture(img); -vertex(360, 50, 0, 0.5, 0.5); -vertex(360, 15, 0, 0, 1); -vertex(395, 50, 0, 1, 1); -vertex(325, 50, 0, 1, 0); -vertex(360, 15, 0, 0, 0); -endShape(); - -beginShape(TRIANGLE_FAN); -texture(img); -vertex(460, 50, 0, 1, 1); -vertex(460, 15, 0, 0, 0); -vertex(460, 85, 0, 0, 1); -vertex(425, 50, 0, 1, 0); -vertex(460, 15, 0, 1, 1); -endShape(); - -strokeWeight(2); -stroke(0,128,128); -beginShape(TRIANGLE_FAN); -texture(img); -vertex(60, 150, 0, 1, 1); -vertex(95, 150, 0, 1, 0); -vertex(60, 185, 0, 0, 1); -vertex(25, 150, 0, 0, 0); -vertex(60, 115, 0, 0, 1); -endShape(); - -beginShape(TRIANGLE_FAN); -texture(img); -vertex(160, 115, 0, 0.5, 0.5); -vertex(195, 150, 0, 0, 1); -vertex(160, 185, 0, 0.5, 1); -vertex(125, 150, 0, 1, 0.5); -vertex(160, 115, 0, 1, 1); -endShape(); - -noStroke(); -beginShape(TRIANGLE_FAN); -texture(img); -vertex(260, 150, 0, 0, 1); -vertex(260, 115, 0, 1, 0); -vertex(295, 150, 0, 1, 1); -vertex(260, 185, 0, 0, 0); -endShape(); - -noStroke(); -beginShape(TRIANGLE_FAN); -texture(img); -vertex(360, 150, 0, 1, 1); -vertex(360, 115, 0, 0, 1); -vertex(395, 150, 0, 1, 0); -endShape(); - -beginShape(TRIANGLE_FAN); -texture(img); -vertex(460, 150, 0, 1, 1); -vertex(460, 115, 0, 0, 0); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bug650/tests/triangle_strip/berlin-1.jpg b/examples/seneca/bug650/tests/triangle_strip/berlin-1.jpg deleted file mode 100644 index 2fae65a21..000000000 Binary files a/examples/seneca/bug650/tests/triangle_strip/berlin-1.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/triangle_strip/p5_result.jpg b/examples/seneca/bug650/tests/triangle_strip/p5_result.jpg deleted file mode 100644 index cc5e30444..000000000 Binary files a/examples/seneca/bug650/tests/triangle_strip/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/triangle_strip/triangle_strip.html b/examples/seneca/bug650/tests/triangle_strip/triangle_strip.html deleted file mode 100644 index a248088e6..000000000 --- a/examples/seneca/bug650/tests/triangle_strip/triangle_strip.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for Textures

- -

This page tests PJS textures
-

- -

- - -

- -
-
-/* @pjs preload="berlin-1.jpg" */
-
-import processing.opengl.*;
-
-size(500, 200, P3D);
-background(200);
-
-PImage img = loadImage("berlin-1.jpg");
-
-size(500, 200, P3D);
-background(200);
-
-textureMode(NORMALIZED);
-
-beginShape(TRIANGLE_STRIP);
-texture(img);
-vertex(30, 75, 0, 0, 0);
-vertex(40, 20, 0, 1, 0);
-vertex(50, 75, 0, 0, 1);
-vertex(60, 20, 0, 1, 1);
-vertex(70, 75, 0, 0, 0);
-vertex(80, 20, 0, 1, 0);
-vertex(90, 75, 0, 1, 1);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-texture(img);
-vertex(130, 75, 0, 0, 0);
-vertex(140, 20, 0, 1, 0);
-vertex(150, 75, 0, 0, 1);
-vertex(160, 20, 0, 1, 1);
-vertex(170, 75, 0, 1, 0);
-vertex(180, 20, 0, 1, 1);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-texture(img);
-vertex(230, 75, 0 ,0, 1);
-vertex(240, 20, 0 ,0, 1);
-vertex(250, 75, 0 ,1, 1);
-vertex(260, 20, 0 ,0, 0);
-vertex(270, 75, 0 ,1, 0);
-vertex(290, 75, 0 ,0, 1);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-texture(img);
-vertex(330, 75, 0, 0, 0);
-vertex(340, 20, 0, 1, 0);
-vertex(350, 75, 0, 0, 1);
-vertex(360, 20, 0, 1, 1);
-vertex(380, 20, 0, 0, 0);
-vertex(390, 75, 0, 1, 1);
-endShape();
-
-stroke(0,255,0);
-beginShape(TRIANGLE_STRIP);
-texture(img);
-vertex(430, 75, 0 ,1, 0);
-vertex(440, 20, 0 ,0, 1);
-vertex(450, 75, 0 ,1, 1);
-vertex(470, 75, 0 ,0, 1);
-vertex(480, 20, 0 ,0, 0);
-vertex(490, 75, 0 ,1, 0);
-endShape();
-
-noStroke();
-beginShape(TRIANGLE_STRIP);
-texture(img);
-vertex(30, 175, 0 ,0, 1);
-vertex(40, 120, 0 ,1, 1);
-vertex(60, 120, 0 ,1, 0);
-vertex(70, 175, 0 ,0, 0);
-vertex(80, 120, 0 ,1, 1);
-vertex(90, 175, 0 ,0, 1);
-endShape();
-
-stroke(128,0,128);
-beginShape(TRIANGLE_STRIP);
-texture(img);
-vertex(130, 175, 0 ,0, 1);
-vertex(150, 175, 0 ,1, 1);
-vertex(160, 120, 0 ,1, 0);
-vertex(170, 175, 0 ,0, 0);
-vertex(180, 120, 0 ,1, 1);
-vertex(190, 175, 0 ,1, 0);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-texture(img);
-vertex(240, 120, 0 ,0, 1);
-vertex(250, 175, 0 ,1, 0);
-vertex(260, 120, 0 ,1, 1);
-vertex(270, 175, 0 ,0, 1);
-vertex(280, 120, 0 ,1, 1);
-vertex(290, 175, 0 ,1, 0);
-endShape();
-
-beginShape(TRIANGLE_STRIP);
-texture(img);
-vertex(330, 175, 0 ,0, 1);
-vertex(340, 120, 0 ,1, 1);
-vertex(350, 175, 0 ,1, 0);
-vertex(360, 120, 0 ,0, 1);
-vertex(370, 175, 0 ,0, 0);
-endShape();
-
-noStroke();
-beginShape(TRIANGLE_STRIP);
-texture(img);
-vertex(430, 175, 0 ,0, 1);
-vertex(440, 120, 0 ,1, 1);
-vertex(450, 175, 0 ,0, 0);
-vertex(460, 120, 0 ,1, 0);
-endShape();
- - - diff --git a/examples/seneca/bug650/tests/triangle_strip/triangle_strip.pjs b/examples/seneca/bug650/tests/triangle_strip/triangle_strip.pjs deleted file mode 100644 index 8d1333617..000000000 --- a/examples/seneca/bug650/tests/triangle_strip/triangle_strip.pjs +++ /dev/null @@ -1,112 +0,0 @@ -/* @pjs preload="berlin-1.jpg" */ - -import processing.opengl.*; - -size(500, 200, P3D); -background(200); - -PImage img = loadImage("berlin-1.jpg"); - -textureMode(NORMALIZED); - -beginShape(TRIANGLE_STRIP); -texture(img); -vertex(30, 75, 0, 0, 0); -vertex(40, 20, 0, 1, 0); -vertex(50, 75, 0, 0, 1); -vertex(60, 20, 0, 1, 1); -vertex(70, 75, 0, 0, 0); -vertex(80, 20, 0, 1, 0); -vertex(90, 75, 0, 1, 1); -endShape(); - -beginShape(TRIANGLE_STRIP); -texture(img); -vertex(130, 75, 0, 0, 0); -vertex(140, 20, 0, 1, 0); -vertex(150, 75, 0, 0, 1); -vertex(160, 20, 0, 1, 1); -vertex(170, 75, 0, 1, 0); -vertex(180, 20, 0, 1, 1); -endShape(); - -beginShape(TRIANGLE_STRIP); -texture(img); -vertex(230, 75, 0 ,0, 1); -vertex(240, 20, 0 ,0, 1); -vertex(250, 75, 0 ,1, 1); -vertex(260, 20, 0 ,0, 0); -vertex(270, 75, 0 ,1, 0); -vertex(290, 75, 0 ,0, 1); -endShape(); - -beginShape(TRIANGLE_STRIP); -texture(img); -vertex(330, 75, 0, 0, 0); -vertex(340, 20, 0, 1, 0); -vertex(350, 75, 0, 0, 1); -vertex(360, 20, 0, 1, 1); -vertex(380, 20, 0, 0, 0); -vertex(390, 75, 0, 1, 1); -endShape(); - -stroke(0,255,0); -beginShape(TRIANGLE_STRIP); -texture(img); -vertex(430, 75, 0 ,1, 0); -vertex(440, 20, 0 ,0, 1); -vertex(450, 75, 0 ,1, 1); -vertex(470, 75, 0 ,0, 1); -vertex(480, 20, 0 ,0, 0); -vertex(490, 75, 0 ,1, 0); -endShape(); - -noStroke(); -beginShape(TRIANGLE_STRIP); -texture(img); -vertex(30, 175, 0 ,0, 1); -vertex(40, 120, 0 ,1, 1); -vertex(60, 120, 0 ,1, 0); -vertex(70, 175, 0 ,0, 0); -vertex(80, 120, 0 ,1, 1); -vertex(90, 175, 0 ,0, 1); -endShape(); - -stroke(128,0,128); -beginShape(TRIANGLE_STRIP); -texture(img); -vertex(130, 175, 0 ,0, 1); -vertex(150, 175, 0 ,1, 1); -vertex(160, 120, 0 ,1, 0); -vertex(170, 175, 0 ,0, 0); -vertex(180, 120, 0 ,1, 1); -vertex(190, 175, 0 ,1, 0); -endShape(); - -beginShape(TRIANGLE_STRIP); -texture(img); -vertex(240, 120, 0 ,0, 1); -vertex(250, 175, 0 ,1, 0); -vertex(260, 120, 0 ,1, 1); -vertex(270, 175, 0 ,0, 1); -vertex(280, 120, 0 ,1, 1); -vertex(290, 175, 0 ,1, 0); -endShape(); - -beginShape(TRIANGLE_STRIP); -texture(img); -vertex(330, 175, 0 ,0, 1); -vertex(340, 120, 0 ,1, 1); -vertex(350, 175, 0 ,1, 0); -vertex(360, 120, 0 ,0, 1); -vertex(370, 175, 0 ,0, 0); -endShape(); - -noStroke(); -beginShape(TRIANGLE_STRIP); -texture(img); -vertex(430, 175, 0 ,0, 1); -vertex(440, 120, 0 ,1, 1); -vertex(450, 175, 0 ,0, 0); -vertex(460, 120, 0 ,1, 0); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bug650/tests/triangles/berlin-1.jpg b/examples/seneca/bug650/tests/triangles/berlin-1.jpg deleted file mode 100644 index 2fae65a21..000000000 Binary files a/examples/seneca/bug650/tests/triangles/berlin-1.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/triangles/p5_result.jpg b/examples/seneca/bug650/tests/triangles/p5_result.jpg deleted file mode 100644 index 305692ff2..000000000 Binary files a/examples/seneca/bug650/tests/triangles/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/bug650/tests/triangles/triangles.html b/examples/seneca/bug650/tests/triangles/triangles.html deleted file mode 100644 index a9fdd720b..000000000 --- a/examples/seneca/bug650/tests/triangles/triangles.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for Textures

- -

This page tests PJS textures
-

- -

- - -

- -
-
-/* @pjs preload="berlin-1.jpg" */
-
-import processing.opengl.*;
-
-size(500, 200, P3D);
-background(200);
-
-PImage img = loadImage("berlin-1.jpg");
-textureMode(NORMALIZED);
-
-beginShape(TRIANGLES);
-texture(img);
-vertex(30, 75, 0, 0, 0);
-vertex(40, 20, 0, 0, 1);
-vertex(50, 75, 0, 1, 0);
-vertex(60, 20, 0, 1, 1);
-vertex(70, 75, 0, 0, 1);
-vertex(80, 20, 0, 1, 1);
-endShape();
-
-beginShape(TRIANGLES);
-texture(img);
-vertex(130, 75, 0, 0, 0);
-vertex(140, 20, 0, 0, 1);
-vertex(150, 75, 0, 1, 0);
-vertex(160, 20, 0, 0, 0);
-vertex(170, 75, 0, 0, 1);
-endShape();
-
-beginShape(TRIANGLES);
-texture(img);
-vertex(230, 75, 0, 1, 1);
-vertex(240, 20, 0, 0, 1);
-vertex(250, 75, 0, 1, 0);
-vertex(270, 75, 0, 0, 0);
-vertex(280, 20, 0, 0, 1);
-endShape();
-
-beginShape(TRIANGLES);
-texture(img);
-vertex(330, 75, 0, 0, 1);
-vertex(350, 75, 0, 1, 0);
-vertex(360, 20, 0, 1, 1);
-vertex(370, 75, 0, 0, 1);
-vertex(380, 20, 0, 0, 0);
-endShape();
-
-beginShape(TRIANGLES);
-texture(img);
-vertex(430, 75, 0, 0, 0);
-vertex(440, 20, 0, 1, 0);
-vertex(450, 75, 0, 0, 1);
-vertex(460, 20, 0, 1, 1);
-endShape();
-
-beginShape(TRIANGLES);
-texture(img);
-vertex(30, 175, 0, 0, 0);
-vertex(40, 120, 0, 0, 1);
-vertex(50, 175, 0, 1, 0);
-endShape();
-
-beginShape(TRIANGLES);
-texture(img);
-vertex(130, 175, 0, 1, 1);
-vertex(140, 120, 0, 0, 0);
-endShape();
-
-beginShape(TRIANGLES);
-texture(img);
-vertex(240, 120, 0, 1, 1);
-vertex(250, 175, 0, 1, 0);
-vertex(260, 120, 0, 0, 1);
-vertex(270, 175, 0, 0, 0);
-vertex(280, 120, 0, 1, 0);
-endShape();
-
-beginShape(TRIANGLES);
-texture(img);
-vertex(330, 175, 0, 1, 0);
-vertex(340, 120, 0, 1, 1);
-vertex(360, 120, 0, 0, 0);
-vertex(370, 175, 0, 0, 0);
-vertex(380, 120, 0, 0, 1);
-endShape();
-
-beginShape(TRIANGLES);
-texture(img);
-vertex(430, 175, 0, 0, 0);
-vertex(440, 120, 0, 1, 0);
-vertex(450, 175, 0, 0, 1);
-vertex(460, 120, 0, 1, 1);
-vertex(480, 120, 0, 1, 0);
-endShape();
- - - diff --git a/examples/seneca/bug650/tests/triangles/triangles.pjs b/examples/seneca/bug650/tests/triangles/triangles.pjs deleted file mode 100644 index 267bd6d18..000000000 --- a/examples/seneca/bug650/tests/triangles/triangles.pjs +++ /dev/null @@ -1,94 +0,0 @@ -/* @pjs preload="berlin-1.jpg" */ - -import processing.opengl.*; - -size(500, 200, P3D); -background(200); - -PImage img = loadImage("berlin-1.jpg"); -textureMode(NORMALIZED); -noFill(); -beginShape(TRIANGLES); -texture(img); -vertex(30, 75, 0, 0, 0); -vertex(40, 20, 0, 0, 1); -vertex(50, 75, 0, 1, 0); -vertex(60, 20, 0, 1, 1); -vertex(70, 75, 0, 0, 1); -vertex(80, 20, 0, 1, 1); -endShape(); - -beginShape(TRIANGLES); -texture(img); -vertex(130, 75, 0, 0, 0); -vertex(140, 20, 0, 0, 1); -vertex(150, 75, 0, 1, 0); -vertex(160, 20, 0, 0, 0); -vertex(170, 75, 0, 0, 1); -endShape(); - -beginShape(TRIANGLES); -texture(img); -vertex(230, 75, 0, 1, 1); -vertex(240, 20, 0, 0, 1); -vertex(250, 75, 0, 1, 0); -vertex(270, 75, 0, 0, 0); -vertex(280, 20, 0, 0, 1); -endShape(); - -beginShape(TRIANGLES); -texture(img); -vertex(330, 75, 0, 0, 1); -vertex(350, 75, 0, 1, 0); -vertex(360, 20, 0, 1, 1); -vertex(370, 75, 0, 0, 1); -vertex(380, 20, 0, 0, 0); -endShape(); - -beginShape(TRIANGLES); -texture(img); -vertex(430, 75, 0, 0, 0); -vertex(440, 20, 0, 1, 0); -vertex(450, 75, 0, 0, 1); -vertex(460, 20, 0, 1, 1); -endShape(); - -beginShape(TRIANGLES); -texture(img); -vertex(30, 175, 0, 0, 0); -vertex(40, 120, 0, 0, 1); -vertex(50, 175, 0, 1, 0); -endShape(); - -beginShape(TRIANGLES); -texture(img); -vertex(130, 175, 0, 1, 1); -vertex(140, 120, 0, 0, 0); -endShape(); - -beginShape(TRIANGLES); -texture(img); -vertex(240, 120, 0, 1, 1); -vertex(250, 175, 0, 1, 0); -vertex(260, 120, 0, 0, 1); -vertex(270, 175, 0, 0, 0); -vertex(280, 120, 0, 1, 0); -endShape(); - -beginShape(TRIANGLES); -texture(img); -vertex(330, 175, 0, 1, 0); -vertex(340, 120, 0, 1, 1); -vertex(360, 120, 0, 0, 0); -vertex(370, 175, 0, 0, 0); -vertex(380, 120, 0, 0, 1); -endShape(); - -beginShape(TRIANGLES); -texture(img); -vertex(430, 175, 0, 0, 0); -vertex(440, 120, 0, 1, 0); -vertex(450, 175, 0, 0, 1); -vertex(460, 120, 0, 1, 1); -vertex(480, 120, 0, 1, 0); -endShape(); \ No newline at end of file diff --git a/examples/seneca/bug755/test.html b/examples/seneca/bug755/test.html deleted file mode 100644 index 4d216cb90..000000000 --- a/examples/seneca/bug755/test.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - -

Andor Salga

-

Bug 755

- -

- -

- -
-// Test from Processing.org
-
- - - diff --git a/examples/seneca/bug755/test.pjs b/examples/seneca/bug755/test.pjs deleted file mode 100644 index b8f252082..000000000 --- a/examples/seneca/bug755/test.pjs +++ /dev/null @@ -1,86 +0,0 @@ -import processing.opengl.*; - -void setup() { - size(500, 500, OPENGL); - - PFont font = loadFont("Arial"); - textFont(font,30); - - fill(0); - pushMatrix(); - translate(width/2, height/2, 0); - text("testing", 0,0,0); - popMatrix(); - - noFill(); - - stroke(0,0,255); - strokeWeight(2); - pushMatrix(); - translate(width/2, height/2, 0); - for(int i=0; i < 10; i++){ - line(random(-width/2, width/2), random(-height/2, height/2), random(-height/2, height/2), - random(-height/2, height/2),random(-height/2, height/2),random(-height/2, height/2)); - } - popMatrix(); - - pushMatrix(); - translate(width/2, height/2, 0); - text("testing", 0,30,0); - popMatrix(); - - stroke(255,0,0); - strokeWeight(3); - pushMatrix(); - translate(width/2, height/2, 0); - for(int i=0; i < 100; i++){ - point(random(-width/2, width/2), random(-height/2, height/2), 0); - } - popMatrix(); - - fill(0); - pushMatrix(); - translate(width/2, height/2, 0); - text("testing", 0,60,0); - popMatrix(); - - stroke(0,255,0); - strokeWeight(1); - pushMatrix(); - translate(width/2, height/2, 0); - for(int i=0; i < 10; i++){ - rect(random(-width/2, width/2), random(-height/2, height/2), - random(15,25), random(15,25)); - } - popMatrix(); - - fill(0); - pushMatrix(); - translate(width/2, height/2, 0); - text("testing", 0,90,0); - popMatrix(); - - stroke(0,128,128); - strokeWeight(1); - pushMatrix(); - translate(width/2, height/2, 0); - for(int i=0; i < 5; i++){ - translate(random(-width/4, width/4), random(-height/4, height/4), 0); - sphere(40); - } - popMatrix(); - - fill(0); - pushMatrix(); - translate(width/2, height/2, 0); - text("testing", 0,120,0); - popMatrix(); - - pushMatrix(); - translate(width/2, height/2, 0); - for(int i=0; i < 5; i++){ - translate(random(-width/4, width/4), random(-height/4, height/4), 0); - box(40); - } - popMatrix(); -} \ No newline at end of file diff --git a/examples/seneca/bug842/test.html b/examples/seneca/bug842/test.html deleted file mode 100644 index 866c97aa9..000000000 --- a/examples/seneca/bug842/test.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - -

Andor Salga

-

Bug 842

-

Box should slowly change color from black to blue.

- -

- -

- -
-// Test
-float c = 0;
-
-void setup() {
-  size(200, 200, P3D);
-}
-
-void draw() {
-  fill(0, 0, c, 255);
-  pushMatrix();
-  translate(50, 50, 0);
-  rotateX(20);
-  box(20);
-  popMatrix();
-  
-  c += 1;
-};
-
- - - diff --git a/examples/seneca/bug842/test.pjs b/examples/seneca/bug842/test.pjs deleted file mode 100644 index a98751cb7..000000000 --- a/examples/seneca/bug842/test.pjs +++ /dev/null @@ -1,16 +0,0 @@ -float c = 0; - -void setup() { - size(200, 200, P3D); -} - -void draw() { - fill(0, 0, c, 255); - pushMatrix(); - translate(50, 50, 0); - rotateX(20); - box(20); - popMatrix(); - - c += 1; -}; diff --git a/examples/seneca/bug954/test.html b/examples/seneca/bug954/test.html deleted file mode 100644 index f52f34160..000000000 --- a/examples/seneca/bug954/test.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -

Pomax

-

Bug 954

-

Click the canvas to start and stop the draw function. FrameCount should stop and restart where it left off.

- -

- -

- -
-// Test
-Ball bouncer;
-boolean play = false;
-
-void setup() {
-  frameRate(24);
-  if(!play) noLoop();
-  bouncer = new Ball(); }
-
-void draw() {
-  bouncer.computeNextStep(width, height, frameRate);
-  fill(0,0,0,20);
-  rect(0,0,width,height);
-  fill(255);
-  bouncer.draw();
-}
-
-boolean moo = true;
-void mousePressed() {
-  if(moo) {
-    play=true;
-    println("resuming, frame count is "+frameCount);
-    loop(); 
-  } else { 
-    println("stopping at frame "+frameCount);
-    noLoop(); }
-  moo = !moo; }
-
-class Ball
-{
-  int pos = 0;
-  int step = 0;
-  int radius = 20;
-  void computeNextStep(int sketch_width, int sketch_height, float frame_rate) {
-    step = (int) ((step + 1) % frame_rate);
-    float sin_value = abs(sin(PI*step/(float)frame_rate));
-    float bounce_height = (sketch_height/2) * sin_value;
-    float ball_height = sketch_height - (bounce_height + radius);
-    pos = (int)ball_height; }
-  void draw() { ellipse(width/2,pos,radius,radius); }
-}
-
- - - diff --git a/examples/seneca/bug954/test.pjs b/examples/seneca/bug954/test.pjs deleted file mode 100644 index f675d6a75..000000000 --- a/examples/seneca/bug954/test.pjs +++ /dev/null @@ -1,40 +0,0 @@ -Ball bouncer; -boolean play = false; - -void setup() { - frameRate(24); - if(!play) noLoop(); - bouncer = new Ball(); } - -void draw() { - bouncer.computeNextStep(width, height, frameRate); - fill(0,0,0,20); - rect(0,0,width,height); - fill(255); - bouncer.draw(); -} - -boolean moo = true; -void mousePressed() { - if(moo) { - play=true; - println("resuming, frame count is "+frameCount); - loop(); - } else { - println("stopping at frame "+frameCount); - noLoop(); } - moo = !moo; } - -class Ball -{ - int pos = 0; - int step = 0; - int radius = 20; - void computeNextStep(int sketch_width, int sketch_height, float frame_rate) { - step = (int) ((step + 1) % frame_rate); - float sin_value = abs(sin(PI*step/(float)frame_rate)); - float bounce_height = (sketch_height/2) * sin_value; - float ball_height = sketch_height - (bounce_height + radius); - pos = (int)ball_height; } - void draw() { ellipse(width/2,pos,radius,radius); } -} \ No newline at end of file diff --git a/examples/seneca/canvas properties/demo.pde b/examples/seneca/canvas properties/demo.pde deleted file mode 100755 index 3a4e779ea..000000000 --- a/examples/seneca/canvas properties/demo.pde +++ /dev/null @@ -1,7 +0,0 @@ -cursor(CROSS); -void setup() { size(100,100); noLoop(); } -void draw() { background(0,0,200); } -void mousePressed() { println("mouse pressed"); } -void mouseDragged() { println("mouse dragged"); } -void mouseReleased() { println("mouse released"); } -void mouseClicked() { println("mouse clicked"); } diff --git a/examples/seneca/canvas properties/index.html b/examples/seneca/canvas properties/index.html deleted file mode 100755 index f3e0fd850..000000000 --- a/examples/seneca/canvas properties/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - Canvas properties explanation - - - - -

Canvas properties

- -

By default any element that is tab-focussable (via tabindex) - gets an outline rendered by certain browsers. We turn this outline - off for canvas, by setting the canvas's style property "outline: none". - We also disable the onmousedown handler and text-select properties so - that the canvas does not count as a text-selectable item. Click-dragging - the canvas will not show the typical I-bar cursor associated with - text selection, and double clicking the canvas will not select it - as if it was a text element.

- - - - diff --git a/examples/seneca/canvas_size/test1/canvas_size.html b/examples/seneca/canvas_size/test1/canvas_size.html deleted file mode 100644 index 62e6b705a..000000000 --- a/examples/seneca/canvas_size/test1/canvas_size.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/examples/seneca/canvas_size/test1/canvas_size.pjs b/examples/seneca/canvas_size/test1/canvas_size.pjs deleted file mode 100644 index 2304afa38..000000000 --- a/examples/seneca/canvas_size/test1/canvas_size.pjs +++ /dev/null @@ -1,15 +0,0 @@ -void setup() { - size(500, 500, OPENGL); - fill(204); -} - -void draw() { - background(255, 0, 0); - - // Change height of the camera with mouseY - camera(0, 0, 400, // eyeX, eyeY, eyeZ - mouseX - width/2, mouseY - height/2, 0.0, // centerX, centerY, centerZ - 0.0, 1.0, 0.0); // upX, upY, upZ - - box(50); -} diff --git a/examples/seneca/conflictingNames/test.html b/examples/seneca/conflictingNames/test.html deleted file mode 100644 index b0f183fa4..000000000 --- a/examples/seneca/conflictingNames/test.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/examples/seneca/conflictingNames/test.pjs b/examples/seneca/conflictingNames/test.pjs deleted file mode 100644 index f4ac08d09..000000000 --- a/examples/seneca/conflictingNames/test.pjs +++ /dev/null @@ -1,32 +0,0 @@ -// Processing.js Example - -void setup() { - size(200, 200); - frameRate(25); // frameRate() function -} - -void draw() { - background(#00ff00); - if (frameCount % 100 == 0) { - println("FPS:" + frameRate); // frameRate var - } - - if (mousePressed) { // mousePressed var - background(#ff0000); - } - - if (keyPressed) { //keyPressed var - background(#0000ff); - } -} - -// mousePressed() function -void mousePressed() { - println("Mouse pressed"); -} - -// keyPressed() function -void keyPressed() { - println("Key pressed"); -} - diff --git a/examples/seneca/createGraphics3D/createGraphics2D-3D.pjs b/examples/seneca/createGraphics3D/createGraphics2D-3D.pjs deleted file mode 100644 index a45bf7c13..000000000 --- a/examples/seneca/createGraphics3D/createGraphics2D-3D.pjs +++ /dev/null @@ -1,30 +0,0 @@ -PGraphics pg; -float r = 0; -float c = 0; - -void setup() { - size(200, 200, P3D); - pg = createGraphics(80, 80); -} - -void draw() { - background(204); - fill(0, 0, c, 255); - noStroke(); - pushMatrix(); - translate(20, 20, 0); - rotateY(mouseX); - rotateX(mouseY); - box(20); - popMatrix(); - - pg.beginDraw(); - pg.background(0, 0, 0); - pg.stroke(255); - pg.fill(0, 0, c, 255); - pg.ellipse(mouseX-60, mouseY-60, 60, 60); - pg.endDraw(); - - image(pg, 60, 60); - c += 1; -} diff --git a/examples/seneca/createGraphics3D/createGraphics3D-2D.pjs b/examples/seneca/createGraphics3D/createGraphics3D-2D.pjs deleted file mode 100644 index e371038dc..000000000 --- a/examples/seneca/createGraphics3D/createGraphics3D-2D.pjs +++ /dev/null @@ -1,29 +0,0 @@ -PGraphics pg; -float r = 0; - -void setup() { - size(200, 200); - pg = createGraphics(80, 80, P3D); -} - -void draw() { - fill(0, 12); - rect(0, 0, width, height); - fill(255); - noStroke(); - ellipse(mouseX, mouseY, 60, 60); - - pg.beginDraw(); - pg.background(255, 0, 0); - pg.noFill(); - pg.stroke(255); - pg.pushMatrix(); - pg.translate(40, 40, 0); - pg.rotateY(mouseY); - pg.rotateX(mouseX); - pg.box(20); - pg.popMatrix(); - pg.endDraw(); - - image(pg, 60, 60); -} diff --git a/examples/seneca/createGraphics3D/createGraphics3D-3D.pjs b/examples/seneca/createGraphics3D/createGraphics3D-3D.pjs deleted file mode 100644 index 8e2306a92..000000000 --- a/examples/seneca/createGraphics3D/createGraphics3D-3D.pjs +++ /dev/null @@ -1,34 +0,0 @@ -PGraphics pg; -float c = 0; - -void setup() { - size(200, 200, P3D); - pg = createGraphics(80, 80, P3D); -} - -void draw() { - background(204); - fill(0, 0, c, 255); - noStroke(); - pushMatrix(); - translate(20, 20, 0); - rotateY(mouseX); - rotateX(mouseY); - box(20); - popMatrix(); - - pg.beginDraw(); - pg.background(0); - pg.noFill(); - pg.stroke(255); - pg.pushMatrix(); - pg.translate(40, 40, 0); - pg.rotateY(mouseY); - pg.rotateX(mouseX); - pg.box(20); - pg.popMatrix(); - pg.endDraw(); - - image(pg, 60, 60); - c++; -} diff --git a/examples/seneca/createGraphics3D/createGraphics3D.html b/examples/seneca/createGraphics3D/createGraphics3D.html deleted file mode 100644 index 7f204e03d..000000000 --- a/examples/seneca/createGraphics3D/createGraphics3D.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - -

createGraphics() test - 3D

- -

- - - -

- -
-    
---- 3D PGraphics on 2D Environment ---    
-PGraphics pg;
-float r = 0;
-
-void setup() {
-  size(200, 200);
-  pg = createGraphics(80, 80, P3D);
-}
-
-void draw() {
-  fill(0, 12);
-  rect(0, 0, width, height);
-  fill(255);
-  noStroke();
-  ellipse(mouseX, mouseY, 60, 60);
-  
-  pg.beginDraw();
-  pg.background(255, 0, 0);
-  pg.noFill();
-  pg.stroke(255);
-  pg.pushMatrix();
-  pg.translate(40, 40, 0);
-  pg.rotateY(mouseY);
-  pg.rotateX(mouseX);
-  pg.box(20);
-  pg.popMatrix();
-  pg.endDraw();
-  
-  image(pg, 60, 60);
-}
-
-
---- 2D PGraphics on 3D Environment ---
-PGraphics pg;
-float r = 0;
-float c = 0;
-
-void setup() {
-  size(200, 200, P3D);
-  pg = createGraphics(80, 80);
-}
-
-void draw() {
-  background(204);
-  fill(0, 0, c, 255);
-  noStroke();
-  pushMatrix();
-  translate(20, 20, 0);
-  rotateY(mouseX);
-  rotateX(mouseY);
-  box(20);
-  popMatrix();
-  
-  pg.beginDraw();
-  pg.background(0, 0, 0);
-  pg.stroke(255);
-  pg.fill(0, 0, c, 255);
-  pg.ellipse(mouseX-60, mouseY-60, 60, 60);
-  pg.endDraw();
-  
-  image(pg, 60, 60);
-  c += 1;
-}
-
-
---- 3D PGraphics on 3D Environment ---
-PGraphics pg;
-float c = 0;
-
-void setup() {
-  size(200, 200, P3D);
-  pg = createGraphics(80, 80, P3D);
-}
-
-void draw() {
-  background(204);
-  fill(0, 0, c, 255);
-  noStroke();
-  pushMatrix();
-  translate(20, 20, 0);
-  rotateY(mouseX);
-  rotateX(mouseY);
-  box(20);
-  popMatrix();
-  
-  pg.beginDraw();
-  pg.background(0);
-  pg.noFill();
-  pg.stroke(255);
-  pg.pushMatrix();
-  pg.translate(40, 40, 0);
-  pg.rotateY(mouseY);
-  pg.rotateX(mouseX);
-  pg.box(20);
-  pg.popMatrix();
-  pg.endDraw();
-  
-  image(pg, 60, 60);
-  c++;
-}
-    
- - diff --git a/examples/seneca/createGraphics3D/createGraphics3D.pjs b/examples/seneca/createGraphics3D/createGraphics3D.pjs deleted file mode 100644 index e371038dc..000000000 --- a/examples/seneca/createGraphics3D/createGraphics3D.pjs +++ /dev/null @@ -1,29 +0,0 @@ -PGraphics pg; -float r = 0; - -void setup() { - size(200, 200); - pg = createGraphics(80, 80, P3D); -} - -void draw() { - fill(0, 12); - rect(0, 0, width, height); - fill(255); - noStroke(); - ellipse(mouseX, mouseY, 60, 60); - - pg.beginDraw(); - pg.background(255, 0, 0); - pg.noFill(); - pg.stroke(255); - pg.pushMatrix(); - pg.translate(40, 40, 0); - pg.rotateY(mouseY); - pg.rotateX(mouseX); - pg.box(20); - pg.popMatrix(); - pg.endDraw(); - - image(pg, 60, 60); -} diff --git a/examples/seneca/cursor/cursorMode.html b/examples/seneca/cursor/cursorMode.html deleted file mode 100644 index 2d4b26bcd..000000000 --- a/examples/seneca/cursor/cursorMode.html +++ /dev/null @@ -1,142 +0,0 @@ - -A Processing.js Example - - - - - - - - \ No newline at end of file diff --git a/examples/seneca/cursor/cursorUrl.html b/examples/seneca/cursor/cursorUrl.html deleted file mode 100644 index edd044025..000000000 --- a/examples/seneca/cursor/cursorUrl.html +++ /dev/null @@ -1,56 +0,0 @@ - -A Processing.js Example - - - - -
-

A Processing.js cursor(MODE) Example

- -

Roll over the white rectangles to see the cursor change!

-

Best viewed in Firefox

-

NOTE: not all browsers will support each MODE
- reference CSS Cursors for more details -

-
- - - \ No newline at end of file diff --git a/examples/seneca/cursor/cursorimg.htm b/examples/seneca/cursor/cursorimg.htm deleted file mode 100644 index 36e50ea30..000000000 --- a/examples/seneca/cursor/cursorimg.htm +++ /dev/null @@ -1,39 +0,0 @@ - - -
-// Move the mouse across the image to see the cursor 
-// change in .. to ..
-//   up-left... the download icon
-//   up-right... a wait icon
-//   down-left... no icon
-//   down-right... the default/page icon
-
-/* @pjs preload="download.png"; */
-
-PImage img;
-
-void setup()
-{
-  size(100,100);
-  background(0,0,255);
-
-  img = loadImage("download.png");
-}
-
-void draw() 
-{
-  if(mouseX < width / 2) {
-    if(mouseY < height / 2) {
-      cursor(img, 16, 16);
-    } else {
-      noCursor();
-    }
-  } else {
-    if(mouseY < height / 2) {
-      cursor(WAIT);
-    } else {
-      cursor();
-    }
-  }
-}
-
diff --git a/examples/seneca/cursor/cursorimg.pjs b/examples/seneca/cursor/cursorimg.pjs deleted file mode 100644 index 6b84aa7f9..000000000 --- a/examples/seneca/cursor/cursorimg.pjs +++ /dev/null @@ -1,35 +0,0 @@ -// Move the mouse across the image to see the cursor -// change in .. to .. -// up-left... the download icon -// up-right... a wait icon -// down-left... no icon -// down-right... the default/page icon - -/* @pjs preload="download.png"; */ - -PImage img; - -void setup() -{ - size(100,100); - background(0,0,255); - - img = loadImage("download.png"); -} - -void draw() -{ - if(mouseX < width / 2) { - if(mouseY < height / 2) { - cursor(img, 16, 16); - } else { - noCursor(); - } - } else { - if(mouseY < height / 2) { - cursor(WAIT); - } else { - cursor(); - } - } -} diff --git a/examples/seneca/cursor/download.png b/examples/seneca/cursor/download.png deleted file mode 100644 index 07d810cc7..000000000 Binary files a/examples/seneca/cursor/download.png and /dev/null differ diff --git a/examples/seneca/cursor/images/3dwarro.cur b/examples/seneca/cursor/images/3dwarro.cur deleted file mode 100644 index 926f057d6..000000000 Binary files a/examples/seneca/cursor/images/3dwarro.cur and /dev/null differ diff --git a/examples/seneca/cursor/images/cross_rm.cur b/examples/seneca/cursor/images/cross_rm.cur deleted file mode 100644 index a55617108..000000000 Binary files a/examples/seneca/cursor/images/cross_rm.cur and /dev/null differ diff --git a/examples/seneca/cursor/images/greensmiley.cur b/examples/seneca/cursor/images/greensmiley.cur deleted file mode 100644 index 6a3ee6d46..000000000 Binary files a/examples/seneca/cursor/images/greensmiley.cur and /dev/null differ diff --git a/examples/seneca/cursor/images/lwait.cur b/examples/seneca/cursor/images/lwait.cur deleted file mode 100644 index 52e01272a..000000000 Binary files a/examples/seneca/cursor/images/lwait.cur and /dev/null differ diff --git a/examples/seneca/cursor/images/move_i.cur b/examples/seneca/cursor/images/move_i.cur deleted file mode 100644 index e43534124..000000000 Binary files a/examples/seneca/cursor/images/move_i.cur and /dev/null differ diff --git a/examples/seneca/cursor/images/move_im.cur b/examples/seneca/cursor/images/move_im.cur deleted file mode 100644 index 560705514..000000000 Binary files a/examples/seneca/cursor/images/move_im.cur and /dev/null differ diff --git a/examples/seneca/cursor/images/no_i.cur b/examples/seneca/cursor/images/no_i.cur deleted file mode 100644 index adb1fc36d..000000000 Binary files a/examples/seneca/cursor/images/no_i.cur and /dev/null differ diff --git a/examples/seneca/cursor/images/pen_i.cur b/examples/seneca/cursor/images/pen_i.cur deleted file mode 100644 index e0910211d..000000000 Binary files a/examples/seneca/cursor/images/pen_i.cur and /dev/null differ diff --git a/examples/seneca/cursor/noCursor.html b/examples/seneca/cursor/noCursor.html deleted file mode 100644 index b26fc0210..000000000 --- a/examples/seneca/cursor/noCursor.html +++ /dev/null @@ -1,55 +0,0 @@ - -A Processing.js Example - - - - -
-

A Processing.js cursor(PImage) Example

- -

Click on the grey canvas to see the cursor change!

-

Cursor Image Order: Cursor Image Order: - -

-

Best viewed in Firefox

-
- - - \ No newline at end of file diff --git a/examples/seneca/curveVertex3D/curveVertex-PJava.png b/examples/seneca/curveVertex3D/curveVertex-PJava.png deleted file mode 100755 index 611b74ea7..000000000 Binary files a/examples/seneca/curveVertex3D/curveVertex-PJava.png and /dev/null differ diff --git a/examples/seneca/curveVertex3D/curveVertex.htm b/examples/seneca/curveVertex3D/curveVertex.htm deleted file mode 100644 index 73119e68d..000000000 --- a/examples/seneca/curveVertex3D/curveVertex.htm +++ /dev/null @@ -1,102 +0,0 @@ - - - - Processing.js test of curveVertex() using fill() - - - - -

- - curveVertex() with fill() -

-

- curveVertex() and fill() should not form a solid outline.

-

- This generates a shape using curveVertex() with fill(). The end result should NOT be a completely connected (outlined) box. The line should only go through the specified - coordinates. The expected result is shown via image on the right. -

- - - - curveVertex running in PJava -
- Test written by Dominic Baranski
-

- Source Code:

-
-size(150,150,P3D);
-background(128);
-fill(255);
-
-beginShape();
-  curveVertex(5,26,0);
-  curveVertex(5,26,0);
-  curveVertex(73,24,0);
-  curveVertex(73,61,0);
-endShape();
-
-beginShape();
-  curveVertex(5,26,0);
-  curveVertex(73,24,0);
-  curveVertex(73,61,0);
-  curveVertex(73,61,0);
-  curveVertex(15,65,0);
-endShape();
-        
-
- - diff --git a/examples/seneca/curveVertex3D/curveVertex.pjs b/examples/seneca/curveVertex3D/curveVertex.pjs deleted file mode 100644 index f19bce089..000000000 --- a/examples/seneca/curveVertex3D/curveVertex.pjs +++ /dev/null @@ -1,18 +0,0 @@ -size(150,150,P3D); -background(128); -fill(255); - -beginShape(); - curveVertex(5,26,0); - curveVertex(5,26,0); - curveVertex(73,24,0); - curveVertex(73,61,0); -endShape(); - -beginShape(); - curveVertex(5,26,0); - curveVertex(73,24,0); - curveVertex(73,61,0); - curveVertex(73,61,0); - curveVertex(15,65,0); -endShape(); diff --git a/examples/seneca/customFonts/example.html b/examples/seneca/customFonts/example.html deleted file mode 100644 index 8dcbbba30..000000000 --- a/examples/seneca/customFonts/example.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/examples/seneca/customFonts/example.pjs b/examples/seneca/customFonts/example.pjs deleted file mode 100644 index 91ad5ecd3..000000000 --- a/examples/seneca/customFonts/example.pjs +++ /dev/null @@ -1,17 +0,0 @@ -/* @pjs font='{"fontFace": "ADamnMess", "url": "data:font/opentype;base64,AAEAAAALAIA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ZAAgAFQAbwBvAGwAZQBkADoAVgBlAHIAcwBpAG8AbgAgADEALgAwADAAUgBvAHkALQAtAEMAbABhAHIAZQBuAGQAbwBuAEgAYQBuAGQAVABvAG8AbABlAGQAVABoAGkAcwAgAGYAbwBuAHQAIAB3AGEAcwAgAGMAcgBlAGEAdABlAGQAIAB1AHMAaQBuAGcAIAB0AGgAZQAgAG8AbgBsAGkAbgBlACAAZgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAaQBvAG4AIABzAGUAcgB2AGkAYwBlACAAZgByAG8AbQAgAHkAbwB1AHIAZgBvAG4AdABzAC4AYwBvAG0AAgAAAAAAAP8nAJYAAAAAAAAAAAAAAAAAAAAAAAAAAABzAAAAAQACAAMABAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIAEwAUABUAFgAXABgAGQAaABsAHAAdAB4AHwAgACEAIgAjACQAJQAmACcAKAApACoAKwAsAC0ALgAvADAAMQAyADMANAA1ADYANwA4ADkAOgA7ADwAPQA+AD8AQABBAEIARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwBgAGEAhACFAL0AhgCLAIoAgwCTAIgAtgC3ALQAtQCCAMIAhwECAIwERXVybwAAAAAAAAH//wAC"}, yanone.ttf'; */ - -PFont myFont; - -void setup() { - background(0); - size(200, 200); - - myFont = createFont("ADamnMess", 32); - textFont(myFont); - text("hello", 52, 60); - - myFont = loadFont("yanone.ttf"); - textFont(myFont, 32); - text("world!", 50, 100); -} - diff --git a/examples/seneca/customFonts/yanone.ttf b/examples/seneca/customFonts/yanone.ttf deleted file mode 100644 index 1d3140c83..000000000 Binary files a/examples/seneca/customFonts/yanone.ttf and /dev/null differ diff --git a/examples/seneca/ellipse3D/ellipse.html b/examples/seneca/ellipse3D/ellipse.html deleted file mode 100644 index edcf9983f..000000000 --- a/examples/seneca/ellipse3D/ellipse.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - -

ellipse() test

- -

- - -

- -
-ellipseMode(CENTER);
-ellipse(35, 35, 50, 50);
-ellipseMode(CORNER);
-fill(102);
-ellipse(35, 35, 50, 50);
-ellipseMode(CORNERS);
-fill(225);
-ellipse(35, 35, 50, 50);
-ellipse(35, 35, 75, 15);
-ellipse(35, 35, 15, 75);
-    
- - diff --git a/examples/seneca/ellipse3D/ellipse.pjs b/examples/seneca/ellipse3D/ellipse.pjs deleted file mode 100644 index bb991181b..000000000 --- a/examples/seneca/ellipse3D/ellipse.pjs +++ /dev/null @@ -1,11 +0,0 @@ -size(100, 100, P3D); -ellipseMode(CENTER); -ellipse(35, 35, 50, 50); -ellipseMode(CORNER); -fill(102); -ellipse(35, 35, 50, 50); -ellipseMode(CORNERS); -fill(225); -ellipse(35, 35, 50, 50); -ellipse(35, 35, 75, 15); -ellipse(35, 35, 15, 75); diff --git a/examples/seneca/ellipse3D/ellipse.png b/examples/seneca/ellipse3D/ellipse.png deleted file mode 100644 index 7c80b2983..000000000 Binary files a/examples/seneca/ellipse3D/ellipse.png and /dev/null differ diff --git a/examples/seneca/ellipse3D/ellipseMode.gif b/examples/seneca/ellipse3D/ellipseMode.gif deleted file mode 100644 index 36221bc3e..000000000 Binary files a/examples/seneca/ellipse3D/ellipseMode.gif and /dev/null differ diff --git a/examples/seneca/ellipse3D/ellipseMode.html b/examples/seneca/ellipse3D/ellipseMode.html deleted file mode 100644 index 3b17b6714..000000000 --- a/examples/seneca/ellipse3D/ellipseMode.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - -

ellipseMode() test

- -

- - -

- -
-ellipseMode(CENTER);
-ellipse(35, 35, 50, 50);
-ellipseMode(CORNER);
-fill(102);
-ellipse(35, 35, 50, 50);
-    
- - diff --git a/examples/seneca/ellipse3D/ellipseMode.pjs b/examples/seneca/ellipse3D/ellipseMode.pjs deleted file mode 100644 index a0ba43154..000000000 --- a/examples/seneca/ellipse3D/ellipseMode.pjs +++ /dev/null @@ -1,6 +0,0 @@ -size(100, 100, P3D); -ellipseMode(CENTER); -ellipse(35, 35, 50, 50); -ellipseMode(CORNER); -fill(102); -ellipse(35, 35, 50, 50); diff --git a/examples/seneca/file and fragment loading (1818)/fafl.pde b/examples/seneca/file and fragment loading (1818)/fafl.pde deleted file mode 100755 index d7b011426..000000000 --- a/examples/seneca/file and fragment loading (1818)/fafl.pde +++ /dev/null @@ -1,4 +0,0 @@ -void setup() { - size(400,400); - noLoop(); -} \ No newline at end of file diff --git a/examples/seneca/file and fragment loading (1818)/index.html b/examples/seneca/file and fragment loading (1818)/index.html deleted file mode 100755 index aba121754..000000000 --- a/examples/seneca/file and fragment loading (1818)/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - File and fragment loading test (ticket 1818) - - - - - -

Mixed from-file and from-fragment loading of sketches

- -

This should show a yellowish sketch, with the text "custom code inclusion worked", centered.

- - - - \ No newline at end of file diff --git a/examples/seneca/fill/test1/fill_test.html b/examples/seneca/fill/test1/fill_test.html deleted file mode 100644 index 244410d83..000000000 --- a/examples/seneca/fill/test1/fill_test.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/examples/seneca/fill/test1/fill_test.js b/examples/seneca/fill/test1/fill_test.js deleted file mode 100644 index f0ffff455..000000000 --- a/examples/seneca/fill/test1/fill_test.js +++ /dev/null @@ -1,380 +0,0 @@ -//import processing.opengl.*; - -int startX; -int startY; -int x; -int y; -int boxCounter = 0; - -void setup() -{ - size(500,500,OPENGL); - - startX = width/2 - 70; - startY = height/2 - 60; - - x = startX; - y = startY; -} - -void draw() -{ - background(100,135,100); - drawBoxes(); -} - -void drawBoxes() -{ - camera(); - - fill(255); - drawNextBox(); - - // single value - noFill(); - drawNextBox(); - - // single value - fill(1); - drawNextBox(); - - fill(50); - drawNextBox(); - - fill(128); - drawNextBox(); - - fill(200); - drawNextBox(); - - fill(255); - drawNextBox(); - - //////////////////////////////////////////////// - // single values for color, color - single value - //////////////////////////////////////////////// - fill(color(0)); - drawNextBox(); - - fill(color(1)); - drawNextBox(); - - fill(color(50)); - drawNextBox(); - - fill(color(200)); - drawNextBox(); - - fill(color(255)); - drawNextBox(); - - /////////////////////////////// - // single value - hex no alpha - /////////////////////////////// - fill(#000000); - drawNextBox(); - - fill(#808080); - drawNextBox(); - - fill(#FFFFFF); - drawNextBox(); - - noFill(); - drawNextBox(); - - fill(#00FF00); - drawNextBox(); - - fill(#0000FF); - drawNextBox(); - - fill(#FFFF00); - drawNextBox(); - - fill(#FF00FF); - drawNextBox(); - - fill(#00FFFF); - drawNextBox(); - - fill(#214263); - drawNextBox(); - - /////////////////////////////////////////////// - // single value - color, color multiple values - ////////////////////////////////////////////// - fill(color(0,0,0)); - drawNextBox(); - - fill(color(128,128,128)); - drawNextBox(); - - fill(color(255,255,255)); - drawNextBox(); - - fill(color(255,0,0)); - drawNextBox(); - - fill(color(0,255,0)); - drawNextBox(); - - fill(color(0,0,255)); - drawNextBox(); - - fill(color(255,255,0)); - drawNextBox(); - - fill(color(255,0,255)); - drawNextBox(); - - fill(color(0,255,255)); - drawNextBox(); - - fill(color(33,66,99)); - drawNextBox(); - - ///////////////////////////////// - // double values - color + alpha - ///////////////////////////////// - fill(color(0,0,0),0); - drawNextBox(); - - fill(color(128,128,128),0); - drawNextBox(); - - fill(color(255,255,255),0); - drawNextBox(); - - fill(color(255,0,0),255); - drawNextBox(); - - fill(color(0,255,0),255); - drawNextBox(); - - fill(color(0,0,255),128); - drawNextBox(); - - fill(color(255),0); - drawNextBox(); - - fill(color(0,0,255),0); - drawNextBox(); - - fill(color(0,255,0),128); - drawNextBox(); - - fill(color(255,0,0),0); - drawNextBox(); - - fill(color(255),128); - drawNextBox(); - - fill(color(255),0); - drawNextBox(); - - fill(color(255),255); - drawNextBox(); - - fill(color(128),255); - drawNextBox(); - - fill(color(128),128); - drawNextBox(); - - // hex + alpha - fill(#000000,128); - drawNextBox(); - - fill(#808080,255); - drawNextBox(); - - fill(#FFFFFF,0); - drawNextBox(); - - fill(#FF0000,255); - drawNextBox(); - - fill(#00FF00,255); - drawNextBox(); - - fill(#0000FF,128); - drawNextBox(); - - fill(#FFFF00,255); - drawNextBox(); - - fill(#FF00FF,128); - drawNextBox(); - - fill(#00FFFF,0); - drawNextBox(); - - fill(#214263,128); - drawNextBox(); - - //////////////// - // gray + alpha - //////////////// - fill(0,0); - drawNextBox(); - - fill(0,128); - drawNextBox(); - - fill(0,255); - drawNextBox(); - - fill(1,0); - drawNextBox(); - - fill(1,128); - drawNextBox(); - - fill(1,255); - drawNextBox(); - - fill(50,0); - drawNextBox(); - - fill(50,128); - drawNextBox(); - - fill(50,255); - drawNextBox(); - - fill(128,0); - drawNextBox(); - - fill(128,128); - drawNextBox(); - - fill(128,255); - drawNextBox(); - - fill(255,255); - drawNextBox(); - - fill(255,128); - drawNextBox(); - - fill(255,0); - drawNextBox(); - - /////////////////////// - // triple values r,g,b - ////////////////////// - fill(0,0,0); - drawNextBox(); - - fill(128,128,128); - drawNextBox(); - - fill(255,255,255); - drawNextBox(); - - fill(255,0,0); - drawNextBox(); - - noFill(); - drawNextBox(); - - fill(0,0,255); - drawNextBox(); - - fill(255,255,0); - drawNextBox(); - - fill(255,0,255); - drawNextBox(); - - fill(0,255,255); - drawNextBox(); - - fill(33,66,99); - drawNextBox(); - - /////////////// - // quad values - /////////////// - fill(0,0,0,0); - drawNextBox(); - - fill(0,0,0,128); - drawNextBox(); - - fill(0,0,0,255); - drawNextBox(); - - fill(128,128,128,0); - drawNextBox(); - - fill(128,128,128,128); - drawNextBox(); - - fill(128,128,128,255); - drawNextBox(); - - fill(255,255,255,0); - drawNextBox(); - - // !! - fill(255,255,255,53); - drawNextBox(); - - fill(255,255,255,255); - drawNextBox(); - - fill(255,0,0,0); - drawNextBox(); - - fill(255,0,0,128); - drawNextBox(); - - fill(255,0,0,255); - drawNextBox(); - - fill(0,255,0,0); - drawNextBox(); - - fill(0,255,0,128); - drawNextBox(); - - fill(0,255,0,255); - drawNextBox(); - - fill(33,66,99,0); - drawNextBox(); - - fill(33,66,99,128); - drawNextBox(); - - fill(33,66,99,255); - drawNextBox(); -} - -void drawNextBox() -{ - x += 10; - - if(boxCounter != 0 && boxCounter % 10 == 0) - { - y += 10; - x = startX + 10; - } - - if(boxCounter == 100) - { - boxCounter = 0; - x = startX + 10; - y = startY; - } - - pushMatrix(); - translate(x, y, 320); - // translate(200, 250, 320); - box(5,5,5); - popMatrix(); - - boxCounter++; -} \ No newline at end of file diff --git a/examples/seneca/fill/test1/p5_result.jpg b/examples/seneca/fill/test1/p5_result.jpg deleted file mode 100644 index fac1bf3d0..000000000 Binary files a/examples/seneca/fill/test1/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/focus (1089)/focusblur.pde b/examples/seneca/focus (1089)/focusblur.pde deleted file mode 100755 index eb5e1d575..000000000 --- a/examples/seneca/focus (1089)/focusblur.pde +++ /dev/null @@ -1,29 +0,0 @@ -interface Javascript {} -Javascript javascript=null; -void bindJavascript(Javascript js) { javascript=js; } - -void setup() -{ - size(200,200); - frameRate(60); - text("",0,0); -} - -float off = 0; -float ostep = PI/180; -void draw() -{ - if(focused) { background(250,255,250); } - else { background(255,250,250); } - off = off+ostep; - float dval = abs(255*sin(off)); - int val = (int) dval; - int c = 255 - val; - stroke(0,100); - noFill(); - ellipse(width/2, height/2, c, c); - fill(0); - String f = (focused? "focused" : "unfocused"); - float w = textWidth(f); - text(f, (width-w)/2, height/2); -} \ No newline at end of file diff --git a/examples/seneca/focus (1089)/index.html b/examples/seneca/focus (1089)/index.html deleted file mode 100755 index 368196021..000000000 --- a/examples/seneca/focus (1089)/index.html +++ /dev/null @@ -1,56 +0,0 @@ - - - p.focused test - - - - - -

no pauseOnBlur directive

-
-

A Processing.js noCurosr() Example

- -

Roll over the white rectangles to see the cursor disappear!

- -
-

sketch 1 (index 1)

- -
focussable
-
-

sketch 2 (no index)

- -
 
-
-

sketch 3 (index 2)

- -
focussable
-
-

sketch 4 (no index)

- -
 
-
- -

/* @pjs pauseOnBlur="true"; */

-
-

sketch 5 (index 3)

- -
focussable
-
-

sketch 6 (no index)

- -
 
-
-

sketch 7 (index 4)

- -
focussable
-
-

sketch 8 (no index)

- -
 
-
- - - \ No newline at end of file diff --git a/examples/seneca/focus (1089)/pauseonblur.pde b/examples/seneca/focus (1089)/pauseonblur.pde deleted file mode 100755 index 28f5eb538..000000000 --- a/examples/seneca/focus (1089)/pauseonblur.pde +++ /dev/null @@ -1,31 +0,0 @@ -/* @pjs pauseOnBlur="true"; */ - -interface Javascript {} -Javascript javascript=null; -void bindJavascript(Javascript js) { javascript=js; } - -void setup() -{ - size(200,200); - frameRate(60); - text("",0,0); -} - -float off = 0; -float ostep = PI/180; -void draw() -{ - if(focused) { background(250,255,250); } - else { background(255,250,250); } - off = off+ostep; - float dval = abs(255*sin(off)); - int val = (int) dval; - int c = 255 - val; - stroke(0,100); - noFill(); - ellipse(width/2, height/2, c, c); - fill(0); - String f = (focused? "focused" : "unfocused"); - float w = textWidth(f); - text(f, (width-w)/2, height/2); -} \ No newline at end of file diff --git a/examples/seneca/fontcache (1741)/fontcache.pde b/examples/seneca/fontcache (1741)/fontcache.pde deleted file mode 100755 index e3747f368..000000000 --- a/examples/seneca/fontcache (1741)/fontcache.pde +++ /dev/null @@ -1,25 +0,0 @@ -void setup() -{ - size(200,200); - text("",0,0); -} - -void draw() -{ - float ts = random(10,60); - textSize(ts); - fill(255,255,0,50); - rect(-1,-1,width+2,height+2); - fill(0); - float tw = textWidth("testing"); - text("testing",(width-tw)/2,(height+ts/2)/2); - - var cl = Processing.prototype.PFont.PFontCache.length; - - var caching = Processing.prototype.PFont.prototype.caching || false; - if(!caching && cl) caching = "metrics only"; - document.getElementById("cache").innerHTML = caching; - - if(!cl) cl = "n/a"; - document.getElementById("log").innerHTML = cl; -} diff --git a/examples/seneca/fontcache (1741)/index.html b/examples/seneca/fontcache (1741)/index.html deleted file mode 100755 index 11c780ce2..000000000 --- a/examples/seneca/fontcache (1741)/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - fontcache - - - - - -

Font cache testing

- - - -

This test makes sure that even though a large number of - distinct font objects will be used, Processing.js switches - over from full font object caching to initial-metrics-only - caching when 50 fonts have been cached, turning off caching - entirely once the metrics-only font cache hits 400 fonts.

- -

The test is performed by having a sketch use a textSize(random(10,60)), - which allows for 501 distinct font name/size pairs to be cached, due to - font sizes being rounded to a single decimal value. As such even though - one font is used, its possible size values 10.0, 10.1, ... , 59.9, 60.0 - leads to 501 possible pairs.

- -
caching:
- -
cache size:
- - \ No newline at end of file diff --git a/examples/seneca/hex/hex.pjs b/examples/seneca/hex/hex.pjs deleted file mode 100644 index 015e81887..000000000 --- a/examples/seneca/hex/hex.pjs +++ /dev/null @@ -1,68 +0,0 @@ -// Hex example -size(500,220); -background(20); -stroke(128, 128, 128); -fill(64); -rect(1, 1, width-3, height-3); - -byte b1 = 23; -byte b2 = 127; -byte b3 = -127; -byte b4 = -127; - -char c1 = 'A'; -char c2 = '#'; -char c3 = '9'; -char c4 = 'Z'; - -int i1 = 255; -int i2 = -65535; -int i3 = 65536; -int i4 = 429844428; - -color cl1 = color(255,0,0,0); -color cl2 = #ffcc00; -color cl3 = color(34,255,204,153); -color cl4 = color(0,102,153,255); - -PFont font; -font = loadFont("Arial"); -textFont(font, 14); -fill(32, 255, 0); -text("Bytes", 5, 20); -text("Chars", 5, 120); -text("Ints", 195, 20); -text("Colors", 195, 120); -fill(255, 255, 255); -text("b1: " + b1, 15, 40); -text("hex: " + hex(b1), 80, 40); -text("b2: " + b2, 15, 60); -text("hex: " + hex(b2), 80, 60); -text("b3: " + b3, 15, 80); -text("hex: " + hex(b3), 80, 80); -text("b4: " + b4, 15, 100); -text("hex: " + hex(b4,2), 80, 100); -text("c1: " + c1, 15, 140); -text("hex: " + hex(c1), 80, 140); -text("c2: " + c2, 15, 160); -text("hex: " + hex(c2), 80, 160); -text("c3: " + c3, 15, 180); -text("hex: " + hex(c3), 80, 180); -text("c4: " + c4, 15, 200); -text("hex: " + hex(c4,4), 80, 200); -text("i1: " + i1, 200, 40); -text("hex: " + hex(i1), 370, 40); -text("i2: " + i2, 200, 60); -text("hex: " + hex(i2), 370, 60); -text("i3: " + i3, 200, 80); -text("hex: " + hex(i3), 370, 80); -text("i4: " + i4, 200, 100); -text("hex: " + hex(i4), 370, 100); -text("cl1: " + cl1, 200, 140); -text("hex: " + hex(cl1), 370, 140); -text("cl2: " + cl2, 200, 160); -text("hex: " + hex(cl2), 370, 160); -text("cl3: " + cl3, 200, 180); -text("hex: " + hex(cl3), 370, 180); -text("cl4: " + cl4, 200, 200); -text("hex: " + hex(cl4), 370, 200); diff --git a/examples/seneca/hex/hex.png b/examples/seneca/hex/hex.png deleted file mode 100644 index 3d5d13de1..000000000 Binary files a/examples/seneca/hex/hex.png and /dev/null differ diff --git a/examples/seneca/hex/hextest.htm b/examples/seneca/hex/hextest.htm deleted file mode 100644 index 4e0c794b6..000000000 --- a/examples/seneca/hex/hextest.htm +++ /dev/null @@ -1,157 +0,0 @@ - - - - Processing.js test of hex() - - - - - - - - - - -

- - hex() test

-

- This is a test of hex(value, digits)

-

- hex() converts a byte, char, int, or color to a String containing the equivalent hexadecimal notation. For example color(0, 102, 153, 255) will convert to the String "FF006699".

- - - -
- Test written by Daniel Hodgin
-

- Source Code:

-
-// 	Hex example
-size(500,220, P3D);
-background(20);
-stroke(128, 128, 128);
-fill(64);
-rect(1, 1, width-3, height-3);
-
-byte b1 = 23;
-byte b2 = 127;
-byte b3 = -127;
-byte b4 = -127;
-
-char c1 = 'A';
-char c2 = '#';
-char c3 = '9';
-char c4 = 'Z';
-
-int i1 = 255;
-int i2 = -65535;
-int i3 = 65536;
-int i4 = 429844428;
-
-color cl1 = color(255,0,0,0);
-color cl2 = #ffcc00;
-color cl3 = color(34,255,204,153);
-color cl4 = color(0,102,153,255);
-
-PFont font;
-font = loadFont("Arial"); 
-textFont(font, 14);
-fill(32, 255, 0);
-text("Bytes", 5, 20);
-text("Chars", 5, 120);
-text("Ints", 195, 20);
-text("Colors", 195, 120);
-fill(255, 255, 255);
-text("b1: " + b1, 15, 40);
-text("hex: " + hex(b1), 80, 40);
-text("b2: " + b2, 15, 60);
-text("hex: " + hex(b2), 80, 60);
-text("b3: " + b3, 15, 80);
-text("hex: " + hex(b3), 80, 80);
-text("b4: " + b4, 15, 100);
-text("hex: " + hex(b4,2), 80, 100);
-text("c1: " + c1, 15, 140);
-text("hex: " + hex(c1), 80, 140);
-text("c2: " + c2, 15, 160);
-text("hex: " + hex(c2), 80, 160);
-text("c3: " + c3, 15, 180);
-text("hex: " + hex(c3), 80, 180);
-text("c4: " + c4, 15, 200);
-text("hex: " + hex(c4,4), 80, 200);
-text("i1: " + i1, 200, 40);
-text("hex: " + hex(i1), 370, 40);
-text("i2: " + i2, 200, 60);
-text("hex: " + hex(i2), 370, 60);
-text("i3: " + i3, 200, 80);
-text("hex: " + hex(i3), 370, 80);
-text("i4: " + i4, 200, 100);
-text("hex: " + hex(i4), 370, 100);
-text("cl1: " + cl1, 200, 140);
-text("hex: " + hex(cl1), 370, 140);
-text("cl2: " + cl2, 200, 160);
-text("hex: " + hex(cl2), 370, 160);
-text("cl3: " + cl3, 200, 180);
-text("hex: " + hex(cl3), 370, 180);
-text("cl4: " + cl4, 200, 200);
-text("hex: " + hex(cl4), 370, 200);
-        
-
- - diff --git a/examples/seneca/imageCopy/imageCopy.html b/examples/seneca/imageCopy/imageCopy.html deleted file mode 100644 index 1e6cade34..000000000 --- a/examples/seneca/imageCopy/imageCopy.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - Processing.js test of copy(img, ....) - - - -

Source Code:

-
-// @pjs preload must be used to preload the image
-/* @pjs preload="test.png"; */
-
-PImage img = loadImage("test.png");
-
-void setup() {
-  size(75, 75);
-  noLoop();
-}
-
-void draw() {
-  background(75, 120, 125, 250);
-  fill(20, 60, 125);
-  rect(40, 40, 30, 30);
-  copy(img, 0, 0, img.width, img.height, mouseX, mouseY, img.width, img.height);
-  noFill();
-}
-
-void mouseClicked(){
-  redraw();
-}
-  
-
- - diff --git a/examples/seneca/imageCopy/imageCopy.pjs b/examples/seneca/imageCopy/imageCopy.pjs deleted file mode 100644 index beb7e37ba..000000000 --- a/examples/seneca/imageCopy/imageCopy.pjs +++ /dev/null @@ -1,22 +0,0 @@ -// @pjs preload must be used to preload the image -/* @pjs preload="test.png"; */ - -PImage img = loadImage("test.png"); - -void setup() { - size(75, 75); - noLoop(); -} - -void draw() { - background(75, 120, 125, 250); - fill(20, 60, 125); - rect(40, 40, 30, 30); - copy(img, 0, 0, img.width, img.height, mouseX, mouseY, img.width, img.height); - noFill(); -} - -void mouseClicked(){ - redraw(); -} - diff --git a/examples/seneca/imageCopy/test.png b/examples/seneca/imageCopy/test.png deleted file mode 100644 index 7a0e962d6..000000000 Binary files a/examples/seneca/imageCopy/test.png and /dev/null differ diff --git a/examples/seneca/inline/inline.htm b/examples/seneca/inline/inline.htm deleted file mode 100644 index e63231790..000000000 --- a/examples/seneca/inline/inline.htm +++ /dev/null @@ -1,26 +0,0 @@ - - - - - -

Inline Processing.js code

- -

- -

-
- -
<script id="pdeCode" type="application/processing">
-void setup() {
-  size(100,100);
-  background(#00FF00);
-}
-</script>
-<canvas width="200" height="200" data-processing-sources="#pdeCode"></canvas>
- - diff --git a/examples/seneca/inspection (1867)/index.html b/examples/seneca/inspection (1867)/index.html deleted file mode 100755 index 8eec30ea3..000000000 --- a/examples/seneca/inspection (1867)/index.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - Processing inspector extension test - - - - -

Processing Inspector

- -

number spinners should be continuously updated. spin them to see the line change. - click sketch to pause, allowing spinner updates. click sketch again to release monitored - values (changing them still affects sketch, but sketch no longer affects them).

- - - - -
- - -
- - - diff --git a/examples/seneca/keyCode/keyCode.htm b/examples/seneca/keyCode/keyCode.htm deleted file mode 100644 index fa0cb9b59..000000000 --- a/examples/seneca/keyCode/keyCode.htm +++ /dev/null @@ -1,90 +0,0 @@ - - - - Processing.js test of keyCode - - - - -

- - keyCode -

-

- Pressing buttons generates the keyCode

- - - -

- Source Code:

-
-void draw() { } // Empty draw() needed to keep the program running
-
-void keyPressed() {
-  println("pressed " + int(key) + " " + keyCode);
-}
-
-void keyTyped() {
-  println("typed " + int(key) + " " + keyCode);
-}
-
-void keyReleased() {
-  println("released " + int(key) + " " + keyCode);
-}
-        
-
- - diff --git a/examples/seneca/keyCode/keyCode.pjs b/examples/seneca/keyCode/keyCode.pjs deleted file mode 100644 index 92430516e..000000000 --- a/examples/seneca/keyCode/keyCode.pjs +++ /dev/null @@ -1,16 +0,0 @@ -// Run this program to learn how each of these functions -// relate to the others - -void draw() { } // Empty draw() needed to keep the program running - -void keyPressed() { - println("pressed " + int(key) + " " + keyCode); -} - -void keyTyped() { - println("typed " + int(key) + " " + keyCode); -} - -void keyReleased() { - println("released " + int(key) + " " + keyCode); -} diff --git a/examples/seneca/keyEvents (1042 1065)/bypass.pde b/examples/seneca/keyEvents (1042 1065)/bypass.pde deleted file mode 100755 index 61b8fef04..000000000 --- a/examples/seneca/keyEvents (1042 1065)/bypass.pde +++ /dev/null @@ -1 +0,0 @@ -/* @pjs globalKeyEvents="true"; */ \ No newline at end of file diff --git a/examples/seneca/keyEvents (1042 1065)/index.html b/examples/seneca/keyEvents (1042 1065)/index.html deleted file mode 100644 index ef9cd76a2..000000000 --- a/examples/seneca/keyEvents (1042 1065)/index.html +++ /dev/null @@ -1,45 +0,0 @@ - - - pjs.instances test - - - - - -
-

sketch 1 (index 1)

- -
-

sketch 2 (no index)

- -
-

sketch 3 (index 2)

- -
-

sketch 4 (no index)

- -
- -

test controls: focus on a canvas, use 'w'/'s' to raise/lower the line for that canvas. Tab/focus order should be 1 → 3 → 2 → 4.

- -

The following two sketches are loaded with the additional leading /* @pjs globalKeyEvents="true"; */ statement, and should receive all key events

-
-

sketch 5 (index 3)

- -
-

sketch 6 (no index)

- -
- - - diff --git a/examples/seneca/keyEvents (1042 1065)/keyPress.html b/examples/seneca/keyEvents (1042 1065)/keyPress.html deleted file mode 100644 index 68b5ec4da..000000000 --- a/examples/seneca/keyEvents (1042 1065)/keyPress.html +++ /dev/null @@ -1,106 +0,0 @@ - - - keypress - - - - - - - - - - - - - - - - - - -
- - - -
-
-  void setup() { size(200,200); noLoop(); }
-  void draw() { background(255); }
-  void keyPressed() { println("[" + key + "] "+int(key)+"/"+keyCode); }
-
-
-
-  void setup() { size(200,200); noLoop(); }
-  void draw() { background(255); }
-  void keyPressed() {
-     println(key);
-   }
-
-
- KeyPress should print: - - KeyPress should print the actual letter that you press: (aA-zZ): -
-
-NORMAL KEYCODES:
-
-  [ ] 9/9 // tab
-  [] 27/27  // esc, 'key' actually contains ascii ESCAPE code
-  [ ] 32/32 // space
-  [!] 33/49
-  ["] 34/222
-  [#] 35/51
-  [$] 36/52
-  [%] 37/53
-  [&] 38/55
-  ['] 39/222
-  [A] 65/65
-  [B] 66/66
-  [C] 67/67
-  [D] 68/68
-  [E] 69/69
-  [F] 70/70
-  [G] 71/71
-  [H] 72/72
-  [I] 73/73
-  [J] 74/74
-  [K] 75/75
-  [L] 76/76
-  [M] 77/77
-NUMERIC PAD, NO NUMLOCK:
-
-  [?] 65535/35  // end
-  [?] 65535/40  // down cursor
-  [?] 65535/34  // pgdn
-  [?] 65535/37  // left cursor
-  [?] 65535/12  // 5, no idea what that button maps to
-  [?] 65535/39  // right cursor
-  [?] 65535/36  // home
-  [?] 65535/38  // up cursor
-  [?] 65535/33  // pgup
-NUMERIC PAD, NUMLOCKED:
-
-  [0] 48/96
-  [1] 49/97
-  [2] 50/98
-  [3] 51/99
-  [4] 52/100
-  [5] 53/101
-  [6] 54/102
-  [7] 55/103
-  [8] 56/104
-  [9] 57/105
-  [.] 46/110
-  [
-  ] 10/10 // enter, 'key' actually contains \10 code
-  [+] 43/107
-  [-] 45/109
-  [*] 42/106
-  [/] 47/111
-
- -
- - - diff --git a/examples/seneca/keyEvents (1042 1065)/keyevent.pde b/examples/seneca/keyEvents (1042 1065)/keyevent.pde deleted file mode 100755 index 3be4e4bbe..000000000 --- a/examples/seneca/keyEvents (1042 1065)/keyevent.pde +++ /dev/null @@ -1,37 +0,0 @@ -int y; -interface Javascript {} -Javascript javascript=null; -void bindJavascript(Javascript js) { javascript=js; } - -void setup() -{ - size(200,200); - y = height/2; - frameRate(60); -} - -float off = 0; -float ostep = PI/180; -void draw() -{ - background(255); - off = off+ostep; - float dval = abs(255*sin(off)); - int val = (int) dval; - int c = 255 - val; - stroke(0,100); - ellipse(width/2, height/2, c, c); - stroke(0); - line(100,y,200,y); -} - -void keyPressed() -{ - // Processing vs Processing.js - if( (javascript==null && key=='+' && keyCode==61) || (javascript!=null && (key==187 || key==119))) { up(); } - else if( (javascript==null && key=='-' && keyCode==45) || (javascript!=null && (key==189 || key==115))) { down(); } -} - -int step = 2; -void up() { if(y>0) y-=step; } -void down() { if(y - - - - Lazy Loading example - - - - - -

Lazy loading test example

- -

This page contains several sketches, each taking 400ms to load up. Scrolling the page will pause when a new sketch comes into view, loading it up. Normally a sketch will take nowhere near 400ms to load, most of the time will be in the downloading of the source code, during which time the browser will stay responsive. Actual sketch loading will pause the page - this is by design. You should be able to see the scrollbar area 'grow' as sketches are loaded, since each sketch will make the page longer.

- -

code used:

- -
void setup()
-{
-  size((int)random(100,400),(int)random(100,400));
-  text("",0,0);
-  takeTime();
-  noLoop();
-}
-
-void takeTime()
-{
-  // this will take roughly 400ms to complete
-  float stop = millis() + 400;
-  while(millis() < stop) {
-    String s = "lalala";
-    textWidth(s); }
-}
-
-void draw()
-{
-  background(255,200,200);
-  fill(0);
-  String loadtext = "Sketch loaded as "+width+"/"+height;
-  text(loadtext, (width-textWidth(loadtext))/2, height/2);
-}
-
- -

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sit amet sem eros. Nulla vulputate faucibus odio at pulvinar. Integer eu ante magna, at venenatis sem. Phasellus vulputate dignissim libero eu laoreet. Ut a arcu mauris, ac rutrum mi. Proin ornare justo ac mauris dictum dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed libero mi, sagittis a eleifend nec, venenatis vitae turpis. Etiam dictum ullamcorper sodales. Vivamus ante tortor, fermentum sit amet venenatis quis, faucibus ut nisi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed semper urna nec tortor dapibus id lacinia sem dictum. In hac habitasse platea dictumst. Nam vehicula erat vel lorem cursus in tempor diam placerat. Integer mattis rutrum enim, eget condimentum augue consequat nec. Donec eget sem id ante viverra pharetra et vitae enim. Vivamus porttitor neque eu velit malesuada sagittis ac eget arcu.

- - - -

Maecenas laoreet vehicula sagittis. Morbi faucibus, nunc id imperdiet dignissim, sem eros ultricies diam, eu rhoncus risus eros ut nisi. Integer nec elit massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean feugiat elit mi, nec auctor tortor. In metus tellus, vestibulum eu accumsan vitae, aliquam porta justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras id mauris id mi scelerisque volutpat et et est. Proin faucibus lacus a lorem accumsan pellentesque. Maecenas a malesuada arcu. Suspendisse quis purus justo. Etiam placerat, odio id hendrerit laoreet, massa enim varius quam, ac volutpat massa nisi non nunc. Fusce euismod massa eget tortor vehicula faucibus. Donec suscipit nibh vitae libero facilisis et congue est iaculis. Pellentesque non justo nec sapien vehicula vehicula nec sed sapien. Sed ac elit eu dui placerat ornare. Curabitur at metus at eros suscipit iaculis.

- - - -

Aliquam aliquet posuere facilisis. Vivamus est ipsum, dignissim vel pulvinar eu, gravida sed lacus. Mauris a lacus et arcu rutrum elementum nec eu velit. Morbi elit metus, imperdiet et posuere a, bibendum ac diam. Integer mauris ipsum, ornare eu tincidunt et, ullamcorper dignissim massa. Maecenas sodales pretium dui. Sed libero ipsum, porta vel volutpat eget, porta varius diam. Vestibulum ac venenatis mi. Nulla a metus nec magna pulvinar mattis id non mi. Suspendisse ac tellus quis tellus blandit semper. Duis tempor laoreet tellus, vitae molestie dui sagittis non. Nam quis ligula arcu. Duis bibendum justo at purus imperdiet accumsan. Maecenas egestas pellentesque nibh, ut rutrum elit scelerisque ac. Praesent consequat lacus sit amet erat iaculis in pellentesque risus congue. Curabitur bibendum tortor quis nisl ultricies dapibus. Quisque sed sapien mauris, in aliquam tellus.

- - - -

Ut ante erat, porta posuere pulvinar vel, vulputate vitae lorem. Sed tristique rhoncus neque, vel fringilla eros rhoncus placerat. Aenean enim velit, fermentum a lacinia sed, volutpat vitae ipsum. Nam nec lacus nulla, non elementum ante. Nunc varius, libero imperdiet vulputate euismod, justo leo imperdiet purus, vitae varius lacus nisi at ante. Phasellus fringilla est feugiat purus convallis ultrices. Nulla consequat, neque in accumsan tincidunt, purus lectus facilisis eros, non ullamcorper dui est eget nisl. Nulla sit amet sodales massa. Praesent pretium, justo ut ullamcorper tincidunt, felis nunc bibendum massa, vitae egestas mauris velit at eros. Mauris pellentesque dapibus nibh eget sagittis. Curabitur rutrum risus eu nunc sodales scelerisque. Quisque sed nunc eget erat rutrum fringilla et vehicula mauris. Maecenas ligula arcu, aliquam sit amet mollis sit amet, laoreet at purus. Phasellus vulputate nisi non mauris consectetur dignissim. Praesent euismod dictum velit, eu consequat purus posuere nec. In scelerisque consequat ante, nec euismod elit pretium vitae. In quis tortor est.

- - - -

In hac habitasse platea dictumst. Curabitur dictum, quam a tristique rutrum, velit felis molestie elit, sit amet elementum justo enim ac dolor. Praesent lacinia tortor et odio mollis tristique. Ut tincidunt viverra quam vitae auctor. Sed nunc ligula, sagittis sed dictum vitae, consequat sed metus. Ut et ipsum vitae ligula placerat consequat. Suspendisse potenti. Quisque lacinia tincidunt erat et facilisis. Curabitur velit augue, mollis in posuere nec, egestas sit amet dolor. In blandit leo ac mauris ornare auctor. Ut pretium interdum porta. Quisque eu justo velit, ac ornare velit. Sed laoreet sollicitudin dolor ut ornare. Aenean non erat mi, posuere rutrum orci. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus tincidunt lacus nec dolor facilisis vitae viverra lacus dapibus.

- - - -

Cras id posuere purus. Praesent ut egestas leo. Nullam augue ante, faucibus sit amet gravida sed, lacinia a nisi. Morbi semper, lorem et convallis vestibulum, enim nibh sollicitudin justo, vel imperdiet sapien lacus et lorem. Praesent cursus consectetur neque at tempus. Sed diam lorem, tempus et ultricies eu, elementum sed mauris. Suspendisse arcu nunc, ultrices in dapibus et, mollis eget turpis. Donec ac justo dolor. Suspendisse ullamcorper porttitor eros ac aliquam. Suspendisse eu venenatis orci. Suspendisse aliquet mi turpis. Nunc at consequat ipsum. Fusce et lacus nisl. In venenatis felis nec mauris faucibus quis pretium libero elementum. Fusce dignissim volutpat mattis. Ut in tortor sem, eu euismod nulla. Sed varius augue quis enim volutpat eget porta augue vehicula. Nullam hendrerit velit interdum leo rhoncus a interdum nulla condimentum. In tincidunt pretium neque, et pretium nulla accumsan ut.

- - - -

Suspendisse mollis placerat nisl nec volutpat. Mauris in pellentesque dui. Nam fringilla nibh velit, eu vehicula mi. Donec quis felis dui. Vivamus imperdiet venenatis orci hendrerit vestibulum. Nunc mi metus, iaculis quis tincidunt in, viverra cursus erat. Maecenas eu est sit amet metus gravida lobortis malesuada vitae ligula. Donec ultrices feugiat nunc, nec tempus sapien mattis vel. Suspendisse lectus urna, feugiat eget lacinia quis, ultricies sed quam. Nam scelerisque facilisis consectetur. Morbi eget est quis nibh elementum commodo in et velit. Proin vitae leo neque.

- - - -

Integer mauris turpis, bibendum quis rutrum eu, euismod vitae quam. Vivamus congue fringilla leo sit amet porta. Nunc cursus sagittis sagittis. Etiam a arcu et erat vestibulum aliquam vel vulputate nibh. Ut mauris massa, fringilla eu hendrerit eu, cursus sit amet lorem. Sed scelerisque arcu at nulla varius molestie. Nullam et turpis odio, vitae consectetur odio. In ut mi augue. Nullam mollis viverra sapien, sit amet scelerisque dolor aliquam vitae. Donec quam nisl, euismod id ornare sit amet, euismod eu nibh. Integer pharetra lorem sit amet nisi dictum eleifend. Nam malesuada nisl eget diam congue tincidunt. In luctus, odio et hendrerit accumsan, sem est tempus sapien, vel suscipit massa ligula eu libero. Duis in ipsum sed nisl molestie tristique at vel nisl. Duis sagittis rutrum nisi, sed sodales nisl sodales sit amet. Vestibulum sit amet tortor orci, at commodo ante.

- - - - - \ No newline at end of file diff --git a/examples/seneca/lazy loading (1186)/lorem.pde b/examples/seneca/lazy loading (1186)/lorem.pde deleted file mode 100755 index 689a1d48b..000000000 --- a/examples/seneca/lazy loading (1186)/lorem.pde +++ /dev/null @@ -1,24 +0,0 @@ -void setup() -{ - size((int)random(100,400),(int)random(100,400)); - text("",0,0); - takeTime(); - noLoop(); -} - -void takeTime() -{ - // this will take roughly 400ms to complete - float stop = millis() + 400; - while(millis() < stop) { - String s = "lalala"; - textWidth(s); } -} - -void draw() -{ - background(255,200,200); - fill(0); - String loadtext = "Sketch loaded as "+width+"/"+height; - text(loadtext, (width-textWidth(loadtext))/2, height/2); -} \ No newline at end of file diff --git a/examples/seneca/lerpColor/lerpColor.html b/examples/seneca/lerpColor/lerpColor.html deleted file mode 100644 index 3d45174ec..000000000 --- a/examples/seneca/lerpColor/lerpColor.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - -

Andor Salga

-

lerpColor() test

- - - -

-
- -
-stroke(255);
-background(51);
-color from = color(204, 102, 0);
-color to = color(0, 102, 153);
-color interA = lerpColor(from, to, .33);
-color interB = lerpColor(from, to, .66);
-fill(from);
-rect(10, 20, 20, 60);
-fill(interA);
-rect(30, 20, 20, 60);
-fill(interB);
-rect(50, 20, 20, 60);
-fill(to);
-rect(70, 20, 20, 60);
-
- - - \ No newline at end of file diff --git a/examples/seneca/line/line-3d.html b/examples/seneca/line/line-3d.html deleted file mode 100644 index f3c3ef2fe..000000000 --- a/examples/seneca/line/line-3d.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/examples/seneca/line/line-3d.pjs b/examples/seneca/line/line-3d.pjs deleted file mode 100644 index a0bfd39f9..000000000 --- a/examples/seneca/line/line-3d.pjs +++ /dev/null @@ -1,99 +0,0 @@ -PVector loc; -PVector g = new PVector(0, 0.5); -ArrayList balls; - -int d = 10; - -class Ball { - int index; - PVector loc = new PVector(); - PVector vel = new PVector(); - PVector acc = new PVector(); - float bounceAcc; - - Ball(int index, float x, float y, float z) { - this.index = index; - loc.x = x; - loc.y = y; - loc.z = z; - } - - void render() { - if ( this.vel.y >= (height - d/2 - this.loc.y) ) { - bounceAcc = this.vel.y; - this.vel.y = height - d/2 - this.loc.y; - } else { - this.addAcc(g); - } - - this.loc.add(this.vel); - - stroke(round((float)(Math.sin(frameCount/30f) + 1) * 128), round((float)(Math.cos(frameCount/40f) + 1) * 128) + index, round((float)(Math.cos(frameCount/30f) + 1) * 128) + index/2); - - if ( this.loc.y >= height - d/2 ) { - this.vel = new PVector(); - this.addAcc(new PVector(0, -bounceAcc)); - } - } - - void addAcc(PVector v) { - this.acc.add(v); - this.vel.add(this.acc); - this.acc = new PVector(); - } -} - -Ball ball; - -int ballTotal = 32; - -float thetaInc = TWO_PI / ballTotal; -float t = 0f; -float x = 0f; -float z = 0f; - -float radius; - -void setup() { - size(600, 400, OPENGL); - //frameRate(10); - - balls = new ArrayList(); - smooth(); - //sphereDetail(1); - - radius = width; -} - -int LINES = 10; - -void draw() { - background(round(((float) Math.cos(frameCount/40f)) * 128), round(((float) Math.sin(frameCount/30f)) * 64), 40); - - camera(0, 0, 400, // eyeX, eyeY, eyeZ - mouseX - width/2, mouseY - height/2, 0.0, // centerX, centerY, centerZ - 0.0, 1.0, 0.0); // upX, upY, upZ - - rotateX(frameCount/100f); - rotateZ(frameCount/100f); - - if ( frameCount % 1 == 0 && balls.size() < ballTotal * 3 ) { - x = radius * (float) Math.cos(t); - z = radius * (float) Math.sin(t); - t += thetaInc; - - radius -= 1; - - balls.add(new Ball(balls.size()+1, x, -200, z)); - } - - for ( int i = balls.size()-1; i >= 0; i-- ) { - Ball ball = (Ball) balls.get(i); - - if ( i > LINES ) { - Ball nextBall = (Ball) balls.get(i-LINES); - line(ball.loc.x, ball.loc.y, ball.loc.z, nextBall.loc.x, nextBall.loc.y, nextBall.loc.z); - } - ball.render(); - } -} diff --git a/examples/seneca/loadBytes/loadBytesTest0.html b/examples/seneca/loadBytes/loadBytesTest0.html deleted file mode 100644 index aed509e52..000000000 --- a/examples/seneca/loadBytes/loadBytesTest0.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - Processing.js test of loadBytes() (0) - - - - -
Processing.js test of loadBytes() (0)
-

- - -

Test written by Matthew Lam

-

-		
-	
-
-
diff --git a/examples/seneca/loadBytes/loadBytesTestFile b/examples/seneca/loadBytes/loadBytesTestFile
deleted file mode 100644
index b91de5539..000000000
--- a/examples/seneca/loadBytes/loadBytesTestFile
+++ /dev/null
@@ -1 +0,0 @@
-!Aa
\ No newline at end of file
diff --git a/examples/seneca/loadStrings/example.html b/examples/seneca/loadStrings/example.html
deleted file mode 100644
index 8dcbbba30..000000000
--- a/examples/seneca/loadStrings/example.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/examples/seneca/loadStrings/example.pjs b/examples/seneca/loadStrings/example.pjs
deleted file mode 100644
index 339abc3fc..000000000
--- a/examples/seneca/loadStrings/example.pjs
+++ /dev/null
@@ -1,7 +0,0 @@
-String lines[] = loadStrings("strings.txt");
-
-println("there are " + lines.length + " lines");
-for (int i=0; i < lines.length; i++) {
-  println(": " + lines[i]);
-}
-
diff --git a/examples/seneca/loadStrings/strings.txt b/examples/seneca/loadStrings/strings.txt
deleted file mode 100644
index 37ca4bc66..000000000
--- a/examples/seneca/loadStrings/strings.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-item1
-item2
diff --git a/examples/seneca/loading (95)/a3.pde b/examples/seneca/loading (95)/a3.pde
deleted file mode 100755
index 2bb6ef1a9..000000000
--- a/examples/seneca/loading (95)/a3.pde	
+++ /dev/null
@@ -1,15 +0,0 @@
-String lstring = "A3 loaded successfully!";
-
-void setup()
-{
-  size(200,100);
-  textFont(createFont("Arial",18));
-  noLoop();
-}
-
-void draw()
-{
-  fill(0);
-  float tw = textWidth(lstring);
-  text(lstring, (width-tw)/2, height/2);
-}
\ No newline at end of file
diff --git a/examples/seneca/loading (95)/c1.pde b/examples/seneca/loading (95)/c1.pde
deleted file mode 100755
index 5669a330c..000000000
--- a/examples/seneca/loading (95)/c1.pde	
+++ /dev/null
@@ -1,15 +0,0 @@
-String lstring = "C1 loaded successfully!";
-
-void setup()
-{
-  size(200,100);
-  textFont(createFont("Arial",18));
-  noLoop();
-}
-
-void draw()
-{
-  fill(0);
-  float tw = textWidth(lstring);
-  text(lstring, (width-tw)/2, height/2);
-}
\ No newline at end of file
diff --git a/examples/seneca/loading (95)/c10.pde b/examples/seneca/loading (95)/c10.pde
deleted file mode 100755
index e868aaaa3..000000000
--- a/examples/seneca/loading (95)/c10.pde	
+++ /dev/null
@@ -1,15 +0,0 @@
-String lstring = "C10 loaded successfully!";
-
-void setup()
-{
-  size(200,100);
-  textFont(createFont("Arial",18));
-  noLoop();
-}
-
-void draw()
-{
-  fill(0);
-  float tw = textWidth(lstring);
-  text(lstring, (width-tw)/2, height/2);
-}
\ No newline at end of file
diff --git a/examples/seneca/loading (95)/c11.pde b/examples/seneca/loading (95)/c11.pde
deleted file mode 100755
index aadb6b71b..000000000
--- a/examples/seneca/loading (95)/c11.pde	
+++ /dev/null
@@ -1,15 +0,0 @@
-String lstring = "C11 loaded successfully!";
-
-void setup()
-{
-  size(200,100);
-  textFont(createFont("Arial",18));
-  noLoop();
-}
-
-void draw()
-{
-  fill(0);
-  float tw = textWidth(lstring);
-  text(lstring, (width-tw)/2, height/2);
-}
\ No newline at end of file
diff --git a/examples/seneca/loading (95)/c3.pde b/examples/seneca/loading (95)/c3.pde
deleted file mode 100755
index 8f6364d33..000000000
--- a/examples/seneca/loading (95)/c3.pde	
+++ /dev/null
@@ -1,15 +0,0 @@
-String lstring = "C3 loaded successfully!";
-
-void setup()
-{
-  size(200,100);
-  textFont(createFont("Arial",18));
-  noLoop();
-}
-
-void draw()
-{
-  fill(0);
-  float tw = textWidth(lstring);
-  text(lstring, (width-tw)/2, height/2);
-}
\ No newline at end of file
diff --git a/examples/seneca/loading (95)/c5.pde b/examples/seneca/loading (95)/c5.pde
deleted file mode 100755
index 2b550b2d9..000000000
--- a/examples/seneca/loading (95)/c5.pde	
+++ /dev/null
@@ -1,15 +0,0 @@
-String lstring = "C5 loaded successfully!";
-
-void setup()
-{
-  size(200,100);
-  textFont(createFont("Arial",18));
-  noLoop();
-}
-
-void draw()
-{
-  fill(0);
-  float tw = textWidth(lstring);
-  text(lstring, (width-tw)/2, height/2);
-}
\ No newline at end of file
diff --git a/examples/seneca/loading (95)/c6.pde b/examples/seneca/loading (95)/c6.pde
deleted file mode 100755
index 821432051..000000000
--- a/examples/seneca/loading (95)/c6.pde	
+++ /dev/null
@@ -1,15 +0,0 @@
-String lstring = "C6 loaded successfully!";
-
-void setup()
-{
-  size(200,100);
-  textFont(createFont("Arial",18));
-  noLoop();
-}
-
-void draw()
-{
-  fill(0);
-  float tw = textWidth(lstring);
-  text(lstring, (width-tw)/2, height/2);
-}
\ No newline at end of file
diff --git a/examples/seneca/loading (95)/c7.pde b/examples/seneca/loading (95)/c7.pde
deleted file mode 100755
index 20ce78ac4..000000000
--- a/examples/seneca/loading (95)/c7.pde	
+++ /dev/null
@@ -1,15 +0,0 @@
-String lstring = "C7 loaded successfully!";
-
-void setup()
-{
-  size(200,100);
-  textFont(createFont("Arial",18));
-  noLoop();
-}
-
-void draw()
-{
-  fill(0);
-  float tw = textWidth(lstring);
-  text(lstring, (width-tw)/2, height/2);
-}
\ No newline at end of file
diff --git a/examples/seneca/loading (95)/c8.pde b/examples/seneca/loading (95)/c8.pde
deleted file mode 100755
index 2b74684a3..000000000
--- a/examples/seneca/loading (95)/c8.pde	
+++ /dev/null
@@ -1,15 +0,0 @@
-String lstring = "C8 loaded successfully!";
-
-void setup()
-{
-  size(200,100);
-  textFont(createFont("Arial",18));
-  noLoop();
-}
-
-void draw()
-{
-  fill(0);
-  float tw = textWidth(lstring);
-  text(lstring, (width-tw)/2, height/2);
-}
\ No newline at end of file
diff --git a/examples/seneca/loading (95)/c9.pde b/examples/seneca/loading (95)/c9.pde
deleted file mode 100755
index a5b298952..000000000
--- a/examples/seneca/loading (95)/c9.pde	
+++ /dev/null
@@ -1,15 +0,0 @@
-String lstring = "C9 loaded successfully!";
-
-void setup()
-{
-  size(200,100);
-  textFont(createFont("Arial",18));
-  noLoop();
-}
-
-void draw()
-{
-  fill(0);
-  float tw = textWidth(lstring);
-  text(lstring, (width-tw)/2, height/2);
-}
\ No newline at end of file
diff --git a/examples/seneca/loading (95)/index.html b/examples/seneca/loading (95)/index.html
deleted file mode 100755
index 325c7e1d7..000000000
--- a/examples/seneca/loading (95)/index.html	
+++ /dev/null
@@ -1,256 +0,0 @@
-
-
-
-	
-	Script init() test
-
-   
-
-	
-	
-	
-	
-
-	
-
-
-
-
-	
-	
-	
-	
-
-
-  

Sketch loading test; both inline and from source

- - -

canvas 1 - script-src from head for text/processing

-
<head>
-  ...
-  <script type="text/processing" src="c1.pde" data-processing-target="c1"></script>
-  ...
-</head>
- - -

canvas 2 - script block from head for text/processing

-
<head>
-  ...
-  <script type="text/processing" data-processing-target="c2"> /*code*/ </script>
-  ...
-</head>
- - -

canvas 3 - script-src from head for application/processing

-
<head>
-  ...
-  <script type="application/processing" src="c3.pde" data-processing-target="c3"></script>
-  ...
-</head>
- - - -

canvas 4 - script block from head for application/processing

-
<head>
-  ...
-  <script type="application/processing" data-processing-target="c4"> /*code*/ </script>
-  ...
-</head>
- - - -

canvas (anonymous 1) - inline sketch without a target for text/processing

-
  <script type="text/processing">
-    String lstring = "A1 loaded successfully!";
-    void setup() {
-      size(200,100);
-      textFont(createFont("Arial",18));
-      noLoop();
-    }
-    void draw() {
-      fill(0);
-      float tw = textWidth(lstring);
-      text(lstring, (width-tw)/2, height/2);
-    }
-  </script>
-  <canvas></canvas>
- - -

NOTE: because there is no explicit element ordering, this is (strictly speaking) magic behaviour

- - -

canvas (anonymous 2) - inline sketch without a target for application/processing

-
  <script type="application/processing">
-    String lstring = "A2 loaded successfully!";
-    void setup() {
-      size(200,100);
-      textFont(createFont("Arial",18));
-      noLoop();
-    }
-    void draw() {
-      fill(0);
-      float tw = textWidth(lstring);
-      text(lstring, (width-tw)/2, height/2);
-    }
-  </script>
-  <canvas></canvas>
- - -

NOTE: because there is no explicit element ordering, this is (strictly speaking) magic behaviour

- - -

canvas 5 - inline sketch with target for text/processing

-
<body>
-  <script type="text/processing" data-processing-target="c5">
-    String lstring = "C5 loaded successfully!";
-    void setup() {
-      size(200,100);
-      textFont(createFont("Arial",18));
-      noLoop();
-    }
-    void draw() {
-      fill(0);
-      float tw = textWidth(lstring);
-      text(lstring, (width-tw)/2, height/2);
-    }
-  </script>
-  ...
-  <canvas id="c5"></canvas>
-  ...
-</body>
- - - -

canvas 6 - inline sketch with target for application/processing

-
<body>
-  <script type="application/processing" data-processing-target="c6">
-    String lstring = "C6 loaded successfully!";
-    void setup() {
-      size(200,100);
-      textFont(createFont("Arial",18));
-      noLoop();
-    }
-    void draw() {
-      fill(0);
-      float tw = textWidth(lstring);
-      text(lstring, (width-tw)/2, height/2);
-    }
-  </script>
-  ...
-  <canvas id="c6"></canvas>
-  ...
-</body>
- - -

canvas 7 - script-src from body for text/processing, using target

-
<body>
-  <script type="text/processing" src="c7.pde" data-processing-target="c7"></script>
-  ...
-  <canvas id="c7"></canvas>
-  ...
-</body>
- - -

canvas 8 - script-src from body for application/processing, using target

-
<body>
-  <script type="application/processing" src="c8.pde" data-processing-target="c8"></script>
-  ...
-  <canvas id="c8"></canvas>
-  ...
-</body>
- - -

canvas 9 - script-src from body for text/processing, no target

-
  <script type="text/processing" src="c9.pde"></script>
-  <canvas id="c9"></canvas>
- - -

NOTE: because there is no explicit element ordering, this is (strictly speaking) magic behaviour

- - -

canvas 10 - script-src from body for application/processing, no target

-
  <script type="application/processing" src="c10.pde"></script>
-  <canvas id="c10"></canvas>
- - -

NOTE: because there is no explicit element ordering, this is (strictly speaking) magic behaviour

- - -

canvas (anonymous 3) - normal loading using a canvas, without id, that indicates its own source files

-
  <canvas data-processing-sources="a3.pde"></canvas>
- - - -

canvas 11 - normal loading using a canvas, with id, that indicates its own source files

-
  <canvas id="c11" data-processing-sources="c11.pde"></canvas>
- - - \ No newline at end of file diff --git a/examples/seneca/log/customLogger.html b/examples/seneca/log/customLogger.html deleted file mode 100644 index f2a0df06a..000000000 --- a/examples/seneca/log/customLogger.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - Processing.js test of println() - - - - - - -

println() using custom output tests

-

- - - -

-
-
-	
-
-	
- -
- - - diff --git a/examples/seneca/log/index.html b/examples/seneca/log/index.html deleted file mode 100644 index b5e147ccd..000000000 --- a/examples/seneca/log/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - moo - - - - -

Rem nihil lucem visum volui earum rum. Nomen magis mo to earum ac quare si. Ab ea praeterea cupientem desuescam tractarem. Hac iis alienis sit possunt materia praemia pla. Aliquamdiu ob ostenditur viderentur ut ei du quascunque. Malignum ac tollitur si earumdem credenda in absoluta opinione. Lor rum suo invenit reducit maximum putabam remanet angelum ima. Non existeret essentiam pro sex videretur fit. Quae ii haud at dare ab actu bono si.

- -

Qui opinione iis figmenta nec gurgitem facultas cui obturabo. Dominum ad accepit ut timenda ac et methodo sentire naturae. Ea quaedam veteres at ineptum assidue ad videmus et tempore. Vel suo laborio ego quidnam haustam. Tantumdem attigeram conjectus suspicari extitisse sex consistit ope dem. Summa est meque omnis solis manum sum vocem.

- -

Judicem jam requiri incumbo vos. Secius qualis imo totius pendeo vix deinde. Eo de hinc in utor in hinc nunc ausi. Hos quo patet cur illae ope illum tanti. Ac scribere obtinent co ea creandam ex. Et obstinate ut et obdormiam tractatur.

- -

Tur nul eas tes regi vice post opus rari. Labefactat aliquoties geometriam eas referuntur est tam meo. Tur vox una postquam temporis monendos incipere statuere. Organa sponte posita ha in existo juvare ob ab haereo. Totus rebus veram debeo et deest re manus si. Gaudet im restat falsum ex in fronte ad. Ego naturae hic non vix peccato quatuor ipsemet cogitem nihilum.

- - - - \ No newline at end of file diff --git a/examples/seneca/log/miltipleCanvasPrint.html b/examples/seneca/log/miltipleCanvasPrint.html deleted file mode 100644 index 7448604c9..000000000 --- a/examples/seneca/log/miltipleCanvasPrint.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - Processing.js test of println() - - - - -

println() from multiple canvases tests

-

CANVAS #1

-

- - - -
-

-	
- -
-

CANVAS #2

-

- - - -
-

-	
- -
- - - diff --git a/examples/seneca/log/simplePrint.html b/examples/seneca/log/simplePrint.html deleted file mode 100644 index 535dfcf91..000000000 --- a/examples/seneca/log/simplePrint.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - Processing.js test of println() - - - - -

println() tests

-

- - - -
-

-	
- -
- - - diff --git a/examples/seneca/log/test.pde b/examples/seneca/log/test.pde deleted file mode 100644 index 88ea50793..000000000 --- a/examples/seneca/log/test.pde +++ /dev/null @@ -1,14 +0,0 @@ -void setup() -{ - size(400,400); - println("random print"); -} - -void draw() -{ - background(155, 155, 0); - stroke(255,0,0); - line(0,0,width,height); - stroke(0,0,255); - line(width,0,0,height); -} diff --git a/examples/seneca/long/long.htm b/examples/seneca/long/long.htm deleted file mode 100644 index 68de07382..000000000 --- a/examples/seneca/long/long.htm +++ /dev/null @@ -1,90 +0,0 @@ - - - - Processing.js test of long data type - - - - - -

- - long type test

-

- This is a test of long data type

-

- Datatype for large integers. While integers can be as large as 2,147,483,647 and as low as -2,147,483,648 (stored as 32 bits), a long integer has a minimum value of -9,223,372,036,854,775,808 and a maximum value of 9,223,372,036,854,775,807 (stored as 64 bits). Use this datatype when you need a number to have a greater magnitude than can be stored within an int. Processing functions don't use this datatype, so while they work in the language, you'll usually have to convert to a int using the (int) syntax before passing into a function.

- - - Test written by Daniel Hodgin
-

- Source Code:

-
-// long data type example
-long a;          // Declare variable "a" of type int
-a = 9876543210;          // Assign "a" the value 9876543210
-long b = a * 2;   // Declare variable "b" and assign it the value 19753086420
-long c = a + b;  // Declare variable "c" and assign it the sum of "a" and "b"
-println(a);
-println(b);
-println(c);
-c = (c - 30) / 100;
-int i = (int)c;  // Converts the value of "c" from a long to a int
-println(i);
-        
-
- - diff --git a/examples/seneca/long/long.pjs b/examples/seneca/long/long.pjs deleted file mode 100644 index 61b3db88f..000000000 --- a/examples/seneca/long/long.pjs +++ /dev/null @@ -1,11 +0,0 @@ -// long data type example -long a; // Declare variable "a" of type int -a = 9876543210; // Assign "a" the value 9876543210 -long b = a * 2; // Declare variable "b" and assign it the value 19753086420 -long c = a + b; // Declare variable "c" and assign it the sum of "a" and "b" -println(a); -println(b); -println(c); -c = (c - 30) / 100; -int i = (int)c; // Converts the value of "c" from a long to a int -println(i); \ No newline at end of file diff --git a/examples/seneca/max/maxTest1.html b/examples/seneca/max/maxTest1.html deleted file mode 100644 index 7c66efa3e..000000000 --- a/examples/seneca/max/maxTest1.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - Processing.js test of max() (0) - - - - - -

- - max() test (0)

-

- This is a friendlier version of the example on the Processing web site.

-
-

- - - - -
- Test written by Matthew Lam -

-size(300,250);
-background(50);
-
-boolean errors=false;
-
-int xcoord=5;
-int xoff=10;
-int ycoord=35;
-int yinc=15;
-
-fill(255,255,255);
-text("max(5, 9)",xcoord,ycoord+=yinc);
-int a = max(5, 9);            // Sets "a" to 9
-int a_exp=9;
-if (a_exp==a) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+a,xcoord+xoff,ycoord+=yinc);
-
-ycoord+=yinc;
-
-fill(255,255,255);
-text("max(-4, -12)",xcoord,ycoord+=yinc);
-int b = max(-4, -12);         // Sets "b" to -4
-int b_exp=-4;
-if (b_exp==b) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+b,xcoord+xoff,ycoord+=yinc);
-
-ycoord+=yinc;
-
-fill(255,255,255);
-text("max(12.3, 230.24)",xcoord,ycoord+=yinc);
-float c = max(12.3, 230.24);  // Sets "c" to 230.24
-float c_exp=230.24;
-if (c_exp==c) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+c,xcoord+xoff,ycoord+=yinc);
-
-ycoord+=yinc;
-
-fill(255,255,255);
-text("max({ 9, -4, 230.24 })",xcoord,ycoord+=yinc);
-float[] list = { 9, -4, 230.24 };
-float h = max(list);            // Sets "h" to 230.24
-float h_exp=230.24;
-if (h_exp==h) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+h,xcoord+xoff,ycoord+=yinc);
-
-String errMsg="";
-if (errors) {
-	fill(255,0,0);
-	errMsg="Some tests FAILED. See RED results.";
-} else {
-	fill(0,255,0);
-	errMsg="All tests passed.";
-}
-text(errMsg,5,20);
-	
-
- - - - diff --git a/examples/seneca/max/maxTest2.html b/examples/seneca/max/maxTest2.html deleted file mode 100644 index f5258efb8..000000000 --- a/examples/seneca/max/maxTest2.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - Processing.js test of max() (1) - - - - - -

- - max() test (1)

-

- More than 2 arguments, argument type checking.

-
-

- - - - -
- Test written by Matthew Lam -

-size(300,250);
-background(50);
-
-boolean errors=false;
-
-int xcoord=5;
-int xoff=10;
-int ycoord=35;
-int yinc=15;
-
-fill(255,255,255);
-text("max(-54, 23, -100)",xcoord,ycoord+=yinc);
-int g = max(-54, 23, -100);
-int g_exp=23;
-if (g_exp==g) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+g,xcoord+xoff,ycoord+=yinc);
-
-ycoord+=yinc;
-
-fill(255,255,255);
-text("max(-54, 23, 234, -100)",xcoord,ycoord+=yinc);
-int a = max(-54, 23, 234, -100);
-int a_exp=234;
-if (a_exp==a) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+a,xcoord+xoff,ycoord+=yinc);
-
-ycoord+=yinc;
-
-fill(255,255,255);
-text("max(10, 20, true)",xcoord,ycoord+=yinc);
-int b = max(10, 20, true);
-var b_exp=undefined;
-if (b_exp==b) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+b,xcoord+xoff,ycoord+=yinc);
-
-ycoord+=yinc;
-
-fill(255,255,255);
-text("max({ 9, -4, 230 }, 10)",xcoord,ycoord+=yinc);
-float[] list = { 9, -4, 230 };
-int c = max(list, 10 );
-var c_exp=undefined;
-if (c_exp==c) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+c,xcoord+xoff,ycoord+=yinc);
-
-String errMsg="";
-if (errors) {
-	fill(255,0,0);
-	errMsg="Some tests FAILED. See RED results.";
-} else {
-	fill(0,255,0);
-	errMsg="All tests passed.";
-}
-text(errMsg,5,20);
-	
-
- - - - diff --git a/examples/seneca/min/minTest1.html b/examples/seneca/min/minTest1.html deleted file mode 100644 index 69586e8be..000000000 --- a/examples/seneca/min/minTest1.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - Processing.js test of min() (0) - - - - - -

- - min() test (0)

-

- This is a friendlier version of the example on the Processing web site.

-
-

- - - - -
- Test written by Matthew Lam -

-size(300,250);
-background(50);
-
-boolean errors=false;
-
-int xcoord=5;
-int xoff=10;
-int ycoord=35;
-int yinc=15;
-
-fill(255,255,255);
-text("min(5, 9)",xcoord,ycoord+=yinc);
-int d = min(5, 9);            // Sets "d" to 5
-int d_exp=5;
-if (d_exp==d) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+d,xcoord+xoff,ycoord+=yinc);
-
-ycoord+=yinc;
-
-fill(255,255,255);
-text("min(-4, -12)",xcoord,ycoord+=yinc);
-int e = min(-4, -12);         // Sets "e" to -12
-int e_exp=-12;
-if (e_exp==e) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+e,xcoord+xoff,ycoord+=yinc);
-
-ycoord+=yinc;
-
-fill(255,255,255);
-text("min(12.3, 230.24)",xcoord,ycoord+=yinc);
-float f = min(12.3, 230.24);  // Sets "f" to 12.3
-float f_exp=12.3;
-if (f_exp==f) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+f,xcoord+xoff,ycoord+=yinc);
-
-ycoord+=yinc;
-
-fill(255,255,255);
-text("min({ 5, 1, 2, -3 })",xcoord,ycoord+=yinc);
-int[] list = { 5, 1, 2, -3 };
-int h = min(list);            // Sets "h" to -3
-int h_exp=-3;
-if (h_exp==h) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+h,xcoord+xoff,ycoord+=yinc);
-
-String errMsg="";
-if (errors) {
-	fill(255,0,0);
-	errMsg="Some tests FAILED. See RED results.";
-} else {
-	fill(0,255,0);
-	errMsg="All tests passed.";
-}
-text(errMsg,5,20);
-	
-
- - - - diff --git a/examples/seneca/min/minTest2.html b/examples/seneca/min/minTest2.html deleted file mode 100644 index d1a12cbf6..000000000 --- a/examples/seneca/min/minTest2.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - Processing.js test of min() (1) - - - - - -

- - min() test (1)

-

- More than 2 arguments, argument type checking.

-
-

- - - - -
- Test written by Matthew Lam -

-size(300,250);
-background(50);
-
-boolean errors=false;
-
-int xcoord=5;
-int xoff=10;
-int ycoord=35;
-int yinc=15;
-
-fill(255,255,255);
-text("min(-54, 23, -100)",xcoord,ycoord+=yinc);
-int g = min(-54, 23, -100);
-int g_exp=-100;
-if (g_exp==g) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+g,xcoord+xoff,ycoord+=yinc);
-
-ycoord+=yinc;
-
-fill(255,255,255);
-text("min(-54, 23, 234, -100)",xcoord,ycoord+=yinc);
-int a = min(-54, 23, 234, -100);
-int a_exp=-100;
-if (a_exp==a) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+a,xcoord+xoff,ycoord+=yinc);
-
-ycoord+=yinc;
-
-fill(255,255,255);
-text("min(10, 20, true)",xcoord,ycoord+=yinc);
-int b = min(10, 20, true);
-var b_exp=undefined;
-if (b_exp==b) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+b,xcoord+xoff,ycoord+=yinc);
-
-ycoord+=yinc;
-
-fill(255,255,255);
-text("min({ 9, -4, 230 }, 10)",xcoord,ycoord+=yinc);
-float[] list = { 9, -4, 230 };
-int c = min(list, 10 );
-var c_exp=undefined;
-if (c_exp==c) {
-	fill(0,255,0);
-} else {
-	fill(255,0,0);
-	errors=true;
-}
-text(""+c,xcoord+xoff,ycoord+=yinc);
-
-String errMsg="";
-if (errors) {
-	fill(255,0,0);
-	errMsg="Some tests FAILED. See RED results.";
-} else {
-	fill(0,255,0);
-	errMsg="All tests passed.";
-}
-text(errMsg,5,20);
-	
-
- - - - diff --git a/examples/seneca/mousePressed/mousePressed.html b/examples/seneca/mousePressed/mousePressed.html deleted file mode 100644 index 3abdad7b9..000000000 --- a/examples/seneca/mousePressed/mousePressed.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - -

mousePressed() and mousePressed test

- -

- -

- -
-int value = 0;
-
-void setup(){
-  size(200, 200);
-}
-
-void draw() {
-  fill(value);
-  rect(125, 125, 50, 50);
-  
-  if (mousePressed == true) {
-    fill(0);
-  } else {
-    fill(255);
-  }
-  rect(25, 25, 50, 50);
-}
-
-void mousePressed() {
-  if(value == 0) {
-    value = 255;
-  } else {
-    value = 0;
-  }
-}
-    
- - diff --git a/examples/seneca/mousePressed/mousePressed.pjs b/examples/seneca/mousePressed/mousePressed.pjs deleted file mode 100644 index 4d6f4da68..000000000 --- a/examples/seneca/mousePressed/mousePressed.pjs +++ /dev/null @@ -1,25 +0,0 @@ -int value = 0; - -void setup(){ - size(200, 200); -} - -void draw() { - fill(value); - rect(125, 125, 50, 50); - - if (mousePressed == true) { - fill(0); - } else { - fill(255); - } - rect(25, 25, 50, 50); -} - -void mousePressed() { - if(value == 0) { - value = 255; - } else { - value = 0; - } -} diff --git a/examples/seneca/mouseScroll/index.html b/examples/seneca/mouseScroll/index.html deleted file mode 100644 index 68c5e694a..000000000 --- a/examples/seneca/mouseScroll/index.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/examples/seneca/mouseScroll/mousescroll.pjs b/examples/seneca/mouseScroll/mousescroll.pjs deleted file mode 100644 index 37b34a986..000000000 --- a/examples/seneca/mouseScroll/mousescroll.pjs +++ /dev/null @@ -1,73 +0,0 @@ -// Processing.js Example - -int x = height * 25 / 100; -int y = width * 50 / 100; - -forground = false; - -void setup() { - frameRate(20); -} - -void mouseScrolled() { - int delta = mouseScroll; - - if (delta > 0) { - if (forground) - { - if (x > (height * 25 / 100)) - { - x -= 15; - } - else { - forground = !forground; - } - } - else { - if (x < (height * 75 / 100)) - { - x += 15; - } - else { - forground = !forground; - } - } - - } - else if (delta < 0) { - if (forground) { - if (x < (height * 75 / 100)) - { - x += 15; - } - else { - forground = !forground; - } - } - else { - if (x > (height * 25 / 100)) - { - x -= 15; - } - else { - forground = !forground; - } - } - } -} - -void draw() { - - background(100); - if (forground) { - ellipse(y, x, 55, 55); - ellipse(y, y, 70, 70); - } - else { - ellipse(y, y, 70, 70); - ellipse(y, x, 55, 55); - } - text("move the mousewheel to change axis: " + x, 15, 15); - -} - diff --git a/examples/seneca/nf/nfTest1.html b/examples/seneca/nf/nfTest1.html deleted file mode 100644 index b3ab77d3d..000000000 --- a/examples/seneca/nf/nfTest1.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - Processing.js test of nf() (0) - - - - -

nf() test (0)

-

Tests 1 to 6

-

Basic Processing examples.

-

Tests 7 to 9

-

Negative numbers to be formatted. Processing documentation states the number to be formatted should be greater than zero. -

Test 10

-

Poor man's float truncation.

-

Tests 11 and 12

-

left or right being zero. Processing documentation states these arguments should be greater than zero.

-

-

Tests 13 and 18

-

Negative values for left or right. If left is less than zero, it does not change anything left of the decimal. If right is less than zero, it transforms the float into an int.

-

-

Tests 19 and 32

-

Note how the way numbers are 'floored' changes if the one's digit is odd or even.

-

- - - -
- Test written by Matthew Lam -

 
-
-
-boolean errors=false;
-
-int xcoord=5;
-int xoff=10;
-int ycoord=35;
-int yinc=15;
-
-
-void setup() {
-  
-    PFont font;
-    font = loadFont("Eureka-90.vlw"); 
-    textFont(font, 12);
-    size(900,400);
-    background(50);
-    noLoop();
-} 
-
-void draw() {
-	output(1,"nf(200, 10)",nf(200, 10),"0000000200");
-	output(2,"nf(40, 5)",nf(40, 5),"00040");
-	output(3,"nf(90, 3)",nf(90, 3),"090");
- 
-	output(4,"nf(200.94, 10, 4)",nf(200.94, 10, 4),"0000000200.9400");
-	output(5,"nf(40.2, 5, 3)",nf(40.2, 5, 3),"00040.200");
-	output(6,"nf(9.012, 3, 5)",nf(9.012, 3, 5),"009.01200");
- 
-	xcoord=200;
-	ycoord=35;
- 
-	output(7,"nf(-200, 10)",nf(-200, 10),"-0000000200");
-	output(8,"nf(-200.94, 10, 4)",nf(-200.94, 10, 4),"-0000000200.9400");
- 
-	output(9,"nf(-200, 2)",nf(-200, 2),"-200");
-	output(10,"nf(-200.95, 2, 1)",nf(-200.95, 2, 1),"-200.9");
- 
-        output(11,"nf(-200, 0)",nf(-200, 2),"-200");
-	output(12,"nf(-200.94, 2, 0)",nf(-200.94, 2, 0),"-200.94");
- 
-        xcoord=400;
-	ycoord=35;
-        
-        output(13,"nf(-10, -1)",nf(-10, -1),"-10");
-        output(14,"nf(-10, -3)",nf(-10, -3),"-10");
-        
-        output(15,"nf(-10.05, -1, -1)",nf(-10.05, -1, -1),"-10");
-        output(16,"nf(-10.05, -1, -3)",nf(-10.05, -1, -3),"-10");
-        
-        output(17,"nf(-10.05, 3, -1)",nf(-10.05, 3, -1),"-010");
-        output(18,"nf(-10.05, 3, -3)",nf(-10.05, 3, -3),"-010");
-        
-        xcoord=600;
-	ycoord=35;
-        
-        output(19,"nf(-10.49, -1, -1)",nf(-10.49, -1, -1),"-10");
-        output(20,"nf(-10.5, -1, -1)",nf(-10.5, -1, -1),"-10");
-        
-        output(21,"nf(-11.49, -1, -1)",nf(-11.49, -1, -1),"-11");
-        output(22,"nf(-11.5, -1, -1)",nf(-11.5, -1, -1),"-12");
-        
-        output(23,"nf(-12.49, -1, -1)",nf(-12.49, -1, -1),"-12");
-        output(24,"nf(-12.5, -1, -1)",nf(-12.5, -1, -1),"-12");
-        
-        output(25,"nf(-13.49, -1, -1)",nf(-13.49, -1, -1),"-13");
-        output(26,"nf(-13.5, -1, -1)",nf(-13.5, -1, -1),"-14");
-        
-        xcoord=800;
-	ycoord=35;
-        
-        output(27,"nf(-14.49, -1, -1)",nf(-14.49, -1, -1),"-14");
-        output(28,"nf(-14.5, -1, -1)",nf(-14.5, -1, -1),"-14");
-        
-        output(28,"nf(-15.49, -1, -1)",nf(-15.49, -1, -1),"-15");
-        output(29,"nf(-15.5, -1, -1)",nf(-15.5, -1, -1),"-16");
-        
-        output(30,"nf(-16.49, -1, -1)",nf(-16.49, -1, -1),"-16");
-        output(31,"nf(-16.5, -1, -1)",nf(-16.5, -1, -1),"-16");
-        
-        output(31,"nf(-17.49, -1, -1)",nf(-17.49, -1, -1),"-17");
-        output(32,"nf(-17.5, -1, -1)",nf(-17.5, -1, -1),"-18");
- 
-	String errMsg="";
-	if (errors) {
-		fill(255,0,0);
-		errMsg="RED tests FAILED.";
-	} else {
-		fill(0,255,0);
-		errMsg="All tests passed.";
-	}
-	text(errMsg,5,20);
-}
- 
-void output(int ind,String txt,String results,String expected) {
-	fill(255,255,255);
-	text("["+ind+"] "+txt,xcoord,ycoord+=yinc);
-	if (results.equals(expected)) {
-		fill(0,255,0);
-	} else {
-		fill(255,0,0);
-		errors=true;
-	}
-	text(results,xcoord+xoff,ycoord+=yinc);
-	ycoord+=yinc;
-}
-	
-
- - - \ No newline at end of file diff --git a/examples/seneca/nf/nfTest2.html b/examples/seneca/nf/nfTest2.html deleted file mode 100644 index a01344b5b..000000000 --- a/examples/seneca/nf/nfTest2.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - Processing.js test of nf() (1) - - - - - -

nf() test (1)

-

Test 1

-

See tests 6 to 8 for the values you'd think would be returned. Processing has the same behaviour.

-

Tests 6 to 8

-

The values you'd think test 1 would return, but doesn't.

-

- - - - -
- Test written by Matthew Lam -

-
-
-boolean errors=false;
-
-int xcoord=5;
-int xoff=10;
-int ycoord=35;
-int yinc=15;
-
-
-void setup() {
-  
-    PFont font;
-		//make sure this font in data dir
-    font = loadFont("Eureka-90.vlw"); 
-    textFont(font, 12);
-    size(500,400);
-    background(50);
-    noLoop();
-} 
-
-
-void draw() {
-        String[] res1=new String[3];
-        res1[0]="-01";
-        res1[1]="20";
-        res1[2]="300";
-        int[] inp1=new int[3];
-        inp1[0]=-1;
-        inp1[1]=20;
-        inp1[2]=300;
-        outputArr(1,"nf({-1,20,300}, 3)",nf(inp1, 2),res1);
- 
-        String[] res2=new String[3];
-        res2[0]="-001.00";
-        res2[1]="020.02";
-        res2[2]="300.01";
-        float[] inp2=new float[3];
-        inp2[0]=-1.002;
-        inp2[1]=20.02;
-        inp2[2]=300.0123;
-        outputArr(2,"nf({-1.002,20.02,300.0123}, 3, 2)",nf(inp2, 3, 2),res2);
-        
-        String[] res3=new String[3];
-        res3[0]="-1";
-        res3[1]="20";
-        res3[2]="300";
-        int[] inp3=new int[3];
-        inp3[0]=-1;
-        inp3[1]=20;
-        inp3[2]=300;
-        outputArr(3,"nf({-1,20,300}, -1)",nf(inp3, -1),res3);
-        
-        String[] res4=new String[3];
-        res4[0]="-001";
-        res4[1]="000";
-        res4[2]="000";
-        float[] inp4=new float[3];
-        inp4[0]=-1.002;
-        inp4[1]=0.49;
-        inp4[2]=0.5;
-        outputArr(4,"nf({-1.002,0.49,0.5}, 3, -1)",nf(inp4, 3, -1),res4);
-        
-        String[] res5=new String[3];
-        res5[0]="-001";
-        res5[1]="001";
-        res5[2]="002";
-        float[] inp5=new float[3];
-        inp5[0]=-1.002;
-        inp5[1]=1.49;
-        inp5[2]=1.5;
-        outputArr(5,"nf({-1.002,1.49,1.5}, 3, -1)",nf(inp5, 3, -1),res5);
- 
-	xcoord=300;
-	ycoord=35;
- 
-        output(6,"nf(-1, 3)",nf(-1, 3),"-001");
-        output(7,"nf(20, 3)",nf(20, 3),"020");
-        output(8,"nf(300, 3)",nf(300, 3),"300");
- 
-	String errMsg="";
-	if (errors) {
-		fill(255,0,0);
-		errMsg="RED tests FAILED.";
-	} else {
-		fill(0,255,0);
-		errMsg="All tests passed.";
-	}
-	text(errMsg,5,20);
-}
- 
-void output(int ind,String txt,String results,String expected) {
-	fill(255,255,255);
-	text("["+ind+"] "+txt,xcoord,ycoord+=yinc);
-	if (results.equals(expected)) {
-		fill(0,255,0);
-	} else {
-		fill(255,0,0);
-		errors=true;
-	}
-	text(results,xcoord+xoff,ycoord+=yinc);
-	ycoord+=yinc;
-}
- 
-void outputArr(int ind,String txt,String[] results,String[] expected) {
-	fill(255,255,255);
-	text("["+ind+"] "+txt,xcoord,ycoord+=yinc);
- 
-        String resOut="";
-        fill(0,255,0);
-        for (int i=0;i=expected.length || !results[i].equals(expected[i])) {
-               fill(255,0,0);
-               errors=true;
-           }
-           resOut=resOut+results[i]+", ";
-        }
- 
-	text(resOut,xcoord+xoff,ycoord+=yinc);
-	ycoord+=yinc;
-}
-
-	
- -
- - - diff --git a/examples/seneca/param/param.html b/examples/seneca/param/param.html deleted file mode 100644 index 55e2ac435..000000000 --- a/examples/seneca/param/param.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/examples/seneca/param/sketch.pde b/examples/seneca/param/sketch.pde deleted file mode 100644 index ad72c7dde..000000000 --- a/examples/seneca/param/sketch.pde +++ /dev/null @@ -1,2 +0,0 @@ -String s = param("testParam"); -println("testParam = " + s); diff --git a/examples/seneca/parseBoolean/parseBoolean.html b/examples/seneca/parseBoolean/parseBoolean.html deleted file mode 100644 index f85c40e09..000000000 --- a/examples/seneca/parseBoolean/parseBoolean.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - Processing.js test of parseBoolean() - - - - -

- Converts the passed parameter to the function to its boolean value. It will return an array of booleans if an array is passed in.

- -

- Test:

-
-void setup() {
-  size(10, 10);
-}
-
-void draw() {
-  int intVar = 0;
-  boolean intBool = parseBoolean(intVar);
-  println("int:0 = " + intBool);
-  
-  int[] intArray = {0, 1, 5};
-  boolean[] intBoolArray = parseBoolean(intArray);
-  println("int Array: {0, 1, 5} = " + intBoolArray);
-  
-  string strVar = "true";
-  boolean strBool = parseBoolean(strVar);
-  println("string: \"true\" = " + strBool);
-  
-  string[] strArray = {"false", "TRUE", "True"};
-  boolean[] strBoolArray = parseBoolean(strArray);
-  println("string Array: {\"false\", \"TRUE\", \"True\"} = " + strBoolArray);
-  
-  byte byteVar = 0;
-  boolean byteBool = parseBoolean(byteVar);
-  println("byte: 0 = " + byteBool);
-  
-  byte[] byteArray = {0, 1};
-  boolean[] byteBoolArray = parseBoolean(byteArray);
-  println("byte Array: {0, 1} = " + byteBoolArray);
-  
-  noLoop();
-}
-    
-
- - diff --git a/examples/seneca/parseBoolean/parseBoolean.pjs b/examples/seneca/parseBoolean/parseBoolean.pjs deleted file mode 100644 index 34d7e9312..000000000 --- a/examples/seneca/parseBoolean/parseBoolean.pjs +++ /dev/null @@ -1,33 +0,0 @@ -// Processing.js Example - -void setup() { - size(10, 10); -} - -void draw() { - int intVar = 0; - boolean intBool = parseBoolean(intVar); - println("int:0 = " + intBool); - - int[] intArray = {0, 1, 5}; - boolean[] intBoolArray = parseBoolean(intArray); - println("int Array: {0, 1, 5} = " + intBoolArray); - - string strVar = "true"; - boolean strBool = parseBoolean(strVar); - println("string: \"true\" = " + strBool); - - string[] strArray = {"false", "TRUE", "True"}; - boolean[] strBoolArray = parseBoolean(strArray); - println("string Array: {\"false\", \"TRUE\", \"True\"} = " + strBoolArray); - - byte byteVar = 0; - boolean byteBool = parseBoolean(byteVar); - println("byte: 0 = " + byteBool); - - byte[] byteArray = {0, 1}; - boolean[] byteBoolArray = parseBoolean(byteArray); - println("byte Array: {0, 1} = " + byteBoolArray); - - noLoop(); -} diff --git a/examples/seneca/pimage/ETapple.jpg b/examples/seneca/pimage/ETapple.jpg deleted file mode 100644 index 285be012f..000000000 Binary files a/examples/seneca/pimage/ETapple.jpg and /dev/null differ diff --git a/examples/seneca/pimage/arch.jpg b/examples/seneca/pimage/arch.jpg deleted file mode 100644 index a61da9b7c..000000000 Binary files a/examples/seneca/pimage/arch.jpg and /dev/null differ diff --git a/examples/seneca/pimage/background.htm b/examples/seneca/pimage/background.htm deleted file mode 100644 index f350dab4b..000000000 --- a/examples/seneca/pimage/background.htm +++ /dev/null @@ -1,20 +0,0 @@ - - -
-/* @pjs preload="string.jpg"; */
-size(472,266);
-PImage b;
-b = loadImage("string.jpg");
-background(b);
-PFont font;
-font = loadFont("Arial"); 
-textFont(font, 16);
-fill(255, 255, 255);
-text("Here is an example of using", 100,80);
-text("a PImage as a background.", 100,100);
-text("LoadImage requires precaching", 100,120);
-text("the image first. See example code.", 100,140);
-text("The image must be the exact same size as", 100,160);
-text("canvas size or nothing happens.", 100,180);
-text("Use img.resize(w,h) to make it the proper size.", 100,200);
-
\ No newline at end of file diff --git a/examples/seneca/pimage/background.pjs b/examples/seneca/pimage/background.pjs deleted file mode 100644 index 222e525bb..000000000 --- a/examples/seneca/pimage/background.pjs +++ /dev/null @@ -1,17 +0,0 @@ -/* @pjs preload="string.jpg"; */ -size(472,266); -PImage b; -b = loadImage("string.jpg"); -background(0); -background(b); -PFont font; -font = loadFont("Arial"); -textFont(font, 16); -fill(255, 255, 255); -text("Here is an example of using", 100,80); -text("a PImage as a background.", 100,100); -text("LoadImage requires precaching", 100,120); -text("the image first. See example code.", 100,140); -text("The image must be the exact same size as", 100,160); -text("canvas size or nothing happens.", 100,180); -text("Use img.resize(w,h) to make it the proper size.", 100,200); \ No newline at end of file diff --git a/examples/seneca/pimage/basetest.htm b/examples/seneca/pimage/basetest.htm deleted file mode 100644 index eae497a49..000000000 --- a/examples/seneca/pimage/basetest.htm +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/examples/seneca/pimage/basetest.pjs b/examples/seneca/pimage/basetest.pjs deleted file mode 100644 index 44d4de766..000000000 --- a/examples/seneca/pimage/basetest.pjs +++ /dev/null @@ -1,7 +0,0 @@ -/* @pjs preload="red.jpg, green.jpg"; */ -size(40,40); -background(0); -PImage imgred = loadImage("red.jpg"); -PImage imggreen = loadImage("green.jpg"); -imgred.blend(imggreen, 0, 0, 5, 5, 0, 0, 5, 5, LIGHTEST); -image(imgred, 5, 5); \ No newline at end of file diff --git a/examples/seneca/pimage/berlin-1.jpg b/examples/seneca/pimage/berlin-1.jpg deleted file mode 100644 index bcde0f08c..000000000 Binary files a/examples/seneca/pimage/berlin-1.jpg and /dev/null differ diff --git a/examples/seneca/pimage/blend.htm b/examples/seneca/pimage/blend.htm deleted file mode 100644 index 9f68710cb..000000000 --- a/examples/seneca/pimage/blend.htm +++ /dev/null @@ -1,15 +0,0 @@ - -
Original image

-Blended in PJS
- -
P5 expected output
-
-/* @pjs preload="country.jpg"; */
-size(472,266);
-PImage img = loadImage("country.jpg"); 
-image(img, 0, 0);
-blend(img, 0, 0, 100, 266, 372, 0, 100, 266, LIGHTEST);
-blend(img, 0, 0, 100, 266, 272, 0, 100, 266, DARKEST);
-blend(img, 0, 0, 100, 266, 172, 0, 100, 266, SUBTRACT);
-blend(img, 0, 0, 100, 266, 72, 0, 100, 266, BURN);
-
\ No newline at end of file diff --git a/examples/seneca/pimage/blend.pjs b/examples/seneca/pimage/blend.pjs deleted file mode 100644 index cb713412d..000000000 --- a/examples/seneca/pimage/blend.pjs +++ /dev/null @@ -1,8 +0,0 @@ -/* @pjs preload="country.jpg"; */ -size(472,266); -PImage img = loadImage("country.jpg"); -image(img, 0, 0); -blend(img, 0, 0, 100, 266, 372, 0, 100, 266, LIGHTEST); -blend(img, 0, 0, 100, 266, 272, 0, 100, 266, DARKEST); -blend(img, 0, 0, 100, 266, 172, 0, 100, 266, SUBTRACT); -blend(img, 0, 0, 100, 266, 72, 0, 100, 266, BURN); \ No newline at end of file diff --git a/examples/seneca/pimage/blendexpected.jpg b/examples/seneca/pimage/blendexpected.jpg deleted file mode 100644 index 635a014cd..000000000 Binary files a/examples/seneca/pimage/blendexpected.jpg and /dev/null differ diff --git a/examples/seneca/pimage/castle.jpg b/examples/seneca/pimage/castle.jpg deleted file mode 100644 index ce95731c0..000000000 Binary files a/examples/seneca/pimage/castle.jpg and /dev/null differ diff --git a/examples/seneca/pimage/copy.htm b/examples/seneca/pimage/copy.htm deleted file mode 100644 index 7758e0628..000000000 --- a/examples/seneca/pimage/copy.htm +++ /dev/null @@ -1,17 +0,0 @@ - -
Original image

-Copy in PJS
- -
P5 expected output
-
-/* @pjs preload="ocean.jpg"; */
-size(472,266);
-PImage img = loadImage("ocean.jpg");
-image(img, 0, 0);
-copy(30, 220, 30, 30, 235, 25, 60, 60);
-copy(160, 130, 60, 60, 200, 200, 60, 60);
-noFill();
-// Rectangle shows area being copied
-rect(30, 220, 30, 30);
-rect(160, 130, 60, 60);
-
\ No newline at end of file diff --git a/examples/seneca/pimage/copy.pjs b/examples/seneca/pimage/copy.pjs deleted file mode 100644 index 8ae4246af..000000000 --- a/examples/seneca/pimage/copy.pjs +++ /dev/null @@ -1,10 +0,0 @@ -/* @pjs preload="ocean.jpg"; */ -size(472,266); -PImage img = loadImage("ocean.jpg"); -image(img, 0, 0); -copy(30, 220, 30, 30, 235, 25, 60, 60); -copy(160, 130, 60, 60, 200, 200, 60, 60); -noFill(); -// Rectangle shows area being copied -rect(30, 220, 30, 30); -rect(160, 130, 60, 60); \ No newline at end of file diff --git a/examples/seneca/pimage/copyexpected.jpg b/examples/seneca/pimage/copyexpected.jpg deleted file mode 100644 index 762d23092..000000000 Binary files a/examples/seneca/pimage/copyexpected.jpg and /dev/null differ diff --git a/examples/seneca/pimage/copyimg.htm b/examples/seneca/pimage/copyimg.htm deleted file mode 100644 index 2ec25e698..000000000 --- a/examples/seneca/pimage/copyimg.htm +++ /dev/null @@ -1,21 +0,0 @@ - - -
-/* @pjs preload="ref_string.jpg,lake.jpg"; */
-size(472,266);
-PImage img = loadImage("lake.jpg");
-PImage img2 = loadImage("ref_string.jpg");
-image(img, 0, 0);
-copy(30, 220, 30, 30, 235, 25, 60, 60);
-copy(160, 130, 60, 60, 200, 200, 60, 60);
-noFill();
-// Rectangle shows area being copied
-rect(30, 220, 30, 30);
-rect(160, 130, 60, 60);
-// copy a 50x50 piece of ref_string to 50,50 on canvas
-copy(img2,25,25,50,50,50,50,50,50);
-// get piece of ref_string and place at 100,100
-PImage result = img2.get(0,0,50,80);
-image(result,100,100);
-image(img2,372,0);
-
\ No newline at end of file diff --git a/examples/seneca/pimage/copyimg.pjs b/examples/seneca/pimage/copyimg.pjs deleted file mode 100644 index 07b81b927..000000000 --- a/examples/seneca/pimage/copyimg.pjs +++ /dev/null @@ -1,18 +0,0 @@ -/* @pjs preload="ref_string.jpg,lake.jpg"; */ -size(472,266); -PImage img = loadImage("lake.jpg"); -PImage img2 = loadImage("ref_string.jpg"); -image(img, 0, 0); -copy(30, 220, 30, 30, 235, 25, 60, 60); -copy(160, 130, 60, 60, 200, 200, 60, 60); -noFill(); -// Rectangle shows area being copied -rect(30, 220, 30, 30); -rect(160, 130, 60, 60); -// copy a 50x50 piece of ref_string to 50,50 on canvas -copy(img2,25,25,50,50,50,50,50,50); -// get piece of ref_string and place at 100,100 -PImage result = img2.get(0,0,50,80); -image(result,100,100); -image(img2,372,0); -rect(372, 0, 50, 80); \ No newline at end of file diff --git a/examples/seneca/pimage/country.jpg b/examples/seneca/pimage/country.jpg deleted file mode 100644 index 361d77b39..000000000 Binary files a/examples/seneca/pimage/country.jpg and /dev/null differ diff --git a/examples/seneca/pimage/filter.htm b/examples/seneca/pimage/filter.htm deleted file mode 100644 index 4423ed7a5..000000000 --- a/examples/seneca/pimage/filter.htm +++ /dev/null @@ -1,59 +0,0 @@ - -Click to cycle filter modes on the entire canvas
- -
-
-/* @pjs preload="ref_string.jpg"; */
-size(220,220);
-background(128);
-PImage b;
-b = loadImage("ref_string.jpg");
-int count = 0;
-
-void mouseClicked() {
-  if(count == 0) {
-    image(b, 0, 0);
-    filter(GRAY);
-    image(b, 110, 110);
-  }
-  if(count == 1) {
-    image(b, 0, 0);
-    filter(BLUR);
-    image(b, 110, 110);
-  }
-  if(count == 2) {
-    image(b, 0, 0);
-    filter(POSTERIZE, 4);
-    image(b, 110, 110);
-  }
-  if(count == 3) {
-    image(b, 0, 0);
-    filter(INVERT);
-    image(b, 110, 110);
-  }
-  if(count == 4) {
-    image(b, 0, 0);
-    filter(THRESHOLD);
-    image(b, 110, 110);
-  }
-  if(count == 5) {
-    image(b, 0, 0);
-    filter(DILATE);
-    image(b, 110, 110);
-  }
-  if(count == 6) {
-    image(b, 0, 0);
-    filter(ERODE);
-    image(b, 110, 110);
-  }
-  if(count == 7) {
-    image(b, 0, 0);
-    filter(OPAQUE);
-    image(b, 110, 110);
-  }  
-  count++;
-  if(count > 7) {
-    count = 0; 
-  }
-}
-
\ No newline at end of file diff --git a/examples/seneca/pimage/filter.jpg b/examples/seneca/pimage/filter.jpg deleted file mode 100644 index 7070cc3e8..000000000 Binary files a/examples/seneca/pimage/filter.jpg and /dev/null differ diff --git a/examples/seneca/pimage/filter.pjs b/examples/seneca/pimage/filter.pjs deleted file mode 100644 index 7b6043b0b..000000000 --- a/examples/seneca/pimage/filter.pjs +++ /dev/null @@ -1,53 +0,0 @@ -/* @pjs preload="ref_string.jpg"; */ -size(220,220); -background(128); -PImage b; -b = loadImage("ref_string.jpg"); -int count = 0; - -void mouseClicked() { - if(count == 0) { - image(b, 0, 0); - filter(GRAY); - image(b, 110, 110); - } - if(count == 1) { - image(b, 0, 0); - filter(BLUR); - image(b, 110, 110); - } - if(count == 2) { - image(b, 0, 0); - filter(POSTERIZE, 4); - image(b, 110, 110); - } - if(count == 3) { - image(b, 0, 0); - filter(INVERT); - image(b, 110, 110); - } - if(count == 4) { - image(b, 0, 0); - filter(THRESHOLD); - image(b, 110, 110); - } - if(count == 5) { - image(b, 0, 0); - filter(DILATE); - image(b, 110, 110); - } - if(count == 6) { - image(b, 0, 0); - filter(ERODE); - image(b, 110, 110); - } - if(count == 7) { - image(b, 0, 0); - filter(OPAQUE); - image(b, 110, 110); - } - count++; - if(count > 7) { - count = 0; - } -} \ No newline at end of file diff --git a/examples/seneca/pimage/gradient.htm b/examples/seneca/pimage/gradient.htm deleted file mode 100644 index bffc96132..000000000 --- a/examples/seneca/pimage/gradient.htm +++ /dev/null @@ -1,5 +0,0 @@ - - -
-
-
\ No newline at end of file diff --git a/examples/seneca/pimage/gradient.pjs b/examples/seneca/pimage/gradient.pjs deleted file mode 100644 index e4952a578..000000000 --- a/examples/seneca/pimage/gradient.pjs +++ /dev/null @@ -1,63 +0,0 @@ -// constants -int Y_AXIS = 1; -int X_AXIS = 2; - -void setup(){ - size(200, 200); - - // create some gradients - // background - color b1 = color(190, 190, 190); - color b2 = color(20, 20, 20); - setGradient(0, 0, width, height, b1, b2, Y_AXIS); - //center squares - color c1 = color(255, 120, 0); - color c2 = color(10, 45, 255); - color c3 = color(10, 255, 15); - color c4 = color(125, 2, 140); - color c5 = color(255, 255, 0); - color c6 = color(25, 255, 200); - setGradient(25, 25, 75, 75, c1, c2, Y_AXIS); - setGradient(100, 25, 75, 75, c3, c4, X_AXIS); - setGradient(25, 100, 75, 75, c2, c5, X_AXIS); - setGradient(100, 100, 75, 75, c4, c6, Y_AXIS); -} - -void setGradient(int x, int y, float w, float h, color c1, color c2, int axis ){ - // calculate differences between color components - float deltaR = red(c2)-red(c1); - float deltaG = green(c2)-green(c1); - float deltaB = blue(c2)-blue(c1); - - // choose axis - if(axis == Y_AXIS){ - /*nested for loops set pixels - in a basic table structure */ - // column - for (int i=x; i<=(x+w); i++){ - // row - for (int j = y; j<=(y+h); j++){ - color c = color( - (red(c1)+(j-y)*(deltaR/h)), - (green(c1)+(j-y)*(deltaG/h)), - (blue(c1)+(j-y)*(deltaB/h)) - ); - set(i, j, c); - } - } - } - else if(axis == X_AXIS){ - // column - for (int i=y; i<=(y+h); i++){ - // row - for (int j = x; j<=(x+w); j++){ - color c = color( - (red(c1)+(j-x)*(deltaR/h)), - (green(c1)+(j-x)*(deltaG/h)), - (blue(c1)+(j-x)*(deltaB/h)) - ); - set(j, i, c); - } - } - } -} diff --git a/examples/seneca/pimage/green.jpg b/examples/seneca/pimage/green.jpg deleted file mode 100644 index e0b2a9682..000000000 Binary files a/examples/seneca/pimage/green.jpg and /dev/null differ diff --git a/examples/seneca/pimage/imagemode.htm b/examples/seneca/pimage/imagemode.htm deleted file mode 100644 index b1c949673..000000000 --- a/examples/seneca/pimage/imagemode.htm +++ /dev/null @@ -1,13 +0,0 @@ - - -
-/* @pjs preload="ref_string.jpg"; */
-size(200,200);
-PImage b;
-b = loadImage("ref_string.jpg");
-imageMode(CORNERS);
-image(b, 10, 10, 60, 60);
-imageMode(CORNER);
-image(b, 35, 35, 50, 50);
-
-Original Processing example \ No newline at end of file diff --git a/examples/seneca/pimage/imagemode.pjs b/examples/seneca/pimage/imagemode.pjs deleted file mode 100644 index 1f591e1f2..000000000 --- a/examples/seneca/pimage/imagemode.pjs +++ /dev/null @@ -1,8 +0,0 @@ -/* @pjs preload="ref_string.jpg"; */ -size(200,200); -PImage b; -b = loadImage("ref_string.jpg"); -imageMode(CORNERS); -image(b, 10, 10, 60, 60); -imageMode(CORNER); -image(b, 35, 35, 50, 50); \ No newline at end of file diff --git a/examples/seneca/pimage/lake.jpg b/examples/seneca/pimage/lake.jpg deleted file mode 100644 index cd0b55d94..000000000 Binary files a/examples/seneca/pimage/lake.jpg and /dev/null differ diff --git a/examples/seneca/pimage/loadimage.htm b/examples/seneca/pimage/loadimage.htm deleted file mode 100644 index 7bbfd2745..000000000 --- a/examples/seneca/pimage/loadimage.htm +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - -
-

- Processing.js slideshow using loadImage with no caching

-

- Click on the images to advance to the next

- -
- - diff --git a/examples/seneca/pimage/loadimage.pjs b/examples/seneca/pimage/loadimage.pjs deleted file mode 100644 index c8c526f95..000000000 --- a/examples/seneca/pimage/loadimage.pjs +++ /dev/null @@ -1,37 +0,0 @@ -PImage[] slideshow = new PImage[8]; - -void setup(){ - size(492,286); - background(0); - slideshow[0] = loadImage("metamorphosis.jpg"); - slideshow[1] = loadImage("lake.jpg"); - slideshow[2] = loadImage("moon.jpg"); - slideshow[3] = loadImage("country.jpg"); - slideshow[4] = loadImage("string.jpg"); - slideshow[5] = loadImage("ocean.jpg"); - slideshow[6] = loadImage("winter.jpg"); - slideshow[7] = loadImage("castle.jpg"); - PFont font; - font = loadFont("Arial"); - textFont(font, 14); - fill(203, 21, 10); -} - -int i = 0; - -void draw(){ - if(i >= slideshow.length){ - i = 0; - } - if (frameCount % 50 == 0){ - background(0); - text(frameRate, 10,10); - } - if(slideshow[i].width > 0) { - image(slideshow[i],10,10); - } -}; - -void mouseClicked() { - i++; -} \ No newline at end of file diff --git a/examples/seneca/pimage/mask.jpg b/examples/seneca/pimage/mask.jpg deleted file mode 100644 index bbd138254..000000000 Binary files a/examples/seneca/pimage/mask.jpg and /dev/null differ diff --git a/examples/seneca/pimage/masktest.htm b/examples/seneca/pimage/masktest.htm deleted file mode 100644 index 70b4e1ffa..000000000 --- a/examples/seneca/pimage/masktest.htm +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/examples/seneca/pimage/masktest.pjs b/examples/seneca/pimage/masktest.pjs deleted file mode 100644 index f8e9949bb..000000000 --- a/examples/seneca/pimage/masktest.pjs +++ /dev/null @@ -1,96 +0,0 @@ -/* @pjs preload="screenana.png"; */ -Bubble myBubble; - -void setup() { - size(200, 200); - frameRate(20); - noStroke(); - smooth(); - myBubble = new Bubble(); -} - -void draw() { - background(0); - myBubble.display(); -} - -/** - * User Object - * ----------------------------------- - */ -class Bubble { - float x; - float y; - int width = 75; - int height = 75; - int border = 15; - PImage avatar; - - /** - * Default constructor - * ----------------------------------- - */ - Bubble() { - this.x = 50; - this.y = 100; - - // --- Image URL for web testing - String imageUrl = "screenana.png"; - // --- Image URL for Processing testing - //String imageUrl = "http://i.slavitica.net/images/screenana.png"; - - this.avatar = loadImage(imageUrl); - if (this.avatar != null) { - this.setupAvatar(); - } - } - - /** - * Display the user bubble - * ----------------------------------- - */ - void display() { - - // Outer circle - fill(105, 35, 205, 150); - ellipse(this.x, this.y, this.width, this.height); - - // Inner circle - fill(105, 35, 205); - ellipse(this.x, this.y, this.width - this.border - 2, this.height - this.border - 2); - - this.drawAvatar(); - } - - /** - * Initial setup of user Avatar - * ----------------------------------- - */ - void setupAvatar() { - // Resize Image - if (this.avatar.height < this.avatar.width) { - this.avatar.resize(0, this.height - this.border); - } else { - this.avatar.resize(this.width - this.border, 0); - } - - PGraphics circMask = createGraphics(this.avatar.width, this.avatar.height); - circMask.beginDraw(); - circMask.background(0); - circMask.fill(255); - circMask.ellipse(this.avatar.width / 2, this.avatar.height / 2, this.width - this.border, this.height - this.border); - circMask.endDraw(); - this.avatar.mask(circMask.get()); - } - - /** - * Draw the user image - * ----------------------------------- - */ - void drawAvatar() { - if (this.avatar != null) { - imageMode(CENTER); - image(this.avatar, this.x, this.y); - } - } -} \ No newline at end of file diff --git a/examples/seneca/pimage/metamorphosis.jpg b/examples/seneca/pimage/metamorphosis.jpg deleted file mode 100644 index e70482edc..000000000 Binary files a/examples/seneca/pimage/metamorphosis.jpg and /dev/null differ diff --git a/examples/seneca/pimage/moon.jpg b/examples/seneca/pimage/moon.jpg deleted file mode 100644 index 5d99bd748..000000000 Binary files a/examples/seneca/pimage/moon.jpg and /dev/null differ diff --git a/examples/seneca/pimage/ocean.jpg b/examples/seneca/pimage/ocean.jpg deleted file mode 100644 index 242dc18df..000000000 Binary files a/examples/seneca/pimage/ocean.jpg and /dev/null differ diff --git a/examples/seneca/pimage/pimage.htm b/examples/seneca/pimage/pimage.htm deleted file mode 100644 index ad59cd843..000000000 --- a/examples/seneca/pimage/pimage.htm +++ /dev/null @@ -1,17 +0,0 @@ - - -
-
-size(200,200);
-background(0);
-PImage img = createImage(128, 128, ARGB);
-for (int i = 0; i < img.pixels.length; i++) {
-  img.pixels[i] = 13369446 + (i % img.width * 2 * 16777216);
-}
-image(img, 10, 10);
-for (int i = 0; i < img.pixels.length; i++) {
-  img.pixels[i] = 2064181 + (i % img.width * 2 * 16777216);
-}
-img.updatePixels();
-image(img, 62, 62);
-
diff --git a/examples/seneca/pimage/pimage.pjs b/examples/seneca/pimage/pimage.pjs deleted file mode 100644 index d11012b1c..000000000 --- a/examples/seneca/pimage/pimage.pjs +++ /dev/null @@ -1,12 +0,0 @@ -size(200,200); -background(0); -PImage img = createImage(128, 128, ARGB); -for (int i = 0; i < img.pixels.length; i++) { - img.pixels[i] = 13369446 + (i % img.width * 2 * 16777216); -} -image(img, 10, 10); -for (int i = 0; i < img.pixels.length; i++) { - img.pixels[i] = 2064181 + (i % img.width * 2 * 16777216); -} -img.updatePixels(); -image(img, 62, 62); diff --git a/examples/seneca/pimage/pimage0.htm b/examples/seneca/pimage/pimage0.htm deleted file mode 100644 index 800b5c88b..000000000 --- a/examples/seneca/pimage/pimage0.htm +++ /dev/null @@ -1,8 +0,0 @@ - - -
-PImage b = new PImage();
-println(b.width);
-println(b.height);
-println(b.format);
-
\ No newline at end of file diff --git a/examples/seneca/pimage/pimage0.pjs b/examples/seneca/pimage/pimage0.pjs deleted file mode 100644 index 87dd08624..000000000 --- a/examples/seneca/pimage/pimage0.pjs +++ /dev/null @@ -1,4 +0,0 @@ -PImage b = new PImage(); -println(b.width); -println(b.height); -println(b.format); \ No newline at end of file diff --git a/examples/seneca/pimage/pimage3d.htm b/examples/seneca/pimage/pimage3d.htm deleted file mode 100644 index dfa162227..000000000 --- a/examples/seneca/pimage/pimage3d.htm +++ /dev/null @@ -1,6 +0,0 @@ - - -
-
-
-
\ No newline at end of file diff --git a/examples/seneca/pimage/pimage3d.pjs b/examples/seneca/pimage/pimage3d.pjs deleted file mode 100644 index b18db1a13..000000000 --- a/examples/seneca/pimage/pimage3d.pjs +++ /dev/null @@ -1,22 +0,0 @@ -import processing.opengl.*; -PImage img; - -/* @pjs preload="berlin-1.jpg" */ - -void setup() { - size(640, 360, OPENGL); - img = loadImage("berlin-1.jpg"); - noStroke(); - img.get(0,0,10,10); -} - -void draw() { - translate(width / 2, height / 2); - beginShape(); - texture(img); - vertex(-100, -100, 0, 0, 0); - vertex(100, -100, 0, 400, 0); - vertex(100, 100, 0, 400, 400); - vertex(-100, 100, 0, 0, 400); - endShape(); -} diff --git a/examples/seneca/pimage/pimageblend.htm b/examples/seneca/pimage/pimageblend.htm deleted file mode 100644 index 1b9ac209c..000000000 --- a/examples/seneca/pimage/pimageblend.htm +++ /dev/null @@ -1,13 +0,0 @@ - -Blended in PJS using 2 pimages
- -
P5 expected output
-
-/* @pjs preload="country.jpg,lake.jpg"; */
-size(472,266);
-PImage img = loadImage("country.jpg");
-PImage img2 = loadImage("lake.jpg");
-// blend corner of lake onto country
-img.blend(img2, 272, 138, 200, 128, 272, 138, 200, 128, HARD_LIGHT);
-image(img, 0, 0);
-
\ No newline at end of file diff --git a/examples/seneca/pimage/pimageblend.pjs b/examples/seneca/pimage/pimageblend.pjs deleted file mode 100644 index dcd0bd5b8..000000000 --- a/examples/seneca/pimage/pimageblend.pjs +++ /dev/null @@ -1,7 +0,0 @@ -/* @pjs preload="country.jpg,lake.jpg"; */ -size(472,266); -PImage img = loadImage("country.jpg"); -PImage img2 = loadImage("lake.jpg"); -// blend corner of lake onto country -img.blend(img2, 272, 138, 200, 128, 272, 138, 200, 128, HARD_LIGHT); -image(img, 0, 0); \ No newline at end of file diff --git a/examples/seneca/pimage/pimageblendexpected.jpg b/examples/seneca/pimage/pimageblendexpected.jpg deleted file mode 100644 index eef32ba82..000000000 Binary files a/examples/seneca/pimage/pimageblendexpected.jpg and /dev/null differ diff --git a/examples/seneca/pimage/pimagecopy.htm b/examples/seneca/pimage/pimagecopy.htm deleted file mode 100644 index 1bac20421..000000000 --- a/examples/seneca/pimage/pimagecopy.htm +++ /dev/null @@ -1,12 +0,0 @@ - -Copied in PJS using 2 pimages
- -
-/* @pjs preload="country.jpg,lake.jpg"; */
-size(472,266);
-PImage img = loadImage("country.jpg");
-PImage img2 = loadImage("lake.jpg");
-// copy corner of lake onto country
-img.copy(img2, 272, 138, 200, 128, 272, 138, 200, 128);
-image(img, 0, 0);
-
\ No newline at end of file diff --git a/examples/seneca/pimage/pimagecopy.pjs b/examples/seneca/pimage/pimagecopy.pjs deleted file mode 100644 index ed770673f..000000000 --- a/examples/seneca/pimage/pimagecopy.pjs +++ /dev/null @@ -1,7 +0,0 @@ -/* @pjs preload="country.jpg,lake.jpg"; */ -size(472,266); -PImage img = loadImage("country.jpg"); -PImage img2 = loadImage("lake.jpg"); -// copy corner of lake onto country -img.copy(img2, 272, 138, 200, 128, 272, 138, 200, 128); -image(img, 0, 0); \ No newline at end of file diff --git a/examples/seneca/pimage/pimagefilter.htm b/examples/seneca/pimage/pimagefilter.htm deleted file mode 100644 index f4064df0c..000000000 --- a/examples/seneca/pimage/pimagefilter.htm +++ /dev/null @@ -1,55 +0,0 @@ - - -
-
-/* @pjs preload="ref_string.jpg"; */
-size(320,320);
-
-PImage a;
-a = loadImage("ref_string.jpg");
-a.filter(THRESHOLD);
-image(a, 0, 0);
-
-PImage b;
-b = loadImage("ref_string.jpg");
-b.filter(GRAY);
-image(b, 110, 0);
-
-PImage c;
-c = loadImage("ref_string.jpg");
-c.filter(INVERT);
-image(c, 220, 0);
-
-PImage d;
-d = loadImage("ref_string.jpg");
-d.filter(POSTERIZE, 4);
-image(d, 0, 110);
-
-PImage e;
-e = loadImage("ref_string.jpg");
-e.filter(DILATE);
-image(e, 110, 110);
-
-PImage f;
-f = loadImage("ref_string.jpg");
-f.filter(ERODE);
-image(f, 220, 110);
-
-PImage g;
-g = loadImage("ref_string.jpg");
-g.filter(OPAQUE);
-image(g, 0, 220);
-
-PImage h;
-h = loadImage("ref_string.jpg");
-h.filter(GRAY);
-h.filter(POSTERIZE, 6);
-image(h, 110, 220);
-
-PImage i;
-i = loadImage("ref_string.jpg");
-i.filter(BLUR, 3);
-image(i, 220, 220);
-
-println(millis());
-
\ No newline at end of file diff --git a/examples/seneca/pimage/pimagefilter.pjs b/examples/seneca/pimage/pimagefilter.pjs deleted file mode 100644 index bae8ba1b3..000000000 --- a/examples/seneca/pimage/pimagefilter.pjs +++ /dev/null @@ -1,50 +0,0 @@ -/* @pjs preload="ref_string.jpg"; */ -size(320,320); - -PImage a; -a = loadImage("ref_string.jpg"); -a.filter(THRESHOLD); -image(a, 0, 0); - -PImage b; -b = loadImage("ref_string.jpg"); -b.filter(GRAY); -image(b, 110, 0); - -PImage c; -c = loadImage("ref_string.jpg"); -c.filter(INVERT); -image(c, 220, 0); - -PImage d; -d = loadImage("ref_string.jpg"); -d.filter(POSTERIZE, 4); -image(d, 0, 110); - -PImage e; -e = loadImage("ref_string.jpg"); -e.filter(DILATE); -image(e, 110, 110); - -PImage f; -f = loadImage("ref_string.jpg"); -f.filter(ERODE); -image(f, 220, 110); - -PImage g; -g = loadImage("ref_string.jpg"); -g.filter(OPAQUE); -image(g, 0, 220); - -PImage h; -h = loadImage("ref_string.jpg"); -h.filter(GRAY); -h.filter(POSTERIZE, 6); -image(h, 110, 220); - -PImage i; -i = loadImage("ref_string.jpg"); -i.filter(BLUR, 3); -image(i, 220, 220); - -println(millis()); \ No newline at end of file diff --git a/examples/seneca/pimage/pimagemask.htm b/examples/seneca/pimage/pimagemask.htm deleted file mode 100644 index b08637d0d..000000000 --- a/examples/seneca/pimage/pimagemask.htm +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/examples/seneca/pimage/pimagemask.pjs b/examples/seneca/pimage/pimagemask.pjs deleted file mode 100644 index 9fb1e238a..000000000 --- a/examples/seneca/pimage/pimagemask.pjs +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Alpha Mask. - * - * Loads a "mask" for an image to specify the transparency - * in different parts of the image. The two images are blended - * together using the mask() method of PImage. - */ - -/* @pjs preload="test.jpg,mask.jpg"; */ -PImage img; -PImage maskImg; - -void setup() { - size(200, 200); - img = loadImage("test.jpg"); - maskImg = loadImage("mask.jpg"); - img.mask(maskImg); - imageMode(CENTER); -} - -void draw() { - background(map(mouseX+mouseY, 0, width+height, 0, 255)); - image(img, width/2, height/2); - image(img, mouseX, mouseY); -} diff --git a/examples/seneca/pimage/pimagepreloader.htm b/examples/seneca/pimage/pimagepreloader.htm deleted file mode 100644 index 7be7bd201..000000000 --- a/examples/seneca/pimage/pimagepreloader.htm +++ /dev/null @@ -1,8 +0,0 @@ - - -
-/* @pjs preload="metamorphosis.jpg" */
-size(472,266);
-PImage img = loadImage("metamorphosis.jpg");
-image(img,0,0);
-
\ No newline at end of file diff --git a/examples/seneca/pimage/pimagepreloader.pjs b/examples/seneca/pimage/pimagepreloader.pjs deleted file mode 100644 index c5d39203c..000000000 --- a/examples/seneca/pimage/pimagepreloader.pjs +++ /dev/null @@ -1,4 +0,0 @@ -/* @pjs preload="metamorphosis.jpg" */ -size(472,266); -PImage img = loadImage("metamorphosis.jpg"); -image(img,0,0); \ No newline at end of file diff --git a/examples/seneca/pimage/pimageset.htm b/examples/seneca/pimage/pimageset.htm deleted file mode 100644 index 0e9482056..000000000 --- a/examples/seneca/pimage/pimageset.htm +++ /dev/null @@ -1,32 +0,0 @@ - - -
-size(300,340);
-background(0);
-PImage pi = createImage(256,256,ARGB);
-int c = 255;
-float range = 1;
-for (int i = 0; i < pi.width; i++) {
-  for(int j = 0; j < pi.height; j++) {
-    pi.set(j, i, color(c-(range*j),c-(range*j),c));    
-  }
-  c--;
-  range = c/255;
-}
-stroke(255);
-rect(22,22,256,256);
-image(pi,22,22);
-
-PFont font;
-font = loadFont("Arial"); 
-textFont(font, 16);
-fill(255, 255, 255);
-text("Select a color", 22,316);
-
-void mouseClicked() {
-  color s = get(mouseX,mouseY);
-  fill(s);
-  stroke(255);
-  rect(220,300,58,20);
-}
-
\ No newline at end of file diff --git a/examples/seneca/pimage/pimageset.pjs b/examples/seneca/pimage/pimageset.pjs deleted file mode 100644 index 4a3ae54fa..000000000 --- a/examples/seneca/pimage/pimageset.pjs +++ /dev/null @@ -1,28 +0,0 @@ -size(300,340); -background(0); -PImage pi = createImage(256,256,ARGB); -int c = 255; -float range = 1; -for (int i = 0; i < pi.width; i++) { - for(int j = 0; j < pi.height; j++) { - pi.set(j, i, color(c-(range*j),c-(range*j),c)); - } - c--; - range = c/255; -} -stroke(255); -rect(22,22,256,256); -image(pi,22,22); - -PFont font; -font = loadFont("Arial"); -textFont(font, 16); -fill(255, 255, 255); -text("Select a color", 22,316); - -void mouseClicked() { - color s = get(mouseX,mouseY); - fill(s); - stroke(255); - rect(220,300,58,20); -} \ No newline at end of file diff --git a/examples/seneca/pimage/pixels.htm b/examples/seneca/pimage/pixels.htm deleted file mode 100644 index 9b83632fa..000000000 --- a/examples/seneca/pimage/pixels.htm +++ /dev/null @@ -1,5 +0,0 @@ - - -
-
-
\ No newline at end of file diff --git a/examples/seneca/pimage/pixels.pjs b/examples/seneca/pimage/pixels.pjs deleted file mode 100644 index 8a3d0af12..000000000 --- a/examples/seneca/pimage/pixels.pjs +++ /dev/null @@ -1,8 +0,0 @@ -size(100,100); -background(0); -color pink = color(255, 102, 204); -loadPixels(); -for (int i = 0; i < (width*height/2)-width/2; i++) { - pixels[i] = pink; -} -updatePixels(); \ No newline at end of file diff --git a/examples/seneca/pimage/red.jpg b/examples/seneca/pimage/red.jpg deleted file mode 100644 index 444b9bbe3..000000000 Binary files a/examples/seneca/pimage/red.jpg and /dev/null differ diff --git a/examples/seneca/pimage/ref_string.jpg b/examples/seneca/pimage/ref_string.jpg deleted file mode 100644 index 211a3e2c5..000000000 Binary files a/examples/seneca/pimage/ref_string.jpg and /dev/null differ diff --git a/examples/seneca/pimage/remoteimage.htm b/examples/seneca/pimage/remoteimage.htm deleted file mode 100644 index 554c79c59..000000000 --- a/examples/seneca/pimage/remoteimage.htm +++ /dev/null @@ -1,12 +0,0 @@ - - -
-/* @pjs preload="http://zenit.senecac.on.ca/wiki/skins/common/images/OSS_155x155.png"; */
-size(300,340);
-background(0);
-PImage cdot = loadImage("http://zenit.senecac.on.ca/wiki/skins/common/images/OSS_155x155.png");
-image(cdot,10,10);
-cdot.blend(cdot, 20, 20, 50, 50, 60, 60, 50, 50, DARKEST);
-cdot.resize(cdot.width/2,0);
-println("isRemote = " + cdot.isRemote);
-
diff --git a/examples/seneca/pimage/remoteimage.pjs b/examples/seneca/pimage/remoteimage.pjs deleted file mode 100644 index 8f3ca9c38..000000000 --- a/examples/seneca/pimage/remoteimage.pjs +++ /dev/null @@ -1,8 +0,0 @@ -/* @pjs preload="http://zenit.senecac.on.ca/wiki/skins/common/images/OSS_155x155.png"; */ -size(300,340); -background(0); -PImage cdot = loadImage("http://zenit.senecac.on.ca/wiki/skins/common/images/OSS_155x155.png"); -image(cdot,10,10); -cdot.blend(cdot, 20, 20, 50, 50, 60, 60, 50, 50, DARKEST); -cdot.resize(cdot.width/2,0); -println("isRemote = " + cdot.isRemote); \ No newline at end of file diff --git a/examples/seneca/pimage/requestimage.htm b/examples/seneca/pimage/requestimage.htm deleted file mode 100644 index 42980fd13..000000000 --- a/examples/seneca/pimage/requestimage.htm +++ /dev/null @@ -1,5 +0,0 @@ - -

- Processing.js requestimage example with large file async loading

- - diff --git a/examples/seneca/pimage/requestimage.pjs b/examples/seneca/pimage/requestimage.pjs deleted file mode 100644 index ac98b7408..000000000 --- a/examples/seneca/pimage/requestimage.pjs +++ /dev/null @@ -1,22 +0,0 @@ -PImage bigImage; - -void setup() { - frameRate(1); - bigImage = requestImage("ETapple.jpg"); - PFont font; - font = loadFont("Arial"); - textFont(font, 24); - fill(203, 21, 10); - text("Loading picture...", 500,300); -} - -void draw() { - if (bigImage.width == 0) { - // Image is not yet loaded - } else if (bigImage.width == -1) { - // This means an error occurred during image loading - } else { - // Image is ready to go, draw it - image(bigImage, 0, 0); - } -} \ No newline at end of file diff --git a/examples/seneca/pimage/resize.htm b/examples/seneca/pimage/resize.htm deleted file mode 100644 index e50e6bb10..000000000 --- a/examples/seneca/pimage/resize.htm +++ /dev/null @@ -1,12 +0,0 @@ - - -
-/* @pjs preload="ref_string.jpg" */
-size(300,200);
-PImage img = loadImage("ref_string.jpg");
-image(img,0,0);
-img.resize(50,0);
-image(img, 0, 110);
-img.resize(0, 150);
-image(img, 110, 0);
-
\ No newline at end of file diff --git a/examples/seneca/pimage/resize.pjs b/examples/seneca/pimage/resize.pjs deleted file mode 100644 index 9a8e4d0f1..000000000 --- a/examples/seneca/pimage/resize.pjs +++ /dev/null @@ -1,8 +0,0 @@ -/* @pjs preload="ref_string.jpg" */ -size(300,200); -PImage img = loadImage("ref_string.jpg"); -image(img,0,0); -img.resize(50,0); -image(img, 0, 110); -img.resize(0, 150); -image(img, 110, 0); \ No newline at end of file diff --git a/examples/seneca/pimage/resizeloop.htm b/examples/seneca/pimage/resizeloop.htm deleted file mode 100644 index f279857be..000000000 --- a/examples/seneca/pimage/resizeloop.htm +++ /dev/null @@ -1,40 +0,0 @@ - - -
-/* @pjs preload="ref_string.jpg" */
-void setup() {
-  size(200,200);
-  PFont font;
-  font = loadFont("Arial"); 
-  textFont(font, 14);
-  fill(32, 111, 175);
-}
-
-PImage img = loadImage("ref_string.jpg");
-int w = 100;
-int h = 100;
-bool up = true;
-
-void draw() {
-  img.resize(w, h);
-  background(255);
-  image(img, 0, 0);
-  text(int(FRAME_RATE) + "FPS", 10,15);
-  
-  if (w < 200 && up == true){
-    w++;
-    h++;
-  } else if (w >= 200) {
-    w = 199;
-    h = 199;
-    up = false;
-  } else if (w < 50) {
-    w = 50;
-    h = 50;
-    up = true;
-  } else if (w < 200 && up == false) {
-    w--;
-    h--;
-  } 
-}
-
\ No newline at end of file diff --git a/examples/seneca/pimage/resizeloop.pjs b/examples/seneca/pimage/resizeloop.pjs deleted file mode 100644 index 6c8a071f5..000000000 --- a/examples/seneca/pimage/resizeloop.pjs +++ /dev/null @@ -1,36 +0,0 @@ -/* @PJS preload="ref_string.jpg" */ -void setup() { - size(200,200); - PFont font; - font = loadFont("Arial"); - textFont(font, 14); - fill(32, 111, 175); -} - -PImage img = loadImage("ref_string.jpg"); -int w = 100; -int h = 100; -bool up = true; - -void draw() { - img.resize(w, h); - background(255); - image(img, 0, 0); - text(int(frameRate) + "FPS", 10,15); - - if (w < 200 && up == true){ - w++; - h++; - } else if (w >= 200) { - w = 199; - h = 199; - up = false; - } else if (w < 50) { - w = 50; - h = 50; - up = true; - } else if (w < 200 && up == false) { - w--; - h--; - } -} \ No newline at end of file diff --git a/examples/seneca/pimage/save.htm b/examples/seneca/pimage/save.htm deleted file mode 100644 index b7507dbba..000000000 --- a/examples/seneca/pimage/save.htm +++ /dev/null @@ -1,5 +0,0 @@ - - -
-
-
\ No newline at end of file diff --git a/examples/seneca/pimage/save.pjs b/examples/seneca/pimage/save.pjs deleted file mode 100644 index 69a08b657..000000000 --- a/examples/seneca/pimage/save.pjs +++ /dev/null @@ -1,34 +0,0 @@ -/* @pjs preload="string.jpg"; */ - -void setup(){ - size(600, 400); //for internal size variables - stroke(0); //all lines will be black - frameRate(1); - PFont font; - font = loadFont("Arial"); - textFont(font, 18); -} - -int prsd = 0; -PImage a; // Declare variable "a" of type PImage -a = loadImage("string.jpg"); // Load the images into the program - -void draw(){ //this method is called by processingjs at the above frame rate - background(0); //draw a black background - image(a, 50, 50); - fill(128); - rect(0,0,130,30); - rect(425,0,175,30); - fill(255); - text("SAVE CANVAS", 5,23); - text("SAVE ONLY IMAGE", 432,23); -} - -void mousePressed(){ - if(mouseY < 30 && mouseX < 130){ - save(); - } - if(mouseY < 30 && mouseX > 430){ - a.save(); - } -} \ No newline at end of file diff --git a/examples/seneca/pimage/screenana.png b/examples/seneca/pimage/screenana.png deleted file mode 100644 index b29a291d6..000000000 Binary files a/examples/seneca/pimage/screenana.png and /dev/null differ diff --git a/examples/seneca/pimage/set.htm b/examples/seneca/pimage/set.htm deleted file mode 100644 index 81eb4f152..000000000 --- a/examples/seneca/pimage/set.htm +++ /dev/null @@ -1,10 +0,0 @@ - - -
-for (int i = 30; i < width-15; i++) {
-  for(int j = 20; j < height-25; j++) {
-    color c = color(254-j, 193-i, 0);
-    set(i, j, c);
-  }
-}
-
\ No newline at end of file diff --git a/examples/seneca/pimage/set.pjs b/examples/seneca/pimage/set.pjs deleted file mode 100644 index be8670bad..000000000 --- a/examples/seneca/pimage/set.pjs +++ /dev/null @@ -1,6 +0,0 @@ -for (int i = 30; i < width-15; i++) { - for(int j = 20; j < height-25; j++) { - color c = color(254-j, 193-i, 0); - set(i, j, c); - } -} \ No newline at end of file diff --git a/examples/seneca/pimage/slideshow.css b/examples/seneca/pimage/slideshow.css deleted file mode 100644 index b1cc6994b..000000000 --- a/examples/seneca/pimage/slideshow.css +++ /dev/null @@ -1,21 +0,0 @@ -html, body -{ - margin: 0px; - font-family: Calibri, Cambria, Verdana; - font-size: 1.0em; - height: 100%; -} - -p -{ - margin-left: 10px; - margin-bottom:10px; - margin-top:10px; -} - -h1 -{ - font-family: Vivaldi; - font-size: 1.8em; - margin-left: 5px; -} \ No newline at end of file diff --git a/examples/seneca/pimage/slideshow.htm b/examples/seneca/pimage/slideshow.htm deleted file mode 100644 index d7fa49512..000000000 --- a/examples/seneca/pimage/slideshow.htm +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - -
-

- Processing.js slideshow using precaching

-

- Click on the images to advance to the next

- -
- - diff --git a/examples/seneca/pimage/slideshow.pjs b/examples/seneca/pimage/slideshow.pjs deleted file mode 100644 index 89452b37f..000000000 --- a/examples/seneca/pimage/slideshow.pjs +++ /dev/null @@ -1,25 +0,0 @@ -/* @pjs preload="metamorphosis.jpg,lake.jpg,moon.jpg,country.jpg,string.jpg,ocean.jpg,winter.jpg,castle.jpg"; */ -size(492,286); -background(0); -PImage[] slideshow = new PImage[8]; -slideshow[0] = loadImage("metamorphosis.jpg"); -slideshow[1] = loadImage("lake.jpg"); -slideshow[2] = loadImage("moon.jpg"); -slideshow[3] = loadImage("country.jpg"); -slideshow[4] = loadImage("string.jpg"); -slideshow[5] = loadImage("ocean.jpg"); -slideshow[6] = loadImage("winter.jpg"); -slideshow[7] = loadImage("castle.jpg"); -image(slideshow[0],10,10); -int i = 1; - -void mouseClicked() { - if(i < slideshow.length) { - image(slideshow[i],10,10); - i++; - } else { - i = 0; - image(slideshow[i],10,10); - i++; - } -} diff --git a/examples/seneca/pimage/spotlight.htm b/examples/seneca/pimage/spotlight.htm deleted file mode 100644 index c14cda7ed..000000000 --- a/examples/seneca/pimage/spotlight.htm +++ /dev/null @@ -1,4 +0,0 @@ - - -
-
\ No newline at end of file diff --git a/examples/seneca/pimage/spotlight.pjs b/examples/seneca/pimage/spotlight.pjs deleted file mode 100644 index 305e258fd..000000000 --- a/examples/seneca/pimage/spotlight.pjs +++ /dev/null @@ -1,44 +0,0 @@ -/* @pjs preload="ref_string.jpg"; */ - -PImage img; - -void setup() { - size(200, 200); - frameRate(30); - img = loadImage("ref_string.jpg"); - img.resize(200,200); - img.loadPixels(); - // Only need to load the pixels[] array once, because we're only - // manipulating pixels[] inside draw(), not drawing shapes. - loadPixels(); -} - -void draw() { - for (int x = 0; x < img.width; x++) { - for (int y = 0; y < img.height; y++ ) { - // Calculate the 1D location from a 2D grid - int loc = x + y*img.width; - // Get the R,G,B values from image - float r,g,b; - r = red (img.pixels[loc]); - //g = green (img.pixels[loc]); - //b = blue (img.pixels[loc]); - // Calculate an amount to change brightness based on proximity to the mouse - float maxdist = 50;//dist(0,0,width,height); - float d = dist(x,y,mouseX,mouseY); - float adjustbrightness = 255*(maxdist-d)/maxdist; - r += adjustbrightness; - //g += adjustbrightness; - //b += adjustbrightness; - // Constrain RGB to make sure they are within 0-255 color range - r = constrain(r,0,255); - //g = constrain(g,0,255); - //b = constrain(b,0,255); - // Make a new color and set pixel in the window - //color c = color(r,g,b); - color c = color(r); - pixels[y*width + x] = c; - } - } - updatePixels(); -} diff --git a/examples/seneca/pimage/string.jpg b/examples/seneca/pimage/string.jpg deleted file mode 100644 index 240fc2b39..000000000 Binary files a/examples/seneca/pimage/string.jpg and /dev/null differ diff --git a/examples/seneca/pimage/test.jpg b/examples/seneca/pimage/test.jpg deleted file mode 100644 index 04d3fc56d..000000000 Binary files a/examples/seneca/pimage/test.jpg and /dev/null differ diff --git a/examples/seneca/pimage/texture.gif b/examples/seneca/pimage/texture.gif deleted file mode 100644 index 37b7eb033..000000000 Binary files a/examples/seneca/pimage/texture.gif and /dev/null differ diff --git a/examples/seneca/pimage/thumbnail.htm b/examples/seneca/pimage/thumbnail.htm deleted file mode 100644 index 46cd3c2a8..000000000 --- a/examples/seneca/pimage/thumbnail.htm +++ /dev/null @@ -1,5 +0,0 @@ - - -
-
-
\ No newline at end of file diff --git a/examples/seneca/pimage/thumbnail.pjs b/examples/seneca/pimage/thumbnail.pjs deleted file mode 100644 index ec73b62b5..000000000 --- a/examples/seneca/pimage/thumbnail.pjs +++ /dev/null @@ -1,84 +0,0 @@ -// originally written by Matt Schoen -// http://www.pagefoundry.net/matt/jquery/imgcrop.php -// updated by Daniel Hodgin to use only Processing.js - -/* @pjs preload="castle.jpg"; */ - -color c = color(128,128,128,128); - -void setup(){ - size(600, 600); //for internal size variables - frameRate(30); //set our draw rate - stroke(0); //all lines will be black - PFont font; - font = loadFont("Arial"); - textFont(font, 18); - fill(c); //all filled rects will be 50% gray with 50% transparency -} - -int xoffset = 0; //temp variable while we're dragging the mouse -int yoffset = 0; -int xpos = 0; //where to draw the image -int ypos = 0; -int startx, starty; -int prsd = 0; -PImage a; // Declare variable "a" of type PImage -a = loadImage("castle.jpg"); // Load the images into the program -double s = 1.0; -double r = 1.0; - -void draw(){ //this method is called by processingjs at the above frame rate - background(0); //draw a black background - //for testing purposes, to figure out the scaling - scale(s); - image(a, xpos - xoffset, ypos - yoffset); //draw scaled image - scale(1/s); - //for whatever reason, using "scale(1.0);" didn't reset the scale here. I have no idea why... - //draw ghosting frame - noStroke(); //we don't want borders on these rects - rect(0,0,600,100); - rect(0,500,600,100); - rect(0,100,100,400); - rect(500,100,100,400); - //draw the "button" regions - line(0,570,100,570); - line(100,570,100,600); - line(50,570,50,600); - line(560, 0, 560, 30); - line(560, 30, 600, 30); - text("-", 20,589); - text("+", 70,589); - text("GO", 565,23); -} - -void mousePressed(){ - if(mouseY> 570){ - if(mouseX> 50 && mouseX < 100){ - s += .1; - } - else if(mouseX < 50){ - s -= .1; - } - } - if(mouseY <30 && mouseX> 560){ - PImage img = createImage(400,400); - img = get(100,100,400,400); - link(img.toDataURL()); - } - prsd = 1; - startx = mouseX; - starty = mouseY; -} -void mouseDragged(){ - if(prsd> 0){ - xoffset = startx - mouseX; - yoffset = starty - mouseY; - } -} -void mouseReleased(){ - prsd = 0; - xpos -= xoffset; - ypos -= yoffset; - xoffset = 0; - yoffset = 0; -} diff --git a/examples/seneca/pimage/winter.jpg b/examples/seneca/pimage/winter.jpg deleted file mode 100644 index ff3533d50..000000000 Binary files a/examples/seneca/pimage/winter.jpg and /dev/null differ diff --git a/examples/seneca/pimage/wormhole.htm b/examples/seneca/pimage/wormhole.htm deleted file mode 100644 index 46d6112aa..000000000 --- a/examples/seneca/pimage/wormhole.htm +++ /dev/null @@ -1,5 +0,0 @@ - - -
-
-
\ No newline at end of file diff --git a/examples/seneca/pimage/wormhole.pjs b/examples/seneca/pimage/wormhole.pjs deleted file mode 100644 index 84bb079a0..000000000 --- a/examples/seneca/pimage/wormhole.pjs +++ /dev/null @@ -1,58 +0,0 @@ -/* @pjs preload="wormhole.png,texture.gif"; */ -PImage wormImg, wormTexture; -int[] reg = new int[15]; - -void setup() { - size(640, 360); - noSmooth(); - - // Reference image used to transpose texture - wormImg = loadImage("wormhole.png"); - wormImg.resize(width, height); - wormImg.loadPixels(); - - // Texture image array - wormTexture = loadImage("texture.gif"); - wormTexture.loadPixels(); -} - -// Moves the bottom row of pixels to the top and shifting remaining pixels 1 over -void shiftup() { - for (int k = 0; k < 15; k++) { - reg[k] = wormTexture.pixels[k]; - } - - for (int k = 15; k < 225; k++) { - wormTexture.pixels[k-15] = wormTexture.pixels[k]; - } - for (int k = 0; k < 15; k++) { - wormTexture.pixels[k+210] = reg[k]; - } -} - -// Moves left column of pixels to the right and shifting remaining pixels 1 over -void shiftright() { - for(int k = 0; k < 15; k++) { - reg[k] = wormTexture.pixels[15*k+14]; - for(int i = 14;i > 0; i--) { - wormTexture.pixels[15*k+i] = wormTexture.pixels[15*k+(i-1)]; - } - wormTexture.pixels[15*k] = reg[k]; - } -} - -void draw() { - // Load pixel data array - loadPixels(); - - // Loop through all pixels - for (int i = 0; i < pixels.length; i++){ - // Map texture to wormhole in a bit shift blue - pixels[i] = wormTexture.pixels[constrain(wormImg.pixels[i] & 0xFF, 0, 224)]; - } - - updatePixels(); - - shiftright(); - shiftup(); -} \ No newline at end of file diff --git a/examples/seneca/pimage/wormhole.png b/examples/seneca/pimage/wormhole.png deleted file mode 100644 index e9f78ac3a..000000000 Binary files a/examples/seneca/pimage/wormhole.png and /dev/null differ diff --git a/examples/seneca/point/demos/corban/point-3d.html b/examples/seneca/point/demos/corban/point-3d.html deleted file mode 100644 index 4e91e9dd8..000000000 --- a/examples/seneca/point/demos/corban/point-3d.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/examples/seneca/point/demos/corban/point-3d.pjs b/examples/seneca/point/demos/corban/point-3d.pjs deleted file mode 100644 index 632e51528..000000000 --- a/examples/seneca/point/demos/corban/point-3d.pjs +++ /dev/null @@ -1,88 +0,0 @@ -PVector loc; -PVector g = new PVector(0, 0.5); -ArrayList balls; - -int d = 10; - -class Ball { - int index; - PVector loc = new PVector(); - PVector vel = new PVector(); - PVector acc = new PVector(); - float bounceAcc; - - Ball(int index, float x, float y, float z) { - this.index = index; - loc.x = x; - loc.y = y; - loc.z = z; - } - - void render() { - if ( this.vel.y >= (height - d/2 - this.loc.y) ) { - bounceAcc = this.vel.y; - this.vel.y = height - d/2 - this.loc.y; - } else { - this.addAcc(g); - } - - this.loc.add(this.vel); - - stroke(round((float)(Math.sin(frameCount/30f) + 1) * 128), round((float)(Math.cos(frameCount/40f) + 1) * 128) + index, round((float)(Math.cos(frameCount/30f) + 1) * 128) + index/2); - - if ( this.loc.y >= height - d/2 ) { - this.vel = new PVector(); - this.addAcc(new PVector(0, -bounceAcc)); - } - } - - void addAcc(PVector v) { - this.acc.add(v); - this.vel.add(this.acc); - this.acc = new PVector(); - } -} - -Ball ball; - -int ballTotal = 25; - -float thetaInc = TWO_PI / ballTotal; -float t = 0f; -float x = 0f; -float z = 0f; - -float radius; - -void setup() { - size(600, 400, OPENGL); - - stroke(255); - - balls = new ArrayList(); - smooth(); - - radius = width; -} - -void draw() { - background(0); - camera(0, 0, 1200, 0, 0, 0, 0, 1, 0); - - if ( frameCount % 2 == 0 && balls.size() < ballTotal * 5 ) { - x = radius * (float) Math.cos(t); - z = radius * (float) Math.sin(t); - t += thetaInc; - - radius -= 2; - - balls.add(new Ball(balls.size()+1, x, -300, z)); - } - - for ( int i = balls.size()-1; i >= 0; i-- ) { - Ball ball = (Ball) balls.get(i); - - point(ball.loc.x, ball.loc.y, ball.loc.z); - ball.render(); - } -} diff --git a/examples/seneca/point/demos/psys/psys.html b/examples/seneca/point/demos/psys/psys.html deleted file mode 100644 index 350f7b3b2..000000000 --- a/examples/seneca/point/demos/psys/psys.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/examples/seneca/point/demos/psys/psys.pjs b/examples/seneca/point/demos/psys/psys.pjs deleted file mode 100644 index adffae845..000000000 --- a/examples/seneca/point/demos/psys/psys.pjs +++ /dev/null @@ -1,123 +0,0 @@ -import processing.opengl.*; - -class Particle{ - float xPos, yPos, zPos; - float xVel, yVel, zVel; - float age; - float lifeTime; - float opacity; - float size; - - Particle(){ - xPos = 0; - yPos = 0; - zPos = 0; - xVel = 1.4; - yVel = 1.2; - zVel = 2.0; - age = 0; - lifeTime = 0; - opacity = 255; - size = 20; - } - - float getAge(){return age;} - float getLifeTime(){return lifeTime;} - float getX(){return xPos;} - float getY(){return yPos;} - float getZ(){return zPos;} - - void setAge(float a){age = a;} - - void setX(float x){xPos = x;} - void setY(float y){yPos = y;} - void setZ(float z){zPos = z;} - - void setXVelocity(float x){xVel = x;} - void setYVelocity(float y){yVel = y;} - void setZVelocity(float z){zVel = z;} - - void setLifeTime(float l){lifeTime = l;} - - void reset(){ - opacity = 255; - size = 20; - } - - void update(){ - age += 0.1; //fix - - yVel += 0.1; - - xPos += xVel; - yPos += yVel; - zPos += zVel; - - opacity = 255 - 250*(age/lifeTime); - size = 20 - 20*(age/lifeTime); - } - - void draw(){ - strokeWeight(size); - stroke(opacity-50, 0, 255-opacity,opacity/3); - point(xPos,yPos,zPos); - } -} - -int NUM_PARTICLES = 500; - -class ParticleSystem{ - ArrayList p; - - ParticleSystem(){ - p = new ArrayList(); - for(int i = 0; i < NUM_PARTICLES; i++){ - Particle particle = new Particle(); - p.add(particle); - resetParticle(i); - } - } - - void resetParticle(int i){ - Particle particle = (Particle)p.get(i); - particle.reset(); - particle.setX(mouseX); - particle.setY(mouseY); - particle.setZ(0); - particle.setXVelocity(random(0,2)); - particle.setYVelocity(random(0,2)); - particle.setLifeTime(random(1,15)); - particle.setAge(0); - } - - void update(){ - for(int i=0; i < NUM_PARTICLES; i++){ - Particle particle = (Particle)p.get(i); - particle.update(); - if(particle.getAge() > particle.getLifeTime()){ - resetParticle(i); - } - } - } - - void draw(){ - for(int i=0; i < NUM_PARTICLES; i++){ - Particle particle = (Particle)p.get(i); - particle.draw(); - } - } -} - -ParticleSystem psys; - -void setup(){ - size(500,500,OPENGL); - psys = new ParticleSystem(); -} - -void draw(){ - background(0); - stroke(255); - psys.update(); - psys.draw(); -} diff --git a/examples/seneca/point/demos/spiral/spiral.html b/examples/seneca/point/demos/spiral/spiral.html deleted file mode 100644 index b70ac463c..000000000 --- a/examples/seneca/point/demos/spiral/spiral.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - -

Andor Salga

-

Spiral Demo

- -

- -

- -
-// Test by Andor Salga
-import processing.opengl.*;
-
-float r = 0;
-
-void setup(){
-  size(200,200,OPENGL);
-}
-
-void draw(){
-  background(0);
-  
-  translate(width/2, height/2, 0);
-  pushMatrix();
-  rotateZ(r+=0.05);
-  
-  float f=50;
-
-  for(int i=0; i < 100; i++, f-= 0.5){
-    strokeWeight(i/8);
-    stroke(200,100,50, 250-i);
-    point(sin(i)* f * 2, cos(i)*f*2, 0);
-  }
-  popMatrix();
-
-  pushMatrix();
-  rotateZ(-r);
-  f=50;
-
-  for(int i=0; i < 100; i++, f-= 0.5){
-    strokeWeight(i/8);
-    stroke(50,100,200, 250-i);
-    point(cos(i)*f*2, sin(i)* f * 2, 0);
-  }
-  popMatrix();
-}
- - - diff --git a/examples/seneca/point/demos/spiral/spiral.pjs b/examples/seneca/point/demos/spiral/spiral.pjs deleted file mode 100644 index e7fec2b63..000000000 --- a/examples/seneca/point/demos/spiral/spiral.pjs +++ /dev/null @@ -1,35 +0,0 @@ -import processing.opengl.*; - -float r = 0; - -void setup(){ - size(200,200,OPENGL); -} - -void draw(){ - background(0); - - translate(width/2, height/2, 0); - pushMatrix(); - rotateZ(r+=0.05); - - float f=50; - - for(int i=0; i < 100; i++, f-= 0.5){ - strokeWeight(i/8); - stroke(250, 200, 50, 100-i); - point(sin(i)* f * 2, cos(i)*f*2, 0); - } - popMatrix(); - - pushMatrix(); - rotateZ(-r); - f=50; - - for(int i=0; i < 100; i++, f-= 0.5){ - strokeWeight(i/8); - stroke(50,100,200, 200-i); - point(cos(i)*f*2, sin(i)* f * 2, 0); - } - popMatrix(); -} \ No newline at end of file diff --git a/examples/seneca/printMatrix/print2DMatrixTest.html b/examples/seneca/printMatrix/print2DMatrixTest.html deleted file mode 100644 index 25f536f14..000000000 --- a/examples/seneca/printMatrix/print2DMatrixTest.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - Processing.js test of printMatrix() and print() for PMatrix2D - - - - -
Processing.js test of printMatrix() and print() for PMatrix2D
-

- - -

Test written by Matthew Lam

-

-		
-	
-
\ No newline at end of file
diff --git a/examples/seneca/printMatrix/print3DMatrixTest.html b/examples/seneca/printMatrix/print3DMatrixTest.html
deleted file mode 100644
index 412599447..000000000
--- a/examples/seneca/printMatrix/print3DMatrixTest.html
+++ /dev/null
@@ -1,75 +0,0 @@
- 
-
-	
-		Processing.js test of printMatrix() and print() for PMatrix3D
-		
-		
-	
-	
-		
Processing.js test of printMatrix() and print() for PMatrix3D
-

- - -

Test written by Matthew Lam

-

-		
-	
-
\ No newline at end of file
diff --git a/examples/seneca/processingInstances/instance1.pjs b/examples/seneca/processingInstances/instance1.pjs
deleted file mode 100644
index 6d64cc9d9..000000000
--- a/examples/seneca/processingInstances/instance1.pjs
+++ /dev/null
@@ -1,12 +0,0 @@
-// 	Processing.js Example
-
-void setup() {
-  size(200, 200);
-}
-
-void draw() {
-  background(#00ffff);
-  ellipse(mouseX, mouseY, 55, 55);
-  ellipse(Processing.instances[1].mouseX, Processing.instances[1].mouseY, 55, 55);
-}
-
diff --git a/examples/seneca/processingInstances/instance2.pjs b/examples/seneca/processingInstances/instance2.pjs
deleted file mode 100644
index f1f5e01bb..000000000
--- a/examples/seneca/processingInstances/instance2.pjs
+++ /dev/null
@@ -1,12 +0,0 @@
-// 	Processing.js Example
-
-void setup() {
-  size(200, 200);
-}
-
-void draw() {
-  background(#00ff00);
-  ellipse(mouseX, mouseY, 55, 55);
-  ellipse(Processing.getInstanceById("blue").mouseX, Processing.getInstanceById("blue").mouseY, 55, 55);
-}
-
diff --git a/examples/seneca/processingInstances/instances.html b/examples/seneca/processingInstances/instances.html
deleted file mode 100644
index c7f8eaaca..000000000
--- a/examples/seneca/processingInstances/instances.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/examples/seneca/rect/demos/bird demo/bird.html b/examples/seneca/rect/demos/bird demo/bird.html
deleted file mode 100644
index 925553627..000000000
--- a/examples/seneca/rect/demos/bird demo/bird.html	
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-  
-    
-    
-   
-
-   
-    

Andor Salga

-

Bird demo for rect 3D

- -

This page demonstrates the Pjs rect() function.
-
-

- -

- -

- -
// Example from Processing.org
-    
-import processing.opengl.*;
-
-float ang = 0, ang2 = 0, ang3 = 0, ang4 = 0;
-float px = 0, py = 0, pz = 0;
-float flapSpeed = 0.2;
-
-void setup(){
-  size(640,360,OPENGL);
-  noStroke();
-}
-
-void draw(){
-  background(0);
-  camera();
-  lights();
-
-  // Flight
-  px = sin(radians(ang3)) * 170;
-  py = cos(radians(ang3)) * 300;
-  pz = sin(radians(ang4)) * 500;
-  translate(width/2 + px, height/2 + py, -700+pz);
-  rotateX(sin(radians(ang2)) * 120);
-  rotateY(sin(radians(ang2)) * 50);
-  rotateZ(sin(radians(ang2)) * 65);
-  
-  // Body
-  fill(153);
-  box(20, 100, 20);
-  
-  // Left wing
-  fill(204);
-  pushMatrix();
-  rotateY(sin(radians(ang)) * -20);
-  rect(-75, -50, 75, 100);
-  popMatrix();
-
-  // Right wing
-  pushMatrix();
-  rotateY(sin(radians(ang)) * 20);
-  rect(0, -50, 75, 100);
-  popMatrix();
-
-  // Wing flap
-  ang += flapSpeed;
-  if (ang > 3) {
-    flapSpeed *= -1;
-  } 
-  if (ang < -3) {
-    flapSpeed *= -1;
-  }
-
-  // Increment angles
-  ang2 += 0.01;
-  ang3 += 2.0;
-  ang4 += 0.75;
-}
- - - diff --git a/examples/seneca/rect/demos/bird demo/bird.pjs b/examples/seneca/rect/demos/bird demo/bird.pjs deleted file mode 100644 index 92cb6b03e..000000000 --- a/examples/seneca/rect/demos/bird demo/bird.pjs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Example from Processing.org -// - -import processing.opengl.*; - -float ang = 0, ang2 = 0, ang3 = 0, ang4 = 0; -float px = 0, py = 0, pz = 0; -float flapSpeed = 0.2; - -void setup(){ - size(640,360,OPENGL); - noStroke(); -} - -void draw(){ - background(0); - camera(); - lights(); - - // Flight - px = sin(radians(ang3)) * 170; - py = cos(radians(ang3)) * 300; - pz = sin(radians(ang4)) * 500; - translate(width/2 + px, height/2 + py, -700+pz); - rotateX(sin(radians(ang2)) * 120); - rotateY(sin(radians(ang2)) * 50); - rotateZ(sin(radians(ang2)) * 65); - - // Body - fill(153); - box(20, 100, 20); - - - // Left wing - fill(204); - pushMatrix(); - rotateY(sin(radians(ang)) * -20); - rect(-75, -50, 75, 100); - popMatrix(); - - // Right wing - pushMatrix(); - rotateY(sin(radians(ang)) * 20); - rect(0, -50, 75, 100); - popMatrix(); - - // Wing flap - ang += flapSpeed; - if (ang > 3) { - flapSpeed *= -1; - } - if (ang < -3) { - flapSpeed *= -1; - } - - // Increment angles - ang2 += 0.01; - ang3 += 2.0; - ang4 += 0.75; -} diff --git a/examples/seneca/rect/demos/birds demo/birds.html b/examples/seneca/rect/demos/birds demo/birds.html deleted file mode 100644 index 6ee3f90e8..000000000 --- a/examples/seneca/rect/demos/birds demo/birds.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - -

Andor Salga

-

Birds demo

- -

This page demonstrates the Pjs rect() function.
-
-

- -

- -

- -
// Birds from Processing.org
-
-// Flock array
-int birdCount = 200;
-Bird[]birds = new Bird[birdCount];
-float[]x = new float[birdCount];
-float[]y = new float[birdCount];
-float[]z = new float[birdCount];
-float[]rx = new float[birdCount];
-float[]ry = new float[birdCount];
-float[]rz = new float[birdCount];
-float[]spd = new float[birdCount];
-float[]rot = new float[birdCount];
-
-void setup() {
-  size(640, 360, P3D);
-  noStroke();
-
-  // Initialize arrays with random values
-  for (int i = 0; i < birdCount; i++){
-    birds[i] = new Bird(random(-300, 300), random(-300, 300), 
-               random(-500, -2500), random(5, 30), random(5, 30)); 
-
-    x[i] = random(20, 340);
-    y[i] = random(30, 350);
-    z[i] = random(1000, 4800);
-    rx[i] = random(-160, 160);
-    ry[i] = random(-55, 55);
-    rz[i] = random(-20, 20);
-    spd[i] = random(.1, 3.75);
-    rot[i] = random(.025, .15);
-  }
-}
-
-void draw() {
-  background(0);
-  lights();
-  for (int i = 0; i < birdCount; i++){
-    birds[i].setFlight(x[i], y[i], z[i], rx[i], ry[i], rz[i]);
-    birds[i].setWingSpeed(spd[i]);
-    birds[i].setRotSpeed(rot[i]);
-    birds[i].fly();
-  }
-}
-
-class Bird {
-  
-  // Properties
-  float offsetX, offsetY, offsetZ;
-  float w, h;
-  int bodyFill;
-  int wingFill;
-  float ang = 0, ang2 = 0, ang3 = 0, ang4 = 0;
-  float radiusX = 120, radiusY = 200, radiusZ = 700;
-  float rotX = 15, rotY = 10, rotZ = 5;
-  float flapSpeed = 0.4;
-  float rotSpeed = 0.1;
-
-  // Constructors
-  Bird(){
-    (0, 0, 0, 60, 80);
-  }
-
-  Bird(float offsetX, float offsetY, float offsetZ, 
-  float w, float h){
-    this.offsetX = offsetX;
-    this.offsetY = offsetY;
-    this.offsetZ = offsetZ;
-    this.h = h;
-    this.w = w;
-    bodyFill = color(153);
-    wingFill = color(204);
-  }
-
-  void setFlight(float radiusX, float radiusY, float radiusZ, float rotX, float rotY, float rotZ){
-    this.radiusX = radiusX;
-    this.radiusY = radiusY;
-    this.radiusZ = radiusZ;
-
-    this.rotX = rotX;
-    this.rotY = rotY;
-    this.rotZ = rotZ;
-  }
-
-  void setWingSpeed(float flapSpeed){
-    this.flapSpeed = flapSpeed;
-  }
-
-  void setRotSpeed(float rotSpeed){
-    this.rotSpeed = rotSpeed;
-  }
-
-  void fly() {
-    pushMatrix();
-    float px, py, pz;
-    
-    // Flight
-    px = sin(radians(ang3)) * radiusX;
-    py = cos(radians(ang3)) * radiusY;
-    pz = sin(radians(ang4)) * radiusZ;
-    
-    translate(width/2 + offsetX + px, height/2 + offsetY+py, -700 + offsetZ+pz);
-
-    rotateX(sin(radians(ang2)) * rotX);
-    rotateY(sin(radians(ang2)) * rotY);
-    rotateZ(sin(radians(ang2)) * rotZ);
-
-    // Body
-    fill(bodyFill);
-    box(w/5, h, w/5);
-
-    // Left wing
-    fill(wingFill);
-    pushMatrix();
-    rotateY(sin(radians(ang)) * 20);
-    rect(0, -h/2, w, h);
-    popMatrix();
-
-    // Right wing
-    pushMatrix();
-    rotateY(sin(radians(ang)) * -20);
-    rect(-w, -h/2, w, h);
-    popMatrix();
-
-    // Wing flap
-    ang += flapSpeed;
-    if (ang > 3) {
-      flapSpeed*=-1;
-    } 
-    if (ang < -3) {
-      flapSpeed*=-1;
-    }
-
-    // Ang's run trig functions
-    ang2 += rotSpeed;
-    ang3 += 1.25;
-    ang4 += 0.55;
-    popMatrix();
-  }
-}
- - - diff --git a/examples/seneca/rect/demos/birds demo/birds.pjs b/examples/seneca/rect/demos/birds demo/birds.pjs deleted file mode 100644 index c19d18daa..000000000 --- a/examples/seneca/rect/demos/birds demo/birds.pjs +++ /dev/null @@ -1,146 +0,0 @@ -// -// Birds from Processing.org -// - -// Flock array -int birdCount = 200; -Bird[]birds = new Bird[birdCount]; -float[]x = new float[birdCount]; -float[]y = new float[birdCount]; -float[]z = new float[birdCount]; -float[]rx = new float[birdCount]; -float[]ry = new float[birdCount]; -float[]rz = new float[birdCount]; -float[]spd = new float[birdCount]; -float[]rot = new float[birdCount]; - -void setup() { - size(640, 360, P3D); - noStroke(); - - // Initialize arrays with random values - for (int i = 0; i < birdCount; i++){ - birds[i] = new Bird(random(-300, 300), random(-300, 300), - random(-500, -2500), random(5, 30), random(5, 30)); - - x[i] = random(20, 340); - y[i] = random(30, 350); - z[i] = random(1000, 4800); - rx[i] = random(-160, 160); - ry[i] = random(-55, 55); - rz[i] = random(-20, 20); - spd[i] = random(.1, 3.75); - rot[i] = random(.025, .15); - } -} - -void draw() { - background(0); - lights(); - for (int i = 0; i < birdCount; i++){ - birds[i].setFlight(x[i], y[i], z[i], rx[i], ry[i], rz[i]); - birds[i].setWingSpeed(spd[i]); - birds[i].setRotSpeed(rot[i]); - birds[i].fly(); - } -} - - - - - -class Bird { - - // Properties - float offsetX, offsetY, offsetZ; - float w, h; - int bodyFill; - int wingFill; - float ang = 0, ang2 = 0, ang3 = 0, ang4 = 0; - float radiusX = 120, radiusY = 200, radiusZ = 700; - float rotX = 15, rotY = 10, rotZ = 5; - float flapSpeed = 0.4; - float rotSpeed = 0.1; - - // Constructors -// Bird(){ - // (0, 0, 0, 60, 80); - // } - - Bird(float offsetX, float offsetY, float offsetZ, - float w, float h){ - this.offsetX = offsetX; - this.offsetY = offsetY; - this.offsetZ = offsetZ; - this.h = h; - this.w = w; - bodyFill = color(153); - wingFill = color(204); - } - - void setFlight(float radiusX, float radiusY, float radiusZ, float rotX, float rotY, float rotZ){ - this.radiusX = radiusX; - this.radiusY = radiusY; - this.radiusZ = radiusZ; - - this.rotX = rotX; - this.rotY = rotY; - this.rotZ = rotZ; - } - - void setWingSpeed(float flapSpeed){ - this.flapSpeed = flapSpeed; - } - - void setRotSpeed(float rotSpeed){ - this.rotSpeed = rotSpeed; - } - - void fly() { - pushMatrix(); - float px, py, pz; - - // Flight - px = sin(radians(ang3)) * radiusX; - py = cos(radians(ang3)) * radiusY; - pz = sin(radians(ang4)) * radiusZ; - - translate(width/2 + offsetX + px, height/2 + offsetY+py, -700 + offsetZ+pz); - - rotateX(sin(radians(ang2)) * rotX); - rotateY(sin(radians(ang2)) * rotY); - rotateZ(sin(radians(ang2)) * rotZ); - - // Body - fill(bodyFill); - box(w/5, h, w/5); - - // Left wing - fill(wingFill); - pushMatrix(); - rotateY(sin(radians(ang)) * 20); - rect(0, -h/2, w, h); - popMatrix(); - - // Right wing - pushMatrix(); - rotateY(sin(radians(ang)) * -20); - rect(-w, -h/2, w, h); - popMatrix(); - - // Wing flap - ang += flapSpeed; - if (ang > 3) { - flapSpeed*=-1; - } - if (ang < -3) { - flapSpeed*=-1; - } - - // Ang's run trig functions - ang2 += rotSpeed; - ang3 += 1.25; - ang4 += 0.55; - popMatrix(); - } -} diff --git a/examples/seneca/rect/demos/blinds/blinds.html b/examples/seneca/rect/demos/blinds/blinds.html deleted file mode 100644 index 4aefc54af..000000000 --- a/examples/seneca/rect/demos/blinds/blinds.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - -

Andor Salga

-

Blinds demo

- -

This page demonstrates the Pjs rect() function.

- -

- -

- -
// Demo by Andor Salga
-import processing.opengl.*;
-
-int frame = 0;
-float[] list = new float[20];
-float g = 0;
-float w = 10;
-
-// larger is higher
-float windSpeed = 1;
-float windStr = 190;
-float varyance = 1.5;
-
-void setup(){
-  size(400,400, OPENGL);
-  r();
-}
-
-void r(){
-  for(int i=0; i < 20; i++){
-    list[i] += random(-varyance, varyance);
-  }
-}
-
-void draw(){
-
-background(240);
-translate(10, 20, 0);
-
-pushMatrix();
-fill(140,120,0);
-
-translate(50,90,-90);
-scale(4,4,4);
-rotateX(-0.4);
-
-box(20,1,20);// seat
-
-pushMatrix();
-translate(8,10,8);
-box(2,20,2); 
-popMatrix();
-
-pushMatrix();
-translate(-8,10,-8);
-box(2,20,2); 
-popMatrix();
-
-pushMatrix();
-translate(8,10,-8);
-box(2,20,2); 
-popMatrix();
-
-pushMatrix();
-translate(-8,10,8);
-box(2,20,2); 
-popMatrix();
-
-popMatrix();
-
-pushMatrix();
-translate(50,20,-40);
-fill(0,0,255,30);
-
-popMatrix();
-
-pushMatrix();
-translate(width/2, 30+height/2, 90);
-pointLight(50, 150, 0, 0, 0 ,0);
-popMatrix();
-
-stroke(0);
-strokeWeight(1);
-
-
-directionalLight(200,50,0, 0,0, -1);
-
-for(int i = 0; i < 20; i++){
-  rotateX(sin(frameCount/50)/windStr);
-  pushMatrix();
-
-  int li = (int)list[i];
-
-  rotateX(sin((frameCount + li)/20)/30);
-  fill(128,120,128,150);
-  rect(i*10, 10, 10, 190);
-  popMatrix();
-}
-
-if(frame%2000 == 0){
-  r();
-  g+=random(-1,1);
-  w +=random(-2,2);
-}
-
-if(frame%300 == 0){
-  windStr += random(-1,1);
-}
-}
- - - diff --git a/examples/seneca/rect/demos/blinds/blinds.pjs b/examples/seneca/rect/demos/blinds/blinds.pjs deleted file mode 100644 index 1b3abbb55..000000000 --- a/examples/seneca/rect/demos/blinds/blinds.pjs +++ /dev/null @@ -1,98 +0,0 @@ -import processing.opengl.*; - -int frame = 0; -float[] list = new float[20]; -float g = 0; -float w = 10; - -// larger is higher -float windSpeed = 1; -float windStr = 190; -float varyance = 1.5; - -void setup(){ - size(400,240, OPENGL); - r(); -} - -void r(){ - for(int i=0; i < 20; i++){ - list[i] += random(-varyance, varyance); - } -} - -void draw(){ - -background(240); -translate(10, 20, 0); - -pushMatrix(); -fill(140,120,0); - -translate(50,90,-90); -scale(4,4,4); -rotateX(-0.4); - -box(20,1,20);// seat - -pushMatrix(); -translate(8,10,8); -box(2,20,2); -popMatrix(); - -pushMatrix(); -translate(-8,10,-8); -box(2,20,2); -popMatrix(); - -pushMatrix(); -translate(8,10,-8); -box(2,20,2); -popMatrix(); - -pushMatrix(); -translate(-8,10,8); -box(2,20,2); -popMatrix(); - -popMatrix(); - -pushMatrix(); -translate(50,20,-40); -fill(0,0,255,30); - -popMatrix(); - -pushMatrix(); -translate(width/2, 30+height/2, 90); -pointLight(50, 150, 0, 0, 0 ,0); -popMatrix(); - -stroke(0); -strokeWeight(1); - - -directionalLight(200,50,0, 0,0, -1); - -for(int i = 0; i < 20; i++){ - rotateX(sin(frameCount/50)/windStr); - pushMatrix(); - - int li = (int)list[i]; - - rotateX(sin((frameCount + li)/20)/30); - fill(128,120,128,150); - rect(i*10, 10, 10, 190); - popMatrix(); -} - -if(frame%2000 == 0){ - r(); - g+=random(-1,1); - w +=random(-2,2); -} - -if(frame%300 == 0){ - windStr += random(-1,1); -} -} diff --git a/examples/seneca/rect/tests/test1/p5_result.jpg b/examples/seneca/rect/tests/test1/p5_result.jpg deleted file mode 100644 index 57dbbf8c0..000000000 Binary files a/examples/seneca/rect/tests/test1/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/rect/tests/test1/rect.html b/examples/seneca/rect/tests/test1/rect.html deleted file mode 100644 index 4fa261760..000000000 --- a/examples/seneca/rect/tests/test1/rect.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for rect() 3D in Pjs

- - -

- - -

- -
// Test by Andor Salga
-import processing.opengl.*;
-
-void setup()
-{
-  size(400, 400, OPENGL);
-
-  noLights();
-  rect(10, 10, 50, 50);
-
-  noStroke();
-  rect(70, 10, 50, 50);
-
-  stroke(255, 0, 0);
-  rect(130, 10, 50, 50);
-
-  noFill();
-  rect(190, 10, 50, 50);
-
-  stroke(0);
-  fill(0, 255, 0);
-  rect(250, 10, 50, 50);
-
-  stroke(0);
-  fill(0, 255, 0);
-  rect(250, 10, 50, 50);
-  
-  fill(255, 255, 255);
-  rect(310, 10, 50, 50);
-
-  strokeWeight(1);
-  pushMatrix();
-  rotateZ(PI/4);
-  fill(0, 0, 0);
-  rect(310, 20, 50, 50);
-  popMatrix();
-
-  fill(255,255,0);
-  strokeWeight(3);
-  rect(10, 70, 50, 50 );
-
-  noFill();
-  noStroke();
-  rect(0, 10, 50, 50);
-  
-  stroke(0, 0, 255);
-  fill(0, 0, 100);
-  rect(70, 70, 50, 50);
-  
-  noFill();
-  pushMatrix();
-  rotateY(PI/8.0);
-  rect(190, 50, 50, 50);
-  popMatrix();
-  
-  pushMatrix();
-  noStroke();
-  scale(0.95);
-  fill(0, 128, 0);
-  rect(250, 70, 50, 50);
-  popMatrix();
-  
-  pushMatrix();
-  strokeWeight(1);
-  stroke(255,255,255);
-  scale(1.1);
-  fill(0,128,128);
-  rect(310, 70, 50, 50);
-  popMatrix();
-  
-  pushMatrix();
-  stroke(128, 0, 0);
-  fill(0,255,128);
-  rotateX(-PI/8.0);
-  rect(10, 130, 50, 50);
-  popMatrix();
-  
-  fill(255, 255, 255);
-  stroke(0, 0, 0);
-  rect(width-50, height-50, 30,30);
-
-  fill(255, 255, 255);
-  stroke(250, 0, 0, 128);
-
-  fill(0, 255 ,0);
-  rect(10, 200, 30,30);
-  
-  fill(128, 255, 0);
-  rect(80, 200, 60, 60);
-  
-  pushMatrix();
-  translate(0, 0, 5);
-  fill(128, 0, 128);
-  rect(50, 100, 60, 60);
-  popMatrix();
-}
- - - diff --git a/examples/seneca/rect/tests/test1/rect.pjs b/examples/seneca/rect/tests/test1/rect.pjs deleted file mode 100644 index f6c825bfc..000000000 --- a/examples/seneca/rect/tests/test1/rect.pjs +++ /dev/null @@ -1,95 +0,0 @@ -import processing.opengl.*; - -void setup() -{ - size(400, 400, OPENGL); - - noLights(); - rect(10, 10, 50, 50); - - noStroke(); - rect(70, 10, 50, 50); - - stroke(255, 0, 0); - rect(130, 10, 50, 50); - - noFill(); - rect(190, 10, 50, 50); - - stroke(0); - fill(0, 255, 0); - rect(250, 10, 50, 50); - - stroke(0); - fill(0, 255, 0); - rect(250, 10, 50, 50); - - fill(255, 255, 255); - rect(310, 10, 50, 50); - - strokeWeight(1); - pushMatrix(); - rotateZ(PI/4); - fill(0, 0, 0); - rect(310, 20, 50, 50); - popMatrix(); - - fill(255,255,0); - strokeWeight(3); - rect(10, 70, 50, 50 ); - - noFill(); - noStroke(); - rect(0, 10, 50, 50); - - stroke(0, 0, 255); - fill(0, 0, 100); - rect(70, 70, 50, 50); - - noFill(); - pushMatrix(); - rotateY(PI/8.0); - rect(190, 50, 50, 50); - popMatrix(); - - pushMatrix(); - noStroke(); - scale(0.95); - fill(0, 128, 0); - rect(250, 70, 50, 50); - popMatrix(); - - pushMatrix(); - strokeWeight(1); - stroke(255,255,255); - scale(1.1); - fill(0,128,128); - rect(310, 70, 50, 50); - popMatrix(); - - pushMatrix(); - stroke(128, 0, 0); - fill(0,255,128); - rotateX(-PI/8.0); - rect(10, 130, 50, 50); - popMatrix(); - - fill(255, 255, 255); - stroke(0, 0, 0); - rect(width-50, height-50, 30,30); - - fill(255, 255, 255); - stroke(250, 0, 0, 128); - - fill(0, 255 ,0); - rect(10, 200, 30,30); - - fill(128, 255, 0); - rect(80, 200, 60, 60); - - pushMatrix(); - translate(0, 0, 5); - fill(128, 0, 128); - rect(50, 100, 60, 60); - popMatrix(); -} \ No newline at end of file diff --git a/examples/seneca/rect/tests/test2/p5_result.jpg b/examples/seneca/rect/tests/test2/p5_result.jpg deleted file mode 100644 index 8b94e9166..000000000 Binary files a/examples/seneca/rect/tests/test2/p5_result.jpg and /dev/null differ diff --git a/examples/seneca/rect/tests/test2/rect.html b/examples/seneca/rect/tests/test2/rect.html deleted file mode 100644 index 803be9d1a..000000000 --- a/examples/seneca/rect/tests/test2/rect.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for rect() 3D in Pjs

- - -

- - -

- -
// Test by Andor Salga
-import processing.opengl.*;
-
-int START_X = 10;
-
-int counter = 0;
-int currX = START_X;
-int currY = 10;
-
-int RECTS_PER_ROW = 10;
-int RECT_SIZE = 30;
-
-int Y_OFFSET = 50;
-int X_OFFSET = 50;
-
-void setup()
-{
-  size(500,500, OPENGL);
-  strokeWeight(6);
-
-  // default
-  drawRect();
-  
-  fill(0);
-  drawRect();
-  
-  fill(0);
-  drawRect();
-  
-  fill(0);
-  drawRect();
-  
-  fill(0);
-  drawRect();
-
-  fill(0);  
-  drawRect();
-
-  fill(128,0,0);  
-  drawRect();
-
-  fill(128,0,0);
-  drawRect();
-
-  fill(128,0,0);
-  drawRect();
-
-  fill(128,0,0);
-  drawRect();
-
-  fill(128,0,0);
-  drawRect();
-
-  fill(128,0,0);
-  drawRect();
-  
-  fill(128,128,0);
-  drawRect();
-
-  noStroke();
-  fill(0,128,0);
-  drawRect();  
-
-  stroke(0);
-  fill(0,128,0);
-  drawRect();    
-
-  stroke(255,0,0);
-  fill(0,128,0);
-  drawRect();    
-
-  stroke(255,0,0);
-  fill(0,128,0);
-  drawRect();
-
-  stroke(255,128,0);
-  fill(128,128,128);
-  drawRect(); 
- 
-  stroke(255,0,0);
-  fill(128,128,128);
-  drawRect();
-  
-  stroke(255,0,0);
-  fill(128,128,198);
-  drawRect();
-  
-  stroke(255,0,0);
-  fill(128,128,128);
-  drawRect();
-  
-  
-  ///////////////
-  
-  fill(255);
-  drawRect();
-
-  fill(0);
-  drawRect();
-  
-  fill(0);
-  drawRect();
-  
-  fill(0);
-  drawRect();
-  
-  fill(0);
-  drawRect();
-
-  fill(0);  
-  drawRect();
-
-  fill(128,0,0);  
-  drawRect();
-
-  fill(128,0,0);
-  drawRect();
-
-  fill(128,0,0);
-  drawRect();
-
-  fill(128,0,0);
-  drawRect();
-
-  fill(128,0,0);
-  drawRect();
-
-  fill(128,0,0);
-  drawRect();
-  
-  fill(128);
-  drawRect();
-
-  noStroke();
-  fill(0,128,0);
-  drawRect();  
-
-  stroke(0);
-  fill(0,128,0);
-  drawRect();    
-
-  stroke(255,0,0);
-  fill(0,128,0);
-  drawRect();    
-
-  stroke(255,0,0);
-  fill(0,128,0);
-  drawRect();
-
-  stroke(255,128,0);
-  fill(128,128,128);
-  drawRect(); 
- 
-  stroke(255,0,0);
-  fill(128,128,128);
-  drawRect();
-  
-  stroke(255,0,0);
-  fill(128,128,128);
-  drawRect();
-  
-  stroke(255,0,0);
-  fill(0,32,128);
-  drawRect();
-}
-
-void drawRect(){
-  
-  rect(currX, currY, RECT_SIZE, RECT_SIZE);
-
-  if(counter % RECTS_PER_ROW == 0 && counter > 0){
-    currX = START_X;
-    currY += Y_OFFSET;
-  }else{
-    currX += X_OFFSET;
-  }
-
-  counter++;
-}
- - - diff --git a/examples/seneca/rect/tests/test2/rect.pjs b/examples/seneca/rect/tests/test2/rect.pjs deleted file mode 100644 index 954653c7a..000000000 --- a/examples/seneca/rect/tests/test2/rect.pjs +++ /dev/null @@ -1,178 +0,0 @@ -import processing.opengl.*; - -int START_X = 10; - -int counter = 0; -int currX = START_X; -int currY = 10; - -int RECTS_PER_ROW = 10; -int RECT_SIZE = 30; - -int Y_OFFSET = 50; -int X_OFFSET = 50; - -void setup() -{ - size(500,500, OPENGL); - strokeWeight(6); - - // default - drawRect(); - - fill(0); - drawRect(); - - fill(0); - drawRect(); - - fill(0); - drawRect(); - - fill(0); - drawRect(); - - fill(0); - drawRect(); - - fill(128,0,0); - drawRect(); - - fill(128,0,0); - drawRect(); - - fill(128,0,0); - drawRect(); - - fill(128,0,0); - drawRect(); - - fill(128,0,0); - drawRect(); - - fill(128,0,0); - drawRect(); - - fill(128,128,0); - drawRect(); - - noStroke(); - fill(0,128,0); - drawRect(); - - stroke(0); - fill(0,128,0); - drawRect(); - - stroke(255,0,0); - fill(0,128,0); - drawRect(); - - stroke(255,0,0); - fill(0,128,0); - drawRect(); - - stroke(255,128,0); - fill(128,128,128); - drawRect(); - - stroke(255,0,0); - fill(128,128,128); - drawRect(); - - stroke(255,0,0); - fill(128,128,198); - drawRect(); - - stroke(255,0,0); - fill(128,128,128); - drawRect(); - - - /////////////// - - fill(255); - drawRect(); - - fill(0); - drawRect(); - - fill(0); - drawRect(); - - fill(0); - drawRect(); - - fill(0); - drawRect(); - - fill(0); - drawRect(); - - fill(128,0,0); - drawRect(); - - fill(128,0,0); - drawRect(); - - fill(128,0,0); - drawRect(); - - fill(128,0,0); - drawRect(); - - fill(128,0,0); - drawRect(); - - fill(128,0,0); - drawRect(); - - fill(128); - drawRect(); - - noStroke(); - fill(0,128,0); - drawRect(); - - stroke(0); - fill(0,128,0); - drawRect(); - - stroke(255,0,0); - fill(0,128,0); - drawRect(); - - stroke(255,0,0); - fill(0,128,0); - drawRect(); - - stroke(255,128,0); - fill(128,128,128); - drawRect(); - - stroke(255,0,0); - fill(128,128,128); - drawRect(); - - stroke(255,0,0); - fill(128,128,128); - drawRect(); - - stroke(255,0,0); - fill(0,32,128); - drawRect(); -} - -void drawRect(){ - - rect(currX, currY, RECT_SIZE, RECT_SIZE); - - if(counter % RECTS_PER_ROW == 0 && counter > 0){ - currX = START_X; - currY += Y_OFFSET; - }else{ - currX += X_OFFSET; - } - - counter++; -} \ No newline at end of file diff --git a/examples/seneca/rotate/rotate.html b/examples/seneca/rotate/rotate.html deleted file mode 100644 index cbe52ce4c..000000000 --- a/examples/seneca/rotate/rotate.html +++ /dev/null @@ -1,46 +0,0 @@ - -A Processing.js Example - - - - - - - - - - diff --git a/examples/seneca/rotate/rotateX.html b/examples/seneca/rotate/rotateX.html deleted file mode 100644 index b767f347c..000000000 --- a/examples/seneca/rotate/rotateX.html +++ /dev/null @@ -1,35 +0,0 @@ - -A Processing.js Example - - - - -
-

A Processing.js 3D rotate() Example

- - - -
-
- - - - - diff --git a/examples/seneca/rotate/rotateY.html b/examples/seneca/rotate/rotateY.html deleted file mode 100644 index 19cfeace1..000000000 --- a/examples/seneca/rotate/rotateY.html +++ /dev/null @@ -1,35 +0,0 @@ - -A Processing.js Example - - - - -
-

A Processing.js 3D rotateX() Example

- - - -
-
- - - - - diff --git a/examples/seneca/rotate/rotateZ.html b/examples/seneca/rotate/rotateZ.html deleted file mode 100644 index 64d77ca2f..000000000 --- a/examples/seneca/rotate/rotateZ.html +++ /dev/null @@ -1,35 +0,0 @@ - -A Processing.js Example - - - - -
-

A Processing.js 3D rotateY() Example

- - - -
-
- - - - - diff --git a/examples/seneca/saveStrings/example.html b/examples/seneca/saveStrings/example.html deleted file mode 100644 index 8dcbbba30..000000000 --- a/examples/seneca/saveStrings/example.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/examples/seneca/saveStrings/example.pjs b/examples/seneca/saveStrings/example.pjs deleted file mode 100644 index 2be710d29..000000000 --- a/examples/seneca/saveStrings/example.pjs +++ /dev/null @@ -1,15 +0,0 @@ -String lines[] = loadStrings("strings.txt"); - -println("there are " + lines.length + " lines"); -for (int i=0; i < lines.length; i++) { - println(": " + lines[i]); -} - -saveStrings("strings.txt", concat(lines, ["line3"])); - -lines = loadStrings("strings.txt"); - -println("there are " + lines.length + " lines"); -for (int i=0; i < lines.length; i++) { - println(": " + lines[i]); -} diff --git a/examples/seneca/saveStrings/strings.txt b/examples/seneca/saveStrings/strings.txt deleted file mode 100644 index c0d0fb45c..000000000 --- a/examples/seneca/saveStrings/strings.txt +++ /dev/null @@ -1,2 +0,0 @@ -line1 -line2 diff --git a/examples/seneca/screen/XandY/screenX.html b/examples/seneca/screen/XandY/screenX.html deleted file mode 100644 index 038104ffe..000000000 --- a/examples/seneca/screen/XandY/screenX.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - -

Processing.org

-

Test for screenX(), screenY(), screenZ()

- -

This pages tests screenY().
-

- -

- -
-void setup() {
-  size(100, 100, P3D);
-}
-
-void draw() {
-  background(204);
-  
-  float x = mouseX;
-  float y = mouseY;
-  float z = -100;
-  
-  // Draw "X" at z = -100
-  stroke(255);
-  line(x-10, y-10, z, x+10, y+10, z); 
-  line(x+10, y-10, z, x-10, y+10, z); 
-  
-  // Draw line in 2D at same x value
-  // Notice the parallax
-  stroke(102);
-  line(x, 0, 0, x, height, 0);
-  
-  // Draw 2D line to match the x value
-  // element drawn at z = -100 
-  stroke(0);
-  float theX = screenX(x, y, z);
-  line(theX, 0, 0, theX, height, 0);    
-}
- - - diff --git a/examples/seneca/screen/XandY/screenX.pjs b/examples/seneca/screen/XandY/screenX.pjs deleted file mode 100644 index c09a38e87..000000000 --- a/examples/seneca/screen/XandY/screenX.pjs +++ /dev/null @@ -1,29 +0,0 @@ -import processing.opengl.*; - -void setup() { - size(100, 100, P3D); -} - -void draw() { - background(204); - - float x = mouseX; - float y = mouseY; - float z = -100; - - // Draw "X" at z = -100 - stroke(255); - line(x-10, y-10, z, x+10, y+10, z); - line(x+10, y-10, z, x-10, y+10, z); - - // Draw line in 2D at same x value - // Notice the parallax - stroke(102); - line(x, 0, 0, x, height, 0); - - // Draw 2D line to match the x value - // element drawn at z = -100 - stroke(0); - float theX = screenX(x, y, z); - line(theX, 0, 0, theX, height, 0); -} \ No newline at end of file diff --git a/examples/seneca/screen/XandY/screenXProjection.html b/examples/seneca/screen/XandY/screenXProjection.html deleted file mode 100644 index eace348d9..000000000 --- a/examples/seneca/screen/XandY/screenXProjection.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - -

Processing.org

-

Test for screenX(), screenY(), screenZ()

- -

This pages tests screenY().
-

- -

- -
-void setup() {
-  size(100,100);
-}
-
-void draw() {
-  pushMatrix();
-  translate(100,100);
-  String result = "" + screenX(5,6);
-  println(result); //prints 105
-  popMatrix();
-}
- - - diff --git a/examples/seneca/screen/XandY/screenXProjection.pjs b/examples/seneca/screen/XandY/screenXProjection.pjs deleted file mode 100644 index b422eeae1..000000000 --- a/examples/seneca/screen/XandY/screenXProjection.pjs +++ /dev/null @@ -1,12 +0,0 @@ - -void setup() { - size(100,100); -} - -void draw() { - pushMatrix(); - translate(100,100); - String result = "" + screenX(5,6); - println(result); - popMatrix(); -} diff --git a/examples/seneca/screen/XandY/screenY.html b/examples/seneca/screen/XandY/screenY.html deleted file mode 100644 index 2151bf01f..000000000 --- a/examples/seneca/screen/XandY/screenY.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - -

Processing.org

-

Test for screenX(), screenY(), screenZ()

- -

This pages tests screenY().
-

- -

- -

- -
-// Test By Andor Salga
-void setup() {
-  size(100, 100, P3D);
-}
-
-void draw() {
-  background(204);
-  
-  float x = mouseX;
-  float y = mouseY;
-  float z = -100;
-  
-  // Draw "X" at z = -100
-  stroke(255);
-  line(x-10, y-10, z, x+10, y+10, z); 
-  line(x+10, y-10, z, x-10, y+10, z); 
-  
-  // Draw line in 2D at same y value
-  // Notice the parallax
-  stroke(102);
-  line(0, y, 0, width, y, 0);
-  
-  // Draw 2D line to match the y value
-  // element drawn at z = -100 
-  stroke(0);
-  float theY = screenY(x, y, z);
-  line(0, theY, 0, width, theY, 0);    
-}
- - - diff --git a/examples/seneca/screen/XandY/screenY.pjs b/examples/seneca/screen/XandY/screenY.pjs deleted file mode 100644 index ff6505bc0..000000000 --- a/examples/seneca/screen/XandY/screenY.pjs +++ /dev/null @@ -1,29 +0,0 @@ -import processing.opengl.*; - -void setup() { - size(100, 100, P3D); -} - -void draw() { - background(204); - - float x = mouseX; - float y = mouseY; - float z = -100; - - // Draw "X" at z = -100 - stroke(255); - line(x-10, y-10, z, x+10, y+10, z); - line(x+10, y-10, z, x-10, y+10, z); - - // Draw line in 2D at same y value - // Notice the parallax - stroke(102); - line(0, y, 0, width, y, 0); - - // Draw 2D line to match the y value - // element drawn at z = -100 - stroke(0); - float theY = screenY(x, y, z); - line(0, theY, 0, width, theY, 0); -} \ No newline at end of file diff --git a/examples/seneca/shape/bot.jpg b/examples/seneca/shape/bot.jpg deleted file mode 100644 index 96f50413f..000000000 Binary files a/examples/seneca/shape/bot.jpg and /dev/null differ diff --git a/examples/seneca/shape/bot.svg b/examples/seneca/shape/bot.svg deleted file mode 100644 index 91b130b38..000000000 --- a/examples/seneca/shape/bot.svg +++ /dev/null @@ -1,160 +0,0 @@ - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/seneca/shape/bot2.jpg b/examples/seneca/shape/bot2.jpg deleted file mode 100644 index d6235938e..000000000 Binary files a/examples/seneca/shape/bot2.jpg and /dev/null differ diff --git a/examples/seneca/shape/shape.html b/examples/seneca/shape/shape.html deleted file mode 100644 index 4544cea3c..000000000 --- a/examples/seneca/shape/shape.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - Processing.js SVG shape() - - - - - - - -
The actual shape:
- - - - diff --git a/examples/seneca/shape/shape2.html b/examples/seneca/shape/shape2.html deleted file mode 100644 index 57701605f..000000000 --- a/examples/seneca/shape/shape2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Processing.js SVG shape() - - - - - - - -
The actual shape:
- - - - diff --git a/examples/seneca/shapeMode/bot.jpg b/examples/seneca/shapeMode/bot.jpg deleted file mode 100644 index a720af137..000000000 Binary files a/examples/seneca/shapeMode/bot.jpg and /dev/null differ diff --git a/examples/seneca/shapeMode/bot.svg b/examples/seneca/shapeMode/bot.svg deleted file mode 100644 index 91b130b38..000000000 --- a/examples/seneca/shapeMode/bot.svg +++ /dev/null @@ -1,160 +0,0 @@ - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/seneca/shapeMode/bot4.jpg b/examples/seneca/shapeMode/bot4.jpg deleted file mode 100644 index 81c03d869..000000000 Binary files a/examples/seneca/shapeMode/bot4.jpg and /dev/null differ diff --git a/examples/seneca/shapeMode/shapeMode.html b/examples/seneca/shapeMode/shapeMode.html deleted file mode 100644 index beccedbfe..000000000 --- a/examples/seneca/shapeMode/shapeMode.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - Processing.js shapeMode() - - - - - - - -
The actual shape:
- - - - diff --git a/examples/seneca/shapeMode/shapeMode2.html b/examples/seneca/shapeMode/shapeMode2.html deleted file mode 100644 index ef976e242..000000000 --- a/examples/seneca/shapeMode/shapeMode2.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - Processing.js shapeMode() CORNER - - - - - - - -
The actual shape:
- - - - diff --git a/examples/seneca/size/size.html b/examples/seneca/size/size.html deleted file mode 100644 index 03dafbcd5..000000000 --- a/examples/seneca/size/size.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - -

size() no parameter test

- - -

-
- -
void setup() {
-  size();
-  background(153);
-}
-
-void draw() {
-  line(0, 0, width, height);
-}
-
-
- - - \ No newline at end of file diff --git a/examples/seneca/size/size2.html b/examples/seneca/size/size2.html deleted file mode 100644 index 9f8612d0b..000000000 --- a/examples/seneca/size/size2.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - -

size() with Canvas Style

- - -

-
- -
void setup() {
-  size(20,20);
-  background(153);
-}
-
-void draw() {
-  line(0, 0, width, height);
-}
-
-
- - - \ No newline at end of file diff --git a/examples/seneca/sphere/sphere.html b/examples/seneca/sphere/sphere.html deleted file mode 100644 index f251f53e1..000000000 --- a/examples/seneca/sphere/sphere.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - -
-

A Processing.js 3D rotateZ() Example

- - - -
-
- -
-

A Processing.js 3D sphere() Example

-

sphereDetail(25,25);

-

sphere(140)

-

sphereDetail(15,15);

-

sphere(80)

-

- - -

- - - - \ No newline at end of file diff --git a/examples/seneca/sphere/sphere2.html b/examples/seneca/sphere/sphere2.html deleted file mode 100644 index 20c5ce23d..000000000 --- a/examples/seneca/sphere/sphere2.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - -
-

A Processing.js 3D sphere() Example

-

This example moves the sphereDetail calls out of the main draw loop and does one call in the setup to show how much faster - it is (100 fps vs 15fps)

-

- -

- - diff --git a/examples/seneca/sphere/sphere2.pjs b/examples/seneca/sphere/sphere2.pjs deleted file mode 100644 index 0cdfda1c3..000000000 --- a/examples/seneca/sphere/sphere2.pjs +++ /dev/null @@ -1,38 +0,0 @@ -void setup() -{ - size(500,500,OPENGL); - setInterval(function() { println(frameRate.toFixed(2) + " fps"); }, 2000); - sphereDetail(25,25); - noStroke(); -} - -void draw() { - background(100, 0, 100); - - fill(0, 255, 200); - stroke(0, 200, 255); - - pushMatrix(); - translate(400,400,0); - rotateX(-frameCount/20.0); - sphere(80); - popMatrix(); - - fill(255, 0, 200); - stroke(255, 200, 0); - - pushMatrix(); - translate(width/2,height/2,1); - rotateX(frameCount/20.0); - sphere(140); - popMatrix(); - - fill(255, 200, 0); - stroke(255, 0, 200); - - pushMatrix(); - translate(100,100,1); - rotateX(-frameCount/20.0); - sphere(80); - popMatrix(); -} diff --git a/examples/seneca/sphere/spheretest.js b/examples/seneca/sphere/spheretest.js deleted file mode 100644 index e896df551..000000000 --- a/examples/seneca/sphere/spheretest.js +++ /dev/null @@ -1,29 +0,0 @@ -void setup() -{ - size(500,500,OPENGL); - setInterval(function() { println(FRAME_RATE.toFixed(2) + " fps"); }, 2000); -} - -void draw() { - background(200); - - fill(255, 0, 200); - stroke(255, 200, 0); - - pushMatrix(); - translate(width/2,height/2,1); - rotateX(frameCount/20.0); - sphereDetail(25,25); - sphere(140); - popMatrix(); - - fill(255, 200, 0); - stroke(255, 0, 200); - - pushMatrix(); - translate(100,100,1); - rotateX(-frameCount/20.0); - sphereDetail(15,15); - sphere(80); - popMatrix(); -} diff --git a/examples/seneca/status/status.html b/examples/seneca/status/status.html deleted file mode 100644 index 547826e09..000000000 --- a/examples/seneca/status/status.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - -

Processing-js

-

status ()

-
- -

- - - diff --git a/examples/seneca/stringEquals/stringEqualsTest.html b/examples/seneca/stringEquals/stringEqualsTest.html deleted file mode 100644 index 2ed73e85f..000000000 --- a/examples/seneca/stringEquals/stringEqualsTest.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - Processing.js test of String::equals() (0) - - - - -

- - String::equals() test (0)

-

- This is a friendlier version of the example on the Processing web site.

-
-

- - - -
- Test written by Matthew Lam -

 
-boolean errors=false;
- 
-int xcoord=5;
-int xoff=10;
-int ycoord=35;
-int yinc=15;
- 
-void setup() {
-	size(200,250);
-	background(50);
-	noLoop();
-} 
- 
-void draw() {
-	output("\"CCCP\".equals(\"CCCP\")","CCCP".equals("CCCP"),true);
-	output("\"CCCP\".equals(\"PCCC\")","CCCP".equals("PCCC"),false);
-	output("\"CCCP\".equals(\" CCCP\")","CCCP".equals(" CCCP"),false);
- 
-	String errMsg="";
-	if (errors) {
-		fill(255,0,0);
-		errMsg="RED tests FAILED.";
-	} else {
-		fill(0,255,0);
-		errMsg="All tests passed.";
-	}
-	text(errMsg,5,20);
-}
- 
-void output(String txt,boolean results,boolean expected) {
-	fill(255,255,255);
-	text(txt,xcoord,ycoord+=yinc);
-	if (results==expected) {
-		fill(0,255,0);
-	} else {
-		fill(255,0,0);
-		errors=true;
-	}
-	text(""+results,xcoord+xoff,ycoord+=yinc);
-	ycoord+=yinc;
-}
-	
-
- - - \ No newline at end of file diff --git a/examples/seneca/strokeWeight/strokeWeight.html b/examples/seneca/strokeWeight/strokeWeight.html deleted file mode 100644 index b23664a1a..000000000 --- a/examples/seneca/strokeWeight/strokeWeight.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/examples/seneca/strokeWeight/strokeWeight.pjs b/examples/seneca/strokeWeight/strokeWeight.pjs deleted file mode 100644 index 98d888d63..000000000 --- a/examples/seneca/strokeWeight/strokeWeight.pjs +++ /dev/null @@ -1,14 +0,0 @@ -size(400, 400); - -strokeWeight(1); -point(200,10); -ellipseMode(RADIUS); -ellipse(300,300,25,25); -strokeWeight(5); -point(200,50); -strokeWeight(10); -point(200,125); -strokeWeight(25); -point(200,200); -strokeWeight(50); -point(200,300); diff --git a/examples/seneca/text$6/textTest1.html b/examples/seneca/text$6/textTest1.html deleted file mode 100755 index 4f3f64909..000000000 --- a/examples/seneca/text$6/textTest1.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - Processing.js test of text() with variable width textbox - - - - -

text() test with variable width textbox

-

Tries to put the string "Hello there 1 2 3 4 5 6 7 8 9 10" in a textbox that varies in size from 0px width to slightly wider than the full text string.

-

Should show "Hello" being placed letter by letter, then nothing while the textbox is less wide than "Hello there", then placing 1, 2, ..., 10 as they are fittable.

- - - -
-
-	
- -
- - - diff --git a/examples/seneca/text/textTest1.html b/examples/seneca/text/textTest1.html deleted file mode 100644 index f98df062c..000000000 --- a/examples/seneca/text/textTest1.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - Processing.js test of text() - - - - -

text() tests

-

First group prints: int, float, char, and string.

-

Second group (in boxes) prints text in-the-box: multi-line, wrapping, overflow. -

- - - -
-

-	
- -
- - - diff --git a/examples/seneca/text/textTest2.html b/examples/seneca/text/textTest2.html deleted file mode 100644 index 4a977c55e..000000000 --- a/examples/seneca/text/textTest2.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - Processing.js test of textAlign() - - - - -

textAlign() align tests

-

- - - -
-

-	
- -
- - - diff --git a/examples/seneca/text/textTest3.html b/examples/seneca/text/textTest3.html deleted file mode 100644 index cfb534bdc..000000000 --- a/examples/seneca/text/textTest3.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - Processing.js test of text() - - - - -

text() tests

-

First group prints: int, float, char, and string.

-

Second group (in boxes) prints text in-the-box: multi-line, wrapping, overflow. -

- - - -
-

-	
- -
- - - diff --git a/examples/seneca/text/textTest4.html b/examples/seneca/text/textTest4.html deleted file mode 100644 index 13c4788aa..000000000 --- a/examples/seneca/text/textTest4.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - Processing.js test of text() - - - - -

text() tests

-

First group prints: int, float, char, and string.

-

Second group (in boxes) prints text in-the-box: multi-line, wrapping, overflow. -

- - - -
-

-	
- -
- - - diff --git a/examples/seneca/text/textTest5.html b/examples/seneca/text/textTest5.html deleted file mode 100644 index dbe2009ba..000000000 --- a/examples/seneca/text/textTest5.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - Processing.js test of textAlign() - - - - -

textAlign() align tests

-

- - - -
-

-	
- -
- - - diff --git a/examples/seneca/text/textTest6.html b/examples/seneca/text/textTest6.html deleted file mode 100644 index 19f0479fe..000000000 --- a/examples/seneca/text/textTest6.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - Processing.js test of textAlign() - - - - -

textAlign() align tests

-

- - - -
-

-	
- -
- - - diff --git a/examples/seneca/text3D/text-3d.html b/examples/seneca/text3D/text-3d.html deleted file mode 100644 index 9b1ce09f1..000000000 --- a/examples/seneca/text3D/text-3d.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/examples/seneca/text3D/text-3d.pjs b/examples/seneca/text3D/text-3d.pjs deleted file mode 100644 index 54b1c4709..000000000 --- a/examples/seneca/text3D/text-3d.pjs +++ /dev/null @@ -1,39 +0,0 @@ -float a=0.0; -void setup() -{ -size(500, 500, P3D); -background(0); -PFont font = loadFont("Arial"); -textFont(font,30); -} - -void draw(){ - - background(0); - a += 0.015; - if(a > TWO_PI) { - a = 0.0; - } - - translate(width/3, height/3,0); - rotateY(a); - //rotateY(a * 2.0); - -//rect(5, 5, 20, 5); -fill(0, 102, 153); -text("wo\nrdsecond", 10, -20, 0); -//text("second"); -fill(255); -text("wo\nrd", 10, -20, -10); - -fill(255); -text("word", 20, 40, -10); -fill(0, 102, 153); -text("word", 20, 40, 0); - -fill(255); -text("word", 30, 70, -10); -fill(0, 102, 153); -text("word", 30, 70, 0); -} - diff --git a/examples/seneca/textAscent/textAscent.html b/examples/seneca/textAscent/textAscent.html deleted file mode 100644 index 04e8abc95..000000000 --- a/examples/seneca/textAscent/textAscent.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - Processing.js test of textAscent() - - - - -

textAscent() example

-

- - - -
-

-	
- -
- - - diff --git a/examples/seneca/textDescent/textDescent.html b/examples/seneca/textDescent/textDescent.html deleted file mode 100644 index 670215e7b..000000000 --- a/examples/seneca/textDescent/textDescent.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - Processing.js test of textDescent() - - - - -

textDescent() example

-

- - - -
-

-	
- -
- - - diff --git a/examples/seneca/textMode/textMode2D.html b/examples/seneca/textMode/textMode2D.html deleted file mode 100644 index 5e6355fa8..000000000 --- a/examples/seneca/textMode/textMode2D.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - -

textMode() test - 2D

- -

- -

- -
-    
-size(100, 100, P2D);
-PFont metaBold;
-metaBold = loadFont("Arial");
-textFont(metaBold);
-String lines = "screen";
-
-fill(0);
-text("1", 1, 10);
-text("2", 1, 20);
-text("3", 1, 30);
-text("4", 1, 40);
-text("5", 1, 50);
-text("6", 1, 60);
-text("7", 1, 70);
-text("8", 1, 80);
-text("9", 1, 90);
-text("10", 1, 100);
-
-fill(255);
-//rotateZ(0.1);
-translate(20,0);
-text(lines, 10, 20);
-textMode(SCREEN);
-text(lines, 10, 45);
-textMode(MODEL);
-translate(-10,0);
-text(lines, 10, 70);
-    
- - diff --git a/examples/seneca/textMode/textMode2D.pjs b/examples/seneca/textMode/textMode2D.pjs deleted file mode 100644 index 7bcf5cb39..000000000 --- a/examples/seneca/textMode/textMode2D.pjs +++ /dev/null @@ -1,27 +0,0 @@ -size(100, 100, P2D); -PFont metaBold; -metaBold = loadFont("Arial"); -textFont(metaBold); -String lines = "screen"; - -fill(0); -text("1", 1, 10); -text("2", 1, 20); -text("3", 1, 30); -text("4", 1, 40); -text("5", 1, 50); -text("6", 1, 60); -text("7", 1, 70); -text("8", 1, 80); -text("9", 1, 90); -text("10", 1, 100); - -fill(255); -//rotateZ(0.1); -translate(20,0); -text(lines, 10, 20); -textMode(SCREEN); -text(lines, 10, 45); -textMode(MODEL); -translate(-10,0); -text(lines, 10, 70); diff --git a/examples/seneca/textMode/textMode3D.html b/examples/seneca/textMode/textMode3D.html deleted file mode 100644 index 960bc4b43..000000000 --- a/examples/seneca/textMode/textMode3D.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - -

textMode() test - 2D

- -

- -

- -
-    
-size(100, 100, P2D);
-PFont metaBold;
-metaBold = loadFont("Serif.plain-12.vlw");
-textFont(metaBold);
-String lines = "screen";
-
-//rotateZ(0.1);
-translate(20,0);
-text(lines, 3, 20);
-textMode(SCREEN);
-text(lines, 3, 45);
-textMode(MODEL);
-translate(-10,0);
-text(lines, 3, 70);
-    
- - diff --git a/examples/seneca/textWidth/2d/demos/index.html b/examples/seneca/textWidth/2d/demos/index.html deleted file mode 100644 index 6e28704e5..000000000 --- a/examples/seneca/textWidth/2d/demos/index.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - - -

Andor Salga

-

Demo for textWidth()

- -

This page demonstrates that the textWidth() function being added to Processing.js works correctly.
-

- -

- -

- -
-// Test by Andor Salga
-//
-// Poetry by Andor Salga
-//
-
-int isHoldingMagnet = -1;
-
-// using arraylist because i think classes are buggy
-ArrayList strings = new ArrayList();
-ArrayList coordsX = new ArrayList();
-ArrayList coordsY = new ArrayList();
-ArrayList widths = new ArrayList();
-ArrayList fonts = new ArrayList();
-
-int MAGNET_HEIGHT = 20;
-int numMagnets = 0;
-
-// user will click somewhere on the magnet, need to save 
-// this value so the magnet is drawn in same cursor spot
-int clickedOffsetX = 0;
-int clickedOffsetY = 0;
-
-PFont courier;
-PFont arial;
-PFont verdana;
-PFont helvetica;
-PFont comic;
-
-//
-//
-//
-void setup()
-{
-  size(500, 500);
-  fill(0);
-  
-  courier = loadFont("courier");
-  arial = loadFont("arial");
-  helvetica = loadFont("helvetica");
-  verdana = loadFont("Verdana");
-  comic = loadFont("Comic Sans MS");
-  
-  // add magnets in specific locations
-  int xStart = 350;
-  addMagnet("By", xStart, height - 30);
-  addMagnet("Andor", xStart + textWidth("By") + 5, 
-                              height - 30);
-  addMagnet("Salga", xStart + textWidth("By") + 5 + textWidth("Andor") + 5, height - 30);
-
-  // hascanvas was being a pain with arrays
-  addMagnetRandom("a");
-  addMagnetRandom("a");
-  addMagnetRandom("a");
-  addMagnetRandom("a");
-  addMagnetRandom("s");
-  addMagnetRandom("s");
-  addMagnetRandom("the");
-  addMagnetRandom("the");
-  addMagnetRandom("ed");
-
-  addMagnetRandom("Seneca");
-  addMagnetRandom("Firefox");
-  addMagnetRandom("DPS911");
-  addMagnetRandom("Processing");
-
-  addMagnetRandom("Miri");
-  addMagnetRandom("robot");
-  addMagnetRandom("jolty");
-  addMagnetRandom("cookie");
-  addMagnetRandom("magic");
-  addMagnetRandom("cow");
-
-  addMagnetRandom("free");
-  addMagnetRandom("love");
-  addMagnetRandom("cried");
-  addMagnetRandom("rain");
-  addMagnetRandom("forest");
-  addMagnetRandom("dream");
-  addMagnetRandom("gloom");
-  addMagnetRandom("dark");
-  addMagnetRandom("leap");
-
-  addMagnetRandom("who");
-  addMagnetRandom("what");
-  addMagnetRandom("where");
-  addMagnetRandom("when");
-  addMagnetRandom("how");
-
-  addMagnetRandom("I");
-  addMagnetRandom("know");
-  addMagnetRandom("my");
-  addMagnetRandom("will");
-  addMagnetRandom("you");
-  addMagnetRandom("how");
-
-  addMagnetRandom("see");
-  addMagnetRandom("smell");
-  addMagnetRandom("taste");
-  addMagnetRandom("hear");
-  addMagnetRandom("touch");
-}
-
-
-// Add a magnet to a random place
-void addMagnetRandom(String str)
-{
-  strings.add(str);
-  
-  int r = (int)random(0,5);
-  fonts.add(r);
-  
-  coordsX.add((int)random(20,width-textWidth(str)));
-
-  // don't let the random words go over my name
-  coordsY.add((int)random(20,height-60));
-  widths.add((int)textWidth(str));
-  numMagnets++;
-}
-
-void addMagnet(String str, int x, int y)
-{
-  strings.add(str);
-  coordsX.add(x);
-  coordsY.add(y);
-  widths.add((int)textWidth(str));
-  fonts.add(1);
-  numMagnets++;
-}
-
-//
-//
-//
-void drawMagnets()
-{
-  stroke(0);
-
-    for(int i=0; i < strings.size(); i++)
-    {
-      if( i != isHoldingMagnet)
-      {
-        strokeWeight(2);
-        fill(250 - fonts.get(i)*30,20 + fonts.get(i)*40, 255);
-        
-        switch(fonts.get(i)){
-         case 0: textFont(arial,16);break;
-         case 1: textFont(verdana,10);break;
-         case 2: textFont(helvetica,18);break;
-         case 3: textFont(courier, 25);break;
-         case 4: textFont(comic, 20);break;
-        }
-        rect((int)coordsX.get(i), (int)coordsY.get(i),
-           textWidth((String)strings.get(i)),
-           MAGNET_HEIGHT);
-        fill(0);
-        
-        text((String)strings.get(i), (int)coordsX.get(i),
-                                  (int)coordsY.get(i)+15);
-      }
-    }
-    
-    //
-    if( isHoldingMagnet != -1)
-    {
-      int i = isHoldingMagnet;
-
-       switch(fonts.get(i)){
-         case 0: textFont(arial,16);break;
-         case 1: textFont(verdana,10);break;
-         case 2: textFont(helvetica,18);break;
-         case 3: textFont(courier, 25);break;
-         case 4: textFont(comic, 20);break;
-        }
-        
-      // shadow
-      noStroke();
-      fill(0,0,0,150);      
-      rect(mouseX-clickedOffsetX, mouseY-clickedOffsetY,
-          textWidth((String)strings.get(i)),MAGNET_HEIGHT);
-      
-      strokeWeight(2);
-      stroke(0);
-      fill(255,255,255);
-      
-      rect(mouseX-clickedOffsetX-5,mouseY-clickedOffsetY-5, 
-          textWidth((String)strings.get(i)),MAGNET_HEIGHT);
-      
-      fill(0);
-                
-      text((String)strings.get(i), mouseX-clickedOffsetX-5,
-           mouseY-clickedOffsetY+10);
-    }
-}
-
-//
-//
-//
-void draw()
-{
-  background(255);
-
-  // canvas border
-  strokeWeight(1);
-  stroke(100);
-  noFill();
-  rect(0,0,width,height);
-  
-  drawMagnets();
-  
-  // User tries to pick up a magnet
-  if(mousePressed && isHoldingMagnet == -1)
-  {
-    // did he pick up a magnet or miss?
-    int indexOfMagnet = -1;
-    
-    int mx = mouseX;
-    int my = mouseY;
-
-    // Pick up the LAST magnet drawn out of all 
-    // the magnets the user clicked on which 
-    // will be the 'top' magnet.
-    for(int i = 0; i < numMagnets; i++)
-    {
-      if( mx > coordsX.get(i) &&
-          mx < coordsX.get(i) + textWidth((String)strings.get(i)) &&
-
-          my >= coordsY.get(i) && 
-          my <= coordsY.get(i) + 20 )
-      {
-        // keep overwriting the value
-        isHoldingMagnet = i;
-
-        clickedOffsetX = mx - coordsX.get(i);
-        clickedOffsetY = my - coordsY.get(i);
-      }
-    }
-  }
-
-  // if the user picked up a magnet and dropped it
-  if(!mousePressed && isHoldingMagnet != -1)
-  {
-    coordsX[isHoldingMagnet] = mouseX - clickedOffsetX;
-    coordsY[isHoldingMagnet] = mouseY - clickedOffsetY;
-    	
-    int idx = isHoldingMagnet;
-    
-    // save values
-    String s = (String)strings.get(idx);
-    int x = (int)coordsX.get(idx);
-    int y = (int)coordsY.get(idx);
-    int w = (int)widths.get(idx);
-    int f = (int)fonts.get(idx);
-      
-    // remove
-    strings.remove(idx);
-    coordsX.remove(idx);
-    coordsY.remove(idx);
-    widths.remove(idx);
-    fonts.remove(idx);
-    
-    // add to end of list
-    strings.add(s);
-    coordsX.add(x);
-    coordsY.add(y);
-    widths.add(w);
-    fonts.add(f);
-    				
-    isHoldingMagnet = -1;				
-  }
-}
- - - diff --git a/examples/seneca/textWidth/2d/demos/poetry.js b/examples/seneca/textWidth/2d/demos/poetry.js deleted file mode 100644 index 845524d7a..000000000 --- a/examples/seneca/textWidth/2d/demos/poetry.js +++ /dev/null @@ -1,260 +0,0 @@ -// -// Poetry by Andor Salga -// - -int isHoldingMagnet = -1; - -// using arraylist because i think classes are buggy -ArrayList strings = new ArrayList(); -ArrayList coordsX = new ArrayList(); -ArrayList coordsY = new ArrayList(); -ArrayList widths = new ArrayList(); -ArrayList fonts = new ArrayList(); - -int MAGNET_HEIGHT = 20; -int numMagnets = 0; - -// user will click somewhere on the magnet, need to save -// this value so the magnet is drawn in same cursor spot -int clickedOffsetX = 0; -int clickedOffsetY = 0; - -PFont courier; -PFont arial; -PFont verdana; -PFont helvetica; -PFont comic; - -// -// -// -void setup() -{ - size(500, 500); - fill(0); - - courier = loadFont("courier"); - arial = loadFont("arial"); - helvetica = loadFont("helvetica"); - verdana = loadFont("Verdana"); - comic = loadFont("Comic Sans MS"); - - // add magnets in specific locations - int xStart = 350; - addMagnet("By", xStart, height - 30); - addMagnet("Andor", xStart + textWidth("By") + 5, - height - 30); - addMagnet("Salga", xStart + textWidth("By") + 5 + textWidth("Andor") + 5, height - 30); - - // hascanvas was being a pain with arrays - addMagnetRandom("a"); - addMagnetRandom("a"); - addMagnetRandom("a"); - addMagnetRandom("a"); - addMagnetRandom("s"); - addMagnetRandom("s"); - addMagnetRandom("the"); - addMagnetRandom("the"); - addMagnetRandom("ed"); - - addMagnetRandom("Seneca"); - addMagnetRandom("Firefox"); - addMagnetRandom("DPS911"); - addMagnetRandom("Processing"); - - addMagnetRandom("Miri"); - addMagnetRandom("robot"); - addMagnetRandom("jolty"); - addMagnetRandom("cookie"); - addMagnetRandom("magic"); - addMagnetRandom("cow"); - - addMagnetRandom("free"); - addMagnetRandom("love"); - addMagnetRandom("cried"); - addMagnetRandom("rain"); - addMagnetRandom("forest"); - addMagnetRandom("dream"); - addMagnetRandom("gloom"); - addMagnetRandom("dark"); - addMagnetRandom("leap"); - - addMagnetRandom("who"); - addMagnetRandom("what"); - addMagnetRandom("where"); - addMagnetRandom("when"); - addMagnetRandom("how"); - - addMagnetRandom("I"); - addMagnetRandom("know"); - addMagnetRandom("my"); - addMagnetRandom("will"); - addMagnetRandom("you"); - addMagnetRandom("how"); - - addMagnetRandom("see"); - addMagnetRandom("smell"); - addMagnetRandom("taste"); - addMagnetRandom("hear"); - addMagnetRandom("touch"); -} - - -// Add a magnet to a random place -void addMagnetRandom(String str) -{ - strings.add(str); - - int r = (int)random(0,5); - fonts.add(r); - - coordsX.add((int)random(20,width-textWidth(str))); - - // don't let the random words go over my name - coordsY.add((int)random(20,height-60)); - widths.add((int)textWidth(str)); - numMagnets++; -} - -void addMagnet(String str, int x, int y) -{ - strings.add(str); - coordsX.add(x); - coordsY.add(y); - widths.add((int)textWidth(str)); - fonts.add(1); - numMagnets++; -} - -// -// -// -void drawMagnets() -{ - stroke(0); - - for(int i=0; i < strings.size(); i++) - { - if( i != isHoldingMagnet) - { - strokeWeight(2); - fill(250 - fonts.get(i)*30,20 + fonts.get(i)*40, 255); - - switch(fonts.get(i)){ - case 0: textFont(arial,16);break; - case 1: textFont(verdana,10);break; - case 2: textFont(helvetica,18);break; - case 3: textFont(courier, 25);break; - case 4: textFont(comic, 20);break; - } - rect((int)coordsX.get(i), (int)coordsY.get(i), textWidth((String)strings.get(i)), MAGNET_HEIGHT); - fill(0); - - text((String)strings.get(i), (int)coordsX.get(i), (int)coordsY.get(i)+15); - } - } - - // - if( isHoldingMagnet != -1) - { - int i = isHoldingMagnet; - - switch(fonts.get(i)){ - case 0: textFont(arial,16);break; - case 1: textFont(verdana,10);break; - case 2: textFont(helvetica,18);break; - case 3: textFont(courier, 25);break; - case 4: textFont(comic, 20);break; - } - - // shadow - noStroke(); - fill(0,0,0,150); - rect(mouseX-clickedOffsetX, mouseY-clickedOffsetY, textWidth((String)strings.get(i)),MAGNET_HEIGHT); - - strokeWeight(2); - stroke(0); - fill(255,255,255); - - rect(mouseX-clickedOffsetX-5,mouseY-clickedOffsetY-5, textWidth((String)strings.get(i)),MAGNET_HEIGHT); - - fill(0); - - text((String)strings.get(i), mouseX-clickedOffsetX-5, mouseY-clickedOffsetY+10); - } -} - -// -// -// -void draw() -{ - background(255); - - // canvas border - strokeWeight(1); - stroke(100); - noFill(); - rect(0,0,width,height); - - drawMagnets(); - - // User tries to pick up a magnet - if(mousePressed && isHoldingMagnet == -1) - { - // did he pick up a magnet or miss? - int indexOfMagnet = -1; - - int mx = mouseX; - int my = mouseY; - - // Pick up the LAST magnet drawn out of all - // the magnets the user clicked on which - // will be the 'top' magnet. - for(int i = 0; i < numMagnets; i++) - { - if( mx > coordsX.get(i) && - mx < coordsX.get(i) + textWidth((String)strings.get(i)) && - my >= coordsY.get(i) && - my <= coordsY.get(i) + 20 ){ - // keep overwriting the value - isHoldingMagnet = i; - - clickedOffsetX = mx - coordsX.get(i); - clickedOffsetY = my - coordsY.get(i); - } - } - } - - // if the user picked up a magnet and dropped it - if(!mousePressed && isHoldingMagnet != -1) - { - coordsX[isHoldingMagnet] = mouseX - clickedOffsetX; - coordsY[isHoldingMagnet] = mouseY - clickedOffsetY; - - int idx = isHoldingMagnet; - - // save values - String s = (String)strings.get(idx); - int x = (int)coordsX.get(idx); - int y = (int)coordsY.get(idx); - int w = (int)widths.get(idx); - int f = (int)fonts.get(idx); - - // remove - strings.remove(idx); - coordsX.remove(idx); - coordsY.remove(idx); - widths.remove(idx); - fonts.remove(idx); - - // add to end of list - strings.add(s); - coordsX.add(x); - coordsY.add(y); - widths.add(w); - fonts.add(f); - - isHoldingMagnet = -1; - } -} \ No newline at end of file diff --git a/examples/seneca/textWidth/2d/tests/test.html b/examples/seneca/textWidth/2d/tests/test.html deleted file mode 100644 index 0b48e8386..000000000 --- a/examples/seneca/textWidth/2d/tests/test.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 455

- -

This pages tests the textWidth function for Processing.js using different fonts and sizes.
- The numbers beside the text are the result of calling textWidth(). At the top of each column is the font used and size.
- If red lines entirely 'underline' text, tests have passed.
-

- -

- -

- -
-// Test by Andor Salga
-int y = 20;
-int x = 10;
-PFont font;
-
-void setup(){
-  size(1500,500);
-
-  fill(0);
-  stroke(255,0,0);
-  strokeWeight(2);
-
-  font = loadFont("comic sans MS");
-  textFont(font);
-  textSize(18);
-  runTests("comic sans MS");
-
-  x += 300;
-  y = 20;
-
-  font = loadFont("Arial");
-  textFont(font);
-  textSize(25);
-  runTests("Arial");
-
-  x += 350;
-  y = 20;
-
-  font = loadFont("verdana");
-  textFont(font);
-  textSize(18);
-  runTests("verdana");
-
-  x += 350;
-  y = 20;
-
-  font = loadFont("helvetica");
-  textFont(font);
-  textSize(22);
-  runTests("helvetica");
-}
-
-void runTest(String a){
-  line(x,y, x+textWidth(a),y);
-  text(a + "(" +textWidth(a) + ")",x,y);
-  y += 20;
-}
-
-
-void runTests(font){
-  runTest(font);
-
-  runTest("");
-  runTest(" ");
-  runTest("  ");
-
-  runTest("A");
-  runTest("AA");
-  runTest("AAA");
-  runTest(".A.A.A.A.A.A");
-
-  runTest("i");
-  runTest(".");
-  runTest(",");
-  runTest("(");
-  runTest("_");
-  runTest("~");
-  runTest("#");
-  runTest("@");
-  
-  runTest("1234567890");
-  runTest("This is a test.");
-  runTest("lalalalalala");
-  runTest("The brown fox loves pjs");
-
-  runTest("////////////");
-  runTest("..........");
-  runTest("$%^)(*%&#*(&@#%($*&");
-  runTest("This_is_a_test");
-  runTest("~~~~~~~~~");
-}
- - diff --git a/examples/seneca/textWidth/2d/tests/test.pjs b/examples/seneca/textWidth/2d/tests/test.pjs deleted file mode 100644 index 2dcaad74f..000000000 --- a/examples/seneca/textWidth/2d/tests/test.pjs +++ /dev/null @@ -1,82 +0,0 @@ -// Andor Salga - -int y = 20; -int x = 10; -PFont font; - -void setup(){ - size(1500,500); - - fill(0); - stroke(255,0,0); - strokeWeight(2); - - font = loadFont("comic sans MS"); - textFont(font); - textSize(18); - runTests("comic sans MS [" + "18]"); - - x += 300; - y = 20; - - font = loadFont("Arial"); - textFont(font); - textSize(25); - runTests("Arial [" + "25]"); - - x += 350; - y = 20; - - font = loadFont("verdana"); - textFont(font); - textSize(18); - runTests("verdana [" + "18]"); - - x += 350; - y = 20; - - font = loadFont("helvetica"); - textFont(font); - textSize(22); - runTests("helvetica [" + "22]"); -} - -void runTest(String a){ - line(x,y, x+textWidth(a),y); - text(a + "(" +textWidth(a) + ")",x,y); - y += 20; -} - - -void runTests(font){ - runTest(font); - - runTest(""); - runTest(" "); - runTest(" "); - - runTest("A"); - runTest("AA"); - runTest("AAA"); - runTest(".A.A.A.A.A.A"); - - runTest("i"); - runTest("."); - runTest(","); - runTest("("); - runTest("_"); - runTest("~"); - runTest("#"); - runTest("@"); - - runTest("1234567890"); - runTest("This is a test."); - runTest("lalalalalala"); - runTest("The brown fox loves pjs"); - - runTest("////////////"); - runTest(".........."); - runTest("$%^)(*%&#*(&@#%($*&"); - runTest("This_is_a_test"); - runTest("~~~~~~~~~"); -} \ No newline at end of file diff --git a/examples/seneca/textWidth/2d/tests/test2.html b/examples/seneca/textWidth/2d/tests/test2.html deleted file mode 100644 index 4592e1253..000000000 --- a/examples/seneca/textWidth/2d/tests/test2.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - Processing.js test of textWidth() - - - - -

textWidth() tests

-

- - - -
-

-	
- -
- - - diff --git a/examples/seneca/textWidth/3d/test/test.html b/examples/seneca/textWidth/3d/test/test.html deleted file mode 100644 index d7174774a..000000000 --- a/examples/seneca/textWidth/3d/test/test.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - -

Andor Salga

-

Test for bug 594

- -

This pages tests the textWidth function (in 3D) for Processing.js using different fonts and sizes.
- The numbers beside the text are the result of calling textWidth(). At the top of each column is the font used and size.
- If red lines entirely 'underline' text, tests have passed.
-

- -

- -

- -
-// Test by Andor Salga
-
-int y = 20;
-int x = 0;
-PFont font;
-
-void setup(){
-  size(1500,500, OPENGL);
-
-  fill(0);
-  stroke(255,0,0);
-  strokeWeight(2);
-
-  font = loadFont("comic sans MS");
-  textFont(font);
-  textSize(18);
-  runTests("comic sans MS [" + "18]");
-
-  x += 300;
-  y = 20;
-
-  font = loadFont("Arial");
-  textFont(font);
-  textSize(25);
-  runTests("Arial [" + "25]");
-
-  x += 350;
-  y = 20;
-
-  font = loadFont("verdana");
-  textFont(font);
-  textSize(18);
-  runTests("verdana [" + "18]");
-
-  x += 350;
-  y = 20;
-
-  font = loadFont("helvetica");
-  textFont(font);
-  textSize(22);
-  runTests("helvetica [" + "22]");
-}
-
-void runTest(String a){
-  line(x+10, y + 7, x+textWidth(a) + 10, y+ 7);
-  text(a + "(" +textWidth(a) + ")",x ,y);
-  y += 20;
-}
-
-
-void runTests(font){
-  runTest(font);
-
-  runTest("");
-  runTest(" ");
-  runTest("  ");
-
-  runTest("A");
-  runTest("AA");
-  runTest("AAA");
-  runTest(".A.A.A.A.A.A");
-
-  runTest("i");
-  runTest(".");
-  runTest(",");
-  runTest("(");
-  runTest("_");
-  runTest("~");
-  runTest("#");
-  runTest("@");
-  
-  runTest("1234567890");
-  runTest("This is a test.");
-  runTest("lalalalalala");
-  runTest("The brown fox loves pjs");
-
-  runTest("////////////");
-  runTest("..........");
-  runTest("$%^)(*%&#*(&@#%($*&");
-  runTest("This_is_a_test");
-  runTest("~~~~~~~~~");
-}
- - diff --git a/examples/seneca/textWidth/3d/test/test.pjs b/examples/seneca/textWidth/3d/test/test.pjs deleted file mode 100644 index 42f9b6699..000000000 --- a/examples/seneca/textWidth/3d/test/test.pjs +++ /dev/null @@ -1,86 +0,0 @@ -// Andor Salga - -int y = 20; -int x = 0; -PFont font; -int lineOffset = 8; - -void setup(){ - size(1300,550, OPENGL); - - fill(0); - stroke(255,0,0); - strokeWeight(2); - - font = loadFont("comic sans MS"); - textFont(font); - textSize(18); - runTests("comic sans MS [" + "18]"); - - x += 300; - y = 20; - lineOffset -= 5; - - font = loadFont("Arial"); - textFont(font); - textSize(25); - runTests("Arial [" + "25]"); - - x += 350; - y = 20; - lineOffset -= 7; - - font = loadFont("verdana"); - textFont(font); - textSize(18); - runTests("verdana [" + "18]"); - - x += 350; - y = 20; - lineOffset -= 10; - - font = loadFont("helvetica"); - textFont(font); - textSize(22); - runTests("helvetica [" + "22]"); -} - -void runTest(String a){ - line(x+lineOffset, y + 10, x+textWidth(a) + lineOffset, y+ 10); - text(a + "(" +textWidth(a) + ")",x ,y); - y += 20; -} - - -void runTests(font){ - runTest(font); - - runTest(""); - runTest(" "); - runTest(" "); - - runTest("A"); - runTest("AA"); - runTest("AAA"); - runTest(".A.A.A.A.A.A"); - - runTest("i"); - runTest("."); - runTest(","); - runTest("("); - runTest("_"); - runTest("~"); - runTest("#"); - runTest("@"); - - runTest("1234567890"); - runTest("This is a test."); - runTest("lalalalalala"); - runTest("The brown fox loves pjs"); - - runTest("////////////"); - runTest(".........."); - runTest("$%^)(*%&#*(&@#%($*&"); - runTest("This_is_a_test"); - runTest("~~~~~~~~~"); -} \ No newline at end of file diff --git a/examples/seneca/textWidth/3d/test/test2.html b/examples/seneca/textWidth/3d/test/test2.html deleted file mode 100644 index 2b7872d79..000000000 --- a/examples/seneca/textWidth/3d/test/test2.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - Processing.js test of textWidth() - - - - -

textWidth() tests

-

- - - -
-

-	
- -
- - - diff --git a/examples/seneca/tint/string.jpg b/examples/seneca/tint/string.jpg deleted file mode 100644 index 240fc2b39..000000000 Binary files a/examples/seneca/tint/string.jpg and /dev/null differ diff --git a/examples/seneca/tint/tint.htm b/examples/seneca/tint/tint.htm deleted file mode 100644 index 29b7b649f..000000000 --- a/examples/seneca/tint/tint.htm +++ /dev/null @@ -1,15 +0,0 @@ - - - - -
-/* @pjs preload="string.jpg"; */
-size(472,266);
-background(0);
-PImage b;
-b = loadImage("string.jpg");
-tint(0, 153, 204); // Tint blue
-image(b, 0, 0);
-noTint(); // Disable tint
-image(b, 50, 0);
-
\ No newline at end of file diff --git a/examples/seneca/tint/tint.pjs b/examples/seneca/tint/tint.pjs deleted file mode 100644 index 589152a04..000000000 --- a/examples/seneca/tint/tint.pjs +++ /dev/null @@ -1,9 +0,0 @@ -/* @pjs preload="string.jpg"; */ -size(472,266); -background(0); -PImage b; -b = loadImage("string.jpg"); -tint(0, 153, 204); // Tint blue -image(b, 0, 0); -noTint(); // Disable tint -image(b, 50, 0); \ No newline at end of file diff --git a/examples/seneca/touchevents/multitouchevents.html b/examples/seneca/touchevents/multitouchevents.html deleted file mode 100644 index 5f5356b5e..000000000 --- a/examples/seneca/touchevents/multitouchevents.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - Processing.js test of multi touch event handling - - - - -

Multi touch event handling

-

Presents a grey 700x700 sketch that can only be drawn on with a touchscreen

-

Each finger draws a different colour. Will not do anything with a mouse

- - - -
-
-	
- -
- - - diff --git a/examples/seneca/touchevents/simpletouchevents.html b/examples/seneca/touchevents/simpletouchevents.html deleted file mode 100644 index b90ba40e4..000000000 --- a/examples/seneca/touchevents/simpletouchevents.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - Processing.js test of simple touch event handling - - - - -

Simple touch event handling

-

Presents a grey 300x300 sketch that can be drawn on by mouse or touchscreen

-

Should work on both device types without any changes to your sketch code

- - - -
-
-	
- -
- - - diff --git a/examples/seneca/triangle/p5_result.png b/examples/seneca/triangle/p5_result.png deleted file mode 100644 index b85df1b8f..000000000 Binary files a/examples/seneca/triangle/p5_result.png and /dev/null differ diff --git a/examples/seneca/triangle/triangle-3d.html b/examples/seneca/triangle/triangle-3d.html deleted file mode 100644 index 2a98d73fb..000000000 --- a/examples/seneca/triangle/triangle-3d.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - -

triangle() test in a 3D context

- -

- - -

- -
-size(100, 100, P3D);
-background(200);
-box(10);
-triangle(30, 75, 58, 20, 86, 75);
-    
- - \ No newline at end of file diff --git a/examples/seneca/triangle/triangle-3d.pjs b/examples/seneca/triangle/triangle-3d.pjs deleted file mode 100644 index b03052dff..000000000 --- a/examples/seneca/triangle/triangle-3d.pjs +++ /dev/null @@ -1,4 +0,0 @@ -size(100, 100, P3D); -background(200); -box(10); -triangle(30, 75, 58, 20, 86, 75); \ No newline at end of file diff --git a/examples/seneca/trim/trim.pjs b/examples/seneca/trim/trim.pjs deleted file mode 100644 index 1afa80c0d..000000000 --- a/examples/seneca/trim/trim.pjs +++ /dev/null @@ -1,33 +0,0 @@ -// Trim example -size(500,220); -background(20); -stroke(128, 128, 128); -fill(64); -rect(1, 1, width-3, height-3); - -String s1 = "normal string"; -String s2 = " extra leading spaces"; -String s3 = "extra trailing spaces "; -String s4 = " both leading and trailing "; -String[] a = { " inconsistent ", " spacing", "ok", " tab at the end "}; -String[] a2 = trim(a); - -PFont font; -font = loadFont("Arial"); -textFont(font, 14); -fill(32, 255, 0); -text("Strings", 5, 20); -text("String Arrays", 5, 120); -fill(255, 255, 255); -text("s1: |" + s1 + "|", 15, 40); -text("after: |" + trim(s1) + "|", 240, 40); -text("s2: |" + s2 + "|", 15, 60); -text("after: |" + trim(s2) + "|", 240, 60); -text("s3: |" + s3 + "|", 15, 80); -text("after: |" + trim(s3) + "|", 240, 80); -text("s4: |" + s4 + "|", 15, 100); -text("after: |" + trim(s4) + "|", 240, 100); -for(int i=0; i - - - Processing.js test of trim() - - - - - -

- - trim() test

-

- This is a test of trim(string)

-

- trim() removes whitespace characters from the beginning and end of a String. In addition to standard whitespace characters such as space, carriage return, and tab, this function also removes the Unicode "nbsp" character.

- - - -
- Test written by Daniel Hodgin
-

- Source Code:

-
-// 	Trim example
-size(500,220, P3D);
-background(20);
-stroke(128, 128, 128);
-fill(64);
-rect(1, 1, width-3, height-3);
-
-String s1 = "normal string";
-String s2 = "   extra leading spaces";
-String s3 = "extra trailing spaces    ";
-String s4 = "   both leading and trailing   ";
-String[] a = { "    inconsistent ", "  spacing", "ok", "     tab at the end   	"};
-String[] a2 = trim(a);
-
-PFont font;
-font = loadFont("Arial"); 
-textFont(font, 14);
-fill(32, 255, 0);
-text("Strings", 5, 20);
-text("String Arrays", 5, 120);
-fill(255, 255, 255);
-text("s1: |" + s1 + "|", 15, 40);
-text("after: |" + trim(s1) + "|", 240, 40);
-text("s2: |" + s2 + "|", 15, 60);
-text("after: |" + trim(s2) + "|", 240, 60);
-text("s3: |" + s3 + "|", 15, 80);
-text("after: |" + trim(s3) + "|", 240, 80);
-text("s4: |" + s4 + "|", 15, 100);
-text("after: |" + trim(s4) + "|", 240, 100);
-for(int i=0; i<a2.length; i++){
-  text("a[" + i + "]: |" + a[i] + "|", 15, 140+(i*20));
-  text("after: |" + a2[i] + "|", 240, 140+(i*20));
-}
-        
-
- - diff --git a/examples/seneca/xml (1806)/index.html b/examples/seneca/xml (1806)/index.html deleted file mode 100755 index 75027aa92..000000000 --- a/examples/seneca/xml (1806)/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Processing.js test of trim() - - - -

P5 2.0 loadXML test

- -

This test tries to load test.xml as an XML object

- - - - - diff --git a/examples/seneca/xml (1806)/test.xml b/examples/seneca/xml (1806)/test.xml deleted file mode 100755 index 34ba591b6..000000000 --- a/examples/seneca/xml (1806)/test.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Processing - Processing Mobile - diff --git a/examples/style.css b/examples/style.css deleted file mode 100644 index d730defb7..000000000 --- a/examples/style.css +++ /dev/null @@ -1,50 +0,0 @@ -html, body { - background: #EEE; - font-family: Arial; - font-size: 13px; - margin: 0; - padding: 0; -} - -h1 { - background: #385C85; - color: #FFF; - padding: 10px; - padding-left: 20px; - margin-top: 0px; -} - -h1 a { - color: #FFF; -} - -h2 { - padding-left: 20px; -} - -p { - padding-left: 20px; - line-height: 1.3em; -} - -p a { - color: #385C85; -} - -canvas { - margin: 10px 0; -} - -pre { - margin-left: 20px; - margin-right: 20px; - padding: 5px; - background: #FFF; - border-top: 1px solid #333; - border-bottom: 1px solid #333; -} - -div.ref-col { - float: left; - width: 32%; -} diff --git a/examples/topics/animatedsprite.html b/examples/topics/animatedsprite.html deleted file mode 100644 index c04a1cfec..000000000 --- a/examples/topics/animatedsprite.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - -

Processing.js

-

AnimatedSprite

- -

by James Patterson. - -Removed because AniSprite is not part of core processing - -Press the mouse button to change animations. -Demonstrates loading, displaying, and animating GIF images. -It would be easy to write a program to display -animated GIFs, but would not allow as much control over -the display sequence and rate of display.

- -

Original Processing.org Example: AnimatedSprite
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-AniSprite animation1, animation2;
-float xpos, ypos;
-float drag = 30.0;
-
-void setup() {
-  size(200, 200);
-  background(255, 204, 0);
-  frameRate(24);
-  animation1 = new AniSprite("PT_Shifty_00", 38);
-  animation2 = new AniSprite("PT_Teddy_00", 60);
-}
-
-void draw() { 
-  float difx = mouseX - xpos;
-  if (abs(difx) > 1.0) {
-    xpos = xpos + difx/drag;
-    xpos = constrain(xpos, 0, width);
-  }
-
-  // Display the sprite at the position xpos, ypos
-  if (mousePressed) {
-    background(153, 153, 0);
-    animation1.display(xpos-animation1.getWidth()/2, ypos);
-  } else {
-    background(255, 204, 0);
-    animation2.display(xpos-animation1.getWidth()/2, ypos);
-  }
-}
- - diff --git a/examples/topics/animator.html b/examples/topics/animator.html deleted file mode 100644 index f3514bf30..000000000 --- a/examples/topics/animator.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - -

Processing.js

-

Animator

- -

A simple animation tool that displays a continuous cycle of -twelve images. Each image is displayed for 100 milliseconds -(one tenth of a second) to create animation. While each image -is displayed, its possible to draw directly into it by -pressing the mouse and moving the cursor. Start drawing to get -it started.

- -

Original Processing.org Example: Animator
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int currentFrame = 0;
-PImage[] frames = new PImage[12];
-int lastTime = 0;
-
-void setup() 
-{
-  size(200, 200);
-  strokeWeight(4);
-  smooth();
-  background(204);
-  for (int i = 0; i < frames.length; i++) {
-    frames[i] = get(); // Create a blank frame
-  }
-}
-
-void draw() 
-{
-  int currentTime = millis();
-  if (currentTime > lastTime+100) {
-    nextFrame();
-    lastTime = currentTime;
-  }
-  if (mousePressed == true) {
-    line(pmouseX, pmouseY, mouseX, mouseY);
-  }
-}
-
-void nextFrame() 
-{
-  frames[currentFrame] = get(); // Get the display window
-  currentFrame++; // Increment to next frame
-  if (currentFrame >= frames.length) {
-    currentFrame = 0;
-  }
-  image(frames[currentFrame], 0, 0);
-}
- - diff --git a/examples/topics/anisprite.html b/examples/topics/anisprite.html deleted file mode 100644 index 835cab393..000000000 --- a/examples/topics/anisprite.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - -

Processing.js

-

AniSprite

- -

- -

Original Processing.org Example: AniSprite
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// Class for animating a sequence of GIFs
-
-class AniSprite {
-  PImage[] ani;
-  int frame;
-  int numFrames;
-  
-  AniSprite(String imageName, int frameCount) {
-    numFrames = frameCount;
-    ani = new PImage[numFrames];
-    loadImages(imageName);
-  }
-
-  void loadImages(String name) {
-    for(int i=0; i<numFrames; i++) {
-      String imageName = name + ((i < 10) ? "0" : "") + i + ".gif";
-      ani[i] = loadImage(imageName);
-    }
-  }
-
-  void display(float xpos, float ypos) {
-    frame = (frame+1)%numFrames;
-    image(ani[frame], xpos, ypos);
-  }
-  
-  int getWidth() {
-    return ani[0].width;
-  }
-}
- - diff --git a/examples/topics/blur.html b/examples/topics/blur.html deleted file mode 100644 index 5c5031fcf..000000000 --- a/examples/topics/blur.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - -

Processing.js

-

Blur

- -

Known to be broken. Needs a re-write of p.createImage(). Bug #243

- -

Bluring half of an image by processing it through a low-pass filter.

- -

Original Processing.org Example: Blur
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200); 
-PImage a;  // Declare variable "a" of type PImage 
-a = loadImage("trees.jpg"); // Load the images into the program 
-
-float v = 1.0/9.0;
-float[][] kernel = { { v, v, v },
-                     { v, v, v },
-                     { v, v, v } };
-  
-size(200, 200);
-PImage img = loadImage("trees.jpg"); // Load the original image
-image(a, 0, 0); // Displays the image from point (0,0) 
-img.loadPixels();
-// Create an opaque image of the same size as the original
-PImage edgeImg = createImage(img.width, img.height, RGB);
-// Loop through every pixel in the image.
-for (int y = 1; y < img.height-1; y++) { // Skip top and bottom edges
-  for (int x = 1; x < img.width-1; x++) { // Skip left and right edges
-    float sum = 0; // Kernel sum for this pixel
-    for (int ky = -1; ky <= 1; ky++) {
-      for (int kx = -1; kx <= 1; kx++) {
-        // Calculate the adjacent pixel for this kernel point
-        int pos = (y + ky)*width + (x + kx);
-        // Image is grayscale, red/green/blue are identical
-        float val = red(img.pixels[pos]);
-        // Multiply adjacent pixels based on the kernel values
-        sum += kernel[ky+1][kx+1] * val;
-      }
-    }
-    // For this pixel in the new image, set the gray value
-    // based on the sum from the kernel
-    edgeImg.pixels[y*img.width + x] = color(sum);
-  }
-}
-// State that there are changes to edgeImg.pixels[]
-edgeImg.updatePixels();
-image(edgeImg, 100, 0); // Draw the new image
- - diff --git a/examples/topics/bounce.html b/examples/topics/bounce.html deleted file mode 100644 index 39ed5913d..000000000 --- a/examples/topics/bounce.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - -

Processing.js

-

Bounce

- -

When the shape hits the edge of the window, it reverses its direction.

- -

Original Processing.org Example: Bounce
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int size = 60;       // Width of the shape
-float xpos, ypos;    // Starting position of shape    
-
-float xspeed = 2.8;  // Speed of the shape
-float yspeed = 2.2;  // Speed of the shape
-
-int xdirection = 1;  // Left or Right
-int ydirection = 1;  // Top to Bottom
-
-
-void setup() 
-{
-  size(200, 200);
-  noStroke();
-  frameRate(30);
-  smooth();
-  // Set the starting position of the shape
-  xpos = width/2;
-  ypos = height/2;
-}
-
-void draw() 
-{
-  background(102);
-  
-  // Update the position of the shape
-  xpos = xpos + ( xspeed * xdirection );
-  ypos = ypos + ( yspeed * ydirection );
-  
-  // Test to see if the shape exceeds the boundaries of the screen
-  // If it does, reverse its direction by multiplying by -1
-  if (xpos > width-size || xpos < 0) {
-    xdirection *= -1;
-  }
-  if (ypos > height-size || ypos < 0) {
-    ydirection *= -1;
-  }
-
-  // Draw the shape
-  ellipse(xpos+size/2, ypos+size/2, size, size);
-}
- - diff --git a/examples/topics/bouncybubbles.html b/examples/topics/bouncybubbles.html deleted file mode 100644 index 40f9e7d50..000000000 --- a/examples/topics/bouncybubbles.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - -

Processing.js

-

BouncyBubbles

- -

Based on code from Keith Peters (www.bit-101.com). - -Multiple-object collision.

- -

Original Processing.org Example: BouncyBubbles
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int numBalls = 12;
-float spring = 0.05;
-float gravity = 0.03;
-Ball[] balls = new Ball[numBalls];
-
-void setup() 
-{
-  size(200, 200);
-  noStroke();
-  smooth();
-  for (int i = 0; i < numBalls; i++) {
-    balls[i] = new Ball(random(width), random(height), random(20, 40), i, balls);
-  }
-}
-
-void draw() 
-{
-  background(0);
-  for (int i = 0; i < numBalls; i++) {
-    balls[i].collide();
-    balls[i].move();
-    balls[i].display();  
-  }
-}
-
-class Ball {
-  float x, y;
-  float diameter;
-  float vx = 0;
-  float vy = 0;
-  int id;
-  Ball[] others;
- 
-  Ball(float xin, float yin, float din, int idin, Ball[] oin) {
-    x = xin;
-    y = yin;
-    diameter = din;
-    id = idin;
-    others = oin;
-  } 
-  
-  void collide() {
-    for (int i = id + 1; i < numBalls; i++) {
-      float dx = others[i].x - x;
-      float dy = others[i].y - y;
-      float distance = sqrt(dx*dx + dy*dy);
-      float minDist = others[i].diameter/2 + diameter/2;
-      if (distance < minDist) { 
-        float angle = atan2(dy, dx);
-        float targetX = x + cos(angle) * minDist;
-        float targetY = y + sin(angle) * minDist;
-        float ax = (targetX - others[i].x) * spring;
-        float ay = (targetY - others[i].y) * spring;
-        vx -= ax;
-        vy -= ay;
-        others[i].vx += ax;
-        others[i].vy += ay;
-      }
-    }   
-  }
-  
-  void move() {
-    vy += gravity;
-    x += vx;
-    y += vy;
-    if (x + diameter/2 > width) {
-      x = width - diameter/2;
-      vx += -0.9; 
-    }
-    else if (x - diameter/2 < 0) {
-      x = diameter/2;
-      vx *= -0.9;
-    }
-    if (y + diameter/2 > height) {
-      y = height - diameter/2;
-      vy *= -0.9; 
-    } 
-    else if (y - diameter/2 < 0) {
-      y = diameter/2;
-      vy *= -0.9;
-    }
-  }
-  
-  void display() {
-    fill(255, 204);
-    ellipse(x, y, diameter, diameter);
-  }
-}
- - diff --git a/examples/topics/brightness.html b/examples/topics/brightness.html deleted file mode 100644 index f2782418c..000000000 --- a/examples/topics/brightness.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - -

Processing.js

-

Brightness

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading.

- -

by Daniel Shiffman. - -Adjusts the brightness of part of the image -Pixels closer to the mouse will appear brighter.

- -

Original Processing.org Example: Brightness
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-PImage img;
-
-void setup() {
-  size(200, 200);
-  frameRate(30);
-  img = loadImage("data/cait.jpg");
-}
-
-void draw() {
-  loadPixels();
-  for (int x = 0; x < img.width; x++) {
-    for (int y = 0; y < img.height; y++ ) {
-      // Calculate the 1D location from a 2D grid
-      int loc = x + y*img.width;
-      // Get the R,G,B values from image
-      float r,g,b;
-      r = red (img.pixels[loc]);
-      //g = green (img.pixels[loc]);
-      //b = blue (img.pixels[loc]);
-      // Calculate an amount to change brightness based on proximity to the mouse
-      float maxdist = 50;//dist(0,0,width,height);
-      float d = dist(x,y,mouseX,mouseY);
-      float adjustbrightness = 255*(maxdist-d)/maxdist;
-      r += adjustbrightness;
-      //g += adjustbrightness;
-      //b += adjustbrightness;
-      // Constrain RGB to make sure they are within 0-255 color range
-      r = constrain(r,0,255);
-      //g = constrain(g,0,255);
-      //b = constrain(b,0,255);
-      // Make a new color and set pixel in the window
-      //color c = color(r,g,b);
-      color c = color(r);
-      pixels[loc] = c;
-    }
-  }
-  updatePixels();
-}
- - diff --git a/examples/topics/brownian.html b/examples/topics/brownian.html deleted file mode 100644 index 8788440d5..000000000 --- a/examples/topics/brownian.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - -

Processing.js

-

Brownian

- -

Recording random movement as a continuous line.

- -

Original Processing.org Example: Brownian
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int num = 2000;
-int range = 4;
-
-float[] ax = new float[num];
-float[] ay = new float[num]; 
-
-
-void setup() 
-{
-  size(200, 200);
-  for(int i=0; i<num; i++) {
-    ax[i] = 50;
-    ay[i] = height/2;
-  }
-  frameRate(30);
-}
-
-void draw() 
-{
-  background(51);
-  
-  // Shift all elements 1 place to the left
-  for(int i=1; i<num; i++) {
-    ax[i-1] = ax[i];
-    ay[i-1] = ay[i];
-  }
-
-  // Put a new value at the end of the array
-  ax[num-1] += random(-range, range);
-  ay[num-1] += random(-range, range);
-
-  // Constrain all points to the screen
-  ax[num-1] = constrain(ax[num-1], 0, width);
-  ay[num-1] = constrain(ay[num-1], 0, height);
-  
-  // Draw a line connecting the points
-  for(int i=1; i<num; i++) {    
-    float val = float(i)/num * 204.0 + 51;
-    stroke(val);
-    line(ax[i-1], ay[i-1], ax[i], ay[i]);
-  }
-}
- - diff --git a/examples/topics/button.html b/examples/topics/button.html deleted file mode 100644 index ba3d23cf9..000000000 --- a/examples/topics/button.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - -

Processing.js

-

Button

- -

Click on one of the colored squares in the -center of the image to change the color of -the background.

- -

Original Processing.org Example: Button
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int rectX, rectY;      // Position of square button
-int circleX, circleY;  // Position of circle button
-int rectSize = 50;     // Diameter of rect
-int circleSize = 53;   // Diameter of circle
-color rectColor, circleColor, baseColor;
-color rectHighlight, circleHighlight;
-color currentColor;
-boolean rectOver = false;
-boolean circleOver = false;
-
-void setup()
-{
-  size(200, 200);
-  smooth();
-  rectColor = color(0);
-  rectHighlight = color(51);
-  circleColor = color(255);
-  circleHighlight = color(204);
-  baseColor = color(102);
-  currentColor = baseColor;
-  circleX = width/2+circleSize/2+10;
-  circleY = height/2;
-  rectX = width/2-rectSize-10;
-  rectY = height/2-rectSize/2;
-  ellipseMode(CENTER);
-}
-
-void draw()
-{
-  update(mouseX, mouseY);
-  background(currentColor);
-  
-  if(rectOver) {
-    fill(rectHighlight);
-  } else {
-    fill(rectColor);
-  }
-  stroke(255);
-  rect(rectX, rectY, rectSize, rectSize);
-  
-  if(circleOver) {
-    fill(circleHighlight);
-  } else {
-    fill(circleColor);
-  }
-  stroke(0);
-  ellipse(circleX, circleY, circleSize, circleSize);
-}
-
-void update(int x, int y)
-{
-  if( overCircle(circleX, circleY, circleSize) ) {
-    circleOver = true;
-    rectOver = false;
-  } else if ( overRect(rectX, rectY, rectSize, rectSize) ) {
-    rectOver = true;
-    circleOver = false;
-  } else {
-    circleOver = rectOver = false;
-  }
-}
-
-void mousePressed()
-{
-  if(circleOver) {
-    currentColor = circleColor;
-  }
-  if(rectOver) {
-    currentColor = rectColor;
-  }
-}
-
-boolean overRect(int x, int y, int width, int height) 
-{
-  if (mouseX >= x && mouseX <= x+width && 
-      mouseY >= y && mouseY <= y+height) {
-    return true;
-  } else {
-    return false;
-  }
-}
-
-boolean overCircle(int x, int y, int diameter) 
-{
-  float disX = x - mouseX;
-  float disY = y - mouseY;
-  if(sqrt(sq(disX) + sq(disY)) < diameter/2 ) {
-    return true;
-  } else {
-    return false;
-  }
-}
- - diff --git a/examples/topics/buttons.html b/examples/topics/buttons.html deleted file mode 100644 index a2b032dec..000000000 --- a/examples/topics/buttons.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - -

Processing.js

-

Buttons

- -

Click on one of the shapes to change -the background color. This example -demonstates a class for buttons.

- -

Original Processing.org Example: Buttons
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-color currentcolor;
-
-CircleButton circle1, circle2, circle3;
-RectButton rect1, rect2;
-
-boolean locked = false;
-
-void setup()
-{
-  size(200, 200);
-  smooth();
-
-  color baseColor = color(102);
-  currentcolor = baseColor;
-
-  // Define and create circle button
-  color buttoncolor = color(204);
-  color highlight = color(153);
-  ellipseMode(CENTER);
-  circle1 = new CircleButton(30, 100, 100, buttoncolor, highlight);
-
-  // Define and create rectangle button
-  buttoncolor = color(204);
-  highlight = color(153); 
-  circle2 = new CircleButton(130, 110, 24, buttoncolor, highlight);
-
-  // Define and create rectangle button
-  buttoncolor = color(153);
-  highlight = color(102); 
-  circle3 = new CircleButton(130, 140, 24, buttoncolor, highlight);
-
-  // Define and create rectangle button
-  buttoncolor = color(102);
-  highlight = color(51); 
-  rect1 = new RectButton(150, 20, 100, buttoncolor, highlight);
-
-  // Define and create rectangle button
-  buttoncolor = color(51);
-  highlight = color(0); 
-  rect2 = new RectButton(90, 20, 50, buttoncolor, highlight);
-}
-
-void draw()
-{
-  background(currentcolor);
-  stroke(255);
-  update(mouseX, mouseY);
-  circle1.display();
-  circle2.display();
-  circle3.display();
-  rect1.display();
-  rect2.display();
-}
-
-void update(int x, int y)
-{
-  if(locked == false) {
-    circle1.update();
-    circle2.update();
-    circle3.update();
-    rect1.update();
-    rect2.update();
-  } 
-  else {
-    locked = false;
-  }
-
-  if(mousePressed) {
-    if(circle1.pressed()) {
-      currentcolor = circle1.basecolor;
-    } 
-    else if(circle2.pressed()) {
-      currentcolor = circle2.basecolor;
-    } 
-    else if(circle3.pressed()) {
-      currentcolor = circle3.basecolor;
-    } 
-    else if(rect1.pressed()) {
-      currentcolor = rect1.basecolor;
-    } 
-    else if(rect2.pressed()) {
-      currentcolor = rect2.basecolor;
-    }
-  }
-}
-
-
-class Button
-{
-  int x, y;
-  int size;
-  color basecolor, highlightcolor;
-  color currentcolor;
-  boolean over = false;
-  boolean pressed = false;   
-
-  void update() 
-  {
-    if(over()) {
-      currentcolor = highlightcolor;
-    } 
-    else {
-      currentcolor = basecolor;
-    }
-  }
-
-  boolean pressed() 
-  {
-    if(over) {
-      locked = true;
-      return true;
-    } 
-    else {
-      locked = false;
-      return false;
-    }    
-  }
-
-  boolean over() 
-  { 
-    return true; 
-  }
-
-  boolean overRect(int x, int y, int width, int height) 
-  {
-    if (mouseX >= x && mouseX <= x+width && 
-      mouseY >= y && mouseY <= y+height) {
-      return true;
-    } 
-    else {
-      return false;
-    }
-  }
-
-  boolean overCircle(int x, int y, int diameter) 
-  {
-    float disX = x - mouseX;
-    float disY = y - mouseY;
-    if(sqrt(sq(disX) + sq(disY)) < diameter/2 ) {
-      return true;
-    } 
-    else {
-      return false;
-    }
-  }
-
-}
-
-class CircleButton extends Button
-{ 
-  CircleButton(int ix, int iy, int isize, color icolor, color ihighlight) 
-  {
-    x = ix;
-    y = iy;
-    size = isize;
-    basecolor = icolor;
-    highlightcolor = ihighlight;
-    currentcolor = basecolor;
-  }
-
-  boolean over() 
-  {
-    if( overCircle(x, y, size) ) {
-      over = true;
-      return true;
-    } 
-    else {
-      over = false;
-      return false;
-    }
-  }
-
-  void display() 
-  {
-    stroke(255);
-    fill(currentcolor);
-    ellipse(x, y, size, size);
-  }
-}
-
-class RectButton extends Button
-{
-  RectButton(int ix, int iy, int isize, color icolor, color ihighlight) 
-  {
-    x = ix;
-    y = iy;
-    size = isize;
-    basecolor = icolor;
-    highlightcolor = ihighlight;
-    currentcolor = basecolor;
-  }
-
-  boolean over() 
-  {
-    if( overRect(x, y, size, size) ) {
-      over = true;
-      return true;
-    } 
-    else {
-      over = false;
-      return false;
-    }
-  }
-
-  void display() 
-  {
-    stroke(255);
-    fill(currentcolor);
-    rect(x, y, size, size);
-  }
-}
- - diff --git a/examples/topics/chain.html b/examples/topics/chain.html deleted file mode 100644 index 15696379f..000000000 --- a/examples/topics/chain.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - -

Processing.js

-

Chain

- -

One mass is attached to the mouse position and the other -is attached the position of the other mass. The gravity -in the environment pulls down on both.

- -

Original Processing.org Example: Chain
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-Spring2D s1, s2;
-
-float gravity = 6.0;
-float mass = 2.0;
-
-void setup() 
-{
-  size(200, 200);
-  smooth();
-  fill(0);
-  // Inputs: x, y, mass, gravity
-  s1 = new Spring2D(0.0, width/2, mass, gravity);
-  s2 = new Spring2D(0.0, width/2, mass, gravity);
-}
-
-void draw() 
-{
-  background(204);
-  s1.update(mouseX, mouseY);
-  s1.display(mouseX, mouseY);
-  s2.update(s1.x, s1.y);
-  s2.display(s1.x, s1.y);
-}
-
-class Spring2D {
-  float vx, vy; // The x- and y-axis velocities
-  float x, y; // The x- and y-coordinates
-  float gravity;
-  float mass;
-  float radius = 20;
-  float stiffness = 0.2;
-  float damping = 0.7;
-  
-  Spring2D(float xpos, float ypos, float m, float g) {
-    x = xpos;
-    y = ypos;
-    mass = m;
-    gravity = g;
-  }
-  
-  void update(float targetX, float targetY) {
-    float forceX = (targetX - x) * stiffness;
-    float ax = forceX / mass;
-    vx = damping * (vx + ax);
-    x += vx;
-    float forceY = (targetY - y) * stiffness;
-    forceY += gravity;
-    float ay = forceY / mass;
-    vy = damping * (vy + ay);
-    y += vy;
-  }
-  
-  void display(float nx, float ny) {
-    noStroke();
-    ellipse(x, y, radius*2, radius*2);
-    stroke(255);
-    line(x, y, nx, ny);
-  }
-}
- - diff --git a/examples/topics/circlecollision.html b/examples/topics/circlecollision.html deleted file mode 100644 index 00f43d050..000000000 --- a/examples/topics/circlecollision.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - -

Processing.js

-

CircleCollision

- -

by Ira Greenberg. - -Based on Keith Peter's Solution in -Foundation Actionscript Animation: -Making Things Move! -http://www.friendsofed.com/book.html?isbn=1590597915

- -

Original Processing.org Example: CircleCollision
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-Ball[] balls =  { 
-  new Ball(100, 400, 10), 
-  new Ball(700, 400, 40) 
-  };
-
-Vect2D[] vels = { 
-  new Vect2D(2.15, -1.35), 
-  new Vect2D(-1.65, .42) 
-  };
-
-void setup(){
-  size(200, 200);
-  smooth();
-  noStroke();
-}
-
-void draw(){
-  background(51);
-  fill(204);
-  for (int i=0; i< 2; i++){
-    balls[i].x += vels[i].vx;
-    balls[i].y += vels[i].vy;
-    ellipse(balls[i].x, balls[i].y, balls[i].r*2, balls[i].r*2);
-    checkBoundaryCollision(balls[i], vels[i]);
-  }
-  checkObjectCollision(balls, vels);
-}
-
-void checkObjectCollision(Ball[] b, Vect2D[] v){
-
-  // get distances between the balls components
-  Vect2D bVect = new Vect2D();
-  bVect.vx = b[1].x - b[0].x;
-  bVect.vy = b[1].y - b[0].y;
-
-  // calculate magnitude of the vector separating the balls
-  float bVectMag = sqrt(bVect.vx * bVect.vx + bVect.vy * bVect.vy);
-  if (bVectMag < b[0].r + b[1].r){
-    // get angle of bVect
-    float theta  = atan2(bVect.vy, bVect.vx);
-    // precalculate trig values
-    float sine = sin(theta);
-    float cosine = cos(theta);
-
-    /* bTemp will hold rotated ball positions. You 
-     just need to worry about bTemp[1] position*/
-    Ball[] bTemp = {  
-      new Ball(), new Ball()      };
-    /* b[1]'s position is relative to b[0]'s
-     so you can use the vector between them (bVect) as the 
-     reference point in the rotation expressions.
-     bTemp[0].x and bTemp[0].y will initialize
-     automatically to 0.0, which is what you want
-     since b[1] will rotate around b[0] */
-    bTemp[1].x  = cosine * bVect.vx + sine * bVect.vy;
-    bTemp[1].y  = cosine * bVect.vy - sine * bVect.vx;
-
-    // rotate Temporary velocities
-    Vect2D[] vTemp = { 
-      new Vect2D(), new Vect2D()     };
-    vTemp[0].vx  = cosine * v[0].vx + sine * v[0].vy;
-    vTemp[0].vy  = cosine * v[0].vy - sine * v[0].vx;
-    vTemp[1].vx  = cosine * v[1].vx + sine * v[1].vy;
-    vTemp[1].vy  = cosine * v[1].vy - sine * v[1].vx;
-
-    /* Now that velocities are rotated, you can use 1D
-     conservation of momentum equations to calculate 
-     the final velocity along the x-axis. */
-    Vect2D[] vFinal = {  
-      new Vect2D(), new Vect2D()      };
-    // final rotated velocity for b[0]
-    vFinal[0].vx = ((b[0].m - b[1].m) * vTemp[0].vx + 2 * b[1].m * 
-      vTemp[1].vx) / (b[0].m + b[1].m);
-    vFinal[0].vy = vTemp[0].vy;
-    // final rotated velocity for b[0]
-    vFinal[1].vx = ((b[1].m - b[0].m) * vTemp[1].vx + 2 * b[0].m * 
-      vTemp[0].vx) / (b[0].m + b[1].m);
-    vFinal[1].vy = vTemp[1].vy;
-
-    // hack to avoid clumping
-    bTemp[0].x += vFinal[0].vx;
-    bTemp[1].x += vFinal[1].vx;
-
-    /* Rotate ball positions and velocities back
-     Reverse signs in trig expressions to rotate 
-     in the opposite direction */
-    // rotate balls
-    Ball[] bFinal = { 
-      new Ball(), new Ball()     };
-    bFinal[0].x = cosine * bTemp[0].x - sine * bTemp[0].y;
-    bFinal[0].y = cosine * bTemp[0].y + sine * bTemp[0].x;
-    bFinal[1].x = cosine * bTemp[1].x - sine * bTemp[1].y;
-    bFinal[1].y = cosine * bTemp[1].y + sine * bTemp[1].x;
-
-    // update balls to screen position
-    b[1].x = b[0].x + bFinal[1].x;
-    b[1].y = b[0].y + bFinal[1].y;
-    b[0].x = b[0].x + bFinal[0].x;
-    b[0].y = b[0].y + bFinal[0].y;
-
-    // update velocities
-    v[0].vx = cosine * vFinal[0].vx - sine * vFinal[0].vy;
-    v[0].vy = cosine * vFinal[0].vy + sine * vFinal[0].vx;
-    v[1].vx = cosine * vFinal[1].vx - sine * vFinal[1].vy;
-    v[1].vy = cosine * vFinal[1].vy + sine * vFinal[1].vx;
-  }
-}
-
-class Ball{
-  float x, y, r, m;
-
-  // default constructor
-  Ball() {
-  }
-
-  Ball(float x, float y, float r) {
-    this.x = x;
-    this.y = y;
-    this.r = r;
-    m = r*.1;
-  }
-}
-
-class Vect2D{
-  float vx, vy;
-
-  // default constructor
-  Vect2D() {
-  }
-
-  Vect2D(float vx, float vy) {
-    this.vx = vx;
-    this.vy = vy;
-  }
-}
-
-// checkBoundaryCollision() function:
-void checkBoundaryCollision(Ball ball, Vect2D vel){
-  if (ball.x > width-ball.r){
-    ball.x = width-ball.r;
-    vel.vx *= -1;
-  } 
-  else if (ball.x < ball.r){
-    ball.x = ball.r;
-    vel.vx *= -1;
-  } 
-  else if (ball.y > height-ball.r){
-    ball.y = height-ball.r;
-    vel.vy *= -1;
-  } 
-  else if (ball.y < ball.r){
-    ball.y = ball.r;
-    vel.vy *= -1;
-  }
-}
- - diff --git a/examples/topics/collision.html b/examples/topics/collision.html deleted file mode 100644 index 611b86393..000000000 --- a/examples/topics/collision.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - -

Processing.js

-

Collision

- -

Move the mouse up and down to move the paddle.

- -

Original Processing.org Example: Collision
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// Global variables for the ball
-float ball_x;
-float ball_y;
-float ball_dir = 1;
-float ball_size = 5;  // Radius
-float dy = 0;  // Direction
-
-// Global variables for the paddle
-int paddle_width = 5;
-int paddle_height = 20;
-
-int dist_wall = 15;
-
-void setup()
-{
-  size(200, 200);
-  rectMode(CENTER_RADIUS);
-  ellipseMode(CENTER_RADIUS);
-  noStroke();
-  smooth();
-  ball_y = height/2;
-  ball_x = 1;
-}
-
-void draw() 
-{
-  background(51);
-  
-  ball_x += ball_dir * 1.0;
-  ball_y += dy;
-  if(ball_x > width+ball_size) {
-    ball_x = -width/2 - ball_size;
-    ball_y = random(0, height);
-    dy = 0;
-  }
-  
-  // Constrain paddle to screen
-  float paddle_y = constrain(mouseY, paddle_height, height-paddle_height);
-
-  // Test to see if the ball is touching the paddle
-  float py = width-dist_wall-paddle_width-ball_size;
-  if(ball_x == py 
-     && ball_y > paddle_y - paddle_height - ball_size 
-     && ball_y < paddle_y + paddle_height + ball_size) {
-    ball_dir *= -1;
-    if(mouseY != pmouseY) {
-      dy = (mouseY-pmouseY)/2.0;
-      if(dy >  5) { dy =  5; }
-      if(dy < -5) { dy = -5; }
-    }
-  } 
-  
-  // If ball hits paddle or back wall, reverse direction
-  if(ball_x < ball_size && ball_dir == -1) {
-    ball_dir *= -1;
-  }
-  
-  // If the ball is touching top or bottom edge, reverse direction
-  if(ball_y > height-ball_size) {
-    dy = dy * -1;
-  }
-  if(ball_y < ball_size) {
-    dy = dy * -1;
-  }
-
-  // Draw ball
-  fill(255);
-  ellipse(ball_x, ball_y, ball_size, ball_size);
-  
-  // Draw the paddle
-  fill(153);
-  rect(width-dist_wall, paddle_y, paddle_width, paddle_height);  
-}
- - diff --git a/examples/topics/continuouslines.html b/examples/topics/continuouslines.html deleted file mode 100644 index 39cb589f3..000000000 --- a/examples/topics/continuouslines.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - -

Processing.js

-

ContinuousLines

- -

Can not tell if this was ever working exactly like it does in Java. Something weird going on with events here? F1LT3R

- -

Click and drag the mouse to draw a line.

- -

Original Processing.org Example: ContinuousLines
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup() {
-  size(200, 200);
-  background(102);
-}
-
-void draw() {
-  stroke(255);
-  if(mousePressed) {
-    line(mouseX, mouseY, pmouseX, pmouseY);
-  }
-}
- - diff --git a/examples/topics/convolution.html b/examples/topics/convolution.html deleted file mode 100644 index c40843e14..000000000 --- a/examples/topics/convolution.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - -

Processing.js

-

Convolution

- -

by Daniel Shiffman. - -Applys a convolution matrix to a portion of the index. -Move mouse to apply filter to different parts of the image.

- -

Original Processing.org Example: Convolution
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-
-/* @pjs preload="data/cait.jpg"; */
-
-PImage img;
-int w = 80;
-
-// It's possible to convolve the image with 
-// many different matrices
-
-  float[][] matrix = { { -1, -1, -1 },
-                       { -1,  9, -1 },
-                       { -1, -1, -1 } }; 
-
-void setup() {
-  size(200, 200);
-  frameRate(30);
-  img = loadImage("data/cait.jpg");
-}
-
-void draw() {
-  // We're only going to process a portion of the image
-  // so let's set the whole image as the background first
-  image(img,0,0);
-  // Where is the small rectangle we will process
-  int xstart = constrain(mouseX-w/2,0,img.width);
-  int ystart = constrain(mouseY-w/2,0,img.height);
-  int xend = constrain(mouseX+w/2,0,img.width);
-  int yend = constrain(mouseY+w/2,0,img.height);
-  int matrixsize = 3;
-  loadPixels();
-  // Begin our loop for every pixel
-  for (int x = xstart; x < xend; x++) {
-    for (int y = ystart; y < yend; y++ ) {
-      color c = convolution(x,y,matrix,matrixsize,img);
-      int loc = x + y*img.width;
-      pixels[loc] = c;
-    }
-  }
-  updatePixels();
-}
-
-color convolution(int x, int y, float[][] matrix,int matrixsize, PImage img)
-{
-  float rtotal = 0.0;
-  float gtotal = 0.0;
-  float btotal = 0.0;
-  int offset = matrixsize / 2;
-  for (int i = 0; i < matrixsize; i++){
-    for (int j= 0; j < matrixsize; j++){
-      // What pixel are we testing
-      int xloc = x+i-offset;
-      int yloc = y+j-offset;
-      int loc = xloc + img.width*yloc;
-      // Make sure we haven't walked off our image, we could do better here
-      loc = constrain(loc,0,img.pixels.length-1);
-      // Calculate the convolution
-      rtotal += (red(img.pixels[loc]) * matrix[i][j]);
-      gtotal += (green(img.pixels[loc]) * matrix[i][j]);
-      btotal += (blue(img.pixels[loc]) * matrix[i][j]);
-    }
-  }
-  // Make sure RGB is within range
-  rtotal = constrain(rtotal,0,255);
-  gtotal = constrain(gtotal,0,255);
-  btotal = constrain(btotal,0,255);
-  // Return the resulting color
-  return color(rtotal,gtotal,btotal);
-}
- - diff --git a/examples/topics/conway.html b/examples/topics/conway.html deleted file mode 100644 index 23de5b5b5..000000000 --- a/examples/topics/conway.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - -

Processing.js

-

Conway

- -

by Mike Davis. - -This program is a simple version of Conway's -game of Life. A lit point turns off if there -are fewer than two or more than three surrounding -lit points. An unlit point turns on if there -are exactly three lit neighbors. The 'density' -parameter determines how much of the board will -start out lit.

- -

Original Processing.org Example: Conway
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int sx, sy; 
-float density = 0.5; 
-int[][][] world;
- 
-void setup() 
-{ 
-  size(100, 100);
-  frameRate(12);
-  sx = width;
-  sy = height;
-  world = new int[sx][sy][2]; 
-  stroke(255); 
-   
-  // Set random cells to 'on' 
-  for (int i = 0; i < sx * sy * density; i++) { 
-    world[(int)random(sx)][(int)random(sy)][1] = 1; 
-  } 
-} 
- 
-void draw() 
-{ 
-  background(0); 
-  
-  // Drawing and update cycle 
-  for (int x = 0; x < sx; x=x+1) { 
-    for (int y = 0; y < sy; y=y+1) { 
-      //if (world[x][y][1] == 1) 
-      // Change recommended by The.Lucky.Mutt
-      if ((world[x][y][1] == 1) || (world[x][y][1] == 0 && world[x][y][0] == 1)) 
-      { 
-        world[x][y][0] = 1; 
-        point(x, y); 
-      } 
-      if (world[x][y][1] == -1) 
-      { 
-        world[x][y][0] = 0; 
-      } 
-      world[x][y][1] = 0; 
-    } 
-  } 
-  // Birth and death cycle 
-  for (int x = 0; x < sx; x=x+1) { 
-    for (int y = 0; y < sy; y=y+1) { 
-      int count = neighbors(x, y); 
-      if (count == 3 && world[x][y][0] == 0) 
-      { 
-        world[x][y][1] = 1; 
-      } 
-      if ((count < 2 || count > 3) && world[x][y][0] == 1) 
-     { 
-        world[x][y][1] = -1; 
-      } 
-    } 
-  } 
-} 
- 
-// Count the number of adjacent cells 'on' 
-int neighbors(int x, int y) 
-{ 
-  return world[(x + 1) % sx][y][0] + 
-         world[x][(y + 1) % sy][0] + 
-         world[(x + sx - 1) % sx][y][0] + 
-         world[x][(y + sy - 1) % sy][0] + 
-         world[(x + 1) % sx][(y + 1) % sy][0] + 
-         world[(x + sx - 1) % sx][(y + 1) % sy][0] + 
-         world[(x + sx - 1) % sx][(y + sy - 1) % sy][0] + 
-         world[(x + 1) % sx][(y + sy - 1) % sy][0]; 
-}
- - diff --git a/examples/topics/customtool.html b/examples/topics/customtool.html deleted file mode 100644 index 30db6b926..000000000 --- a/examples/topics/customtool.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - -

Processing.js

-

CustomTool

- -

Move the cursor across the screen to draw. -In addition to creating software tools to simulate pens and pencils, -it is possible to create unique tools to draw with.

- -

Original Processing.org Example: CustomTool
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int dots = 1000;
-float[] dX = new float[dots];
-float[] dY = new float[dots];
-
-float l_0 = 0.0;
-float h_0 = 0.0;
-
-float legX = 0.0;
-float legY = 0.0;
-float thighX = 0.0;
-float thighY = 0.0;
-
-float l = 30.0; // Length of the 'leg'
-float h = 60.0; // Height of the 'leg'
-
-float nmx, nmy = 0.0;
-float mx, my = 0.0;
-
-float offset;
-
-int currentValue = 0;
-int valdir = 1;
-
-void setup() 
-{
-  size(200, 200);
-  noStroke();
-  fill(102);
-  rect(0, 0, width, height);
-  offset = width/2;
-}
-
-void draw() 
-{
-  // Smooth the mouse
-  nmx = mouseX;
-  nmy = mouseY;
-  if((abs(mx - nmx) > 1.0) || (abs(my - nmy) > 1.0)) { 
-    mx = mx - (mx-nmx)/20.0;
-    my = my - (my-nmy)/20.0;
-    
-    // Set the drawing value
-    currentValue += 1* valdir;
-    if(currentValue > 255 || currentValue <= 0) {
-      valdir *= -1;
-    }
-  }
-
-  iKinematics();
-  kinematics();
-  
-  pushMatrix();
-  translate(offset, offset);
-  stroke(currentValue); 
-  line(thighX, thighY, legX, legY);
-  popMatrix();
-  
-  stroke(255);
-  point(legX+offset, legY+offset);
-}
-
-void kinematics() 
-{
-  thighX = h*cos(h_0);
-  thighY = h*sin(h_0);
-  legX = thighX + l*cos(h_0 - l_0);
-  legY = thighY + l*sin(h_0 - l_0);
-}
-
-void iKinematics()
-{
-  float tx = mx - width/2.0;
-  float ty = my - height/2.0;
-  float c2 = (tx*tx + ty*ty - h*h - l*l)/(2*h*l); //in degrees
-  float s2 = sqrt(abs(1 - c2*c2)); // the sign here determines the bend in the joint  
-  l_0 = -atan2(s2, c2);
-  h_0 = atan2(ty, tx) - atan2(l*s2, h+l*c2);
-}
- - diff --git a/examples/topics/data/PT_Shifty_0000.gif b/examples/topics/data/PT_Shifty_0000.gif deleted file mode 100644 index 1a9893ad2..000000000 Binary files a/examples/topics/data/PT_Shifty_0000.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0001.gif b/examples/topics/data/PT_Shifty_0001.gif deleted file mode 100644 index 1a9893ad2..000000000 Binary files a/examples/topics/data/PT_Shifty_0001.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0002.gif b/examples/topics/data/PT_Shifty_0002.gif deleted file mode 100644 index c53edb943..000000000 Binary files a/examples/topics/data/PT_Shifty_0002.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0003.gif b/examples/topics/data/PT_Shifty_0003.gif deleted file mode 100644 index b9c4fc675..000000000 Binary files a/examples/topics/data/PT_Shifty_0003.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0004.gif b/examples/topics/data/PT_Shifty_0004.gif deleted file mode 100644 index b43d0b308..000000000 Binary files a/examples/topics/data/PT_Shifty_0004.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0005.gif b/examples/topics/data/PT_Shifty_0005.gif deleted file mode 100644 index 36f373249..000000000 Binary files a/examples/topics/data/PT_Shifty_0005.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0006.gif b/examples/topics/data/PT_Shifty_0006.gif deleted file mode 100644 index b4c6ab5e6..000000000 Binary files a/examples/topics/data/PT_Shifty_0006.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0007.gif b/examples/topics/data/PT_Shifty_0007.gif deleted file mode 100644 index a53c6abc7..000000000 Binary files a/examples/topics/data/PT_Shifty_0007.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0008.gif b/examples/topics/data/PT_Shifty_0008.gif deleted file mode 100644 index 1ce59b9a6..000000000 Binary files a/examples/topics/data/PT_Shifty_0008.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0009.gif b/examples/topics/data/PT_Shifty_0009.gif deleted file mode 100644 index 557bedf8e..000000000 Binary files a/examples/topics/data/PT_Shifty_0009.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0010.gif b/examples/topics/data/PT_Shifty_0010.gif deleted file mode 100644 index 31fd776e4..000000000 Binary files a/examples/topics/data/PT_Shifty_0010.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0011.gif b/examples/topics/data/PT_Shifty_0011.gif deleted file mode 100644 index a69083697..000000000 Binary files a/examples/topics/data/PT_Shifty_0011.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0012.gif b/examples/topics/data/PT_Shifty_0012.gif deleted file mode 100644 index fe81e42ac..000000000 Binary files a/examples/topics/data/PT_Shifty_0012.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0013.gif b/examples/topics/data/PT_Shifty_0013.gif deleted file mode 100644 index c8ede5df6..000000000 Binary files a/examples/topics/data/PT_Shifty_0013.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0014.gif b/examples/topics/data/PT_Shifty_0014.gif deleted file mode 100644 index 1f1413761..000000000 Binary files a/examples/topics/data/PT_Shifty_0014.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0015.gif b/examples/topics/data/PT_Shifty_0015.gif deleted file mode 100644 index de472dfe7..000000000 Binary files a/examples/topics/data/PT_Shifty_0015.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0016.gif b/examples/topics/data/PT_Shifty_0016.gif deleted file mode 100644 index 5bc583f0a..000000000 Binary files a/examples/topics/data/PT_Shifty_0016.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0017.gif b/examples/topics/data/PT_Shifty_0017.gif deleted file mode 100644 index 8ff438690..000000000 Binary files a/examples/topics/data/PT_Shifty_0017.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0018.gif b/examples/topics/data/PT_Shifty_0018.gif deleted file mode 100644 index 0b99e3727..000000000 Binary files a/examples/topics/data/PT_Shifty_0018.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0019.gif b/examples/topics/data/PT_Shifty_0019.gif deleted file mode 100644 index 7a9217ad3..000000000 Binary files a/examples/topics/data/PT_Shifty_0019.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0020.gif b/examples/topics/data/PT_Shifty_0020.gif deleted file mode 100644 index fe8fdae31..000000000 Binary files a/examples/topics/data/PT_Shifty_0020.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0021.gif b/examples/topics/data/PT_Shifty_0021.gif deleted file mode 100644 index ab36afe0d..000000000 Binary files a/examples/topics/data/PT_Shifty_0021.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0022.gif b/examples/topics/data/PT_Shifty_0022.gif deleted file mode 100644 index 98dc00b57..000000000 Binary files a/examples/topics/data/PT_Shifty_0022.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0023.gif b/examples/topics/data/PT_Shifty_0023.gif deleted file mode 100644 index a3dd7f38c..000000000 Binary files a/examples/topics/data/PT_Shifty_0023.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0024.gif b/examples/topics/data/PT_Shifty_0024.gif deleted file mode 100644 index f8287855a..000000000 Binary files a/examples/topics/data/PT_Shifty_0024.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0025.gif b/examples/topics/data/PT_Shifty_0025.gif deleted file mode 100644 index 0107f470c..000000000 Binary files a/examples/topics/data/PT_Shifty_0025.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0026.gif b/examples/topics/data/PT_Shifty_0026.gif deleted file mode 100644 index e05a13944..000000000 Binary files a/examples/topics/data/PT_Shifty_0026.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0027.gif b/examples/topics/data/PT_Shifty_0027.gif deleted file mode 100644 index decdebe59..000000000 Binary files a/examples/topics/data/PT_Shifty_0027.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0028.gif b/examples/topics/data/PT_Shifty_0028.gif deleted file mode 100644 index ec2bae766..000000000 Binary files a/examples/topics/data/PT_Shifty_0028.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0029.gif b/examples/topics/data/PT_Shifty_0029.gif deleted file mode 100644 index 67d14b168..000000000 Binary files a/examples/topics/data/PT_Shifty_0029.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0030.gif b/examples/topics/data/PT_Shifty_0030.gif deleted file mode 100644 index 619c30c94..000000000 Binary files a/examples/topics/data/PT_Shifty_0030.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0031.gif b/examples/topics/data/PT_Shifty_0031.gif deleted file mode 100644 index aae6bfbf3..000000000 Binary files a/examples/topics/data/PT_Shifty_0031.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0032.gif b/examples/topics/data/PT_Shifty_0032.gif deleted file mode 100644 index 7cdd3561b..000000000 Binary files a/examples/topics/data/PT_Shifty_0032.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0033.gif b/examples/topics/data/PT_Shifty_0033.gif deleted file mode 100644 index 97fc08480..000000000 Binary files a/examples/topics/data/PT_Shifty_0033.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0034.gif b/examples/topics/data/PT_Shifty_0034.gif deleted file mode 100644 index 85e71dd53..000000000 Binary files a/examples/topics/data/PT_Shifty_0034.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0035.gif b/examples/topics/data/PT_Shifty_0035.gif deleted file mode 100644 index 752393673..000000000 Binary files a/examples/topics/data/PT_Shifty_0035.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0036.gif b/examples/topics/data/PT_Shifty_0036.gif deleted file mode 100644 index 92bf1c3da..000000000 Binary files a/examples/topics/data/PT_Shifty_0036.gif and /dev/null differ diff --git a/examples/topics/data/PT_Shifty_0037.gif b/examples/topics/data/PT_Shifty_0037.gif deleted file mode 100644 index 397590e38..000000000 Binary files a/examples/topics/data/PT_Shifty_0037.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0000.gif b/examples/topics/data/PT_Teddy_0000.gif deleted file mode 100644 index 2f824d4ae..000000000 Binary files a/examples/topics/data/PT_Teddy_0000.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0001.gif b/examples/topics/data/PT_Teddy_0001.gif deleted file mode 100644 index 08badda94..000000000 Binary files a/examples/topics/data/PT_Teddy_0001.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0002.gif b/examples/topics/data/PT_Teddy_0002.gif deleted file mode 100644 index 06624ab2c..000000000 Binary files a/examples/topics/data/PT_Teddy_0002.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0003.gif b/examples/topics/data/PT_Teddy_0003.gif deleted file mode 100644 index ea92ccc97..000000000 Binary files a/examples/topics/data/PT_Teddy_0003.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0004.gif b/examples/topics/data/PT_Teddy_0004.gif deleted file mode 100644 index 4bd11209c..000000000 Binary files a/examples/topics/data/PT_Teddy_0004.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0005.gif b/examples/topics/data/PT_Teddy_0005.gif deleted file mode 100644 index 35dd95adf..000000000 Binary files a/examples/topics/data/PT_Teddy_0005.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0006.gif b/examples/topics/data/PT_Teddy_0006.gif deleted file mode 100644 index e03110292..000000000 Binary files a/examples/topics/data/PT_Teddy_0006.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0007.gif b/examples/topics/data/PT_Teddy_0007.gif deleted file mode 100644 index c64d4f836..000000000 Binary files a/examples/topics/data/PT_Teddy_0007.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0008.gif b/examples/topics/data/PT_Teddy_0008.gif deleted file mode 100644 index 3ceb22ee7..000000000 Binary files a/examples/topics/data/PT_Teddy_0008.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0009.gif b/examples/topics/data/PT_Teddy_0009.gif deleted file mode 100644 index e641c42d8..000000000 Binary files a/examples/topics/data/PT_Teddy_0009.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0010.gif b/examples/topics/data/PT_Teddy_0010.gif deleted file mode 100644 index fcf8234bd..000000000 Binary files a/examples/topics/data/PT_Teddy_0010.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0011.gif b/examples/topics/data/PT_Teddy_0011.gif deleted file mode 100644 index 0a66343cc..000000000 Binary files a/examples/topics/data/PT_Teddy_0011.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0012.gif b/examples/topics/data/PT_Teddy_0012.gif deleted file mode 100644 index d99ab85ab..000000000 Binary files a/examples/topics/data/PT_Teddy_0012.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0013.gif b/examples/topics/data/PT_Teddy_0013.gif deleted file mode 100644 index bf83cace6..000000000 Binary files a/examples/topics/data/PT_Teddy_0013.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0014.gif b/examples/topics/data/PT_Teddy_0014.gif deleted file mode 100644 index 5cf39974a..000000000 Binary files a/examples/topics/data/PT_Teddy_0014.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0015.gif b/examples/topics/data/PT_Teddy_0015.gif deleted file mode 100644 index 2389da333..000000000 Binary files a/examples/topics/data/PT_Teddy_0015.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0016.gif b/examples/topics/data/PT_Teddy_0016.gif deleted file mode 100644 index 837b6e533..000000000 Binary files a/examples/topics/data/PT_Teddy_0016.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0017.gif b/examples/topics/data/PT_Teddy_0017.gif deleted file mode 100644 index be36c20b1..000000000 Binary files a/examples/topics/data/PT_Teddy_0017.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0018.gif b/examples/topics/data/PT_Teddy_0018.gif deleted file mode 100644 index e2da21d31..000000000 Binary files a/examples/topics/data/PT_Teddy_0018.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0019.gif b/examples/topics/data/PT_Teddy_0019.gif deleted file mode 100644 index c7125f6f2..000000000 Binary files a/examples/topics/data/PT_Teddy_0019.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0020.gif b/examples/topics/data/PT_Teddy_0020.gif deleted file mode 100644 index 21084a485..000000000 Binary files a/examples/topics/data/PT_Teddy_0020.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0021.gif b/examples/topics/data/PT_Teddy_0021.gif deleted file mode 100644 index 5a7d2b462..000000000 Binary files a/examples/topics/data/PT_Teddy_0021.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0022.gif b/examples/topics/data/PT_Teddy_0022.gif deleted file mode 100644 index aa4d8b34a..000000000 Binary files a/examples/topics/data/PT_Teddy_0022.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0023.gif b/examples/topics/data/PT_Teddy_0023.gif deleted file mode 100644 index 81952946e..000000000 Binary files a/examples/topics/data/PT_Teddy_0023.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0024.gif b/examples/topics/data/PT_Teddy_0024.gif deleted file mode 100644 index f0cfcd142..000000000 Binary files a/examples/topics/data/PT_Teddy_0024.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0025.gif b/examples/topics/data/PT_Teddy_0025.gif deleted file mode 100644 index d3e55f403..000000000 Binary files a/examples/topics/data/PT_Teddy_0025.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0026.gif b/examples/topics/data/PT_Teddy_0026.gif deleted file mode 100644 index 19aa7b6c3..000000000 Binary files a/examples/topics/data/PT_Teddy_0026.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0027.gif b/examples/topics/data/PT_Teddy_0027.gif deleted file mode 100644 index 0291b3f57..000000000 Binary files a/examples/topics/data/PT_Teddy_0027.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0028.gif b/examples/topics/data/PT_Teddy_0028.gif deleted file mode 100644 index 84d403c32..000000000 Binary files a/examples/topics/data/PT_Teddy_0028.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0029.gif b/examples/topics/data/PT_Teddy_0029.gif deleted file mode 100644 index a15ef905f..000000000 Binary files a/examples/topics/data/PT_Teddy_0029.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0030.gif b/examples/topics/data/PT_Teddy_0030.gif deleted file mode 100644 index 945a0053d..000000000 Binary files a/examples/topics/data/PT_Teddy_0030.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0031.gif b/examples/topics/data/PT_Teddy_0031.gif deleted file mode 100644 index f922e5651..000000000 Binary files a/examples/topics/data/PT_Teddy_0031.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0032.gif b/examples/topics/data/PT_Teddy_0032.gif deleted file mode 100644 index 0aff66645..000000000 Binary files a/examples/topics/data/PT_Teddy_0032.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0033.gif b/examples/topics/data/PT_Teddy_0033.gif deleted file mode 100644 index 7fedb4832..000000000 Binary files a/examples/topics/data/PT_Teddy_0033.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0034.gif b/examples/topics/data/PT_Teddy_0034.gif deleted file mode 100644 index 19a4d20ff..000000000 Binary files a/examples/topics/data/PT_Teddy_0034.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0035.gif b/examples/topics/data/PT_Teddy_0035.gif deleted file mode 100644 index 3dd6abcb7..000000000 Binary files a/examples/topics/data/PT_Teddy_0035.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0036.gif b/examples/topics/data/PT_Teddy_0036.gif deleted file mode 100644 index 93277ef54..000000000 Binary files a/examples/topics/data/PT_Teddy_0036.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0037.gif b/examples/topics/data/PT_Teddy_0037.gif deleted file mode 100644 index c9c0a0903..000000000 Binary files a/examples/topics/data/PT_Teddy_0037.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0038.gif b/examples/topics/data/PT_Teddy_0038.gif deleted file mode 100644 index f0a00a1be..000000000 Binary files a/examples/topics/data/PT_Teddy_0038.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0039.gif b/examples/topics/data/PT_Teddy_0039.gif deleted file mode 100644 index 4a8b14e27..000000000 Binary files a/examples/topics/data/PT_Teddy_0039.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0040.gif b/examples/topics/data/PT_Teddy_0040.gif deleted file mode 100644 index 88e8eb147..000000000 Binary files a/examples/topics/data/PT_Teddy_0040.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0041.gif b/examples/topics/data/PT_Teddy_0041.gif deleted file mode 100644 index 0353138a5..000000000 Binary files a/examples/topics/data/PT_Teddy_0041.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0042.gif b/examples/topics/data/PT_Teddy_0042.gif deleted file mode 100644 index 4ef947509..000000000 Binary files a/examples/topics/data/PT_Teddy_0042.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0043.gif b/examples/topics/data/PT_Teddy_0043.gif deleted file mode 100644 index aebe10476..000000000 Binary files a/examples/topics/data/PT_Teddy_0043.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0044.gif b/examples/topics/data/PT_Teddy_0044.gif deleted file mode 100644 index 96464a3cb..000000000 Binary files a/examples/topics/data/PT_Teddy_0044.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0045.gif b/examples/topics/data/PT_Teddy_0045.gif deleted file mode 100644 index 35e40b8c4..000000000 Binary files a/examples/topics/data/PT_Teddy_0045.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0046.gif b/examples/topics/data/PT_Teddy_0046.gif deleted file mode 100644 index 8476318e9..000000000 Binary files a/examples/topics/data/PT_Teddy_0046.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0047.gif b/examples/topics/data/PT_Teddy_0047.gif deleted file mode 100644 index 512c6eebc..000000000 Binary files a/examples/topics/data/PT_Teddy_0047.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0048.gif b/examples/topics/data/PT_Teddy_0048.gif deleted file mode 100644 index 9fdecf6f1..000000000 Binary files a/examples/topics/data/PT_Teddy_0048.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0049.gif b/examples/topics/data/PT_Teddy_0049.gif deleted file mode 100644 index 5988e0ff9..000000000 Binary files a/examples/topics/data/PT_Teddy_0049.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0050.gif b/examples/topics/data/PT_Teddy_0050.gif deleted file mode 100644 index 2dde61ea0..000000000 Binary files a/examples/topics/data/PT_Teddy_0050.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0051.gif b/examples/topics/data/PT_Teddy_0051.gif deleted file mode 100644 index 24ef0346d..000000000 Binary files a/examples/topics/data/PT_Teddy_0051.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0052.gif b/examples/topics/data/PT_Teddy_0052.gif deleted file mode 100644 index 132a9ad32..000000000 Binary files a/examples/topics/data/PT_Teddy_0052.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0053.gif b/examples/topics/data/PT_Teddy_0053.gif deleted file mode 100644 index d5ffebc03..000000000 Binary files a/examples/topics/data/PT_Teddy_0053.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0054.gif b/examples/topics/data/PT_Teddy_0054.gif deleted file mode 100644 index e09375aa0..000000000 Binary files a/examples/topics/data/PT_Teddy_0054.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0055.gif b/examples/topics/data/PT_Teddy_0055.gif deleted file mode 100644 index e09375aa0..000000000 Binary files a/examples/topics/data/PT_Teddy_0055.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0056.gif b/examples/topics/data/PT_Teddy_0056.gif deleted file mode 100644 index 80ee11d98..000000000 Binary files a/examples/topics/data/PT_Teddy_0056.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0057.gif b/examples/topics/data/PT_Teddy_0057.gif deleted file mode 100644 index 9af1fbacc..000000000 Binary files a/examples/topics/data/PT_Teddy_0057.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0058.gif b/examples/topics/data/PT_Teddy_0058.gif deleted file mode 100644 index 7265b9fee..000000000 Binary files a/examples/topics/data/PT_Teddy_0058.gif and /dev/null differ diff --git a/examples/topics/data/PT_Teddy_0059.gif b/examples/topics/data/PT_Teddy_0059.gif deleted file mode 100644 index c4f730ef2..000000000 Binary files a/examples/topics/data/PT_Teddy_0059.gif and /dev/null differ diff --git a/examples/topics/data/PT_anim0000.gif b/examples/topics/data/PT_anim0000.gif deleted file mode 100644 index b0e3f04ac..000000000 Binary files a/examples/topics/data/PT_anim0000.gif and /dev/null differ diff --git a/examples/topics/data/PT_anim0001.gif b/examples/topics/data/PT_anim0001.gif deleted file mode 100644 index 4f7cb9024..000000000 Binary files a/examples/topics/data/PT_anim0001.gif and /dev/null differ diff --git a/examples/topics/data/PT_anim0002.gif b/examples/topics/data/PT_anim0002.gif deleted file mode 100644 index 4d37297fa..000000000 Binary files a/examples/topics/data/PT_anim0002.gif and /dev/null differ diff --git a/examples/topics/data/PT_anim0003.gif b/examples/topics/data/PT_anim0003.gif deleted file mode 100644 index d3ab40361..000000000 Binary files a/examples/topics/data/PT_anim0003.gif and /dev/null differ diff --git a/examples/topics/data/PT_anim0004.gif b/examples/topics/data/PT_anim0004.gif deleted file mode 100644 index 44cd62bdb..000000000 Binary files a/examples/topics/data/PT_anim0004.gif and /dev/null differ diff --git a/examples/topics/data/PT_anim0005.gif b/examples/topics/data/PT_anim0005.gif deleted file mode 100644 index 185298a94..000000000 Binary files a/examples/topics/data/PT_anim0005.gif and /dev/null differ diff --git a/examples/topics/data/PT_anim0006.gif b/examples/topics/data/PT_anim0006.gif deleted file mode 100644 index 30de51162..000000000 Binary files a/examples/topics/data/PT_anim0006.gif and /dev/null differ diff --git a/examples/topics/data/PT_anim0007.gif b/examples/topics/data/PT_anim0007.gif deleted file mode 100644 index cc9f8f883..000000000 Binary files a/examples/topics/data/PT_anim0007.gif and /dev/null differ diff --git a/examples/topics/data/PT_anim0008.gif b/examples/topics/data/PT_anim0008.gif deleted file mode 100644 index 76475facd..000000000 Binary files a/examples/topics/data/PT_anim0008.gif and /dev/null differ diff --git a/examples/topics/data/PT_anim0009.gif b/examples/topics/data/PT_anim0009.gif deleted file mode 100644 index 3b224625a..000000000 Binary files a/examples/topics/data/PT_anim0009.gif and /dev/null differ diff --git a/examples/topics/data/PT_anim0010.gif b/examples/topics/data/PT_anim0010.gif deleted file mode 100644 index 9c008f38b..000000000 Binary files a/examples/topics/data/PT_anim0010.gif and /dev/null differ diff --git a/examples/topics/data/PT_anim0011.gif b/examples/topics/data/PT_anim0011.gif deleted file mode 100644 index db227e220..000000000 Binary files a/examples/topics/data/PT_anim0011.gif and /dev/null differ diff --git a/examples/topics/data/base.gif b/examples/topics/data/base.gif deleted file mode 100644 index 8d7603a01..000000000 Binary files a/examples/topics/data/base.gif and /dev/null differ diff --git a/examples/topics/data/cait.jpg b/examples/topics/data/cait.jpg deleted file mode 100644 index bc15e16a5..000000000 Binary files a/examples/topics/data/cait.jpg and /dev/null differ diff --git a/examples/topics/data/cars2.tsv b/examples/topics/data/cars2.tsv deleted file mode 100644 index 4beddafbc..000000000 --- a/examples/topics/data/cars2.tsv +++ /dev/null @@ -1 +0,0 @@ -chevrolet chevelle malibu 18 8 307 130 3504 12 70 1 buick skylark 320 15 8 350 165 3693 11.5 70 1 plymouth satellite 18 8 318 150 3436 11 70 1 amc rebel sst 16 8 304 150 3433 12 70 1 ford torino 17 8 302 140 3449 10.5 70 1 ford galaxie 500 15 8 429 198 4341 10 70 1 chevrolet impala 14 8 454 220 4354 9 70 1 plymouth fury iii 14 8 440 215 4312 8.5 70 1 pontiac catalina 14 8 455 225 4425 10 70 1 amc ambassador dpl 15 8 390 190 3850 8.5 70 1 citroen ds-21 pallas NA 4 133 115 3090 17.5 70 2 chevrolet chevelle concours (sw) NA 8 350 165 4142 11.5 70 1 ford torino (sw) NA 8 351 153 4034 11 70 1 plymouth satellite (sw) NA 8 383 175 4166 10.5 70 1 amc rebel sst (sw) NA 8 360 175 3850 11 70 1 dodge challenger se 15 8 383 170 3563 10 70 1 plymouth 'cuda 340 14 8 340 160 3609 8 70 1 ford mustang boss 302 NA 8 302 140 3353 8 70 1 chevrolet monte carlo 15 8 400 150 3761 9.5 70 1 buick estate wagon (sw) 14 8 455 225 3086 10 70 1 toyota corona mark ii 24 4 113 95 2372 15 70 3 plymouth duster 22 6 198 95 2833 15.5 70 1 amc hornet 18 6 199 97 2774 15.5 70 1 ford maverick 21 6 200 85 2587 16 70 1 datsun pl510 27 4 97 88 2130 14.5 70 3 volkswagen 1131 deluxe sedan 26 4 97 46 1835 20.5 70 2 peugeot 504 25 4 110 87 2672 17.5 70 2 audi 100 ls 24 4 107 90 2430 14.5 70 2 saab 99e 25 4 104 95 2375 17.5 70 2 bmw 2002 26 4 121 113 2234 12.5 70 2 amc gremlin 21 6 199 90 2648 15 70 1 ford f250 10 8 360 215 4615 14 70 1 chevy c20 10 8 307 200 4376 15 70 1 dodge d200 11 8 318 210 4382 13.5 70 1 hi 1200d 9 8 304 193 4732 18.5 70 1 datsun pl510 27 4 97 88 2130 14.5 71 3 chevrolet vega 2300 28 4 140 90 2264 15.5 71 1 toyota corona 25 4 113 95 2228 14 71 3 ford pinto 25 4 98 NA 2046 19 71 1 volkswagen super beetle 117 NA 4 97 48 1978 20 71 2 amc gremlin 19 6 232 100 2634 13 71 1 plymouth satellite custom 16 6 225 105 3439 15.5 71 1 chevrolet chevelle malibu 17 6 250 100 3329 15.5 71 1 ford torino 500 19 6 250 88 3302 15.5 71 1 amc matador 18 6 232 100 3288 15.5 71 1 chevrolet impala 14 8 350 165 4209 12 71 1 pontiac catalina brougham 14 8 400 175 4464 11.5 71 1 ford galaxie 500 14 8 351 153 4154 13.5 71 1 plymouth fury iii 14 8 318 150 4096 13 71 1 dodge monaco (sw) 12 8 383 180 4955 11.5 71 1 ford country squire (sw) 13 8 400 170 4746 12 71 1 pontiac safari (sw) 13 8 400 175 5140 12 71 1 amc hornet sportabout (sw) 18 6 258 110 2962 13.5 71 1 chevrolet vega (sw) 22 4 140 72 2408 19 71 1 pontiac firebird 19 6 250 100 3282 15 71 1 ford mustang 18 6 250 88 3139 14.5 71 1 mercury capri 2000 23 4 122 86 2220 14 71 1 opel 1900 28 4 116 90 2123 14 71 2 peugeot 304 30 4 79 70 2074 19.5 71 2 fiat 124b 30 4 88 76 2065 14.5 71 2 toyota corolla 1200 31 4 71 65 1773 19 71 3 datsun 1200 35 4 72 69 1613 18 71 3 volkswagen model 111 27 4 97 60 1834 19 71 2 plymouth cricket 26 4 91 70 1955 20.5 71 1 toyota corona hardtop 24 4 113 95 2278 15.5 72 3 dodge colt hardtop 25 4 97.5 80 2126 17 72 1 volkswagen type 3 23 4 97 54 2254 23.5 72 2 chevrolet vega 20 4 140 90 2408 19.5 72 1 ford pinto runabout 21 4 122 86 2226 16.5 72 1 chevrolet impala 13 8 350 165 4274 12 72 1 pontiac catalina 14 8 400 175 4385 12 72 1 plymouth fury iii 15 8 318 150 4135 13.5 72 1 ford galaxie 500 14 8 351 153 4129 13 72 1 amc ambassador sst 17 8 304 150 3672 11.5 72 1 mercury marquis 11 8 429 208 4633 11 72 1 buick lesabre custom 13 8 350 155 4502 13.5 72 1 oldsmobile delta 88 royale 12 8 350 160 4456 13.5 72 1 chrysler newport royal 13 8 400 190 4422 12.5 72 1 mazda rx2 coupe 19 3 70 97 2330 13.5 72 3 amc matador (sw) 15 8 304 150 3892 12.5 72 1 chevrolet chevelle concours (sw) 13 8 307 130 4098 14 72 1 ford gran torino (sw) 13 8 302 140 4294 16 72 1 plymouth satellite custom (sw) 14 8 318 150 4077 14 72 1 volvo 145e (sw) 18 4 121 112 2933 14.5 72 2 volkswagen 411 (sw) 22 4 121 76 2511 18 72 2 peugeot 504 (sw) 21 4 120 87 2979 19.5 72 2 renault 12 (sw) 26 4 96 69 2189 18 72 2 ford pinto (sw) 22 4 122 86 2395 16 72 1 datsun 510 (sw) 28 4 97 92 2288 17 72 3 toyouta corona mark ii (sw) 23 4 120 97 2506 14.5 72 3 dodge colt (sw) 28 4 98 80 2164 15 72 1 toyota corolla 1600 (sw) 27 4 97 88 2100 16.5 72 3 buick century 350 13 8 350 175 4100 13 73 1 amc matador 14 8 304 150 3672 11.5 73 1 chevrolet malibu 13 8 350 145 3988 13 73 1 ford gran torino 14 8 302 137 4042 14.5 73 1 dodge coronet custom 15 8 318 150 3777 12.5 73 1 mercury marquis brougham 12 8 429 198 4952 11.5 73 1 chevrolet caprice classic 13 8 400 150 4464 12 73 1 ford ltd 13 8 351 158 4363 13 73 1 plymouth fury gran sedan 14 8 318 150 4237 14.5 73 1 chrysler new yorker brougham 13 8 440 215 4735 11 73 1 buick electra 225 custom 12 8 455 225 4951 11 73 1 amc ambassador brougham 13 8 360 175 3821 11 73 1 plymouth valiant 18 6 225 105 3121 16.5 73 1 chevrolet nova custom 16 6 250 100 3278 18 73 1 amc hornet 18 6 232 100 2945 16 73 1 ford maverick 18 6 250 88 3021 16.5 73 1 plymouth duster 23 6 198 95 2904 16 73 1 volkswagen super beetle 26 4 97 46 1950 21 73 2 chevrolet impala 11 8 400 150 4997 14 73 1 ford country 12 8 400 167 4906 12.5 73 1 plymouth custom suburb 13 8 360 170 4654 13 73 1 oldsmobile vista cruiser 12 8 350 180 4499 12.5 73 1 amc gremlin 18 6 232 100 2789 15 73 1 toyota carina 20 4 97 88 2279 19 73 3 chevrolet vega 21 4 140 72 2401 19.5 73 1 datsun 610 22 4 108 94 2379 16.5 73 3 maxda rx3 18 3 70 90 2124 13.5 73 3 ford pinto 19 4 122 85 2310 18.5 73 1 mercury capri v6 21 6 155 107 2472 14 73 1 fiat 124 sport coupe 26 4 98 90 2265 15.5 73 2 chevrolet monte carlo s 15 8 350 145 4082 13 73 1 pontiac grand prix 16 8 400 230 4278 9.5 73 1 fiat 128 29 4 68 49 1867 19.5 73 2 opel manta 24 4 116 75 2158 15.5 73 2 audi 100ls 20 4 114 91 2582 14 73 2 volvo 144ea 19 4 121 112 2868 15.5 73 2 dodge dart custom 15 8 318 150 3399 11 73 1 saab 99le 24 4 121 110 2660 14 73 2 toyota mark ii 20 6 156 122 2807 13.5 73 3 oldsmobile omega 11 8 350 180 3664 11 73 1 plymouth duster 20 6 198 95 3102 16.5 74 1 ford maverick 21 6 200 NA 2875 17 74 1 amc hornet 19 6 232 100 2901 16 74 1 chevrolet nova 15 6 250 100 3336 17 74 1 datsun b210 31 4 79 67 1950 19 74 3 ford pinto 26 4 122 80 2451 16.5 74 1 toyota corolla 1200 32 4 71 65 1836 21 74 3 chevrolet vega 25 4 140 75 2542 17 74 1 chevrolet chevelle malibu classic 16 6 250 100 3781 17 74 1 amc matador 16 6 258 110 3632 18 74 1 plymouth satellite sebring 18 6 225 105 3613 16.5 74 1 ford gran torino 16 8 302 140 4141 14 74 1 buick century luxus (sw) 13 8 350 150 4699 14.5 74 1 dodge coronet custom (sw) 14 8 318 150 4457 13.5 74 1 ford gran torino (sw) 14 8 302 140 4638 16 74 1 amc matador (sw) 14 8 304 150 4257 15.5 74 1 audi fox 29 4 98 83 2219 16.5 74 2 volkswagen dasher 26 4 79 67 1963 15.5 74 2 opel manta 26 4 97 78 2300 14.5 74 2 toyota corona 31 4 76 52 1649 16.5 74 3 datsun 710 32 4 83 61 2003 19 74 3 dodge colt 28 4 90 75 2125 14.5 74 1 fiat 128 24 4 90 75 2108 15.5 74 2 fiat 124 tc 26 4 116 75 2246 14 74 2 honda civic 24 4 120 97 2489 15 74 3 subaru 26 4 108 93 2391 15.5 74 3 fiat x1.9 31 4 79 67 2000 16 74 2 plymouth valiant custom 19 6 225 95 3264 16 75 1 chevrolet nova 18 6 250 105 3459 16 75 1 mercury monarch 15 6 250 72 3432 21 75 1 ford maverick 15 6 250 72 3158 19.5 75 1 pontiac catalina 16 8 400 170 4668 11.5 75 1 chevrolet bel air 15 8 350 145 4440 14 75 1 plymouth grand fury 16 8 318 150 4498 14.5 75 1 ford ltd 14 8 351 148 4657 13.5 75 1 buick century 17 6 231 110 3907 21 75 1 chevroelt chevelle malibu 16 6 250 105 3897 18.5 75 1 amc matador 15 6 258 110 3730 19 75 1 plymouth fury 18 6 225 95 3785 19 75 1 buick skyhawk 21 6 231 110 3039 15 75 1 chevrolet monza 2+2 20 8 262 110 3221 13.5 75 1 ford mustang ii 13 8 302 129 3169 12 75 1 toyota corolla 29 4 97 75 2171 16 75 3 ford pinto 23 4 140 83 2639 17 75 1 amc gremlin 20 6 232 100 2914 16 75 1 pontiac astro 23 4 140 78 2592 18.5 75 1 toyota corona 24 4 134 96 2702 13.5 75 3 volkswagen dasher 25 4 90 71 2223 16.5 75 2 datsun 710 24 4 119 97 2545 17 75 3 ford pinto 18 6 171 97 2984 14.5 75 1 volkswagen rabbit 29 4 90 70 1937 14 75 2 amc pacer 19 6 232 90 3211 17 75 1 audi 100ls 23 4 115 95 2694 15 75 2 peugeot 504 23 4 120 88 2957 17 75 2 volvo 244dl 22 4 121 98 2945 14.5 75 2 saab 99le 25 4 121 115 2671 13.5 75 2 honda civic cvcc 33 4 91 53 1795 17.5 75 3 fiat 131 28 4 107 86 2464 15.5 76 2 opel 1900 25 4 116 81 2220 16.9 76 2 capri ii 25 4 140 92 2572 14.9 76 1 dodge colt 26 4 98 79 2255 17.7 76 1 renault 12tl 27 4 101 83 2202 15.3 76 2 chevrolet chevelle malibu classic 17.5 8 305 140 4215 13 76 1 dodge coronet brougham 16 8 318 150 4190 13 76 1 amc matador 15.5 8 304 120 3962 13.9 76 1 ford gran torino 14.5 8 351 152 4215 12.8 76 1 plymouth valiant 22 6 225 100 3233 15.4 76 1 chevrolet nova 22 6 250 105 3353 14.5 76 1 ford maverick 24 6 200 81 3012 17.6 76 1 amc hornet 22.5 6 232 90 3085 17.6 76 1 chevrolet chevette 29 4 85 52 2035 22.2 76 1 chevrolet woody 24.5 4 98 60 2164 22.1 76 1 vw rabbit 29 4 90 70 1937 14.2 76 2 honda civic 33 4 91 53 1795 17.4 76 3 dodge aspen se 20 6 225 100 3651 17.7 76 1 ford granada ghia 18 6 250 78 3574 21 76 1 pontiac ventura sj 18.5 6 250 110 3645 16.2 76 1 amc pacer d/l 17.5 6 258 95 3193 17.8 76 1 volkswagen rabbit 29.5 4 97 71 1825 12.2 76 2 datsun b-210 32 4 85 70 1990 17 76 3 toyota corolla 28 4 97 75 2155 16.4 76 3 ford pinto 26.5 4 140 72 2565 13.6 76 1 volvo 245 20 4 130 102 3150 15.7 76 2 plymouth volare premier v8 13 8 318 150 3940 13.2 76 1 peugeot 504 19 4 120 88 3270 21.9 76 2 toyota mark ii 19 6 156 108 2930 15.5 76 3 mercedes-benz 280s 16.5 6 168 120 3820 16.7 76 2 cadillac seville 16.5 8 350 180 4380 12.1 76 1 chevy c10 13 8 350 145 4055 12 76 1 ford f108 13 8 302 130 3870 15 76 1 dodge d100 13 8 318 150 3755 14 76 1 honda accord cvcc 31.5 4 98 68 2045 18.5 77 3 buick opel isuzu deluxe 30 4 111 80 2155 14.8 77 1 renault 5 gtl 36 4 79 58 1825 18.6 77 2 plymouth arrow gs 25.5 4 122 96 2300 15.5 77 1 datsun f-10 hatchback 33.5 4 85 70 1945 16.8 77 3 chevrolet caprice classic 17.5 8 305 145 3880 12.5 77 1 oldsmobile cutlass supreme 17 8 260 110 4060 19 77 1 dodge monaco brougham 15.5 8 318 145 4140 13.7 77 1 mercury cougar brougham 15 8 302 130 4295 14.9 77 1 chevrolet concours 17.5 6 250 110 3520 16.4 77 1 buick skylark 20.5 6 231 105 3425 16.9 77 1 plymouth volare custom 19 6 225 100 3630 17.7 77 1 ford granada 18.5 6 250 98 3525 19 77 1 pontiac grand prix lj 16 8 400 180 4220 11.1 77 1 chevrolet monte carlo landau 15.5 8 350 170 4165 11.4 77 1 chrysler cordoba 15.5 8 400 190 4325 12.2 77 1 ford thunderbird 16 8 351 149 4335 14.5 77 1 volkswagen rabbit custom 29 4 97 78 1940 14.5 77 2 pontiac sunbird coupe 24.5 4 151 88 2740 16 77 1 toyota corolla liftback 26 4 97 75 2265 18.2 77 3 ford mustang ii 2+2 25.5 4 140 89 2755 15.8 77 1 chevrolet chevette 30.5 4 98 63 2051 17 77 1 dodge colt m/m 33.5 4 98 83 2075 15.9 77 1 subaru dl 30 4 97 67 1985 16.4 77 3 volkswagen dasher 30.5 4 97 78 2190 14.1 77 2 datsun 810 22 6 146 97 2815 14.5 77 3 bmw 320i 21.5 4 121 110 2600 12.8 77 2 mazda rx-4 21.5 3 80 110 2720 13.5 77 3 volkswagen rabbit custom diesel 43.1 4 90 48 1985 21.5 78 2 ford fiesta 36.1 4 98 66 1800 14.4 78 1 mazda glc deluxe 32.8 4 78 52 1985 19.4 78 3 datsun b210 gx 39.4 4 85 70 2070 18.6 78 3 honda civic cvcc 36.1 4 91 60 1800 16.4 78 3 oldsmobile cutlass salon brougham 19.9 8 260 110 3365 15.5 78 1 dodge diplomat 19.4 8 318 140 3735 13.2 78 1 mercury monarch ghia 20.2 8 302 139 3570 12.8 78 1 pontiac phoenix lj 19.2 6 231 105 3535 19.2 78 1 chevrolet malibu 20.5 6 200 95 3155 18.2 78 1 ford fairmont (auto) 20.2 6 200 85 2965 15.8 78 1 ford fairmont (man) 25.1 4 140 88 2720 15.4 78 1 plymouth volare 20.5 6 225 100 3430 17.2 78 1 amc concord 19.4 6 232 90 3210 17.2 78 1 buick century special 20.6 6 231 105 3380 15.8 78 1 mercury zephyr 20.8 6 200 85 3070 16.7 78 1 dodge aspen 18.6 6 225 110 3620 18.7 78 1 amc concord d/l 18.1 6 258 120 3410 15.1 78 1 chevrolet monte carlo landau 19.2 8 305 145 3425 13.2 78 1 buick regal sport coupe (turbo) 17.7 6 231 165 3445 13.4 78 1 ford futura 18.1 8 302 139 3205 11.2 78 1 dodge magnum xe 17.5 8 318 140 4080 13.7 78 1 chevrolet chevette 30 4 98 68 2155 16.5 78 1 toyota corona 27.5 4 134 95 2560 14.2 78 3 datsun 510 27.2 4 119 97 2300 14.7 78 3 dodge omni 30.9 4 105 75 2230 14.5 78 1 toyota celica gt liftback 21.1 4 134 95 2515 14.8 78 3 plymouth sapporo 23.2 4 156 105 2745 16.7 78 1 oldsmobile starfire sx 23.8 4 151 85 2855 17.6 78 1 datsun 200-sx 23.9 4 119 97 2405 14.9 78 3 audi 5000 20.3 5 131 103 2830 15.9 78 2 volvo 264gl 17 6 163 125 3140 13.6 78 2 saab 99gle 21.6 4 121 115 2795 15.7 78 2 peugeot 604sl 16.2 6 163 133 3410 15.8 78 2 volkswagen scirocco 31.5 4 89 71 1990 14.9 78 2 honda accord lx 29.5 4 98 68 2135 16.6 78 3 pontiac lemans v6 21.5 6 231 115 3245 15.4 79 1 mercury zephyr 6 19.8 6 200 85 2990 18.2 79 1 ford fairmont 4 22.3 4 140 88 2890 17.3 79 1 amc concord dl 6 20.2 6 232 90 3265 18.2 79 1 dodge aspen 6 20.6 6 225 110 3360 16.6 79 1 chevrolet caprice classic 17 8 305 130 3840 15.4 79 1 ford ltd landau 17.6 8 302 129 3725 13.4 79 1 mercury grand marquis 16.5 8 351 138 3955 13.2 79 1 dodge st. regis 18.2 8 318 135 3830 15.2 79 1 buick estate wagon (sw) 16.9 8 350 155 4360 14.9 79 1 ford country squire (sw) 15.5 8 351 142 4054 14.3 79 1 chevrolet malibu classic (sw) 19.2 8 267 125 3605 15 79 1 chrysler lebaron town @ country (sw) 18.5 8 360 150 3940 13 79 1 vw rabbit custom 31.9 4 89 71 1925 14 79 2 maxda glc deluxe 34.1 4 86 65 1975 15.2 79 3 dodge colt hatchback custom 35.7 4 98 80 1915 14.4 79 1 amc spirit dl 27.4 4 121 80 2670 15 79 1 mercedes benz 300d 25.4 5 183 77 3530 20.1 79 2 cadillac eldorado 23 8 350 125 3900 17.4 79 1 peugeot 504 27.2 4 141 71 3190 24.8 79 2 oldsmobile cutlass salon brougham 23.9 8 260 90 3420 22.2 79 1 plymouth horizon 34.2 4 105 70 2200 13.2 79 1 plymouth horizon tc3 34.5 4 105 70 2150 14.9 79 1 datsun 210 31.8 4 85 65 2020 19.2 79 3 fiat strada custom 37.3 4 91 69 2130 14.7 79 2 buick skylark limited 28.4 4 151 90 2670 16 79 1 chevrolet citation 28.8 6 173 115 2595 11.3 79 1 oldsmobile omega brougham 26.8 6 173 115 2700 12.9 79 1 pontiac phoenix 33.5 4 151 90 2556 13.2 79 1 vw rabbit 41.5 4 98 76 2144 14.7 80 2 toyota corolla tercel 38.1 4 89 60 1968 18.8 80 3 chevrolet chevette 32.1 4 98 70 2120 15.5 80 1 datsun 310 37.2 4 86 65 2019 16.4 80 3 chevrolet citation 28 4 151 90 2678 16.5 80 1 ford fairmont 26.4 4 140 88 2870 18.1 80 1 amc concord 24.3 4 151 90 3003 20.1 80 1 dodge aspen 19.1 6 225 90 3381 18.7 80 1 audi 4000 34.3 4 97 78 2188 15.8 80 2 toyota corona liftback 29.8 4 134 90 2711 15.5 80 3 mazda 626 31.3 4 120 75 2542 17.5 80 3 datsun 510 hatchback 37 4 119 92 2434 15 80 3 toyota corolla 32.2 4 108 75 2265 15.2 80 3 mazda glc 46.6 4 86 65 2110 17.9 80 3 dodge colt 27.9 4 156 105 2800 14.4 80 1 datsun 210 40.8 4 85 65 2110 19.2 80 3 vw rabbit c (diesel) 44.3 4 90 48 2085 21.7 80 2 vw dasher (diesel) 43.4 4 90 48 2335 23.7 80 2 audi 5000s (diesel) 36.4 5 121 67 2950 19.9 80 2 mercedes-benz 240d 30 4 146 67 3250 21.8 80 2 honda civic 1500 gl 44.6 4 91 67 1850 13.8 80 3 renault lecar deluxe 40.9 4 85 NA 1835 17.3 80 2 subaru dl 33.8 4 97 67 2145 18 80 3 vokswagen rabbit 29.8 4 89 62 1845 15.3 80 2 datsun 280-zx 32.7 6 168 132 2910 11.4 80 3 mazda rx-7 gs 23.7 3 70 100 2420 12.5 80 3 triumph tr7 coupe 35 4 122 88 2500 15.1 80 2 ford mustang cobra 23.6 4 140 NA 2905 14.3 80 1 honda accord 32.4 4 107 72 2290 17 80 3 plymouth reliant 27.2 4 135 84 2490 15.7 81 1 buick skylark 26.6 4 151 84 2635 16.4 81 1 dodge aries wagon (sw) 25.8 4 156 92 2620 14.4 81 1 chevrolet citation 23.5 6 173 110 2725 12.6 81 1 plymouth reliant 30 4 135 84 2385 12.9 81 1 toyota starlet 39.1 4 79 58 1755 16.9 81 3 plymouth champ 39 4 86 64 1875 16.4 81 1 honda civic 1300 35.1 4 81 60 1760 16.1 81 3 subaru 32.3 4 97 67 2065 17.8 81 3 datsun 210 mpg 37 4 85 65 1975 19.4 81 3 toyota tercel 37.7 4 89 62 2050 17.3 81 3 mazda glc 4 34.1 4 91 68 1985 16 81 3 plymouth horizon 4 34.7 4 105 63 2215 14.9 81 1 ford escort 4w 34.4 4 98 65 2045 16.2 81 1 ford escort 2h 29.9 4 98 65 2380 20.7 81 1 volkswagen jetta 33 4 105 74 2190 14.2 81 2 renault 18i 34.5 4 100 NA 2320 15.8 81 2 honda prelude 33.7 4 107 75 2210 14.4 81 3 toyota corolla 32.4 4 108 75 2350 16.8 81 3 datsun 200sx 32.9 4 119 100 2615 14.8 81 3 mazda 626 31.6 4 120 74 2635 18.3 81 3 peugeot 505s turbo diesel 28.1 4 141 80 3230 20.4 81 2 saab 900s NA 4 121 110 2800 15.4 81 2 volvo diesel 30.7 6 145 76 3160 19.6 81 2 toyota cressida 25.4 6 168 116 2900 12.6 81 3 datsun 810 maxima 24.2 6 146 120 2930 13.8 81 3 buick century 22.4 6 231 110 3415 15.8 81 1 oldsmobile cutlass ls 26.6 8 350 105 3725 19 81 1 ford granada gl 20.2 6 200 88 3060 17.1 81 1 chrysler lebaron salon 17.6 6 225 85 3465 16.6 81 1 chevrolet cavalier 28 4 112 88 2605 19.6 82 1 chevrolet cavalier wagon 27 4 112 88 2640 18.6 82 1 chevrolet cavalier 2-door 34 4 112 88 2395 18 82 1 pontiac j2000 se hatchback 31 4 112 85 2575 16.2 82 1 dodge aries se 29 4 135 84 2525 16 82 1 pontiac phoenix 27 4 151 90 2735 18 82 1 ford fairmont futura 24 4 140 92 2865 16.4 82 1 amc concord dl 23 4 151 NA 3035 20.5 82 1 volkswagen rabbit l 36 4 105 74 1980 15.3 82 2 mazda glc custom l 37 4 91 68 2025 18.2 82 3 mazda glc custom 31 4 91 68 1970 17.6 82 3 plymouth horizon miser 38 4 105 63 2125 14.7 82 1 mercury lynx l 36 4 98 70 2125 17.3 82 1 nissan stanza xe 36 4 120 88 2160 14.5 82 3 honda accord 36 4 107 75 2205 14.5 82 3 toyota corolla 34 4 108 70 2245 16.9 82 3 honda civic 38 4 91 67 1965 15 82 3 honda civic (auto) 32 4 91 67 1965 15.7 82 3 datsun 310 gx 38 4 91 67 1995 16.2 82 3 buick century limited 25 6 181 110 2945 16.4 82 1 oldsmobile cutlass ciera (diesel) 38 6 262 85 3015 17 82 1 chrysler lebaron medallion 26 4 156 92 2585 14.5 82 1 ford granada l 22 6 232 112 2835 14.7 82 1 toyota celica gt 32 4 144 96 2665 13.9 82 3 dodge charger 2.2 36 4 135 84 2370 13 82 1 chevrolet camaro 27 4 151 90 2950 17.3 82 1 ford mustang gl 27 4 140 86 2790 15.6 82 1 vw pickup 44 4 97 52 2130 24.6 82 2 dodge rampage 32 4 135 84 2295 11.6 82 1 ford ranger 28 4 120 79 2625 18.6 82 1 chevy s-10 31 4 119 82 2720 19.4 82 1 \ No newline at end of file diff --git a/examples/topics/data/cdi01_g.jpg b/examples/topics/data/cdi01_g.jpg deleted file mode 100644 index 78ce58f4c..000000000 Binary files a/examples/topics/data/cdi01_g.jpg and /dev/null differ diff --git a/examples/topics/data/down.gif b/examples/topics/data/down.gif deleted file mode 100644 index 7e4f44155..000000000 Binary files a/examples/topics/data/down.gif and /dev/null differ diff --git a/examples/topics/data/end.jpg b/examples/topics/data/end.jpg deleted file mode 100644 index 32935763a..000000000 Binary files a/examples/topics/data/end.jpg and /dev/null differ diff --git a/examples/topics/data/florence03.jpg b/examples/topics/data/florence03.jpg deleted file mode 100644 index ec33b266a..000000000 Binary files a/examples/topics/data/florence03.jpg and /dev/null differ diff --git a/examples/topics/data/house.jpg b/examples/topics/data/house.jpg deleted file mode 100644 index c6d311fd1..000000000 Binary files a/examples/topics/data/house.jpg and /dev/null differ diff --git a/examples/topics/data/milan.jpg b/examples/topics/data/milan.jpg deleted file mode 100644 index 41aa2713d..000000000 Binary files a/examples/topics/data/milan.jpg and /dev/null differ diff --git a/examples/topics/data/paris.jpg b/examples/topics/data/paris.jpg deleted file mode 100644 index a6d85ed57..000000000 Binary files a/examples/topics/data/paris.jpg and /dev/null differ diff --git a/examples/topics/data/positions.txt b/examples/topics/data/positions.txt deleted file mode 100644 index 6df499567..000000000 --- a/examples/topics/data/positions.txt +++ /dev/null @@ -1,206 +0,0 @@ -70 35 -69 35 -68 39 -67 42 -66 47 -64 51 -64 54 -63 57 -60 60 -58 64 -51 69 -48 72 -44 73 -39 75 -35 75 -30 75 -25 75 -21 75 -17 73 -13 69 -12 66 -11 61 -11 57 -10 49 -10 45 -10 38 -12 32 -13 29 -16 23 -20 19 -24 16 -27 15 -31 13 -33 13 -37 13 -40 15 -42 16 -45 19 -46 21 -47 24 -48 26 -48 29 -48 33 -47 39 -43 45 -42 47 -38 50 -35 51 -32 51 -30 51 -27 50 -27 50 -26 46 -26 41 -29 36 -30 34 -31 33 -31 33 -32 33 -33 33 -34 33 -34 33 -35 33 -37 33 -39 33 -42 32 -44 31 -46 29 -48 29 -49 27 -52 24 -53 23 -57 19 -61 16 -63 14 -67 13 -69 12 -69 12 -77 11 -77 11 -80 11 -86 16 -90 21 -93 25 -95 29 -95 32 -95 33 -95 37 -94 41 -93 44 -92 46 -91 49 -89 51 -87 55 -85 59 -82 62 -80 64 -79 67 -77 69 -74 71 -68 72 -65 73 -63 73 -62 73 -60 72 -58 69 -57 67 -57 66 -56 60 -56 56 -56 54 -58 49 -60 47 -62 47 -63 47 -67 48 -70 52 -73 55 -74 57 -74 58 -74 60 -74 62 -73 65 -70 68 -67 69 -65 70 -63 70 -62 70 -60 68 -57 65 -55 64 -50 62 -46 61 -40 60 -38 60 -36 60 -32 61 -30 62 -27 64 -26 68 -25 71 -25 77 -25 81 -26 84 -28 86 -31 87 -33 88 -36 88 -39 86 -41 85 -43 83 -44 81 -45 76 -45 74 -45 71 -40 67 -37 65 -34 63 -33 61 -33 61 -32 60 -33 49 -37 45 -41 41 -45 39 -47 38 -51 37 -54 37 -58 38 -61 41 -63 44 -65 46 -66 49 -66 51 -67 55 -67 58 -67 60 -66 62 -64 65 -63 66 -61 67 -60 68 -58 68 -55 69 -54 69 -51 69 -48 69 -46 68 -45 66 -44 65 -44 63 -44 61 -44 59 -44 56 -44 55 -45 53 -47 52 -49 50 -50 48 -51 47 -52 46 -54 46 -55 45 -55 45 -56 44 -57 44 diff --git a/examples/topics/data/roll.gif b/examples/topics/data/roll.gif deleted file mode 100644 index 7e2a1bc2e..000000000 Binary files a/examples/topics/data/roll.gif and /dev/null differ diff --git a/examples/topics/data/seedBottom.jpg b/examples/topics/data/seedBottom.jpg deleted file mode 100644 index dd98337c9..000000000 Binary files a/examples/topics/data/seedBottom.jpg and /dev/null differ diff --git a/examples/topics/data/seedTop.jpg b/examples/topics/data/seedTop.jpg deleted file mode 100644 index 62af546c3..000000000 Binary files a/examples/topics/data/seedTop.jpg and /dev/null differ diff --git a/examples/topics/data/sunflower.jpg b/examples/topics/data/sunflower.jpg deleted file mode 100644 index 88398d188..000000000 Binary files a/examples/topics/data/sunflower.jpg and /dev/null differ diff --git a/examples/topics/data/texture.gif b/examples/topics/data/texture.gif deleted file mode 100644 index 17e84e806..000000000 Binary files a/examples/topics/data/texture.gif and /dev/null differ diff --git a/examples/topics/data/trees.jpg b/examples/topics/data/trees.jpg deleted file mode 100644 index afdcf5045..000000000 Binary files a/examples/topics/data/trees.jpg and /dev/null differ diff --git a/examples/topics/data/wires.jpg b/examples/topics/data/wires.jpg deleted file mode 100644 index a0a6e24dd..000000000 Binary files a/examples/topics/data/wires.jpg and /dev/null differ diff --git a/examples/topics/data/ystone08.jpg b/examples/topics/data/ystone08.jpg deleted file mode 100644 index 5428ada88..000000000 Binary files a/examples/topics/data/ystone08.jpg and /dev/null differ diff --git a/examples/topics/edgedetection.html b/examples/topics/edgedetection.html deleted file mode 100644 index d26597e83..000000000 --- a/examples/topics/edgedetection.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - -

Processing.js

-

EdgeDetection

- -

Known to be broken. Needs a re-write of p.createImage(). Bug #243

- -

Exposing areas of contrast within an image -by processing it through a high-pass filter.

- -

Original Processing.org Example: EdgeDetection
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float[][] kernel = { { -1, -1, -1 },
-                     { -1,  9, -1 },
-                     { -1, -1, -1 } };
-  
-size(200, 200);
-PImage img = loadImage("house.jpg"); // Load the original image
-image(img, 0, 0); // Displays the image from point (0,0) 
-img.loadPixels();
-// Create an opaque image of the same size as the original
-PImage edgeImg = createImage(img.width, img.height, RGB);
-// Loop through every pixel in the image.
-for (int y = 1; y < img.height-1; y++) { // Skip top and bottom edges
-  for (int x = 1; x < img.width-1; x++) { // Skip left and right edges
-    float sum = 0; // Kernel sum for this pixel
-    for (int ky = -1; ky <= 1; ky++) {
-      for (int kx = -1; kx <= 1; kx++) {
-        // Calculate the adjacent pixel for this kernel point
-        int pos = (y + ky)*img.width + (x + kx);
-        // Image is grayscale, red/green/blue are identical
-        float val = red(img.pixels[pos]);
-        // Multiply adjacent pixels based on the kernel values
-        sum += kernel[ky+1][kx+1] * val;
-      }
-    }
-    // For this pixel in the new image, set the gray value
-    // based on the sum from the kernel
-    edgeImg.pixels[y*img.width + x] = color(sum);
-  }
-}
-// State that there are changes to edgeImg.pixels[]
-edgeImg.updatePixels();
-image(edgeImg, 100, 0); // Draw the new image
-
- - diff --git a/examples/topics/flocking.html b/examples/topics/flocking.html deleted file mode 100644 index bdb0ea8ed..000000000 --- a/examples/topics/flocking.html +++ /dev/null @@ -1,727 +0,0 @@ - - - - - -

Processing.js

-

Flocking

- -

by Daniel Shiffman. - -An implementation of Craig Reynold's Boids program to simulate -the flocking behavior of birds. Each boid steers itself based on -rules of avoidance, alignment, and coherence. - -Click the mouse to add a new boid.

- -

Original Processing.org Example: Flocking
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-Flock flock;
-
-void setup() {
-  size(200,200);
-  colorMode(RGB,255,255,255,100);
-  flock = new Flock();
-  // Add an initial set of boids into the system
-  for (int i = 0; i < 50; i++) {
-    flock.addBoid(new Boid(new Vector3D(width/2,height/2),2.0f,0.05f));
-  }
-  smooth();
-}
-
-void draw() {
-
-  background(100);
-  flock.run();
-}
-
-// Add a new boid into the System
-void mousePressed() {
-  flock.addBoid(new Boid(new Vector3D(mouseX,mouseY),2.0f,0.05f));
-}
-
-class Flock {
-  ArrayList boids; // An arraylist for all the boids
-
-  Flock() {
-    boids = new ArrayList(); // Initialize the arraylist
-  }
-
-  void run() {
-    for (int i = 0; i < boids.size(); i++) {
-      Boid b = (Boid) boids.get(i);  
-      b.run(boids);  // Passing the entire list of boids to each boid individually
-    }
-  }
-
-  void addBoid(Boid b) {
-    boids.add(b);
-  }
-
-}
-
-
-class Boid {
-
-  Vector3D loc;
-  Vector3D vel;
-  Vector3D acc;
-  float r;
-  float maxforce;    // Maximum steering force
-  float maxspeed;    // Maximum speed
-
-  Boid(Vector3D l, float ms, float mf) {
-    acc = new Vector3D(0,0);
-    vel = new Vector3D(random(-1,1),random(-1,1));
-    loc = l.copy();
-    r = 2.0f;
-    maxspeed = ms;
-    maxforce = mf;
-  }
-  
-  void run(ArrayList boids) {
-    flock(boids);
-    update();
-    borders();
-    render();
-  }
-
-  // We accumulate a new acceleration each time based on three rules
-  void flock(ArrayList boids) {
-    Vector3D sep = separate(boids);   // Separation
-    Vector3D ali = align(boids);      // Alignment
-    Vector3D coh = cohesion(boids);   // Cohesion
-    // Arbitrarily weight these forces
-    sep.mult(2.0f);
-    ali.mult(1.0f);
-    coh.mult(1.0f);
-    // Add the force vectors to acceleration
-    acc.add(sep);
-    acc.add(ali);
-    acc.add(coh);
-  }
-  
-  // Method to update location
-  void update() {
-    // Update velocity
-    vel.add(acc);
-    // Limit speed
-    vel.limit(maxspeed);
-    loc.add(vel);
-    // Reset accelertion to 0 each cycle
-    acc.setXYZ(0,0,0);
-  }
-
-  void seek(Vector3D target) {
-    acc.add(steer(target,false));
-  }
- 
-  void arrive(Vector3D target) {
-    acc.add(steer(target,true));
-  }
-
-  // A method that calculates a steering vector towards a target
-  // Takes a second argument, if true, it slows down as it approaches the target
-  Vector3D steer(Vector3D target, boolean slowdown) {
-    Vector3D steer;  // The steering vector
-    Vector3D desired = target.sub(target,loc);  // A vector pointing from the location to the target
-    float d = desired.magnitude(); // Distance from the target is the magnitude of the vector
-    // If the distance is greater than 0, calc steering (otherwise return zero vector)
-    if (d > 0) {
-      // Normalize desired
-      desired.normalize();
-      // Two options for desired vector magnitude (1 -- based on distance, 2 -- maxspeed)
-      if ((slowdown) && (d < 100.0f)) desired.mult(maxspeed*(d/100.0f)); // This damping is somewhat arbitrary
-      else desired.mult(maxspeed);
-      // Steering = Desired minus Velocity
-      steer = target.sub(desired,vel);
-      steer.limit(maxforce);  // Limit to maximum steering force
-    } else {
-      steer = new Vector3D(0,0);
-    }
-    return steer;
-  }
-  
-  void render() {
-    // Draw a triangle rotated in the direction of velocity
-    float theta = vel.heading2D() + radians(90);
-    fill(200);
-    stroke(255);
-    pushMatrix();
-    translate(loc.x,loc.y);
-    rotate(theta);
-    beginShape(TRIANGLES);
-    vertex(0, -r*2);
-    vertex(-r, r*2);
-    vertex(r, r*2);
-    endShape();
-    popMatrix();
-  }
-  
-  // Wraparound
-  void borders() {
-    if (loc.x < -r) loc.x = width+r;
-    if (loc.y < -r) loc.y = height+r;
-    if (loc.x > width+r) loc.x = -r;
-    if (loc.y > height+r) loc.y = -r;
-  }
-
-  // Separation
-  // Method checks for nearby boids and steers away
-  Vector3D separate (ArrayList boids) {
-    float desiredseparation = 25.0f;
-    Vector3D sum = new Vector3D(0,0,0);
-    int count = 0;
-    // For every boid in the system, check if it's too close
-    for (int i = 0 ; i < boids.size(); i++) {
-      Boid other = (Boid) boids.get(i);
-      float d = loc.distance(loc,other.loc);
-      // If the distance is greater than 0 and less than an arbitrary amount (0 when you are yourself)
-      if ((d > 0) && (d < desiredseparation)) {
-        // Calculate vector pointing away from neighbor
-        Vector3D diff = loc.sub(loc,other.loc);
-        diff.normalize();
-        diff.div(d);        // Weight by distance
-        sum.add(diff);
-        count++;            // Keep track of how many
-      }
-    }
-    // Average -- divide by how many
-    if (count > 0) {
-      sum.div((float)count);
-    }
-    return sum;
-  }
-  
-  // Alignment
-  // For every nearby boid in the system, calculate the average velocity
-  Vector3D align (ArrayList boids) {
-    float neighbordist = 50.0f;
-    Vector3D sum = new Vector3D(0,0,0);
-    int count = 0;
-    for (int i = 0 ; i < boids.size(); i++) {
-      Boid other = (Boid) boids.get(i);
-      float d = loc.distance(loc,other.loc);
-      if ((d > 0) && (d < neighbordist)) {
-        sum.add(other.vel);
-        count++;
-      }
-    }
-    if (count > 0) {
-      sum.div((float)count);
-      sum.limit(maxforce);
-    }
-    return sum;
-  }
-
-  // Cohesion
-  // For the average location (i.e. center) of all nearby boids, calculate steering vector towards that location
-  Vector3D cohesion (ArrayList boids) {
-    float neighbordist = 50.0f;
-    Vector3D sum = new Vector3D(0,0,0);   // Start with empty vector to accumulate all locations
-    int count = 0;
-    for (int i = 0 ; i < boids.size(); i++) {
-      Boid other = (Boid) boids.get(i);
-      float d = loc.distance(loc,other.loc);
-      if ((d > 0) && (d < neighbordist)) {
-        sum.add(other.loc); // Add location
-        count++;
-      }
-    }
-    if (count > 0) {
-      sum.div((float)count);
-      return steer(sum,false);  // Steer towards the location
-    }
-    return sum;
-  }
-}
-
-// Simple Vector3D Class 
-
-static class Vector3D {
-  float x;
-  float y;
-  float z;
-
-  Vector3D(float x_, float y_, float z_) {
-    x = x_; y = y_; z = z_;
-  }
-
-  Vector3D(float x_, float y_) {
-    x = x_; y = y_; z = 0f;
-  }
-  
-  Vector3D() {
-    x = 0f; y = 0f; z = 0f;
-  }
-
-  void setX(float x_) {
-    x = x_;
-  }
-
-  void setY(float y_) {
-    y = y_;
-  }
-
-  void setZ(float z_) {
-    z = z_;
-  }
-  
-  void setXY(float x_, float y_) {
-    x = x_;
-    y = y_;
-  }
-  
-  void setXYZ(float x_, float y_, float z_) {
-    x = x_;
-    y = y_;
-    z = z_;
-  }
-
-  void setXYZ(Vector3D v) {
-    x = v.x;
-    y = v.y;
-    z = v.z;
-  }
-  
-  float magnitude() {
-    return (float) Math.sqrt(x*x + y*y + z*z);
-  }
-
-  Vector3D copy() {
-    return new Vector3D(x,y,z);
-  }
-
-  Vector3D copy(Vector3D v) {
-    return new Vector3D(v.x, v.y,v.z);
-  }
-  
-  void add(Vector3D v) {
-    x += v.x;
-    y += v.y;
-    z += v.z;
-  }
-
-  void sub(Vector3D v) {
-    x -= v.x;
-    y -= v.y;
-    z -= v.z;
-  }
-
-  void mult(float n) {
-    x *= n;
-    y *= n;
-    z *= n;
-  }
-
-  void div(float n) {
-    x /= n;
-    y /= n;
-    z /= n;
-  }
-
-  void normalize() {
-    float m = magnitude();
-    if (m > 0) {
-       div(m);
-    }
-  }
-
-  void limit(float max) {
-    if (magnitude() > max) {
-      normalize();
-      mult(max);
-    }
-  }
-
-  float heading2D() {
-    float angle = (float) Math.atan2(-y, x);
-    return -1*angle;
-  }
-
-  Vector3D add(Vector3D v1, Vector3D v2) {
-    Vector3D v = new Vector3D(v1.x + v2.x,v1.y + v2.y, v1.z + v2.z);
-    return v;
-  }
-
-  Vector3D sub(Vector3D v1, Vector3D v2) {
-    Vector3D v = new Vector3D(v1.x - v2.x,v1.y - v2.y,v1.z - v2.z);
-    return v;
-  }
-
-  Vector3D div(Vector3D v1, float n) {
-    Vector3D v = new Vector3D(v1.x/n,v1.y/n,v1.z/n);
-    return v;
-  }
-
-  Vector3D mult(Vector3D v1, float n) {
-    Vector3D v = new Vector3D(v1.x*n,v1.y*n,v1.z*n);
-    return v;
-  }
-
-  float distance (Vector3D v1, Vector3D v2) {
-    float dx = v1.x - v2.x;
-    float dy = v1.y - v2.y;
-    float dz = v1.z - v2.z;
-    return (float) Math.sqrt(dx*dx + dy*dy + dz*dz);
-  }
-
-}
- - diff --git a/examples/topics/fluid.html b/examples/topics/fluid.html deleted file mode 100644 index 86f98b657..000000000 --- a/examples/topics/fluid.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - -

Processing.js

-

Fluid

- -

by Glen Murphy. - -Click and drag the mouse to move the simulated fluid. -Adjust the "res" variable below to change resolution. -Code has not been optimised, and will run fairly slowly. - -Completed 5 November 2002

- -

Original Processing.org Example: Fluid
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int res = 2;
-int penSize = 30;
-int lwidth;
-int lheight;
-int pnum = 30000;
-vsquare[][] v;
-vbuffer[][] vbuf;
-particle[] p = new particle[pnum];
-int pcount = 0;
-int mouseXvel = 0;
-int mouseYvel = 0;
-
-void setup() 
-{
-  size(200,200);
-  noStroke();
-  frameRate(30);
-  lwidth = width/res;
-  lheight = height/res;
-  v = new vsquare[lwidth+1][lheight+1];
-  vbuf = new vbuffer[lwidth+1][lheight+1];
-  for (int i = 0; i < pnum; i++) {
-    p[i] = new particle(random(res,width-res),random(res,height-res));
-  }
-  for (int i = 0; i <= lwidth; i++) {
-    for (int u = 0; u <= lheight; u++) {
-      v[i][u] = new vsquare(i*res,u*res);
-      vbuf[i][u] = new vbuffer(i*res,u*res);
-    }
-  }
-}
-
-void draw() 
-{
-  background(#666666);
-  
-  int axvel = mouseX-pmouseX;
-  int ayvel = mouseY-pmouseY;
-
-  mouseXvel = (axvel != mouseXvel) ? axvel : 0;
-  mouseYvel = (ayvel != mouseYvel) ? ayvel : 0;
-
-  for (int i = 0; i < lwidth; i++) {
-    for (int u = 0; u < lheight; u++) {
-      vbuf[i][u].updatebuf(i,u);
-      v[i][u].col = 32;
-    }
-  }
-  for (int i = 0; i < pnum-1; i++) {
-    p[i].updatepos();
-  }
-  for (int i = 0; i < lwidth; i++) {
-    for (int u = 0; u < lheight; u++) {
-      v[i][u].addbuffer(i, u);
-      v[i][u].updatevels(mouseXvel, mouseYvel);
-      v[i][u].display(i, u);
-    }
-  }
-}
-
-class particle {
-  float x;
-  float y;
-  float xvel;
-  float yvel;
-  int pos;
-  particle(float xIn, float yIn) {
-    x = xIn;
-    y = yIn;
-  }
-
-  void updatepos() {
-    float col1;
-    if (x > 0 && x < width && y > 0 && y < height) {
-      int vi = (int)(x/res);
-      int vu = (int)(y/res);
-      vsquare o = v[vi][vu];    
-      
-      float ax = (x%res)/res;
-      float ay = (y%res)/res;
-      
-      xvel += (1-ax)*v[vi][vu].xvel*0.05;
-      yvel += (1-ay)*v[vi][vu].yvel*0.05;
-      
-      xvel += ax*v[vi+1][vu].xvel*0.05;
-      yvel += ax*v[vi+1][vu].yvel*0.05;
-      
-      xvel += ay*v[vi][vu+1].xvel*0.05;
-      yvel += ay*v[vi][vu+1].yvel*0.05;
-
-      o.col += 4;
-      
-      x += xvel;
-      y += yvel;
-    }
-    else {
-      x = random(0,width);
-      y = random(0,height);
-      xvel = 0;
-      yvel = 0;
-    }
-
-    xvel *= 0.5;
-    yvel *= 0.5;
-  }
-}
-
-class vbuffer {
-  int x;
-  int y;
-  float xvel;
-  float yvel;
-  float pressurex = 0;
-  float pressurey = 0;
-  float pressure = 0;
-
-  vbuffer(int xIn,int yIn) {
-    x = xIn;
-    y = yIn;
-    pressurex = 0;
-    pressurey = 0;
-    }
-
-  void updatebuf(int i, int u) {
-    if (i>0 && i<lwidth && u>0 && u<lheight) {
-      pressurex = (v[i-1][u-1].xvel*0.5 + v[i-1][u].xvel + v[i-1][u+1].xvel*0.5 - v[i+1][u-1].xvel*0.5 - v[i+1][u].xvel - v[i+1][u+1].xvel*0.5);
-      pressurey = (v[i-1][u-1].yvel*0.5 + v[i][u-1].yvel + v[i+1][u-1].yvel*0.5 - v[i-1][u+1].yvel*0.5 - v[i][u+1].yvel - v[i+1][u+1].yvel*0.5);
-      pressure = (pressurex + pressurey)*0.25;
-      }
-    }
-  }
-
-class vsquare {
-  int x;
-  int y;
-  float xvel;
-  float yvel;
-  float col;
-
-  vsquare(int xIn,int yIn) {
-    x = xIn;
-    y = yIn;
-    }
-
-  void addbuffer(int i, int u) {
-    if (i>0 && i<lwidth && u>0 && u<lheight) {
-      xvel += (vbuf[i-1][u-1].pressure*0.5
-              +vbuf[i-1][u].pressure
-              +vbuf[i-1][u+1].pressure*0.5
-              -vbuf[i+1][u-1].pressure*0.5
-              -vbuf[i+1][u].pressure
-              -vbuf[i+1][u+1].pressure*0.5
-              )*0.25;
-      yvel += (vbuf[i-1][u-1].pressure*0.5
-              +vbuf[i][u-1].pressure
-              +vbuf[i+1][u-1].pressure*0.5
-              -vbuf[i-1][u+1].pressure*0.5
-              -vbuf[i][u+1].pressure
-              -vbuf[i+1][u+1].pressure*0.5
-              )*0.25;
-      }
-    }
-
-  void updatevels(int mvelX, int mvelY) {
-    if (mousePressed) {
-      float adj = x - mouseX;
-      float opp = y - mouseY;
-      float dist = sqrt(opp*opp + adj*adj);
-      if (dist < penSize) {
-        if (dist < 4) dist = penSize;
-        float mod = penSize/dist;
-        xvel += mvelX*mod;
-        yvel += mvelY*mod;
-        }
-      }
-
-    xvel *= 0.99;
-    yvel *= 0.99;
-  }
-  
-  void display(int i, int u) {
-    float tcol = 0;
-    if (col > 255) col = 255;
-    if (i>0 && i<lwidth-1 && u>0 && u<lheight-1) {
-      tcol = (+ v[i][u+1].col 
-              + v[i+1][u].col 
-              + v[i+1][u+1].col*0.5
-              )*0.4;
-      tcol = (int)(tcol+col*0.5);
-      }
-    else {
-      tcol = (int)col;
-      }
-    fill(tcol, tcol, tcol);
-    rect(x,y,res,res);
-  }
-}
- - diff --git a/examples/topics/follow1.html b/examples/topics/follow1.html deleted file mode 100644 index ff935a7fd..000000000 --- a/examples/topics/follow1.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - -

Processing.js

-

Follow1

- -

Based on code from Keith Peters (www.bit-101.com). - -A line segment is pushed and pulled by the cursor.

- -

Original Processing.org Example: Follow1
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float x = 100;
-float y = 100;
-float angle1 = 0.0;
-float segLength = 50;
-
-void setup() {
-  size(200, 200);
-  smooth(); 
-  strokeWeight(20.0);
-  stroke(0, 100);
-}
-
-void draw() {
-  background(226);
-  
-  float dx = mouseX - x;
-  float dy = mouseY - y;
-  angle1 = atan2(dy, dx);  
-  x = mouseX - (cos(angle1) * segLength);
-  y = mouseY - (sin(angle1) * segLength);
- 
-  segment(x, y, angle1); 
-  ellipse(x, y, 20, 20);
-}
-
-void segment(float x, float y, float a) {
-  pushMatrix();
-  translate(x, y);
-  rotate(a);
-  line(0, 0, segLength, 0);
-  popMatrix();
-}
- - diff --git a/examples/topics/follow2.html b/examples/topics/follow2.html deleted file mode 100644 index 1826cb8fd..000000000 --- a/examples/topics/follow2.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - -

Processing.js

-

Follow2

- -

Based on code from Keith Peters (www.bit-101.com). - -A two-segmented arm follows the cursor position. The relative -angle between the segments is calculated with atan2() and the -position calculated with sin() and cos().

- -

Original Processing.org Example: Follow2
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float[] x = new float[2];
-float[] y = new float[2];
-float segLength = 50;
-
-void setup() {
-  size(200, 200);
-  smooth(); 
-  strokeWeight(20.0);
-  stroke(0, 100);
-}
-
-void draw() {
-  background(226);
-  dragSegment(0, mouseX, mouseY);
-  dragSegment(1, x[0], y[0]);
-}
-
-void dragSegment(int i, float xin, float yin) {
-  float dx = xin - x[i];
-  float dy = yin - y[i];
-  float angle = atan2(dy, dx);  
-  x[i] = xin - cos(angle) * segLength;
-  y[i] = yin - sin(angle) * segLength;
-  segment(x[i], y[i], angle);
-}
-
-void segment(float x, float y, float a) {
-  pushMatrix();
-  translate(x, y);
-  rotate(a);
-  line(0, 0, segLength, 0);
-  popMatrix();
-}
- - diff --git a/examples/topics/follow3.html b/examples/topics/follow3.html deleted file mode 100644 index 803ae8879..000000000 --- a/examples/topics/follow3.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - -

Processing.js

-

Follow3

- -

Based on code from Keith Peters (www.bit-101.com). - -A segmented line follows the mouse. The relative angle from -each segment to the next is calculated with atan2() and the -position of the next is calculated with sin() and cos().

- -

Original Processing.org Example: Follow3
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float[] x = new float[20];
-float[] y = new float[20];
-float segLength = 9;
-
-void setup() {
-  size(200, 200);
-  smooth(); 
-  strokeWeight(5);
-  stroke(0, 100);
-}
-
-void draw() {
-  background(226);
-  dragSegment(0, mouseX, mouseY);
-  for(int i=0; i<x.length-1; i++) {
-    dragSegment(i+1, x[i], y[i]);
-  }
-}
-
-void dragSegment(int i, float xin, float yin) {
-  float dx = xin - x[i];
-  float dy = yin - y[i];
-  float angle = atan2(dy, dx);  
-  x[i] = xin - cos(angle) * segLength;
-  y[i] = yin - sin(angle) * segLength;
-  segment(x[i], y[i], angle);
-}
-
-void segment(float x, float y, float a) {
-  pushMatrix();
-  translate(x, y);
-  rotate(a);
-  line(0, 0, segLength, 0);
-  popMatrix();
-}
- - diff --git a/examples/topics/handles.html b/examples/topics/handles.html deleted file mode 100644 index ae8569c00..000000000 --- a/examples/topics/handles.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - -

Processing.js

-

Handles

- -

Click and drag the white boxes to change their position.

- -

Original Processing.org Example: Handles
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-Handle[] handles;
-int num;
-
-void setup()
-{
-  size(200, 200);
-  num = height/15;
-  handles = new Handle[num];
-  int hsize = 10;
-  for(int i=0; i<num; i++) {
-    handles[i] = new Handle(width/2, 10+i*15, 50-hsize/2, 10, handles);
-  }
-}
-
-void draw()
-{
-  background(153);
-  
-  for(int i=0; i<num; i++) {
-    handles[i].update();
-    handles[i].display();
-  }
-  
-  fill(0);
-  rect(0, 0, width/2, height);
-}
-
-void mouseReleased() 
-{
-  for(int i=0; i<num; i++) {
-    handles[i].release();
-  }
-}
-
-class Handle
-{
-  int x, y;
-  int boxx, boxy;
-  int length;
-  int size;
-  boolean over;
-  boolean press;
-  boolean locked = false;
-  boolean otherslocked = false;
-  Handle[] others;
-  
-  Handle(int ix, int iy, int il, int is, Handle[] o)
-  {
-    x = ix;
-    y = iy;
-    length = il;
-    size = is;
-    boxx = x+length - size/2;
-    boxy = y - size/2;
-    others = o;
-  }
-  
-  void update() 
-  {
-    boxx = x+length;
-    boxy = y - size/2;
-    
-    for(int i=0; i<others.length; i++) {
-      if(others[i].locked == true) {
-        otherslocked = true;
-        break;
-      } else {
-        otherslocked = false;
-      }  
-    }
-    
-    if(otherslocked == false) {
-      over();
-      press();
-    }
-    
-    if(press) {
-      length = lock(mouseX-width/2-size/2, 0, width/2-size-1);
-    }
-  }
-  
-  void over()
-  {
-    if(overRect(boxx, boxy, size, size)) {
-      over = true;
-    } else {
-      over = false;
-    }
-  }
-  
-  void press()
-  {
-    if(over && mousePressed || locked) {
-      press = true;
-      locked = true;
-    } else {
-      press = false;
-    }
-  }
-  
-  void release()
-  {
-    locked = false;
-  }
-  
-  void display() 
-  {
-    line(x, y, x+length, y);
-    fill(255);
-    stroke(0);
-    rect(boxx, boxy, size, size);
-    if(over || press) {
-      line(boxx, boxy, boxx+size, boxy+size);
-      line(boxx, boxy+size, boxx+size, boxy);
-    }
-
-  }
-}
-
-boolean overRect(int x, int y, int width, int height) 
-{
-  if (mouseX >= x && mouseX <= x+width && 
-      mouseY >= y && mouseY <= y+height) {
-    return true;
-  } else {
-    return false;
-  }
-}
-
-int lock(int val, int minv, int maxv) 
-{ 
-  return  min(max(val, minv), maxv); 
-}
- - diff --git a/examples/topics/histogram.html b/examples/topics/histogram.html deleted file mode 100644 index 8a1631084..000000000 --- a/examples/topics/histogram.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - -

Processing.js

-

Histogram

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading.

- -

Calculates the histogram of an image. -A histogram is the frequency distribution -of the gray levels with the number of pure black values -displayed on the left and number of pure white values on the right.

- -

Original Processing.org Example: Histogram
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-size(200, 200);
-colorMode(RGB, width);
-
-int[] hist = new int[width];
-
-// Load an image from the data directory
-// Load a different image by modifying the comments
-PImage a;
-a = loadImage("data/cdi01_g.jpg", null, function(){
-
-  image(a, 0, 0);
-
-  // Calculate the histogram
-  for (int i=0; i maxval) {
-      maxval = hist[i];
-    }  
-  }
-
-  // Normalize the histogram to values between 0 and "height"
-  for (int i=0; i
-
-
diff --git a/examples/topics/imagebutton.html b/examples/topics/imagebutton.html
deleted file mode 100644
index 10aa5b8a7..000000000
--- a/examples/topics/imagebutton.html
+++ /dev/null
@@ -1,220 +0,0 @@
-
-
-
-  
-
-

Processing.js

-

ImageButton

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading.

- -

Loading images and using them to create a button.

- -

Original Processing.org Example: ImageButton
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-
-/* @pjs preload="data/base.gif, data/roll.gif, data/down.gif"; */
-
-ImageButtons button;
-
-void setup()
-{
-  size(200, 200);
-  background(102, 102, 102);
-  
-  // Define and create image button
-  PImage b = loadImage("base.gif");
-  PImage r = loadImage("roll.gif");
-  PImage d = loadImage("down.gif");
-  int x = width/2 - b.width/2;
-  int y = height/2 - b.height/2; 
-  int w = b.width;
-  int h = b.height;
-  button = new ImageButtons(x, y, w, h, b, r, d);
-}
-
-void draw()
-{
-  button.update();
-  button.display();
-}
-
-class Button
-{
-  int x, y;
-  int w, h;
-  color basecolor, highlightcolor;
-  color currentcolor;
-  boolean over = false;
-  boolean pressed = false;   
-  
-  void pressed() {
-    if(over && mousePressed) {
-      pressed = true;
-    } else {
-      pressed = false;
-    }    
-  }
-  
-  boolean overRect(int x, int y, int width, int height) {
-  if (mouseX >= x && mouseX <= x+width && 
-      mouseY >= y && mouseY <= y+height) {
-    return true;
-  } else {
-    return false;
-  }
-}
-}
-
-class ImageButtons extends Button 
-{
-  PImage base;
-  PImage roll;
-  PImage down;
-  PImage currentimage;
-
-  ImageButtons(int ix, int iy, int iw, int ih, PImage ibase, PImage iroll, PImage idown) 
-  {
-    x = ix;
-    y = iy;
-    w = iw;
-    h = ih;
-    base = ibase;
-    roll = iroll;
-    down = idown;
-    currentimage = base;
-  }
-  
-  void update() 
-  {
-    over();
-    pressed();
-    if(pressed) {
-      currentimage = down;
-    } else if (over){
-      currentimage = roll;
-    } else {
-      currentimage = base;
-    }
-  }
-  
-  void over() 
-  {
-    if( overRect(x, y, w, h) ) {
-      over = true;
-    } else {
-      over = false;
-    }
-  }
-  
-  void display() 
-  {
-    image(currentimage, x, y);
-  }
-}
- - diff --git a/examples/topics/index.html b/examples/topics/index.html deleted file mode 100644 index aaf4b4748..000000000 --- a/examples/topics/index.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - -

Processing.js

-

Topic Demos

- -

Topical demonstrations of how Processing works, from the Processing.org web site. All of the following demos were written by Casey Reas and Ben Fry unless otherwise stated.

- -

Processing.org Topic Demos

- - - - diff --git a/examples/topics/koch.html b/examples/topics/koch.html deleted file mode 100644 index 10def8d36..000000000 --- a/examples/topics/koch.html +++ /dev/null @@ -1,354 +0,0 @@ - - - - - -

Processing.js

-

Koch

- -

by Daniel Shiffman. - -Renders a simple fractal, the Koch snowflake. -Each recursive level drawn in sequence.

- -

Original Processing.org Example: Koch
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-KochFractal k;
-
-void setup() {
-  size(200,200);
-  background(0);
-  frameRate(1);  // Animate slowly
-  k = new KochFractal();
-  smooth();
-}
-
-void draw() {
-  background(0);
-  // Draws the snowflake!
-  k.render();
-  // Iterate
-  k.nextLevel();
-  // Let's not do it more than 5 times. . .
-  if (k.getCount() > 5) {
-    k.restart();
-  }
-
-}
-
-
-// A class to manage the list of line segments in the snowflake pattern
-
-class KochFractal {
-  Point start;       // A point for the start
-  Point end;         // A point for the end
-  ArrayList lines;   // A list to keep track of all the lines
-  int count;
-  
-  public KochFractal()
-  {
-    start = new Point(0,height/2 + height/4);
-    end = new Point(width,height/2  + height/4);
-    lines = new ArrayList();
-    restart();
-  }
-
-  void nextLevel()
-  {  
-    // For every line that is in the arraylist
-    // create 4 more lines in a new arraylist
-    lines = iterate(lines);
-    count++;
-  }
-
-  void restart()
-  { 
-    count = 0;      // Reset count
-    lines.clear();  // Empty the array list
-    lines.add(new KochLine(start,end));  // Add the initial line (from one end point to the other)
-  }
-  
-  int getCount() {
-    return count;
-  }
-  
-  // This is easy, just draw all the lines
-  void render()
-  {
-    for(int i = 0; i < lines.size(); i++) {
-      KochLine l = (KochLine)lines.get(i);
-      l.render();
-    }
-  }
-
-  // This is where the **MAGIC** happens
-  // Step 1: Create an empty arraylist
-  // Step 2: For every line currently in the arraylist
-  //   - calculate 4 line segments based on Koch algorithm
-  //   - add all 4 line segments into the new arraylist
-  // Step 3: Return the new arraylist and it becomes the list of line segments for the structure
-  
-  // As we do this over and over again, each line gets broken into 4 lines, which gets broken into 4 lines, and so on. . . 
-  ArrayList iterate(ArrayList before)
-  {
-    ArrayList now = new ArrayList();    //Create emtpy list
-    for(int i = 0; i < before.size(); i++)
-    {
-      KochLine l = (KochLine)lines.get(i);   // A line segment inside the list
-      // Calculate 5 koch points (done for us by the line object)
-      Point a = l.start();                 
-      Point b = l.kochleft();
-      Point c = l.kochmiddle();
-      Point d = l.kochright();
-      Point e = l.end();
-      // Make line segments between all the points and add them
-      now.add(new KochLine(a,b));
-      now.add(new KochLine(b,c));
-      now.add(new KochLine(c,d));
-      now.add(new KochLine(d,e));
-    }
-    return now;
-  }
-
-}
-
-
-// A class to describe one line segment in the fractal
-// Includes methods to calculate midpoints along the line according to the Koch algorithm
-
-class KochLine {
-  
-  // Two points,
-  // a is the "left" point and 
-  // b is the "right point
-  Point a,b;
-  
-  KochLine(Point a_, Point b_) {
-     a = a_.copy();
-     b = b_.copy();
-  }
-  
-  void render() {
-    stroke(255);
-    line(a.x,a.y,b.x,b.y);
-  }
-  
-  Point start() {
-    return a.copy();
-  }
-  
-  Point end() {
-    return b.copy();
-  }
-      
-  // This is easy, just 1/3 of the way
-  Point kochleft()
-  {
-    float x = a.x + (b.x - a.x) / 3f;
-    float y = a.y + (b.y - a.y) / 3f;
-    return new Point(x,y);
-  }    
-  
-  // More complicated, have to use a little trig to figure out where this point is!
-  Point kochmiddle()
-  {
-    float x = a.x + 0.5f * (b.x - a.x) + (sin(radians(60))*(b.y-a.y)) / 3;
-    float y = a.y + 0.5f * (b.y - a.y) - (sin(radians(60))*(b.x-a.x)) / 3;
-    return new Point(x,y);
-  }    
-
-  // Easy, just 2/3 of the way
-  Point kochright()
-  {
-    float x = a.x + 2*(b.x - a.x) / 3f;
-    float y = a.y + 2*(b.y - a.y) / 3f;
-    return new Point(x,y);
-  }    
-
-}
-
-class Point {
-  float x,y;
-  
-  Point(float x_, float y_) {
-    x = x_;
-    y = y_;
-  }
-  
-  Point copy() {
-    return new Point(x,y);
-  }
-}
- - diff --git a/examples/topics/linear.html b/examples/topics/linear.html deleted file mode 100644 index abd3c996e..000000000 --- a/examples/topics/linear.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - -

Processing.js

-

Linear

- -

Changing a variable to create a moving line. -When the line moves off the edge of the window, -the variable is set to 0, which places the line -back at the bottom of the screen.

- -

Original Processing.org Example: Linear
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float a = 100;
-
-void setup() 
-{
-  size(200, 200);
-  stroke(255);
-  frameRate(30);
-}
-
-void draw() 
-{
-  background(51);
-  a = a - 1;
-  if (a < 0) { 
-    a = height; 
-  }
-  line(0, a, width, a);  
-}
- - diff --git a/examples/topics/linearimage.html b/examples/topics/linearimage.html deleted file mode 100644 index 44936fa13..000000000 --- a/examples/topics/linearimage.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - -

Processing.js

-

LinearImage

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading.

- -

Click and drag mouse up and down to control the signal. -Press and hold any key to watch the scanning.

- -

Original Processing.org Example: LinearImage
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-PImage a;
-boolean onetime = true;
-int[] aPixels = new int[200*200];
-int direction = 1;
-
-float signal;
-
-void setup() 
-{
-  size(33, 33);
-  stroke(255);
-  a = loadImage("data/cait.jpg", null, function(){
-    for(int i=0; i
-
-
diff --git a/examples/topics/loadfile1.html b/examples/topics/loadfile1.html
deleted file mode 100644
index db66ff042..000000000
--- a/examples/topics/loadfile1.html
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-  
-
-

Processing.js

-

LoadFile1

- -

Loads a text file that contains two numbers separated by a tab ('\t'). -A new pair of numbers is loaded each frame and used to draw a point on the screen.

- -

Original Processing.org Example: LoadFile1
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-String[] lines;
-int index = 0;
-
-void setup() {
-  size(200, 200);
-  background(0);
-  stroke(255);
-  frameRate(12);
-  lines = loadStrings("positions.txt");
-}
-
-void draw() {
-  if (index < lines.length) {
-    String[] pieces = split(lines[index], '\t');
-    if (pieces.length == 2) {
-      int x = int(pieces[0]) * 2;
-      int y = int(pieces[1]) * 2;
-      point(x, y);
-    }
-    // Go to the next line for the next run through draw()
-    index = index + 1;
-  }
-}
- - diff --git a/examples/topics/loadfile2.html b/examples/topics/loadfile2.html deleted file mode 100644 index 3c56bd4a3..000000000 --- a/examples/topics/loadfile2.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - -

Processing.js

-

LoadFile2

- -

This example loads a data file about cars. Each element is separated -with a tab and corresponds to a different aspect of each car. The file stores -the miles per gallon, cylinders, displacement, etc., for more than 400 different -makes and models. Press a mouse button to advance to the next group of entries.

- -

Original Processing.org Example: LoadFile2
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-Record[] records;
-String[] lines;
-int recordCount;
-PFont body;
-int num = 9; // Display this many entries on each screen.
-int startingEntry = 0;  // Display from this entry number
-
-void setup() 
-{
-  size(200, 200);
-  fill(255);
-  noLoop();
-  
-  body = loadFont("TheSans-Plain-12.vlw");
-  textFont(body);
-  
-  lines = loadStrings("cars2.tsv");
-  records = new Record[lines.length];
-  for (int i = 0; i < lines.length; i++) {
-    String[] pieces = split(lines[i], '\t'); // Load data into arrayif (pieces.length == 9) {
-    records[recordCount] = new Record(pieces);
-    recordCount++;
-  }
-}
-
-void draw() {
-  background(0);
-  for (int i = 0; i < num; i++) {
-    int thisEntry = startingEntry + i;
-    text(thisEntry + " > " + records[thisEntry].name, 20, 20 + i*20); // Print name to console
-  }
-}
-
-void mousePressed() {
-  startingEntry += num; 
-  if (startingEntry + num > records.length) {
-    startingEntry -= num;
-  } 
-  redraw();
-}
-
-class Record {
-  String name;
-  float mpg;
-  int cylinders;
-  float displacement;
-  float horsepower;
-  float weight;
-  float acceleration;
-  int year;
-  float origin;
-  public Record(String[] pieces) {
-    name = pieces[0];
-    mpg = float(pieces[1]);
-    cylinders = int(pieces[2]);
-    displacement = float(pieces[3]);
-    horsepower = float(pieces[4]);
-    weight = float(pieces[5]);
-    acceleration = float(pieces[6]);
-    year = int(pieces[7]);
-    origin = float(pieces[8]);
-  }
-}
- - diff --git a/examples/topics/mandelbrot.html b/examples/topics/mandelbrot.html deleted file mode 100644 index 05dcd46c0..000000000 --- a/examples/topics/mandelbrot.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - -

Processing.js

-

Mandelbrot

- -

by Daniel Shiffman. - -Simple rendering of the Mandelbrot set.

- -

Original Processing.org Example: Mandelbrot
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// Establish a range of values on the complex plane
-// A different range will allow us to "zoom" in or out on the fractal
-// float xmin = -1.5; float ymin = -.1; float wh = 0.15;
-float xmin = -2.5; 
-float ymin = -2; 
-float wh = 4;
-
-void setup() {
-  size(200, 200);
-  noLoop();
-}
-
-void draw() {
-
-  loadPixels();
-  
-  // Maximum number of iterations for each point on the complex plane
-  int maxiterations = 200;
-
-  // x goes from xmin to xmax
-  float xmax = xmin + wh;
-  // y goes from ymin to ymax
-  float ymax = ymin + wh;
-  
-  // Calculate amount we increment x,y for each pixel
-  float dx = (xmax - xmin) / (width);
-  float dy = (ymax - ymin) / (height);
-
-  // Start y
-  float y = ymin;
-  for(int j = 0; j < height; j++) {
-    // Start x
-    float x = xmin;
-    for(int i = 0;  i < width; i++) {
-      
-      // Now we test, as we iterate z = z^2 + cm does z tend towards infinity?
-      float a = x;
-      float b = y;
-      int n = 0;
-      while (n < maxiterations) {
-        float aa = a * a;
-        float bb = b * b;
-        float twoab = 2.0 * a * b;
-        a = aa - bb + x;
-        b = twoab + y;
-        // Infinty in our finite world is simple, let's just consider it 16
-        if(aa + bb > 16.0f) {
-          break;  // Bail
-        }
-        n++;
-      }
-      
-      // We color each pixel based on how long it takes to get to infinity
-      // If we never got there, let's pick the color black
-      if (n == maxiterations) pixels[i+j*width] = 0;
-      else pixels[i+j*width] = color(n*16 % 255);  // Gosh, we could make fancy colors here if we wanted
-      x += dx;
-    }
-    y += dy;
-  }
-  updatePixels();
-}
- - diff --git a/examples/topics/movingoncurves.html b/examples/topics/movingoncurves.html deleted file mode 100644 index 49eb2c85a..000000000 --- a/examples/topics/movingoncurves.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - -

Processing.js

-

MovingOnCurves

- -

In this example, the circles moves along the curve y = x^4. -Click the mouse to have it move to a new position.

- -

Original Processing.org Example: MovingOnCurves
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float beginX = 20.0;  // Initial x-coordinate
-float beginY = 10.0;  // Initial y-coordinate
-float endX = 170.0;   // Final x-coordinate
-float endY = 180.0;   // Final y-coordinate
-float distX;          // X-axis distance to move
-float distY;          // Y-axis distance to move
-float exponent = 4;   // Determines the curve
-float x = 0.0;        // Current x-coordinate
-float y = 0.0;        // Current y-coordinate
-float step = 0.01;    // Size of each step along the path
-float pct = 0.0;      // Percentage traveled (0.0 to 1.0)
-
-void setup() 
-{
-  size(200, 200);
-  noStroke();
-  smooth();
-  distX = endX - beginX;
-  distY = endY - beginY;
-}
-
-void draw() 
-{
-  fill(0, 2);
-  rect(0, 0, width, height);
-  pct += step;
-  if (pct < 1.0) {
-    x = beginX + (pct * distX);
-    y = beginY + (pow(pct, exponent) * distY);
-  }
-  fill(255);
-  ellipse(x, y, 20, 20);
-}
-
-void mousePressed() {
-  pct = 0.0;
-  beginX = x;
-  beginY = y;
-  endX = mouseX;
-  endY = mouseY;
-  distX = endX - beginX;
-  distY = endY - beginY;
-}
- - diff --git a/examples/topics/multipleparticlesystems.html b/examples/topics/multipleparticlesystems.html deleted file mode 100644 index 113cbef98..000000000 --- a/examples/topics/multipleparticlesystems.html +++ /dev/null @@ -1,666 +0,0 @@ - - - - - -

Processing.js

-

MultipleParticleSystems

- -

by Daniel Shiffman. - -Click the mouse to generate a burst of particles -at mouse location. - -Each burst is one instance of a particle system -with Particles and CrazyParticles (a subclass of Particle) -Note use of Inheritance and Polymorphism here.

- -

Original Processing.org Example: MultipleParticleSystems
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-ArrayList psystems;
-
-void setup() {
-  size(200,200);
-  frameRate(30);
-  colorMode(RGB,255,255,255,100);
-  psystems = new ArrayList();
-  smooth();
-}
-
-void draw() {
-  background(0);
-
-  // Cycle through all particle systems, run them and delete old ones
-  for (int i = psystems.size()-1; i >= 0; i--) {
-    ParticleSystem psys = (ParticleSystem) psystems.get(i);
-    psys.run();
-    if (psys.dead()) {
-      psystems.remove(i);
-    }
-  }
-
-}
-
-// When the mouse is pressed, add a new particle system
-void mousePressed() {
-  psystems.add(new ParticleSystem(int(random(5,25)),new Vector3D(mouseX,mouseY)));
-}
-
-
-// A subclass of Particle
-
-// Created 2 May 2005
-
-class CrazyParticle extends Particle {
-
-  // Just adding one new variable to a CrazyParticle
-  // It inherits all other fields from "Particle", and we don't have to retype them!
-  float theta;
-
-  // The CrazyParticle constructor can call the parent class (super class) constructor
-  CrazyParticle(Vector3D l) {
-    // "super" means do everything from the constructor in Particle
-    super(l);
-    // One more line of code to deal with the new variable, theta
-    theta = 0.0;
-
-  }
-
-  // Notice we don't have the method run() here; it is inherited from Particle
-
-  // This update() method overrides the parent class update() method
-  void update() {
-    super.update();
-    // Increment rotation based on horizontal velocity
-    float theta_vel = (vel.x * vel.magnitude()) / 10.0f;
-    theta += theta_vel;
-  }
-
-  // Override timer
-  void timer() {
-    timer -= 0.5;
-  }
-  
-  // Method to display
-  void render() {
-    // Render the ellipse just like in a regular particle
-    super.render();
-
-    // Then add a rotating line
-    pushMatrix();
-    translate(loc.x,loc.y);
-    rotate(theta);
-    stroke(255,timer);
-    line(0,0,25,0);
-    popMatrix();
-  }
-}
-
-
-
-
-
-// A simple Particle class
-
-class Particle {
-  Vector3D loc;
-  Vector3D vel;
-  Vector3D acc;
-  float r;
-  float timer;
-
-  // One constructor
-  Particle(Vector3D a, Vector3D v, Vector3D l, float r_) {
-    acc = a.copy();
-    vel = v.copy();
-    loc = l.copy();
-    r = r_;
-    timer = 100.0;
-  }
-  
-  // Another constructor (the one we are using here)
-  Particle(Vector3D l) {
-    acc = new Vector3D(0,0.05,0);
-    vel = new Vector3D(random(-1,1),random(-2,0),0);
-    loc = l.copy();
-    r = 10.0;
-    timer = 100.0;
-  }
-
-
-  void run() {
-    update();
-    render();
-  }
-
-  // Method to update location
-  void update() {
-    vel.add(acc);
-    loc.add(vel);
-    timer -= 1.0;
-  }
-
-  // Method to display
-  void render() {
-    ellipseMode(CENTER);
-    noStroke();
-    fill(255,timer);
-    ellipse(loc.x,loc.y,r,r);
-  }
-  
-  // Is the particle still useful?
-  boolean dead() {
-    if (timer <= 0.0) {
-      return true;
-    } else {
-      return false;
-    }
-  }
-}
-
-
-// A class to describe a group of Particles
-// An ArrayList is used to manage the list of Particles 
-
-class ParticleSystem {
-
-  ArrayList particles;    // An arraylist for all the particles
-  Vector3D origin;        // An origin point for where particles are birthed
-
-  ParticleSystem(int num, Vector3D v) {
-    particles = new ArrayList();              // Initialize the arraylist
-    origin = v.copy();                        // Store the origin point
-    for (int i = 0; i < num; i++) {
-      particles.add(new CrazyParticle(origin));    // Add "num" amount of particles to the arraylist
-    }
-  }
-
-  void run() {
-    // Cycle through the ArrayList backwards b/c we are deleting
-    for (int i = particles.size()-1; i >= 0; i--) {
-      Particle p = (Particle) particles.get(i);
-      p.run();
-      if (p.dead()) {
-        particles.remove(i);
-      }
-    }
-  }
-
-  void addParticle() {
-    particles.add(new Particle(origin));
-  }
-
-  void addParticle(Particle p) {
-    particles.add(p);
-  }
-
-  // A method to test if the particle system still has particles
-  boolean dead() {
-    if (particles.isEmpty()) {
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-}
-
-
-
-// Simple Vector3D Class 
-
-public class Vector3D {
-  public float x;
-  public float y;
-  public float z;
-
-  Vector3D(float x_, float y_, float z_) {
-    x = x_; y = y_; z = z_;
-  }
-
-  Vector3D(float x_, float y_) {
-    x = x_; y = y_; z = 0f;
-  }
-  
-  Vector3D() {
-    x = 0f; y = 0f; z = 0f;
-  }
-
-  void setX(float x_) {
-    x = x_;
-  }
-
-  void setY(float y_) {
-    y = y_;
-  }
-
-  void setZ(float z_) {
-    z = z_;
-  }
-  
-  void setXY(float x_, float y_) {
-    x = x_;
-    y = y_;
-  }
-  
-  void setXYZ(float x_, float y_, float z_) {
-    x = x_;
-    y = y_;
-    z = z_;
-  }
-
-  void setXYZ(Vector3D v) {
-    x = v.x;
-    y = v.y;
-    z = v.z;
-  }
-  public float magnitude() {
-    return (float) Math.sqrt(x*x + y*y + z*z);
-  }
-
-  public Vector3D copy() {
-    return new Vector3D(x,y,z);
-  }
-
-  public Vector3D copy(Vector3D v) {
-    return new Vector3D(v.x, v.y,v.z);
-  }
-  
-  public void add(Vector3D v) {
-    x += v.x;
-    y += v.y;
-    z += v.z;
-  }
-
-  public void sub(Vector3D v) {
-    x -= v.x;
-    y -= v.y;
-    z -= v.z;
-  }
-
-  public void mult(float n) {
-    x *= n;
-    y *= n;
-    z *= n;
-  }
-
-  public void div(float n) {
-    x /= n;
-    y /= n;
-    z /= n;
-  }
-
-  public void normalize() {
-    float m = magnitude();
-    if (m > 0) {
-       div(m);
-    }
-  }
-
-  public void limit(float max) {
-    if (magnitude() > max) {
-      normalize();
-      mult(max);
-    }
-  }
-
-  public float heading2D() {
-    float angle = (float) Math.atan2(-y, x);
-    return -1*angle;
-  }
-
-  public Vector3D add(Vector3D v1, Vector3D v2) {
-    Vector3D v = new Vector3D(v1.x + v2.x,v1.y + v2.y, v1.z + v2.z);
-    return v;
-  }
-
-  public Vector3D sub(Vector3D v1, Vector3D v2) {
-    Vector3D v = new Vector3D(v1.x - v2.x,v1.y - v2.y,v1.z - v2.z);
-    return v;
-  }
-
-  public Vector3D div(Vector3D v1, float n) {
-    Vector3D v = new Vector3D(v1.x/n,v1.y/n,v1.z/n);
-    return v;
-  }
-
-  public Vector3D mult(Vector3D v1, float n) {
-    Vector3D v = new Vector3D(v1.x*n,v1.y*n,v1.z*n);
-    return v;
-  }
-
-  public float distance (Vector3D v1, Vector3D v2) {
-    float dx = v1.x - v2.x;
-    float dy = v1.y - v2.y;
-    float dz = v1.z - v2.z;
-    return (float) Math.sqrt(dx*dx + dy*dy + dz*dz);
-  }
-
-}
- - diff --git a/examples/topics/pattern.html b/examples/topics/pattern.html deleted file mode 100644 index f9c917bf3..000000000 --- a/examples/topics/pattern.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - -

Processing.js

-

Pattern

- -

Move the cursor over the image to draw with a software tool -which responds to the speed of the mouse.

- -

Original Processing.org Example: Pattern
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup()
-{
-  size(200, 200);
-  background(102);
-  smooth();
-}
-
-void draw() 
-{
-  // Call the variableEllipse() method and send it the
-  // parameters for the current mouse position
-  // and the previous mouse position
-  variableEllipse(mouseX, mouseY, pmouseX, pmouseY);
-}
-
-
-// The simple method variableEllipse() was created specifically 
-// for this program. It calculates the speed of the mouse
-// and draws a small ellipse if the mouse is moving slowly
-// and draws a large ellipse if the mouse is moving quickly 
-
-void variableEllipse(int x, int y, int px, int py) 
-{
-  float speed = abs(x-px) + abs(y-py);
-  stroke(speed);
-  ellipse(x, y, speed, speed);
-}
- - diff --git a/examples/topics/penrosesnowflake.html b/examples/topics/penrosesnowflake.html deleted file mode 100644 index 7b10a426f..000000000 --- a/examples/topics/penrosesnowflake.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - -

Processing.js

-

PenroseSnowflake

- -

- -

Original Processing.org Example: PenroseSnowflake
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-/** 
- * Penrose Snowflake L-System 
- * by Geraldine Sarmiento (Interactive Telecommunications Program, NYU). 
- * This code was based on Patrick Dwyer's L-System class. 
- */
-
-PenroseSnowflakeLSystem ps;
-
-void setup() 
-{
-  size(200, 200);
-  smooth();
-  ps = new PenroseSnowflakeLSystem();
-  ps.simulate(4);
-}
-
-void draw() 
-{
-  background(0);
-  ps.render();
-}
-
-class LSystem 
-{
-  int steps = 0;
-
-  String axiom;
-  String rule;
-  String production;
-
-  float startLength;
-  float drawLength;
-  float theta;
-
-  int generations;
-
-  LSystem() {
-    axiom = "F";
-    rule = "F+F-F";
-    startLength = 90.0;
-    theta = radians(120.0);
-    reset();
-  }
-
-  void reset() {
-    production = axiom;
-    drawLength = startLength;
-    generations = 0;
-  }
-
-  int getAge() {
-    return generations;
-  }
-
-  void render() {
-    translate(width/2, height/2);
-    steps += 5;          
-    if (steps > production.length()) {
-      steps = production.length();
-    }
-    for (int i = 0; i < steps; i++) {
-      char step = production.charAt(i);
-      if (step == 'F') {
-        rect(0, 0, -drawLength, -drawLength);
-        noFill();
-        translate(0, -drawLength);
-      } 
-      else if (step == '+') {
-        rotate(theta);
-      } 
-      else if (step == '-') {
-        rotate(-theta);
-      } 
-      else if (step == '[') {
-        pushMatrix();
-      } 
-      else if (step == ']') {
-        popMatrix();            
-      }
-    }
-  }
-
-  void simulate(int gen) {
-    while (getAge() < gen) {
-      production = iterate(production, rule);
-    }
-  }
-
-  String iterate(String prod_, String rule_) {
-    drawLength = drawLength * 0.6;
-    generations++;
-    String newProduction = prod_;          
-    newProduction = newProduction.replaceAll("F", rule_);
-    return newProduction;
-  }
-}
-
-class PenroseSnowflakeLSystem extends LSystem {
-
-  String ruleF;
-
-  PenroseSnowflakeLSystem() {
-    axiom = "F3-F3-F3-F3-F";
-    ruleF = "F3-F3-F45-F++F3-F";
-    startLength = 200.0f;
-    theta = radians(18); 
-    reset();
-  }
-
-  void useRule(String r_) {
-    rule = r_;
-  }
-
-  void useAxiom(String a_) {
-    axiom = a_;
-  }
-
-  void useLength(float l_) {
-    startLength = l_;
-  }
-
-  void useTheta(float t_) {
-    theta = radians(t_);
-  }
-
-  void reset() {
-    production = axiom;
-    drawLength = startLength;
-    generations = 0;
-  }
-
-  int getAge() {
-    return generations;
-  }
-
-  void render() {
-    translate(width, height);
-    int repeats = 1;
-
-    steps += 3;          
-    if (steps > production.length()) {
-      steps = production.length();
-    }
-
-    for (int i = 0; i < steps; i++) {
-      char step = production.charAt(i);
-      if (step == 'F') {
-        stroke(255);
-        noFill();
-        for (int j = 0; j < repeats; j++) {
-          line(0,0,0, -drawLength);
-          translate(0, -drawLength);
-        }
-        repeats = 1;
-      } 
-      else if (step == '+') {
-        for (int j = 0; j < repeats; j++) {
-          rotate(theta);
-        }
-        repeats = 1;
-      } 
-      else if (step == '-') {
-        for (int j =0; j < repeats; j++) {
-          rotate(-theta);
-        }
-        repeats = 1;
-      } 
-      else if (step == '[') {
-        pushMatrix();
-      } 
-      else if (step == ']') {
-        popMatrix();
-      } 
-      else if ( (step >= 48) && (step <= 57) ) {
-        repeats += (int)step - 48;
-      }
-    }
-  }
-
-
-  String iterate(String prod_, String rule_) {
-    String newProduction = "";
-    for (int i = 0; i < prod_.length(); i++) {
-      char step = production.charAt(i);
-      if (step == 'F') {
-        newProduction = newProduction + ruleF;
-      } 
-      else {
-        if (step != 'F') {
-          newProduction = newProduction + step;
-        }
-      }
-    }
-    drawLength = drawLength * 0.4;
-    generations++;
-    return newProduction;
-  }
-
-}
- - diff --git a/examples/topics/penrosetile.html b/examples/topics/penrosetile.html deleted file mode 100644 index e3420b3ad..000000000 --- a/examples/topics/penrosetile.html +++ /dev/null @@ -1,471 +0,0 @@ - - - - - -

Processing.js

-

PenroseTile

- -

- -

Original Processing.org Example: PenroseTile
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-/** 
- * Penrose Tile L-System 
- * by Geraldine Sarmiento (Interactive Telecommunications Program, NYU). 
- * This code was based on Patrick Dwyer's L-System class. 
- */
-
-PenroseLSystem ds;
-
-void setup() 
-{
-  size(200, 200);
-  smooth();
-  ds = new PenroseLSystem();
-  ds.simulate(4);
-}
-
-void draw() 
-{
-  background(0);
-  ds.render();
-}
-
-
-class LSystem 
-{
-  int steps = 0;
-
-  String axiom;
-  String rule;
-  String production;
-
-  float startLength;
-  float drawLength;
-  float theta;
-
-  int generations;
-
-  LSystem() {
-    axiom = "F";
-    rule = "F+F-F";
-    startLength = 90.0;
-    theta = radians(120.0);
-    reset();
-  }
-
-  void reset() {
-    production = axiom;
-    drawLength = startLength;
-    generations = 0;
-  }
-
-  int getAge() {
-    return generations;
-  }
-
-  void render() {
-    translate(width/2, height/2);
-    steps += 5;          
-    if (steps > production.length()) {
-      steps = production.length();
-    }
-    for (int i = 0; i < steps; i++) {
-      char step = production.charAt(i);
-      if (step == 'F') {
-        rect(0, 0, -drawLength, -drawLength);
-        noFill();
-        translate(0, -drawLength);
-      } 
-      else if (step == '+') {
-        rotate(theta);
-      } 
-      else if (step == '-') {
-        rotate(-theta);
-      } 
-      else if (step == '[') {
-        pushMatrix();
-      } 
-      else if (step == ']') {
-        popMatrix();            
-      }
-    }
-  }
-
-  void simulate(int gen) {
-    while (getAge() < gen) {
-      production = iterate(production, rule);
-    }
-  }
-
-  String iterate(String prod_, String rule_) {
-    drawLength = drawLength * 0.6;
-    generations++;
-    String newProduction = prod_;          
-    newProduction = newProduction.replaceAll("F", rule_);
-    return newProduction;
-  }
-}
-
-
-class PenroseLSystem extends LSystem {
-
-  int steps = 0;
-  float somestep = 0.1;
-  String ruleW;
-  String ruleX;
-  String ruleY;
-  String ruleZ;
-
-  PenroseLSystem() {
-    axiom = "[X]++[X]++[X]++[X]++[X]";
-    ruleW = "YF++ZF4-XF[-YF4-WF]++";
-    ruleX = "+YF--ZF[3-WF--XF]+";
-    ruleY = "-WF++XF[+++YF++ZF]-";
-    ruleZ = "--YF++++WF[+ZF++++XF]--XF";
-    startLength = 200.0;
-    theta = radians(36);  
-    reset();
-  }
-
-  void useRule(String r_) {
-    rule = r_;
-  }
-
-  void useAxiom(String a_) {
-    axiom = a_;
-  }
-
-  void useLength(float l_) {
-    startLength = l_;
-  }
-
-  void useTheta(float t_) {
-    theta = radians(t_);
-  }
-
-  void reset() {
-    production = axiom;
-    drawLength = startLength;
-    generations = 0;
-  }
-
-  int getAge() {
-    return generations;
-  }
-
-  void render() {
-    translate(width/2, height/2);
-    int pushes = 0;
-    int repeats = 1;
-    steps += 12;          
-    if (steps > production.length()) {
-      steps = production.length();
-    }
-
-    for (int i = 0; i < steps; i++) {
-      char step = production.charAt(i);
-      if (step == 'F') {
-        stroke(255, 60);
-        for (int j = 0; j < repeats; j++) {
-          line(0,0,0, -drawLength);
-          noFill();
-          translate(0, -drawLength);
-        }
-        repeats = 1;
-      } 
-      else if (step == '+') {
-        for (int j = 0; j < repeats; j++) {
-          rotate(theta);
-        }
-        repeats = 1;
-      } 
-      else if (step == '-') {
-        for (int j =0; j < repeats; j++) {
-          rotate(-theta);
-        }
-        repeats = 1;
-      } 
-      else if (step == '[') {
-        pushes++;            
-        pushMatrix();
-      } 
-      else if (step == ']') {
-        popMatrix();
-        pushes--;
-      } 
-      else if ( (step >= 48) && (step <= 57) ) {
-        repeats = (int)step - 48;
-      }
-    }
-
-    // Unpush if we need too
-    while (pushes > 0) {
-      popMatrix();
-      pushes--;
-    }
-  }
-
-  String iterate(String prod_, String rule_) {
-    String newProduction = "";
-    for (int i = 0; i < prod_.length(); i++) {
-      char step = production.charAt(i);
-      if (step == 'W') {
-        newProduction = newProduction + ruleW;
-      } 
-      else if (step == 'X') {
-        newProduction = newProduction + ruleX;
-      }
-      else if (step == 'Y') {
-        newProduction = newProduction + ruleY;
-      }  
-      else if (step == 'Z') {
-        newProduction = newProduction + ruleZ;
-      } 
-      else {
-        if (step != 'F') {
-          newProduction = newProduction + step;
-        }
-      }
-    }
-
-    drawLength = drawLength * 0.5;
-    generations++;
-    return newProduction;
-  }
-
-}
- - diff --git a/examples/topics/pentigree.html b/examples/topics/pentigree.html deleted file mode 100644 index 25d055ed9..000000000 --- a/examples/topics/pentigree.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - -

Processing.js

-

Pentigree

- -

- -

Original Processing.org Example: Pentigree
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-/** 
- * Pentigree L-System 
- * by Geraldine Sarmiento (Interactive Telecommunications Program, NYU). 
- * This code was based on Patrick Dwyer's L-System class. 
- */
-
-PentigreeLSystem ps;
-
-void setup() 
-{
-  size(200, 200);
-  frameRate(24);
-  smooth();
-  ps = new PentigreeLSystem();
-  ps.simulate(3);
-}
-
-void draw() 
-{
-  background(0);
-  ps.render();
-}
-
-
-class LSystem {
-
-  int steps = 0;
-
-  String axiom;
-  String rule;
-  String production;
-
-  float startLength;
-  float drawLength;
-  float theta;
-
-  int generations;
-
-  LSystem() {
-
-    axiom = "F";
-    rule = "F+F-F";
-    startLength = 90.0f;
-    theta = radians(120.0);
-    reset();
-  }
-
-  void reset() {
-    production = axiom;
-    drawLength = startLength;
-    generations = 0;
-  }
-
-  int getAge() {
-    return generations;
-  }
-  
-  void render() {
-    translate(width/2, height/2);
-    steps += 5;          
-    if (steps > production.length()) {
-      steps = production.length();
-    }
-    for (int i = 0; i < steps; i++) {
-      char step = production.charAt(i);
-      if (step == 'F') {
-        rect(0, 0, -drawLength, -drawLength);
-        noFill();
-        translate(0, -drawLength);
-      } 
-      else if (step == '+') {
-        rotate(theta);
-      } 
-      else if (step == '-') {
-        rotate(-theta);
-      } 
-      else if (step == '[') {
-        pushMatrix();
-      } 
-      else if (step == ']') {
-        popMatrix();            
-      }
-    }
-  }
-  
-  void simulate(int gen) {
-    while (getAge() < gen) {
-      production = iterate(production, rule);
-    }
-  }
-
-  String iterate(String prod_, String rule_) {
-    drawLength = drawLength * 0.6;
-    generations++;
-    String newProduction = prod_;          
-    newProduction = newProduction.replaceAll("F", rule_);
-    return newProduction;
-  }
-}
-
-
-class PentigreeLSystem extends LSystem {
-
-  int steps = 0;
-  float somestep = 0.1;
-  float xoff = 0.01;
-
-  PentigreeLSystem() {
-    axiom = "F-F-F-F-F";
-    rule = "F-F++F+F-F-F";
-    startLength = 40.0;
-    theta = radians(72);  
-    reset();
-  }
-
-  void useRule(String r_) {
-    rule = r_;
-  }
-
-  void useAxiom(String a_) {
-    axiom = a_;
-  }
-
-  void useLength(float l_) {
-    startLength = l_;
-  }
-
-  void useTheta(float t_) {
-    theta = radians(t_);
-  }
-
-  void reset() {
-    production = axiom;
-    drawLength = startLength;
-    generations = 0;
-  }
-
-  int getAge() {
-    return generations;
-  }
-
-  void render() {
-    translate(width/4, height/2);
-    steps += 3;          
-    if (steps > production.length()) {
-      steps = production.length();
-    }
-
-    for (int i = 0; i < steps; i++) {
-      char step = production.charAt(i);
-      if (step == 'F') {
-        noFill();
-        stroke(255);
-        line(0, 0, 0, -drawLength);
-        translate(0, -drawLength);
-      } 
-      else if (step == '+') {
-        rotate(theta);
-      } 
-      else if (step == '-') {
-        rotate(-theta);
-      } 
-      else if (step == '[') {
-        pushMatrix();
-      } 
-      else if (step == ']') {
-        popMatrix();
-      }
-    }
-  }
-
-}
- - diff --git a/examples/topics/pixelarray.html b/examples/topics/pixelarray.html deleted file mode 100644 index 8d1d7911c..000000000 --- a/examples/topics/pixelarray.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - -

Processing.js

-

PixelArray

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading.

- -

Click and drag the mouse up and down to control the signal and -press and hold any key to see the current pixel being read. -This program sequentially reads the color of every pixel of an image -and displays this color to fill the window.

- -

Original Processing.org Example: PixelArray
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-PImage a;
-int[] aPixels;
-int direction = 1;
-boolean onetime = true;
-float signal;
-
-void setup() 
-{
-  size(200, 200);
-  aPixels = new int[width*height];
-  noFill();
-  stroke(255);
-  frameRate(30);
-  a = loadImage("data/ystone08.jpg", null, function(){
-    for(int i=0; i
-
-
diff --git a/examples/topics/puff.html b/examples/topics/puff.html
deleted file mode 100644
index 1c629c33c..000000000
--- a/examples/topics/puff.html
+++ /dev/null
@@ -1,181 +0,0 @@
-
-
-
-  
-
-

Processing.js

-

Puff

- -

by Ira Greenberg. - -Series of ellipses simulating a multi-segmented -organism, utilizing a follow the leader algorithm. -Collision detection occurs on the organism's head, -controlling overall direction, and on the individual -body segments, controlling body shape and jitter.

- -

Original Processing.org Example: Puff
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// for puff head
-float headX;
-float headY;
-float speedX = .7;
-float speedY = .9;
-
-// for puff body
-int cells = 1000;
-float[]px= new float[cells];
-float[]py= new float[cells];
-float[]radiiX = new float[cells];
-float[]radiiY = new float[cells];
-float[]angle = new float[cells];
-float[]frequency = new float[cells];
-float[]cellRadius = new float[cells];
-
-void setup(){
-  
-  size(200, 200);
-  // begin in the center
-  headX = width/2;
-  headY = height/2;
-
-  //fill body arrays
-  for (int i=0; i< cells; i++){
-    radiiX[i] = random(-7, 7); 
-    radiiY[i] = random(-4, 4);
-    frequency[i]= random(-9, 9);
-    cellRadius[i] = random(16, 30);
-  }
-  frameRate(30);
-}
-
-void draw(){
-  background(0);
-  noStroke();
-  fill(255, 255, 255, 5);
-
-  //follow the leader
-  for (int i =0; i< cells; i++){
-    if (i==0){
-      px[i] = headX+sin(radians(angle[i]))*radiiX[i];
-      py[i] = headY+cos(radians(angle[i]))*radiiY[i];
-    } 
-    else{
-      px[i] = px[i-1]+cos(radians(angle[i]))*radiiX[i];
-      py[i] = py[i-1]+sin(radians(angle[i]))*radiiY[i];
-
-      //check collision of body
-      if (px[i] >= width-cellRadius[i]/2 || px[i] <= cellRadius[i]/2){
-        radiiX[i]*=-1;
-        cellRadius[i] = random(1, 40);
-        frequency[i]= random(-13, 13);
-      }
-      if (py[i] >= height-cellRadius[i]/2 || py[i] <= cellRadius[i]/2){
-        radiiY[i]*=-1;
-        cellRadius[i] = random(1, 40);
-        frequency[i]= random(-9, 9);
-      }
-    }
-    // draw puff
-    ellipse(px[i],  py[i],  cellRadius[i],  cellRadius[i]);
-    // set speed of body
-    angle[i]+=frequency[i];
-  }
-
-  // set velocity of head
-  headX+=speedX;
-  headY+=speedY;
-
-  //check boundary collision of head
-  if (headX >= width-cellRadius[0]/2 || headX <=cellRadius[0]/2){
-    speedX*=-1;
-  }
-  if (headY >= height-cellRadius[0]/2 || headY <= cellRadius[0]/2){
-    speedY*=-1;
-  }
-}
- - diff --git a/examples/topics/pulses.html b/examples/topics/pulses.html deleted file mode 100644 index 562ebc25e..000000000 --- a/examples/topics/pulses.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - -

Processing.js

-

Pulses

- -

Software drawing instruments can follow a rhythm or abide by rules independent -of drawn gestures. This is a form of collaborative drawing in which the draftsperson -controls some aspects of the image and the software controls others.

- -

Original Processing.org Example: Pulses
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int angle = 0;
-
-void setup() 
-{
-  size(200, 200);
-  background(102);
-  smooth();
-  noStroke();
-  fill(0, 102);
-}
-
-void draw() 
-{
-  // Draw only when mouse is pressed
-  if (mousePressed == true) {
-    angle += 10;
-    float val = cos(radians(angle)) * 6.0;
-    for (int a = 0; a < 360; a += 75) {
-      float xoff = cos(radians(a)) * val;
-      float yoff = sin(radians(a)) * val;
-      fill(0);
-      ellipse(mouseX + xoff, mouseY + yoff, val/2, val/2);
-    }
-    fill(255);
-    ellipse(mouseX, mouseY, 2, 2);
-  }
-}
- - diff --git a/examples/topics/reach1.html b/examples/topics/reach1.html deleted file mode 100644 index 647a69793..000000000 --- a/examples/topics/reach1.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - -

Processing.js

-

Reach1

- -

Based on code from Keith Peters (www.bit-101.com) - -The arm follows the position of the mouse by -calculating the angles with atan2().

- -

Original Processing.org Example: Reach1
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float x = 100;
-float y = 100;
-float x2 = 100;
-float y2 = 100;
-float segLength = 30;
-
-void setup() {
-  size(200, 200);
-  smooth(); 
-  strokeWeight(20.0);
-  stroke(0, 100);
-}
-
-void draw() {
-  background(226);
-  
-  float dx = mouseX - x;
-  float dy = mouseY - y;
-  float angle1 = atan2(dy, dx);  
-  
-  float tx = mouseX - cos(angle1) * segLength;
-  float ty = mouseY - sin(angle1) * segLength;
-  dx = tx - x2;
-  dy = ty - y2;
-  float angle2 = atan2(dy, dx);  
-  x = x2 + cos(angle2) * segLength;
-  y = y2 + sin(angle2) * segLength;
-  
-  segment(x, y, angle1); 
-  segment(x2, y2, angle2); 
-}
-
-void segment(float x, float y, float a) {
-  pushMatrix();
-  translate(x, y);
-  rotate(a);
-  line(0, 0, segLength, 0);
-  popMatrix();
-}
- - diff --git a/examples/topics/reach2.html b/examples/topics/reach2.html deleted file mode 100644 index ccc6f82db..000000000 --- a/examples/topics/reach2.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - -

Processing.js

-

Reach2

- -

Based on code from Keith Peters (www.bit-101.com) - -The arm follows the position of the mouse by -calculating the angles with atan2().

- -

Original Processing.org Example: Reach2
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int numSegments = 10;
-float[] x = new float[numSegments];
-float[] y = new float[numSegments];
-float[] angle = new float[numSegments];
-float segLength = 20;
-float targetX, targetY;
-
-void setup() {
-  size(200, 200);
-  smooth(); 
-  strokeWeight(20.0);
-  stroke(0, 100);
-  x[x.length-1] = 0;     // Set base x-coordinate
-  y[x.length-1] = height;  // Set base y-coordinate
-}
-
-void draw() {
-  background(226);
-  
-  reachSegment(0, mouseX, mouseY);
-  for(int i=1; i<numSegments; i++) {
-    reachSegment(i, targetX, targetY);
-  }
-  for(int i=x.length-1; i>=1; i--) {
-    positionSegment(i, i-1);  
-  } 
-  for(int i=0; i<x.length; i++) {
-    segment(x[i], y[i], angle[i], (i+1)*2); 
-  }
-}
-
-void positionSegment(int a, int b) {
-  x[b] = x[a] + cos(angle[a]) * segLength;
-  y[b] = y[a] + sin(angle[a]) * segLength; 
-}
-
-void reachSegment(int i, float xin, float yin) {
-  float dx = xin - x[i];
-  float dy = yin - y[i];
-  angle[i] = atan2(dy, dx);  
-  targetX = xin - cos(angle[i]) * segLength;
-  targetY = yin - sin(angle[i]) * segLength;
-}
-
-void segment(float x, float y, float a, float sw) {
-  strokeWeight(sw);
-  pushMatrix();
-  translate(x, y);
-  rotate(a);
-  line(0, 0, segLength, 0);
-  popMatrix();
-}
- - diff --git a/examples/topics/reach3.html b/examples/topics/reach3.html deleted file mode 100644 index 9f0e2d423..000000000 --- a/examples/topics/reach3.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - -

Processing.js

-

Reach3

- -

Based on code from Keith Peters (www.bit-101.com) - -The arm follows the position of the ball by -calculating the angles with atan2().

- -

Original Processing.org Example: Reach3
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int numSegments = 6;
-float[] x = new float[numSegments];
-float[] y = new float[numSegments];
-float[] angle = new float[numSegments];
-float segLength = 15;
-float targetX, targetY;
-
-float ballX = 50;
-float ballY = 50;
-int ballXDirection = 1;
-int ballYDirection = -1;
-
-void setup() {
-  size(200, 200);
-  smooth(); 
-  strokeWeight(20.0);
-  stroke(0, 100);
-  noFill();
-  x[x.length-1] = width/2;     // Set base x-coordinate
-  y[x.length-1] = height;  // Set base y-coordinate
-}
-
-void draw() {
-  background(226);
-  
-  strokeWeight(20);
-  ballX = ballX + 1.0 * ballXDirection;
-  ballY = ballY + 0.8 * ballYDirection;
-  if(ballX > width-25 || ballX < 25) {
-    ballXDirection *= -1; 
-  }
-  if(ballY > height-25 || ballY < 25) {
-    ballYDirection *= -1; 
-  }
-  ellipse(ballX, ballY, 30, 30);
-  
-  reachSegment(0, ballX, ballY);
-  for(int i=1; i<numSegments; i++) {
-    reachSegment(i, targetX, targetY);
-  }
-  for(int i=x.length-1; i>=1; i--) {
-    positionSegment(i, i-1);  
-  } 
-  for(int i=0; i<x.length; i++) {
-    segment(x[i], y[i], angle[i], (i+1)*2); 
-  }
-}
-
-void positionSegment(int a, int b) {
-  x[b] = x[a] + cos(angle[a]) * segLength;
-  y[b] = y[a] + sin(angle[a]) * segLength; 
-}
-
-void reachSegment(int i, float xin, float yin) {
-  float dx = xin - x[i];
-  float dy = yin - y[i];
-  angle[i] = atan2(dy, dx);  
-  targetX = xin - cos(angle[i]) * segLength;
-  targetY = yin - sin(angle[i]) * segLength;
-}
-
-void segment(float x, float y, float a, float sw) {
-  strokeWeight(sw);
-  pushMatrix();
-  translate(x, y);
-  rotate(a);
-  line(0, 0, segLength, 0);
-  popMatrix();
-}
- - diff --git a/examples/topics/reflection1.html b/examples/topics/reflection1.html deleted file mode 100644 index 94ff42add..000000000 --- a/examples/topics/reflection1.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - -

Processing.js

-

Reflection1

- -

by Ira Greenberg. - -Based on the equation (R = 2N(N*L)-L) where R is the -reflection vector, N is the normal, and L is the incident -vector.

- -

Original Processing.org Example: Reflection1
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
- float baseX1, baseY1, baseX2, baseY2;
-float baseLength;
-float[] xCoords, yCoords;
-float ellipseX, ellipseY, ellipseRadius = 6;
-float directionX, directionY;
-float ellipseSpeed = 3.5;
-float velocityX, velocityY; 
-
-void setup(){
-  size(200, 200);
-  frameRate(30);
-  fill(128);
-  smooth();
-  baseX1 = 0;
-  baseY1 = height-150;
-  baseX2 = width;
-  baseY2 = height;
-
-  // start ellipse at middle top of screen
-  ellipseX = width/2;
-  
-  // calculate initial random direction
-  directionX = random(0.1, 0.99);
-  directionY = random(0.1, 0.99);
-
-  // normalize direction vector
-  float directionVectLength = sqrt(directionX*directionX + 
-            directionY*directionY);
-  directionX /= directionVectLength;
-  directionY /= directionVectLength;
-}
-
-void draw(){
-  // draw background
-  fill(0, 12);
-  noStroke();
-  rect(0, 0, width, height);
-
-  // calculate length of base top
-  baseLength = dist(baseX1, baseY1, baseX2, baseY2);
-  xCoords = new float[ceil(baseLength)];
-  yCoords = new float[ceil(baseLength)];
-
-  // fill base top coordinate array
-  for (int i=0; i<xCoords.length; i++){
-    xCoords[i] = baseX1 + ((baseX2-baseX1)/baseLength)*i;
-    yCoords[i] = baseY1 + ((baseY2-baseY1)/baseLength)*i;
-  }
-
-  // draw base
-  fill(200);
-  quad(baseX1, baseY1, baseX2, baseY2, baseX2, height, 0, height);
-
-  // calculate base top normal
-  float baseDeltaX = (baseX2-baseX1)/baseLength;
-  float baseDeltaY = (baseY2-baseY1)/baseLength;
-  float normalX = -baseDeltaY;
-  float normalY = baseDeltaX;
-
-  // draw ellipse
-  noFill();
-  stroke(200);
-  ellipse(ellipseX, ellipseY, ellipseRadius*2, ellipseRadius*2);
-
-  // calculate ellipse velocity
-  velocityX = directionX * ellipseSpeed;
-  velocityY = directionY * ellipseSpeed;
-
-  // move elipse
-  ellipseX += velocityX;
-  ellipseY += velocityY;
-
-  // normalized incidence vector
-  float incidenceVectorX = -directionX;
-  float incidenceVectorY = -directionY;
-
-  // detect and handle collision
-  for (int i=0; i<xCoords.length; i++){
-    // check distance between ellipse and base top coordinates
-    if (dist(ellipseX, ellipseY, xCoords[i], yCoords[i]) < ellipseRadius){
-
-      // calculate dot product of incident vector and base top normal 
-      float dot = incidenceVectorX*normalX + incidenceVectorY*normalY;
-
-      // calculate reflection vector
-      float reflectionVectorX = 2*normalX*dot - incidenceVectorX;
-      float reflectionVectorY = 2*normalY*dot - incidenceVectorY;
-
-      // assign reflection vector to direction vector
-      directionX = reflectionVectorX;
-      directionY = reflectionVectorY;
-
-      // draw base top normal at collision point
-      stroke(255, 128, 0);
-      line(ellipseX, ellipseY, ellipseX-normalX*100, 
-            ellipseY-normalY*100);
-    }
-  }
-
-  // detect boundary collision
-  // right
-  if (ellipseX > width-ellipseRadius){
-    ellipseX = width-ellipseRadius;
-    directionX *= -1;
-  }
-  // left 
-  if (ellipseX < ellipseRadius){
-    ellipseX = ellipseRadius;
-    directionX *= -1;
-  }
-  // top
-  if (ellipseY < ellipseRadius){
-    ellipseY = ellipseRadius;
-    directionY *= -1;
-    // randomize base top
-    baseY1 = random(height-100, height);
-    baseY2 = random(height-100, height);
-  }
-}
- - diff --git a/examples/topics/reflection2.html b/examples/topics/reflection2.html deleted file mode 100644 index e65987670..000000000 --- a/examples/topics/reflection2.html +++ /dev/null @@ -1,355 +0,0 @@ - - - - - -

Processing.js

-

Reflection2

- -

by Ira Greenberg. - -Based on Keith Peter's Solution in -Foundation Actionscript Animation: Making Things Move! -http://www.friendsofed.com/book.html?isbn=1590597915

- -

Original Processing.org Example: Reflection2
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-Orb orb;
-Vect2D velocity;
-float gravity = .05, damping = 0.8;
-int segments = 40;
-Ground[] ground = new Ground[segments];
-float[] peakHeights = new float[segments+1];
-
-void setup(){
-  size(200, 200);
-  smooth();
-  orb = new Orb(50, 50, 3);
-  velocity = new Vect2D(.5, 0);
-
-  // calculate ground peak heights 
-  for (int i=0; i<peakHeights.length; i++){
-    peakHeights[i] = random(height-40, height-30);
-  }
-
-  /* float value required for segment width (segs)
-   calculations so the ground spans the entire 
-   display window, regardless of segment number. */
-  float segs = segments;
-  for (int i=0; i<segments; i++){
-    ground[i]  = new Ground(width/segs*i, peakHeights[i],
-    width/segs*(i+1), peakHeights[i+1]);
-  }
-}
-
-
-void draw(){
-  // background
-  noStroke();
-  fill(0, 15);
-  rect(0, 0, width, height);
-
-  // move orb
-  orb.x += velocity.vx;
-  velocity.vy += gravity;
-  orb.y += velocity.vy;
-
-  // draw ground
-  fill(127);
-  beginShape();
-  for (int i=0; i<segments; i++){
-    vertex(ground[i].x1, ground[i].y1);
-    vertex(ground[i].x2, ground[i].y2);
-  }
-  vertex(ground[segments-1].x2, height);
-  vertex(ground[0].x1, height);
-  endShape(CLOSE);
-
-  // draw orb
-  noStroke();
-  fill(200);
-  ellipse(orb.x, orb.y, orb.r*2, orb.r*2);
-
-  // collision detection
-  checkWallCollision();
-  for (int i=0; i<segments; i++){
-    checkGroundCollision(ground[i]);
-  }
-}
-
-
-void checkWallCollision(){
-  if (orb.x > width-orb.r){
-    orb.x = width-orb.r;
-    velocity.vx *= -1;
-    velocity.vx *= damping;
-  } 
-  else if (orb.x < orb.r){
-    orb.x = orb.r;
-    velocity.vx *= -1;
-    velocity.vx *= damping;
-  }
-}
-
-
-void checkGroundCollision(Ground groundSegment) {
-
-  // get difference between orb and ground
-  float deltaX = orb.x - groundSegment.x;
-  float deltaY = orb.y - groundSegment.y;
-
-  // precalculate trig values
-  float cosine = cos(groundSegment.rot);
-  float sine = sin(groundSegment.rot);
-
-  /* rotate ground and velocity to allow 
-   orthogonal collision calculations */
-  float groundXTemp = cosine * deltaX + sine * deltaY;
-  float groundYTemp = cosine * deltaY - sine * deltaX;
-  float velocityXTemp = cosine * velocity.vx + sine * velocity.vy;
-  float velocityYTemp = cosine * velocity.vy - sine * velocity.vx;
-
-  /* ground collision - check for surface 
-   collision and also that orb is within 
-   left/rights bounds of ground segment */
-  if (groundYTemp > -orb.r &&
-    orb.x > groundSegment.x1 &&
-    orb.x < groundSegment.x2 ){
-    // keep orb from going into ground
-    groundYTemp = -orb.r;
-    // bounce and slow down orb
-    velocityYTemp *= -1.0;
-    velocityYTemp *= damping;
-  }
-
-  // reset ground, velocity and orb
-  deltaX = cosine * groundXTemp - sine * groundYTemp;
-  deltaY = cosine * groundYTemp + sine * groundXTemp;
-  velocity.vx = cosine * velocityXTemp - sine * velocityYTemp;
-  velocity.vy = cosine * velocityYTemp + sine * velocityXTemp;
-  orb.x = groundSegment.x + deltaX;
-  orb.y = groundSegment.y + deltaY;
-}
-
-
-class Ground {
-  float x1, y1, x2, y2;  
-  float x, y, len, rot;
-
-  // default constructor
-  Ground(){
-  }
-
-  // constructor
-  Ground(float x1, float y1, float x2, float y2) {
-    this.x1 = x1;
-    this.y1 = y1;
-    this.x2 = x2;
-    this.y2 = y2;
-    x = (x1+x2)/2;
-    y = (y1+y2)/2;
-    len = dist(x1, y1, x2, y2);
-    rot = atan2((y2-y1), (x2-x1));
-  }
-}
-
-
-class Orb{
-  float x, y, r;
-
-  // default constructor
-  Orb() {
-  }
-
-  Orb(float x, float y, float r) {
-    this.x = x;
-    this.y = y;
-    this.r = r;
-  }
-}
-
-class Vect2D{
-  float vx, vy;
-
-  // default constructor
-  Vect2D() {
-  }
-
-  Vect2D(float vx, float vy) {
-    this.vx = vx;
-    this.vy = vy;
-  }
-}
- - diff --git a/examples/topics/rollover.html b/examples/topics/rollover.html deleted file mode 100644 index bef3013af..000000000 --- a/examples/topics/rollover.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - -

Processing.js

-

Rollover

- -

Roll over the colored squares in the center of the image -to change the color of the outside rectangle. - -Updated 09 February 2003.

- -

Original Processing.org Example: Rollover
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int rectX, rectY;      // Position of square button
-int circleX, circleY;  // Position of circle button
-int rectSize = 50;     // Diameter of rect
-int circleSize = 53;   // Diameter of circle
-
-color rectColor;
-color circleColor;
-color baseColor;
-
-boolean rectOver = false;
-boolean circleOver = false;
-
-void setup()
-{
-  size(200, 200);
-  smooth();
-  rectColor = color(0);
-  circleColor = color(255);
-  baseColor = color(102);
-  circleX = width/2+circleSize/2+10;
-  circleY = height/2;
-  rectX = width/2-rectSize-10;
-  rectY = height/2-rectSize/2;
-  ellipseMode(CENTER);
-}
-
-void draw()
-{
-  update(mouseX, mouseY);
-
-  noStroke();
-  if (rectOver) {
-    background(rectColor);
-  } else if (circleOver) {
-    background(circleColor);
-  } else {
-    background(baseColor);
-  }
-
-  stroke(255);
-  fill(rectColor);
-  rect(rectX, rectY, rectSize, rectSize);
-  stroke(0);
-  fill(circleColor);
-  ellipse(circleX, circleY, circleSize, circleSize);
-}
-
-void update(int x, int y)
-{
-  if( overCircle(circleX, circleY, circleSize) ) {
-    circleOver = true;
-    rectOver = false;
-  } else if ( overRect(rectX, rectY, rectSize, rectSize) ) {
-    rectOver = true;
-    circleOver = false;
-  } else {
-    circleOver = rectOver = false;
-  }
-}
-
-boolean overRect(int x, int y, int width, int height) 
-{
-  if (mouseX >= x && mouseX <= x+width && 
-      mouseY >= y && mouseY <= y+height) {
-    return true;
-  } else {
-    return false;
-  }
-}
-
-boolean overCircle(int x, int y, int diameter) 
-{
-  float disX = x - mouseX;
-  float disY = y - mouseY;
-  if(sqrt(sq(disX) + sq(disY)) < diameter/2 ) {
-    return true;
-  } else {
-    return false;
-  }
-}
- - diff --git a/examples/topics/savefile1.html b/examples/topics/savefile1.html deleted file mode 100644 index 2cc8f18ba..000000000 --- a/examples/topics/savefile1.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - -

Processing.js

-

SaveFile1

- -

Saving files is a useful way to store data so it can be viewed after a -program has stopped running. The saveStrings() function writes an array -of strings to a file, with each string written to a new line. This file -is saved to the sketchs folder. This example won't work in a web browser -because of Java security restrictions.

- -

Original Processing.org Example: SaveFile1
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int[] x = new int[0];
-int[] y = new int[0];
-
-void setup() 
-{
-  size(200, 200);
-}
-
-void draw() 
-{
-  background(204);
-  stroke(0);
-  noFill();
-  beginShape();
-  for (int i = 0; i < x.length; i++) {
-    vertex(x[i], y[i]);
-  }
-  endShape();
-  // Show the next segment to be added
-  if (x.length >= 1) {
-    stroke(255);
-    line(mouseX, mouseY, x[x.length-1], y[x.length-1]);
-  }
-}
-
-void mousePressed() { // Click to add a line segment
-  x = append(x, mouseX);
-  y = append(y, mouseY);
-}
-
-void keyPressed() { // Press a key to save the data
-  String[] lines = new String[x.length];
-  for (int i = 0; i < x.length; i++) {
-    lines[i] = x[i] + "\t" + y[i];
-  }
-  saveStrings("lines.txt", lines);
-  exit(); // Stop the program
-}
- - diff --git a/examples/topics/savefile2.html b/examples/topics/savefile2.html deleted file mode 100644 index 63c836ae6..000000000 --- a/examples/topics/savefile2.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - -

Processing.js

-

SaveFile2

- -

This file a PrintWriter object to write data continuously to a file -while the mouse is pressed. When a key is pressed, the file closes -itself and the program is stopped. This example won't work in a web browser -because of Java security restrictions.

- -

Original Processing.org Example: SaveFile2
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-PrintWriter output;
-
-void setup() 
-{
-  size(200, 200);
-  // Create a new file in the sketch directory
-  output = createWriter("positions.txt");
-  frameRate(12);
-}
-
-void draw() 
-{
-  if (mousePressed) {
-    point(mouseX, mouseY);
-    // Write the coordinate to a file with a
-    // "\t" (TAB character) between each entry
-    output.println(mouseX + "\t" + mouseY);
-  }
-}
-
-void keyPressed() { // Press a key to save the data
-  output.flush(); // Write the remaining data
-  output.close(); // Finish the file
-  exit(); // Stop the program
-}
- - diff --git a/examples/topics/savemanyimages.html b/examples/topics/savemanyimages.html deleted file mode 100644 index 0dcac07b4..000000000 --- a/examples/topics/savemanyimages.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - -

Processing.js

-

SaveManyImages

- -

The saveFrame() function allows you to save images from -a program while it is running. This example saves the first -50 frames of a program. These images can be imported into -animation software or QuickTime and then saved as a movie.

- -

Original Processing.org Example: SaveManyImages
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float x = 33;
-float numFrames = 50;
-
-void setup() 
-{
-  size(200, 200);
-  smooth();
-  noStroke();
-}
-
-void draw() 
-{
-  background(0);
-  x += random(-2, 2);
-  ellipse(x, 100, 80, 80);
-  if (frameCount <= numFrames) {
-    saveFrame("circles-####.tif");
-  }
-}
- - diff --git a/examples/topics/saveoneimage.html b/examples/topics/saveoneimage.html deleted file mode 100644 index e282123ef..000000000 --- a/examples/topics/saveoneimage.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - -

Processing.js

-

SaveOneImage

- -

The save() function allows you to save an image from the -display window. In this example, save() is run when a mouse -button is pressed. The image "line.tif" is saved to the -same folder as the sketch's program file.

- -

Original Processing.org Example: SaveOneImage
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-void setup() 
-{
-  size(100, 100);
-}
-
-void draw() 
-{
-  background(204);
-  line(0, 0, mouseX, height);
-  line(width, 0, 0, mouseY);
-}
-
-void mousePressed() 
-{
-  save("line.tif");
-}
- - diff --git a/examples/topics/scribbleplotter.html b/examples/topics/scribbleplotter.html deleted file mode 100644 index 65d5bb380..000000000 --- a/examples/topics/scribbleplotter.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - -

Processing.js

-

ScribblePlotter

- -

by Ira Greenberg. - -Using 2-dimensional arrays, record end points -and replot scribbles between points.

- -

Original Processing.org Example: ScribblePlotter
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// some scribble style constants that control 
-// how the scribble plotting works
-int SCRIBBLE = 0;
-int HATCHING = 1;
-
-void setup(){
-  size(200, 200);
-  background(0);
-
-  // create arrays to hold x, y coords
-  float[]x = new float[4];
-  float[]y  = new float[4];
-  // create a convenient 2-dimensional 
-  // array to hold x, y arrays
-  float[][]xy = {x, y};
-
-  // record points
-  // x positions     
-  xy[0][0] = 25;
-  xy[0][1] = 175;
-  xy[0][2] = 175;
-  xy[0][3] = 25;
-
-  // y positions
-  xy[1][0] = 25;
-  xy[1][1] = 25;
-  xy[1][2] = 175;
-  xy[1][3] = 175;
-
-  // call plotting function
-  makeRect(xy);
-}
-
-void makeRect(float[][]pts){
-  stroke(255);
-  smooth();
-  
-  // scribble variables, that get passed as arguments to the scribble function
-  int steps = 100;
-  float scribVal = 3.0;
-  for (int i=0; i< pts[0].length; i++){
-    //plots vertices
-    strokeWeight(5);
-    point(pts[0][i], pts[1][i]);
-
-    // call scribble function
-    strokeWeight(.5);
-    if (i>0){ 
-      scribble(pts[0][i], pts[1][i], pts[0][i-1], pts[1][i-1], steps, scribVal, SCRIBBLE);
-    } 
-    if (i== pts[0].length-1){
-    // show some hatching between last 2 points
-      scribble(pts[0][i], pts[1][i], pts[0][0], pts[1][0], steps, scribVal*2, HATCHING);
-    }
-  }
-}
-
-/* 
-scribble function plots lines between end points, 
-determined by steps and scribVal arguments.
-2 styles are available: SCRIBBLE and HATCHING, which
-are interestingly only dependent on parentheses
-placement in the line() function calls.
-*/
-void scribble(float x1, float y1, float x2, float y2, int steps, float scribVal, int style){
-
-  float xStep = (x2-x1)/steps;
-  float yStep = (y2-y1)/steps;
-  for (int i = 0; i<steps; i++){
-    if(style == SCRIBBLE){
-      if (i<steps-1){
-        line(x1, y1, x1+=xStep+random(-scribVal, scribVal), y1+=yStep+random(-scribVal, scribVal));
-      } 
-      else {
-        // extra line needed to attach line back to point- not necessary in HATCHING style
-        line(x1, y1, x2, y2);
-      }
-    }
-    else if (style == HATCHING){
-       line(x1, y1, (x1+=xStep)+random(-scribVal, scribVal), (y1+=yStep)+random(-scribVal, scribVal));
-    }
-  }
-}
- - diff --git a/examples/topics/scrollbar.html b/examples/topics/scrollbar.html deleted file mode 100644 index af6143a19..000000000 --- a/examples/topics/scrollbar.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - -

Processing.js

-

Scrollbar

- -

Move the scrollbars left and right to change the positions of the images.

- -

Original Processing.org Example: Scrollbar
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-
-/* @pjs preload="data/seedTop.jpg, data/seedBottom.jpg"; */
-
-HScrollbar hs1, hs2;
-
-PImage top, bottom;         // Two image to load
-int topWidth, bottomWidth;  // The width of the top and bottom images
-
-
-void setup()
-{
-  size(200, 200);
-  noStroke();
-  hs1 = new HScrollbar(0, 20, width, 10, 3*5+1);
-  hs2 = new HScrollbar(0, height-20, width, 10, 3*5+1);
-  top = loadImage("seedTop.jpg");
-  topWidth = top.width;
-  bottom = loadImage("seedBottom.jpg");
-  bottomWidth = bottom.width;
-}
-
-void draw()
-{
-  background(255);
-  
-  // Get the position of the top scrollbar
-  // and convert to a value to display the top image 
-  float topPos = hs1.getPos()-width/2;
-  fill(255);
-  image(top, width/2-topWidth/2 + topPos*2, 0);
-  
-  // Get the position of the bottom scrollbar
-  // and convert to a value to display the bottom image
-  float bottomPos = hs2.getPos()-width/2;
-  fill(255);
-  image(bottom, width/2-bottomWidth/2 + bottomPos*2, height/2);
- 
-  hs1.update();
-  hs2.update();
-  hs1.display();
-  hs2.display();
-}
-
-
-class HScrollbar
-{
-  int swidth, sheight;    // width and height of bar
-  int xpos, ypos;         // x and y position of bar
-  float spos, newspos;    // x position of slider
-  int sposMin, sposMax;   // max and min values of slider
-  int loose;              // how loose/heavy
-  boolean over;           // is the mouse over the slider?
-  boolean locked;
-  float ratio;
-
-  HScrollbar (int xp, int yp, int sw, int sh, int l) {
-    swidth = sw;
-    sheight = sh;
-    int widthtoheight = sw - sh;
-    ratio = (float)sw / (float)widthtoheight;
-    xpos = xp;
-    ypos = yp-sheight/2;
-    spos = xpos + swidth/2 - sheight/2;
-    newspos = spos;
-    sposMin = xpos;
-    sposMax = xpos + swidth - sheight;
-    loose = l;
-  }
-
-  void update() {
-    if(over()) {
-      over = true;
-    } else {
-      over = false;
-    }
-    if(mousePressed && over) {
-      locked = true;
-    }
-    if(!mousePressed) {
-      locked = false;
-    }
-    if(locked) {
-      newspos = constrain(mouseX-sheight/2, sposMin, sposMax);
-    }
-    if(abs(newspos - spos) > 1) {
-      spos = spos + (newspos-spos)/loose;
-    }
-  }
-
-  int constrain(int val, int minv, int maxv) {
-    return min(max(val, minv), maxv);
-  }
-
-  boolean over() {
-    if(mouseX > xpos && mouseX < xpos+swidth &&
-    mouseY > ypos && mouseY < ypos+sheight) {
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-  void display() {
-    fill(255);
-    rect(xpos, ypos, swidth, sheight);
-    if(over || locked) {
-      fill(153, 102, 0);
-    } else {
-      fill(102, 102, 102);
-    }
-    rect(spos, ypos, sheight, sheight);
-  }
-
-  float getPos() {
-    // Convert spos to be values between
-    // 0 and the total width of the scrollbar
-    return spos * ratio;
-  }
-}
- - diff --git a/examples/topics/sequential.html b/examples/topics/sequential.html deleted file mode 100644 index f2c28f666..000000000 --- a/examples/topics/sequential.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - -

Processing.js

-

Sequential

- -

This code was updated from the Java source to work with Processing.js asynchronous image loading.

- -

by James Patterson. - -Displaying a sequence of images creates the illusion of motion. -Twelve images are loaded and each is displayed individually in a loop.

- -

Original Processing.org Example: Sequential
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int numFrames = 12;  // The number of frames in the animation
-int frame = 0;
-PImage[] images = new PImage[numFrames];
-    
-void setup()
-{
-  size(200, 200);
-  frameRate(30);
-  
-  images[0]  = loadImage("PT_anim0000.gif");
-  images[1]  = loadImage("PT_anim0001.gif"); 
-  images[2]  = loadImage("PT_anim0002.gif");
-  images[3]  = loadImage("PT_anim0003.gif"); 
-  images[4]  = loadImage("PT_anim0004.gif");
-  images[5]  = loadImage("PT_anim0005.gif"); 
-  images[6]  = loadImage("PT_anim0006.gif");
-  images[7]  = loadImage("PT_anim0007.gif"); 
-  images[8]  = loadImage("PT_anim0008.gif");
-  images[9]  = loadImage("PT_anim0009.gif"); 
-  images[10] = loadImage("PT_anim0010.gif");
-  images[11] = loadImage("PT_anim0011.gif"); 
-  
-  // If you don't want to load each image separately
-  // and you know how many frames you have, you
-  // can create the filenames as the program runs.
-  // The nf() command does number formatting, which will
-  // ensure that the number is (in this case) 4 digits.
-  //for(int i=0; i<numFrames; i++) {
-  //  String imageName = "PT_anim" + nf(i, 4) + ".gif";
-  //  images[i] = loadImage(imageName);
-  //}
-} 
- 
-void draw() 
-{ 
-  frame = (frame+1)%numFrames;  // Use % to cycle through frames
-  if( images[frame].loaded ){
-    image(images[frame], 0, 0);
-  }
-}
-
- - diff --git a/examples/topics/simpleparticlesystem.html b/examples/topics/simpleparticlesystem.html deleted file mode 100644 index 24c2f6879..000000000 --- a/examples/topics/simpleparticlesystem.html +++ /dev/null @@ -1,532 +0,0 @@ - - - - - -

Processing.js

-

SimpleParticleSystem

- -

by Daniel Shiffman. - -Particles are generated each cycle through draw(), -fall with gravity and fade out over time -A ParticleSystem object manages a variable size (ArrayList) -list of particles.

- -

Original Processing.org Example: SimpleParticleSystem
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-ParticleSystem ps;
-
-void setup() {
-  size(200,200);
-  frameRate(30);
-  colorMode(RGB,255,255,255,100);
-  ps = new ParticleSystem(1,new Vector3D(width/2,height/2,0));
-  smooth();
-}
-
-void draw() {
-  background(0);
-  ps.run();
-  ps.addParticle();
-}
-
-
-// A simple Particle class
-
-class Particle {
-  Vector3D loc;
-  Vector3D vel;
-  Vector3D acc;
-  float r;
-  float timer;
-
-  // One constructor
-  Particle(Vector3D a, Vector3D v, Vector3D l, float r_) {
-    acc = a.copy();
-    vel = v.copy();
-    loc = l.copy();
-    r = r_;
-    timer = 100.0;
-  }
-  
-  // Another constructor (the one we are using here)
-  Particle(Vector3D l) {
-    acc = new Vector3D(0,0.05,0);
-    vel = new Vector3D(random(-1,1),random(-2,0),0);
-    loc = l.copy();
-    r = 10.0;
-    timer = 100.0;
-  }
-
-
-  void run() {
-    update();
-    render();
-  }
-
-  // Method to update location
-  void update() {
-    vel.add(acc);
-    loc.add(vel);
-    timer -= 1.0;
-  }
-
-  // Method to display
-  void render() {
-    ellipseMode(CENTER);
-    noStroke();
-    fill(255,timer);
-    ellipse(loc.x,loc.y,r,r);
-  }
-  
-  // Is the particle still useful?
-  boolean dead() {
-    if (timer <= 0.0) {
-      return true;
-    } else {
-      return false;
-    }
-  }
-}
-
-
-// A class to describe a group of Particles
-// An ArrayList is used to manage the list of Particles 
-
-class ParticleSystem {
-
-  ArrayList particles;    // An arraylist for all the particles
-  Vector3D origin;        // An origin point for where particles are birthed
-
-  ParticleSystem(int num, Vector3D v) {
-    particles = new ArrayList();              // Initialize the arraylist
-    origin = v.copy();                        // Store the origin point
-    for (int i = 0; i < num; i++) {
-      particles.add(new Particle(origin));    // Add "num" amount of particles to the arraylist
-    }
-  }
-
-  void run() {
-    // Cycle through the ArrayList backwards b/c we are deleting
-    for (int i = particles.size()-1; i >= 0; i--) {
-      Particle p = (Particle) particles.get(i);
-      p.run();
-      if (p.dead()) {
-        particles.remove(i);
-      }
-    }
-  }
-
-  void addParticle() {
-    particles.add(new Particle(origin));
-  }
-
-  void addParticle(Particle p) {
-    particles.add(p);
-  }
-
-  // A method to test if the particle system still has particles
-  boolean dead() {
-    if (particles.isEmpty()) {
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-}
-
-
-
-// Simple Vector3D Class 
-
-public class Vector3D {
-  public float x;
-  public float y;
-  public float z;
-
-  Vector3D(float x_, float y_, float z_) {
-    x = x_; y = y_; z = z_;
-  }
-
-  Vector3D(float x_, float y_) {
-    x = x_; y = y_; z = 0f;
-  }
-  
-  Vector3D() {
-    x = 0f; y = 0f; z = 0f;
-  }
-
-  void setX(float x_) {
-    x = x_;
-  }
-
-  void setY(float y_) {
-    y = y_;
-  }
-
-  void setZ(float z_) {
-    z = z_;
-  }
-  
-  void setXY(float x_, float y_) {
-    x = x_;
-    y = y_;
-  }
-  
-  void setXYZ(float x_, float y_, float z_) {
-    x = x_;
-    y = y_;
-    z = z_;
-  }
-
-  void setXYZ(Vector3D v) {
-    x = v.x;
-    y = v.y;
-    z = v.z;
-  }
-  public float magnitude() {
-    return (float) Math.sqrt(x*x + y*y + z*z);
-  }
-
-  public Vector3D copy() {
-    return new Vector3D(x,y,z);
-  }
-
-  public Vector3D copy(Vector3D v) {
-    return new Vector3D(v.x, v.y,v.z);
-  }
-  
-  public void add(Vector3D v) {
-    x += v.x;
-    y += v.y;
-    z += v.z;
-  }
-
-  public void sub(Vector3D v) {
-    x -= v.x;
-    y -= v.y;
-    z -= v.z;
-  }
-
-  public void mult(float n) {
-    x *= n;
-    y *= n;
-    z *= n;
-  }
-
-  public void div(float n) {
-    x /= n;
-    y /= n;
-    z /= n;
-  }
-
-  public void normalize() {
-    float m = magnitude();
-    if (m > 0) {
-       div(m);
-    }
-  }
-
-  public void limit(float max) {
-    if (magnitude() > max) {
-      normalize();
-      mult(max);
-    }
-  }
-
-  public float heading2D() {
-    float angle = (float) Math.atan2(-y, x);
-    return -1*angle;
-  }
-
-  public Vector3D add(Vector3D v1, Vector3D v2) {
-    Vector3D v = new Vector3D(v1.x + v2.x,v1.y + v2.y, v1.z + v2.z);
-    return v;
-  }
-
-  public Vector3D sub(Vector3D v1, Vector3D v2) {
-    Vector3D v = new Vector3D(v1.x - v2.x,v1.y - v2.y,v1.z - v2.z);
-    return v;
-  }
-
-  public Vector3D div(Vector3D v1, float n) {
-    Vector3D v = new Vector3D(v1.x/n,v1.y/n,v1.z/n);
-    return v;
-  }
-
-  public Vector3D mult(Vector3D v1, float n) {
-    Vector3D v = new Vector3D(v1.x*n,v1.y*n,v1.z*n);
-    return v;
-  }
-
-  public float distance (Vector3D v1, Vector3D v2) {
-    float dx = v1.x - v2.x;
-    float dy = v1.y - v2.y;
-    float dz = v1.z - v2.z;
-    return (float) Math.sqrt(dx*dx + dy*dy + dz*dz);
-  }
-
-}
- - diff --git a/examples/topics/smoke.html b/examples/topics/smoke.html deleted file mode 100644 index c953a6a13..000000000 --- a/examples/topics/smoke.html +++ /dev/null @@ -1,536 +0,0 @@ - - - - - -

Processing.js

-

Smoke

- -

by Glen Murphy. - -Drag the mouse across the image to move the particles. -Code has not been optimised and will run fairly slowly. - -Completed 5 November 2002

- -

Original Processing.org Example: Smoke
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int res = 2;
-int penSize = 30;
-int lwidth;
-int lheight;
-int pnum = 30000;
-vsquare[][] v;
-vbuffer[][] vbuf;
-particle[] p;
-int pcount = 0;
-int mouseXvel = 0;
-int mouseYvel = 0;
-
-int randomGust = 0;
-int randomGustMax;
-float randomGustX;
-float randomGustY;
-float randomGustSize;
-float randomGustXvel;
-float randomGustYvel;
-
-void setup() 
-{
-  size(200, 200);
-  lwidth = width/res;
-  lheight = height/res;
-  v = new vsquare[lwidth+1][lheight+1];
-  vbuf = new vbuffer[lwidth+1][lheight+1];
-  p = new particle[pnum];
-  noStroke();
-  for(int i = 0; i < pnum; i++) {
-    p[i] = new particle(random(width/2-20,width/2+20),random(height-20,height));
-  }
-  for(int i = 0; i <= lwidth; i++) {
-    for(int u = 0; u <= lheight; u++) {
-      v[i][u] = new vsquare(i*res,u*res);
-      vbuf[i][u] = new vbuffer(i*res,u*res);
-    }
-  }
-}
-
-void draw() 
-{
-  background(#cccccc);
-  
-  int axvel = mouseX-pmouseX;
-  int ayvel = mouseY-pmouseY;
-
-  mouseXvel = (axvel != mouseXvel) ? axvel : 0;
-  mouseYvel = (ayvel != mouseYvel) ? ayvel : 0;
-
-  if(randomGust <= 0) {
-    if(random(0,10)<1) {
-      randomGustMax = (int)random(5,12);
-      randomGust = randomGustMax;
-      randomGustX = random(0,width);
-      randomGustY = random(0,height-10);
-      randomGustSize = random(0,50);
-      if(randomGustX > width/2) {
-        randomGustXvel = random(-8,0);
-      } else { 
-        randomGustXvel = random(0,8);
-      }
-      randomGustYvel = random(-2,1);
-    }
-    randomGust--;
-  }
-
-  for(int i = 0; i < lwidth; i++) {
-    for(int u = 0; u < lheight; u++) {
-      vbuf[i][u].updatebuf(i,u);
-      v[i][u].col = 0;
-    }
-  }
-  for(int i = 0; i < pnum-1; i++) {
-    p[i].updatepos();
-  }
-  for(int i = 0; i < lwidth; i++) {
-    for(int u = 0; u < lheight; u++) {
-      v[i][u].addbuffer(i, u);
-      v[i][u].updatevels(mouseXvel, mouseYvel);
-      v[i][u].display(i, u);
-    }
-  }
-  randomGust = 0;
-}
-
-class particle 
-{
-  float x;
-  float y;
-  float xvel;
-  float yvel;
-  float temp;
-  int pos;
-
-  particle(float xIn, float yIn) {
-    x = xIn;
-    y = yIn;
-  }
-
-  void reposition() {
-    x = width/2+random(-20,20);
-    y = random(height-10,height);
-
-    xvel = random(-1,1);
-    yvel = random(-1,1);
-  }
-
-  void updatepos() {
-    int vi = (int)(x/res);
-    int vu = (int)(y/res);
-
-    if(vi > 0 && vi < lwidth && vu > 0 && vu < lheight) {
-      v[vi][vu].addcolour(2);
-
-      float ax = (x%res)/res;
-      float ay = (y%res)/res;
-
-      xvel += (1-ax)*v[vi][vu].xvel*0.05;
-      yvel += (1-ay)*v[vi][vu].yvel*0.05;
-
-      xvel += ax*v[vi+1][vu].xvel*0.05;
-      yvel += ax*v[vi+1][vu].yvel*0.05;
-
-      xvel += ay*v[vi][vu+1].xvel*0.05;
-      yvel += ay*v[vi][vu+1].yvel*0.05;
-
-      v[vi][vu].yvel -= (1-ay)*0.003;
-      v[vi+1][vu].yvel -= ax*0.003;
-
-      if(v[vi][vu].yvel < 0) v[vi][vu].yvel *= 1.00025;
-
-      x += xvel;
-      y += yvel;
-    } 
-    else {
-      reposition();
-    }
-    if(random(0,400) < 1) {
-      reposition();
-    }
-    xvel *= 0.6;
-    yvel *= 0.6;
-  }
-}
-
-class vbuffer
-{
-  int x;
-  int y;
-  float xvel;
-  float yvel;
-  float pressurex = 0;
-  float pressurey = 0;
-  float pressure = 0;
-
-  vbuffer(int xIn,int yIn) {
-    x = xIn;
-    y = yIn;
-    pressurex = 0;
-    pressurey = 0;
-  }
-
-  void updatebuf(int i, int u) {
-    if(i>0 && i<lwidth && u>0 && u<lheight) {
-      pressurex = (v[i-1][u-1].xvel*0.5 + v[i-1][u].xvel + v[i-1][u+1].xvel*0.5 - v[i+1][u-1].xvel*0.5 - v[i+1][u].xvel - v[i+1][u+1].xvel*0.5);
-      pressurey = (v[i-1][u-1].yvel*0.5 + v[i][u-1].yvel + v[i+1][u-1].yvel*0.5 - v[i-1][u+1].yvel*0.5 - v[i][u+1].yvel - v[i+1][u+1].yvel*0.5);
-      pressure = (pressurex + pressurey)*0.25;
-    }
-  }
-}
-
-class vsquare {
-  int x;
-  int y;
-  float xvel;
-  float yvel;
-  float col;
-
-  vsquare(int xIn,int yIn) {
-    x = xIn;
-    y = yIn;
-  }
-
-  void addbuffer(int i, int u) {
-    if(i>0 && i<lwidth && u>0 && u<lheight) {
-      xvel += (vbuf[i-1][u-1].pressure*0.5
-      +vbuf[i-1][u].pressure
-      +vbuf[i-1][u+1].pressure*0.5
-      -vbuf[i+1][u-1].pressure*0.5
-      -vbuf[i+1][u].pressure
-      -vbuf[i+1][u+1].pressure*0.5
-      )*0.49;
-      yvel += (vbuf[i-1][u-1].pressure*0.5
-      +vbuf[i][u-1].pressure
-      +vbuf[i+1][u-1].pressure*0.5
-      -vbuf[i-1][u+1].pressure*0.5
-      -vbuf[i][u+1].pressure
-      -vbuf[i+1][u+1].pressure*0.5
-      )*0.49;
-    }
-  }
-
-  void updatevels(int mvelX, int mvelY) {
-    float adj;
-    float opp;
-    float dist;
-    float mod;
-
-    if(mousePressed) {
-      adj = x - mouseX;
-      opp = y - mouseY;
-      dist = sqrt(opp*opp + adj*adj);
-      if(dist < penSize) {
-        if(dist < 4) dist = penSize;
-        mod = penSize/dist;
-        xvel += mvelX*mod;
-        yvel += mvelY*mod;
-      }
-    }
-    if(randomGust > 0) {
-      adj = x - randomGustX;
-      opp = y - randomGustY;
-      dist = sqrt(opp*opp + adj*adj);
-      if(dist < randomGustSize) {
-        if(dist < res*2) dist = randomGustSize;
-        mod = randomGustSize/dist;
-        xvel += (randomGustMax-randomGust)*randomGustXvel*mod;
-        yvel += (randomGustMax-randomGust)*randomGustYvel*mod;
-      }
-    }
-    xvel *= 0.99;
-    yvel *= 0.98;
-  }
-
-  void addcolour(int amt) {
-    col += amt;
-    if(col > 196) col = 196;
-  }
-
-  void display(int i, int u) {
-    float tcol = 0;
-    if(i>0 && i<lwidth-1 && u>0 && u<lheight-1) {
-
-      tcol = (+ v[i][u+1].col
-      + v[i+1][u].col
-      + v[i+1][u+1].col*0.5
-      )*0.3;
-      tcol = (int)(tcol+col*0.5);
-    }
-
-    fill(255-tcol, 255-tcol, 255-tcol);
-    rect(x,y,res,res);
-    col = 0;
-  }
-}
- - diff --git a/examples/topics/smokeparticlesystem.html b/examples/topics/smokeparticlesystem.html deleted file mode 100644 index 5c55ba470..000000000 --- a/examples/topics/smokeparticlesystem.html +++ /dev/null @@ -1,654 +0,0 @@ - - - - - -

Processing.js

-

SmokeParticleSystem

- -

by Daniel Shiffman. - -A basic smoke effect using a particle system. -Each particle is rendered as an alpha masked image.

- -

Original Processing.org Example: SmokeParticleSystem
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-ParticleSystem ps;
-Random generator;
-
-void setup() {
-  size(200, 200);
-  frameRate(30);
-  colorMode(RGB, 255, 255, 255, 100);
-  generator = new Random();
-    
-  // Create an alpha masked image to be applied as the particle's texture
-  PImage msk = loadImage("texture.gif");
-  PImage img = new PImage(msk.width,msk.height);
-  for (int i = 0; i < img.pixels.length; i++) img.pixels[i] = color(255);
-  img.mask(msk);
-
-  ps = new ParticleSystem(0,new Vector3D(width/2,height-20),img);
-  smooth();
-}
-
-void draw() {
-  background(0);
-  
-  // Calculate a "wind" force based on mouse horizontal position
-  float dx = (mouseX - width/2) / 1000.0;
-  Vector3D wind = new Vector3D(dx,0,0);
-  ps.add_force(wind);
-  ps.run();
-  for (int i = 0; i < 2; i++) {
-    ps.addParticle();
-  }
-  
-  // Draw an arrow representing the wind force
-  drawVector(wind, new Vector3D(width/2,50,0),500);
-
-}
-
-// Renders a vector object 'v' as an arrow and a location 'loc'
-void drawVector(Vector3D v, Vector3D loc, float scayl) {
-  pushMatrix();
-  float arrowsize = 4;
-  // Translate to location to render vector
-  translate(loc.x,loc.y);
-  stroke(255);
-  // Call vector heading function to get direction (note that pointing up is a heading of 0) and rotate
-  rotate(v.heading2D());
-  // Calculate length of vector & scale it to be bigger or smaller if necessary
-  float len = v.magnitude()*scayl;
-  // Draw three lines to make an arrow (draw pointing up since we've rotate to the proper direction)
-  line(0,0,len,0);
-  line(len,0,len-arrowsize,+arrowsize/2);
-  line(len,0,len-arrowsize,-arrowsize/2);
-  popMatrix();
-}
-
-
-
-// A simple Particle class, renders the particle as an image
-
-class Particle {
-  Vector3D loc;
-  Vector3D vel;
-  Vector3D acc;
-  float timer;
-  PImage img;
-
-  // One constructor
-  Particle(Vector3D a, Vector3D v, Vector3D l, PImage img_) {
-    acc = a.copy();
-    vel = v.copy();
-    loc = l.copy();
-    timer = 100.0;
-    img = img_;
-  }
-
-  // Another constructor (the one we are using here)
-  Particle(Vector3D l,PImage img_) {
-    acc = new Vector3D(0.0,0.0,0.0);
-    float x = (float) generator.nextGaussian()*0.3f;
-    float y = (float) generator.nextGaussian()*0.3f - 1.0f;
-    vel = new Vector3D(x,y,0);
-    loc = l.copy();
-    timer = 100.0;
-    img = img_;
-  }
-
-  void run() {
-    update();
-    render();
-  }
-  
-  // Method to apply a force vector to the Particle object
-  // Note we are ignoring "mass" here
-  void add_force(Vector3D f) {
-    acc.add(f);
-  }  
-
-  // Method to update location
-  void update() {
-    vel.add(acc);
-    loc.add(vel);
-    timer -= 2.5;
-    acc.setXY(0,0);
-  }
-
-  // Method to display
-  void render() {
-    imageMode(CORNER);
-    tint(255,timer);
-    image(img,loc.x-img.width/2,loc.y-img.height/2);
-  }
-
-  // Is the particle still useful?
-  boolean dead() {
-    if (timer <= 0.0) {
-      return true;
-    } else {
-      return false;
-    }
-  }
-}
-
-
-// A class to describe a group of Particles
-// An ArrayList is used to manage the list of Particles 
-
-class ParticleSystem {
-
-  ArrayList particles;    // An arraylist for all the particles
-  Vector3D origin;        // An origin point for where particles are birthed
-  PImage img;
-  
-  ParticleSystem(int num, Vector3D v, PImage img_) {
-    particles = new ArrayList();              // Initialize the arraylist
-    origin = v.copy();                        // Store the origin point
-    img = img_;
-    for (int i = 0; i < num; i++) {
-      particles.add(new Particle(origin, img));    // Add "num" amount of particles to the arraylist
-    }
-  }
-
-  void run() {
-    // Cycle through the ArrayList backwards b/c we are deleting
-    for (int i = particles.size()-1; i >= 0; i--) {
-      Particle p = (Particle) particles.get(i);
-      p.run();
-      if (p.dead()) {
-        particles.remove(i);
-      }
-    }
-  }
-  
-  // Method to add a force vector to all particles currently in the system
-  void add_force(Vector3D dir) {
-    for (int i = particles.size()-1; i >= 0; i--) {
-      Particle p = (Particle) particles.get(i);
-      p.add_force(dir);
-    }
-  
-  }  
-
-  void addParticle() {
-    particles.add(new Particle(origin,img));
-  }
-
-  void addParticle(Particle p) {
-    particles.add(p);
-  }
-
-  // A method to test if the particle system still has particles
-  boolean dead() {
-    if (particles.isEmpty()) {
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-}
-
-
-public class Vector3D {
-  public float x;
-  public float y;
-  public float z;
-
-  Vector3D(float x_, float y_, float z_) {
-    x = x_; y = y_; z = z_;
-  }
-
-  Vector3D(float x_, float y_) {
-    x = x_; y = y_; z = 0f;
-  }
-  
-  Vector3D() {
-    x = 0f; y = 0f; z = 0f;
-  }
-
-  void setX(float x_) {
-    x = x_;
-  }
-
-  void setY(float y_) {
-    y = y_;
-  }
-
-  void setZ(float z_) {
-    z = z_;
-  }
-  
-  void setXY(float x_, float y_) {
-    x = x_;
-    y = y_;
-  }
-  
-  void setXYZ(float x_, float y_, float z_) {
-    x = x_;
-    y = y_;
-    z = z_;
-  }
-
-  void setXYZ(Vector3D v) {
-    x = v.x;
-    y = v.y;
-    z = v.z;
-  }
-  public float magnitude() {
-    return (float) Math.sqrt(x*x + y*y + z*z);
-  }
-
-  public Vector3D copy() {
-    return new Vector3D(x,y,z);
-  }
-
-  public Vector3D copy(Vector3D v) {
-    return new Vector3D(v.x, v.y,v.z);
-  }
-  
-  public void add(Vector3D v) {
-    x += v.x;
-    y += v.y;
-    z += v.z;
-  }
-
-  public void sub(Vector3D v) {
-    x -= v.x;
-    y -= v.y;
-    z -= v.z;
-  }
-
-  public void mult(float n) {
-    x *= n;
-    y *= n;
-    z *= n;
-  }
-
-  public void div(float n) {
-    x /= n;
-    y /= n;
-    z /= n;
-  }
-  
-  /*public float dot(Vector3D v) {
-    //implement DOT product
-  }*/
-  
-  /*public Vector3D cross(Vector3D v) {
-    //implement CROSS product
-  }*/
-
-  public void normalize() {
-    float m = magnitude();
-    if (m > 0) {
-       div(m);
-    }
-  }
-
-  public void limit(float max) {
-    if (magnitude() > max) {
-      normalize();
-      mult(max);
-    }
-  }
-
-  public float heading2D() {
-    float angle = (float) Math.atan2(-y, x);
-    return -1*angle;
-  }
-
-  public Vector3D add(Vector3D v1, Vector3D v2) {
-    Vector3D v = new Vector3D(v1.x + v2.x,v1.y + v2.y, v1.z + v2.z);
-    return v;
-  }
-
-  public Vector3D sub(Vector3D v1, Vector3D v2) {
-    Vector3D v = new Vector3D(v1.x - v2.x,v1.y - v2.y,v1.z - v2.z);
-    return v;
-  }
-
-  public Vector3D div(Vector3D v1, float n) {
-    Vector3D v = new Vector3D(v1.x/n,v1.y/n,v1.z/n);
-    return v;
-  }
-
-  public Vector3D mult(Vector3D v1, float n) {
-    Vector3D v = new Vector3D(v1.x*n,v1.y*n,v1.z*n);
-    return v;
-  }
-
-  public float distance (Vector3D v1, Vector3D v2) {
-    float dx = v1.x - v2.x;
-    float dy = v1.y - v2.y;
-    float dz = v1.z - v2.z;
-    return (float) Math.sqrt(dx*dx + dy*dy + dz*dz);
-  }
-
-}
- - diff --git a/examples/topics/softbody.html b/examples/topics/softbody.html deleted file mode 100644 index 89b3f555e..000000000 --- a/examples/topics/softbody.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - -

Processing.js

-

SoftBody

- -

by Ira Greenberg. - -Softbody dynamics simulation using curveVertex() and curveTightness()

- -

Original Processing.org Example: SoftBody
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// center point
-float centerX = 0, centerY = 0;
-
-float radius = 45, rotAngle = -90;
-float accelX, accelY;
-float springing = .0085, damping = .98;
-
-//corner nodes
-int nodes = 5;
-float nodeStartX[] = new float[nodes];
-float nodeStartY[] = new float[nodes];
-float[]nodeX = new float[nodes];
-float[]nodeY = new float[nodes];
-float[]angle = new float[nodes];
-float[]frequency = new float[nodes];
-
-// soft-body dynamics
-float organicConstant = 1;
-
-void setup() {
-  size(200, 200);
-  //center shape in window
-  centerX = width/2;
-  centerY = height/2;
-  // iniitalize frequencies for corner nodes
-  for (int i=0; i<nodes; i++){
-    frequency[i] = random(5, 12);
-  }
-  noStroke();
-  smooth();
-  frameRate(30);
-}
-
-void draw() {
-  //fade background
-  fill(0, 100);
-  rect(0,0,width, height);
-  drawShape();
-  moveShape();
-}
-
-void drawShape() {
-  //  calculate node  starting locations
-  for (int i=0; i<nodes; i++){
-    nodeStartX[i] = centerX+cos(radians(rotAngle))*radius;
-    nodeStartY[i] = centerY+sin(radians(rotAngle))*radius;
-    rotAngle += 360.0/nodes;
-  }
-
-  // draw polygon
-  curveTightness(organicConstant);
-  fill(255);
-  beginShape();
-  for (int i=0; i<nodes; i++){
-    curveVertex(nodeX[i], nodeY[i]);
-  }
-  for (int i=0; i<nodes-1; i++){
-    curveVertex(nodeX[i], nodeY[i]);
-  }
-  endShape(CLOSE);
-}
-
-void moveShape() {
-  //move center point
-  float deltaX = mouseX-centerX;
-  float deltaY = mouseY-centerY;
-
-  // create springing effect
-  deltaX *= springing;
-  deltaY *= springing;
-  accelX += deltaX;
-  accelY += deltaY;
-
-  // move predator's center
-  centerX += accelX;
-  centerY += accelY;
-
-  // slow down springing
-  accelX *= damping;
-  accelY *= damping;
-
-  // change curve tightness
-  organicConstant = 1-((abs(accelX)+abs(accelY))*.1);
-
-  //move nodes
-  for (int i=0; i<nodes; i++){
-    nodeX[i] = nodeStartX[i]+sin(radians(angle[i]))*(accelX*2);
-    nodeY[i] = nodeStartY[i]+sin(radians(angle[i]))*(accelY*2);
-    angle[i]+=frequency[i];
-  }
-}
- - diff --git a/examples/topics/spore1.html b/examples/topics/spore1.html deleted file mode 100644 index 4d9f98fed..000000000 --- a/examples/topics/spore1.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - -

Processing.js

-

Spore1

- -

by Mike Davis. - -A short program for alife experiments. Click in the window to restart. -Each cell is represented by a pixel on the display as well as an entry in -the array 'cells'. Each cell has a run() method, which performs actions -based on the cell's surroundings. Cells run one at a time (to avoid conflicts -like wanting to move to the same space) and in random order.

- -

Original Processing.org Example: Spore1
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-World w;
-int numcells = 0;
-int maxcells = 4700;
-Cell[] cells = new Cell[maxcells];
-color spore_color;
-// set lower for smoother animation, higher for faster simulation
-int runs_per_loop = 100;
-color black = color(0, 0, 0);
-  
-void setup()
-{
-  size(200, 200);
-  frameRate(24);
-  clearscr();  
-  w = new World();
-  spore_color = color(172, 255, 128);
-  seed();
-}
-
-void seed() 
-{
-  // Add cells at random places
-  for (int i = 0; i < maxcells; i++)
-  {
-    int cX = (int)random(width);
-    int cY = (int)random(height);
-    if (w.getpix(cX, cY) == black)
-    {
-      w.setpix(cX, cY, spore_color);
-      cells[numcells] = new Cell(cX, cY);
-      numcells++;
-    }
-  }
-}
-
-void draw()
-{
-  // Run cells in random order
-  for (int i = 0; i < runs_per_loop; i++) {
-    int selected = min((int)random(numcells), numcells - 1);
-    cells[selected].run();
-  }
-}
-
-void clearscr()
-{
-  background(0);
-}
-
-class Cell
-{
-  int x, y;
-  Cell(int xin, int yin)
-  {
-    x = xin;
-    y = yin;
-  }
-
-    // Perform action based on surroundings
-  void run()
-  {
-    // Fix cell coordinates
-    while(x < 0) {
-      x+=width;
-    }
-    while(x > width - 1) {
-      x-=width;
-    }
-    while(y < 0) {
-      y+=height;
-    }
-    while(y > height - 1) {
-      y-=height;
-    }
-    
-    // Cell instructions
-    if (w.getpix(x + 1, y) == black) {
-      move(0, 1);
-    } else if (w.getpix(x, y - 1) != black && w.getpix(x, y + 1) != black) {
-      move((int)random(9) - 4, (int)random(9) - 4);
-    }
-  }
-  
-  // Will move the cell (dx, dy) units if that space is empty
-  void move(int dx, int dy) {
-    if (w.getpix(x + dx, y + dy) == black) {
-      w.setpix(x + dx, y + dy, w.getpix(x, y));
-      w.setpix(x, y, color(0));
-      x += dx;
-      y += dy;
-    }
-  }
-}
-
-//  The World class simply provides two functions, get and set, which access the
-//  display in the same way as getPixel and setPixel.  The only difference is that
-//  the World class's get and set do screen wraparound ("toroidal coordinates").
-class World
-{
-  void setpix(int x, int y, int c) {
-    while(x < 0) x+=width;
-    while(x > width - 1) x-=width;
-    while(y < 0) y+=height;
-    while(y > height - 1) y-=height;
-    set(x, y, c);
-  }
-  
-  color getpix(int x, int y) {
-    while(x < 0) x+=width;
-    while(x > width - 1) x-=width;
-    while(y < 0) y+=height;
-    while(y > height - 1) y-=height;
-    return get(x, y);
-  }
-}
-
-void mousePressed()
-{
-  numcells = 0;
-  setup();
-}
- - diff --git a/examples/topics/spore2.html b/examples/topics/spore2.html deleted file mode 100644 index eeb8f0dae..000000000 --- a/examples/topics/spore2.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - -

Processing.js

-

Spore2

- -

by Mike Davis. - -A short program for alife experiments. Click in the window to restart. -Each cell is represented by a pixel on the display as well as an entry in -the array 'cells'. Each cell has a run() method, which performs actions -based on the cell's surroundings. Cells run one at a time (to avoid conflicts -like wanting to move to the same space) and in random order.

- -

Original Processing.org Example: Spore2
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-World w;
-int maxcells = 4000;
-int numcells;
-Cell[] cells = new Cell[maxcells];
-color spore1, spore2, spore3, spore4;
-color black = color(0, 0, 0);
-// set lower for smoother animation, higher for faster simulation
-int runs_per_loop = 100;
-
-void setup()
-{
-  size(200, 200);
-  frameRate(24);
-  clearscr();
-  w = new World();
-  spore1 = color(128, 172, 255);
-  spore2 = color(64, 128, 255);
-  spore3 = color(255, 128, 172);
-  spore4 = color(255, 64, 128);
-  numcells = 0;
-  seed();
-}
-
-void seed()
-{
-  // Add cells at random places
-  for (int i = 0; i < maxcells; i++)
-  {
-    int cX = int(random(width));
-    int cY = int(random(height));
-    int c;
-    float r = random(1);
-    if (r < 0.25) c = spore1;
-    else if (r < 0.5) c = spore2;
-    else if (r < 0.75) c = spore3;
-    else c = spore4;
-    if (w.getpix(cX, cY) == black)
-    {
-      w.setpix(cX, cY, c);
-      cells[numcells] = new Cell(cX, cY);
-      numcells++;
-    }
-  }
-}
-
-void draw()
-{
-  // Run cells in random order
-  for (int i = 0; i < runs_per_loop; i++) {
-    int selected = min((int)random(numcells), numcells - 1);
-    cells[selected].run();
-  }
-}
-
-void clearscr()
-{
-  for (int y = 0; y < height; y++) {
-    for (int x = 0; x < width; x++) {
-      set(x, y, color(0));
-    }
-  }
-}
-
-class Cell
-{
-  int x, y;
-  Cell(int xin, int yin)
-  {
-    x = xin;
-    y = yin;
-  }
-  // Perform action based on surroundings
-  void run()
-  {
-    // Fix cell coordinates
-    while(x < 0) {
-      x+=width;
-    }
-    while(x > width - 1) {
-      x-=width;
-    }
-    while(y < 0) {
-      y+=height;
-    }
-    while(y > height - 1) {
-      y-=height;
-    }
-
-    // Cell instructions
-    int myColor = w.getpix(x, y);
-    if (myColor == spore1) {
-      if (w.getpix(x - 1, y + 1) == black && w.getpix(x + 1, y + 1) == black && w.getpix(x, y + 1) == black) move(0, 1);
-      else if (w.getpix(x - 1, y) == spore2 && w.getpix(x - 1, y - 1) != black) move(0, -1);
-      else if (w.getpix(x - 1, y) == spore2 && w.getpix(x - 1, y - 1) == black) move(-1, -1);
-      else if (w.getpix(x + 1, y) == spore1 && w.getpix(x + 1, y - 1) != black) move(0, -1);
-      else if (w.getpix(x + 1, y) == spore1 && w.getpix(x + 1, y - 1) == black) move(1, -1);
-      else move((int)random(3) - 1, 0);
-    } else if (myColor == spore2) {
-      if (w.getpix(x - 1, y + 1) == black && w.getpix(x + 1, y + 1) == black && w.getpix(x, y + 1) == black) move(0, 1);
-      else if (w.getpix(x + 1, y) == spore1 && w.getpix(x + 1, y - 1) != black) move(0, -1);
-      else if (w.getpix(x + 1, y) == spore1 && w.getpix(x + 1, y - 1) == black) move(1, -1);
-      else if (w.getpix(x - 1, y) == spore2 && w.getpix(x - 1, y - 1) != black) move(0, -1);
-      else if (w.getpix(x - 1, y) == spore2 && w.getpix(x - 1, y - 1) == black) move(-1, -1);
-      else move((int)random(3) - 1, 0);
-    }
-    else if (myColor == spore3)
-    {
-      if (w.getpix(x - 1, y - 1) == black && w.getpix(x + 1, y - 1) == black && w.getpix(x, y - 1) == black) move(0, -1);
-      else if (w.getpix(x - 1, y) == spore4 && w.getpix(x - 1, y + 1) != black) move(0, 1);
-      else if (w.getpix(x - 1, y) == spore4 && w.getpix(x - 1, y + 1) == black) move(-1, 1);
-      else if (w.getpix(x + 1, y) == spore3 && w.getpix(x + 1, y + 1) != black) move(0, 1);
-      else if (w.getpix(x + 1, y) == spore3 && w.getpix(x + 1, y + 1) == black) move(1, 1);
-      else move((int)random(3) - 1, 0);
-    }
-    else if (myColor == spore4)
-    {
-      if (w.getpix(x - 1, y - 1) == black && w.getpix(x + 1, y - 1) == black && w.getpix(x, y - 1) == black) move(0, -1);
-      else if (w.getpix(x + 1, y) == spore3 && w.getpix(x + 1, y + 1) != black) move(0, 1);
-      else if (w.getpix(x + 1, y) == spore3 && w.getpix(x + 1, y + 1) == black) move(1, 1);
-      else if (w.getpix(x - 1, y) == spore4 && w.getpix(x - 1, y + 1) != black) move(0, 1);
-      else if (w.getpix(x - 1, y) == spore4 && w.getpix(x - 1, y + 1) == black) move(-1, 1);
-      else move((int)random(3) - 1, 0);
-    }
-  }
-  
-  // Will move the cell (dx, dy) units if that space is empty
-  void move(int dx, int dy) {
-    if (w.getpix(x + dx, y + dy) == black) {
-      w.setpix(x + dx, y + dy, w.getpix(x, y));
-      w.setpix(x, y, color(0));
-      x += dx;
-      y += dy;
-    }
-  }
-}
-
-//  The World class simply provides two functions, get and set, which access the
-//  display in the same way as getPixel and setPixel.  The only difference is that
-//  the World class's get and set do screen wraparound ("toroidal coordinates").
-class World
-{
-  void setpix(int x, int y, int c) {
-    while(x < 0) x+=width;
-    while(x > width - 1) x-=width;
-    while(y < 0) y+=height;
-    while(y > height - 1) y-=height;
-    set(x, y, c);
-  }
-  
-  color getpix(int x, int y) {
-    while(x < 0) x+=width;
-    while(x > width - 1) x-=width;
-    while(y < 0) y+=height;
-    while(y > height - 1) y-=height;
-    return get(x, y);
-  }
-}
-
-void mousePressed()
-{
-  setup();
-}
- - diff --git a/examples/topics/spring.html b/examples/topics/spring.html deleted file mode 100644 index fb6137aeb..000000000 --- a/examples/topics/spring.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - -

Processing.js

-

Spring

- -

Click, drag, and release the horizontal bar to start the spring.

- -

Original Processing.org Example: Spring
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-// Spring drawing constants for top bar
-int s_height = 16;     // Height
-int left = 50;         // Left position
-int right = 150;       // Right position
-int max = 100;         // Maximum Y value
-int min = 20;          // Minimum Y value
-boolean over = false;  // If mouse over
-boolean move = false;  // If mouse down and over
-
-// Spring simulation constants
-float M = 0.8;   // Mass
-float K = 0.2;   // Spring constant
-float D = 0.92;  // Damping
-float R = 60;    // Rest position
-
-// Spring simulation variables
-float ps = 60.0; // Position
-float vs = 0.0;  // Velocity
-float as = 0;    // Acceleration
-float f = 0;     // Force
-
-
-void setup() 
-{
-  size(200, 200);
-  rectMode(CORNERS);
-  noStroke();
-}
-
-void draw() 
-{
-  background(102);
-  updateSpring();
-  drawSpring();
-}
-
-void drawSpring() 
-{
-  // Draw base
-  fill(0.2);
-  float b_width = 0.5 * ps + -8;
-  rect(width/2 - b_width, ps + s_height, width/2 + b_width, 150);
-
-  // Set color and draw top bar
-  if(over || move) { 
-    fill(255);
-  } else { 
-    fill(204);
-  }
-  rect(left, ps, right, ps + s_height);
-}
-
-
-void updateSpring()
-{
-  // Update the spring position
-  if(!move) {
-    f = -K * (ps - R);    // f=-ky
-    as = f / M;           // Set the acceleration, f=ma == a=f/m
-    vs = D * (vs + as);   // Set the velocity
-    ps = ps + vs;         // Updated position
-  }
-  if(abs(vs) < 0.1) {
-    vs = 0.0;
-  }
-
-  // Test if mouse is over the top bar
-  if(mouseX > left && mouseX < right && mouseY > ps && mouseY < ps + s_height) {
-    over = true;
-  } else {
-    over = false;
-  }
-  
-  // Set and constrain the position of top bar
-  if(move) {
-    ps = mouseY - s_height/2;
-    if (ps < min) { ps = min; } 
-    if (ps > max) { ps = max; }
-  }
-}
-
-void mousePressed() {
-  if(over) {
-    move = true;
-  }
-}
-
-void mouseReleased()
-{
-  move = false;
-}
- - diff --git a/examples/topics/springs.html b/examples/topics/springs.html deleted file mode 100644 index 6fe0c5760..000000000 --- a/examples/topics/springs.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - -

Processing.js

-

Springs

- -

Move the mouse over one of the circles and click to re-position. -When you release the mouse, it will snap back into position. -Each circle has a slightly different behavior.

- -

Original Processing.org Example: Springs
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int num = 3; 
-Spring[] springs = new Spring[num]; 
-
-void setup()
-{
-  size(200, 200);
-  noStroke(); 
-  smooth();
-  springs[0] = new Spring( 70, 160,  20, 0.98, 8.0, 0.1, springs, 0); 
-  springs[1] = new Spring(150, 110,  60, 0.95, 9.0, 0.1, springs, 1); 
-  springs[2] = new Spring( 40,  70, 120, 0.90, 9.9, 0.1, springs, 2);   
-}
-
-void draw() 
-{
-  background(51); 
-  
-  for (int i=0; i<num; i++) { 
-    springs[i].update(); 
-    springs[i].display(); 
-  }  
-}
-
-void mousePressed() 
-{
-  for (int i=0; i<num; i++) { 
-    springs[i].pressed(); 
-  } 
-}
-
-void mouseReleased() 
-{
-  for (int i=0; i<num; i++) { 
-    springs[i].released(); 
-  } 
-}
-
-class Spring 
-{ 
-  // Screen values 
-  float xpos, ypos;
-  float tempxpos, tempypos; 
-  int size = 20; 
-  boolean isOver = false; 
-  boolean move = false; 
-
-  // Spring simulation constants 
-  float mass;       // Mass 
-  float k = 0.2;    // Spring constant 
-  float damp;       // Damping 
-  float rest_posx;  // Rest position X 
-  float rest_posy;  // Rest position Y 
-
-  // Spring simulation variables 
-  //float pos = 20.0; // Position 
-  float velx = 0.0;   // X Velocity 
-  float vely = 0.0;   // Y Velocity 
-  float accel = 0;    // Acceleration 
-  float force = 0;    // Force 
-
-  Spring[] friends;
-  int me;
-  
-  // Constructor
-  Spring(float x, float y, int s, float d, float m, 
-         float k_in, Spring[] others, int id) 
-  { 
-    xpos = tempxpos = x; 
-    ypos = tempypos = y;
-    rest_posx = x;
-    rest_posy = y;
-    size = s;
-    damp = d; 
-    mass = m; 
-    k = k_in;
-    friends = others;
-    me = id; 
-  } 
-
-  void update() 
-  { 
-    if (move) { 
-      rest_posy = mouseY; 
-      rest_posx = mouseX;
-    } 
-
-    force = -k * (tempypos - rest_posy);  // f=-ky 
-    accel = force / mass;                 // Set the acceleration, f=ma == a=f/m 
-    vely = damp * (vely + accel);         // Set the velocity 
-    tempypos = tempypos + vely;           // Updated position 
-
-    force = -k * (tempxpos - rest_posx);  // f=-ky 
-    accel = force / mass;                 // Set the acceleration, f=ma == a=f/m 
-    velx = damp * (velx + accel);         // Set the velocity 
-    tempxpos = tempxpos + velx;           // Updated position 
-
-    
-    if ((over() || move) && !otherOver() ) { 
-      isOver = true; 
-    } else { 
-      isOver = false; 
-    } 
-  } 
-  
-  // Test to see if mouse is over this spring
-  boolean over() {
-    float disX = tempxpos - mouseX;
-    float disY = tempypos - mouseY;
-    if (sqrt(sq(disX) + sq(disY)) < size/2 ) {
-      return true;
-    } else {
-      return false;
-    }
-  }
-  
-  // Make sure no other springs are active
-  boolean otherOver() {
-    for (int i=0; i<num; i++) {
-      if (i != me) {
-        if (friends[i].isOver == true) {
-          return true;
-        }
-      }
-    }
-    return false;
-  }
-
-  void display() 
-  { 
-    if (isOver) { 
-      fill(153); 
-    } else { 
-      fill(255); 
-    } 
-    ellipse(tempxpos, tempypos, size, size);
-  } 
-
-  void pressed() 
-  { 
-    if (isOver) { 
-      move = true; 
-    } else { 
-      move = false; 
-    }  
-  } 
-
-  void released() 
-  { 
-    move = false; 
-    rest_posx = xpos;
-    rest_posy = ypos;
-  } 
-}
- - diff --git a/examples/topics/tickle.html b/examples/topics/tickle.html deleted file mode 100644 index 24bdd0e33..000000000 --- a/examples/topics/tickle.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - -

Processing.js

-

Tickle

- -

The word "tickle" jitters when the cursor hovers over. -Sometimes, it can be tickled off the screen.

- -

Original Processing.org Example: Tickle
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-PFont font;
-float x = 33; // X-coordinate of text
-float y = 60; // Y-coordinate of text
-
-void setup() 
-{
-  size(200, 200);
-  font = loadFont("AmericanTypewriter-24.vlw");
-  textFont(font);
-  noStroke();
-}
-
-void draw() 
-{
-  fill(204, 120);
-  rect(0, 0, width, height);
-  fill(0);
-  // If the cursor is over the text, change the position
-  if ((mouseX >= x) && (mouseX <= x+55) &&
-    (mouseY >= y-24) && (mouseY <= y)) {
-    x += random(-5, 5);
-    y += random(-5, 5);
-  }
-  text("tickle", x, y);
-}
- - diff --git a/examples/topics/tileimages.html b/examples/topics/tileimages.html deleted file mode 100644 index c25bf1948..000000000 --- a/examples/topics/tileimages.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - -

Processing.js

-

TileImages

- -

Draws an image larger than the screen by tiling it into small sections. -The scaleValue variable sets amount of scaling: 1 is 100%, 2 is 200%, etc.

- -

Original Processing.org Example: TileImages
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-int scaleValue = 3;  // Multiplication factor
-int xoffset = 0;     // x-axis offset
-int yoffset = 0;     // y-axis offset
-
-void setup() 
-{
-  size(600, 600);
-  stroke(0, 100);
-}
-
-void draw() 
-{
-  scale(scaleValue);
-  translate(xoffset *(-width / scaleValue), yoffset *(-height / scaleValue));
-  line(10, 150, 500, 50);
-  line(0, 600, 600, 0);
-  setOffset();
-}
-
-void setOffset() 
-{
-  save("lines-" + xoffset + "-" + yoffset + ".jpg");
-  xoffset++;
-  if (xoffset == scaleValue) {
-    xoffset = 0;
-    yoffset++;
-    if (yoffset == scaleValue) {
-      exit();
-    }
-  }
-  background(204);
-}
- - diff --git a/examples/topics/tree.html b/examples/topics/tree.html deleted file mode 100644 index 5671a942e..000000000 --- a/examples/topics/tree.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - -

Processing.js

-

Tree

- -

by Daniel Shiffman. - -Renders a simple tree-like structure via recursion -Branching angle calculated as a function of horizontal mouse location

- -

Original Processing.org Example: Tree
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-float theta;   
-void setup() {
-  size(200,200);
-  smooth();
-}
-
-void draw() {
-  background(0);
-  frameRate(30);
-  stroke(255);
-  // Let's pick an angle 0 to 90 degrees based on the mouse position
-  float a = (mouseX / (float) width) * 90f;
-  // Convert it to radians
-  theta = radians(a);
-  // Start the tree from the bottom of the screen
-  translate(width/2,height);
-  // Draw a line 60 pixels
-  line(0,0,0,-60);
-  // Move to the end of that line
-  translate(0,-60);
-  // Start the recursive branching!
-  branch(60);
-
-}
-
-void branch(float h) {
-  // Each branch will be 2/3rds the size of the previous one
-  h *= 0.66f;
-  
-  // All recursive functions must have an exit condition!!!!
-  // Here, ours is when the length of the branch is 2 pixels or less
-  if (h > 2) {
-    pushMatrix();    // Save the current state of transformation (i.e. where are we now)
-    rotate(theta);   // Rotate by theta
-    line(0,0,0,-h);  // Draw the branch
-    translate(0,-h); // Move to the end of the branch
-    branch(h);       // Ok, now call myself to draw two new branches!!
-    popMatrix();     // Whenever we get back here, we "pop" in order to restore the previous matrix state
-    
-    // Repeat the same thing, only branch off to the "left" this time!
-    pushMatrix();
-    rotate(-theta);
-    line(0,0,0,-h);
-    translate(0,-h);
-    branch(h);
-    popMatrix();
-  }
-}
- - diff --git a/examples/topics/wolfram.html b/examples/topics/wolfram.html deleted file mode 100644 index dce2a4950..000000000 --- a/examples/topics/wolfram.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - -

Processing.js

-

Wolfram

- -

by Daniel Shiffman. - -Simple demonstration of a Wolfram 1-dimensional cellular automata -When the system reaches bottom of the window, it restarts with a new ruleset -Mouse click restarts as well.

- -

Original Processing.org Example: Wolfram
-

-
- -
// All Examples Written by Casey Reas and Ben Fry
-// unless otherwise stated.
-CA ca;   // An instance object to describe the Wolfram basic Cellular Automata
-
-void setup() {
-  size(200,200);
-  frameRate(30);
-  background(0);
-  int[] ruleset = {0,1,0,1,1,0,1,0};    // An initial rule system
-  ca = new CA(ruleset);                 // Initialize CA
-}
-
-void draw() {
-  ca.render();    // Draw the CA
-  ca.generate();  // Generate the next level
-  
-  if (ca.finished()) {   // If we're done, clear the screen, pick a new ruleset and restart
-    background(0);
-    ca.randomize();
-    ca.restart();
-  }
-}
-
-void mousePressed() {
-  background(0);
-  ca.randomize();
-  ca.restart();
-}
-
-
-class CA {
-
-  int[] cells;     // An array of 0s and 1s 
-  int generation;  // How many generations?
-  int scl;         // How many pixels wide/high is each cell?
-
-  int[] rules;     // An array to store the ruleset, for example {0,1,1,0,1,1,0,1}
-
-  CA(int[] r) {
-    rules = r;
-    scl = 1;
-    cells = new int[width/scl];
-    restart();
-  }
-  
-   CA() {
-    scl = 1;
-    cells = new int[width/scl];
-    randomize();
-    restart();
-  }
-  
-  // Set the rules of the CA
-  void setRules(int[] r) {
-    rules = r;
-  }
-  
-  // Make a random ruleset
-  void randomize() {
-    for (int i = 0; i < 8; i++) {
-      rules[i] = int(random(2));
-    }
-  }
-  
-  // Reset to generation 0
-  void restart() {
-    for (int i = 0; i < cells.length; i++) {
-      cells[i] = 0;
-    }
-    cells[cells.length/2] = 1;    // We arbitrarily start with just the middle cell having a state of "1"
-    generation = 0;
-  }
-
-  // The process of creating the new generation
-  void generate() {
-    // First we create an empty array for the new values
-    int[] nextgen = new int[cells.length];
-    // For every spot, determine new state by examing current state, and neighbor states
-    // Ignore edges that only have one neighor
-    for (int i = 1; i < cells.length-1; i++) {
-      int left = cells[i-1];   // Left neighbor state
-      int me = cells[i];       // Current state
-      int right = cells[i+1];  // Right neighbor state
-      nextgen[i] = rules(left,me,right); // Compute next generation state based on ruleset
-    }
-    // Copy the array into current value
-    cells = (int[]) nextgen.clone();
-    generation++;
-  }
-  
-  // This is the easy part, just draw the cells, fill 255 for '1', fill 0 for '0'
-  void render() {
-    for (int i = 0; i < cells.length; i++) {
-      if (cells[i] == 1) fill(255);
-      else               fill(0);
-      noStroke();
-      rect(i*scl,generation*scl, scl,scl);
-    }
-  }
-  
-  // Implementing the Wolfram rules
-  // Could be improved and made more concise, but here we can explicitly see what is going on for each case
-  int rules (int a, int b, int c) {
-    if (a == 1 && b == 1 && c == 1) return rules[0];
-    if (a == 1 && b == 1 && c == 0) return rules[1];
-    if (a == 1 && b == 0 && c == 1) return rules[2];
-    if (a == 1 && b == 0 && c == 0) return rules[3];
-    if (a == 0 && b == 1 && c == 1) return rules[4];
-    if (a == 0 && b == 1 && c == 0) return rules[5];
-    if (a == 0 && b == 0 && c == 1) return rules[6];
-    if (a == 0 && b == 0 && c == 0) return rules[7];
-    return 0;
-  }
-  
-  // The CA is done if it reaches the bottom of the screen
-  boolean finished() {
-    if (generation > height/scl) {
-       return true;
-    } else {
-       return false;
-    }
-  }
-}
- - diff --git a/fonts/Biotyp.svg b/fonts/Biotyp.svg deleted file mode 100644 index 6b4508447..000000000 --- a/fonts/Biotyp.svg +++ /dev/null @@ -1,855 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Browser.js b/lib/Browser.js new file mode 100755 index 000000000..e8ec2b347 --- /dev/null +++ b/lib/Browser.js @@ -0,0 +1,906 @@ +/** + + Custom browser faking object for code-validation + in automated test settings. + +**/ + +module.exports = (function fakeBrowser() { + // Processing works with a canvas and the DOM, fake it. + // This is enough of the DOM to allow the parser work. + var __empty_func__ = function () {}; + var __elem_func__ = function() { return elem; }; + + var navigator = { useragent: true }; + + // generic HTML element + var createElement = function(tag) { + return { + localName: tag, + style: {}, + setAttribute: __empty_func__, + appendChild: __empty_func__, + classList: { + add: __empty_func__, + remove: __empty_func__, + contains: __empty_func__ + } + }; + }; + + var HTMLCanvasElement = function() {}; + + // HTML canvas element + var Canvas = function() { + this.attachEvent = __empty_func__; + this.addEventListener = __empty_func__; + this.appendChild = __elem_func__; + this.removeChild = __empty_func__; + this.childNodes = { length: 0 }; + this.toDataURL = __empty_func__; + this.localName = "canvas"; + this.width = 100; + this.height = 100; + this.getContext = function() { + return { + translate: __empty_func__, + attachEvent: __empty_func__, + fillRect: __empty_func__, + strokeRect: __empty_func__, + fillText: __empty_func__, + measureText: function() { return {width:1}; }, + clearRect: __empty_func__, + beginPath: __empty_func__, + moveTo: __empty_func__, + lineTo: __empty_func__, + rect: __empty_func__, + save: __empty_func__, + stroke: __empty_func__, + fill: __empty_func__, + rotate: __empty_func__, + closePath: __empty_func__, + arc: __empty_func__, + scale: __empty_func__, + restore: __empty_func__, + bezierCurveTo: __empty_func__, + viewport: __empty_func__, + clearColor: __empty_func__, + clear: __empty_func__, + enable: __empty_func__, + createShader: __empty_func__, + shaderSource: __empty_func__, + compileShader: __empty_func__, + getShaderParameter: function() { return true; }, + getShaderInfoLog: __empty_func__, + createProgram: __empty_func__, + attachShader: __empty_func__, + linkProgram: __empty_func__, + getProgramParameter: function() { return true; }, + useProgram: __empty_func__, + createBuffer: __empty_func__, + bindBuffer: __empty_func__, + bufferData: __empty_func__, + blendFunc: __empty_func__, + getAttribLocation: __empty_func__, + vertexAttribPointer: __empty_func__, + enableVertexAttribArray: __empty_func__, + getUniformLocation: __empty_func__, + uniform1f: __empty_func__, + uniform2f: __empty_func__, + uniform3f: __empty_func__, + uniform4f: __empty_func__, + uniformfv: __empty_func__, + uniform2fv: __empty_func__, + uniform3fv: __empty_func__, + uniform1i: __empty_func__, + uniform2i: __empty_func__, + uniform3i: __empty_func__, + uniform4i: __empty_func__, + getImageData: function() { return {width:1, height:1, data:[1,2,3,4]}; }, + createImageData: function() { return {width:1, height:1, data:[1,2,3,4]}; }, + drawImage: __empty_func__, + drawElements: __empty_func__, + putImageData: __empty_func__, + lineWidth: __empty_func__, + disable: __empty_func__, + drawArrays: __empty_func__, + polygonOffset: __empty_func__, + createTexture: __empty_func__, + texImage2D: __empty_func__, + texParameteri: __empty_func__, + generateMipmap: __empty_func__, + uniformMatrix4fv: __empty_func__, + uniform4fv: __empty_func__, + disableVertexAttribArray: __empty_func__, + bindTexture: __empty_func__, + setTransform: __empty_func__ + }; + }; + this.style = { + setProperty: __empty_func__ + }; + this.__attributes = { "data-processing-sources" : "test.pjs" }; + this.hasAttribute = function(name) { return this.__attributes.hasOwnProperty(name.toLowerCase()); }; + this.getAttribute = function(name) { return this.__attributes[name.toLowerCase()]; }; + this.setAttribute = function(name, value) { this.__attributes[name.toLowerCase()] = value; }; + }; + Canvas.prototype = new HTMLCanvasElement(); + + var canvas = new Canvas(); + + var HTMLImageElement = __empty_func__; + + var document = { + fake: true, + attachEvent: __empty_func__, + head: { + appendChild: __elem_func__, + removeChild: __empty_func__ + }, + body: { + appendChild: __elem_func__, + removeChild: __empty_func__, + style: { + cursor: {} + } + }, + querySelector: function(selector) { + return createElement(selector); + }, + defaultView: { + getComputedStyle: function() { + return { getPropertyValue: function() { return ""; } }; + } + }, + appendChild: __elem_func__, + removeChild: __empty_func__, + getElementById: __empty_func__, + getElementsByTagName: function() { return [canvas]; }, + createElement: function (tag) { + if (tag === "canvas") return new Canvas(); + return createElement(tag); + }, + addEventListener: __empty_func__, + documentElement: { + appendChild: __elem_func__, + removeChild: __empty_func__, + style: { + paddingBottom: 0 + }, + insertBefore: __empty_func__ + }, + createTextNode: __empty_func__ + }; + + var elem = { + appendChild: __elem_func__, + removeChild: __empty_func__, + style: {} + }; + + var addEventListener = __empty_func__; + var XMLHttpRequest = __empty_func__; + var setInterval = __empty_func__; + var clearInterval = __empty_func__; + + var Image = __empty_func__; + + var localStorage = __empty_func__; + + // The XML parser is designed only for parsing of + // simple XML documents (for unit testing purpose). + function DOMParser() { + // parser + function parseXml(s, sink) { + var i = 0, scopes = [{ + space: "default", + xmlns: "", + namespaces: { + "xmlns":"http://www.w3.org/2000/xmlns/", + "xml":"http://www.w3.org/XML/1998/namespace" + } + }]; + + function unSelfClose(s) { + // This code is actually not good at parsing self-closed elements, + // so as a preprocess step we "open" self closed elements. + return s.replace(/<([a-zA-Z-_]+)[^\/>]*\/>/g, function(a,b) { + if(a==="undefined" && b==="undefined") return ''; + return a.replace(/\s*\/>/, ">"); + }); + } + + function trim(s) { + return s.replace(/^\s+/, "").replace(/\s+$/, ""); + } + + function resolveEntities(s) { + return s.replace(/&([^;]+);/g, function(all, entity) { + if (entity.substring(0, 2) === "#x") { + return String.fromCharCode(parseInt(entity.substring(2), 16)); + } else if(entity.substring(0,1) === "#") { + return String.fromCharCode(parseInt(entity.substring(1), 10)); + } + switch (entity) { + case "lt": return "<"; + case "gt": return ">"; + case "amp": return "&"; + } + throw "Unknown entity: " + entity; + }); + } + + function isWhitespacePreserved() { + for (var j = scopes.length - 1; j >= 0; --j) { + if (scopes[j].space === "preserve") { + return true; + } + } + return false; + } + + function lookupDefaultNs() { + for (var j = scopes.length - 1; j >= 0; --j) { + if (scopes[j].hasOwnProperty("xmlns")) { + return scopes[j].xmlns; + } + } + } + + function lookupNs(prefix) { + for (var j = scopes.length - 1; j >= 0; --j) { + if (scopes[j].namespaces.hasOwnProperty(prefix)) { + return scopes[j].namespaces[prefix]; + } + } + throw "Unknow namespace: " + prefix; + } + + function getName(name, resolveDefaultNs) { + var j = name.indexOf(":"); + if (j >= 0) { + return {name:name.substring(j + 1), prefix: name.substring(0,j), namespace: lookupNs(name.substring(0,j))}; + } else if(resolveDefaultNs) { + return {name:name, prefix: "", namespace: lookupDefaultNs()}; + } else { + return {name:name, prefix: "", namespace: ""}; + } + } + + function isWhitespace(s, index) { + var ch = s.charCodeAt(index); + return ch == 10 || ch == 13 || ch == 9 || ch == 32; + } + + function parseContent(s, start) { + var pos = start, name, attributes = []; + function skipWs() { + while (pos < s.length && isWhitespace(s, pos)) { + ++pos; + } + } + while (pos < s.length && !isWhitespace(s, pos) && s.charAt(pos) !== ">") { + ++pos; + } + name = s.substring(start, pos); + skipWs(); + while (pos < s.length && s.charAt(pos) !== ">" && + s.charAt(pos) !== "/" && s.charAt(pos) !== "?") { + skipWs(); + var attrName = "", attrValue = ""; + while (pos < s.length && !isWhitespace(s, pos) && s.charAt(pos) !== "=") { + attrName += s.charAt(pos); + ++pos; + } + skipWs(); + if (s.charAt(pos) !== "=") throw "'=' expected"; + ++pos; + skipWs(); + var attrEndChar = s.charAt(pos); + if (attrEndChar !== "\"" && attrEndChar !== "\'" ) throw "Quote expected"; + var attrEndIndex = s.indexOf(attrEndChar, ++pos); + if (attrEndIndex < 0) throw "Unexpected EOF[6]"; + attrValue = s.substring(pos, attrEndIndex); + attributes.push({name: attrName, value: resolveEntities(attrValue)}); + pos = attrEndIndex + 1; + skipWs(); + } + return {name: name, attributes: attributes, parsed: pos - start}; + } + + // ================================== + // The actual XML parsing starts here + // ================================== + + s = unSelfClose(s); + while (i < s.length) { + var ch = s.charAt(i); + var j = i; + var content; + if (ch === "<") { + ++j; + var ch2 = s.charAt(j), q, name; + switch (ch2) { + case "/": + ++j; + q = s.indexOf(">", j); if(q < 0) { throw "Unexpected EOF[1]"; } + name = getName(s.substring(j,q), true); + sink.endElement(name); + scopes.pop(); + j = q + 1; + break; + case "?": + ++j; + content = parseContent(s, j); + if (s.substring(j + content.parsed, j + content.parsed + 2) != "?>") { + throw "Unexpected EOF[2]"; + } + sink.pi(content.name, content.attributes); + j += content.parsed + 2; + break; + case "!": + if (s.substring(j + 1, j + 3) === "--") { + q = s.indexOf("-->", j + 3); if(q < 0) { throw "Unexpected EOF[3]"; } + sink.comment(s.substring(j + 3, q)); + j = q + 3; + } else if (s.substring(j + 1, j + 8) === "[CDATA[") { + q = s.indexOf("]]>", j + 8); if(q < 0) { throw "Unexpected EOF[4]"; } + sink.cdata(s.substring(j + 8, q)); + j = q + 3; + } else if (s.substring(j + 1, j + 8) === "DOCTYPE") { + var q2 = s.indexOf("[", j + 8), complexDoctype = false; + q = s.indexOf(">", j + 8); if(q < 0) { throw "Unexpected EOF[5]"; } + if (q2 > 0 && q > q2) { + q = s.indexOf("]>", j + 8); if(q < 0) { throw "Unexpected EOF[7]"; } + complexDoctype = true; + } + var doctypeContent = s.substring(j + 8, q + (complexDoctype ? 1 : 0)); + sink.doctype(doctypeContent); + // XXX pull entities ? + j = q + (complexDoctype ? 2 : 1); + } else { + throw "Unknown !tag"; + } + break; + default: + content = parseContent(s, j); + var isClosed = false; + if (s.substring(j + content.parsed, j + content.parsed + 2) === "/>") { + isClosed = true; + } else if (s.substring(j + content.parsed, j + content.parsed + 1) !== ">") { + throw "Unexpected EOF[2]"; + } + var scope = {namespaces:[]}; + for (q = 0; q < content.attributes.length; ++q) { + if (content.attributes[q].name.substring(0, 6) === "xmlns:") { + scope.namespaces[content.attributes[q].name.substring(6)] = trim(content.attributes[q].value); + } else if (content.attributes[q].name === "xmlns") { + scope.xmlns = trim(content.attributes[q].value); + } else if (content.attributes[q].name.substring(0, 4) === "xml:") { + scope[content.attributes[q].name.substring(4)] = trim(content.attributes[q].value); + } else if (content.attributes[q].name.substring(0, 3) === "xml") { + throw "Invalid xml attribute"; + } + } + scopes.push(scope); + var attributes = []; + for (q = 0; q < content.attributes.length; ++q) { + attributes.push({name: getName(content.attributes[q].name, false), value: content.attributes[q].value}); + } + sink.beginElement(getName(content.name, true), attributes, isClosed); + j += content.parsed + (isClosed ? 2 : 1); + if (isClosed) scopes.pop(); + break; + } + } else { + do { + if (++j >= s.length) break; + } while(s.charAt(j) !== "<"); + var text = s.substring(i, j); + var isWs = text.replace(/^\s+/, "").length === 0; + if (!isWs || isWhitespacePreserved()) { + sink.text(resolveEntities(text), isWs); + } + } + i = j; + } + } + // end of parser + + var implementation = this; + + function NodeList(init) { + var nodes = []; + if (init) { + nodes = nodes.concat(init); + } + nodes.item = function(index) { return nodes[index]; }; + return nodes; + } + function NamedNodeMap(owner) { + var nodes = []; + nodes.item = function(index) { return nodes[index]; }; + nodes.getNamedItem = function(name) { + for (var i = 0; i < nodes.length; ++i) { + if (nodes[i].name === name) return nodes[i]; + } + return null; + }; + nodes.setNamedItem = function(arg) { + for (var i = 0; i < nodes.length; ++i) { + if (nodes[i].name === arg.name) { + var old = nodes[i]; + nodes[i] = arg; + old.ownerElement = null; + return old; + } + } + arg.ownerElement = owner; + nodes.push(arg); + return null; + }; + nodes.removeNamedItem = function(name) { + for (var i = 0; i < nodes.length; ++i) { + if (nodes[i].name === name) { + var old = nodes[i]; + nodes.splice(i, 1); + old.ownerElement = null; + return old; + } + } + return null; + }; + nodes.getNamedItemNS = function(namespaceURI, localName) { + for (var i = 0; i < nodes.length; ++i) { + if (nodes[i].localName === localName && + nodes[i].namespaceURI === namespaceURI) return nodes[i]; + } + return null; + }; + nodes.setNamedItemNS = function(arg) { + for (var i = 0; i < nodes.length; ++i) { + if (nodes[i].localName === arg.localName && + nodes[i].namespaceURI === arg.namespaceURI) { + var old = nodes[i]; + nodes[i] = arg; + old.ownerElement = null; + return old; + } + } + arg.ownerElement = owner; + nodes.push(arg); + return null; + }; + nodes.removeNamedItemNS = function(namespaceURI, localName) { + for (var i = 0; i < nodes.length; ++i) { + if (nodes[i].localName === localName && + nodes[i].namespaceURI === namespaceURI) { + var old = nodes[i]; + nodes.splice(i, 1); + old.ownerElement = null; + return old; + } + } + return null; + }; + return nodes; + } + function Node() { + this.childNodes = new NodeList(); + } + Node.ELEMENT_NODE = 1; + Node.ATTRIBUTE_NODE = 2; + Node.TEXT_NODE = 3; + Node.CDATA_SECTION_NODE = 4; + Node.ENTITY_REFERENCE_NODE = 5; + Node.ENTITY_NODE = 6; + Node.PROCESSING_INSTRUCTION_NODE = 7; + Node.COMMENT_NODE = 8; + Node.DOCUMENT_NODE = 9; + Node.DOCUMENT_TYPE_NODE = 10; + Node.DOCUMENT_FRAGMENT_NODE = 11; + Node.NOTATION_NODE = 12; + Node.prototype.nodeName = null; + Node.prototype.nodeValue = null; + Node.prototype.nodeType = 0; + Node.prototype.parentNode = null; + //Node.prototype.childNodes = []; + Node.prototype.firstChild = null; + Node.prototype.lastChild = null; + Node.prototype.previousSibling = null; + Node.prototype.nextSibling = null; + Node.prototype.ownerDocument = null; + Node.prototype.attributes = null; + Node.prototype.onChildNodesChanged = function() {}; + // XXX newChild in tree remove first + // XXX document fragment + Node.prototype.insertBefore = function(newChild, refChild) { + if (!refChild) { + return this.appendChild(newChild); + } + var i = 0; + while (i < this.childNodes.length && this.childNodes[i] != refChild) { + ++i; + } + if (!this.childNodes[i]) throw "Ref child not found"; + newChild.parentNode = this; + newChild.previousSibling = refChild.previousSibling; + if (newChild.previousSibling) newChild.previousSibling.nextSibling = newChild; + newChild.nextSibling = refChild; + refChild.previousSibling = newChild; + if (this.firstChild == refChild) this.firstChild = newChild; + this.childNodes.splice(i,0,newChild); + this.onChildNodesChanged(); + return newChild; + }; + Node.prototype.replaceChild = function(newChild, oldChild) { + var i = 0; + while (i < this.childNodes.length && this.childNodes[i] != oldChild) { + ++i; + } + if (!this.childNodes[i]) throw "Old child not found"; + newChild.parentNode = this; + newChild.previousSibling = oldChild.previousSibling; + if (newChild.previousSibling) newChild.previousSibling.nextSibling = newChild; + newChild.nextSibling = oldChild.nextSibling; + if (newChild.nextSibling) newChild.nextSibling.previousSibling = newChild; + oldChild.parentNode = null; + oldChild.previousSibling = null; + oldChild.nextSibling = null; + if (this.lastChild == oldChild) this.lastChild = newChild; + if (this.firstChild == oldChild) this.firstChild = newChild; + this.childNodes[i] = newChild; + this.onChildNodesChanged(); + return oldChild; + }; + Node.prototype.removeChild = function(oldChild) { + var i = 0; + while (i < this.childNodes.length && this.childNodes[i] != oldChild) { + ++i; + } + if (!this.childNodes[i]) throw "Old child not found"; + if (this.lastChild == oldChild) this.lastChild = oldChild.previousSibling; + if (this.firstChild == oldChild) this.firstChild = oldChild.nextSibling; + if (oldChild.nextSibling) oldChild.nextSibling.previousSibling = oldChild.previousSibling; + if (oldChild.previousSibling) oldChild.previousSibling.nextSibling = oldChild.nextSibling; + oldChild.parentNode = null; + oldChild.previousSibling = null; + oldChild.nextSibling = null; + this.childNodes.splice(i, 1); + this.onChildNodesChanged(); + return oldChild; + }; + Node.prototype.appendChild = function(newChild) { + newChild.parentNode = this; + var lastChild = this.lastChild; + if (lastChild) { + newChild.nextSibling = lastChild.nextSibling; + if (newChild.nextSibling) newChild.nextSibling.previousSibling = newChild; + newChild.previousSibling = lastChild; + lastChild.nextSibling = newChild; + } else { + this.firstChild = newChild; + newChild.previousSibling = null; + newChild.nextSibling = null; + } + this.lastChild = newChild; + this.childNodes.push(newChild); + this.onChildNodesChanged(); + return newChild; + }; + Node.prototype.hasChildNodes = function() { + return this.childNodes.length > 0; + }; + Node.prototype.cloneNode = function(deep) { + throw "Not implemented"; + }; + Node.prototype.normalize = function() { + var lastWasText = false; + for (var i = 0; i < this.childNodes.length; ++i) { + if (this.childNodes[i].nodeType == Node.ELEMENT_NODE) { + this.childNodes[i].normalize(); + } + if (this.childNodes[i].nodeType == Node.TEXT_NODE) { + if (lastWasText) { + this.childNodes[i - 1].appendData(this.childNodes[i].data); + this.removeChild(this.childNodes[i]); + --i; + } + lastWasText = true; + } else { + lastWasText = false; + } + } + }; + Node.prototype.isSupported = function(feature, version) { + return false; + }; + Node.prototype.namespaceURI = null; + Node.prototype.prefix = null; + Node.prototype.localName = null; + Node.prototype.hasAttributes = function() { + return this.attributes.length > 0; + }; + + Node.prototype.textContent = ""; + + function Document() { + var node = new Node(); + node.nodeType = Node.DOCUMENT_NODE; + node.doctype = null; + node.implementation = implementation; + node.documentElement = null; + node.createElement = function(tagName) { + return node.createElementNS("", tagName); + }; + node.createTextNode = function(data, nodeTypeOverride) { + var text = new Node(); + text.nodeType = (nodeTypeOverride ? nodeTypeOverride : Node.TEXT_NODE); + text.ownerDocument = node; + text.nodeValue = data; + Object.defineProperty(text, "data", { + get: function() { return this.nodeValue; }, + set: function(value) { this.nodeValue = value; }, + enumerable: true + }); + + text.data = data; + text.length = data.length; + text.appendData = function(arg) { + this.nodeValue += arg; + }; + + Object.defineProperty(text, "textContent", { + get: function() { return this.nodeValue; }, + enumerable: true + }); + // TODO appendData, substringData, etc. + return text; + }; + node.createCDATASection = function(data) { + return this.createTextNode(data, Node.CDATA_SECTION_NODE); + }; + node.createAttribute = function(name) { + return node.createAttributeNS("", name); + }; + node.getElementsByTagName = function(tagName) { + return node.getElementsByTagNameNS("", tagName); + }; + node.createElementNS = function(namespaceURI, qualifiedName) { + var element = new Node(); + element.nodeType = Node.ELEMENT_NODE; + element.ownerDocument = node; + element.attributes = new NamedNodeMap(element); + element.tagName = qualifiedName; + element.nodeName = qualifiedName; + var i = qualifiedName.indexOf(":"); + element.localName = i < 0 ? qualifiedName : qualifiedName.substring(i + 1); + element.prefix = i < 0 ? "" : qualifiedName.substring(0, i); + element.namespaceURI = namespaceURI; + element.getAttributeNode = function(name) { + return this.attributes.getNamedItem(name); + }; + element.getAttribute = function(name) { + var attr = this.getAttributeNode(name); + return attr ? attr.value : ""; + }; + element.setAttributeNode = function(newAttr) { + return this.attributes.setNamedItem(newAttr); + }; + element.setAttribute = function(name, value) { + var attr = this.ownerDocument.createAttribute(name); + attr.value = value || ""; + this.setAttributeNode(attr); + }; + element.removeAttribute = function(name) { + this.attributes.removeNamedItem(name); + }; + element.removeAttributeNode = function(oldAttr) { + return this.attributes.removeNamedItem(oldAttr.name); + }; + element.hasAttribute = function(name) { + return !!this.attributes.getNamedItem(name); + }; + element.getAttributeNodeNS = function(namespaceURI, localName) { + return this.attributes.getNamedItemNS(namespaceURI, localName); + }; + element.getAttributeNS = function(namespaceURI, localName) { + var attr = this.getAttributeNodeNS(namespaceURI, localName); + return attr ? attr.value : ""; + }; + element.setAttributeNodeNS = function(newAttr) { + return this.attributes.setNamedItemNS(newAttr); + }; + element.setAttribute = function(namespaceURI, qualifiedName) { + var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); + attr.value = value || ""; + this.setAttributeNodeNS(attr); + }; + element.removeAttributeNS = function(namespaceURI, localName) { + this.attributes.removeNamedItemNS(namespaceURI, localName); + }; + element.removeAttributeNode = function(oldAttr) { + return this.attributes.removeNamedItemNS(oldAttr.namespaceNS, oldAttr.localName); + }; + element.hasAttributeNS = function(namespaceURI, localName) { + return !!this.attributes.getNamedItemNS(namespaceURI, localName); + }; + element.getElementsByTagName = function(name) { + return this.getElementsByTagNameNS("", name); + }; + element.getElementsByTagNameNS = function(namespaceURI, localName) { + var q = [this]; + var result = []; + while (q.length > 0) { + var current = q.shift(); + if (current.nodeType == Node.ELEMENT_NODE) { + if (current.namespaceURI == namespaceURI && current.localName == localName) { + result.push(current); + } + + for (var i = 0; i < current.childNodes.length; ++i) { + q.push(current.childNodes[i]); + } + } + } + return new NodeList(result); + }; + + Object.defineProperty(element, "textContent", { + get: function() { + var result = ""; + for (var i = 0; i < this.childNodes.length; ++i) { + result += this.childNodes[i].textContent; + } + return result; + }, + enumerable: true + }); + + return element; + }; + node.createAttributeNS = function(namespaceURI, qualifiedName) { + var attr = new Node(); + attr.nodeType = Node.ATTRIBUTE_NODE; + attr.ownerDocument = node; + attr.name = qualifiedName; + attr.nodeName = qualifiedName; + var i = qualifiedName.indexOf(":"); + attr.localName = i < 0 ? qualifiedName : qualifiedName.substring(i + 1); + attr.prefix = i < 0 ? "" : qualifiedName.substring(0, i); + attr.namespaceURI = namespaceURI; + attr.specified = true; + attr.nodeValue = null; + Object.defineProperty(attr, "value", { + get: function() { return this.nodeValue; }, + set: function(value) { this.nodeValue = value; }, + enumerable: true + }); + return attr; + }; + node.getElementsByTagNameNS = function(namespaceURI, localName) { + if (!this.documentElement) return null; + return this.documentElement.getElementsByTagNameNS(namespaceURI, localName); + }; + node.getElementById = function(elementId) { + if (this.documentElement) return null; + var q = [this.documentElement]; + while (q.length > 0) { + var current = q.shift(); + if (current.nodeType == Node.ELEMENT_NODE) { + if (current.getAttribute("id") == elementId) return current; + + for (var i = 0; i < current.childNodes.length; ++i) { + q.push(current.childNodes[i]); + } + } + } + return null; + }; + node.onChildNodesChanged = function() { + this.documentElement = null; + for (var i = 0; i < this.childNodes.length; ++i) { + if (this.childNodes[i].nodeType == Node.ELEMENT_NODE) { + this.documentElement = this.childNodes[i]; + } + } + }; + + Object.defineProperty(node, "textContent", { + get: function() { + return this.documentElement.textContent; + }, + enumerable: true + }); + return node; + } + + function buildQualifiedName(name) { + return name.prefix ? name.prefix + ":" + name.name : name.name; + } + + this.parseFromString = function(s, mimeType) { + var document = new Document(); + var elementsStack = [], currentElement = document; + parseXml(s, { + beginElement: function(name, attrs, isEmpty) { + var parent = currentElement; + elementsStack.push(parent); + currentElement = document.createElementNS(name.namespace, buildQualifiedName(name)); + for (var i = 0; i < attrs.length; ++i) { + var attr = document.createAttributeNS(attrs[i].name.namespace, + buildQualifiedName(attrs[i].name)); + attr.value = attrs[i].value; + currentElement.attributes.setNamedItem(attr); + } + parent.appendChild(currentElement); + if (isEmpty) { + currentElement = elementsStack.pop(); + } + }, + endElement: function(name) { + currentElement = elementsStack.pop(); + }, + text: function(text, isWhitespace) { + var node = document.createTextNode(text); + currentElement.appendChild(node); + }, + cdata: function(text) { + var node = document.createCDATASection(text); + currentElement.appendChild(node); + }, + comment: function(text) { }, + pi: function(name, attrs) { }, + doctype: function(text) { } + }); + document.normalize(); + return document; + }; + } + + var window = { + appendChild: __elem_func__, + removeChild: __empty_func__, + addEventListener: __empty_func__, + setInterval: __empty_func__, + DOMParser: DOMParser, + open: __empty_func__, + document: document, + createElement: function() { return elem; }, + setTimeout: __empty_func__, + clearInterval: __empty_func__, + localStorage: {}, + // required object types + XMLHttpRequest: __empty_func__, + HTMLImageElement: HTMLImageElement, + HTMLCanvasElement: HTMLCanvasElement + }; + + window.XMLHttpRequest.prototype.open = __empty_func__; + window.XMLHttpRequest.prototype.send = __empty_func__; + window.XMLHttpRequest.prototype.responseText = "some text"; + window.XMLHttpRequest.prototype.setRequestHeader = __empty_func__; + window.XMLHttpRequest.prototype.overrideMimeType = __empty_func__; + window.XMLHttpRequest.prototype.status = 200; + + // and return our fake browser object + return { + isDomPresent: false, + navigator: navigator, + window: window, + document: document, + ajax: function(url) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, false); + if (xhr.overrideMimeType) { + xhr.overrideMimeType("text/plain"); + } + xhr.setRequestHeader("If-Modified-Since", "Fri, 01 Jan 1960 00:00:00 GMT"); + xhr.send(null); + // failed request? + if (xhr.status !== 200 && xhr.status !== 0) { throw ("XMLHttpRequest failed, status code " + xhr.status); } + return xhr.responseText; + } + }; + +}()); diff --git a/lib/TestHarness.js b/lib/TestHarness.js new file mode 100755 index 000000000..8ad0e97ad --- /dev/null +++ b/lib/TestHarness.js @@ -0,0 +1,129 @@ +module.exports = (function testHarness() { + + // compareArrays() used under MIT License -- based on http://code.google.com/p/jqcommons/ + Array.prototype.compareArrays = function(arr, eps) { + if (this.length != arr.length) + return false; + + for (var i = 0; i < arr.length; i++) { + if (this[i].compareArrays) { // nested array? + if (!this[i].compareArrays(arr[i], eps)) + return false; + else + continue; + } + if ((!eps && this[i] != arr[i]) || (eps && (Math.abs(this[i] - arr[i]) > eps))) + return false; + } + return true; + }; + + var UnitTests = { + _passCount: 0, + _failCount: 0, + _curTest: "", + _checkCount: 0, + + prep: function(testName) { + this._passCount = 0; + this._failCount = 0; + this._checkCount = 0; + this._curTest = testName; + }, + + _print: function(msg) { + console.log(" [" + this._curTest + "/" + this._checkCount + "] " + msg); + }, + + _pass: function() { + this._passCount++; + }, + + _fail: function(msg) { + this._print(msg); + this._failCount++; + }, + + _checkEqual: function(a, b) { + this._checkCount++; + // If user passed a third arg (Epsilon) use it for ~= + var eps = arguments[2] || 0; + if(typeof a === "object" && typeof b === "object" && a.constructor === b.constructor && "toArray" in a && "toArray" in b) { + a = a.toArray(); b = b.toArray(); + } + if (a.compareArrays && b.compareArrays) { + if (a.compareArrays(b, eps)) + this._pass(); + else + this._fail(a + " != " + b); + } else { + if ((!eps && a != b) || (eps && (Math.abs(a - b) > eps))) + this._fail(a + " != " + b); + else + this._pass(); + } + }, + + _checkNotEqual: function(a, b) { + if (a.compareArrays && b.compareArrays) { + if (a.compareArrays(b)) + this._fail(a + " == " + b); + else + this._pass(); + } else { + if (a == b) + this._fail(a + " == " + b); + else + this._pass(); + } + }, + + _checkIsNaN: function(a) { + if (a != a) // better check than isNaN() + this._pass(); + else + this._fail(a + " expected to be NaN."); + }, + + _checkIsNull: function(a) { + if (a === null || a === undefined) + this._pass(); + else + this._fail(a + " expected to be null (or undefined)."); + }, + + _checkTrue: function(a) { + this._checkEqual(!!a, true); + }, + + _checkFalse: function(a) { + this._checkEqual(!!a, false); + }, + + _checkThrows: function(f) { + var shouldThrow = (arguments.length === 2) ? !!arguments[1] : true, + result; + try { + f(); + result = shouldThrow ? this._fail(f + " didn't throw as expected.") : this._pass(); + } catch (e) { + result = shouldThrow ? this._pass() : this._fail(f + " should not have thrown exception, but did."); + } + }, + + _printTestSummary: function() { + this._print('TEST-SUMMARY: ' + this._passCount + '/' + this._failCount); + try + { + var numbers = []; + for(var i in __pjsCalledLines) { + if(0|i > 0 && __pjsCalledLines[i]) { numbers.push(i); } + } + this._print('LINES-CALLED: ' + numbers.join(",")); + } catch(e) {} + } + }; + + return UnitTests; + +}()); diff --git a/package.json b/package.json new file mode 100644 index 000000000..e69b43481 --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "processing-js", + "version": "1.6.6", + "author": "Processing.js", + "repository": { + "type": "git", + "url": "git@github.com/processing-js/processing-js.git" + }, + "main": "processing.min.js", + "bugs": "https://github.com/processing-js/processing-js/issues", + "devDependencies": { + "argv": "~0.0.2", + "browserify": "^11.0.1", + "express": "~3.3.3", + "grunt": "~0.4.1", + "grunt-cli": "~0.1.8", + "grunt-contrib-jshint": "~0.4.3", + "http-server": "^0.9.0", + "minifier": "^0.7.1", + "node-minify": "~0.7.3", + "nunjucks": "~0.1.9", + "open": "0.0.3" + }, + "scripts": { + "test": "node test", + "test:manual": "http-server -o test/manual", + "start": "browserify build.js -o processing.js && minify --output processing.min.js processing.js" + }, + "license": "MIT", + "dependencies": { + "minifier": "^0.7.1" + } +} diff --git a/processing.js b/processing.js index 09e9e299e..825ee3cc7 100755 --- a/processing.js +++ b/processing.js @@ -1,18 +1,12 @@ - -(function(window, document, Math, undef) { - - var nop = function(){}; - - var debug = (function() { - if ("console" in window) { - return function(msg) { - window.console.log('Processing.js: ' + msg); - }; - } - return nop; - }()); - - var ajax = function(url) { +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 9 && !document.doctype) { - throw("The doctype directive is missing. The recommended doctype in Internet Explorer is the HTML5 doctype: "); +}; + +window.Processing = require('./src/')(Browser); + +},{"./src/":28}],2:[function(require,module,exports){ +module.exports={ + "name": "processing-js", + "version": "1.6.6", + "author": "Processing.js", + "repository": { + "type": "git", + "url": "git@github.com/processing-js/processing-js.git" + }, + "main": "processing.min.js", + "bugs": "https://github.com/processing-js/processing-js/issues", + "devDependencies": { + "argv": "~0.0.2", + "browserify": "^11.0.1", + "express": "~3.3.3", + "grunt": "~0.4.1", + "grunt-cli": "~0.1.8", + "grunt-contrib-jshint": "~0.4.3", + "http-server": "^0.9.0", + "minifier": "^0.7.1", + "node-minify": "~0.7.3", + "nunjucks": "~0.1.9", + "open": "0.0.3" + }, + "scripts": { + "test": "node test", + "test:manual": "http-server -o test/manual", + "start": "browserify build.js -o processing.js && minify --output processing.min.js processing.js" + }, + "license": "MIT", + "dependencies": { + "minifier": "^0.7.1" } +} + +},{}],3:[function(require,module,exports){ +/** +* A ObjectIterator is an iterator wrapper for objects. If passed object contains +* the iterator method, the object instance will be replaced by the result returned by +* this method call. If passed object is an array, the ObjectIterator instance iterates +* through its items. +* +* @param {Object} obj The object to be iterated. +*/ +module.exports = function ObjectIterator(obj) { + if (obj instanceof Array) { + // iterate through array items + var index = -1; + this.hasNext = function() { + return ++index < obj.length; + }; + this.next = function() { + return obj[index]; + }; + } else if (obj.iterator instanceof Function) { + return obj.iterator(); + } else { + throw "Unable to iterate: " + obj; + } +}; - var Float32Array = setupTypedArray("Float32Array", "WebGLFloatArray"), - Int32Array = setupTypedArray("Int32Array", "WebGLIntArray"), - Uint16Array = setupTypedArray("Uint16Array", "WebGLUnsignedShortArray"), - Uint8Array = setupTypedArray("Uint8Array", "WebGLUnsignedByteArray"); - - /* Browsers fixes end */ - - /** - * NOTE: in releases we replace symbolic PConstants.* names with their values. - * Using PConstants.* in code below is fine. See tools/rewrite-pconstants.js. - */ - var PConstants = { +},{}],4:[function(require,module,exports){ +/** + * Processing.js environment constants + */ +module.exports = { X: 0, Y: 1, Z: 2, @@ -156,6 +172,7 @@ PI: Math.PI, TWO_PI: 2 * Math.PI, + TAU: 2 * Math.PI, HALF_PI: Math.PI / 2, THIRD_PI: Math.PI / 3, QUARTER_PI: Math.PI / 4, @@ -236,6 +253,12 @@ SPHERE: 40, BOX: 41, + // Arc drawing modes + //OPEN: 1, // shared with Shape closing modes + CHORD: 2, + PIE: 3, + + GROUP: 0, PRIMITIVE: 1, //PATH: 21, // shared with Shape PATH @@ -353,8 +376,8 @@ HINT_COUNT: 10, // PJS defined constants - SINCOS_LENGTH: 720, // every half degree - PRECISIONB: 15, // fixed point precision is limited to 15 bits!! + SINCOS_LENGTH: 720, // every half degree + PRECISIONB: 15, // fixed point precision is limited to 15 bits!! PRECISIONF: 1 << 15, PREC_MAXVAL: (1 << 15) - 1, PREC_ALPHA_SHIFT: 24 - 15, @@ -363,1319 +386,1504 @@ NORMAL_MODE_SHAPE: 1, NORMAL_MODE_VERTEX: 2, MAX_LIGHTS: 8 +}; + +},{}],5:[function(require,module,exports){ +// the logger for print() and println() +module.exports = function PjsConsole(document) { + var e = { BufferMax: 200 }, + style = document.createElement("style"), + added = false; + + style.textContent = [ + ".pjsconsole.hidden {", + " display: none!important;", + "}" + ].join('\n'); + + e.wrapper = document.createElement("div"); + style.textContent += [ + "", + ".pjsconsole {", + " opacity: .75;", + " display: block;", + " position: fixed;", + " bottom: 0px;", + " left: 0px;", + " right: 0px;", + " height: 50px;", + " background-color: #aaa;", + "}" + ].join('\n'); + e.wrapper.classList.add("pjsconsole"); + + e.dragger = document.createElement("div"); + style.textContent += [ + "", + ".pjsconsole .dragger {", + " display: block;", + " border: 3px black raised;", + " cursor: n-resize;", + " position: absolute;", + " top: 0px;", + " left: 0px;", + " right: 0px;", + " height: 5px;", + " background-color: #333;", + "}" + ].join('\n'); + e.dragger.classList.add("dragger"); + + e.closer = document.createElement("div"); + style.textContent += [ + "", + ".pjsconsole .closer {", + " opacity: .5;", + " display: block;", + " border: 3px black raised;", + " position: absolute;", + " top: 10px;", + " right: 30px;", + " height: 20px;", + " width: 20px;", + " background-color: #ddd;", + " color: #000;", + " line-height: 20px;", + " text-align: center;", + " cursor: pointer", + "}" + ].join('\n'); + e.closer.classList.add("closer"); + e.closer.innerHTML = "✖"; + + e.javaconsole = document.createElement("div"); + style.textContent += [ + "", + ".pjsconsole .console {", + " overflow-x: auto;", + " display: block;", + " position: absolute;", + " left: 10px;", + " right: 0px;", + " bottom: 5px;", + " top: 10px;", + " overflow-y: scroll;", + " height: 40px;", + "}" + ].join('\n'); + e.javaconsole.setAttribute("class", "console"); + + e.wrapper.appendChild(e.dragger); + e.wrapper.appendChild(e.javaconsole); + e.wrapper.appendChild(e.closer); + + e.dragger.onmousedown = function (t) { + e.divheight = e.wrapper.style.height; + if (document.selection) document.selection.empty(); + else window.getSelection().removeAllRanges(); + var n = t.screenY; + window.onmousemove = function (t) { + e.wrapper.style.height = parseFloat(e.divheight) + (n - t.screenY) + "px"; + e.javaconsole.style.height = parseFloat(e.divheight) + (n - t.screenY) - 10 + "px"; + }; + window.onmouseup = function (t) { + if (document.selection) document.selection.empty(); + else window.getSelection().removeAllRanges(); + e.wrapper.style.height = parseFloat(e.divheight) + (n - t.screenY) + "px"; + e.javaconsole.style.height = parseFloat(e.divheight) + (n - t.screenY) - 10 + "px"; + window.onmousemove = null; + window.onmouseup = null; + }; + }; + + e.BufferArray = []; + + e.print = e.log = function () { + if(!added) { + document.body.appendChild(style); + document.body.appendChild(e.wrapper); + added = true; + } + var args = Array.prototype.slice.call(arguments); + t = args.map(function(t, idx) { return t + (idx+1 === args.length ? "" : " "); }).join(''); + if (e.BufferArray[e.BufferArray.length - 1]) e.BufferArray[e.BufferArray.length - 1] += (t) + ""; + else e.BufferArray.push(t); + e.javaconsole.innerHTML = e.BufferArray.join(''); + e.showconsole(); + }; + + e.println = function () { + var args = Array.prototype.slice.call(arguments); + args.push('
'); + e.print.apply(e, args); + if (e.BufferArray.length > e.BufferMax) { + e.BufferArray.splice(0, 1); + } else { + e.javaconsole.scrollTop = e.javaconsole.scrollHeight; + } + }; + + e.showconsole = function () { e.wrapper.classList.remove("hidden"); }; + e.hideconsole = function () { e.wrapper.classList.add("hidden"); }; + + e.closer.onclick = function () { e.hideconsole(); }; + + e.hideconsole(); + + return e; +}; + +},{}],6:[function(require,module,exports){ +/** + * Processing.js default scope + */ +module.exports = function(options) { + + // Building defaultScope. Changing of the prototype protects + // internal Processing code from the changes in defaultScope + function DefaultScope() {} + DefaultScope.prototype = options.PConstants; + + var defaultScope = new DefaultScope(); + + // copy over all known Object types and helper objects + Object.keys(options).forEach(function(prop) { + defaultScope[prop] = options[prop]; + }); + + //////////////////////////////////////////////////////////////////////////// + // Class inheritance helper methods + //////////////////////////////////////////////////////////////////////////// + + defaultScope.defineProperty = function(obj, name, desc) { + if("defineProperty" in Object) { + Object.defineProperty(obj, name, desc); + } else { + if (desc.hasOwnProperty("get")) { + obj.__defineGetter__(name, desc.get); + } + if (desc.hasOwnProperty("set")) { + obj.__defineSetter__(name, desc.set); + } + } }; /** - * Returns Java hashCode() result for the object. If the object has the "hashCode" function, - * it preforms the call of this function. Otherwise it uses/creates the "$id" property, - * which is used as the hashCode. - * - * @param {Object} obj The object. - * @returns {int} The object's hash code. + * class overloading, part 1 */ - function virtHashCode(obj) { - if (typeof(obj) === "string") { - var hash = 0; - for (var i = 0; i < obj.length; ++i) { - hash = (hash * 31 + obj.charCodeAt(i)) & 0xFFFFFFFF; - } - return hash; + function overloadBaseClassFunction(object, name, basefn) { + if (!object.hasOwnProperty(name) || typeof object[name] !== 'function') { + // object method is not a function or just inherited from Object.prototype + object[name] = basefn; + return; + } + var fn = object[name]; + if ("$overloads" in fn) { + // the object method already overloaded (see defaultScope.addMethod) + // let's just change a fallback method + fn.$defaultOverload = basefn; + return; } - if (typeof(obj) !== "object") { - return obj & 0xFFFFFFFF; + if (!("$overloads" in basefn) && fn.length === basefn.length) { + // special case when we just overriding the method + return; } - if (obj.hashCode instanceof Function) { - return obj.hashCode(); + var overloads, defaultOverload; + if ("$overloads" in basefn) { + // let's inherit base class overloads to speed up things + overloads = basefn.$overloads.slice(0); + overloads[fn.length] = fn; + defaultOverload = basefn.$defaultOverload; + } else { + overloads = []; + overloads[basefn.length] = basefn; + overloads[fn.length] = fn; + defaultOverload = fn; } - if (obj.$id === undef) { - obj.$id = ((Math.floor(Math.random() * 0x10000) - 0x8000) << 16) | Math.floor(Math.random() * 0x10000); + var hubfn = function() { + var fn = hubfn.$overloads[arguments.length] || + ("$methodArgsIndex" in hubfn && arguments.length > hubfn.$methodArgsIndex ? + hubfn.$overloads[hubfn.$methodArgsIndex] : null) || + hubfn.$defaultOverload; + return fn.apply(this, arguments); + }; + hubfn.$overloads = overloads; + if ("$methodArgsIndex" in basefn) { + hubfn.$methodArgsIndex = basefn.$methodArgsIndex; } - return obj.$id; + hubfn.$defaultOverload = defaultOverload; + hubfn.name = name; + object[name] = hubfn; } /** - * Returns Java equals() result for two objects. If the first object - * has the "equals" function, it preforms the call of this function. - * Otherwise the method uses the JavaScript === operator. - * - * @param {Object} obj The first object. - * @param {Object} other The second object. - * - * @returns {boolean} true if the objects are equal. + * class overloading, part 2 */ - function virtEquals(obj, other) { - if (obj === null || other === null) { - return (obj === null) && (other === null); - } - if (typeof (obj) === "string") { - return obj === other; + + function extendClass(subClass, baseClass) { + function extendGetterSetter(propertyName) { + defaultScope.defineProperty(subClass, propertyName, { + get: function() { + return baseClass[propertyName]; + }, + set: function(v) { + baseClass[propertyName]=v; + }, + enumerable: true + }); } - if (typeof(obj) !== "object") { - return obj === other; + + var properties = []; + for (var propertyName in baseClass) { + if (typeof baseClass[propertyName] === 'function') { + overloadBaseClassFunction(subClass, propertyName, baseClass[propertyName]); + } else if(propertyName.charAt(0) !== "$" && !(propertyName in subClass)) { + // Delaying the properties extension due to the IE9 bug (see #918). + properties.push(propertyName); + } } - if (obj.equals instanceof Function) { - return obj.equals(other); + while (properties.length > 0) { + extendGetterSetter(properties.shift()); } - return obj === other; + + subClass.$super = baseClass; } /** - * A ObjectIterator is an iterator wrapper for objects. If passed object contains - * the iterator method, the object instance will be replaced by the result returned by - * this method call. If passed object is an array, the ObjectIterator instance iterates - * through its items. - * - * @param {Object} obj The object to be iterated. - */ - var ObjectIterator = function(obj) { - if (obj.iterator instanceof Function) { - return obj.iterator(); + * class overloading, part 3 + */ + defaultScope.extendClassChain = function(base) { + var path = [base]; + for (var self = base.$upcast; self; self = self.$upcast) { + extendClass(self, base); + path.push(self); + base = self; } - if (obj instanceof Array) { - // iterate through array items - var index = -1; - this.hasNext = function() { - return ++index < obj.length; - }; - this.next = function() { - return obj[index]; - }; - } else { - throw "Unable to iterate: " + obj; + while (path.length > 0) { + path.pop().$self=base; } }; - /** - * An ArrayList stores a variable number of objects. - * - * @param {int} initialCapacity optional defines the initial capacity of the list, it's empty by default - * - * @returns {ArrayList} new ArrayList object - */ - var ArrayList = (function() { - function Iterator(array) { - var index = 0; - this.hasNext = function() { - return index < array.length; - }; - - this.next = function() { - return array[index++]; - }; - - this.remove = function() { - array.splice(index, 1); - }; - } + // static + defaultScope.extendStaticMembers = function(derived, base) { + extendClass(derived, base); + }; - function ArrayList(a) { - var array; + // interface + defaultScope.extendInterfaceMembers = function(derived, base) { + extendClass(derived, base); + }; - if (a instanceof ArrayList) { - array = a.toArray(); + /** + * Java methods and JavaScript functions differ enough that + * we need a special function to make sure it all links up + * as classical hierarchical class chains. + */ + defaultScope.addMethod = function(object, name, fn, hasMethodArgs) { + var existingfn = object[name]; + if (existingfn || hasMethodArgs) { + var args = fn.length; + // builds the overload methods table + if ("$overloads" in existingfn) { + existingfn.$overloads[args] = fn; } else { - array = []; - if (typeof a === "number") { - array.length = a > 0 ? a : 0; + var hubfn = function() { + var fn = hubfn.$overloads[arguments.length] || + ("$methodArgsIndex" in hubfn && arguments.length > hubfn.$methodArgsIndex ? + hubfn.$overloads[hubfn.$methodArgsIndex] : null) || + hubfn.$defaultOverload; + return fn.apply(this, arguments); + }; + var overloads = []; + if (existingfn) { + overloads[existingfn.length] = existingfn; + } + overloads[args] = fn; + hubfn.$overloads = overloads; + hubfn.$defaultOverload = existingfn || fn; + if (hasMethodArgs) { + hubfn.$methodArgsIndex = args; } + hubfn.name = name; + object[name] = hubfn; } + } else { + object[name] = fn; + } + }; - /** - * @member ArrayList - * ArrayList.get() Returns the element at the specified position in this list. - * - * @param {int} i index of element to return - * - * @returns {Object} the element at the specified position in this list. - */ - this.get = function(i) { - return array[i]; - }; - /** - * @member ArrayList - * ArrayList.contains() Returns true if this list contains the specified element. - * - * @param {Object} item element whose presence in this List is to be tested. - * - * @returns {boolean} true if the specified element is present; false otherwise. - */ - this.contains = function(item) { - return this.indexOf(item)>-1; - }; - /** - * @member ArrayList - * ArrayList.indexOf() Returns the position this element takes in the list, or -1 if the element is not found. - * - * @param {Object} item element whose position in this List is to be tested. - * - * @returns {int} the list position that the first match for this element holds in the list, or -1 if it is not in the list. - */ - this.indexOf = function(item) { - for (var i = 0, len = array.length; i < len; ++i) { - if (virtEquals(item, array[i])) { - return i; - } - } - return -1; - }; - /** - * @member ArrayList - * ArrayList.lastIndexOf() Returns the index of the last occurrence of the specified element in this list, - * or -1 if this list does not contain the element. More formally, returns the highest index i such that - * (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index. - * - * @param {Object} item element to search for. - * - * @returns {int} the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element. - */ - this.lastIndexOf = function(item) { - for (var i = array.length-1; i >= 0; --i) { - if (virtEquals(item, array[i])) { - return i; - } - } - return -1; - }; - /** - * @member ArrayList - * ArrayList.add() Adds the specified element to this list. - * - * @param {int} index optional index at which the specified element is to be inserted - * @param {Object} object element to be added to the list - */ - this.add = function() { - if (arguments.length === 1) { - array.push(arguments[0]); // for add(Object) - } else if (arguments.length === 2) { - var arg0 = arguments[0]; - if (typeof arg0 === 'number') { - if (arg0 >= 0 && arg0 <= array.length) { - array.splice(arg0, 0, arguments[1]); // for add(i, Object) - } else { - throw(arg0 + " is not a valid index"); - } - } else { - throw(typeof arg0 + " is not a number"); - } - } else { - throw("Please use the proper number of parameters."); - } - }; - /** - * @member ArrayList - * ArrayList.addAll(collection) appends all of the elements in the specified - * Collection to the end of this list, in the order that they are returned by - * the specified Collection's Iterator. - * - * When called as addAll(index, collection) the elements are inserted into - * this list at the position indicated by index. - * - * @param {index} Optional; specifies the position the colletion should be inserted at - * @param {collection} Any iterable object (ArrayList, HashMap.keySet(), etc.) - * @throws out of bounds error for negative index, or index greater than list size. - */ - this.addAll = function(arg1, arg2) { - // addAll(int, Collection) - var it; - if (typeof arg1 === "number") { - if (arg1 < 0 || arg1 > array.length) { - throw("Index out of bounds for addAll: " + arg1 + " greater or equal than " + array.length); - } - it = new ObjectIterator(arg2); - while (it.hasNext()) { - array.splice(arg1++, 0, it.next()); - } - } - // addAll(Collection) - else { - it = new ObjectIterator(arg1); - while (it.hasNext()) { - array.push(it.next()); - } + // internal helper function + function isNumericalJavaType(type) { + if (typeof type !== "string") { + return false; + } + return ["byte", "int", "char", "color", "float", "long", "double"].indexOf(type) !== -1; + } + + /** + * Java's arrays are pre-filled when declared with + * an initial size, but no content. JS arrays are not. + */ + defaultScope.createJavaArray = function(type, bounds) { + var result = null, + defaultValue = null; + if (typeof type === "string") { + if (type === "boolean") { + defaultValue = false; + } else if (isNumericalJavaType(type)) { + defaultValue = 0; + } + } + if (typeof bounds[0] === 'number') { + var itemsCount = 0 | bounds[0]; + if (bounds.length <= 1) { + result = []; + result.length = itemsCount; + for (var i = 0; i < itemsCount; ++i) { + result[i] = defaultValue; } - }; - /** - * @member ArrayList - * ArrayList.set() Replaces the element at the specified position in this list with the specified element. - * - * @param {int} index index of element to replace - * @param {Object} object element to be stored at the specified position - */ - this.set = function() { - if (arguments.length === 2) { - var arg0 = arguments[0]; - if (typeof arg0 === 'number') { - if (arg0 >= 0 && arg0 < array.length) { - array.splice(arg0, 1, arguments[1]); - } else { - throw(arg0 + " is not a valid index."); - } - } else { - throw(typeof arg0 + " is not a number"); - } - } else { - throw("Please use the proper number of parameters."); + } else { + result = []; + var newBounds = bounds.slice(1); + for (var j = 0; j < itemsCount; ++j) { + result.push(defaultScope.createJavaArray(type, newBounds)); } - }; + } + } + return result; + }; - /** - * @member ArrayList - * ArrayList.size() Returns the number of elements in this list. - * - * @returns {int} the number of elements in this list - */ - this.size = function() { - return array.length; - }; + // screenWidth and screenHeight are shared by all instances. + // and return the width/height of the browser's viewport. + defaultScope.defineProperty(defaultScope, 'screenWidth', + { get: function() { return window.innerWidth; } }); - /** - * @member ArrayList - * ArrayList.clear() Removes all of the elements from this list. The list will be empty after this call returns. - */ - this.clear = function() { - array.length = 0; - }; + defaultScope.defineProperty(defaultScope, 'screenHeight', + { get: function() { return window.innerHeight; } }); - /** - * @member ArrayList - * ArrayList.remove() Removes an element either based on index, if the argument is a number, or - * by equality check, if the argument is an object. - * - * @param {int|Object} item either the index of the element to be removed, or the element itself. - * - * @returns {Object|boolean} If removal is by index, the element that was removed, or null if nothing was removed. If removal is by object, true if removal occurred, otherwise false. - */ - this.remove = function(item) { - if (typeof item === 'number') { - return array.splice(item, 1)[0]; - } - item = this.indexOf(item); - if (item > -1) { - array.splice(item, 1); - return true; - } - return false; - }; + return defaultScope; +}; - /** - * @member ArrayList - * ArrayList.removeAll Removes from this List all of the elements from - * the current ArrayList which are present in the passed in paramater ArrayList 'c'. - * Shifts any succeeding elements to the left (reduces their index). - * - * @param {ArrayList} the ArrayList to compare to the current ArrayList - * - * @returns {boolean} true if the ArrayList had an element removed; false otherwise - */ - this.removeAll = function(c) { - var i, x, item, - newList = new ArrayList(); - newList.addAll(this); - this.clear(); - // For every item that exists in the original ArrayList and not in the c ArrayList - // copy it into the empty 'this' ArrayList to create the new 'this' Array. - for (i = 0, x = 0; i < newList.size(); i++) { - item = newList.get(i); - if (!c.contains(item)) { - this.add(x++, item); - } - } - if (this.size() < newList.size()) { - return true; - } - return false; - }; +},{}],7:[function(require,module,exports){ +/** + * Finalise the Processing.js object. + */ +module.exports = function finalizeProcessing(Processing, options) { - /** - * @member ArrayList - * ArrayList.isEmpty() Tests if this list has no elements. - * - * @returns {boolean} true if this list has no elements; false otherwise - */ - this.isEmpty = function() { - return !array.length; - }; + // unpack options + var window = options.window, + document = options.document, + XMLHttpRequest = window.XMLHttpRequest, + noop = options.noop, + isDOMPresent = options.isDOMPresent, + version = options.version, + undef; - /** - * @member ArrayList - * ArrayList.clone() Returns a shallow copy of this ArrayList instance. (The elements themselves are not copied.) - * - * @returns {ArrayList} a clone of this ArrayList instance - */ - this.clone = function() { - return new ArrayList(this); - }; + // versioning + Processing.version = (version ? version : "@DEV-VERSION@"); - /** - * @member ArrayList - * ArrayList.toArray() Returns an array containing all of the elements in this list in the correct order. - * - * @returns {Object[]} Returns an array containing all of the elements in this list in the correct order - */ - this.toArray = function() { - return array.slice(0); - }; + // Share lib space + Processing.lib = {}; - this.iterator = function() { - return new Iterator(array); - }; + /** + * External libraries can be added to the global Processing + * objects with the `registerLibrary` function. + */ + Processing.registerLibrary = function(name, library) { + Processing.lib[name] = library; + if(library.hasOwnProperty("init")) { + library.init(defaultScope); } - - return ArrayList; - }()); + }; /** - * A HashMap stores a collection of objects, each referenced by a key. This is similar to an Array, only - * instead of accessing elements with a numeric index, a String is used. (If you are familiar with - * associative arrays from other languages, this is the same idea.) - * - * @param {int} initialCapacity defines the initial capacity of the map, it's 16 by default - * @param {float} loadFactor the load factor for the map, the default is 0.75 - * @param {Map} m gives the new HashMap the same mappings as this Map - */ - var HashMap = (function() { - /** - * @member HashMap - * A HashMap stores a collection of objects, each referenced by a key. This is similar to an Array, only - * instead of accessing elements with a numeric index, a String is used. (If you are familiar with - * associative arrays from other languages, this is the same idea.) - * - * @param {int} initialCapacity defines the initial capacity of the map, it's 16 by default - * @param {float} loadFactor the load factor for the map, the default is 0.75 - * @param {Map} m gives the new HashMap the same mappings as this Map - */ - function HashMap() { - if (arguments.length === 1 && arguments[0] instanceof HashMap) { - return arguments[0].clone(); - } + * This is the object that acts as our version of PApplet. + * This can be called as Processing.Sketch() or as + * Processing.Sketch(function) in which case the function + * must be an already-compiled-to-JS sketch function. + */ + Processing.Sketch = function(attachFunction) { + this.attachFunction = attachFunction; + this.options = { + pauseOnBlur: false, + globalKeyEvents: false + }; - var initialCapacity = arguments.length > 0 ? arguments[0] : 16; - var loadFactor = arguments.length > 1 ? arguments[1] : 0.75; - var buckets = []; - buckets.length = initialCapacity; - var count = 0; - var hashMap = this; + /* Optional Sketch event hooks: + * onLoad - parsing/preloading is done, before sketch starts + * onSetup - setup() has been called, before first draw() + * onPause - noLoop() has been called, pausing draw loop + * onLoop - loop() has been called, resuming draw loop + * onFrameStart - draw() loop about to begin + * onFrameEnd - draw() loop finished + * onExit - exit() done being called + */ + this.onLoad = noop; + this.onSetup = noop; + this.onPause = noop; + this.onLoop = noop; + this.onFrameStart = noop; + this.onFrameEnd = noop; + this.onExit = noop; - function getBucketIndex(key) { - var index = virtHashCode(key) % buckets.length; - return index < 0 ? buckets.length + index : index; - } - function ensureLoad() { - if (count <= loadFactor * buckets.length) { + this.params = {}; + this.imageCache = { + pending: 0, + images: {}, + // Opera requires special administration for preloading + operaCache: {}, + // Specify an optional img arg if the image is already loaded in the DOM, + // otherwise href will get loaded. + add: function(href, img) { + // Prevent muliple loads for an image, in case it gets + // preloaded more than once, or is added via JS and then preloaded. + if (this.images[href]) { return; } - var allEntries = []; - for (var i = 0; i < buckets.length; ++i) { - if (buckets[i] !== undef) { - allEntries = allEntries.concat(buckets[i]); - } - } - var newBucketsLength = buckets.length * 2; - buckets = []; - buckets.length = newBucketsLength; - for (var j = 0; j < allEntries.length; ++j) { - var index = getBucketIndex(allEntries[j].key); - var bucket = buckets[index]; - if (bucket === undef) { - buckets[index] = bucket = []; - } - bucket.push(allEntries[j]); - } - } - - function Iterator(conversion, removeItem) { - var bucketIndex = 0; - var itemIndex = -1; - var endOfBuckets = false; - var currentItem; - function findNext() { - while (!endOfBuckets) { - ++itemIndex; - if (bucketIndex >= buckets.length) { - endOfBuckets = true; - } else if (buckets[bucketIndex] === undef || itemIndex >= buckets[bucketIndex].length) { - itemIndex = -1; - ++bucketIndex; - } else { - return; - } - } + if (!isDOMPresent) { + this.images[href] = null; } - /* - * @member Iterator - * Checks if the Iterator has more items - */ - this.hasNext = function() { - return !endOfBuckets; - }; + // No image in the DOM, kick-off a background load + if (!img) { + img = new Image(); + img.onload = (function(owner) { + return function() { + owner.pending--; + }; + }(this)); + this.pending++; + img.src = href; + } - /* - * @member Iterator - * Return the next Item - */ - this.next = function() { - currentItem = conversion(buckets[bucketIndex][itemIndex]); - findNext(); - return currentItem; - }; + this.images[href] = img; - /* - * @member Iterator - * Remove the current item - */ - this.remove = function() { - if (currentItem !== undef) { - removeItem(currentItem); - --itemIndex; - findNext(); + // Opera will not load images until they are inserted into the DOM. + if (window.opera) { + var div = document.createElement("div"); + div.appendChild(img); + // we can't use "display: none", since that makes it invisible, and thus not load + div.style.position = "absolute"; + div.style.opacity = 0; + div.style.width = "1px"; + div.style.height= "1px"; + if (!this.operaCache[href]) { + document.body.appendChild(div); + this.operaCache[href] = div; } - }; - - findNext(); + } } + }; - function Set(conversion, isIn, removeItem) { - this.clear = function() { - hashMap.clear(); - }; - - this.contains = function(o) { - return isIn(o); - }; - - this.containsAll = function(o) { - var it = o.iterator(); - while (it.hasNext()) { - if (!this.contains(it.next())) { - return false; - } - } - return true; - }; + this.sourceCode = undefined; + this.attach = function(processing) { + // either attachFunction or sourceCode must be present on attach + if(typeof this.attachFunction === "function") { + this.attachFunction(processing); + } else if(this.sourceCode) { + var func = ((new Function("return (" + this.sourceCode + ");"))()); + func(processing); + this.attachFunction = func; + } else { + throw "Unable to attach sketch to the processing instance"; + } + }; - this.isEmpty = function() { - return hashMap.isEmpty(); - }; + this.toString = function() { + var i; + var code = "((function(Sketch) {\n"; + code += "var sketch = new Sketch(\n" + this.sourceCode + ");\n"; + for(i in this.options) { + if(this.options.hasOwnProperty(i)) { + var value = this.options[i]; + code += "sketch.options." + i + " = " + + (typeof value === 'string' ? '\"' + value + '\"' : "" + value) + ";\n"; + } + } + for(i in this.imageCache) { + if(this.options.hasOwnProperty(i)) { + code += "sketch.imageCache.add(\"" + i + "\");\n"; + } + } + // TODO serialize fonts + code += "return sketch;\n})(Processing.Sketch))"; + return code; + }; + }; - this.iterator = function() { - return new Iterator(conversion, removeItem); - }; + /** + * aggregate all source code into a single file, then rewrite that + * source and bind to canvas via new Processing(canvas, sourcestring). + * @param {CANVAS} canvas The html canvas element to bind to + * @param {String[]} source The array of files that must be loaded + * @param {Function} onComplete A callback, called with the sketch as the argument. + */ + var loadSketchFromSources = Processing.loadSketchFromSources = function(canvas, sources, onComplete) { + var code = [], errors = [], sourcesCount = sources.length, loaded = 0; - this.remove = function(o) { - if (this.contains(o)) { - removeItem(o); - return true; - } - return false; - }; - - this.removeAll = function(c) { - var it = c.iterator(); - var changed = false; - while (it.hasNext()) { - var item = it.next(); - if (this.contains(item)) { - removeItem(item); - changed = true; - } - } - return true; - }; - - this.retainAll = function(c) { - var it = this.iterator(); - var toRemove = []; - while (it.hasNext()) { - var entry = it.next(); - if (!c.contains(entry)) { - toRemove.push(entry); + function ajaxAsync(url, callback) { + var xhr = new XMLHttpRequest(); + xhr.onreadystatechange = function() { + if (xhr.readyState === 4) { + var error; + if (xhr.status !== 200 && xhr.status !== 0) { + error = "Invalid XHR status " + xhr.status; + } else if (xhr.responseText === "") { + // Give a hint when loading fails due to same-origin issues on file:/// urls + if ( ("withCredentials" in new XMLHttpRequest()) && + (new XMLHttpRequest()).withCredentials === false && + window.location.protocol === "file:" ) { + error = "XMLHttpRequest failure, possibly due to a same-origin policy violation. You can try loading this page in another browser, or load it from http://localhost using a local webserver. See the Processing.js README for a more detailed explanation of this problem and solutions."; + } else { + error = "File is empty."; } } - for (var i = 0; i < toRemove.length; ++i) { - removeItem(toRemove[i]); - } - return toRemove.length > 0; - }; - - this.size = function() { - return hashMap.size(); - }; - - this.toArray = function() { - var result = []; - var it = this.iterator(); - while (it.hasNext()) { - result.push(it.next()); - } - return result; - }; - } - - function Entry(pair) { - this._isIn = function(map) { - return map === hashMap && (pair.removed === undef); - }; - - this.equals = function(o) { - return virtEquals(pair.key, o.getKey()); - }; - - this.getKey = function() { - return pair.key; - }; - - this.getValue = function() { - return pair.value; - }; - - this.hashCode = function(o) { - return virtHashCode(pair.key); - }; - - this.setValue = function(value) { - var old = pair.value; - pair.value = value; - return old; - }; - } - - this.clear = function() { - count = 0; - buckets = []; - buckets.length = initialCapacity; - }; - - this.clone = function() { - var map = new HashMap(); - map.putAll(this); - return map; - }; - this.containsKey = function(key) { - var index = getBucketIndex(key); - var bucket = buckets[index]; - if (bucket === undef) { - return false; - } - for (var i = 0; i < bucket.length; ++i) { - if (virtEquals(bucket[i].key, key)) { - return true; - } + callback(xhr.responseText, error); } - return false; }; + xhr.open("GET", url, true); + if (xhr.overrideMimeType) { + xhr.overrideMimeType("application/json"); + } + xhr.setRequestHeader("If-Modified-Since", "Fri, 01 Jan 1960 00:00:00 GMT"); // no cache + xhr.send(null); + } - this.containsValue = function(value) { - for (var i = 0; i < buckets.length; ++i) { - var bucket = buckets[i]; - if (bucket === undef) { - continue; - } - for (var j = 0; j < bucket.length; ++j) { - if (virtEquals(bucket[j].value, value)) { - return true; + function loadBlock(index, filename) { + function callback(block, error) { + code[index] = block; + ++loaded; + if (error) { + errors.push(filename + " ==> " + error); + } + if (loaded === sourcesCount) { + if (errors.length === 0) { + // This used to throw, but it was constantly getting in the way of debugging where things go wrong! + var sketch = new Processing(canvas, code.join("\n")); + if (onComplete) { + onComplete(sketch); } + } else { + throw "Processing.js: Unable to load pjs sketch files: " + errors.join("\n"); } } - return false; - }; + } + if (filename.charAt(0) === '#') { + // trying to get script from the element + var scriptElement = document.getElementById(filename.substring(1)); + if (scriptElement) { + callback(scriptElement.text || scriptElement.textContent); + } else { + callback("", "Unable to load pjs sketch: element with id \'" + filename.substring(1) + "\' was not found"); + } + return; + } - this.entrySet = function() { - return new Set( + ajaxAsync(filename, callback); + } - function(pair) { - return new Entry(pair); - }, + for (var i = 0; i < sourcesCount; ++i) { + loadBlock(i, sources[i]); + } + }; - function(pair) { - return (pair instanceof Entry) && pair._isIn(hashMap); - }, + /** + * Automatic initialization function. + */ + var init = function() { + document.removeEventListener('DOMContentLoaded', init, false); + var i; - function(pair) { - return hashMap.remove(pair.getKey()); - }); - }; + // before running through init, clear the instances list, to prevent + // sketch duplication when page content is dynamically swapped without + // swapping out processing.js + while (Processing.instances.length > 0) { + for (i = Processing.instances.length - 1; i >= 0; i--) { + if (Processing.instances[i]) { + Processing.instances[i].exit(); + } + } + } - this.get = function(key) { - var index = getBucketIndex(key); - var bucket = buckets[index]; - if (bucket === undef) { - return null; + var canvas = document.getElementsByTagName('canvas'), + filenames; + + for (i = 0, l = canvas.length; i < l; i++) { + // datasrc and data-src are deprecated. + var processingSources = canvas[i].getAttribute('data-processing-sources'); + if (processingSources === null) { + // Temporary fallback for datasrc and data-src + processingSources = canvas[i].getAttribute('data-src'); + if (processingSources === null) { + processingSources = canvas[i].getAttribute('datasrc'); } - for (var i = 0; i < bucket.length; ++i) { - if (virtEquals(bucket[i].key, key)) { - return bucket[i].value; + } + if (processingSources) { + filenames = processingSources.split(/\s+/g); + for (var j = 0; j < filenames.length;) { + if (filenames[j]) { + j++; + } else { + filenames.splice(j, 1); } } - return null; - }; + loadSketchFromSources(canvas[i], filenames); + } + } - this.isEmpty = function() { - return count === 0; - }; + // also process all + + +

Processing.js

+ + + + diff --git a/test.js b/test.js new file mode 100755 index 000000000..46f0e520d --- /dev/null +++ b/test.js @@ -0,0 +1,154 @@ +// runtime argument handling +argv = require("argv"), +argv.option({ + name: 'test', + type: 'string', + description: 'Run a single test, rather than all tests.', + example: "'node test --test=unittest.pde'" +}); +argv.option({ + name: 'nobuild', + type: 'string', + description: 'Do not build processing.js prior to running tests.', + example: "'node test --nobuild'" +}); +argv.option({ + name: 'failonerror', + type: 'string', + description: 'Stop running on the first error encountered', + example: "'node test --failonerror'" +}); +argv.option({ + name: 'noref', + type: 'string', + description: 'Do not perform reference testing in the browser after building processing.js', + example: "'node test --noref'" +}); +argv.option({ + name: 'noautoref', + type: 'string', + description: 'Open the reference test page after building processing.js, but do not autorun', + example: "'node test --noautoref'" +}); +argv = argv.run().options; + + +// nodejs requirements +var Browser = require('./lib/Browser'), + canvas = Browser.document.createElement("canvas"), + exec = require('child_process').exec, + fs = require("fs"), + open = require('open'), + testHarness = require("./lib/TestHarness"), + unitDir = "./test/unit"; + +// script vars +var _passcount = 0, + _failcount = 0, + Processing = require('./src/')(Browser, testHarness); + + +/** + * Run a test from the unit test directory + */ +function runTest(dir, testName) { + var test, + sketch; + + // shortcut on not-pde-files, for now. + if (testName.indexOf(".pde")===-1) { + + // recurse dirs + if(fs.statSync(dir + testName).isDirectory()) { + runTests(dir + testName + "/"); + } + + return; + } + + // run test for this file. + test = fs.readFileSync(dir + testName, "utf-8"); + testHarness.prep(testName); + try { + sketch = new Processing(canvas, test, testHarness); + if(sketch._failCount > 0) { + throw "\n [one or more tests failed]"; + } + console.log("- " + testName + " passed."); + _passcount++; + } + catch (e) { + console.log(e); + if (!sketch) { + console.log("could not build sketch for " + testName); + } else { + console.log(" " + testName + " failed (" + sketch._failCount + " times)\n"); + } + _failcount++; + if (!argv.test && argv.failonerror) { + throw new Error("fail on error specified"); + } + } +} + +/** + * Run all tests from the unit test directory + */ +function runTests(dir, next) { + // scan unit test directory for tests to execute + dirContent = fs.readdirSync(dir); + try { + console.log(); + dirContent.forEach(function(file) { + runTest(dir, file); + }); + } catch (e) { + if(argv.failonerror) { + console.log("Failing on first error"); + } else { throw e; } + } + + if(next) { next(); } +} + +/** + * run the tests, either with or without building + */ +var postOp = function() { + console.log("\n"+_passcount+" tests passed, "+_failcount+" tests failed.\n"); + + if(_failcount===0 && !argv.nobuild) { + console.log("\nall tests pass: building processing.js..."); + exec('browserify build.js -o processing.js', function() { + console.log("build finished."); + console.log("minifying to processing.min.js"); + exec('node minify', function() { + console.log("finished"); + if(!argv.noref) { + console.log("\nStarting web server for reference testing..."); + console.log("Test server will terminate once all tests have run."); + exec('node server', function(error, stdout, stderr) { + var lines = stdout.split("\n"), + len = lines.length, + counts = lines[len-2].split(".").map(function(v) { return parseInt(v, 10); }), + failed = counts[0] + counts[1], + known = counts[1], + passed = counts[2]; + console.log("done - "+passed+" tests passed, "+failed+" tests failed (of which "+known+" known fails)."); + }); + // open reference tests in the browser and auto-run + open("http://localhost:3000/ref/" + (argv.noautoref ? '' : "?autorun=true")); + } + }); + }); + } +}; +if (argv.nobuild) { postOp = function(){}; } + +if (argv.test) { + console.log("running test " + argv.test); + runTest("./test/unit/", argv.test); +} else { + console.log("running tests..."); + runTests("./test/unit/", postOp); +} diff --git a/test/KNOWN-FAILURES b/test/KNOWN-FAILURES deleted file mode 100644 index ddd691d80..000000000 --- a/test/KNOWN-FAILURES +++ /dev/null @@ -1,15 +0,0 @@ -# List of tests known to fail. If you add a test, path must be from processing.js -# source dir (e.g., ./test) and must include the full path from test/ forward. You -# can temporarily remove a test from this list by commenting it out with a leading # -# and add comments explaining why a test has been added/commented out. - -# SimpleDateFormat -test/parser/Fry-Visualizing-Data/ch05-salaryper/step_08b_web/step_08b_web.pde -# test harness issue: Background image must be the same dimensions as the canvas. -test/parser/Processing-Book-001/Units 31-42/40 Image 5/_11/_11.pde -# createWriter (see #166) -test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_08c_graphviz/step_08c_graphviz.pde -test/parser/Processing-Book-001/Units 43-51/45 Output 2/_04/_04.pde -test/parser/Processing-Book-001/Units 43-51/45 Output 2/_05/_05.pde -# Uses code that isn't even supported by Processing -test/parser/Processing-Book-001/Extensions/Mobile/_07/_07.pde diff --git a/test/README b/test/README deleted file mode 100644 index e007c195c..000000000 --- a/test/README +++ /dev/null @@ -1,93 +0,0 @@ - === AUTOMATED TESTINTG =========================== - - 1. Setup and Install - 2. Running Tests - 3. Reference - - - 1 --- SETUP AND INSTALL -------------------------- - - Processing.js automated tests rely on a working JavaScript Shell. - The easiest way to do this is to build one from source. First you - will need a working Mozilla build environment: - - https://developer.mozilla.org/en/Build_Documentation - - Next, obtain the Firefox source code: - - $ hg clone http://hg.mozilla.org/mozilla-central - - Now configure and build the source (NOTE: use the appropriate - autoconf v 2.13 for your system, autoconf213, autoconf-2.13, etc.): - - $ cd mozilla-central/js/src - $ autoconf213 - $ mkdir opt-build - $ ../configure --disable-debug --enable-optimize - $ make - - This should produce a working JavaScript Shell at: - - mozilla-central/js/src/opt-build/js - - - Create an environment variable called JSSHELL that points to your - new JavaScript shell executable. - - For Example, in unix, edit your ~/.profile, ~/.bashrc, or ~/.bash_profile - and add the following - - export JSSHELL=/home/user/mozilla-central/objdir-release/dist/bin/js - - - 2 --- RUNNING TESTS ------------------------------ - - Once you have a working JS Shell, you can run tests and do other - tasks like so: - - 1) Run all tests (unit, parser): - - $ make check - - 2) Run only parser tests: - - $ make check-parser - - 3) Run only unit tests: - - $ make check-unit - - 4) Run only one test, or tests under a particular dir: - - $ make check-one TEST=/path/to/single/test.js - - or - - $ make check-one TEST=/path/to/dir/with/tests - - 5) Parse a Processing file into JavaScript: - - $ make /path/to/processing-pde-file.js - - For example, given /tmp/foo.pde (note the extension): - - $ make /tmp/foo.js - - 6) Create a release: - - $ make release - - 7) Clean out old release: - - $ make clean - - 8) Check Processing.js for errors (jslint): - - $ make check-lint - - - 3 --- REFERENCES ------------------------------ - - See https://processing-js.lighthouseapp.com/projects/41284/writing-automated-tests - for further documentation on testing and writing proper tests. - diff --git a/test/lint-notes.txt b/test/lint-notes.txt deleted file mode 100644 index 174be07e1..000000000 --- a/test/lint-notes.txt +++ /dev/null @@ -1,25 +0,0 @@ -NOTES FOR LINTING - -Use: http://jslint.com - -Errors Allowed: - -[ IGNORE THESE THREE LOOPS IN REGEX PARSER ] -Problem at line 126 character 10: Be careful when making functions within a loop. Consider putting the function in a closure. -Problem at line 224 character 10: Be careful when making functions within a loop. Consider putting the function in a closure. -Problem at line 231 character 10: Be careful when making functions within a loop. Consider putting the function in a closure. - -[ IGNORE THESE EVAL ERRORS ] -Problem at line 3272 character 17: eval is evil: eval( path ); -Problem at line 3384 character 15: eval is evil: eval(parsedCode); - -[ PROBLEMS WITH 'with(p)' ] -Lint at line 3374 character 11: Expected an identifier and instead saw 'with'. - -'with(p)' will not lint correctly and will halt the linting process. Please comment out the with block starting on line 3374 if -you wish to completely lint the processing.js source. - -Globals Allowed: - document - window - diff --git a/test/manual/scroll.html b/test/manual/scroll.html new file mode 100644 index 000000000..af458e799 --- /dev/null +++ b/test/manual/scroll.html @@ -0,0 +1,50 @@ + + + + + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum convallis quam in rhoncus. Aliquam in facilisis lacus. Fusce orci libero, condimentum eu mollis et, venenatis vel eros. Nam porttitor est dui, non interdum dolor laoreet vel. Cras laoreet diam in ex elementum aliquet. Sed lacinia at nisl ut commodo. Praesent imperdiet venenatis mi. Cras a aliquet leo. Nunc justo metus, sodales sit amet sollicitudin in, pharetra ac libero. In dignissim lobortis urna, sed bibendum justo pulvinar non. Praesent mollis, nibh at aliquet varius, urna mi suscipit lorem, et vehicula nisl mi quis tellus. Integer condimentum, massa vestibulum fringilla lobortis, nisi orci scelerisque eros, nec ultrices ligula metus non quam. Aliquam maximus id velit nec sollicitudin. Donec rutrum auctor elit. Etiam laoreet suscipit ex eget feugiat. Sed elementum sit amet orci vel sollicitudin.

+ + + +

Proin enim leo, vestibulum ut erat sit amet, ullamcorper accumsan tortor. Etiam quis leo sit amet ligula cursus lobortis ac id ante. Nunc facilisis, quam vitae rhoncus luctus, orci lacus volutpat diam, eget pretium tortor elit non sem. Ut sodales, neque sed dapibus egestas, felis libero interdum dolor, a hendrerit purus eros at tellus. Praesent id blandit elit. Mauris in urna rhoncus, malesuada nisi vehicula, consequat nisl. Nulla facilisi. Donec blandit eros quis justo vehicula venenatis. Praesent auctor lectus ac pharetra lobortis. Sed varius faucibus sapien, sed scelerisque turpis commodo vel. Pellentesque ac quam massa. Cras non ornare nulla. Ut elementum magna eu ligula faucibus lobortis.

+ +

Phasellus luctus massa quis ullamcorper auctor. Fusce posuere tempor velit, nec lacinia dui volutpat in. Quisque tempor elit orci, eu imperdiet lectus ullamcorper eu. Maecenas molestie libero vitae fermentum mollis. Aenean venenatis lacus ac ex malesuada, malesuada tempus ipsum varius. Vestibulum ac magna nec libero eleifend fringilla vitae ut mauris. Sed vehicula neque lorem, vel commodo urna commodo vel. Duis lobortis dapibus neque, vel facilisis neque aliquet vitae. Aliquam feugiat commodo mauris, tincidunt imperdiet neque pulvinar id. Vivamus eget rhoncus nulla. Maecenas tempor urna a diam rhoncus, sit amet ultricies nisi vestibulum. Fusce a porttitor tellus. Nulla at tempus dui. Praesent ut aliquam eros, eget vulputate libero. Nunc pulvinar nisl et placerat fermentum.

+ +

Duis ultricies nisl ligula, vel pellentesque diam vestibulum a. In nec nulla quis metus ultrices porttitor. Mauris sed rutrum lectus. Etiam et ligula quis ante pulvinar dapibus eget sit amet nisl. Quisque sed vestibulum nisi, sit amet condimentum neque. Nulla at nibh ut lorem malesuada aliquam. Vestibulum ipsum mi, congue in condimentum in, faucibus id neque.

+ +

Aenean congue scelerisque venenatis. Aliquam posuere, dui ac venenatis volutpat, sem lectus euismod tortor, eu viverra lacus ligula sed eros. Donec aliquet leo magna, nec pharetra sapien dignissim id. Suspendisse ac posuere tortor. Vestibulum sit amet dui at ex facilisis maximus. Nulla vestibulum nibh facilisis nulla suscipit ullamcorper. Suspendisse euismod arcu lorem, sed ornare leo gravida vel. Aenean ut purus viverra, porttitor ex id, consectetur urna. Morbi eget placerat nisi. Suspendisse sed diam non nisl vestibulum accumsan. Nam interdum sed mi hendrerit faucibus. Interdum et malesuada fames ac ante ipsum primis in faucibus.

+ +

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum convallis quam in rhoncus. Aliquam in facilisis lacus. Fusce orci libero, condimentum eu mollis et, venenatis vel eros. Nam porttitor est dui, non interdum dolor laoreet vel. Cras laoreet diam in ex elementum aliquet. Sed lacinia at nisl ut commodo. Praesent imperdiet venenatis mi. Cras a aliquet leo. Nunc justo metus, sodales sit amet sollicitudin in, pharetra ac libero. In dignissim lobortis urna, sed bibendum justo pulvinar non. Praesent mollis, nibh at aliquet varius, urna mi suscipit lorem, et vehicula nisl mi quis tellus. Integer condimentum, massa vestibulum fringilla lobortis, nisi orci scelerisque eros, nec ultrices ligula metus non quam. Aliquam maximus id velit nec sollicitudin. Donec rutrum auctor elit. Etiam laoreet suscipit ex eget feugiat. Sed elementum sit amet orci vel sollicitudin.

+ +

Proin enim leo, vestibulum ut erat sit amet, ullamcorper accumsan tortor. Etiam quis leo sit amet ligula cursus lobortis ac id ante. Nunc facilisis, quam vitae rhoncus luctus, orci lacus volutpat diam, eget pretium tortor elit non sem. Ut sodales, neque sed dapibus egestas, felis libero interdum dolor, a hendrerit purus eros at tellus. Praesent id blandit elit. Mauris in urna rhoncus, malesuada nisi vehicula, consequat nisl. Nulla facilisi. Donec blandit eros quis justo vehicula venenatis. Praesent auctor lectus ac pharetra lobortis. Sed varius faucibus sapien, sed scelerisque turpis commodo vel. Pellentesque ac quam massa. Cras non ornare nulla. Ut elementum magna eu ligula faucibus lobortis.

+ +

Phasellus luctus massa quis ullamcorper auctor. Fusce posuere tempor velit, nec lacinia dui volutpat in. Quisque tempor elit orci, eu imperdiet lectus ullamcorper eu. Maecenas molestie libero vitae fermentum mollis. Aenean venenatis lacus ac ex malesuada, malesuada tempus ipsum varius. Vestibulum ac magna nec libero eleifend fringilla vitae ut mauris. Sed vehicula neque lorem, vel commodo urna commodo vel. Duis lobortis dapibus neque, vel facilisis neque aliquet vitae. Aliquam feugiat commodo mauris, tincidunt imperdiet neque pulvinar id. Vivamus eget rhoncus nulla. Maecenas tempor urna a diam rhoncus, sit amet ultricies nisi vestibulum. Fusce a porttitor tellus. Nulla at tempus dui. Praesent ut aliquam eros, eget vulputate libero. Nunc pulvinar nisl et placerat fermentum.

+ +

Duis ultricies nisl ligula, vel pellentesque diam vestibulum a. In nec nulla quis metus ultrices porttitor. Mauris sed rutrum lectus. Etiam et ligula quis ante pulvinar dapibus eget sit amet nisl. Quisque sed vestibulum nisi, sit amet condimentum neque. Nulla at nibh ut lorem malesuada aliquam. Vestibulum ipsum mi, congue in condimentum in, faucibus id neque.

+ +

Aenean congue scelerisque venenatis. Aliquam posuere, dui ac venenatis volutpat, sem lectus euismod tortor, eu viverra lacus ligula sed eros. Donec aliquet leo magna, nec pharetra sapien dignissim id. Suspendisse ac posuere tortor. Vestibulum sit amet dui at ex facilisis maximus. Nulla vestibulum nibh facilisis nulla suscipit ullamcorper. Suspendisse euismod arcu lorem, sed ornare leo gravida vel. Aenean ut purus viverra, porttitor ex id, consectetur urna. Morbi eget placerat nisi. Suspendisse sed diam non nisl vestibulum accumsan. Nam interdum sed mi hendrerit faucibus. Interdum et malesuada fames ac ante ipsum primis in faucibus.

+ diff --git a/test/manual/test-issue-99.html b/test/manual/test-issue-99.html new file mode 100644 index 000000000..6a485bfae --- /dev/null +++ b/test/manual/test-issue-99.html @@ -0,0 +1,50 @@ + + + +ProcessingJS.org :: Manual Test for Issue #99 + + + + + +

Manual Test for Issue #99

+

Manual test verify the fix for +Issue #99 : touch events not working after v1.4.1.

+ +
+ + +
+ +
+
    +
  1. + 1. initial drawing: grey square centred on black background + +
  2. +
  3. + 2. on hover: grey square with white outline centred on black background + +
  4. +
  5. + 3. on mousedown : white square centred on black background + +
  6. +
  7. + 4. on mouse move: white square moved to bottom corner of black background + +
  8. +
+
+ + + + diff --git a/test/manual/test-issue-99.pde b/test/manual/test-issue-99.pde new file mode 100644 index 000000000..2c75b86f7 --- /dev/null +++ b/test/manual/test-issue-99.pde @@ -0,0 +1,61 @@ +// https://processing.org/examples/mousefunctions.html +float bx; +float by; +int boxSize = 15; +boolean overBox = false; +boolean locked = false; +float xOffset = 0.0; +float yOffset = 0.0; + +void setup() +{ + size(60, 60); + bx = width/2.0; + by = height/2.0; + rectMode(RADIUS); +} + +void draw() +{ + background(0); + + // Test if the cursor is over the box + if (mouseX > bx-boxSize && mouseX < bx+boxSize && + mouseY > by-boxSize && mouseY < by+boxSize) { + overBox = true; + if(!locked) { + stroke(255); + fill(153); + } + } else { + stroke(153); + fill(153); + overBox = false; + } + + // Draw the box + rect(bx, by, boxSize, boxSize); +} + +void mousePressed() { + if(overBox) { + locked = true; + fill(255, 255, 255); + } else { + locked = false; + } + xOffset = mouseX-bx; + yOffset = mouseY-by; + +} + +void mouseDragged() { + if(locked) { + bx = mouseX-xOffset; + by = mouseY-yOffset; + } +} + +void mouseReleased() { + locked = false; +} diff --git a/test/old/ref-tests/Biotyp.svg b/test/old/ref-tests/Biotyp.svg deleted file mode 100644 index 6b4508447..000000000 --- a/test/old/ref-tests/Biotyp.svg +++ /dev/null @@ -1,855 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/old/ref-tests/ajax.me b/test/old/ref-tests/ajax.me deleted file mode 100644 index 0945c83f3..000000000 --- a/test/old/ref-tests/ajax.me +++ /dev/null @@ -1,3 +0,0 @@ -255 -255 -0 diff --git a/test/old/ref-tests/arc_fill.gif b/test/old/ref-tests/arc_fill.gif deleted file mode 100644 index 0d273d00c..000000000 Binary files a/test/old/ref-tests/arc_fill.gif and /dev/null differ diff --git a/test/old/ref-tests/ellipse.gif b/test/old/ref-tests/ellipse.gif deleted file mode 100644 index 159a6ce23..000000000 Binary files a/test/old/ref-tests/ellipse.gif and /dev/null differ diff --git a/test/old/ref-tests/gradient.jpeg b/test/old/ref-tests/gradient.jpeg deleted file mode 100644 index 0b1d55f49..000000000 Binary files a/test/old/ref-tests/gradient.jpeg and /dev/null differ diff --git a/test/old/ref-tests/green-square.gif b/test/old/ref-tests/green-square.gif deleted file mode 100644 index ddd53d6f9..000000000 Binary files a/test/old/ref-tests/green-square.gif and /dev/null differ diff --git a/test/old/ref-tests/index.html b/test/old/ref-tests/index.html deleted file mode 100644 index 0ef93b770..000000000 --- a/test/old/ref-tests/index.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - -Processing.js Benchmarks - - - - - -

Processing.js Benchmarks

-

All Canvas elements should render green

- -

set() pixel

- -

- -

get() pixel

- -

- - -

get() pixels

- -

- - -

updatePixels()

- -

- -

background()
as image

- -

- -

loadImage()

- -

- -

text()

- -

- - - - - - - -

background

- -

- - -

stroke

- -

- - -

noStroke

- -

- -

fill

- -

- -

noFill

- -

- -

ellipse

- -

- -

loadStrings

- -

- - -

color #HEX

- -

- - -

color rgb()

- -

- - -

color rgba()

- -

- -

red()

- -

- - -

green()

- -

- - -

blue()

- -

- -

alpha()

- -

- -

lerp

- -

- -

lerpColor

- -

- - -

arc with fill

- -

- - - - diff --git a/test/old/ref-tests/obama_smoking.jpg b/test/old/ref-tests/obama_smoking.jpg deleted file mode 100644 index 8059efc27..000000000 Binary files a/test/old/ref-tests/obama_smoking.jpg and /dev/null differ diff --git a/test/old/unit-tests/ArrayList b/test/old/unit-tests/ArrayList deleted file mode 100644 index cda1f13f4..000000000 --- a/test/old/unit-tests/ArrayList +++ /dev/null @@ -1,25 +0,0 @@ -/* - Processing.js Ref Test - Function : ArrayList() - Source : http://processing.org/reference/ArrayList_ -*/ - - -balls = new ArrayList(); // Create an empty ArrayList -balls.add( new Ball( 0 ) ); - -class Ball { - Ball (float y) { - - } - void update() { - } -} - -//** REFTEST VALUES **// -background( - reftest.checkValues([ - ]) -); -exit(); - diff --git a/test/old/unit-tests/ajax.me b/test/old/unit-tests/ajax.me deleted file mode 100644 index 0945c83f3..000000000 --- a/test/old/unit-tests/ajax.me +++ /dev/null @@ -1,3 +0,0 @@ -255 -255 -0 diff --git a/test/old/unit-tests/append b/test/old/unit-tests/append deleted file mode 100644 index 045e08531..000000000 --- a/test/old/unit-tests/append +++ /dev/null @@ -1,23 +0,0 @@ -/* - Processing.js Ref Test - Function : append() - Source : http://processing.org/reference/append_ -*/ - - -String[] sa1 = { "OH ", "NY ", "CA "}; -String[] sa2 = append(sa1, "MA "); - - -//** REFTEST VALUES **// -background( - reftest.checkValues([ - sa2[0] === "OH ", - sa2[1] === "NY ", - sa2[2] === "CA ", - sa2[3] === "MA " - // need checks for other 'types' - ]) -); -exit(); - diff --git a/test/old/unit-tests/concat b/test/old/unit-tests/concat deleted file mode 100644 index 3ee09b81e..000000000 --- a/test/old/unit-tests/concat +++ /dev/null @@ -1,26 +0,0 @@ -/* - Processing.js Ref Test - Function : concat() - Source : http://processing.org/reference/concat_ -*/ - - -String[] sa1 = { "OH ", "NY ", "CA "}; -String[] sa2 = { "KY ", "IN ", "MA "}; -String[] sa3 = concat(sa1, sa2); - - -//** REFTEST VALUES **// -background( - reftest.checkValues([ - sa3[0] === "OH ", - sa3[1] === "NY ", - sa3[2] === "CA ", - sa3[3] === "KY ", - sa3[4] === "IN ", - sa3[5] === "MA " - // need checks for other 'types' - ]) -); -exit(); - diff --git a/test/old/unit-tests/end-of-tests b/test/old/unit-tests/end-of-tests deleted file mode 100644 index 6ef363d75..000000000 --- a/test/old/unit-tests/end-of-tests +++ /dev/null @@ -1,21 +0,0 @@ -/* - Processing.js Ref Test - Function : tests finished, display results. - Source : F1LT3R -*/ - -var div = document.getElementById( "results" ); - -div.innerHTML = "Passed: " + reftest.passed + " (" + reftest.passrate + ")
" + - "Failed: " + reftest.failed + " (" + reftest.failrate + ")
" + - "Fails:
" + - (function(){ - var fails = "
    "; - for(var i in reftest.testlist){ - if( reftest.testlist[i].failed ){ - fails += "
  • " + reftest.testlist[i].name + "
  • "; - } - } - fails += "
"; - return fails; - })(); diff --git a/test/old/unit-tests/expand b/test/old/unit-tests/expand deleted file mode 100644 index d0c4bf45b..000000000 --- a/test/old/unit-tests/expand +++ /dev/null @@ -1,37 +0,0 @@ -/* - Processing.js Ref Test - Function : expand() - Source : http://processing.org/reference/expand_ -*/ - - - int[] data = {0, 1, 3, 4}; - int a = data.length; // Prints "4" - data = expand(data); - int b = data.length; // Prints "8" - data = expand(data, 512); - int c = data.length; // Prints "512" - - int d, e; - - // PImage not fully implemented -F1LT3R - /* - PImage[] imgs = new PImage[32]; - int d = imgs.length; // Prints "32" - imgs = (PImage[]) expand(imgs); - int e =imgs.length; // Prints "64" - */ - - -//** REFTEST VALUES **// -background( - reftest.checkValues([ - a === 4, - b === 8, - c === 512, - //d === 32, - //e === 64, - ]) -); -exit(); - diff --git a/test/old/unit-tests/index.html b/test/old/unit-tests/index.html deleted file mode 100644 index 0f2764718..000000000 --- a/test/old/unit-tests/index.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - -
- - -
- - - - - - - -
- - - - diff --git a/test/old/unit-tests/join b/test/old/unit-tests/join deleted file mode 100644 index d694f8f43..000000000 --- a/test/old/unit-tests/join +++ /dev/null @@ -1,36 +0,0 @@ -/* - Processing.js Ref Test - Function : join() - Source : http://processing.org/reference/join_ -*/ - -String[] animals = new String[3]; -animals[0] = "cat"; -animals[1] = "seal"; -animals[2] = "bear"; -String joinedAnimals = join(animals, " : "); -//console.log(joinedAnimals); // Prints "cat : seal : bear" - -// Joining an array of ints requires first -// converting to an array of Strings -int[] numbers = new int[3]; -numbers[0] = 8; -numbers[1] = 67; -numbers[2] = 5; - -// An array should be returned from nf(numbers,0). This is breaks the join test. -try{ - String joinedNumbers = join( nf(numbers, 0), ", "); -}catch( e ){} -//console.log( joinedNumbers ); // Prints "8, 67, 5" - - -//** REFTEST VALUES **// -background( - reftest.checkValues([ - joinedAnimals === "cat : seal : bear", - joinedNumbers === "8, 67, 5" - ]) -); -exit(); - diff --git a/test/old/unit-tests/rect b/test/old/unit-tests/rect deleted file mode 100644 index 9f931a654..000000000 --- a/test/old/unit-tests/rect +++ /dev/null @@ -1,18 +0,0 @@ -/* - Processing.js Ref Test - Function : rect() - Source : F1LT3R -*/ - -//** SET PIXELS SIZE *// -size( 20, 20 ); // This must be set for tests using checkPixels(); -//********************// - -fill( #00FF00 ); -rect( -3, -3, 26, 26 ); - - -//** REFTEST PIXELS **// -background( reftest.checkPixels() ); -exit(); -//********************// diff --git a/test/old/unit-tests/reftest.lib b/test/old/unit-tests/reftest.lib deleted file mode 100644 index 03122c151..000000000 --- a/test/old/unit-tests/reftest.lib +++ /dev/null @@ -1,71 +0,0 @@ -// Lib for reftesting -(function(){ - - Processing.lib.reftest = { - - testlist : [], - passed : 0, - failed : 0, - passrate : 0, - failrate : 0, - - postResultsURL : "http://...", - - // Check functions that change values - checkValues: function( p, checks ){ - - var passed = 0; - var name = p.curContext.canvas.getAttribute( 'datasrc' ); - p.curContext.canvas.title = name; - - for(var i in checks){ - passed += checks[ i ]; - }; - var failed = i - passed + 1; - - this.passed += !failed; - this.failed += !!failed; - this.passrate += passed; - this.failrate += failed; - - this.testlist[ this.testlist.length ] = { - name: name, - passed: passed, - failed: failed - } - - return failed ? "#FF0000" : "#00FF00"; - - }, - - // Check functions that change pixels - checkPixels: function( p ){ - - p.loadPixels(); - var passed = 0; - var name = p.curContext.canvas.getAttribute( 'datasrc' ); - p.curContext.canvas.title = name; - - for(var i in p.pixels){ - passed += p.pixels[ i ] == "rgba(0,255,0,255)"; - } - var failed = i - passed + 1; - - this.passed += !failed; - this.failed += !!failed; - this.passrate += passed; - this.failrate += failed; - - this.testlist[ this.testlist.length ] = { - name: name, - passed: passed, - failed: failed - } - - return failed ? "#FF0000" : "#00FF00"; - - } - - }; - -})(); diff --git a/test/old/unit-tests/shorten b/test/old/unit-tests/shorten deleted file mode 100644 index 2953ab12b..000000000 --- a/test/old/unit-tests/shorten +++ /dev/null @@ -1,25 +0,0 @@ -/* - Processing.js Ref Test - Function : shorten() - Source : http://processing.org/reference/shorten_ -*/ - - -String[] sa1 = { "OH ", "NY ", "CA "}; -String[] sa2 = shorten(sa1); -//println(sa1); // sa1 still contains OH, NY, CA -//println(sa2); // sa2 now contains OH, NY - -//** REFTEST VALUES **// -background( - reftest.checkValues([ - sa1[0] === "OH ", - sa1[1] === "NY ", - sa1[2] === "CA ", - // Need to add tests to handle arrays of objects - sa2[0] === "OH ", - sa2[1] === "NY " - ]) -); -exit(); - diff --git a/test/old/unit-tests/splice b/test/old/unit-tests/splice deleted file mode 100644 index d6a39b9f9..000000000 --- a/test/old/unit-tests/splice +++ /dev/null @@ -1,34 +0,0 @@ -/* - Processing.js Ref Test - Function : splice() - Source : http://processing.org/reference/splice_ -*/ - - -String[] sa1 = { "OH", "NY", "CA" }; -sa1 = splice(sa1, "KY", 1); - -String[] sa2 = { "VA", "CO", "IL" }; -sa2 = splice(sa1, sa2, 2); - - -//** REFTEST VALUES **// -background( - reftest.checkValues([ - sa1[0] === "OH", - sa1[1] === "KY", - sa1[2] === "NY", - sa1[3] === "CA", - - sa2[0] === "OH", - sa2[1] === "KY", - sa2[2] === "VA", - sa2[3] === "CO", - sa2[4] === "IL", - sa2[5] === "NY", - sa2[6] === "CA" - // need checks for other 'types' - ]) -); -exit(); - diff --git a/test/old/unit-tests/split b/test/old/unit-tests/split deleted file mode 100644 index 0c9d2c9e0..000000000 --- a/test/old/unit-tests/split +++ /dev/null @@ -1,37 +0,0 @@ -/* - Processing.js Ref Test - Function : split() - Source : http://processing.org/reference/split_ -*/ - - -String men = "Chernenko,Andropov,Brezhnev"; -String[] list = split(men, ','); -// list[0] is now Chernenko, list[1] is Andropov, ... - -String numbers = "8 67 5 309"; -int[] nums = int(split(numbers, ' ')); -// nums[0] is now 8, nums[1] is now 67, ... - -// nums is broken... but this works: int[] nums = split(numbers, ' '); -// even though that works, nums should be returning an Int not a String - -String men2 = "Chernenko ] Andropov ] Brezhnev"; -String[] list2 = split(men2, " ] "); -// list[0] is now Chernenko, list[1] is Andropov, .. - -//** REFTEST VALUES **// - - -background( - reftest.checkValues(p, [ - list[0] === "Chernenko", - list[1] === "Andropov", - nums[0] === 8, - nums[1] === 67, - list2[0] === "Chernenko", - list2[1] === "Andropov" - ]) -); -exit(); - diff --git a/test/old/unit-tests/splitTokens b/test/old/unit-tests/splitTokens deleted file mode 100644 index 385889b60..000000000 --- a/test/old/unit-tests/splitTokens +++ /dev/null @@ -1,24 +0,0 @@ -/* - Processing.js Ref Test - Function : splitTokens() - Source : http://processing.org/reference/splitTokens_ -*/ - -String t = "a b"; -String[] q = splitTokens(t); -String s = "a, b c ,,d "; -String[] p = splitTokens(s, ", "); // string passed should be treated as an array -F1LT3R - -//** REFTEST VALUES **// -background( - reftest.checkValues([ - q[0] === "a", - q[1] === "b", - s[0] === "a", - s[1] === "b", - s[2] === "c", - s[3] === "d", - ]) -); -exit(); - diff --git a/test/old/unit-tests/subset b/test/old/unit-tests/subset deleted file mode 100644 index 21fe6c6b5..000000000 --- a/test/old/unit-tests/subset +++ /dev/null @@ -1,36 +0,0 @@ -/* - Processing.js Ref Test - Function : subset() - Source : http://processing.org/reference/subset_ -*/ - - -String[] sa1 = { "OH ", "NY ", "CA ", "VA ", "CO ", "IL "}; -String[] sa2 = subset(sa1, 1); -String[] sa3 = subset(sa1, 2, 3); - - -//** REFTEST VALUES **// -background( - reftest.checkValues([ - sa1[0] === "OH ", - sa1[1] === "NY ", - sa1[2] === "CA ", - sa1[3] === "VA ", - sa1[4] === "CO ", - sa1[5] === "IL ", - - sa2[0] === "NY ", - sa2[1] === "CA ", - sa2[2] === "VA ", - sa2[3] === "CO ", - sa2[4] === "IL ", - - sa3[0] === "CA ", - sa3[1] === "VA ", - sa3[2] === "CO " - // need checks for other 'types' - ]) -); -exit(); - diff --git a/test/old/unit-tests/test.lib b/test/old/unit-tests/test.lib deleted file mode 100644 index 5998940f6..000000000 --- a/test/old/unit-tests/test.lib +++ /dev/null @@ -1 +0,0 @@ -Processing.libs.retest diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step00_show_map/step00_show_map.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step00_show_map/step00_show_map.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step01_fig1_red_dots/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step01_fig1_red_dots/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step01_fig1_red_dots/step01_fig1_red_dots.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step01_fig1_red_dots/step01_fig1_red_dots.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step02_fig2_varying_sizes/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step02_fig2_varying_sizes/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step02_fig2_varying_sizes/step02_fig2_varying_sizes.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step02_fig2_varying_sizes/step02_fig2_varying_sizes.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step03_fig3_red_to_blue/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step03_fig3_red_to_blue/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step03_fig3_red_to_blue/step03_fig3_red_to_blue.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step03_fig3_red_to_blue/step03_fig3_red_to_blue.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step04_fig4_blue_green/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step04_fig4_blue_green/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step04_fig4_blue_green/step04_fig4_blue_green.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step04_fig4_blue_green/step04_fig4_blue_green.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step05_fig5_blue_green_hsb/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step05_fig5_blue_green_hsb/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step05_fig5_blue_green_hsb/step05_fig5_blue_green_hsb.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step05_fig5_blue_green_hsb/step05_fig5_blue_green_hsb.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step06_fig6_two_sided_range/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step06_fig6_two_sided_range/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step06_fig6_two_sided_range/step06_fig6_two_sided_range.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step06_fig6_two_sided_range/step06_fig6_two_sided_range.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step07_fig7_two_sided_alpha/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step07_fig7_two_sided_alpha/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step07_fig7_two_sided_alpha/step07_fig7_two_sided_alpha.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step07_fig7_two_sided_alpha/step07_fig7_two_sided_alpha.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step08_rollovers/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step08_rollovers/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step08_rollovers/step08_rollovers.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step08_rollovers/step08_rollovers.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step09_rollovers_full_names/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step09_rollovers_full_names/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step09_rollovers_full_names/step09_rollovers_full_names.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step09_rollovers_full_names/step09_rollovers_full_names.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step10_single_rollover/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step10_single_rollover/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step10_single_rollover/step10_single_rollover.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step10_single_rollover/step10_single_rollover.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step11_randomize_on_keypress/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step11_randomize_on_keypress/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step11_randomize_on_keypress/step11_randomize_on_keypress.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step11_randomize_on_keypress/step11_randomize_on_keypress.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step12_randomize_with_nfp/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step12_randomize_with_nfp/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step12_randomize_with_nfp/step12_randomize_with_nfp.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step12_randomize_with_nfp/step12_randomize_with_nfp.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step13_randomize_from_cgi/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step13_randomize_from_cgi/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step13_randomize_from_cgi/step13_randomize_from_cgi.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step13_randomize_from_cgi/step13_randomize_from_cgi.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step14_integrators/Integrator.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step14_integrators/Integrator.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step14_integrators/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step14_integrators/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step14_integrators/step14_integrators.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step14_integrators/step14_integrators.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step15_framerate/Integrator.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step15_framerate/Integrator.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step15_framerate/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step15_framerate/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step15_framerate/step15_framerate.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step15_framerate/step15_framerate.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step16_lethargic/Integrator.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step16_lethargic/Integrator.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step16_lethargic/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step16_lethargic/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step16_lethargic/step16_lethargic.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step16_lethargic/step16_lethargic.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step17_bouncy/Integrator.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step17_bouncy/Integrator.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step17_bouncy/Table.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step17_bouncy/Table.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch03-usmap/step17_bouncy/step17_bouncy.pde b/test/parser/Fry-Visualizing-Data/ch03-usmap/step17_bouncy/step17_bouncy.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_01_just_points/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_01_just_points/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_01_just_points/figure_01_just_points.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_01_just_points/figure_01_just_points.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_02_plot_title/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_02_plot_title/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_02_plot_title/figure_02_plot_title.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_02_plot_title/figure_02_plot_title.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_05_ylabels_and_ticks/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_05_ylabels_and_ticks/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_05_ylabels_and_ticks/figure_05_ylabels_and_ticks.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_05_ylabels_and_ticks/figure_05_ylabels_and_ticks.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_06_finalish/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_06_finalish/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_06_finalish/figure_06_finalish.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_06_finalish/figure_06_finalish.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_07a_shape_noFill/figure_07a_shape_noFill.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_07a_shape_noFill/figure_07a_shape_noFill.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_07b_shape_fill/figure_07b_shape_fill.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_07b_shape_fill/figure_07b_shape_fill.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_07c_shape_close/figure_07c_shape_close.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_07c_shape_close/figure_07c_shape_close.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_08_draw_data_line/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_08_draw_data_line/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_08_draw_data_line/figure_08_draw_data_line.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_08_draw_data_line/figure_08_draw_data_line.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_09_draw_data_mixed/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_09_draw_data_mixed/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_09_draw_data_mixed/figure_09_draw_data_mixed.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_09_draw_data_mixed/figure_09_draw_data_mixed.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_10_rollovers/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_10_rollovers/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_10_rollovers/figure_10_rollovers.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_10_rollovers/figure_10_rollovers.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_11_curve/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_11_curve/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_11_curve/figure_11_curve.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_11_curve/figure_11_curve.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_12_area/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_12_area/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_12_area/figure_12_area.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_12_area/figure_12_area.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_13_reversed/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_13_reversed/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_13_reversed/figure_13_reversed.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_13_reversed/figure_13_reversed.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_14_bar_chart/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_14_bar_chart/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_14_bar_chart/figure_14_bar_chart.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_14_bar_chart/figure_14_bar_chart.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_15_tabs/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_15_tabs/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_15_tabs/figure_15_tabs.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/figure_15_tabs/figure_15_tabs.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/step_16_tabs_images/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/step_16_tabs_images/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/step_16_tabs_images/step_16_tabs_images.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/step_16_tabs_images/step_16_tabs_images.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/step_17_interpolate/FloatTable.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/step_17_interpolate/FloatTable.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/step_17_interpolate/Integrator.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/step_17_interpolate/Integrator.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/step_17_interpolate/step_17_interpolate.pde b/test/parser/Fry-Visualizing-Data/ch04-milkteacoffee/step_17_interpolate/step_17_interpolate.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch05-salaryper/step_08b_web/step_08b_web.pde b/test/parser/Fry-Visualizing-Data/ch05-salaryper/step_08b_web/step_08b_web.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch06-zipdecode/round_09c_focus_handling/Place.pde b/test/parser/Fry-Visualizing-Data/ch06-zipdecode/round_09c_focus_handling/Place.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch06-zipdecode/round_09c_focus_handling/Slurper.pde b/test/parser/Fry-Visualizing-Data/ch06-zipdecode/round_09c_focus_handling/Slurper.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch06-zipdecode/round_09c_focus_handling/data/zips.gz b/test/parser/Fry-Visualizing-Data/ch06-zipdecode/round_09c_focus_handling/data/zips.gz old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch06-zipdecode/round_09c_focus_handling/round_09c_focus_handling.pde b/test/parser/Fry-Visualizing-Data/ch06-zipdecode/round_09c_focus_handling/round_09c_focus_handling.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch07-hierarchies/equator_03b/WordItem.pde b/test/parser/Fry-Visualizing-Data/ch07-hierarchies/equator_03b/WordItem.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch07-hierarchies/equator_03b/WordMap.pde b/test/parser/Fry-Visualizing-Data/ch07-hierarchies/equator_03b/WordMap.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch07-hierarchies/equator_03b/equator_03b.pde b/test/parser/Fry-Visualizing-Data/ch07-hierarchies/equator_03b/equator_03b.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch07-hierarchies/file_tree_queue_08b/Node.pde b/test/parser/Fry-Visualizing-Data/ch07-hierarchies/file_tree_queue_08b/Node.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch07-hierarchies/file_tree_queue_08b/file_tree_queue_08b.pde b/test/parser/Fry-Visualizing-Data/ch07-hierarchies/file_tree_queue_08b/file_tree_queue_08b.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch07-hierarchies/filetreemap_06b/FileItem.pde b/test/parser/Fry-Visualizing-Data/ch07-hierarchies/filetreemap_06b/FileItem.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch07-hierarchies/filetreemap_06b/FolderItem.pde b/test/parser/Fry-Visualizing-Data/ch07-hierarchies/filetreemap_06b/FolderItem.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch07-hierarchies/filetreemap_06b/RankedLongArray.pde b/test/parser/Fry-Visualizing-Data/ch07-hierarchies/filetreemap_06b/RankedLongArray.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch07-hierarchies/filetreemap_06b/filetreemap_06b.pde b/test/parser/Fry-Visualizing-Data/ch07-hierarchies/filetreemap_06b/filetreemap_06b.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_06c_variable_size_nodes/Edge.pde b/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_06c_variable_size_nodes/Edge.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_06c_variable_size_nodes/Node.pde b/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_06c_variable_size_nodes/Node.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_06c_variable_size_nodes/step_06c_variable_size_nodes.pde b/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_06c_variable_size_nodes/step_06c_variable_size_nodes.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_07c_save_pdf/Edge.pde b/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_07c_save_pdf/Edge.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_07c_save_pdf/Node.pde b/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_07c_save_pdf/Node.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_07c_save_pdf/step_07c_save_pdf.pde b/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_07c_save_pdf/step_07c_save_pdf.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_08c_graphviz/Edge.pde b/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_08c_graphviz/Edge.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_08c_graphviz/Node.pde b/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_08c_graphviz/Node.pde old mode 100644 new mode 100755 diff --git a/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_08c_graphviz/step_08c_graphviz.pde b/test/parser/Fry-Visualizing-Data/ch08-graphlayout/step_08c_graphviz/step_08c_graphviz.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Appendixes/Appendix D/_01/_01.pde b/test/parser/Processing-Book-001/Appendixes/Appendix D/_01/_01.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Appendixes/Appendix E/_01/_01.pde b/test/parser/Processing-Book-001/Appendixes/Appendix E/_01/_01.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Appendixes/Appendix E/_02/_02.pde b/test/parser/Processing-Book-001/Appendixes/Appendix E/_02/_02.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Appendixes/Appendix E/_03/_03.pde b/test/parser/Processing-Book-001/Appendixes/Appendix E/_03/_03.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Appendixes/Appendix E/_04/_04.pde b/test/parser/Processing-Book-001/Appendixes/Appendix E/_04/_04.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Appendixes/Appendix E/_05/_05.pde b/test/parser/Processing-Book-001/Appendixes/Appendix E/_05/_05.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Appendixes/Appendix E/_06/_06.pde b/test/parser/Processing-Book-001/Appendixes/Appendix E/_06/_06.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Appendixes/Appendix E/_07/_07.pde b/test/parser/Processing-Book-001/Appendixes/Appendix E/_07/_07.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Appendixes/Appendix E/_08/_08.pde b/test/parser/Processing-Book-001/Appendixes/Appendix E/_08/_08.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Appendixes/Appendix E/_09/_09.pde b/test/parser/Processing-Book-001/Appendixes/Appendix E/_09/_09.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Appendixes/Appendix E/_10/_10.pde b/test/parser/Processing-Book-001/Appendixes/Appendix E/_10/_10.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Extensions/Vision/_02/_02.pde b/test/parser/Processing-Book-001/Extensions/Vision/_02/_02.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Illustrations/page_022/page_022.pde b/test/parser/Processing-Book-001/Illustrations/page_022/page_022.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Illustrations/page_042/page_042.pde b/test/parser/Processing-Book-001/Illustrations/page_042/page_042.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Illustrations/page_060/page_060.pde b/test/parser/Processing-Book-001/Illustrations/page_060/page_060.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Illustrations/page_078/page_078.pde b/test/parser/Processing-Book-001/Illustrations/page_078/page_078.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Illustrations/page_094/page_094.pde b/test/parser/Processing-Book-001/Illustrations/page_094/page_094.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Illustrations/page_xx/page_xx.pdf b/test/parser/Processing-Book-001/Illustrations/page_xx/page_xx.pdf old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_01_collage/_01_collage/_01_collage.pde b/test/parser/Processing-Book-001/Synthesis/_01_collage/_01_collage/_01_collage.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_01_collage/_02_collage/_02_collage.pde b/test/parser/Processing-Book-001/Synthesis/_01_collage/_02_collage/_02_collage.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_02_waves/_01_waves/_01_waves.pde b/test/parser/Processing-Book-001/Synthesis/_02_waves/_01_waves/_01_waves.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_02_waves/_02_waves/_02_waves.pde b/test/parser/Processing-Book-001/Synthesis/_02_waves/_02_waves/_02_waves.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_02_waves/_03_waves/_03_waves.pde b/test/parser/Processing-Book-001/Synthesis/_02_waves/_03_waves/_03_waves.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_02_waves/_04_waves/_04_waves.pde b/test/parser/Processing-Book-001/Synthesis/_02_waves/_04_waves/_04_waves.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_02_waves/_05_waves/_05_waves.pde b/test/parser/Processing-Book-001/Synthesis/_02_waves/_05_waves/_05_waves.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_03_grids/_01_grids/_01_grids.pde b/test/parser/Processing-Book-001/Synthesis/_03_grids/_01_grids/_01_grids.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_03_grids/_02_grids/_02_grids.pde b/test/parser/Processing-Book-001/Synthesis/_03_grids/_02_grids/_02_grids.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_03_grids/_03_grids/_03_grids.pde b/test/parser/Processing-Book-001/Synthesis/_03_grids/_03_grids/_03_grids.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_03_grids/_04_grids/_04_grids.pde b/test/parser/Processing-Book-001/Synthesis/_03_grids/_04_grids/_04_grids.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_03_grids/_05_grids/_05_grids.pde b/test/parser/Processing-Book-001/Synthesis/_03_grids/_05_grids/_05_grids.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_05_tennis/_05_tennis.pde b/test/parser/Processing-Book-001/Synthesis/_05_tennis/_05_tennis.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_07_typing/_07_typing.pde b/test/parser/Processing-Book-001/Synthesis/_07_typing/_07_typing.pde old mode 100644 new mode 100755 diff --git a/test/parser/Processing-Book-001/Synthesis/_08_clock/_08_clock.pde b/test/parser/Processing-Book-001/Synthesis/_08_clock/_08_clock.pde old mode 100644 new mode 100755 diff --git a/test/parser/The-Nature-of-Code b/test/parser/The-Nature-of-Code deleted file mode 160000 index eddb106af..000000000 --- a/test/parser/The-Nature-of-Code +++ /dev/null @@ -1 +0,0 @@ -Subproject commit eddb106af4ddbbeef36efe23c26ad44879e6af9e diff --git a/test/parser/arrayInit/1.pde b/test/parser/arrayInit/1.pde old mode 100644 new mode 100755 diff --git a/test/parser/arrayInit/2.pde b/test/parser/arrayInit/2.pde old mode 100644 new mode 100755 diff --git a/test/parser/arrayInit/3.pde b/test/parser/arrayInit/3.pde old mode 100644 new mode 100755 diff --git a/test/parser/arrays.pde b/test/parser/arrays.pde old mode 100644 new mode 100755 diff --git a/test/parser/commentStringOrder.pde b/test/parser/commentStringOrder.pde old mode 100644 new mode 100755 diff --git a/test/parser/functionCtorNames.pde b/test/parser/functionCtorNames.pde old mode 100644 new mode 100755 diff --git a/test/parser/interface.pde b/test/parser/interface.pde old mode 100644 new mode 100755 diff --git a/test/parser/js-extra-semi.pde b/test/parser/js-extra-semi.pde old mode 100644 new mode 100755 diff --git a/test/parser/js-no-semi.pde b/test/parser/js-no-semi.pde old mode 100644 new mode 100755 diff --git a/test/parser/minified.pde b/test/parser/minified.pde old mode 100644 new mode 100755 diff --git a/test/parser/multiLineComment.pde b/test/parser/multiLineComment.pde old mode 100644 new mode 100755 diff --git a/test/parser/newline.pde b/test/parser/newline.pde old mode 100644 new mode 100755 diff --git a/test/parser/pie-chart.pde b/test/parser/pie-chart.pde old mode 100644 new mode 100755 diff --git a/test/parser/pixels.pde b/test/parser/pixels.pde old mode 100644 new mode 100755 diff --git a/test/parser/pjs-directive.pde b/test/parser/pjs-directive.pde old mode 100644 new mode 100755 diff --git a/test/parser/shiffman-test.pde b/test/parser/shiffman-test.pde old mode 100644 new mode 100755 diff --git a/test/parser/staticClass.pde b/test/parser/staticClass.pde old mode 100644 new mode 100755 diff --git a/test/parser/staticMethod.pde b/test/parser/staticMethod.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/doubleQuotedStrings/0.pde b/test/parser/stringParsing/doubleQuotedStrings/0.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/doubleQuotedStrings/1.pde b/test/parser/stringParsing/doubleQuotedStrings/1.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/doubleQuotedStrings/10.pde b/test/parser/stringParsing/doubleQuotedStrings/10.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/doubleQuotedStrings/11.pde b/test/parser/stringParsing/doubleQuotedStrings/11.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/doubleQuotedStrings/2.pde b/test/parser/stringParsing/doubleQuotedStrings/2.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/doubleQuotedStrings/3.pde b/test/parser/stringParsing/doubleQuotedStrings/3.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/doubleQuotedStrings/4.pde b/test/parser/stringParsing/doubleQuotedStrings/4.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/doubleQuotedStrings/5.pde b/test/parser/stringParsing/doubleQuotedStrings/5.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/doubleQuotedStrings/6.pde b/test/parser/stringParsing/doubleQuotedStrings/6.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/doubleQuotedStrings/7.pde b/test/parser/stringParsing/doubleQuotedStrings/7.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/doubleQuotedStrings/8.pde b/test/parser/stringParsing/doubleQuotedStrings/8.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/doubleQuotedStrings/9.pde b/test/parser/stringParsing/doubleQuotedStrings/9.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/singleQuotedStrings/0.pde b/test/parser/stringParsing/singleQuotedStrings/0.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/singleQuotedStrings/1.pde b/test/parser/stringParsing/singleQuotedStrings/1.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/singleQuotedStrings/10.pde b/test/parser/stringParsing/singleQuotedStrings/10.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/singleQuotedStrings/11.pde b/test/parser/stringParsing/singleQuotedStrings/11.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/singleQuotedStrings/2.pde b/test/parser/stringParsing/singleQuotedStrings/2.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/singleQuotedStrings/3.pde b/test/parser/stringParsing/singleQuotedStrings/3.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/singleQuotedStrings/4.pde b/test/parser/stringParsing/singleQuotedStrings/4.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/singleQuotedStrings/5.pde b/test/parser/stringParsing/singleQuotedStrings/5.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/singleQuotedStrings/6.pde b/test/parser/stringParsing/singleQuotedStrings/6.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/singleQuotedStrings/7.pde b/test/parser/stringParsing/singleQuotedStrings/7.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/singleQuotedStrings/8.pde b/test/parser/stringParsing/singleQuotedStrings/8.pde old mode 100644 new mode 100755 diff --git a/test/parser/stringParsing/singleQuotedStrings/9.pde b/test/parser/stringParsing/singleQuotedStrings/9.pde old mode 100644 new mode 100755 diff --git a/test/parser/tabs.pde b/test/parser/tabs.pde old mode 100644 new mode 100755 diff --git a/test/parser/ticket1018.pde b/test/parser/ticket1018.pde old mode 100644 new mode 100755 diff --git a/test/parser/ticket1674.pde b/test/parser/ticket1674.pde old mode 100644 new mode 100755 diff --git a/test/parser/ticket1688.pde b/test/parser/ticket1688.pde old mode 100644 new mode 100755 diff --git a/test/parser/ticket870.pde b/test/parser/ticket870.pde old mode 100644 new mode 100755 diff --git a/test/perf/8-pointLights-sphere.pde b/test/perf/8-pointLights-sphere.pde old mode 100644 new mode 100755 diff --git a/test/perf/PMatrix3D-create.pde b/test/perf/PMatrix3D-create.pde old mode 100644 new mode 100755 diff --git a/test/perf/PMatrix3D-invert.pde b/test/perf/PMatrix3D-invert.pde old mode 100644 new mode 100755 diff --git a/test/perf/PMatrix3D-multX.pde b/test/perf/PMatrix3D-multX.pde old mode 100644 new mode 100755 diff --git a/test/perf/PMatrix3D-reset.pde b/test/perf/PMatrix3D-reset.pde old mode 100644 new mode 100755 diff --git a/test/perf/PMatrix3D-rotate.pde b/test/perf/PMatrix3D-rotate.pde old mode 100644 new mode 100755 diff --git a/test/perf/PMatrix3D-rotateX.pde b/test/perf/PMatrix3D-rotateX.pde old mode 100644 new mode 100755 diff --git a/test/perf/PMatrix3D-rotateY.pde b/test/perf/PMatrix3D-rotateY.pde old mode 100644 new mode 100755 diff --git a/test/perf/PMatrix3D-rotateZ.pde b/test/perf/PMatrix3D-rotateZ.pde old mode 100644 new mode 100755 diff --git a/test/perf/PMatrix3D-scale.pde b/test/perf/PMatrix3D-scale.pde old mode 100644 new mode 100755 diff --git a/test/perf/PMatrix3D-set.pde b/test/perf/PMatrix3D-set.pde old mode 100644 new mode 100755 diff --git a/test/perf/PMatrix3D-translate.pde b/test/perf/PMatrix3D-translate.pde old mode 100644 new mode 100755 diff --git a/test/perf/PMatrix3D-transpose.pde b/test/perf/PMatrix3D-transpose.pde old mode 100644 new mode 100755 diff --git a/test/perf/alpha-transparency-mask.pde b/test/perf/alpha-transparency-mask.pde old mode 100644 new mode 100755 diff --git a/test/perf/arc.pde b/test/perf/arc.pde old mode 100644 new mode 100755 diff --git a/test/perf/arch-100.jpg b/test/perf/arch-100.jpg old mode 100644 new mode 100755 diff --git a/test/perf/background-3D.pde b/test/perf/background-3D.pde old mode 100644 new mode 100755 diff --git a/test/perf/background.pde b/test/perf/background.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-add.pde b/test/perf/blendcolor-add.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-blend.pde b/test/perf/blendcolor-blend.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-burn.pde b/test/perf/blendcolor-burn.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-darkest.pde b/test/perf/blendcolor-darkest.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-difference.pde b/test/perf/blendcolor-difference.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-dodge.pde b/test/perf/blendcolor-dodge.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-exclusion.pde b/test/perf/blendcolor-exclusion.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-hard_light.pde b/test/perf/blendcolor-hard_light.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-lightest.pde b/test/perf/blendcolor-lightest.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-multiply.pde b/test/perf/blendcolor-multiply.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-overlay.pde b/test/perf/blendcolor-overlay.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-screen.pde b/test/perf/blendcolor-screen.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-soft_light.pde b/test/perf/blendcolor-soft_light.pde old mode 100644 new mode 100755 diff --git a/test/perf/blendcolor-subtract.pde b/test/perf/blendcolor-subtract.pde old mode 100644 new mode 100755 diff --git a/test/perf/box-3D.pde b/test/perf/box-3D.pde old mode 100644 new mode 100755 diff --git a/test/perf/box-noFill-3D.pde b/test/perf/box-noFill-3D.pde old mode 100644 new mode 100755 diff --git a/test/perf/box-nostroke-3D.pde b/test/perf/box-nostroke-3D.pde old mode 100644 new mode 100755 diff --git a/test/perf/construct.jpg b/test/perf/construct.jpg old mode 100644 new mode 100755 diff --git a/test/perf/createImage.pde b/test/perf/createImage.pde old mode 100644 new mode 100755 diff --git a/test/perf/directionalLight-sphere-100.pde b/test/perf/directionalLight-sphere-100.pde old mode 100644 new mode 100755 diff --git a/test/perf/directionalLight-sphere-50.pde b/test/perf/directionalLight-sphere-50.pde old mode 100644 new mode 100755 diff --git a/test/perf/empty-baseline.pde b/test/perf/empty-baseline.pde old mode 100644 new mode 100755 diff --git a/test/perf/get-3d.pde b/test/perf/get-3d.pde old mode 100644 new mode 100755 diff --git a/test/perf/get.pde b/test/perf/get.pde old mode 100644 new mode 100755 diff --git a/test/perf/image-fractional-coords.pde b/test/perf/image-fractional-coords.pde old mode 100644 new mode 100755 diff --git a/test/perf/image-whole-coords.pde b/test/perf/image-whole-coords.pde old mode 100644 new mode 100755 diff --git a/test/perf/index.html b/test/perf/index.html old mode 100644 new mode 100755 index 2d766ea51..0b760dbc7 --- a/test/perf/index.html +++ b/test/perf/index.html @@ -18,6 +18,8 @@

Processing.js Performance Test Runner

To start the tests click Start. Each test is run in order (downloaded from the server). Tests are run for a maximum number of frames (specified below), and the time recorded.

+

Reference tests can be run from here. +

Settings

Run Tests:  
-

Results [total time for all tests: 0ms]

+

Results [total time for 0 tests: 0ms]

@@ -79,6 +81,9 @@

Results [total time for all tests: 0ms]