processing / processing/libprocessing
NameError: name 'frame_rate' is not defined
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 69
- Forks
- 14
- Avg merge
- 15d 22h
- Merged PRs (30d)
- 3
Description
Found while porting Basics / Structure / SetupDraw (see https://github.com/processing/processing-examples-mewnala/issues/110)
Code
"""
Setup and Draw.
The code inside the draw() function runs continuously
from top to bottom until the program is stopped.
"""
from mewnala import *
y = 100
def setup():
"""
The statements in the setup() function
execute once when the program begins
"""
size(640, 360) # Size must be the first statement
stroke(255) # Set line drawing color to white
frame_rate(30)
def draw():
"""
The statements in draw() are executed until the
program is stopped. Each statement is executed in
sequence and after the last line is read, the first
line is executed again.
"""
global y
background(0) # Set the background to black
y = y - 1
if y < 0:
y = height
line(0, y, width, y)
run()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The entry points are setup(), draw(), and run() in the posted Python example; first reproduce the NameError and inspect the Rust Processing API's exported naming for frame_rate. Confirm whether the example or API is responsible, then verify the example starts and runs without the undefined-name error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100