Key ที่ใช้ในการควบคุม viewport ของ 3D Editor สำหรับ Godot 4

การกระทำผลที่เกิด
scroll wheel ที่ mouseซูมเข้า ซูมออก
คลิ๊กขวาค้างไว้ แล้วขยับ mouse ซ้ายขวาPan ไปทางซ้าย ขวา
(คล้ายกับการที่ยืนเฉยแล้วหันหน้า)
คลิ๊กขวาค้างไว้ แล้วขยับ mouse ขึ้นลงPan ขึ้น (มุมเงย) ลง (มุมก้ม)
(คล้ายกับการยืนเฉยแล้วเงยหน้า ก้มหน้า)
คลิ๊กขวาค้างไว้ แล้วกดปุ่ม W,A,S,Dเคลื่อนที่กล้อง
– ไปด้านหน้า (W)
– ถอยหลัง (S)
– ขยับแบบเบี่ยงซ้าย (A)
– ขยับแบบเบี่ยงขวา (D)
คลิ๊กขวาค้างไว้ แล้วกดปุ่ม Q,Eเคลื่อนที่กล้อง
– ร่อนลง (Q)
– ลอยขึ้น (E)
กดปุ่ม shift และคลิ๊กขวา ค้างไว้ แล้วกดปุ่ม W,A,S,D,Q,Eเคลื่อนที่กล้องด้วยความเร็วที่มากขึ้น
คลิ๊กกลางค้างไว้ แล้วขยับ mouse ซ้ายขวาPan ไปทางซ้าย ขวา
(คล้ายกับการที่ยืนเฉยแล้วหันหน้า)
คลิ๊กกลางค้างไว้ แล้วขยับ mouse ขึ้นลงPan ขึ้น (มุมเงย) ลง (มุมก้ม)
(คล้ายกับการยืนเฉยแล้วเงยหน้า ก้มหน้า)
กดปุ่ม shift และคลิ๊กขวา ค้างไว้ แล้วขยับ mouse ขึ้นลงซ้ายขวาเคลื่อนที่กล้องแบบวงโคจร
(คล้ายการคลิ้กขวาแล้วกด A,D,Q,E)
คลิ๊กที่ ชื่อ node ใน scene tree แล้วกดปุ่ม Fโฟกัสไปที่ node นั้น ๆ

Enjoy Learning

ลองติดตั้ง Racket 8 บน Windows 11 ดู

เริ่มโดย ไป download ตัวติดตั้งที่ https://download.racket-lang.org/ ค้นหาตัวติดตั้งที่เป็น exe file (สามารถเปลี่ยนค่าใน dropdown เพื่อเลือกตัวติดตั้งตามที่ต้องการได้)

และทำการติดตั้งตามปกติ (ในบทความนี้ จะติดตั้งที่ D:\Racket)

เมื่อติดตั้งจบแล้ว จะสามารถใช้งานโปรแกรม DrRacket (เป็นโปรแกรม IDE) และ Racket (เป็นโปรแกรม REPL Environment) ได้เลย แต่ถ้าต้องการให้สามารถใช้งานกับ Command Prompt, Powershell ได้ จะมีขึ้นตอนเพิ่มเติมคือ

ที่หน้าจอ desktop ปกติ คลิ้กที่ปุ่ม windows แล้วพิมพ์ advanced system settings จะเจอโปรแกรมย่อย View advanced system settings ให้คลิ้กปุ่ม Environement Variables…

ตัว Windows จะเปิด popup ขึ้นมาใหม่ ดูที่ส่วน System variables ให้คลิ้กปุ่ม New…

จากนั้นให้ตั้งค่าดังนี้
Variable name: ใส่เป็น RACKET_HOME
Variable value: ใส่เป็น ค่า Path ที่ทำการติดตั้ง Racket (ในบทความนี้ ติดตั้งที่ D:\Racket)
แล้วคลิ้กปุ่ม OK

ที่ส่วน System variables ให้หา Variable ที่ชื่อ Path จากนั้นคลิ้กปุ่ม Edit…

