congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
PApplet.loadStrings
Code IndexAdd Tabnine to your IDE (free)

How to use
loadStrings
method
in
processing.core.PApplet

Best Java code snippets using processing.core.PApplet.loadStrings (Showing top 20 results out of 315)

origin: org.processing/core

protected String[] loadVertexShader(String filename) {
 return sketch.loadStrings(filename);
}
origin: org.processing/core

protected String[] loadFragmentShader(String filename) {
 return sketch.loadStrings(filename);
}
origin: ajavamind/Processing-Cardboard

protected String[] loadVertexShader(String filename) {
 return sketch.loadStrings(filename);
}
origin: ajavamind/Processing-Cardboard

protected String[] loadFragmentShader(String filename) {
 return sketch.loadStrings(filename);
}
origin: mirador/mirador

public String read() {
 if (!enabled) return "";
 writer.flush();
 String[] lines = PApplet.loadStrings(file);
 String concat = "";
 for (String line: lines) {
  concat += line + "\n";
 }
 return concat;
}
origin: org.processing/core

/**
 * @nowebref
 */
static public String[] loadStrings(InputStream input) {
 try {
  BufferedReader reader =
   new BufferedReader(new InputStreamReader(input, "UTF-8"));
  return loadStrings(reader);
 } catch (IOException e) {
  e.printStackTrace();
 }
 return null;
}
origin: org.processing/core

@Override
protected String[] loadFragmentShader(String filename, int version) {
 String[] fragSrc0 = sketch.loadStrings(filename);
 return preprocessFragmentSource(fragSrc0, version);
}
origin: org.processing/core

@Override
protected String[] loadVertexShader(String filename, int version) {
 String[] vertSrc0 = sketch.loadStrings(filename);
 return preprocessVertexSource(vertSrc0, version);
}
origin: ajavamind/Processing-Cardboard

protected String[] loadVertexShader(URL url) {
 try {
  return PApplet.loadStrings(url.openStream());
 } catch (IOException e) {
  PGraphics.showException("Cannot load vertex shader " + url.getFile());
 }
 return null;
}
origin: ajavamind/Processing-Cardboard

protected String[] loadFragmentShader(URL url) {
 try {
  return PApplet.loadStrings(url.openStream());
 } catch (IOException e) {
  PGraphics.showException("Cannot load fragment shader " + url.getFile());
 }
 return null;
}
origin: org.processing/core

protected String[] loadFragmentShader(URL url) {
 try {
  return PApplet.loadStrings(url.openStream());
 } catch (IOException e) {
  PGraphics.showException("Cannot load fragment shader " + url.getFile());
 }
 return null;
}
origin: org.processing/core

protected String[] loadVertexShader(URL url) {
 try {
  return PApplet.loadStrings(url.openStream());
 } catch (IOException e) {
  PGraphics.showException("Cannot load vertex shader " + url.getFile());
 }
 return null;
}
origin: ajavamind/Processing-Cardboard

static public String[] loadStrings(File file) {
  InputStream is = createInput(file);
  if (is != null) return loadStrings(is);
  return null;
}
origin: org.processing/core

/**
 * Read a set of entries from a Reader that has each key/value pair on
 * a single line, separated by a tab.
 *
 * @nowebref
 */
public StringDict(BufferedReader reader) {
 String[] lines = PApplet.loadStrings(reader);
 keys = new String[lines.length];
 values = new String[lines.length];
 for (int i = 0; i < lines.length; i++) {
  String[] pieces = PApplet.split(lines[i], '\t');
  if (pieces.length == 2) {
   keys[count] = pieces[0];
   values[count] = pieces[1];
   indices.put(keys[count], count);
   count++;
  }
 }
}
origin: org.processing/core

@Override
protected String[] loadFragmentShader(URL url, int version) {
 try {
  String[] fragSrc0 = PApplet.loadStrings(url.openStream());
  return preprocessFragmentSource(fragSrc0, version);
 } catch (IOException e) {
  PGraphics.showException("Cannot load fragment shader " + url.getFile());
 }
 return null;
}
origin: org.processing/core

