react-sync-board 1.3.1 → 1.4.0

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
@@ -31,6 +31,35 @@ See the examples in `src/stories` to know how to use it.
31
31
 
32
32
  (Documentation in progress)
33
33
 
34
+ ### Infinite background
35
+
36
+ The background uses virtual tiles: only the visible tiles and a one-tile margin
37
+ are mounted. Panning does not increase the number of mounted tiles.
38
+ Tiles follow the camera's pan, zoom and rotation.
39
+
40
+ ```jsx
41
+ <Board
42
+ backgroundTileSize={512}
43
+ style={{
44
+ backgroundColor: "#555",
45
+ backgroundImage: "radial-gradient(white 1px, transparent 1px)",
46
+ backgroundSize: "37px 37px",
47
+ }}
48
+ />
49
+ ```
50
+
51
+ `backgroundTileSize` optionally sets the square tile side in world-coordinate
52
+ pixels. Omit it for automatic sizing (512 world pixels, increased when zooming
53
+ out to keep the tile count small). A positive finite number overrides automatic
54
+ sizing; invalid values fall back to automatic sizing. Smaller tiles mount more
55
+ elements, especially when zoomed out.
56
+
57
+ This controls rendering tile size; `style.backgroundSize` controls pattern size.
58
+ Offsets keep repeating backgrounds aligned even when the tile size is not a
59
+ multiple of the pattern size. CSS image/gradient layers, positions, repeat modes
60
+ and custom image URLs are read from the supplied background style.
61
+ `boardSize` is deprecated and does not constrain panning.
62
+
34
63
  ## Storybook
35
64
 
36
65
  To start the storybook, clone this repository then execute: