├── .gitignore
├── examples
├── README
├── OSNoise1D
│ └── OSNoise1D.pde
└── OSNoise2D
│ └── OSNoise2D.pde
├── lib
├── core.jar
└── README
├── resources
├── code
│ ├── ExampleTaglet.class
│ ├── ant-contrib-1.0b3.jar
│ └── ExampleTaglet.java
├── README.md
├── library.properties
├── build.properties
├── stylesheet.css
└── build.xml
├── data
└── README
├── .classpath
├── .project
├── README.md
├── license.txt
├── src
└── algorithms
│ └── noise
│ ├── OpenSimplexNoise.java
│ └── OpenSimplexNoiseKS.java
└── web
├── stylesheet.css
└── index.html
/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | tmp
3 | distribution
4 |
--------------------------------------------------------------------------------
/examples/README:
--------------------------------------------------------------------------------
1 | add examples for your Library here.
--------------------------------------------------------------------------------
/lib/core.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingTrain/OpenSimplexNoise-for-Processing/HEAD/lib/core.jar
--------------------------------------------------------------------------------
/resources/code/ExampleTaglet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingTrain/OpenSimplexNoise-for-Processing/HEAD/resources/code/ExampleTaglet.class
--------------------------------------------------------------------------------
/resources/code/ant-contrib-1.0b3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingTrain/OpenSimplexNoise-for-Processing/HEAD/resources/code/ant-contrib-1.0b3.jar
--------------------------------------------------------------------------------
/data/README:
--------------------------------------------------------------------------------
1 | the data folder:
2 | If your Library is using files like images, sound files,
3 | any data file, etc., put them into the data folder.
4 | When coding your Library you can use processing's internal loading
5 | functions like loadImage(), loadStrings(), etc. to load files
6 | located inside the data folder into your Library.
7 |
8 |
--------------------------------------------------------------------------------
/lib/README:
--------------------------------------------------------------------------------
1 | The lib folder:
2 | In case your Library requires 3rd party libraries, which need to be
3 | added to the distribution, put them into the lib folder.
4 | These 3rd party libraries will be added to your distribution and are
5 | located next to your Library's jar file.
6 | This does not apply to .jar files that are considered core processing libraries.
--------------------------------------------------------------------------------
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | opensimplexnoise-for-processing
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Noise Algorithm Library for Processing
2 |
3 | This repo is a work-in-progress library for additional noise algorithms in Processing. There are currently implementations for:
4 |
5 | * [x] Open Simplex Noise
6 | * [ ] Worley Noise
7 | * add your noise algorithm here!
8 |
9 | ## Tutorials
10 |
11 | This library was made for the video tutorial series "How to Make a Processing (Java) Library".
12 |
13 | * Part 1: https://youtu.be/pI2gvl9sdtE
14 | * Part 2: https://youtu.be/U0TGZCEWn8g
15 |
16 | ## API
17 |
18 | ```java
19 |
20 | // Create a noise object, optional 2nd argument for seed
21 | OpenSimplexNoise generator = new OpenSimplexNoise(this);
22 |
23 | // Get a noise value
24 | float xoff = 0.3;
25 | float val = generator.noise(xoff);
26 | ```
27 |
28 |
--------------------------------------------------------------------------------
/license.txt:
--------------------------------------------------------------------------------
1 | A template to build a Library for the Processing programming environment.
2 |
3 | Part of the Processing project - http://processing.org
4 |
5 | Copyright 2011-2018 Elie Zananiri
6 | Copyright 2008-2011 Andreas Shlegel
7 |
8 | Licensed under the Apache License, Version 2.0 (the "License");
9 | you may not use this file except in compliance with the License.
10 | You may obtain a copy of the License at
11 |
12 | http://www.apache.org/licenses/LICENSE-2.0
13 |
14 | Unless required by applicable law or agreed to in writing, software
15 | distributed under the License is distributed on an "AS IS" BASIS,
16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | See the License for the specific language governing permissions and
18 | limitations under the License.
--------------------------------------------------------------------------------
/examples/OSNoise1D/OSNoise1D.pde:
--------------------------------------------------------------------------------
1 | import algorithms.noise.*;
2 |
3 | float xoff = 0.0;
4 | float xincrement = 0.01;
5 |
6 | OpenSimplexNoise osnoise;
7 |
8 | void setup() {
9 | size(640, 360);
10 | background(0);
11 | noStroke();
12 | osnoise = new OpenSimplexNoise();
13 | }
14 |
15 | void draw() {
16 | // Create an alpha blended background
17 | fill(0, 10);
18 | rect(0, 0, width, height);
19 |
20 | //float n = random(0,width); // Try this line instead of noise
21 |
22 | // Get a noise value based on xoff and scale it according to the window's width
23 | float n = osnoise.noise(xoff)*width;
24 | println(n);
25 |
26 | // With each cycle, increment xoff
27 | xoff += xincrement;
28 |
29 | // Draw the ellipse at the value produced by perlin noise
30 | fill(200);
31 | ellipse(n, height/2, 64, 64);
32 | }
33 |
--------------------------------------------------------------------------------
/examples/OSNoise2D/OSNoise2D.pde:
--------------------------------------------------------------------------------
1 | import algorithms.noise.*;
2 |
3 | /**
4 | * Noise2D
5 | * by Daniel Shiffman.
6 | *
7 | * Using 2D noise to create simple texture.
8 | */
9 |
10 | float increment = 0.02;
11 | OpenSimplexNoise osnoise;
12 |
13 | void setup() {
14 | size(640, 360);
15 | osnoise = new OpenSimplexNoise();
16 | }
17 |
18 | void draw() {
19 |
20 | loadPixels();
21 |
22 | float xoff = 0.0; // Start xoff at 0
23 | float detail = map(mouseX, 0, width, 0.1, 0.6);
24 | noiseDetail(8, detail);
25 |
26 | // For every x,y coordinate in a 2D space, calculate a noise value and produce a brightness value
27 | for (int x = 0; x < width; x++) {
28 | xoff += increment; // Increment xoff
29 | float yoff = 0.0; // For every xoff, start yoff at 0
30 | for (int y = 0; y < height; y++) {
31 | yoff += increment; // Increment yoff
32 |
33 | // Calculate noise and scale by 255
34 | float bright = osnoise.noise(xoff, yoff) * 255;
35 |
36 | // Try using this line instead
37 | //float bright = random(0,255);
38 |
39 | // Set each pixel onscreen to a grayscale value
40 | pixels[x+y*width] = color(bright);
41 | }
42 | }
43 |
44 | updatePixels();
45 | }
46 |
--------------------------------------------------------------------------------
/src/algorithms/noise/OpenSimplexNoise.java:
--------------------------------------------------------------------------------
1 | package algorithms.noise;
2 |
3 |
4 | /**
5 | * This is a template class and can be used to start a new processing Library.
6 | * Make sure you rename this class as well as the name of the example package 'template'
7 | * to your own Library naming convention.
8 | *
9 | * (the tag example followed by the name of an example included in folder 'examples' will
10 | * automatically include the example in the javadoc.)
11 | *
12 | * @example Hello
13 | */
14 | public class OpenSimplexNoise {
15 |
16 | private OpenSimplexNoiseKS generator;
17 |
18 | public final static String VERSION = "##library.prettyVersion##";
19 |
20 |
21 | /**
22 | * Constructs a new OpenSimplexNoise object,
23 | * using the system's current time as the noise seed.
24 | */
25 | public OpenSimplexNoise() {
26 | this(System.currentTimeMillis());
27 | }
28 |
29 | /**
30 | * Constructs a new OpenSimplexNoise object,
31 | * using the provided value as the noise seed.
32 | */
33 | public OpenSimplexNoise(long seed) {
34 | welcome();
35 | generator = new OpenSimplexNoiseKS(seed);
36 | }
37 |
38 |
39 | private void welcome() {
40 | System.out.println("##library.name## ##library.prettyVersion## by ##author##");
41 | }
42 |
43 | private double remap(double val) {
44 | return (val + 1) * 0.5;
45 | }
46 |
47 |
48 | public float noise (float xoff) {
49 | return this.noise(xoff, 0);
50 | }
51 |
52 | public float noise (float xoff, float yoff) {
53 | return (float) remap(generator.eval(xoff, yoff));
54 | }
55 |
56 | public float noise (float xoff, float yoff, float zoff) {
57 | return (float) remap(generator.eval(xoff, yoff, zoff));
58 | }
59 |
60 | public float noise (float xoff, float yoff, float zoff, float uoff) {
61 | return (float) remap(generator.eval(xoff, yoff, zoff, uoff));
62 | }
63 |
64 |
65 | /**
66 | * return the version of the Library.
67 | *
68 | * @return String
69 | */
70 | public static String version() {
71 | return VERSION;
72 | }
73 | }
74 |
75 |
--------------------------------------------------------------------------------
/resources/README.md:
--------------------------------------------------------------------------------
1 | ## How to install ##library.name##
2 |
3 | ### Install with the Contribution Manager
4 |
5 | Add contributed Libraries by selecting the menu item _Sketch_ → _Import Library..._ → _Add Library..._ This will open the Contribution Manager, where you can browse for ##library.name##, or any other Library you want to install.
6 |
7 | Not all available Libraries have been converted to show up in this menu. If a Library isn't there, it will need to be installed manually by following the instructions below.
8 |
9 | ### Manual Install
10 |
11 | Contributed Libraries may be downloaded separately and manually placed within the `libraries` folder of your Processing sketchbook. To find (and change) the Processing sketchbook location on your computer, open the Preferences window from the Processing application (PDE) and look for the "Sketchbook location" item at the top.
12 |
13 | By default the following locations are used for your sketchbook folder:
14 | * For Mac users, the sketchbook folder is located inside `~/Documents/Processing`
15 | * For Windows users, the sketchbook folder is located inside `My Documents/Processing`
16 |
17 | Download ##library.name## from ##library.url##
18 |
19 | Unzip and copy the contributed Library's folder into the `libraries` folder in the Processing sketchbook. You will need to create this `libraries` folder if it does not exist.
20 |
21 | The folder structure for Library ##library.name## should be as follows:
22 |
23 | ```
24 | Processing
25 | libraries
26 | ##library.name##
27 | examples
28 | library
29 | ##library.name##.jar
30 | reference
31 | src
32 | ```
33 |
34 | Some folders like `examples` or `src` might be missing. After Library ##library.name## has been successfully installed, restart the Processing application.
35 |
36 | ### Troubleshooting
37 |
38 | If you're having trouble, have a look at the [Processing Wiki](https://github.com/processing/processing/wiki/How-to-Install-a-Contributed-Library) for more information, or contact the author [##author.name##](##author.url##).
39 |
--------------------------------------------------------------------------------
/web/stylesheet.css:
--------------------------------------------------------------------------------
1 | /* processingLibs style by andreas schlegel, sojamo. */
2 |
3 |
4 | * {
5 | margin:0;
6 | padding:0;
7 | border:0;
8 | }
9 |
10 |
11 | body {
12 | font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
13 | font-size : 100%;
14 | font-size : 0.70em;
15 | font-weight : normal;
16 | line-height : normal;
17 | }
18 |
19 |
20 |
21 | #container {
22 | margin-left:64px;
23 | background-color:#fff;
24 | }
25 |
26 | #header {
27 | float:left;
28 | padding-top:24px;
29 | padding-bottom:48px;
30 | }
31 |
32 | #menu {
33 | margin-top:16px;
34 | float:left;
35 | margin-bottom:64px;
36 | }
37 |
38 |
39 | #about,
40 | #download,
41 | #examples,
42 | #demos,
43 | #misc {
44 | width:480px;
45 | float:left;
46 | margin-right:24px;
47 | }
48 |
49 |
50 | #resources, #info {
51 | width:320px;
52 | float:left;
53 | }
54 |
55 |
56 | .clear {
57 | clear:both;
58 | }
59 |
60 | #footer {
61 | margin-top:300px;
62 | height:20px;
63 | margin-bottom:32px;
64 | }
65 |
66 |
67 | ul {
68 | list-style:none;
69 | padding:0;
70 | margin:0;
71 | }
72 |
73 |
74 | #menu ul li, #subMenu ul li {
75 | float:left;
76 | padding-right:6px;
77 | }
78 |
79 |
80 |
81 |
82 |
83 |
84 | /* Headings */
85 |
86 | h1 {
87 | font-size:2em;
88 | font-weight:normal;
89 | }
90 |
91 |
92 | h2, h3, h4, h5, th {
93 | font-size:1.3em;
94 | font-weight:normal;
95 | margin-bottom:4px;
96 | }
97 |
98 |
99 |
100 | p {
101 | font-size:1em;
102 | width:90%;
103 | margin-bottom:32px;
104 | }
105 |
106 |
107 | pre, code {
108 | font-family:"Courier New", Courier, monospace;
109 | font-size:1em;
110 | line-height:normal;
111 | }
112 |
113 |
114 |
115 |
116 | hr {
117 | border:0;
118 | height:1px;
119 | margin-bottom:24px;
120 | }
121 |
122 |
123 | a {
124 | text-decoration: underline;
125 | font-weight: normal;
126 | }
127 |
128 |
129 | a:hover,
130 | a:active {
131 | text-decoration: underline;
132 | font-weight: normal;
133 | }
134 |
135 |
136 | a:visited,
137 | a:link:visited {
138 | text-decoration: underline;
139 | font-weight: normal;
140 | }
141 |
142 |
143 |
144 | img {
145 | border: 0px solid #000000;
146 | }
147 |
148 |
149 |
150 |
151 |
152 | /* COLORS */
153 |
154 |
155 | body {
156 | color : #333;
157 | background-color :#fff;
158 | }
159 |
160 |
161 | #header {
162 | background-color:#fff;
163 | color:#333;
164 | }
165 |
166 |
167 |
168 | h1, h2, h3, h4, h5, h6 {
169 | color:#666;
170 | }
171 |
172 |
173 | pre, code {
174 | color: #000000;
175 | }
176 |
177 |
178 | a,strong {
179 | color: #333;
180 | }
181 |
182 |
183 | a:hover,
184 | a:active {
185 | color: #333;
186 | }
187 |
188 |
189 | a:visited,
190 | a:link:visited {
191 | color: #333;
192 | }
193 |
194 |
195 | #footer, #menu {
196 | background-color:#fff;
197 | color:#333;
198 | }
199 |
200 |
201 | #footer a, #menu a {
202 | color:#333;
203 | }
204 |
--------------------------------------------------------------------------------
/resources/library.properties:
--------------------------------------------------------------------------------
1 | # More on this file here: https://github.com/processing/processing/wiki/Library-Basics
2 | # UTF-8 supported.
3 |
4 | # The name of your Library as you want it formatted.
5 | name = ##library.name##
6 |
7 | # List of authors. Links can be provided using the syntax [author name](url).
8 | authors = [##author.name##](##author.url##)
9 |
10 | # A web page for your Library, NOT a direct link to where to download it.
11 | url = ##library.url##
12 |
13 | # The category (or categories) of your Library, must be from the following list:
14 | # "3D" "Animation" "Compilations" "Data"
15 | # "Fabrication" "Geometry" "GUI" "Hardware"
16 | # "I/O" "Language" "Math" "Simulation"
17 | # "Sound" "Utilities" "Typography" "Video & Vision"
18 | #
19 | # If a value other than those listed is used, your Library will listed as
20 | # "Other". Many categories must be comma-separated.
21 | categories = ##library.categories##
22 |
23 | # A short sentence (or fragment) to summarize the Library's function. This will
24 | # be shown from inside the PDE when the Library is being installed. Avoid
25 | # repeating the name of your Library here. Also, avoid saying anything redundant
26 | # like mentioning that it's a Library. This should start with a capitalized
27 | # letter, and end with a period.
28 | sentence = ##library.sentence##
29 |
30 | # Additional information suitable for the Processing website. The value of
31 | # 'sentence' always will be prepended, so you should start by writing the
32 | # second sentence here. If your Library only works on certain operating systems,
33 | # mention it here.
34 | paragraph = ##library.paragraph##
35 |
36 | # Links in the 'sentence' and 'paragraph' attributes can be inserted using the
37 | # same syntax as for authors.
38 | # That is, [here is a link to Processing](http://processing.org/)
39 |
40 | # A version number that increments once with each release. This is used to
41 | # compare different versions of the same Library, and check if an update is
42 | # available. You should think of it as a counter, counting the total number of
43 | # releases you've had.
44 | version = ##library.version## # This must be parsable as an int
45 |
46 | # The version as the user will see it. If blank, the version attribute will be
47 | # used here. This should be a single word, with no spaces.
48 | prettyVersion = ##library.prettyVersion## # This is treated as a String
49 |
50 | # The min and max revision of Processing compatible with your Library.
51 | # Note that these fields use the revision and not the version of Processing,
52 | # parsable as an int. For example, the revision number for 2.2.1 is 227.
53 | # You can find the revision numbers in the change log: https://raw.githubusercontent.com/processing/processing/master/build/shared/revisions.txt
54 | # Only use maxRevision (or minRevision), when your Library is known to
55 | # break in a later (or earlier) release. Otherwise, use the default value 0.
56 | minRevision = ##compatible.minRevision##
57 | maxRevision = ##compatible.maxRevision##
58 |
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
44 | A Library by ##author.name## for the Processing programming environment.
45 | Last update, ##date##.
46 |
47 |
48 | ##library.sentence##
49 | ##library.paragraph##
50 | Feel free to replace this paragraph with a description of the Library.
51 | Contributed Libraries are developed, documented, and maintained by members of the Processing community. Further directions are included with each Library. For feedback and support, please post to the Discourse. We strongly encourage all Libraries to be open source, but not all of them are.
52 |
53 |
54 |
55 |
56 |
57 |
58 |
Download
59 |
60 | Download ##library.name## version ##library.prettyVersion## (##library.version##) in
61 | .zip format.
62 |
63 |
Installation
64 |
65 | Unzip and put the extracted ##project.name## folder into the libraries folder of your Processing sketches. Reference and examples are included in the ##project.name## folder.
66 |
67 |
68 |
69 |
70 |
71 |
Keywords. ##library.keywords##
72 |
Reference. Have a look at the javadoc reference here. A copy of the reference is included in the .zip as well.
73 |
Source. The source code of ##library.name## is available at ##source.host##, and its repository can be browsed here.
74 |
75 |
76 |
77 |
78 |
Examples
79 |
Find a list of examples in the current distribution of ##library.name##, or have a look at them by following the links below.
136 |
137 |
--------------------------------------------------------------------------------
/resources/build.properties:
--------------------------------------------------------------------------------
1 | # Create a Library for the Processing open source programming language and
2 | # environment (http://processing.org/)
3 | #
4 | # Customize the build properties to make the ant-build-process work for your
5 | # environment. How? Please read the comments below.
6 | #
7 | # The default properties are set for OS X. Please refer to comments for Windows
8 | # settings.
9 |
10 |
11 | # Where is your Processing sketchbook located?
12 | # If you are not sure, check the sketchbook location in your Processing
13 | # application preferences.
14 | # ${user.home} points the compiler to your home directory.
15 | # For windows the default path to your sketchbook would be
16 | # ${user.home}/My Documents/Processing (make adjustments below)
17 |
18 | #sketchbook.location=${user.home}/My Documents/Processing
19 | sketchbook.location=${user.home}/Documents/Processing
20 |
21 |
22 | # Where are the jar files located that are required for compiling your Library
23 | # such as e.g. core.jar?
24 | # By default the local classpath location points to folder libs inside Eclipse's
25 | # workspace (by default found in your home directory).
26 | # For Windows, the default path would be
27 | # ${user.home}/Documents/workspace/libs (make adjustments below)
28 | # For OS X,the following path will direct you into Processing's application
29 | # package, in case you put Processing inside your Applications folder.
30 |
31 | classpath.local.location=${user.home}/Desktop/OpenSimplexNoise-for-Processing/lib
32 | #classpath.local.location=/Applications/Processing.app/Contents/Java/core/library
33 |
34 |
35 | # Add all jar files that are required for compiling your project to the local
36 | # and project classpath. Use a comma as delimiter. These jar files must be
37 | # inside your classpath.local.location folder.
38 |
39 | classpath.local.include=core.jar
40 |
41 |
42 | # Add Processing's libraries folder to the classpath.
43 | # If you don't need to include the libraries folder to your classpath, comment
44 | # out the following line.
45 |
46 | classpath.libraries.location=${sketchbook.location}/libraries
47 |
48 |
49 | # Set the java version that should be used to compile your Library.
50 |
51 | java.target.version=1.8
52 |
53 |
54 | # Set the description of the Ant build.xml file.
55 |
56 | ant.description=Processing Library Ant build file.
57 |
58 |
59 | # Give your Library a name. The name must not contain spaces or special
60 | # characters.
61 |
62 | project.name=OpenSimplexNoise
63 |
64 |
65 | # The name as the user will see it. This can contain spaces and special
66 | # characters.
67 |
68 | project.prettyName=OpenSimplexNoise for Processing
69 |
70 |
71 | # Use 'normal' or 'fast' as value for project.compile.
72 | # 'fast' will only compile the project into your sketchbook.
73 | # 'normal' will compile the distribution including the javadoc-reference and all
74 | # web-files (the compile process here takes longer).
75 | # All files compiled with project.compile=normal are stored in the distribution
76 | # folder.
77 |
78 | project.compile=normal
79 |
80 |
81 | # Set your name and URL, used for the web page and properties file.
82 |
83 | author.name=The Coding Train
84 | author.url=http://thecodingtrain.com
85 |
86 |
87 | # Set the web page for your Library.
88 | # This is NOT a direct link to where to download it.
89 |
90 | library.url=http://thecodingtrain.com
91 |
92 |
93 | # Set the category (or categories) of your Library from the following list:
94 | # "3D" "Animation" "Compilations" "Data"
95 | # "Fabrication" "Geometry" "GUI" "Hardware"
96 | # "I/O" "Language" "Math" "Simulation"
97 | # "Sound" "Utilities" "Typography" "Video & Vision"
98 | #
99 | # If a value other than those listed is used, your Library will listed as
100 | # "Other". Many categories must be comma-separated.
101 |
102 | library.categories=Math
103 |
104 |
105 | # A short sentence (or fragment) to summarize the Library's function. This will
106 | # be shown from inside the PDE when the Library is being installed. Avoid
107 | # repeating the name of your Library here. Also, avoid saying anything redundant
108 | # like mentioning that it's a Library. This should start with a capitalized
109 | # letter, and end with a period.
110 |
111 | library.sentence=A collection of utilities for solving this and that problem.
112 |
113 |
114 | # Additional information suitable for the Processing website. The value of
115 | # 'sentence' always will be prepended, so you should start by writing the
116 | # second sentence here. If your Library only works on certain operating systems,
117 | # mention it here.
118 |
119 | library.paragraph=
120 |
121 |
122 | # Set the source code repository for your project.
123 | # We recommend Bitbucket (https://bitbucket.org) or GitHub (https://github.com).
124 |
125 | source.host=GitHub
126 | source.url=https://github.com/YourName/YourProject
127 | source.repository=https://github.com/YourName/YourProject.git
128 |
129 |
130 | # The current version of your Library.
131 | # This number must be parsable as an int. It increments once with each release.
132 | # This is used to compare different versions of the same Library, and check if
133 | # an update is available.
134 |
135 | library.version=1
136 |
137 |
138 | # The version as the user will see it.
139 |
140 | library.prettyVersion=1.0.0
141 |
142 |
143 | # The min and max revision of Processing compatible with your Library.
144 | # Note that these fields use the revision and not the version of Processing,
145 | # parsable as an int. For example, the revision number for 2.2.1 is 227.
146 | # You can find the revision numbers in the change log: https://raw.githubusercontent.com/processing/processing/master/build/shared/revisions.txt
147 | # Only use maxRevision (or minRevision), when your Library is known to
148 | # break in a later (or earlier) release. Otherwise, use the default value 0.
149 |
150 | compatible.minRevision=0
151 | compatible.maxRevision=0
152 |
153 |
154 | # The platforms and Processing version that the Library has been tested
155 | # against. This information is only used in the generated webpage.
156 |
157 | tested.platform=osx,windows
158 | tested.processingVersion=3.2.3
159 |
160 |
161 | # Additional information for the generated webpage.
162 |
163 | library.copyright=(c) 2016
164 | library.dependencies=?
165 | library.keywords=?
166 |
167 |
168 | # Include javadoc references into your project's javadocs.
169 |
170 | #javadoc.java.href=http://docs.oracle.com/javase/7/docs/api/
171 | javadoc.java.href=http://docs.oracle.com/javase/8/docs/api/
172 | javadoc.processing.href=http://processing.github.io/processing-javadocs/core/
173 |
--------------------------------------------------------------------------------
/resources/code/ExampleTaglet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or
5 | * without modification, are permitted provided that the following
6 | * conditions are met:
7 | *
8 | * -Redistributions of source code must retain the above copyright
9 | * notice, this list of conditions and the following disclaimer.
10 | *
11 | * -Redistribution in binary form must reproduce the above copyright
12 | * notice, this list of conditions and the following disclaimer in
13 | * the documentation and/or other materials provided with the
14 | * distribution.
15 | *
16 | * Neither the name of Sun Microsystems, Inc. or the names of
17 | * contributors may be used to endorse or promote products derived
18 | * from this software without specific prior written permission.
19 | *
20 | * This software is provided "AS IS," without a warranty of any
21 | * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
22 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
23 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
24 | * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
25 | * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
26 | * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR
27 | * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
28 | * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
29 | * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
30 | * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
31 | * THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN
32 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
33 | *
34 | * You acknowledge that Software is not designed, licensed or
35 | * intended for use in the design, construction, operation or
36 | * maintenance of any nuclear facility.
37 | */
38 |
39 | import com.sun.tools.doclets.Taglet;
40 | import com.sun.javadoc.*;
41 | import java.util.Map;
42 | import java.io.*;
43 | /**
44 | * A sample Taglet representing @example. This tag can be used in any kind of
45 | * {@link com.sun.javadoc.Doc}. It is not an inline tag. The text is displayed
46 | * in yellow to remind the developer to perform a task. For
47 | * example, "@example Hello" would be shown as:
48 | *
49 | *
50 | * To Do:
51 | *
Fix this!
52 | *
53 | *
54 | *
55 | * @author Jamie Ho
56 | * @since 1.4
57 | */
58 |
59 | public class ExampleTaglet implements Taglet {
60 |
61 | private static final String NAME = "example";
62 | private static final String HEADER = "example To Do:";
63 |
64 | /**
65 | * Return the name of this custom tag.
66 | */
67 | public String getName() {
68 | return NAME;
69 | }
70 |
71 | /**
72 | * Will return true since @example
73 | * can be used in field documentation.
74 | * @return true since @example
75 | * can be used in field documentation and false
76 | * otherwise.
77 | */
78 | public boolean inField() {
79 | return true;
80 | }
81 |
82 | /**
83 | * Will return true since @example
84 | * can be used in constructor documentation.
85 | * @return true since @example
86 | * can be used in constructor documentation and false
87 | * otherwise.
88 | */
89 | public boolean inConstructor() {
90 | return true;
91 | }
92 |
93 | /**
94 | * Will return true since @example
95 | * can be used in method documentation.
96 | * @return true since @example
97 | * can be used in method documentation and false
98 | * otherwise.
99 | */
100 | public boolean inMethod() {
101 | return true;
102 | }
103 |
104 | /**
105 | * Will return true since @example
106 | * can be used in method documentation.
107 | * @return true since @example
108 | * can be used in overview documentation and false
109 | * otherwise.
110 | */
111 | public boolean inOverview() {
112 | return true;
113 | }
114 |
115 | /**
116 | * Will return true since @example
117 | * can be used in package documentation.
118 | * @return true since @example
119 | * can be used in package documentation and false
120 | * otherwise.
121 | */
122 | public boolean inPackage() {
123 | return true;
124 | }
125 |
126 | /**
127 | * Will return true since @example
128 | * can be used in type documentation (classes or interfaces).
129 | * @return true since @example
130 | * can be used in type documentation and false
131 | * otherwise.
132 | */
133 | public boolean inType() {
134 | return true;
135 | }
136 |
137 | /**
138 | * Will return false since @example
139 | * is not an inline tag.
140 | * @return false since @example
141 | * is not an inline tag.
142 | */
143 |
144 | public boolean isInlineTag() {
145 | return false;
146 | }
147 |
148 | /**
149 | * Register this Taglet.
150 | * @param tagletMap the map to register this tag to.
151 | */
152 | public static void register(Map tagletMap) {
153 | ExampleTaglet tag = new ExampleTaglet();
154 | Taglet t = (Taglet) tagletMap.get(tag.getName());
155 | if (t != null) {
156 | tagletMap.remove(tag.getName());
157 | }
158 | tagletMap.put(tag.getName(), tag);
159 | }
160 |
161 | /**
162 | * Given the Tag representation of this custom
163 | * tag, return its string representation.
164 | * @param tag the Tag representation of this custom tag.
165 | */
166 | public String toString(Tag tag) {
167 | return createHTML(readFile(tag.text()));
168 | }
169 |
170 |
171 | /**
172 | * Given an array of Tags representing this custom
173 | * tag, return its string representation.
174 | * @param tags the array of Tags representing of this custom tag.
175 | */
176 | public String toString(Tag[] tags) {
177 | if (tags.length == 0) {
178 | return null;
179 | }
180 | return createHTML(readFile(tags[0].text()));
181 | }
182 |
183 |
184 |
185 | String createHTML(String theString) {
186 | if(theString!=null) {
187 | String dd = "";
193 |
194 | return dd+"\n