Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/idyll-lang/idyll-apparatus-component
Component base class to make it easy to integrate Apparatus into Idyll projects
https://github.com/idyll-lang/idyll-apparatus-component
Last synced: 14 days ago
JSON representation
Component base class to make it easy to integrate Apparatus into Idyll projects
- Host: GitHub
- URL: https://github.com/idyll-lang/idyll-apparatus-component
- Owner: idyll-lang
- License: mit
- Created: 2017-12-18T18:41:00.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-20T22:27:24.000Z (over 5 years ago)
- Last Synced: 2024-10-30T00:54:57.600Z (21 days ago)
- Language: JavaScript
- Size: 42 KB
- Stars: 5
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# idyll-apparatus-component
Component base class to make it easy to integrate [Apparatus](http://aprt.us/) into Idyll projects.
See more about this at https://mathisonian.com/writing/apparatus
## Installation
First, [set up an Idyll project](http://idyll-lang.org/getting-started).
Inside your idyll project:
```
npm install --save idyll-apparatus-component
```## Usage
```
[IdyllApparatusComponent
_url:"path to json spec"
_regionOfInterest:`{ x: [-1, 1], y: [-1, 1] }`
_width: 300
_height: 300 /]
```### Binding variables
Any property passed to the apparatus component that doesn't start with an underscore
will be bound to the apparatus attribute of the same name. For example,
to bind an Idyll variable named `IdyllN` to an Apparatus attribute called `N`:```
[var name:“IdyllN” value:0 /][IdyllApparatusComponent
_url: ...”
_regionOfInterest: roi
_width: 300
_height: 300
N:IdyllN /]
```