Document not found (404)
+This URL is invalid, sorry. Please use the navigation bar or search to continue.
+ +diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..0b27b49 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: Deploy +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: write # To push a branch + pull-requests: write # To create a PR from that branch + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Install latest mdbook + run: | + tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') + url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" + mkdir mdbook + curl -sSL $url | tar -xz --directory=./mdbook + echo `pwd`/mdbook >> $GITHUB_PATH + - name: Deploy GitHub Pages + run: | + # This assumes your book is in the root of your repository. + # Just add a `cd` here if you need to change to another directory. + cd docs + mdbook build + git worktree add gh-pages + git config user.name "Deploy from CI" + git config user.email "" + cd gh-pages + # Delete the ref to avoid keeping history. + git update-ref -d refs/heads/gh-pages + rm -rf * + mv ../book/* . + git add . + git commit -m "Deploy $GITHUB_SHA to gh-pages" + git push --force --set-upstream origin gh-pages \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0e2b80e --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/target +/.idea +**/target +**/node_modules +.idea +*.iml +**/gen \ No newline at end of file diff --git a/404.html b/404.html new file mode 100644 index 0000000..953f3a3 --- /dev/null +++ b/404.html @@ -0,0 +1,197 @@ + + +
+ + +This URL is invalid, sorry. Please use the navigation bar or search to continue.
+ +MIT License
+Copyright (c) [2024] [Boris Zhguchev]
+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.
+ +The attributes that can be set up on the mesh and provided to use for visualization or other purposes.
+The type of mesh that can be created. The following types are available:
+The material for the mesh that affects how it will interact with the light. +The following properties can be set:
+The color of the mesh. +The color can be set as a single color or as a gradient. +The color is set up as a tuple of 4 values (r, g, b, a) +where r, g, b are the red, green, blue values and a is the alpha value.
+Can be set up for the following parts of the mesh:
+This section covers the creation of basic geometric shapes using tesselate
.
+
The running example can be found +in the repository
+All shapes are created using the tesselate
module.
+The module provides a set of functions to create the shapes.
+All shapes have default method and create
method.
+ +#![allow(unused)] +fn main() { +use glam::{Mat4, Quat, Vec3}; +use tessellate::mesh::shape::pyramid::Pyramid; +use tessellate::mesh::shape::sphere::Sphere; + +fn pyramid() -> Result<Pyramid, TessError> { + let mut pyramid = Pyramid::default(); + pyramid.transform(Mat4::from_rotation_translation( + Quat::from_rotation_x(0.0), + Vec3::new(0.0, 1.0, -3.0), + ))?; + Ok(pyramid) +} + +fn green_sphere() -> TessResult<Sphere> { + Ok(Sphere::create_ico(Vertex::default(), 1.0, 3, RgbaColor::GREEN.into())) +} + +}
By default, there are several controls that are available to the user. +These controls are used to manipulate the camera.
+With left mouse button, you can rotate the camera around the object. +With right mouse button, you can shift the camera in the plane perpendicular to the view direction. +With middle mouse button, you can zoom in and out.
+The UI controls are displayed on the left side of the screen. +
+with the UI controls, you can:
+The import
module provides functions to read mesh data from files. The supported file formats are:
Usage example can be found in +repository
+ +