Skip to content

Commit

Permalink
finalize
Browse files Browse the repository at this point in the history
  • Loading branch information
archibate committed Oct 16, 2020
1 parent 7ab24bb commit 1f416ea
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 35 deletions.
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,18 @@ See https://taichi.readthedocs.io/en/latest/install.html#troubleshooting for iss

If you encounter problems using Taichi THREE, please let me know by [opening an issue at GitHub](https://github.com/taichi-dev/taichi_three/issues/new), many thanks!

## Install from GitHub repo
## Install from latest master branch

You may clone and install from the GitHub repository to get latest changes in Taichi THREE:
If you'd like to keep catching up with latest Taichi THREE updates, please clone it from [our GitHub repository](https://github.com/taichi-dev/taichi_three). Then build and install it:

```py
git clone https://github.com/taichi-dev/taichi_three.git --depth=5
pip install taichi taichi_glsl
python setup.py build install
```
```bash
git clone https://github.com/taichi-dev/taichi_three.git
# try this mirror repository on Gitee if the above is too slow:
# git clone https://gitee.com/archibate/taichi_three.git

cd taichi_three
python3 -m pip install -r requirements.txt # install `taichi` and `taichi-glsl`
python3 -m pip install wheel # required for the next step
python3 setup.py bdist_wheel # create a `.whl` file
pip install -U dist/taichi_three-0.0.6-py3-none-any.whl
```
18 changes: 12 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,18 @@ See https://taichi.readthedocs.io/en/latest/install.html#troubleshooting for iss

If you encounter problems using Taichi THREE, please let me know by [opening an issue at GitHub](https://github.com/taichi-dev/taichi_three/issues/new), many thanks!

## Install from GitHub repo
## Install from latest master branch

You may clone and install from the GitHub repository to get latest changes in Taichi THREE:
If you'd like to keep catching up with latest Taichi THREE updates, please clone it from [our GitHub repository](https://github.com/taichi-dev/taichi_three). Then build and install it:

```py
git clone https://github.com/taichi-dev/taichi_three.git --depth=5
pip install taichi taichi_glsl
python setup.py build install
```bash
git clone https://github.com/taichi-dev/taichi_three.git
# try this mirror repository on Gitee if the above is too slow:
# git clone https://gitee.com/archibate/taichi_three.git

cd taichi_three
python3 -m pip install -r requirements.txt # install `taichi` and `taichi-glsl`
python3 -m pip install wheel # required for the next step
python3 setup.py bdist_wheel # create a `.whl` file
pip install -U dist/taichi_three-0.0.6-py3-none-any.whl
```
9 changes: 9 additions & 0 deletions docs/hello_cube.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
The goal of this section is to give a brief introduction to Taichi THREE. We will start by setting up a scene, with a simple cube, as THREE.js tutorial starts from too.
A working example is provided at the bottom of the page in case you get stuck and need help.


## Before we get started

First of all, make sure you have installed `taichi_three` (see [README.md](/README.md)), then import the it as a package:

```py
import taichi_three as t3
```

## Creating the scene

To actually be able to display anything with Taichi THREE, we need three things: scene, camera, and model, so that we can render the scene with camera.
Expand Down
17 changes: 0 additions & 17 deletions docs/miscellaneous.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,6 @@
Here's a collection of some random yet useful stuffs you might need.


## Install from latest master branch

If you'd like to keep catching up with latest Taichi THREE updates, please clone it from [our GitHub repository](https://github.com/taichi-dev/taichi_three). Then build and install it:

```bash
git clone https://github.com/taichi-dev/taichi_three.git
# try this mirror repository on Gitee if the above is too slow:
# git clone https://gitee.com/archibate/taichi_three.git

cd taichi_three
python3 -m pip install -r requirements.txt # install `taichi` and `taichi-glsl`
python3 -m pip install wheel # required for the next step
python3 setup.py bdist_wheel # create a `.whl` file
pip install -U dist/taichi_three-0.0.6-py3-none-any.whl
```


## Introducing Taichi

[Taichi](https://github.com/taichi-dev/taichi) is a programming langurage that is highly-embed into Python that basically allows you to write high-performance GPU programs in Python syntax.
Expand Down
9 changes: 4 additions & 5 deletions examples/multicamera.py → rubbish.bin/multicamera.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
scene = t3.Scene()
model = t3.Model(t3.Mesh.from_obj(t3.readobj('assets/monkey.obj', scale=0.8)))
scene.add_model(model)
camera = t3.Camera(res=(256, 256), pos=[0, 0, 2.5], target=[0, 0, 0], up=[0, 1, 0])
camera = t3.Camera(res=(256, 256))
camera.ctl = t3.CameraCtl(pos=[0, 0, 2.5], target=[0, 0, 0], up=[0, 1, 0])
scene.add_camera(camera)

camera2 = t3.Camera(pos=[0, 1, -2], target=[0, 1, 0], up=[0, 1, 0])
camera2 = t3.Camera()
camera2.ctl = t3.CameraCtl(pos=[0, 1, -2], target=[0, 1, 0], up=[0, 1, 0])
scene.add_camera(camera2)

light = t3.Light([0.4, -1.5, -0.8])
Expand All @@ -19,9 +21,6 @@
camera.type = camera.ORTHO
camera2.set_intrinsic(256, 256, 256, 256)

print(camera2.export_intrinsic())
print(camera2.export_extrinsic())


gui = ti.GUI('Model', camera.res)
gui2 = ti.GUI('Model2', camera2.res)
Expand Down
File renamed without changes.

0 comments on commit 1f416ea

Please sign in to comment.