{"id":14986395,"url":"https://github.com/blizzcrafter/monogame.splineflower","last_synced_at":"2025-04-11T20:32:11.609Z","repository":{"id":143665988,"uuid":"146477734","full_name":"BlizzCrafter/MonoGame.SplineFlower","owner":"BlizzCrafter","description":"Create wonderful smooth Bézier-, CatMulRom- and Hermite-Splines with Trigger Events for your MonoGame project.","archived":false,"fork":false,"pushed_at":"2024-04-11T07:01:52.000Z","size":9051,"stargazers_count":35,"open_issues_count":1,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T18:21:18.423Z","etag":null,"topics":["bezier-splines","catmull-rom","contentmanager","editor","editors","engine","engines","hermite-splines","monogame","monogame-framework","nuget","spline-data","splines","trigger-events","windows-forms"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlizzCrafter.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":"2018-08-28T16:44:22.000Z","updated_at":"2025-02-23T19:18:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb84638f-f422-45c9-84d5-b51c61d004ff","html_url":"https://github.com/BlizzCrafter/MonoGame.SplineFlower","commit_stats":{"total_commits":340,"total_committers":3,"mean_commits":"113.33333333333333","dds":0.2735294117647059,"last_synced_commit":"be7d2ae3f1a266ec3a49caf78c1e0a24eae50d94"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlizzCrafter%2FMonoGame.SplineFlower","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlizzCrafter%2FMonoGame.SplineFlower/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlizzCrafter%2FMonoGame.SplineFlower/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlizzCrafter%2FMonoGame.SplineFlower/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlizzCrafter","download_url":"https://codeload.github.com/BlizzCrafter/MonoGame.SplineFlower/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248476410,"owners_count":21110275,"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-splines","catmull-rom","contentmanager","editor","editors","engine","engines","hermite-splines","monogame","monogame-framework","nuget","spline-data","splines","trigger-events","windows-forms"],"created_at":"2024-09-24T14:12:48.550Z","updated_at":"2025-04-11T20:32:06.597Z","avatar_url":"https://github.com/BlizzCrafter.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Banner](Logos/Logo_Banner_800.png)\n\n# Welcome to MonoGame.SplineFlower!\n[![License](https://img.shields.io/badge/License-MIT!-blue.svg?style=flat-square\u0026colorA=bc9621\u0026colorB=77c433)](https://github.com/sqrMin1/MonoGame.SplineFlower/blob/master/LICENSE)\n\n[![NuGet](https://img.shields.io/badge/NuGet-MonoGame.SplineFlower-blue.svg?style=flat-square\u0026logo=NuGet\u0026colorA=3260c4\u0026colorB=77c433)](https://www.nuget.org/packages/MonoGame.SplineFlower)\n[![NuGet](https://img.shields.io/badge/NuGet-MonoGame.SplineFlower.Content-blue.svg?style=flat-square\u0026logo=NuGet\u0026colorA=3260c4\u0026colorB=77c433)](https://www.nuget.org/packages/MonoGame.SplineFlower.Content)\n[![NuGet](https://img.shields.io/badge/NuGet-MonoGame.SplineFlower.Content.Pipeline-blue.svg?style=flat-square\u0026logo=NuGet\u0026colorA=3260c4\u0026colorB=77c433)](https://www.nuget.org/packages/MonoGame.SplineFlower.Content.Pipeline)\n\nCreate wonderful smooth **Bézier-, CatMulRom- and Hermite-Splines** with **TriggerEvents** for your **MonoGame** project.\n\n### Building\n\n* The **MonoGame.SplineFlower** project is compatible with the **MonoGame.Framework 3.6** and above.\n\n# How-To\n### Setup\n\nThe **Visual Studio 2022** solution contains the following projects:\n- **MonoGame.SplineFlower** (the portable class library)\n- **MonoGame.SplineFlower.Content** (spline data and setup class)\n- **MonoGame.SplineFlower.Content.Pipeline** (creates .xnb files out of .json spline data)\n- **MonoGame.SplineFlower.Samples** (showing features of the library)\n- **MonoGame.SplineFlower.Editor** (create, import and export splines)\n- **MonoGame.SplineFlower.GameTest** (DesktopGL project which loads a spline with the ContentManager)\n\n1. In your own MonoGame project you need to reference **MonoGame.SplineFlower** if you want to use the library capabilities\n2. If you want to load splines with the **ContentManager**, you also need to reference **MonoGame.SplineFlower.Content.Pipeline**\n\u003e Note: You don't need this reference if you want to load spline data with **Json.Net**\n3. When you want to draw the spline - inclusive trigger events - you need to reference **MonoGame.SplineFlower.Content** to have access\nto the **static class Setup**, because you need to call **Setup.Initialize(graphics.GraphicsDevice);** for this purpose\n\u003e Note: You don't need this reference if you don't want to draw your splines. **You don't need to draw splines at all.**\nThis is just a **Debug** feature to make your life as a game developer easier ;)\n\nFor an easy installation you should make use of the nuget package manager:\n![Nuget](doc/Nuget.png)\n\n### Capabilities\n\nSo what can this library actually do for you? **[[Watch the Video!](https://youtu.be/0Wez5AryxwI)]** (Outdated!)\n\nDespite drawing simple lines, it generates very smooth BézierCurves, BézierSplines, CatMulRomSplines and HermiteSplines pretty fast,\nbecause it uses **polynomial math formulas** behind the scenes.\n\nThis makes it possible to generate:\n\n#### Quadratic BézierCurves\n![BezierCurve_Quadratic](doc/BezierCurve_Quadratic.png)\n\n#### Cubic BézierCurves\n![BezierCurve_Cubic](doc/BezierCurve_Cubic.png)\n\n#### Complex BézierSplines\n![BezierSpline](doc/BezierSpline.png)\n\n#### Complex CatMulRomSplines\n![CatMulRomSpline](doc/CatMulRom_0.gif)\n\n#### Chain Splines\n![ChainSplines](doc/ChainSpline_move.gif)\n\n#### Complex HermiteSplines\n![HermiteSplines](doc/HermiteSplines.png)\n\n#### Polygon Stripe Splines\n![PolygonStripe](doc/PolygonStripe.png)\n\nDid you notice the different colors of the control points?\nYou can set them in 3 different modes:\n\n![ControlModes](doc/ControlModes.png)\n\n- **Free** allows you to freely place the control point, but often resulting in sharp corners.\n- **Aligned** will enforce such corners and allow you to have connected control points asymmetrical.\n- **Mirrored** behave like the aligned one, but allow you to have the connected control points symmetrical.\n\n\u003e Note: A CatmulRomSpline will always have its control points in the **Free** mode!\n\nYou can change control modes simply by clicking on them with the **Right Mouse Button** in the:\n\n#### MonoGame.SplineFlower.Editor\n![Editor](doc/Editor.png)\n\nIt is also possible to create **looped** splines as you can see!\nWith the **Middle Mouse Button** you can drag the whole spline to keep the overview.\n\nDid you noticed the nice little car on the picture? This is a **[SplineWalker](https://github.com/sqrMin1/MonoGame.SplineFlower/blob/master/MonoGame.SplineFlower/SplineWalker.cs)**.\n\nA SplineWalker can, well... walk on splines :) or drive on it like in the case of a car, hehe.\n\nYou have the abillity to create your own SplineWalkers by inheritting from the SplineWalker class mentioned above.\n\nThis could look like this:\n\n```c#\npublic class Car : SplineWalker\n{\n    public override void CreateSplineWalker(BezierSpline spline, SplineWalkerMode mode, int duration, bool canTriggerEvents = true, bool    autoStart = true)\n    {\n        base.CreateSplineWalker(spline, mode, duration, canTriggerEvents, autoStart);\n    }\n    \n    protected override void EventTriggered(Trigger obj)\n    {\n        base.EventTriggered(obj);\n    }\n    \n    public override void Update(GameTime gameTime)\n    {\n        base.Update(gameTime);\n    }\n    \n    public override void Draw(SpriteBatch spriteBatch)\n    {\n        base.Draw(spriteBatch);\n    }\n}\n```\n\nClick **[here](https://github.com/sqrMin1/MonoGame.SplineFlower/blob/master/MonoGame.SplineFlower.Samples/Car.cs)** to see a full integration example.\n\nA nice thing about a SplineWalker is, that he can trigger custom events on a spline while he walks along the spline.\n\nYou can define your own Trigger with the TriggerEditor:\n\n![TriggerEditor](doc/TriggerEditor.png)\n\nIt is reachable from the main editor through the **Tools** button.\n\nA SplineWalker also has 3 different built-in movement modes:\n\n- **Once** travels the spline just one time and will stop at the last control point.\n- **Looped** travels the spline infinitely (smoothly starts again at the starting point).\n- **PingPong** travels the spline forward and then backward when he reaches the last control point / starting point (infinitely).\n\nIt's also possible to define different trigger directions:\n\n- **Forward** triggers only in the forward direction.\n- **Backward** triggers only in the backward direction.\n- **ForwardAndBackward** triggers in both directions.\n\n\u003e Note: It's also possible to control a SplineWalker with your Keyboard or GamePad if you wish so!\n\n---\n\nYou can do pretty much anything with splines. The limit is really just your imagination.\n*Play around with the samples and learn from it.*\n\n![CatMulRomSpline](doc/CatMulRom_1.gif)\n\n### Now Have Fun with MonoGame.SplineFlower!\n\n![Logo](Logos/Logo_Shadow_256.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblizzcrafter%2Fmonogame.splineflower","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblizzcrafter%2Fmonogame.splineflower","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblizzcrafter%2Fmonogame.splineflower/lists"}