• Stars
    star
    177
  • Rank 215,985 (Top 5 %)
  • Language
    C#
  • License
    MIT License
  • Created about 7 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

make mesh like line, polygon, etc in unity3d

DataRenderer2D

DataRenderer2D is a simple drawing tool. you can make mesh from data and control it using animator. all of PR, bug report, comment, suggestion are vary grateful.

PatchNote

AssetStore(free)

Script Edit

If you want to control by script, you have to call GeometryUpdateFlagup() after adjust value.

public UILine line;
public float time;

IEnumerator Corotuine(){
   var t = 0f;
   while(t < 1f)
   {
      t+=Time.deltaTime/time;
      line.line.option.endRatio = t;
      line.UpdateGeometryFlagUp();
      yield return null;
   }
}

Bezier line

  • Each node has control point and width.
  • set line drawing rate using start rate and end rate.

bezier

Explain(Korean) ์ด๊ฒŒ ์‚ฌ์‹ค ๋ฉ”์ธ์ž…๋‹ˆ๋‹ค. ์•„๋ž˜ ๊ฒƒ(?)๋“ค์€ ๊ทธ๋ƒฅ ์‚ฌ์€ํ’ˆ์ •๋„๋กœ ์ƒ๊ฐํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์›๋ž˜ ์ด ์—์…‹์˜ ์ด๋ฆ„์€ Spline mesh Drawer์˜€์Šต๋‹ˆ๋‹ค. ์ด ์ด๋ฆ„์ผ ๋•Œ๊ฐ€ ํ›จ์”ฌ ์ž˜ํŒ”๋ ธ๊ตฌ์š”(...). ์•„๋ž˜ ๋‹ค๊ฐํ˜•๊ณผ ์žก๊ฒƒ๋“ค์€ ๋‹ค๋ฅธ ์—์…‹์œผ๋กœ ํ•˜๋ ค๋‹ค๊ฐ€ ๊ทธ๋ƒฅ ํ•ฉ์ณ์„œ ํŒ”์ž ํ•ด์„œ DataRenderer2D๋กœ ๋ฐ”๊พธ๊ณ  ํ•ฉ์ณ๋ฒ„๋ ธ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ํŒ๋งค๋Ÿ‰์€ ๋ฐ˜ํ† ๋ง‰ ์ด๋ฆ„์˜ ์ค‘์š”์„ฑ์„ ๊นจ๋‹ซ๋Š” ์ˆœ๊ฐ„์ž…๋‹ˆ๋‹ค.
2D๋กœ ๊ตฌ์„ฑ๋œ ์„ ์„ ์ƒ๊ฐํ•˜๋Š” ๋ฐ๋กœ ๊ทธ๋ฆฌ๋Š”๊ฒƒ์ด ๋ชฉ์ ์ž…๋‹ˆ๋‹ค. ์‹œ์ž‘๋น„์œจ๊ณผ ๋๋‚˜๋Š” ๋น„์œจ, ๊ฐ์ ์—์„œ ๋„“์ด ๋“ฑ์„ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ ์š”์†Œ๋“ค์„ Animator์—์„œ ์กฐ์ ˆํ•˜์—ฌ ์‹œ๊ฐ์ ์œผ๋กœ ์„ ์„ ๊ทธ๋ฆฌ๋Š” ํšจ๊ณผ๋ฅผ ๋ณด์—ฌ์ฃผ๋Š”๊ฒŒ ๋ชฉ์ ์ด์˜€์Šต๋‹ˆ๋‹ค. ์œ ๋‹ˆํ‹ฐ์—์„œ Animator๋กœ ์›€์ง์ด๊ธฐ ์œ„ํ•ด์„  struct๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ž˜์„œ ์—ฌ๋Ÿฌ ๋ฌธ์ œ๋“ค์ด ์ƒ๊ฒผ๋Š”๋ฐ ๋•๋ถ„์— ์ฝ”๋“œ๊ฐ€ ๊ฐœํŒ(...). ๋ญ, ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๊ฒฝํ—˜์„ ํ•˜๋ฉด ์ข‹์€๊ฑฐ์ฃ .
์ œ์ผ ๋†€๋ž๋˜๊ฑด ์‚ฌ์šฉ์ž๋ถ„๋“ค์ค‘ ์—ฌ๊ธฐ์— ํ…์Šค์ณ๋ฅผ ์ž…ํ˜€์„œ ์‚ฌ์šฉํ•œ ๋ถ„์ž…๋‹ˆ๋‹ค. sprite๋กœ ํ…์Šค์ณ๋ฅผ ์ž…ํžˆ๊ธฐ์œ„ํ•ด ์งฑ๊ตฌ๋ฅผ ๊ตด๋ ค๋ดค๋Š”๋ฐ ์•„๋ฌด๋ฆฌํ•ด๋„ uv์žก๋Š”๊ฒŒ ํž˜๋“ค์–ด์„œ ๊ทธ๋ƒฅ 0~1๋กœ ๋งŒ๋“ค์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ์•„ํ‹€๋ผ์Šค๋กœ ํ‘œํ˜„ํ•˜๊ธด ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ž˜๋„ ์—ฌ๊ธฐ์— ํ…์Šค์ณ๋ฅผ ์ž…ํžˆ๊ณ  ๊ด‘์›์„ ์ค˜์„œ ๋‚˜๋ฌด๋ฅผ ๊ทธ๋ฆฌ๊ณ  ์žˆ๋Š” ํ”„๋กœ์ ํŠธ๋ฅผ ๋ดค๋Š”๋ฐ ์ •๋ง ๋ฉ‹์ง€๋”๊ตฐ์š”.

