Git Product home page Git Product logo

rbxbinaryparser's Introduction

rbxBinaryParser

Roblox binary file reader for JavaScript.

A .rbxl or .rbxm file is passed to the library as an ArrayBuffer, which is then read and decoded into an Object representing the contents of the file.

Using

The latest versions can be found in dist/server and dist/client.

To use this library, copy either dist/client/rbxBinaryParser.js or dist/client/server/rbxBinaryParser.js to your project.

You can import the library like so:

Server Browser
const { decode } = require("path/to/rbxBinaryParser"); import { decode } from "rbxBinaryParser.js";

To decode a Roblox binary file (rbxm or rbxl), you need to pass it as an ArrayBuffer to the decode function. This will return an array containing an Object representing each instance in the file. These objects contain the instance's properties and their values, along with a .Children property which is an array of objects representing the children of the instance.

Building

Contributions to this project are welcome!

To build this project, you need to install webpack. This can be done by running npm i --save-dev webpack webpack-cli. (make sure you have npm installed!)

With webpack installed, open the project directory and run:

Command Function
npm run build Builds for both server and client in production mode.
npm run build:[client,server] Builds for either server or client in production mode.
npm run buildDev Builds for both server and client in development mode.
npm run buildDev:[client,server] Builds for either server or client in development mode.

Production builds are minified and have little sourcemapping, while development builds are less minified and have heavier sourcemapping to allow for easier debugging.

rbxbinaryparser's People

Contributors

mrsprinkletoes avatar

Stargazers

 avatar Meep avatar Cam avatar uglyburger0 avatar

Watchers

 avatar

rbxbinaryparser's Issues

Add support for more property types

Support reading more property types.

Progress:

  • String
  • Bool
  • Int
  • Float
  • Double
  • UDim
  • UDim2
  • Ray
  • Faces
  • Axes
  • BrickColor
  • Color3
  • Vector2
  • Vector3
  • Vector2int16
  • CFrame
  • CFrameQuat
  • Token
  • Reference
  • Vector3int16
  • NumberSequence
  • ColorSequence
  • NumberRange
  • Rect
  • PhysicalProperties
  • Color3uint8
  • Int64
  • SharedString
  • Optional
  • UniqueId
  • Font

LZ4 decompressing: Invalid magic number

In ChunkReader.js attempting to decompress LZ4 compressed chunk payloads using the lz4js library results in the error invalid magic number.

I am fairly certain that this could be caused by incorrectly getting the chunk payload, however I am unsure of how to fix it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.