@Override
protected String[] loadVertexShader(URL url, int version) {
 try {
  String[] vertSrc0 = PApplet.loadStrings(url.openStream());
  return preprocessVertexSource(vertSrc0, version);
 } catch (IOException e) {
  PGraphics.showException("Cannot load vertex shader " + url.getFile());
 }
 return null;
}
origin: org.processing/core

/**
 * Read a set of entries from a Reader that has each key/value pair on
 * a single line, separated by a tab.
 *
 * @nowebref
 */
public IntDict(BufferedReader reader) {
 String[] lines = PApplet.loadStrings(reader);
 keys = new String[lines.length];
 values = new int[lines.length];
 for (int i = 0; i < lines.length; i++) {
  String[] pieces = PApplet.split(lines[i], '\t');
  if (pieces.length == 2) {
   keys[count] = pieces[0];
   values[count] = PApplet.parseInt(pieces[1]);
   indices.put(pieces[0], count);
   count++;
  }
 }
}
origin: poqudrof/PapARt

public CalibratedColorTracker(PaperScreen paperScreen, float scale) {
  super(paperScreen, scale);
  references = new ColorReferenceThresholds[numberOfRefs];
  // Load all the colors. 
  for (int fileId = 0; fileId < numberOfRefs; fileId++) {
    String fileName = Papart.colorThresholds + fileId + ".txt";
    String[] list = Papart.getPapart().getApplet().loadStrings(fileName);
    references[fileId] = new ColorReferenceThresholds();
    for (String data : list) {
      references[fileId].loadParameter(data);
    }
    System.out.println("Ref: " + fileId + " " + 
        " A " + references[fileId].averageA + 
        " B " + references[fileId].averageB);
  }
}
origin: poqudrof/PapARt

private ColorTracker initColorTracking(String name, String calibFile, PaperScreen screen, float quality) {
  ColorTracker colorTracker = new ColorTracker(screen, getDefaultColorTouchCalibration(), quality);
  String[] list = applet.loadStrings(calibFile);
  for (int i = 0; i < list.length; i++) {
    String data = list[i];
    colorTracker.loadParameter(data);
  }
  colorTracker.setName(name);
  return colorTracker;
}
origin: poqudrof/PapARt

public static ColorReferenceThresholds[] loadDefaultThresholds(int numberOfRefs) {
  ColorReferenceThresholds[] references = new ColorReferenceThresholds[numberOfRefs];
  // Load all the colors. 
  for (int fileId = 0; fileId < numberOfRefs; fileId++) {
    String fileName = Papart.colorThresholds + fileId + ".txt";
    String[] list = Papart.getPapart().getApplet().loadStrings(fileName);
    references[fileId] = new ColorReferenceThresholds();
    for (String data : list) {
      references[fileId].loadParameter(data);
    }
  }
  return references;
}
processing.corePAppletloadStrings

Popular methods of PApplet

  • constrain
  • createGraphics
    Create an offscreen graphics surface for drawing, in this case for a renderer that writes to a file
  • saveStrings
    ( begin auto-generated from saveStrings.xml ) Writes an array of strings to a file, one line per str
  • abs
  • createImage
    ( begin auto-generated from createImage.xml ) Creates a new PImage (the datatype for storing images)
  • createShape
  • createWriter
    ( begin auto-generated from createWriter.xml ) Creates a new file in the sketch folder, and a PrintW
  • loadImage
  • main
    main() method for running this class from the command line. Usage: PApplet [options] [s
  • max
  • parseInt
  • random
    ( begin auto-generated from random.xml ) Generates random numbers. Each time the random() function
  • parseInt,
  • random,
  • round,
  • split,
  • sqrt,
  • unhex,
  • arrayCopy,
  • ceil,
  • checkExtension

Popular in Java

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
  • getSharedPreferences (Context)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • BoxLayout (javax.swing)
  • JCheckBox (javax.swing)
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now