Format
This commit is contained in:
@@ -15,19 +15,18 @@ function float_node_create(arg: f32): float_node_t {
|
||||
return n;
|
||||
}
|
||||
|
||||
function float_node_get(self: float_node_t, from: i32, done: (a: any)=>void) {
|
||||
function float_node_get(self: float_node_t, from: i32): any {
|
||||
if (self.base.inputs.length > 0) {
|
||||
logic_node_input_get(self.base.inputs[0], done);
|
||||
return logic_node_input_get(self.base.inputs[0]);
|
||||
}
|
||||
else {
|
||||
done(self.value);
|
||||
return self.value;
|
||||
}
|
||||
}
|
||||
|
||||
function float_node_get_as_image(self: float_node_t, from: i32, done: (img: image_t)=>void) {
|
||||
function float_node_get_as_image(self: float_node_t, from: i32): image_t {
|
||||
if (self.base.inputs.length > 0) {
|
||||
logic_node_input_get_as_image(self.base.inputs[0], done);
|
||||
return;
|
||||
return logic_node_input_get_as_image(self.base.inputs[0]);
|
||||
}
|
||||
if (self.image != null) {
|
||||
image_unload(self.image);
|
||||
@@ -39,7 +38,7 @@ function float_node_get_as_image(self: float_node_t, from: i32, done: (img: imag
|
||||
buffer_view_set_f32(v, 8, self.value);
|
||||
buffer_view_set_f32(v, 12, 1.0);
|
||||
self.image = image_from_bytes(b, 1, 1, tex_format_t.RGBA128);
|
||||
done(self.image);
|
||||
return self.image;
|
||||
}
|
||||
|
||||
function float_node_set(self: float_node_t, value: any) {
|
||||
|
||||
Reference in New Issue
Block a user