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.

360 lines
20 KiB

4 years ago
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>LTRect</title>
  6. <link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
  7. <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
  8. <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
  9. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
  10. <script>
  11. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  12. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  13. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  14. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  15. ga('create', 'UA-23694672-1', 'dentedpixel.com');
  16. ga('send', 'pageview');
  17. </script>
  18. <script src="../assets/js/leantween.js"></script>
  19. <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
  20. <script src="http://yui.yahooapis.com/combo?3.8.0pr2/build/yui/yui-min.js"></script>
  21. </head>
  22. <body class="yui3-skin-sam">
  23. <div id="doc">
  24. <div id="hd" class="yui3-g header">
  25. <div class="yui3-u-3-4">
  26. <h1><a href="http://dentedpixel.com/developer-diary/leantween-speed-comparison-to-itween/"><img src="http://s3.amazonaws.com/dentedpixel.com/LeanTween/leantween-logo.png" title=""></a></h1> <div style="position:absolute; left:146px; top:90px;">- Developed by <a href="http://www.dentedpixel.com">Dented Pixel</a></div>
  27. </div>
  28. <div class="yui3-u-1-4 version">
  29. <em style="margin-top:2px">API Docs for: LeanTween 2.46</em><br>
  30. <table id="support">
  31. <tr>
  32. <td>
  33. <h3 style="margin:7px 0 3px 0; width: 200px;">Support LeanTween!</h3>
  34. <!--<a href="http://www.amazon.com/?tag=carbcutt-20&camp=1&creative=4365&linkCode=ez&ref-refURL=" target="_blank">Click this link</a> before your<br>next Amazon shopping spree!<br>
  35. -->
  36. </td>
  37. <td><!--
  38. <a href="http://www.amazon.com/?tag=carbcutt-20&camp=1&creative=4365&linkCode=ez&ref-refURL=" target="_blank"><img src="http://dentedpixel.com/LeanTweenDocumentation/assets/img/amz.gif" width="148" height="40" title="shop amazon" /></a>-->
  39. <form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin-top:5px;">
  40. <!--<div style="margin:2px 0px 6px 24px; float:left;">or </div>-->
  41. <input type="hidden" name="cmd" value="_s-xclick">
  42. <input type="hidden" name="hosted_button_id" value="YJPUT3RAK5VL8">
  43. <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
  44. <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
  45. </form>
  46. </td>
  47. </tr>
  48. </table>
  49. </div>
  50. <h4 style="position:absolute; top:80px; right:7px; width:500px; letter-spacing:normal; word-spacing:normal; font-size:9pt; text-align:right; font-style: italic;">Maintaining and adding new features takes time, your support is appreciated.</h4>
  51. </div>
  52. <div id="bd" class="yui3-g">
  53. <div class="yui3-u-1-4">
  54. <div id="docs-sidebar" class="sidebar apidocs">
  55. <div id="api-list">
  56. <h2 class="off-left">APIs</h2>
  57. <div id="api-tabview" class="tabview">
  58. <ul class="tabs">
  59. <li><a href="#api-classes">Classes</a></li>
  60. <li><a href="#api-modules">Modules</a></li>
  61. </ul>
  62. <div id="api-tabview-filter">
  63. <input type="search" id="api-filter" placeholder="Type to filter APIs">
  64. </div>
  65. <div id="api-tabview-panel">
  66. <ul id="api-classes" class="apis classes">
  67. <li><a href="../classes/LeanAudio.html">LeanAudio</a></li>
  68. <li><a href="../classes/LeanAudioOptions.html">LeanAudioOptions</a></li>
  69. <li><a href="../classes/LeanTween.html">LeanTween</a></li>
  70. <li><a href="../classes/LeanTweenType.html">LeanTweenType</a></li>
  71. <li><a href="../classes/LTBezierPath.html">LTBezierPath</a></li>
  72. <li><a href="../classes/LTDescr.html">LTDescr</a></li>
  73. <li><a href="../classes/LTEvent.html">LTEvent</a></li>
  74. <li><a href="../classes/LTRect.html">LTRect</a></li>
  75. <li><a href="../classes/LTSeq.html">LTSeq</a></li>
  76. <li><a href="../classes/LTSpline.html">LTSpline</a></li>
  77. </ul>
  78. <ul id="api-modules" class="apis modules">
  79. </ul>
  80. </div>
  81. </div>
  82. </div>
  83. <div id="advertising">
  84. <h2>More From<br><a href="http://www.dentedpixel.com">Dented Pixel</a></h2><br>
  85. <a href="https://www.assetstore.unity3d.com/en/#!/content/9455" target="_blank"><img src="http://dentedpixel.com/assets/LTEditor-doc-icon.jpg" width="175" height="175" /><br>Create tweens with: Visual Editor. Sculpt complex spline paths.</a>
  86. <br>
  87. <a href="https://itunes.apple.com/us/app/monkeyshines/id530998075?mt=8" target="_blank"><img src="http://a1.mzstatic.com/us/r30/Purple3/v4/d4/2b/ce/d42bce69-b3d3-d7f8-88e9-caa92664b5b1/icon350x350.jpeg" width="175" height="175" /><br>RIN - A swinging good time!</a>
  88. <br>
  89. <a href="https://itunes.apple.com/us/app/princess-piano/id445283531?mt=8" target="_blank"><img src="http://a3.mzstatic.com/us/r1000/096/Purple/v4/8c/1e/05/8c1e0590-db82-1d72-2956-2b6470f37ed0/mza_4230031260893485317.175x175-75.jpg" width="175" height="175" /><br>Princess Piano - Learn musical notation<br>in this melodious adventure!</a>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="yui3-u-3-4">
  94. <div id="api-options">
  95. Show:
  96. <label for="api-show-inherited">
  97. <input type="checkbox" id="api-show-inherited" checked>
  98. Inherited
  99. </label>
  100. <label for="api-show-protected">
  101. <input type="checkbox" id="api-show-protected">
  102. Protected
  103. </label>
  104. <label for="api-show-private">
  105. <input type="checkbox" id="api-show-private">
  106. Private
  107. </label>
  108. <label for="api-show-deprecated">
  109. <input type="checkbox" id="api-show-deprecated">
  110. Deprecated
  111. </label>
  112. </div>
  113. <div class="apidocs">
  114. <div id="docs-main">
  115. <div class="content">
  116. <h1>LTRect Class</h1>
  117. <div class="box meta">
  118. <div class="foundat">
  119. Defined in: <a href="../files/LeanTween.cs.html#l3212"><code>LeanTween.cs:3212</code></a>
  120. </div>
  121. </div>
  122. <div class="box intro">
  123. <p>Animate GUI Elements by creating this object and passing the *.rect variable to the GUI method<br /><br />
  124. <strong>Example Javascript: </strong><br />var bRect:LTRect = new LTRect( 0, 0, 100, 50 );<br />
  125. LeanTween.scale( bRect, Vector2(bRect.rect.width, bRect.rect.height) * 1.3, 0.25 );<br />
  126. function OnGUI(){<br />
  127.   if(GUI.Button(bRect.rect, &quot;Scale&quot;)){ }<br />
  128. }<br />
  129. <br />
  130. <strong>Example C#: </strong> <br />
  131. LTRect bRect = new LTRect( 0f, 0f, 100f, 50f );<br />
  132. LeanTween.scale( bRect, new Vector2(150f,75f), 0.25f );<br />
  133. void OnGUI(){<br />
  134.   if(GUI.Button(bRect.rect, &quot;Scale&quot;)){ }<br />
  135. }<br /></p>
  136. </div>
  137. <div class="constructor">
  138. <h2>Constructor</h2>
  139. <div id="method_LTRect" class="method item">
  140. <h3 class="name"><code>LTRect</code></h3>
  141. <div class="args">
  142. <span class="paren">(</span><ul class="args-list inline commas">
  143. <li class="arg">
  144. <code>x:float</code>
  145. </li>
  146. <li class="arg">
  147. <code>y:float</code>
  148. </li>
  149. <li class="arg">
  150. <code>width:float</code>
  151. </li>
  152. <li class="arg">
  153. <code>height:float</code>
  154. </li>
  155. <li class="arg">
  156. <code>alpha:float</code>
  157. </li>
  158. <li class="arg">
  159. <code>rotation:float</code>
  160. </li>
  161. </ul><span class="paren">)</span>
  162. </div>
  163. <div class="meta">
  164. <p>
  165. Defined in
  166. <a href="../files/LeanTween.cs.html#l3212"><code>LeanTween.cs:3212</code></a>
  167. </p>
  168. </div>
  169. <div class="description">
  170. </div>
  171. <div class="params">
  172. <h4>Parameters:</h4>
  173. <ul class="params-list">
  174. <li class="param">
  175. <code class="param-name">x:float</code>
  176. <span class="type">Float</span>
  177. <div class="param-description">
  178. <p>X location</p>
  179. </div>
  180. </li>
  181. <li class="param">
  182. <code class="param-name">y:float</code>
  183. <span class="type">Float</span>
  184. <div class="param-description">
  185. <p>Y location</p>
  186. </div>
  187. </li>
  188. <li class="param">
  189. <code class="param-name">width:float</code>
  190. <span class="type">Float</span>
  191. <div class="param-description">
  192. <p>Width</p>
  193. </div>
  194. </li>
  195. <li class="param">
  196. <code class="param-name">height:float</code>
  197. <span class="type">Float</span>
  198. <div class="param-description">
  199. <p>Height</p>
  200. </div>
  201. </li>
  202. <li class="param">
  203. <code class="param-name">alpha:float</code>
  204. <span class="type">Float</span>
  205. <div class="param-description">
  206. <p>(Optional) initial alpha amount (0-1)</p>
  207. </div>
  208. </li>
  209. <li class="param">
  210. <code class="param-name">rotation:float</code>
  211. <span class="type">Float</span>
  212. <div class="param-description">
  213. <p>(Optional) initial rotation in degrees (0-360)</p>
  214. </div>
  215. </li>
  216. </ul>
  217. </div>
  218. </div>
  219. </div>
  220. <div id="classdocs" class="tabview">
  221. <ul class="api-class-tabs">
  222. <li class="api-class-tab index"><a href="#index">Index</a></li>
  223. <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
  224. </ul>
  225. <div>
  226. <div id="index" class="api-class-tabpanel index">
  227. <h2 class="off-left">Item Index</h2>
  228. <div class="index-section properties">
  229. <h3>Properties</h3>
  230. <ul class="index-list properties">
  231. <li class="index-item property">
  232. <a href="#property_rect">rect</a>
  233. </li>
  234. </ul>
  235. </div>
  236. </div>
  237. <div id="properties" class="api-class-tabpanel">
  238. <h2 class="off-left">Properties</h2>
  239. <div id="property_rect" class="property item">
  240. <h3 class="name"><code>rect</code></h3>
  241. <span class="type">Rect rect:Rect Rect object that controls the positioning and size</span>
  242. <div class="meta">
  243. <p>
  244. Defined in
  245. <a href="../files/LeanTween.cs.html#l3239"><code>LeanTween.cs:3239</code></a>
  246. </p>
  247. </div>
  248. <div class="description">
  249. <p>Pass this value to the GUI Methods</p>
  250. </div>
  251. </div>
  252. </div>
  253. </div>
  254. </div>
  255. </div>
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. </div>
  261. <script src="../assets/vendor/prettify/prettify-min.js"></script>
  262. <script>prettyPrint();</script>
  263. <script src="../assets/js/yui-prettify.js"></script>
  264. <script src="../assets/../api.js"></script>
  265. <script src="../assets/js/api-filter.js"></script>
  266. <script src="../assets/js/api-list.js"></script>
  267. <script src="../assets/js/api-search.js"></script>
  268. <script src="../assets/js/apidocs.js"></script>
  269. </body>
  270. </html>