mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-13 05:53:53 +01:00
1.15.3.1
This commit is contained in:
parent
ff566da654
commit
ccaee3ae36
@ -24,9 +24,10 @@ function __part(_node) constructor {
|
|||||||
turning = 0;
|
turning = 0;
|
||||||
turnSpd = 0;
|
turnSpd = 0;
|
||||||
|
|
||||||
accel = 0;
|
accel = 0;
|
||||||
wig = 0;
|
spVec = [ 0, 0 ];
|
||||||
spVec = [ 0, 0 ];
|
|
||||||
|
wig_pos = 0;
|
||||||
|
|
||||||
boundary_data = -1;
|
boundary_data = -1;
|
||||||
|
|
||||||
@ -77,7 +78,7 @@ function __part(_node) constructor {
|
|||||||
node.onPartCreate(self);
|
node.onPartCreate(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static setPhysic = function(_sx, _sy, _ac, _g, _gDir, _wig, _turn, _turnSpd) {
|
static setPhysic = function(_sx, _sy, _ac, _g, _gDir, _wig_pos, _turn, _turnSpd) {
|
||||||
speedx = _sx;
|
speedx = _sx;
|
||||||
speedy = _sy;
|
speedy = _sy;
|
||||||
accel = _ac;
|
accel = _ac;
|
||||||
@ -89,7 +90,7 @@ function __part(_node) constructor {
|
|||||||
turning = _turn;
|
turning = _turn;
|
||||||
turnSpd = _turnSpd;
|
turnSpd = _turnSpd;
|
||||||
|
|
||||||
wig = _wig;
|
wig_pos = _wig_pos;
|
||||||
|
|
||||||
spVec[0] = point_distance(0, 0, speedx, speedy);
|
spVec[0] = point_distance(0, 0, speedx, speedy);
|
||||||
spVec[1] = point_direction(0, 0, speedx, speedy);
|
spVec[1] = point_direction(0, 0, speedx, speedy);
|
||||||
@ -146,8 +147,8 @@ function __part(_node) constructor {
|
|||||||
diss = max(0, diss + accel);
|
diss = max(0, diss + accel);
|
||||||
|
|
||||||
if(speedx != 0 || speedy != 0) {
|
if(speedx != 0 || speedy != 0) {
|
||||||
if(wig != 0)
|
if(wig_pos != 0)
|
||||||
dirr += random_range(-wig, wig);
|
dirr += random_range(-wig_pos, wig_pos);
|
||||||
|
|
||||||
if(turning != 0) {
|
if(turning != 0) {
|
||||||
var trn = turnSpd? turning * diss : turning;
|
var trn = turnSpd? turning * diss : turning;
|
||||||
|
@ -501,7 +501,7 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
|||||||
previewable = false;
|
previewable = false;
|
||||||
|
|
||||||
w = 96;
|
w = 96;
|
||||||
min_h = 32 + 24 * 4;
|
min_h = 32;
|
||||||
draw_padding = 4;
|
draw_padding = 4;
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Vector", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ])
|
inputs[| 0] = nodeValue("Vector", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ])
|
||||||
@ -520,7 +520,7 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
|||||||
type = VALUE_TYPE.integer;
|
type = VALUE_TYPE.integer;
|
||||||
|
|
||||||
inputs[| 0].type = type;
|
inputs[| 0].type = type;
|
||||||
for( var i = 0; i < 4; i++ )
|
for( var i = 0; i < 4; i++ )
|
||||||
outputs[| i].type = type;
|
outputs[| i].type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -530,7 +530,13 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
|||||||
|
|
||||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||||
draw_set_text(f_h1, fa_center, fa_center, COLORS._main_text);
|
draw_set_text(f_h1, fa_center, fa_center, COLORS._main_text);
|
||||||
var str = $"{outputs[| 0].getValueCached()}\n{outputs[| 1].getValueCached()}\n{outputs[| 2].getValueCached()}\n{outputs[| 3].getValueCached()}";
|
var str = "";
|
||||||
|
for( var i = 0; i < 4; i++ ) {
|
||||||
|
if(outputs[| i].visible)
|
||||||
|
str += $"{outputs[| 0].getValueCached()}\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
str = string_trim(str);
|
||||||
var bbox = drawGetBbox(xx, yy, _s);
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
var ss = string_scale(str, bbox.w, bbox.h);
|
var ss = string_scale(str, bbox.w, bbox.h);
|
||||||
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user