{"id":"bubbabiga/windshake","name":"windshake","scope":"bubbabiga","platform":"roblox","description":"Mirrored from the Wally registry.","version":"0.1.0","latest":"0.1.0","versions":["0.1.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":["License identified from the packaged LICENSE file; the manifest declared none."],"licenseVerified":true,"dependencies":{},"integrity":"9ec91dc1d930ec23eba906e7ab6e8ebd1ba2460ef610d7c465ad90cdb768b9bd","likes":0,"downloads":0,"install":"forest install bubbabiga/windshake","url":"https://forest.dev/p/roblox/bubbabiga/windshake","files":"https://api.forest.dev/ai/package/roblox/bubbabiga/windshake/files","readme":"# WindShake\r\n\r\nHigh performance wind effect for leaves and foliage\r\n\r\n*by boatbomber*\r\n\r\nI wanted to have massive forests full of moving leaves. Not for any project of mine, I just wanted to make it cuz it sounded like fun. So I did. And now you guys benefit!\r\n\r\nThis module handled 77,750+ leaf meshes while the game ran at over 400 FPS on my machine. It's pretty darn fast, all things considered.\r\n\r\nDemo:\r\nhttps://www.youtube.com/watch?v=WdJr7k9Uqfw\r\n\r\n-----\r\n\r\n# Source:\r\n\r\n**GitHub:**\r\n\r\nhttps://github.com/boatbomber/WindShake\r\n\r\n**Library:**\r\n\r\nhttps://www.roblox.com/library/6377120469/WindShake\r\n\r\n**Uncopylocked Demo:**\r\n\r\nhttps://www.roblox.com/games/6342320514/Wind-Demo\r\n\r\n-----\r\n\r\n# API:\r\n\r\n## Functions\r\n\r\n```Lua\r\nfunction WindShake:Init()\r\n```\r\n*Initializes the wind shake logic and adds shake to all tagged objects*\r\n\r\n**Returns:**  \r\n* `void`\r\n\r\n```Lua\r\nfunction WindShake:Cleanup()\r\n```\r\n*Halts and clears the wind shake logic and all object shakes*\r\n\r\n**Returns:**  \r\n* `void`\r\n\r\n```Lua\r\nfunction WindShake:Pause()\r\n```\r\n*Halts the wind shake logic without clearing*\r\n\r\n**Returns:**  \r\n* `void`\r\n\r\n```Lua\r\nfunction WindShake:Resume()\r\n```\r\n*Restarts the wind shake logic without clearing*\r\n\r\n**Returns:**  \r\n* `void`\r\n\r\n```Lua\r\nfunction WindShake:AddObjectShake(Object, Settings)\r\n```\r\n*Adds an object to be shaken*\r\n\r\n**Parameters:**\r\n- `Object` *[BasePart]*\r\nThe Object to apply shaking to\r\n\r\n- `Settings` *[Optional Dictionary]*\r\nThe settings to apply to this object's shake (See below for Settings structure)\r\n\r\n**Returns:**  \r\n* `void`\r\n\r\n```Lua\r\nfunction WindShake:RemoveObjectShake(Object)\r\n```\r\n*Removes shake from an object*\r\n\r\n**Parameters:**\r\n- `Object` *[BasePart]*\r\nThe Object to remove shaking from\r\n\r\n**Returns:**  \r\n* `void`\r\n\r\n```Lua\r\nfunction WindShake:SetDefaultSettings(Settings) [DEPRECATED]\r\n```\r\n> Deprecated in favor of setting the Attributes of the WindShake modulescript\r\n\r\n*Sets the default settings for future object shake additions*\r\n\r\n\r\n**Parameters:**\r\n\r\n- `Settings` *[Dictionary]*\r\nThe settings to use as default (See below for Settings structure)\r\n\r\n**Returns:**  \r\n* `void`\r\n\r\n```Lua\r\nfunction WindShake:UpdateObjectSettings(Object, Settings) [DEPRECATED]\r\n```\r\n> Deprecated in favor of setting the Attributes of the Object\r\n\r\n*Updates the shake settings of an object already added*\r\n\r\n**Parameters:**\r\n- `Object` *[BasePart]*\r\nThe Object to apply shake settings to\r\n\r\n- `Settings` *[Dictionary]*\r\nThe settings to apply to this object's shake (See below for Settings structure)\r\n\r\n**Returns:**  \r\n* `void`\r\n\r\n```Lua\r\nfunction WindShake:UpdateAllObjectSettings(Settings)\r\n```\r\n*Updates the shake settings of all active shakes*\r\n\r\n**Parameters:**\r\n\r\n- `Settings` *[Dictionary]*\r\nThe settings to apply to all objects' shake (See below for Settings structure)\r\n\r\n**Returns:**  \r\n* `void`\r\n\r\n## Events\r\n\r\n```Lua\r\nRBXScriptSignal WindShake.ObjectShakeAdded(Object)\r\n```\r\n*Fires when an object is added to WindShake*\r\n\r\n**Parameters:**\r\n\r\n- `Object` *[BasePart]*\r\nThe object that was added\r\n\r\n```Lua\r\nRBXScriptSignal WindShake.ObjectShakeRemoved(Object)\r\n```\r\n*Fires when an object is removed from WindShake*\r\n\r\n**Parameters:**\r\n\r\n- `Object` *[BasePart]*\r\nThe object that was removed\r\n\r\n```Lua\r\nRBXScriptSignal WindShake.ObjectShakeUpdated(Object)\r\n```\r\n*Fires when an object's settings are updated through the update APIs*\r\n\r\n**Parameters:**\r\n\r\n- `Object` *[BasePart]*\r\nThe object that had its settings updated\r\n\r\n```Lua\r\nRBXScriptSignal WindShake.Resumed()\r\n```\r\n*Fires when WindShake begins shaking the objects*\r\n\r\n```Lua\r\nRBXScriptSignal WindShake.Paused()\r\n```\r\n*Fires when WindShake stops shaking the objects*\r\n\r\n## Types\r\n\r\n```Lua\r\nSettings = {\r\n    WindDirection: Vector3 to shake towards (Initially 0.5,0,0.5)\r\n    WindSpeed: Positive number that defines how fast to shake (Initially 20)\r\n    WindPower: Positive number that defines how much to shake (Initially 0.5)\r\n \r\n    --If one of these is not defined, it will use default for that one,\r\n    --so you can pass a table with just one or two settings and the rest\r\n    --will be default so you don't need to make the full table every time.\r\n}\r\n```\r\n\r\n-----\r\n\r\n# Usage Example:\r\n\r\n```Lua\r\nlocal WIND_DIRECTION = Vector3.new(1,0,0.3)\r\nlocal WIND_SPEED = 25\r\nlocal WIND_POWER = 0.4\r\n\r\nlocal WindShake = require(script.WindShake)\r\n\r\nWindShake:SetDefaultSettings({\r\n\tWindSpeed = WIND_SPEED;\r\n\tWindDirection = WIND_DIRECTION;\r\n\tWindPower = WIND_POWER;\r\n})\r\n\r\nWindShake:Init() -- Anything with the WindShake tag will now shake\r\n\r\n```\r\n","readmeTruncated":false}