コード例 #1
0
  @Override
  public void draw() {
    g.clearColor(1f);
    g.clear();
    //		g.blend(CCBlendMode.ADD);
    g.translate(-width / 2, -height / 2);
    for (int x = 0; x < _myData.width() - 1; x += 3) {
      for (int y = 0; y < _myData.height() - 1; y += 3) {
        CCColor myPixel = _myData.getPixel(x, y);
        g.color(myPixel);
        float myRadius = (1 - myPixel.brightness()) * 10;
        g.ellipse(x * 2, y * 2, myRadius, myRadius);

        myPixel = _myData.getPixel(_myData.width() - x - 1, y);
        g.color(myPixel);
        myRadius = (1 - myPixel.brightness()) * 10;
        g.ellipse(x * 2, y * 2, myRadius, myRadius);
      }
    }

    System.out.println(frameRate);
  }
コード例 #2
0
 @Override
 public void setup() {
   _myData = new CCQuicktimeMovie(this, CCIOUtil.dataPath("videos/kaki.mov"));
   _myData.loop();
 }