Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sungchuni/ws-visu-obj

๐Ÿ“Š ์†Œํ˜• ์• ๋‹ˆ๋ฉ”์ดํ‹ฐ๋“œ ์ฐจํŠธ ์ปดํฌ๋„ŒํŠธ
https://github.com/sungchuni/ws-visu-obj

canvas react visualization

Last synced: 10 days ago
JSON representation

๐Ÿ“Š ์†Œํ˜• ์• ๋‹ˆ๋ฉ”์ดํ‹ฐ๋“œ ์ฐจํŠธ ์ปดํฌ๋„ŒํŠธ

Awesome Lists containing this project

README

        

winkstone์˜ ws-front ํ”„๋กœ์ ํŠธ๋ฅผ ์œ„ํ•œ ์‹œ๊ฐํ™” ์˜ค๋ธŒ์ ํŠธ์ž…๋‹ˆ๋‹ค.

## DIRECT USE

src ํด๋” ๋‚ด ํŒŒ์ผ์„ ๋ณต์‚ฌํ•œ ํ›„ [src/index.js](src/index.js) ํŒŒ์ผ์„ importํ•˜์—ฌ ์‚ฌ์šฉํ•˜์‹ญ์‹œ์˜ค.

```jsx
import VisualizationObject from "./visu-obj";
import VisuObj from "./visu-obj/index";
import * as VisuObj from "./visu-obj/index.js";
import { Leaf } from "./visu-obj/index.js";

function SomeComp() {
return (
<>


>
);
}
```

๊ฐ๊ฐ์˜ ์ปดํฌ๋„ŒํŠธ๋ฅผ ์ง์ ‘ ๋ถˆ๋Ÿฌ์™€๋„ ์ข‹์Šต๋‹ˆ๋‹ค.

```js
import Sphere from "./visu-obj/Sphere";

function AnotherComp() {
return (
<>

>
);
}
```

ํƒ€์ž… ์ •์˜๊ฐ€ ํ•„์š”ํ•œ ๊ฒฝ์šฐ [types/index.d.ts](types/index.d.ts) ํŒŒ์ผ์„ src ํด๋”๋กœ ๋ณต์‚ฌํ•˜์‹ญ์‹œ์˜ค. (๊ถŒ์žฅ)

์•„๋ž˜ dependencies๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

- [gsap](https://www.npmjs.com/package/gsap)
- [intersection-observer](https://www.npmjs.com/package/intersection-observer)
- [lodash-es](https://www.npmjs.com/package/lodash-es)
- [react](https://www.npmjs.com/package/react)

lodash๋กœ lodash-es๋ฅผ ๋Œ€์ฒดํ•˜์…”๋„ ์ข‹์Šต๋‹ˆ๋‹ค.

## LIKE PACKAGE

๊นƒ ์ €์žฅ์†Œ๋ฅผ ํŒจํ‚ค์ง€์ฒ˜๋Ÿผ ์„ค์น˜ํ•˜์—ฌ ์“ธ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

#### `yarn add "git+https://github.com/sungchuni/ws-visu-obj.git"`

[package.json](package.json)์˜ dependencies ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์ด, ํ•ด๋‹น ํ”„๋กœ์ ํŠธ์— ์„ค์น˜๋˜์—ˆ๋Š”์ง€ ์ง์ ‘ ํ™•์ธ ๋ฐ”๋ž๋‹ˆ๋‹ค.

## BUILD

๋นŒ๋“œ ์ž‘์—…์€ yarn 2๋ฅผ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.

#### `yarn build`

webpack --mode=none์œผ๋กœ ์ปดํฌ๋„ŒํŠธ๋ฅผ dist/index.js์— ๋นŒ๋“œํ•ฉ๋‹ˆ๋‹ค.

#### `yarn build:dev`

webpack --mode=develpment๋กœ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋นŒ๋“œํ•ฉ๋‹ˆ๋‹ค.

#### `yarn build:prod`

webpack --mode=production์œผ๋กœ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋นŒ๋“œํ•ฉ๋‹ˆ๋‹ค.

#### `yarn build:watch`

webpack --mode=development๋กœ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋นŒ๋“œํ•˜๊ณ , ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ถ”์ ํ•˜์—ฌ ๋‹ค์‹œ ๋นŒ๋“œํ•˜๋Š” ๋ฐ๋ชฌ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.