This commit is contained in:
Tanasart 2023-12-05 10:28:49 +07:00
parent 3e0994ce4d
commit 9d8718e8b5
20 changed files with 62 additions and 40 deletions

View file

@ -71,6 +71,7 @@
{"name":"importers","order":7,"path":"folders/functions/importers.yy",}, {"name":"importers","order":7,"path":"folders/functions/importers.yy",},
{"name":"inputs","order":8,"path":"folders/functions/inputs.yy",}, {"name":"inputs","order":8,"path":"folders/functions/inputs.yy",},
{"name":"lua","order":24,"path":"folders/functions/lua.yy",}, {"name":"lua","order":24,"path":"folders/functions/lua.yy",},
{"name":"math","order":43,"path":"folders/functions/math.yy",},
{"name":"migration","order":1,"path":"folders/functions/migration.yy",}, {"name":"migration","order":1,"path":"folders/functions/migration.yy",},
{"name":"nodes","order":32,"path":"folders/functions/nodes.yy",}, {"name":"nodes","order":32,"path":"folders/functions/nodes.yy",},
{"name":"packing","order":30,"path":"folders/functions/packing.yy",}, {"name":"packing","order":30,"path":"folders/functions/packing.yy",},
@ -245,7 +246,6 @@
{"name":"button","order":34,"path":"folders/widgets/button.yy",}, {"name":"button","order":34,"path":"folders/widgets/button.yy",},
{"name":"rotator","order":35,"path":"folders/widgets/rotator.yy",}, {"name":"rotator","order":35,"path":"folders/widgets/rotator.yy",},
{"name":"text","order":36,"path":"folders/widgets/text.yy",}, {"name":"text","order":36,"path":"folders/widgets/text.yy",},
{"name":"math","order":43,"path":"folders/functions/math.yy",},
], ],
"ResourceOrderSettings": [ "ResourceOrderSettings": [
{"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",}, {"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",},

View file

@ -95,6 +95,7 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"importers","folderPath":"folders/functions/importers.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"importers","folderPath":"folders/functions/importers.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"inputs","folderPath":"folders/functions/inputs.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"inputs","folderPath":"folders/functions/inputs.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"lua","folderPath":"folders/functions/lua.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"lua","folderPath":"folders/functions/lua.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"math","folderPath":"folders/functions/math.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"migration","folderPath":"folders/functions/migration.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"migration","folderPath":"folders/functions/migration.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"nodes","folderPath":"folders/functions/nodes.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"nodes","folderPath":"folders/functions/nodes.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"packing","folderPath":"folders/functions/packing.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"packing","folderPath":"folders/functions/packing.yy",},
@ -280,7 +281,6 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"button","folderPath":"folders/widgets/button.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"button","folderPath":"folders/widgets/button.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"rotator","folderPath":"folders/widgets/rotator.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"rotator","folderPath":"folders/widgets/rotator.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"text","folderPath":"folders/widgets/text.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"text","folderPath":"folders/widgets/text.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"math","folderPath":"folders/functions/math.yy",},
], ],
"IncludedFiles": [ "IncludedFiles": [
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",},

View file

@ -21,8 +21,8 @@ function __APPEND_MAP(_map, context = PANEL_GRAPH.getCurrentContext()) { #region
if(struct_has(_map, "version")) { if(struct_has(_map, "version")) {
var _v = _map.version; var _v = _map.version;
PROJECT.version = _v; PROJECT.version = _v;
if(_v != SAVE_VERSION) { if(floor(_v) != floor(SAVE_VERSION)) {
var warn = "File version mismatch : loading file version " + string(_v) + " to Pixel Composer " + string(SAVE_VERSION); var warn = $"File version mismatch : loading file version {_v} to Pixel Composer {SAVE_VERSION}";
log_warning("FILE", warn) log_warning("FILE", warn)
} }
} }

View file

@ -116,8 +116,8 @@ function controlPointBox(_onModify) : widget() constructor {
tbW.draw(_x + lw, yy, _w - lw, TEXTBOX_HEIGHT, _wid, _m); tbW.draw(_x + lw, yy, _w - lw, TEXTBOX_HEIGHT, _wid, _m);
yy += TEXTBOX_HEIGHT + ui(8); yy += TEXTBOX_HEIGHT + ui(8);
rot.draw(_x + _w / 2, yy, _w, _fy, _m); var _rh = rot.draw(_x, yy, _w, _fy, _m);
yy += ui(94 + 8); yy += _rh + ui(8);
break; break;
} }

View file

@ -25,10 +25,10 @@
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION; globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION;
LATEST_VERSION = 11500; LATEST_VERSION = 11500;
VERSION = 11588; VERSION = 11589;
SAVE_VERSION = 11600.1; SAVE_VERSION = 11600.1;
VERSION_STRING = "1.16rc8"; VERSION_STRING = "1.16rc9";
BUILD_NUMBER = 11588; BUILD_NUMBER = 11589;
globalvar APPEND_MAP; globalvar APPEND_MAP;
APPEND_MAP = ds_map_create(); APPEND_MAP = ds_map_create();

View file

@ -88,7 +88,7 @@ function __LOAD_PATH(path, readonly = false, override = false) { #region
if(struct_has(_load_content, "version")) { if(struct_has(_load_content, "version")) {
var _v = _load_content.version; var _v = _load_content.version;
PROJECT.version = _v; PROJECT.version = _v;
if(_v != SAVE_VERSION) { if(floor(_v) != floor(SAVE_VERSION)) {
var warn = $"File version mismatch : loading file version {_v} to Pixel Composer {SAVE_VERSION}"; var warn = $"File version mismatch : loading file version {_v} to Pixel Composer {SAVE_VERSION}";
log_warning("LOAD", warn); log_warning("LOAD", warn);
} }

View file

@ -99,7 +99,7 @@ function MetaDataManager() constructor {
var _own = author_steam_id == STEAM_USER_ID; var _own = author_steam_id == STEAM_USER_ID;
var _ont = "Your creation"; var _ont = "Your creation";
var _aut = $"{__txt("By")} {author}"; var _aut = $"{__txt("By")} {author}";
var _ver = version < SAVE_VERSION? __txtx("meta_old_version", "Created on an older version") : __txtx("meta_new_version", "Created on a newer version"); var _ver = floor(version) < floor(SAVE_VERSION)? __txtx("meta_old_version", "Created on an older version") : __txtx("meta_new_version", "Created on a newer version");
draw_set_font(f_h5); draw_set_font(f_h5);
_h += string_height_ext(name, -1, ww) - ui(4); _h += string_height_ext(name, -1, ww) - ui(4);
@ -127,7 +127,7 @@ function MetaDataManager() constructor {
_w = max(_w, string_width_ext(alias, -1, ww)); _w = max(_w, string_width_ext(alias, -1, ww));
} }
if(version != SAVE_VERSION) { if(floor(version) != floor(SAVE_VERSION)) {
draw_set_font(f_p2); draw_set_font(f_p2);
_h += ui(8); _h += ui(8);
_h += string_height_ext(_ver, -1, ww); _h += string_height_ext(_ver, -1, ww);
@ -198,7 +198,7 @@ function MetaDataManager() constructor {
ty += string_height_ext(alias, -1, _w); ty += string_height_ext(alias, -1, _w);
} }
if(version != SAVE_VERSION) { if(floor(version) != floor(SAVE_VERSION)) {
ty += ui(8); ty += ui(8);
draw_set_text(f_p2, fa_left, fa_top, COLORS._main_accent); draw_set_text(f_p2, fa_left, fa_top, COLORS._main_accent);
draw_text_line(mx + _pd, ty, _ver, -1, _w); draw_text_line(mx + _pd, ty, _ver, -1, _w);

View file

@ -641,6 +641,8 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
} #endregion } #endregion
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
if(instance_exists(o_dialog_color_selector)) return;
mouse_cur_x = round((_mx - _x) / _s - 0.5); mouse_cur_x = round((_mx - _x) / _s - 0.5);
mouse_cur_y = round((_my - _y) / _s - 0.5); mouse_cur_y = round((_my - _y) / _s - 0.5);

View file

@ -20,6 +20,11 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x,
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 3,
["Surface", false], 0,
["Effect", false], 1, 2,
]
attribute_surface_depth(); attribute_surface_depth();
attribute_interpolation(); attribute_interpolation();

View file

@ -324,7 +324,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
var _hi = ui(junction_draw_pad_y); var _hi = ui(junction_draw_pad_y);
var _ho = ui(junction_draw_pad_y); var _ho = ui(junction_draw_pad_y);
var _prev_surf = previewable && (preview_channel < ds_list_size(outputs) && outputs[| preview_channel].type == VALUE_TYPE.surface); var _prev_surf = previewable && preview_draw && (preview_channel < ds_list_size(outputs) && outputs[| preview_channel].type == VALUE_TYPE.surface);
for( var i = 0; i < ds_list_size(inputs); i++ ) { for( var i = 0; i < ds_list_size(inputs); i++ ) {
var _inp = inputs[| i]; var _inp = inputs[| i];

View file

@ -20,7 +20,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
.setDisplay(VALUE_DISPLAY.padding); .setDisplay(VALUE_DISPLAY.padding);
inputs[| 7] = nodeValue("Output", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) inputs[| 7] = nodeValue("Output", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1)
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Animation", "Array"]); .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Animation", "Array" ]);
inputs[| 8] = nodeValue("Animation speed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); inputs[| 8] = nodeValue("Animation speed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1);
@ -143,7 +143,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
if(_amo < 256) { if(_amo < 256) {
for(var i = _amo - 1; i >= 0; i--) { for(var i = _amo - 1; i >= 0; i--) {
if(!array_safe_get(sprite_valid, i, true)) if(!array_safe_get(sprite_valid, i, false))
continue; continue;
var _f = sprite_pos[i]; var _f = sprite_pos[i];
@ -211,7 +211,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
var _xx = value_snap(round(drag_sx + (_mx - drag_mx) / _s), _snx); var _xx = value_snap(round(drag_sx + (_mx - drag_mx) / _s), _snx);
var _yy = value_snap(round(drag_sy + (_my - drag_my) / _s), _sny); var _yy = value_snap(round(drag_sy + (_my - drag_my) / _s), _sny);
var off = [_xx, _yy]; var off = [ _xx, _yy ];
curr_off = off; curr_off = off;
if(mouse_release(mb_left)) { if(mouse_release(mb_left)) {
@ -236,7 +236,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
} }
} else if(drag_type == 3) { } else if(drag_type == 3) {
var _col = floor((abs(_mx - drag_mx) / _s - _spc[0]) / (__dim[0] + _spc[0])); var _col = floor((abs(_mx - drag_mx) / _s - _spc[0]) / (__dim[0] + _spc[0]));
curr_amo[0] = _col; curr_amo = [ _col, curr_amo[1] ];
if(mouse_release(mb_left)) { if(mouse_release(mb_left)) {
drag_type = 0; drag_type = 0;
@ -244,7 +244,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
} }
} else if(drag_type == 4) { } else if(drag_type == 4) {
var _row = floor((abs(_my - drag_my) / _s - _spc[1]) / (__dim[1] + _spc[1])); var _row = floor((abs(_my - drag_my) / _s - _spc[1]) / (__dim[1] + _spc[1]));
curr_amo[1] = _row; curr_amo = [ curr_amo[0], _row ];
if(mouse_release(mb_left)) { if(mouse_release(mb_left)) {
drag_type = 0; drag_type = 0;
@ -330,7 +330,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
surface_set_shader(temp_surface[0], sh_slice_spritesheet_empty_scan); surface_set_shader(temp_surface[0], sh_slice_spritesheet_empty_scan);
shader_set_dim("dimension", _inSurf); shader_set_dim("dimension", _inSurf);
shader_set_f("paddingStart", _pad[2], _pad[1]); shader_set_f("paddingStart", _off[0], _off[1]);
shader_set_f("spacing", surf_space[0], surf_space[1]); shader_set_f("spacing", surf_space[0], surf_space[1]);
shader_set_f("spriteDim", _dim[0], _dim[1]); shader_set_f("spriteDim", _dim[0], _dim[1]);
shader_set_color("color", _flcl); shader_set_color("color", _flcl);
@ -381,7 +381,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
continue; continue;
} }
var empPx = surface_get_pixel(temp_surface[0], _spr_pos[0], _spr_pos[1]); var empPx = surface_get_pixel_ext(temp_surface[0], _spr_pos[0], _spr_pos[1]);
var empty = empPx == 0.; var empty = empPx == 0.;
if(!empty) { if(!empty) {
@ -410,10 +410,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
var _out = getInputData(7); var _out = getInputData(7);
if(_out == 1) { if(_out == 1) {
outputs[| 0].setValue(surf_array);
update_on_frame = false; update_on_frame = false;
//outputs[| 0].setValue(temp_surface[0]);
return; return;
} }

View file

@ -281,7 +281,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
var _keyIndex; var _keyIndex;
if(_time >= _len) _keyIndex = 999_999; if(_time >= _len) _keyIndex = 999_999;
else if(_time < _len) _keyIndex = 0; else if(_time <= 0) _keyIndex = 0;
else _keyIndex = key_map[_time]; else _keyIndex = key_map[_time];
if(_keyIndex == -1) { #region Before first key if(_keyIndex == -1) { #region Before first key
@ -317,7 +317,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
return lerpValue(from, to, _lrp); return lerpValue(from, to, _lrp);
} }
return processType(values[| ds_list_size(values) - 1].value); //First frame return processType(values[| ds_list_size(values) - 1].value); //Last frame
} #endregion } #endregion
#region In between #region In between

View file

@ -93,11 +93,15 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
} #endregion } #endregion
static processData = function(_output, _data, _output_index, _array_index = 0) { #region static processData = function(_output, _data, _output_index, _array_index = 0) { #region
var _res = _data[1]? round(_data[0]) : _data[0]; var _dat = _data[0];
if(!is_numeric(_res)) _res = real(_res); var _int = _data[1];
display_output = _res; if(is_array(_dat)) return _dat;
return _res; if(!is_numeric(_dat)) _dat = real(_dat);
if(_int) _dat = round(_dat);
display_output = _dat;
return _dat;
} #endregion } #endregion
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region

View file

@ -50,7 +50,15 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
var _tr = _data[2]; var _tr = _data[2];
var _dr = floor(_data[3] / 90) % 4; var _dr = floor(_data[3] / 90) % 4;
if(_dr < 0) _dr = 4 + _dr; if(_dr < 0) _dr = 4 + _dr;
if(_it <= 0) return _outSurf; if(_it <= 0) {
surface_set_target(_outSurf);
BLEND_OVERRIDE;
draw_surface_safe(_in, 0, 0);
BLEND_NORMAL;
surface_reset_target();
return _outSurf;
}
var sw = surface_get_width_safe(_outSurf); var sw = surface_get_width_safe(_outSurf);
var sh = surface_get_height_safe(_outSurf); var sh = surface_get_height_safe(_outSurf);

View file

@ -235,7 +235,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
NODE_PAGE_DEFAULT = ds_list_size(NODE_CATEGORY); NODE_PAGE_DEFAULT = ds_list_size(NODE_CATEGORY);
ADD_NODE_PAGE = NODE_PAGE_DEFAULT; ADD_NODE_PAGE = NODE_PAGE_DEFAULT;
var fav = ds_list_create(); var fav = ds_list_create();
addNodeCatagory("Favourites", fav); addNodeCatagory("Favourites", fav);

View file

@ -1,6 +1,7 @@
function Node_Time_Remap(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Time_Remap(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Time Remap"; name = "Time Remap";
use_cache = CACHE_USE.manual; use_cache = CACHE_USE.manual;
update_on_frame = true;
shader = sh_time_remap; shader = sh_time_remap;
uniform_map = shader_get_sampler_index(shader, "map"); uniform_map = shader_get_sampler_index(shader, "map");

View file

@ -154,7 +154,7 @@ function Panel_Collection() : PanelContent() constructor {
var node_list = ds_list_size(nodes); var node_list = ds_list_size(nodes);
var node_count = node_list + array_length(steamNode); var node_count = node_list + array_length(steamNode);
var frame = current_time * PREFERENCES.collection_preview_speed / 3000; var frame = PREFERENCES.collection_animated? current_time * PREFERENCES.collection_preview_speed / 3000 : 0;
var _cw = contentPane.surface_w; var _cw = contentPane.surface_w;
var _hover = pHOVER && contentPane.hover; var _hover = pHOVER && contentPane.hover;
var hh = 0; var hh = 0;
@ -240,7 +240,7 @@ function Panel_Collection() : PanelContent() constructor {
draw_sprite_ui_uniform(THEME.steam_creator, 0, _boxx + grid_size - ui(8), yy + ui(12), 1, COLORS._main_icon_dark, 1); draw_sprite_ui_uniform(THEME.steam_creator, 0, _boxx + grid_size - ui(8), yy + ui(12), 1, COLORS._main_icon_dark, 1);
} }
if(meta.version != SAVE_VERSION) { if(floor(meta.version) != floor(SAVE_VERSION)) {
draw_set_color(COLORS._main_accent); draw_set_color(COLORS._main_accent);
draw_circle_prec(_boxx + grid_size - ui(8), yy + grid_size - ui(8), 3, false); draw_circle_prec(_boxx + grid_size - ui(8), yy + grid_size - ui(8), 3, false);
} }

View file

@ -46,7 +46,6 @@
PREFERENCES.node_show_render_status = false; PREFERENCES.node_show_render_status = false;
PREFERENCES.node_show_time = true; PREFERENCES.node_show_time = true;
PREFERENCES.collection_preview_speed = 60;
PREFERENCES.expand_hover = false; PREFERENCES.expand_hover = false;
PREFERENCES.graph_zoom_smoooth = 4; PREFERENCES.graph_zoom_smoooth = 4;
@ -89,6 +88,10 @@
PREFERENCES.gifski_path = "%APP%/gifski/"; PREFERENCES.gifski_path = "%APP%/gifski/";
PREFERENCES.ffmpeg_path = "%APP%/ffmpeg/"; PREFERENCES.ffmpeg_path = "%APP%/ffmpeg/";
PREFERENCES.collection_animated = true;
PREFERENCES.collection_preview_speed = 60;
PREFERENCES.collection_scale = 1;
PREFERENCES_DEF = variable_clone(PREFERENCES); PREFERENCES_DEF = variable_clone(PREFERENCES);
#endregion #endregion

View file

@ -94,9 +94,11 @@ function rotator(_onModify, _step = -1) : widget() constructor {
var amo = 1; var amo = 1;
if(key_mod_press(CTRL)) amo *= 10; if(key_mod_press(CTRL)) amo *= 10;
if(key_mod_press(ALT)) amo /= 10; if(key_mod_press(ALT)) amo /= 10;
if(mouse_wheel_down()) onModify(_data + amo * SCROLL_SPEED); if(key_mod_press(SHIFT)) {
if(mouse_wheel_up()) onModify(_data - amo * SCROLL_SPEED); if(mouse_wheel_down()) onModify(_data + amo * SCROLL_SPEED);
if(mouse_wheel_up()) onModify(_data - amo * SCROLL_SPEED);
}
} else { } else {
draw_sprite(spr_knob, 0, px, py); draw_sprite(spr_knob, 0, px, py);
} }

View file

@ -22,7 +22,7 @@ void main() {
vec2 tx = (cls + vec2(i, j)) / dimension; vec2 tx = (cls + vec2(i, j)) / dimension;
vec4 col = texture2D( gm_BaseTexture, tx ); vec4 col = texture2D( gm_BaseTexture, tx );
if((empty == 1 && col.a != 0.) || (empty == 0 && col != color)) { if((empty == 0 && col != color) || (empty == 1 && col.a != 0.)) {
gl_FragColor = col; gl_FragColor = col;
return; return;
} }