Pixel-Composer/scripts/node_3d_scene/node_3d_scene.gml
2024-10-20 09:12:27 +07:00

27 lines
No EOL
801 B
Text

function Node_3D_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor {
name = "3D Scene";
newOutput(0, nodeValue_Output("Scene", self, VALUE_TYPE.d3Scene, noone));
object_lists = [];
static createNewInput = function() {
var index = array_length(inputs);
newInput(index, nodeValue_D3Mesh("Object", self, noone))
.setVisible(true, true);
return inputs[index];
} setDynamicInput(1, true, VALUE_TYPE.d3Mesh);
static processData = function(_output, _data, _output_index, _array_index = 0) {
var _scene = new __3dGroup();
for( var i = input_fix_len, n = array_length(inputs); i < n; i += data_length ) {
var _obj = _data[i];
if(is_instanceof(_obj, __3dObject) || is_instanceof(_obj, __3dGroup))
_scene.addObject(_obj);
}
return _scene;
}
}