This commit is contained in:
Tanasart 2023-05-22 20:31:55 +02:00
parent d3be891899
commit 6ca1dc9286
51 changed files with 799 additions and 239 deletions

View file

@ -67,6 +67,7 @@
{"name":"3D","order":7,"path":"folders/nodes/data/3D.yy",},
{"name":"primitive","order":19,"path":"folders/nodes/data/3D/primitive.yy",},
{"name":"animation","order":5,"path":"folders/nodes/data/animation.yy",},
{"name":"audio","order":21,"path":"folders/nodes/data/audio.yy",},
{"name":"compose","order":15,"path":"folders/nodes/data/compose.yy",},
{"name":"feedback","order":14,"path":"folders/nodes/data/feedback.yy",},
{"name":"filter","order":1,"path":"folders/nodes/data/filter.yy",},
@ -566,6 +567,7 @@
{"name":"node_palette","order":4,"path":"scripts/node_palette/node_palette.yy",},
{"name":"buttonColor","order":3,"path":"scripts/buttonColor/buttonColor.yy",},
{"name":"notification_system","order":7,"path":"scripts/notification_system/notification_system.yy",},
{"name":"s_node_audio_trim","order":3,"path":"sprites/s_node_audio_trim/s_node_audio_trim.yy",},
{"name":"node_color_from_hsv","order":8,"path":"scripts/node_color_from_hsv/node_color_from_hsv.yy",},
{"name":"s_node_image_copy","order":6,"path":"sprites/s_node_image_copy/s_node_image_copy.yy",},
{"name":"node_boolean","order":17,"path":"scripts/node_boolean/node_boolean.yy",},
@ -1082,6 +1084,7 @@
{"name":"oRigidbody","order":2,"path":"objects/oRigidbody/oRigidbody.yy",},
{"name":"node_grey_to_alpha","order":4,"path":"scripts/node_grey_to_alpha/node_grey_to_alpha.yy",},
{"name":"sh_blend_add","order":7,"path":"shaders/sh_blend_add/sh_blend_add.yy",},
{"name":"s_node_FFT","order":15,"path":"sprites/s_node_FFT/s_node_FFT.yy",},
{"name":"node_de_stray","order":1,"path":"scripts/node_de_stray/node_de_stray.yy",},
{"name":"sh_channel_G","order":2,"path":"shaders/sh_channel_G/sh_channel_G.yy",},
{"name":"s_node_dilate","order":19,"path":"sprites/s_node_dilate/s_node_dilate.yy",},
@ -1125,7 +1128,7 @@
{"name":"node_3d_combine","order":10,"path":"scripts/node_3d_combine/node_3d_combine.yy",},
{"name":"fd_rectangle_add_material","order":4,"path":"scripts/fd_rectangle_add_material/fd_rectangle_add_material.yy",},
{"name":"fd_rectangle_set_target","order":18,"path":"scripts/fd_rectangle_set_target/fd_rectangle_set_target.yy",},
{"name":"node_wav_file_read","order":16,"path":"scripts/node_wav_file_read/node_wav_file_read.yy",},
{"name":"node_wav_file_read","order":2,"path":"scripts/node_wav_file_read/node_wav_file_read.yy",},
{"name":"draw_line_dashed","order":7,"path":"scripts/draw_line_dashed/draw_line_dashed.yy",},
{"name":"pseudo_regex","order":7,"path":"scripts/pseudo_regex/pseudo_regex.yy",},
{"name":"node_invert","order":6,"path":"scripts/node_invert/node_invert.yy",},
@ -1162,6 +1165,7 @@
{"name":"sh_displace","order":5,"path":"shaders/sh_displace/sh_displace.yy",},
{"name":"fd_rectangle_get_material_height","order":10,"path":"scripts/fd_rectangle_get_material_height/fd_rectangle_get_material_height.yy",},
{"name":"rangeBox","order":10,"path":"scripts/rangeBox/rangeBox.yy",},
{"name":"s_node_array_copy","order":14,"path":"sprites/s_node_array_copy/s_node_array_copy.yy",},
{"name":"node_VFX_effect_accelerate","order":7,"path":"scripts/node_VFX_effect_accelerate/node_VFX_effect_accelerate.yy",},
{"name":"node_flood_fill","order":26,"path":"scripts/node_flood_fill/node_flood_fill.yy",},
{"name":"node_frame","order":1,"path":"scripts/node_frame/node_frame.yy",},

View file

@ -90,6 +90,7 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"3D","folderPath":"folders/nodes/data/3D.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"primitive","folderPath":"folders/nodes/data/3D/primitive.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"animation","folderPath":"folders/nodes/data/animation.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"audio","folderPath":"folders/nodes/data/audio.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"compose","folderPath":"folders/nodes/data/compose.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"feedback","folderPath":"folders/nodes/data/feedback.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"filter","folderPath":"folders/nodes/data/filter.yy",},
@ -550,8 +551,10 @@
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_curve_connection.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_grid_setting.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_grid_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_keyframe_override.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_minimap_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_output_visibility.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_play_sound.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_preview_export.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_reset_when_preview_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_revert.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
@ -1327,6 +1330,7 @@
{"id":{"name":"node_palette","path":"scripts/node_palette/node_palette.yy",},},
{"id":{"name":"buttonColor","path":"scripts/buttonColor/buttonColor.yy",},},
{"id":{"name":"notification_system","path":"scripts/notification_system/notification_system.yy",},},
{"id":{"name":"s_node_audio_trim","path":"sprites/s_node_audio_trim/s_node_audio_trim.yy",},},
{"id":{"name":"sh_shadow_cast","path":"shaders/sh_shadow_cast/sh_shadow_cast.yy",},},
{"id":{"name":"node_color_from_hsv","path":"scripts/node_color_from_hsv/node_color_from_hsv.yy",},},
{"id":{"name":"s_node_image_copy","path":"sprites/s_node_image_copy/s_node_image_copy.yy",},},
@ -1393,6 +1397,7 @@
{"id":{"name":"sh_blend_subtract","path":"shaders/sh_blend_subtract/sh_blend_subtract.yy",},},
{"id":{"name":"BBMOD_Vec4","path":"scripts/BBMOD_Vec4/BBMOD_Vec4.yy",},},
{"id":{"name":"o_dialog_file_name","path":"objects/o_dialog_file_name/o_dialog_file_name.yy",},},
{"id":{"name":"node_audio_window","path":"scripts/node_audio_window/node_audio_window.yy",},},
{"id":{"name":"panel_animation","path":"scripts/panel_animation/panel_animation.yy",},},
{"id":{"name":"node_surface_replace","path":"scripts/node_surface_replace/node_surface_replace.yy",},},
{"id":{"name":"node_strand_create","path":"scripts/node_strand_create/node_strand_create.yy",},},
@ -1916,6 +1921,7 @@
{"id":{"name":"oRigidbody","path":"objects/oRigidbody/oRigidbody.yy",},},
{"id":{"name":"node_grey_to_alpha","path":"scripts/node_grey_to_alpha/node_grey_to_alpha.yy",},},
{"id":{"name":"sh_blend_add","path":"shaders/sh_blend_add/sh_blend_add.yy",},},
{"id":{"name":"s_node_FFT","path":"sprites/s_node_FFT/s_node_FFT.yy",},},
{"id":{"name":"node_de_stray","path":"scripts/node_de_stray/node_de_stray.yy",},},
{"id":{"name":"sh_channel_G","path":"shaders/sh_channel_G/sh_channel_G.yy",},},
{"id":{"name":"s_node_dilate","path":"sprites/s_node_dilate/s_node_dilate.yy",},},
@ -2006,6 +2012,7 @@
{"id":{"name":"node_group","path":"scripts/node_group/node_group.yy",},},
{"id":{"name":"fd_rectangle_get_material_height","path":"scripts/fd_rectangle_get_material_height/fd_rectangle_get_material_height.yy",},},
{"id":{"name":"rangeBox","path":"scripts/rangeBox/rangeBox.yy",},},
{"id":{"name":"s_node_array_copy","path":"sprites/s_node_array_copy/s_node_array_copy.yy",},},
{"id":{"name":"node_VFX_effect_accelerate","path":"scripts/node_VFX_effect_accelerate/node_VFX_effect_accelerate.yy",},},
{"id":{"name":"node_flood_fill","path":"scripts/node_flood_fill/node_flood_fill.yy",},},
{"id":{"name":"node_frame","path":"scripts/node_frame/node_frame.yy",},},

Binary file not shown.

View file

