Releases: Blackprint/engine-js
Releases · Blackprint/engine-js
v0.6.0
Features
- Add feature to rename port
- Add utils to help fix minified class name
- Add instance storage for variables, functions
Breaking Changes
- Creating input/output port dynamically now become:
- After:
node.createPort("input" | "output", name, type) - Before:
node.input.add(name, type)
- After:
- Deleting input/output port dynamically now become:
- After:
node.deletePort("input" | "output", name) - Before:
node.input.delete(name)
- After:
- Input/output port name that start with
_will be ignored - Rename some function and mark it as private
node.inputandnode.outputconstruction now must be changed to static class variable
Click here to open details
class MyCustomNode extends Blackprint.Node {
// Before
input = { MyInput: Number };
output = { MyOutput: Number };
// After
static input = { MyInput: Number };
static output = { MyOutput: Number };
}v0.5.2
Bug Fix
- Fix error when moving nodes from sketch
- Fix
Anytype data when trying to drop cable to the node header - Fix incorrect cable arrangement when the sketch is being reimported
- Fix cable order when being connected from input port
- Fix port value that was not updated because of cache
- Fix default port value
Performance
- Skip if the port value was unchanged
v0.5.0
Features
- Add
instance.refwhere theinstancecan benew Blackprint.Engineornew Blackprint.Sketchthisrefwill have reference toOutputorInputport - Add
node.destroyas an alternative foriface.destroy, this will be called by the engine and shouldn't be manually called - Add
instance.deleteNodeto delete node manually by using code - Add options for
importJSON - Reuse port and event listener from an iface that have an ID
Breaking Changes
iface.constandnode.constnow changed intoiface.refandnode.refimportJSONnow will clear the instance firstValidatorport type was removed
Bug Fix
- Fix error when using sQuery
- Fix error when the node doesn't have input port
- Fix
iface.destroythat was not being called when the nodes was cleared
v0.4.5
Feature
- Use cache when obtaining data from input port
Bug Fix
- Fix data flow visualization
- Fix cable connection from port with type of array
- Fix
node.updatefunction that being called when port value haven't been defined
v0.4.4
Bug Fix
- Fix incorrect default value
- Move
iface.importedcall order nearnode.imported - Fix incorrect port event data (
targetshould beport) - Fix
*event that was not being called
Feature
Blackprint.Engineis now usingCustomEvent- You can now connect cable with script
v0.4.3
Bug Fix
- Avoid multiple constructor call
- Fix undefined cable value when being connected from input to output from sketch editor
Feature
- Add
inputandoutputproperties forCable - Port
valueevent can be retrieved from IFace object withport.value - You now can use
.emitfor triggering your custom event for IFace/Node/Port
Breaking Changes
- Port event data will be wrapped with object
// Before
Input.Port.Stuff.on('value', function(target){});
// After
Input.Port.Stuff.on('value', function({ target, cable }){
// cable.value === target.value
// cable.value: is more recommended than using `target.value`
});v0.3.0
Feature
- Interfaces now can be accessed from
instance.iface[id] - Add custom environment data
- Load module from URL (default to disabled)
- Add support for using Decorator when registering node/interface
- Add support for listening to all event with "*"
Breaking Changes
Because the implementation will be similar with engine-php and engine-go.
This changes is supposed to improve efficiency, and reduce possible future breaking changes.
.outputs, .inputs, .propertiesfield is changed into.output, .input, .propertyfornodeandifaceoutputs:[]field is now changed tooutput:[]for JSON exportInstance.importJSON()now returning promise and need to beawait-ed before using.getNodeor.getNodesBlackprint.Engine.registerNode()will now being merged and replaced withBlackprint.registerNode()- When using class for
Blackprint.registerNodeit must extendsBlackprint.Node - When constructing Node,
node.interface = '...'now must be changed tonode.setInterface('...')before accessing the target interface Blackprint.Addonswas changed toBlackprint.getContextBlackprint.Nodewas changed toBlackprint.Interface- For sketch (browser only):
Blackprint.registerInterface()was renamed toBlackprint.Sketch.registerInterface() - For non-sketch:
Blackprint.Engine.registerInterface()was renamed toBlackprint.registerInterface() - When using class for
Blackprint.registerInterfaceorBlackprint.Sketch.registerInterface, the class must extendsBlackprint.Interface BPAOmust be changed toBPICBlackprint.PortArrayOfnow changed toBlackprint.Port.ArrayOfBlackprint.PortDefaultnow changed toBlackprint.Port.DefaultBlackprint.PortSwitchnow changed toBlackprint.Port.SwitchBlackprint.PortTriggernow changed toBlackprint.Port.TriggerBlackprint.PortUnionnow changed toBlackprint.Port.UnionBlackprint.PortValidatornow changed toBlackprint.Port.Validator- Events emitted from node/iface/sketch will now only have one object parameter, therefore
._triggerwill only accept(eventName, ?object)parameter.
v0.1.0
Breaking Changes
Blackprint.Interpreteris changed intoBlackprint.Engine- Package on NPM registry was moved to
@blackprint/...