Existence Begins With Perception.
A declarative instance library for Luau. Describe a tree as a table, stage data into it, and create it when you are ready.
local Vision = require(ReplicatedStorage.Shared.Vision)
local Scope = Vision.Scope()
local Interface = Scope:Capture({
ClassName = "TextLabel",
Vision.mount(PlayerGui),
Vision.event("Count", 0, function(self, _, Value)
self.Text = `Clicks: {Value}`
end),
})
Interface.Count(12)
Interface:Mount()Documentation lives in docs/.
With Wally:
[dependencies]
Vision = "thekingofspace/vision@1.1.2"wally installIt is a shared package, so it lands in Packages:
local Vision = require(ReplicatedStorage.Packages.Vision)Without Wally, take Vision.rbxm from a
release and drop it
wherever you keep shared modules.
Tools are managed with Rokit.
rokit installlune run scripts/buildWrites three files:
| file | what it is |
|---|---|
Vision.rbxm |
the library on its own, upload this to a release |
Vision.rbxmx |
the same thing as xml, readable in diffs |
Vision.rbxl |
a place with the library and the showcases, open it and press play |
The two model files contain only the library. The place is built from
default.project.json and is the quickest way to try the showcases without
running Rojo.
rojo serveLive syncs the same place, for working on the showcases.
On play you get a menu, itself built with Vision, offering three showcases:
- Interface - thirteen screens covering values, derives, styles, both spring
families, cloning, injection, particles and keyframe timelines.
Kmoves between them,Tswaps the theme. - Blast door - one heavy slab driven by keyframe timelines, with three buttons on the wall for its three animations.
- Entities -
fromInstanceandfromCloneside by side. Click one to clean it up and watch which parts survive,Rbrings them back.