Releases: thekingofspace/Vision
Releases · thekingofspace/Vision
Release list
V1.1.2
Callbacks
- Every callback is now called as
(instance, vision, ...). The vision that built the node comes second, everything after it shifts along one. - Affects
event,merge,ready,cleanup,drawcall,receive, signal properties andAttributeChanged.deriveis unchanged. - Breaking. A callback that reads a second argument now gets the vision there. One argument callbacks are unaffected.
creatematches the same shape, withnilin the vision slot.
PropertyChanged
- New declaration key. A map of property names to callbacks, wired with
GetPropertyChangedSignal. - Connected after the declared properties are written, disconnected by
Cleanup, rewired on remount. AttributeChangednow passes the new value third.
Wally
Vision = "thekingofspace/vision@1.1.2"under[dependencies], thenwally install.- Realm
shared, so it installs toPackagesand you require it asPackages.Vision. No dependencies of its own.
Types
- All 14 modules are
--!strict, clean under both the old and the new Luau type solver. - New exported types:
Dynamic,AttributeChangedandPropertyChangedon the main module,Node,Event,Stateand the callback shapes fromCapture,LinkandRuntimefromLink.
Fixes
- The built model no longer contains a stray
wallymodule. createwas not passing the vision slot to signal property callbacks, so a declaration written forCaptureshifted its arguments undercreate.
V1.1.1
Taking instances Vision did not make
fromClone(Template)stands in for aClassName. The node copies the template instead of building something new and owns the copy, soCleanupdestroys it and mounting again stamps a fresh one. The template is never touched.fromInstance(Existing)is identical in every way but one: it adopts the instance you hand it and never destroys it. Cleanup runs your callbacks, disconnects everything Vision connected, and leaves the instance exactly where it was. Its parent is left alone too, unless you give the node amount.FromParent = "ChildName"is the third way a node gets its instance: find the child of that name on the node around it. That is how a tree built in Studio, or a template full of children, gets wired up. It nests as deep as you like.- Cleanup takes what Vision made and nothing else. A
ClassNamechild you declare inside an adopted node is owned and gets destroyed, while everything the instance already had stays put. - Cloning a vision that holds a
fromInstanceerrors instead of quietly making two visions fight over one instance. It tells you to usefromClone. lintknows about all three, and now also flags aClassNamesitting next to a source marker, since it will be ignored.
Animation
Animation:Play().Animatenow stages the animation and touches nothing until you play it, matching how a flipbook already worked.- Play resumes from wherever the playhead is rather than restarting, so a stopped animation carries on from where it stopped.
Run.Timeis that playhead, and it survives aStop.Jump(0):Play()is a replay. - An animation can drive a vision as well as an instance. Pass one and the keyframes name its values rather than instance properties, so every handler bound to them runs and every instance they drive follows. Value names are checked when you build it, not part way through playing.
Fixes
- A track never landed on its last keyframe exactly, stopping wherever the final frame happened to fall. A single keyframe animation applied nothing at all, and a zero length one never fired its events.
- A loop restarted a property from wherever it ended rather than from its first keyframe, so anything spanning several keyframes stuck at its end value.
- Replaying an animation reused the finished run's track state, so a fresh
Playat the start inherited the end of the timeline and never moved. - Keyframes take
0for the tween time.TweenInfois there for the shape of the curve, not its length, and Roblox refusesnilfor that argument.
v1.1.0
- Moved to 1.1.0 for major release.
Vision.KeyframeandScope:Animatebring keyframe animation to 2D instances, so a whole sequence is one table of poses instead of a chain of springs fired by hand.- Every property gets its own track, so one keyframe can carry as many as you like and a property spans the keyframes that never mention it. Colour set at key one and key three eases across the whole gap while rotation does its own thing in the middle.
- A keyframe takes a
TweenInfofor the shape of its curve, or a{ Damping, Period }table to arrive on a spring instead. Timing comes from the keyframe times, so pass0for the tween time. - Keyframes carry events.
Animation:Bindpicks them up, and the instance is the first argument as it is everywhere else. Looped,SpeedandJumpfor playback.SmoothLoopwithRestageTimewalks every property back to the first keyframe instead of cutting, each one on its own last keyframe's easing, so a sprung property springs back.Vision.Sheetstages named sprites on one image and is callable,Sprites(Icon, "Idle"), with a shared cell size and per sprite overrides.Scope:FlipBooksteps an instance through those names on a clock, withPlay,Stop,Looped,SpeedandRate. Frames snap rather than interpolate, and every name is checked against the sheet when you build it.- Animations and flipbooks claim the properties they drive, so a spring on the same property takes over and a destroyed instance stops them.
Destroydrops the handle and every listener bound to it. - Mounting is faster. Signal properties are worked out once per class instead of once per instance, properties are flattened at capture, and the runtime no longer allocates a table every frame.
V1.0.8
V1.0.7
Updated with new systems for the inject and recieve keywords
V1.0.6
Fixed some issues of things being left in reference
v1.0.5
V1.0.4
Depreciated old Value functions and brought in new multi event functions
v1.0.3
Fixed stale reference issue with API change
v1.0.2
Fixed issue with event mounting
added new derrive keyword