@@ -13,7 +13,7 @@ instead use
1313To do get started, you can run:
1414
1515``` 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
1717```
1818
1919Please 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
5050package manager:
5151
5252``` shell
53- [npm| yarn| pnpm] [install| add] react- p5-wrapper
53+ [npm| yarn| pnpm] [install| add] @ p5-wrapper/react
5454```
5555
5656## Usage
@@ -59,7 +59,7 @@ package manager:
5959
6060``` jsx
6161import * as React from " react" ;
62- import { ReactP5Wrapper } from " react- p5-wrapper" ;
62+ import { ReactP5Wrapper } from " @ p5-wrapper/react " ;
6363
6464function sketch (p5 ) {
6565 p5 .setup = () => p5 .createCanvas (600 , 400 , p5 .WEBGL );
@@ -94,7 +94,7 @@ first and only argument.
9494
9595``` tsx
9696import * as React from " react" ;
97- import { P5CanvasInstance , ReactP5Wrapper } from " react- p5-wrapper" ;
97+ import { P5CanvasInstance , ReactP5Wrapper } from " @ p5-wrapper/react " ;
9898
9999function sketch(p5 : P5CanvasInstance ) {
100100 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
130130
131131``` tsx
132132import * as React from " react" ;
133- import { ReactP5Wrapper , Sketch } from " react- p5-wrapper" ;
133+ import { ReactP5Wrapper , Sketch } from " @ p5-wrapper/react " ;
134134
135135const sketch: Sketch = p5 => {
136136 p5 .setup = () => p5 .createCanvas (600 , 400 , p5 .WEBGL );
@@ -186,7 +186,7 @@ import {
186186 P5CanvasInstance ,
187187 ReactP5Wrapper ,
188188 SketchProps
189- } from " react- p5-wrapper" ;
189+ } from " @ p5-wrapper/react " ;
190190
191191type MySketchProps = SketchProps & {
192192 rotation: number ;
@@ -236,7 +236,7 @@ export function App() {
236236
237237``` tsx
238238import React , { useEffect , useState } from " react" ;
239- import { ReactP5Wrapper , Sketch , SketchProps } from " react- p5-wrapper" ;
239+ import { ReactP5Wrapper , Sketch , SketchProps } from " @ p5-wrapper/react " ;
240240
241241type MySketchProps = SketchProps & {
242242 rotation: number ;
@@ -286,7 +286,7 @@ export function App() {
286286
287287``` jsx
288288import * as React from " react" ;
289- import { ReactP5Wrapper } from " react- p5-wrapper" ;
289+ import { ReactP5Wrapper } from " @ p5-wrapper/react " ;
290290
291291function setup (p5 ) {
292292 return () => {
@@ -337,7 +337,7 @@ our sketches!
337337
338338``` jsx
339339import React , { useEffect , useState } from " react" ;
340- import { ReactP5Wrapper } from " react- p5-wrapper" ;
340+ import { ReactP5Wrapper } from " @ p5-wrapper/react " ;
341341
342342function sketch (p5 ) {
343343 let rotation = 0 ;
@@ -390,7 +390,7 @@ For instance, using [styled components](https://styled-components.com), we could
390390center some text on top of our sketch like so:
391391
392392``` jsx
393- import { P5WrapperClassName , ReactP5Wrapper } from " react- p5-wrapper" ;
393+ import { P5WrapperClassName , ReactP5Wrapper } from " @ p5-wrapper/react " ;
394394import styled , { createGlobalStyle } from " styled-components" ;
395395
396396const GlobalWrapperStyles = createGlobalStyle`
@@ -465,7 +465,7 @@ component, we could do the following:
465465``` tsx
466466import * as p5 from " p5" ;
467467import React , { useEffect , useState } from " react" ;
468- import { ReactP5Wrapper , Sketch } from " react- p5-wrapper" ;
468+ import { ReactP5Wrapper , Sketch } from " @ p5-wrapper/react " ;
469469
470470(window as any ).p5 = p5 ;
471471
0 commit comments