@@ -13,7 +13,7 @@ instead use
13
13
To do get started, you can run:
14
14
15
15
``` shell
16
- [npm| yarn| pnpm] [install| add] @p5-wrapper/next react- p5-wrapper
16
+ [npm| yarn| pnpm] [install| add] @p5-wrapper/next @ p5-wrapper/react
17
17
```
18
18
19
19
Please continue reading these docs and also look at
@@ -50,7 +50,7 @@ To install, use the following command in the format appropriate to your chosen
50
50
package manager:
51
51
52
52
``` shell
53
- [npm| yarn| pnpm] [install| add] react- p5-wrapper
53
+ [npm| yarn| pnpm] [install| add] @ p5-wrapper/react
54
54
```
55
55
56
56
## Usage
@@ -59,7 +59,7 @@ package manager:
59
59
60
60
``` jsx
61
61
import * as React from " react" ;
62
- import { ReactP5Wrapper } from " react- p5-wrapper" ;
62
+ import { ReactP5Wrapper } from " @ p5-wrapper/react " ;
63
63
64
64
function sketch (p5 ) {
65
65
p5 .setup = () => p5 .createCanvas (600 , 400 , p5 .WEBGL );
@@ -94,7 +94,7 @@ first and only argument.
94
94
95
95
``` tsx
96
96
import * as React from " react" ;
97
- import { P5CanvasInstance , ReactP5Wrapper } from " react- p5-wrapper" ;
97
+ import { P5CanvasInstance , ReactP5Wrapper } from " @ p5-wrapper/react " ;
98
98
99
99
function sketch(p5 : P5CanvasInstance ) {
100
100
p5 .setup = () => p5 .createCanvas (600 , 400 , p5 .WEBGL );
@@ -130,7 +130,7 @@ that is that the `p5` argument passed to the sketch function is auto-typed as a
130
130
131
131
``` tsx
132
132
import * as React from " react" ;
133
- import { ReactP5Wrapper , Sketch } from " react- p5-wrapper" ;
133
+ import { ReactP5Wrapper , Sketch } from " @ p5-wrapper/react " ;
134
134
135
135
const sketch: Sketch = p5 => {
136
136
p5 .setup = () => p5 .createCanvas (600 , 400 , p5 .WEBGL );
@@ -186,7 +186,7 @@ import {
186
186
P5CanvasInstance ,
187
187
ReactP5Wrapper ,
188
188
SketchProps
189
- } from " react- p5-wrapper" ;
189
+ } from " @ p5-wrapper/react " ;
190
190
191
191
type MySketchProps = SketchProps & {
192
192
rotation: number ;
@@ -236,7 +236,7 @@ export function App() {
236
236
237
237
``` tsx
238
238
import React , { useEffect , useState } from " react" ;
239
- import { ReactP5Wrapper , Sketch , SketchProps } from " react- p5-wrapper" ;
239
+ import { ReactP5Wrapper , Sketch , SketchProps } from " @ p5-wrapper/react " ;
240
240
241
241
type MySketchProps = SketchProps & {
242
242
rotation: number ;
@@ -286,7 +286,7 @@ export function App() {
286
286
287
287
``` jsx
288
288
import * as React from " react" ;
289
- import { ReactP5Wrapper } from " react- p5-wrapper" ;
289
+ import { ReactP5Wrapper } from " @ p5-wrapper/react " ;
290
290
291
291
function setup (p5 ) {
292
292
return () => {
@@ -337,7 +337,7 @@ our sketches!
337
337
338
338
``` jsx
339
339
import React , { useEffect , useState } from " react" ;
340
- import { ReactP5Wrapper } from " react- p5-wrapper" ;
340
+ import { ReactP5Wrapper } from " @ p5-wrapper/react " ;
341
341
342
342
function sketch (p5 ) {
343
343
let rotation = 0 ;
@@ -390,7 +390,7 @@ For instance, using [styled components](https://styled-components.com), we could
390
390
center some text on top of our sketch like so:
391
391
392
392
``` jsx
393
- import { P5WrapperClassName , ReactP5Wrapper } from " react- p5-wrapper" ;
393
+ import { P5WrapperClassName , ReactP5Wrapper } from " @ p5-wrapper/react " ;
394
394
import styled , { createGlobalStyle } from " styled-components" ;
395
395
396
396
const GlobalWrapperStyles = createGlobalStyle`
@@ -465,7 +465,7 @@ component, we could do the following:
465
465
``` tsx
466
466
import * as p5 from " p5" ;
467
467
import React , { useEffect , useState } from " react" ;
468
- import { ReactP5Wrapper , Sketch } from " react- p5-wrapper" ;
468
+ import { ReactP5Wrapper , Sketch } from " @ p5-wrapper/react " ;
469
469
470
470
(window as any ).p5 = p5 ;
471
471
0 commit comments