Skip to content

Commit

Permalink
Merge pull request #44 from stisol/vertex-colors
Browse files Browse the repository at this point in the history
Vertex colors
  • Loading branch information
Twinklebear authored Jul 30, 2021
2 parents 7d23c9a + ffc1780 commit 02f4e0a
Show file tree
Hide file tree
Showing 6 changed files with 226 additions and 33 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,16 @@ jobs:
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
nightly_features_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose --all-features
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Arbitrary polygons may not behave as expected. The best solution would be to
convert your mesh to solely consist of triangles in your modeling
software.

## Optional – Normals & Texture Coordinates
## Optional – Normals, Texture Coordinates and Vertex Colors

It is assumed that all meshes will at least have positions, but normals and
texture coordinates are optional.
It is assumed that all meshes will at least have positions, but normals, texture
coordinates and vertex colors are optional.

If no normals or texture coordinates are found then the corresponding `Vec`s
for the `Mesh` will be empty.
If no normals, texture coordinates or vertex colors are found, then the
corresponding `Vec`s for the `Mesh` will be empty.

## Flat Data

Expand Down
12 changes: 12 additions & 0 deletions obj/quad_colored_merge.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# A simple triangle object with vertex colors for testing
o Quad
v 0 0 0 1 0 0
v 1 0 0 0 1 0
v 0 1 0 0 0 1
v 1 0 0 0 0 0
v 0 1 0 0 0 1
v 1 1 0 1 1 1
vn 0 0 1

f 1//1 2//1 3//1
f 4//1 5//1 6//1
8 changes: 8 additions & 0 deletions obj/triangle_colored.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# A simple triangle object with vertex colors for testing
o Triangle
v 0 0 0 1 0 0
v 1 0 0 0 1 0
v 0 1 0 0 0 1

f -3 -2 -1

Loading

0 comments on commit 02f4e0a

Please sign in to comment.