This commit is contained in:
Tanasart 2025-02-23 08:49:09 +07:00
parent 1a9e011f52
commit 217ce3aef2
10 changed files with 117 additions and 95 deletions

View file

@ -1452,6 +1452,7 @@
{"name":"surface_exr_encode","order":8,"path":"scripts/surface_exr_encode/surface_exr_encode.yy",},
{"name":"surface_functions","order":7,"path":"scripts/surface_functions/surface_functions.yy",},
{"name":"surface_get_palette","order":5,"path":"scripts/surface_get_palette/surface_get_palette.yy",},
{"name":"surface_sampler","order":10,"path":"scripts/surface_sampler/surface_sampler.yy",},
{"name":"surfaceBox","order":9,"path":"scripts/surfaceBox/surfaceBox.yy",},
{"name":"surfaceDynaBox","order":17,"path":"scripts/surfaceDynaBox/surfaceDynaBox.yy",},
{"name":"svg_objects","order":1,"path":"scripts/svg_objects/svg_objects.yy",},
@ -1746,7 +1747,6 @@
{"name":"sh_noise_cristal","order":43,"path":"shaders/sh_noise_cristal/sh_noise_cristal.yy",},
{"name":"sh_noise_fbm","order":7,"path":"shaders/sh_noise_fbm/sh_noise_fbm.yy",},
{"name":"sh_noise_flow","order":41,"path":"shaders/sh_noise_flow/sh_noise_flow.yy",},
{"name":"surface_sampler","order":10,"path":"scripts/surface_sampler/surface_sampler.yy",},
{"name":"sh_noise_fold","order":33,"path":"shaders/sh_noise_fold/sh_noise_fold.yy",},
{"name":"sh_noise_gabor","order":27,"path":"shaders/sh_noise_gabor/sh_noise_gabor.yy",},
{"name":"sh_noise_grid_hex","order":11,"path":"shaders/sh_noise_grid_hex/sh_noise_grid_hex.yy",},

View file

