NameError: name 'frame_rate' is not defined
還沒有人認領這個 Issue。
評估
研究方向
進入點是已發布 Python 範例中的 setup()、draw() 和 run();首先重現 NameError,並檢查 Rust Processing API 為 frame_rate 匯出的命名。確認問題是由範例還是 API 導致的,然後驗證範例能夠在沒有未定義名稱錯誤的情況下啟動並執行。
由索引模型根據 Issue 內容生成。
描述
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()
- 主要語言
- Rust
- 星號
- 69
- 分支
- 14
- 平均合併
- 15 天 22 小時
- 30 天內合併 PR
- 3
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
processing/libprocessing 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
processing/libprocessing#233 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
processing/libprocessing#229 ·
-
難度 2/5 1-3 小時 新手友好度 62/100
processing/libprocessing#201 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
processing/libprocessing#194 ·
-
documentation
難度 2/5 1-3 小時 新手友好度 72/100
processing/libprocessing#146 · 1 則留言 ·
查看 processing/libprocessing 的全部 Issue
相似的 Issue
-
todo:perf
難度 2/5 1-3 小時 新手友好度 84/100
-
難度 2/5 1-3 小時 新手友好度 88/100
-
ACP agents get no MCP servers when the thread is created before the project's first worktree loads 未關閉state:needs triage
難度 2/5 1-3 小時 新手友好度 88/100
zed-industries/zed#64611 ·
-
難度 2/5 1-3 小時 新手友好度 74/100
ontola/atomic-server#1625 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
objectionary/phie#154 ·