Skip to content

Discrepancy in frameCount behavior in Processing (Java) vs libprocessing / mewnala #124

@SableRaf

Description

@SableRaf

In Processing (Java), frameCount is 0 during setup() and becomes 1 on the first call to draw().

void setup() {
  println(frameCount);
}

void draw() {
  println(frameCount);
  noLoop();
}

Output:

0
1

In libprocessing / mewnala, frame_count appears to already be 1 during setup(), and 2 on the first call to draw().

from mewnala import *

def setup():
    size(600, 600)
    print(frame_count)

def draw():
    if frame_count > 2:
        return
    print(frame_count)

run()

Output:

1
2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions