Web UI for ARGUS server
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.

197 lines
4.8 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>PaperScript</title>
  6. <base target="class-frame">
  7. <link href="../assets/css/docs.css" rel="stylesheet" type="text/css">
  8. <script src="../assets/js/paper.js"></script>
  9. <script src="../assets/js/jquery.js"></script>
  10. <script src="../assets/js/codemirror.js"></script>
  11. <script src="../assets/js/docs.js"></script>
  12. </head>
  13. <body>
  14. <article class="reference">
  15. <div class="reference-class">
  16. <h1>PaperScript</h1>
  17. </div>
  18. <div class="reference-members">
  19. <h2>Static Methods</h2>
  20. <div id="compile-code" class="member">
  21. <div class="member-link">
  22. <a name="compile-code" href="#compile-code"><tt><b>PaperScript.compile</b>(code[, options])</tt></a>
  23. </div>
  24. <div class="member-description hidden">
  25. <div class="member-text">
  26. <p>Compiles PaperScript code into JavaScript code.</p>
  27. <ul class="member-list">
  28. <h4>Options:</h4>
  29. <li><tt>options.url: <tt>String</tt></tt> &mdash; the url of the source, for source-map generation</li>
  30. <li><tt>options.source: <tt>String</tt></tt> &mdash; the source to be used for the source- mapping, in case the code that&rsquo;s passed in has already been mingled.</li>
  31. </ul>
  32. <ul class="member-list">
  33. <h4>Parameters:</h4>
  34. <li>
  35. <tt>code:</tt>
  36. <tt>String</tt>
  37. &mdash;&nbsp;the PaperScript code
  38. </li>
  39. <li>
  40. <tt>options:</tt>
  41. <tt>Object</tt>
  42. &mdash;&nbsp;the compilation options
  43. &mdash;&nbsp;optional
  44. </li>
  45. </ul>
  46. <ul class="member-list">
  47. <h4>Returns:</h4>
  48. <li>
  49. <tt><tt>Object</tt></tt>&nbsp;&mdash;&nbsp;an object holding the compiled PaperScript translated into JavaScript code along with source-maps and other information.
  50. </li>
  51. </ul>
  52. </div>
  53. </div>
  54. </div>
  55. <div id="execute-code-scope" class="member">
  56. <div class="member-link">
  57. <a name="execute-code-scope" href="#execute-code-scope"><tt><b>PaperScript.execute</b>(code, scope[, options])</tt></a>
  58. </div>
  59. <div class="member-description hidden">
  60. <div class="member-text">
  61. <p>Compiles the PaperScript code into a compiled function and executes it. The compiled function receives all properties of the passed <a href="../classes/PaperScope.html"><tt>PaperScope</tt></a> as arguments, to emulate a global scope with unaffected performance. It also installs global view and tool handlers automatically on the respective objects.</p>
  62. <ul class="member-list">
  63. <h4>Options:</h4>
  64. <li><tt>options.url: <tt>String</tt></tt> &mdash; the url of the source, for source-map generation</li>
  65. <li><tt>options.source: <tt>String</tt></tt> &mdash; the source to be used for the source- mapping, in case the code that&rsquo;s passed in has already been mingled.</li>
  66. </ul>
  67. <ul class="member-list">
  68. <h4>Parameters:</h4>
  69. <li>
  70. <tt>code:</tt>
  71. <tt>String</tt>
  72. &mdash;&nbsp;the PaperScript code
  73. </li>
  74. <li>
  75. <tt>scope:</tt>
  76. <a href="../classes/PaperScope.html"><tt>PaperScope</tt></a>
  77. &mdash;&nbsp;the scope for which the code is executed
  78. </li>
  79. <li>
  80. <tt>options:</tt>
  81. <tt>Object</tt>
  82. &mdash;&nbsp;the compilation options
  83. &mdash;&nbsp;optional
  84. </li>
  85. </ul>
  86. <ul class="member-list">
  87. <h4>Returns:</h4>
  88. <li>
  89. <tt><tt>Object</tt></tt>&nbsp;&mdash;&nbsp;the exports defined in the executed code
  90. </li>
  91. </ul>
  92. </div>
  93. </div>
  94. </div>
  95. <div id="load" class="member">
  96. <div class="member-link">
  97. <a name="load" href="#load"><tt><b>PaperScript.load</b>([script])</tt></a>
  98. </div>
  99. <div class="member-description hidden">
  100. <div class="member-text">
  101. <p>Loads, compiles and executes PaperScript code in the HTML document. Note that this method is executed automatically for all scripts in the document through a window load event. You can optionally call it earlier (e.g. from a DOM ready event), or you can mark scripts to be ignored by setting the attribute <code>ignore=&quot;true&quot;</code> or <code>data-paper-ignore=&quot;true&quot;</code>, and call the <code>PaperScript.load(script)</code> method for each script separately when needed.</p>
  102. <ul class="member-list">
  103. <h4>Parameters:</h4>
  104. <li>
  105. <tt>script:</tt>
  106. <tt>HTMLScriptElement</tt>
  107. &mdash;&nbsp;the script to load. If none is provided, all scripts of the HTML document are iterated over and loaded
  108. &mdash;&nbsp;optional, default: <tt>null</tt>
  109. </li>
  110. </ul>
  111. <ul class="member-list">
  112. <h4>Returns:</h4>
  113. <li>
  114. <tt><a href="../classes/PaperScope.html"><tt>PaperScope</tt></a></tt>&nbsp;&mdash;&nbsp;the scope produced for the passed <code>script</code>, or <code>undefined</code> of multiple scripts area loaded
  115. </li>
  116. </ul>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <!-- =========================== copyright notice ========================== -->
  122. <p class="footer">
  123. Paper.js v0.12.15<br>
  124. Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
  125. <div class="content-end"></div>
  126. </article>
  127. </body>