{"id":"1legendrblx/repertoire","name":"repertoire","scope":"1legendrblx","platform":"roblox","description":"Front-end orchestrator","version":"1.3.1","latest":"1.3.1","versions":["1.0.0","1.1.0","1.2.0","1.2.1","1.3.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":false,"dependencies":{"howmanysmall/typed-promise":{"version":"^4.0.6","alias":"Promise"},"sleitnick/signal":{"version":"^2.0.3","alias":"Signal"}},"integrity":"95e0e1d22f6dd6a329502975aca58c4cb18c94634c15dd7dc81cbbda82d1c69a","likes":0,"downloads":0,"install":"forest install 1legendrblx/repertoire","url":"https://forest.dev/p/roblox/1legendrblx/repertoire","files":"https://api.forest.dev/ai/package/roblox/1legendrblx/repertoire/files","readme":"# Repertoire\r\n\r\nRepertoire is a package designed to make front-end visuals abstracted and personalized for developers. Internally, it creates objects and enables the attachment of dynamic components such as forces, randomized properties, and more!\r\n\r\nRepertoire is designed to support:\r\n- BaseParts\r\n- Models\r\n- ParticleEmitters\r\n- Sounds\r\n\r\n<img width=\"540\" height=\"540\" alt=\"repertoire_bomb\" src=\"https://github.com/user-attachments/assets/ac937851-a354-468d-a44b-43e9cab964ec\" />\r\n\r\n## Usage\r\n\r\nRepertoire primarily uses an **AccentComponent**, which is an object that orchestrates front-end components and attaches them to instances. You can create and spawn one with:\r\n```lua\r\nlocal AccentObject = Repertoire.Accent(somePart)\r\nAccentObject:Spawn(Vector3.zero)\r\n```\r\n\r\n### Some ways to use Accents\r\n- Add a `RandomPlay` reaction to a sound and hook it to `OnSpawned` to randomize sound properties when spawned.\r\n- Add a `RandomLifetime` or `RandomCount` action to add randomness to the clones spawned from the accent.\r\n\r\n-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \r\n\r\n**Actions**: Mutates properties and handles specific functionality within the Repertoire process.\r\n**Reactions**: Pre-configured functions meant to connect to signals.\r\n\r\n### Example\r\n```lua\r\nlocal Repertoire = require(Repertoire)\r\n\r\nlocal Reactions = Repertoire.Reactions\r\nlocal Actions = Repertoire.Actions\r\nlocal Accent = Repertoire.Accent\r\nlocal Scene = Repertoire.Scene\r\n\r\nlocal Bomb = Accent(someBombPart)\r\n\r\n-- this bomb part will have a lifetime between 1 and 2 seconds\r\nBomb:AddAction(Actions.RandomLifetime):Props({\r\n    Min = 1, \r\n    Max = 2\r\n}) -- fully typed with intellisense!\r\n\r\n-- the bomb part will fly up in the air every time it is spawned\r\nBomb:AddReaction(Reactions.Force):Hook(Bomb.OnSpawned):Props({\r\n\tVelocity = 15,\r\n\tDirection = Vector3.yAxis,\r\n\tRandomRange = 30,\r\n\tSpread = 45,\r\n})\r\n\r\n-- the bomb part will tween to a scale of 0.1 when it is supposed to despawn.\r\nBomb:AddReaction(Reactions.TweenScale):Hook(Bomb.OnDespawned):Props({\r\n\tScale = 0.1,\r\n\tTweenInfo = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),\r\n})\r\n\r\n-- the bomb will play at the given destination\r\nBomb:Spawn(Vector3.zero)\r\n```\r\n","readmeTruncated":false}