-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
BakJuhee
authored and
BakJuhee
committed
Mar 11, 2015
0 parents
commit 54ff782
Showing
1,480 changed files
with
582,792 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## UV texture mappting | ||
|
||
### UV값, 매핑, 레이캐스팅 | ||
|
||
0. 원근매핑이 되어야한다. | ||
1. 삼각형폴리곤2개(혹은 사각형)을 회전시킨다. | ||
2. vertex값에 대응하는 UV값을 세팅하고, 변경도 가능해야한다.(uv값 계산이 어려워지지 않도록 사각형 형태로 만들어야합니다.) | ||
3. 앞면에만 매핑을 한다. | ||
4. 역시 나머지 부분들은 알아서. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
var express = require('express'); | ||
var path = require('path'); | ||
var favicon = require('static-favicon'); | ||
var logger = require('morgan'); | ||
var cookieParser = require('cookie-parser'); | ||
var bodyParser = require('body-parser'); | ||
|
||
var app = express(); | ||
|
||
// // view engine setup | ||
// app.set('views', path.join(__dirname, 'views')); | ||
// app.set('view engine', 'jade'); | ||
|
||
app.use(function(req, res, next) { | ||
res.setHeader("Access-Control-Allow-Origin", "*"); | ||
next(); | ||
}); | ||
|
||
app.use('/', express.static(path.join(__dirname, 'public/'))); | ||
|
||
var server = app.listen(8000, function() { | ||
console.log('listening on port %d', server.address().port); | ||
}); | ||
|
||
module.exports = app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>uv mapping</title> | ||
<style type="text/css"> | ||
body { | ||
margin: 0; | ||
padding: 20px; | ||
} | ||
canvas { | ||
background-color: #e9e9e9; | ||
border: 1px solid #ccc; | ||
} | ||
#controls { | ||
width: 580px; | ||
padding: 10px; | ||
text-align: center; | ||
} | ||
#btn { | ||
height: 80px; | ||
width: 80px; | ||
border-radius: 50px; | ||
cursor: pointer; | ||
} | ||
.none { | ||
display: none; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<canvas id="canvas" width="600" height="600"> | ||
canvas not supported | ||
</canvas> | ||
<div id="controls"> | ||
<button id="btn">ROTATE</button> | ||
</div> | ||
<script type="text/javascript" src="./sources/Matrix.js"></script> | ||
<script type="text/javascript" src="./sources/Vector.js"></script> | ||
<script type="text/javascript" src="./sources/Graphics.js"></script> | ||
<script type="text/javascript" src="./sources/Element.js"></script> | ||
<script type="text/javascript" src="./sources/Modeller.js"></script> | ||
<script type="text/javascript" src="./sources/Mapper.js"></script> | ||
<script type="text/javascript" src="./sources/Controller.js"></script> | ||
<script type="text/javascript"> | ||
var the = new Controller(); | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "application-name", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"start": "node ./bin/www" | ||
}, | ||
"dependencies": { | ||
"express": "~4.0.0", | ||
"static-favicon": "~1.0.0", | ||
"morgan": "~1.0.0", | ||
"cookie-parser": "~1.0.1", | ||
"body-parser": "~1.0.0", | ||
"debug": "~0.7.4", | ||
"jade": "~1.3.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.DS_Store | ||
*.swp | ||
.project | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
### The issues section is for bug reports and feature requests only. If you need help, please use [stackoverflow](http://stackoverflow.com/questions/tagged/three.js). | ||
|
||
|
||
Before reporting a bug | ||
--- | ||
1. Search issue tracker for similar issues. | ||
2. Try the latest dev branch version of three.js. | ||
3. Refer to the [Migration Guide](https://github.com/mrdoob/three.js/wiki/Migration) when upgrading to the dev version. | ||
|
||
|
||
How to report a bug | ||
--- | ||
1. Specify the revision number of the three.js library where the bug occurred. | ||
2. Specify your browser version, operating system, and graphics card. (for example, Chrome 23.0.1271.95, Windows 7, Nvidia Quadro 2000M) | ||
3. Describe the problem in detail. Explain what happened, and what you expected would happen. | ||
4. Provide a small test-case (http://jsfiddle.net). If a test-case is not possible, provide a link to a live version of your application. | ||
5. If helpful, include a screenshot. Annotate the screenshot for clarity. | ||
|
||
|
||
How to contribute to three.js | ||
--- | ||
1. Make sure you have a GitHub account. | ||
2. Fork the repository on GitHub. | ||
3. Check the [Contribution Guidelines](https://github.com/mrdoob/three.js/wiki/How-to-contribute-to-three.js). | ||
4. Make changes to your clone of the repository. | ||
5. Submit a pull request. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License | ||
|
||
Copyright © 2010-2014 three.js authors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
three.js | ||
======== | ||
|
||
#### JavaScript 3D library #### | ||
|
||
The aim of the project is to create a lightweight 3D library with a very low level of complexity — in other words, for dummies. The library provides <canvas>, <svg>, CSS3D and WebGL renderers. | ||
|
||
[Examples](http://threejs.org/examples/) — [Documentation](http://threejs.org/docs/) — [Migrating](https://github.com/mrdoob/three.js/wiki/Migration) — [Help](http://stackoverflow.com/questions/tagged/three.js) | ||
|
||
|
||
### Usage ### | ||
|
||
Download the [minified library](http://threejs.org/build/three.min.js) and include it in your html. | ||
Alternatively see [how to build the library yourself](https://github.com/mrdoob/three.js/wiki/build.py,-or-how-to-generate-a-compressed-Three.js-file). | ||
|
||
```html | ||
<script src="js/three.min.js"></script> | ||
``` | ||
|
||
This code creates a scene, a camera, and a geometric cube, and it adds the cube to the scene. It then creates a <canvas> renderer for the scene and camera, and it adds that viewport to the document.body element. Finally it animates the cube within the scene for the camera. | ||
|
||
```html | ||
<script> | ||
var scene, camera, renderer; | ||
var geometry, material, mesh; | ||
init(); | ||
animate(); | ||
function init() { | ||
scene = new THREE.Scene(); | ||
camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 10000 ); | ||
camera.position.z = 1000; | ||
geometry = new THREE.BoxGeometry( 200, 200, 200 ); | ||
material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true } ); | ||
mesh = new THREE.Mesh( geometry, material ); | ||
scene.add( mesh ); | ||
renderer = new THREE.WebGLRenderer(); | ||
renderer.setSize( window.innerWidth, window.innerHeight ); | ||
document.body.appendChild( renderer.domElement ); | ||
} | ||
function animate() { | ||
requestAnimationFrame( animate ); | ||
mesh.rotation.x += 0.01; | ||
mesh.rotation.y += 0.02; | ||
renderer.render( scene, camera ); | ||
} | ||
</script> | ||
``` | ||
If everything went well you should see [this](http://jsfiddle.net/f17Lz5ux/). | ||
|
||
### Change log ### | ||
|
||
[releases](https://github.com/mrdoob/three.js/releases) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "three.js", | ||
"version": "0.0.69", | ||
"homepage": "http://threejs.org/", | ||
"description": "JavaScript 3D library", | ||
"main": "build/three.js", | ||
"keywords": [ | ||
"three", | ||
"threejs", | ||
"three.js", | ||
"3D", | ||
"webgl" | ||
], | ||
"license": "MIT", | ||
"ignore": [ | ||
"**/.*", | ||
"*.md", | ||
"docs", | ||
"editor", | ||
"examples", | ||
"src", | ||
"test", | ||
"utils", | ||
"LICENSE" | ||
] | ||
} |
Oops, something went wrong.