You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
1004 B

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. Subwayjs is a javascript module for creating an interactive subway system for you website. See www.camdp.com/UWSubway and www.camdp.com/ttc for examples.
  2. The module relies on Paper.js (http://paperjs.org/download/).
  3. To run, you'll need something that looks like this in your header:
  4. <meta .... >
  5. <script type="text/javascript" src="/scripts/paperjs/lib/paper.js"></script>
  6. <script type="text/paperscript" src="/scripts/subway.js" canvas="subway"></script>
  7. <style ...>
  8. Note that there must be only one script that will contain the main subways.js library and the initialization of the stations (see initialization_example.js for an example of initalization). The seperation above was purely for aesthetics. The reason for this is that paper.js works only a very local scope, and not across js scripts.
  9. See ttc.js for a full, working example.
  10. Please email me at cam.davidson.pilon@gmail.com if you have any comments, questions or suggestions.