Script Language Javascript Provider for Rhino3d
- Rhino 7
- Installed Hornbill in Rhino 7 PackageManager
- node.js >= 12
- yarn >= 1.22.0
- code editor like VS Code for scripting
- Open Rhino 7
- Typing
PackageManager
command - Searching for
Hornbill
and install - Restart Rhino 7
- Keep Rhino window open
- You are good to go
- Create a empty folder for store your work.
mkdir hornbill-test && cd hornbill-test
- Initialing this folder as a javascript module.
yarn init -y
- Add a magic library for making things work.
yarn add @hornbill/cli -D
Alternatively, your can install
@hornbill/cli
in global scope, thushornbill
command is available any where in your computer.
yarn global add @hornbill/cli
- Create a script file named
index.js
, so far your folder is something like:
hornbill-test/
├── node_modules/
│ └── ...
├── index.js
├── package.json
└── yarn.lock
- Finally, we can write some code in
index.js
.
import { RhinoApp } from "Rhino";
RhinoApp.WriteLine("Hello from Javascript");
- And, we can simply run this script by
yarn hornbill run index.js
command. - Now, checkout you rhino command line, you can see
Hello from Javascript
in it.