Polygon

  • various method to draw polygon.
  • count, scale, inner ratio.

polygon

Explain(Korean)

๊ธฐ๋ณธ์ ์ธ ๋‹ค๊ฐํ˜•์„ ๊ทธ๋ฆฌ๋Š” ๋…€์„์ž…๋‹ˆ๋‹ค. ์ง€๊ทธ์žฌ๊ทธ๋กœ ๋‹ค๊ฐํ˜•์„ ๊ทธ๋ฆฌ๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜์—” ์ œ๋ฒ• ์งฑ๊ตฌ๋ฅผ ๊ตด๋ ค์„œ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค.
์‚ฌ์‹ค Holeํ˜•์‹์œผ๋กœ ํ•œ์ ์— ์ €๋ ‡๊ฒŒ ๋นก๋นกํ•˜๊ฒŒ(?) ๋งค์‰ฌ๊ฐ€ ๋ชจ์ด๋Š” ๊ฒฝ์šฐ ์–ด๋–ค ๋””๋ฉ”๋ฆฌํŠธ๊ฐ€ ์žˆ์„ ๊ฒƒ ๊ฐ™์•„์„œ ์ง€๊ทธ์žฌ๊ทธ๋กœ ๊ทธ๋ฆฐ๊ฑด๋ฐ ์ง€๊ทธ์žฌ๊ทธ์˜ ๊ฒฝ์šฐ ๊ทธ๋ผ๋ฐ์ด์…˜์„ ์ ์šฉํ•˜๋ฉด ์ข€ ์ด์ƒํ•˜๊ฒŒ ๋‚˜์˜ค๋Š” ๊ฑธ ํ™•์ธํ•ด์„œ ๊ทธ๋ƒฅ ์˜ต์…˜์œผ๋กœ ๋นผ๋ฒ„๋ฆฌ์ž ํ•ด์„œ ์ด๋ ‡๊ฒŒ ๋ฌ์Šต๋‹ˆ๋‹ค. ๋ญ ์–ด๋–ค ๋ฐฉ์‹์ด๋˜ ์žฅ๋‹จ์ด ์žˆ๊ฒ ์ฃ .
๋‹ค๊ฐํ˜•์„ ๊ทธ๋ฆด๋•Œ ์‹œ๊ณ„๋ฐฉํ–ฅ์œผ๋กœ ๋‚˜์˜ค๊ฑฐ๋‚˜ ์‚ฌ๋ผ์ง€๋Š” ํšจ๊ณผ๋ฅผ ๋งŒ๋“ค๊ณ  ์‹ถ์—ˆ์Šต๋‹ˆ๋‹ค.(์ด์œ ๋Š” ์—†์Šต๋‹ˆ๋‹ค. ๊ทธ์ € ๋งŒ๋“ค๊ณ  ์‹ถ์—ˆ์„ ๋ฟ). ์ฒ˜์Œ์—๋Š” ์›์„ ๊ธฐ์ค€์œผ๋กœ ๊ทธ๋ ธ๋Š”๋ฐ ๊ทธ๋ฆฌ๋Š” ๋„์ค‘ ๋‹ค๊ฐํ˜•์ด ์ฐŒ๋ถ€๋Ÿฌ์ง€๋Š”(...) ๊ฒƒ์„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค. ์ง€๊ธˆ์€ ์ž˜ ๋‚˜์˜ค๋Š”๋ฐ ๋‹ค์Œ ์ ์œผ๋กœ ๋ฐฉํ–ฅ๋ฒกํ„ฐ๋ฅผ ๊ตฌํ•ด์„œ ์˜์ ์—์„œ ์‹œ์ž‘ ๊ฐ๋„์™€ ๋๋‚˜๋Š” ๊ฐ๋„๋กœ์˜ ๋ฐฉํ–ฅ๋ฒกํ„ฐ์™€ ๊ฒน์น˜๋Š” ์ ์„ ๊ธฐ์ค€์œผ๋กœ ๊ทธ๋ฆฌ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๊ฑธ ์“ฐ๊ณ  ์žˆ๋Š” ์ €๋„ ๋ฌด์Šจ๋ง์„ ํ•˜๋Š”์ง€ ์ž˜ ๋ชจ๋ฅด๊ฒ ์œผ๋‹ˆ ๊ทธ๋ƒฅ ๋„˜๊ฐ€์…”๋„ ๋ฉ๋‹ˆ๋‹ค. ์•„๋ฌดํŠผ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์—†์–ด์ง€๊ฒŒ ๋งŒ๋“œ๋Š”๊ฑด ์„ฑ๊ณตํ–ˆ๋Š”๋ฐ ์ด๊ฑธ ๋ญ ์–ด๋”ฐ ์จ์•ผ๋ ์ง€๋Š” ์ž˜ ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค. ์ด๊ฑด ๋–จ์–ด์ง„ ๋ฉด์ ‘์—์„œ ๋‚˜์˜จ ์ด์•ผ๊ธฐ์ธ๋ฐ, ๊ณง ๊ฐ ๋ณ€์— ๋Œ€ํ•˜์—ฌ ๊ธธ์ด๋‚˜ ์ƒ‰์ƒ์„ ์ปค์Šคํ…€ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•˜๋„๋ก ์˜ต์…˜ํ•˜๋‚˜๋ฅผ ์ถ”๊ฐ€ํ•  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๋ง์ด ์ข€ ์ด์ƒํ•ด์„œ ์ดํ•ดํ•˜๊ธฐ ํž˜๋“ ๋ฐ ์˜ˆ๋ฅผ๋“ค์–ด ๊ฒŒ์ž„์—์„œ ๋ณด๋ฉด 5๊ฐํ˜•์œผ๋กœ ์Šคํ…Ÿ์„ ๋ณด์—ฌ์ฃผ๋Š” ๋ฐฉ์‹์— ์“ธ ์ˆ˜ ์žˆ๋„๋ก ๋งŒ๋“ค ์˜ˆ์ •์ž…๋‹ˆ๋‹ค. ๋ญ, SKT์—์„œ ๋ฑ…๋งŒ KDA๊ฐ€ ๋†’์•„์„œ ์˜ค๊ฐํ˜•์„ ๋šซ๊ณ  ๋‚˜์˜ค์ž–์•„์š”? ๊ทธ๋Ÿฐ๊ฑฐ ๋งํ•˜๋Š” ๊ฒ๋‹ˆ๋‹ค.