@ -1326,7 +1326,11 @@
{"$GMIncludedFile":"","%Name":"Canvas.png","CopyToMask":-1,"filePath":"datafiles/data/Welcome files/Templates","name":"Canvas.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"Canvas.pxc","CopyToMask":-1,"filePath":"datafiles/data/Welcome files/Templates","name":"Canvas.pxc","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"Welcome files.zip","CopyToMask":-1,"filePath":"datafiles/data/Welcome files","name":"Welcome files.zip","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"dllcredits.txt","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":0,"filePath":"datafiles","name":"dllcredits.txt","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"dllcredits.txt","ConfigValues":{
"Itch":{
"CopyToMask":"0",
},
},"CopyToMask":0,"filePath":"datafiles","name":"dllcredits.txt","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"dlltest1.dll","CopyToMask":-1,"filePath":"datafiles","name":"dlltest1.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"ffmpeg.exe","CopyToMask":-1,"filePath":"datafiles/ffmpeg/bin","name":"ffmpeg.exe","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"LICENSE","CopyToMask":-1,"filePath":"datafiles/ffmpeg","name":"LICENSE","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
@ -1345,7 +1349,11 @@
{"$GMIncludedFile":"","%Name":"mf.dll","CopyToMask":-1,"filePath":"datafiles","name":"mf.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"mfcore.dll","CopyToMask":-1,"filePath":"datafiles","name":"mfcore.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"mfplat.dll","CopyToMask":-1,"filePath":"datafiles","name":"mfplat.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"PixelComposer_profile-2.provisionprofile","ConfigValues":{"Itch":{"CopyToMask":"2",},},"CopyToMask":-1,"filePath":"datafiles","name":"PixelComposer_profile-2.provisionprofile","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"PixelComposer_profile-2.provisionprofile","ConfigValues":{
"Itch":{
"CopyToMask":"2",
},
},"CopyToMask":-1,"filePath":"datafiles","name":"PixelComposer_profile-2.provisionprofile","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"data.win","CopyToMask":-1,"filePath":"datafiles/report","name":"data.win","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"execute_shell_simple_ext_x64.dll","CopyToMask":-1,"filePath":"datafiles/report","name":"execute_shell_simple_ext_x64.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"options.ini","CopyToMask":-1,"filePath":"datafiles/report","name":"options.ini","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
@ -1355,6 +1363,7 @@
{"$GMIncludedFile":"","%Name":"CommonPS.hlsl","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"CommonPS.hlsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"CommonVS.hlsl","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"CommonVS.hlsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"rubber_duck_toy_1k.bin","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"rubber_duck_toy_1k.bin","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"curve.glsl","CopyToMask":-1,"filePath":"datafiles/Shaders","name":"curve.glsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"sampler_simple.glsl","CopyToMask":-1,"filePath":"datafiles/Shaders","name":"sampler_simple.glsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"sampler.glsl","CopyToMask":-1,"filePath":"datafiles/Shaders","name":"sampler.glsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"shader_replace.py","CopyToMask":-1,"filePath":"datafiles/Shaders","name":"shader_replace.py","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
@ -1493,7 +1502,6 @@
{"id":{"name":"Obj_FirebaseREST_Listener_On_firestore_collection","path":"objects/Obj_FirebaseREST_Listener_On_firestore_collection/Obj_FirebaseREST_Listener_On_firestore_collection.yy",},},
{"id":{"name":"Obj_FirebaseREST_Listener_On_firestore_document","path":"objects/Obj_FirebaseREST_Listener_On_firestore_document/Obj_FirebaseREST_Listener_On_firestore_document.yy",},},
{"id":{"name":"Obj_FirebaseREST_Listener_On_Firestore","path":"objects/Obj_FirebaseREST_Listener_On_Firestore/Obj_FirebaseREST_Listener_On_Firestore.yy",},},
{"id":{"name":"surface_sampler","path":"scripts/surface_sampler/surface_sampler.yy",},},
{"id":{"name":"Obj_FirebaseREST_Listener_Once_Firestore","path":"objects/Obj_FirebaseREST_Listener_Once_Firestore/Obj_FirebaseREST_Listener_Once_Firestore.yy",},},
{"id":{"name":"oRigidbody","path":"objects/oRigidbody/oRigidbody.yy",},},
{"id":{"name":"project_loader","path":"objects/project_loader/project_loader.yy",},},
@ -2713,6 +2721,7 @@
{"id":{"name":"surface_exr_encode","path":"scripts/surface_exr_encode/surface_exr_encode.yy",},},
{"id":{"name":"surface_functions","path":"scripts/surface_functions/surface_functions.yy",},},
{"id":{"name":"surface_get_palette","path":"scripts/surface_get_palette/surface_get_palette.yy",},},
{"id":{"name":"surface_sampler","path":"scripts/surface_sampler/surface_sampler.yy",},},
{"id":{"name":"surfaceBox","path":"scripts/surfaceBox/surfaceBox.yy",},},
{"id":{"name":"surfaceDynaBox","path":"scripts/surfaceDynaBox/surfaceDynaBox.yy",},},
{"id":{"name":"svg_objects","path":"scripts/svg_objects/svg_objects.yy",},},

Binary file not shown.

View file

@ -43,8 +43,8 @@
LATEST_VERSION = 1_18_00_0;
VERSION = 1_18_08_0;
SAVE_VERSION = 1_18_09_1;
VERSION_STRING = MAC? "1.18.003m" : "1.18.9.011";
BUILD_NUMBER = 118080.011;
VERSION_STRING = MAC? "1.18.003m" : "1.18.9.012";
BUILD_NUMBER = 118080.012;
PREF_VERSION = 1_17_1;
var _vsp = string_split(VERSION_STRING, ".");

View file

@ -119,22 +119,22 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
draw_name = true;
draggable = true;
draw_boundary = [ 0, 0, 0, 0 ];
draw_graph_culled = false;
draw_boundary = [ 0, 0, 0, 0 ];
draw_graph_culled = false;
badgePreview = 0;
badgeInspect = 0;
badgePreview = 0;
badgeInspect = 0;
active_drawing = false;
active_draw_index = -1;
active_draw_anchor = false;
active_drawing = false;
active_draw_index = -1;
active_draw_anchor = false;
draw_droppable = false;
draw_droppable = false;
junction_draw_pad_y = 32;
junction_draw_hei_y = 24;
branch_drawing = false;
branch_drawing = false;
#endregion
#region ---- junctions ----
@ -1057,7 +1057,6 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
static doUpdateFull = function(frame = CURRENT_FRAME) {
if(project.safeMode) return;
if(NODE_EXTRACT) return;
render_timer = get_timer();
var _updateRender = !is_instanceof(self, Node_Collection) || !managedRenderOrder;
@ -1077,6 +1076,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
try {
if(attributes.update_graph) update(frame);
} catch(exception) {
var sCurr = surface_get_target();
while(surface_get_target() != sBase)

View file

@ -1,14 +1,8 @@
globalvar NODE_EXTRACT;
NODE_EXTRACT = false;
function __generate_node_data() { #region
CLONING = true;
var key = struct_get_names(ALL_NODES);
CLONING = true;
NODE_EXTRACT = true;
var dir = DIRECTORY + "Nodes/";
var dir = DIRECTORY + "Nodes/";
directory_verify(dir);
var data = {};

View file

@ -1,9 +1,8 @@
function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Tunnel In";
color = COLORS.node_blend_tunnel;
is_group_io = true;
preview_draw = false;
// custom_grid = 8;
set_default = false;
setDimension(32, 32);
@ -13,22 +12,25 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct
hover_alpha = 0;
preview_connecting = false;
preview_scale = 1;
junction_hover = false;
preview_scale = 1;
junction_hover = false;
error_notification = noone;
var tname = "";
if(!LOADING && !APPENDING) tname = $"tunnel{ds_map_size(project.tunnels_in_map)}";
__jfrom = noone;
__key = noone;
newInput(0, nodeValue_Text("Name", self, tname ))
newInput(0, nodeValue_Text("Name", self, LOADING || APPENDING? "" : $"tunnel{ds_map_size(project.tunnels_in_map)}" ))
.rejectArray();
newInput(1, nodeValue("Value in", self, CONNECT_TYPE.input, VALUE_TYPE.any, noone ))
.setVisible(true, true);
error_notification = noone;
setTrigger(2, "Create tunnel out", [ THEME.tunnel, 0, c_white ]);
inputs[0].is_modified = true;
////- Update
static onInspector2Update = function() {
var _node = nodeBuild("Node_Tunnel_Out", x + 128, y).skipDefault();
var _key = inputs[0].getValue();
@ -36,14 +38,11 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct
_node.inputs[0].setValue(_key);
}
__jfrom = noone;
__key = noone;
static update = function(frame = CURRENT_FRAME) {
var _key = inputs[0].getValue();
var _frm = inputs[1].value_from;
if(_key != __key) onValueUpdate();
if(_key != __key) checkKey();
if(_frm != __jfrom) {
inputs[1].setType( _frm? _frm.type : VALUE_TYPE.any);
@ -53,18 +52,22 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct
__key = _key;
__jfrom = _frm;
value_validation[VALIDATION.error] = error_notification != noone;
}
static resetMap = function() {
if(__key != noone) ds_map_delete(project.tunnels_in, __key);
var _key = inputs[0].getValue();
project.tunnels_in_map[? node_id] = _key;
project.tunnels_in[? _key] = inputs[1];
}
resetMap();
static checkDuplicate = function() {
var _key = inputs[0].getValue();
if(_key == "") return;
var amo = ds_map_size(project.tunnels_in_map);
var k = ds_map_find_first(project.tunnels_in_map);
var dup = false;
@ -78,24 +81,25 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct
if(dup && error_notification == noone) {
error_notification = noti_error($"Duplicated key: {_key}");
error_notification.onClick = function() { PANEL_GRAPH.focusNode(self); };
error_notification.onClick = function() /*=>*/ {return PANEL_GRAPH.focusNode(self)};
} else if(!dup && error_notification) {
noti_remove(error_notification);
error_notification = noone;
}
}
static onValueUpdate = function(index = -1) {
static checkKey = function() {
var _key = inputs[0].getValue();
resetMap();
var amo = ds_map_size(project.tunnels_in_map);
var k = ds_map_find_first(project.tunnels_in_map);
var k = ds_map_find_first(project.tunnels_in_map), _n;
repeat(amo) {
var _n = project.nodeMap[? k];
_n = project.nodeMap[? k];
k = ds_map_find_next(project.tunnels_in_map, k);
if(!is_instanceof(_n, Node_Tunnel_In)) continue;
if(!is(_n, Node_Tunnel_In)) continue;
if(!_n.active) continue;
_n.resetMap();
@ -103,48 +107,42 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct
var k = ds_map_find_first(project.tunnels_in_map);
repeat(amo) {
var _n = project.nodeMap[? k];
_n = project.nodeMap[? k];
k = ds_map_find_next(project.tunnels_in_map, k);
if(!is_instanceof(_n, Node_Tunnel_In)) continue;
if(!is(_n, Node_Tunnel_In)) continue;
if(!_n.active) continue;
_n.checkDuplicate();
}
}
static onValueUpdate = function(index = -1) {
checkKey();
if(index == 0) { RENDER_ALL_REORDER }
}
static step = function() {
value_validation[VALIDATION.error] = error_notification != noone;
}
static getNextNodes = function(checkLoop = false) {
var nodes = [];
var nodeNames = [];
var _key = inputs[0].getValue();
var amo = ds_map_size(project.tunnels_out);
var k = ds_map_find_first(project.tunnels_out);
var nodes = [];
var _key = inputs[0].getValue();
var amo = ds_map_size(project.tunnels_out);
var k = ds_map_find_first(project.tunnels_out);
LOG_BLOCK_START();
LOG_IF(global.FLAG.render == 1, $"→→→→→ Call get next node from: {INAME}");
repeat(amo) {
if(project.tunnels_out[? k] == _key) {
array_push(nodes, PROJECT.nodeMap[? k]);
array_push(nodeNames, PROJECT.nodeMap[? k].internalName);
}
if(project.tunnels_out[? k] == _key)
array_push(nodes, project.nodeMap[? k]);
k = ds_map_find_next(project.tunnels_out, k);
}
LOG_IF(global.FLAG.render == 1, $"→→ Push {nodeNames} to queue.");
LOG_BLOCK_END();
return nodes;
}
/////////////////////////////////////////////////////////////////////////////
////- Draw
static pointIn = function(_x, _y, _mx, _my, _s) {
var xx = x * _s + _x;
@ -273,6 +271,8 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct
return drawJunctions(_draw, _x, _y, _mx, _my, _s);
}
////- Actions
static onClone = function() { onValueUpdate(0); }
static postConnect = function() {
@ -294,4 +294,8 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct
resetMap();
}
////- Init
resetMap();
}

View file

@ -1,8 +1,8 @@
function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Tunnel Out";
color = COLORS.node_blend_tunnel;
is_group_io = true;
preview_draw = false;
set_default = false;
setDimension(32, 32);
@ -12,19 +12,21 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc
hover_alpha = 0;
preview_connecting = false;
preview_scale = 1;
junction_hover = false;
preview_scale = 1;
junction_hover = false;
var tname = "";
if(!LOADING && !APPENDING && !ds_map_empty(project.tunnels_in))
tname = ds_map_find_first(project.tunnels_in);
__key = noone;
newInput(0, nodeValue_Text("Name", self, tname ))
newInput(0, nodeValue_Text("Name", self, LOADING || APPENDING? "" : ds_map_find_first(project.tunnels_in) ))
.setDisplay(VALUE_DISPLAY.text_tunnel)
.rejectArray();
newOutput(0, nodeValue_Output("Value out", self, VALUE_TYPE.any, noone ));
inputs[0].is_modified = true;
////- Update
setTrigger(2, "Goto tunnel in", [ THEME.tunnel, 1, c_white ]);
static onInspector2Update = function() {
@ -35,31 +37,22 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc
graphFocusNode(_node);
}
static isRenderable = function() {
var _key = inputs[0].getValue();
if(!ds_map_exists(project.tunnels_in, _key)) return false;
return project.tunnels_in[? _key].node.rendered;
}
static onValueUpdate = function(index = -1) {
var _key = inputs[0].getValue();
resetMap();
if(index == 0) { RENDER_ALL_REORDER }
}
static step = function() {
var _key = inputs[0].getValue();
project.tunnels_out[? node_id] = _key;
}
static update = function(frame = CURRENT_FRAME) {
var _key = inputs[0].getValue();
__key = inputs[0].getValue();
if(ds_map_exists(project.tunnels_in, __key)) {
var _inputNode = project.tunnels_in[? __key];
outputs[0].setType(_inputNode.type);
outputs[0].setDisplay(_inputNode.display_type);
outputs[0].setValue(_inputNode.getValue());
if(ds_map_exists(project.tunnels_in, _key)) {
outputs[0].setType(project.tunnels_in[? _key].type);
outputs[0].setDisplay(project.tunnels_in[? _key].display_type);
outputs[0].setValue(project.tunnels_in[? _key].getValue());
} else {
outputs[0].setType(VALUE_TYPE.any);
outputs[0].setDisplay(VALUE_DISPLAY._default);
@ -68,7 +61,19 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc
outputs[0].updateColor();
}
/////////////////////////////////////////////////////////////////////////////
static resetMap = function() {
var _key = inputs[0].getValue();
project.tunnels_out[? node_id] = _key;
}
static isRenderable = function() {
var _key = inputs[0].getValue();
if(!ds_map_exists(project.tunnels_in, _key)) return false;
return project.tunnels_in[? _key].node.rendered;
}
////- Draw
static pointIn = function(_x, _y, _mx, _my, _s) {
var xx = x * _s + _x;
@ -100,11 +105,11 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc
hover |= tun && tun.tunnel_hover == self;
if(!hover) return;
var _key = inputs[0].getValue();
if(!ds_map_exists(project.tunnels_in, _key)) return;
if(!ds_map_exists(project.tunnels_in, __key)) return;
var node = project.tunnels_in[? _key].node;
var node = project.tunnels_in[? __key].node;
if(node.group != group) return;
if(node.__key != __key) return;
preview_connecting = true;
node.preview_connecting = true;
@ -189,7 +194,18 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc
return drawJunctions(_draw, _x, _y, _mx, _my, _s);
}
////- Actions
static onClone = function() { onValueUpdate(0); }
static postConnect = function() { step(); onValueUpdate(0); }
static onRestore = function() {
resetMap();
}
////- Init
resetMap();
}

View file

@ -37,7 +37,6 @@ function Panel_Node_Data_Gen() : PanelContent() constructor {
cur = 0;
LOADING = true;
NODE_EXTRACT = true;
dir = DIRECTORY + "Nodes/";
directory_verify(dir);

View file

@ -18,7 +18,7 @@ function Panel_Tunnels() : PanelContent() constructor {
for (var i = 0, n = array_length(PROJECT.allNodes); i < n; i++) {
var node = PROJECT.allNodes[i];
if(instanceof(node) == "Node_Tunnel_In")
if(is(node, Node_Tunnel_In))
array_push(tunnel_ins, node);
}
}