{"id":13663310,"url":"https://github.com/dbrizov/NaughtyBezierCurves","last_synced_at":"2025-04-25T13:32:48.000Z","repository":{"id":36747134,"uuid":"41053749","full_name":"dbrizov/NaughtyBezierCurves","owner":"dbrizov","description":"Bezier Curve Game Object for Unity","archived":false,"fork":false,"pushed_at":"2020-01-09T08:25:29.000Z","size":200,"stargazers_count":298,"open_issues_count":0,"forks_count":33,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-13T06:44:12.486Z","etag":null,"topics":["bezier","curve","unity3d","unity3d-plugin"],"latest_commit_sha":null,"homepage":"","language":"C#","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/dbrizov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-19T18:55:05.000Z","updated_at":"2025-03-25T01:13:05.000Z","dependencies_parsed_at":"2022-09-07T09:01:03.206Z","dependency_job_id":null,"html_url":"https://github.com/dbrizov/NaughtyBezierCurves","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrizov%2FNaughtyBezierCurves","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrizov%2FNaughtyBezierCurves/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrizov%2FNaughtyBezierCurves/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrizov%2FNaughtyBezierCurves/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbrizov","download_url":"https://codeload.github.com/dbrizov/NaughtyBezierCurves/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250825161,"owners_count":21493403,"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":["bezier","curve","unity3d","unity3d-plugin"],"created_at":"2024-08-02T05:02:24.053Z","updated_at":"2025-04-25T13:32:42.954Z","avatar_url":"https://github.com/dbrizov.png","language":"C#","funding_links":[],"categories":["Game-Math","C\\#"],"sub_categories":[],"readme":"# NaughtyBezierCurves\nNaughtyBezierCurves is an extension for Unity that provides a BezierCurve GameObject.\n\n\u003cimg src=\"https://github.com/dbrizov/dbrizov.github.io/blob/master/images/project-images/bezier-curve/bezier-curve.gif\" alt=\"gif\" width=\"350\" /\u003e\u003cbr /\u003e\n\u003cimg src=\"https://github.com/dbrizov/dbrizov.github.io/blob/master/images/project-images/bezier-curve/bc4.png\" alt=\"screenshot\" width=\"350\" /\u003e\n\u003cimg src=\"https://github.com/dbrizov/dbrizov.github.io/blob/master/images/project-images/bezier-curve/bc2.png\" alt=\"screenshot\" width=\"350\" /\u003e\n\n## System Requirements\nUnity 2017.3.0 or later versions.\n\n## Installation\nAdd this entry in your **manifest.json**\n```\n\"com.dbrizov.naughtybeziercurves\": \"https://github.com/dbrizov/NaughtyBezierCurves.git#upm\"\n```\n\n## Features\n- Curve modification directly in the Scene View via Key Points with Handles\n- Custom editor for Adding, Deleting and Reordering Key Points very easily\n- Full Undo/Redo integration\n\n## Ways to create a BezierCurve GameObject\n- From the Top Menu -\u003e GameObjects -\u003e Create Other -\u003e Bezier Curve\n- Right click in the Hierarchy View -\u003e Create Other -\u003e Bezier Curve\n- Drag the prefab in the Scene (The prefab is located in \"Assets/Bezier Curves/Prefabs\" folder)\n\n## Code Examples\n```C#\nBezierCurve3D curve = GetComponent\u003cBezierCurve3D\u003e();\n\n// Evaluate a position and rotation along the curve at a given time\nfloat time = 0.5f; // In range [0, 1]\nVector3 position = curve.GetPoint(time);\nQuaterion rotation = curve.GetRotation(time, Vector3.up);\n\n// Get the length of the curve\n// This operation is not very heavy, but I advise you to cache the length if you are going to use it\n// many times and when you know that the curve won't change at runtime.\nfloat length = curve.GetApproximateLength();\n\n// Other methods\nVector3 tangent = curve.GetTangent(time);\nVector3 binormal = curve.GetBinormal(time, Vector3.up);\nVector3 normal = curve.GetNormal(time, Vector3.up);\n\n// Add a key point at the end of the curve\nBezierPoint3D keyPoint = curve.AddKeyPoint(); // via fast method\nBezierPoint3D keyPoint = curve.AddKeyPointAt(curve.KeyPointsCount); // via specific index\n\n// Remove a key point\nbool isRemoved = curve.RemoveKeyPointAt(0); // Remove the first key point\n\n// Foreach all key points\nfor (int i = 0; i \u003c curve.KeyPointsCount; i++)\n{\n    Debug.Log(curve.KeyPoints[i].Position);\n    Debug.Log(curve.KeyPoints[i].LeftHandleLocalPosition);\n    Debug.Log(curve.KeyPoints[i].RightHandleLocalPosition);\n}\n```\n\n## License\nThe MIT License (MIT)\n\nCopyright (c) 2015 Denis Rizov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbrizov%2FNaughtyBezierCurves","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbrizov%2FNaughtyBezierCurves","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbrizov%2FNaughtyBezierCurves/lists"}