Skip to content

Commit

Permalink
Merge pull request #1 from mrdoob/master
Browse files Browse the repository at this point in the history
Getting up to date with upstream
  • Loading branch information
wavesoft committed Nov 2, 2015
2 parents 2524525 + 4bab468 commit 34cc211
Show file tree
Hide file tree
Showing 1,533 changed files with 314,474 additions and 110,089 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.DS_Store
*.swp
.project
utils/npm/node_modules/*
node_modules
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
examples/
src/
test/
utils/
docs/
editor/
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 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).
### 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
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2010-2013 three.js authors
Copyright © 2010-2015 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
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ three.js

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/)[Documentation](http://threejs.org/docs/)[Migrating](https://github.com/mrdoob/three.js/wiki/Migration)[Help](http://stackoverflow.com/questions/tagged/three.js)
[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 ###
Expand All @@ -17,31 +17,31 @@ Alternatively see [how to build the library yourself](https://github.com/mrdoob/
<script src="js/three.min.js"></script>
```

This code creates a scene, then creates a camera, adds the camera and cube to the scene, creates a &lt;canvas&gt; renderer and adds its viewport in the document.body element.
This code creates a scene, a camera, and a geometric cube, and it adds the cube to the scene. It then creates a `WebGL` 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 camera, scene, renderer;
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;
scene = new THREE.Scene();
geometry = new THREE.CubeGeometry( 200, 200, 200 );
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.CanvasRenderer();
renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
Expand All @@ -50,7 +50,6 @@ This code creates a scene, then creates a camera, adds the camera and cube to th
function animate() {
// note: three.js includes requestAnimationFrame shim
requestAnimationFrame( animate );
mesh.rotation.x += 0.01;
Expand All @@ -62,7 +61,7 @@ This code creates a scene, then creates a camera, adds the camera and cube to th
</script>
```
If everything went well you should see [this](http://jsfiddle.net/ksRyQ/).
If everything went well you should see [this](http://jsfiddle.net/f17Lz5ux/).

### Change log ###

Expand Down
26 changes: 26 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "three.js",
"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/*",
"!examples/js",
"src",
"test",
"utils",
"LICENSE"
]
}
Loading

0 comments on commit 34cc211

Please sign in to comment.