setup.html 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!DOCTYPE html><html lang="ko"><head>
  2. <meta charset="utf-8">
  3. <title>개발 환경 구성하기</title>
  4. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  5. <meta name="twitter:card" content="summary_large_image">
  6. <meta name="twitter:site" content="@threejs">
  7. <meta name="twitter:title" content="Three.js – 개발 환경 구성하기">
  8. <meta property="og:image" content="https://threejs.org/files/share.png">
  9. <link rel="shortcut icon" href="/files/favicon_white.ico" media="(prefers-color-scheme: dark)">
  10. <link rel="shortcut icon" href="/files/favicon.ico" media="(prefers-color-scheme: light)">
  11. <link rel="stylesheet" href="/manual/resources/lesson.css">
  12. <link rel="stylesheet" href="/manual/resources/lang.css">
  13. <link rel="stylesheet" href="/manual/ko/lang.css">
  14. </head>
  15. <body>
  16. <div class="container">
  17. <div class="lesson-title">
  18. <h1>개발 환경 구성하기</h1>
  19. </div>
  20. <div class="lesson">
  21. <div class="lesson-main">
  22. <p>※ 이 글은 Three.js의 튜토리얼 시리즈로서,
  23. 먼저 <a href="fundamentals.html">Three.js의 기본 구조에 관한 글</a>을
  24. 읽고 오길 권장합니다.</p>
  25. <p>Three.js의 다른 요소를 더 살펴보기 전에, 개발 환경을 구축하는 방법에 대해
  26. 알아보겠습니다. WebGL은 보안 때문에 기본적으로 로컬 파일을 직접 가져다 쓸
  27. 수 없습니다. 말인즉 실제 프로젝트를 배포/테스트하려면 웹 서버를 써야한다는
  28. 이야기죠. 다행히도 웹 서버 관련 라이브러리는 굉장히 많고, 사용하기도 쉽습니다.</p>
  29. <p>먼저 서버에 올릴 예시를 준비해야 합니다. 원한다면 <a href="https://github.com/gfxfundamentals/threejsfundamentals/archive/gh-pages.zip">이 사이트 전체를 다운</a>
  30. 받을 수도 있죠. 다운 받은 뒤에는 압축 프로그램으로 압축을 풀어주세요.</p>
  31. <p>다음으로 간단한 웹 서버를 하나 다운 받습니다.</p>
  32. <p>만약 UI가 있는 웹 서버를 찾는다면
  33. <a href="https://greggman.github.io/servez">Servez</a>를 추천합니다.</p>
  34. <p></p><div class="threejs_image border">
  35. <img class="" src="../resources/servez.gif">
  36. </div>
  37. <p></p>
  38. <p>압축을 푼 경로를 지정하고, "Start" 버튼을 클릭하세요. 그런 다음
  39. <a href="http://localhost:8080/"><code class="notranslate" translate="no">http://localhost:8080/</code></a>로 이동하기만
  40. 하면 됩니다. 만약 예제를 보고 싶다면 <a href="http://localhost:8080/threejs"><code class="notranslate" translate="no">http://localhost:8080/threejs</code></a>로
  41. 이동하세요.</p>
  42. <p>서버를 중지하려면 Servez를 멈추거나 종료하면 됩니다.</p>
  43. <p>만약 CLI(Command Line Interface, 명령 줄 인터페이스)를 선호한다면(전 선호합니다)
  44. <a href="https://nodejs.org">node.js</a>를 써도 좋습니다. 다운 받아 설치한 다음 프롬프트 /
  45. 콘솔 / 터미널 창을 엽니다. 윈도우를 사용한다면 설치 마법사가 "Node Command Prompt"를
  46. 추가할 테니 그걸 사용해도 좋습니다.</p>
  47. <p>창을 띄웠으면 <a href="https://github.com/greggman/servez-cli"><code class="notranslate" translate="no">servez</code></a>를 설치합니다.</p>
  48. <pre class="prettyprint showlinemods notranslate notranslate" translate="no">npm -g install servez
  49. </pre><p>OS X를 사용한다면 다음과 같이 설치할 수 있습니다.</p>
  50. <pre class="prettyprint showlinemods notranslate notranslate" translate="no">sudo npm -g install servez
  51. </pre><p>설치가 완료되면 다음과 같이 Servez를 실행합니다.</p>
  52. <pre class="prettyprint showlinemods notranslate notranslate" translate="no">servez path/to/folder/where/you/unzipped/files
  53. </pre><p>사족이지만, 다음처럼 쓸 수도 있죠.</p>
  54. <pre class="prettyprint showlinemods notranslate notranslate" translate="no">cd path/to/folder/where/you/unzipped/files
  55. servez
  56. </pre><p>정상적으로 작동했다면 다음과 같은 메시지가 뜰 겁니다.</p>
  57. <p></p><div class="threejs_image ">
  58. <img class="" src="../resources/servez-response.png">
  59. </div>
  60. <p></p>
  61. <p>다음으로 브라우저에서 <a href="http://localhost:8080/"><code class="notranslate" translate="no">http://localhost:8080/</code></a>로
  62. 접속하세요. 경로를 지정하지 않으면 현재 경로를 서버의 ROOT 경로로 사용합니다.</p>
  63. <p>만약 Servez가 마음에 들지 않는다면, <a href="https://stackoverflow.com/questions/12905426/what-is-a-faster-alternative-to-pythons-servez-or-simplehttpserver">다른 간단한 웹 서버</a>를 사용해도 좋습니다.</p>
  64. <p>이제 개발 환경을 갖추었으니, <a href="textures.html">텍스처</a>에 대해 알아봅시다.</p>
  65. </div>
  66. </div>
  67. </div>
  68. <script src="/manual/resources/prettify.js"></script>
  69. <script src="/manual/resources/lesson.js"></script>
  70. </body></html>