Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

192
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda