@ts-defold/types 1.2.9 → 1.2.10
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/index.d.ts +33 -15
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="lua-types/5.1" />
|
|
3
3
|
/// <reference types="typescript-to-lua/language-extensions" />
|
|
4
4
|
|
|
5
|
-
// DEFOLD. stable version 1.2.
|
|
5
|
+
// DEFOLD. stable version 1.2.192 (84a9c89dfd5a2c3818c01e7c6777169272d9390b)
|
|
6
6
|
// =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
|
|
7
7
|
|
|
8
8
|
|
|
@@ -2720,9 +2720,9 @@ See each joint type for possible properties field. The one field that is accepte
|
|
|
2720
2720
|
* Returns the group name of a collision object as a hash.
|
|
2721
2721
|
* @param url the collision object to return the group of.
|
|
2722
2722
|
* @return hash value of the group.
|
|
2723
|
-
function
|
|
2724
|
-
local
|
|
2725
|
-
|
|
2723
|
+
local function check_is_enemy()
|
|
2724
|
+
local group = physics.get_group("#collisionobject")
|
|
2725
|
+
return group == hash("enemy")
|
|
2726
2726
|
end
|
|
2727
2727
|
|
|
2728
2728
|
*/
|
|
@@ -2767,10 +2767,10 @@ end
|
|
|
2767
2767
|
* @param url the collision object to check the mask of.
|
|
2768
2768
|
* @param group the name of the group to check for.
|
|
2769
2769
|
* @return boolean value of the maskbit. 'true' if present, 'false' otherwise.
|
|
2770
|
-
function
|
|
2771
|
-
--
|
|
2772
|
-
local
|
|
2773
|
-
return
|
|
2770
|
+
local function is_invincible()
|
|
2771
|
+
-- check if the collisionobject would collide with the "bullet" group
|
|
2772
|
+
local invincible = physics.get_maskbit("#collisionobject", "bullet")
|
|
2773
|
+
return invincible
|
|
2774
2774
|
end
|
|
2775
2775
|
|
|
2776
2776
|
*/
|
|
@@ -2826,7 +2826,7 @@ Set to `true` to return all ray cast hits. If `false`, it will only return the c
|
|
|
2826
2826
|
* a collision object in the editor.
|
|
2827
2827
|
* @param url the collision object affected.
|
|
2828
2828
|
* @param group the new group name to be assigned.
|
|
2829
|
-
function
|
|
2829
|
+
local function change_collision_group()
|
|
2830
2830
|
physics.set_group("#collisionobject", "enemy")
|
|
2831
2831
|
end
|
|
2832
2832
|
|
|
@@ -2855,14 +2855,14 @@ Note: The `collide_connected` field cannot be updated/changed after a connection
|
|
|
2855
2855
|
* Sets or clears the masking of a group (maskbit) in a collision object.
|
|
2856
2856
|
* @param url the collision object to change the mask of.
|
|
2857
2857
|
* @param group the name of the group (maskbit) to modify in the mask.
|
|
2858
|
-
* @param
|
|
2859
|
-
function
|
|
2860
|
-
-- no longer collide with the "
|
|
2861
|
-
physics.set_maskbit("#collisionobject"
|
|
2858
|
+
* @param maskbit boolean value of the new maskbit. 'true' to enable, 'false' to disable.
|
|
2859
|
+
local function make_invincible()
|
|
2860
|
+
-- no longer collide with the "bullet" group
|
|
2861
|
+
physics.set_maskbit("#collisionobject", "bullet", false)
|
|
2862
2862
|
end
|
|
2863
2863
|
|
|
2864
2864
|
*/
|
|
2865
|
-
export function set_maskbit(url: string | hash | url, group: string,
|
|
2865
|
+
export function set_maskbit(url: string | hash | url, group: string, maskbit: boolean): void
|
|
2866
2866
|
|
|
2867
2867
|
/**
|
|
2868
2868
|
* Flips the collision shapes vertically for a collision object
|
|
@@ -4391,7 +4391,7 @@ Only available on iOS and Android.
|
|
|
4391
4391
|
`manufacturer`
|
|
4392
4392
|
Only available on iOS and Android.
|
|
4393
4393
|
`system_name`
|
|
4394
|
-
The system
|
|
4394
|
+
The system name: "Darwin", "Linux", "Windows", "HTML5", "Android" or "iPhone OS"
|
|
4395
4395
|
`system_version`
|
|
4396
4396
|
The system OS version.
|
|
4397
4397
|
`api_version`
|
|
@@ -5486,6 +5486,24 @@ declare namespace camera {
|
|
|
5486
5486
|
*/
|
|
5487
5487
|
export type acquire_camera_focus = "acquire_camera_focus"
|
|
5488
5488
|
|
|
5489
|
+
/**
|
|
5490
|
+
* Camera frustum far plane.
|
|
5491
|
+
* The type of the property is float.
|
|
5492
|
+
*/
|
|
5493
|
+
export let far_z: any
|
|
5494
|
+
|
|
5495
|
+
/**
|
|
5496
|
+
* Vertical field of view of the camera.
|
|
5497
|
+
* The type of the property is float.
|
|
5498
|
+
*/
|
|
5499
|
+
export let fov: any
|
|
5500
|
+
|
|
5501
|
+
/**
|
|
5502
|
+
* Camera frustum near plane.
|
|
5503
|
+
* The type of the property is float.
|
|
5504
|
+
*/
|
|
5505
|
+
export let near_z: any
|
|
5506
|
+
|
|
5489
5507
|
/**
|
|
5490
5508
|
*
|
|
5491
5509
|
* Post this message to a camera-component to deactivate it. The camera is then removed from the active cameras.
|