mirror of
https://github.com/Stefanuk12/luau-roblox.git
synced 2026-08-14 20:54:57 +00:00
A luau library to manipulate roblox place/model files
- Luau 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| rbx-test-files@53d2ca8bb1 | ||
| scripts | ||
| src | ||
| test | ||
| .gitignore | ||
| .gitmodules | ||
| .luaurc | ||
| default.project.json | ||
| LICENSE | ||
| README.md | ||
| wally.toml | ||
| zune.toml | ||
luau-roblox
A luau library to manipulate Roblox instances from place/model files, powered by Zune.
Usage
Setup the library, ideally with .luaurc.
Virtual DataModel
Using the Virtual DataModel is easier, but it has overhead. Equivalent to Lune's roblox module.
local roblox = require("@roblox");
local placeContents = ...; -- read the place file
local game = roblox.deserializePlace(placeContents);
-- do something with the game
local content = roblox.serializePlace(game);
DOM
Using the DOM over the Virtual DataModel is ideally faster, with zero overhead. The downside is that you have to manually handle the instances, parents, and references.
local roblox = require("@roblox");
local dom = roblox.dom;
local placeContents = ...; -- read the place file
local doc = dom.deserialize(placeContents);
-- do something with the doc
local content = dom.serialize(doc, "BINARY");
Information
DOM Supported:
Binary(.rbxl, .rbxm)- deserialization
- serialization
XML(.rbxlx, .rbxmx)- deserialization
- serialization
Warnings:
- 64-bit integer data could not be represented fully due to luau's number limitations, the max precision is 2^53.
Goals:
- High performance
- Support most Runtimes with Luau(0.650+)
- Up to date Roblox instances