kano-code
kano-code copied to clipboard
Parts can be renamed to match toolbox categories
trafficstars
If you rename a part to a name that already exists in the toolbox (i.e. Math) it:
- Breaks the toolbox UI for the Math item.
- Breaks any code relying on Math blocks (e.g
Lerp) because the functions now appear to map the newly renamed part, which doesn’t have aLerpblock.
Thanks for bringing this up. We should prevent using names from the core library to avoid this.
Ran into this again but this time with variables. While testing something I created a variable named time. For some reason the creation stopped working. Opening devtools reveled the following JavaScript error.
VM374:20 Uncaught TypeError: time.every is not a function
at eval (eval at runInContext (index-7728810b.js:1), <anonymous>:20:8)
at t.fire (emitter-0ed5874e.js:1)
at ApplicationModule._start (index-7728810b.js:1)
at ApplicationModule.executeLifecycleStep (index-7728810b.js:1)
at index-7728810b.js:1
at Array.forEach (<anonymous>)
at AppModules._runModuleLifecycleStep (index-7728810b.js:1)
at AppModules.afterRun (index-7728810b.js:1)
at Runner._onRunningStateChange (index-7728810b.js:1)
at index-7728810b.js:1
My variable overwrites with the time object used in the output JavaScript. This is what was produced by the editor:
var time;
time.every(1, 'frames', function() {
...
})