ตัว Windows จะเปิด popup ขึ้นมาใหม่ ให้คลิ้กที่ปุ่ม New หรือคลิ้กซ้ายที่บรรทัดว่างในตาราง เพื่อเพิ่มค่าเข้าไป ให้พิมพ์ค่าดังนี้
%RACKET_HOME%
จากนั้นคลิ้กปุ่ม OK

ให้คลิ้ก OK ที่ popup Environment Variable และคลิ้ก OK ที่ popup ของ System properties เพื่อจบกระบวนการนี้

จากนั้นทดสอบว่า Windows เห็นโปรแกรม Racket หรือไม่ โดยทำการเปิด command prompt, powershell แล้วพิมพ์ คำสั่ง

racket --version

ถ้าสามารถใช้งานได้จะขึ้น information ดังนี้

(โปรแกรม Racket จะมี Command line Tool ที่ชื่อว่า raco ที่เอาไว้ใช้งานในระดับที่มากขึ้น เช่น build, test)

Enjoy Learning

ลองติดตั้ง GHCup บน Windows 11 ดู

เริ่มโดย ไปที่เวบ https://www.haskell.org/ghcup/

ให้ทำการพิมพ์คำสั่งนี้ ในโปรแกรม powershell (ซึ่งที่หน้า web จะมี widget ที่แสดงคำสั่งอยู่ คลิ้กปุ่ม copy มาวางเองได้เช่นกัน) จากนั้นกดปุ่ม enter

Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; try { Invoke-Command -ScriptBlock ([ScriptBlock]::Create((Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -ArgumentList $true } catch { Write-Error $_ }

ตัว shell จะแสดงรายละเอียดขึ้นมาดังนี้

Welcome to Haskell!

This script can download and install the following programs:
  * ghcup - The Haskell toolchain installer
  * ghc   - The Glasgow Haskell Compiler
  * msys2 - A linux-style toolchain environment required for many operations
  * cabal - The Cabal build tool for managing Haskell software
  * stack - (optional) A cross-platform program for developing Haskell projects
  * hls   - (optional) A language server for developers to integrate with their editor/IDE

Please note that ANTIVIRUS may interfere with the installation. If you experience problems, consider
disabling it temporarily.

Where to install to (this should be a short Path, preferably a Drive like 'C:\')?
If you accept this path, binaries will be installed into 'C:\ghcup\bin' and msys2 into 'C:\ghcup\msys64'.
Press enter to accept the default [C:\]:

ให้พิมพ์ Directory ที่ต้องการติดตั้งลงไป (ในบทความนี้ ติดตั้งที่ D:\)
ส่วน Cabal จะล้อไปตาม directory ด้านบน ให้กดปุ่ม enter
ส่วน HLS (Haskell Language Server) โดย default จะไม่มีการติดตั้ง แต่ถ้าต้องการติดตั้ง ให้พิมพ์ Y แล้วกดปุ่ม enter
ส่วน stack โดย default จะไม่มีการติดตั้ง แต่ถ้าต้องการติดตั้ง ให้พิมพ์ Y แล้วกดปุ่ม enter
ส่วน MSys2 ให้เลือกตาม default คือ Y (ติดตั้ง) ให้กดปุ่ม enter
จะมีการ download ข้อมูลที่จำเป็นและทำการติดตั้ง

เมื่อการติดตั้งในส่วนของ MinGW เสร็จสิ้นจะมีข้อความดังนี้

All done!

In a new powershell or cmd.exe session, now you can...

Start a simple repl via:
  ghci

Start a new haskell project in the current directory via:
  cabal init --interactive

Install other GHC versions and tools via:
  ghcup list
  ghcup install <tool> <version>

To install system libraries and update msys2/mingw64,
open the "Mingw haskell shell"
and the "Mingw package management docs"
desktop shortcuts.

If you are new to Haskell, check out https://www.haskell.org/ghcup/steps/
Press any key to exit

ให้กดปุ่มอะไรก็ได้เพื่อปิดหน้าต่างไป

จากนั้นทดสอบว่า Windows เห็นตัว Compiler ของ Haskell Compiler หรือไม่ โดยทำการเปิด command prompt หรือ powershell แล้วพิมพ์ คำสั่ง

ghc --version

ถ้าสามารถใช้งานได้จะขึ้น information ดังนี้

Enjoy Learning