@defold-typescript/types 0.53.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.
- package/dist/cli-runtime.js +8966 -0
- package/dist/identity-vocabulary.json +660 -0
- package/dist/src/index.d.ts +18 -0
- package/fixtures/defold-1.12.4/b2d_body_doc.json +1327 -0
- package/fixtures/defold-1.12.4/b2d_doc.json +107 -0
- package/fixtures/defold-1.12.4/base_doc.json +758 -0
- package/fixtures/defold-1.12.4/bit_doc.json +404 -0
- package/fixtures/defold-1.12.4/buffer_doc.json +422 -0
- package/fixtures/defold-1.12.4/camera_doc.json +664 -0
- package/fixtures/defold-1.12.4/collectionfactory_doc.json +219 -0
- package/fixtures/defold-1.12.4/collectionproxy_doc.json +289 -0
- package/fixtures/defold-1.12.4/coroutine_doc.json +151 -0
- package/fixtures/defold-1.12.4/crash_doc.json +497 -0
- package/fixtures/defold-1.12.4/debug_doc.json +410 -0
- package/fixtures/defold-1.12.4/factory_doc.json +219 -0
- package/fixtures/defold-1.12.4/font_doc.json +141 -0
- package/fixtures/defold-1.12.4/globals_doc.json +42 -0
- package/fixtures/defold-1.12.4/go-instance-functions.json +111 -0
- package/fixtures/defold-1.12.4/go_doc.json +1901 -0
- package/fixtures/defold-1.12.4/graphics_doc.json +1634 -0
- package/fixtures/defold-1.12.4/gui_doc.json +5249 -0
- package/fixtures/defold-1.12.4/html5_doc.json +64 -0
- package/fixtures/defold-1.12.4/http_doc.json +66 -0
- package/fixtures/defold-1.12.4/image_doc.json +170 -0
- package/fixtures/defold-1.12.4/io_doc.json +399 -0
- package/fixtures/defold-1.12.4/json_doc.json +97 -0
- package/fixtures/defold-1.12.4/label_doc.json +220 -0
- package/fixtures/defold-1.12.4/liveupdate_doc.json +308 -0
- package/fixtures/defold-1.12.4/math_doc.json +702 -0
- package/fixtures/defold-1.12.4/messages_doc.json +579 -0
- package/fixtures/defold-1.12.4/model_doc.json +315 -0
- package/fixtures/defold-1.12.4/msg_doc.json +137 -0
- package/fixtures/defold-1.12.4/os_doc.json +266 -0
- package/fixtures/defold-1.12.4/package_doc.json +139 -0
- package/fixtures/defold-1.12.4/particlefx_doc.json +249 -0
- package/fixtures/defold-1.12.4/physics_doc.json +1120 -0
- package/fixtures/defold-1.12.4/profiler_doc.json +375 -0
- package/fixtures/defold-1.12.4/render_doc.json +1167 -0
- package/fixtures/defold-1.12.4/resource_doc.json +762 -0
- package/fixtures/defold-1.12.4/socket_doc.json +2194 -0
- package/fixtures/defold-1.12.4/sound_doc.json +582 -0
- package/fixtures/defold-1.12.4/sprite_doc.json +245 -0
- package/fixtures/defold-1.12.4/string_doc.json +412 -0
- package/fixtures/defold-1.12.4/sys_doc.json +853 -0
- package/fixtures/defold-1.12.4/table_doc.json +166 -0
- package/fixtures/defold-1.12.4/tilemap_doc.json +374 -0
- package/fixtures/defold-1.12.4/timer_doc.json +153 -0
- package/fixtures/defold-1.12.4/types_doc.json +212 -0
- package/fixtures/defold-1.12.4/vmath_doc.json +1814 -0
- package/fixtures/defold-1.12.4/window_doc.json +388 -0
- package/fixtures/defold-1.12.4/zlib_doc.json +70 -0
- package/fixtures/defold-1.13.0/b2d_body_doc.json +2428 -0
- package/fixtures/defold-1.13.0/b2d_chain_doc.json +394 -0
- package/fixtures/defold-1.13.0/b2d_doc.json +128 -0
- package/fixtures/defold-1.13.0/b2d_fixture_doc.json +594 -0
- package/fixtures/defold-1.13.0/b2d_joint_doc.json +3315 -0
- package/fixtures/defold-1.13.0/b2d_shape_doc.json +802 -0
- package/fixtures/defold-1.13.0/b2d_world_doc.json +1314 -0
- package/fixtures/defold-1.13.0/base_doc.json +758 -0
- package/fixtures/defold-1.13.0/bit_doc.json +404 -0
- package/fixtures/defold-1.13.0/buffer_doc.json +422 -0
- package/fixtures/defold-1.13.0/camera_doc.json +900 -0
- package/fixtures/defold-1.13.0/collectionfactory_doc.json +219 -0
- package/fixtures/defold-1.13.0/collectionproxy_doc.json +289 -0
- package/fixtures/defold-1.13.0/compute_doc.json +182 -0
- package/fixtures/defold-1.13.0/coroutine_doc.json +151 -0
- package/fixtures/defold-1.13.0/crash_doc.json +497 -0
- package/fixtures/defold-1.13.0/debug_doc.json +410 -0
- package/fixtures/defold-1.13.0/editor_doc.json +3665 -0
- package/fixtures/defold-1.13.0/editor_http_doc.json +273 -0
- package/fixtures/defold-1.13.0/editor_json_doc.json +59 -0
- package/fixtures/defold-1.13.0/editor_localization_doc.json +138 -0
- package/fixtures/defold-1.13.0/editor_pprint_doc.json +36 -0
- package/fixtures/defold-1.13.0/editor_tilemap_tiles_doc.json +235 -0
- package/fixtures/defold-1.13.0/editor_zip_doc.json +163 -0
- package/fixtures/defold-1.13.0/editor_zlib_doc.json +48 -0
- package/fixtures/defold-1.13.0/factory_doc.json +219 -0
- package/fixtures/defold-1.13.0/font_doc.json +141 -0
- package/fixtures/defold-1.13.0/globals_doc.json +42 -0
- package/fixtures/defold-1.13.0/go-instance-functions.json +101 -0
- package/fixtures/defold-1.13.0/go_doc.json +1989 -0
- package/fixtures/defold-1.13.0/graphics_doc.json +1886 -0
- package/fixtures/defold-1.13.0/gui_doc.json +5277 -0
- package/fixtures/defold-1.13.0/html5_doc.json +64 -0
- package/fixtures/defold-1.13.0/http_doc.json +66 -0
- package/fixtures/defold-1.13.0/image_doc.json +170 -0
- package/fixtures/defold-1.13.0/import-manifest.json +10558 -0
- package/fixtures/defold-1.13.0/io_doc.json +399 -0
- package/fixtures/defold-1.13.0/json_doc.json +97 -0
- package/fixtures/defold-1.13.0/label_doc.json +220 -0
- package/fixtures/defold-1.13.0/liveupdate_doc.json +330 -0
- package/fixtures/defold-1.13.0/material_doc.json +238 -0
- package/fixtures/defold-1.13.0/math_doc.json +702 -0
- package/fixtures/defold-1.13.0/model_doc.json +412 -0
- package/fixtures/defold-1.13.0/msg_doc.json +137 -0
- package/fixtures/defold-1.13.0/os_doc.json +266 -0
- package/fixtures/defold-1.13.0/package_doc.json +139 -0
- package/fixtures/defold-1.13.0/particlefx_doc.json +249 -0
- package/fixtures/defold-1.13.0/physics_doc.json +1492 -0
- package/fixtures/defold-1.13.0/profiler_doc.json +375 -0
- package/fixtures/defold-1.13.0/render_doc.json +1381 -0
- package/fixtures/defold-1.13.0/resource_doc.json +762 -0
- package/fixtures/defold-1.13.0/socket_doc.json +2194 -0
- package/fixtures/defold-1.13.0/sound_doc.json +582 -0
- package/fixtures/defold-1.13.0/sprite_doc.json +335 -0
- package/fixtures/defold-1.13.0/string_doc.json +412 -0
- package/fixtures/defold-1.13.0/sys_doc.json +1142 -0
- package/fixtures/defold-1.13.0/table_doc.json +166 -0
- package/fixtures/defold-1.13.0/tilemap_doc.json +402 -0
- package/fixtures/defold-1.13.0/timer_doc.json +153 -0
- package/fixtures/defold-1.13.0/types_doc.json +212 -0
- package/fixtures/defold-1.13.0/vmath_doc.json +1814 -0
- package/fixtures/defold-1.13.0/window_doc.json +388 -0
- package/fixtures/defold-1.13.0/zlib_doc.json +70 -0
- package/fixtures/defold-1.13.1/b2d_body_doc.json +2428 -0
- package/fixtures/defold-1.13.1/b2d_chain_doc.json +394 -0
- package/fixtures/defold-1.13.1/b2d_doc.json +128 -0
- package/fixtures/defold-1.13.1/b2d_fixture_doc.json +594 -0
- package/fixtures/defold-1.13.1/b2d_joint_doc.json +3315 -0
- package/fixtures/defold-1.13.1/b2d_shape_doc.json +802 -0
- package/fixtures/defold-1.13.1/b2d_world_doc.json +1314 -0
- package/fixtures/defold-1.13.1/base_doc.json +758 -0
- package/fixtures/defold-1.13.1/bit_doc.json +404 -0
- package/fixtures/defold-1.13.1/buffer_doc.json +422 -0
- package/fixtures/defold-1.13.1/camera_doc.json +900 -0
- package/fixtures/defold-1.13.1/collectionfactory_doc.json +219 -0
- package/fixtures/defold-1.13.1/collectionproxy_doc.json +323 -0
- package/fixtures/defold-1.13.1/compute_doc.json +182 -0
- package/fixtures/defold-1.13.1/coroutine_doc.json +151 -0
- package/fixtures/defold-1.13.1/crash_doc.json +497 -0
- package/fixtures/defold-1.13.1/debug_doc.json +410 -0
- package/fixtures/defold-1.13.1/editor_doc.json +3880 -0
- package/fixtures/defold-1.13.1/editor_http_doc.json +273 -0
- package/fixtures/defold-1.13.1/editor_image_doc.json +128 -0
- package/fixtures/defold-1.13.1/editor_json_doc.json +59 -0
- package/fixtures/defold-1.13.1/editor_localization_doc.json +138 -0
- package/fixtures/defold-1.13.1/editor_pprint_doc.json +36 -0
- package/fixtures/defold-1.13.1/editor_tilemap_tiles_doc.json +235 -0
- package/fixtures/defold-1.13.1/editor_zip_doc.json +163 -0
- package/fixtures/defold-1.13.1/editor_zlib_doc.json +48 -0
- package/fixtures/defold-1.13.1/factory_doc.json +219 -0
- package/fixtures/defold-1.13.1/font_doc.json +141 -0
- package/fixtures/defold-1.13.1/globals_doc.json +42 -0
- package/fixtures/defold-1.13.1/go-instance-functions.json +102 -0
- package/fixtures/defold-1.13.1/go_doc.json +1989 -0
- package/fixtures/defold-1.13.1/graphics_doc.json +1886 -0
- package/fixtures/defold-1.13.1/gui_doc.json +5277 -0
- package/fixtures/defold-1.13.1/html5_doc.json +64 -0
- package/fixtures/defold-1.13.1/http_doc.json +66 -0
- package/fixtures/defold-1.13.1/image_doc.json +170 -0
- package/fixtures/defold-1.13.1/import-manifest.json +10091 -0
- package/fixtures/defold-1.13.1/io_doc.json +399 -0
- package/fixtures/defold-1.13.1/json_doc.json +97 -0
- package/fixtures/defold-1.13.1/label_doc.json +220 -0
- package/fixtures/defold-1.13.1/liveupdate_doc.json +330 -0
- package/fixtures/defold-1.13.1/material_doc.json +238 -0
- package/fixtures/defold-1.13.1/math_doc.json +702 -0
- package/fixtures/defold-1.13.1/model_doc.json +412 -0
- package/fixtures/defold-1.13.1/msg_doc.json +137 -0
- package/fixtures/defold-1.13.1/os_doc.json +266 -0
- package/fixtures/defold-1.13.1/package_doc.json +139 -0
- package/fixtures/defold-1.13.1/particlefx_doc.json +249 -0
- package/fixtures/defold-1.13.1/physics_doc.json +1492 -0
- package/fixtures/defold-1.13.1/profiler_doc.json +375 -0
- package/fixtures/defold-1.13.1/render_doc.json +1381 -0
- package/fixtures/defold-1.13.1/resource_doc.json +762 -0
- package/fixtures/defold-1.13.1/socket_doc.json +2194 -0
- package/fixtures/defold-1.13.1/sound_doc.json +582 -0
- package/fixtures/defold-1.13.1/sprite_doc.json +335 -0
- package/fixtures/defold-1.13.1/string_doc.json +412 -0
- package/fixtures/defold-1.13.1/sys_doc.json +1142 -0
- package/fixtures/defold-1.13.1/table_doc.json +166 -0
- package/fixtures/defold-1.13.1/tilemap_doc.json +402 -0
- package/fixtures/defold-1.13.1/timer_doc.json +153 -0
- package/fixtures/defold-1.13.1/types_doc.json +212 -0
- package/fixtures/defold-1.13.1/vmath_doc.json +1814 -0
- package/fixtures/defold-1.13.1/window_doc.json +388 -0
- package/fixtures/defold-1.13.1/zlib_doc.json +70 -0
- package/fixtures/defold-1.13.2/b2d_body_doc.json +2359 -0
- package/fixtures/defold-1.13.2/b2d_chain_doc.json +395 -0
- package/fixtures/defold-1.13.2/b2d_doc.json +1945 -0
- package/fixtures/defold-1.13.2/b2d_fixture_doc.json +595 -0
- package/fixtures/defold-1.13.2/b2d_joint_doc.json +3178 -0
- package/fixtures/defold-1.13.2/b2d_shape_doc.json +767 -0
- package/fixtures/defold-1.13.2/b2d_world_doc.json +1315 -0
- package/fixtures/defold-1.13.2/base_doc.json +759 -0
- package/fixtures/defold-1.13.2/bit_doc.json +405 -0
- package/fixtures/defold-1.13.2/buffer_doc.json +393 -0
- package/fixtures/defold-1.13.2/bullet3d_collision_object_doc.json +1206 -0
- package/fixtures/defold-1.13.2/bullet3d_constraint_doc.json +2455 -0
- package/fixtures/defold-1.13.2/bullet3d_doc.json +215 -0
- package/fixtures/defold-1.13.2/bullet3d_rigid_body_doc.json +1376 -0
- package/fixtures/defold-1.13.2/bullet3d_shape_doc.json +430 -0
- package/fixtures/defold-1.13.2/bullet3d_world_doc.json +855 -0
- package/fixtures/defold-1.13.2/camera_doc.json +887 -0
- package/fixtures/defold-1.13.2/collectionfactory_doc.json +206 -0
- package/fixtures/defold-1.13.2/collectionproxy_doc.json +397 -0
- package/fixtures/defold-1.13.2/compute_doc.json +183 -0
- package/fixtures/defold-1.13.2/coroutine_doc.json +152 -0
- package/fixtures/defold-1.13.2/crash_doc.json +483 -0
- package/fixtures/defold-1.13.2/debug_doc.json +411 -0
- package/fixtures/defold-1.13.2/editor_doc.json +6320 -0
- package/fixtures/defold-1.13.2/editor_http_doc.json +476 -0
- package/fixtures/defold-1.13.2/editor_image_doc.json +129 -0
- package/fixtures/defold-1.13.2/editor_json_doc.json +81 -0
- package/fixtures/defold-1.13.2/editor_localization_doc.json +139 -0
- package/fixtures/defold-1.13.2/editor_pprint_doc.json +37 -0
- package/fixtures/defold-1.13.2/editor_tilemap_tiles_doc.json +292 -0
- package/fixtures/defold-1.13.2/editor_zip_doc.json +237 -0
- package/fixtures/defold-1.13.2/editor_zlib_doc.json +49 -0
- package/fixtures/defold-1.13.2/factory_doc.json +206 -0
- package/fixtures/defold-1.13.2/font_doc.json +230 -0
- package/fixtures/defold-1.13.2/globals_doc.json +64 -0
- package/fixtures/defold-1.13.2/go-instance-functions.json +106 -0
- package/fixtures/defold-1.13.2/go_doc.json +1789 -0
- package/fixtures/defold-1.13.2/graphics_doc.json +1211 -0
- package/fixtures/defold-1.13.2/gui_doc.json +4735 -0
- package/fixtures/defold-1.13.2/html5_doc.json +65 -0
- package/fixtures/defold-1.13.2/http_doc.json +174 -0
- package/fixtures/defold-1.13.2/image_doc.json +298 -0
- package/fixtures/defold-1.13.2/import-manifest.json +10902 -0
- package/fixtures/defold-1.13.2/io_doc.json +400 -0
- package/fixtures/defold-1.13.2/json_doc.json +140 -0
- package/fixtures/defold-1.13.2/label_doc.json +427 -0
- package/fixtures/defold-1.13.2/liveupdate_doc.json +221 -0
- package/fixtures/defold-1.13.2/material_doc.json +773 -0
- package/fixtures/defold-1.13.2/math_doc.json +703 -0
- package/fixtures/defold-1.13.2/model_doc.json +472 -0
- package/fixtures/defold-1.13.2/msg_doc.json +169 -0
- package/fixtures/defold-1.13.2/os_doc.json +269 -0
- package/fixtures/defold-1.13.2/package_doc.json +140 -0
- package/fixtures/defold-1.13.2/particlefx_doc.json +249 -0
- package/fixtures/defold-1.13.2/physics_doc.json +1624 -0
- package/fixtures/defold-1.13.2/profiler_doc.json +348 -0
- package/fixtures/defold-1.13.2/render_doc.json +1623 -0
- package/fixtures/defold-1.13.2/resource_doc.json +1539 -0
- package/fixtures/defold-1.13.2/socket_doc.json +2335 -0
- package/fixtures/defold-1.13.2/sound_doc.json +673 -0
- package/fixtures/defold-1.13.2/sprite_doc.json +364 -0
- package/fixtures/defold-1.13.2/string_doc.json +413 -0
- package/fixtures/defold-1.13.2/sys_doc.json +1347 -0
- package/fixtures/defold-1.13.2/table_doc.json +167 -0
- package/fixtures/defold-1.13.2/tilemap_doc.json +369 -0
- package/fixtures/defold-1.13.2/timer_doc.json +214 -0
- package/fixtures/defold-1.13.2/types_doc.json +213 -0
- package/fixtures/defold-1.13.2/vmath_doc.json +2056 -0
- package/fixtures/defold-1.13.2/window_doc.json +426 -0
- package/fixtures/defold-1.13.2/zlib_doc.json +71 -0
- package/fixtures/defold-1.14.0/b2d_body_doc.json +2359 -0
- package/fixtures/defold-1.14.0/b2d_chain_doc.json +395 -0
- package/fixtures/defold-1.14.0/b2d_doc.json +1973 -0
- package/fixtures/defold-1.14.0/b2d_fixture_doc.json +595 -0
- package/fixtures/defold-1.14.0/b2d_joint_doc.json +3178 -0
- package/fixtures/defold-1.14.0/b2d_shape_doc.json +767 -0
- package/fixtures/defold-1.14.0/b2d_world_doc.json +1315 -0
- package/fixtures/defold-1.14.0/base_doc.json +759 -0
- package/fixtures/defold-1.14.0/bit_doc.json +405 -0
- package/fixtures/defold-1.14.0/buffer_doc.json +393 -0
- package/fixtures/defold-1.14.0/bullet3d_collision_object_doc.json +1206 -0
- package/fixtures/defold-1.14.0/bullet3d_constraint_doc.json +2455 -0
- package/fixtures/defold-1.14.0/bullet3d_doc.json +243 -0
- package/fixtures/defold-1.14.0/bullet3d_rigid_body_doc.json +1376 -0
- package/fixtures/defold-1.14.0/bullet3d_shape_doc.json +430 -0
- package/fixtures/defold-1.14.0/bullet3d_world_doc.json +855 -0
- package/fixtures/defold-1.14.0/camera_doc.json +887 -0
- package/fixtures/defold-1.14.0/collectionfactory_doc.json +206 -0
- package/fixtures/defold-1.14.0/collectionproxy_doc.json +397 -0
- package/fixtures/defold-1.14.0/compute_doc.json +183 -0
- package/fixtures/defold-1.14.0/coroutine_doc.json +152 -0
- package/fixtures/defold-1.14.0/crash_doc.json +483 -0
- package/fixtures/defold-1.14.0/debug_doc.json +411 -0
- package/fixtures/defold-1.14.0/editor_doc.json +6320 -0
- package/fixtures/defold-1.14.0/editor_http_doc.json +476 -0
- package/fixtures/defold-1.14.0/editor_image_doc.json +129 -0
- package/fixtures/defold-1.14.0/editor_json_doc.json +81 -0
- package/fixtures/defold-1.14.0/editor_localization_doc.json +139 -0
- package/fixtures/defold-1.14.0/editor_pprint_doc.json +37 -0
- package/fixtures/defold-1.14.0/editor_tilemap_tiles_doc.json +292 -0
- package/fixtures/defold-1.14.0/editor_zip_doc.json +237 -0
- package/fixtures/defold-1.14.0/editor_zlib_doc.json +49 -0
- package/fixtures/defold-1.14.0/factory_doc.json +206 -0
- package/fixtures/defold-1.14.0/font_doc.json +230 -0
- package/fixtures/defold-1.14.0/globals_doc.json +64 -0
- package/fixtures/defold-1.14.0/go-instance-functions.json +106 -0
- package/fixtures/defold-1.14.0/go_doc.json +1789 -0
- package/fixtures/defold-1.14.0/graphics_doc.json +1257 -0
- package/fixtures/defold-1.14.0/gui_doc.json +4735 -0
- package/fixtures/defold-1.14.0/html5_doc.json +65 -0
- package/fixtures/defold-1.14.0/http_doc.json +174 -0
- package/fixtures/defold-1.14.0/image_doc.json +298 -0
- package/fixtures/defold-1.14.0/import-manifest.json +10260 -0
- package/fixtures/defold-1.14.0/io_doc.json +400 -0
- package/fixtures/defold-1.14.0/json_doc.json +140 -0
- package/fixtures/defold-1.14.0/label_doc.json +427 -0
- package/fixtures/defold-1.14.0/liveupdate_doc.json +221 -0
- package/fixtures/defold-1.14.0/material_doc.json +773 -0
- package/fixtures/defold-1.14.0/math_doc.json +703 -0
- package/fixtures/defold-1.14.0/model_doc.json +472 -0
- package/fixtures/defold-1.14.0/msg_doc.json +169 -0
- package/fixtures/defold-1.14.0/os_doc.json +269 -0
- package/fixtures/defold-1.14.0/package_doc.json +140 -0
- package/fixtures/defold-1.14.0/particlefx_doc.json +249 -0
- package/fixtures/defold-1.14.0/physics_doc.json +1624 -0
- package/fixtures/defold-1.14.0/profiler_doc.json +348 -0
- package/fixtures/defold-1.14.0/render_doc.json +1628 -0
- package/fixtures/defold-1.14.0/resource_doc.json +1539 -0
- package/fixtures/defold-1.14.0/socket_doc.json +2335 -0
- package/fixtures/defold-1.14.0/sound_doc.json +673 -0
- package/fixtures/defold-1.14.0/sprite_doc.json +364 -0
- package/fixtures/defold-1.14.0/string_doc.json +413 -0
- package/fixtures/defold-1.14.0/sys_doc.json +1347 -0
- package/fixtures/defold-1.14.0/table_doc.json +167 -0
- package/fixtures/defold-1.14.0/tilemap_doc.json +369 -0
- package/fixtures/defold-1.14.0/timer_doc.json +214 -0
- package/fixtures/defold-1.14.0/types_doc.json +213 -0
- package/fixtures/defold-1.14.0/vmath_doc.json +2056 -0
- package/fixtures/defold-1.14.0/window_doc.json +426 -0
- package/fixtures/defold-1.14.0/zlib_doc.json +71 -0
- package/package.json +13 -6
- package/scripts/cli-runtime.ts +18 -0
- package/scripts/example-store-io.ts +2 -2
- package/scripts/extension-goldens.ts +9 -5
- package/scripts/generate-api-availability.ts +1 -1
- package/scripts/generate-api-signatures.ts +1 -1
- package/scripts/import-defold-release.ts +1 -1
- package/scripts/regen.ts +35 -9
- package/scripts/signature-store-fs.ts +37 -17
- package/scripts/sync-api-docs.ts +127 -20
- package/src/api-doc.ts +11 -4
- package/src/emit-dts.ts +115 -21
- package/src/index-slot-classifications.ts +75 -9
- package/src/index.ts +3 -1
- package/src/publish-dts.ts +16 -0
- package/src/script-api.ts +36 -38
- package/src/library-index-slot-classifications.ts +0 -332
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
{
|
|
2
|
+
"elements": [
|
|
3
|
+
{
|
|
4
|
+
"type": "MESSAGE",
|
|
5
|
+
"name": "model_animation_done",
|
|
6
|
+
"brief": "reports the completion of a Model animation",
|
|
7
|
+
"description": "This message is sent when a Model animation has finished playing back to the script\nthat started the animation.\n<span class=\"icon-attention\"></span> No message is sent if a completion callback function was supplied\nwhen the animation was started. No message is sent if the animation is cancelled with\nmodel.cancel(). This message is sent only for animations that play with\nthe following playback modes:\n<ul>\n<li><code>go.PLAYBACK_ONCE_FORWARD</code></li>\n<li><code>go.PLAYBACK_ONCE_BACKWARD</code></li>\n<li><code>go.PLAYBACK_ONCE_PINGPONG</code></li>\n</ul>",
|
|
8
|
+
"returnvalues": [],
|
|
9
|
+
"parameters": [
|
|
10
|
+
{
|
|
11
|
+
"name": "animation_id",
|
|
12
|
+
"doc": "the id of the completed animation",
|
|
13
|
+
"types": ["hash"],
|
|
14
|
+
"is_optional": "False"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "playback",
|
|
18
|
+
"doc": "the playback mode of the completed animation",
|
|
19
|
+
"types": ["go.PLAYBACK"],
|
|
20
|
+
"is_optional": "False"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"examples": "<div class=\"codehilite\"><pre><span></span><code><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=\"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\">"model_animation_done"</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"kr\">if</span> <span class=\"n\">message</span><span class=\"p\">.</span><span class=\"n\">animation_id</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">"run"</span><span class=\"p\">)</span> <span class=\"ow\">and</span> <span class=\"n\">message</span><span class=\"p\">.</span><span class=\"n\">playback</span> <span class=\"o\">==</span> <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">PLAYBACK_ONCE_FORWARD</span> <span class=\"kr\">then</span>\n <span class=\"c1\">-- The animation "run" has finished running forward.</span>\n <span class=\"kr\">end</span>\n <span class=\"kr\">end</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
|
|
24
|
+
"replaces": "",
|
|
25
|
+
"error": "",
|
|
26
|
+
"tparams": [],
|
|
27
|
+
"members": [],
|
|
28
|
+
"notes": [],
|
|
29
|
+
"language": ""
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "STRUCT",
|
|
33
|
+
"name": "model.play_properties",
|
|
34
|
+
"brief": "Model animation playback properties",
|
|
35
|
+
"description": "Model animation playback properties",
|
|
36
|
+
"returnvalues": [],
|
|
37
|
+
"parameters": [],
|
|
38
|
+
"examples": "",
|
|
39
|
+
"replaces": "",
|
|
40
|
+
"error": "",
|
|
41
|
+
"tparams": [],
|
|
42
|
+
"members": [
|
|
43
|
+
{
|
|
44
|
+
"name": "blend_duration?",
|
|
45
|
+
"doc": "duration of a linear blend from the current animation",
|
|
46
|
+
"type": "number"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "offset?",
|
|
50
|
+
"doc": "normalized initial animation cursor",
|
|
51
|
+
"type": "number"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "playback_rate?",
|
|
55
|
+
"doc": "positive animation playback rate",
|
|
56
|
+
"type": "number"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"notes": [],
|
|
60
|
+
"language": ""
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "STRUCT",
|
|
64
|
+
"name": "model.aabb",
|
|
65
|
+
"brief": "Axis-aligned bounding box",
|
|
66
|
+
"description": "Axis-aligned bounding box",
|
|
67
|
+
"returnvalues": [],
|
|
68
|
+
"parameters": [],
|
|
69
|
+
"examples": "",
|
|
70
|
+
"replaces": "",
|
|
71
|
+
"error": "",
|
|
72
|
+
"tparams": [],
|
|
73
|
+
"members": [
|
|
74
|
+
{
|
|
75
|
+
"name": "min",
|
|
76
|
+
"doc": "minimum local-space bounds",
|
|
77
|
+
"type": "vector3"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "max",
|
|
81
|
+
"doc": "maximum local-space bounds",
|
|
82
|
+
"type": "vector3"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"notes": [],
|
|
86
|
+
"language": ""
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "PROPERTY",
|
|
90
|
+
"name": "cursor",
|
|
91
|
+
"brief": "<span class=\"type\">number</span> model cursor",
|
|
92
|
+
"description": "The normalized animation cursor. The type of the property is number.\n<span class=\"icon-attention\"></span> Please note that model events may not fire as expected when the cursor is manipulated directly.",
|
|
93
|
+
"returnvalues": [],
|
|
94
|
+
"parameters": [],
|
|
95
|
+
"examples": "How to get the normalized cursor value:\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\">-- Get the cursor value on component "model"</span>\n <span class=\"n\">cursor</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\">"#model"</span><span class=\"p\">,</span> <span class=\"s2\">"cursor"</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>\n\nHow to animate the cursor from 0.0 to 1.0 using linear easing for 2.0 seconds:\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\">-- Get the current value on component "model"</span>\n <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">set</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">,</span> <span class=\"s2\">"cursor"</span><span class=\"p\">,</span> <span class=\"mf\">0.0</span><span class=\"p\">)</span>\n <span class=\"c1\">-- Animate the cursor value</span>\n <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">animate</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">,</span> <span class=\"s2\">"cursor"</span><span class=\"p\">,</span> <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">PLAYBACK_LOOP_FORWARD</span><span class=\"p\">,</span> <span class=\"mf\">1.0</span><span class=\"p\">,</span> <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">EASING_LINEAR</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
|
|
96
|
+
"replaces": "",
|
|
97
|
+
"error": "",
|
|
98
|
+
"tparams": [],
|
|
99
|
+
"members": [],
|
|
100
|
+
"notes": [],
|
|
101
|
+
"language": ""
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "PROPERTY",
|
|
105
|
+
"name": "playback_rate",
|
|
106
|
+
"brief": "<span class=\"type\">number</span> model playback_rate",
|
|
107
|
+
"description": "The animation playback rate. A multiplier to the animation playback rate. The type of the property is number.",
|
|
108
|
+
"returnvalues": [],
|
|
109
|
+
"parameters": [],
|
|
110
|
+
"examples": "How to set the playback_rate on component \"model\" to play at double the current speed:\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\">-- Get the current value on component "model"</span>\n <span class=\"n\">playback_rate</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\">"#model"</span><span class=\"p\">,</span> <span class=\"s2\">"playback_rate"</span><span class=\"p\">)</span>\n <span class=\"c1\">-- Set the playback_rate to double the previous value.</span>\n <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">set</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">,</span> <span class=\"s2\">"playback_rate"</span><span class=\"p\">,</span> <span class=\"n\">playback_rate</span> <span class=\"o\">*</span> <span class=\"mi\">2</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>\n\nThe playback_rate is a non-negative number, a negative value will be clamped to 0.",
|
|
111
|
+
"replaces": "",
|
|
112
|
+
"error": "",
|
|
113
|
+
"tparams": [],
|
|
114
|
+
"members": [],
|
|
115
|
+
"notes": [],
|
|
116
|
+
"language": ""
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "PROPERTY",
|
|
120
|
+
"name": "animation",
|
|
121
|
+
"brief": "<span class=\"type\">hash</span> model animation",
|
|
122
|
+
"description": "The current animation set on the component. The type of the property is hash.",
|
|
123
|
+
"returnvalues": [],
|
|
124
|
+
"parameters": [],
|
|
125
|
+
"examples": "How to read the current animation from a model component:\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\">-- Get the current animation on component "model"</span>\n <span class=\"kd\">local</span> <span class=\"n\">animation</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\">"#model"</span><span class=\"p\">,</span> <span class=\"s2\">"animation"</span><span class=\"p\">)</span>\n <span class=\"kr\">if</span> <span class=\"n\">animation</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">"run_left"</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"c1\">-- Running left. Do something...</span>\n <span class=\"kr\">end</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
|
|
126
|
+
"replaces": "",
|
|
127
|
+
"error": "",
|
|
128
|
+
"tparams": [],
|
|
129
|
+
"members": [],
|
|
130
|
+
"notes": [],
|
|
131
|
+
"language": ""
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"type": "PROPERTY",
|
|
135
|
+
"name": "textureN",
|
|
136
|
+
"brief": "<span class=\"type\">hash</span> model textureN where N is 0-7",
|
|
137
|
+
"description": "The texture hash id of the model. Used for getting/setting model texture for unit 0-7",
|
|
138
|
+
"returnvalues": [],
|
|
139
|
+
"parameters": [],
|
|
140
|
+
"examples": "How to set texture using a script property (see <a href=\"/ref/resource#resource.texture\">resource.texture</a>):\n<div class=\"codehilite\"><pre><span></span><code><span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">property</span><span class=\"p\">(</span><span class=\"s2\">"my_texture"</span><span class=\"p\">,</span> <span class=\"n\">texture</span><span class=\"p\">(</span><span class=\"s2\">"/texture.png"</span><span class=\"p\">))</span>\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\">go</span><span class=\"p\">.</span><span class=\"n\">set</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">,</span> <span class=\"s2\">"texture0"</span><span class=\"p\">,</span> <span class=\"n\">self</span><span class=\"p\">.</span><span class=\"n\">my_texture</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>\n\nSee <a href=\"/ref/resource#resource.set_texture\">resource.set_texture</a> for an example on how to set the texture of an atlas.",
|
|
141
|
+
"replaces": "",
|
|
142
|
+
"error": "",
|
|
143
|
+
"tparams": [],
|
|
144
|
+
"members": [],
|
|
145
|
+
"notes": [],
|
|
146
|
+
"language": ""
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "FUNCTION",
|
|
150
|
+
"name": "model.play_anim",
|
|
151
|
+
"brief": "play an animation on a model",
|
|
152
|
+
"description": "Plays an animation on a model component with specified playback\nmode and parameters.\nAn optional completion callback function can be provided that will be called when\nthe animation has completed playing. If no function is provided,\na <a href=\"#model_animation_done\">model_animation_done</a> message is sent to the script that started the animation.\n<span class=\"icon-attention\"></span> The callback is not called (or message sent) if the animation is\ncancelled with <a href=\"/ref/model#model.cancel\">model.cancel</a>. The callback is called (or message sent) only for\nanimations that play with the following playback modes:\n<ul>\n<li><code>go.PLAYBACK_ONCE_FORWARD</code></li>\n<li><code>go.PLAYBACK_ONCE_BACKWARD</code></li>\n<li><code>go.PLAYBACK_ONCE_PINGPONG</code></li>\n</ul>",
|
|
153
|
+
"returnvalues": [],
|
|
154
|
+
"parameters": [
|
|
155
|
+
{
|
|
156
|
+
"name": "url",
|
|
157
|
+
"doc": "the model for which to play the animation",
|
|
158
|
+
"types": ["string", "hash", "url"],
|
|
159
|
+
"is_optional": "False"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "anim_id",
|
|
163
|
+
"doc": "id of the animation to play",
|
|
164
|
+
"types": ["string", "hash"],
|
|
165
|
+
"is_optional": "False"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "playback",
|
|
169
|
+
"doc": "playback mode of the animation",
|
|
170
|
+
"types": ["go.PLAYBACK"],
|
|
171
|
+
"is_optional": "False"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "play_properties",
|
|
175
|
+
"doc": "optional playback properties",
|
|
176
|
+
"types": ["model.play_properties"],
|
|
177
|
+
"is_optional": "True"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "complete_function",
|
|
181
|
+
"doc": "function to call when the animation has completed.\n<dl>\n<dt><code>self</code></dt>\n<dd><span class=\"type\">script_instance</span> The current script instance.</dd>\n<dt><code>message_id</code></dt>\n<dd><span class=\"type\">hash</span> The name of the completion message, <code>\"model_animation_done\"</code>.</dd>\n<dt><code>message</code></dt>\n<dd><span class=\"type\">message.model.model_animation_done</span> Information about the completion.</dd>\n<dt><code>sender</code></dt>\n<dd><span class=\"type\">url</span> The invoker of the callback: the model component.</dd>\n</dl>",
|
|
182
|
+
"types": [
|
|
183
|
+
"fun(self:script_instance, message_id:hash, message:message.model.model_animation_done, sender:url)"
|
|
184
|
+
],
|
|
185
|
+
"is_optional": "True"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"examples": "The following examples assumes that the model has id \"model\".\nHow to play the \"jump\" animation followed by the \"run\" animation:\n<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"kr\">function</span> <span class=\"nf\">anim_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=\"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\">"model_animation_done"</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"kr\">if</span> <span class=\"n\">message</span><span class=\"p\">.</span><span class=\"n\">animation_id</span> <span class=\"o\">==</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">"jump"</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"c1\">-- open animation done, chain with "run"</span>\n <span class=\"kd\">local</span> <span class=\"n\">properties</span> <span class=\"o\">=</span> <span class=\"p\">{</span> <span class=\"n\">blend_duration</span> <span class=\"o\">=</span> <span class=\"mf\">0.2</span> <span class=\"p\">}</span>\n <span class=\"n\">model</span><span class=\"p\">.</span><span class=\"n\">play_anim</span><span class=\"p\">(</span><span class=\"n\">url</span><span class=\"p\">,</span> <span class=\"s2\">"run"</span><span class=\"p\">,</span> <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">PLAYBACK_LOOP_FORWARD</span><span class=\"p\">,</span> <span class=\"n\">properties</span><span class=\"p\">,</span> <span class=\"n\">anim_done</span><span class=\"p\">)</span>\n <span class=\"kr\">end</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=\"kd\">local</span> <span class=\"n\">url</span> <span class=\"o\">=</span> <span class=\"n\">msg</span><span class=\"p\">.</span><span class=\"n\">url</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">)</span>\n <span class=\"kd\">local</span> <span class=\"n\">play_properties</span> <span class=\"o\">=</span> <span class=\"p\">{</span> <span class=\"n\">blend_duration</span> <span class=\"o\">=</span> <span class=\"mf\">0.1</span> <span class=\"p\">}</span>\n <span class=\"c1\">-- first blend during 0.1 sec into the jump, then during 0.2 s into the run animation</span>\n <span class=\"n\">model</span><span class=\"p\">.</span><span class=\"n\">play_anim</span><span class=\"p\">(</span><span class=\"n\">url</span><span class=\"p\">,</span> <span class=\"s2\">"jump"</span><span class=\"p\">,</span> <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">PLAYBACK_ONCE_FORWARD</span><span class=\"p\">,</span> <span class=\"n\">play_properties</span><span class=\"p\">,</span> <span class=\"n\">anim_done</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
|
|
189
|
+
"replaces": "",
|
|
190
|
+
"error": "",
|
|
191
|
+
"tparams": [],
|
|
192
|
+
"members": [],
|
|
193
|
+
"notes": [],
|
|
194
|
+
"language": ""
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"type": "FUNCTION",
|
|
198
|
+
"name": "model.cancel",
|
|
199
|
+
"brief": "cancel all animation on a model",
|
|
200
|
+
"description": "Cancels all animation on a model component.",
|
|
201
|
+
"returnvalues": [],
|
|
202
|
+
"parameters": [
|
|
203
|
+
{
|
|
204
|
+
"name": "url",
|
|
205
|
+
"doc": "the model for which to cancel the animation",
|
|
206
|
+
"types": ["string", "hash", "url"],
|
|
207
|
+
"is_optional": "False"
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"examples": "",
|
|
211
|
+
"replaces": "",
|
|
212
|
+
"error": "",
|
|
213
|
+
"tparams": [],
|
|
214
|
+
"members": [],
|
|
215
|
+
"notes": [],
|
|
216
|
+
"language": ""
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"type": "FUNCTION",
|
|
220
|
+
"name": "model.get_go",
|
|
221
|
+
"brief": "retrieve the game object corresponding to a model skeleton bone",
|
|
222
|
+
"description": "Gets the id of the game object that corresponds to a model skeleton bone.\nThe returned game object can be used for parenting and transform queries.\nThis function has complexity <code>O(n)</code>, where <code>n</code> is the number of bones in the model skeleton.\nGame objects corresponding to a model skeleton bone can not be individually deleted.",
|
|
223
|
+
"returnvalues": [
|
|
224
|
+
{
|
|
225
|
+
"name": "id",
|
|
226
|
+
"doc": "id of the game object",
|
|
227
|
+
"types": ["hash"]
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"parameters": [
|
|
231
|
+
{
|
|
232
|
+
"name": "url",
|
|
233
|
+
"doc": "the model to query",
|
|
234
|
+
"types": ["string", "hash", "url"],
|
|
235
|
+
"is_optional": "False"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "bone_id",
|
|
239
|
+
"doc": "id of the corresponding bone",
|
|
240
|
+
"types": ["string", "hash"],
|
|
241
|
+
"is_optional": "False"
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
"examples": "The following examples assumes that the model component has id \"model\".\nHow to parent the game object of the calling script to the \"right_hand\" bone of the model in a player game object:\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=\"kd\">local</span> <span class=\"n\">parent</span> <span class=\"o\">=</span> <span class=\"n\">model</span><span class=\"p\">.</span><span class=\"n\">get_go</span><span class=\"p\">(</span><span class=\"s2\">"player#model"</span><span class=\"p\">,</span> <span class=\"s2\">"right_hand"</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\">"."</span><span class=\"p\">,</span> <span class=\"s2\">"set_parent"</span><span class=\"p\">,</span> <span class=\"p\">{</span><span class=\"n\">parent_id</span> <span class=\"o\">=</span> <span class=\"n\">parent</span><span class=\"p\">})</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
|
|
245
|
+
"replaces": "",
|
|
246
|
+
"error": "",
|
|
247
|
+
"tparams": [],
|
|
248
|
+
"members": [],
|
|
249
|
+
"notes": [],
|
|
250
|
+
"language": ""
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"type": "FUNCTION",
|
|
254
|
+
"name": "model.reset_constant",
|
|
255
|
+
"brief": "DEPRECATED! reset a shader constant for a model",
|
|
256
|
+
"description": "Resets a shader constant for a model component.\nThe constant must be defined in the material assigned to the model.\nResetting a constant through this function implies that the value defined in the material will be used.\nWhich model to reset a constant for is identified by the URL.",
|
|
257
|
+
"returnvalues": [],
|
|
258
|
+
"parameters": [
|
|
259
|
+
{
|
|
260
|
+
"name": "url",
|
|
261
|
+
"doc": "the model that should have a constant reset.",
|
|
262
|
+
"types": ["string", "hash", "url"],
|
|
263
|
+
"is_optional": "False"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"name": "constant",
|
|
267
|
+
"doc": "name of the constant.",
|
|
268
|
+
"types": ["string", "hash"],
|
|
269
|
+
"is_optional": "False"
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
"examples": "The following examples assumes that the model has id \"model\" and that the default-material in builtins is used, which defines the constant \"tint\".\nIf you assign a custom material to the model, you can reset the constants defined there in the same manner.\nHow to reset the tinting of a model:\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\">model</span><span class=\"p\">.</span><span class=\"n\">reset_constant</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">,</span> <span class=\"s2\">"tint"</span><span class=\"p\">)</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
|
|
273
|
+
"replaces": "",
|
|
274
|
+
"error": "",
|
|
275
|
+
"tparams": [],
|
|
276
|
+
"members": [],
|
|
277
|
+
"notes": [],
|
|
278
|
+
"language": ""
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"type": "FUNCTION",
|
|
282
|
+
"name": "model.set_mesh_enabled",
|
|
283
|
+
"brief": "enable or disable a mesh",
|
|
284
|
+
"description": "Enable or disable visibility of a mesh",
|
|
285
|
+
"returnvalues": [],
|
|
286
|
+
"parameters": [
|
|
287
|
+
{
|
|
288
|
+
"name": "url",
|
|
289
|
+
"doc": "the model",
|
|
290
|
+
"types": ["string", "hash", "url"],
|
|
291
|
+
"is_optional": "False"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"name": "mesh_id",
|
|
295
|
+
"doc": "the id of the mesh",
|
|
296
|
+
"types": ["string", "hash", "url"],
|
|
297
|
+
"is_optional": "False"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"name": "enabled",
|
|
301
|
+
"doc": "true if the mesh should be visible, false if it should be hideen",
|
|
302
|
+
"types": ["boolean"],
|
|
303
|
+
"is_optional": "False"
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"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\">model</span><span class=\"p\">.</span><span class=\"n\">set_mesh_enabled</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">,</span> <span class=\"s2\">"Sword"</span><span class=\"p\">,</span> <span class=\"kc\">false</span><span class=\"p\">)</span> <span class=\"c1\">-- hide the sword</span>\n <span class=\"n\">model</span><span class=\"p\">.</span><span class=\"n\">set_mesh_enabled</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">,</span> <span class=\"s2\">"Axe"</span><span class=\"p\">,</span> <span class=\"kc\">true</span><span class=\"p\">)</span> <span class=\"c1\">-- show the axe</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
|
|
307
|
+
"replaces": "",
|
|
308
|
+
"error": "",
|
|
309
|
+
"tparams": [],
|
|
310
|
+
"members": [],
|
|
311
|
+
"notes": [],
|
|
312
|
+
"language": ""
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"type": "FUNCTION",
|
|
316
|
+
"name": "model.get_mesh_enabled",
|
|
317
|
+
"brief": "get the enabled state of a mesh",
|
|
318
|
+
"description": "Get the enabled state of a mesh",
|
|
319
|
+
"returnvalues": [
|
|
320
|
+
{
|
|
321
|
+
"name": "enabled",
|
|
322
|
+
"doc": "true if the mesh is visible, false otherwise",
|
|
323
|
+
"types": ["boolean"]
|
|
324
|
+
}
|
|
325
|
+
],
|
|
326
|
+
"parameters": [
|
|
327
|
+
{
|
|
328
|
+
"name": "url",
|
|
329
|
+
"doc": "the model",
|
|
330
|
+
"types": ["string", "hash", "url"],
|
|
331
|
+
"is_optional": "False"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "mesh_id",
|
|
335
|
+
"doc": "the id of the mesh",
|
|
336
|
+
"types": ["string", "hash", "url"],
|
|
337
|
+
"is_optional": "False"
|
|
338
|
+
}
|
|
339
|
+
],
|
|
340
|
+
"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=\"kr\">if</span> <span class=\"n\">model</span><span class=\"p\">.</span><span class=\"n\">get_mesh_enabled</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">,</span> <span class=\"s2\">"Sword"</span><span class=\"p\">)</span> <span class=\"kr\">then</span>\n <span class=\"c1\">-- set properties specific for the sword</span>\n <span class=\"n\">self</span><span class=\"p\">.</span><span class=\"n\">weapon_properties</span> <span class=\"o\">=</span> <span class=\"n\">game</span><span class=\"p\">.</span><span class=\"n\">data</span><span class=\"p\">.</span><span class=\"n\">weapons</span><span class=\"p\">[</span><span class=\"s2\">"Sword"</span><span class=\"p\">]</span>\n <span class=\"kr\">end</span>\n<span class=\"kr\">end</span>\n</code></pre></div>",
|
|
341
|
+
"replaces": "",
|
|
342
|
+
"error": "",
|
|
343
|
+
"tparams": [],
|
|
344
|
+
"members": [],
|
|
345
|
+
"notes": [],
|
|
346
|
+
"language": ""
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"type": "FUNCTION",
|
|
350
|
+
"name": "model.get_aabb",
|
|
351
|
+
"brief": "get the AABB of the whole model in local coordinate space",
|
|
352
|
+
"description": "Get AABB of the whole model in local coordinate space.",
|
|
353
|
+
"returnvalues": [
|
|
354
|
+
{
|
|
355
|
+
"name": "aabb",
|
|
356
|
+
"doc": "model bounds; an empty model returns zero vectors",
|
|
357
|
+
"types": ["model.aabb"]
|
|
358
|
+
}
|
|
359
|
+
],
|
|
360
|
+
"parameters": [
|
|
361
|
+
{
|
|
362
|
+
"name": "url",
|
|
363
|
+
"doc": "the model",
|
|
364
|
+
"types": ["string", "hash", "url"],
|
|
365
|
+
"is_optional": "False"
|
|
366
|
+
}
|
|
367
|
+
],
|
|
368
|
+
"examples": "<div class=\"codehilite\"><pre><span></span><code><span class=\"n\">model</span><span class=\"p\">.</span><span class=\"n\">get_aabb</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">)</span> <span class=\"o\">-></span> <span class=\"p\">{</span> <span class=\"n\">min</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=\"o\">-</span><span class=\"mf\">2.5</span><span class=\"p\">,</span> <span class=\"o\">-</span><span class=\"mf\">3.0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">),</span> <span class=\"n\">max</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=\"mf\">1.5</span><span class=\"p\">,</span> <span class=\"mf\">5.5</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">)</span> <span class=\"p\">}</span>\n<span class=\"n\">model</span><span class=\"p\">.</span><span class=\"n\">get_aabb</span><span class=\"p\">(</span><span class=\"s2\">"#empty"</span><span class=\"p\">)</span> <span class=\"o\">-></span> <span class=\"p\">{</span> <span class=\"n\">min</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\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">),</span> <span class=\"n\">max</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\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">)</span> <span class=\"p\">}</span>\n</code></pre></div>",
|
|
369
|
+
"replaces": "",
|
|
370
|
+
"error": "",
|
|
371
|
+
"tparams": [],
|
|
372
|
+
"members": [],
|
|
373
|
+
"notes": [],
|
|
374
|
+
"language": ""
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"type": "FUNCTION",
|
|
378
|
+
"name": "model.get_mesh_aabb",
|
|
379
|
+
"brief": "get the AABB of all meshes",
|
|
380
|
+
"description": "Get AABB of all meshes.",
|
|
381
|
+
"returnvalues": [
|
|
382
|
+
{
|
|
383
|
+
"name": "aabb",
|
|
384
|
+
"doc": "mesh bounds keyed by mesh identifier",
|
|
385
|
+
"types": ["table<hash, model.aabb>"]
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"parameters": [
|
|
389
|
+
{
|
|
390
|
+
"name": "url",
|
|
391
|
+
"doc": "the model",
|
|
392
|
+
"types": ["string", "hash", "url"],
|
|
393
|
+
"is_optional": "False"
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
"examples": "<div class=\"codehilite\"><pre><span></span><code><span class=\"n\">model</span><span class=\"p\">.</span><span class=\"n\">get_mesh_aabb</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">)</span> <span class=\"o\">-></span> <span class=\"p\">{</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">"Sword"</span><span class=\"p\">)</span> <span class=\"o\">=</span> <span class=\"p\">{</span> <span class=\"n\">min</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=\"o\">-</span><span class=\"mf\">0.5</span><span class=\"p\">,</span> <span class=\"o\">-</span><span class=\"mf\">0.5</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">),</span> <span class=\"n\">max</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=\"mf\">0.5</span><span class=\"p\">,</span> <span class=\"mf\">0.5</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">)</span> <span class=\"p\">},</span> <span class=\"n\">hash</span><span class=\"p\">(</span><span class=\"s2\">"Shield"</span><span class=\"p\">)</span> <span class=\"o\">=</span> <span class=\"p\">{</span> <span class=\"n\">min</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=\"o\">-</span><span class=\"mf\">0.5</span><span class=\"p\">,</span> <span class=\"o\">-</span><span class=\"mf\">0.5</span><span class=\"p\">,</span> <span class=\"o\">-</span><span class=\"mf\">0.5</span><span class=\"p\">),</span> <span class=\"n\">max</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=\"mf\">0.5</span><span class=\"p\">,</span> <span class=\"mf\">0.5</span><span class=\"p\">,</span> <span class=\"mf\">0.5</span><span class=\"p\">)</span> <span class=\"p\">}</span> <span class=\"p\">}</span>\n</code></pre></div>",
|
|
397
|
+
"replaces": "",
|
|
398
|
+
"error": "",
|
|
399
|
+
"tparams": [],
|
|
400
|
+
"members": [],
|
|
401
|
+
"notes": [],
|
|
402
|
+
"language": ""
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"type": "FUNCTION",
|
|
406
|
+
"name": "model.get_blend_weights",
|
|
407
|
+
"brief": "get current morph (blend shape) weights",
|
|
408
|
+
"description": "Returns a table of numbers with one entry per morph target on the first mesh of the model that has morph targets.\nValues reflect the rig state at call time (after animation, and any active script override from <a href=\"/ref/model#model.set_blend_weights\">model.set_blend_weights</a>).",
|
|
409
|
+
"returnvalues": [
|
|
410
|
+
{
|
|
411
|
+
"name": "weights",
|
|
412
|
+
"doc": "array of weight values, or empty table if the model has no morph targets",
|
|
413
|
+
"types": ["number[]"]
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
"parameters": [
|
|
417
|
+
{
|
|
418
|
+
"name": "url",
|
|
419
|
+
"doc": "the model component",
|
|
420
|
+
"types": ["string", "hash", "url"],
|
|
421
|
+
"is_optional": "False"
|
|
422
|
+
}
|
|
423
|
+
],
|
|
424
|
+
"examples": "<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">local</span> <span class=\"n\">w</span> <span class=\"o\">=</span> <span class=\"n\">model</span><span class=\"p\">.</span><span class=\"n\">get_blend_weights</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">)</span>\n<span class=\"kr\">for</span> <span class=\"n\">i</span> <span class=\"o\">=</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"o\">#</span><span class=\"n\">w</span> <span class=\"kr\">do</span>\n <span class=\"nb\">print</span><span class=\"p\">(</span><span class=\"n\">i</span><span class=\"p\">,</span> <span class=\"n\">w</span><span class=\"p\">[</span><span class=\"n\">i</span><span class=\"p\">])</span>\n<span class=\"kr\">end</span>\n<span class=\"c1\">-- change the data in the table and then set the weights again</span>\n<span class=\"n\">w</span><span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">]</span> <span class=\"o\">=</span> <span class=\"mf\">0.75</span>\n<span class=\"n\">w</span><span class=\"p\">[</span><span class=\"mi\">2</span><span class=\"p\">]</span> <span class=\"o\">=</span> <span class=\"mf\">0.25</span>\n<span class=\"n\">model</span><span class=\"p\">.</span><span class=\"n\">set_blend_weights</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">,</span> <span class=\"n\">w</span><span class=\"p\">)</span>\n</code></pre></div>",
|
|
425
|
+
"replaces": "",
|
|
426
|
+
"error": "",
|
|
427
|
+
"tparams": [],
|
|
428
|
+
"members": [],
|
|
429
|
+
"notes": [],
|
|
430
|
+
"language": ""
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"type": "FUNCTION",
|
|
434
|
+
"name": "model.set_blend_weights",
|
|
435
|
+
"brief": "set morph (blend shape) weights from a table",
|
|
436
|
+
"description": "Copies numeric values from <code>weights</code> into each morph target slot for every mesh on the model that has morph targets.\nAt most as many weights are applied as each mesh has morph targets; extra entries in the table are ignored.\nMissing weights leave the tail zero-filled for meshes with more targets than entries.\nThe override is re-applied every frame after animations run, until cleared by omitting <code>weights</code> or passing <code>nil</code>.\nTo reset the weights, use <code>model.set_blend_weights(url)</code> or <code>model.set_blend_weights(url, nil)</code>.",
|
|
437
|
+
"returnvalues": [],
|
|
438
|
+
"parameters": [
|
|
439
|
+
{
|
|
440
|
+
"name": "url",
|
|
441
|
+
"doc": "the model component",
|
|
442
|
+
"types": ["string", "hash", "url"],
|
|
443
|
+
"is_optional": "False"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"name": "weights",
|
|
447
|
+
"doc": "array of weight values (1-based indices). Omit or pass <code>nil</code> to clear the override and return morphs to animation only",
|
|
448
|
+
"types": ["number[]", "nil"],
|
|
449
|
+
"is_optional": "True"
|
|
450
|
+
}
|
|
451
|
+
],
|
|
452
|
+
"examples": "<div class=\"codehilite\"><pre><span></span><code><span class=\"c1\">-- set the weights for the first 4 morph targets</span>\n<span class=\"n\">model</span><span class=\"p\">.</span><span class=\"n\">set_blend_weights</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">,</span> <span class=\"p\">{</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mf\">0.5</span><span class=\"p\">,</span> <span class=\"mi\">0</span> <span class=\"p\">})</span>\n<span class=\"c1\">-- clear the override, animation will continue if the weights are driven by an animation</span>\n<span class=\"n\">model</span><span class=\"p\">.</span><span class=\"n\">set_blend_weights</span><span class=\"p\">(</span><span class=\"s2\">"#model"</span><span class=\"p\">)</span> <span class=\"c1\">-- clear script override</span>\n</code></pre></div>",
|
|
453
|
+
"replaces": "",
|
|
454
|
+
"error": "",
|
|
455
|
+
"tparams": [],
|
|
456
|
+
"members": [],
|
|
457
|
+
"notes": [],
|
|
458
|
+
"language": ""
|
|
459
|
+
}
|
|
460
|
+
],
|
|
461
|
+
"info": {
|
|
462
|
+
"namespace": "model",
|
|
463
|
+
"name": "Model",
|
|
464
|
+
"brief": "Model API documentation",
|
|
465
|
+
"description": "Model API documentation",
|
|
466
|
+
"path": "engine/gamesys/proto/gamesys/model_ddf.proto",
|
|
467
|
+
"file": "",
|
|
468
|
+
"notes": [],
|
|
469
|
+
"language": "Lua"
|
|
470
|
+
},
|
|
471
|
+
"format_version": 2
|
|
472
|
+
}
|