{"id":"shmeatley/atlas","name":"atlas","scope":"shmeatley","platform":"roblox","description":"A procedural generation toolkit for Roblox.","version":"0.1.3","latest":"0.1.3","versions":["0.1.0","0.1.1","0.1.2","0.1.3"],"license":"MIT","licenseRating":"safe","licenseCaveats":["The package archive does not include its license text; the license is declared in its manifest metadata."],"licenseVerified":false,"dependencies":{},"integrity":"f0de561b9f9aa7ee14af6344ede7ef9ee164aae981ba50e6a30b797a7c542904","likes":0,"downloads":0,"install":"forest install shmeatley/atlas","url":"https://forest.dev/p/roblox/shmeatley/atlas","files":"https://api.forest.dev/ai/package/roblox/shmeatley/atlas/files","readme":"# Atlas\n\n[![CI](https://github.com/shmeatley/atlas/actions/workflows/ci.yml/badge.svg)](https://github.com/shmeatley/atlas/actions/workflows/ci.yml)\n[![Wally](https://img.shields.io/badge/wally-shmeatley%2Fatlas-blue)](https://wally.run/package/shmeatley/atlas)\n[![Docs](https://img.shields.io/badge/docs-moonwave-blue)](https://shmeatley.github.io/atlas)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n\nAtlas is a procedural generation toolkit for Roblox, written in fully-typed\nLuau.\n\n- **Noise** — seeded Perlin, simplex, and Voronoi (Worley) samplers in 2D and\n  3D, with analytical derivatives for slope-aware generation, plus fBm helpers\n  for layering octaves.\n- **Sampling** — uniform random and Poisson disc (blue noise) point\n  scattering, deterministic per seed.\n- **Curves** — monotone cubic response curves built from control points, for\n  remapping noise (or any value) without overshoot.\n- **Visualization** — draggable on-screen `EditableImage` windows rendered\n  through pixel buffers, with built-in presets for noise, curves, and point\n  sets.\n\n## Installation\n\n```toml\n[dependencies]\nAtlas = \"shmeatley/atlas@0.1.0\"\n```\n\nThen run:\n\n```sh\nwally install\n```\n\n## Quick start\n\n```lua\nlocal Atlas = require(path.to.Atlas)\n\n-- Seeded noise: same seed, same world.\nlocal simplex = Atlas.Noise.Simplex.new(42)\n\n-- Shape the raw noise with a response curve.\nlocal falloff = Atlas.Curve.new({\n\tVector2.new(0, 0),\n\tVector2.new(0.4, 0.1),\n\tVector2.new(0.7, 0.8),\n\tVector2.new(1, 1),\n})\n\nlocal function terrainHeight(x: number, z: number): number\n\tlocal noise = Atlas.Noise.fbm2D(simplex, x * 0.01, z * 0.01, 4)\n\treturn falloff:evaluate(noise * 0.5 + 0.5) * 100\nend\n\n-- Slope-aware placement using analytical derivatives (no extra samples).\nlocal _, dx, dz = simplex:sample2DWithDerivative(10, 20)\nlocal steepness = math.sqrt(dx * dx + dz * dz)\n\n-- Blue-noise scatter for trees, rocks, spawn points…\nlocal trees = Atlas.Sampling.poissonDisc(512, 512, 8, 42)\n\n-- See what you're generating (client-side).\nlocal window = Atlas.Visualizer.new({ title = \"Terrain preview\" })\nwindow:render(Atlas.Visualizer.Presets.noise(simplex, { scale = 0.02, curve = falloff }))\n```\n\nFull API reference: [shmeatley.github.io/atlas](https://shmeatley.github.io/atlas)\n\n## Performance notes\n\n- Every sampler builds its seeded state once at construction; sampling methods\n  are allocation-free.\n- In your own hot loops, localize the method once:\n  `local sample2D = noise.sample2D` then call `sample2D(noise, x, y)`.\n\nThe test place ships with benchmarks: build it with\n`rojo build test.project.json -o AtlasTest.rbxl`, open in Studio, and press\nPlay — smoke tests plus per-call timings print to the output, and demo\n\nHere is my benchmarks output from my machine:\n\nYes, it is faster than roblox when sampling pure 2d noise(seeded). It also supports derivatives which are extremely useful.\n\n```\nROBLOX-PERLIN-2d                               4.036 ms      0.040 us/op  [n=100000]\nROBLOX-PERLIN-2d-cached                        4.074 ms      0.041 us/op  [n=100000]\nPerlin.sample2D                                3.831 ms      0.038 us/op  [n=100000]\nPerlin.sample2DWithDerivative                  4.751 ms      0.048 us/op  [n=100000]\nROBLOX-PERLIN-3d                               4.032 ms      0.040 us/op  [n=100000]\nROBLOX-PERLIN-3d-cached                        3.990 ms      0.040 us/op  [n=100000]\nPerlin.sample3D                                5.575 ms      0.056 us/op  [n=100000]\nPerlin.sample3DWithDerivative                  8.299 ms      0.083 us/op  [n=100000]\nSimplex.sample2DWithDerivative                 0.062 ms      0.062 us/op  [n=1000]\nSimplex.sample3DWithDerivative                 0.088 ms      0.088 us/op  [n=1000]\nVoronoi.sample2D                               0.139 ms      0.139 us/op  [n=1000]\nVoronoi.sample3D                               0.417 ms      0.417 us/op  [n=1000]\nVoronoi.cell2D                                 0.171 ms      0.171 us/op  [n=1000]\nNoise.fbm2D (4 octaves, simplex)               0.207 ms      0.207 us/op  [n=1000]\nCurve.evaluate (8 points)                      0.076 ms      0.076 us/op  [n=1000]\nSampling.uniform (256 points)                  4.806 ms      4.806 us/op  [n=1000]\nSampling.poissonDisc (100x100, r=5)         1171.568 ms   1171.568 us/op  [n=1000]\nSampling.blueNoiseGrid (100x100, cellSize=3)  25.427 ms     25.427 us/op  [n=1000]\nVisualizer render math (128x128)             112.179 ms   1121.792 us/op  [n=100]\n```\n\n## License\n\nAtlas is licensed under the [MIT License](LICENSE).\n","readmeBorrowedFrom":{"version":"0.1.1","source":"wally"},"readmeTruncated":false}