@ -153,7 +153,7 @@ if(!ready) exit;
#endregion
#region debug
if(global.DEBUG_FLAG[$ "context_menu_id"]) {
if(global.FLAG[$ "context_menu_id"]) {
draw_set_color(c_white);
draw_rectangle_border(dialog_x, dialog_y, dialog_x + dialog_w, dialog_y + dialog_h, 2);

View file

@ -134,7 +134,7 @@ if(OS == os_windows && gameframe_is_minimized()) exit;
#endregion
#region debug
if(global.DEBUG_FLAG[$ "hover_element"]) {
if(global.FLAG[$ "hover_element"]) {
draw_set_text(f_p0, fa_right, fa_bottom, COLORS._main_text);
if(HOVERING_ELEMENT)
draw_text(WIN_W, WIN_H, $"[{instanceof(HOVERING_ELEMENT)}]");

View file

@ -1,4 +1,8 @@
#region anomation class
#region global
global.FLAG.keyframe_override = true;
#endregion
#region animation class
function AnimationManager() constructor {
frames_total = 30;
current_frame = 0;
@ -59,6 +63,11 @@
ANIMATOR.frame_progress = true;
}
static play = function() {
ANIMATOR.is_playing = true;
ANIMATOR.frame_progress = true;
}
static resume = function() {
ANIMATOR.is_playing = true;
ANIMATOR.frame_progress = true;

View file

@ -45,7 +45,7 @@ enum _BIN_TYPE {
//Subtract = 17
//Divide = 18
global.DEBUG_FLAG.ase_import = false;
global.FLAG.ase_import = false;
globalvar __ase_format_header;
__ase_format_header = [
@ -343,17 +343,17 @@ function read_format_array(bin, formatArr, outMap) {
continue;
var pos = file_bin_position(bin);
var val = read_format(bin, formatArr[i], outMap);
//printIf(global.DEBUG_FLAG.ase_import, "Pos " + dec_to_hex(pos) + " - " + dec_to_hex(file_bin_position(bin)));
//printIf(global.FLAG.ase_import, "Pos " + dec_to_hex(pos) + " - " + dec_to_hex(file_bin_position(bin)));
if(formatArr[i][1] == "Type")
printIf(global.DEBUG_FLAG.ase_import, "\t" + formatArr[i][1] + ":\t 0x" + dec_to_hex(val, 4));
printIf(global.FLAG.ase_import, "\t" + formatArr[i][1] + ":\t 0x" + dec_to_hex(val, 4));
else
printIf(global.DEBUG_FLAG.ase_import, "\t" + formatArr[i][1] + ":\t " + string(val));
printIf(global.FLAG.ase_import, "\t" + formatArr[i][1] + ":\t " + string(val));
}
}
function read_ase(path, fileMap) {
printIf(global.DEBUG_FLAG.ase_import, "===== Reading: " + path + " =====");
printIf(global.FLAG.ase_import, "===== Reading: " + path + " =====");
var file = file_bin_open(path, 0);
file_bin_seek(file, 0);
@ -363,7 +363,7 @@ function read_ase(path, fileMap) {
var frames = [];
var frameAmo = ds_map_exists(fileMap, "Frame amount")? fileMap[? "Frame amount"] : 0;
for( var i = 0; i < frameAmo; i++ ) {
printIf(global.DEBUG_FLAG.ase_import, "\n=== Reading frame " + string(i) + " ===");
printIf(global.FLAG.ase_import, "\n=== Reading frame " + string(i) + " ===");
array_push(frames, read_ase_frame(file));
}
fileMap[? "Frames"] = frames;
@ -384,7 +384,7 @@ function read_ase_frame(file) {
chunkAmo = ds_map_exists(frame, "Chunk amount new")? frame[? "Chunk amount new"] : chunkAmo;
for( var i = 0; i < chunkAmo; i++ ) {
printIf(global.DEBUG_FLAG.ase_import, "\n=== Reading chunk " + string(i) + " ===");
printIf(global.FLAG.ase_import, "\n=== Reading chunk " + string(i) + " ===");
array_push(chunks, read_ase_chunk(file));
}
frame[? "Chunks"] = chunks;
@ -403,7 +403,7 @@ function read_ase_chunk(file) {
switch(chunk[? "Type"]) {
case 0x0004: //old palette
case 0x0011: //old palette
printIf(global.DEBUG_FLAG.ase_import, "\n -- Reading chunk [Old palette] -- ");
printIf(global.FLAG.ase_import, "\n -- Reading chunk [Old palette] -- ");
read_format_array(file, __ase_format_chunk_old_palette, chunk);
var cc = [];
for( var i = 0; i < chunk[? "Packet amount"]; i++ ) {
@ -413,11 +413,11 @@ function read_ase_chunk(file) {
chunk[? "Packets"] = cc;
break;
case 0x2004: //layer
printIf(global.DEBUG_FLAG.ase_import, "\n -- Reading chunk [Layer] -- ");
printIf(global.FLAG.ase_import, "\n -- Reading chunk [Layer] -- ");
read_format_array(file, __ase_format_chunk_layer, chunk);
break;
case 0x2005: //cel
printIf(global.DEBUG_FLAG.ase_import, "\n -- Reading chunk [Cel] -- ");
printIf(global.FLAG.ase_import, "\n -- Reading chunk [Cel] -- ");
read_format_array(file, __ase_format_chunk_cel, chunk);
var type = chunk[? "Cel type"];
@ -443,7 +443,7 @@ function read_ase_chunk(file) {
var _rawBuff = buffer_decompress(_compBuff);
if(_rawBuff != -1) chunk[? "Buffer"] = _rawBuff;
printIf(global.DEBUG_FLAG.ase_import, " Buffer size: " + string(compressLength));
printIf(global.FLAG.ase_import, " Buffer size: " + string(compressLength));
buffer_delete(_compBuff);
break;
@ -456,7 +456,7 @@ function read_ase_chunk(file) {
case 0x2006: //cel extra
break;
case 0x2007: //color profile
printIf(global.DEBUG_FLAG.ase_import, "\n -- Reading chunk [Color profile] -- ");
printIf(global.FLAG.ase_import, "\n -- Reading chunk [Color profile] -- ");
read_format_array(file, __ase_format_chunk_color_profile, chunk);
break;
case 0x2008: //external file
@ -466,7 +466,7 @@ function read_ase_chunk(file) {
case 0x2017: //path
break;
case 0x2018: //tag
printIf(global.DEBUG_FLAG.ase_import, "\n -- Reading chunk [Tag] -- ");
printIf(global.FLAG.ase_import, "\n -- Reading chunk [Tag] -- ");
read_format_array(file, __ase_format_chunk_tag, chunk);
var amo = chunk[? "Tag amount"]
var tags = [];
@ -478,7 +478,7 @@ function read_ase_chunk(file) {
chunk[? "Tags"] = tags;
break;
case 0x2019: //palette
printIf(global.DEBUG_FLAG.ase_import, "\n -- Reading chunk [Palette] -- ");
printIf(global.FLAG.ase_import, "\n -- Reading chunk [Palette] -- ");
read_format_array(file, __ase_format_chunk_palette, chunk);
var cc = [];
for( var i = 0; i < chunk[? "Color amount"]; i++ ) {

View file

@ -3,12 +3,16 @@ function draw_sprite_fit(spr, ind, xx, yy, w, h, color = c_white, alpha = 1) {
draw_sprite_ext(spr, ind, xx, yy, ss, ss, 0, color, alpha);
}
function draw_surface_fit(surf, xx, yy, w, h) {
function draw_surface_fit(surf, xx, yy, w, h, color = c_white, alpha = 1) {
var ss = min(w / surface_get_width(surf), h / surface_get_height(surf));
draw_surface_ext_safe(surf, xx - surface_get_width(surf) * ss / 2, yy - surface_get_height(surf) * ss / 2, ss, ss);
draw_surface_ext_safe(surf, xx - surface_get_width(surf) * ss / 2, yy - surface_get_height(surf) * ss / 2, ss, ss,, color, alpha);
}
function draw_surface_stretch_fit(surf, xx, yy, w, h, sw, sh) {
var ss = min(w / sw, h / sh);
draw_surface_stretched_safe(surf, xx - sw * ss / 2, yy - sh * ss / 2, sw * ss, sh * ss);
}
function draw_surface_bbox(surf, bbox, color = c_white, alpha = 1) {
draw_surface_fit(surf, bbox.xc, bbox.yc, bbox.w, bbox.h, color, alpha);
}

View file

@ -174,5 +174,5 @@
#endregion
#region debug
global.DEBUG_FLAG = {};
global.FLAG = {};
#endregion

View file

@ -3,7 +3,7 @@ function Node_FFT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const
previewable = false;
w = 96;
h = 32 + 24;
h = 72;
min_h = h;
inputs[| 0] = nodeValue("Data", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
@ -24,13 +24,13 @@ function Node_FFT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const
var _r = [];
for( var i = 0; i < array_length(_res); i++ )
_r[i] = _res[i].re;
_r[i] = sqrt(sqr(_res[i].re) + sqr(_res[i].im));
return _r;
}
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
var bbox = drawGetBbox(xx, yy, _s);
draw_sprite_fit(s_node_array_reverse, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
draw_sprite_fit(s_node_FFT, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
}
}

View file

@ -12,7 +12,7 @@ function Node_Array_Copy(_x, _y, _group = noone) : Node(_x, _y, _group) construc
inputs[| 1] = nodeValue("Starting Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0);
inputs[| 2] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0);
inputs[| 2] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1);
outputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0)
.setArrayDepth(1);
@ -30,13 +30,6 @@ function Node_Array_Copy(_x, _y, _group = noone) : Node(_x, _y, _group) construc
var _ind = inputs[| 1].getValue();
var _siz = inputs[| 2].getValue();
var _a = _arr, _res = [];
for( var i = 0; i < array_length(_a); i++ ) {
var _aa = _a[i];
_res = _aa[_ind]
}
if(!is_array(_arr)) return;
var res = [];

View file

@ -0,0 +1,43 @@
function Node_Audio_Window(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Audio Window";
previewable = false;
w = 96;
h = 32 + 24;
min_h = h;
inputs[| 0] = nodeValue("Audio Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
.setArrayDepth(1)
.setVisible(true, true);
inputs[| 1] = nodeValue("Sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 44100);
inputs[| 2] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 64);
outputs[| 0] = nodeValue("Windowed Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [])
.setArrayDepth(1);
static update = function(frame = ANIMATOR.current_frame) {
var _arr = inputs[| 0].getValue();
if(!is_array(_arr)) return;
var sam = inputs[| 1].getValue();
var siz = inputs[| 2].getValue();
var res = [];
var off = frame / ANIMATOR.framerate * sam;
for( var i = 0; i < array_length(_arr); i++ ) {
var _dat = _arr[i];
res[i] = [];
array_copy(res[i], 0, _dat, off, siz);
}
outputs[| 0].setValue(res);
}
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
var bbox = drawGetBbox(xx, yy, _s);
draw_sprite_fit(s_node_audio_trim, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_audio_window",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "audio",
"path": "folders/nodes/data/audio.yy",
},
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "variable",
"path": "folders/nodes/data/variable.yy",
},
"resourceVersion": "1.0",
"name": "node_counter",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -143,7 +143,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
if(!_in.renderActive) continue;
array_push(nodes, _in);
LOG_IF(global.DEBUG_FLAG.render, "Check complete, push " + _in.name + " to stack.");
LOG_IF(global.FLAG.render, "Check complete, push " + _in.name + " to stack.");
}
LOG_BLOCK_END();
@ -152,7 +152,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
static setRenderStatus = function(result) {
LOG_BLOCK_START();
LOG_IF(global.DEBUG_FLAG.render, "Set render status for " + name + " : " + string(result));
LOG_IF(global.FLAG.render, "Set render status for " + name + " : " + string(result));
LOG_BLOCK_END();
rendered = result;
@ -376,10 +376,10 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
static resetRender = function() {
LOG_BLOCK_START();
LOG_IF(global.DEBUG_FLAG.render, "Reset Render for collection " + name);
LOG_IF(global.FLAG.render, "Reset Render for collection " + name);
for( var i = 0; i < ds_list_size(nodes); i++ ) {
LOG_IF(global.DEBUG_FLAG.render, "Reset Render for " + nodes[| i].name);
LOG_IF(global.FLAG.render, "Reset Render for " + nodes[| i].name);
nodes[| i].rendered = false;
}

View file

@ -292,7 +292,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
if(SAFE_MODE) return;
var sBase = surface_get_target();
LOG_BLOCK_START();
LOG_IF(global.DEBUG_FLAG.render, "DoUpdate called from " + name);
LOG_IF(global.FLAG.render, "DoUpdate called from " + name);
for( var i = 0; i < ds_list_size(inputs); i++ ) {
if(inputs[| i].type != VALUE_TYPE.trigger) continue;
@ -343,7 +343,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
static triggerRender = function() {
LOG_BLOCK_START();
LOG_IF(global.DEBUG_FLAG.render, "Trigger render for " + name + " (" + display_name + ")");
LOG_IF(global.FLAG.render, "Trigger render for " + name + " (" + display_name + ")");
setRenderStatus(false);
UPDATE |= RENDER_TYPE.partial;
@ -369,7 +369,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
if(!val_from.node.active) continue;
if(!val_from.node.renderActive) continue;
if(!val_from.node.rendered && !val_from.node.update_on_frame) {
//LOG_LINE_IF(global.DEBUG_FLAG.render && name == "Tunnel Out", "Non renderable because: " + string(val_from.node.name));
//LOG_LINE_IF(global.FLAG.render && name == "Tunnel Out", "Non renderable because: " + string(val_from.node.name));
return false;
}
}
@ -383,7 +383,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
var nodes = [];
LOG_BLOCK_START();
LOG_IF(global.DEBUG_FLAG.render, "Call get next node from: " + name);
LOG_IF(global.FLAG.render, "Call get next node from: " + name);
LOG_BLOCK_START();
for(var i = 0; i < ds_list_size(outputs); i++) {
@ -393,10 +393,10 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
var _to = _ot.value_to[| j];
if(!_to.node.active || _to.value_from == noone) continue;
LOG_IF(global.DEBUG_FLAG.render, "Check render " + _to.node.name + " from " + _to.value_from.node.name);
LOG_IF(global.FLAG.render, "Check render " + _to.node.name + " from " + _to.value_from.node.name);
if(_to.value_from.node != self) continue;
LOG_IF(global.DEBUG_FLAG.render, "Check complete, push " + _to.node.name + " to stack.");
LOG_IF(global.FLAG.render, "Check complete, push " + _to.node.name + " to stack.");
array_push(nodes, _to.node);
}
}
@ -409,7 +409,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
static onInspect = function() {}
static setRenderStatus = function(result) {
LOG_LINE_IF(global.DEBUG_FLAG.render, "Set render status for " + name + " : " + string(result));
LOG_LINE_IF(global.FLAG.render, "Set render status for " + name + " : " + string(result));
rendered = result;
}
@ -948,6 +948,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {}
static drawAnimationTimeline = function(_w, _h, _s) {}
static getPreviewValue = function() {
if(preview_channel > ds_list_size(outputs)) return noone;
return outputs[| preview_channel];

View file

@ -169,4 +169,8 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
for(var i = input_fix_len; i < ds_list_size(_inputs); i += data_length)
createNewInput();
}
static doApplyDeserialize = function() {
refreshDynamicInput();
}
}

View file

@ -25,7 +25,7 @@ enum NODE_EXPORT_FORMAT {
}
function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Export";
name = "Export";
preview_channel = 1;
playing = false;

View file

@ -19,7 +19,7 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
output_index = -1;
static setRenderStatus = function(result) {
LOG_LINE_IF(global.DEBUG_FLAG.render, "Set render status for " + name + " : " + string(result));
LOG_LINE_IF(global.FLAG.render, "Set render status for " + name + " : " + string(result));
rendered = result;
if(group) group.setRenderStatus(result);
@ -34,29 +34,29 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
static getNextNodes = function() {
if(is_undefined(outParent)) return [];
//group.setRenderStatus(true);
//printIf(global.DEBUG_FLAG.render, "Value to amount " + string(ds_list_size(outParent.value_to)));
//printIf(global.FLAG.render, "Value to amount " + string(ds_list_size(outParent.value_to)));
LOG_BLOCK_START();
var nodes = [];
for(var j = 0; j < ds_list_size(outParent.value_to); j++) {
var _to = outParent.value_to[| j];
if(!_to.node.renderActive) continue;
//printIf(global.DEBUG_FLAG.render, "Value to " + _to.name);
//printIf(global.FLAG.render, "Value to " + _to.name);
if(!_to.node.active || _to.value_from == noone) {
//printIf(global.DEBUG_FLAG.render, "no value from");
//printIf(global.FLAG.render, "no value from");
continue;
}
if(_to.value_from.node != group) {
//printIf(global.DEBUG_FLAG.render, "value from not equal group");
//printIf(global.FLAG.render, "value from not equal group");
continue;
}
//printIf(global.DEBUG_FLAG.render, "Group output ready " + string(_to.node.isRenderable()));
//printIf(global.FLAG.render, "Group output ready " + string(_to.node.isRenderable()));
array_push(nodes, _to.node);
LOG_IF(global.DEBUG_FLAG.render, "Check complete, push " + _to.node.name + " to stack.");
LOG_IF(global.FLAG.render, "Check complete, push " + _to.node.name + " to stack.");
}
LOG_BLOCK_END();

View file

@ -39,7 +39,7 @@ function Node_Iterate(_x, _y, _group = noone) : Node_Collection(_x, _y, _group)
n.initLoop();
}
LOG_LINE_IF(global.DEBUG_FLAG.render, "Loop begin");
LOG_LINE_IF(global.FLAG.render, "Loop begin");
}
static getNextNodes = function() {
@ -73,13 +73,13 @@ function Node_Iterate(_x, _y, _group = noone) : Node_Collection(_x, _y, _group)
iterated++;
LOG_BLOCK_START();
LOG_IF(global.DEBUG_FLAG.render, "Iteration update: " + string(iterated) + "/" + string(maxIter));
LOG_IF(global.FLAG.render, "Iteration update: " + string(iterated) + "/" + string(maxIter));
if(iterated >= maxIter) {
LOG_IF(global.DEBUG_FLAG.render, "Iteration complete");
LOG_IF(global.FLAG.render, "Iteration complete");
render_time = get_timer() - loop_start_time;
} else {
LOG_IF(global.DEBUG_FLAG.render, "Iteration not completed, reset render status.");
LOG_IF(global.FLAG.render, "Iteration not completed, reset render status.");
resetRender();
}

View file

@ -50,7 +50,7 @@ function Node_Iterate_Each(_x, _y, _group = noone) : Node_Collection(_x, _y, _gr
outputs[| 0].setValue([])
}
LOG_LINE_IF(global.DEBUG_FLAG.render, "Loop begin");
LOG_LINE_IF(global.FLAG.render, "Loop begin");
}
static getIterationCount = function() {
@ -72,13 +72,13 @@ function Node_Iterate_Each(_x, _y, _group = noone) : Node_Collection(_x, _y, _gr
iterated++;
LOG_BLOCK_START();
LOG_IF(global.DEBUG_FLAG.render, "Iteration update: " + string(iterated) + "/" + string(maxIter));
LOG_IF(global.FLAG.render, "Iteration update: " + string(iterated) + "/" + string(maxIter));
if(iterated >= maxIter) {
LOG_IF(global.DEBUG_FLAG.render, "Iteration complete");
LOG_IF(global.FLAG.render, "Iteration complete");
render_time = get_timer() - loop_start_time;
} else {
LOG_IF(global.DEBUG_FLAG.render, "Iteration not completed, reset render status.");
LOG_IF(global.FLAG.render, "Iteration not completed, reset render status.");
resetRender();
}

View file

@ -46,9 +46,9 @@ function Node_Iterate_Filter(_x, _y, _group = noone) : Node_Collection(_x, _y, _
surface_array_free(arrOut);
outputs[| 0].setValue([])
LOG_LINE_IF(global.DEBUG_FLAG.render, "Loop begin");
LOG_LINE_IF(global.FLAG.render, "Loop begin");
var _val = outputs[| 0].getValue();
LOG_LINE_IF(global.DEBUG_FLAG.render, "Output original value " + string(_val));
LOG_LINE_IF(global.FLAG.render, "Output original value " + string(_val));
}
static getIterationCount = function() {

View file

@ -33,17 +33,17 @@ function Node_Iterator_Each_Output(_x, _y, _group = noone) : Node(_x, _y, _group
var nodes = [];
LOG_BLOCK_START();
LOG_IF(global.DEBUG_FLAG.render, "Call get next node from loop output.");
LOG_IF(global.FLAG.render, "Call get next node from loop output.");
if(_ren == ITERATION_STATUS.loop) { //Go back to the beginning of the loop, reset render status for leaf node inside?
LOG_IF(global.DEBUG_FLAG.render, "Loop restart: iteration " + string(group.iterated));
LOG_IF(global.FLAG.render, "Loop restart: iteration " + string(group.iterated));
nodes = array_append(nodes, __nodeLeafList(group.getNodeList()));
} else if(_ren == ITERATION_STATUS.complete) { //Go out of loop
LOG_IF(global.DEBUG_FLAG.render, "Loop completed");
LOG_IF(global.FLAG.render, "Loop completed");
group.setRenderStatus(true);
nodes = getNextNodesRaw();
} else
LOG_IF(global.DEBUG_FLAG.render, "Loop not ready");
LOG_IF(global.FLAG.render, "Loop not ready");
LOG_BLOCK_END();

View file

@ -33,17 +33,17 @@ function Node_Iterator_Filter_Output(_x, _y, _group = noone) : Node(_x, _y, _gro
var nodes = [];
LOG_BLOCK_START();
LOG_IF(global.DEBUG_FLAG.render, "Call get next node from loop output.");
LOG_IF(global.FLAG.render, "Call get next node from loop output.");
if(_ren == ITERATION_STATUS.loop) { //Go back to the beginning of the loop, reset render status for leaf node inside?
LOG_IF(global.DEBUG_FLAG.render, "Loop restart: iteration " + string(group.iterated));
LOG_IF(global.FLAG.render, "Loop restart: iteration " + string(group.iterated));
nodes = array_append(nodes, __nodeLeafList(group.getNodeList()));
} else if(_ren == ITERATION_STATUS.complete) { //Go out of loop
LOG_IF(global.DEBUG_FLAG.render, "Loop completed");
LOG_IF(global.FLAG.render, "Loop completed");
group.setRenderStatus(true);
nodes = getNextNodesRaw();
} else
LOG_IF(global.DEBUG_FLAG.render, "Loop not ready");
LOG_IF(global.FLAG.render, "Loop not ready");
LOG_BLOCK_END();
@ -84,7 +84,7 @@ function Node_Iterator_Filter_Output(_x, _y, _group = noone) : Node(_x, _y, _gro
array_push(_val, _new_val);
}
LOG_IF(global.DEBUG_FLAG.render, "Value " + string(val) + " filter result " + string(res) + " to array " + string(_val));
LOG_IF(global.FLAG.render, "Value " + string(val) + " filter result " + string(res) + " to array " + string(_val));
group.outputs[| 0].setValue(_val);
group.iterationUpdate();

View file

@ -57,14 +57,14 @@ function Node_Iterator_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y
LOG_BLOCK_START();
if(_ren == ITERATION_STATUS.loop) { //Go back to the beginning of the loop, reset render status for leaf node inside?
LOG_IF(global.DEBUG_FLAG.render, "Loop restart: iteration " + string(group.iterated));
LOG_IF(global.FLAG.render, "Loop restart: iteration " + string(group.iterated));
nodes = array_append(nodes, __nodeLeafList(group.getNodeList()));
} else if(_ren == ITERATION_STATUS.complete) { //Go out of loop
LOG_IF(global.DEBUG_FLAG.render, "Loop completed");
LOG_IF(global.FLAG.render, "Loop completed");
group.setRenderStatus(true);
nodes = getNextNodesRaw();
} else
LOG_IF(global.DEBUG_FLAG.render, "Loop not ready");
LOG_IF(global.FLAG.render, "Loop not ready");
LOG_BLOCK_END();

View file

@ -281,6 +281,8 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
for(var i = 0; i < ds_list_size(values); i++) { //Find trigger
var _key = values[| i];
if(_key.time == _time) {
if(!global.FLAG.keyframe_override) return false;
_key.value = _val;
return false;
} else if(_key.time > _time) {
@ -312,6 +314,8 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
for(var i = 0; i < ds_list_size(values); i++) {
var _key = values[| i];
if(_key.time == _time) {
if(!global.FLAG.keyframe_override) return false;
if(_key.value != _val) {
if(_record) recordAction(ACTION_TYPE.var_modify, _key, [ _key.value, "value", prop.name ]);
_key.value = _val;

View file

@ -11,12 +11,12 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
inputs[| 2] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ])
.setDisplay(VALUE_DISPLAY.slider_range, [0, 1, 0.01]);
inputs[| 3] = nodeValue("Sample frequency", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 8);
inputs[| 3] = nodeValue("Sample frequency", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1);
inputs[| 4] = nodeValue("Origin", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, def_surf_size / 2 ])
.setDisplay(VALUE_DISPLAY.vector);
inputs[| 5] = nodeValue("Amplitude", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, def_surf_size / 2);
inputs[| 5] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, def_surf_size / 2);
inputs[| 6] = nodeValue("Base Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
@ -44,7 +44,7 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
inputs[| 16] = nodeValue("Window Offset", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
inputs[| 17] = nodeValue("Data Point Spacing", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
inputs[| 17] = nodeValue("Spacing", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
inputs[| 18] = nodeValue("Bar Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4)
@ -53,12 +53,16 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
inputs[| 20] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone)
.setVisible(true, true);
inputs[| 21] = nodeValue("Flip Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
inputs[| 22] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 0,
["Data", true], 1, 12, 14, 2, 3, 15, 16,
["Chart", false], 11, 4, 10, 20, 5, 17,
["Render", false], 6, 13, 7, 18, 19, 18, 19, 8, 9,
["Data", true], 1, 12, 21, 14, 2, 3, 15, 16,
["Plot", false], 11, 4, 10, 20, 5, 17, 22,
["Render", false], 6, 13, 7, 18, 19, 8, 9,
];
attribute_surface_depth();
@ -73,12 +77,12 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
inputs[| 2].setVisible(_trim_mode == 0);
inputs[| 15].setVisible(_trim_mode == 1);
inputs[| 16].setVisible(_trim_mode == 1);
inputs[| 17].setVisible(_trim_mode == 1);
inputs[| 9].setVisible(_ubg);
inputs[| 7].setVisible(_typ == 1);
inputs[| 18].setVisible(_typ == 0);
inputs[| 19].setVisible(_typ == 0);
inputs[| 22].setVisible(_typ == 1);
inputs[| 4].setVisible(!_use_path);
inputs[| 10].setVisible(!_use_path);
@ -89,16 +93,16 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
}
static process_data = function(_outSurf, _data, _output_index, _array_index) {
var _dim = _data[0];
var _dat = _data[1];
var _ran = _data[2];
var _sam = _data[3];
var _ori = _data[4];
var _amp = _data[5];
var _lcl = _data[6];
var _lth = _data[7];
var _ubg = _data[8];
var _bgc = _data[9];
var _dim = _data[ 0];
var _dat = _data[ 1];
var _ran = _data[ 2];
var _sam = _data[ 3]; _sam = max(1, _sam);
var _ori = _data[ 4];
var _amp = _data[ 5];
var _lcl = _data[ 6];
var _lth = _data[ 7];
var _ubg = _data[ 8];
var _bgc = _data[ 9];
var _ang = _data[10];
var _typ = _data[11];
var _off = _data[12];
@ -106,7 +110,7 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
var _trim_mode = _data[14];
var _win_size = _data[15];
var _win_offs = _data[16];
var _win_offs = _data[16]; _win_offs = max(0, _win_offs);
var _pnt_spac = _data[17];
@ -114,6 +118,8 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
var _bar_rnd = _data[19];
var _path = _data[20];
var _flip = _data[21];
var _loop = _data[22];
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
@ -124,7 +130,7 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
var _len = array_length(_dat);
var _st = clamp(_ran[0], 0, 1) * _len;
var _ed = clamp(_ran[1], 0, 1) * _len;
var ox, oy, nx, ny;
var ox, oy, nx, ny, fx, fy;
if(_typ == 1)
draw_set_circle_precision(4);
@ -145,17 +151,21 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
_smp_data[i] = lerp(_dat[floor(_ind)], _dat[floor(_ind) + 1], frac(_ind));
else
_smp_data[i] = _dat[_ind];
if(_flip)
_smp_data[i] = -_smp_data[i];
}
}
var amo = array_length(_smp_data);
var _px, _py, _ang_nor, _val, _grd_col;
var _pnt, _ppnt = undefined;
var _bar_spc = _typ == 1? _pnt_spac : _pnt_spac + _bar_wid;
for( var i = 0; i < amo; i++ ) {
if(_path == noone) {
_px = _ori[0] + lengthdir_x(i * _pnt_spac, _ang);
_py = _ori[1] + lengthdir_y(i * _pnt_spac, _ang);
_px = _ori[0] + lengthdir_x(i * _bar_spc, _ang);
_py = _ori[1] + lengthdir_y(i * _bar_spc, _ang);
_ang_nor = _ang + 90;
} else {
_pnt = _path.getPointRatio(i / amo);
@ -189,8 +199,16 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
ox = nx;
oy = ny;
if(i == 0) {
fx = nx;
fy = ny;
}
}
if(_loop && _typ == 1)
draw_line_round(fx, fy, nx, ny, _lth);
draw_set_circle_precision(64);
surface_reset_target();
return _outSurf;

View file

@ -394,7 +394,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
ds_list_add(generator, "Others");
addNodeObject(generator, "Separate Shape", s_node_sepearte_shape, "Node_Seperate_Shape", [1, Node_Seperate_Shape],, "Separate disconnected pixel each into an image in an image array.");
addNodeObject(generator, "Flood Fill", s_node_flood_fill, "Node_Flood_Fill", [1, Node_Flood_Fill],, "Filled connected pixel given position and color.").setVersion(1133);
addNodeObject(generator, "Bar / Graph", s_node_bar_graph, "Node_Plot_Linear", [1, Node_Plot_Linear], ["graph", "waveform", "bar chart"]).setVersion(1144);
addNodeObject(generator, "Bar / Graph", s_node_bar_graph, "Node_Plot_Linear", [1, Node_Plot_Linear], ["graph", "waveform", "bar chart", "plot"], "Plot graph or bar chart from array of number.").setVersion(1144);
var compose = ds_list_create();
addNodeCatagory("Compose", compose);
@ -436,7 +436,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
addNodeObject(values, "Dot product", s_node_dot_product, "Node_Vector_Dot", [1, Node_Vector_Dot]).setVersion(1141);
addNodeObject(values, "Cross product 3D", s_node_cross_product_2d, "Node_Vector_Cross_3D", [1, Node_Vector_Cross_3D]).setVersion(1141);
addNodeObject(values, "Cross product 2D", s_node_cross_product_3d, "Node_Vector_Cross_2D", [1, Node_Vector_Cross_2D]).setVersion(1141);
/**/ addNodeObject(values, "FFT", s_node_cross_product_3d, "Node_FFT", [1, Node_FFT]).setVersion(1144);
addNodeObject(values, "FFT", s_node_FFT, "Node_FFT", [1, Node_FFT], ["frequency analysis"], "Perform fourier transform on number array.").setVersion(1144);
ds_list_add(values, "Texts");
addNodeObject(values, "Text", s_node_text, "Node_String", [1, Node_String]);
@ -464,7 +464,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
addNodeObject(values, "Array Reverse", s_node_array_reverse, "Node_Array_Reverse", [1, Node_Array_Reverse], ["reverse array"]).setVersion(1120);
addNodeObject(values, "Array Shift", s_node_array_shift, "Node_Array_Shift", [1, Node_Array_Shift]).setVersion(1137);
addNodeObject(values, "Array Zip", s_node_array_zip, "Node_Array_Zip", [1, Node_Array_Zip]).setVersion(1138);
/**/ addNodeObject(values, "Array Copy", s_node_array_zip, "Node_Array_Copy", [1, Node_Array_Copy]).setVersion(1444);
addNodeObject(values, "Array Copy", s_node_array_copy, "Node_Array_Copy", [1, Node_Array_Copy]).setVersion(1144);
addNodeObject(values, "Sort Number", s_node_array_sort, "Node_Array_Sort", [1, Node_Array_Sort], ["array sort"]).setVersion(1120);
addNodeObject(values, "Shuffle Array", s_node_array_shuffle, "Node_Array_Shuffle", [1, Node_Array_Shuffle], ["array shuffle"]).setVersion(1120);
addNodeObject(values, "Loop Array", s_node_loop_array, "Node_Iterate_Each", [1, Node_Iterate_Each], ["iterate each", "for each", "array loop"], "Create group that iterate to each member in an array.");
@ -539,6 +539,12 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
addNodeObject(animation, "Frame Index", s_node_counter, "Node_Counter", [1, Node_Counter], ["current frame", "counter"], "Output current frame as frame index, or animation progress (0 - 1).");
addNodeObject(animation, "Wiggler", s_node_wiggler, "Node_Wiggler", [1, Node_Wiggler],, "Create smooth random value.");
addNodeObject(animation, "Evaluate Curve", s_node_curve_eval, "Node_Anim_Curve", [1, Node_Anim_Curve],, "Evaluate value from an animation curve.");
ds_list_add(animation, "Audio");
addNodeObject(animation, "WAV File In", s_node_wav_file_read, "Node_WAV_File_Read", [0, Node_create_WAV_File_Read],, "Load wav audio file.").setVersion(1144);
addNodeObject(animation, "FFT", s_node_FFT, "Node_FFT", [1, Node_FFT], ["frequency analysis"], "Perform fourier transform on number array.").setVersion(1144);
addNodeObject(animation, "Bar / Graph", s_node_bar_graph, "Node_Plot_Linear", [1, Node_Plot_Linear], ["graph", "waveform", "bar chart", "plot"], "Plot graph or bar chart from array of number.").setVersion(1144);
addNodeObject(animation, "Audio Window",s_node_audio_trim, "Node_Audio_Window", [1, Node_Audio_Window],, "Take a slice of an audio array based on the current frame.").setVersion(1144);
var node = ds_list_create();
addNodeCatagory("Node", node);

View file

@ -158,6 +158,7 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct
break;
case STAT_OPERATOR._max :
var _max = -9999999999;
for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) {
var val = inputs[| i].getValue();
if(is_array(val)) {

View file

@ -29,7 +29,7 @@ enum VALUE_TYPE {
trigger = 19,
atlas = 20,
d3vertex = 21,
d3vertex = 21,
action = 99,
}
@ -1062,7 +1062,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
}
}
if(isArray(val)) { //Process data
if(isArray(val) && array_length(val) < 128) { //Process data
for( var i = 0; i < array_length(val); i++ )
val[i] = valueProcess(val[i], nod, applyUnit, arrIndex);
} else

View file

@ -29,10 +29,20 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
previewable = false;
w = 128;
h = 128;
min_h = h;
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
.setDisplay(VALUE_DISPLAY.path_load, ["*.wav", ""])
.rejectArray();
inputs[| 1] = nodeValue("Sync lenght", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
.setDisplay(VALUE_DISPLAY.button, [ function() {
if(content == noone) return;
var frm = max(1, floor(content.duration * ANIMATOR.framerate));
ANIMATOR.frames_total = frm;
}, "Sync"])
.rejectArray();
outputs[| 0] = nodeValue("Data", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [])
.setArrayDepth(1);
@ -48,12 +58,21 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
outputs[| 4] = nodeValue("Duration (s)", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0)
.setVisible(false);
content = {};
outputs[| 5] = nodeValue("Loudness", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0)
.setVisible(false);
content = noone;
path_current = "";
first_update = false;
output_display_list = [ 0, 2, 3, 4, 1 ];
output_display_list = [ 0, 2, 3, 4, 1, 5 ];
audio_surface = -1;
preview_audio = -1;
wav_file_reading = false;
wav_file_prg = 0;
wav_file_lim = 1;
on_dragdrop_file = function(path) {
if(updatePaths(path)) {
@ -64,10 +83,49 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
return false;
}
function checkPreview(force = false) {
if(content == noone) return;
if(!force && is_surface(audio_surface)) return;
print("-- Creating preview surface...");
var ch = content.channels;
if(ch == 0) return;
var len = array_length(content.sound[0]);
if(len == 0) return;
var spc = min(320, len);
var stp = len / spc;
var ww = h;
audio_surface = surface_verify(audio_surface, 320, ww);
surface_set_target(audio_surface);
draw_clear_alpha(c_white, 0);
draw_set_color(c_white);
var ox, oy, nx, ny;
for( var i = 0; i < len; i += stp ) {
nx = i / len * 320;
ny = ww / 2 + content.sound[0][i] * ww;
if(i) draw_line_width(ox, oy, nx, ny, 4);
ox = nx;
oy = ny;
}
surface_reset_target();
}
function updatePaths(path) {
path = try_get_path(path);
if(path == -1) return false;
if(path_current == "")
first_update = true;
path_current = path;
var ext = string_lower(filename_ext(path));
var _name = string_replace(filename_name(path), filename_ext(path), "");
@ -75,21 +133,41 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
outputs[| 1].setValue(path);
printIf(global.FLAG.wav_import, "-- Reading file...");
content = file_read_wav(path);
return true;
}
function readSoundComplete() {
outputs[| 0].setValue(content.sound);
outputs[| 2].setValue(content.sample);
outputs[| 3].setValue(content.channels);
outputs[| 4].setValue(content.duration);
if(path_current == "")
first_update = true;
path_current = path;
return true;
printIf(global.FLAG.wav_import, "-- Creating preview buffer...");
var frm = floor(content.duration * ANIMATOR.framerate);
inputs[| 1].editWidget.text = $"Sync ({frm} frames)";
var bufferId = buffer_create(content.packet * 2, buffer_fixed, 1);
buffer_seek(bufferId, buffer_seek_start, 0);
var val_to_write = 1;
for (var i = 0; i < content.packet; i++)
buffer_write(bufferId, buffer_s16, round(content.sound[0][i] / 4 * 65535));
preview_audio = audio_create_buffer_sound(bufferId, buffer_s16, content.sample, 0, content.packet * 2, audio_mono);
}
insp1UpdateTooltip = get_text("panel_inspector_refresh", "Refresh");
insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ];
insp2UpdateTooltip = get_text("play", "Play");
insp2UpdateIcon = [ THEME.play_sound, 1, COLORS._main_icon_light ];
attributes[? "play"] = true;
static onInspector1Update = function() {
var path = inputs[| 0].getValue();
if(path == "") return;
@ -97,18 +175,114 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
update();
}
static onInspector2Update = function() {
attributes[? "play"] = !attributes[? "play"];
}
static step = function() {
if(file_read_wav_step()) {
print("Load audio complete");
readSoundComplete();
checkPreview(true);
}
insp2UpdateIcon[1] = attributes[? "play"];
insp2UpdateIcon[2] = attributes[? "play"]? COLORS._main_icon_light : COLORS._main_icon;
if(preview_audio == -1) return;
if(audio_is_playing(preview_audio) && !ANIMATOR.is_playing)
audio_stop_sound(preview_audio);
if(!attributes[? "play"]) return;
if(ANIMATOR.is_playing) {
if(ANIMATOR.current_frame == 0)
audio_stop_sound(preview_audio);
var dur = ANIMATOR.current_frame / ANIMATOR.framerate;
if(!audio_is_playing(preview_audio))
audio_play_sound(preview_audio, 1, false, 0.5, dur);
}
}
static update = function(frame = ANIMATOR.current_frame) {
var path = inputs[| 0].getValue();
if(path == "") return;
if(path_current != path) updatePaths(path);
checkPreview();
var len = content.packet;
var amp_ind = round(frame * content.sample / ANIMATOR.framerate);
var amp_win = content.sample / ANIMATOR.framerate;
var amp_ed = min(len, amp_ind + amp_win);
var amp_st = max(0, amp_ed - amp_win);
//print($"{amp_ind}: {amp_st} - {amp_ed}")
var dec = 0;
for( var i = amp_st; i < amp_ed; i++ )
dec += content.sound[0][i] == 0? 0 : 20 * log10(abs(content.sound[0][i]));
dec /= amp_win;
outputs[| 5].setValue(dec);
}
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
if(content == noone) return;
var bbox = drawGetBbox(xx, yy, _s);
if(wav_file_reading) {
var cx = xx + w * _s / 2;
var cy = yy + h * _s / 2;
var rr = min(w - 64, h - 64) * _s / 2;
draw_set_color(COLORS._main_icon);
draw_arc(cx, cy, rr, 90, 90 - 360 * wav_file_prg / content.packet, 4 * _s, 180);
return;
} else if(is_surface(audio_surface)) {
var sw = surface_get_width(audio_surface);
var sh = surface_get_height(audio_surface);
var ss = min(bbox.w / sw, bbox.h / sh);
draw_surface_ext_safe(audio_surface,
bbox.xc - sw * ss / 2,
bbox.yc - sh * ss / 2,
ss, ss,,, 0.50);
var wd = (ANIMATOR.current_frame / ANIMATOR.framerate) / content.duration * sw;
draw_surface_part_ext_safe(audio_surface, 0, 0, wd, sh,
bbox.xc - sw * ss / 2,
bbox.yc - sh * ss / 2,
ss, ss,, attributes[? "play"]? COLORS._main_accent : c_white);
}
var str = filename_name(path_current);
draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text);
var ss = string_scale(str, bbox.w, bbox.h);
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
draw_set_text(f_p0, fa_center, fa_bottom, COLORS._main_text);
var ss = min(1, string_scale(str, bbox.w, bbox.h));
draw_text_transformed(bbox.xc, bbox.y1, str, ss, ss, 0);
}
static drawAnimationTimeline = function(_shf, _w, _h, _s) { //return 0;
if(content == noone) return;
draw_set_color(COLORS._main_icon_dark);
draw_set_alpha(1);
var _st = round(content.sample / ANIMATOR.framerate); //sample per frame
var _am = content.packet / _st;
var ox, oy, nx, ny;
for( var i = 0; i < _am; i++ ) {
var _dat = content.sound[0][i * _st];
nx = _shf + i * _s;
ny = _h / 2 + _dat * _h;
if(i) draw_line_width(ox, oy, nx, ny, 2);
ox = nx;
oy = ny;
}
draw_set_alpha(1);
}
}

View file

@ -5,7 +5,7 @@
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "IO",
"path": "folders/nodes/data/IO.yy",
"name": "audio",
"path": "folders/nodes/data/audio.yy",
},
}

View file

@ -12,20 +12,22 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
inputs[| 1] = nodeValue("Sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8, "Amount of grid subdivision. Higher number means more grid, detail.")
.setDisplay(VALUE_DISPLAY.slider, [ 2, 32, 1 ] );
inputs[| 2] = nodeValue("Spring force", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
inputs[| 2] = nodeValue("Spring Force", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
.setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ] );
inputs[| 3] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0)
.setDisplay(VALUE_DISPLAY.button, [ function() { setTriangle(); doUpdate(); }, "Generate"] );
inputs[| 4] = nodeValue("Diagonal link", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Include diagonal link to prevent drastic grid deformation.");
inputs[| 4] = nodeValue("Diagonal Link", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Include diagonal link to prevent drastic grid deformation.");
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 5;
inputs[| 6] = nodeValue("Link strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0, "Link length preservation, setting it to 1 will prevent any stretching, contraction.")
inputs[| 6] = nodeValue("Link Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0, "Link length preservation, setting it to 1 will prevent any stretching, contraction.")
.setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ] );
inputs[| 7] = nodeValue("Full Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
control_index = ds_list_size(inputs);
function createControl() {
@ -42,7 +44,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
outputs[| 1] = nodeValue("Mesh data", self, JUNCTION_CONNECT.output, VALUE_TYPE.object, data);
input_display_list = [ 5,
["Mesh", false], 0, 1, 3,
["Mesh", false], 0, 1, 3, 7,
["Link", false], 4, 6,
["Control points", false],
];
@ -281,10 +283,11 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
var ww = useArray? surface_get_width(surf[0]) : surface_get_width(surf);
var hh = useArray? surface_get_height(surf[0]) : surface_get_height(surf);
var fullmh = inputs[| 7].getValue() || useArray;
var gw = ww / sample;
var gh = hh / sample;
if(!useArray) {
if(!fullmh) {
var cont = surface_create_valid(ww, hh);
surface_set_target(cont);
@ -308,14 +311,23 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
for(var i = 0; i <= sample; i++)
for(var j = 0; j <= sample; j++) {
var fill = false;
if(useArray) {
if(fullmh) {
fill = true;
} else {
var c0 = surface_get_pixel(cont, j * gw, i * gh);
var c1 = surface_get_pixel(cont, j * gw - 1, i * gh);
var c2 = surface_get_pixel(cont, j * gw, i * gh - 1);
var c3 = surface_get_pixel(cont, j * gw - 1, i * gh - 1);
fill = c0 + c1 + c2 + c3 > 0;
var _i = i * gh;
var _j = j * gw;
fill |= surface_get_pixel(cont, _j - 1, _i - 1);
fill |= surface_get_pixel(cont, _j - 1, _i);
fill |= surface_get_pixel(cont, _j - 1, _i + 1);
fill |= surface_get_pixel(cont, _j, _i - 1);
fill |= surface_get_pixel(cont, _j, _i);
fill |= surface_get_pixel(cont, _j, _i + 1);
fill |= surface_get_pixel(cont, _j + 1, _i - 1);
fill |= surface_get_pixel(cont, _j + 1, _i);
fill |= surface_get_pixel(cont, _j + 1, _i + 1);
}
if(fill) {

View file

@ -127,6 +127,9 @@ function Panel_Animation() : PanelContent() constructor {
}
});
addHotkey("", "Resume/Pause", vk_space, MOD_KEY.shift, function() { if(ANIMATOR.is_playing) ANIMATOR.pause() else ANIMATOR.resume(); });
addHotkey("", "First frame", vk_home, MOD_KEY.none, function() { ANIMATOR.setFrame(0); });
addHotkey("", "Last frame", vk_end, MOD_KEY.none, function() { ANIMATOR.setFrame(ANIMATOR.frames_total - 1); });
addHotkey("", "Next frame", vk_right, MOD_KEY.none, function() {
@ -407,6 +410,7 @@ function Panel_Animation() : PanelContent() constructor {
var bar_w = timeline_w;
var bar_h = timeline_h;
var bar_total_w = ANIMATOR.frames_total * ui(timeline_scale);
var inspecting = PANEL_INSPECTOR.inspecting;
resetTimelineMask();
if(!is_surface(timeline_surface) || !surface_exists(timeline_surface))
@ -419,6 +423,9 @@ function Panel_Animation() : PanelContent() constructor {
draw_sprite_stretched(THEME.ui_panel_bg, 1, 0, 0, bar_w, bar_h);
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, 0, 0, bar_total_w, bar_h, COLORS.panel_animation_timeline_blend, 1);
if(inspecting)
inspecting.drawAnimationTimeline(timeline_shift, bar_w, bar_h, timeline_scale);
for(var i = timeline_separate; i <= ANIMATOR.frames_total; i += timeline_separate) {
var bar_line_x = i * ui(timeline_scale) + timeline_shift;
draw_set_color(COLORS.panel_animation_frame_divider);
@ -438,8 +445,6 @@ function Panel_Animation() : PanelContent() constructor {
#endregion
#region cache
var inspecting = PANEL_INSPECTOR.inspecting;
if(inspecting && inspecting.use_cache) {
for(var i = 0; i < ANIMATOR.frames_total; i++) {
if(i >= array_length(inspecting.cache_result))
@ -520,15 +525,9 @@ function Panel_Animation() : PanelContent() constructor {
timeline_separate = 5;
timeline_sep_line = 1;
if(timeline_scale <= 10) {
timeline_separate = 10;
timeline_sep_line = 2;
}
if(timeline_scale <= 3) {
timeline_separate = 20;
timeline_sep_line = 5;
}
if(timeline_scale <= 1) { timeline_separate = 50; timeline_sep_line = 10; }
else if(timeline_scale <= 3) { timeline_separate = 20; timeline_sep_line = 5; }
else if(timeline_scale <= 10) { timeline_separate = 10; timeline_sep_line = 2; }
if(sca != timeline_scale) {
var mfb = (mx - bar_x - timeline_shift) / ui(timeline_scale);
@ -1665,6 +1664,11 @@ function Panel_Animation() : PanelContent() constructor {
if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(24), [mx, my], pFOCUS, pHOVER, txt, THEME.node_name_type, node_name_type) == 2)
node_name_type = (node_name_type + 1) % 3;
by += ui(28);
txt = get_text("panel_animation_keyframe_override", "Override Keyframe");
if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(24), [mx, my], pFOCUS, pHOVER, txt, THEME.keyframe_override, global.FLAG.keyframe_override) == 2)
global.FLAG.keyframe_override = !global.FLAG.keyframe_override;
}
function drawContent(panel) {

View file

@ -22,9 +22,9 @@ function Panel_Console() : PanelContent() constructor {
case "flag":
if(array_length(cmd) < 2) break;
var flg = array_safe_get(cmd, 1, "");
global.DEBUG_FLAG[$ flg] = !global.DEBUG_FLAG[$ flg];
global.FLAG[$ flg] = !global.FLAG[$ flg];
array_push(history, { txt: $"Toggled debug flag: {flg} = {global.DEBUG_FLAG[$ flg]? "True" : "False"}", color: COLORS._main_value_positive });
array_push(history, { txt: $"Toggled debug flag: {flg} = {global.FLAG[$ flg]? "True" : "False"}", color: COLORS._main_value_positive });
break;
}

View file

@ -1272,10 +1272,8 @@ function Panel_Graph() : PanelContent() constructor {
var _canvas = nodeBuild("Node_Canvas", _node.x + _node.w + 64, _node.y);
_canvas.inputs[| 0].setValue([surface_get_width(surf), surface_get_height(surf)]);
var _surf = surface_clone(surf);
_canvas.outputs[| 0].setValue(_surf);
_canvas.surface_update();
_canvas.canvas_surface = surface_clone(surf);
_canvas.apply_surface();
}
function setTriggerPreview() {
@ -1324,7 +1322,6 @@ function Panel_Graph() : PanelContent() constructor {
_canvas.inputs[| 0].setValue([surface_get_width(surf), surface_get_height(surf)]);
_canvas.inputs[| 5].setValue(true);
_canvas.surface_update();
var _blend = new Node_Blend(_node.x + _node.w + 64, _node.y, getCurrentContext());
_blend.inputs[| 0].setFrom(_outp);

View file

@ -5,7 +5,7 @@ enum RENDER_TYPE {
}
#region globalvar
global.DEBUG_FLAG.render = false;
global.FLAG.render = false;
global.group_inputs = [ "Node_Group_Input", "Node_Feedback_Input", "Node_Iterator_Input", "Node_Iterator_Each_Input" ];
#endregion
@ -21,7 +21,7 @@ function __nodeLeafList(_list) {
var _startNode = _node.isRenderable();
if(_startNode) {
array_push(nodes, _node);
LOG_IF(global.DEBUG_FLAG.render, "Push node " + _node.name + " to stack");
LOG_IF(global.FLAG.render, "Push node " + _node.name + " to stack");
}
}
@ -52,7 +52,7 @@ function __nodeInLoop(_node) {
function Render(partial = false, runAction = false) {
var t = current_time;
LOG_BLOCK_START();
LOG_IF(global.DEBUG_FLAG.render, "=== RENDER START [frame " + string(ANIMATOR.current_frame) + "] ===");
LOG_IF(global.FLAG.render, "=== RENDER START [frame " + string(ANIMATOR.current_frame) + "] ===");
try {
var rendering = noone;
@ -84,7 +84,7 @@ function Render(partial = false, runAction = false) {
if(!_node.active) continue;
if(!_node.renderActive) continue;
if(_node.rendered) {
LOG_IF(global.DEBUG_FLAG.render, "Skip rendered " + _node.name + " (" + _node.display_name + ")");
LOG_IF(global.FLAG.render, "Skip rendered " + _node.name + " (" + _node.display_name + ")");
continue;
}
@ -92,20 +92,20 @@ function Render(partial = false, runAction = false) {
LOG_BLOCK_START();
var _startNode = _node.isRenderable(global.DEBUG_FLAG.render);
var _startNode = _node.isRenderable(global.FLAG.render);
if(_startNode) {
LOG_IF(global.DEBUG_FLAG.render, "Found leaf " + _node.name + " (" + _node.display_name + ")");
LOG_IF(global.FLAG.render, "Found leaf " + _node.name + " (" + _node.display_name + ")");
_node.triggerRender();
ds_queue_enqueue(RENDER_QUEUE, _node);
} else
LOG_IF(global.DEBUG_FLAG.render, "Skip non-leaf " + _node.name + " (" + _node.display_name + ")");
LOG_IF(global.FLAG.render, "Skip non-leaf " + _node.name + " (" + _node.display_name + ")");
LOG_BLOCK_END();
}
LOG_IF(global.DEBUG_FLAG.render, "Get leaf complete: found " + string(ds_queue_size(RENDER_QUEUE)) + " leaves.");
LOG_IF(global.DEBUG_FLAG.render, "Start rendering...");
LOG_IF(global.FLAG.render, "Get leaf complete: found " + string(ds_queue_size(RENDER_QUEUE)) + " leaves.");
LOG_IF(global.FLAG.render, "Start rendering...");
// render forward
while(!ds_queue_empty(RENDER_QUEUE)) {
@ -113,7 +113,7 @@ function Render(partial = false, runAction = false) {
var renderable = rendering.isRenderable();
LOG_BLOCK_START();
LOG_IF(global.DEBUG_FLAG.render, "Rendering " + rendering.name + " (" + rendering.display_name + ") ");
LOG_IF(global.FLAG.render, "Rendering " + rendering.name + " (" + rendering.display_name + ") ");
if(renderable) {
rendering.doUpdate();
@ -126,14 +126,14 @@ function Render(partial = false, runAction = false) {
rendering.inspector1Update();
}
LOG_IF(global.DEBUG_FLAG.render, "Rendered " + rendering.name + " (" + rendering.display_name + ") [" + string(instanceof(rendering)) + "]" + (renderable? " [Update]" : " [Skip]"));
LOG_IF(global.FLAG.render, "Rendered " + rendering.name + " (" + rendering.display_name + ") [" + string(instanceof(rendering)) + "]" + (renderable? " [Update]" : " [Skip]"));
LOG_BLOCK_END();
}
} catch(e) {
noti_warning(exception_print(e));
}
LOG_IF(global.DEBUG_FLAG.render, "=== RENDER COMPLETE IN {" + string(current_time - t) + "ms} ===\n");
LOG_IF(global.FLAG.render, "=== RENDER COMPLETE IN {" + string(current_time - t) + "ms} ===\n");
LOG_END();
}
@ -148,7 +148,7 @@ function __renderListReset(list) {
function RenderList(list) {
LOG_BLOCK_START();
LOG_IF(global.DEBUG_FLAG.render, "=== RENDER LIST START ===");
LOG_IF(global.FLAG.render, "=== RENDER LIST START ===");
var queue = ds_queue_create();
try {
@ -173,8 +173,8 @@ function RenderList(list) {
ds_queue_enqueue(queue, _node);
}
LOG_IF(global.DEBUG_FLAG.render, "Get leaf complete: found " + string(ds_queue_size(queue)) + " leaves.");
LOG_IF(global.DEBUG_FLAG.render, "Start rendering...");
LOG_IF(global.FLAG.render, "Get leaf complete: found " + string(ds_queue_size(queue)) + " leaves.");
LOG_IF(global.FLAG.render, "Start rendering...");
// render forward
while(!ds_queue_empty(queue)) {
@ -183,7 +183,7 @@ function RenderList(list) {
rendering.doUpdate();
LOG_LINE_IF(global.DEBUG_FLAG.render, "Rendering " + rendering.name + " (" + rendering.display_name + ") ");
LOG_LINE_IF(global.FLAG.render, "Rendering " + rendering.name + " (" + rendering.display_name + ") ");
var nextNodes = rendering.getNextNodes();
for( var i = 0; i < array_length(nextNodes); i++ )
@ -194,14 +194,14 @@ function RenderList(list) {
noti_warning(exception_print(e));
}
LOG_IF(global.DEBUG_FLAG.render, "=== RENDER COMPLETE ===\n");
LOG_IF(global.FLAG.render, "=== RENDER COMPLETE ===\n");
LOG_END();
ds_queue_destroy(queue);
}
function RenderListAction(list, context = PANEL_GRAPH.getCurrentContext()) {
printIf(global.DEBUG_FLAG.render, "=== RENDER LIST ACTION START [frame " + string(ANIMATOR.current_frame) + "] ===");
printIf(global.FLAG.render, "=== RENDER LIST ACTION START [frame " + string(ANIMATOR.current_frame) + "] ===");
try {
var rendering = noone;
@ -224,7 +224,7 @@ function RenderListAction(list, context = PANEL_GRAPH.getCurrentContext()) {
if(_node.isRenderable()) {
ds_queue_enqueue(RENDER_QUEUE, _node);
printIf(global.DEBUG_FLAG.render, " > Push " + _node.name + " (" + _node.display_name + ") node to stack");
printIf(global.FLAG.render, " > Push " + _node.name + " (" + _node.display_name + ") node to stack");
}
}
@ -239,7 +239,7 @@ function RenderListAction(list, context = PANEL_GRAPH.getCurrentContext()) {
rendering.doUpdate();
if(rendering.hasInspector1Update()) {
rendering.inspector1Update();
printIf(global.DEBUG_FLAG.render, " > Toggle manual execution " + rendering.name + " (" + rendering.display_name + ")");
printIf(global.FLAG.render, " > Toggle manual execution " + rendering.name + " (" + rendering.display_name + ")");
}
var nextNodes = rendering.getNextNodes();
@ -247,10 +247,10 @@ function RenderListAction(list, context = PANEL_GRAPH.getCurrentContext()) {
ds_queue_enqueue(RENDER_QUEUE, nextNodes[i]);
}
printIf(global.DEBUG_FLAG.render, "Rendered " + rendering.name + " (" + rendering.display_name + ") [" + string(instanceof(rendering)) + "]" + txt);
printIf(global.FLAG.render, "Rendered " + rendering.name + " (" + rendering.display_name + ") [" + string(instanceof(rendering)) + "]" + txt);
}
printIf(global.DEBUG_FLAG.render, "=== RENDER COMPLETE IN {" + string(current_time - t) + "ms} ===\n");
printIf(global.FLAG.render, "=== RENDER COMPLETE IN {" + string(current_time - t) + "ms} ===\n");
} catch(e) {
noti_waning(exception_print(e));
}

View file

@ -2,6 +2,7 @@
global.EQUATION_PRES = ds_map_create();
global.EQUATION_PRES[? "+"] = 1;
global.EQUATION_PRES[? "-"] = 1;
global.EQUATION_PRES[? "_"] = 9; //unary negative
global.EQUATION_PRES[? "*"] = 2;
global.EQUATION_PRES[? "/"] = 2;
global.EQUATION_PRES[? "^"] = 3;
@ -26,7 +27,7 @@
var len = string_length(fx);
var l = 1;
var ch, cch;
var ch, cch, _ch;
while(l <= len) {
ch = string_char_at(fx, l);
@ -36,9 +37,10 @@
else {
if(pres[? ch] > pres[? ds_stack_top(op)] || ds_stack_top(op) == "(") ds_stack_push(op, ch);
else {
while(pres[? ch] <= pres[? ds_stack_top(op)] && !ds_stack_empty(op)) {
if(ch == "-" && ds_map_exists(pres, _ch)) ch = "_"; //unary negative
while(pres[? ch] <= pres[? ds_stack_top(op)] && !ds_stack_empty(op))
ds_stack_push(vl, evalToken(ds_stack_pop(op), vl));
}
ds_stack_push(op, ch);
}
}
@ -48,9 +50,8 @@
ds_stack_push(op, ch);
l++;
} else if (ch == ")") {
while(ds_stack_top(op) != "(" && !ds_stack_empty(op)) {
while(ds_stack_top(op) != "(" && !ds_stack_empty(op))
ds_stack_push(vl, evalToken(ds_stack_pop(op), vl));
}
ds_stack_pop(op);
l++;
} else {
@ -82,6 +83,8 @@
}
}
}
_ch = ch;
}
while(!ds_stack_empty(op)) {
@ -103,6 +106,8 @@
return -ds_stack_pop(vl) + ds_stack_pop(vl);
else
return -ds_stack_pop(vl);
case "_":
return -ds_stack_pop(vl);
case "*":
if(ds_stack_size(vl) >= 2)
return ds_stack_pop(vl) * ds_stack_pop(vl);

View file

@ -94,6 +94,7 @@
case "+": return (is_real(v1) && is_real(v2))? v1 + v2 : 0;
case "-": return (is_real(v1) && is_real(v2))? v1 - v2 : 0;
case "_": return is_real(v1)? -v1 : 0;
case "*": return (is_real(v1) && is_real(v2))? v1 * v2 : 0;
case "^": return (is_real(v1) && is_real(v2))? power(v1, v2) : 0;
case "/": return (is_real(v1) && is_real(v2))? v1 / v2 : 0;
@ -129,7 +130,7 @@
var len = string_length(fx);
var l = 1;
var ch, cch;
var ch, cch, _ch;
while(l <= len) {
ch = string_char_at(fx, l);
@ -139,6 +140,8 @@
else {
if(pres[? ch] > pres[? ds_stack_top(op)] || ds_stack_top(op) == "(") ds_stack_push(op, ch);
else {
if(ch == "-" && ds_map_exists(pres, _ch)) ch = "_"; //unary negative
while(pres[? ch] <= pres[? ds_stack_top(op)] && !ds_stack_empty(op))
ds_stack_push(vl, buildFuncTree(ds_stack_pop(op), vl));
ds_stack_push(op, ch);
@ -187,6 +190,8 @@
}
}
}
_ch = ch;
}
while(!ds_stack_empty(op))

View file

@ -22,60 +22,82 @@ function file_read_bytes(file, amo = 1, signed = false, little_endian = true) {
return b;
}
global.DEBUG_FLAG.wav_import = true;
global.FLAG.wav_import = true;
function file_read_wav(path) {
var f = file_bin_open(path, 0);
wav_file_reader = file_bin_open(path, 0);
wav_file_reading = true;
wav_file_prg = 0;
//RIFF
printIf(global.DEBUG_FLAG.wav_import, "-- RIFF --")
var b = file_read_ASCII(f, 4); printIf(global.DEBUG_FLAG.wav_import, b);
var l = file_read_bytes(f, 4); printIf(global.DEBUG_FLAG.wav_import, $"Packages: {l}");
var w = file_read_ASCII(f, 4); printIf(global.DEBUG_FLAG.wav_import, w);
printIf(global.FLAG.wav_import, "-- RIFF --")
var b = file_read_ASCII(wav_file_reader, 4); printIf(global.FLAG.wav_import, b);
var l = file_read_bytes(wav_file_reader, 4); printIf(global.FLAG.wav_import, $"Packages: {l}");
var w = file_read_ASCII(wav_file_reader, 4); printIf(global.FLAG.wav_import, w);
//FORMAT
printIf(global.DEBUG_FLAG.wav_import, "-- FORMAT --")
var b = file_read_ASCII(f, 4); printIf(global.DEBUG_FLAG.wav_import, b);
var l = file_read_bytes(f, 4); printIf(global.DEBUG_FLAG.wav_import, $"Length: {l}");
var l = file_read_bytes(f, 2); printIf(global.DEBUG_FLAG.wav_import, $"0x01: {l}");
var ch = file_read_bytes(f, 2); printIf(global.DEBUG_FLAG.wav_import, $"Channels: {ch}");
var sm = file_read_bytes(f, 4); printIf(global.DEBUG_FLAG.wav_import, $"Sample: {sm}");
var l = file_read_bytes(f, 4); printIf(global.DEBUG_FLAG.wav_import, $"BPS: {l}");
var br = file_read_bytes(f, 2); printIf(global.DEBUG_FLAG.wav_import, $"Bitrate: {br}");
var l = file_read_bytes(f, 2); printIf(global.DEBUG_FLAG.wav_import, $"Bit/Sam: {l}");
printIf(global.FLAG.wav_import, "-- FORMAT --")
var b = file_read_ASCII(wav_file_reader, 4); printIf(global.FLAG.wav_import, b);
var l = file_read_bytes(wav_file_reader, 4); printIf(global.FLAG.wav_import, $"Length: {l}");
var l = file_read_bytes(wav_file_reader, 2); printIf(global.FLAG.wav_import, $"0x01: {l}");
var ch = file_read_bytes(wav_file_reader, 2); printIf(global.FLAG.wav_import, $"Channels: {ch}");
var sm = file_read_bytes(wav_file_reader, 4); printIf(global.FLAG.wav_import, $"Sample: {sm}");
var l = file_read_bytes(wav_file_reader, 4); printIf(global.FLAG.wav_import, $"BPS: {l}");
var br = file_read_bytes(wav_file_reader, 2); printIf(global.FLAG.wav_import, $"Bitrate: {br}");
var l = file_read_bytes(wav_file_reader, 2); printIf(global.FLAG.wav_import, $"Bit/Sam: {l}");
//DATA
printIf(global.DEBUG_FLAG.wav_import, "-- DATA --")
var b = file_read_ASCII(f, 4); printIf(global.DEBUG_FLAG.wav_import, b);
var l = file_read_bytes(f, 4); printIf(global.DEBUG_FLAG.wav_import, $"Length: {l}");
printIf(global.FLAG.wav_import, "-- DATA --")
var b = file_read_ASCII(wav_file_reader, 4); printIf(global.FLAG.wav_import, b);
var l = file_read_bytes(wav_file_reader, 4); printIf(global.FLAG.wav_import, $"Length: {l}");
var bpc = br / ch;
var bits = l / br;
var data = array_create(ch);
var lim = 1 << (8 * bpc - 2);
printIf(global.DEBUG_FLAG.wav_import, "-- READ --")
printIf(global.DEBUG_FLAG.wav_import, $"Channels: {ch}");
printIf(global.DEBUG_FLAG.wav_import, $"BPC: {bpc * 8}");
printIf(global.DEBUG_FLAG.wav_import, $"bits: {bits}");
printIf(global.DEBUG_FLAG.wav_import, $"lim: {lim}");
printIf(global.DEBUG_FLAG.wav_import, $"duration: {bits / sm}");
var _mn = 0, _mx = 0;
for( var i = 0; i < bits; i++ )
for( var j = 0; j < ch; j++ ) {
data[j][i] = file_read_bytes(f, bpc, true) / lim;
_mn = min(_mn, data[j][i]);
_mx = max(_mx, data[j][i]);
}
file_bin_close(f);
printIf(global.FLAG.wav_import, "-- READ --")
printIf(global.FLAG.wav_import, $"Channels: {ch}");
printIf(global.FLAG.wav_import, $"BPC: {bpc * 8}");
printIf(global.FLAG.wav_import, $"bits: {bits}");
printIf(global.FLAG.wav_import, $"duration: {bits / sm}");
return {
printIf(global.FLAG.wav_import, $"-- READING DATA --");
for( var j = 0; j < ch; j++ )
data[j] = array_create(bits);
wav_file_range = [0, 0];
content = {
sound: data,
sample: sm,
channels: ch,
bit_depth: bpc * 8,
duration: bits / sm,
packet: bits,
};
return content;
}
function file_read_wav_step() {
if(!wav_file_reading) return false;
var bpc = content.bit_depth / 8;
var lim = 1 << (8 * bpc - 2);
var t = current_time;
for(; wav_file_prg < content.packet; wav_file_prg++ ) {
for( var j = 0; j < content.channels; j++ )
content.sound[j][wav_file_prg] = file_read_bytes(wav_file_reader, bpc, bpc == 2) / lim;
wav_file_range[0] = min(wav_file_range[0], content.sound[0][wav_file_prg]);
wav_file_range[1] = max(wav_file_range[1], content.sound[0][wav_file_prg]);
if(current_time - t > 1000 / 30) return false;
}
printIf(global.FLAG.wav_import, $"Wav range: {wav_file_range}");
wav_file_reading = false;
file_bin_close(wav_file_reader);
return true;
}

View file

@ -8,20 +8,17 @@ uniform vec2 dimension;
uniform vec2 sampler;
void main() {
vec2 pos = (floor((v_vTexcoord * dimension) / sampler) * sampler) / dimension;
bool emp = true;
vec2 pos = floor((v_vTexcoord * dimension) / sampler) * sampler;
pos /= dimension;
gl_FragColor = vec4(0.);
for(float i = 0.; i <= sampler.x; i++)
for(float j = 0.; j <= sampler.y; j++) {
vec4 col = texture2D( gm_BaseTexture, pos + vec2(i, j) / dimension);
if(col.a > 0.) {
emp = false;
break;
gl_FragColor = vec4(1.);
return;
}
}
if(emp)
gl_FragColor = vec4(0.);
else
gl_FragColor = vec4(1.);
}

View file

@ -57,35 +57,39 @@ vec4 texture2Dintp( sampler2D texture, vec2 uv ) {
/////////////// SAMPLING ///////////////
float unmix( float st, float ed, float val) {
return (val - st) / (ed - st);
}
void main() {
float px = v_vTexcoord.x;
float py = v_vTexcoord.y;
float u, v;
vec2 uv;
vec2 A = (p3 - p0) - (p2 - p1);
vec2 B = (p0 - p1);
vec2 C = (p2 - p1);
vec2 D = p1;
if (abs(p3.y - p0.y) < 0.001 && abs(p2.y - p1.y) < 0.001) { // trapezoid edge case
float t = (py - p2.y) / (p3.y - p2.y);
u = unmix(mix(p3.x, p2.x, 1. - t), mix(p0.x, p1.x, 1. - t), px);
v = t;
uv = vec2(u, v);
} else {
vec2 A = (p3 - p0) - (p2 - p1);
vec2 B = (p0 - p1);
vec2 C = (p2 - p1);
vec2 D = p1;
if(abs(A.x) < 0.001) A.x = 0.001;
if(abs(B.x) < 0.001) B.x = 0.001;
if(abs(C.x) < 0.001) C.x = 0.001;
if(abs(A.y) < 0.001) A.y = 0.001;
if(abs(B.y) < 0.001) B.y = 0.001;
if(abs(C.y) < 0.001) C.y = 0.001;
float c1 = (B.y * C.x) + (A.y * D.x) - (B.x * C.y) - (A.x * D.y);
float c2 = (B.y * D.x) - (B.x * D.y);
float c1 = (B.y * C.x) + (A.y * D.x) - (B.x * C.y) - (A.x * D.y);
float c2 = (B.y * D.x) - (B.x * D.y);
float _A = (A.y * C.x) - (A.x * C.y);
float _B = (A.x * py) + c1 - (A.y * px);
float _C = (B.x * py) + c2 - (B.y * px);
float _A = (A.y * C.x) - (A.x * C.y);
float _B = (A.x * py) + c1 - (A.y * px);
float _C = (B.x * py) + c2 - (B.y * px);
highp float u = A == 0.? 0. : (-_B - sqrt(_B * _B - 4.0 * _A * _C)) / (_A * 2.0);
highp float v = (u * A.x + B.x) == 0.? 0. : (px - (u * C.x) - D.x) / (u * A.x + B.x);
vec2 uv = vec2(1. - u, v);
u = A == 0.? 0. : (-_B - sqrt(_B * _B - 4.0 * _A * _C)) / (_A * 2.0);
v = (u * A.x + B.x) == 0.? 0. : (px - (u * C.x) - D.x) / (u * A.x + B.x);
uv = vec2(1. - u, v);
}
if(uv.x >= 0. && uv.y >= 0. && uv.x <= 1. && uv.y <= 1.)
gl_FragColor = texture2Dintp( gm_BaseTexture, uv );

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,74 @@
{
"resourceType": "GMSprite",
"resourceVersion": "1.0",
"name": "s_node_FFT",
"bbox_bottom": 56,
"bbox_left": 2,
"bbox_right": 61,
"bbox_top": 6,
"bboxMode": 0,
"collisionKind": 1,
"collisionTolerance": 0,
"DynamicTexturePage": false,
"edgeFiltering": false,
"For3D": false,
"frames": [
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"28a6f614-06fd-486c-be0e-ea97ac9583cb",},
],
"gridX": 0,
"gridY": 0,
"height": 64,
"HTile": false,
"layers": [
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"484a9988-3169-4c1d-9e5d-1ab10cc22386","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
],
"nineSlice": null,
"origin": 4,
"parent": {
"name": "number",
"path": "folders/nodes/icons/value/number.yy",
},
"preMultiplyAlpha": false,
"sequence": {
"resourceType": "GMSequence",
"resourceVersion": "1.4",
"name": "s_node_FFT",
"autoRecord": true,
"backdropHeight": 768,
"backdropImageOpacity": 0.5,
"backdropImagePath": "",
"backdropWidth": 1366,
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
"eventStubScript": null,
"eventToFunction": {},
"length": 1.0,
"lockOrigin": false,
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
"playback": 1,
"playbackSpeed": 30.0,
"playbackSpeedType": 0,
"showBackdrop": true,
"showBackdropImage": false,
"timeUnits": 1,
"tracks": [
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"28a6f614-06fd-486c-be0e-ea97ac9583cb","path":"sprites/s_node_FFT/s_node_FFT.yy",},},},"Disabled":false,"id":"e0d0f172-fcfe-414e-9324-451b20c72783","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
],
"visibleRange": null,
"volume": 1.0,
"xorigin": 32,
"yorigin": 32,
},
"swatchColours": null,
"swfPrecision": 2.525,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
},
"type": 0,
"VTile": false,
"width": 64,
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

View file

@ -0,0 +1,74 @@
{
"resourceType": "GMSprite",
"resourceVersion": "1.0",
"name": "s_node_array_copy",
"bbox_bottom": 60,
"bbox_left": 0,
"bbox_right": 63,
"bbox_top": 3,
"bboxMode": 0,
"collisionKind": 1,
"collisionTolerance": 0,
"DynamicTexturePage": false,
"edgeFiltering": false,
"For3D": false,
"frames": [
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"2123a95c-08f9-4de1-ac33-4aa6f355deb4",},
],
"gridX": 0,
"gridY": 0,
"height": 64,
"HTile": false,
"layers": [
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"d0bac403-92e8-482f-a47c-d0a531a57127","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
],
"nineSlice": null,
"origin": 4,
"parent": {
"name": "array",
"path": "folders/nodes/icons/value/array.yy",
},
"preMultiplyAlpha": false,
"sequence": {
"resourceType": "GMSequence",
"resourceVersion": "1.4",
"name": "s_node_array_copy",
"autoRecord": true,
"backdropHeight": 768,
"backdropImageOpacity": 0.5,
"backdropImagePath": "",
"backdropWidth": 1366,
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
"eventStubScript": null,
"eventToFunction": {},
"length": 1.0,
"lockOrigin": false,
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
"playback": 1,
"playbackSpeed": 30.0,
"playbackSpeedType": 0,
"showBackdrop": true,
"showBackdropImage": false,
"timeUnits": 1,
"tracks": [
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"2123a95c-08f9-4de1-ac33-4aa6f355deb4","path":"sprites/s_node_array_copy/s_node_array_copy.yy",},},},"Disabled":false,"id":"9ad080aa-4363-4ddc-b562-058d35517fa3","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
],
"visibleRange": null,
"volume": 1.0,
"xorigin": 32,
"yorigin": 32,
},
"swatchColours": null,
"swfPrecision": 2.525,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
},
"type": 0,
"VTile": false,
"width": 64,
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,74 @@
{
"resourceType": "GMSprite",
"resourceVersion": "1.0",
"name": "s_node_audio_trim",
"bbox_bottom": 61,
"bbox_left": 2,
"bbox_right": 62,
"bbox_top": 2,
"bboxMode": 0,
"collisionKind": 1,
"collisionTolerance": 0,
"DynamicTexturePage": false,
"edgeFiltering": false,
"For3D": false,
"frames": [
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"e19cb9c0-9e9d-483e-80b1-c9277d045971",},
],
"gridX": 0,
"gridY": 0,
"height": 64,
"HTile": false,
"layers": [
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"b747a73a-ddfc-43a5-b786-f0780273750c","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
],
"nineSlice": null,
"origin": 4,
"parent": {
"name": "animation",
"path": "folders/nodes/icons/animation.yy",
},
"preMultiplyAlpha": false,
"sequence": {
"resourceType": "GMSequence",
"resourceVersion": "1.4",
"name": "s_node_audio_trim",
"autoRecord": true,
"backdropHeight": 768,
"backdropImageOpacity": 0.5,
"backdropImagePath": "",
"backdropWidth": 1366,
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
"eventStubScript": null,
"eventToFunction": {},
"length": 1.0,
"lockOrigin": false,
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
"playback": 1,
"playbackSpeed": 30.0,
"playbackSpeedType": 0,
"showBackdrop": true,
"showBackdropImage": false,
"timeUnits": 1,
"tracks": [
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"e19cb9c0-9e9d-483e-80b1-c9277d045971","path":"sprites/s_node_audio_trim/s_node_audio_trim.yy",},},},"Disabled":false,"id":"0a2515d4-55df-467f-84c3-0cc6cb029515","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
],
"visibleRange": null,
"volume": 1.0,
"xorigin": 32,
"yorigin": 32,
},
"swatchColours": null,
"swfPrecision": 2.525,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
},
"type": 0,
"VTile": false,
"width": 64,
}