Sinwave

sin

Explain(Korean)

๋„ค์ด๋ฒ„ ์œ ๋‹ˆํ‹ฐ์นดํŽ˜์—์„œ ์งˆ๋ฌธ์„ ๋ฐ›๊ณ  ๋งŒ๋“  ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๊ฐ„๋‹จํ•œ ๋ชจ๋ธ์ด๋ผ ๋งŒ๋“œ๋Š”๋ฐ 1์‹œ๊ฐ„์ฏค ๊ฑธ๋ฆฐ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์‚ฌ์‹ค ๊ทธ๋ฆฌ ์‚ฌ์šฉํ•  ๋ฐ๊ฐ€ ์• ๋งคํ•œ ๋…€์„์ž…๋‹ˆ๋‹ค. ๋ฌผ์„ ํ‘œํ˜„ํ•œ๋‹ค๊ฑฐ๋‚˜ ํ•  ๋•Œ ์“ธ ์ˆ˜ ์žˆ์œผ๋‚˜. ํ…์Šค์ณ ๊ฐ™์€๊ฑด ๊ฟˆ๋„ ๋ชป๊พธ๊ณ ... ๋งŒ๋“ค๋ฉด์„œ ์‹ ํ˜ธ์ฒ˜๋ฆฌ ๋•Œ ๋ฐฐ์› ๋˜ ํ†ฑ๋‹ˆํŒŒ๋‚˜ ์ง€๊ทธ์žฌ๊ทธ ๋“ฑ๋“ฑ ๊ฐ๋™ ์‹œ๊ทธ๋„์„ ํ‘œํ˜„ํ•˜๋„๋ก ๋งŒ๋“ค๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ ์ˆ˜์ง์œผ๋กœ ์˜ฌ๋ผ๊ฐ€๋Š” ํŒจํ„ด์˜ ๊ฒฝ์šฐ ๋งค์‰ฌ๋ฅผ ๋‹ค๋ฅด๊ฒŒ ํ•ด์ค˜์•ผ ๋œ๋‹ค๋Š” ๊ฒƒ ๊นจ๋‹ฌ์€ ๋™์‹œ์— ํฌ๊ธฐํ–ˆ์Šต๋‹ˆ๋‹ค. ์–ด์„คํ”„๊ฒŒ ๊ฒฐ๊ตญ sinํŒŒ๋ฐ–์— ์—†๋Š” ์• ๋งคํ•œ ๋…€์„์ด ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

