Geometry
Geometry
3D ๊ณต๊ฐ ๋ด์ x์ถ, y์ถ, z์ถ์ ์ฌ์ฉํ์ฌ ๋ฌผ์ฒด์ ์์น, ํฌ๊ธฐ, ๋ชจ์ ๋ฑ์ ํํํ๊ธฐ ์ํ ์ํ์ ์ธ ๊ตฌ์กฐ์ ์๋ฆฌ
Segments
Geometry๋ ๊ธฐ๋ณธ์ ์ผ๋ก ์ฌ๋ฌ ์ผ๊ฐํ ์กฐ๊ฐ์ผ๋ก ๊ตฌ์ฑ๋๋ค.
Segments๋ geometry๋ฅผ ๊ตฌ์ฑํ๋ ์์ ์ผ๊ฐํ๋ค์ ์๋ฏธํ๋ฉฐ, ๊ตฌ์ฑ๋ segments๊ฐ ๋ง์์ง์๋ก ๋ณด๋ค ๋์ ๋ํ ์ผ๊ณผ ๋ถ๋๋ฌ์ด ์ธํ์ ๊ฐ์ง ์ ์๊ฒ๋๋ค.
๋จ, ๋ ๋๋ง ์ segements์ ์๊ฐ ๋ง์์ง์๋ก ๊ณ์ฐ๋์ด ๋ง์์ง๋ฏ๋ก ์ฑ๋ฅ ์ ํ๊ฐ ๋ฐ์ํ ์ ์๋ค.
Built In Geometry
Three.js์์ ์ ๊ณตํ๋ ๋ค์ํ Geometry๋ฅผ ์์๋ณด์.
BoxGeometry โ ํ๋ธ ๋ชจ์์ ํํ๋ฅผ ๊ตฌ์ฑํ๋ ์ง์ค๋ฉํธ๋ฆฌ,
width
,height
,depth
์ ๊ฐ๊ฐ์segments
๋ก ๊ตฌ์ฑ๋๋ค.CapsuleGeometry โ ์บก์ ๋ชจ์์ ํํ๋ฅผ ๊ตฌ์ฑํ๋ ์ง์ค๋ฉํธ๋ฆฌ,
radius
,length
, ๊ฐ๊ฐ์segement
๋ก ๊ตฌ์ฑ๋๋ค.CircleGeometry โ ์ํ ๋ชจ์์ ํํ๋ฅผ ๊ตฌ์ฑํ๋ ์ง์ค๋ฉํธ๋ฆฌ,
radius
,segments
๋ก ๊ตฌ์ฑ๋๋ค.ConeGeometry โ ๊ฐ๋ฟ ๋๋ ์๋ฟ ๋ชจ์์ ํํ๋ฅผ ๊ตฌ์ฑํ๋ ์ง์ค๋ฉํธ๋ฆฌ,
radius
,height
,segments
๋ก ๊ตฌ์ฑ๋๋ฉฐ,openEnded
์ต์ ์ผ๋ก ๋ฐ๋ฉด์ด ๋ซ๋ฆผ ์ฌ๋ถ๋ฅผ ์กฐ์ ๊ฐ๋ฅEdgesGeometry โ ๋ค๋ฅธ ์ง์ค๋ฉํธ๋ฆฌ์ ๋ชจ์๋ฆฌ ์์ญ์ ํํํด์ฃผ๋ ์ง์ค๋ฉํธ๋ฆฌ
IcosahedronGeometry โ 20๋ฉด์ฒด๋ฅผ ๋ง๋ค ๋ ์ฌ์ฉ๋๋ ์ง์ค๋ฉํธ๋ฆฌ,
radius
,detail
๋ก ๊ตฌ์ฑ๋๋ฉฐdetail
๊ฐ์ด ์ปค์ง์๋ก ๊ตฌ์ ํํ์ ๊ฐ๊น์ ์ง๊ฒ ๋๋ค.PlaneGeometry โ ํ๋ฉด์ ๋ํ๋ด๋ ์ง์ค๋ฉํธ๋ฆฌ, ๋ฐ๋ฅ์ ํํํ๊ธฐ ์ํด ์์ฃผ ์ฌ์ฉ๋๋ค.
RingGeometry โ ๋ง ๋ชจ์์ ํํ๋ฅผ ๊ตฌ์ฑํ๋ ์ง์ค๋ฉํธ๋ฆฌ
ShapeGeometry -> ์ฌ์ฉํ ๋ง๋ ํ ์ง์ค๋ฉํธ๋ฆฌ๊ฐ ์๊ณ , ์ํ๋ ํํ์ ๋ํ์ ์ง์ ์ปค์คํ ํ๊ณ ์ถ์ ๋ ์ฌ์ฉํ๋ค.
SphereGeometry -> ๊ตฌ ํํ์ ์ง์ค๋ฉํธ๋ฆฌ, ๋ฌ๊ณผ ํ์ฑ์ ํํํ ๋ ์ ์ฉํ๊ฒ ์ฌ์ฉ๋๋ค.
Shape
Method
absarc(absolute arc)
(x, y, radius, startAngle, endAngle, clockwise)
ํ์ ๋ชจ์์ ๊ณก์ ์ ๊ทธ๋ฆฌ๋๋ฐ ์ฌ์ฉ๋๋ค.
์ํธ๋ฅผ ๋ปํ๋ arc๋ '๊ณก์ ์ ํ ๋ถ๋ถ'์ ์๋ฏธํ๋ค.
ShapeGeometry
๋ 2์ฐจ์ ๋ํ๋ง์ ๋ํ๋ด๋๋ฐ ๊น์ด๊ฐ์ ํํํ๊ณ ์ถ๋ค๋ฉดExtrudeGeometry
๋ฅผ ์ฌ์ฉํ์.
Last updated