Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

191
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda