leafthrough 0.1.1 → 0.1.3

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
@@ -165,7 +165,7 @@ The magazine fills the element you give it and keeps its proportions, centred.
165
165
  | `lighting` | `LightingOptions` | | See below. |
166
166
  | `motion` | `MotionOptions` | | See below. |
167
167
  | `interaction` | `InteractionOptions` | | See below. |
168
- | `maxPixelRatio` | `number` | `2` | The canvas is also capped at about 15 megapixels. |
168
+ | `maxPixelRatio` | `number` | `3` | The canvas is also capped at about 15 megapixels. |
169
169
  | `preload` | `number` | `6` | Pages either side of the visible ones (mid-turn and rolled-up ones included) to load ahead. Pages twice as far away unload. `Infinity` keeps all. |
170
170
  | `plain` | `boolean` | `false` | Flat pages without 3D. Used by itself when the browser can't run WebGL. |
171
171
  | `label` | `string` | `'Magazine'` | Accessible name. |
@@ -204,7 +204,7 @@ one is the opacity of the shadow under the open spread, default `0.15`.
204
204
  | `maxTilt` | spread `45`, single `35` | Degrees the fold tilts from where you hold it. |
205
205
  | `jitter` | `true` | Small random differences, so no two turns look alike. |
206
206
  | `hoverLift` | `0.03` | How far a hovered sheet lifts (spread). |
207
- | `reducedMotion` | `'auto'` | Follows `prefers-reduced-motion`. Reduced motion means quicker turns, no hover lift and no hold-to-riffle. |
207
+ | `reducedMotion` | `'auto'` | Follows `prefers-reduced-motion`. Reduced motion drops the hover lift and the random wobble; turns and hold-to-riffle work as usual. |
208
208
 
209
209
  **`interaction`**: `drag`, `click`, `hold` and `hover` all default to `true`. `keyboard`
210
210
  defaults to `true` (works while the magazine has focus); set it to `'global'` to listen on
@@ -50,23 +50,23 @@ function resolveSettings(options, layout, prefersReducedMotion) {
50
50
  floorShadow: lighting.floorShadow ?? 0.15
51
51
  },
52
52
  motion: {
53
- speed: Math.max(0.05, (motion.speed ?? 1) * (reduced ? 2.5 : 1)),
53
+ speed: Math.max(0.05, motion.speed ?? 1),
54
54
  dragDistance: motion.dragDistance ?? (spread2 ? 0.8 : 1.2),
55
55
  commitThreshold: motion.commitThreshold ?? (spread2 ? 0.2 : 0.1),
56
56
  curl: motion.curl ?? 1,
57
57
  maxTilt: motion.maxTilt ?? (spread2 ? 45 : 35),
58
- jitter: motion.jitter ?? true,
58
+ jitter: reduced ? false : motion.jitter ?? true,
59
59
  hoverLift: reduced ? 0 : motion.hoverLift ?? 0.03,
60
60
  reduced
61
61
  },
62
62
  interaction: {
63
63
  drag: interaction.drag ?? true,
64
64
  click: interaction.click ?? true,
65
- hold: (interaction.hold ?? true) && !reduced,
65
+ hold: interaction.hold ?? true,
66
66
  hover: interaction.hover ?? true,
67
67
  keyboard: interaction.keyboard ?? true
68
68
  },
69
- maxPixelRatio: options.maxPixelRatio ?? 2
69
+ maxPixelRatio: options.maxPixelRatio ?? 3
70
70
  };
71
71
  }
72
72
 
@@ -2975,4 +2975,4 @@ export {
2975
2975
  defaultPageLabel,
2976
2976
  LeafThrough
2977
2977
  };
2978
- //# sourceMappingURL=chunk-DQL4R32K.js.map
2978
+ //# sourceMappingURL=chunk-XPIDTVB5.js.map