lua_api.txt 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840
  1. .. contents::
  2. Math
  3. ====
  4. Vector3
  5. -------
  6. **Vector3** (x, y, z) : Vector3
  7. Constructor.
  8. **x** (v) : float
  9. Returns the x value of the vector.
  10. **y** (v) : float
  11. Returns the y value of the vector.
  12. **z** (v) : float
  13. Returns the z value of the vector.
  14. **.x** : float
  15. Returns/assigns the x value of the vector.
  16. **.y** : float
  17. Returns/assigns the y value of the vector.
  18. **.z** : float
  19. Returns/assigns the z value of the vector.
  20. **set_x** (v, x)
  21. Sets the value of the x value of the vector.
  22. **set_y** (v, y)
  23. Sets the value of the y value of the vector.
  24. **set_z** (v, z)
  25. Sets the value of the z value of the vector.
  26. **values** (v) : float, float, float
  27. Returns the x, y and z values of the vector.
  28. **add** (a, b) : Vector3
  29. Adds the vector *a* to *b* and returns the result.
  30. **subtract** (a, b) : Vector3
  31. Subtracts the vector *b* from *a* and returns the result.
  32. **multiply** (a, k) : Vector3
  33. Multiplies the vector *a* by the scalar *k* and returns the result.
  34. **divide** (a, k) : Vector3
  35. Divides the vector *a* by the scalar *k* and returns the result.
  36. **dot** (a, b) : float
  37. Returns the dot product between the vectors *a* and *b*.
  38. **cross** (a, b) : Vector3
  39. Returns the cross product between the vectors *a* and *b*.
  40. **equal** (a, b) : bool
  41. Returns true whether the vectors *a* and *b* are equal.
  42. **length** (a) : float
  43. Returns the lenght of *a*.
  44. **squared_length** (a) : float
  45. Returns the squared length of *a*.
  46. **set_length** (a, len)
  47. Sets the lenght of *a* to *len*.
  48. **normalize** (a) : Vector3
  49. Normalizes *a* and returns the result.
  50. **distance** (a, b) : float
  51. Returns the distance between the points *a* and *b*.
  52. **angle** (a, b) : float
  53. Returns the angle between the vectors *a* and *b*.
  54. Quaternion
  55. ----------
  56. **Quaternion** (v, w) : Quaternion
  57. Constructor.
  58. **negate** (q) : Quaternion
  59. Negates the quaternion *q* and returns the result.
  60. **identity** () : Quaternion
  61. Returns the identity quaternion.
  62. **multiply** (a, b) : Quaternion
  63. Multiplies the quaternions *a* and *b*. (i.e. rotates first by *a* then by *b*).
  64. **multiply_by_scalar** (a, k) : Quaternion
  65. Multiplies the quaternion *a* by the scalar *k*.
  66. **length** (q) : float
  67. Returns the length of *q*.
  68. **normalize** (q) : Quaternion
  69. Normalizes the quaternion *q* and returns the result.
  70. **conjugate** (q) : Quaternion
  71. Returns the conjugate of quaternion *q*.
  72. **inverse** (q) : Quaternion
  73. Returns the inverse of quaternion *q*.
  74. **power** (q, exp) : Quaternion
  75. Returns the quaternion *q* raised to the power of *exp*.
  76. **elements** (q) : x, y, z, w
  77. Returns the elements of the quaternion.
  78. Matrix4x4
  79. ---------
  80. **Matrix4x4** (m0, m1, ..., m15) : Matrix4x4
  81. Constructor.
  82. **from_quaternion** (q) : Matrix4x4
  83. Returns a new matrix from *q*.
  84. **from_translation** (t) : Matrix4x4
  85. Returns a new matrix from *t*.
  86. **from_quaternion_translation** (q, t) : Matrix4x4
  87. Returns a new matrix from *q* and *t*.
  88. **from_axes** (x, y, z, t) : Matrix4x4
  89. Returns a new matrix from *x*, *y*, *z* and *t*.
  90. **add** (a, b) : Matrix4x4
  91. Adds the matrix *a* to *b* and returns the result.
  92. **subtract** (a, b) : Matrix4x4
  93. Subtracts the matrix *b* from *a* and returns the result.
  94. **multiply** (a, b) : Matrix4x4
  95. Multiplies the matrix *a* by *b* and returns the result. (i.e. transforms first by *a* then by *b*)
  96. **transpose** (m) : Matrix4x4
  97. Transposes the matrix *m* and returns the result.
  98. **determinant** (m) : float
  99. Returns the determinant of the matrix *m*.
  100. **invert** (m) : Matrix4x4
  101. Inverts the matrix *m* and returns the result.
  102. **x** (m) : Vector3
  103. Returns the x asis of the matrix *m*.
  104. **y** (m) : Vector3
  105. Returns the y asis of the matrix *m*.
  106. **z** (m) : Vector3
  107. Returns the z asis of the matrix *m*.
  108. **set_x** (m, x)
  109. Sets the x axis of the matrix *m*.
  110. **set_y** (m, y)
  111. Sets the y axis of the matrix *m*.
  112. **set_z** (m, z)
  113. Sets the z axis of the matrix *m*.
  114. **translation** (m, a) : Vector3
  115. Returns the translation portion of the matrix *m*.
  116. **set_translation** (m, t)
  117. Sets the translation portion of the matrix *m*.
  118. **identity** ()
  119. Returns the identity matrix.
  120. **to_string** (a)
  121. Returns a string representing the matrix.
  122. Math
  123. ----
  124. **ray_obb_intersection** (from, dir, tm, extents) : float
  125. Returns the distance along ray (from, dir) to intersection point with the oriented
  126. bounding box (tm, extents) or -1.0 if no intersection.
  127. World
  128. =====
  129. **spawn_unit** (world, name, [position, rotation]) : Unit
  130. Spawns a new instance of the unit *name* at the given *position* and *rotation*.
  131. **destroy_unit** (world, unit)
  132. Destroys the given *unit*.
  133. **num_units** (world) : int
  134. Returns the number of units in the *world*.
  135. **units** (world) : Table
  136. Returns all the the units in the world in a table.
  137. **update_animations** (world, dt)
  138. Update all animations with *dt*.
  139. **update_scene** (world, dt)
  140. Updates the scene with *dt*.
  141. **update** (world, dt)
  142. Updates the world with *dt*.
  143. **play_sound** (world, name, [loop, volume, position, range]) : SoundInstanceId
  144. Plays the sound with the given *name* at the given *position*, with the given
  145. *volume* and *range*. *loop* controls whether the sound must loop or not.
  146. **stop_sound** (world, id)
  147. Stops the sound with the given *id*.
  148. **link_sound** (world, id, unit, node)
  149. Links the sound *id* to the *node* of the given *unit*.
  150. After this call, the sound *id* will follow the unit *unit*.
  151. **set_listener_pose** (world, pose)
  152. Sets the *pose* of the listener.
  153. **set_sound_position** (world, position)
  154. Sets the *position* of the sound *id*.
  155. **set_sound_range** (world, range)
  156. Sets the *range* of the sound *id*.
  157. **set_sound_volume** (world, volume)
  158. Sets the *volume* of the sound *id*.
  159. **create_window_gui** (world) : Gui
  160. Creates a new window-space Gui of size *width* and *height*.
  161. **destroy_gui** (world, id)
  162. Destroys the gui with the given *id*.
  163. **create_debug_line** (world, depth_test) : DebugLine
  164. Creates a new DebugLine. *depth_test* controls whether to
  165. enable depth test when rendering the lines.
  166. **destroy_debug_line** (world, line)
  167. Destroys the debug *line*.
  168. **load_level** (world, name) : Level
  169. Loads the level *name* into the world.
  170. **physics_world** (world) : PhysicsWorld
  171. Returns the physics sub-world.
  172. **sound_world** (world) : SoundWorld
  173. Returns the sound sub-world.
  174. Unit
  175. ----
  176. **node** (unit, name)
  177. Returns the node *name*.
  178. **has_node** (unit, name) : int
  179. Returns whether the unit has the node *name*.
  180. **num_nodes** (unit) : int
  181. Returns the number of nodes of the unit.
  182. **local_position** (unit) : Vector3
  183. Returns the local position of the unit.
  184. **local_rotation** (unit) : Quaternion
  185. Returns the local rotation of the unit.
  186. **local_pose** (unit) : Matrix4x4
  187. Returns the local pose of the unit.
  188. **world_position** (unit) : Vector3
  189. Returns the world position of the unit.
  190. **world_rotation** (unit) : Quaternion
  191. Returns the world rotation of the unit.
  192. **world_pose** (unit) : Matrix4x4
  193. Returns the world pose of the unit.
  194. **set_local_position** (unit, position)
  195. Sets the local position of the unit.
  196. **set_local_rotation** (unit, rotation)
  197. Sets the local rotation of the unit.
  198. **set_local_pose** (unit, pose)
  199. Sets the local pose of the unit.
  200. **link_node** (unit)
  201. Links the *child* node to the *parent* node.
  202. After the linking the *child* pose is reset to identity.
  203. Note that *parent* node must be either -1 (meaning no parent), or an index lesser than child.
  204. **unlink_node** (unit, child)
  205. Unlinks *child* from its parent, if any.
  206. **camera** (unit, name)
  207. Returns the camera *name*.
  208. **material** (unit, name)
  209. Returns the material *name*.
  210. **mesh** (unit, name)
  211. Returns the mesh *name*.
  212. **sprite** (unit, name)
  213. Returns the sprite *name*.
  214. **actor** (unit, name)
  215. Returns the actor *name*.
  216. **controller** (unit, name)
  217. Returns the controller *name*.
  218. **is_a** (unit, type)
  219. Returns whether the unit is of the given *type*.
  220. **play_sprite_animation** (unit, name, loop)
  221. Plays the sprite animation *name*.
  222. **stop_sprite_animation** (unit)
  223. Stops the current playing animation.
  224. Camera
  225. ------
  226. **local_position** (camera, position)
  227. Returns the local position of the camera.
  228. **local_rotation** (camera, rotation)
  229. Returns the local rotation of the camera.
  230. **local_pose** (camera, pose)
  231. Returns the local pose of the camera.
  232. **world_position** (camera) : Vector3
  233. Returns the world position of the camera.
  234. **world_rotation** (camera) : Quaternion
  235. Returns the world rotation of the camera.
  236. **world_pose** (camera) : Matrix4x4
  237. Returns the world pose of the camera.
  238. **set_local_position** (camera, unit, position)
  239. Sets the local position of the camera.
  240. **set_local_rotation** (camera, unit, rotation)
  241. Sets the local rotation of the camera.
  242. **set_local_pose** (camera, unit, pose)
  243. Sets the local pose of the camera.
  244. **set_projection_type** (camera, type)
  245. Sets the projection type of the camera.
  246. **projection_type** (camera) : int
  247. Returns the projection type of the camera.
  248. **fov** (camera) : float
  249. Returns the field-of-view of the camera in degrees.
  250. **set_fov** (camera, degrees)
  251. Sets the field-of-view of the camera in degrees.
  252. **aspect** (camera) : float
  253. Returns the aspect ratio of the camera. (Perspective projection only.)
  254. **set_aspect** (camera)
  255. Sets the aspect ratio of the camera. (Perspective projection only.)
  256. **near_clip_distance** (camera) : float
  257. Returns the near clip distance of the camera.
  258. **set_near_clip_distance** (camera, near)
  259. Sets the near clip distance of the camera.
  260. **far_clip_distance** (camera) : float
  261. Returns the far clip distance of the camera.
  262. **set_far_clip_distance** (camera, far)
  263. Sets the far clip distance of the camera.
  264. **set_orthographic_metrics** (camera, left, right, bottom, top)
  265. Sets the coordinates for orthographic clipping planes. (Orthographic projection only.)
  266. **set_viewport_metrics** (camera, x, y, width, height)
  267. Sets the coordinates for the camera viewport in pixels.
  268. **screen_to_world** (camera, pos) : Vector3
  269. Returns *pos* from screen-space to world-space coordinates.
  270. **world_to_screen** (camera, pos) : Vector3
  271. Returns *pos* from world-space to screen-space coordinates.
  272. Sprite
  273. ------
  274. **local_position** (sprite) : Vector3
  275. Returns the local position of the sprite.
  276. **local_rotation** (sprite) : Quaternion
  277. Returns the local rotation of the sprite.
  278. **local_pose** (sprite) : Matrix4x4
  279. Returns the local pose of the sprite.
  280. **set_local_position** (sprite, unit, position)
  281. Sets the local position of the sprite.
  282. **set_local_rotation** (sprite, unit, rotation)
  283. Sets the local rotation of the sprite.
  284. **set_local_pose** (sprite, unit, pose)
  285. Sets the local pose of the sprite.
  286. **set_frame** (sprite, num)
  287. Sets the frame of the sprite.
  288. **set_depth** (sprite, depth)
  289. Sets the depth of the sprite.
  290. Sprites with higher depth values are drawn in front of sprites
  291. whith lower depth values.
  292. Mesh
  293. ----
  294. **local_position** (mesh) : Vector3
  295. Returns the local position of the mesh.
  296. **local_rotation** (mesh) : Quaternion
  297. Returns the local rotation of the mesh.
  298. **local_pose** (mesh) : Matrix4x4
  299. Returns the local pose of the mesh.
  300. **set_local_position** (mesh, unit, position)
  301. Sets the local position of the mesh.
  302. **set_local_rotation** (mesh, unit, rotation)
  303. Sets the local rotation of the mesh.
  304. **set_local_pose** (mesh, unit, pose)
  305. Sets the local pose of the mesh.
  306. Material
  307. --------
  308. **set_float** (material, variable, value)
  309. Sets the material variable to the given value.
  310. **set_vector2** (material, variable, value)
  311. Sets the material variable to the given value.
  312. **set_vector3** (material, variable, value)
  313. Sets the material variable to the given value.
  314. Gui
  315. ---
  316. resolution
  317. TODO
  318. move
  319. TODO
  320. screen_to_gui
  321. TODO
  322. draw_rectangle
  323. TODO
  324. draw_image
  325. TODO
  326. draw_image_uv
  327. TODO
  328. draw_text
  329. TODO
  330. PhysicsWorld
  331. =============
  332. **gravity** (physics_world) : Vector3
  333. Returns the gravity.
  334. **set_gravity** (physics_world, gravity)
  335. Sets the gravity.
  336. **make_raycast**
  337. TODO
  338. **overlap_test**
  339. TODO
  340. Controller
  341. ----------
  342. **move** (controller, position)
  343. Moves the controller to *position*.
  344. **position** (controller) : Vector3
  345. Returns the position of the controller.
  346. **collides_up** (controller) : bool
  347. Returns whether the contoller collides upwards.
  348. **collides_down** (controller) : bool
  349. Returns whether the controller collides downwards.
  350. **collides_sides** (controller) : bool
  351. Returns whether the controller collides sidewards.
  352. Actor
  353. -----
  354. **world_position** (actor) : Vector3
  355. Returns the world position of the actor.
  356. **world_rotation** (actor) : Quaternion
  357. Returns the world rotation of the actor.
  358. **world_pose** (actor) : Matrix4x4
  359. Returns the world pose of the actor.
  360. **teleport_world_position** (actor, position)
  361. Teleports the actor to the given world position.
  362. **teleport_world_rotation** (actor, rotation)
  363. Teleports the actor to the given world rotation.
  364. **teleport_world_pose** (actor, pose)
  365. Teleports the actor to the given world pose.
  366. **center_of_mass** (actor) : Vector3
  367. Returns the center of mass of the actor.
  368. **enable_gravity** (actor)
  369. Enables gravity for the actor.
  370. **disable_gravity** (actor)
  371. Disables gravity for the actor.
  372. **enable_collision** (actor)
  373. Enables collision detection for the actor.
  374. **disable_collision** (actor)
  375. Disables collision detection for the actor.
  376. **set_collision_filter** (actor, name)
  377. Sets the collision filter of the actor.
  378. **set_kinematic** (actor, kinematic)
  379. Sets whether the actor is kinematic or not.
  380. Note that this call has no effect on static actors.
  381. **move** (actor, position)
  382. Moves the actor to *pos*
  383. Note that this call only affects nonkinematic actors.
  384. **is_static** (actor) : bool
  385. Returns whether the actor is static.
  386. **is_dynamic** (actor) bool
  387. Returns whether the actor is dynamic.
  388. **is_kinematic** (actor) : bool
  389. Returns whether the actor is kinematic (keyframed).
  390. **is_nonkinematic** (actor) : bool
  391. Returns whether the actor is nonkinematic (i.e. dynamic and not kinematic).
  392. **linear_damping** (actor) : float
  393. Returns the linear damping of the actor.
  394. **set_linear_damping** (actor, damping)
  395. Sets the linear damping of the actor.
  396. **angular_damping** (actor) : float
  397. Returns the angular damping of the actor.
  398. **set_angular_damping** (actor, rate)
  399. Sets the angular damping of the actor.
  400. **linear_velocity** (actor) : Vector3
  401. Returns the linear velocity of the actor.
  402. **set_linear_velocity** (actor, velocity)
  403. Sets the linear velocity of the actor.
  404. Note that this call only affects nonkinematic actors.
  405. **angular_velocity** (actor) : Vector3
  406. Returns the angular velocity of the actor.
  407. **set_angular_velocity** (actor, velocity)
  408. Sets the angular velocity of the actor.
  409. Note that this call only affects nonkinematic actors.
  410. **add_impulse** (actor, impulse)
  411. Adds a linear impulse (acting along the center of mass) to the actor.
  412. Note that this call only affects nonkinematic actors.
  413. **add_impulse_at** (actor, impulse, position)
  414. Adds a linear impulse (acting along the world position *pos*) to the actor.
  415. Note that this call only affects nonkinematic actors.
  416. **add_torque_impulse** (actor, impulse)
  417. Adds a torque impulse to the actor.
  418. **push** (actor, velocity, mass)
  419. Pushes the actor as if it was hit by a point object with the given *mass*
  420. travelling at the given *velocity*.
  421. Note that this call only affects nonkinematic actors.
  422. **push_at** (actor, velocity, mass, position)
  423. Like push() but applies the force at the world position *pos*.
  424. Note that this call only affects nonkinematic actors.
  425. **is_sleeping** (actor) : bool
  426. Returns whether the actor is sleeping.
  427. **wake_up** (actor)
  428. Wakes the actor up.
  429. **unit** (actor) : Unit
  430. Returns the unit that owns the actor or nil;
  431. SoundWorld
  432. ===========
  433. **stop_all** (sound_world)
  434. Stops all the sounds in the world.
  435. **pause_all** (sound_world)
  436. Pauses all the sounds in the world
  437. **resume_all** (sound_world)
  438. Resumes all previously paused sounds in the world.
  439. **is_playing** (sound_world, id) : bool
  440. Returns wheter the sound *id* is playing.
  441. ResourcePackage
  442. ================
  443. **load** (package)
  444. Loads all the resources in the package.
  445. Note that the resources are not immediately available after the call is made,
  446. instead, you have to poll for completion with has_loaded().
  447. **unload** (package)
  448. Unloads all the resources in the package.
  449. **flush** (package)
  450. Waits until the package has been loaded.
  451. **has_loaded** (package) : bool
  452. Returns whether the package has been loaded.
  453. Device
  454. ======
  455. **platform** () : string
  456. Returns a string identifying what platform the engine is running on.
  457. **architecture** () : string
  458. Returns a string identifying what architecture the engine is running on.
  459. **version** () : string
  460. Returns a string identifying the engine version.
  461. **last_delta_time** () : float
  462. Returns the time in seconds needed to render the last frame
  463. **quit** ()
  464. Quits the application.
  465. **resolution** () : Table
  466. Returns the main window resolution.
  467. **create_world** () : World
  468. Creates a new world.
  469. **destroy_world** (world)
  470. Destroys the given *world*.
  471. **render_world** (world, camera)
  472. Renders the given *world* from the point of view of the given *camera*.
  473. **create_resource_package** (name) : ResourcePackage
  474. Returns the resource package with the given *package_name* name.
  475. **destroy_resource_package** (package)
  476. Destroy a previously created resource *package*.
  477. Note that to unload the resources loaded by the package, you have to call
  478. ResourcePackage.unload() first.
  479. **console_send** (table)
  480. Sends the given lua *table* to clients connected to the engine.
  481. Note that the current version only supports explicitly escaped strings as key/value pairs.
  482. **can_get** (type, name) : bool
  483. Returns whether the resource (type, name) is loaded.
  484. When resource autoload is enabled it always returns true.
  485. **enable_resource_autoload** (enable)
  486. Sets whether resources should be automatically loaded when accessed.
  487. DebugLine
  488. =========
  489. **add_line** (debug_line, start, end, color)
  490. Adds a line from *start* to *end* with the given *color*.
  491. **add_sphere** (debug_line, center, radius, color)
  492. Adds a sphere at *center* with the given *radius* and *color*.
  493. **add_obb** (debug_line, tm, extents, color)
  494. Adds an orientd bounding box. *tm* describes the position and orientation of
  495. the box. *extents* describes the size of the box along the axis.
  496. **clear** (debug_line)
  497. Clears all the lines.
  498. **commit** (debug_line)
  499. Sends the lines to renderer for drawing.
  500. Input
  501. =====
  502. Keyboard
  503. --------
  504. **modifier_pressed** (modifier) : bool
  505. Returns whether the specified *modifier* is pressed.
  506. **button_pressed** (button) : bool
  507. Returns whether the specified *b* button is pressed in the current frame.
  508. **button_released** (button) : bool
  509. Returns whether the specified *b* button is released in the current frame.
  510. **any_pressed** () : bool
  511. Returns wheter any button is pressed in the current frame.
  512. **any_released** () : bool
  513. Returns whether any button is released in the current frame.
  514. Mouse
  515. -----
  516. **button_pressed** (button) : bool
  517. Returns whether the *b* button is pressed in the current frame.
  518. **button_released** (button) : bool
  519. Returns whether the *b* button is released in the current frame.
  520. **any_pressed** () : bool
  521. Returns wheter any button is pressed in the current frame.
  522. **any_released** () : bool
  523. DReturns whether any button is released in the current frame.ef
  524. **cursor_xy** () : Vector2
  525. Returns the position of the cursor in window space.
  526. **set_cursor_xy** (position)
  527. Sets the position of the cursor in window space.
  528. **cursor_relative_xy** () : Vector2
  529. Returns the relative position of the cursor in window space.
  530. **set_cursor_relative_xy** (position)
  531. Sets the relative position of the cursor in window space.
  532. **wheel** () : float
  533. Returns the mouse wheel state in the current frame.
  534. A positive or negative value is returned when the wheel is up or down
  535. respectively, 0.0 otherwise.
  536. Touch
  537. -----
  538. **pointer_down** (pointer) : bool
  539. Returns whether the *p* pointer is pressed in the current frame.
  540. **pointer_up** (pointer) : bool
  541. Returns whether the *p* pointer is released in the current frame.
  542. **any_down** () : bool
  543. Returns wheter any pointer is pressed in the current frame.
  544. **any_up** () : bool
  545. Returns whether any pointer is released in the current frame.
  546. **pointer_xy** () : Vector2
  547. Returns the position of the pointer *p* in window space.
  548. Window
  549. ======
  550. **show** ()
  551. Shows the window.
  552. **hide** ()
  553. Hides the window.
  554. **resize** (width, height)
  555. Resizes the window to *width* and *height*.
  556. **move** (x, y)
  557. Moves the window to *x* and *y*.
  558. **minimize** ()
  559. Minimizes the window.
  560. **restore** ()
  561. Restores the window.
  562. **is_resizable** () : bool
  563. Returns whether the window is resizable.
  564. **set_resizable** (resizable)
  565. Sets whether the window is resizable.
  566. **title** () : string
  567. Returns the title of the window.
  568. **set_title** (title)
  569. Sets the title of the window.