p5.zine 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,8 +10,8 @@ p5.zine is a **browser‑first** library on top of p5.js for making printable zi
10
10
  ### p5 2.x
11
11
 
12
12
  ```html
13
- <script src="https://cdn.jsdelivr.net/npm/p5@2.2.0/lib/p5.min.js"></script>
14
- <script src="https://cdn.jsdelivr.net/npm/p5.zine@1.0.1/dist/p5.zine.js"></script>
13
+ <script src="https://cdn.jsdelivr.net/npm/p5@2/lib/p5.min.js"></script>
14
+ <script src="https://cdn.jsdelivr.net/npm/p5.zine/dist/p5.zine.js"></script>
15
15
  <script>
16
16
  function setup() {}
17
17
  function draw() {
@@ -30,26 +30,33 @@ p5.zine is a **browser‑first** library on top of p5.js for making printable zi
30
30
 
31
31
  ```html
32
32
  <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/p5.js"></script>
33
- <script src="https://cdn.jsdelivr.net/npm/p5.zine@1.0.1/dist/p5.zine.legacy.js"></script>
33
+ <script src="https://cdn.jsdelivr.net/npm/p5.zine/dist/p5.zine.legacy.js"></script>
34
34
  ```
35
35
 
36
36
  ## Table of contents
37
37
 
38
- - [Quick start (CDN, easiest)](#quick-start-cdn-easiest)
39
- - [Bundles (p5 2.x + 1.x)](#bundles-p5-2x--1x)
40
- - [Local dev / preview](#local-dev--preview)
41
- - [Pages](#pages)
42
- - [Configuration (window.zine)](#configuration-windowzine)
43
- - [Preview modes](#preview-modes)
44
- - [Mouse handling](#mouse-handling)
45
- - [Download background](#download-background)
46
- - [Page size vs. paper size](#page-size-vs-paper-size)
47
- - [Export](#export)
48
- - [Custom helpers (custom.js)](#custom-helpers-customjs)
49
- - [CDN usage (advanced)](#cdn-usage-advanced)
50
- - [Releases & versioning (maintainers)](#releases--versioning-maintainers)
51
- - [Architecture (1.x + 2.x addons)](#architecture-1x--2x-addons)
52
- - [Internal defaults](#internal-defaults)
38
+ - [p5.zine](#p5zine)
39
+ - [Quick start (CDN, easiest)](#quick-start-cdn-easiest)
40
+ - [p5 2.x](#p5-2x)
41
+ - [p5 1.x (legacy)](#p5-1x-legacy)
42
+ - [Table of contents](#table-of-contents)
43
+ - [Bundles (p5 2.x + 1.x)](#bundles-p5-2x--1x)
44
+ - [Local dev / preview](#local-dev--preview)
45
+ - [Pages](#pages)
46
+ - [Configuration (`window.zine`)](#configuration-windowzine)
47
+ - [Preview modes](#preview-modes)
48
+ - [Mouse handling](#mouse-handling)
49
+ - [Download background](#download-background)
50
+ - [Page size vs. paper size](#page-size-vs-paper-size)
51
+ - [`zinePageSize(width, height, options)`](#zinepagesizewidth-height-options)
52
+ - [`zinePaperSize(width, height, options)`](#zinepapersizewidth-height-options)
53
+ - [Export](#export)
54
+ - [JPG / PNG](#jpg--png)
55
+ - [PDF](#pdf)
56
+ - [Custom helpers (custom.js)](#custom-helpers-customjs)
57
+ - [CDN usage (advanced)](#cdn-usage-advanced)
58
+ - [Architecture (1.x + 2.x addons)](#architecture-1x--2x-addons)
59
+ - [Internal defaults](#internal-defaults)
53
60
 
54
61
  ## Bundles (p5 2.x + 1.x)
55
62
 
@@ -111,7 +118,7 @@ window.zine = {
111
118
  downloadBackground: "#ffffff", // default white; use "transparent" for none
112
119
 
113
120
  mouseClamp: true, // keep mouse within each page
114
- mousePadding: 0, // when mouseClamp is false, allow extra padding
121
+ mousePadding: 0, // when mouseClamp is false, allow extra padding
115
122
 
116
123
  // page size (single page)
117
124
  pageWidth: "8.5in",
@@ -125,7 +132,7 @@ window.zine = {
125
132
 
126
133
  // DPI + units (used for inches/cm/mm/pt conversions)
127
134
  pageDPI: 96,
128
- pageUnit: "in"
135
+ pageUnit: "in",
129
136
  };
130
137
  ```
131
138
 
@@ -147,6 +154,7 @@ Set `downloadBackground: "transparent"` to keep transparency (only works with PN
147
154
  ## Page size vs. paper size
148
155
 
149
156
  ### `zinePageSize(width, height, options)`
157
+
150
158
  Sets the **base size for each single page** (cover/back). Full spreads are 2× width.
151
159
 
152
160
  ```js
@@ -156,6 +164,7 @@ function setup() {
156
164
  ```
157
165
 
158
166
  ### `zinePaperSize(width, height, options)`
167
+
159
168
  Sets the **full paper size** (imposition) and derives the page size:
160
169
 
161
170
  - `pageWidth = paperHeight / 4`
@@ -205,27 +214,11 @@ These helpers are available on both `p5` and `p5.Graphics`:
205
214
  If you want a pinned version:
206
215
 
207
216
  ```html
208
- <script src="https://cdn.jsdelivr.net/npm/p5.zine@1.0.1/dist/p5.zine.js"></script>
217
+ <script src="https://cdn.jsdelivr.net/npm/p5.zine@0.0.1/dist/p5.zine.js"></script>
209
218
  ```
210
219
 
211
220
  If you omit the version, CDN will serve the latest tag (which can include breaking changes).
212
221
 
213
- ## Releases & versioning (maintainers)
214
-
215
- This project publishes to npm primarily to power CDN distribution. If you’re a maintainer:
216
-
217
- ```bash
218
- npm version patch # or minor / major
219
- npm run build
220
- npm publish
221
- ```
222
-
223
- If you want automated releases, I can set up:
224
-
225
- - GitHub Actions for `npm publish` on tag
226
- - Auto‑generated changelog
227
- - Release notes from conventional commits
228
-
229
222
  ## Architecture (1.x + 2.x addons)
230
223
 
231
224
  Core addon logic lives in:
@@ -252,7 +245,7 @@ const DEFAULTS = {
252
245
  rHeight: 306,
253
246
  pWidth: 800,
254
247
  frameRate: 10,
255
- pixelDensity: 1
248
+ pixelDensity: 1,
256
249
  };
257
250
  ```
258
251