{"id":"ddust1n/camerashaker","name":"camerashaker","scope":"ddust1n","platform":"roblox","description":"A fork of Sleitnick's RbxCameraShaker, fixed for wally.","version":"0.0.2","latest":"0.0.2","versions":["0.0.1","0.0.2"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"122b6144e7c9f7a8cc41568d779e78f9b8a19c6018fc4a092751aed5b2064e8b","likes":0,"downloads":0,"install":"forest install ddust1n/camerashaker","url":"https://forest.dev/p/roblox/ddust1n/camerashaker","files":"https://api.forest.dev/ai/package/roblox/ddust1n/camerashaker/files","readme":"# RbxCameraShaker\r\n\r\nRbxCameraShaker is a port of the free Unity3D [EZ Camera Shake](https://assetstore.unity.com/packages/tools/camera/ez-camera-shake-33148) asset. The Unity3D asset had no licensing information, so I received written permission from the original authors of EZ Camera Shake to port their asset to Roblox.\r\n\r\nThis module is available from the [Roblox library](https://www.roblox.com/library/1461025953/Camera-Shaker).\r\n\r\n## Purpose\r\n\r\nRbxCameraShaker is a module that lets developers easily add realistic camera shake effects to Roblox games. The module is easy to use and performs well.\r\n\r\n## Basic Use\r\n\r\nSimple example:\r\n```lua\r\nlocal function ShakeCamera(shakeCf)\r\n\t-- shakeCf: CFrame value that represents the offset to apply for shake effect.\r\n\t-- Apply the effect:\r\n\tcamera.CFrame = camera.CFrame * shakeCf\r\nend\r\n\r\n-- Create CameraShaker instance:\r\nlocal renderPriority = Enum.RenderPriority.Camera.Value + 1\r\nlocal camShake = CameraShaker.new(renderPriority, ShakeCamera)\r\n\r\n-- Start the instance:\r\ncamShake:Start()\r\n\r\n-- Apply explosion shakes every 5 seconds:\r\nwhile (true) do\r\n\twait(5)\r\n\tcamShake:Shake(CameraShaker.Presets.Explosion)\r\nend\r\n```\r\n\r\n## API\r\n\r\n### CameraShaker\r\n\r\n**Static Fields:**\r\n```lua\r\nCameraShaker.CameraShakeInstance\r\nCameraShaker.Presets\r\n```\r\n\r\n**Constructor:**\r\n```lua\r\ncamShaker = CameraShaker.new(renderPriority, bindFunction)\r\n```\r\n\r\n**Object Methods:**\r\n\r\n| Method | Description |\r\n| ------ | ----------- |\r\n| `camShaker:Start()` | Start the camera shaker |\r\n| `camShaker:Stop()` | Stop the camera shaker |\r\n| `camShaker:StopSustained([fadeOutTime])` | Stop all sustained shakes |\r\n| `camShaker:Shake(shakeInstance)` | Apply the shake effect once |\r\n| `camShaker:ShakeSustain(shakeInstance)` | Apply the shake effect coninuously |\r\n| `camShaker:ShakeOnce(magnitude, roughness [, fadeInTime, fadeOutTime, posInfluence, rotInfluence])` | Apply the custom shake effect once |\r\n| `camShaker:StartShake(magnitude, roughness [, fadeInTime, posInfluence, rotInfluence])` | Apply the custom shake effect continuously |\r\n\r\n### CameraShakeInstance\r\nThis is mostly used internally, but is still exposed for use.\r\n\r\n**Static Fields:**\r\n```lua\r\nCameraShakeInstance.CameraShakeState\r\n  - FadingIn\r\n  - FadingOut\r\n  - Sustained\r\n  - Inactive\r\n```\r\n\r\n**Constructor:**\r\n```lua\r\ninstance = CameraShakeInstance.new(magnitude, roughness, fadeInTime, fadeOutTime)\r\n```\r\n\r\n**Object Methods:**\r\n\r\n| Method | Description |\r\n| ------ | ----------- |\r\n| `instance:UpdateShake(deltaTime)` | Update the shake |\r\n| `instance:StartFadeOut(fadeOutTime)` | Fade out effect |\r\n| `instance:StartFadeIn(fadeInTime)` | Fade in effect |\r\n| `instance:IsShaking() ` | Returns `true` if shaking |\r\n| `instance:IsFadingOut()` | Returns `true` if fading out |\r\n| `instance:IsFadingIn()` | Returns `true` if fading in |\r\n| `instance:GetState()` | Returns the current CameraShakeState |\r\n\r\n### CameraShakePresets\r\n\r\n| Preset | Description | Ideal Type |\r\n| ------ | ----------- | ---------- |\r\n| Bump | A high-magnitude, short, yet smooth shake | Once |\r\n| Explosion | An intense & rough shake | Once |\r\n| Earthquake | Continuous, rough shake | Sustained |\r\n| BadTrip | Bizarre shake with high magnitude & low roughness | Sustained |\r\n| HandheldCamera | A subtle, slow shake | Sustained |\r\n| Vibration | Rough but low magnitude | Sustained |\r\n| RoughDriving | Slightly rough and medium magnitude | Sustained |\r\n\r\nThese presets are easy to modify and use. For an example of using one of the presets, look at the Basic Use section.","readmeTruncated":false}