{"id":15137955,"url":"https://github.com/mattatz/bevy_curvo","last_synced_at":"2025-07-08T15:02:38.354Z","repository":{"id":234416157,"uuid":"788861424","full_name":"mattatz/bevy_curvo","owner":"mattatz","description":"Helper library for rendering curves and surfaces modeled with Curvo in Bevy.","archived":false,"fork":false,"pushed_at":"2024-07-04T08:31:41.000Z","size":8416,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T21:01:40.801Z","etag":null,"topics":["bevy","nurbs"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattatz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-19T08:24:20.000Z","updated_at":"2024-10-11T16:22:22.000Z","dependencies_parsed_at":"2024-04-19T09:03:58.467Z","dependency_job_id":"44c50766-1185-4ca1-9b9e-a1f4ef8e0cf2","html_url":"https://github.com/mattatz/bevy_curvo","commit_stats":{"total_commits":28,"total_committers":1,"mean_commits":28.0,"dds":0.0,"last_synced_commit":"88cb81719820a67ccb9c88fca2220e73bac469c4"},"previous_names":["mattatz/bevy_curvo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattatz%2Fbevy_curvo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattatz%2Fbevy_curvo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattatz%2Fbevy_curvo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattatz%2Fbevy_curvo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattatz","download_url":"https://codeload.github.com/mattatz/bevy_curvo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237834681,"owners_count":19373770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bevy","nurbs"],"created_at":"2024-09-26T07:03:48.611Z","updated_at":"2025-02-08T16:31:08.985Z","avatar_url":"https://github.com/mattatz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bevy_curvo\n\n[![License](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/mattatz/bevy_curvo#license)\n[![Crates.io](https://img.shields.io/crates/v/bevy_curvo.svg)](https://crates.io/crates/bevy_curvo)\n[![Docs](https://docs.rs/bevy_curvo/badge.svg)](https://docs.rs/bevy_curvo/latest/bevy_curvo/)\n[![Test](https://github.com/mattatz/bevy_curvo/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/mattatz/bevy_curvo/actions/workflows/test.yml)\n\n`bevy_curvo` is a helper library for rendering curves and surfaces modeled with [Curvo](https://github.com/mattatz/curvo) directly within the [Bevy](https://github.com/bevyengine/bevy) environment.\n\n[Demo](https://github.com/mattatz/bevy_curvo/assets/1085910/5a6864c5-85fa-44ee-b194-23aaa8ff452a)\n\n*You can try the demo on web. https://mattatz.github.io/bevy_curvo/*\n\n## Usage\n\n```rust\n// Create a set of points to interpolate\nlet points = vec![\n    Point3::new(-1.0, -1.0, 0.),\n    Point3::new(1.0, -1.0, 0.),\n    Point3::new(1.0, 1.0, 0.),\n    Point3::new(-1.0, 1.0, 0.),\n];\n\n// Create a NURBS curve that interpolates the given points with degree 3\nlet interpolated = NurbsCurve3D::\u003cf64\u003e::try_interpolate(\u0026points, 3, None, None).unwrap();\n\n// Create a NURBS surface by extruding the curve along the z-axis\nlet extrusion = NurbsSurface::extrude(\u0026interpolated, Vector3::z() * 3.0);\n\n// Create a SurfaceTessellation from the NURBS surface\nlet tess = extrusion.tessellate(Some(AdaptiveTessellationOptions {\n    norm_tolerance: 1e-2 * 2.5,\n    ..Default::default()\n}));\n\n// Create a bevy friendly data from the tessellation\nlet surface_mesh = NurbsSurfaceMesh::from(tess);\n\ncommands.spawn(PbrBundle {\n  // Here you can use the mesh to render the surface\n  mesh: surface_mesh,\n  material: materials.add(StandardMaterial {\n    ..default()\n  }),\n  ..default()\n});\n\n// or you can build a mesh for the surface\nlet tri: Mesh = surface_mesh.build_surface_triangle_list(Some(RenderAssetUsages::default()));\n\n```\n\n## Run the example\n\n```sh\ncargo run --example scene --features=examples\n```\n\nor with [cargo-make](https://github.com/sagiegurari/cargo-make)\n\n```sh\ncargo make example\n```\n\n## Run the example in the browser\n\nBy using [cargo-make](https://github.com/sagiegurari/cargo-make), wasm files are generated using wasm-bindgen-cli, and web applications are served using an http server.\n\n```sh\ncargo make serve\n```\n\n## Compatibility\n\n| bevy | bevy_curvo |\n| ---- | ---------- |\n| 0.13 | 0.1        |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattatz%2Fbevy_curvo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattatz%2Fbevy_curvo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattatz%2Fbevy_curvo/lists"}