@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,582 @@
1
+ {
2
+ "elements": [
3
+ {
4
+ "type": "PROPERTY",
5
+ "name": "gain",
6
+ "brief": "<span class=\"type\">number</span> sound gain",
7
+ "description": "The gain on the sound-component. Note that gain is in linear scale,\nbetween 0 and 1.",
8
+ "returnvalues": [],
9
+ "parameters": [],
10
+ "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\">gain</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;#sound&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;gain&quot;</span><span class=\"p\">)</span>\n <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">set</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;gain&quot;</span><span class=\"p\">,</span> <span class=\"n\">gain</span> <span class=\"o\">*</span> <span class=\"mf\">1.5</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
11
+ "replaces": "",
12
+ "error": "",
13
+ "tparams": [],
14
+ "members": [],
15
+ "notes": [],
16
+ "language": ""
17
+ },
18
+ {
19
+ "type": "PROPERTY",
20
+ "name": "pan",
21
+ "brief": "<span class=\"type\">number</span> sound pan",
22
+ "description": "The pan on the sound-component. The valid range is from -1.0 to 1.0,\nrepresenting -45 degrees left, to +45 degrees right.",
23
+ "returnvalues": [],
24
+ "parameters": [],
25
+ "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\">pan</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;#sound&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;pan&quot;</span><span class=\"p\">)</span>\n <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">set</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;pan&quot;</span><span class=\"p\">,</span> <span class=\"n\">pan</span> <span class=\"o\">*</span> <span class=\"o\">-</span><span class=\"mi\">1</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
26
+ "replaces": "",
27
+ "error": "",
28
+ "tparams": [],
29
+ "members": [],
30
+ "notes": [],
31
+ "language": ""
32
+ },
33
+ {
34
+ "type": "PROPERTY",
35
+ "name": "speed",
36
+ "brief": "<span class=\"type\">number</span> sound speed",
37
+ "description": "The speed on the sound-component where 1.0 is normal speed, 0.5 is half\nspeed and 2.0 is double speed. Valid range is 0.0 to 50.0.",
38
+ "returnvalues": [],
39
+ "parameters": [],
40
+ "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\">speed</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;#sound&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;speed&quot;</span><span class=\"p\">)</span>\n <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">set</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;speed&quot;</span><span class=\"p\">,</span> <span class=\"n\">speed</span> <span class=\"o\">*</span> <span class=\"mf\">0.5</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
41
+ "replaces": "",
42
+ "error": "",
43
+ "tparams": [],
44
+ "members": [],
45
+ "notes": [],
46
+ "language": ""
47
+ },
48
+ {
49
+ "type": "PROPERTY",
50
+ "name": "sound",
51
+ "brief": "<span class=\"type\">hash</span> sound data",
52
+ "description": "The sound data used when playing the sound. The type of the property is hash.",
53
+ "returnvalues": [],
54
+ "parameters": [],
55
+ "examples": "How to change the sound:\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=\"c1\">-- load a wav file bundled as a custom resource</span>\n <span class=\"kd\">local</span> <span class=\"n\">wav</span> <span class=\"o\">=</span> <span class=\"n\">sys</span><span class=\"p\">.</span><span class=\"n\">load_resource</span><span class=\"p\">(</span><span class=\"s2\">&quot;foo.wav&quot;</span><span class=\"p\">)</span>\n <span class=\"c1\">-- get resource path to the sound component</span>\n <span class=\"kd\">local</span> <span class=\"n\">resource_path</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;#sound&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;sound&quot;</span><span class=\"p\">)</span>\n <span class=\"c1\">-- update the resource with the loaded wav file</span>\n <span class=\"n\">resource</span><span class=\"p\">.</span><span class=\"n\">set_sound</span><span class=\"p\">(</span><span class=\"n\">resource_path</span><span class=\"p\">,</span> <span class=\"n\">wav</span><span class=\"p\">)</span>\n <span class=\"c1\">-- play the updated sound</span>\n <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">play</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
56
+ "replaces": "",
57
+ "error": "",
58
+ "tparams": [],
59
+ "members": [],
60
+ "notes": [],
61
+ "language": ""
62
+ },
63
+ {
64
+ "type": "FUNCTION",
65
+ "name": "sound.is_music_playing",
66
+ "brief": "check if background music is playing",
67
+ "description": "Checks if background music is playing, e.g. from iTunes.\n<span class=\"icon-macos\"></span><span class=\"icon-windows\"></span><span class=\"icon-linux\"></span><span class=\"icon-html5\"></span> On non mobile platforms,\nthis function always return <code>false</code>.\n<span class=\"icon-attention\"></span><span class=\"icon-android\"></span> On Android you can only get a correct reading\nof this state if your game is not playing any sounds itself. This is a limitation\nin the Android SDK. If your game is playing any sounds, <em>even with a gain of zero</em>, this\nfunction will return <code>false</code>.\nThe best time to call this function is:\n<ul>\n<li>In the <code>init</code> function of your main collection script before any sounds are triggered</li>\n<li>In a window listener callback when the window.WINDOW_EVENT_FOCUS_GAINED event is received</li>\n</ul>\nBoth those times will give you a correct reading of the state even when your application is\nswapped out and in while playing sounds and it works equally well on Android and iOS.",
68
+ "returnvalues": [
69
+ {
70
+ "name": "playing",
71
+ "doc": "<code>true</code> if music is playing, otherwise <code>false</code>.",
72
+ "types": ["boolean"]
73
+ }
74
+ ],
75
+ "parameters": [],
76
+ "examples": "If music is playing, mute \"master\":\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kr\">if</span> <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">is_music_playing</span><span class=\"p\">()</span> <span class=\"kr\">then</span>\n <span class=\"c1\">-- mute &quot;master&quot;</span>\n <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">set_group_gain</span><span class=\"p\">(</span><span class=\"s2\">&quot;master&quot;</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
77
+ "replaces": "",
78
+ "error": "",
79
+ "tparams": [],
80
+ "members": [],
81
+ "notes": [],
82
+ "language": ""
83
+ },
84
+ {
85
+ "type": "FUNCTION",
86
+ "name": "sound.get_rms",
87
+ "brief": "get RMS value from mixer group",
88
+ "description": "Get RMS (Root Mean Square) value from mixer group. This value is the\nsquare root of the mean (average) value of the squared function of\nthe instantaneous values.\nFor instance: for a sinewave signal with a peak gain of -1.94 dB (0.8 linear),\nthe RMS is <code>0.8 &times; 1/sqrt(2)</code> which is about 0.566.\n<span class=\"icon-attention\"></span> Note the returned value might be an approximation and in particular\nthe effective window might be larger than specified.",
89
+ "returnvalues": [
90
+ {
91
+ "name": "rms_l",
92
+ "doc": "RMS value for left channel",
93
+ "types": ["number"]
94
+ },
95
+ {
96
+ "name": "rms_r",
97
+ "doc": "RMS value for right channel",
98
+ "types": ["number"]
99
+ }
100
+ ],
101
+ "parameters": [
102
+ {
103
+ "name": "group",
104
+ "doc": "group name",
105
+ "types": ["string", "hash"],
106
+ "is_optional": "False"
107
+ },
108
+ {
109
+ "name": "window",
110
+ "doc": "window length in seconds",
111
+ "types": ["number"],
112
+ "is_optional": "False"
113
+ }
114
+ ],
115
+ "examples": "Get the RMS from the \"master\" group where a mono -1.94 dB sinewave is playing:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"n\">rms</span> <span class=\"o\">=</span> <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">get_rms</span><span class=\"p\">(</span><span class=\"s2\">&quot;master&quot;</span><span class=\"p\">,</span> <span class=\"mf\">0.1</span><span class=\"p\">)</span> <span class=\"c1\">-- throw away right channel.</span>\n<span class=\"nb\">print</span><span class=\"p\">(</span><span class=\"n\">rms</span><span class=\"p\">)</span> <span class=\"c1\">--&gt; 0.56555819511414</span>\n</code></pre></div>",
116
+ "replaces": "",
117
+ "error": "",
118
+ "tparams": [],
119
+ "members": [],
120
+ "notes": [],
121
+ "language": ""
122
+ },
123
+ {
124
+ "type": "FUNCTION",
125
+ "name": "sound.get_peak",
126
+ "brief": "get peak gain value from mixer group",
127
+ "description": "Get peak value from mixer group.\n<span class=\"icon-attention\"></span> Note that gain is in linear scale, between 0 and 1.\nTo get the dB value from the gain, use the formula <code>20 * log(gain)</code>.\nInversely, to find the linear value from a dB value, use the formula\n<code>10<sup>db/20</sup></code>.\nAlso note that the returned value might be an approximation and in particular\nthe effective window might be larger than specified.",
128
+ "returnvalues": [
129
+ {
130
+ "name": "peak_l",
131
+ "doc": "peak value for left channel",
132
+ "types": ["number"]
133
+ },
134
+ {
135
+ "name": "peak_r",
136
+ "doc": "peak value for right channel",
137
+ "types": ["number"]
138
+ }
139
+ ],
140
+ "parameters": [
141
+ {
142
+ "name": "group",
143
+ "doc": "group name",
144
+ "types": ["string", "hash"],
145
+ "is_optional": "False"
146
+ },
147
+ {
148
+ "name": "window",
149
+ "doc": "window length in seconds",
150
+ "types": ["number"],
151
+ "is_optional": "False"
152
+ }
153
+ ],
154
+ "examples": "Get the peak gain from the \"master\" group and convert to dB for displaying:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"n\">left_p</span><span class=\"p\">,</span> <span class=\"n\">right_p</span> <span class=\"o\">=</span> <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">get_peak</span><span class=\"p\">(</span><span class=\"s2\">&quot;master&quot;</span><span class=\"p\">,</span> <span class=\"mf\">0.1</span><span class=\"p\">)</span>\n<span class=\"n\">left_p_db</span> <span class=\"o\">=</span> <span class=\"mi\">20</span> <span class=\"o\">*</span> <span class=\"n\">log</span><span class=\"p\">(</span><span class=\"n\">left_p</span><span class=\"p\">)</span>\n<span class=\"n\">right_p_db</span> <span class=\"o\">=</span> <span class=\"mi\">20</span> <span class=\"o\">*</span> <span class=\"n\">log</span><span class=\"p\">(</span><span class=\"n\">right_p</span><span class=\"p\">)</span>\n</code></pre></div>",
155
+ "replaces": "",
156
+ "error": "",
157
+ "tparams": [],
158
+ "members": [],
159
+ "notes": [],
160
+ "language": ""
161
+ },
162
+ {
163
+ "type": "FUNCTION",
164
+ "name": "sound.set_group_gain",
165
+ "brief": "set mixer group gain",
166
+ "description": "Set mixer group gain",
167
+ "returnvalues": [],
168
+ "parameters": [
169
+ {
170
+ "name": "group",
171
+ "doc": "group name",
172
+ "types": ["string", "hash"],
173
+ "is_optional": "False"
174
+ },
175
+ {
176
+ "name": "gain",
177
+ "doc": "gain in range [0..1] mapped to [0 .. -60dB]",
178
+ "types": ["number"],
179
+ "is_optional": "False"
180
+ }
181
+ ],
182
+ "examples": "Set mixer group gain on the \"soundfx\" group to 50% (-30dB):\n<div class=\"codehilite\"><pre><span></span><code><span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">set_group_gain</span><span class=\"p\">(</span><span class=\"s2\">&quot;soundfx&quot;</span><span class=\"p\">,</span> <span class=\"mf\">0.5</span><span class=\"p\">)</span>\n</code></pre></div>",
183
+ "replaces": "",
184
+ "error": "",
185
+ "tparams": [],
186
+ "members": [],
187
+ "notes": [],
188
+ "language": ""
189
+ },
190
+ {
191
+ "type": "FUNCTION",
192
+ "name": "sound.get_group_gain",
193
+ "brief": "get mixer group gain",
194
+ "description": "Get mixer group gain",
195
+ "returnvalues": [
196
+ {
197
+ "name": "gain",
198
+ "doc": "gain in [0 1] range ([-60dB.. 0dB])",
199
+ "types": ["number"]
200
+ }
201
+ ],
202
+ "parameters": [
203
+ {
204
+ "name": "group",
205
+ "doc": "group name",
206
+ "types": ["string", "hash"],
207
+ "is_optional": "False"
208
+ }
209
+ ],
210
+ "examples": "Get the mixer group gain for the \"soundfx\" and convert to dB:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"n\">gain</span> <span class=\"o\">=</span> <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">get_group_gain</span><span class=\"p\">(</span><span class=\"s2\">&quot;soundfx&quot;</span><span class=\"p\">)</span>\n<span class=\"kd\">local</span> <span class=\"n\">gain_db</span> <span class=\"o\">=</span> <span class=\"mi\">60</span> <span class=\"o\">*</span> <span class=\"n\">gain</span>\n</code></pre></div>",
211
+ "replaces": "",
212
+ "error": "",
213
+ "tparams": [],
214
+ "members": [],
215
+ "notes": [],
216
+ "language": ""
217
+ },
218
+ {
219
+ "type": "FUNCTION",
220
+ "name": "sound.get_groups",
221
+ "brief": "get all mixer group names",
222
+ "description": "Get a table of all mixer group names (hashes).",
223
+ "returnvalues": [
224
+ {
225
+ "name": "groups",
226
+ "doc": "table of mixer group names",
227
+ "types": ["table"]
228
+ }
229
+ ],
230
+ "parameters": [],
231
+ "examples": "Get the mixer groups, set all gains to 0 except for \"master\" and \"soundfx\"\nwhere gain is set to 1:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"n\">groups</span> <span class=\"o\">=</span> <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">get_groups</span><span class=\"p\">()</span>\n<span class=\"kr\">for</span> <span class=\"n\">_</span><span class=\"p\">,</span><span class=\"n\">group</span> <span class=\"kr\">in</span> <span class=\"nb\">ipairs</span><span class=\"p\">(</span><span class=\"n\">groups</span><span class=\"p\">)</span> <span class=\"kr\">do</span>\n <span class=\"kr\">if</span> <span class=\"n\">group</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;master&quot;</span><span class=\"p\">)</span> <span class=\"ow\">or</span> <span class=\"n\">group</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">&quot;soundfx&quot;</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">set_group_gain</span><span class=\"p\">(</span><span class=\"n\">group</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">)</span>\n <span class=\"kr\">else</span>\n <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">set_group_gain</span><span class=\"p\">(</span><span class=\"n\">group</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">)</span>\n <span class=\"kr\">end</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
232
+ "replaces": "",
233
+ "error": "",
234
+ "tparams": [],
235
+ "members": [],
236
+ "notes": [],
237
+ "language": ""
238
+ },
239
+ {
240
+ "type": "FUNCTION",
241
+ "name": "sound.get_group_name",
242
+ "brief": "get mixer group name string",
243
+ "description": "Get a mixer group name as a string.\n<span class=\"icon-attention\"></span> This function is to be used for debugging and\ndevelopment tooling only. The function does a reverse hash lookup, which does not\nreturn a proper string value when the game is built in release mode.",
244
+ "returnvalues": [
245
+ {
246
+ "name": "name",
247
+ "doc": "group name",
248
+ "types": ["string"]
249
+ }
250
+ ],
251
+ "parameters": [
252
+ {
253
+ "name": "group",
254
+ "doc": "group name",
255
+ "types": ["string", "hash"],
256
+ "is_optional": "False"
257
+ }
258
+ ],
259
+ "examples": "Get the mixer group string names so we can show them as labels on a dev mixer overlay:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"n\">groups</span> <span class=\"o\">=</span> <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">get_groups</span><span class=\"p\">()</span>\n<span class=\"kr\">for</span> <span class=\"n\">_</span><span class=\"p\">,</span><span class=\"n\">group</span> <span class=\"kr\">in</span> <span class=\"nb\">ipairs</span><span class=\"p\">(</span><span class=\"n\">groups</span><span class=\"p\">)</span> <span class=\"kr\">do</span>\n <span class=\"kd\">local</span> <span class=\"n\">name</span> <span class=\"o\">=</span> <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">get_group_name</span><span class=\"p\">(</span><span class=\"n\">group</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=\"s2\">&quot;/mixer_overlay#gui&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;set_mixer_label&quot;</span><span class=\"p\">,</span> <span class=\"p\">{</span> <span class=\"n\">group</span> <span class=\"o\">=</span> <span class=\"n\">group</span><span class=\"p\">,</span> <span class=\"n\">label</span> <span class=\"o\">=</span> <span class=\"n\">name</span><span class=\"p\">})</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
260
+ "replaces": "",
261
+ "error": "",
262
+ "tparams": [],
263
+ "members": [],
264
+ "notes": [],
265
+ "language": ""
266
+ },
267
+ {
268
+ "type": "FUNCTION",
269
+ "name": "sound.is_phone_call_active",
270
+ "brief": "check if a phone call is active",
271
+ "description": "Checks if a phone call is active. If there is an active phone call all\nother sounds will be muted until the phone call is finished.\n<span class=\"icon-macos\"></span><span class=\"icon-windows\"></span><span class=\"icon-linux\"></span><span class=\"icon-html5\"></span> On non mobile platforms,\nthis function always return <code>false</code>.",
272
+ "returnvalues": [
273
+ {
274
+ "name": "call_active",
275
+ "doc": "<code>true</code> if there is an active phone call, <code>false</code> otherwise.",
276
+ "types": ["boolean"]
277
+ }
278
+ ],
279
+ "parameters": [],
280
+ "examples": "Test if a phone call is on-going:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kr\">if</span> <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">is_phone_call_active</span><span class=\"p\">()</span> <span class=\"kr\">then</span>\n <span class=\"c1\">-- do something sensible.</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
281
+ "replaces": "",
282
+ "error": "",
283
+ "tparams": [],
284
+ "members": [],
285
+ "notes": [],
286
+ "language": ""
287
+ },
288
+ {
289
+ "type": "FUNCTION",
290
+ "name": "sound.play",
291
+ "brief": "plays a sound",
292
+ "description": "Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component.\n<span class=\"icon-attention\"></span> A sound will continue to play even if the game object the sound component belonged to is deleted. You can call <code>sound.stop()</code> to stop the sound.",
293
+ "returnvalues": [
294
+ {
295
+ "name": "play_id",
296
+ "doc": "The identifier for the sound voice",
297
+ "types": ["number"]
298
+ }
299
+ ],
300
+ "parameters": [
301
+ {
302
+ "name": "url",
303
+ "doc": "the sound that should play",
304
+ "types": ["string", "hash", "url"],
305
+ "is_optional": "False"
306
+ },
307
+ {
308
+ "name": "play_properties",
309
+ "doc": "<dl>\n<dt>optional table with properties:</dt>\n<dt><code>delay</code></dt>\n<dd><span class=\"type\">number</span> delay in seconds before the sound starts playing, default is 0.</dd>\n<dt><code>gain</code></dt>\n<dd><span class=\"type\">number</span> sound gain between 0 and 1, default is 1. The final gain of the sound will be a combination of this gain, the group gain and the master gain.</dd>\n<dt><code>pan</code></dt>\n<dd><span class=\"type\">number</span> sound pan between -1 and 1, default is 0. The final pan of the sound will be an addition of this pan and the sound pan.</dd>\n<dt><code>speed</code></dt>\n<dd><span class=\"type\">number</span> sound speed where 1.0 is normal speed, 0.5 is half speed and 2.0 is double speed. Valid range is 0.0 to 50.0. The final speed of the sound will be a multiplication of this speed and the sound speed.</dd>\n<dt><code>start_time</code></dt>\n<dd><span class=\"type\">number</span> start playback offset (seconds). Optional, mutually exclusive with <code>start_frame</code>.</dd>\n<dt><code>start_frame</code></dt>\n<dd><span class=\"type\">number</span> start playback offset (frames/samples). Optional, mutually exclusive with <code>start_time</code>. If both are provided, <code>start_frame</code> is used.</dd>\n</dl>",
310
+ "types": ["table"],
311
+ "is_optional": "True"
312
+ },
313
+ {
314
+ "name": "complete_function",
315
+ "doc": "function to call when the sound has finished playing or stopped manually via <a href=\"/ref/sound#sound.stop\">sound.stop</a>.\n<dl>\n<dt><code>self</code></dt>\n<dd><span class=\"type\">object</span> The current object.</dd>\n<dt><code>message_id</code></dt>\n<dd><span class=\"type\">hash</span> The name of the completion message, which can be either <code>\"sound_done\"</code> if the sound has finished playing, or <code>\"sound_stopped\"</code> if it was stopped manually.</dd>\n<dt><code>message</code></dt>\n<dd><span class=\"type\">table</span> Information about the completion:</dd>\n</dl>\n<ul>\n<li><span class=\"type\">number</span> <code>play_id</code> - the sequential play identifier that was given by the sound.play function.</li>\n</ul>\n<dl>\n<dt><code>sender</code></dt>\n<dd><span class=\"type\">url</span> The invoker of the callback: the sound component.</dd>\n</dl>",
316
+ "types": ["function(self, message_id, message, sender)"],
317
+ "is_optional": "True"
318
+ }
319
+ ],
320
+ "examples": "Assuming the script belongs to an instance with a sound-component with id \"sound\", this will make the component play its sound after 1 second:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">play</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">,</span> <span class=\"p\">{</span> <span class=\"n\">delay</span> <span class=\"o\">=</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"n\">gain</span> <span class=\"o\">=</span> <span class=\"mf\">0.9</span><span class=\"p\">,</span> <span class=\"n\">pan</span> <span class=\"o\">=</span> <span class=\"o\">-</span><span class=\"mf\">1.0</span> <span class=\"p\">}</span> <span class=\"p\">)</span>\n</code></pre></div>\n\nUsing the callback argument, you can chain several sounds together:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"kr\">function</span> <span class=\"nf\">sound_done</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\">-- play &#39;boom&#39; sound fx when the countdown has completed</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;sound_done&quot;</span><span class=\"p\">)</span> <span class=\"ow\">and</span> <span class=\"n\">message</span><span class=\"p\">.</span><span class=\"n\">play_id</span> <span class=\"o\">==</span> <span class=\"n\">self</span><span class=\"p\">.</span><span class=\"n\">countdown_id</span> <span class=\"kr\">then</span>\n <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">play</span><span class=\"p\">(</span><span class=\"s2\">&quot;#boom&quot;</span><span class=\"p\">,</span> <span class=\"kc\">nil</span><span class=\"p\">,</span> <span class=\"n\">sound_done</span><span class=\"p\">)</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\">self</span><span class=\"p\">.</span><span class=\"n\">countdown_id</span> <span class=\"o\">=</span> <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">play</span><span class=\"p\">(</span><span class=\"s2\">&quot;#countdown&quot;</span><span class=\"p\">,</span> <span class=\"kc\">nil</span><span class=\"p\">,</span> <span class=\"n\">sound_done</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
321
+ "replaces": "",
322
+ "error": "",
323
+ "tparams": [],
324
+ "members": [],
325
+ "notes": [
326
+ "Sounds are panned using a constant power panning (non linear fade). 0 means left/right channels are balanced at 71%/71% each.\nAt -1 (full left) the channels are at 100%/0%, and 1 they're at 0%/100%."
327
+ ],
328
+ "language": ""
329
+ },
330
+ {
331
+ "type": "FUNCTION",
332
+ "name": "sound.stop",
333
+ "brief": "stop a playing a sound(s)",
334
+ "description": "Stop playing all active voices or just one voice if <code>play_id</code> provided",
335
+ "returnvalues": [],
336
+ "parameters": [
337
+ {
338
+ "name": "url",
339
+ "doc": "the sound component that should stop",
340
+ "types": ["string", "hash", "url"],
341
+ "is_optional": "False"
342
+ },
343
+ {
344
+ "name": "stop_properties",
345
+ "doc": "<dl>\n<dt>optional table with properties:</dt>\n<dt><code>play_id</code></dt>\n<dd><span class=\"type\">number</span> the sequential play identifier that should be stopped (was given by the sound.play() function)</dd>\n</dl>",
346
+ "types": ["table"],
347
+ "is_optional": "True"
348
+ }
349
+ ],
350
+ "examples": "Assuming the script belongs to an instance with a sound-component with id \"sound\", this will make the component stop all playing voices:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">stop</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">)</span>\n<span class=\"kd\">local</span> <span class=\"n\">id</span> <span class=\"o\">=</span> <span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">play</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">)</span>\n<span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">stop</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">,</span> <span class=\"p\">{</span><span class=\"n\">play_id</span> <span class=\"o\">=</span> <span class=\"n\">id</span><span class=\"p\">})</span>\n</code></pre></div>",
351
+ "replaces": "",
352
+ "error": "",
353
+ "tparams": [],
354
+ "members": [],
355
+ "notes": [],
356
+ "language": ""
357
+ },
358
+ {
359
+ "type": "FUNCTION",
360
+ "name": "sound.pause",
361
+ "brief": "pause a playing a sound(s)",
362
+ "description": "Pause all active voices",
363
+ "returnvalues": [],
364
+ "parameters": [
365
+ {
366
+ "name": "url",
367
+ "doc": "the sound that should pause",
368
+ "types": ["string", "hash", "url"],
369
+ "is_optional": "False"
370
+ },
371
+ {
372
+ "name": "pause",
373
+ "doc": "true if the sound should pause",
374
+ "types": ["boolean"],
375
+ "is_optional": "False"
376
+ }
377
+ ],
378
+ "examples": "Assuming the script belongs to an instance with a sound-component with id \"sound\", this will make the component pause all playing voices:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">pause</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">,</span> <span class=\"kc\">true</span><span class=\"p\">)</span>\n</code></pre></div>",
379
+ "replaces": "",
380
+ "error": "",
381
+ "tparams": [],
382
+ "members": [],
383
+ "notes": [],
384
+ "language": ""
385
+ },
386
+ {
387
+ "type": "FUNCTION",
388
+ "name": "sound.set_gain",
389
+ "brief": "set sound gain",
390
+ "description": "Set gain on all active playing voices of a sound.",
391
+ "returnvalues": [],
392
+ "parameters": [
393
+ {
394
+ "name": "url",
395
+ "doc": "the sound to set the gain of",
396
+ "types": ["string", "hash", "url"],
397
+ "is_optional": "False"
398
+ },
399
+ {
400
+ "name": "gain",
401
+ "doc": "sound gain between 0 and 1 [-60dB .. 0dB]. The final gain of the sound will be a combination of this gain, the group gain and the master gain.",
402
+ "types": ["number"],
403
+ "is_optional": "True"
404
+ }
405
+ ],
406
+ "examples": "Assuming the script belongs to an instance with a sound-component with id \"sound\", this will set the gain to 0.9\n<div class=\"codehilite\"><pre><span></span><code><span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">set_gain</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">,</span> <span class=\"mf\">0.9</span><span class=\"p\">)</span>\n</code></pre></div>",
407
+ "replaces": "",
408
+ "error": "",
409
+ "tparams": [],
410
+ "members": [],
411
+ "notes": [],
412
+ "language": ""
413
+ },
414
+ {
415
+ "type": "FUNCTION",
416
+ "name": "sound.set_pan",
417
+ "brief": "set sound pan",
418
+ "description": "Set panning on all active playing voices of a sound.\nThe valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right.",
419
+ "returnvalues": [],
420
+ "parameters": [
421
+ {
422
+ "name": "url",
423
+ "doc": "the sound to set the panning value to",
424
+ "types": ["string", "hash", "url"],
425
+ "is_optional": "False"
426
+ },
427
+ {
428
+ "name": "pan",
429
+ "doc": "sound panning between -1.0 and 1.0",
430
+ "types": ["number"],
431
+ "is_optional": "True"
432
+ }
433
+ ],
434
+ "examples": "Assuming the script belongs to an instance with a sound-component with id \"sound\", this will set the gain to 0.5\n<div class=\"codehilite\"><pre><span></span><code><span class=\"n\">sound</span><span class=\"p\">.</span><span class=\"n\">set_pan</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">,</span> <span class=\"mf\">0.5</span><span class=\"p\">)</span> <span class=\"c1\">-- pan to the right</span>\n</code></pre></div>",
435
+ "replaces": "",
436
+ "error": "",
437
+ "tparams": [],
438
+ "members": [],
439
+ "notes": [
440
+ "Sounds are panned using a constant power panning (non linear fade). 0 means left/right channels are balanced at 71%/71% each.\nAt -1 (full left) the channels are at 100%/0%, and 1 they're at 0%/100%."
441
+ ],
442
+ "language": ""
443
+ },
444
+ {
445
+ "type": "MESSAGE",
446
+ "name": "play_sound",
447
+ "brief": "plays a sound",
448
+ "description": "Post this message to a sound-component to make it play its sound. Multiple voices is supported. The limit is set to 32 voices per sound component.\n<span class=\"icon-attention\"></span> Note that gain is in linear scale, between 0 and 1.\nTo get the dB value from the gain, use the formula <code>20 * log(gain)</code>.\nInversely, to find the linear value from a dB value, use the formula\n<code>10<sup>db/20</sup></code>.\n<span class=\"icon-attention\"></span> A sound will continue to play even if the game object the sound component belonged to is deleted. You can send a <code>stop_sound</code> to stop the sound.\n<span class=\"icon-attention\"></span> <code>play_id</code> should be specified in case you want to receive <code>sound_done</code> or <code>sound_stopped</code> in <code>on_message()</code>.",
449
+ "returnvalues": [],
450
+ "parameters": [
451
+ {
452
+ "name": "delay",
453
+ "doc": "delay in seconds before the sound starts playing, default is 0.",
454
+ "types": ["number"],
455
+ "is_optional": "True"
456
+ },
457
+ {
458
+ "name": "gain",
459
+ "doc": "sound gain between 0 and 1, default is 1.",
460
+ "types": ["number"],
461
+ "is_optional": "True"
462
+ },
463
+ {
464
+ "name": "play_id",
465
+ "doc": "the identifier of the sound, can be used to distinguish between consecutive plays from the same component.",
466
+ "types": ["number"],
467
+ "is_optional": "True"
468
+ },
469
+ {
470
+ "name": "start_time",
471
+ "doc": "optional start offset (seconds). Mutually exclusive with <code>start_frame</code>.",
472
+ "types": ["number"],
473
+ "is_optional": "True"
474
+ },
475
+ {
476
+ "name": "start_frame",
477
+ "doc": "optional start offset (frames). If both are provided, <code>start_frame</code> is used.",
478
+ "types": ["number"],
479
+ "is_optional": "True"
480
+ }
481
+ ],
482
+ "examples": "Assuming the script belongs to an instance with a sound-component with id \"sound\", this will make the component play its sound after 1 second:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"n\">msg</span><span class=\"p\">.</span><span class=\"n\">post</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;play_sound&quot;</span><span class=\"p\">,</span> <span class=\"p\">{</span><span class=\"n\">delay</span> <span class=\"o\">=</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"n\">gain</span> <span class=\"o\">=</span> <span class=\"mf\">0.5</span><span class=\"p\">})</span>\n</code></pre></div>\n\n<div class=\"codehilite\"><pre><span></span><code><span class=\"c1\">-- use `play_id` and `msg.post()` if you want to recieve `sound_done` or `sound_stopped` in on_message()</span>\n<span class=\"kr\">function</span> <span class=\"nf\">init</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=\"s2\">&quot;#sound&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;play_sound&quot;</span><span class=\"p\">,</span> <span class=\"p\">{</span><span class=\"n\">play_id</span> <span class=\"o\">=</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"n\">delay</span> <span class=\"o\">=</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"n\">gain</span> <span class=\"o\">=</span> <span class=\"mf\">0.5</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>\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;sound_done&quot;</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"nb\">print</span><span class=\"p\">(</span><span class=\"s2\">&quot;Sound play id: &quot;</span><span class=\"o\">..</span><span class=\"n\">message</span><span class=\"p\">.</span><span class=\"n\">play_id</span><span class=\"p\">)</span>\n <span class=\"kr\">end</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
483
+ "replaces": "",
484
+ "error": "",
485
+ "tparams": [],
486
+ "members": [],
487
+ "notes": [],
488
+ "language": ""
489
+ },
490
+ {
491
+ "type": "MESSAGE",
492
+ "name": "stop_sound",
493
+ "brief": "stop a playing a sound(s)",
494
+ "description": "Post this message to a sound-component to make it stop playing all active voices",
495
+ "returnvalues": [],
496
+ "parameters": [],
497
+ "examples": "Assuming the script belongs to an instance with a sound-component with id \"sound\", this will make the component stop all playing voices:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"n\">msg</span><span class=\"p\">.</span><span class=\"n\">post</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;stop_sound&quot;</span><span class=\"p\">)</span>\n</code></pre></div>",
498
+ "replaces": "",
499
+ "error": "",
500
+ "tparams": [],
501
+ "members": [],
502
+ "notes": [],
503
+ "language": ""
504
+ },
505
+ {
506
+ "type": "MESSAGE",
507
+ "name": "set_gain",
508
+ "brief": "set sound gain",
509
+ "description": "Post this message to a sound-component to set gain on all active playing voices.\n<span class=\"icon-attention\"></span> Note that gain is in linear scale, between 0 and 1.\nTo get the dB value from the gain, use the formula <code>20 * log(gain)</code>.\nInversely, to find the linear value from a dB value, use the formula\n<code>10<sup>db/20</sup></code>.",
510
+ "returnvalues": [],
511
+ "parameters": [
512
+ {
513
+ "name": "gain",
514
+ "doc": "sound gain between 0 and 1, default is 1.",
515
+ "types": ["number"],
516
+ "is_optional": "True"
517
+ }
518
+ ],
519
+ "examples": "Assuming the script belongs to an instance with a sound-component with id \"sound\", this will set the gain to 0.5\n<div class=\"codehilite\"><pre><span></span><code><span class=\"n\">msg</span><span class=\"p\">.</span><span class=\"n\">post</span><span class=\"p\">(</span><span class=\"s2\">&quot;#sound&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;set_gain&quot;</span><span class=\"p\">,</span> <span class=\"p\">{</span><span class=\"n\">gain</span> <span class=\"o\">=</span> <span class=\"mf\">0.5</span><span class=\"p\">})</span>\n</code></pre></div>",
520
+ "replaces": "",
521
+ "error": "",
522
+ "tparams": [],
523
+ "members": [],
524
+ "notes": [],
525
+ "language": ""
526
+ },
527
+ {
528
+ "type": "MESSAGE",
529
+ "name": "sound_done",
530
+ "brief": "reports when a sound has finished playing",
531
+ "description": "This message is sent back to the sender of a <code>play_sound</code> message\nif the sound could be played to completion and a <code>play_id</code> was provided with the <code>play_sound</code> message.",
532
+ "returnvalues": [],
533
+ "parameters": [
534
+ {
535
+ "name": "play_id",
536
+ "doc": "id number supplied when the message was posted.",
537
+ "types": ["number"],
538
+ "is_optional": "True"
539
+ }
540
+ ],
541
+ "examples": "",
542
+ "replaces": "",
543
+ "error": "",
544
+ "tparams": [],
545
+ "members": [],
546
+ "notes": [],
547
+ "language": ""
548
+ },
549
+ {
550
+ "type": "MESSAGE",
551
+ "name": "sound_stopped",
552
+ "brief": "reports when a sound has been manually stopped",
553
+ "description": "This message is sent back to the sender of a <code>play_sound</code> message, if the sound\nhas been manually stopped and a <code>play_id</code> was provided with the <code>play_sound</code> message.",
554
+ "returnvalues": [],
555
+ "parameters": [
556
+ {
557
+ "name": "play_id",
558
+ "doc": "id number supplied when the message was posted.",
559
+ "types": ["number"],
560
+ "is_optional": "True"
561
+ }
562
+ ],
563
+ "examples": "",
564
+ "replaces": "",
565
+ "error": "",
566
+ "tparams": [],
567
+ "members": [],
568
+ "notes": [],
569
+ "language": ""
570
+ }
571
+ ],
572
+ "info": {
573
+ "namespace": "sound",
574
+ "name": "Sound",
575
+ "brief": "Sound API documentation",
576
+ "description": "Functions and messages for controlling sound components and\nmixer groups.",
577
+ "path": "engine/gamesys/src/gamesys/scripts/script_sound.cpp",
578
+ "file": "",
579
+ "notes": [],
580
+ "language": "Lua"
581
+ }
582
+ }