@defold-typescript/types 0.52.0 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (521) hide show
  1. package/api-signatures.json +2074 -1964
  2. package/dist/cli-runtime.js +8966 -0
  3. package/dist/identity-vocabulary.json +660 -0
  4. package/dist/src/index.d.ts +18 -0
  5. package/examples/translations.json +15 -15
  6. package/fixtures/defold-1.12.4/b2d_body_doc.json +1327 -0
  7. package/fixtures/defold-1.12.4/b2d_doc.json +107 -0
  8. package/fixtures/defold-1.12.4/base_doc.json +758 -0
  9. package/fixtures/defold-1.12.4/bit_doc.json +404 -0
  10. package/fixtures/defold-1.12.4/buffer_doc.json +422 -0
  11. package/fixtures/defold-1.12.4/camera_doc.json +664 -0
  12. package/fixtures/defold-1.12.4/collectionfactory_doc.json +219 -0
  13. package/fixtures/defold-1.12.4/collectionproxy_doc.json +289 -0
  14. package/fixtures/defold-1.12.4/coroutine_doc.json +151 -0
  15. package/fixtures/defold-1.12.4/crash_doc.json +497 -0
  16. package/fixtures/defold-1.12.4/debug_doc.json +410 -0
  17. package/fixtures/defold-1.12.4/factory_doc.json +219 -0
  18. package/fixtures/defold-1.12.4/font_doc.json +141 -0
  19. package/fixtures/defold-1.12.4/globals_doc.json +42 -0
  20. package/fixtures/defold-1.12.4/go-instance-functions.json +111 -0
  21. package/fixtures/defold-1.12.4/go_doc.json +1901 -0
  22. package/fixtures/defold-1.12.4/graphics_doc.json +1634 -0
  23. package/fixtures/defold-1.12.4/gui_doc.json +5249 -0
  24. package/fixtures/defold-1.12.4/html5_doc.json +64 -0
  25. package/fixtures/defold-1.12.4/http_doc.json +66 -0
  26. package/fixtures/defold-1.12.4/image_doc.json +170 -0
  27. package/fixtures/defold-1.12.4/io_doc.json +399 -0
  28. package/fixtures/defold-1.12.4/json_doc.json +97 -0
  29. package/fixtures/defold-1.12.4/label_doc.json +220 -0
  30. package/fixtures/defold-1.12.4/liveupdate_doc.json +308 -0
  31. package/fixtures/defold-1.12.4/math_doc.json +702 -0
  32. package/fixtures/defold-1.12.4/messages_doc.json +579 -0
  33. package/fixtures/defold-1.12.4/model_doc.json +315 -0
  34. package/fixtures/defold-1.12.4/msg_doc.json +137 -0
  35. package/fixtures/defold-1.12.4/os_doc.json +266 -0
  36. package/fixtures/defold-1.12.4/package_doc.json +139 -0
  37. package/fixtures/defold-1.12.4/particlefx_doc.json +249 -0
  38. package/fixtures/defold-1.12.4/physics_doc.json +1120 -0
  39. package/fixtures/defold-1.12.4/profiler_doc.json +375 -0
  40. package/fixtures/defold-1.12.4/render_doc.json +1167 -0
  41. package/fixtures/defold-1.12.4/resource_doc.json +762 -0
  42. package/fixtures/defold-1.12.4/socket_doc.json +2194 -0
  43. package/fixtures/defold-1.12.4/sound_doc.json +582 -0
  44. package/fixtures/defold-1.12.4/sprite_doc.json +245 -0
  45. package/fixtures/defold-1.12.4/string_doc.json +412 -0
  46. package/fixtures/defold-1.12.4/sys_doc.json +853 -0
  47. package/fixtures/defold-1.12.4/table_doc.json +166 -0
  48. package/fixtures/defold-1.12.4/tilemap_doc.json +374 -0
  49. package/fixtures/defold-1.12.4/timer_doc.json +153 -0
  50. package/fixtures/defold-1.12.4/types_doc.json +212 -0
  51. package/fixtures/defold-1.12.4/vmath_doc.json +1814 -0
  52. package/fixtures/defold-1.12.4/window_doc.json +388 -0
  53. package/fixtures/defold-1.12.4/zlib_doc.json +70 -0
  54. package/fixtures/defold-1.13.0/b2d_body_doc.json +2428 -0
  55. package/fixtures/defold-1.13.0/b2d_chain_doc.json +394 -0
  56. package/fixtures/defold-1.13.0/b2d_doc.json +128 -0
  57. package/fixtures/defold-1.13.0/b2d_fixture_doc.json +594 -0
  58. package/fixtures/defold-1.13.0/b2d_joint_doc.json +3315 -0
  59. package/fixtures/defold-1.13.0/b2d_shape_doc.json +802 -0
  60. package/fixtures/defold-1.13.0/b2d_world_doc.json +1314 -0
  61. package/fixtures/defold-1.13.0/base_doc.json +758 -0
  62. package/fixtures/defold-1.13.0/bit_doc.json +404 -0
  63. package/fixtures/defold-1.13.0/buffer_doc.json +422 -0
  64. package/fixtures/defold-1.13.0/camera_doc.json +900 -0
  65. package/fixtures/defold-1.13.0/collectionfactory_doc.json +219 -0
  66. package/fixtures/defold-1.13.0/collectionproxy_doc.json +289 -0
  67. package/fixtures/defold-1.13.0/compute_doc.json +182 -0
  68. package/fixtures/defold-1.13.0/coroutine_doc.json +151 -0
  69. package/fixtures/defold-1.13.0/crash_doc.json +497 -0
  70. package/fixtures/defold-1.13.0/debug_doc.json +410 -0
  71. package/fixtures/defold-1.13.0/editor_doc.json +3665 -0
  72. package/fixtures/defold-1.13.0/editor_http_doc.json +273 -0
  73. package/fixtures/defold-1.13.0/editor_json_doc.json +59 -0
  74. package/fixtures/defold-1.13.0/editor_localization_doc.json +138 -0
  75. package/fixtures/defold-1.13.0/editor_pprint_doc.json +36 -0
  76. package/fixtures/defold-1.13.0/editor_tilemap_tiles_doc.json +235 -0
  77. package/fixtures/defold-1.13.0/editor_zip_doc.json +163 -0
  78. package/fixtures/defold-1.13.0/editor_zlib_doc.json +48 -0
  79. package/fixtures/defold-1.13.0/factory_doc.json +219 -0
  80. package/fixtures/defold-1.13.0/font_doc.json +141 -0
  81. package/fixtures/defold-1.13.0/globals_doc.json +42 -0
  82. package/fixtures/defold-1.13.0/go-instance-functions.json +101 -0
  83. package/fixtures/defold-1.13.0/go_doc.json +1989 -0
  84. package/fixtures/defold-1.13.0/graphics_doc.json +1886 -0
  85. package/fixtures/defold-1.13.0/gui_doc.json +5277 -0
  86. package/fixtures/defold-1.13.0/html5_doc.json +64 -0
  87. package/fixtures/defold-1.13.0/http_doc.json +66 -0
  88. package/fixtures/defold-1.13.0/image_doc.json +170 -0
  89. package/fixtures/defold-1.13.0/import-manifest.json +10558 -0
  90. package/fixtures/defold-1.13.0/io_doc.json +399 -0
  91. package/fixtures/defold-1.13.0/json_doc.json +97 -0
  92. package/fixtures/defold-1.13.0/label_doc.json +220 -0
  93. package/fixtures/defold-1.13.0/liveupdate_doc.json +330 -0
  94. package/fixtures/defold-1.13.0/material_doc.json +238 -0
  95. package/fixtures/defold-1.13.0/math_doc.json +702 -0
  96. package/fixtures/defold-1.13.0/model_doc.json +412 -0
  97. package/fixtures/defold-1.13.0/msg_doc.json +137 -0
  98. package/fixtures/defold-1.13.0/os_doc.json +266 -0
  99. package/fixtures/defold-1.13.0/package_doc.json +139 -0
  100. package/fixtures/defold-1.13.0/particlefx_doc.json +249 -0
  101. package/fixtures/defold-1.13.0/physics_doc.json +1492 -0
  102. package/fixtures/defold-1.13.0/profiler_doc.json +375 -0
  103. package/fixtures/defold-1.13.0/render_doc.json +1381 -0
  104. package/fixtures/defold-1.13.0/resource_doc.json +762 -0
  105. package/fixtures/defold-1.13.0/socket_doc.json +2194 -0
  106. package/fixtures/defold-1.13.0/sound_doc.json +582 -0
  107. package/fixtures/defold-1.13.0/sprite_doc.json +335 -0
  108. package/fixtures/defold-1.13.0/string_doc.json +412 -0
  109. package/fixtures/defold-1.13.0/sys_doc.json +1142 -0
  110. package/fixtures/defold-1.13.0/table_doc.json +166 -0
  111. package/fixtures/defold-1.13.0/tilemap_doc.json +402 -0
  112. package/fixtures/defold-1.13.0/timer_doc.json +153 -0
  113. package/fixtures/defold-1.13.0/types_doc.json +212 -0
  114. package/fixtures/defold-1.13.0/vmath_doc.json +1814 -0
  115. package/fixtures/defold-1.13.0/window_doc.json +388 -0
  116. package/fixtures/defold-1.13.0/zlib_doc.json +70 -0
  117. package/fixtures/defold-1.13.1/b2d_body_doc.json +2428 -0
  118. package/fixtures/defold-1.13.1/b2d_chain_doc.json +394 -0
  119. package/fixtures/defold-1.13.1/b2d_doc.json +128 -0
  120. package/fixtures/defold-1.13.1/b2d_fixture_doc.json +594 -0
  121. package/fixtures/defold-1.13.1/b2d_joint_doc.json +3315 -0
  122. package/fixtures/defold-1.13.1/b2d_shape_doc.json +802 -0
  123. package/fixtures/defold-1.13.1/b2d_world_doc.json +1314 -0
  124. package/fixtures/defold-1.13.1/base_doc.json +758 -0
  125. package/fixtures/defold-1.13.1/bit_doc.json +404 -0
  126. package/fixtures/defold-1.13.1/buffer_doc.json +422 -0
  127. package/fixtures/defold-1.13.1/camera_doc.json +900 -0
  128. package/fixtures/defold-1.13.1/collectionfactory_doc.json +219 -0
  129. package/fixtures/defold-1.13.1/collectionproxy_doc.json +323 -0
  130. package/fixtures/defold-1.13.1/compute_doc.json +182 -0
  131. package/fixtures/defold-1.13.1/coroutine_doc.json +151 -0
  132. package/fixtures/defold-1.13.1/crash_doc.json +497 -0
  133. package/fixtures/defold-1.13.1/debug_doc.json +410 -0
  134. package/fixtures/defold-1.13.1/editor_doc.json +3880 -0
  135. package/fixtures/defold-1.13.1/editor_http_doc.json +273 -0
  136. package/fixtures/defold-1.13.1/editor_image_doc.json +128 -0
  137. package/fixtures/defold-1.13.1/editor_json_doc.json +59 -0
  138. package/fixtures/defold-1.13.1/editor_localization_doc.json +138 -0
  139. package/fixtures/defold-1.13.1/editor_pprint_doc.json +36 -0
  140. package/fixtures/defold-1.13.1/editor_tilemap_tiles_doc.json +235 -0
  141. package/fixtures/defold-1.13.1/editor_zip_doc.json +163 -0
  142. package/fixtures/defold-1.13.1/editor_zlib_doc.json +48 -0
  143. package/fixtures/defold-1.13.1/factory_doc.json +219 -0
  144. package/fixtures/defold-1.13.1/font_doc.json +141 -0
  145. package/fixtures/defold-1.13.1/globals_doc.json +42 -0
  146. package/fixtures/defold-1.13.1/go-instance-functions.json +102 -0
  147. package/fixtures/defold-1.13.1/go_doc.json +1989 -0
  148. package/fixtures/defold-1.13.1/graphics_doc.json +1886 -0
  149. package/fixtures/defold-1.13.1/gui_doc.json +5277 -0
  150. package/fixtures/defold-1.13.1/html5_doc.json +64 -0
  151. package/fixtures/defold-1.13.1/http_doc.json +66 -0
  152. package/fixtures/defold-1.13.1/image_doc.json +170 -0
  153. package/fixtures/defold-1.13.1/import-manifest.json +10091 -0
  154. package/fixtures/defold-1.13.1/io_doc.json +399 -0
  155. package/fixtures/defold-1.13.1/json_doc.json +97 -0
  156. package/fixtures/defold-1.13.1/label_doc.json +220 -0
  157. package/fixtures/defold-1.13.1/liveupdate_doc.json +330 -0
  158. package/fixtures/defold-1.13.1/material_doc.json +238 -0
  159. package/fixtures/defold-1.13.1/math_doc.json +702 -0
  160. package/fixtures/defold-1.13.1/model_doc.json +412 -0
  161. package/fixtures/defold-1.13.1/msg_doc.json +137 -0
  162. package/fixtures/defold-1.13.1/os_doc.json +266 -0
  163. package/fixtures/defold-1.13.1/package_doc.json +139 -0
  164. package/fixtures/defold-1.13.1/particlefx_doc.json +249 -0
  165. package/fixtures/defold-1.13.1/physics_doc.json +1492 -0
  166. package/fixtures/defold-1.13.1/profiler_doc.json +375 -0
  167. package/fixtures/defold-1.13.1/render_doc.json +1381 -0
  168. package/fixtures/defold-1.13.1/resource_doc.json +762 -0
  169. package/fixtures/defold-1.13.1/socket_doc.json +2194 -0
  170. package/fixtures/defold-1.13.1/sound_doc.json +582 -0
  171. package/fixtures/defold-1.13.1/sprite_doc.json +335 -0
  172. package/fixtures/defold-1.13.1/string_doc.json +412 -0
  173. package/fixtures/defold-1.13.1/sys_doc.json +1142 -0
  174. package/fixtures/defold-1.13.1/table_doc.json +166 -0
  175. package/fixtures/defold-1.13.1/tilemap_doc.json +402 -0
  176. package/fixtures/defold-1.13.1/timer_doc.json +153 -0
  177. package/fixtures/defold-1.13.1/types_doc.json +212 -0
  178. package/fixtures/defold-1.13.1/vmath_doc.json +1814 -0
  179. package/fixtures/defold-1.13.1/window_doc.json +388 -0
  180. package/fixtures/defold-1.13.1/zlib_doc.json +70 -0
  181. package/fixtures/defold-1.13.2/b2d_body_doc.json +2359 -0
  182. package/fixtures/defold-1.13.2/b2d_chain_doc.json +395 -0
  183. package/fixtures/defold-1.13.2/b2d_doc.json +1945 -0
  184. package/fixtures/defold-1.13.2/b2d_fixture_doc.json +595 -0
  185. package/fixtures/defold-1.13.2/b2d_joint_doc.json +3178 -0
  186. package/fixtures/defold-1.13.2/b2d_shape_doc.json +767 -0
  187. package/fixtures/defold-1.13.2/b2d_world_doc.json +1315 -0
  188. package/fixtures/defold-1.13.2/base_doc.json +759 -0
  189. package/fixtures/defold-1.13.2/bit_doc.json +405 -0
  190. package/fixtures/defold-1.13.2/buffer_doc.json +393 -0
  191. package/fixtures/defold-1.13.2/bullet3d_collision_object_doc.json +1206 -0
  192. package/fixtures/defold-1.13.2/bullet3d_constraint_doc.json +2455 -0
  193. package/fixtures/defold-1.13.2/bullet3d_doc.json +215 -0
  194. package/fixtures/defold-1.13.2/bullet3d_rigid_body_doc.json +1376 -0
  195. package/fixtures/defold-1.13.2/bullet3d_shape_doc.json +430 -0
  196. package/fixtures/defold-1.13.2/bullet3d_world_doc.json +855 -0
  197. package/fixtures/defold-1.13.2/camera_doc.json +887 -0
  198. package/fixtures/defold-1.13.2/collectionfactory_doc.json +206 -0
  199. package/fixtures/defold-1.13.2/collectionproxy_doc.json +397 -0
  200. package/fixtures/defold-1.13.2/compute_doc.json +183 -0
  201. package/fixtures/defold-1.13.2/coroutine_doc.json +152 -0
  202. package/fixtures/defold-1.13.2/crash_doc.json +483 -0
  203. package/fixtures/defold-1.13.2/debug_doc.json +411 -0
  204. package/fixtures/defold-1.13.2/editor_doc.json +6320 -0
  205. package/fixtures/defold-1.13.2/editor_http_doc.json +476 -0
  206. package/fixtures/defold-1.13.2/editor_image_doc.json +129 -0
  207. package/fixtures/defold-1.13.2/editor_json_doc.json +81 -0
  208. package/fixtures/defold-1.13.2/editor_localization_doc.json +139 -0
  209. package/fixtures/defold-1.13.2/editor_pprint_doc.json +37 -0
  210. package/fixtures/defold-1.13.2/editor_tilemap_tiles_doc.json +292 -0
  211. package/fixtures/defold-1.13.2/editor_zip_doc.json +237 -0
  212. package/fixtures/defold-1.13.2/editor_zlib_doc.json +49 -0
  213. package/fixtures/defold-1.13.2/factory_doc.json +206 -0
  214. package/fixtures/defold-1.13.2/font_doc.json +230 -0
  215. package/fixtures/defold-1.13.2/globals_doc.json +64 -0
  216. package/fixtures/defold-1.13.2/go-instance-functions.json +106 -0
  217. package/fixtures/defold-1.13.2/go_doc.json +1789 -0
  218. package/fixtures/defold-1.13.2/graphics_doc.json +1211 -0
  219. package/fixtures/defold-1.13.2/gui_doc.json +4735 -0
  220. package/fixtures/defold-1.13.2/html5_doc.json +65 -0
  221. package/fixtures/defold-1.13.2/http_doc.json +174 -0
  222. package/fixtures/defold-1.13.2/image_doc.json +298 -0
  223. package/fixtures/defold-1.13.2/import-manifest.json +10902 -0
  224. package/fixtures/defold-1.13.2/io_doc.json +400 -0
  225. package/fixtures/defold-1.13.2/json_doc.json +140 -0
  226. package/fixtures/defold-1.13.2/label_doc.json +427 -0
  227. package/fixtures/defold-1.13.2/liveupdate_doc.json +221 -0
  228. package/fixtures/defold-1.13.2/material_doc.json +773 -0
  229. package/fixtures/defold-1.13.2/math_doc.json +703 -0
  230. package/fixtures/defold-1.13.2/model_doc.json +472 -0
  231. package/fixtures/defold-1.13.2/msg_doc.json +169 -0
  232. package/fixtures/defold-1.13.2/os_doc.json +269 -0
  233. package/fixtures/defold-1.13.2/package_doc.json +140 -0
  234. package/fixtures/defold-1.13.2/particlefx_doc.json +249 -0
  235. package/fixtures/defold-1.13.2/physics_doc.json +1624 -0
  236. package/fixtures/defold-1.13.2/profiler_doc.json +348 -0
  237. package/fixtures/defold-1.13.2/render_doc.json +1623 -0
  238. package/fixtures/defold-1.13.2/resource_doc.json +1539 -0
  239. package/fixtures/defold-1.13.2/socket_doc.json +2335 -0
  240. package/fixtures/defold-1.13.2/sound_doc.json +673 -0
  241. package/fixtures/defold-1.13.2/sprite_doc.json +364 -0
  242. package/fixtures/defold-1.13.2/string_doc.json +413 -0
  243. package/fixtures/defold-1.13.2/sys_doc.json +1347 -0
  244. package/fixtures/defold-1.13.2/table_doc.json +167 -0
  245. package/fixtures/defold-1.13.2/tilemap_doc.json +369 -0
  246. package/fixtures/defold-1.13.2/timer_doc.json +214 -0
  247. package/fixtures/defold-1.13.2/types_doc.json +213 -0
  248. package/fixtures/defold-1.13.2/vmath_doc.json +2056 -0
  249. package/fixtures/defold-1.13.2/window_doc.json +426 -0
  250. package/fixtures/defold-1.13.2/zlib_doc.json +71 -0
  251. package/fixtures/defold-1.14.0/b2d_body_doc.json +2359 -0
  252. package/fixtures/defold-1.14.0/b2d_chain_doc.json +395 -0
  253. package/fixtures/defold-1.14.0/b2d_doc.json +1973 -0
  254. package/fixtures/defold-1.14.0/b2d_fixture_doc.json +595 -0
  255. package/fixtures/defold-1.14.0/b2d_joint_doc.json +3178 -0
  256. package/fixtures/defold-1.14.0/b2d_shape_doc.json +767 -0
  257. package/fixtures/defold-1.14.0/b2d_world_doc.json +1315 -0
  258. package/fixtures/defold-1.14.0/base_doc.json +759 -0
  259. package/fixtures/defold-1.14.0/bit_doc.json +405 -0
  260. package/fixtures/defold-1.14.0/buffer_doc.json +393 -0
  261. package/fixtures/defold-1.14.0/bullet3d_collision_object_doc.json +1206 -0
  262. package/fixtures/defold-1.14.0/bullet3d_constraint_doc.json +2455 -0
  263. package/fixtures/defold-1.14.0/bullet3d_doc.json +243 -0
  264. package/fixtures/defold-1.14.0/bullet3d_rigid_body_doc.json +1376 -0
  265. package/fixtures/defold-1.14.0/bullet3d_shape_doc.json +430 -0
  266. package/fixtures/defold-1.14.0/bullet3d_world_doc.json +855 -0
  267. package/fixtures/defold-1.14.0/camera_doc.json +887 -0
  268. package/fixtures/defold-1.14.0/collectionfactory_doc.json +206 -0
  269. package/fixtures/defold-1.14.0/collectionproxy_doc.json +397 -0
  270. package/fixtures/defold-1.14.0/compute_doc.json +183 -0
  271. package/fixtures/defold-1.14.0/coroutine_doc.json +152 -0
  272. package/fixtures/defold-1.14.0/crash_doc.json +483 -0
  273. package/fixtures/defold-1.14.0/debug_doc.json +411 -0
  274. package/fixtures/defold-1.14.0/editor_doc.json +6320 -0
  275. package/fixtures/defold-1.14.0/editor_http_doc.json +476 -0
  276. package/fixtures/defold-1.14.0/editor_image_doc.json +129 -0
  277. package/fixtures/defold-1.14.0/editor_json_doc.json +81 -0
  278. package/fixtures/defold-1.14.0/editor_localization_doc.json +139 -0
  279. package/fixtures/defold-1.14.0/editor_pprint_doc.json +37 -0
  280. package/fixtures/defold-1.14.0/editor_tilemap_tiles_doc.json +292 -0
  281. package/fixtures/defold-1.14.0/editor_zip_doc.json +237 -0
  282. package/fixtures/defold-1.14.0/editor_zlib_doc.json +49 -0
  283. package/fixtures/defold-1.14.0/factory_doc.json +206 -0
  284. package/fixtures/defold-1.14.0/font_doc.json +230 -0
  285. package/fixtures/defold-1.14.0/globals_doc.json +64 -0
  286. package/fixtures/defold-1.14.0/go-instance-functions.json +106 -0
  287. package/fixtures/defold-1.14.0/go_doc.json +1789 -0
  288. package/fixtures/defold-1.14.0/graphics_doc.json +1257 -0
  289. package/fixtures/defold-1.14.0/gui_doc.json +4735 -0
  290. package/fixtures/defold-1.14.0/html5_doc.json +65 -0
  291. package/fixtures/defold-1.14.0/http_doc.json +174 -0
  292. package/fixtures/defold-1.14.0/image_doc.json +298 -0
  293. package/fixtures/defold-1.14.0/import-manifest.json +10260 -0
  294. package/fixtures/defold-1.14.0/io_doc.json +400 -0
  295. package/fixtures/defold-1.14.0/json_doc.json +140 -0
  296. package/fixtures/defold-1.14.0/label_doc.json +427 -0
  297. package/fixtures/defold-1.14.0/liveupdate_doc.json +221 -0
  298. package/fixtures/defold-1.14.0/material_doc.json +773 -0
  299. package/fixtures/defold-1.14.0/math_doc.json +703 -0
  300. package/fixtures/defold-1.14.0/model_doc.json +472 -0
  301. package/fixtures/defold-1.14.0/msg_doc.json +169 -0
  302. package/fixtures/defold-1.14.0/os_doc.json +269 -0
  303. package/fixtures/defold-1.14.0/package_doc.json +140 -0
  304. package/fixtures/defold-1.14.0/particlefx_doc.json +249 -0
  305. package/fixtures/defold-1.14.0/physics_doc.json +1624 -0
  306. package/fixtures/defold-1.14.0/profiler_doc.json +348 -0
  307. package/fixtures/defold-1.14.0/render_doc.json +1628 -0
  308. package/fixtures/defold-1.14.0/resource_doc.json +1539 -0
  309. package/fixtures/defold-1.14.0/socket_doc.json +2335 -0
  310. package/fixtures/defold-1.14.0/sound_doc.json +673 -0
  311. package/fixtures/defold-1.14.0/sprite_doc.json +364 -0
  312. package/fixtures/defold-1.14.0/string_doc.json +413 -0
  313. package/fixtures/defold-1.14.0/sys_doc.json +1347 -0
  314. package/fixtures/defold-1.14.0/table_doc.json +167 -0
  315. package/fixtures/defold-1.14.0/tilemap_doc.json +369 -0
  316. package/fixtures/defold-1.14.0/timer_doc.json +214 -0
  317. package/fixtures/defold-1.14.0/types_doc.json +213 -0
  318. package/fixtures/defold-1.14.0/vmath_doc.json +2056 -0
  319. package/fixtures/defold-1.14.0/window_doc.json +426 -0
  320. package/fixtures/defold-1.14.0/zlib_doc.json +71 -0
  321. package/generated/b2d.d.ts +39 -39
  322. package/generated/b2d_body.d.ts +11 -11
  323. package/generated/b2d_chain.d.ts +3 -3
  324. package/generated/b2d_fixture.d.ts +5 -5
  325. package/generated/b2d_joint.d.ts +29 -29
  326. package/generated/b2d_shape.d.ts +13 -13
  327. package/generated/b2d_world.d.ts +15 -15
  328. package/generated/buffer.d.ts +5 -6
  329. package/generated/bullet3d.d.ts +6 -6
  330. package/generated/bullet3d_collision_object.d.ts +9 -9
  331. package/generated/bullet3d_constraint.d.ts +78 -78
  332. package/generated/bullet3d_rigid_body.d.ts +3 -3
  333. package/generated/bullet3d_shape.d.ts +11 -11
  334. package/generated/bullet3d_world.d.ts +20 -20
  335. package/generated/camera.d.ts +4 -4
  336. package/generated/collectionfactory.d.ts +2 -3
  337. package/generated/collectionproxy.d.ts +5 -5
  338. package/generated/compute.d.ts +5 -5
  339. package/generated/crash.d.ts +7 -7
  340. package/generated/editor-vm/http.d.ts +13 -13
  341. package/generated/editor-vm/image.d.ts +4 -4
  342. package/generated/editor-vm/json.d.ts +1 -1
  343. package/generated/editor-vm/tilemap_tiles.d.ts +9 -9
  344. package/generated/editor-vm/zip.d.ts +4 -4
  345. package/generated/editor.d.ts +183 -183
  346. package/generated/factory.d.ts +2 -3
  347. package/generated/font.d.ts +4 -4
  348. package/generated/go.d.ts +10 -12
  349. package/generated/graphics.d.ts +23 -26
  350. package/generated/gui.d.ts +44 -58
  351. package/generated/http.d.ts +2 -2
  352. package/generated/image.d.ts +12 -12
  353. package/generated/json.d.ts +4 -4
  354. package/generated/label.d.ts +5 -5
  355. package/generated/liveupdate.d.ts +3 -3
  356. package/generated/material.d.ts +48 -48
  357. package/generated/model.d.ts +46 -14
  358. package/generated/particlefx.d.ts +5 -5
  359. package/generated/physics.d.ts +19 -19
  360. package/generated/profiler.d.ts +3 -5
  361. package/generated/render-script-modules/b2d.d.ts +39 -39
  362. package/generated/render-script-modules/bullet3d.d.ts +5 -5
  363. package/generated/render-script-modules/collectionfactory.d.ts +1 -2
  364. package/generated/render-script-modules/collectionproxy.d.ts +3 -3
  365. package/generated/render-script-modules/factory.d.ts +1 -2
  366. package/generated/render-script-modules/go.d.ts +8 -10
  367. package/generated/render-script-modules/label.d.ts +2 -2
  368. package/generated/render-script-modules/model.d.ts +43 -11
  369. package/generated/render-script-modules/particlefx.d.ts +3 -3
  370. package/generated/render-script-modules/physics.d.ts +12 -12
  371. package/generated/render-script-modules/resource.d.ts +52 -53
  372. package/generated/render-script-modules/sound.d.ts +4 -4
  373. package/generated/render-script-modules/sprite.d.ts +2 -2
  374. package/generated/render-script-modules/tilemap.d.ts +2 -2
  375. package/generated/render.d.ts +44 -45
  376. package/generated/resource.d.ts +58 -59
  377. package/generated/socket.d.ts +18 -23
  378. package/generated/sound.d.ts +6 -6
  379. package/generated/sprite.d.ts +3 -3
  380. package/generated/sys.d.ts +20 -21
  381. package/generated/tilemap.d.ts +3 -3
  382. package/generated/timer.d.ts +3 -3
  383. package/generated/versions/defold-1.12.4/b2d.d.ts +2 -2
  384. package/generated/versions/defold-1.12.4/b2d_body.d.ts +2 -2
  385. package/generated/versions/defold-1.12.4/go.d.ts +2 -2
  386. package/generated/versions/defold-1.12.4/graphics.d.ts +1 -1
  387. package/generated/versions/defold-1.12.4/gui.d.ts +18 -19
  388. package/generated/versions/defold-1.12.4/label.d.ts +1 -1
  389. package/generated/versions/defold-1.12.4/model.d.ts +42 -10
  390. package/generated/versions/defold-1.12.4/particlefx.d.ts +1 -1
  391. package/generated/versions/defold-1.12.4/physics.d.ts +1 -1
  392. package/generated/versions/defold-1.12.4/render.d.ts +5 -5
  393. package/generated/versions/defold-1.12.4/resource.d.ts +8 -8
  394. package/generated/versions/defold-1.12.4/socket.d.ts +12 -12
  395. package/generated/versions/defold-1.12.4/sound.d.ts +1 -1
  396. package/generated/versions/defold-1.12.4/sprite.d.ts +1 -1
  397. package/generated/versions/defold-1.12.4/sys.d.ts +2 -2
  398. package/generated/versions/defold-1.12.4/tilemap.d.ts +1 -1
  399. package/generated/versions/defold-1.12.4/window.d.ts +3 -4
  400. package/generated/versions/defold-1.13.0/b2d.d.ts +2 -2
  401. package/generated/versions/defold-1.13.0/b2d_body.d.ts +2 -2
  402. package/generated/versions/defold-1.13.0/b2d_chain.d.ts +1 -1
  403. package/generated/versions/defold-1.13.0/b2d_joint.d.ts +1 -1
  404. package/generated/versions/defold-1.13.0/b2d_shape.d.ts +1 -1
  405. package/generated/versions/defold-1.13.0/camera.d.ts +1 -1
  406. package/generated/versions/defold-1.13.0/go.d.ts +2 -2
  407. package/generated/versions/defold-1.13.0/graphics.d.ts +1 -1
  408. package/generated/versions/defold-1.13.0/gui.d.ts +18 -19
  409. package/generated/versions/defold-1.13.0/label.d.ts +1 -1
  410. package/generated/versions/defold-1.13.0/model.d.ts +42 -10
  411. package/generated/versions/defold-1.13.0/particlefx.d.ts +1 -1
  412. package/generated/versions/defold-1.13.0/physics.d.ts +1 -1
  413. package/generated/versions/defold-1.13.0/render.d.ts +5 -5
  414. package/generated/versions/defold-1.13.0/resource.d.ts +8 -8
  415. package/generated/versions/defold-1.13.0/socket.d.ts +12 -12
  416. package/generated/versions/defold-1.13.0/sound.d.ts +1 -1
  417. package/generated/versions/defold-1.13.0/sprite.d.ts +1 -1
  418. package/generated/versions/defold-1.13.0/sys.d.ts +2 -2
  419. package/generated/versions/defold-1.13.0/tilemap.d.ts +1 -1
  420. package/generated/versions/defold-1.13.0/window.d.ts +3 -4
  421. package/generated/versions/defold-1.13.1/b2d.d.ts +2 -2
  422. package/generated/versions/defold-1.13.1/b2d_body.d.ts +2 -2
  423. package/generated/versions/defold-1.13.1/b2d_chain.d.ts +1 -1
  424. package/generated/versions/defold-1.13.1/b2d_joint.d.ts +1 -1
  425. package/generated/versions/defold-1.13.1/b2d_shape.d.ts +1 -1
  426. package/generated/versions/defold-1.13.1/camera.d.ts +1 -1
  427. package/generated/versions/defold-1.13.1/go.d.ts +2 -2
  428. package/generated/versions/defold-1.13.1/graphics.d.ts +1 -1
  429. package/generated/versions/defold-1.13.1/gui.d.ts +18 -19
  430. package/generated/versions/defold-1.13.1/label.d.ts +1 -1
  431. package/generated/versions/defold-1.13.1/model.d.ts +42 -10
  432. package/generated/versions/defold-1.13.1/particlefx.d.ts +1 -1
  433. package/generated/versions/defold-1.13.1/physics.d.ts +1 -1
  434. package/generated/versions/defold-1.13.1/render.d.ts +5 -5
  435. package/generated/versions/defold-1.13.1/resource.d.ts +8 -8
  436. package/generated/versions/defold-1.13.1/socket.d.ts +12 -12
  437. package/generated/versions/defold-1.13.1/sound.d.ts +1 -1
  438. package/generated/versions/defold-1.13.1/sprite.d.ts +1 -1
  439. package/generated/versions/defold-1.13.1/sys.d.ts +2 -2
  440. package/generated/versions/defold-1.13.1/tilemap.d.ts +1 -1
  441. package/generated/versions/defold-1.13.1/window.d.ts +3 -4
  442. package/generated/versions/defold-1.13.2/b2d.d.ts +39 -39
  443. package/generated/versions/defold-1.13.2/b2d_body.d.ts +11 -11
  444. package/generated/versions/defold-1.13.2/b2d_chain.d.ts +3 -3
  445. package/generated/versions/defold-1.13.2/b2d_fixture.d.ts +5 -5
  446. package/generated/versions/defold-1.13.2/b2d_joint.d.ts +29 -29
  447. package/generated/versions/defold-1.13.2/b2d_shape.d.ts +13 -13
  448. package/generated/versions/defold-1.13.2/b2d_world.d.ts +15 -15
  449. package/generated/versions/defold-1.13.2/buffer.d.ts +5 -6
  450. package/generated/versions/defold-1.13.2/bullet3d.d.ts +6 -6
  451. package/generated/versions/defold-1.13.2/bullet3d_collision_object.d.ts +9 -9
  452. package/generated/versions/defold-1.13.2/bullet3d_constraint.d.ts +78 -78
  453. package/generated/versions/defold-1.13.2/bullet3d_rigid_body.d.ts +3 -3
  454. package/generated/versions/defold-1.13.2/bullet3d_shape.d.ts +11 -11
  455. package/generated/versions/defold-1.13.2/bullet3d_world.d.ts +20 -20
  456. package/generated/versions/defold-1.13.2/camera.d.ts +4 -4
  457. package/generated/versions/defold-1.13.2/collectionfactory.d.ts +2 -3
  458. package/generated/versions/defold-1.13.2/collectionproxy.d.ts +5 -5
  459. package/generated/versions/defold-1.13.2/compute.d.ts +5 -5
  460. package/generated/versions/defold-1.13.2/crash.d.ts +7 -7
  461. package/generated/versions/defold-1.13.2/editor-vm/http.d.ts +13 -13
  462. package/generated/versions/defold-1.13.2/editor-vm/image.d.ts +4 -4
  463. package/generated/versions/defold-1.13.2/editor-vm/json.d.ts +1 -1
  464. package/generated/versions/defold-1.13.2/editor-vm/tilemap_tiles.d.ts +9 -9
  465. package/generated/versions/defold-1.13.2/editor-vm/zip.d.ts +4 -4
  466. package/generated/versions/defold-1.13.2/editor.d.ts +183 -183
  467. package/generated/versions/defold-1.13.2/factory.d.ts +2 -3
  468. package/generated/versions/defold-1.13.2/font.d.ts +4 -4
  469. package/generated/versions/defold-1.13.2/go.d.ts +10 -12
  470. package/generated/versions/defold-1.13.2/graphics.d.ts +22 -25
  471. package/generated/versions/defold-1.13.2/gui.d.ts +44 -58
  472. package/generated/versions/defold-1.13.2/http.d.ts +2 -2
  473. package/generated/versions/defold-1.13.2/image.d.ts +12 -12
  474. package/generated/versions/defold-1.13.2/json.d.ts +4 -4
  475. package/generated/versions/defold-1.13.2/label.d.ts +5 -5
  476. package/generated/versions/defold-1.13.2/liveupdate.d.ts +3 -3
  477. package/generated/versions/defold-1.13.2/material.d.ts +48 -48
  478. package/generated/versions/defold-1.13.2/model.d.ts +46 -14
  479. package/generated/versions/defold-1.13.2/particlefx.d.ts +5 -5
  480. package/generated/versions/defold-1.13.2/physics.d.ts +19 -19
  481. package/generated/versions/defold-1.13.2/profiler.d.ts +3 -5
  482. package/generated/versions/defold-1.13.2/render.d.ts +43 -44
  483. package/generated/versions/defold-1.13.2/resource.d.ts +58 -59
  484. package/generated/versions/defold-1.13.2/socket.d.ts +18 -23
  485. package/generated/versions/defold-1.13.2/sound.d.ts +6 -6
  486. package/generated/versions/defold-1.13.2/sprite.d.ts +3 -3
  487. package/generated/versions/defold-1.13.2/sys.d.ts +20 -21
  488. package/generated/versions/defold-1.13.2/tilemap.d.ts +3 -3
  489. package/generated/versions/defold-1.13.2/timer.d.ts +3 -3
  490. package/generated/versions/defold-1.13.2/vmath.d.ts +0 -1
  491. package/generated/versions/defold-1.13.2/window.d.ts +8 -10
  492. package/generated/vmath.d.ts +0 -1
  493. package/generated/window.d.ts +8 -10
  494. package/identity-vocabulary.json +41 -34
  495. package/package.json +13 -5
  496. package/scripts/cli-runtime.ts +18 -0
  497. package/scripts/example-store-io.ts +2 -2
  498. package/scripts/extension-goldens.ts +9 -5
  499. package/scripts/generate-api-availability.ts +10 -4
  500. package/scripts/generate-api-signatures.ts +1 -1
  501. package/scripts/import-defold-release.ts +1 -1
  502. package/scripts/regen.ts +35 -9
  503. package/scripts/shared-handle-methods.ts +3 -2
  504. package/scripts/signature-store-fs.ts +37 -17
  505. package/scripts/sync-api-docs.ts +127 -20
  506. package/src/api-doc.ts +19 -4
  507. package/src/api-identity.ts +32 -1
  508. package/src/component-properties.d.ts +8 -8
  509. package/src/core-types.ts +29 -13
  510. package/src/doc-corrections.ts +9 -0
  511. package/src/emit-dts.ts +770 -214
  512. package/src/engine-type-name.ts +33 -0
  513. package/src/go-overloads.d.ts +10 -10
  514. package/src/gui-overloads.d.ts +11 -11
  515. package/src/index-slot-classifications.ts +75 -9
  516. package/src/index.ts +4 -1
  517. package/src/lifecycle.ts +2 -2
  518. package/src/publish-dts.ts +16 -0
  519. package/src/script-api.ts +36 -38
  520. package/src/socket-types.d.ts +3 -3
  521. package/src/library-index-slot-classifications.ts +0 -332
