An Open Source library for multi-touch, WebGL powered applications.
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.

2238 lines
78 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>iwmlib API Documentation</title>
  6. <meta name="description" content="The IWM Browser: One Browser for all apps." />
  7. <meta property="og:title" content="iwmlib API Documentation"/>
  8. <meta property="og:type" content="website"/>
  9. <meta property="og:image" content=""/>
  10. <meta property="og:url" content="https://www.iwm-tuebingen.de"/>
  11. <meta name="viewport" content="width=device-width, initial-scale=1">
  12. <script src="scripts/prettify/prettify.js"></script>
  13. <script src="scripts/prettify/lang-css.js"></script>
  14. <script src="scripts/jquery.min.js"></script>
  15. <!--[if lt IE 9]>
  16. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  17. <![endif]-->
  18. <link href="https://fonts.googleapis.com/css?family=Libre+Franklin:400,700" rel="stylesheet">
  19. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  20. <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
  21. <link type="text/css" rel="stylesheet" href="styles/main.css">
  22. <script>
  23. var config = {"monospaceLinks":false,"cleverLinks":false,"applicationName":"iwmlib","disqus":"","googleAnalytics":"","openGraph":{"title":"iwmlib API Documentation","type":"website","image":"","site_name":"","url":"https://www.iwm-tuebingen.de"},"meta":{"title":"iwmlib API Documentation","description":"The IWM Browser: One Browser for all apps.","keyword":""},"linenums":true,"cleverlinks":true,"default":{"outputSourceFiles":true,"useLongnameInNav":false}};
  24. </script>
  25. </head>
  26. <body>
  27. <div id="wrap" class="clearfix">
  28. <div class="navigation">
  29. <h3 class="applicationName"><a href="index.html">iwmlib</a></h3>
  30. <button id="menuToggle" class="btn btn-link btn-lg menu-toggle">
  31. <span class="glyphicon glyphicon-menu-hamburger"></span>
  32. </button>
  33. <div class="search">
  34. <input id="search" type="text" class="form-control input-md" placeholder="Search...">
  35. </div>
  36. <ul class="list">
  37. <li class="item" data-name="global">
  38. <span class="title namespace ">
  39. <span class="namespaceTag">
  40. <span class="glyphicon glyphicon-globe"></span>
  41. </span>
  42. <a href="global.html">Global</a>
  43. </span>
  44. <ul class="members itemMembers">
  45. </ul>
  46. <ul class="typedefs itemMembers">
  47. <span class="subtitle">Typedefs</span>
  48. <li class="parent" data-name="actionActiveCallback"><a href="global.html#actionActiveCallback">actionActiveCallback</a></li>
  49. <li class="parent" data-name="actionCallback"><a href="global.html#actionCallback">actionCallback</a></li>
  50. <li class="parent" data-name="actionCallback"><a href="global.html#actionCallback">actionCallback</a></li>
  51. <li class="parent" data-name="afterActionCallback"><a href="global.html#afterActionCallback">afterActionCallback</a></li>
  52. <li class="parent" data-name="afterActionCallback"><a href="global.html#afterActionCallback">afterActionCallback</a></li>
  53. <li class="parent" data-name="beforeActionCallback"><a href="global.html#beforeActionCallback">beforeActionCallback</a></li>
  54. <li class="parent" data-name="beforeActionCallback"><a href="global.html#beforeActionCallback">beforeActionCallback</a></li>
  55. <li class="parent" data-name="onCompleteCallback"><a href="global.html#onCompleteCallback">onCompleteCallback</a></li>
  56. <li class="parent" data-name="onCompleteCallback"><a href="global.html#onCompleteCallback">onCompleteCallback</a></li>
  57. <li class="parent" data-name="onStartCallback"><a href="global.html#onStartCallback">onStartCallback</a></li>
  58. <li class="parent" data-name="onStartCallback"><a href="global.html#onStartCallback">onStartCallback</a></li>
  59. <li class="parent" data-name="onUpdateCallback"><a href="global.html#onUpdateCallback">onUpdateCallback</a></li>
  60. <li class="parent" data-name="onUpdateCallback"><a href="global.html#onUpdateCallback">onUpdateCallback</a></li>
  61. </ul>
  62. <ul class="typedefs itemMembers">
  63. </ul>
  64. <ul class="methods itemMembers">
  65. </ul>
  66. <ul class="events itemMembers">
  67. </ul>
  68. </li>
  69. <li class="item" data-name="AbstractPopup">
  70. <span class="title ">
  71. <a href="AbstractPopup.html">AbstractPopup</a>
  72. </span>
  73. <ul class="members itemMembers">
  74. <span class="subtitle">Members</span>
  75. <li class="parent " data-name="AbstractPopup#content"><a href="AbstractPopup.html#content">content</a></li>
  76. <li class="parent " data-name="AbstractPopup#header"><a href="AbstractPopup.html#header">header</a></li>
  77. </ul>
  78. <ul class="typedefs itemMembers">
  79. </ul>
  80. <ul class="typedefs itemMembers">
  81. </ul>
  82. <ul class="methods itemMembers">
  83. <span class="subtitle">Methods</span>
  84. <li class="parent " data-name="AbstractPopup#hide"><a href="AbstractPopup.html#hide">hide</a></li>
  85. <li class="parent " data-name="AbstractPopup#layout"><a href="AbstractPopup.html#layout">layout</a></li>
  86. <li class="parent " data-name="AbstractPopup#show"><a href="AbstractPopup.html#show">show</a></li>
  87. </ul>
  88. <ul class="events itemMembers">
  89. </ul>
  90. </li>
  91. <li class="item" data-name="Badge">
  92. <span class="title ">
  93. <a href="Badge.html">Badge</a>
  94. </span>
  95. <ul class="members itemMembers">
  96. <span class="subtitle">Members</span>
  97. <li class=" " data-name="Badge#content"><a href="Badge.html#content">content</a></li>
  98. <li class=" " data-name="Badge#header"><a href="Badge.html#header">header</a></li>
  99. </ul>
  100. <ul class="typedefs itemMembers">
  101. </ul>
  102. <ul class="typedefs itemMembers">
  103. </ul>
  104. <ul class="methods itemMembers">
  105. <span class="subtitle">Methods</span>
  106. <li class=" " data-name="Badge#hide"><a href="Badge.html#hide">hide</a></li>
  107. <li class=" " data-name="Badge#layout"><a href="Badge.html#layout">layout</a></li>
  108. <li class=" " data-name="Badge#show"><a href="Badge.html#show">show</a></li>
  109. </ul>
  110. <ul class="events itemMembers">
  111. </ul>
  112. </li>
  113. <li class="item" data-name="BlurFilter">
  114. <span class="title ">
  115. <a href="BlurFilter.html">BlurFilter</a>
  116. </span>
  117. <ul class="members itemMembers">
  118. <span class="subtitle">Members</span>
  119. <li class="parent " data-name="BlurFilter#blur"><a href="BlurFilter.html#blur">blur</a></li>
  120. <li class="parent " data-name="BlurFilter#shape"><a href="BlurFilter.html#shape">shape</a></li>
  121. </ul>
  122. <ul class="typedefs itemMembers">
  123. </ul>
  124. <ul class="typedefs itemMembers">
  125. </ul>
  126. <ul class="methods itemMembers">
  127. </ul>
  128. <ul class="events itemMembers">
  129. </ul>
  130. </li>
  131. <li class="item" data-name="Button">
  132. <span class="title ">
  133. <a href="Button.html">Button</a>
  134. </span>
  135. <ul class="members itemMembers">
  136. <span class="subtitle">Members</span>
  137. <li class="parent " data-name="Button#active"><a href="Button.html#active">active</a></li>
  138. <li class="parent " data-name="Button#disabled"><a href="Button.html#disabled">disabled</a></li>
  139. <li class="parent " data-name="Button#iconColor"><a href="Button.html#iconColor">iconColor</a></li>
  140. </ul>
  141. <ul class="typedefs itemMembers">
  142. </ul>
  143. <ul class="typedefs itemMembers">
  144. </ul>
  145. <ul class="methods itemMembers">
  146. <span class="subtitle">Methods</span>
  147. <li class="parent " data-name="Button#capture"><a href="Button.html#capture">capture</a></li>
  148. <li class="parent " data-name="Button#hide"><a href="Button.html#hide">hide</a></li>
  149. <li class="parent " data-name="Button#layout"><a href="Button.html#layout">layout</a></li>
  150. <li class="parent " data-name="Button#show"><a href="Button.html#show">show</a></li>
  151. </ul>
  152. <ul class="events itemMembers">
  153. </ul>
  154. </li>
  155. <li class="item" data-name="ButtonGroup">
  156. <span class="title ">
  157. <a href="ButtonGroup.html">ButtonGroup</a>
  158. </span>
  159. <ul class="members itemMembers">
  160. <span class="subtitle">Members</span>
  161. <li class="parent " data-name="ButtonGroup#disabled"><a href="ButtonGroup.html#disabled">disabled</a></li>
  162. </ul>
  163. <ul class="typedefs itemMembers">
  164. </ul>
  165. <ul class="typedefs itemMembers">
  166. </ul>
  167. <ul class="methods itemMembers">
  168. <span class="subtitle">Methods</span>
  169. <li class="parent " data-name="ButtonGroup#hide"><a href="ButtonGroup.html#hide">hide</a></li>
  170. <li class="parent " data-name="ButtonGroup#layout"><a href="ButtonGroup.html#layout">layout</a></li>
  171. <li class="parent " data-name="ButtonGroup#show"><a href="ButtonGroup.html#show">show</a></li>
  172. </ul>
  173. <ul class="events itemMembers">
  174. </ul>
  175. </li>
  176. <li class="item" data-name="DeepZoomImage">
  177. <span class="title ">
  178. <a href="DeepZoomImage.html">DeepZoomImage</a>
  179. </span>
  180. <ul class="members itemMembers">
  181. <span class="subtitle">Members</span>
  182. <li class="parent " data-name="DeepZoomImage#baseSize"><a href="DeepZoomImage.html#baseSize">baseSize</a></li>
  183. <li class="parent " data-name="DeepZoomImage#foreground"><a href="DeepZoomImage.html#foreground">foreground</a></li>
  184. <li class="parent " data-name="DeepZoomImage#height"><a href="DeepZoomImage.html#height">height</a></li>
  185. <li class="parent " data-name="DeepZoomImage#maxScale"><a href="DeepZoomImage.html#maxScale">maxScale</a></li>
  186. <li class="parent " data-name="DeepZoomImage#pixelSize"><a href="DeepZoomImage.html#pixelSize">pixelSize</a></li>
  187. <li class="parent " data-name="DeepZoomImage#width"><a href="DeepZoomImage.html#width">width</a></li>
  188. </ul>
  189. <ul class="typedefs itemMembers">
  190. </ul>
  191. <ul class="typedefs itemMembers">
  192. </ul>
  193. <ul class="methods itemMembers">
  194. <span class="subtitle">Methods</span>
  195. <li class="parent " data-name="DeepZoomImage#_calculateBounds"><a href="DeepZoomImage.html#_calculateBounds">_calculateBounds</a></li>
  196. <li class="parent " data-name="DeepZoomImage#_createTiles"><a href="DeepZoomImage.html#_createTiles">_createTiles</a></li>
  197. <li class="parent " data-name="DeepZoomImage#activate"><a href="DeepZoomImage.html#activate">activate</a></li>
  198. <li class="parent " data-name="DeepZoomImage#addTiles"><a href="DeepZoomImage.html#addTiles">addTiles</a></li>
  199. <li class="parent " data-name="DeepZoomImage#allTiles"><a href="DeepZoomImage.html#allTiles">allTiles</a></li>
  200. <li class="parent " data-name="DeepZoomImage#bringTilesToFront"><a href="DeepZoomImage.html#bringTilesToFront">bringTilesToFront</a></li>
  201. <li class="parent " data-name="DeepZoomImage#calculateBounds"><a href="DeepZoomImage.html#calculateBounds">calculateBounds</a></li>
  202. <li class="parent " data-name="DeepZoomImage#changedTiles"><a href="DeepZoomImage.html#changedTiles">changedTiles</a></li>
  203. <li class="parent " data-name="DeepZoomImage#deactivate"><a href="DeepZoomImage.html#deactivate">deactivate</a></li>
  204. <li class="parent " data-name="DeepZoomImage#destroyObsoleteTiles"><a href="DeepZoomImage.html#destroyObsoleteTiles">destroyObsoleteTiles</a></li>
  205. <li class="parent " data-name="DeepZoomImage#destroyTiles"><a href="DeepZoomImage.html#destroyTiles">destroyTiles</a></li>
  206. <li class="parent " data-name="DeepZoomImage#destroyTilesAboveLevel"><a href="DeepZoomImage.html#destroyTilesAboveLevel">destroyTilesAboveLevel</a></li>
  207. <li class="parent " data-name="DeepZoomImage#destroyUnneededTiles"><a href="DeepZoomImage.html#destroyUnneededTiles">destroyUnneededTiles</a></li>
  208. <li class="parent " data-name="DeepZoomImage#ensureAllTiles"><a href="DeepZoomImage.html#ensureAllTiles">ensureAllTiles</a></li>
  209. <li class="parent " data-name="DeepZoomImage#ensureTiles"><a href="DeepZoomImage.html#ensureTiles">ensureTiles</a></li>
  210. <li class="parent " data-name="DeepZoomImage#levelAndAlphaForScale"><a href="DeepZoomImage.html#levelAndAlphaForScale">levelAndAlphaForScale</a></li>
  211. <li class="parent " data-name="DeepZoomImage#levelForScale"><a href="DeepZoomImage.html#levelForScale">levelForScale</a></li>
  212. <li class="parent " data-name="DeepZoomImage#neededTiles"><a href="DeepZoomImage.html#neededTiles">neededTiles</a></li>
  213. <li class="parent " data-name="DeepZoomImage#populateAllTiles"><a href="DeepZoomImage.html#populateAllTiles">populateAllTiles</a></li>
  214. <li class="parent " data-name="DeepZoomImage#populateTiles"><a href="DeepZoomImage.html#populateTiles">populateTiles</a></li>
  215. <li class="parent " data-name="DeepZoomImage#setup"><a href="DeepZoomImage.html#setup">setup</a></li>
  216. <li class="parent " data-name="DeepZoomImage#setupTiles"><a href="DeepZoomImage.html#setupTiles">setupTiles</a></li>
  217. <li class="parent " data-name="DeepZoomImage#thumbnail"><a href="DeepZoomImage.html#thumbnail">thumbnail</a></li>
  218. <li class="parent " data-name="DeepZoomImage#tintObsoleteTiles"><a href="DeepZoomImage.html#tintObsoleteTiles">tintObsoleteTiles</a></li>
  219. <li class="parent " data-name="DeepZoomImage#transformed"><a href="DeepZoomImage.html#transformed">transformed</a></li>
  220. </ul>
  221. <ul class="events itemMembers">
  222. </ul>
  223. </li>
  224. <li class="item" data-name="DeepZoomInfo">
  225. <span class="title ">
  226. <a href="DeepZoomInfo.html">DeepZoomInfo</a>
  227. </span>
  228. <ul class="members itemMembers">
  229. </ul>
  230. <ul class="typedefs itemMembers">
  231. </ul>
  232. <ul class="typedefs itemMembers">
  233. </ul>
  234. <ul class="methods itemMembers">
  235. <span class="subtitle">Methods</span>
  236. <li class="parent " data-name="DeepZoomInfo#dimensions"><a href="DeepZoomInfo.html#dimensions">dimensions</a></li>
  237. <li class="parent " data-name="DeepZoomInfo#getDimensions"><a href="DeepZoomInfo.html#getDimensions">getDimensions</a></li>
  238. <li class="parent " data-name="DeepZoomInfo#getNumTiles"><a href="DeepZoomInfo.html#getNumTiles">getNumTiles</a></li>
  239. <li class="parent " data-name="DeepZoomInfo#getScale"><a href="DeepZoomInfo.html#getScale">getScale</a></li>
  240. <li class="parent " data-name="DeepZoomInfo#imageForURL"><a href="DeepZoomInfo.html#imageForURL">imageForURL</a></li>
  241. <li class="parent " data-name="DeepZoomInfo#urlForTile"><a href="DeepZoomInfo.html#urlForTile">urlForTile</a></li>
  242. </ul>
  243. <ul class="events itemMembers">
  244. </ul>
  245. </li>
  246. <li class="item" data-name="Flippable">
  247. <span class="title ">
  248. <a href="Flippable.html">Flippable</a>
  249. </span>
  250. <ul class="members itemMembers">
  251. <span class="subtitle">Members</span>
  252. <li class="parent " data-name="Flippable#flipped"><a href="Flippable.html#flipped">flipped</a></li>
  253. <li class="parent " data-name="Flippable#frontSideInFront"><a href="Flippable.html#frontSideInFront">frontSideInFront</a></li>
  254. </ul>
  255. <ul class="typedefs itemMembers">
  256. </ul>
  257. <ul class="typedefs itemMembers">
  258. </ul>
  259. <ul class="methods itemMembers">
  260. <span class="subtitle">Methods</span>
  261. <li class="parent " data-name="Flippable#layout"><a href="Flippable.html#layout">layout</a></li>
  262. </ul>
  263. <ul class="events itemMembers">
  264. </ul>
  265. </li>
  266. <li class="item" data-name="FontInfo">
  267. <span class="title ">
  268. <a href="FontInfo.html">FontInfo</a>
  269. </span>
  270. <ul class="members itemMembers">
  271. </ul>
  272. <ul class="typedefs itemMembers">
  273. </ul>
  274. <ul class="typedefs itemMembers">
  275. </ul>
  276. <ul class="methods itemMembers">
  277. </ul>
  278. <ul class="events itemMembers">
  279. </ul>
  280. </li>
  281. <li class="item" data-name="Hypenate">
  282. <span class="title ">
  283. <a href="Hypenate.html">Hypenate</a>
  284. </span>
  285. <ul class="members itemMembers">
  286. </ul>
  287. <ul class="typedefs itemMembers">
  288. </ul>
  289. <ul class="typedefs itemMembers">
  290. </ul>
  291. <ul class="methods itemMembers">
  292. <span class="subtitle">Methods</span>
  293. <li class="parent " data-name="Hypenate.splitLines"><a href="Hypenate.html#.splitLines">splitLines</a></li>
  294. </ul>
  295. <ul class="events itemMembers">
  296. </ul>
  297. </li>
  298. <li class="item" data-name="InteractivePopup">
  299. <span class="title ">
  300. <a href="InteractivePopup.html">InteractivePopup</a>
  301. </span>
  302. <ul class="members itemMembers">
  303. <span class="subtitle">Members</span>
  304. <li class=" " data-name="InteractivePopup#content"><a href="InteractivePopup.html#content">content</a></li>
  305. <li class=" " data-name="InteractivePopup#header"><a href="InteractivePopup.html#header">header</a></li>
  306. </ul>
  307. <ul class="typedefs itemMembers">
  308. </ul>
  309. <ul class="typedefs itemMembers">
  310. </ul>
  311. <ul class="methods itemMembers">
  312. <span class="subtitle">Methods</span>
  313. <li class=" " data-name="InteractivePopup#hide"><a href="InteractivePopup.html#hide">hide</a></li>
  314. <li class="parent " data-name="InteractivePopup#layout"><a href="InteractivePopup.html#layout">layout</a></li>
  315. <li class=" " data-name="InteractivePopup#show"><a href="InteractivePopup.html#show">show</a></li>
  316. </ul>
  317. <ul class="events itemMembers">
  318. </ul>
  319. </li>
  320. <li class="item" data-name="LabeledGraphics">
  321. <span class="title ">
  322. <a href="LabeledGraphics.html">LabeledGraphics</a>
  323. </span>
  324. <ul class="members itemMembers">
  325. </ul>
  326. <ul class="typedefs itemMembers">
  327. </ul>
  328. <ul class="typedefs itemMembers">
  329. </ul>
  330. <ul class="methods itemMembers">
  331. <span class="subtitle">Methods</span>
  332. <li class="parent " data-name="LabeledGraphics#clear"><a href="LabeledGraphics.html#clear">clear</a></li>
  333. <li class="parent " data-name="LabeledGraphics#debugInfos"><a href="LabeledGraphics.html#debugInfos">debugInfos</a></li>
  334. <li class="parent " data-name="LabeledGraphics#ensureLabel"><a href="LabeledGraphics.html#ensureLabel">ensureLabel</a></li>
  335. <li class="parent " data-name="LabeledGraphics#getLabel"><a href="LabeledGraphics.html#getLabel">getLabel</a></li>
  336. <li class="parent " data-name="LabeledGraphics#hideLabel"><a href="LabeledGraphics.html#hideLabel">hideLabel</a></li>
  337. <li class="parent " data-name="LabeledGraphics#removeLabel"><a href="LabeledGraphics.html#removeLabel">removeLabel</a></li>
  338. <li class="parent " data-name="LabeledGraphics#truncateLabel"><a href="LabeledGraphics.html#truncateLabel">truncateLabel</a></li>
  339. </ul>
  340. <ul class="events itemMembers">
  341. </ul>
  342. </li>
  343. <li class="item" data-name="LabeledGraphics.exports.LabeledGraphics">
  344. <span class="title ">
  345. <a href="LabeledGraphics.exports.LabeledGraphics.html">LabeledGraphics.exports.LabeledGraphics</a>
  346. </span>
  347. <ul class="members itemMembers">
  348. </ul>
  349. <ul class="typedefs itemMembers">
  350. </ul>
  351. <ul class="typedefs itemMembers">
  352. </ul>
  353. <ul class="methods itemMembers">
  354. </ul>
  355. <ul class="events itemMembers">
  356. </ul>
  357. </li>
  358. <li class="item" data-name="List">
  359. <span class="title ">
  360. <a href="List.html">List</a>
  361. </span>
  362. <ul class="members itemMembers">
  363. <span class="subtitle">Members</span>
  364. <li class="parent " data-name="List#innerHeight"><a href="List.html#innerHeight">innerHeight</a></li>
  365. <li class="parent " data-name="List#innerWidth"><a href="List.html#innerWidth">innerWidth</a></li>
  366. </ul>
  367. <ul class="typedefs itemMembers">
  368. </ul>
  369. <ul class="typedefs itemMembers">
  370. </ul>
  371. <ul class="methods itemMembers">
  372. <span class="subtitle">Methods</span>
  373. <li class="parent " data-name="List#capture"><a href="List.html#capture">capture</a></li>
  374. <li class="parent " data-name="List#layout"><a href="List.html#layout">layout</a></li>
  375. <li class="parent " data-name="List#resize"><a href="List.html#resize">resize</a></li>
  376. <li class="parent " data-name="List#setItems"><a href="List.html#setItems">setItems</a></li>
  377. </ul>
  378. <ul class="events itemMembers">
  379. </ul>
  380. </li>
  381. <li class="item" data-name="Message">
  382. <span class="title ">
  383. <a href="Message.html">Message</a>
  384. </span>
  385. <ul class="members itemMembers">
  386. <span class="subtitle">Members</span>
  387. <li class=" " data-name="Message#content"><a href="Message.html#content">content</a></li>
  388. <li class=" " data-name="Message#header"><a href="Message.html#header">header</a></li>
  389. </ul>
  390. <ul class="typedefs itemMembers">
  391. </ul>
  392. <ul class="typedefs itemMembers">
  393. </ul>
  394. <ul class="methods itemMembers">
  395. <span class="subtitle">Methods</span>
  396. <li class=" " data-name="Message#hide"><a href="Message.html#hide">hide</a></li>
  397. <li class="parent " data-name="Message#layout"><a href="Message.html#layout">layout</a></li>
  398. </ul>
  399. <ul class="events itemMembers">
  400. </ul>
  401. </li>
  402. <li class="item" data-name="MessageInteractivePopup">
  403. <span class="title ">
  404. <a href="MessageInteractivePopup.html">MessageInteractivePopup</a>
  405. </span>
  406. <ul class="members itemMembers">
  407. </ul>
  408. <ul class="typedefs itemMembers">
  409. </ul>
  410. <ul class="typedefs itemMembers">
  411. </ul>
  412. <ul class="methods itemMembers">
  413. </ul>
  414. <ul class="events itemMembers">
  415. </ul>
  416. </li>
  417. <li class="item" data-name="MessageMessageInteractivePopup">
  418. <span class="title ">
  419. <a href="MessageMessageInteractivePopup.html">MessageMessageInteractivePopup</a>
  420. </span>
  421. <ul class="members itemMembers">
  422. </ul>
  423. <ul class="typedefs itemMembers">
  424. </ul>
  425. <ul class="typedefs itemMembers">
  426. </ul>
  427. <ul class="methods itemMembers">
  428. </ul>
  429. <ul class="events itemMembers">
  430. </ul>
  431. </li>
  432. <li class="item" data-name="Modal">
  433. <span class="title ">
  434. <a href="Modal.html">Modal</a>
  435. </span>
  436. <ul class="members itemMembers">
  437. <span class="subtitle">Members</span>
  438. <li class="parent " data-name="Modal#content"><a href="Modal.html#content">content</a></li>
  439. <li class="parent " data-name="Modal#header"><a href="Modal.html#header">header</a></li>
  440. </ul>
  441. <ul class="typedefs itemMembers">
  442. </ul>
  443. <ul class="typedefs itemMembers">
  444. </ul>
  445. <ul class="methods itemMembers">
  446. <span class="subtitle">Methods</span>
  447. <li class="parent " data-name="Modal#hide"><a href="Modal.html#hide">hide</a></li>
  448. <li class="parent " data-name="Modal#layout"><a href="Modal.html#layout">layout</a></li>
  449. <li class="parent " data-name="Modal#show"><a href="Modal.html#show">show</a></li>
  450. </ul>
  451. <ul class="events itemMembers">
  452. </ul>
  453. </li>
  454. <li class="item" data-name="ModalInteractivePopup">
  455. <span class="title ">
  456. <a href="ModalInteractivePopup.html">ModalInteractivePopup</a>
  457. </span>
  458. <ul class="members itemMembers">
  459. </ul>
  460. <ul class="typedefs itemMembers">
  461. </ul>
  462. <ul class="typedefs itemMembers">
  463. </ul>
  464. <ul class="methods itemMembers">
  465. </ul>
  466. <ul class="events itemMembers">
  467. </ul>
  468. </li>
  469. <li class="item" data-name="ModalModalInteractivePopup">
  470. <span class="title ">
  471. <a href="ModalModalInteractivePopup.html">ModalModalInteractivePopup</a>
  472. </span>
  473. <ul class="members itemMembers">
  474. </ul>
  475. <ul class="typedefs itemMembers">
  476. </ul>
  477. <ul class="typedefs itemMembers">
  478. </ul>
  479. <ul class="methods itemMembers">
  480. </ul>
  481. <ul class="events itemMembers">
  482. </ul>
  483. </li>
  484. <li class="item" data-name="PIXIApp">
  485. <span class="title ">
  486. <a href="PIXIApp.html">PIXIApp</a>
  487. </span>
  488. <ul class="members itemMembers">
  489. <span class="subtitle">Members</span>
  490. <li class="parent " data-name="PIXIApp#center"><a href="PIXIApp.html#center">center</a></li>
  491. <li class="parent " data-name="PIXIApp#size"><a href="PIXIApp.html#size">size</a></li>
  492. </ul>
  493. <ul class="typedefs itemMembers">
  494. </ul>
  495. <ul class="typedefs itemMembers">
  496. </ul>
  497. <ul class="methods itemMembers">
  498. <span class="subtitle">Methods</span>
  499. <li class="parent " data-name="PIXIApp#addFpsDisplay"><a href="PIXIApp.html#addFpsDisplay">addFpsDisplay</a></li>
  500. <li class="parent " data-name="PIXIApp#checkOrientation"><a href="PIXIApp.html#checkOrientation">checkOrientation</a></li>
  501. <li class="parent " data-name="PIXIApp#convertPointFromNodeToPage"><a href="PIXIApp.html#convertPointFromNodeToPage">convertPointFromNodeToPage</a></li>
  502. <li class="parent " data-name="PIXIApp#convertPointFromPageToNode"><a href="PIXIApp.html#convertPointFromPageToNode">convertPointFromPageToNode</a></li>
  503. <li class="parent " data-name="PIXIApp#draw"><a href="PIXIApp.html#draw">draw</a></li>
  504. <li class="parent " data-name="PIXIApp#expandRenderer"><a href="PIXIApp.html#expandRenderer">expandRenderer</a></li>
  505. <li class="parent " data-name="PIXIApp#layout"><a href="PIXIApp.html#layout">layout</a></li>
  506. <li class="parent " data-name="PIXIApp#loadSprites"><a href="PIXIApp.html#loadSprites">loadSprites</a></li>
  507. <li class="parent " data-name="PIXIApp#loadTextures"><a href="PIXIApp.html#loadTextures">loadTextures</a></li>
  508. <li class="parent " data-name="PIXIApp#message"><a href="PIXIApp.html#message">message</a></li>
  509. <li class="parent " data-name="PIXIApp#modal"><a href="PIXIApp.html#modal">modal</a></li>
  510. <li class="parent " data-name="PIXIApp#mutate"><a href="PIXIApp.html#mutate">mutate</a></li>
  511. <li class="parent " data-name="PIXIApp#orientation"><a href="PIXIApp.html#orientation">orientation</a></li>
  512. <li class="parent " data-name="PIXIApp#orientationChanged"><a href="PIXIApp.html#orientationChanged">orientationChanged</a></li>
  513. <li class="parent " data-name="PIXIApp#progress"><a href="PIXIApp.html#progress">progress</a></li>
  514. <li class="parent " data-name="PIXIApp#query"><a href="PIXIApp.html#query">query</a></li>
  515. <li class="parent " data-name="PIXIApp#resize"><a href="PIXIApp.html#resize">resize</a></li>
  516. <li class="parent " data-name="PIXIApp#setup"><a href="PIXIApp.html#setup">setup</a></li>
  517. <li class="parent " data-name="PIXIApp#subscribe"><a href="PIXIApp.html#subscribe">subscribe</a></li>
  518. </ul>
  519. <ul class="events itemMembers">
  520. </ul>
  521. </li>
  522. <li class="item" data-name="Popup">
  523. <span class="title ">
  524. <a href="Popup.html">Popup</a>
  525. </span>
  526. <ul class="members itemMembers">
  527. <span class="subtitle">Members</span>
  528. <li class=" " data-name="Popup#content"><a href="Popup.html#content">content</a></li>
  529. <li class=" " data-name="Popup#header"><a href="Popup.html#header">header</a></li>
  530. </ul>
  531. <ul class="typedefs itemMembers">
  532. </ul>
  533. <ul class="typedefs itemMembers">
  534. </ul>
  535. <ul class="methods itemMembers">
  536. <span class="subtitle">Methods</span>
  537. <li class=" " data-name="Popup#hide"><a href="Popup.html#hide">hide</a></li>
  538. <li class=" " data-name="Popup#layout"><a href="Popup.html#layout">layout</a></li>
  539. <li class=" " data-name="Popup#show"><a href="Popup.html#show">show</a></li>
  540. </ul>
  541. <ul class="events itemMembers">
  542. </ul>
  543. </li>
  544. <li class="item" data-name="PopupInteractivePopup">
  545. <span class="title ">
  546. <a href="PopupInteractivePopup.html">PopupInteractivePopup</a>
  547. </span>
  548. <ul class="members itemMembers">
  549. </ul>
  550. <ul class="typedefs itemMembers">
  551. </ul>
  552. <ul class="typedefs itemMembers">
  553. </ul>
  554. <ul class="methods itemMembers">
  555. </ul>
  556. <ul class="events itemMembers">
  557. </ul>
  558. </li>
  559. <li class="item" data-name="PopupMenu">
  560. <span class="title ">
  561. <a href="PopupMenu.html">PopupMenu</a>
  562. </span>
  563. <ul class="members itemMembers">
  564. <span class="subtitle">Members</span>
  565. <li class=" " data-name="PopupMenu#content"><a href="PopupMenu.html#content">content</a></li>
  566. <li class=" " data-name="PopupMenu#header"><a href="PopupMenu.html#header">header</a></li>
  567. </ul>
  568. <ul class="typedefs itemMembers">
  569. </ul>
  570. <ul class="typedefs itemMembers">
  571. </ul>
  572. <ul class="methods itemMembers">
  573. <span class="subtitle">Methods</span>
  574. <li class=" " data-name="PopupMenu#hide"><a href="PopupMenu.html#hide">hide</a></li>
  575. <li class=" " data-name="PopupMenu#layout"><a href="PopupMenu.html#layout">layout</a></li>
  576. <li class=" " data-name="PopupMenu#show"><a href="PopupMenu.html#show">show</a></li>
  577. </ul>
  578. <ul class="events itemMembers">
  579. </ul>
  580. </li>
  581. <li class="item" data-name="PopupMenuPopupInteractivePopup">
  582. <span class="title ">
  583. <a href="PopupMenuPopupInteractivePopup.html">PopupMenuPopupInteractivePopup</a>
  584. </span>
  585. <ul class="members itemMembers">
  586. </ul>
  587. <ul class="typedefs itemMembers">
  588. </ul>
  589. <ul class="typedefs itemMembers">
  590. </ul>
  591. <ul class="methods itemMembers">
  592. </ul>
  593. <ul class="events itemMembers">
  594. </ul>
  595. </li>
  596. <li class="item" data-name="PopupMenuPopupMenuPopupInteractivePopup">
  597. <span class="title ">
  598. <a href="PopupMenuPopupMenuPopupInteractivePopup.html">PopupMenuPopupMenuPopupInteractivePopup</a>
  599. </span>
  600. <ul class="members itemMembers">
  601. </ul>
  602. <ul class="typedefs itemMembers">
  603. </ul>
  604. <ul class="typedefs itemMembers">
  605. </ul>
  606. <ul class="methods itemMembers">
  607. </ul>
  608. <ul class="events itemMembers">
  609. </ul>
  610. </li>
  611. <li class="item" data-name="PopupMenuPopupMenuPopupPopupInteractivePopup">
  612. <span class="title ">
  613. <a href="PopupMenuPopupMenuPopupPopupInteractivePopup.html">PopupMenuPopupMenuPopupPopupInteractivePopup</a>
  614. </span>
  615. <ul class="members itemMembers">
  616. </ul>
  617. <ul class="typedefs itemMembers">
  618. </ul>
  619. <ul class="typedefs itemMembers">
  620. </ul>
  621. <ul class="methods itemMembers">
  622. </ul>
  623. <ul class="events itemMembers">
  624. </ul>
  625. </li>
  626. <li class="item" data-name="PopupMenuPopupPopupInteractivePopup">
  627. <span class="title ">
  628. <a href="PopupMenuPopupPopupInteractivePopup.html">PopupMenuPopupPopupInteractivePopup</a>
  629. </span>
  630. <ul class="members itemMembers">
  631. </ul>
  632. <ul class="typedefs itemMembers">
  633. </ul>
  634. <ul class="typedefs itemMembers">
  635. </ul>
  636. <ul class="methods itemMembers">
  637. </ul>
  638. <ul class="events itemMembers">
  639. </ul>
  640. </li>
  641. <li class="item" data-name="PopupPopupInteractivePopup">
  642. <span class="title ">
  643. <a href="PopupPopupInteractivePopup.html">PopupPopupInteractivePopup</a>
  644. </span>
  645. <ul class="members itemMembers">
  646. </ul>
  647. <ul class="typedefs itemMembers">
  648. </ul>
  649. <ul class="typedefs itemMembers">
  650. </ul>
  651. <ul class="methods itemMembers">
  652. </ul>
  653. <ul class="events itemMembers">
  654. </ul>
  655. </li>
  656. <li class="item" data-name="Progress">
  657. <span class="title ">
  658. <a href="Progress.html">Progress</a>
  659. </span>
  660. <ul class="members itemMembers">
  661. <span class="subtitle">Members</span>
  662. <li class="parent " data-name="Progress#progress"><a href="Progress.html#progress">progress</a></li>
  663. </ul>
  664. <ul class="typedefs itemMembers">
  665. </ul>
  666. <ul class="typedefs itemMembers">
  667. </ul>
  668. <ul class="methods itemMembers">
  669. <span class="subtitle">Methods</span>
  670. <li class="parent " data-name="Progress#hide"><a href="Progress.html#hide">hide</a></li>
  671. <li class="parent " data-name="Progress#layout"><a href="Progress.html#layout">layout</a></li>
  672. <li class="parent " data-name="Progress#show"><a href="Progress.html#show">show</a></li>
  673. </ul>
  674. <ul class="events itemMembers">
  675. </ul>
  676. </li>
  677. <li class="item" data-name="Scrollview">
  678. <span class="title ">
  679. <a href="Scrollview.html">Scrollview</a>
  680. </span>
  681. <ul class="members itemMembers">
  682. </ul>
  683. <ul class="typedefs itemMembers">
  684. </ul>
  685. <ul class="typedefs itemMembers">
  686. </ul>
  687. <ul class="methods itemMembers">
  688. <span class="subtitle">Methods</span>
  689. <li class="parent " data-name="Scrollview#layout"><a href="Scrollview.html#layout">layout</a></li>
  690. </ul>
  691. <ul class="events itemMembers">
  692. </ul>
  693. </li>
  694. <li class="item" data-name="Slider">
  695. <span class="title ">
  696. <a href="Slider.html">Slider</a>
  697. </span>
  698. <ul class="members itemMembers">
  699. <span class="subtitle">Members</span>
  700. <li class="parent " data-name="Slider#disabled"><a href="Slider.html#disabled">disabled</a></li>
  701. <li class="parent " data-name="Slider#value"><a href="Slider.html#value">value</a></li>
  702. </ul>
  703. <ul class="typedefs itemMembers">
  704. </ul>
  705. <ul class="typedefs itemMembers">
  706. </ul>
  707. <ul class="methods itemMembers">
  708. <span class="subtitle">Methods</span>
  709. <li class="parent " data-name="Slider#hide"><a href="Slider.html#hide">hide</a></li>
  710. <li class="parent " data-name="Slider#layout"><a href="Slider.html#layout">layout</a></li>
  711. <li class="parent " data-name="Slider#show"><a href="Slider.html#show">show</a></li>
  712. </ul>
  713. <ul class="events itemMembers">
  714. </ul>
  715. </li>
  716. <li class="item" data-name="Switch">
  717. <span class="title ">
  718. <a href="Switch.html">Switch</a>
  719. </span>
  720. <ul class="members itemMembers">
  721. <span class="subtitle">Members</span>
  722. <li class="parent " data-name="Switch#active"><a href="Switch.html#active">active</a></li>
  723. <li class="parent " data-name="Switch#disabled"><a href="Switch.html#disabled">disabled</a></li>
  724. </ul>
  725. <ul class="typedefs itemMembers">
  726. </ul>
  727. <ul class="typedefs itemMembers">
  728. </ul>
  729. <ul class="methods itemMembers">
  730. <span class="subtitle">Methods</span>
  731. <li class="parent " data-name="Switch#hide"><a href="Switch.html#hide">hide</a></li>
  732. <li class="parent " data-name="Switch#layout"><a href="Switch.html#layout">layout</a></li>
  733. <li class="parent " data-name="Switch#show"><a href="Switch.html#show">show</a></li>
  734. </ul>
  735. <ul class="events itemMembers">
  736. </ul>
  737. </li>
  738. <li class="item" data-name="TextLabel.TextLabel">
  739. <span class="title ">
  740. <a href="TextLabel.TextLabel.html">TextLabel.TextLabel</a>
  741. </span>
  742. <ul class="members itemMembers">
  743. </ul>
  744. <ul class="typedefs itemMembers">
  745. </ul>
  746. <ul class="typedefs itemMembers">
  747. </ul>
  748. <ul class="methods itemMembers">
  749. </ul>
  750. <ul class="events itemMembers">
  751. </ul>
  752. </li>
  753. <li class="item" data-name="Theme">
  754. <span class="title ">
  755. <a href="Theme.html">Theme</a>
  756. </span>
  757. <ul class="members itemMembers">
  758. </ul>
  759. <ul class="typedefs itemMembers">
  760. </ul>
  761. <ul class="typedefs itemMembers">
  762. </ul>
  763. <ul class="methods itemMembers">
  764. <span class="subtitle">Methods</span>
  765. <li class="parent " data-name="Theme.fromString"><a href="Theme.html#.fromString">fromString</a></li>
  766. </ul>
  767. <ul class="events itemMembers">
  768. </ul>
  769. </li>
  770. <li class="item" data-name="ThemeDark">
  771. <span class="title ">
  772. <a href="ThemeDark.html">ThemeDark</a>
  773. </span>
  774. <ul class="members itemMembers">
  775. </ul>
  776. <ul class="typedefs itemMembers">
  777. </ul>
  778. <ul class="typedefs itemMembers">
  779. </ul>
  780. <ul class="methods itemMembers">
  781. </ul>
  782. <ul class="events itemMembers">
  783. </ul>
  784. </li>
  785. <li class="item" data-name="ThemeLight">
  786. <span class="title ">
  787. <a href="ThemeLight.html">ThemeLight</a>
  788. </span>
  789. <ul class="members itemMembers">
  790. </ul>
  791. <ul class="typedefs itemMembers">
  792. </ul>
  793. <ul class="typedefs itemMembers">
  794. </ul>
  795. <ul class="methods itemMembers">
  796. </ul>
  797. <ul class="events itemMembers">
  798. </ul>
  799. </li>
  800. <li class="item" data-name="ThemeRed">
  801. <span class="title ">
  802. <a href="ThemeRed.html">ThemeRed</a>
  803. </span>
  804. <ul class="members itemMembers">
  805. </ul>
  806. <ul class="typedefs itemMembers">
  807. </ul>
  808. <ul class="typedefs itemMembers">
  809. </ul>
  810. <ul class="methods itemMembers">
  811. </ul>
  812. <ul class="events itemMembers">
  813. </ul>
  814. </li>
  815. <li class="item" data-name="TileQuadNode">
  816. <span class="title ">
  817. <a href="TileQuadNode.html">TileQuadNode</a>
  818. </span>
  819. <ul class="members itemMembers">
  820. </ul>
  821. <ul class="typedefs itemMembers">
  822. </ul>
  823. <ul class="typedefs itemMembers">
  824. </ul>
  825. <ul class="methods itemMembers">
  826. <span class="subtitle">Methods</span>
  827. <li class="parent " data-name="TileQuadNode#link"><a href="TileQuadNode.html#link">link</a></li>
  828. <li class="parent " data-name="TileQuadNode#noQuads"><a href="TileQuadNode.html#noQuads">noQuads</a></li>
  829. <li class="parent " data-name="TileQuadNode#unlink"><a href="TileQuadNode.html#unlink">unlink</a></li>
  830. </ul>
  831. <ul class="events itemMembers">
  832. </ul>
  833. </li>
  834. <li class="item" data-name="Tooltip">
  835. <span class="title ">
  836. <a href="Tooltip.html">Tooltip</a>
  837. </span>
  838. <ul class="members itemMembers">
  839. <span class="subtitle">Members</span>
  840. <li class=" " data-name="Tooltip#content"><a href="Tooltip.html#content">content</a></li>
  841. <li class=" " data-name="Tooltip#header"><a href="Tooltip.html#header">header</a></li>
  842. </ul>
  843. <ul class="typedefs itemMembers">
  844. </ul>
  845. <ul class="typedefs itemMembers">
  846. </ul>
  847. <ul class="methods itemMembers">
  848. <span class="subtitle">Methods</span>
  849. <li class=" " data-name="Tooltip#hide"><a href="Tooltip.html#hide">hide</a></li>
  850. <li class=" " data-name="Tooltip#layout"><a href="Tooltip.html#layout">layout</a></li>
  851. <li class=" " data-name="Tooltip#show"><a href="Tooltip.html#show">show</a></li>
  852. </ul>
  853. <ul class="events itemMembers">
  854. </ul>
  855. </li>
  856. <li class="item" data-name="UITest">
  857. <span class="title ">
  858. <a href="UITest.html">UITest</a>
  859. </span>
  860. <ul class="members itemMembers">
  861. <span class="subtitle">Members</span>
  862. <li class="parent " data-name="UITest#timeline"><a href="UITest.html#timeline">timeline</a></li>
  863. </ul>
  864. <ul class="typedefs itemMembers">
  865. </ul>
  866. <ul class="typedefs itemMembers">
  867. </ul>
  868. <ul class="methods itemMembers">
  869. <span class="subtitle">Methods</span>
  870. <li class="parent " data-name="UITest#clear"><a href="UITest.html#clear">clear</a></li>
  871. <li class="parent " data-name="UITest#pan"><a href="UITest.html#pan">pan</a></li>
  872. <li class="parent " data-name="UITest#pinch"><a href="UITest.html#pinch">pinch</a></li>
  873. <li class="parent " data-name="UITest#restart"><a href="UITest.html#restart">restart</a></li>
  874. <li class="parent " data-name="UITest#start"><a href="UITest.html#start">start</a></li>
  875. <li class="parent " data-name="UITest#stop"><a href="UITest.html#stop">stop</a></li>
  876. <li class="parent " data-name="UITest#tap"><a href="UITest.html#tap">tap</a></li>
  877. </ul>
  878. <ul class="events itemMembers">
  879. </ul>
  880. </li>
  881. <li class="item" data-name="Volatile">
  882. <span class="title ">
  883. <a href="Volatile.html">Volatile</a>
  884. </span>
  885. <ul class="members itemMembers">
  886. </ul>
  887. <ul class="typedefs itemMembers">
  888. </ul>
  889. <ul class="typedefs itemMembers">
  890. </ul>
  891. <ul class="methods itemMembers">
  892. <span class="subtitle">Methods</span>
  893. <li class="parent " data-name="Volatile#layout"><a href="Volatile.html#layout">layout</a></li>
  894. </ul>
  895. <ul class="events itemMembers">
  896. </ul>
  897. </li>
  898. </ul>
  899. </div>
  900. <div class="main">
  901. <h1 class="page-title" data-filename="pixi_app.js.html">Source: pixi/app.js</h1>
  902. <section>
  903. <header>
  904. <div class="header content-size">
  905. <h2>pixi/app.js</h2>
  906. </div>
  907. </header>
  908. <article>
  909. <pre id="source-code" class="prettyprint source linenums"><code>/* global apollo, subscriptions, gql */
  910. import Theme from './theme.js'
  911. import Progress from './progress.js'
  912. import Modal from './modal.js'
  913. import Message from './message.js'
  914. import { debounce } from '../utils.js'
  915. /**
  916. * A special InteractionManager for fullscreen apps, which may
  917. * go beyond the limits of WebGL drawing buffers. On Safari and Chrome
  918. * the drawing buffers are limited to 4096 in width (Safari) or 4096x4096
  919. * in total buffer size (Chrome). The original InteractionManager.mapPositionToPoint
  920. * does not work with these extreme sizes which mainly occur if large
  921. * retina displays (>= 4K) are used with devicePixelRatio > 1.
  922. *
  923. * @private
  924. * @class
  925. * @extends PIXI.interaction.InteractionManager
  926. * @see {@link http://pixijs.download/dev/docs/PIXI.interaction.InteractionManager.html|PIXI.interaction.InteractionManager}
  927. * @see {@link https://stackoverflow.com/questions/29710696/webgl-drawing-buffer-size-does-not-equal-canvas-size}
  928. */
  929. class FullscreenInteractionManager extends PIXI.interaction.InteractionManager {
  930. mapPositionToPoint(point, x, y) {
  931. let resolution = this.renderer.resolution
  932. let extendWidth = 1.0
  933. let extendHeight = 1.0
  934. let dy = 0
  935. let canvas = this.renderer.view
  936. let context = canvas.getContext('webgl')
  937. if (
  938. context.drawingBufferWidth &lt; canvas.width ||
  939. context.drawingBufferHeight &lt; canvas.height
  940. ) {
  941. extendWidth = context.drawingBufferWidth / canvas.width
  942. extendHeight = context.drawingBufferHeight / canvas.height
  943. //dx = wantedWidth - context.drawingBufferWidth
  944. dy = (canvas.height - context.drawingBufferHeight) / resolution
  945. }
  946. x *= extendWidth
  947. y *= extendHeight
  948. super.mapPositionToPoint(point, x, y + dy)
  949. }
  950. }
  951. /**
  952. * The class PixiApp extends the class PIXI.Application
  953. * by several functions and makes meaningful pre-assumptions.
  954. *
  955. * @example
  956. * // Create the app
  957. * const app = new PIXIApp({
  958. * view: canvas,
  959. * width: 450,
  960. * height: 150,
  961. * fpsLogging: true,
  962. * theme: 'light',
  963. * transparent: false
  964. * }).setup().run()
  965. *
  966. * @class
  967. * @extends PIXI.Application
  968. * @see {@link http://pixijs.download/dev/docs/PIXI.Application.html|PIXI.Application}
  969. */
  970. export default class PIXIApp extends PIXI.Application {
  971. /**
  972. * Creates an instance of a PixiApp.
  973. *
  974. * @constructor
  975. * @param {object} [opts={}] - An options object. The following options can be set:
  976. * @param {number} [opts.width] - The width of the renderer. If no set, the application will run in fullscreen.
  977. * @param {number} [opts.height] - The height of the renderer. If no set, the application will run in fullscreen.
  978. * @param {HTMLElement} [opts.view] - The canvas HTML element. If not set, a render-element is added inside the body.
  979. * @param {boolean} [opts.transparent=true] - Should the render view be transparent?
  980. * @param {boolean} [opts.antialias=true] - Sets antialias (only applicable in chrome at the moment).
  981. * @param {number} [opts.resolution=window.devicePixelRatio | 1] - The resolution / device pixel ratio of the renderer, retina would be 2.
  982. * @param {boolean} [opts.autoResize=true] - Should the canvas-element be resized automatically if the resolution was set?
  983. * @param {number} [opts.backgroundColor=0x282828] - The color of the background.
  984. * @param {string|Theme} [opts.theme=dark] - The name of the theme (dark, light, red) or a Theme object to use for styling.
  985. * @param {boolean} [opts.fpsLogging=false] - If set to true, the current frames per second are displayed in the upper left corner.
  986. * @param {object} [opts.progress={}] - Can be used to add options to the progress bar. See class Progress for more informations.
  987. * @param {boolean} [opts.forceCanvas=false] - Prevents selection of WebGL renderer, even if such is present.
  988. * @param {boolean} [opts.roundPixels=true] - Align PIXI.DisplayObject coordinates to screen resolution.
  989. * @param {boolean} [opts.monkeyPatchMapping=true] - Monkey patch for canvas fullscreen support on large displays.
  990. * @param {boolean} [opts.adaptive=true] - Adds Graphics adaptive calculation of quadratic curve and arc subdivision.
  991. */
  992. constructor({
  993. width = null,
  994. height = null,
  995. view = null,
  996. transparent = true,
  997. backgroundColor = 0x282828,
  998. theme = 'dark',
  999. antialias = true,
  1000. resolution = window.devicePixelRatio || 1,
  1001. autoResize = true,
  1002. fpsLogging = false,
  1003. progress = {},
  1004. forceCanvas = false,
  1005. roundPixels = true,
  1006. monkeyPatchMapping = true,
  1007. adaptive = true,
  1008. graphql = false
  1009. }) {
  1010. const fullScreen = !width || !height
  1011. if (fullScreen) {
  1012. width = window.innerWidth
  1013. height = window.innerHeight
  1014. }
  1015. super({
  1016. view,
  1017. width,
  1018. height,
  1019. transparent,
  1020. antialias,
  1021. resolution,
  1022. autoResize,
  1023. backgroundColor,
  1024. forceCanvas,
  1025. roundPixels // not needed for PixiJS >= 5
  1026. })
  1027. this.width = width
  1028. this.height = height
  1029. this.theme = Theme.fromString(theme)
  1030. this.fpsLogging = fpsLogging
  1031. this.progressOpts = progress
  1032. this.fullScreen = fullScreen
  1033. this.orient = null
  1034. this.originalMapPositionToPoint = null
  1035. this.monkeyPatchMapping = monkeyPatchMapping
  1036. if (parseInt(PIXI.VERSION) >= 5) {
  1037. PIXI.settings.ROUND_PIXELS = roundPixels
  1038. PIXI.GRAPHICS_CURVES.adaptive = adaptive
  1039. } else {
  1040. PIXI.Graphics.CURVES.adaptive = adaptive
  1041. }
  1042. this.graphql = graphql
  1043. if (fullScreen || autoResize) {
  1044. console.log('App is in fullScreen mode or autoResize mode')
  1045. const resizeDebounced = debounce(event => this.resize(event), 50)
  1046. window.addEventListener('resize', resizeDebounced)
  1047. document.body.addEventListener(
  1048. 'orientationchange',
  1049. this.checkOrientation.bind(this)
  1050. )
  1051. }
  1052. if (monkeyPatchMapping) {
  1053. console.log('Using monkey patched coordinate mapping')
  1054. // Pluggin the specializtion does not work. Monkey patching does
  1055. // this.renderer.plugins.interaction = new FullscreenInteractionManager(this.renderer)
  1056. this.monkeyPatchPixiMapping()
  1057. }
  1058. }
  1059. /**
  1060. * Extra setup method to construct complex scenes, etc...
  1061. * Overwrite this method if you need additonal views and components.
  1062. *
  1063. * @return {PIXIApp} A reference to the PIXIApp for chaining.
  1064. */
  1065. setup() {
  1066. this.scene = this.sceneFactory()
  1067. this.stage.addChild(this.scene)
  1068. // fpsLogging
  1069. if (this.fpsLogging) {
  1070. this.addFpsDisplay()
  1071. }
  1072. // GraphQL
  1073. if (this.graphql &amp;&amp; typeof apollo !== 'undefined') {
  1074. const networkInterface = apollo.createNetworkInterface({
  1075. uri: '/graphql'
  1076. })
  1077. const wsClient = new subscriptions.SubscriptionClient(
  1078. `wss://${location.hostname}/subscriptions`,
  1079. {
  1080. reconnect: true,
  1081. connectionParams: {}
  1082. }
  1083. )
  1084. const networkInterfaceWithSubscriptions = subscriptions.addGraphQLSubscriptions(
  1085. networkInterface,
  1086. wsClient
  1087. )
  1088. this.apolloClient = new apollo.ApolloClient({
  1089. networkInterface: networkInterfaceWithSubscriptions
  1090. })
  1091. }
  1092. // progress
  1093. this._progress = new Progress(
  1094. Object.assign({ theme: this.theme }, this.progressOpts, {
  1095. app: this
  1096. })
  1097. )
  1098. this._progress.visible = false
  1099. this.stage.addChild(this._progress)
  1100. return this
  1101. }
  1102. /**
  1103. * Tests whether the width is larger than the height of the application.
  1104. *
  1105. * @return {boolean} Returns true if app is in landscape mode.
  1106. */
  1107. orientation() {
  1108. return this.width > this.height
  1109. }
  1110. /**
  1111. * Checks orientation and adapts view size if necessary. Implements a
  1112. * handler for the orientationchange event.
  1113. *
  1114. * @param {event=} - orientationchange event
  1115. */
  1116. checkOrientation(event) {
  1117. var value = this.orientation()
  1118. if (value != this.orient) {
  1119. setTimeout(
  1120. 100,
  1121. function() {
  1122. this.orientationChanged(true)
  1123. }.bind(this)
  1124. )
  1125. this.orient = value
  1126. }
  1127. }
  1128. /**
  1129. * Called if checkOrientation detects an orientation change event.
  1130. *
  1131. * @param {boolean=} [force=false] - Called if checkOrientation detects an orientation change event.
  1132. */
  1133. orientationChanged(force = false) {
  1134. if (this.expandRenderer() || force) {
  1135. this.layout()
  1136. }
  1137. }
  1138. /**
  1139. * Called after a resize. Empty method but can be overwritten to
  1140. * adapt their layout to the new app size.
  1141. *
  1142. * @param {number} [width] - The width of the app.
  1143. * @param {number} [height] - The height of the app.
  1144. */
  1145. layout(width, height) {}
  1146. /**
  1147. * Draws the display tree of the app. Typically this can be delegated
  1148. * to the layout method.
  1149. *
  1150. */
  1151. draw() {
  1152. this.layout(this.width, this.height)
  1153. }
  1154. /*
  1155. * Run the application. Override this method with everything
  1156. * that is needed to maintain your App, e.g. setup calls, main loops, etc.
  1157. *
  1158. */
  1159. run() {
  1160. return this
  1161. }
  1162. /*
  1163. * Overwrite this factory method if your application needs a special
  1164. * scene object.
  1165. *
  1166. * @returns {PIXI.Container} - A new PIXI Container for use as a scene.
  1167. */
  1168. sceneFactory() {
  1169. return new PIXI.Container()
  1170. }
  1171. /**
  1172. * Adds the display of the frames per second to the renderer in the upper left corner.
  1173. *
  1174. * @return {PIXIApp} - Returns the PIXIApp for chaining.
  1175. */
  1176. addFpsDisplay() {
  1177. const fpsDisplay = new FpsDisplay(this)
  1178. this.stage.addChild(fpsDisplay)
  1179. return this
  1180. }
  1181. /**
  1182. * Returns the size of the renderer as an object with the keys width and height.
  1183. *
  1184. * @readonly
  1185. * @member {object}
  1186. */
  1187. get size() {
  1188. return { width: this.width, height: this.height }
  1189. }
  1190. /**
  1191. * Returns the center of the renderer as an object with the keys x and y.
  1192. *
  1193. * @readonly
  1194. * @member {object}
  1195. */
  1196. get center() {
  1197. return { x: this.width / 2, y: this.height / 2 }
  1198. }
  1199. /**
  1200. * Resizes the renderer to fit into the window or given width and height.
  1201. *
  1202. * @param {object} [event] - The event.
  1203. * @param {object=} [opts={}] - The event.
  1204. * @param {number} [opts.width=window.innerWidth] - The width of the app to resize to.
  1205. * @param {number} [opts.height=window.innerHeight] - The height of the app to resize to.
  1206. * @return {PIXIApp} - Returns the PIXIApp for chaining.
  1207. */
  1208. resize(
  1209. event,
  1210. { width = window.innerWidth, height = window.innerHeight } = {}
  1211. ) {
  1212. this.width = width
  1213. this.height = height
  1214. this.expandRenderer()
  1215. this.layout(width, height)
  1216. //console.log("App.resize", width, height, window.innerWidth, window.innerHeight )
  1217. // if (this.scene) {
  1218. // console.log("gl.drawingBufferWidth", this.renderer.view.getContext('webgl').drawingBufferWidth)
  1219. // console.log("scene", this.scene.scale, this.renderer, this.renderer.autoResize, this.renderer.resolution)
  1220. // }
  1221. return this
  1222. }
  1223. /**
  1224. * @todo Write the documentation.
  1225. *
  1226. * @private
  1227. */
  1228. monkeyPatchPixiMapping() {
  1229. if (this.originalMapPositionToPoint === null) {
  1230. let interactionManager = this.renderer.plugins.interaction
  1231. this.originalMapPositionToPoint =
  1232. interactionManager.mapPositionToPoint
  1233. interactionManager.mapPositionToPoint = (point, x, y) => {
  1234. return this.fixedMapPositionToPoint(point, x, y)
  1235. }
  1236. }
  1237. }
  1238. /**
  1239. * In some browsers the canvas is distorted if the screen resolution and
  1240. * overall size of the canvas exceeds the internal limits (e.g. 4096 x 4096 pixels).
  1241. * To compensate these distortions we need to fix the mapping to the actual
  1242. * drawing buffer coordinates.
  1243. * @private
  1244. * @param {any} local
  1245. * @param {number} x
  1246. * @param {number} y
  1247. * @return {} interactionManager.mapPositionToPoint
  1248. */
  1249. fixedMapPositionToPoint(local, x, y) {
  1250. let resolution = this.renderer.resolution
  1251. let interactionManager = this.renderer.plugins.interaction
  1252. let extendWidth = 1.0
  1253. let extendHeight = 1.0
  1254. let dy = 0
  1255. let canvas = this.renderer.view
  1256. let context = canvas.getContext('webgl')
  1257. if (
  1258. context !== null &amp;&amp;
  1259. (context.drawingBufferWidth &lt; canvas.width ||
  1260. context.drawingBufferHeight &lt; canvas.height)
  1261. ) {
  1262. extendWidth = context.drawingBufferWidth / canvas.width
  1263. extendHeight = context.drawingBufferHeight / canvas.height
  1264. //dx = wantedWidth - context.drawingBufferWidth
  1265. dy = (canvas.height - context.drawingBufferHeight) / resolution
  1266. }
  1267. x *= extendWidth
  1268. y *= extendHeight
  1269. return this.originalMapPositionToPoint.call(
  1270. interactionManager,
  1271. local,
  1272. x,
  1273. y + dy
  1274. )
  1275. }
  1276. /**
  1277. * Expand the renderer step-wise on resize.
  1278. *
  1279. * @param {number} [expand] - The amount of additional space for the renderer [px].
  1280. * @return {boolean} true if the renderer was resized.
  1281. */
  1282. expandRenderer(expand = 256) {
  1283. let renderer = this.renderer
  1284. let resolution = this.renderer.resolution
  1285. let ww = this.width
  1286. let hh = this.height
  1287. let sw = this.screen.width
  1288. let sh = this.screen.height
  1289. if (ww > sw || hh > sh) {
  1290. //console.log('App.expandRenderer')
  1291. renderer.resize(ww + expand, hh + expand)
  1292. return true
  1293. }
  1294. renderer.resize(ww, hh)
  1295. return false
  1296. }
  1297. /**
  1298. * Set the loading progress of the application. If called for the first time, display the progress bar.
  1299. *
  1300. * @param {number} [value] - Should be a value between 0 and 100. If 100, the progress bar will disappear.
  1301. * @return {PIXIApp|Progress} The PixiApp object for chaining or the Progress object when the method was
  1302. * called without a parameter.
  1303. */
  1304. progress(value) {
  1305. if (typeof value === 'undefined') {
  1306. return this._progress
  1307. }
  1308. this._progress.visible = true
  1309. this._progress.progress = value
  1310. return this
  1311. }
  1312. /**
  1313. * Opens a new Modal object binded to this app.
  1314. *
  1315. * @param {object} [opts] - An options object for the Modal object.
  1316. * @return {Modal} Returns the Modal object.
  1317. */
  1318. modal(opts = {}) {
  1319. let modal = new Modal(
  1320. Object.assign({ theme: this.theme }, opts, { app: this })
  1321. )
  1322. this.scene.addChild(modal)
  1323. return modal
  1324. }
  1325. /**
  1326. * Opens a new Message object binded to this app.
  1327. *
  1328. * @param {object} [opts] - An options object for the Message object.
  1329. * @return {Message} Returns the Message object.
  1330. */
  1331. message(opts = {}) {
  1332. let message = new Message(
  1333. Object.assign({ theme: this.theme }, opts, { app: this })
  1334. )
  1335. this.scene.addChild(message)
  1336. return message
  1337. }
  1338. /**
  1339. * Loads sprites, e.g. images into the PIXI TextureCache.
  1340. *
  1341. * @param {string|string[]} resources - A String or an Array of urls to the images to load.
  1342. * @param {function} [loaded] - A callback which is executed after all resources has been loaded.
  1343. * Receives one paramter, a Map of sprites where the key is the path of the image which was
  1344. * loaded and the value is the PIXI.Sprite object.
  1345. * @param {object} [opts] - An options object for more specific parameters.
  1346. * @param {boolean} [opts.resolutionDependent=true] - Should the sprites be loaded dependent of the
  1347. * renderer resolution?
  1348. * @param {boolean} [opts.progress=false] - Should a progress bar display the loading status?
  1349. * @return {PIXIApp} The PIXIApp object for chaining.
  1350. */
  1351. loadSprites(
  1352. resources,
  1353. loaded = null,
  1354. { resolutionDependent = true, progress = false } = {}
  1355. ) {
  1356. this.loadTextures(
  1357. resources,
  1358. textures => {
  1359. let sprites = new Map()
  1360. for (let [key, texture] of textures) {
  1361. sprites.set(key, new PIXI.Sprite(texture))
  1362. }
  1363. if (loaded) {
  1364. loaded.call(this, sprites)
  1365. }
  1366. },
  1367. { resolutionDependent, progress }
  1368. )
  1369. return this
  1370. }
  1371. /**
  1372. * Loads textures, e.g. images into the PIXI TextureCache.
  1373. *
  1374. * @param {string|string[]} resources - A String or an Array of urls to the images to load.
  1375. * @param {function} [loaded] - A callback which is executed after all resources has been loaded.
  1376. * Receives one paramter, a Map of textures where the key is the path of the image which was
  1377. * loaded and the value is the PIXI.Texture object.
  1378. * @param {object} [opts] - An options object for more specific parameters.
  1379. * @param {boolean} [opts.resolutionDependent=true] - Should the textures be loaded dependent of the
  1380. * renderer resolution?
  1381. * @param {boolean} [opts.progress=false] - Should a progress bar display the loading status?
  1382. * @return {PIXIApp} The PIXIApp object for chaining.
  1383. */
  1384. loadTextures(
  1385. resources,
  1386. loaded = null,
  1387. { resolutionDependent = true, progress = false } = {}
  1388. ) {
  1389. if (!Array.isArray(resources)) {
  1390. resources = [resources]
  1391. }
  1392. const loader = this.loader
  1393. for (let resource of resources) {
  1394. if (!loader.resources[resource]) {
  1395. if (resolutionDependent) {
  1396. let resolution = Math.round(this.renderer.resolution)
  1397. switch (resolution) {
  1398. case 2:
  1399. loader.add(
  1400. resource,
  1401. resource.replace(/\.([^.]*)$/, '@2x.$1')
  1402. )
  1403. break
  1404. case 3:
  1405. loader.add(
  1406. resource,
  1407. resource.replace(/\.([^.]*)$/, '@3x.$1')
  1408. )
  1409. break
  1410. default:
  1411. loader.add(resource)
  1412. break
  1413. }
  1414. } else {
  1415. loader.add(resource)
  1416. }
  1417. }
  1418. }
  1419. if (progress) {
  1420. loader.on('progress', e => {
  1421. this.progress(e.progress)
  1422. })
  1423. }
  1424. loader.load((loader, resources) => {
  1425. const textures = new Map()
  1426. for (let key in resources) {
  1427. textures.set(key, resources[key].texture)
  1428. }
  1429. if (loaded) {
  1430. loaded.call(this, textures)
  1431. }
  1432. })
  1433. return this
  1434. }
  1435. /**
  1436. * Queries the GraphQL endpoint.
  1437. *
  1438. * @param {string} [query] - The GraphQL query string.
  1439. * @param {object} [opts={}] - An options object. The following options can be set:
  1440. * http://dev.apollodata.com/core/apollo-client-api.html#ApolloClient.query
  1441. * @return {Promise} Returns a Promise which is either resolved with the resulting data or
  1442. * rejected with an error.
  1443. */
  1444. query(query, opts = {}) {
  1445. if (typeof query === 'string') {
  1446. opts = Object.assign({}, opts, { query })
  1447. } else {
  1448. opts = Object.assign({}, query)
  1449. }
  1450. opts.query = opts.query.trim()
  1451. if (!opts.query.startsWith('query')) {
  1452. if (opts.query.startsWith('{')) {
  1453. opts.query = `query ${opts.query}`
  1454. } else {
  1455. opts.query = `query {${opts.query}}`
  1456. }
  1457. }
  1458. opts.query = gql(opts.query)
  1459. return this.apolloClient.query(opts)
  1460. }
  1461. /**
  1462. * Mutate the GraphQL endpoint.
  1463. *
  1464. * @param {string} [mutation] - The GraphQL mutation string.
  1465. * @param {object} [opts={}] - An options object. The following options can be set:
  1466. * http://dev.apollodata.com/core/apollo-client-api.html#ApolloClient.mutate
  1467. * @return {Promise} Returns a Promise which is either resolved with the resulting data or
  1468. * rejected with an error.
  1469. */
  1470. mutate(mutation, opts = {}) {
  1471. if (typeof mutation === 'string') {
  1472. opts = Object.assign({}, opts, { mutation })
  1473. } else {
  1474. opts = Object.assign({}, mutation)
  1475. }
  1476. opts.mutation = opts.mutation.trim()
  1477. if (!opts.mutation.startsWith('mutation')) {
  1478. if (opts.mutation.startsWith('{')) {
  1479. opts.mutation = `mutation ${opts.mutation}`
  1480. } else {
  1481. opts.mutation = `mutation {${opts.mutation}}`
  1482. }
  1483. }
  1484. opts.mutation = gql(opts.mutation)
  1485. return this.apolloClient.mutate(opts)
  1486. }
  1487. /**
  1488. * Subscribe the GraphQL endpoint.
  1489. *
  1490. * @param {string} [subscription] - The GraphQL subscription.
  1491. * @param {object} [opts={}] - An options object. The following options can be set:
  1492. * http://dev.apollodata.com/core/apollo-client-api.html#ApolloClient.query
  1493. * @return {Promise} Returns a Promise which is either resolved with the resulting data or
  1494. * rejected with an error.
  1495. */
  1496. subscribe(subscription, opts = {}) {
  1497. if (typeof subscription === 'string') {
  1498. opts = Object.assign({}, opts, { subscription })
  1499. } else {
  1500. opts = Object.assign({}, subscription)
  1501. }
  1502. opts.subscription = opts.subscription.trim()
  1503. if (!opts.subscription.startsWith('subscription')) {
  1504. if (opts.subscription.startsWith('{')) {
  1505. opts.subscription = `subscription ${opts.subscription}`
  1506. } else {
  1507. opts.subscription = `subscription {${opts.subscription}}`
  1508. }
  1509. }
  1510. opts.query = gql(opts.subscription)
  1511. delete opts.subscription
  1512. return this.apolloClient.subscribe(opts)
  1513. }
  1514. /**
  1515. * Supports the page as a global coordinate system and converts browser page coordinates
  1516. * to local DisplayObject coordinates.
  1517. *
  1518. * @param {DisplayObject} displayObject - The PIXI displayObject.
  1519. * @param {number} x - The x coordinate.
  1520. * @param {number} y - The y coordinate.
  1521. *
  1522. * @return {PIXI.Point} Returns a PIXI.Point.
  1523. */
  1524. convertPointFromPageToNode(displayObject, x, y) {
  1525. let resolution = this.renderer.resolution
  1526. console.log('resolution', resolution)
  1527. let pixiGlobal = window.convertPointFromPageToNode(app.view, x, y)
  1528. pixiGlobal.x /= resolution
  1529. pixiGlobal.y /= resolution
  1530. return displayObject.toLocal(new PIXI.Point(pixiGlobal.x, pixiGlobal.y))
  1531. }
  1532. /**
  1533. * Supports the page as a global coordinate system and converts local DisplayObject coordinates
  1534. * to browser page coordinates.
  1535. *
  1536. * @param {DisplayObject} displayObject - The PIXI displayObject.
  1537. * @param {number} x - The x coordinate.
  1538. * @param {number} y - The y coordinate.
  1539. *
  1540. * @return {Point} Returns a DOM Point.
  1541. */
  1542. convertPointFromNodeToPage(displayObject, x, y) {
  1543. let resolution = this.renderer.resolution
  1544. let pixiGlobal = displayObject.toGlobal(new PIXI.Point(x, y))
  1545. pixiGlobal.x *= resolution
  1546. pixiGlobal.y *= resolution
  1547. // console.log("app.convertPointFromNodeToPage", pixiGlobal)
  1548. return window.convertPointFromNodeToPage(
  1549. app.view,
  1550. pixiGlobal.x,
  1551. pixiGlobal.y
  1552. )
  1553. }
  1554. }
  1555. /**
  1556. * The class fpsdisplay shows in the upper left corner
  1557. * of the renderer the current image refresh rate.
  1558. *
  1559. * @private
  1560. * @class
  1561. * @extends PIXI.Graphics
  1562. * @see {@link http://pixijs.download/dev/docs/PIXI.Graphics.html|PIXI.Graphics}
  1563. */
  1564. class FpsDisplay extends PIXI.Graphics {
  1565. /**
  1566. * Creates an instance of a FpsDisplay.
  1567. *
  1568. * @constructor
  1569. * @param {PIXIApp} app - The PIXIApp where the frames per second should be displayed.
  1570. */
  1571. constructor(app) {
  1572. super()
  1573. this.app = app
  1574. this.lineStyle(3, 0x434f4f, 1)
  1575. .beginFill(0x434f4f, 0.6)
  1576. .drawRoundedRect(0, 0, 68, 32, 5)
  1577. .endFill()
  1578. .position.set(20, 20)
  1579. this.text = new PIXI.Text(
  1580. this.fps,
  1581. new PIXI.TextStyle({
  1582. fontFamily: 'Arial',
  1583. fontSize: 14,
  1584. fontWeight: 'bold',
  1585. fill: '#f6f6f6',
  1586. stroke: '#434f4f',
  1587. strokeThickness: 3
  1588. })
  1589. )
  1590. this.text.position.set(6, 6)
  1591. this.addChild(this.text)
  1592. this.refreshFps()
  1593. window.setInterval(this.refreshFps.bind(this), 1000)
  1594. }
  1595. /**
  1596. * Refreshes fps numer.
  1597. *
  1598. * @return {PIXIApp} Returns the PIXIApp object for chaining.
  1599. */
  1600. refreshFps() {
  1601. this.text.text = `${this.app.ticker.FPS.toFixed(1)} fps`
  1602. return this
  1603. }
  1604. }
  1605. </code></pre>
  1606. </article>
  1607. </section>
  1608. <footer class="content-size">
  1609. <div class="footer">
  1610. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Jul 30 2019 10:48:36 GMT+0200 (Mitteleuropäische Sommerzeit)
  1611. </div>
  1612. </footer>
  1613. </div>
  1614. </div>
  1615. <script>prettyPrint();</script>
  1616. <script src="scripts/main.js"></script>
  1617. </body>
  1618. </html>