Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
Litegraph.js Allows Give Null Data

By using LiteGraph.js First I added input and output , then I tried in the next example To get input data (String) and showing in alert , but it allows give a null Or undefined Data !! I don't understand why!?

(function(global) {
var LiteGraph = global.LiteGraph;

  
  
  
function Variable(){
    this.addInput("Set");
    this.addOutput("Get");
   
   
}
        
    Variable.shape = LiteGraph.ROUND_SHAPE;
    Variable.title = "Variable";
    Variable.desc = "set value of variable";


// Event

   Variable.prototype.onExecute = function() {
  this.setOutputData(0,'output');
   
   };
   
  
   Variable.prototype.onConnectInput= function(){
  var k =this.getInputData(0,true);
    alert('Input '+k)
   };
   
    
 //On OUTPUT is connected
 
Variable.prototype.onConnectOutput = function(){
  
// this.setOutputData(0,'Data');
  var x = this.getInputData(0,true);
  
 
  
  alert('Output '+x);
  
}


LiteGraph.registerNodeType("variable/var", Variable);



     
})(this);

I hope someone will help and Thanks ಠ‿ಠ

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!