Example #1
0
 public void UpdatePreviewTexture()
 {
     if (previewCalculation == null)
     {
         previewCalculation = new NoiseCalculation(module, 128, 128);
     }
     else if (previewCalculation.Done)
     {
         preview            = previewCalculation.Noise.GetTexture();
         previewCalculation = null;
         NeedsUpdate        = false;
     }
 }
Example #2
0
        public sealed override bool Calculate()
        {
            if (allInputsReady())
            {
                module = CreateAndReadyModule();

                NeedsUpdate        = true;
                previewCalculation = null;

                Outputs[0].SetValue(module);

                NodeEditorWindow.NodeUpdated(this);

                return(true);
            }
            else
            {
                return(false);
            }
        }