Skip to content

KaivnD/Hornbill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hornbill

Script Language Javascript Provider for Rhino3d

Requirements

Usage

Step1

  • Open Rhino 7
  • Typing PackageManager command
  • Searching for Hornbill and install
  • Restart Rhino 7
  • Keep Rhino window open
  • You are good to go

Step2

  • 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, thus hornbill 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.