processing / processing/libprocessing
NameError: name 'frame_rate' is not defined
未关闭
还没有人认领这个 Issue。
- 主要语言
- Rust
- 星标
- 69
- 派生
- 14
- 平均合并
- 15 天 22 小时
- 30 天内合并 PR
- 3
描述
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()
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
入口点是已发布 Python 示例中的 setup()、draw() 和 run();首先重现 NameError,并检查 Rust Processing API 为 frame_rate 导出的命名。确认问题是由示例还是 API 导致的,然后验证示例能够在没有未定义名称错误的情况下启动并运行。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python, rust
- 领域
- api
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100