Hole

hole

Explain(Korean)

๊ทธ๋ƒฅ ๋งŒ๋“ค๊ณ  ์‹ถ์–ด์ ธ์„œ ๋งŒ๋“  ํ˜•์‹์ž…๋‹ˆ๋‹ค. ์‚ฌ์‹ค ํด๋ฆฌ๊ณค์— ๋ฐ˜์ „ํ˜•์‹์œผ๋กœ ๋„ฃ์„๊นŒ ํ–ˆ๋Š”๋ฐ ๋”ฐ๋กœ ๋ถ„๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ƒฅ๋ณด๋ฉด ๋ปฅ๋šซ๋ฆฐ ์›์ž…๋‹ˆ๋‹ค. ์™€์ด์–ดํ”„๋ ˆ์ž„์ด ์–ด๋–ป๊ฒŒ ๋˜์–ด ์žˆ๋‚˜ ๋ณผ ์ˆ˜ ์žˆ๋Š” gif์ž…๋‹ˆ๋‹ค.

๋ณด์‹œ๋ฉด ์•ˆ์—์žˆ๋Š” ๋‹ค๊ฐํ˜•์˜ ๊ฐ ๊ผญ์ง€์ ๊ณผ ์™ธ๋ถ€์˜ ์ •์‚ฌ๊ฐํ˜•์— ๋Œ€ํ•˜์—ฌ ํด๋ฆฌ๊ณค์„ ๊ทธ๋ฆฌ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋Œ€์ถฉ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์‹์œผ๋กœ ํด๋ฆฌ๊ณค์„ ๋งŒ๋“ฆ๋‹ˆ๋‹ค.

1. ์™ธ๋ถ€ 4๋ณ€์—์„œ ๋‹ค๊ฐํ˜•์˜ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ์ ์œผ๋กœ ์„ธ๋ชจ๋ฅผ ๊ทธ๋ฆฐ๋‹ค.
2. ๋‚ด๋ถ€ ๊ฐ๋ณ€์—์„œ ๊ฐ€์žฅ ๊ฐ€๊น๊ฒŒ ๋ฐ”๋ผ๋ณด๊ณ  ์žˆ๋Š” ์™ธ๋ถ€ 4์ ์ค‘ ํ•˜๋‚˜์™€ ์„ธ๋ชจ๋ฅผ ๊ทธ๋ฆฐ๋‹ค.

2์˜ ๊ฒฝ์šฐ ์ •ํ™•ํ•˜๊ฒŒ ๊ฐ€์šด๋ฐ์—์„œ ๊ทธ๋ฆด๊ฒฝ์šฐ ๋‚ด๋ถ€๋ณ€์—์„œ ์–ด๋””๋กœ ์„ธ๋ชจ๋ฅผ ๊ทธ๋ฆด์ง€ ๋ชฐ๋ผ์„œ ๋ฒ„๊ทธ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š”๋ฐ ์–ธ์  ๊ฐ„ ๊ณ ์น˜๊ฒ ์Šต๋‹ˆ๋‹ค.