- [Polygonal Shape] Fix error when using path output in other nodes.

This commit is contained in:
Tanasart 2023-08-30 18:27:31 +02:00
parent 9aa2aff5a3
commit 6ce05f044d
2 changed files with 3 additions and 5 deletions

View file

@ -77,7 +77,7 @@ function PathSegment() : Path() constructor {
var to = (fr + 1) % getSegmentCount();
var st = frac(_seg);
return segments[fr].lerpTo(to, st);
return segments[fr].lerpTo(segments[to], st);
}
static getPointRatio = function(_rat) {

View file

@ -90,10 +90,8 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
path = new PathSegment();
static processData = function(_outSurf, _data, _output_index, _array_index) {
if(_output_index == 1)
return mesh;
if(_output_index == 2)
return path;
if(_output_index == 1) return mesh;
if(_output_index == 2) return path;
var _dim = _data[0];
var _bg = _data[1];