Skip to Content
自造手冊:新工業革命實務指南
book

自造手冊:新工業革命實務指南

by Paolo Aliverti, Andrea Maietta
March 2017
Intermediate to advanced
232 pages
4h 44m
Chinese
GoTop Information, Inc.
Content preview from 自造手冊:新工業革命實務指南
用卡通人物寫程式
201
統變數所代表。另一個 mousePressed 系
統變數則以 true 或 false 代表是否點擊滑
鼠。這份草稿碼很簡單,只要把上述介
紹的東西放在 draw 函式中:
void draw()
{
if (mousePressed)
{
point(mouseX, mouseY);
}
}
沒幾行程式,對吧?請加入以下這一行
程式碼把點點加大:
strokeWeight(10);
您應該猜到了,只要把參數加大就能讓
點點 變大。您 也 可 以 把 strokeWeight 指
令放在 setup 函式中。
您可透過鍵盤來給予 Processing 某些資
訊。每當鍵盤上有某個鍵被按下時,都
會產生一個 Processing 可以偵測到的事
件(
事件
)。您可使用 keyPressed 方法檢
查有沒有任何按鍵按下事件發生了。
在 keyPressed 方法 中,您 可 使 用 key 這
個系統變數來看看到底是哪一個按鍵被
按下了。舉例來說,
如果您想要把所輸
入的所有東西都顯示在主控台中,可以
試試看以下這段草稿碼(至少要有一個
draw 函式,就算內容空白也沒關係,這
樣才能讓 keyPressed 函式運作):
void keyPressed()
{
print(key);
}
void draw(){
}
用卡通人物寫程式
在卡通世界中,各種物件與我們人類對
話與互動是稀鬆平常的事情。在這個奇
幻世界中,您可能會聽到類似以下的對
話:
狗狗:「房子,你幹嘛很傷心啊?」
房子:「 因為今天 天 氣很好 但 我卻
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

網頁互動式資料視覺化:使用D3

網頁互動式資料視覺化:使用D3

Scott Murray
優雅的SciPy|Python科學研究的美學

優雅的SciPy|Python科學研究的美學

Juan Nunez-Iglesias, Stéfan van der Walt, Harriet Dashnow
深入淺出代數

深入淺出代數

Tracey Pilone, Dan Pilone

Publisher Resources

ISBN: 9789864763238