Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tsulej committed Jul 9, 2018
1 parent ada78bb commit 2bab51a
Show file tree
Hide file tree
Showing 60 changed files with 568 additions and 402 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
# Change Log
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).

## 1.0.0

### Added

- `iq-gradient` accepts also two colors (https://github.com/thi-ng/color/blob/master/src/gradients.org#gradient-coefficient-calculation)
- `load-svg` and `transcode-svg` added

### Changed

- `merge-renderers` can merge any number of renderers (previously only two).
- `iq-random-gradient` also uses `iq-gradient` for two colors generated by paletton generator
- `random-gradient` uses also iq-random-gradient function
- `filled-with-stroke` is macro now
- removed dependency to `Vec2` in some functions in `clojure2d.core`

### Fixed

- `random-gradient` will use only two interpolators (:cubic and :linear) to avoid exceed of the range

## 1.0.0-RC2

### Added
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ Add following line as a dependency to your `project.clj`
Development version (release soon):

```clojure
[clojure2d "1.0.0-RC2"]
[clojure2d "1.0.0"]
```

_Release will be done after review of all [examples](https://github.com/Clojure2D/clojure2d-examples)_

## Usage

Since still no tutorials are available, see [documentation](https://clojure2d.github.io/clojure2d/docs/codox/). All namespaces are described below:
Expand Down Expand Up @@ -119,7 +117,6 @@ Yes! You can help with this project:

* Beginners:
- create more variations
- ~~create colorspace converters~~
- create pixel filters
- create analog (audio) filters
* Advanced:
Expand Down
65 changes: 65 additions & 0 deletions docs/articles/processing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Comparison to Processing

Below you can find comparison Processing functions with Clojure2d.

Assuming that following variables are defined:

* `window` - display created with [[show-window]]
* `cnvs` - canvas created with [[canvas]] inside drawing context (see [[with-canvas->]] or [[with-canvas]])

And following namespaces are loaded:

```clojure
(:require [clojure2d.core :refer :all] ;; generaral Clojure2d functions
[clojure2d.pixels :as p] ;; pixels operations
[clojure2d.color :as c] ;; color operations
[fastmath.core :as m] ;; general math functions
[fastmath.random :as r]) ;; random and noise
```

## Structure

Processing | Clojure2d | Comments
---: | --- | ---
[draw()](https://processing.org/reference/draw_.html) | Any function with following signature `(fn [canvas window frame local-state] ...)` attached to window created with [[show-window]] (`:draw-fn` key). | Such function is called before refresh of the display. Result is passed as `local-state` in the next call.
[exit()](https://processing.org/reference/exit_.html) | [[close-window]] | Closes window programmatically.
[loop()](https://processing.org/reference/loop_.html) | not implemented | possible in future versions
[noLoop()](https://processing.org/reference/noLoop_.html) | not implemented | possible in future versions
[popStyle()](https://processing.org/reference/popStyle_.html) | not implemented |
[pushStyle()](https://processing.org/reference/pushStyle_.html) | not implemented |
[redraw()](https://processing.org/reference/redraw_.html) | not implemented | not necessary
[setup()](https://processing.org/reference/setup_.html) | Any function with following signature `(fn [canvas window] ...)` attached to window created with [[show-window]] (`:setup` key). | Returned value is treated as local-state for first call of drawing function.
[thread()](https://processing.org/reference/thread_.html) | | use `future`
all the rest | use Clojure |

## Environment

Processing | Clojure2d | Comments
---: | --- | ---
[cursor()](https://processing.org/reference/cursor_.html) | not implemented | possible in future versions
[delay()](https://processing.org/reference/delay_.html) | not implemented | use `Thread/sleep`
[displayDensity()](https://processing.org/reference/displayDensity_.html) | not implemented |
[focused](https://processing.org/reference/focused.html) | not implemented | possible in future versions
[frameCount](https://processing.org/reference/frameCount.html) | implemented | frame number is passed to the drawing function as third parameter |
[frameRate()](https://processing.org/reference/frameRate_.html) | implemented | set `:fps` key when [[show-window]] is called
[frameRate](https://processing.org/reference/frameRate.html) | not implemented |
[fullScreen()](https://processing.org/reference/fullScreen_.html) | not implemented | possible in future versions
[height](https://processing.org/reference/height.html) | [[height]] | it's a function working on canvas/window/image
[noCursor()](https://processing.org/reference/noCursor_.html) | not implemented | possible in future versions
[noSmooth()](https://processing.org/reference/noSmooth_.html) | implemented | use `:low` quality key in [[canvas]] call
[pixelDensity()](https://processing.org/reference/pixelDensity_.html) | not implemented | for Retina use two times bigger canvas/window and call `(scale canvas 2)`.
[pixelHeight](https://processing.org/reference/pixelHeight.html) | not implemented |
[pixelWidth](https://processing.org/reference/pixelWidth.html) | not implemented |
[settings()](https://processing.org/reference/settings_.html) | not necessary |
[size()](https://processing.org/reference/size_.html) | implemented | set size in [[canvas]] or [[show-window]] calls
[smooth()](https://processing.org/reference/smooth_.html) | implemented | use one of the keys defined in [[rendering-hints]] and pass to [[canvas]] or [[show-window]]
[width](https://processing.org/reference/width.html) | [[width]] | it's a function working on canvas/window/image

## Data

Use Clojure2d data types and functions

## Control

Use Clojure2d functions

57 changes: 29 additions & 28 deletions docs/codox/clojure2d.color.html

Large diffs are not rendered by default.

301 changes: 154 additions & 147 deletions docs/codox/clojure2d.core.html

Large diffs are not rendered by default.

Loading

0 comments on commit 2bab51a

Please # to comment.