@@ -0,0 +1,1120 @@
1
+ {
2
+ "elements": [
3
+ {
4
+ "type": "CONSTANT",
5
+ "name": "physics.JOINT_TYPE_SPRING",
6
+ "brief": "spring joint type",
7
+ "description": "The following properties are available when connecting a joint of <code>JOINT_TYPE_SPRING</code> type:",
8
+ "returnvalues": [],
9
+ "parameters": [
10
+ {
11
+ "name": "length",
12
+ "doc": "The natural length between the anchor points.",
13
+ "types": ["number"],
14
+ "is_optional": "False"
15
+ },
16
+ {
17
+ "name": "frequency",
18
+ "doc": "The mass-spring-damper frequency in Hertz. A value of 0 disables softness.",
19
+ "types": ["number"],
20
+ "is_optional": "False"
21
+ },
22
+ {
23
+ "name": "damping",
24
+ "doc": "The damping ratio. 0 = no damping, 1 = critical damping.",
25
+ "types": ["number"],
26
+ "is_optional": "False"
27
+ }
28
+ ],
29
+ "examples": "",
30
+ "replaces": "",
31
+ "error": "",
32
+ "tparams": [],
33
+ "members": [],
34
+ "notes": [],
35
+ "language": ""
36
+ },
37
+ {
38
+ "type": "CONSTANT",
39
+ "name": "physics.JOINT_TYPE_FIXED",
40
+ "brief": "fixed joint type",
41
+ "description": "The following properties are available when connecting a joint of <code>JOINT_TYPE_FIXED</code> type:",
42
+ "returnvalues": [],
43
+ "parameters": [
44
+ {
45
+ "name": "max_length",
46
+ "doc": "The maximum length of the rope.",
47
+ "types": ["number"],
48
+ "is_optional": "False"
49
+ }
50
+ ],
51
+ "examples": "",
52
+ "replaces": "",
53
+ "error": "",
54
+ "tparams": [],
55
+ "members": [],
56
+ "notes": [],
57
+ "language": ""
58
+ },
59
+ {
60
+ "type": "CONSTANT",
61
+ "name": "physics.JOINT_TYPE_HINGE",
62
+ "brief": "hinge joint type",
63
+ "description": "The following properties are available when connecting a joint of <code>JOINT_TYPE_HINGE</code> type:",
64
+ "returnvalues": [],
65
+ "parameters": [
66
+ {
67
+ "name": "reference_angle",
68
+ "doc": "The bodyB angle minus bodyA angle in the reference state (radians).",
69
+ "types": ["number"],
70
+ "is_optional": "False"
71
+ },
72
+ {
73
+ "name": "lower_angle",
74
+ "doc": "The lower angle for the joint limit (radians).",
75
+ "types": ["number"],
76
+ "is_optional": "False"
77
+ },
78
+ {
79
+ "name": "upper_angle",
80
+ "doc": "The upper angle for the joint limit (radians).",
81
+ "types": ["number"],
82
+ "is_optional": "False"
83
+ },
84
+ {
85
+ "name": "max_motor_torque",
86
+ "doc": "The maximum motor torque used to achieve the desired motor speed. Usually in N-m.",
87
+ "types": ["number"],
88
+ "is_optional": "False"
89
+ },
90
+ {
91
+ "name": "motor_speed",
92
+ "doc": "The desired motor speed. Usually in radians per second.",
93
+ "types": ["number"],
94
+ "is_optional": "False"
95
+ },
96
+ {
97
+ "name": "enable_limit",
98
+ "doc": "A flag to enable joint limits.",
99
+ "types": ["boolean"],
100
+ "is_optional": "False"
101
+ },
102
+ {
103
+ "name": "enable_motor",
104
+ "doc": "A flag to enable the joint motor.",
105
+ "types": ["boolean"],
106
+ "is_optional": "False"
107
+ },
108
+ {
109
+ "name": "joint_angle",
110
+ "doc": "<span class=\"mark\">READ ONLY</span>Current joint angle in radians.\n(Read only field, available from <code>physics.get_joint_properties()</code>)",
111
+ "types": ["number"],
112
+ "is_optional": "False"
113
+ },
114
+ {
115
+ "name": "joint_speed",
116
+ "doc": "<span class=\"mark\">READ ONLY</span>Current joint angle speed in radians per second.\n(Read only field, available from <code>physics.get_joint_properties()</code>)",
117
+ "types": ["number"],
118
+ "is_optional": "False"
119
+ }
120
+ ],
121
+ "examples": "",
122
+ "replaces": "",
123
+ "error": "",
124
+ "tparams": [],
125
+ "members": [],
126
+ "notes": [],
127
+ "language": ""
128
+ },
129
+ {
130
+ "type": "CONSTANT",
131
+ "name": "physics.JOINT_TYPE_SLIDER",
132
+ "brief": "slider joint type",
133
+ "description": "The following properties are available when connecting a joint of <code>JOINT_TYPE_SLIDER</code> type:",
134
+ "returnvalues": [],
135
+ "parameters": [
136
+ {
137
+ "name": "local_axis_a",
138
+ "doc": "The local translation unit axis in bodyA.",
139
+ "types": ["vector3"],
140
+ "is_optional": "False"
141
+ },
142
+ {
143
+ "name": "reference_angle",
144
+ "doc": "The constrained angle between the bodies: bodyB_angle - bodyA_angle.",
145
+ "types": ["number"],
146
+ "is_optional": "False"
147
+ },
148
+ {
149
+ "name": "enable_limit",
150
+ "doc": "Enable/disable the joint limit.",
151
+ "types": ["boolean"],
152
+ "is_optional": "False"
153
+ },
154
+ {
155
+ "name": "lower_translation",
156
+ "doc": "The lower translation limit, usually in meters.",
157
+ "types": ["number"],
158
+ "is_optional": "False"
159
+ },
160
+ {
161
+ "name": "upper_translation",
162
+ "doc": "The upper translation limit, usually in meters.",
163
+ "types": ["number"],
164
+ "is_optional": "False"
165
+ },
166
+ {
167
+ "name": "enable_motor",
168
+ "doc": "Enable/disable the joint motor.",
169
+ "types": ["boolean"],
170
+ "is_optional": "False"
171
+ },
172
+ {
173
+ "name": "max_motor_force",
174
+ "doc": "The maximum motor torque, usually in N-m.",
175
+ "types": ["number"],
176
+ "is_optional": "False"
177
+ },
178
+ {
179
+ "name": "motor_speed",
180
+ "doc": "The desired motor speed in radians per second.",
181
+ "types": ["number"],
182
+ "is_optional": "False"
183
+ },
184
+ {
185
+ "name": "joint_translation",
186
+ "doc": "<span class=\"mark\">READ ONLY</span>Current joint translation, usually in meters.\n(Read only field, available from <code>physics.get_joint_properties()</code>)",
187
+ "types": ["number"],
188
+ "is_optional": "False"
189
+ },
190
+ {
191
+ "name": "joint_speed",
192
+ "doc": "<span class=\"mark\">READ ONLY</span>Current joint translation speed, usually in meters per second.\n(Read only field, available from <code>physics.get_joint_properties()</code>)",
193
+ "types": ["number"],
194
+ "is_optional": "False"
195
+ }
196
+ ],
197
+ "examples": "",
198
+ "replaces": "",
199
+ "error": "",
200
+ "tparams": [],
201
+ "members": [],
202
+ "notes": [],
203
+ "language": ""
204
+ },
205
+ {
206
+ "type": "CONSTANT",
207
+ "name": "physics.JOINT_TYPE_WELD",
208
+ "brief": "weld joint type",
209
+ "description": "The following properties are available when connecting a joint of <code>JOINT_TYPE_WELD</code> type:",
210
+ "returnvalues": [],
211
+ "parameters": [
212
+ {
213
+ "name": "reference_angle",
214
+ "doc": "<span class=\"mark\">READ ONLY</span>The bodyB angle minus bodyA angle in the reference state (radians).",
215
+ "types": ["number"],
216
+ "is_optional": "False"
217
+ },
218
+ {
219
+ "name": "frequency",
220
+ "doc": "The mass-spring-damper frequency in Hertz. Rotation only. Disable softness with a value of 0.",
221
+ "types": ["number"],
222
+ "is_optional": "False"
223
+ },
224
+ {
225
+ "name": "damping",
226
+ "doc": "The damping ratio. 0 = no damping, 1 = critical damping.",
227
+ "types": ["number"],
228
+ "is_optional": "False"
229
+ }
230
+ ],
231
+ "examples": "",
232
+ "replaces": "",
233
+ "error": "",
234
+ "tparams": [],
235
+ "members": [],
236
+ "notes": [],
237
+ "language": ""
238
+ },
239
+ {
240
+ "type": "CONSTANT",
241
+ "name": "physics.JOINT_TYPE_WHEEL",
242
+ "brief": "wheel joint type",
243
+ "description": "The following properties are available when connecting a joint of <code>JOINT_TYPE_WHEEL</code> type:",
244
+ "returnvalues": [],
245
+ "parameters": [
246
+ {
247
+ "name": "local_axis_a",
248
+ "doc": "The local translation unit axis in bodyA.",
249
+ "types": ["vector3"],
250
+ "is_optional": "False"
251
+ },
252
+ {
253
+ "name": "max_motor_torque",
254
+ "doc": "The maximum motor torque used to achieve the desired motor speed. Usually in N-m.",
255
+ "types": ["number"],
256
+ "is_optional": "False"
257
+ },
258
+ {
259
+ "name": "motor_speed",
260
+ "doc": "The desired motor speed in radians per second.",
261
+ "types": ["number"],
262
+ "is_optional": "False"
263
+ },
264
+ {
265
+ "name": "enable_motor",
266
+ "doc": "Enable/disable the joint motor.",
267
+ "types": ["boolean"],
268
+ "is_optional": "False"
269
+ },
270
+ {
271
+ "name": "frequency",
272
+ "doc": "The mass-spring-damper frequency in Hertz. Rotation only. Disable softness with a value of 0.",
273
+ "types": ["number"],
274
+ "is_optional": "False"
275
+ },
276
+ {
277
+ "name": "damping",
278
+ "doc": "The spring damping ratio. 0 = no damping, 1 = critical damping.",
279
+ "types": ["number"],
280
+ "is_optional": "False"
281
+ },
282
+ {
283
+ "name": "joint_translation",
284
+ "doc": "<span class=\"mark\">READ ONLY</span>Current joint translation, usually in meters.\n(Read only field, available from <code>physics.get_joint_properties()</code>)",
285
+ "types": ["number"],
286
+ "is_optional": "False"
287
+ },
288
+ {
289
+ "name": "joint_speed",
290
+ "doc": "<span class=\"mark\">READ ONLY</span>Current joint translation speed, usually in meters per second.\n(Read only field, available from <code>physics.get_joint_properties()</code>)",
291
+ "types": ["number"],
292
+ "is_optional": "False"
293
+ }
294
+ ],
295
+ "examples": "",
296
+ "replaces": "",
297
+ "error": "",
298
+ "tparams": [],
299
+ "members": [],
300
+ "notes": [],
301
+ "language": ""
302
+ },
303
+ {
304
+ "type": "PROPERTY",
305
+ "name": "mass",
306
+ "brief": "<span class=\"type\">number</span> collision object mass",
307
+ "description": "<span class=\"mark\">READ ONLY</span> Returns the defined physical mass of the collision object component as a number.",
308
+ "returnvalues": [],
309
+ "parameters": [],
310
+ "examples": "How to query a collision object component's mass:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"c1\">-- get mass from collision object component &quot;boulder&quot;</span>\n<span class=\"kd\">local</span> <span class=\"n\">mass</span> <span class=\"o\">=</span> <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;#boulder&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;mass&quot;</span><span class=\"p\">)</span>\n<span class=\"c1\">-- do something useful</span>\n<span class=\"nb\">assert</span><span class=\"p\">(</span><span class=\"n\">mass</span> <span class=\"o\">&gt;</span> <span class=\"mi\">1</span><span class=\"p\">)</span>\n</code></pre></div>",
311
+ "replaces": "",
312
+ "error": "",
313
+ "tparams": [],
314
+ "members": [],
315
+ "notes": [],
316
+ "language": ""
317
+ },
318
+ {
319
+ "type": "PROPERTY",
320
+ "name": "linear_velocity",
321
+ "brief": "<span class=\"type\">vector3</span> collision object linear velocity",
322
+ "description": "The current linear velocity of the collision object component as a vector3.\nThe velocity is measured in units/s (pixels/s).",
323
+ "returnvalues": [],
324
+ "parameters": [],
325
+ "examples": "How to query and modify a collision object component's linear velocity:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"c1\">-- get linear velocity from collision object &quot;collisionobject&quot; in gameobject &quot;ship&quot;</span>\n<span class=\"kd\">local</span> <span class=\"n\">source</span> <span class=\"o\">=</span> <span class=\"s2\">&quot;ship#collisionobject&quot;</span>\n<span class=\"kd\">local</span> <span class=\"n\">velocity</span> <span class=\"o\">=</span> <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"n\">source</span><span class=\"p\">,</span> <span class=\"s2\">&quot;linear_velocity&quot;</span><span class=\"p\">)</span>\n<span class=\"c1\">-- decrease it by 10%</span>\n<span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">set</span><span class=\"p\">(</span><span class=\"n\">source</span><span class=\"p\">,</span> <span class=\"s2\">&quot;linear_velocity&quot;</span><span class=\"p\">,</span> <span class=\"n\">velocity</span> <span class=\"o\">*</span> <span class=\"mf\">0.9</span><span class=\"p\">)</span>\n<span class=\"c1\">-- apply the velocity on target game object &quot;boulder&quot;&#39;s collision object as a force</span>\n<span class=\"kd\">local</span> <span class=\"n\">target</span> <span class=\"o\">=</span> <span class=\"s2\">&quot;boulder#collisionobject&quot;</span>\n<span class=\"kd\">local</span> <span class=\"n\">pos</span> <span class=\"o\">=</span> <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">get_position</span><span class=\"p\">(</span><span class=\"n\">target</span><span class=\"p\">)</span>\n<span class=\"n\">msg</span><span class=\"p\">.</span><span class=\"n\">post</span><span class=\"p\">(</span><span class=\"n\">target</span><span class=\"p\">,</span> <span class=\"s2\">&quot;apply_force&quot;</span><span class=\"p\">,</span> <span class=\"p\">{</span> <span class=\"n\">force</span> <span class=\"o\">=</span> <span class=\"n\">velocity</span><span class=\"p\">,</span> <span class=\"n\">position</span> <span class=\"o\">=</span> <span class=\"n\">pos</span> <span class=\"p\">})</span>\n</code></pre></div>",
326
+ "replaces": "request_velocity and velocity_response",
327
+ "error": "",
328
+ "tparams": [],
329
+ "members": [],
330
+ "notes": [],
331
+ "language": ""
332
+ },
333
+ {
334
+ "type": "PROPERTY",
335
+ "name": "angular_velocity",
336
+ "brief": "<span class=\"type\">vector3</span> collision object angular velocity",
337
+ "description": "The current angular velocity of the collision object component as a <span class=\"type\">vector3</span>.\nThe velocity is measured as a rotation around the vector with a speed equivalent to the vector length\nin radians/s.",
338
+ "returnvalues": [],
339
+ "parameters": [],
340
+ "examples": "How to query and modify a collision object component's angular velocity:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"c1\">-- get angular velocity from collision object &quot;collisionobject&quot; in gameobject &quot;boulder&quot;</span>\n<span class=\"kd\">local</span> <span class=\"n\">velocity</span> <span class=\"o\">=</span> <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;boulder#collisionobject&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;angular_velocity&quot;</span><span class=\"p\">)</span>\n<span class=\"c1\">-- do something interesting</span>\n<span class=\"kr\">if</span> <span class=\"n\">velocity</span><span class=\"p\">.</span><span class=\"n\">z</span> <span class=\"o\">&lt;</span> <span class=\"mi\">0</span> <span class=\"kr\">then</span>\n <span class=\"c1\">-- clockwise rotation</span>\n <span class=\"p\">...</span>\n<span class=\"kr\">else</span>\n <span class=\"c1\">-- counter clockwise rotation</span>\n <span class=\"p\">...</span>\n<span class=\"kr\">end</span>\n<span class=\"c1\">-- decrease it by 10%</span>\n<span class=\"n\">velocity</span><span class=\"p\">.</span><span class=\"n\">z</span> <span class=\"o\">=</span> <span class=\"n\">velocity</span><span class=\"p\">.</span><span class=\"n\">z</span> <span class=\"o\">*</span> <span class=\"mf\">0.9</span>\n<span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">set</span><span class=\"p\">(</span><span class=\"s2\">&quot;boulder#collisionobject&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;angular_velocity&quot;</span><span class=\"p\">,</span> <span class=\"n\">velocity</span> <span class=\"o\">*</span> <span class=\"mf\">0.9</span><span class=\"p\">)</span>\n</code></pre></div>",
341
+ "replaces": "request_velocity and velocity_response",
342
+ "error": "",
343
+ "tparams": [],
344
+ "members": [],
345
+ "notes": [],
346
+ "language": ""
347
+ },
348
+ {
349
+ "type": "PROPERTY",
350
+ "name": "linear_damping",
351
+ "brief": "<span class=\"type\">number</span> collision object linear damping",
352
+ "description": "The linear damping value for the collision object. Setting this value alters the damping of\nlinear motion of the object. Valid values are between 0 (no damping) and 1 (full damping).",
353
+ "returnvalues": [],
354
+ "parameters": [],
355
+ "examples": "How to increase a collision object component's linear damping:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"c1\">-- get linear damping from collision object &quot;collisionobject&quot; in gameobject &quot;floater&quot;</span>\n<span class=\"kd\">local</span> <span class=\"n\">target</span> <span class=\"o\">=</span> <span class=\"s2\">&quot;floater#collisionobject&quot;</span>\n<span class=\"kd\">local</span> <span class=\"n\">damping</span> <span class=\"o\">=</span> <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"n\">target</span><span class=\"p\">,</span> <span class=\"s2\">&quot;linear_damping&quot;</span><span class=\"p\">)</span>\n<span class=\"c1\">-- increase it by 10% if it&#39;s below 0.9</span>\n<span class=\"kr\">if</span> <span class=\"n\">damping</span> <span class=\"o\">&lt;=</span> <span class=\"mf\">0.9</span> <span class=\"kr\">then</span>\n <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">set</span><span class=\"p\">(</span><span class=\"n\">target</span><span class=\"p\">,</span> <span class=\"s2\">&quot;linear_damping&quot;</span><span class=\"p\">,</span> <span class=\"n\">damping</span> <span class=\"o\">*</span> <span class=\"mf\">1.1</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
356
+ "replaces": "",
357
+ "error": "",
358
+ "tparams": [],
359
+ "members": [],
360
+ "notes": [],
361
+ "language": ""
362
+ },
363
+ {
364
+ "type": "PROPERTY",
365
+ "name": "angular_damping",
366
+ "brief": "<span class=\"type\">number</span> collision object angular damping",
367
+ "description": "The angular damping value for the collision object. Setting this value alters the damping of\nangular motion of the object (rotation). Valid values are between 0 (no damping) and 1 (full damping).",
368
+ "returnvalues": [],
369
+ "parameters": [],
370
+ "examples": "How to decrease a collision object component's angular damping:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"c1\">-- get angular damping from collision object &quot;collisionobject&quot; in gameobject &quot;floater&quot;</span>\n<span class=\"kd\">local</span> <span class=\"n\">target</span> <span class=\"o\">=</span> <span class=\"s2\">&quot;floater#collisionobject&quot;</span>\n<span class=\"kd\">local</span> <span class=\"n\">damping</span> <span class=\"o\">=</span> <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"n\">target</span><span class=\"p\">,</span> <span class=\"s2\">&quot;angular_damping&quot;</span><span class=\"p\">)</span>\n<span class=\"c1\">-- decrease it by 10%</span>\n<span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">set</span><span class=\"p\">(</span><span class=\"n\">target</span><span class=\"p\">,</span> <span class=\"s2\">&quot;angular_damping&quot;</span><span class=\"p\">,</span> <span class=\"n\">damping</span> <span class=\"o\">*</span> <span class=\"mf\">0.9</span><span class=\"p\">)</span>\n</code></pre></div>",
371
+ "replaces": "",
372
+ "error": "",
373
+ "tparams": [],
374
+ "members": [],
375
+ "notes": [],
376
+ "language": ""
377
+ },
378
+ {
379
+ "type": "FUNCTION",
380
+ "name": "physics.raycast_async",
381
+ "brief": "requests a ray cast to be performed",
382
+ "description": "Ray casts are used to test for intersections against collision objects in the physics world.\nCollision objects of types kinematic, dynamic and static are tested against. Trigger objects\ndo not intersect with ray casts.\nWhich collision objects to hit is filtered by their collision groups and can be configured\nthrough <code>groups</code>.\nThe actual ray cast will be performed during the physics-update.\n<ul>\n<li>If an object is hit, the result will be reported via a <a href=\"#ray_cast_response\">ray_cast_response</a> message.</li>\n<li>If there is no object hit, the result will be reported via a <a href=\"#ray_cast_missed\">ray_cast_missed</a> message.</li>\n</ul>\nNOTE: Ray casts will ignore collision objects that contain the starting point of the ray. This is a limitation in Box2D.",
383
+ "returnvalues": [],
384
+ "parameters": [
385
+ {
386
+ "name": "from",
387
+ "doc": "the world position of the start of the ray",
388
+ "types": ["vector3"],
389
+ "is_optional": "False"
390
+ },
391
+ {
392
+ "name": "to",
393
+ "doc": "the world position of the end of the ray",
394
+ "types": ["vector3"],
395
+ "is_optional": "False"
396
+ },
397
+ {
398
+ "name": "groups",
399
+ "doc": "a lua table containing the hashed groups for which to test collisions against",
400
+ "types": ["table"],
401
+ "is_optional": "False"
402
+ },
403
+ {
404
+ "name": "request_id",
405
+ "doc": "a number in range [0,255]. It will be sent back in the response for identification, 0 by default",
406
+ "types": ["number"],
407
+ "is_optional": "True"
408
+ }
409
+ ],
410
+ "examples": "How to perform a ray cast asynchronously:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kr\">function</span> <span class=\"nf\">init</span><span class=\"p\">(</span><span class=\"n\">self</span><span class=\"p\">)</span>\n <span class=\"n\">self</span><span class=\"p\">.</span><span class=\"n\">my_groups</span> <span class=\"o\">=</span> <span class=\"p\">{</span><span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;my_group1&quot;</span><span class=\"p\">),</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;my_group2&quot;</span><span class=\"p\">)}</span>\n<span class=\"kr\">end</span>\n\n<span class=\"kr\">function</span> <span class=\"nf\">update</span><span class=\"p\">(</span><span class=\"n\">self</span><span class=\"p\">,</span> <span class=\"n\">dt</span><span class=\"p\">)</span>\n <span class=\"c1\">-- request ray cast</span>\n <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">raycast_async</span><span class=\"p\">(</span><span class=\"n\">my_start</span><span class=\"p\">,</span> <span class=\"n\">my_end</span><span class=\"p\">,</span> <span class=\"n\">self</span><span class=\"p\">.</span><span class=\"n\">my_groups</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n\n<span class=\"kr\">function</span> <span class=\"nf\">on_message</span><span class=\"p\">(</span><span class=\"n\">self</span><span class=\"p\">,</span> <span class=\"n\">message_id</span><span class=\"p\">,</span> <span class=\"n\">message</span><span class=\"p\">,</span> <span class=\"n\">sender</span><span class=\"p\">)</span>\n <span class=\"c1\">-- check for the response</span>\n <span class=\"kr\">if</span> <span class=\"n\">message_id</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;ray_cast_response&quot;</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"c1\">-- act on the hit</span>\n <span class=\"kr\">elseif</span> <span class=\"n\">message_id</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;ray_cast_missed&quot;</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"c1\">-- act on the miss</span>\n <span class=\"kr\">end</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
411
+ "replaces": "",
412
+ "error": "",
413
+ "tparams": [],
414
+ "members": [],
415
+ "notes": [],
416
+ "language": ""
417
+ },
418
+ {
419
+ "type": "FUNCTION",
420
+ "name": "physics.raycast",
421
+ "brief": "requests a ray cast to be performed",
422
+ "description": "Ray casts are used to test for intersections against collision objects in the physics world.\nCollision objects of types kinematic, dynamic and static are tested against. Trigger objects\ndo not intersect with ray casts.\nWhich collision objects to hit is filtered by their collision groups and can be configured\nthrough <code>groups</code>.\nNOTE: Ray casts will ignore collision objects that contain the starting point of the ray. This is a limitation in Box2D.",
423
+ "returnvalues": [
424
+ {
425
+ "name": "result",
426
+ "doc": "It returns a list. If missed it returns <code>nil</code>. See <a href=\"#ray_cast_response\">ray_cast_response</a> for details on the returned values.",
427
+ "types": ["table", "nil"]
428
+ }
429
+ ],
430
+ "parameters": [
431
+ {
432
+ "name": "from",
433
+ "doc": "the world position of the start of the ray",
434
+ "types": ["vector3"],
435
+ "is_optional": "False"
436
+ },
437
+ {
438
+ "name": "to",
439
+ "doc": "the world position of the end of the ray",
440
+ "types": ["vector3"],
441
+ "is_optional": "False"
442
+ },
443
+ {
444
+ "name": "groups",
445
+ "doc": "a lua table containing the hashed groups for which to test collisions against",
446
+ "types": ["table"],
447
+ "is_optional": "False"
448
+ },
449
+ {
450
+ "name": "options",
451
+ "doc": "a lua table containing options for the raycast.\n<dl>\n<dt><code>all</code></dt>\n<dd><span class=\"type\">boolean</span> Set to <code>true</code> to return all ray cast hits. If <code>false</code>, it will only return the closest hit.</dd>\n</dl>",
452
+ "types": ["table"],
453
+ "is_optional": "True"
454
+ }
455
+ ],
456
+ "examples": "How to perform a ray cast synchronously:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kr\">function</span> <span class=\"nf\">init</span><span class=\"p\">(</span><span class=\"n\">self</span><span class=\"p\">)</span>\n <span class=\"n\">self</span><span class=\"p\">.</span><span class=\"n\">groups</span> <span class=\"o\">=</span> <span class=\"p\">{</span><span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;world&quot;</span><span class=\"p\">),</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;enemy&quot;</span><span class=\"p\">)}</span>\n<span class=\"kr\">end</span>\n\n<span class=\"kr\">function</span> <span class=\"nf\">update</span><span class=\"p\">(</span><span class=\"n\">self</span><span class=\"p\">,</span> <span class=\"n\">dt</span><span class=\"p\">)</span>\n <span class=\"c1\">-- request ray cast</span>\n <span class=\"kd\">local</span> <span class=\"n\">result</span> <span class=\"o\">=</span> <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">raycast</span><span class=\"p\">(</span><span class=\"n\">from</span><span class=\"p\">,</span> <span class=\"n\">to</span><span class=\"p\">,</span> <span class=\"n\">self</span><span class=\"p\">.</span><span class=\"n\">groups</span><span class=\"p\">,</span> <span class=\"p\">{</span><span class=\"n\">all</span><span class=\"o\">=</span><span class=\"kc\">true</span><span class=\"p\">})</span>\n <span class=\"kr\">if</span> <span class=\"n\">result</span> <span class=\"o\">~=</span> <span class=\"kc\">nil</span> <span class=\"kr\">then</span>\n <span class=\"c1\">-- act on the hit (see &#39;ray_cast_response&#39;)</span>\n <span class=\"kr\">for</span> <span class=\"n\">_</span><span class=\"p\">,</span><span class=\"n\">result</span> <span class=\"kr\">in</span> <span class=\"nb\">ipairs</span><span class=\"p\">(</span><span class=\"n\">results</span><span class=\"p\">)</span> <span class=\"kr\">do</span>\n <span class=\"n\">handle_result</span><span class=\"p\">(</span><span class=\"n\">result</span><span class=\"p\">)</span>\n <span class=\"kr\">end</span>\n <span class=\"kr\">end</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
457
+ "replaces": "",
458
+ "error": "",
459
+ "tparams": [],
460
+ "members": [],
461
+ "notes": [],
462
+ "language": ""
463
+ },
464
+ {
465
+ "type": "FUNCTION",
466
+ "name": "physics.create_joint",
467
+ "brief": "create a physics joint",
468
+ "description": "Create a physics joint between two collision object components.\nNote: Currently only supported in 2D physics.",
469
+ "returnvalues": [],
470
+ "parameters": [
471
+ {
472
+ "name": "joint_type",
473
+ "doc": "the joint type",
474
+ "types": ["number"],
475
+ "is_optional": "False"
476
+ },
477
+ {
478
+ "name": "collisionobject_a",
479
+ "doc": "first collision object",
480
+ "types": ["string", "hash", "url"],
481
+ "is_optional": "False"
482
+ },
483
+ {
484
+ "name": "joint_id",
485
+ "doc": "id of the joint",
486
+ "types": ["string", "hash"],
487
+ "is_optional": "False"
488
+ },
489
+ {
490
+ "name": "position_a",
491
+ "doc": "local position where to attach the joint on the first collision object",
492
+ "types": ["vector3"],
493
+ "is_optional": "False"
494
+ },
495
+ {
496
+ "name": "collisionobject_b",
497
+ "doc": "second collision object",
498
+ "types": ["string", "hash", "url"],
499
+ "is_optional": "False"
500
+ },
501
+ {
502
+ "name": "position_b",
503
+ "doc": "local position where to attach the joint on the second collision object",
504
+ "types": ["vector3"],
505
+ "is_optional": "False"
506
+ },
507
+ {
508
+ "name": "properties",
509
+ "doc": "optional joint specific properties table\nSee each joint type for possible properties field. The one field that is accepted for all joint types is:\n- <span class=\"type\">boolean</span> <code>collide_connected</code>: Set this flag to true if the attached bodies should collide.",
510
+ "types": ["table"],
511
+ "is_optional": "True"
512
+ }
513
+ ],
514
+ "examples": "",
515
+ "replaces": "",
516
+ "error": "",
517
+ "tparams": [],
518
+ "members": [],
519
+ "notes": [],
520
+ "language": ""
521
+ },
522
+ {
523
+ "type": "FUNCTION",
524
+ "name": "physics.destroy_joint",
525
+ "brief": "destroy a physics joint",
526
+ "description": "Destroy an already physics joint. The joint has to be created before a\ndestroy can be issued.\nNote: Currently only supported in 2D physics.",
527
+ "returnvalues": [],
528
+ "parameters": [
529
+ {
530
+ "name": "collisionobject",
531
+ "doc": "collision object where the joint exist",
532
+ "types": ["string", "hash", "url"],
533
+ "is_optional": "False"
534
+ },
535
+ {
536
+ "name": "joint_id",
537
+ "doc": "id of the joint",
538
+ "types": ["string", "hash"],
539
+ "is_optional": "False"
540
+ }
541
+ ],
542
+ "examples": "",
543
+ "replaces": "",
544
+ "error": "",
545
+ "tparams": [],
546
+ "members": [],
547
+ "notes": [],
548
+ "language": ""
549
+ },
550
+ {
551
+ "type": "FUNCTION",
552
+ "name": "physics.get_joint_properties",
553
+ "brief": "get properties for a joint",
554
+ "description": "Get a table for properties for a connected joint. The joint has to be created before\nproperties can be retrieved.\nNote: Currently only supported in 2D physics.",
555
+ "returnvalues": [
556
+ {
557
+ "name": "properties",
558
+ "doc": "properties table. See the joint types for what fields are available, the only field available for all types is:\n<ul>\n<li><span class=\"type\">boolean</span> <code>collide_connected</code>: Set this flag to true if the attached bodies should collide.</li>\n</ul>",
559
+ "types": ["table"]
560
+ }
561
+ ],
562
+ "parameters": [
563
+ {
564
+ "name": "collisionobject",
565
+ "doc": "collision object where the joint exist",
566
+ "types": ["string", "hash", "url"],
567
+ "is_optional": "False"
568
+ },
569
+ {
570
+ "name": "joint_id",
571
+ "doc": "id of the joint",
572
+ "types": ["string", "hash"],
573
+ "is_optional": "False"
574
+ }
575
+ ],
576
+ "examples": "",
577
+ "replaces": "",
578
+ "error": "",
579
+ "tparams": [],
580
+ "members": [],
581
+ "notes": [],
582
+ "language": ""
583
+ },
584
+ {
585
+ "type": "FUNCTION",
586
+ "name": "physics.set_joint_properties",
587
+ "brief": "set properties for a joint",
588
+ "description": "Updates the properties for an already connected joint. The joint has to be created before\nproperties can be changed.\nNote: Currently only supported in 2D physics.",
589
+ "returnvalues": [],
590
+ "parameters": [
591
+ {
592
+ "name": "collisionobject",
593
+ "doc": "collision object where the joint exist",
594
+ "types": ["string", "hash", "url"],
595
+ "is_optional": "False"
596
+ },
597
+ {
598
+ "name": "joint_id",
599
+ "doc": "id of the joint",
600
+ "types": ["string", "hash"],
601
+ "is_optional": "False"
602
+ },
603
+ {
604
+ "name": "properties",
605
+ "doc": "joint specific properties table\nNote: The <code>collide_connected</code> field cannot be updated/changed after a connection has been made.",
606
+ "types": ["table"],
607
+ "is_optional": "False"
608
+ }
609
+ ],
610
+ "examples": "",
611
+ "replaces": "",
612
+ "error": "",
613
+ "tparams": [],
614
+ "members": [],
615
+ "notes": [],
616
+ "language": ""
617
+ },
618
+ {
619
+ "type": "FUNCTION",
620
+ "name": "physics.get_joint_reaction_force",
621
+ "brief": "get the reaction force for a joint",
622
+ "description": "Get the reaction force for a joint. The joint has to be created before\nthe reaction force can be calculated.\nNote: Currently only supported in 2D physics.",
623
+ "returnvalues": [
624
+ {
625
+ "name": "force",
626
+ "doc": "reaction force for the joint",
627
+ "types": ["vector3"]
628
+ }
629
+ ],
630
+ "parameters": [
631
+ {
632
+ "name": "collisionobject",
633
+ "doc": "collision object where the joint exist",
634
+ "types": ["string", "hash", "url"],
635
+ "is_optional": "False"
636
+ },
637
+ {
638
+ "name": "joint_id",
639
+ "doc": "id of the joint",
640
+ "types": ["string", "hash"],
641
+ "is_optional": "False"
642
+ }
643
+ ],
644
+ "examples": "",
645
+ "replaces": "",
646
+ "error": "",
647
+ "tparams": [],
648
+ "members": [],
649
+ "notes": [],
650
+ "language": ""
651
+ },
652
+ {
653
+ "type": "FUNCTION",
654
+ "name": "physics.get_joint_reaction_torque",
655
+ "brief": "get the reaction torque for a joint",
656
+ "description": "Get the reaction torque for a joint. The joint has to be created before\nthe reaction torque can be calculated.\nNote: Currently only supported in 2D physics.",
657
+ "returnvalues": [
658
+ {
659
+ "name": "torque",
660
+ "doc": "the reaction torque on bodyB in N*m.",
661
+ "types": ["number"]
662
+ }
663
+ ],
664
+ "parameters": [
665
+ {
666
+ "name": "collisionobject",
667
+ "doc": "collision object where the joint exist",
668
+ "types": ["string", "hash", "url"],
669
+ "is_optional": "False"
670
+ },
671
+ {
672
+ "name": "joint_id",
673
+ "doc": "id of the joint",
674
+ "types": ["string", "hash"],
675
+ "is_optional": "False"
676
+ }
677
+ ],
678
+ "examples": "",
679
+ "replaces": "",
680
+ "error": "",
681
+ "tparams": [],
682
+ "members": [],
683
+ "notes": [],
684
+ "language": ""
685
+ },
686
+ {
687
+ "type": "FUNCTION",
688
+ "name": "physics.set_gravity",
689
+ "brief": "set the gravity for collection",
690
+ "description": "Set the gravity in runtime. The gravity change is not global, it will only affect\nthe collection that the function is called from.\nNote: For 2D physics the z component of the gravity vector will be ignored.",
691
+ "returnvalues": [],
692
+ "parameters": [
693
+ {
694
+ "name": "gravity",
695
+ "doc": "the new gravity vector",
696
+ "types": ["vector3"],
697
+ "is_optional": "False"
698
+ }
699
+ ],
700
+ "examples": "<div class=\"codehilite\"><pre><span></span><code><span class=\"kr\">function</span> <span class=\"nf\">init</span><span class=\"p\">(</span><span class=\"n\">self</span><span class=\"p\">)</span>\n <span class=\"c1\">-- Set &quot;upside down&quot; gravity for this collection.</span>\n <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">set_gravity</span><span class=\"p\">(</span><span class=\"n\">vmath</span><span class=\"p\">.</span><span class=\"n\">vector3</span><span class=\"p\">(</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mf\">10.0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">))</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
701
+ "replaces": "",
702
+ "error": "",
703
+ "tparams": [],
704
+ "members": [],
705
+ "notes": [],
706
+ "language": ""
707
+ },
708
+ {
709
+ "type": "FUNCTION",
710
+ "name": "physics.get_gravity",
711
+ "brief": "get the gravity for collection",
712
+ "description": "Get the gravity in runtime. The gravity returned is not global, it will return\nthe gravity for the collection that the function is called from.\nNote: For 2D physics the z component will always be zero.",
713
+ "returnvalues": [
714
+ {
715
+ "name": "gravity",
716
+ "doc": "gravity vector of collection",
717
+ "types": ["vector3"]
718
+ }
719
+ ],
720
+ "parameters": [],
721
+ "examples": "<div class=\"codehilite\"><pre><span></span><code><span class=\"kr\">function</span> <span class=\"nf\">init</span><span class=\"p\">(</span><span class=\"n\">self</span><span class=\"p\">)</span>\n <span class=\"kd\">local</span> <span class=\"n\">gravity</span> <span class=\"o\">=</span> <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">get_gravity</span><span class=\"p\">()</span>\n <span class=\"c1\">-- Inverse gravity!</span>\n <span class=\"n\">gravity</span> <span class=\"o\">=</span> <span class=\"o\">-</span><span class=\"n\">gravity</span>\n <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">set_gravity</span><span class=\"p\">(</span><span class=\"n\">gravity</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
722
+ "replaces": "",
723
+ "error": "",
724
+ "tparams": [],
725
+ "members": [],
726
+ "notes": [],
727
+ "language": ""
728
+ },
729
+ {
730
+ "type": "FUNCTION",
731
+ "name": "physics.set_hflip",
732
+ "brief": "flip the geometry horizontally for a collision object",
733
+ "description": "Flips the collision shapes horizontally for a collision object",
734
+ "returnvalues": [],
735
+ "parameters": [
736
+ {
737
+ "name": "url",
738
+ "doc": "the collision object that should flip its shapes",
739
+ "types": ["string", "hash", "url"],
740
+ "is_optional": "False"
741
+ },
742
+ {
743
+ "name": "flip",
744
+ "doc": "<code>true</code> if the collision object should flip its shapes, <code>false</code> if not",
745
+ "types": ["boolean"],
746
+ "is_optional": "False"
747
+ }
748
+ ],
749
+ "examples": "<div class=\"codehilite\"><pre><span></span><code><span class=\"kr\">function</span> <span class=\"nf\">init</span><span class=\"p\">(</span><span class=\"n\">self</span><span class=\"p\">)</span>\n <span class=\"n\">self</span><span class=\"p\">.</span><span class=\"n\">fliph</span> <span class=\"o\">=</span> <span class=\"kc\">true</span> <span class=\"c1\">-- set on some condition</span>\n <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">set_hflip</span><span class=\"p\">(</span><span class=\"s2\">&quot;#collisionobject&quot;</span><span class=\"p\">,</span> <span class=\"n\">self</span><span class=\"p\">.</span><span class=\"n\">fliph</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
750
+ "replaces": "",
751
+ "error": "",
752
+ "tparams": [],
753
+ "members": [],
754
+ "notes": [],
755
+ "language": ""
756
+ },
757
+ {
758
+ "type": "FUNCTION",
759
+ "name": "physics.set_vflip",
760
+ "brief": "flip the geometry vertically for a collision object",
761
+ "description": "Flips the collision shapes vertically for a collision object",
762
+ "returnvalues": [],
763
+ "parameters": [
764
+ {
765
+ "name": "url",
766
+ "doc": "the collision object that should flip its shapes",
767
+ "types": ["string", "hash", "url"],
768
+ "is_optional": "False"
769
+ },
770
+ {
771
+ "name": "flip",
772
+ "doc": "<code>true</code> if the collision object should flip its shapes, <code>false</code> if not",
773
+ "types": ["boolean"],
774
+ "is_optional": "False"
775
+ }
776
+ ],
777
+ "examples": "<div class=\"codehilite\"><pre><span></span><code><span class=\"kr\">function</span> <span class=\"nf\">init</span><span class=\"p\">(</span><span class=\"n\">self</span><span class=\"p\">)</span>\n <span class=\"n\">self</span><span class=\"p\">.</span><span class=\"n\">flipv</span> <span class=\"o\">=</span> <span class=\"kc\">true</span> <span class=\"c1\">-- set on some condition</span>\n <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">set_vflip</span><span class=\"p\">(</span><span class=\"s2\">&quot;#collisionobject&quot;</span><span class=\"p\">,</span> <span class=\"n\">self</span><span class=\"p\">.</span><span class=\"n\">flipv</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
778
+ "replaces": "",
779
+ "error": "",
780
+ "tparams": [],
781
+ "members": [],
782
+ "notes": [],
783
+ "language": ""
784
+ },
785
+ {
786
+ "type": "FUNCTION",
787
+ "name": "physics.wakeup",
788
+ "brief": "explicitly wakeup a collision object",
789
+ "description": "Collision objects tend to fall asleep when inactive for a small period of time for\nefficiency reasons. This function wakes them up.",
790
+ "returnvalues": [],
791
+ "parameters": [
792
+ {
793
+ "name": "url",
794
+ "doc": "the collision object to wake.\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kr\">function</span> <span class=\"nf\">on_input</span><span class=\"p\">(</span><span class=\"n\">self</span><span class=\"p\">,</span> <span class=\"n\">action_id</span><span class=\"p\">,</span> <span class=\"n\">action</span><span class=\"p\">)</span>\n <span class=\"kr\">if</span> <span class=\"n\">action_id</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;test&quot;</span><span class=\"p\">)</span> <span class=\"ow\">and</span> <span class=\"n\">action</span><span class=\"p\">.</span><span class=\"n\">pressed</span> <span class=\"kr\">then</span>\n <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">wakeup</span><span class=\"p\">(</span><span class=\"s2\">&quot;#collisionobject&quot;</span><span class=\"p\">)</span>\n <span class=\"kr\">end</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
795
+ "types": ["string", "hash", "url"],
796
+ "is_optional": "False"
797
+ }
798
+ ],
799
+ "examples": "",
800
+ "replaces": "",
801
+ "error": "",
802
+ "tparams": [],
803
+ "members": [],
804
+ "notes": [],
805
+ "language": ""
806
+ },
807
+ {
808
+ "type": "FUNCTION",
809
+ "name": "physics.set_group",
810
+ "brief": "change the group of a collision object",
811
+ "description": "Updates the group property of a collision object to the specified\nstring value. The group name should exist i.e. have been used in\na collision object in the editor.",
812
+ "returnvalues": [],
813
+ "parameters": [
814
+ {
815
+ "name": "url",
816
+ "doc": "the collision object affected.",
817
+ "types": ["string", "hash", "url"],
818
+ "is_optional": "False"
819
+ },
820
+ {
821
+ "name": "group",
822
+ "doc": "the new group name to be assigned.\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"kr\">function</span> <span class=\"nf\">change_collision_group</span><span class=\"p\">()</span>\n <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">set_group</span><span class=\"p\">(</span><span class=\"s2\">&quot;#collisionobject&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;enemy&quot;</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
823
+ "types": ["string"],
824
+ "is_optional": "False"
825
+ }
826
+ ],
827
+ "examples": "",
828
+ "replaces": "",
829
+ "error": "",
830
+ "tparams": [],
831
+ "members": [],
832
+ "notes": [],
833
+ "language": ""
834
+ },
835
+ {
836
+ "type": "FUNCTION",
837
+ "name": "physics.get_group",
838
+ "brief": "returns the group of a collision object",
839
+ "description": "Returns the group name of a collision object as a hash.",
840
+ "returnvalues": [
841
+ {
842
+ "name": "group",
843
+ "doc": "hash value of the group.\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"kr\">function</span> <span class=\"nf\">check_is_enemy</span><span class=\"p\">()</span>\n <span class=\"kd\">local</span> <span class=\"n\">group</span> <span class=\"o\">=</span> <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">get_group</span><span class=\"p\">(</span><span class=\"s2\">&quot;#collisionobject&quot;</span><span class=\"p\">)</span>\n <span class=\"kr\">return</span> <span class=\"n\">group</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;enemy&quot;</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
844
+ "types": ["hash"]
845
+ }
846
+ ],
847
+ "parameters": [
848
+ {
849
+ "name": "url",
850
+ "doc": "the collision object to return the group of.",
851
+ "types": ["string", "hash", "url"],
852
+ "is_optional": "False"
853
+ }
854
+ ],
855
+ "examples": "",
856
+ "replaces": "",
857
+ "error": "",
858
+ "tparams": [],
859
+ "members": [],
860
+ "notes": [],
861
+ "language": ""
862
+ },
863
+ {
864
+ "type": "FUNCTION",
865
+ "name": "physics.set_maskbit",
866
+ "brief": "updates the mask of a collision object",
867
+ "description": "Sets or clears the masking of a group (maskbit) in a collision object.",
868
+ "returnvalues": [],
869
+ "parameters": [
870
+ {
871
+ "name": "url",
872
+ "doc": "the collision object to change the mask of.",
873
+ "types": ["string", "hash", "url"],
874
+ "is_optional": "False"
875
+ },
876
+ {
877
+ "name": "group",
878
+ "doc": "the name of the group (maskbit) to modify in the mask.",
879
+ "types": ["string"],
880
+ "is_optional": "False"
881
+ },
882
+ {
883
+ "name": "maskbit",
884
+ "doc": "boolean value of the new maskbit. 'true' to enable, 'false' to disable.\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"kr\">function</span> <span class=\"nf\">make_invincible</span><span class=\"p\">()</span>\n <span class=\"c1\">-- no longer collide with the &quot;bullet&quot; group</span>\n <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">set_maskbit</span><span class=\"p\">(</span><span class=\"s2\">&quot;#collisionobject&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;bullet&quot;</span><span class=\"p\">,</span> <span class=\"kc\">false</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
885
+ "types": ["boolean"],
886
+ "is_optional": "False"
887
+ }
888
+ ],
889
+ "examples": "",
890
+ "replaces": "",
891
+ "error": "",
892
+ "tparams": [],
893
+ "members": [],
894
+ "notes": [],
895
+ "language": ""
896
+ },
897
+ {
898
+ "type": "FUNCTION",
899
+ "name": "physics.get_maskbit",
900
+ "brief": "checks the presense of a group in the mask (maskbit) of a collision object",
901
+ "description": "Returns true if the specified group is set in the mask of a collision\nobject, false otherwise.",
902
+ "returnvalues": [
903
+ {
904
+ "name": "maskbit",
905
+ "doc": "boolean value of the maskbit. 'true' if present, 'false' otherwise.\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"kr\">function</span> <span class=\"nf\">is_invincible</span><span class=\"p\">()</span>\n <span class=\"c1\">-- check if the collisionobject would collide with the &quot;bullet&quot; group</span>\n <span class=\"kd\">local</span> <span class=\"n\">invincible</span> <span class=\"o\">=</span> <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">get_maskbit</span><span class=\"p\">(</span><span class=\"s2\">&quot;#collisionobject&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;bullet&quot;</span><span class=\"p\">)</span>\n <span class=\"kr\">return</span> <span class=\"n\">invincible</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
906
+ "types": ["boolean"]
907
+ }
908
+ ],
909
+ "parameters": [
910
+ {
911
+ "name": "url",
912
+ "doc": "the collision object to check the mask of.",
913
+ "types": ["string", "hash", "url"],
914
+ "is_optional": "False"
915
+ },
916
+ {
917
+ "name": "group",
918
+ "doc": "the name of the group to check for.",
919
+ "types": ["string"],
920
+ "is_optional": "False"
921
+ }
922
+ ],
923
+ "examples": "",
924
+ "replaces": "",
925
+ "error": "",
926
+ "tparams": [],
927
+ "members": [],
928
+ "notes": [],
929
+ "language": ""
930
+ },
931
+ {
932
+ "type": "CONSTANT",
933
+ "name": "physics.SHAPE_TYPE_SPHERE",
934
+ "brief": "",
935
+ "description": "",
936
+ "returnvalues": [],
937
+ "parameters": [],
938
+ "examples": "",
939
+ "replaces": "",
940
+ "error": "",
941
+ "tparams": [],
942
+ "members": [],
943
+ "notes": [],
944
+ "language": ""
945
+ },
946
+ {
947
+ "type": "CONSTANT",
948
+ "name": "physics.SHAPE_TYPE_BOX",
949
+ "brief": "",
950
+ "description": "",
951
+ "returnvalues": [],
952
+ "parameters": [],
953
+ "examples": "",
954
+ "replaces": "",
955
+ "error": "",
956
+ "tparams": [],
957
+ "members": [],
958
+ "notes": [],
959
+ "language": ""
960
+ },
961
+ {
962
+ "type": "CONSTANT",
963
+ "name": "physics.SHAPE_TYPE_CAPSULE",
964
+ "brief": "",
965
+ "description": "",
966
+ "returnvalues": [],
967
+ "parameters": [],
968
+ "examples": "",
969
+ "replaces": "",
970
+ "error": "",
971
+ "tparams": [],
972
+ "members": [],
973
+ "notes": [],
974
+ "language": ""
975
+ },
976
+ {
977
+ "type": "CONSTANT",
978
+ "name": "physics.SHAPE_TYPE_HULL",
979
+ "brief": "",
980
+ "description": "",
981
+ "returnvalues": [],
982
+ "parameters": [],
983
+ "examples": "",
984
+ "replaces": "",
985
+ "error": "",
986
+ "tparams": [],
987
+ "members": [],
988
+ "notes": [],
989
+ "language": ""
990
+ },
991
+ {
992
+ "type": "FUNCTION",
993
+ "name": "physics.get_shape",
994
+ "brief": "get collision shape info",
995
+ "description": "Gets collision shape data from a collision object",
996
+ "returnvalues": [
997
+ {
998
+ "name": "table",
999
+ "doc": "A table containing meta data about the physics shape\n<dl>\n<dt><code>type</code></dt>\n<dd><span class=\"type\">number</span> The shape type. Supported values:</dd>\n</dl>\n<ul>\n<li><code>physics.SHAPE_TYPE_SPHERE</code></li>\n<li><code>physics.SHAPE_TYPE_BOX</code></li>\n<li><code>physics.SHAPE_TYPE_CAPSULE</code> <em>Only supported for 3D physics</em></li>\n<li><code>physics.SHAPE_TYPE_HULL</code></li>\n</ul>\nThe returned table contains different fields depending on which type the shape is.\nIf the shape is a sphere:\n<dl>\n<dt><code>diameter</code></dt>\n<dd><span class=\"type\">number</span> the diameter of the sphere shape</dd>\n</dl>\nIf the shape is a box:\n<dl>\n<dt><code>dimensions</code></dt>\n<dd><span class=\"type\">vector3</span> a <code>vmath.vector3</code> of the box dimensions</dd>\n</dl>\nIf the shape is a capsule:\n<dl>\n<dt><code>diameter</code></dt>\n<dd><span class=\"type\">number</span> the diameter of the capsule poles</dd>\n<dt><code>height</code></dt>\n<dd><span class=\"type\">number</span> the height of the capsule</dd>\n</dl>\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"kr\">function</span> <span class=\"nf\">get_shape_meta</span><span class=\"p\">()</span>\n <span class=\"kd\">local</span> <span class=\"n\">sphere</span> <span class=\"o\">=</span> <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">get_shape</span><span class=\"p\">(</span><span class=\"s2\">&quot;#collisionobject&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;my_sphere_shape&quot;</span><span class=\"p\">)</span>\n <span class=\"c1\">-- returns a table with sphere.diameter</span>\n <span class=\"kr\">return</span> <span class=\"n\">sphere</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
1000
+ "types": ["table"]
1001
+ }
1002
+ ],
1003
+ "parameters": [
1004
+ {
1005
+ "name": "url",
1006
+ "doc": "the collision object.",
1007
+ "types": ["string", "hash", "url"],
1008
+ "is_optional": "False"
1009
+ },
1010
+ {
1011
+ "name": "shape",
1012
+ "doc": "the name of the shape to get data for.",
1013
+ "types": ["string", "hash"],
1014
+ "is_optional": "False"
1015
+ }
1016
+ ],
1017
+ "examples": "",
1018
+ "replaces": "",
1019
+ "error": "",
1020
+ "tparams": [],
1021
+ "members": [],
1022
+ "notes": [],
1023
+ "language": ""
1024
+ },
1025
+ {
1026
+ "type": "FUNCTION",
1027
+ "name": "physics.set_shape",
1028
+ "brief": "set collision shape data",
1029
+ "description": "Sets collision shape data for a collision object. Please note that updating data in 3D\ncan be quite costly for box and capsules. Because of the physics engine, the cost\ncomes from having to recreate the shape objects when certain shapes needs to be updated.",
1030
+ "returnvalues": [],
1031
+ "parameters": [
1032
+ {
1033
+ "name": "url",
1034
+ "doc": "the collision object.",
1035
+ "types": ["string", "hash", "url"],
1036
+ "is_optional": "False"
1037
+ },
1038
+ {
1039
+ "name": "shape",
1040
+ "doc": "the name of the shape to get data for.",
1041
+ "types": ["string", "hash"],
1042
+ "is_optional": "False"
1043
+ },
1044
+ {
1045
+ "name": "table",
1046
+ "doc": "the shape data to update the shape with.\nSee <a href=\"/ref/physics#physics.get_shape\">physics.get_shape</a> for a detailed description of each field in the data table.\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"kr\">function</span> <span class=\"nf\">set_shape_data</span><span class=\"p\">()</span>\n <span class=\"c1\">-- set capsule shape data</span>\n <span class=\"kd\">local</span> <span class=\"n\">data</span> <span class=\"o\">=</span> <span class=\"p\">{}</span>\n <span class=\"n\">data</span><span class=\"p\">.</span><span class=\"n\">type</span> <span class=\"o\">=</span> <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">SHAPE_TYPE_CAPSULE</span>\n <span class=\"n\">data</span><span class=\"p\">.</span><span class=\"n\">diameter</span> <span class=\"o\">=</span> <span class=\"mi\">10</span>\n <span class=\"n\">data</span><span class=\"p\">.</span><span class=\"n\">height</span> <span class=\"o\">=</span> <span class=\"mi\">20</span>\n <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">set_shape</span><span class=\"p\">(</span><span class=\"s2\">&quot;#collisionobject&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;my_capsule_shape&quot;</span><span class=\"p\">,</span> <span class=\"n\">data</span><span class=\"p\">)</span>\n\n <span class=\"c1\">-- set sphere shape data</span>\n <span class=\"n\">data</span> <span class=\"o\">=</span> <span class=\"p\">{}</span>\n <span class=\"n\">data</span><span class=\"p\">.</span><span class=\"n\">type</span> <span class=\"o\">=</span> <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">SHAPE_TYPE_SPHERE</span>\n <span class=\"n\">data</span><span class=\"p\">.</span><span class=\"n\">diameter</span> <span class=\"o\">=</span> <span class=\"mi\">10</span>\n <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">set_shape</span><span class=\"p\">(</span><span class=\"s2\">&quot;#collisionobject&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;my_sphere_shape&quot;</span><span class=\"p\">,</span> <span class=\"n\">data</span><span class=\"p\">)</span>\n\n <span class=\"c1\">-- set box shape data</span>\n <span class=\"n\">data</span> <span class=\"o\">=</span> <span class=\"p\">{}</span>\n <span class=\"n\">data</span><span class=\"p\">.</span><span class=\"n\">type</span> <span class=\"o\">=</span> <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">SHAPE_TYPE_BOX</span>\n <span class=\"n\">data</span><span class=\"p\">.</span><span class=\"n\">dimensions</span> <span class=\"o\">=</span> <span class=\"n\">vmath</span><span class=\"p\">.</span><span class=\"n\">vector3</span><span class=\"p\">(</span><span class=\"mi\">10</span><span class=\"p\">,</span> <span class=\"mi\">10</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">)</span>\n <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">set_shape</span><span class=\"p\">(</span><span class=\"s2\">&quot;#collisionobject&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;my_box_shape&quot;</span><span class=\"p\">,</span> <span class=\"n\">data</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
1047
+ "types": ["table"],
1048
+ "is_optional": "False"
1049
+ }
1050
+ ],
1051
+ "examples": "",
1052
+ "replaces": "",
1053
+ "error": "",
1054
+ "tparams": [],
1055
+ "members": [],
1056
+ "notes": [],
1057
+ "language": ""
1058
+ },
1059
+ {
1060
+ "type": "FUNCTION",
1061
+ "name": "physics.set_event_listener",
1062
+ "brief": "Sets a physics world event listener. If a function is set, physics messages will no longer be sent to on_message.",
1063
+ "description": "Only one physics world event listener can be set at a time.",
1064
+ "returnvalues": [],
1065
+ "parameters": [
1066
+ {
1067
+ "name": "callback",
1068
+ "doc": "A callback that receives an information about all the physics interactions in this physics world.\n<dl>\n<dt><code>self</code></dt>\n<dd><span class=\"type\">object</span> The calling script</dd>\n<dt><code>event</code></dt>\n<dd><span class=\"type\">constant</span> The type of event. Can be one of these messages:</dd>\n</dl>\n<ul>\n<li><a href=\"#contact_point_event\">contact_point_event</a></li>\n<li><a href=\"#collision_event\">collision_event</a></li>\n<li><a href=\"#trigger_event\">trigger_event</a></li>\n<li><a href=\"#ray_cast_response\">ray_cast_response</a></li>\n<li><a href=\"#ray_cast_missed\">ray_cast_missed</a></li>\n</ul>\n<dl>\n<dt><code>data</code></dt>\n<dd><span class=\"type\">table</span> The callback value data is a table that contains event-related data. See the documentation for details on the messages.</dd>\n</dl>",
1069
+ "types": ["function(self, events)", "nil"],
1070
+ "is_optional": "False"
1071
+ }
1072
+ ],
1073
+ "examples": "<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"kr\">function</span> <span class=\"nf\">physics_world_listener</span><span class=\"p\">(</span><span class=\"n\">self</span><span class=\"p\">,</span> <span class=\"n\">events</span><span class=\"p\">)</span>\n <span class=\"kr\">for</span> <span class=\"n\">_</span><span class=\"p\">,</span><span class=\"n\">event</span> <span class=\"kr\">in</span> <span class=\"nb\">ipairs</span><span class=\"p\">(</span><span class=\"n\">events</span><span class=\"p\">):</span>\n <span class=\"kd\">local</span> <span class=\"n\">event_type</span> <span class=\"o\">=</span> <span class=\"n\">event</span><span class=\"p\">[</span><span class=\"s1\">&#39;type&#39;</span><span class=\"p\">]</span>\n <span class=\"kr\">if</span> <span class=\"n\">event_type</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;contact_point_event&quot;</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"n\">pprint</span><span class=\"p\">(</span><span class=\"n\">event</span><span class=\"p\">)</span>\n <span class=\"c1\">-- {</span>\n <span class=\"c1\">-- distance = 2.1490633487701,</span>\n <span class=\"c1\">-- applied_impulse = 0</span>\n <span class=\"c1\">-- a = { --[[0x113f7c6c0]]</span>\n <span class=\"c1\">-- group = hash: [box],</span>\n <span class=\"c1\">-- id = hash: [/box]</span>\n <span class=\"c1\">-- mass = 0,</span>\n <span class=\"c1\">-- normal = vmath.vector3(0.379, 0.925, -0),</span>\n <span class=\"c1\">-- position = vmath.vector3(517.337, 235.068, 0),</span>\n <span class=\"c1\">-- instance_position = vmath.vector3(480, 144, 0),</span>\n <span class=\"c1\">-- relative_velocity = vmath.vector3(-0, -0, -0),</span>\n <span class=\"c1\">-- },</span>\n <span class=\"c1\">-- b = { --[[0x113f7c840]]</span>\n <span class=\"c1\">-- group = hash: [circle],</span>\n <span class=\"c1\">-- id = hash: [/circle]</span>\n <span class=\"c1\">-- mass = 0,</span>\n <span class=\"c1\">-- normal = vmath.vector3(-0.379, -0.925, 0),</span>\n <span class=\"c1\">-- position = vmath.vector3(517.337, 235.068, 0),</span>\n <span class=\"c1\">-- instance_position = vmath.vector3(-0.0021, 0, -0.0022),</span>\n <span class=\"c1\">-- relative_velocity = vmath.vector3(0, 0, 0),</span>\n <span class=\"c1\">-- },</span>\n <span class=\"c1\">-- }</span>\n <span class=\"kr\">elseif</span> <span class=\"n\">event</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;collision_event&quot;</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"n\">pprint</span><span class=\"p\">(</span><span class=\"n\">event</span><span class=\"p\">)</span>\n <span class=\"c1\">-- {</span>\n <span class=\"c1\">-- a = {</span>\n <span class=\"c1\">-- group = hash: [default],</span>\n <span class=\"c1\">-- position = vmath.vector3(183, 666, 0),</span>\n <span class=\"c1\">-- id = hash: [/go1]</span>\n <span class=\"c1\">-- },</span>\n <span class=\"c1\">-- b = {</span>\n <span class=\"c1\">-- group = hash: [default],</span>\n <span class=\"c1\">-- position = vmath.vector3(185, 704.05865478516, 0),</span>\n <span class=\"c1\">-- id = hash: [/go2]</span>\n <span class=\"c1\">-- }</span>\n <span class=\"c1\">-- }</span>\n <span class=\"kr\">elseif</span> <span class=\"n\">event</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;trigger_event&quot;</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"n\">pprint</span><span class=\"p\">(</span><span class=\"n\">event</span><span class=\"p\">)</span>\n <span class=\"c1\">-- {</span>\n <span class=\"c1\">-- enter = true,</span>\n <span class=\"c1\">-- b = {</span>\n <span class=\"c1\">-- group = hash: [default],</span>\n <span class=\"c1\">-- id = hash: [/go2]</span>\n <span class=\"c1\">-- },</span>\n <span class=\"c1\">-- a = {</span>\n <span class=\"c1\">-- group = hash: [default],</span>\n <span class=\"c1\">-- id = hash: [/go1]</span>\n <span class=\"c1\">-- }</span>\n <span class=\"c1\">-- },</span>\n <span class=\"kr\">elseif</span> <span class=\"n\">event</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;ray_cast_response&quot;</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"n\">pprint</span><span class=\"p\">(</span><span class=\"n\">event</span><span class=\"p\">)</span>\n <span class=\"c1\">--{</span>\n <span class=\"c1\">-- group = hash: [default],</span>\n <span class=\"c1\">-- request_id = 0,</span>\n <span class=\"c1\">-- position = vmath.vector3(249.92222595215, 249.92222595215, 0),</span>\n <span class=\"c1\">-- fraction = 0.68759721517563,</span>\n <span class=\"c1\">-- normal = vmath.vector3(0, 1, 0),</span>\n <span class=\"c1\">-- id = hash: [/go]</span>\n <span class=\"c1\">-- }</span>\n <span class=\"kr\">elseif</span> <span class=\"n\">event</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;ray_cast_missed&quot;</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"n\">pprint</span><span class=\"p\">(</span><span class=\"n\">event</span><span class=\"p\">)</span>\n <span class=\"c1\">-- {</span>\n <span class=\"c1\">-- request_id = 0</span>\n <span class=\"c1\">--},</span>\n <span class=\"kr\">end</span>\n<span class=\"kr\">end</span>\n\n<span class=\"kr\">function</span> <span class=\"nf\">init</span><span class=\"p\">(</span><span class=\"n\">self</span><span class=\"p\">)</span>\n <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">set_event_listener</span><span class=\"p\">(</span><span class=\"n\">physics_world_listener</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
1074
+ "replaces": "",
1075
+ "error": "",
1076
+ "tparams": [],
1077
+ "members": [],
1078
+ "notes": [],
1079
+ "language": ""
1080
+ },
1081
+ {
1082
+ "type": "FUNCTION",
1083
+ "name": "physics.update_mass",
1084
+ "brief": "updates the mass of a dynamic 2D collision object in the physics world.",
1085
+ "description": "The function recalculates the density of each shape based on the total area of all shapes and the specified mass, then updates the mass of the body accordingly.\nNote: Currently only supported in 2D physics.",
1086
+ "returnvalues": [],
1087
+ "parameters": [
1088
+ {
1089
+ "name": "collisionobject",
1090
+ "doc": "the collision object whose mass needs to be updated.",
1091
+ "types": ["string", "hash", "url"],
1092
+ "is_optional": "False"
1093
+ },
1094
+ {
1095
+ "name": "mass",
1096
+ "doc": "the new mass value to set for the collision object.",
1097
+ "types": ["number"],
1098
+ "is_optional": "False"
1099
+ }
1100
+ ],
1101
+ "examples": "<div class=\"codehilite\"><pre><span></span><code> <span class=\"n\">physics</span><span class=\"p\">.</span><span class=\"n\">update_mass</span><span class=\"p\">(</span><span class=\"s2\">&quot;#collisionobject&quot;</span><span class=\"p\">,</span> <span class=\"mi\">14</span><span class=\"p\">)</span>\n</code></pre></div>",
1102
+ "replaces": "",
1103
+ "error": "",
1104
+ "tparams": [],
1105
+ "members": [],
1106
+ "notes": [],
1107
+ "language": ""
1108
+ }
1109
+ ],
1110
+ "info": {
1111
+ "namespace": "physics",
1112
+ "name": "Collision object",
1113
+ "brief": "Collision object physics API documentation",
1114
+ "description": "Functions and messages for collision object physics interaction\nwith other objects (collisions and ray-casting) and control of\nphysical behaviors.",
1115
+ "path": "engine/gamesys/src/gamesys/scripts/script_physics.cpp",
1116
+ "file": "",
1117
+ "notes": [],
1118
+ "language": "Lua"
1119
+ }
1120
+ }