@el4cteo/rbx-studio-mcp 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/input.js +38 -5
- package/dist/tools/input.js.map +1 -1
- package/package.json +1 -1
- package/plugin/src/Config.luau +1 -1
- package/plugin/src/Console.luau +44 -1
- package/plugin/src/Mirror.luau +126 -0
- package/plugin/src/ThemePicker.luau +458 -458
- package/plugin/src/Themes/Aurora.luau +161 -147
- package/plugin/src/Themes/Void.luau +266 -230
- package/plugin/src/Undo.luau +29 -0
- package/plugin/src/Visuals.luau +56 -6
- package/plugin/src/handlers/Device.luau +21 -1
- package/plugin/src/handlers/Input.luau +583 -493
- package/plugin/src/init.server.luau +552 -386
|
@@ -1,147 +1,161 @@
|
|
|
1
|
-
--!strict
|
|
2
|
-
--[[
|
|
3
|
-
Aurora -- load as an amplitude.
|
|
4
|
-
|
|
5
|
-
A curtain of vertical rays whose height follows a travelling wave. The wave
|
|
6
|
-
is always there; what the session changes is how violent it is. Idle, it is
|
|
7
|
-
a shallow ripple you have to look at to notice. Under load it becomes a
|
|
8
|
-
curtain that fills the cell. Nothing here counts or ranks anything, which is
|
|
9
|
-
the point: it answers "how hard is this working" continuously, where Lattice
|
|
10
|
-
answers it in four steps and Orbit in six.
|
|
11
|
-
|
|
12
|
-
Two waves at different rates are summed rather than one, because a single
|
|
13
|
-
sine is a loading bar lying on its side -- the interference is what makes it
|
|
14
|
-
read as something physical rather than as an animation on a loop.
|
|
15
|
-
|
|
16
|
-
Colour runs green at the base to violet at the tips, which is the actual
|
|
17
|
-
emission order of a real aurora and, more usefully here, means the height of
|
|
18
|
-
a ray is legible from its colour alone at four pixels wide.
|
|
19
|
-
]]
|
|
20
|
-
|
|
21
|
-
local Draw = require(script.Parent.Draw)
|
|
22
|
-
local Theme = require(script.Parent.Theme)
|
|
23
|
-
|
|
24
|
-
local RAYS = 15
|
|
25
|
-
|
|
26
|
-
local Aurora = {}
|
|
27
|
-
|
|
28
|
-
Aurora.id = "aurora"
|
|
29
|
-
Aurora.label = "Aurora"
|
|
30
|
-
Aurora.blurb = "Rising curtain"
|
|
31
|
-
|
|
32
|
-
Aurora.palette = {
|
|
33
|
-
background = Color3.fromRGB(9, 14, 28),
|
|
34
|
-
surface = Color3.fromRGB(16, 23, 44),
|
|
35
|
-
rule = Color3.fromRGB(108, 226, 178),
|
|
36
|
-
text = Color3.fromRGB(206, 220, 238),
|
|
37
|
-
dim = Color3.fromRGB(86, 100, 130),
|
|
38
|
-
green = Color3.fromRGB(108, 232, 172),
|
|
39
|
-
red = Color3.fromRGB(246, 126, 146),
|
|
40
|
-
amber = Color3.fromRGB(244, 196, 128),
|
|
41
|
-
cyan = Color3.fromRGB(114, 214, 236),
|
|
42
|
-
violet = Color3.fromRGB(162, 146, 240),
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
local rays: { Frame } = {}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
local
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
1
|
+
--!strict
|
|
2
|
+
--[[
|
|
3
|
+
Aurora -- load as an amplitude.
|
|
4
|
+
|
|
5
|
+
A curtain of vertical rays whose height follows a travelling wave. The wave
|
|
6
|
+
is always there; what the session changes is how violent it is. Idle, it is
|
|
7
|
+
a shallow ripple you have to look at to notice. Under load it becomes a
|
|
8
|
+
curtain that fills the cell. Nothing here counts or ranks anything, which is
|
|
9
|
+
the point: it answers "how hard is this working" continuously, where Lattice
|
|
10
|
+
answers it in four steps and Orbit in six.
|
|
11
|
+
|
|
12
|
+
Two waves at different rates are summed rather than one, because a single
|
|
13
|
+
sine is a loading bar lying on its side -- the interference is what makes it
|
|
14
|
+
read as something physical rather than as an animation on a loop.
|
|
15
|
+
|
|
16
|
+
Colour runs green at the base to violet at the tips, which is the actual
|
|
17
|
+
emission order of a real aurora and, more usefully here, means the height of
|
|
18
|
+
a ray is legible from its colour alone at four pixels wide.
|
|
19
|
+
]]
|
|
20
|
+
|
|
21
|
+
local Draw = require(script.Parent.Draw)
|
|
22
|
+
local Theme = require(script.Parent.Theme)
|
|
23
|
+
|
|
24
|
+
local RAYS = 15
|
|
25
|
+
|
|
26
|
+
local Aurora = {}
|
|
27
|
+
|
|
28
|
+
Aurora.id = "aurora"
|
|
29
|
+
Aurora.label = "Aurora"
|
|
30
|
+
Aurora.blurb = "Rising curtain"
|
|
31
|
+
|
|
32
|
+
Aurora.palette = {
|
|
33
|
+
background = Color3.fromRGB(9, 14, 28),
|
|
34
|
+
surface = Color3.fromRGB(16, 23, 44),
|
|
35
|
+
rule = Color3.fromRGB(108, 226, 178),
|
|
36
|
+
text = Color3.fromRGB(206, 220, 238),
|
|
37
|
+
dim = Color3.fromRGB(86, 100, 130),
|
|
38
|
+
green = Color3.fromRGB(108, 232, 172),
|
|
39
|
+
red = Color3.fromRGB(246, 126, 146),
|
|
40
|
+
amber = Color3.fromRGB(244, 196, 128),
|
|
41
|
+
cyan = Color3.fromRGB(114, 214, 236),
|
|
42
|
+
violet = Color3.fromRGB(162, 146, 240),
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
local rays: { Frame } = {}
|
|
46
|
+
|
|
47
|
+
--[[
|
|
48
|
+
Accumulated wave phase, rather than wall time times a rate.
|
|
49
|
+
|
|
50
|
+
`ctx.clock * 1.6 * pace` looks harmless and is not: `pace` drops to 0.35 the
|
|
51
|
+
moment the session goes quiet, and multiplying a clock in the thousands by a
|
|
52
|
+
rate that changes RESHAPES the whole curtain in one frame -- the same class
|
|
53
|
+
of fault as Void's disc, just rarer, because this rate only moves twice per
|
|
54
|
+
idle cycle instead of every frame. Integrating it means going quiet slows the
|
|
55
|
+
curtain, which is what was meant.
|
|
56
|
+
]]
|
|
57
|
+
local phase = 0
|
|
58
|
+
|
|
59
|
+
function Aurora.mount(cell: Frame)
|
|
60
|
+
rays = {}
|
|
61
|
+
for index = 1, RAYS do
|
|
62
|
+
local ray = Instance.new("Frame")
|
|
63
|
+
ray.Name = string.format("Ray%02d", index)
|
|
64
|
+
-- Anchored at the bottom so height grows upward from a fixed baseline,
|
|
65
|
+
-- which is what makes the curtain rise rather than expand about its
|
|
66
|
+
-- middle.
|
|
67
|
+
ray.AnchorPoint = Vector2.new(0.5, 1)
|
|
68
|
+
ray.BorderSizePixel = 0
|
|
69
|
+
ray.Parent = cell
|
|
70
|
+
local corner = Instance.new("UICorner")
|
|
71
|
+
corner.CornerRadius = UDim.new(0, 1)
|
|
72
|
+
corner.Parent = ray
|
|
73
|
+
rays[index] = ray
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
function Aurora.unmount()
|
|
78
|
+
phase = 0
|
|
79
|
+
rays = {}
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
function Aurora.paint(ctx: Theme.Context, delta: number)
|
|
83
|
+
local width = ctx.size
|
|
84
|
+
local spacing = width / (RAYS + 1)
|
|
85
|
+
|
|
86
|
+
--[[
|
|
87
|
+
The floor is what keeps an idle panel alive.
|
|
88
|
+
|
|
89
|
+
Amplitude driven purely by activity would flatten the curtain to nothing
|
|
90
|
+
between commands, and a flat line is indistinguishable from a plugin
|
|
91
|
+
that has crashed. A tenth of the range is always moving.
|
|
92
|
+
]]
|
|
93
|
+
local amplitude = 0.1 + math.clamp(ctx.activity, 0, 1) * 0.62 + ctx.energy * 0.16
|
|
94
|
+
local pace = if ctx.quiet > 20 then 0.35 else 1
|
|
95
|
+
phase += delta * pace
|
|
96
|
+
|
|
97
|
+
for index = 1, RAYS do
|
|
98
|
+
local ray = rays[index]
|
|
99
|
+
if ray == nil then
|
|
100
|
+
continue
|
|
101
|
+
end
|
|
102
|
+
local across = index / RAYS
|
|
103
|
+
|
|
104
|
+
-- Two travelling waves, incommensurate rates. Their beat is slow enough
|
|
105
|
+
-- that the curtain visibly reshapes over several seconds instead of
|
|
106
|
+
-- repeating on a cycle the eye can learn.
|
|
107
|
+
local wave = math.sin(across * 5.2 - phase * 1.6)
|
|
108
|
+
+ 0.6 * math.sin(across * 2.7 + phase * 0.9)
|
|
109
|
+
local normalised = (wave + 1.6) / 3.2
|
|
110
|
+
|
|
111
|
+
local height = math.max(2, math.floor(width * (0.12 + normalised * amplitude) * ctx.scale))
|
|
112
|
+
local reach = math.clamp(height / width, 0, 1)
|
|
113
|
+
|
|
114
|
+
ray.Size = UDim2.fromOffset(3, height)
|
|
115
|
+
ray.Position = UDim2.fromOffset(spacing * index, width - 2)
|
|
116
|
+
-- Green low, violet high: the ray's own height is readable from its
|
|
117
|
+
-- colour, which a three-pixel column badly needs.
|
|
118
|
+
ray.BackgroundColor3 = ctx.palette.green
|
|
119
|
+
:Lerp(ctx.palette.violet, reach)
|
|
120
|
+
:Lerp(Color3.new(1, 1, 1), ctx.flare * 0.45)
|
|
121
|
+
ray.BackgroundTransparency = math.clamp(0.74 - reach * 0.45 - ctx.flare * 0.3, 0, 1)
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
--[[
|
|
126
|
+
The trace as a continuation of the curtain: same rays, same colour rule, but
|
|
127
|
+
their heights are history rather than a wave.
|
|
128
|
+
]]
|
|
129
|
+
function Aurora.paintSlot(slot: Theme.Slot, ctx: Theme.Context)
|
|
130
|
+
local frame = slot.frame
|
|
131
|
+
local recency = 1 - slot.age
|
|
132
|
+
local height = math.max(2, math.floor(2 + slot.weight * 21))
|
|
133
|
+
|
|
134
|
+
frame.AnchorPoint = Vector2.new(0.5, 1)
|
|
135
|
+
frame.Size = UDim2.fromOffset(3, height)
|
|
136
|
+
frame.Position = UDim2.new(frame.Position.X.Scale, frame.Position.X.Offset, 1, 0)
|
|
137
|
+
frame.BackgroundColor3 = if slot.ok
|
|
138
|
+
then ctx.palette.green:Lerp(ctx.palette.violet, slot.weight)
|
|
139
|
+
else ctx.palette.red
|
|
140
|
+
frame.BackgroundTransparency = math.clamp(0.66 - recency * 0.56, 0, 1)
|
|
141
|
+
frame.Rotation = 0
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
function Aurora.swatch(frame: Frame, palette: Theme.Palette)
|
|
145
|
+
for index = 1, 12 do
|
|
146
|
+
local ray = Instance.new("Frame")
|
|
147
|
+
ray.AnchorPoint = Vector2.new(0.5, 1)
|
|
148
|
+
ray.BorderSizePixel = 0
|
|
149
|
+
local across = index / 12
|
|
150
|
+
local wave = math.sin(across * 5.2) + 0.6 * math.sin(across * 2.7)
|
|
151
|
+
local reach = (wave + 1.6) / 3.2
|
|
152
|
+
local height = math.max(2, math.floor(4 + reach * 17))
|
|
153
|
+
ray.Size = UDim2.fromOffset(2, height)
|
|
154
|
+
ray.Position = UDim2.fromOffset(3 + index * 3, 23)
|
|
155
|
+
ray.BackgroundColor3 = palette.green:Lerp(palette.violet, reach)
|
|
156
|
+
ray.BackgroundTransparency = 0.35
|
|
157
|
+
ray.Parent = frame
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
return Aurora
|