Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertex colors #44

Merged
merged 4 commits into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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