{"id":"kashtheking/ocean","name":"ocean","scope":"kashtheking","platform":"roblox","description":"Infinite Ocean module: an infinite Gerstner-wave sea on EditableMesh, synced server and client, with weather, zones, obstacles, dry regions, water queries and events.","version":"1.0.2","latest":"1.0.2","versions":["1.0.2"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"1545b597e9c58e0b7d69ae25435765bf87c0f3c8a8c2c886fe4ca8944b0a33fd","likes":0,"downloads":0,"install":"forest install kashtheking/ocean","url":"https://forest.dev/p/roblox/kashtheking/ocean","files":"https://api.forest.dev/ai/package/roblox/kashtheking/ocean/files","readme":"# Ocean\n\nThe open-source core of [Infinite Ocean](https://kashtheking.com/infinite-ocean/): an infinite Gerstner-wave sea for Roblox on `EditableMesh`, synced between server and clients, with a weather API (named wave and colour sets cross-faded in time and space), zones, obstacles that calm the water, dry regions, water events and surface queries. MIT licensed.\n\nDocumentation, tutorial and API reference: **https://kashtheking.com/infinite-ocean/**\n\nThe **Infinite Ocean Studio plugin** (installer, live Edit-mode preview, settings panel, presets) and its **addons** (Buoyancy, Swimming, Drowning, WaterSplash, Weather, Zones, DevTools) are proprietary and not part of this package: get the plugin on the [Creator Store](https://create.roblox.com/store/asset/76752250508724/Infinite-Ocean). Without the Buoyancy addon the sea is visuals, queries and events only.\n\n## Installation\n\n### Studio Wally\n\nUsing the [Studio Wally plugin](../../../plugins/studio-wally):\n\n1. Open the widget\n2. Search `kashtheking/ocean`\n3. Click the download button and choose \"Shared module\"\n\n### Wally\n\nAdd this to the `[dependencies]` section of your `wally.toml`:\n\n```toml\nOcean = \"kashtheking/ocean@1.0.2\"\n```\n\n### Infinite Ocean plugin\n\nThe plugin installs the same module at `ReplicatedStorage.Ocean` with one click and gives you a settings panel for it.\n\n## Use\n\nStart the sea once on the server and once on every client. `Init` is safe to call more than once.\n\n```lua\n-- a Script (server) and a LocalScript (client), both:\nlocal Ocean = require(game.ReplicatedStorage.Packages.Ocean)\nOcean.Init()\n```\n\n```lua\n-- server\nOcean:CreateWeather(\"Storm\", Ocean.Presets.Ocean[\"Pirate Seas\"])\nOcean:SetWeather(\"Storm\", 20)          -- cross-fade the whole sea over 20 s\n\n-- either side\nlocal y = Ocean:GetHeight(position)    -- surface Y right now\nOcean.EnteredWater:Connect(function(instance) end)\n```\n\nSettings are attributes on the module (`Ocean.Settings.List` is the spec). Tag a part `OceanObstacle` to calm the water against it, `OceanDry` for an interior with no water, `OceanTrack` for water events.\n\nThe experience must allow `EditableMesh` (Experience Settings) for the wave mesh; without it the sea falls back to a flat surface.\n\n## Support\n\n[Discord](https://discord.gg/6HYgCk22eD), or **@KashTheKing** on Roblox, YouTube and X.\n","readmeTruncated":false}