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