Skip to content

Releases: thekingofspace/Vision

V1.1.2

Choose a tag to compare

@thekingofspace thekingofspace released this 07 Sep 00:52

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 and AttributeChanged. derive is unchanged.
  • Breaking. A callback that reads a second argument now gets the vision there. One argument callbacks are unaffected.
  • create matches the same shape, with nil in 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.
  • AttributeChanged now passes the new value third.

Wally

  • Vision = "thekingofspace/vision@1.1.2" under [dependencies], then wally install.
  • Realm shared, so it installs to Packages and you require it as Packages.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, AttributeChanged and PropertyChanged on the main module, Node, Event, State and the callback shapes from Capture, Link and Runtime from Link.

Fixes

  • The built model no longer contains a stray wally module.
  • create was not passing the vision slot to signal property callbacks, so a declaration written for Capture shifted its arguments under create.

V1.1.1

Choose a tag to compare

@thekingofspace thekingofspace released this 05 Sep 03:13

Taking instances Vision did not make

  • fromClone(Template) stands in for a ClassName. The node copies the template instead of building something new and owns the copy, so Cleanup destroys 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 a mount.
  • 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 ClassName child 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 fromInstance errors instead of quietly making two visions fight over one instance. It tells you to use fromClone.
  • lint knows about all three, and now also flags a ClassName sitting next to a source marker, since it will be ignored.

Animation

  • Animation:Play(). Animate now 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.Time is that playhead, and it survives a Stop. 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 Play at the start inherited the end of the timeline and never moved.
  • Keyframes take 0 for the tween time. TweenInfo is there for the shape of the curve, not its length, and Roblox refuses nil for that argument.

v1.1.0

Choose a tag to compare

@thekingofspace thekingofspace released this 04 Sep 11:53
  • Moved to 1.1.0 for major release.
  • Vision.Keyframe and Scope:Animate bring 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 TweenInfo for the shape of its curve, or a { Damping, Period } table to arrive on a spring instead. Timing comes from the keyframe times, so pass 0 for the tween time.
  • Keyframes carry events. Animation:Bind picks them up, and the instance is the first argument as it is everywhere else.
  • Looped, Speed and Jump for playback. SmoothLoop with RestageTime walks 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.Sheet stages named sprites on one image and is callable, Sprites(Icon, "Idle"), with a shared cell size and per sprite overrides.
  • Scope:FlipBook steps an instance through those names on a clock, with Play, Stop, Looped, Speed and Rate. 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. Destroy drops 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

Choose a tag to compare

@thekingofspace thekingofspace released this 04 Sep 02:26
fixed some minor speed issues

V1.0.7

Choose a tag to compare

@thekingofspace thekingofspace released this 04 Sep 01:51

Updated with new systems for the inject and recieve keywords

V1.0.6

Choose a tag to compare

@thekingofspace thekingofspace released this 03 Sep 05:58

Fixed some issues of things being left in reference

v1.0.5

Choose a tag to compare

@thekingofspace thekingofspace released this 03 Sep 05:14

Full Changelog: 1.0.4...1.0.5

V1.0.4

Choose a tag to compare

@thekingofspace thekingofspace released this 03 Sep 02:51

Depreciated old Value functions and brought in new multi event functions

v1.0.3

Choose a tag to compare

@thekingofspace thekingofspace released this 02 Sep 09:08

Fixed stale reference issue with API change

v1.0.2

Choose a tag to compare

@thekingofspace thekingofspace released this 02 Sep 06:44

Fixed issue with event mounting

added new derrive keyword