- Add 3D transform node.

This commit is contained in:
Tanasart 2023-11-16 18:01:59 +07:00
parent 7f8a171325
commit d5f1a61a6c
6 changed files with 16 additions and 5 deletions

View file

@ -127,6 +127,7 @@
{"name":"for sort","order":5,"path":"folders/nodes/data/iterate/for sort.yy",},
{"name":"lua","order":12,"path":"folders/nodes/data/lua.yy",},
{"name":"misc","order":10,"path":"folders/nodes/data/misc.yy",},
{"name":"PC effects","order":24,"path":"folders/nodes/data/PC effects.yy",},
{"name":"PCX","order":15,"path":"folders/nodes/data/PCX.yy",},
{"name":"array","order":6,"path":"folders/nodes/data/PCX/array.yy",},
{"name":"flow control","order":7,"path":"folders/nodes/data/PCX/flow control.yy",},
@ -240,7 +241,6 @@
{"name":"button","order":34,"path":"folders/widgets/button.yy",},
{"name":"rotator","order":35,"path":"folders/widgets/rotator.yy",},
{"name":"text","order":36,"path":"folders/widgets/text.yy",},
{"name":"PC effects","order":24,"path":"folders/nodes/data/PC effects.yy",},
],
"ResourceOrderSettings": [
{"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",},

View file

@ -155,6 +155,7 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"for","folderPath":"folders/nodes/data/iterate/for.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"lua","folderPath":"folders/nodes/data/lua.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"misc","folderPath":"folders/nodes/data/misc.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"PC effects","folderPath":"folders/nodes/data/PC effects.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"PCX","folderPath":"folders/nodes/data/PCX.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"array","folderPath":"folders/nodes/data/PCX/array.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"flow control","folderPath":"folders/nodes/data/PCX/flow control.yy",},
@ -275,7 +276,6 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"button","folderPath":"folders/widgets/button.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"rotator","folderPath":"folders/widgets/rotator.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"text","folderPath":"folders/widgets/text.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"PC effects","folderPath":"folders/nodes/data/PC effects.yy",},
],
"IncludedFiles": [
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",},

View file

@ -409,6 +409,7 @@ event_inherited();
for(var index = 0; index < node_count; index++) {
var _node = _list[| index];
if(is_undefined(_node)) continue;
if(is_instanceof(_node, NodeObject) && _node.is_patreon_extra && !IS_PATREON) continue;
if(is_string(_node)) {
if(!PREFERENCES.dialog_add_node_grouping)
@ -527,6 +528,7 @@ event_inherited();
for(var i = 0; i < node_count; i++) {
var _node = _list[| i];
if(is_undefined(_node)) continue;
if(is_instanceof(_node, NodeObject) && _node.is_patreon_extra && !IS_PATREON) continue;
if(is_string(_node)) {
if(!PREFERENCES.dialog_add_node_grouping)
@ -678,6 +680,7 @@ event_inherited();
if(is_string(_node)) continue;
if(ds_map_exists(search_map, _node)) continue;
if(struct_try_get(_node, "deprecated")) continue;
if(is_instanceof(_node, NodeObject) && _node.is_patreon_extra && !IS_PATREON) continue;
var match = string_partial_match(string_lower(_node.getName()), search_lower);
var param = "";

View file

@ -8,6 +8,7 @@ function __3dGroup() constructor {
var _i = 0;
for( var i = 0, n = array_length(objects); i < n; i++ ) {
if(!is_struct(objects[i])) continue;
var _c = objects[i].getCenter();
if(_c == noone) continue;
_v._add(objects[i].getCenter());
@ -27,6 +28,7 @@ function __3dGroup() constructor {
var _cc = getCenter();
for( var i = 0, n = array_length(objects); i < n; i++ ) {
if(!is_struct(objects[i])) continue;
var _c = objects[i].getCenter();
var _b = objects[i].getBBOX();

View file

@ -11,9 +11,14 @@ function Node_3D_Transform(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _gro
];
static processData = function(_output, _data, _output_index, _array_index = 0) { #region
var _mesh = _data[in_d3d + 0].clone();
setTransform(_mesh, _data);
var _mesh = _data[in_d3d + 0];
return _mesh;
var _scene = new __3dGroup();
if(!is_struct(_mesh)) return _scene;
setTransform(_scene, _data);
_scene.addObject(_mesh);
return _scene;
} #endregion
}

View file

@ -522,6 +522,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
ds_list_add(d3d, "Modify");
addNodeObject(d3d, "Discretize vertex", s_node_3d_discretize, "Node_3D_Round_Vertex", [1, Node_3D_Round_Vertex]).setVersion(11560);
addNodeObject(d3d, "Set Material", s_node_3d_set_material, "Node_3D_Set_Material", [1, Node_3D_Set_Material]).setVersion(11560);
addNodeObject(d3d, "Transform", s_node_3d_transform, "Node_3D_Transform", [1, Node_3D_Transform]).setVersion(11570);
addNodeObject(d3d, "Transform Scene", s_node_3d_transform_scene, "Node_3D_Transform_Scene", [1, Node_3D_Transform_Scene]).setVersion(11570);
addNodeObject(d3d, "UV Remap", s_node_uv_remap, "Node_3D_UV_Remap", [1, Node_3D_UV_Remap]).setVersion(11570);
///**/ addNodeObject(d3d, "3D Instancer", s_node_3d_set_material, "Node_3D_Instancer", [1, Node_3D_Instancer]).setVersion(11560);