Compare commits
183 Commits
memofs-v0.
...
unpack-com
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88d2d1f193 | ||
|
|
2e7c4b6dff | ||
|
|
e5dbee1073 | ||
|
|
c06463b61d | ||
|
|
10341e3776 | ||
|
|
824cdc5dcd | ||
|
|
7aa7a35aa5 | ||
|
|
79b57b3359 | ||
|
|
c7aeffe586 | ||
|
|
79c02f2457 | ||
|
|
b9ed68fa9e | ||
|
|
6c6d6c9c8d | ||
|
|
e169d7be68 | ||
|
|
192fd7d4dd | ||
|
|
1f1193e857 | ||
|
|
0a412ade88 | ||
|
|
3cef2fe9aa | ||
|
|
18e53f06fe | ||
|
|
eaac539087 | ||
|
|
57005c4fd5 | ||
|
|
ea58999a2a | ||
|
|
a5a69fd9fc | ||
|
|
f1d0f1c1c9 | ||
|
|
83492d7495 | ||
|
|
10abc2254a | ||
|
|
5d5536a95e | ||
|
|
fe81e55925 | ||
|
|
654690d73e | ||
|
|
256aba4bc1 | ||
|
|
49f8845105 | ||
|
|
12370846b4 | ||
|
|
07637dfe96 | ||
|
|
f389a4a1db | ||
|
|
af077c796c | ||
|
|
1c319f2fa8 | ||
|
|
e8afa03f7b | ||
|
|
9b22545842 | ||
|
|
adc733d25c | ||
|
|
6896257647 | ||
|
|
1d9845a6cb | ||
|
|
8461339e9a | ||
|
|
9904d94e4c | ||
|
|
da25c80d0b | ||
|
|
5fa63733fd | ||
|
|
8b54bf0ba1 | ||
|
|
173dc12cb3 | ||
|
|
e136529ff0 | ||
|
|
75542dacb3 | ||
|
|
07abfbde43 | ||
|
|
96112fe118 | ||
|
|
9d0b313261 | ||
|
|
277ddfa9be | ||
|
|
5d88bdb256 | ||
|
|
8d29b43155 | ||
|
|
cc071a6415 | ||
|
|
8954def25c | ||
|
|
d484098781 | ||
|
|
9f06cbf3a0 | ||
|
|
af4a3ca0af | ||
|
|
43715143e4 | ||
|
|
16aa354d36 | ||
|
|
c739025453 | ||
|
|
f0526d17de | ||
|
|
6cc2e919c0 | ||
|
|
e1f9eaefa9 | ||
|
|
5d62bf9b60 | ||
|
|
4aa5814a0a | ||
|
|
5bca244062 | ||
|
|
7cf57714a4 | ||
|
|
92e6f862ad | ||
|
|
2377f41036 | ||
|
|
26a08f4d9f | ||
|
|
672d207961 | ||
|
|
a3d8e50f26 | ||
|
|
d3abca46a8 | ||
|
|
17fdd18c55 | ||
|
|
e482d038c6 | ||
|
|
d0482a004e | ||
|
|
561a3e3256 | ||
|
|
158dac5e1c | ||
|
|
1413f8c0b6 | ||
|
|
ffb2aa332a | ||
|
|
45e8208e9c | ||
|
|
7f230a8bf4 | ||
|
|
afe26b8c16 | ||
|
|
d153f62b8a | ||
|
|
5c80cd6e50 | ||
|
|
df1aced95d | ||
|
|
5a0a8f5077 | ||
|
|
1c281539e0 | ||
|
|
ef41d14f50 | ||
|
|
aa29397732 | ||
|
|
ca8865a3ce | ||
|
|
7599ef6626 | ||
|
|
43e71f9242 | ||
|
|
aac9b25efe | ||
|
|
532d170585 | ||
|
|
3dcb14013b | ||
|
|
a4c782cd35 | ||
|
|
0779baa0ac | ||
|
|
0849fab644 | ||
|
|
d85bca2e7e | ||
|
|
c7ab6c435c | ||
|
|
98db3b4f08 | ||
|
|
0e7ba839ed | ||
|
|
2c27691e57 | ||
|
|
934506bdfd | ||
|
|
f313fa4ae1 | ||
|
|
78755b6130 | ||
|
|
8bf59e5cbb | ||
|
|
8f71d13714 | ||
|
|
f4a790eb50 | ||
|
|
0d951c8ad1 | ||
|
|
59ef5f05ea | ||
|
|
b84aab0960 | ||
|
|
0e89b91c38 | ||
|
|
7888a704e1 | ||
|
|
804fd3de8e | ||
|
|
4992c36f08 | ||
|
|
27af0c841b | ||
|
|
cc4f4df4f9 | ||
|
|
5989ab3b85 | ||
|
|
040b9c1452 | ||
|
|
bb7bd2e27e | ||
|
|
02dbd4ba75 | ||
|
|
3b149cc875 | ||
|
|
f3745c68d2 | ||
|
|
eddbe7d0cf | ||
|
|
faf86d006a | ||
|
|
71e4dfeb14 | ||
|
|
da8ed6ddf9 | ||
|
|
503e687c55 | ||
|
|
dd667cce0b | ||
|
|
f911009752 | ||
|
|
cae4c46669 | ||
|
|
a937fc38db | ||
|
|
ff43ffce07 | ||
|
|
5bb3dc258a | ||
|
|
98238e4516 | ||
|
|
23b8308282 | ||
|
|
a1f7cdc2b6 | ||
|
|
dcb30351c5 | ||
|
|
1c0dc60071 | ||
|
|
0401c3ac0e | ||
|
|
3b800d1cd7 | ||
|
|
35efb464e5 | ||
|
|
19a955a327 | ||
|
|
836b18e68a | ||
|
|
046dc0d598 | ||
|
|
039d92ce78 | ||
|
|
2136da15d6 | ||
|
|
e5041d80ef | ||
|
|
f66860bdfe | ||
|
|
50f0a2bd2e | ||
|
|
7cd9bd383e | ||
|
|
45a20a1633 | ||
|
|
ec5b3f80ef | ||
|
|
3b257ea87a | ||
|
|
6b82cead9c | ||
|
|
79ae4c52cd | ||
|
|
a4616cda7d | ||
|
|
95648361be | ||
|
|
0c41e9c10b | ||
|
|
61c7ef3cb0 | ||
|
|
65898125d0 | ||
|
|
da05078ff3 | ||
|
|
badb5c3636 | ||
|
|
9453588ab1 | ||
|
|
4cbb3874a4 | ||
|
|
940aff7ef4 | ||
|
|
a3edb93273 | ||
|
|
782b054b1a | ||
|
|
fc27b2911e | ||
|
|
486b067567 | ||
|
|
bdd1afea57 | ||
|
|
5ccd02939b | ||
|
|
ca5b8ab309 | ||
|
|
9481fdd38d | ||
|
|
56bf6d282b | ||
|
|
5364c9c1bc | ||
|
|
a4d4beeb97 | ||
|
|
30a01381be | ||
|
|
def99a9e4d |
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
patreon: lpghatguy
|
||||||
52
.github/workflows/ci.yml
vendored
@@ -1,41 +1,59 @@
|
|||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
|
||||||
push:
|
push:
|
||||||
branches: ["*"]
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: Build and Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rust_version: [stable, "1.40.0"]
|
rust_version: [stable, 1.55.0]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Setup Rust toolchain
|
- name: Install Rust
|
||||||
run: rustup default ${{ matrix.rust_version }}
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: ${{ matrix.rust_version }}
|
||||||
|
override: true
|
||||||
|
profile: minimal
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --locked --verbose
|
run: cargo build --locked --verbose
|
||||||
|
|
||||||
- name: Run tests
|
- name: Test
|
||||||
run: cargo test --locked --verbose
|
run: cargo test --locked --verbose
|
||||||
|
|
||||||
- name: Rustfmt and Clippy
|
lint:
|
||||||
run: |
|
name: Rustfmt and Clippy
|
||||||
cargo fmt -- --check
|
runs-on: ubuntu-latest
|
||||||
cargo clippy
|
|
||||||
if: matrix.rust_version == 'stable'
|
|
||||||
|
|
||||||
- name: Build (All Features)
|
steps:
|
||||||
run: cargo build --locked --verbose --all-features
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Run tests (All Features)
|
- name: Install Rust
|
||||||
run: cargo test --locked --verbose --all-features
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Rustfmt
|
||||||
|
run: cargo fmt -- --check
|
||||||
|
|
||||||
|
- name: Clippy
|
||||||
|
run: cargo clippy
|
||||||
193
.github/workflows/release.yml
vendored
@@ -2,59 +2,152 @@ name: Release
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: ["*"]
|
tags: ["v*"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
windows:
|
create-release:
|
||||||
runs-on: windows-latest
|
name: Create Release
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
|
|
||||||
- name: Build release binary
|
|
||||||
run: cargo build --verbose --locked --release
|
|
||||||
|
|
||||||
- name: Upload artifacts
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: rojo-win64
|
|
||||||
path: target/release/rojo.exe
|
|
||||||
|
|
||||||
macos:
|
|
||||||
runs-on: macos-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
|
|
||||||
- name: Install Rust
|
|
||||||
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
||||||
|
|
||||||
- name: Build release binary
|
|
||||||
run: |
|
|
||||||
source $HOME/.cargo/env
|
|
||||||
cargo build --verbose --locked --release
|
|
||||||
env:
|
|
||||||
OPENSSL_STATIC: 1
|
|
||||||
|
|
||||||
- name: Upload artifacts
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: rojo-macos
|
|
||||||
path: target/release/rojo
|
|
||||||
|
|
||||||
linux:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: ${{ github.ref }}
|
||||||
|
draft: true
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
- name: Build
|
build-plugin:
|
||||||
run: cargo build --locked --verbose --release
|
needs: ["create-release"]
|
||||||
env:
|
name: Build Roblox Studio Plugin
|
||||||
OPENSSL_STATIC: 1
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Setup Foreman
|
||||||
uses: actions/upload-artifact@v1
|
uses: Roblox/setup-foreman@v1
|
||||||
with:
|
with:
|
||||||
name: rojo-linux
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
path: target/release/rojo
|
|
||||||
|
- name: Build Plugin
|
||||||
|
run: rojo build plugin --output Rojo.rbxm
|
||||||
|
|
||||||
|
- name: Upload Plugin to Release
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.create-release.outputs.upload_url }}
|
||||||
|
asset_path: Rojo.rbxm
|
||||||
|
asset_name: Rojo.rbxm
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
|
- name: Upload Plugin to Artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Rojo.rbxm
|
||||||
|
path: Rojo.rbxm
|
||||||
|
|
||||||
|
build:
|
||||||
|
needs: ["create-release"]
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
# https://doc.rust-lang.org/rustc/platform-support.html
|
||||||
|
#
|
||||||
|
# FIXME: After the Rojo VS Code extension updates, add architecture
|
||||||
|
# names to each of these releases. We'll rename win64 to windows and add
|
||||||
|
# -x86_64 to each release.
|
||||||
|
include:
|
||||||
|
- host: linux
|
||||||
|
os: ubuntu-latest
|
||||||
|
target: x86_64-unknown-linux-gnu
|
||||||
|
label: linux
|
||||||
|
|
||||||
|
- host: windows
|
||||||
|
os: windows-latest
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
label: win64
|
||||||
|
|
||||||
|
- host: macos
|
||||||
|
os: macos-latest
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
label: macos
|
||||||
|
|
||||||
|
- host: macos
|
||||||
|
os: macos-latest
|
||||||
|
target: aarch64-apple-darwin
|
||||||
|
label: macos-aarch64
|
||||||
|
|
||||||
|
name: Build (${{ matrix.target }})
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
BIN: rojo
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Get Version from Tag
|
||||||
|
shell: bash
|
||||||
|
# https://github.community/t/how-to-get-just-the-tag-name/16241/7#M1027
|
||||||
|
run: |
|
||||||
|
echo "PROJECT_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||||
|
echo "Version is: ${{ env.PROJECT_VERSION }}"
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
target: ${{ matrix.target }}
|
||||||
|
override: true
|
||||||
|
profile: minimal
|
||||||
|
|
||||||
|
- name: Build Release
|
||||||
|
run: cargo build --release --locked --verbose
|
||||||
|
env:
|
||||||
|
# Build into a known directory so we can find our build artifact more
|
||||||
|
# easily.
|
||||||
|
CARGO_TARGET_DIR: output
|
||||||
|
|
||||||
|
# On platforms that use OpenSSL, ensure it is statically linked to
|
||||||
|
# make binaries more portable.
|
||||||
|
OPENSSL_STATIC: 1
|
||||||
|
|
||||||
|
- name: Create Release Archive
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir staging
|
||||||
|
|
||||||
|
if [ "${{ matrix.host }}" = "windows" ]; then
|
||||||
|
cp "output/release/$BIN.exe" staging/
|
||||||
|
cd staging
|
||||||
|
7z a ../release.zip *
|
||||||
|
else
|
||||||
|
cp "output/release/$BIN" staging/
|
||||||
|
cd staging
|
||||||
|
zip ../release.zip *
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload Archive to Release
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.create-release.outputs.upload_url }}
|
||||||
|
asset_path: release.zip
|
||||||
|
asset_name: ${{ env.BIN }}-${{ env.PROJECT_VERSION }}-${{ matrix.label }}.zip
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
|
- name: Upload Archive to Artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ env.BIN }}-${{ env.PROJECT_VERSION }}-${{ matrix.label }}.zip
|
||||||
|
path: release.zip
|
||||||
8
.gitignore
vendored
@@ -10,9 +10,15 @@
|
|||||||
/*.rbxl
|
/*.rbxl
|
||||||
/*.rbxlx
|
/*.rbxlx
|
||||||
|
|
||||||
|
# Test places for the Roblox Studio Plugin
|
||||||
|
/plugin/*.rbxlx
|
||||||
|
|
||||||
# Roblox Studio holds 'lock' files on places
|
# Roblox Studio holds 'lock' files on places
|
||||||
*.rbxl.lock
|
*.rbxl.lock
|
||||||
*.rbxlx.lock
|
*.rbxlx.lock
|
||||||
|
|
||||||
# Snapshot files from the 'insta' Rust crate
|
# Snapshot files from the 'insta' Rust crate
|
||||||
**/*.snap.new
|
**/*.snap.new
|
||||||
|
|
||||||
|
# Selene generates a roblox.toml file that should not be checked in.
|
||||||
|
/roblox.toml
|
||||||
5
.gitmodules
vendored
@@ -9,4 +9,7 @@
|
|||||||
url = https://github.com/LPGhatguy/roblox-lua-promise.git
|
url = https://github.com/LPGhatguy/roblox-lua-promise.git
|
||||||
[submodule "plugin/modules/t"]
|
[submodule "plugin/modules/t"]
|
||||||
path = plugin/modules/t
|
path = plugin/modules/t
|
||||||
url = https://github.com/osyrisrblx/t.git
|
url = https://github.com/osyrisrblx/t.git
|
||||||
|
[submodule "plugin/modules/flipper"]
|
||||||
|
path = plugin/modules/flipper
|
||||||
|
url = https://github.com/Reselim/Flipper
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ stds.plugin = {
|
|||||||
stds.testez = {
|
stds.testez = {
|
||||||
read_globals = {
|
read_globals = {
|
||||||
"describe",
|
"describe",
|
||||||
"it", "itFOCUS", "itSKIP",
|
"it", "itFOCUS", "itSKIP", "itFIXME",
|
||||||
"FOCUS", "SKIP", "HACK_NO_XPCALL",
|
"FOCUS", "SKIP", "HACK_NO_XPCALL",
|
||||||
"expect",
|
"expect",
|
||||||
}
|
}
|
||||||
|
|||||||
190
CHANGELOG.md
@@ -1,6 +1,192 @@
|
|||||||
# Rojo Changelog
|
# Rojo Changelog
|
||||||
|
|
||||||
## Unreleased Changes
|
## Unreleased Changes
|
||||||
|
* Switched from structopt to clap for command line argument parsing.
|
||||||
|
* Significantly improved performance of building and serving. ([#548])
|
||||||
|
* Fixed `init.meta.json` when used with `init.lua` and related files. ([#549])
|
||||||
|
|
||||||
|
[#548]: https://github.com/rojo-rbx/rojo/pull/548
|
||||||
|
[#549]: https://github.com/rojo-rbx/rojo/pull/549
|
||||||
|
|
||||||
|
## [7.1.1] - May 26, 2022
|
||||||
|
* Fixed sourcemap command not stripping paths correctly ([#544])
|
||||||
|
* Fixed Studio plugin settings not saving correctly.
|
||||||
|
|
||||||
|
[#544]: https://github.com/rojo-rbx/rojo/pull/544
|
||||||
|
[#545]: https://github.com/rojo-rbx/rojo/pull/545
|
||||||
|
[7.1.1]: https://github.com/rojo-rbx/rojo/releases/tag/v7.1.1
|
||||||
|
|
||||||
|
## [7.1.0] - May 22, 2022
|
||||||
|
* Added support for specifying an address to be used by default in project files. ([#507])
|
||||||
|
* Added support for optional paths in project files. ([#472])
|
||||||
|
* Added support for the new Open Cloud API when uploading. ([#504])
|
||||||
|
* Added `sourcemap` command for generating sourcemaps to feed into other tools. ([#530])
|
||||||
|
* Added PluginActions for connecting/disconnecting a session ([#537])
|
||||||
|
* Added changing toolbar icon to indicate state ([#538])
|
||||||
|
|
||||||
|
[#472]: https://github.com/rojo-rbx/rojo/pull/472
|
||||||
|
[#504]: https://github.com/rojo-rbx/rojo/pull/504
|
||||||
|
[#507]: https://github.com/rojo-rbx/rojo/pull/507
|
||||||
|
[#530]: https://github.com/rojo-rbx/rojo/pull/530
|
||||||
|
[#537]: https://github.com/rojo-rbx/rojo/pull/537
|
||||||
|
[#538]: https://github.com/rojo-rbx/rojo/pull/538
|
||||||
|
[7.1.0]: https://github.com/rojo-rbx/rojo/releases/tag/v7.1.0
|
||||||
|
|
||||||
|
## [7.0.0] - December 10, 2021
|
||||||
|
* Fixed Rojo's interactions with properties enabled by FFlags that are not yet enabled. ([#493])
|
||||||
|
* Improved output in Roblox Studio plugin when bad property data is encountered.
|
||||||
|
* Reintroduced support for CFrame shorthand syntax in Rojo project and `.meta.json` files, matching Rojo 6. ([#430])
|
||||||
|
* Connection settings are now remembered when reconnecting in Roblox Studio. ([#500])
|
||||||
|
* Updated reflection database to Roblox v503.
|
||||||
|
|
||||||
|
[#430]: https://github.com/rojo-rbx/rojo/issues/430
|
||||||
|
[#493]: https://github.com/rojo-rbx/rojo/pull/493
|
||||||
|
[#500]: https://github.com/rojo-rbx/rojo/pull/500
|
||||||
|
[7.0.0]: https://github.com/rojo-rbx/rojo/releases/tag/v7.0.0
|
||||||
|
|
||||||
|
## [7.0.0-rc.3] - October 19, 2021
|
||||||
|
This is the last release candidate for Rojo 7. In an effort to get Rojo 7 out the door, we'll be freezing features from here on out, something we should've done a couple months ago.
|
||||||
|
|
||||||
|
Expect to see Rojo 7 stable soon!
|
||||||
|
|
||||||
|
* Added support for writing `Tags` in project files, model files, and meta files. ([#484])
|
||||||
|
* Adjusted Studio plugin colors to match Roblox Studio palette. ([#482])
|
||||||
|
* Improved experimental two-way sync feature by batching changes. ([#478])
|
||||||
|
|
||||||
|
[#482]: https://github.com/rojo-rbx/rojo/pull/482
|
||||||
|
[#484]: https://github.com/rojo-rbx/rojo/pull/484
|
||||||
|
[#478]: https://github.com/rojo-rbx/rojo/pull/478
|
||||||
|
[7.0.0-rc.3]: https://github.com/rojo-rbx/rojo/releases/tag/v7.0.0-rc.3
|
||||||
|
|
||||||
|
## 7.0.0-rc.2 - October 19, 2021
|
||||||
|
(Botched release due to Git mishap, oops!)
|
||||||
|
|
||||||
|
## [7.0.0-rc.1] - August 23, 2021
|
||||||
|
In Rojo 6 and previous Rojo 7 alphas, an explicit Vector3 property would be written like this:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"className": "Part",
|
||||||
|
"properties": {
|
||||||
|
"Position": {
|
||||||
|
"Type": "Vector3",
|
||||||
|
"Value": [1, 2, 3]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
For Rojo 7, this will need to be changed to:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"className": "Part",
|
||||||
|
"properties": {
|
||||||
|
"Position": {
|
||||||
|
"Vector3": [1, 2, 3]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The shorthand property format that most users use is not impacted. For reference, it looks like this:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"className": "Part",
|
||||||
|
"properties": {
|
||||||
|
"Position": [1, 2, 3]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
* Major breaking change: changed property syntax for project files; shorthand syntax is unchanged.
|
||||||
|
* Added the `fmt-project` subcommand for formatting Rojo project files.
|
||||||
|
* Improved error output for many subcommands.
|
||||||
|
* Updated to stable versions of rbx-dom libraries.
|
||||||
|
* Updated async infrastructure, which should fix a handful of bugs. ([#459])
|
||||||
|
* Fixed syncing refs in the Roblox Studio plugin ([#462], [#466])
|
||||||
|
* Added support for long paths on Windows. ([#464])
|
||||||
|
|
||||||
|
[#459]: https://github.com/rojo-rbx/rojo/pull/459
|
||||||
|
[#462]: https://github.com/rojo-rbx/rojo/pull/462
|
||||||
|
[#464]: https://github.com/rojo-rbx/rojo/pull/464
|
||||||
|
[#466]: https://github.com/rojo-rbx/rojo/pull/466
|
||||||
|
[7.0.0-rc.1]: https://github.com/rojo-rbx/rojo/releases/tag/v7.0.0-rc.1
|
||||||
|
|
||||||
|
## [7.0.0-alpha.4][7.0.0-alpha.4] (May 5, 2021)
|
||||||
|
* Added the `gameId` and `placeId` optional properties to project files.
|
||||||
|
* When connecting from the Rojo Roblox Studio plugin, Rojo will set the game and place ID of the current place to these values, if set.
|
||||||
|
* This is equivalent to running `game:SetUniverseId(...)` and `game:SetPlaceId(...)` from the command bar in Studio.
|
||||||
|
* Added "EXPERIMENTAL!" label to two-way sync toggle in Rojo's Roblox Studio plugin.
|
||||||
|
* Fixed `Name` and `Parent` properties being allowed in Rojo projects. ([#413][pr-413])
|
||||||
|
* Fixed "Open Scripts Externally" feature crashing Studio. ([#369][issue-369])
|
||||||
|
* Empty `.model.json` files will no longer cause errors. ([#420][pr-420])
|
||||||
|
* When specifying `$path` on a service, Rojo now keeps the correct class name. ([#331][issue-331])
|
||||||
|
* Improved error messages for misconfigured projects.
|
||||||
|
|
||||||
|
[issue-331]: https://github.com/rojo-rbx/rojo/issues/331
|
||||||
|
[issue-369]: https://github.com/rojo-rbx/rojo/issues/369
|
||||||
|
[pr-420]: https://github.com/rojo-rbx/rojo/pull/420
|
||||||
|
[pr-413]: https://github.com/rojo-rbx/rojo/pull/413
|
||||||
|
[7.0.0-alpha.4]: https://github.com/rojo-rbx/rojo/releases/tag/v7.0.0-alpha.4
|
||||||
|
|
||||||
|
## [7.0.0-alpha.3][7.0.0-alpha.3] (February 19, 2021)
|
||||||
|
* Updated dependencies, fixing `OptionalCoordinateFrame`-related issues.
|
||||||
|
* Added `--address` flag to `rojo serve` to allow for external connections. ([#403][pr-403])
|
||||||
|
|
||||||
|
[pr-403]: https://github.com/rojo-rbx/rojo/pull/403
|
||||||
|
[7.0.0-alpha.3]: https://github.com/rojo-rbx/rojo/releases/tag/v7.0.0-alpha.3
|
||||||
|
|
||||||
|
## [7.0.0-alpha.2][7.0.0-alpha.2] (February 19, 2021)
|
||||||
|
* Fixed incorrect protocol version between the client and server.
|
||||||
|
|
||||||
|
[7.0.0-alpha.2]: https://github.com/rojo-rbx/rojo/releases/tag/v7.0.0-alpha.2
|
||||||
|
|
||||||
|
## [7.0.0-alpha.1][7.0.0-alpha.1] (February 18, 2021)
|
||||||
|
This release includes a brand new implementation of the Roblox DOM. It brings performance improvements, much better support for `rbxl` and `rbxm` files, and a better internal API.
|
||||||
|
|
||||||
|
* Added support for all remaining property types.
|
||||||
|
* Added support for the entire Roblox binary model format.
|
||||||
|
* Changed `rojo upload` to upload binary places and models instead of XML.
|
||||||
|
* This should make using `rojo upload` much more feasible for large places.
|
||||||
|
* **Breaking**: Changed format of some types of values in `project.json`, `model.json`, and `meta.json` files.
|
||||||
|
* This should impact few projects. See [this file][allValues.json] for new examples of each property type.
|
||||||
|
|
||||||
|
Formatting of types will change more before the stable release of Rojo 7. We're hoping to use this opportunity to normalize some of the case inconsistency introduced in Rojo 0.5.
|
||||||
|
|
||||||
|
[7.0.0-alpha.1]: https://github.com/rojo-rbx/rojo/releases/tag/v7.0.0-alpha.1
|
||||||
|
[allValues.json]: https://github.com/rojo-rbx/rojo/blob/f4a790eb50b74e482000bad1dcfe22533992fb20/plugin/rbx_dom_lua/src/allValues.json
|
||||||
|
|
||||||
|
## [6.0.2](https://github.com/rojo-rbx/rojo/releases/tag/v6.0.2) (February 9, 2021)
|
||||||
|
* Fixed `rojo upload` to handle CSRF challenges.
|
||||||
|
|
||||||
|
## [6.0.1](https://github.com/rojo-rbx/rojo/releases/tag/v6.0.1) (January 22, 2021)
|
||||||
|
* Fixed `rojo upload` requests being rejected by Roblox
|
||||||
|
|
||||||
|
## [6.0.0](https://github.com/rojo-rbx/rojo/releases/tag/v6.0.0) (January 16, 2021)
|
||||||
|
* Improved server error messages
|
||||||
|
* The server will now keep running in more error cases
|
||||||
|
* Fixed Rojo being unable to diff ClassName changes
|
||||||
|
|
||||||
|
## [6.0.0 Release Candidate 4](https://github.com/rojo-rbx/rojo/releases/tag/v6.0.0-rc.4) (December 14, 2020)
|
||||||
|
* Added brand new Rojo UI ([#367](https://github.com/rojo-rbx/rojo/pull/367))
|
||||||
|
* Added `projectName` to `/api/rojo` output.
|
||||||
|
|
||||||
|
## [6.0.0 Release Candidate 3](https://github.com/rojo-rbx/rojo/releases/tag/v6.0.0-rc.3) (November 19, 2020)
|
||||||
|
* Fixed the Rojo plugin attempting to write the non-scriptable properties `Instance.SourceAssetId` and `HttpServer.HttpEnabled`.
|
||||||
|
* Fixed the Rojo plugin's handling of null referents.
|
||||||
|
|
||||||
|
## [6.0.0 Release Candidate 2](https://github.com/rojo-rbx/rojo/releases/tag/v6.0.0-rc.2) (November 19, 2020)
|
||||||
|
* Fixed crash when malformed CSV files are put into a project. ([#310](https://github.com/rojo-rbx/rojo/issues/310))
|
||||||
|
* Fixed incorrect string escaping when producing Lua code from JSON files. ([#314](https://github.com/rojo-rbx/rojo/issues/314))
|
||||||
|
* Fixed performance issues introduced in Rojo 6.0.0-rc.1. ([#317](https://github.com/rojo-rbx/rojo/issues/317))
|
||||||
|
* Fixed `rojo plugin install` subcommand failing for everyone except Rojo developers. ([#320](https://github.com/rojo-rbx/rojo/issues/320))
|
||||||
|
* Updated default place template to take advantage of [#210](https://github.com/rojo-rbx/rojo/pull/210).
|
||||||
|
* Enabled glob ignore patterns by default and removed the `unstable_glob_ignore` feature.
|
||||||
|
* `globIgnorePaths` can be set on a project to a list of globs to ignore.
|
||||||
|
* The Rojo plugin now completes as much as it can from a patch without disconnecting. Warnings are shown in the console.
|
||||||
|
* Fixed 6.0.0-rc.1 regression causing instances that changed ClassName to instead... not change ClassName.
|
||||||
|
|
||||||
## [6.0.0 Release Candidate 1](https://github.com/rojo-rbx/rojo/releases/tag/v6.0.0-rc.1) (March 29, 2020)
|
## [6.0.0 Release Candidate 1](https://github.com/rojo-rbx/rojo/releases/tag/v6.0.0-rc.1) (March 29, 2020)
|
||||||
This release jumped from 0.6.0 to 6.0.0. Rojo has been in use in production for many users for quite a long times, and so 6.0 is a more accurate reflection of Rojo's version than a pre-1.0 version.
|
This release jumped from 0.6.0 to 6.0.0. Rojo has been in use in production for many users for quite a long times, and so 6.0 is a more accurate reflection of Rojo's version than a pre-1.0 version.
|
||||||
@@ -122,7 +308,7 @@ This is a general maintenance release for the Rojo 0.5.x release series.
|
|||||||
|
|
||||||
## [0.5.0 Alpha 9](https://github.com/rojo-rbx/rojo/releases/tag/v0.5.0-alpha.9) (April 4, 2019)
|
## [0.5.0 Alpha 9](https://github.com/rojo-rbx/rojo/releases/tag/v0.5.0-alpha.9) (April 4, 2019)
|
||||||
* Changed `rojo build` to use buffered I/O, which can make it up to 2x faster in some cases.
|
* Changed `rojo build` to use buffered I/O, which can make it up to 2x faster in some cases.
|
||||||
* Building [*Road Not Taken*](https://github.com/rojo-rbx/roads) to an `rbxlx` file dropped from 150ms to 70ms on my machine
|
* Building [*Road Not Taken*](https://github.com/LPGhatguy/roads) to an `rbxlx` file dropped from 150ms to 70ms on my machine
|
||||||
* Fixed `LocalizationTable` instances being made from `csv` files incorrectly interpreting empty rows and columns. ([#149](https://github.com/rojo-rbx/rojo/pull/149))
|
* Fixed `LocalizationTable` instances being made from `csv` files incorrectly interpreting empty rows and columns. ([#149](https://github.com/rojo-rbx/rojo/pull/149))
|
||||||
* Fixed CSV files with entries that parse as numbers causing Rojo to panic. ([#152](https://github.com/rojo-rbx/rojo/pull/152))
|
* Fixed CSV files with entries that parse as numbers causing Rojo to panic. ([#152](https://github.com/rojo-rbx/rojo/pull/152))
|
||||||
* Improved error messages when malformed CSV files are found in a Rojo project.
|
* Improved error messages when malformed CSV files are found in a Rojo project.
|
||||||
@@ -319,4 +505,4 @@ This is a general maintenance release for the Rojo 0.5.x release series.
|
|||||||
* More robust syncing with a new reconciler
|
* More robust syncing with a new reconciler
|
||||||
|
|
||||||
## [0.1.0](https://github.com/rojo-rbx/rojo/releases/tag/v0.1.0) (November 29, 2017)
|
## [0.1.0](https://github.com/rojo-rbx/rojo/releases/tag/v0.1.0) (November 29, 2017)
|
||||||
* Initial release, functionally very similar to [rbxfs](https://github.com/rojo-rbx/rbxfs)
|
* Initial release, functionally very similar to [rbxfs](https://github.com/LPGhatguy/rbxfs)
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# Contributing to the Rojo Project
|
# Contributing to the Rojo Project
|
||||||
Rojo is a big project and can always use more help! This guide covers all repositories underneath the [rojo-rbx organization on GitHub](https://github.com/rojo-rbx).
|
Rojo is a big project and can always use more help!
|
||||||
|
|
||||||
Some of the repositories covered are:
|
Some of the repositories covered are:
|
||||||
|
|
||||||
@@ -15,8 +15,7 @@ You'll want these tools to work on Rojo:
|
|||||||
|
|
||||||
* Latest stable Rust compiler
|
* Latest stable Rust compiler
|
||||||
* Latest stable [Rojo](https://github.com/rojo-rbx/rojo)
|
* Latest stable [Rojo](https://github.com/rojo-rbx/rojo)
|
||||||
* Latest stable [Remodel](https://github.com/rojo-rbx/remodel)
|
* [Foreman](https://github.com/Roblox/foreman)
|
||||||
* Latest stable [run-in-roblox](https://github.com/rojo-rbx/run-in-roblox)
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
Documentation impacts way more people than the individual lines of code we write.
|
Documentation impacts way more people than the individual lines of code we write.
|
||||||
@@ -30,25 +29,29 @@ Sometimes there's something that Rojo doesn't do that it probably should.
|
|||||||
|
|
||||||
Please file issues and we'll try to help figure out what the best way forward is.
|
Please file issues and we'll try to help figure out what the best way forward is.
|
||||||
|
|
||||||
|
## Local Development Gotchas
|
||||||
|
|
||||||
|
If your build fails with "Error: failed to open file `D:\code\rojo\plugin\modules\roact\src`" you need to update your Git submodules.
|
||||||
|
Run the command and try building again: `git submodule update --init --recursive`.
|
||||||
|
|
||||||
## Pushing a Rojo Release
|
## Pushing a Rojo Release
|
||||||
The Rojo release process is pretty manual right now. If you need to do it, here's how:
|
The Rojo release process is pretty manual right now. If you need to do it, here's how:
|
||||||
|
|
||||||
1. Bump server version in [`Cargo.toml`](Cargo.toml)
|
1. Bump server version in [`Cargo.toml`](Cargo.toml)
|
||||||
2. Bump plugin version in [`plugin/src/Config.lua`](plugin/src/Config.lua)
|
2. Bump plugin version in [`plugin/src/Config.lua`](plugin/src/Config.lua)
|
||||||
3. Run `cargo test` to update `Cargo.lock` and double-check tests
|
3. Run `cargo test` to update `Cargo.lock` and run tests
|
||||||
4. Update [`CHANGELOG.md`](CHANGELOG.md)
|
4. Update [`CHANGELOG.md`](CHANGELOG.md)
|
||||||
5. Commit!
|
5. Commit!
|
||||||
* `git add . && git commit -m "Release vX.Y.Z"`
|
* `git add . && git commit -m "Release vX.Y.Z"`
|
||||||
6. Tag the commit with the version from `Cargo.toml` prepended with a v, like `v0.4.13`
|
6. Tag the commit
|
||||||
|
* `git tag vX.Y.Z`
|
||||||
7. Publish the CLI
|
7. Publish the CLI
|
||||||
* `cargo publish`
|
* `cargo publish`
|
||||||
8. Build and upload the plugin
|
8. Publish the Plugin
|
||||||
* `rojo build plugin -o Rojo.rbxm`
|
* `cargo run -- upload plugin --asset_id 6415005344`
|
||||||
* Upload `Rojo.rbxm` to Roblox.com, keep it for later
|
|
||||||
9. Push commits and tags
|
9. Push commits and tags
|
||||||
* `git push && git push --tags`
|
* `git push && git push --tags`
|
||||||
10. Copy GitHub release content from previous release
|
10. Copy GitHub release content from previous release
|
||||||
* Update the leading text with a summary about the release
|
* Update the leading text with a summary about the release
|
||||||
* Paste the changelog notes (as-is!) from [`CHANGELOG.md`](CHANGELOG.md)
|
* Paste the changelog notes (as-is!) from [`CHANGELOG.md`](CHANGELOG.md)
|
||||||
* Write a small summary of each major feature
|
* Write a small summary of each major feature
|
||||||
* Attach release artifacts from GitHub Actions for each platform
|
|
||||||
2521
Cargo.lock
generated
130
Cargo.toml
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rojo"
|
name = "rojo"
|
||||||
version = "6.0.0-rc.1"
|
version = "7.1.1"
|
||||||
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
|
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
|
||||||
description = "Enables professional-grade development tools for Roblox developers"
|
description = "Enables professional-grade development tools for Roblox developers"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
@@ -9,6 +9,7 @@ documentation = "https://rojo.space/docs"
|
|||||||
repository = "https://github.com/rojo-rbx/rojo"
|
repository = "https://github.com/rojo-rbx/rojo"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
build = "build.rs"
|
||||||
|
|
||||||
exclude = [
|
exclude = [
|
||||||
"/test-projects/**",
|
"/test-projects/**",
|
||||||
@@ -23,95 +24,86 @@ panic = "abort"
|
|||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|
||||||
# Turn on support for specifying glob ignore path rules in the project format.
|
|
||||||
unstable_glob_ignore_paths = []
|
|
||||||
|
|
||||||
# Enable this feature to live-reload assets from the web UI.
|
# Enable this feature to live-reload assets from the web UI.
|
||||||
dev_live_assets = []
|
dev_live_assets = []
|
||||||
|
|
||||||
[workspace]
|
profile-with-tracy = ["profiling/profile-with-tracy", "tracy-client"]
|
||||||
members = [
|
|
||||||
"rojo-test",
|
|
||||||
"rojo-insta-ext",
|
|
||||||
"clibrojo",
|
|
||||||
"memofs",
|
|
||||||
]
|
|
||||||
|
|
||||||
default-members = [
|
[workspace]
|
||||||
".",
|
members = ["crates/*"]
|
||||||
"rojo-test",
|
|
||||||
"rojo-insta-ext",
|
|
||||||
"memofs",
|
|
||||||
]
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "librojo"
|
name = "librojo"
|
||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[[bin]]
|
|
||||||
name = "rojo"
|
|
||||||
path = "src/bin.rs"
|
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
name = "build"
|
name = "build"
|
||||||
harness = false
|
harness = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
memofs = { version = "0.1.2", path = "memofs" }
|
memofs = { version = "0.2.0", path = "crates/memofs" }
|
||||||
|
|
||||||
anyhow = "1.0.27"
|
# These dependencies can be uncommented when working on rbx-dom simultaneously
|
||||||
backtrace = "0.3"
|
# rbx_binary = { path = "../rbx-dom/rbx_binary" }
|
||||||
bincode = "1.2.1"
|
# rbx_dom_weak = { path = "../rbx-dom/rbx_dom_weak" }
|
||||||
crossbeam-channel = "0.4.0"
|
# rbx_reflection = { path = "../rbx-dom/rbx_reflection" }
|
||||||
csv = "1.1.1"
|
# rbx_reflection_database = { path = "../rbx-dom/rbx_reflection_database" }
|
||||||
env_logger = "0.7.1"
|
# rbx_xml = { path = "../rbx-dom/rbx_xml" }
|
||||||
fs-err = "2.2.0"
|
|
||||||
futures = "0.1.29"
|
rbx_binary = "0.6.4"
|
||||||
globset = "0.4.4"
|
rbx_dom_weak = "2.4.0"
|
||||||
humantime = "1.3.0"
|
rbx_reflection = "4.2.0"
|
||||||
hyper = "0.12.35"
|
rbx_reflection_database = "0.2.2"
|
||||||
jod-thread = "0.1.0"
|
rbx_xml = "0.12.3"
|
||||||
lazy_static = "1.4.0"
|
|
||||||
log = "0.4.8"
|
anyhow = "1.0.44"
|
||||||
maplit = "1.0.1"
|
backtrace = "0.3.61"
|
||||||
notify = "4.0.14"
|
bincode = "1.3.3"
|
||||||
opener = "0.4.1"
|
crossbeam-channel = "0.5.1"
|
||||||
rbx_binary = "0.5.0"
|
csv = "1.1.6"
|
||||||
rbx_dom_weak = "1.10.1"
|
env_logger = "0.9.0"
|
||||||
rbx_reflection = "3.3.408"
|
fs-err = "2.6.0"
|
||||||
rbx_xml = "0.11.3"
|
futures = "0.3.17"
|
||||||
regex = "1.3.1"
|
globset = "0.4.8"
|
||||||
reqwest = "0.9.20"
|
humantime = "2.1.0"
|
||||||
|
hyper = { version = "0.14.13", features = ["server", "tcp", "http1"] }
|
||||||
|
jod-thread = "0.1.2"
|
||||||
|
log = "0.4.14"
|
||||||
|
maplit = "1.0.2"
|
||||||
|
notify = "4.0.17"
|
||||||
|
opener = "0.5.0"
|
||||||
|
reqwest = { version = "0.11.10", features = ["blocking", "json"] }
|
||||||
ritz = "0.1.0"
|
ritz = "0.1.0"
|
||||||
rlua = "0.17.0"
|
roblox_install = "1.0.0"
|
||||||
roblox_install = "0.2.2"
|
serde = { version = "1.0.130", features = ["derive", "rc"] }
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde_json = "1.0.68"
|
||||||
serde_json = "1.0"
|
termcolor = "1.1.2"
|
||||||
structopt = "0.3.5"
|
thiserror = "1.0.30"
|
||||||
termcolor = "1.0.5"
|
tokio = { version = "1.12.0", features = ["rt", "rt-multi-thread"] }
|
||||||
thiserror = "1.0.11"
|
uuid = { version = "1.0.0", features = ["v4", "serde"] }
|
||||||
tokio = "0.1.22"
|
clap = { version = "3.1.18", features = ["derive"] }
|
||||||
uuid = { version = "0.8.1", features = ["v4", "serde"] }
|
profiling = "1.0.6"
|
||||||
|
tracy-client = { version = "0.13.2", optional = true }
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
winreg = "0.6.2"
|
winreg = "0.10.1"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
memofs = { version = "0.1.0", path = "memofs" }
|
memofs = { version = "0.2.0", path = "crates/memofs" }
|
||||||
|
|
||||||
anyhow = "1.0.27"
|
embed-resource = "1.6.4"
|
||||||
bincode = "1.2.1"
|
anyhow = "1.0.44"
|
||||||
fs-err = "2.3.0"
|
bincode = "1.3.3"
|
||||||
maplit = "1.0.1"
|
fs-err = "2.6.0"
|
||||||
|
maplit = "1.0.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rojo-insta-ext = { path = "rojo-insta-ext" }
|
rojo-insta-ext = { path = "crates/rojo-insta-ext" }
|
||||||
|
|
||||||
criterion = "0.3"
|
criterion = "0.3.5"
|
||||||
insta = { version = "0.13.1", features = ["redactions"] }
|
insta = { version = "1.8.0", features = ["redactions"] }
|
||||||
lazy_static = "1.2"
|
paste = "1.0.5"
|
||||||
paste = "0.1"
|
pretty_assertions = "1.2.1"
|
||||||
pretty_assertions = "0.6.1"
|
serde_yaml = "0.8.21"
|
||||||
serde_yaml = "0.8.9"
|
tempfile = "3.2.0"
|
||||||
tempfile = "3.0"
|
walkdir = "2.3.2"
|
||||||
walkdir = "2.1"
|
|
||||||
|
|||||||
18
README.md
@@ -1,21 +1,13 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
<a href="https://rojo.space">
|
<a href="https://rojo.space"><img src="assets/logo-512.png" alt="Rojo" height="217" /></a>
|
||||||
<img src="assets/logo-512.png" alt="Rojo" height="217" />
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div> </div>
|
<div> </div>
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<a href="https://github.com/rojo-rbx/rojo/actions">
|
<a href="https://github.com/rojo-rbx/rojo/actions"><img src="https://github.com/rojo-rbx/rojo/workflows/CI/badge.svg" alt="Actions status" /></a>
|
||||||
<img src="https://github.com/rojo-rbx/rojo/workflows/CI/badge.svg" alt="Actions status" />
|
<a href="https://crates.io/crates/rojo"><img src="https://img.shields.io/crates/v/rojo.svg?label=latest%20release" alt="Latest server version" /></a>
|
||||||
</a>
|
<a href="https://rojo.space/docs"><img src="https://img.shields.io/badge/docs-website-brightgreen.svg" alt="Rojo Documentation" /></a>
|
||||||
<a href="https://crates.io/crates/rojo">
|
|
||||||
<img src="https://img.shields.io/crates/v/rojo.svg?label=latest%20release" alt="Latest server version" />
|
|
||||||
</a>
|
|
||||||
<a href="https://rojo.space/docs">
|
|
||||||
<img src="https://img.shields.io/badge/docs-website-brightgreen.svg" alt="Rojo Documentation" />
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
@@ -48,7 +40,7 @@ Check out our [contribution guide](CONTRIBUTING.md) for detailed instructions fo
|
|||||||
|
|
||||||
Pull requests are welcome!
|
Pull requests are welcome!
|
||||||
|
|
||||||
Rojo supports Rust 1.40.0 and newer. The minimum supported version of Rust is based on the latest versions of the dependencies that Rojo has.
|
Rojo supports Rust 1.46.0 and newer. The minimum supported version of Rust is based on the latest versions of the dependencies that Rojo has.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
Rojo is available under the terms of the Mozilla Public License, Version 2.0. See [LICENSE.txt](LICENSE.txt) for details.
|
Rojo is available under the terms of the Mozilla Public License, Version 2.0. See [LICENSE.txt](LICENSE.txt) for details.
|
||||||
@@ -4,27 +4,19 @@
|
|||||||
"$className": "DataModel",
|
"$className": "DataModel",
|
||||||
|
|
||||||
"ReplicatedStorage": {
|
"ReplicatedStorage": {
|
||||||
"$className": "ReplicatedStorage",
|
|
||||||
|
|
||||||
"Common": {
|
"Common": {
|
||||||
"$path": "src/shared"
|
"$path": "src/shared"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"ServerScriptService": {
|
"ServerScriptService": {
|
||||||
"$className": "ServerScriptService",
|
|
||||||
|
|
||||||
"Server": {
|
"Server": {
|
||||||
"$path": "src/server"
|
"$path": "src/server"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"StarterPlayer": {
|
"StarterPlayer": {
|
||||||
"$className": "StarterPlayer",
|
|
||||||
|
|
||||||
"StarterPlayerScripts": {
|
"StarterPlayerScripts": {
|
||||||
"$className": "StarterPlayerScripts",
|
|
||||||
|
|
||||||
"Client": {
|
"Client": {
|
||||||
"$path": "src/client"
|
"$path": "src/client"
|
||||||
}
|
}
|
||||||
@@ -32,7 +24,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Workspace": {
|
"Workspace": {
|
||||||
"$className": "Workspace",
|
|
||||||
"$properties": {
|
"$properties": {
|
||||||
"FilteringEnabled": true
|
"FilteringEnabled": true
|
||||||
},
|
},
|
||||||
@@ -60,7 +51,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Lighting": {
|
"Lighting": {
|
||||||
"$className": "Lighting",
|
|
||||||
"$properties": {
|
"$properties": {
|
||||||
"Ambient": [
|
"Ambient": [
|
||||||
0,
|
0,
|
||||||
@@ -74,16 +64,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"SoundService": {
|
"SoundService": {
|
||||||
"$className": "SoundService",
|
|
||||||
"$properties": {
|
"$properties": {
|
||||||
"RespectFilteringEnabled": true
|
"RespectFilteringEnabled": true
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"HttpService": {
|
|
||||||
"$className": "HttpService",
|
|
||||||
"$properties": {
|
|
||||||
"HttpEnabled": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BIN
assets/icon-link-32.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
assets/icon-warn-32.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
assets/images/back.png
Normal file
|
After Width: | Height: | Size: 229 B |
5
assets/images/back.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||||
|
<path d="M20,11L20,13L8,13L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11L20,11Z" style="fill:white;fill-rule:nonzero;"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 584 B |
BIN
assets/images/checkbox-off.png
Normal file
|
After Width: | Height: | Size: 269 B |
15
assets/images/checkbox-off.svg
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
|
||||||
|
<g transform="matrix(1,0,0,1,-54,-1)">
|
||||||
|
<g id="Artboard3" transform="matrix(1.77778,0,0,1.45455,-42,-0.454545)">
|
||||||
|
<rect x="54" y="1" width="9" height="11" style="fill:none;"/>
|
||||||
|
<g transform="matrix(3.375,0,0,4.125,-3654,-2753.12)">
|
||||||
|
<path d="M1099,670L1101,668" style="fill:none;stroke:white;stroke-width:0.5px;"/>
|
||||||
|
<g transform="matrix(-1,0,0,1,2200,0)">
|
||||||
|
<path d="M1099,670L1101,668" style="fill:none;stroke:white;stroke-width:0.5px;"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
BIN
assets/images/checkbox-on.png
Normal file
|
After Width: | Height: | Size: 249 B |
12
assets/images/checkbox-on.svg
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
|
||||||
|
<g transform="matrix(1,0,0,1,-32,0)">
|
||||||
|
<g id="Artboard2" transform="matrix(0.8,0,0,0.941176,6.4,0)">
|
||||||
|
<rect x="32" y="0" width="20" height="17" style="fill:none;"/>
|
||||||
|
<g transform="matrix(5,0,0,4.25,-5470.5,-2371.5)">
|
||||||
|
<path d="M1101,560L1102,561L1104,559" style="fill:none;stroke:white;stroke-width:0.75px;"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 870 B |
BIN
assets/images/circle-128.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/images/circle-16.png
Normal file
|
After Width: | Height: | Size: 196 B |
BIN
assets/images/circle-32.png
Normal file
|
After Width: | Height: | Size: 317 B |
BIN
assets/images/circle-500.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
assets/images/circle-64.png
Normal file
|
After Width: | Height: | Size: 613 B |
BIN
assets/images/close.png
Normal file
|
After Width: | Height: | Size: 295 B |
15
assets/images/close.svg
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
|
||||||
|
<g id="Artboard1" transform="matrix(0.0666667,0,0,0.097561,-31,-18.6341)">
|
||||||
|
<rect x="465" y="191" width="360" height="246" style="fill:none;"/>
|
||||||
|
<g transform="matrix(134.328,0,0,102.5,-74228.5,-15214.7)">
|
||||||
|
<g transform="matrix(1.11667,0,0,1,-57.3333,0)">
|
||||||
|
<path d="M551,152L550,151" style="fill:none;stroke:white;stroke-width:0.3px;"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(1.11667,0,0,1,-57.3333,0)">
|
||||||
|
<path d="M550,152L551,151" style="fill:none;stroke:white;stroke-width:0.3px;"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
BIN
assets/images/header-logo.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
21
assets/images/header-logo.svg
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 60 27" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||||
|
<g id="Artboard1" transform="matrix(0.952381,0,0,0.710526,-228.571,-156.316)">
|
||||||
|
<rect x="240" y="220" width="63" height="38" style="fill:none;"/>
|
||||||
|
<g transform="matrix(0.0789166,0,0,0.105779,211.848,170.749)">
|
||||||
|
<g transform="matrix(340.635,0,0,340.635,376,753)">
|
||||||
|
<path d="M0.302,-0.836L0.306,-0.836L0.302,-0.829L0.302,-0.814C0.333,-0.82 0.349,-0.828 0.349,-0.836L0.371,-0.833C0.408,-0.835 0.441,-0.836 0.472,-0.836L0.476,-0.836C0.524,-0.836 0.58,-0.81 0.646,-0.757C0.66,-0.734 0.668,-0.714 0.672,-0.695L0.672,-0.659C0.664,-0.609 0.65,-0.571 0.632,-0.546C0.621,-0.537 0.597,-0.507 0.56,-0.456L0.556,-0.456L0.556,-0.463L0.566,-0.478L0.56,-0.478C0.474,-0.405 0.378,-0.349 0.27,-0.311C0.243,-0.304 0.216,-0.3 0.19,-0.3C0.224,-0.26 0.287,-0.207 0.378,-0.141C0.387,-0.136 0.445,-0.099 0.552,-0.028C0.641,0.027 0.747,0.087 0.871,0.153L0.871,0.157L0.856,0.157C0.832,0.148 0.82,0.141 0.82,0.138L0.813,0.142L0.806,0.142C0.803,0.142 0.802,0.141 0.802,0.138C0.793,0.14 0.786,0.149 0.78,0.164C0.795,0.168 0.802,0.173 0.802,0.178C0.796,0.183 0.792,0.186 0.788,0.186L0.77,0.182L0.77,0.186C0.77,0.19 0.773,0.193 0.78,0.193L0.78,0.204L0.777,0.204C0.772,0.204 0.717,0.172 0.614,0.109C0.541,0.072 0.451,0.015 0.346,-0.061C0.311,-0.077 0.247,-0.124 0.153,-0.202L0.143,-0.202C0.129,-0.181 0.111,-0.129 0.088,-0.046C0.083,-0.027 0.059,0.001 0.016,0.037L0.008,0.037L0.001,0.026L0.001,0.022C0.001,0.017 0.005,0.006 0.012,-0.01L0.012,-0.014L0.008,-0.014C0.008,-0.007 -0.007,0.004 -0.035,0.019L-0.039,0.019L-0.039,0.012C0.046,-0.24 0.105,-0.404 0.139,-0.481C0.197,-0.614 0.226,-0.69 0.226,-0.709C0.213,-0.709 0.184,-0.693 0.139,-0.659L0.132,-0.659L0.135,-0.666L0.135,-0.673C0.122,-0.673 0.092,-0.652 0.045,-0.608L0.041,-0.608L0.041,-0.612L0.088,-0.666L0.096,-0.677L0.096,-0.681L0.088,-0.681L0.045,-0.645C0.04,-0.645 0.038,-0.647 0.038,-0.651C0.083,-0.701 0.138,-0.744 0.204,-0.778C0.265,-0.794 0.295,-0.812 0.295,-0.833L0.302,-0.836ZM0.632,-0.735L0.632,-0.731C0.632,-0.727 0.635,-0.724 0.639,-0.724L0.639,-0.728C0.639,-0.732 0.637,-0.735 0.632,-0.735ZM0.208,-0.387L0.211,-0.387C0.255,-0.396 0.277,-0.403 0.277,-0.409C0.274,-0.414 0.273,-0.417 0.273,-0.42C0.365,-0.451 0.427,-0.482 0.458,-0.514C0.461,-0.514 0.48,-0.534 0.516,-0.576L0.52,-0.576L0.52,-0.572C0.515,-0.564 0.512,-0.558 0.512,-0.554L0.516,-0.554C0.547,-0.578 0.563,-0.604 0.563,-0.633L0.563,-0.655C0.556,-0.655 0.552,-0.658 0.552,-0.663C0.564,-0.665 0.57,-0.671 0.57,-0.681C0.57,-0.693 0.546,-0.705 0.498,-0.717C0.459,-0.727 0.417,-0.731 0.371,-0.731C0.348,-0.731 0.325,-0.689 0.302,-0.604C0.292,-0.594 0.261,-0.522 0.208,-0.387ZM0.251,-0.695L0.251,-0.691C0.255,-0.691 0.258,-0.695 0.262,-0.702L0.262,-0.706C0.259,-0.706 0.255,-0.702 0.251,-0.695ZM0.255,-0.626L0.259,-0.626C0.266,-0.629 0.27,-0.636 0.27,-0.648C0.266,-0.648 0.261,-0.641 0.255,-0.626ZM0.596,-0.612L0.596,-0.604C0.599,-0.604 0.603,-0.608 0.606,-0.615L0.606,-0.619L0.603,-0.619C0.598,-0.618 0.596,-0.616 0.596,-0.612ZM0.204,-0.369L0.204,-0.365L0.211,-0.365C0.216,-0.368 0.22,-0.369 0.222,-0.369L0.222,-0.365C0.281,-0.376 0.316,-0.388 0.328,-0.401L0.324,-0.401C0.271,-0.389 0.231,-0.378 0.204,-0.369ZM0.19,-0.333L0.193,-0.333L0.259,-0.347L0.255,-0.354C0.212,-0.349 0.19,-0.341 0.19,-0.333ZM0.334,-0.108L0.334,-0.101C0.372,-0.072 0.395,-0.057 0.403,-0.057C0.394,-0.064 0.389,-0.07 0.389,-0.075L0.334,-0.108ZM0.44,-0.028C0.442,-0.019 0.449,-0.014 0.461,-0.014L0.465,-0.014L0.465,-0.018C0.459,-0.018 0.452,-0.021 0.443,-0.028L0.44,-0.028ZM0.675,0.102C0.694,0.119 0.723,0.136 0.762,0.153L0.766,0.146C0.736,0.128 0.708,0.113 0.683,0.102L0.675,0.102ZM0.875,0.16L0.886,0.16C0.89,0.161 0.893,0.163 0.893,0.167C0.888,0.167 0.886,0.171 0.886,0.178L0.878,0.178L0.882,0.171L0.882,0.167L0.875,0.167L0.875,0.16Z" style="fill:white;fill-rule:nonzero;"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(340.635,0,0,340.635,588.398,753)">
|
||||||
|
<path d="M0.631,-0.705C0.646,-0.705 0.661,-0.696 0.673,-0.678L0.646,-0.678C0.62,-0.678 0.587,-0.67 0.546,-0.653L0.546,-0.65L0.549,-0.65C0.607,-0.654 0.649,-0.656 0.677,-0.656L0.683,-0.656L0.683,-0.65L0.67,-0.65C0.668,-0.65 0.667,-0.651 0.667,-0.653L0.503,-0.629C0.503,-0.627 0.493,-0.624 0.473,-0.62L0.473,-0.614L0.519,-0.623L0.521,-0.623L0.521,-0.617C0.386,-0.581 0.318,-0.555 0.318,-0.538C0.252,-0.483 0.204,-0.431 0.175,-0.383C0.131,-0.304 0.108,-0.243 0.108,-0.201C0.108,-0.157 0.131,-0.125 0.175,-0.104C0.183,-0.102 0.19,-0.101 0.196,-0.101C0.286,-0.136 0.353,-0.196 0.397,-0.28C0.409,-0.318 0.419,-0.363 0.427,-0.417L0.434,-0.417L0.427,-0.359C0.433,-0.359 0.439,-0.374 0.443,-0.404C0.441,-0.412 0.439,-0.42 0.439,-0.429L0.439,-0.438L0.446,-0.438C0.448,-0.407 0.449,-0.386 0.449,-0.374C0.449,-0.358 0.444,-0.331 0.434,-0.292C0.445,-0.302 0.458,-0.335 0.473,-0.392C0.48,-0.447 0.486,-0.474 0.491,-0.474C0.491,-0.472 0.492,-0.471 0.494,-0.471C0.492,-0.469 0.49,-0.457 0.488,-0.435L0.488,-0.432L0.491,-0.432C0.499,-0.454 0.504,-0.48 0.506,-0.508C0.502,-0.516 0.5,-0.522 0.5,-0.526L0.506,-0.529C0.512,-0.529 0.518,-0.513 0.525,-0.48C0.525,-0.4 0.491,-0.297 0.424,-0.17C0.372,-0.093 0.305,-0.042 0.224,-0.019C0.188,-0.006 0.154,-0 0.121,-0C0.04,-0.022 -0.001,-0.083 -0.001,-0.183C-0.001,-0.296 0.045,-0.398 0.136,-0.489C0.165,-0.522 0.227,-0.568 0.321,-0.629C0.425,-0.68 0.529,-0.705 0.631,-0.705ZM0.482,-0.656L0.482,-0.653C0.499,-0.653 0.508,-0.652 0.509,-0.65C0.526,-0.659 0.536,-0.663 0.54,-0.663L0.54,-0.668L0.482,-0.656ZM0.099,-0.417C0.144,-0.458 0.179,-0.494 0.206,-0.523C0.23,-0.538 0.242,-0.55 0.242,-0.559C0.201,-0.535 0.156,-0.493 0.108,-0.432C0.102,-0.427 0.099,-0.422 0.099,-0.417ZM0.105,-0.261C0.108,-0.261 0.118,-0.284 0.136,-0.328C0.158,-0.378 0.203,-0.439 0.272,-0.511L0.272,-0.514C0.204,-0.463 0.167,-0.422 0.16,-0.392C0.142,-0.371 0.124,-0.328 0.105,-0.261ZM0.069,-0.334L0.069,-0.332L0.072,-0.332C0.116,-0.393 0.139,-0.429 0.139,-0.438C0.11,-0.413 0.086,-0.378 0.069,-0.334ZM0.467,-0.31L0.467,-0.307L0.47,-0.307C0.492,-0.371 0.503,-0.413 0.503,-0.432C0.49,-0.409 0.478,-0.369 0.467,-0.31ZM0.087,-0.404L0.087,-0.401C0.091,-0.401 0.093,-0.403 0.093,-0.407L0.093,-0.41C0.089,-0.41 0.087,-0.408 0.087,-0.404ZM0.063,-0.368C0.032,-0.297 0.017,-0.245 0.017,-0.213C0.021,-0.148 0.028,-0.107 0.039,-0.088L0.042,-0.088L0.042,-0.094C0.035,-0.107 0.032,-0.129 0.032,-0.158C0.032,-0.191 0.035,-0.227 0.042,-0.268L0.039,-0.273C0.045,-0.3 0.054,-0.331 0.066,-0.365L0.066,-0.368L0.063,-0.368ZM0.096,-0.24L0.096,-0.237C0.1,-0.237 0.103,-0.239 0.103,-0.243L0.103,-0.246C0.098,-0.245 0.096,-0.243 0.096,-0.24ZM0.397,-0.222L0.397,-0.219L0.4,-0.219C0.408,-0.232 0.412,-0.241 0.412,-0.243C0.407,-0.242 0.402,-0.235 0.397,-0.222ZM0.066,-0.24C0.06,-0.222 0.055,-0.202 0.051,-0.179C0.055,-0.138 0.061,-0.108 0.069,-0.088L0.072,-0.088L0.072,-0.094C0.066,-0.121 0.063,-0.139 0.063,-0.146L0.066,-0.152C0.064,-0.155 0.063,-0.16 0.063,-0.164C0.063,-0.169 0.064,-0.173 0.066,-0.176C0.064,-0.18 0.063,-0.183 0.063,-0.186C0.067,-0.218 0.069,-0.235 0.069,-0.237L0.069,-0.24L0.066,-0.24ZM0.294,-0.125L0.294,-0.122C0.3,-0.122 0.322,-0.143 0.357,-0.186L0.357,-0.188L0.354,-0.188C0.314,-0.151 0.294,-0.129 0.294,-0.125ZM0.379,-0.149C0.379,-0.146 0.36,-0.126 0.321,-0.088L0.324,-0.088C0.351,-0.112 0.37,-0.132 0.382,-0.146L0.385,-0.146L0.385,-0.149L0.379,-0.149ZM0.09,-0.104L0.09,-0.101C0.094,-0.08 0.104,-0.07 0.121,-0.07L0.13,-0.07L0.13,-0.073L0.09,-0.104ZM0.151,-0.055L0.188,-0.055L0.203,-0.058L0.203,-0.061L0.157,-0.061C0.153,-0.06 0.151,-0.058 0.151,-0.055ZM0.096,-0.058L0.096,-0.055C0.104,-0.045 0.113,-0.04 0.124,-0.04L0.13,-0.04L0.13,-0.042C0.127,-0.042 0.116,-0.048 0.096,-0.058Z" style="fill:white;fill-rule:nonzero;"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(340.635,0,0,340.635,758.882,753)">
|
||||||
|
<path d="M0.208,-0.7L0.223,-0.7C0.227,-0.7 0.229,-0.697 0.229,-0.691C0.294,-0.687 0.328,-0.684 0.331,-0.682C0.333,-0.682 0.333,-0.683 0.333,-0.685C0.364,-0.683 0.387,-0.682 0.401,-0.682L0.462,-0.682C0.466,-0.682 0.468,-0.684 0.468,-0.688L0.45,-0.688L0.45,-0.694L0.49,-0.694L0.49,-0.688L0.475,-0.688L0.475,-0.682L0.557,-0.682C0.564,-0.682 0.573,-0.681 0.584,-0.679C0.603,-0.681 0.612,-0.685 0.612,-0.691L0.658,-0.691C0.678,-0.691 0.688,-0.692 0.689,-0.694C0.706,-0.692 0.72,-0.691 0.731,-0.691L0.903,-0.691L0.921,-0.688L0.928,-0.691C1.035,-0.686 1.096,-0.681 1.111,-0.676L1.13,-0.682L1.13,-0.676L1.068,-0.667L1.068,-0.664C1.075,-0.664 1.078,-0.661 1.078,-0.657C1.078,-0.654 1.075,-0.651 1.068,-0.648C1.064,-0.65 1.061,-0.651 1.059,-0.651C1.059,-0.647 1.055,-0.645 1.047,-0.645L1.047,-0.642C1.048,-0.638 1.05,-0.636 1.053,-0.636L1.059,-0.636C1.072,-0.636 1.087,-0.635 1.105,-0.633C1.113,-0.635 1.12,-0.636 1.126,-0.636C1.139,-0.625 1.145,-0.619 1.145,-0.618C1.138,-0.613 1.132,-0.611 1.126,-0.611L1.099,-0.611C1.088,-0.611 1.079,-0.608 1.071,-0.602L1.029,-0.602C1.024,-0.602 1.02,-0.603 1.017,-0.605L1.01,-0.602C0.993,-0.604 0.98,-0.605 0.971,-0.605C0.962,-0.605 0.958,-0.604 0.958,-0.602L0.928,-0.605L0.695,-0.605C0.69,-0.605 0.686,-0.604 0.683,-0.602C0.679,-0.604 0.675,-0.605 0.67,-0.605L0.563,-0.605C0.555,-0.605 0.547,-0.604 0.539,-0.602C0.531,-0.604 0.523,-0.605 0.514,-0.605L0.453,-0.605C0.429,-0.578 0.401,-0.525 0.37,-0.446C0.37,-0.439 0.334,-0.358 0.263,-0.201L0.177,-0.021C0.185,-0.001 0.189,0.011 0.189,0.013C0.186,0.013 0.177,0.001 0.162,-0.023L0.156,-0.023L0.153,-0.008C0.159,-0.001 0.162,0.006 0.162,0.013L0.162,0.017L0.15,0.007L0.128,0.007C0.128,-0.005 0.108,-0.045 0.067,-0.112C0.012,-0.235 -0.028,-0.332 -0.052,-0.403L-0.052,-0.412C-0.048,-0.412 -0.046,-0.409 -0.046,-0.403L-0.043,-0.403C-0.039,-0.403 -0.037,-0.405 -0.037,-0.409L-0.046,-0.443L-0.046,-0.446L-0.04,-0.446L0.034,-0.293L0.037,-0.293L0.037,-0.296C0.008,-0.37 -0.006,-0.41 -0.006,-0.416L-0.006,-0.421C0.009,-0.398 0.037,-0.343 0.076,-0.256C0.118,-0.177 0.142,-0.135 0.147,-0.13C0.212,-0.285 0.285,-0.442 0.364,-0.602C0.36,-0.602 0.358,-0.604 0.358,-0.608L0.352,-0.605L0.333,-0.605C0.332,-0.605 0.331,-0.606 0.331,-0.608C0.327,-0.606 0.324,-0.605 0.321,-0.605L0.315,-0.608C0.313,-0.608 0.312,-0.607 0.312,-0.605L0.291,-0.608L0.263,-0.608C0.263,-0.615 0.261,-0.618 0.257,-0.618L0.254,-0.618C0.247,-0.618 0.215,-0.621 0.159,-0.626L0.159,-0.63L0.162,-0.636L0.156,-0.636L0.156,-0.639C0.156,-0.641 0.163,-0.646 0.177,-0.654L0.184,-0.654L0.189,-0.651C0.189,-0.653 0.191,-0.659 0.193,-0.669C0.188,-0.671 0.178,-0.674 0.162,-0.676L0.162,-0.682L0.184,-0.682C0.191,-0.682 0.199,-0.688 0.208,-0.7ZM0.291,-0.697L0.352,-0.697C0.356,-0.697 0.358,-0.694 0.358,-0.691L0.291,-0.691L0.291,-0.697ZM0.41,-0.694L0.419,-0.694L0.419,-0.688L0.41,-0.688L0.41,-0.694ZM0.505,-0.694L0.533,-0.694L0.533,-0.688L0.505,-0.688L0.505,-0.694ZM0.603,-0.694L0.603,-0.691C0.603,-0.687 0.601,-0.685 0.597,-0.685L0.563,-0.685L0.563,-0.691L0.588,-0.691L0.603,-0.694ZM0.202,-0.667L0.202,-0.664L0.239,-0.664L0.239,-0.667L0.202,-0.667ZM0.269,-0.339L0.266,-0.327L0.266,-0.324L0.269,-0.324L0.272,-0.336L0.272,-0.339L0.269,-0.339ZM0.257,-0.308C0.237,-0.266 0.211,-0.205 0.177,-0.125C0.195,-0.147 0.223,-0.207 0.26,-0.305L0.26,-0.308L0.257,-0.308Z" style="fill:white;fill-rule:nonzero;"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(340.635,0,0,340.635,891.444,753)">
|
||||||
|
<path d="M0.631,-0.705C0.646,-0.705 0.661,-0.696 0.673,-0.678L0.646,-0.678C0.62,-0.678 0.587,-0.67 0.546,-0.653L0.546,-0.65L0.549,-0.65C0.607,-0.654 0.649,-0.656 0.677,-0.656L0.683,-0.656L0.683,-0.65L0.67,-0.65C0.668,-0.65 0.667,-0.651 0.667,-0.653L0.503,-0.629C0.503,-0.627 0.493,-0.624 0.473,-0.62L0.473,-0.614L0.519,-0.623L0.521,-0.623L0.521,-0.617C0.386,-0.581 0.318,-0.555 0.318,-0.538C0.252,-0.483 0.204,-0.431 0.175,-0.383C0.131,-0.304 0.108,-0.243 0.108,-0.201C0.108,-0.157 0.131,-0.125 0.175,-0.104C0.183,-0.102 0.19,-0.101 0.196,-0.101C0.286,-0.136 0.353,-0.196 0.397,-0.28C0.409,-0.318 0.419,-0.363 0.427,-0.417L0.434,-0.417L0.427,-0.359C0.433,-0.359 0.439,-0.374 0.443,-0.404C0.441,-0.412 0.439,-0.42 0.439,-0.429L0.439,-0.438L0.446,-0.438C0.448,-0.407 0.449,-0.386 0.449,-0.374C0.449,-0.358 0.444,-0.331 0.434,-0.292C0.445,-0.302 0.458,-0.335 0.473,-0.392C0.48,-0.447 0.486,-0.474 0.491,-0.474C0.491,-0.472 0.492,-0.471 0.494,-0.471C0.492,-0.469 0.49,-0.457 0.488,-0.435L0.488,-0.432L0.491,-0.432C0.499,-0.454 0.504,-0.48 0.506,-0.508C0.502,-0.516 0.5,-0.522 0.5,-0.526L0.506,-0.529C0.512,-0.529 0.518,-0.513 0.525,-0.48C0.525,-0.4 0.491,-0.297 0.424,-0.17C0.372,-0.093 0.305,-0.042 0.224,-0.019C0.188,-0.006 0.154,-0 0.121,-0C0.04,-0.022 -0.001,-0.083 -0.001,-0.183C-0.001,-0.296 0.045,-0.398 0.136,-0.489C0.165,-0.522 0.227,-0.568 0.321,-0.629C0.425,-0.68 0.529,-0.705 0.631,-0.705ZM0.482,-0.656L0.482,-0.653C0.499,-0.653 0.508,-0.652 0.509,-0.65C0.526,-0.659 0.536,-0.663 0.54,-0.663L0.54,-0.668L0.482,-0.656ZM0.099,-0.417C0.144,-0.458 0.179,-0.494 0.206,-0.523C0.23,-0.538 0.242,-0.55 0.242,-0.559C0.201,-0.535 0.156,-0.493 0.108,-0.432C0.102,-0.427 0.099,-0.422 0.099,-0.417ZM0.105,-0.261C0.108,-0.261 0.118,-0.284 0.136,-0.328C0.158,-0.378 0.203,-0.439 0.272,-0.511L0.272,-0.514C0.204,-0.463 0.167,-0.422 0.16,-0.392C0.142,-0.371 0.124,-0.328 0.105,-0.261ZM0.069,-0.334L0.069,-0.332L0.072,-0.332C0.116,-0.393 0.139,-0.429 0.139,-0.438C0.11,-0.413 0.086,-0.378 0.069,-0.334ZM0.467,-0.31L0.467,-0.307L0.47,-0.307C0.492,-0.371 0.503,-0.413 0.503,-0.432C0.49,-0.409 0.478,-0.369 0.467,-0.31ZM0.087,-0.404L0.087,-0.401C0.091,-0.401 0.093,-0.403 0.093,-0.407L0.093,-0.41C0.089,-0.41 0.087,-0.408 0.087,-0.404ZM0.063,-0.368C0.032,-0.297 0.017,-0.245 0.017,-0.213C0.021,-0.148 0.028,-0.107 0.039,-0.088L0.042,-0.088L0.042,-0.094C0.035,-0.107 0.032,-0.129 0.032,-0.158C0.032,-0.191 0.035,-0.227 0.042,-0.268L0.039,-0.273C0.045,-0.3 0.054,-0.331 0.066,-0.365L0.066,-0.368L0.063,-0.368ZM0.096,-0.24L0.096,-0.237C0.1,-0.237 0.103,-0.239 0.103,-0.243L0.103,-0.246C0.098,-0.245 0.096,-0.243 0.096,-0.24ZM0.397,-0.222L0.397,-0.219L0.4,-0.219C0.408,-0.232 0.412,-0.241 0.412,-0.243C0.407,-0.242 0.402,-0.235 0.397,-0.222ZM0.066,-0.24C0.06,-0.222 0.055,-0.202 0.051,-0.179C0.055,-0.138 0.061,-0.108 0.069,-0.088L0.072,-0.088L0.072,-0.094C0.066,-0.121 0.063,-0.139 0.063,-0.146L0.066,-0.152C0.064,-0.155 0.063,-0.16 0.063,-0.164C0.063,-0.169 0.064,-0.173 0.066,-0.176C0.064,-0.18 0.063,-0.183 0.063,-0.186C0.067,-0.218 0.069,-0.235 0.069,-0.237L0.069,-0.24L0.066,-0.24ZM0.294,-0.125L0.294,-0.122C0.3,-0.122 0.322,-0.143 0.357,-0.186L0.357,-0.188L0.354,-0.188C0.314,-0.151 0.294,-0.129 0.294,-0.125ZM0.379,-0.149C0.379,-0.146 0.36,-0.126 0.321,-0.088L0.324,-0.088C0.351,-0.112 0.37,-0.132 0.382,-0.146L0.385,-0.146L0.385,-0.149L0.379,-0.149ZM0.09,-0.104L0.09,-0.101C0.094,-0.08 0.104,-0.07 0.121,-0.07L0.13,-0.07L0.13,-0.073L0.09,-0.104ZM0.151,-0.055L0.188,-0.055L0.203,-0.058L0.203,-0.061L0.157,-0.061C0.153,-0.06 0.151,-0.058 0.151,-0.055ZM0.096,-0.058L0.096,-0.055C0.104,-0.045 0.113,-0.04 0.124,-0.04L0.13,-0.04L0.13,-0.042C0.127,-0.042 0.116,-0.048 0.096,-0.058Z" style="fill:white;fill-rule:nonzero;"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 15 KiB |
BIN
assets/images/rounded-background.png
Normal file
|
After Width: | Height: | Size: 228 B |
BIN
assets/images/rounded-border.png
Normal file
|
After Width: | Height: | Size: 315 B |
BIN
assets/images/scrollbar-bottom.png
Normal file
|
After Width: | Height: | Size: 105 B |
17
assets/images/scrollbar-bottom.svg
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 9 7" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||||
|
<g transform="matrix(1,0,0,1,0,-10)">
|
||||||
|
<g id="Bottom" transform="matrix(0.243243,0,0,0.179487,-59.1081,-30.2051)">
|
||||||
|
<rect x="243" y="224" width="37" height="39" style="fill:none;"/>
|
||||||
|
<clipPath id="_clip1">
|
||||||
|
<rect x="243" y="224" width="37" height="39"/>
|
||||||
|
</clipPath>
|
||||||
|
<g clip-path="url(#_clip1)">
|
||||||
|
<g transform="matrix(-4.11111,6.82303e-16,-3.59619e-16,-3.97959,280,259.816)">
|
||||||
|
<path d="M7,5.5C7,3.568 5.88,2 4.5,2C3.12,2 2,3.568 2,5.5L2,9L7,9L7,5.5Z" style="fill:white;"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/images/scrollbar-middle.png
Normal file
|
After Width: | Height: | Size: 75 B |
12
assets/images/scrollbar-middle.svg
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 9 1" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||||
|
<g transform="matrix(1,0,0,1,0,-8)">
|
||||||
|
<g id="Middle" transform="matrix(1,0,0,0.111111,0,7.11111)">
|
||||||
|
<rect x="0" y="8" width="9" height="9" style="fill:none;"/>
|
||||||
|
<g transform="matrix(1,0,0,9,0,-64)">
|
||||||
|
<rect x="2" y="8" width="5" height="1" style="fill:white;"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 796 B |
BIN
assets/images/scrollbar-top.png
Normal file
|
After Width: | Height: | Size: 132 B |
10
assets/images/scrollbar-top.svg
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 9 7" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||||
|
<g id="Top" transform="matrix(0.243243,0,0,0.179487,-59.1081,-40.2051)">
|
||||||
|
<rect x="243" y="224" width="37" height="39" style="fill:none;"/>
|
||||||
|
<g transform="matrix(4.11111,0,0,3.97959,243,227.184)">
|
||||||
|
<path d="M7,5.5C7,3.568 5.88,2 4.5,2C3.12,2 2,3.568 2,5.5L2,9L7,9L7,5.5Z" style="fill:white;"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 793 B |
BIN
assets/images/spinner-background.png
Normal file
|
After Width: | Height: | Size: 684 B |
8
assets/images/spinner-background.svg
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||||
|
<g id="Artboard1" transform="matrix(0.5,0,0,0.5,0,0)">
|
||||||
|
<rect x="0" y="0" width="48" height="48" style="fill:none;"/>
|
||||||
|
<path d="M24,0C37.246,0 48,10.754 48,24C48,37.246 37.246,48 24,48C10.754,48 0,37.246 0,24C0,10.754 10.754,0 24,0ZM24,8.4C32.61,8.4 39.6,15.39 39.6,24C39.6,32.61 32.61,39.6 24,39.6C15.39,39.6 8.4,32.61 8.4,24C8.4,15.39 15.39,8.4 24,8.4Z" style="fill:white;"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 855 B |
BIN
assets/images/spinner-foreground.png
Normal file
|
After Width: | Height: | Size: 340 B |
8
assets/images/spinner-foreground.svg
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||||
|
<g id="Artboard1" transform="matrix(0.5,0,0,0.5,0,0)">
|
||||||
|
<rect x="0" y="0" width="48" height="48" style="fill:none;"/>
|
||||||
|
<path d="M48,24C48,10.745 37.255,0 24,0L24,8.4C32.616,8.4 39.6,15.384 39.6,24L48,24Z" style="fill:white;"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 704 B |
@@ -35,6 +35,7 @@ fn place_setup<P: AsRef<Path>>(input_path: P) -> (TempDir, BuildCommand) {
|
|||||||
|
|
||||||
let options = BuildCommand {
|
let options = BuildCommand {
|
||||||
project: input,
|
project: input,
|
||||||
|
watch: false,
|
||||||
output,
|
output,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
watchexec -c -w plugin "sh -c './bin/install-dev-plugin.sh'"
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
DIR="$( mktemp -d )"
|
|
||||||
PLUGIN_FILE="$DIR/Rojo.rbxm"
|
|
||||||
TESTEZ_FILE="$DIR/TestEZ.rbxm"
|
|
||||||
|
|
||||||
rojo build plugin -o "$PLUGIN_FILE"
|
|
||||||
rojo build plugin/testez.project.json -o "$TESTEZ_FILE"
|
|
||||||
remodel bin/mark-plugin-as-dev.lua "$PLUGIN_FILE" "$TESTEZ_FILE" 2>/dev/null
|
|
||||||
|
|
||||||
cp "$PLUGIN_FILE" "$LOCALAPPDATA/Roblox/Plugins/Rojo.rbxm"
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
rojo build plugin -o "$LOCALAPPDATA/Roblox/Plugins/Rojo.rbxm"
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
local pluginPath, testezPath = ...
|
|
||||||
|
|
||||||
local plugin = remodel.readModelFile(pluginPath)[1]
|
|
||||||
local testez = remodel.readModelFile(testezPath)[1]
|
|
||||||
|
|
||||||
local marker = Instance.new("Folder")
|
|
||||||
marker.Name = "ROJO_DEV_BUILD"
|
|
||||||
marker.Parent = plugin
|
|
||||||
|
|
||||||
testez.Parent = plugin
|
|
||||||
|
|
||||||
remodel.writeModelFile(plugin, pluginPath)
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
local pluginPath, placePath = ...
|
|
||||||
|
|
||||||
local plugin = remodel.readModelFile(pluginPath)[1]
|
|
||||||
local place = remodel.readPlaceFile(placePath)
|
|
||||||
|
|
||||||
plugin.Parent = place:GetService("ReplicatedStorage")
|
|
||||||
|
|
||||||
remodel.writePlaceFile(place, placePath)
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
./bin/run-cli-tests.sh
|
|
||||||
./bin/run-plugin-tests.sh
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cargo test --all --locked
|
|
||||||
cargo fmt -- --check
|
|
||||||
|
|
||||||
touch src/lib.rs # Nudge Rust source to make Clippy actually check things
|
|
||||||
cargo clippy
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
DIR="$( mktemp -d )"
|
|
||||||
PLUGIN_FILE="$DIR/Rojo.rbxmx"
|
|
||||||
PLACE_FILE="$DIR/RojoTestPlace.rbxlx"
|
|
||||||
|
|
||||||
rojo build plugin -o "$PLUGIN_FILE"
|
|
||||||
rojo build plugin/place.project.json -o "$PLACE_FILE"
|
|
||||||
|
|
||||||
remodel bin/put-plugin-in-test-place.lua "$PLUGIN_FILE" "$PLACE_FILE"
|
|
||||||
|
|
||||||
run-in-roblox -s plugin/testBootstrap.server.lua "$PLACE_FILE"
|
|
||||||
|
|
||||||
luacheck plugin/src plugin/log plugin/http
|
|
||||||
7
build.rs
@@ -62,6 +62,9 @@ fn main() -> Result<(), anyhow::Error> {
|
|||||||
"t" => VfsSnapshot::dir(hashmap! {
|
"t" => VfsSnapshot::dir(hashmap! {
|
||||||
"lib" => snapshot_from_fs_path(&plugin_modules.join("t").join("lib"))?
|
"lib" => snapshot_from_fs_path(&plugin_modules.join("t").join("lib"))?
|
||||||
}),
|
}),
|
||||||
|
"flipper" => VfsSnapshot::dir(hashmap! {
|
||||||
|
"src" => snapshot_from_fs_path(&plugin_modules.join("flipper").join("src"))?
|
||||||
|
}),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -70,5 +73,9 @@ fn main() -> Result<(), anyhow::Error> {
|
|||||||
|
|
||||||
bincode::serialize_into(out_file, &snapshot)?;
|
bincode::serialize_into(out_file, &snapshot)?;
|
||||||
|
|
||||||
|
println!("cargo:rerun-if-changed=build/windows/rojo-manifest.rc");
|
||||||
|
println!("cargo:rerun-if-changed=build/windows/rojo.manifest");
|
||||||
|
embed_resource::compile("build/windows/rojo-manifest.rc");
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
2
build/windows/rojo-manifest.rc
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#define RT_MANIFEST 24
|
||||||
|
1 RT_MANIFEST "rojo.manifest"
|
||||||
8
build/windows/rojo.manifest
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
|
||||||
|
<ws2:longPathAware>true</ws2:longPathAware>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
</assembly>
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "clibrojo"
|
|
||||||
version = "0.1.0"
|
|
||||||
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
|
|
||||||
edition = "2018"
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
crate-type = ["cdylib"]
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
rojo = { path = ".." }
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# Rojo as a C Library
|
|
||||||
This is an experiment to expose a C API for Rojo that would be suitable for embedding it into an existing C/C++ application.
|
|
||||||
|
|
||||||
I'm hoping to expand it to drop the HTTP layer and communicate through a channel, which could make it feasible to embed into an existing Roblox IDE with minimal changes or additional code.
|
|
||||||
|
|
||||||
## Building
|
|
||||||
This project is currently not built by default and could break/disappear at any time.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cargo build -p clibrojo
|
|
||||||
```
|
|
||||||
|
|
||||||
On Windows, Cargo will generate a `clibrojo.dll` and associated `.lib` file. Link these into your project.
|
|
||||||
|
|
||||||
To generate the associated C header file to include in the project, use [cbindgen](https://github.com/eqrion/cbindgen):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cbindgen --crate clibrojo --output include/rojo.h
|
|
||||||
```
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
use std::{ffi::CStr, os::raw::c_char, path::PathBuf};
|
|
||||||
|
|
||||||
use librojo::commands::{serve, ServeOptions};
|
|
||||||
|
|
||||||
#[no_mangle]
|
|
||||||
pub extern "C" fn rojo_serve(path: *const c_char) {
|
|
||||||
let path = unsafe { PathBuf::from(CStr::from_ptr(path).to_str().unwrap()) };
|
|
||||||
|
|
||||||
serve(&ServeOptions {
|
|
||||||
fuzzy_project_path: path,
|
|
||||||
port: None,
|
|
||||||
})
|
|
||||||
.unwrap();
|
|
||||||
}
|
|
||||||
18
crates/memofs/CHANGELOG.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# memofs Changelog
|
||||||
|
|
||||||
|
## Unreleased Changes
|
||||||
|
|
||||||
|
## 0.2.0 (2021-08-23)
|
||||||
|
* Updated to `crossbeam-channel` 0.5.1.
|
||||||
|
|
||||||
|
## 0.1.3 (2020-11-19)
|
||||||
|
* Added `set_watch_enabled` to `Vfs` and `VfsLock` to allow turning off file watching.
|
||||||
|
|
||||||
|
## 0.1.2 (2020-03-29)
|
||||||
|
* `VfsSnapshot` now implements Serde's `Serialize` and `Deserialize` traits.
|
||||||
|
|
||||||
|
## 0.1.1 (2020-03-18)
|
||||||
|
* Improved error messages using the [fs-err](https://crates.io/crates/fs-err) crate.
|
||||||
|
|
||||||
|
## 0.1.0 (2020-03-10)
|
||||||
|
* Initial release
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "memofs"
|
name = "memofs"
|
||||||
description = "Virtual filesystem with configurable backends."
|
description = "Virtual filesystem with configurable backends."
|
||||||
version = "0.1.2"
|
version = "0.2.0"
|
||||||
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
|
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
@@ -11,7 +11,7 @@ homepage = "https://github.com/rojo-rbx/rojo/tree/master/memofs"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
crossbeam-channel = "0.4.0"
|
crossbeam-channel = "0.5.1"
|
||||||
fs-err = "2.3.0"
|
fs-err = "2.3.0"
|
||||||
notify = "4.0.15"
|
notify = "4.0.15"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
@@ -19,4 +19,4 @@ memofs is currently an unstable minimum viable library. Its primary consumer is
|
|||||||
* Configurable caching (write-through, write-around, write-back)
|
* Configurable caching (write-through, write-around, write-back)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
memofs is available under the terms of the MIT license. See [LICENSE.txt](LICENSE.txt) or <https://opensource.org/licenses/MIT> for more details.
|
memofs is available under the terms of the MIT license. See [LICENSE.txt](LICENSE.txt) or <https://opensource.org/licenses/MIT> for more details.
|
||||||
@@ -140,13 +140,18 @@ pub enum VfsEvent {
|
|||||||
/// the public interfaces to this type.
|
/// the public interfaces to this type.
|
||||||
struct VfsInner {
|
struct VfsInner {
|
||||||
backend: Box<dyn VfsBackend>,
|
backend: Box<dyn VfsBackend>,
|
||||||
|
watch_enabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl VfsInner {
|
impl VfsInner {
|
||||||
fn read<P: AsRef<Path>>(&mut self, path: P) -> io::Result<Arc<Vec<u8>>> {
|
fn read<P: AsRef<Path>>(&mut self, path: P) -> io::Result<Arc<Vec<u8>>> {
|
||||||
let path = path.as_ref();
|
let path = path.as_ref();
|
||||||
let contents = self.backend.read(path)?;
|
let contents = self.backend.read(path)?;
|
||||||
self.backend.watch(path)?;
|
|
||||||
|
if self.watch_enabled {
|
||||||
|
self.backend.watch(path)?;
|
||||||
|
}
|
||||||
|
|
||||||
Ok(Arc::new(contents))
|
Ok(Arc::new(contents))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,7 +164,11 @@ impl VfsInner {
|
|||||||
fn read_dir<P: AsRef<Path>>(&mut self, path: P) -> io::Result<ReadDir> {
|
fn read_dir<P: AsRef<Path>>(&mut self, path: P) -> io::Result<ReadDir> {
|
||||||
let path = path.as_ref();
|
let path = path.as_ref();
|
||||||
let dir = self.backend.read_dir(path)?;
|
let dir = self.backend.read_dir(path)?;
|
||||||
self.backend.watch(path)?;
|
|
||||||
|
if self.watch_enabled {
|
||||||
|
self.backend.watch(path)?;
|
||||||
|
}
|
||||||
|
|
||||||
Ok(dir)
|
Ok(dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,6 +224,7 @@ impl Vfs {
|
|||||||
pub fn new<B: VfsBackend>(backend: B) -> Self {
|
pub fn new<B: VfsBackend>(backend: B) -> Self {
|
||||||
let lock = VfsInner {
|
let lock = VfsInner {
|
||||||
backend: Box::new(backend),
|
backend: Box::new(backend),
|
||||||
|
watch_enabled: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
@@ -229,6 +239,16 @@ impl Vfs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Turns automatic file watching on or off. Enabled by default.
|
||||||
|
///
|
||||||
|
/// Turning off file watching may be useful for single-use cases, especially
|
||||||
|
/// on platforms like macOS where registering file watches has significant
|
||||||
|
/// performance cost.
|
||||||
|
pub fn set_watch_enabled(&self, enabled: bool) {
|
||||||
|
let mut inner = self.inner.lock().unwrap();
|
||||||
|
inner.watch_enabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
/// Read a file from the VFS, or the underlying backend if it isn't
|
/// Read a file from the VFS, or the underlying backend if it isn't
|
||||||
/// resident.
|
/// resident.
|
||||||
///
|
///
|
||||||
@@ -318,6 +338,15 @@ pub struct VfsLock<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl VfsLock<'_> {
|
impl VfsLock<'_> {
|
||||||
|
/// Turns automatic file watching on or off. Enabled by default.
|
||||||
|
///
|
||||||
|
/// Turning off file watching may be useful for single-use cases, especially
|
||||||
|
/// on platforms like macOS where registering file watches has significant
|
||||||
|
/// performance cost.
|
||||||
|
pub fn set_watch_enabled(&mut self, enabled: bool) {
|
||||||
|
self.inner.watch_enabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
/// Read a file from the VFS, or the underlying backend if it isn't
|
/// Read a file from the VFS, or the underlying backend if it isn't
|
||||||
/// resident.
|
/// resident.
|
||||||
///
|
///
|
||||||
4
foreman.toml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[tools]
|
||||||
|
rojo = { source = "rojo-rbx/rojo", version = "7.1.1" }
|
||||||
|
run-in-roblox = { source = "rojo-rbx/run-in-roblox", version = "0.3.0" }
|
||||||
|
selene = { source = "Kampfkarren/selene", version = "0.17.0" }
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# memofs Changelog
|
|
||||||
|
|
||||||
## Unreleased Changes
|
|
||||||
|
|
||||||
## 0.1.1 (2020-03-18)
|
|
||||||
* Improved error messages using the [fs-err](https://crates.io/crates/fs-err) crate.
|
|
||||||
|
|
||||||
## 0.1.0 (2020-03-10)
|
|
||||||
* Initial release
|
|
||||||
@@ -25,6 +25,9 @@
|
|||||||
},
|
},
|
||||||
"t": {
|
"t": {
|
||||||
"$path": "modules/t/lib"
|
"$path": "modules/t/lib"
|
||||||
|
},
|
||||||
|
"Flipper": {
|
||||||
|
"$path": "modules/flipper/src"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ Error.Kind = {
|
|||||||
},
|
},
|
||||||
ConnectFailed = {
|
ConnectFailed = {
|
||||||
message = "Couldn't connect to the Rojo server.\n" ..
|
message = "Couldn't connect to the Rojo server.\n" ..
|
||||||
"Make sure the server is running -- use 'rojo serve' to run it!",
|
"Make sure the server is running — use 'rojo serve' to run it!",
|
||||||
},
|
},
|
||||||
Timeout = {
|
Timeout = {
|
||||||
message = "HTTP request timed out.",
|
message = "HTTP request timed out.",
|
||||||
@@ -63,4 +63,4 @@ function Error.fromRobloxErrorString(message)
|
|||||||
return Error.new(Error.Kind.Unknown, message)
|
return Error.new(Error.Kind.Unknown, message)
|
||||||
end
|
end
|
||||||
|
|
||||||
return Error
|
return Error
|
||||||
|
|||||||
@@ -53,4 +53,8 @@ function Log.warn(template, ...)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Log.error(template, ...)
|
||||||
|
error(Fmt.fmt(template, ...))
|
||||||
|
end
|
||||||
|
|
||||||
return Log
|
return Log
|
||||||
1
plugin/modules/flipper
Submodule
@@ -1,44 +0,0 @@
|
|||||||
stds.roblox = {
|
|
||||||
read_globals = {
|
|
||||||
game = {
|
|
||||||
other_fields = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Roblox globals
|
|
||||||
"script",
|
|
||||||
|
|
||||||
-- Extra functions
|
|
||||||
"tick", "warn",
|
|
||||||
"wait", "typeof",
|
|
||||||
|
|
||||||
-- Types
|
|
||||||
"CFrame",
|
|
||||||
"Color3",
|
|
||||||
"Enum",
|
|
||||||
"Instance",
|
|
||||||
"NumberRange",
|
|
||||||
"Rect",
|
|
||||||
"UDim", "UDim2",
|
|
||||||
"Vector2", "Vector3",
|
|
||||||
"Vector2int16", "Vector3int16",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stds.testez = {
|
|
||||||
read_globals = {
|
|
||||||
"describe",
|
|
||||||
"it", "itFOCUS", "itSKIP",
|
|
||||||
"FOCUS", "SKIP", "HACK_NO_XPCALL",
|
|
||||||
"expect",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ignore = {
|
|
||||||
"212", -- unused arguments
|
|
||||||
}
|
|
||||||
|
|
||||||
std = "lua51+roblox"
|
|
||||||
|
|
||||||
files["**/*.spec.lua"] = {
|
|
||||||
std = "+testez",
|
|
||||||
}
|
|
||||||
462
plugin/rbx_dom_lua/EncodedValue.lua
Normal file
@@ -0,0 +1,462 @@
|
|||||||
|
local base64 = require(script.Parent.base64)
|
||||||
|
|
||||||
|
local function identity(...)
|
||||||
|
return ...
|
||||||
|
end
|
||||||
|
|
||||||
|
local function unpackDecoder(f)
|
||||||
|
return function(value)
|
||||||
|
return f(unpack(value))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function serializeFloat(value)
|
||||||
|
-- TODO: Figure out a better way to serialize infinity and NaN, neither of
|
||||||
|
-- which fit into JSON.
|
||||||
|
if value == math.huge or value == -math.huge then
|
||||||
|
return 999999999 * math.sign(value)
|
||||||
|
end
|
||||||
|
|
||||||
|
return value
|
||||||
|
end
|
||||||
|
|
||||||
|
local ALL_AXES = {"X", "Y", "Z"}
|
||||||
|
local ALL_FACES = {"Right", "Top", "Back", "Left", "Bottom", "Front"}
|
||||||
|
|
||||||
|
local types
|
||||||
|
types = {
|
||||||
|
Axes = {
|
||||||
|
fromPod = function(pod)
|
||||||
|
local axes = {}
|
||||||
|
|
||||||
|
for index, axisName in ipairs(pod) do
|
||||||
|
axes[index] = Enum.Axis[axisName]
|
||||||
|
end
|
||||||
|
|
||||||
|
return Axes.new(unpack(axes))
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
local json = {}
|
||||||
|
|
||||||
|
for _, axis in ipairs(ALL_AXES) do
|
||||||
|
if roblox[axis] then
|
||||||
|
table.insert(json, axis)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return json
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
BinaryString = {
|
||||||
|
fromPod = base64.decode,
|
||||||
|
toPod = base64.encode,
|
||||||
|
},
|
||||||
|
|
||||||
|
Bool = {
|
||||||
|
fromPod = identity,
|
||||||
|
toPod = identity,
|
||||||
|
},
|
||||||
|
|
||||||
|
BrickColor = {
|
||||||
|
fromPod = function(pod)
|
||||||
|
return BrickColor.new(pod)
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
return roblox.Number
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
CFrame = {
|
||||||
|
fromPod = function(pod)
|
||||||
|
local pos = pod.position
|
||||||
|
local orient = pod.orientation
|
||||||
|
|
||||||
|
return CFrame.new(
|
||||||
|
pos[1], pos[2], pos[3],
|
||||||
|
orient[1][1], orient[1][2], orient[1][3],
|
||||||
|
orient[2][1], orient[2][2], orient[2][3],
|
||||||
|
orient[3][1], orient[3][2], orient[3][3]
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
local x, y, z,
|
||||||
|
r00, r01, r02,
|
||||||
|
r10, r11, r12,
|
||||||
|
r20, r21, r22 = roblox:GetComponents()
|
||||||
|
|
||||||
|
return {
|
||||||
|
position = {x, y, z},
|
||||||
|
orientation = {
|
||||||
|
{r00, r01, r02},
|
||||||
|
{r10, r11, r12},
|
||||||
|
{r20, r21, r22},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Color3 = {
|
||||||
|
fromPod = unpackDecoder(Color3.new),
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
return {roblox.r, roblox.g, roblox.b}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Color3uint8 = {
|
||||||
|
fromPod = unpackDecoder(Color3.fromRGB),
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
return {
|
||||||
|
math.round(roblox.R * 255),
|
||||||
|
math.round(roblox.G * 255),
|
||||||
|
math.round(roblox.B * 255),
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
ColorSequence = {
|
||||||
|
fromPod = function(pod)
|
||||||
|
local keypoints = {}
|
||||||
|
|
||||||
|
for index, keypoint in ipairs(pod.keypoints) do
|
||||||
|
keypoints[index] = ColorSequenceKeypoint.new(
|
||||||
|
keypoint.time,
|
||||||
|
types.Color3.fromPod(keypoint.color)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
return ColorSequence.new(keypoints)
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
local keypoints = {}
|
||||||
|
|
||||||
|
for index, keypoint in ipairs(roblox.Keypoints) do
|
||||||
|
keypoints[index] = {
|
||||||
|
time = keypoint.Time,
|
||||||
|
color = types.Color3.toPod(keypoint.Value),
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
keypoints = keypoints,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Content = {
|
||||||
|
fromPod = identity,
|
||||||
|
toPod = identity,
|
||||||
|
},
|
||||||
|
|
||||||
|
Enum = {
|
||||||
|
fromPod = identity,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
-- FIXME: More robust handling of enums
|
||||||
|
if typeof(roblox) == "number" then
|
||||||
|
return roblox
|
||||||
|
else
|
||||||
|
return roblox.Value
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Faces = {
|
||||||
|
fromPod = function(pod)
|
||||||
|
local faces = {}
|
||||||
|
|
||||||
|
for index, faceName in ipairs(pod) do
|
||||||
|
faces[index] = Enum.NormalId[faceName]
|
||||||
|
end
|
||||||
|
|
||||||
|
return Faces.new(unpack(faces))
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
local pod = {}
|
||||||
|
|
||||||
|
for _, face in ipairs(ALL_FACES) do
|
||||||
|
if roblox[face] then
|
||||||
|
table.insert(pod, face)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return pod
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Float32 = {
|
||||||
|
fromPod = identity,
|
||||||
|
toPod = serializeFloat,
|
||||||
|
},
|
||||||
|
|
||||||
|
Float64 = {
|
||||||
|
fromPod = identity,
|
||||||
|
toPod = serializeFloat,
|
||||||
|
},
|
||||||
|
|
||||||
|
Int32 = {
|
||||||
|
fromPod = identity,
|
||||||
|
toPod = identity,
|
||||||
|
},
|
||||||
|
|
||||||
|
Int64 = {
|
||||||
|
fromPod = identity,
|
||||||
|
toPod = identity,
|
||||||
|
},
|
||||||
|
|
||||||
|
NumberRange = {
|
||||||
|
fromPod = unpackDecoder(NumberRange.new),
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
return {roblox.Min, roblox.Max}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
NumberSequence = {
|
||||||
|
fromPod = function(pod)
|
||||||
|
local keypoints = {}
|
||||||
|
|
||||||
|
for index, keypoint in ipairs(pod.keypoints) do
|
||||||
|
keypoints[index] = NumberSequenceKeypoint.new(
|
||||||
|
keypoint.time,
|
||||||
|
keypoint.value,
|
||||||
|
keypoint.envelope
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
return NumberSequence.new(keypoints)
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
local keypoints = {}
|
||||||
|
|
||||||
|
for index, keypoint in ipairs(roblox.Keypoints) do
|
||||||
|
keypoints[index] = {
|
||||||
|
time = keypoint.Time,
|
||||||
|
value = keypoint.Value,
|
||||||
|
envelope = keypoint.Envelope,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
keypoints = keypoints,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
PhysicalProperties = {
|
||||||
|
fromPod = function(pod)
|
||||||
|
if pod == "Default" then
|
||||||
|
return nil
|
||||||
|
else
|
||||||
|
return PhysicalProperties.new(
|
||||||
|
pod.density,
|
||||||
|
pod.friction,
|
||||||
|
pod.elasticity,
|
||||||
|
pod.frictionWeight,
|
||||||
|
pod.elasticityWeight
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
if roblox == nil then
|
||||||
|
return "Default"
|
||||||
|
else
|
||||||
|
return {
|
||||||
|
density = roblox.Density,
|
||||||
|
friction = roblox.Friction,
|
||||||
|
elasticity = roblox.Elasticity,
|
||||||
|
frictionWeight = roblox.FrictionWeight,
|
||||||
|
elasticityWeight = roblox.ElasticityWeight,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Ray = {
|
||||||
|
fromPod = function(pod)
|
||||||
|
return Ray.new(
|
||||||
|
types.Vector3.fromPod(pod.origin),
|
||||||
|
types.Vector3.fromPod(pod.direction)
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
return {
|
||||||
|
origin = types.Vector3.toPod(roblox.Origin),
|
||||||
|
direction = types.Vector3.toPod(roblox.Direction),
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Rect = {
|
||||||
|
fromPod = function(pod)
|
||||||
|
return Rect.new(
|
||||||
|
types.Vector2.fromPod(pod[1]),
|
||||||
|
types.Vector2.fromPod(pod[2])
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
return {
|
||||||
|
types.Vector2.toPod(roblox.Min),
|
||||||
|
types.Vector2.toPod(roblox.Max),
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Ref = {
|
||||||
|
fromPod = function(_pod)
|
||||||
|
error("Ref cannot be decoded on its own")
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(_roblox)
|
||||||
|
error("Ref can not be encoded on its own")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Region3 = {
|
||||||
|
fromPod = function(pod)
|
||||||
|
error("Region3 is not implemented")
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
error("Region3 is not implemented")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Region3int16 = {
|
||||||
|
fromPod = function(pod)
|
||||||
|
return Region3int16.new(
|
||||||
|
types.Vector3int16.fromPod(pod[1]),
|
||||||
|
types.Vector3int16.fromPod(pod[2])
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
return {
|
||||||
|
types.Vector3int16.toPod(roblox.Min),
|
||||||
|
types.Vector3int16.toPod(roblox.Max),
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
SharedString = {
|
||||||
|
fromPod = function(pod)
|
||||||
|
error("SharedString is not supported")
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
error("SharedString is not supported")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
String = {
|
||||||
|
fromPod = identity,
|
||||||
|
toPod = identity,
|
||||||
|
},
|
||||||
|
|
||||||
|
UDim = {
|
||||||
|
fromPod = unpackDecoder(UDim.new),
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
return {roblox.Scale, roblox.Offset}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
UDim2 = {
|
||||||
|
fromPod = function(pod)
|
||||||
|
return UDim2.new(
|
||||||
|
types.UDim.fromPod(pod[1]),
|
||||||
|
types.UDim.fromPod(pod[2])
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
return {
|
||||||
|
types.UDim.toPod(roblox.X),
|
||||||
|
types.UDim.toPod(roblox.Y),
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Tags = {
|
||||||
|
fromPod = identity,
|
||||||
|
toPod = identity,
|
||||||
|
},
|
||||||
|
|
||||||
|
Vector2 = {
|
||||||
|
fromPod = unpackDecoder(Vector2.new),
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
return {
|
||||||
|
serializeFloat(roblox.X),
|
||||||
|
serializeFloat(roblox.Y),
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Vector2int16 = {
|
||||||
|
fromPod = unpackDecoder(Vector2int16.new),
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
return {roblox.X, roblox.Y}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Vector3 = {
|
||||||
|
fromPod = unpackDecoder(Vector3.new),
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
return {
|
||||||
|
serializeFloat(roblox.X),
|
||||||
|
serializeFloat(roblox.Y),
|
||||||
|
serializeFloat(roblox.Z),
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
Vector3int16 = {
|
||||||
|
fromPod = unpackDecoder(Vector3int16.new),
|
||||||
|
|
||||||
|
toPod = function(roblox)
|
||||||
|
return {roblox.X, roblox.Y, roblox.Z}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local EncodedValue = {}
|
||||||
|
|
||||||
|
function EncodedValue.decode(encodedValue)
|
||||||
|
local ty, value = next(encodedValue)
|
||||||
|
|
||||||
|
local typeImpl = types[ty]
|
||||||
|
if typeImpl == nil then
|
||||||
|
return false, "Couldn't decode value " .. tostring(ty)
|
||||||
|
end
|
||||||
|
|
||||||
|
return true, typeImpl.fromPod(value)
|
||||||
|
end
|
||||||
|
|
||||||
|
function EncodedValue.encode(rbxValue, propertyType)
|
||||||
|
assert(propertyType ~= nil, "Property type descriptor is required")
|
||||||
|
|
||||||
|
local typeImpl = types[propertyType]
|
||||||
|
if typeImpl == nil then
|
||||||
|
return false, ("Missing encoder for property type %q"):format(propertyType)
|
||||||
|
end
|
||||||
|
|
||||||
|
return true, {
|
||||||
|
[propertyType] = typeImpl.toPod(rbxValue),
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return EncodedValue
|
||||||
72
plugin/rbx_dom_lua/EncodedValue.spec.lua
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
return function()
|
||||||
|
local HttpService = game:GetService("HttpService")
|
||||||
|
|
||||||
|
local EncodedValue = require(script.Parent.EncodedValue)
|
||||||
|
local allValues = require(script.Parent.allValues)
|
||||||
|
|
||||||
|
local function deepEq(a, b)
|
||||||
|
if typeof(a) ~= typeof(b) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local ty = typeof(a)
|
||||||
|
|
||||||
|
if ty == "table" then
|
||||||
|
local visited = {}
|
||||||
|
|
||||||
|
for key, valueA in pairs(a) do
|
||||||
|
visited[key] = true
|
||||||
|
|
||||||
|
if not deepEq(valueA, b[key]) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for key, valueB in pairs(b) do
|
||||||
|
if visited[key] then
|
||||||
|
continue
|
||||||
|
end
|
||||||
|
|
||||||
|
if not deepEq(valueB, a[key]) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return a == b
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local extraAssertions = {
|
||||||
|
CFrame = function(value)
|
||||||
|
expect(value).to.equal(CFrame.new(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12))
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
for testName, testEntry in pairs(allValues) do
|
||||||
|
it("round trip " .. testName, function()
|
||||||
|
local ok, decoded = EncodedValue.decode(testEntry.value)
|
||||||
|
assert(ok, decoded)
|
||||||
|
|
||||||
|
if extraAssertions[testName] ~= nil then
|
||||||
|
extraAssertions[testName](decoded)
|
||||||
|
end
|
||||||
|
|
||||||
|
local ok, encoded = EncodedValue.encode(decoded, testEntry.ty)
|
||||||
|
assert(ok, encoded)
|
||||||
|
|
||||||
|
if not deepEq(encoded, testEntry.value) then
|
||||||
|
local expected = HttpService:JSONEncode(testEntry.value)
|
||||||
|
local actual = HttpService:JSONEncode(encoded)
|
||||||
|
|
||||||
|
local message = string.format(
|
||||||
|
"Round-trip results did not match.\nExpected:\n%s\nActual:\n%s",
|
||||||
|
expected, actual
|
||||||
|
)
|
||||||
|
|
||||||
|
error(message)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -20,8 +20,22 @@ local function set(container, key, value)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function PropertyDescriptor.fromRaw(data, className, propertyName)
|
function PropertyDescriptor.fromRaw(data, className, propertyName)
|
||||||
|
local key, value = next(data.DataType)
|
||||||
|
|
||||||
return setmetatable({
|
return setmetatable({
|
||||||
scriptability = data.scriptability,
|
-- The meanings of the key and value in DataType differ when the type of
|
||||||
|
-- the property is Enum. When the property is of type Enum, the key is
|
||||||
|
-- the name of the type:
|
||||||
|
--
|
||||||
|
-- { Enum = "<name of enum>" }
|
||||||
|
--
|
||||||
|
-- When the property is not of type Enum, the value is the name of the
|
||||||
|
-- type:
|
||||||
|
--
|
||||||
|
-- { Value = "<data type>" }
|
||||||
|
dataType = key == "Enum" and key or value,
|
||||||
|
|
||||||
|
scriptability = data.Scriptability,
|
||||||
className = className,
|
className = className,
|
||||||
name = propertyName,
|
name = propertyName,
|
||||||
}, PropertyDescriptor)
|
}, PropertyDescriptor)
|
||||||
@@ -77,4 +91,4 @@ function PropertyDescriptor:write(instance, value)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return PropertyDescriptor
|
return PropertyDescriptor
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# rbx\_dom\_lua
|
|
||||||
Roblox Lua implementation of rbx-dom mechanisms, intended to work with rbx\_dom\_weak and friends.
|
|
||||||
326
plugin/rbx_dom_lua/allValues.json
Normal file
@@ -0,0 +1,326 @@
|
|||||||
|
{
|
||||||
|
"Axes": {
|
||||||
|
"value": {
|
||||||
|
"Axes": [
|
||||||
|
"X",
|
||||||
|
"Y",
|
||||||
|
"Z"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "Axes"
|
||||||
|
},
|
||||||
|
"BinaryString": {
|
||||||
|
"value": {
|
||||||
|
"BinaryString": "SGVsbG8h"
|
||||||
|
},
|
||||||
|
"ty": "BinaryString"
|
||||||
|
},
|
||||||
|
"Bool": {
|
||||||
|
"value": {
|
||||||
|
"Bool": true
|
||||||
|
},
|
||||||
|
"ty": "Bool"
|
||||||
|
},
|
||||||
|
"BrickColor": {
|
||||||
|
"value": {
|
||||||
|
"BrickColor": 1004
|
||||||
|
},
|
||||||
|
"ty": "BrickColor"
|
||||||
|
},
|
||||||
|
"CFrame": {
|
||||||
|
"value": {
|
||||||
|
"CFrame": {
|
||||||
|
"position": [
|
||||||
|
1.0,
|
||||||
|
2.0,
|
||||||
|
3.0
|
||||||
|
],
|
||||||
|
"orientation": [
|
||||||
|
[
|
||||||
|
4.0,
|
||||||
|
5.0,
|
||||||
|
6.0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.0,
|
||||||
|
8.0,
|
||||||
|
9.0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
10.0,
|
||||||
|
11.0,
|
||||||
|
12.0
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ty": "CFrame"
|
||||||
|
},
|
||||||
|
"Color3": {
|
||||||
|
"value": {
|
||||||
|
"Color3": [
|
||||||
|
1.0,
|
||||||
|
2.0,
|
||||||
|
3.0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "Color3"
|
||||||
|
},
|
||||||
|
"Color3uint8": {
|
||||||
|
"value": {
|
||||||
|
"Color3uint8": [
|
||||||
|
0,
|
||||||
|
128,
|
||||||
|
255
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "Color3uint8"
|
||||||
|
},
|
||||||
|
"ColorSequence": {
|
||||||
|
"value": {
|
||||||
|
"ColorSequence": {
|
||||||
|
"keypoints": [
|
||||||
|
{
|
||||||
|
"time": 0.0,
|
||||||
|
"color": [
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
0.5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"time": 1.0,
|
||||||
|
"color": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ty": "ColorSequence"
|
||||||
|
},
|
||||||
|
"Content": {
|
||||||
|
"value": {
|
||||||
|
"Content": "rbxassetid://12345"
|
||||||
|
},
|
||||||
|
"ty": "Content"
|
||||||
|
},
|
||||||
|
"Enum": {
|
||||||
|
"value": {
|
||||||
|
"Enum": 1234
|
||||||
|
},
|
||||||
|
"ty": "Enum"
|
||||||
|
},
|
||||||
|
"Faces": {
|
||||||
|
"value": {
|
||||||
|
"Faces": [
|
||||||
|
"Right",
|
||||||
|
"Top",
|
||||||
|
"Back",
|
||||||
|
"Left",
|
||||||
|
"Bottom",
|
||||||
|
"Front"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "Faces"
|
||||||
|
},
|
||||||
|
"Float32": {
|
||||||
|
"value": {
|
||||||
|
"Float32": 15.0
|
||||||
|
},
|
||||||
|
"ty": "Float32"
|
||||||
|
},
|
||||||
|
"Float64": {
|
||||||
|
"value": {
|
||||||
|
"Float64": 15123.0
|
||||||
|
},
|
||||||
|
"ty": "Float64"
|
||||||
|
},
|
||||||
|
"Int32": {
|
||||||
|
"value": {
|
||||||
|
"Int32": 6014
|
||||||
|
},
|
||||||
|
"ty": "Int32"
|
||||||
|
},
|
||||||
|
"Int64": {
|
||||||
|
"value": {
|
||||||
|
"Int64": 23491023
|
||||||
|
},
|
||||||
|
"ty": "Int64"
|
||||||
|
},
|
||||||
|
"NumberRange": {
|
||||||
|
"value": {
|
||||||
|
"NumberRange": [
|
||||||
|
-36.0,
|
||||||
|
94.0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "NumberRange"
|
||||||
|
},
|
||||||
|
"NumberSequence": {
|
||||||
|
"value": {
|
||||||
|
"NumberSequence": {
|
||||||
|
"keypoints": [
|
||||||
|
{
|
||||||
|
"time": 0.0,
|
||||||
|
"value": 5.0,
|
||||||
|
"envelope": 2.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"time": 1.0,
|
||||||
|
"value": 22.0,
|
||||||
|
"envelope": 0.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ty": "NumberSequence"
|
||||||
|
},
|
||||||
|
"PhysicalProperties-Custom": {
|
||||||
|
"value": {
|
||||||
|
"PhysicalProperties": {
|
||||||
|
"density": 0.5,
|
||||||
|
"friction": 1.0,
|
||||||
|
"elasticity": 0.0,
|
||||||
|
"frictionWeight": 50.0,
|
||||||
|
"elasticityWeight": 25.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ty": "PhysicalProperties"
|
||||||
|
},
|
||||||
|
"PhysicalProperties-Default": {
|
||||||
|
"value": {
|
||||||
|
"PhysicalProperties": "Default"
|
||||||
|
},
|
||||||
|
"ty": "PhysicalProperties"
|
||||||
|
},
|
||||||
|
"Ray": {
|
||||||
|
"value": {
|
||||||
|
"Ray": {
|
||||||
|
"origin": [
|
||||||
|
1.0,
|
||||||
|
2.0,
|
||||||
|
3.0
|
||||||
|
],
|
||||||
|
"direction": [
|
||||||
|
4.0,
|
||||||
|
5.0,
|
||||||
|
6.0
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ty": "Ray"
|
||||||
|
},
|
||||||
|
"Rect": {
|
||||||
|
"value": {
|
||||||
|
"Rect": [
|
||||||
|
[
|
||||||
|
0.0,
|
||||||
|
5.0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
10.0,
|
||||||
|
15.0
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "Rect"
|
||||||
|
},
|
||||||
|
"Region3int16": {
|
||||||
|
"value": {
|
||||||
|
"Region3int16": [
|
||||||
|
[
|
||||||
|
-10,
|
||||||
|
-5,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
5,
|
||||||
|
10,
|
||||||
|
15
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "Region3int16"
|
||||||
|
},
|
||||||
|
"String": {
|
||||||
|
"value": {
|
||||||
|
"String": "Hello, world!"
|
||||||
|
},
|
||||||
|
"ty": "String"
|
||||||
|
},
|
||||||
|
"Tags": {
|
||||||
|
"value": {
|
||||||
|
"Tags": [
|
||||||
|
"foo",
|
||||||
|
"con'fusion?!",
|
||||||
|
"bar"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "Tags"
|
||||||
|
},
|
||||||
|
"UDim": {
|
||||||
|
"value": {
|
||||||
|
"UDim": [
|
||||||
|
1.0,
|
||||||
|
32
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "UDim"
|
||||||
|
},
|
||||||
|
"UDim2": {
|
||||||
|
"value": {
|
||||||
|
"UDim2": [
|
||||||
|
[
|
||||||
|
-1.0,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1.0,
|
||||||
|
-100
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "UDim2"
|
||||||
|
},
|
||||||
|
"Vector2": {
|
||||||
|
"value": {
|
||||||
|
"Vector2": [
|
||||||
|
-50.0,
|
||||||
|
50.0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "Vector2"
|
||||||
|
},
|
||||||
|
"Vector2int16": {
|
||||||
|
"value": {
|
||||||
|
"Vector2int16": [
|
||||||
|
-300,
|
||||||
|
300
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "Vector2int16"
|
||||||
|
},
|
||||||
|
"Vector3": {
|
||||||
|
"value": {
|
||||||
|
"Vector3": [
|
||||||
|
-300.0,
|
||||||
|
0.0,
|
||||||
|
1500.0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "Vector3"
|
||||||
|
},
|
||||||
|
"Vector3int16": {
|
||||||
|
"value": {
|
||||||
|
"Vector3int16": [
|
||||||
|
60,
|
||||||
|
37,
|
||||||
|
-450
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ty": "Vector3int16"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,12 +6,10 @@ local CollectionService = game:GetService("CollectionService")
|
|||||||
return {
|
return {
|
||||||
Instance = {
|
Instance = {
|
||||||
Tags = {
|
Tags = {
|
||||||
read = function(instance, key)
|
read = function(instance)
|
||||||
local tagList = CollectionService:GetTags(instance)
|
return true, CollectionService:GetTags(instance)
|
||||||
|
|
||||||
return true, table.concat(tagList, "\0")
|
|
||||||
end,
|
end,
|
||||||
write = function(instance, key, value)
|
write = function(instance, _, value)
|
||||||
local existingTags = CollectionService:GetTags(instance)
|
local existingTags = CollectionService:GetTags(instance)
|
||||||
|
|
||||||
local unseenTags = {}
|
local unseenTags = {}
|
||||||
@@ -19,8 +17,7 @@ return {
|
|||||||
unseenTags[tag] = true
|
unseenTags[tag] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
local tagList = string.split(value, "\0")
|
for _, tag in ipairs(value) do
|
||||||
for _, tag in ipairs(tagList) do
|
|
||||||
unseenTags[tag] = nil
|
unseenTags[tag] = nil
|
||||||
CollectionService:AddTag(instance, tag)
|
CollectionService:AddTag(instance, tag)
|
||||||
end
|
end
|
||||||
@@ -44,4 +41,4 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
48791
plugin/rbx_dom_lua/database.json
Normal file
@@ -1,4 +1,4 @@
|
|||||||
local ReflectionDatabase = require(script.ReflectionDatabase)
|
local database = require(script.database)
|
||||||
local Error = require(script.Error)
|
local Error = require(script.Error)
|
||||||
local PropertyDescriptor = require(script.PropertyDescriptor)
|
local PropertyDescriptor = require(script.PropertyDescriptor)
|
||||||
|
|
||||||
@@ -6,29 +6,31 @@ local function findCanonicalPropertyDescriptor(className, propertyName)
|
|||||||
local currentClassName = className
|
local currentClassName = className
|
||||||
|
|
||||||
repeat
|
repeat
|
||||||
local currentClass = ReflectionDatabase.classes[currentClassName]
|
local currentClass = database.Classes[currentClassName]
|
||||||
|
|
||||||
if currentClass == nil then
|
if currentClass == nil then
|
||||||
return currentClass
|
return currentClass
|
||||||
end
|
end
|
||||||
|
|
||||||
local propertyData = currentClass.properties[propertyName]
|
local propertyData = currentClass.Properties[propertyName]
|
||||||
if propertyData ~= nil then
|
if propertyData ~= nil then
|
||||||
if propertyData.isCanonical then
|
local canonicalData = propertyData.Kind.Canonical
|
||||||
|
if canonicalData ~= nil then
|
||||||
return PropertyDescriptor.fromRaw(propertyData, currentClassName, propertyName)
|
return PropertyDescriptor.fromRaw(propertyData, currentClassName, propertyName)
|
||||||
end
|
end
|
||||||
|
|
||||||
if propertyData.canonicalName ~= nil then
|
local aliasData = propertyData.Kind.Alias
|
||||||
|
if aliasData ~= nil then
|
||||||
return PropertyDescriptor.fromRaw(
|
return PropertyDescriptor.fromRaw(
|
||||||
currentClass.properties[propertyData.canonicalName],
|
currentClass.Properties[aliasData.AliasFor],
|
||||||
currentClassName,
|
currentClassName,
|
||||||
propertyData.canonicalName)
|
aliasData.AliasFor)
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
currentClassName = currentClass.superclass
|
currentClassName = currentClass.Superclass
|
||||||
until currentClassName == nil
|
until currentClassName == nil
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@@ -64,4 +66,4 @@ return {
|
|||||||
findCanonicalPropertyDescriptor = findCanonicalPropertyDescriptor,
|
findCanonicalPropertyDescriptor = findCanonicalPropertyDescriptor,
|
||||||
Error = Error,
|
Error = Error,
|
||||||
EncodedValue = require(script.EncodedValue),
|
EncodedValue = require(script.EncodedValue),
|
||||||
}
|
}
|
||||||
@@ -1,242 +0,0 @@
|
|||||||
local base64 = require(script.Parent.base64)
|
|
||||||
|
|
||||||
local function identity(...)
|
|
||||||
return ...
|
|
||||||
end
|
|
||||||
|
|
||||||
local function unpackDecoder(f)
|
|
||||||
return function(value)
|
|
||||||
return f(unpack(value))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function serializeFloat(value)
|
|
||||||
-- TODO: Figure out a better way to serialize infinity and NaN, neither of
|
|
||||||
-- which fit into JSON.
|
|
||||||
if value == math.huge or value == -math.huge then
|
|
||||||
return 999999999 * math.sign(value)
|
|
||||||
end
|
|
||||||
|
|
||||||
return value
|
|
||||||
end
|
|
||||||
|
|
||||||
local encoders
|
|
||||||
encoders = {
|
|
||||||
Bool = identity,
|
|
||||||
Content = identity,
|
|
||||||
Float32 = serializeFloat,
|
|
||||||
Float64 = serializeFloat,
|
|
||||||
Int32 = identity,
|
|
||||||
Int64 = identity,
|
|
||||||
String = identity,
|
|
||||||
|
|
||||||
BinaryString = base64.encode,
|
|
||||||
SharedString = base64.encode,
|
|
||||||
|
|
||||||
BrickColor = function(value)
|
|
||||||
return value.Number
|
|
||||||
end,
|
|
||||||
|
|
||||||
CFrame = function(value)
|
|
||||||
return {value:GetComponents()}
|
|
||||||
end,
|
|
||||||
Color3 = function(value)
|
|
||||||
return {value.r, value.g, value.b}
|
|
||||||
end,
|
|
||||||
NumberRange = function(value)
|
|
||||||
return {value.Min, value.Max}
|
|
||||||
end,
|
|
||||||
NumberSequence = function(value)
|
|
||||||
local keypoints = {}
|
|
||||||
|
|
||||||
for index, keypoint in ipairs(value.Keypoints) do
|
|
||||||
keypoints[index] = {
|
|
||||||
Time = keypoint.Time,
|
|
||||||
Value = keypoint.Value,
|
|
||||||
Envelope = keypoint.Envelope,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
Keypoints = keypoints,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
ColorSequence = function(value)
|
|
||||||
local keypoints = {}
|
|
||||||
|
|
||||||
for index, keypoint in ipairs(value.Keypoints) do
|
|
||||||
keypoints[index] = {
|
|
||||||
Time = keypoint.Time,
|
|
||||||
Color = encoders.Color3(keypoint.Value),
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
Keypoints = keypoints,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
Rect = function(value)
|
|
||||||
return {
|
|
||||||
Min = {value.Min.X, value.Min.Y},
|
|
||||||
Max = {value.Max.X, value.Max.Y},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
UDim = function(value)
|
|
||||||
return {value.Scale, value.Offset}
|
|
||||||
end,
|
|
||||||
UDim2 = function(value)
|
|
||||||
return {value.X.Scale, value.X.Offset, value.Y.Scale, value.Y.Offset}
|
|
||||||
end,
|
|
||||||
Vector2 = function(value)
|
|
||||||
return {
|
|
||||||
serializeFloat(value.X),
|
|
||||||
serializeFloat(value.Y),
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
Vector2int16 = function(value)
|
|
||||||
return {value.X, value.Y}
|
|
||||||
end,
|
|
||||||
Vector3 = function(value)
|
|
||||||
return {
|
|
||||||
serializeFloat(value.X),
|
|
||||||
serializeFloat(value.Y),
|
|
||||||
serializeFloat(value.Z),
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
Vector3int16 = function(value)
|
|
||||||
return {value.X, value.Y, value.Z}
|
|
||||||
end,
|
|
||||||
|
|
||||||
PhysicalProperties = function(value)
|
|
||||||
if value == nil then
|
|
||||||
return nil
|
|
||||||
else
|
|
||||||
return {
|
|
||||||
Density = value.Density,
|
|
||||||
Friction = value.Friction,
|
|
||||||
Elasticity = value.Elasticity,
|
|
||||||
FrictionWeight = value.FrictionWeight,
|
|
||||||
ElasticityWeight = value.ElasticityWeight,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
|
|
||||||
Ref = function(value)
|
|
||||||
return nil
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
local decoders = {
|
|
||||||
Bool = identity,
|
|
||||||
Content = identity,
|
|
||||||
Enum = identity,
|
|
||||||
Float32 = identity,
|
|
||||||
Float64 = identity,
|
|
||||||
Int32 = identity,
|
|
||||||
Int64 = identity,
|
|
||||||
String = identity,
|
|
||||||
|
|
||||||
BinaryString = base64.decode,
|
|
||||||
SharedString = base64.decode,
|
|
||||||
|
|
||||||
BrickColor = BrickColor.new,
|
|
||||||
|
|
||||||
CFrame = unpackDecoder(CFrame.new),
|
|
||||||
Color3 = unpackDecoder(Color3.new),
|
|
||||||
Color3uint8 = unpackDecoder(Color3.fromRGB),
|
|
||||||
NumberRange = unpackDecoder(NumberRange.new),
|
|
||||||
UDim = unpackDecoder(UDim.new),
|
|
||||||
UDim2 = unpackDecoder(UDim2.new),
|
|
||||||
Vector2 = unpackDecoder(Vector2.new),
|
|
||||||
Vector2int16 = unpackDecoder(Vector2int16.new),
|
|
||||||
Vector3 = unpackDecoder(Vector3.new),
|
|
||||||
Vector3int16 = unpackDecoder(Vector3int16.new),
|
|
||||||
|
|
||||||
Rect = function(value)
|
|
||||||
return Rect.new(value.Min[1], value.Min[2], value.Max[1], value.Max[2])
|
|
||||||
end,
|
|
||||||
|
|
||||||
NumberSequence = function(value)
|
|
||||||
local keypoints = {}
|
|
||||||
|
|
||||||
for index, keypoint in ipairs(value.Keypoints) do
|
|
||||||
keypoints[index] = NumberSequenceKeypoint.new(
|
|
||||||
keypoint.Time,
|
|
||||||
keypoint.Value,
|
|
||||||
keypoint.Envelope
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
return NumberSequence.new(keypoints)
|
|
||||||
end,
|
|
||||||
|
|
||||||
ColorSequence = function(value)
|
|
||||||
local keypoints = {}
|
|
||||||
|
|
||||||
for index, keypoint in ipairs(value.Keypoints) do
|
|
||||||
keypoints[index] = ColorSequenceKeypoint.new(
|
|
||||||
keypoint.Time,
|
|
||||||
Color3.new(unpack(keypoint.Color))
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
return ColorSequence.new(keypoints)
|
|
||||||
end,
|
|
||||||
|
|
||||||
PhysicalProperties = function(properties)
|
|
||||||
if properties == nil then
|
|
||||||
return nil
|
|
||||||
else
|
|
||||||
return PhysicalProperties.new(
|
|
||||||
properties.Density,
|
|
||||||
properties.Friction,
|
|
||||||
properties.Elasticity,
|
|
||||||
properties.FrictionWeight,
|
|
||||||
properties.ElasticityWeight
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
|
|
||||||
Ref = function()
|
|
||||||
return nil
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
local EncodedValue = {}
|
|
||||||
|
|
||||||
function EncodedValue.decode(encodedValue)
|
|
||||||
local decoder = decoders[encodedValue.Type]
|
|
||||||
if decoder ~= nil then
|
|
||||||
return true, decoder(encodedValue.Value)
|
|
||||||
end
|
|
||||||
|
|
||||||
return false, "Couldn't decode value " .. tostring(encodedValue.Type)
|
|
||||||
end
|
|
||||||
|
|
||||||
function EncodedValue.encode(rbxValue, propertyType)
|
|
||||||
assert(propertyType ~= nil, "Property type descriptor is required")
|
|
||||||
|
|
||||||
if propertyType.type == "Data" then
|
|
||||||
local encoder = encoders[propertyType.name]
|
|
||||||
|
|
||||||
if encoder == nil then
|
|
||||||
return false, ("Missing encoder for property type %q"):format(propertyType.name)
|
|
||||||
end
|
|
||||||
|
|
||||||
if encoder ~= nil then
|
|
||||||
return true, {
|
|
||||||
Type = propertyType.name,
|
|
||||||
Value = encoder(rbxValue),
|
|
||||||
}
|
|
||||||
end
|
|
||||||
elseif propertyType.type == "Enum" then
|
|
||||||
return true, {
|
|
||||||
Type = "Enum",
|
|
||||||
Value = rbxValue.Value,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
return false, ("Unknown property descriptor type %q"):format(tostring(propertyType.type))
|
|
||||||
end
|
|
||||||
|
|
||||||
return EncodedValue
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
return function()
|
|
||||||
local RbxDom = require(script.Parent)
|
|
||||||
local EncodedValue = require(script.Parent.EncodedValue)
|
|
||||||
|
|
||||||
it("should decode Rect values", function()
|
|
||||||
local input = {
|
|
||||||
Type = "Rect",
|
|
||||||
Value = {
|
|
||||||
Min = {1, 2},
|
|
||||||
Max = {3, 4},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local output = Rect.new(1, 2, 3, 4)
|
|
||||||
|
|
||||||
local ok, decoded = EncodedValue.decode(input)
|
|
||||||
|
|
||||||
assert(ok, decoded)
|
|
||||||
expect(decoded).to.equal(output)
|
|
||||||
end)
|
|
||||||
|
|
||||||
it("should decode ColorSequence values", function()
|
|
||||||
local input = {
|
|
||||||
Type = "ColorSequence",
|
|
||||||
Value = {
|
|
||||||
Keypoints = {
|
|
||||||
{
|
|
||||||
Time = 0,
|
|
||||||
Color = { 0.12, 0.34, 0.56 },
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
Time = 1,
|
|
||||||
Color = { 0.13, 0.33, 0.37 },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local output = ColorSequence.new({
|
|
||||||
ColorSequenceKeypoint.new(0, Color3.new(0.12, 0.34, 0.56)),
|
|
||||||
ColorSequenceKeypoint.new(1, Color3.new(0.13, 0.33, 0.37)),
|
|
||||||
})
|
|
||||||
|
|
||||||
local ok, decoded = EncodedValue.decode(input)
|
|
||||||
assert(ok, decoded)
|
|
||||||
expect(decoded).to.equal(output)
|
|
||||||
end)
|
|
||||||
|
|
||||||
it("should decode NumberSequence values", function()
|
|
||||||
local input = {
|
|
||||||
Type = "NumberSequence",
|
|
||||||
Value = {
|
|
||||||
Keypoints = {
|
|
||||||
{
|
|
||||||
Time = 0,
|
|
||||||
Value = 0.5,
|
|
||||||
Envelope = 0,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
Time = 1,
|
|
||||||
Value = 0.5,
|
|
||||||
Envelope = 0,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local output = NumberSequence.new({
|
|
||||||
NumberSequenceKeypoint.new(0, 0.5, 0),
|
|
||||||
NumberSequenceKeypoint.new(1, 0.5, 0),
|
|
||||||
})
|
|
||||||
|
|
||||||
local ok, decoded = EncodedValue.decode(input)
|
|
||||||
assert(ok, decoded)
|
|
||||||
expect(decoded).to.equal(output)
|
|
||||||
end)
|
|
||||||
|
|
||||||
it("should decode PhysicalProperties values", function()
|
|
||||||
local input = {
|
|
||||||
Type = "PhysicalProperties",
|
|
||||||
Value = {
|
|
||||||
Density = 0.1,
|
|
||||||
Friction = 0.2,
|
|
||||||
Elasticity = 0.3,
|
|
||||||
FrictionWeight = 0.4,
|
|
||||||
ElasticityWeight = 0.5,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local output = PhysicalProperties.new(
|
|
||||||
0.1,
|
|
||||||
0.2,
|
|
||||||
0.3,
|
|
||||||
0.4,
|
|
||||||
0.5
|
|
||||||
)
|
|
||||||
|
|
||||||
local ok, decoded = EncodedValue.decode(input)
|
|
||||||
assert(ok, decoded)
|
|
||||||
expect(decoded).to.equal(output)
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- This part of rbx_dom_lua needs some work still.
|
|
||||||
itSKIP("should encode Rect values", function()
|
|
||||||
local input = Rect.new(10, 20, 30, 40)
|
|
||||||
|
|
||||||
local output = {
|
|
||||||
Type = "Rect",
|
|
||||||
Value = {
|
|
||||||
Min = {10, 20},
|
|
||||||
Max = {30, 40},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local descriptor = RbxDom.findCanonicalPropertyDescriptor("ImageLabel", "SliceCenter")
|
|
||||||
local ok, encoded = EncodedValue.encode(input, descriptor)
|
|
||||||
|
|
||||||
assert(ok, encoded)
|
|
||||||
expect(encoded.Type).to.equal(output.Type)
|
|
||||||
expect(encoded.Value.Min[1]).to.equal(output.Value.Min[1])
|
|
||||||
expect(encoded.Value.Min[2]).to.equal(output.Value.Min[2])
|
|
||||||
expect(encoded.Value.Max[1]).to.equal(output.Value.Max[1])
|
|
||||||
expect(encoded.Value.Max[2]).to.equal(output.Value.Max[2])
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
return {
|
|
||||||
classes = require(script.classes)
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "rbx_dom_lua test place",
|
|
||||||
"tree": {
|
|
||||||
"$className": "DataModel",
|
|
||||||
"ReplicatedStorage": {
|
|
||||||
"$className": "ReplicatedStorage",
|
|
||||||
|
|
||||||
"RbxDom": {
|
|
||||||
"$path": "src"
|
|
||||||
},
|
|
||||||
"TestEZ": {
|
|
||||||
"$path": "modules/testez/lib"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ServerScriptService": {
|
|
||||||
"$className": "ServerScriptService",
|
|
||||||
|
|
||||||
"Run Tests": {
|
|
||||||
"$path": "test.server.lua"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Players": {
|
|
||||||
"$className": "Players",
|
|
||||||
"$properties": {
|
|
||||||
"CharacterAutoLoads": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"HttpService": {
|
|
||||||
"$className": "HttpService",
|
|
||||||
"$properties": {
|
|
||||||
"HttpEnabled": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
local ReplicatedStorage = game:GetService("ReplicatedStorage")
|
|
||||||
|
|
||||||
local LIB_ROOT = ReplicatedStorage.RbxDom
|
|
||||||
|
|
||||||
local TestEZ = require(ReplicatedStorage.TestEZ)
|
|
||||||
|
|
||||||
TestEZ.TestBootstrap:run({LIB_ROOT})
|
|
||||||
41
plugin/src/App/Components/BorderedContainer.lua
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
local Rojo = script:FindFirstAncestor("Rojo")
|
||||||
|
local Plugin = Rojo.Plugin
|
||||||
|
|
||||||
|
local Roact = require(Rojo.Roact)
|
||||||
|
|
||||||
|
local Theme = require(Plugin.App.Theme)
|
||||||
|
local Assets = require(Plugin.Assets)
|
||||||
|
|
||||||
|
local SlicedImage = require(script.Parent.SlicedImage)
|
||||||
|
|
||||||
|
local e = Roact.createElement
|
||||||
|
|
||||||
|
local function BorderedContainer(props)
|
||||||
|
return Theme.with(function(theme)
|
||||||
|
return e(SlicedImage, {
|
||||||
|
slice = Assets.Slices.RoundedBackground,
|
||||||
|
color = theme.BorderedContainer.BackgroundColor,
|
||||||
|
transparency = props.transparency,
|
||||||
|
|
||||||
|
size = props.size,
|
||||||
|
position = props.position,
|
||||||
|
anchorPoint = props.anchorPoint,
|
||||||
|
layoutOrder = props.layoutOrder,
|
||||||
|
}, {
|
||||||
|
Content = e("Frame", {
|
||||||
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
}, props[Roact.Children]),
|
||||||
|
|
||||||
|
Border = e(SlicedImage, {
|
||||||
|
slice = Assets.Slices.RoundedBorder,
|
||||||
|
color = theme.BorderedContainer.BorderColor,
|
||||||
|
transparency = props.transparency,
|
||||||
|
|
||||||
|
size = UDim2.new(1, 0, 1, 0),
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
return BorderedContainer
|
||||||
96
plugin/src/App/Components/Checkbox.lua
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
local Rojo = script:FindFirstAncestor("Rojo")
|
||||||
|
local Plugin = Rojo.Plugin
|
||||||
|
|
||||||
|
local Roact = require(Rojo.Roact)
|
||||||
|
local Flipper = require(Rojo.Flipper)
|
||||||
|
|
||||||
|
local Assets = require(Plugin.Assets)
|
||||||
|
local Theme = require(Plugin.App.Theme)
|
||||||
|
local bindingUtil = require(Plugin.App.bindingUtil)
|
||||||
|
|
||||||
|
local SlicedImage = require(script.Parent.SlicedImage)
|
||||||
|
|
||||||
|
local e = Roact.createElement
|
||||||
|
|
||||||
|
local Checkbox = Roact.Component:extend("Checkbox")
|
||||||
|
|
||||||
|
function Checkbox:init()
|
||||||
|
self.motor = Flipper.SingleMotor.new(self.props.active and 1 or 0)
|
||||||
|
self.binding = bindingUtil.fromMotor(self.motor)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Checkbox:didUpdate(lastProps)
|
||||||
|
if lastProps.active ~= self.props.active then
|
||||||
|
self.motor:setGoal(
|
||||||
|
Flipper.Spring.new(self.props.active and 1 or 0, {
|
||||||
|
frequency = 6,
|
||||||
|
dampingRatio = 1.1,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Checkbox:render()
|
||||||
|
return Theme.with(function(theme)
|
||||||
|
theme = theme.Checkbox
|
||||||
|
|
||||||
|
local activeTransparency = Roact.joinBindings({
|
||||||
|
self.binding:map(function(value)
|
||||||
|
return 1 - value
|
||||||
|
end),
|
||||||
|
self.props.transparency,
|
||||||
|
}):map(bindingUtil.blendAlpha)
|
||||||
|
|
||||||
|
return e("ImageButton", {
|
||||||
|
Size = UDim2.new(0, 28, 0, 28),
|
||||||
|
Position = self.props.position,
|
||||||
|
AnchorPoint = self.props.anchorPoint,
|
||||||
|
LayoutOrder = self.props.layoutOrder,
|
||||||
|
ZIndex = self.props.zIndex,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
|
||||||
|
[Roact.Event.Activated] = self.props.onClick,
|
||||||
|
}, {
|
||||||
|
Active = e(SlicedImage, {
|
||||||
|
slice = Assets.Slices.RoundedBackground,
|
||||||
|
color = theme.Active.BackgroundColor,
|
||||||
|
transparency = activeTransparency,
|
||||||
|
size = UDim2.new(1, 0, 1, 0),
|
||||||
|
zIndex = 2,
|
||||||
|
}, {
|
||||||
|
Icon = e("ImageLabel", {
|
||||||
|
Image = Assets.Images.Checkbox.Active,
|
||||||
|
ImageColor3 = theme.Active.IconColor,
|
||||||
|
ImageTransparency = activeTransparency,
|
||||||
|
|
||||||
|
Size = UDim2.new(0, 16, 0, 16),
|
||||||
|
Position = UDim2.new(0.5, 0, 0.5, 0),
|
||||||
|
AnchorPoint = Vector2.new(0.5, 0.5),
|
||||||
|
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
|
||||||
|
Inactive = e(SlicedImage, {
|
||||||
|
slice = Assets.Slices.RoundedBorder,
|
||||||
|
color = theme.Inactive.BorderColor,
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
size = UDim2.new(1, 0, 1, 0),
|
||||||
|
}, {
|
||||||
|
Icon = e("ImageLabel", {
|
||||||
|
Image = Assets.Images.Checkbox.Inactive,
|
||||||
|
ImageColor3 = theme.Inactive.IconColor,
|
||||||
|
ImageTransparency = self.props.transparency,
|
||||||
|
|
||||||
|
Size = UDim2.new(0, 16, 0, 16),
|
||||||
|
Position = UDim2.new(0.5, 0, 0.5, 0),
|
||||||
|
AnchorPoint = Vector2.new(0.5, 0.5),
|
||||||
|
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
return Checkbox
|
||||||