@defold-typescript/types 0.51.0 → 0.52.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 (130) hide show
  1. package/api-availability.json +4 -58
  2. package/api-signatures.json +878 -1356
  3. package/api-targets.json +15 -5
  4. package/examples/translations.json +4 -56
  5. package/generated/b2d_world.d.ts +10 -10
  6. package/generated/buffer.d.ts +9 -9
  7. package/generated/bullet3d_collision_object.d.ts +1 -1
  8. package/generated/bullet3d_constraint.d.ts +109 -7
  9. package/generated/bullet3d_shape.d.ts +2 -2
  10. package/generated/go.d.ts +114 -220
  11. package/generated/graphics.d.ts +1 -0
  12. package/generated/gui.d.ts +148 -371
  13. package/generated/http.d.ts +2 -2
  14. package/generated/image.d.ts +55 -3
  15. package/generated/kinds/gui-script.d.ts +2 -0
  16. package/generated/kinds/render-script.d.ts +14 -15
  17. package/generated/liveupdate.d.ts +5 -1
  18. package/generated/material.d.ts +3 -3
  19. package/generated/particlefx.d.ts +20 -1
  20. package/generated/physics.d.ts +45 -1
  21. package/generated/render-script-modules/b2d.d.ts +711 -0
  22. package/generated/render-script-modules/bullet3d.d.ts +73 -0
  23. package/generated/render-script-modules/collectionfactory.d.ts +25 -0
  24. package/generated/render-script-modules/collectionproxy.d.ts +39 -0
  25. package/generated/render-script-modules/factory.d.ts +25 -0
  26. package/generated/render-script-modules/go.d.ts +436 -0
  27. package/generated/render-script-modules/label.d.ts +105 -0
  28. package/generated/render-script-modules/model.d.ts +89 -0
  29. package/generated/render-script-modules/particlefx.d.ts +59 -0
  30. package/generated/render-script-modules/physics.d.ts +333 -0
  31. package/generated/render-script-modules/resource.d.ts +1233 -0
  32. package/generated/render-script-modules/sound.d.ts +227 -0
  33. package/generated/render-script-modules/sprite.d.ts +68 -0
  34. package/generated/render-script-modules/tilemap.d.ts +43 -0
  35. package/generated/render.d.ts +134 -8
  36. package/generated/resource.d.ts +31 -10
  37. package/generated/sprite.d.ts +49 -1
  38. package/generated/sys.d.ts +70 -6
  39. package/generated/versions/defold-1.12.4/buffer.d.ts +8 -8
  40. package/generated/versions/defold-1.12.4/go.d.ts +115 -343
  41. package/generated/versions/defold-1.12.4/graphics.d.ts +1 -0
  42. package/generated/versions/defold-1.12.4/gui.d.ts +151 -513
  43. package/generated/versions/defold-1.12.4/http.d.ts +2 -2
  44. package/generated/versions/defold-1.12.4/image.d.ts +82 -2
  45. package/generated/versions/defold-1.12.4/index.d.ts +1 -0
  46. package/generated/versions/defold-1.12.4/liveupdate.d.ts +4 -0
  47. package/generated/versions/defold-1.12.4/particlefx.d.ts +22 -1
  48. package/generated/versions/defold-1.12.4/physics.d.ts +45 -1
  49. package/generated/versions/defold-1.12.4/render.d.ts +78 -2
  50. package/generated/versions/defold-1.12.4/resource.d.ts +43 -10
  51. package/generated/versions/defold-1.12.4/sprite.d.ts +58 -1
  52. package/generated/versions/defold-1.12.4/sys.d.ts +101 -6
  53. package/generated/versions/defold-1.12.4/vmath.d.ts +0 -24
  54. package/generated/versions/defold-1.13.0/buffer.d.ts +8 -8
  55. package/generated/versions/defold-1.13.0/go.d.ts +115 -370
  56. package/generated/versions/defold-1.13.0/graphics.d.ts +1 -0
  57. package/generated/versions/defold-1.13.0/gui.d.ts +151 -513
  58. package/generated/versions/defold-1.13.0/http.d.ts +2 -2
  59. package/generated/versions/defold-1.13.0/image.d.ts +82 -2
  60. package/generated/versions/defold-1.13.0/index.d.ts +1 -0
  61. package/generated/versions/defold-1.13.0/liveupdate.d.ts +4 -0
  62. package/generated/versions/defold-1.13.0/material.d.ts +3 -1
  63. package/generated/versions/defold-1.13.0/particlefx.d.ts +22 -1
  64. package/generated/versions/defold-1.13.0/physics.d.ts +45 -1
  65. package/generated/versions/defold-1.13.0/render.d.ts +142 -4
  66. package/generated/versions/defold-1.13.0/resource.d.ts +43 -10
  67. package/generated/versions/defold-1.13.0/sprite.d.ts +58 -1
  68. package/generated/versions/defold-1.13.0/sys.d.ts +101 -6
  69. package/generated/versions/defold-1.13.0/vmath.d.ts +0 -24
  70. package/generated/versions/defold-1.13.1/buffer.d.ts +8 -8
  71. package/generated/versions/defold-1.13.1/go.d.ts +115 -370
  72. package/generated/versions/defold-1.13.1/graphics.d.ts +1 -0
  73. package/generated/versions/defold-1.13.1/gui.d.ts +151 -529
  74. package/generated/versions/defold-1.13.1/http.d.ts +2 -2
  75. package/generated/versions/defold-1.13.1/image.d.ts +82 -2
  76. package/generated/versions/defold-1.13.1/index.d.ts +2 -0
  77. package/generated/versions/defold-1.13.1/liveupdate.d.ts +4 -0
  78. package/generated/versions/defold-1.13.1/material.d.ts +3 -1
  79. package/generated/versions/defold-1.13.1/particlefx.d.ts +22 -1
  80. package/generated/versions/defold-1.13.1/physics.d.ts +45 -1
  81. package/generated/versions/defold-1.13.1/render.d.ts +142 -4
  82. package/generated/versions/defold-1.13.1/resource.d.ts +43 -10
  83. package/generated/versions/defold-1.13.1/sprite.d.ts +58 -1
  84. package/generated/versions/defold-1.13.1/sys.d.ts +101 -6
  85. package/generated/versions/defold-1.13.1/vmath.d.ts +0 -24
  86. package/generated/versions/defold-1.13.2/b2d_world.d.ts +10 -10
  87. package/generated/versions/defold-1.13.2/buffer.d.ts +9 -9
  88. package/generated/versions/defold-1.13.2/bullet3d_collision_object.d.ts +1 -1
  89. package/generated/versions/defold-1.13.2/bullet3d_constraint.d.ts +109 -7
  90. package/generated/versions/defold-1.13.2/bullet3d_shape.d.ts +2 -2
  91. package/generated/versions/defold-1.13.2/go.d.ts +114 -220
  92. package/generated/versions/defold-1.13.2/graphics.d.ts +1 -0
  93. package/generated/versions/defold-1.13.2/gui.d.ts +148 -371
  94. package/generated/versions/defold-1.13.2/http.d.ts +2 -2
  95. package/generated/versions/defold-1.13.2/image.d.ts +55 -3
  96. package/generated/versions/defold-1.13.2/index.d.ts +2 -0
  97. package/generated/versions/defold-1.13.2/liveupdate.d.ts +5 -1
  98. package/generated/versions/defold-1.13.2/material.d.ts +3 -3
  99. package/generated/versions/defold-1.13.2/particlefx.d.ts +20 -1
  100. package/generated/versions/defold-1.13.2/physics.d.ts +45 -1
  101. package/generated/versions/defold-1.13.2/render.d.ts +123 -7
  102. package/generated/versions/defold-1.13.2/resource.d.ts +31 -10
  103. package/generated/versions/defold-1.13.2/sprite.d.ts +49 -1
  104. package/generated/versions/defold-1.13.2/sys.d.ts +70 -6
  105. package/generated/versions/defold-1.13.2/vmath.d.ts +0 -24
  106. package/generated/vmath.d.ts +0 -24
  107. package/identity-vocabulary.json +52 -7
  108. package/index.d.ts +2 -0
  109. package/package.json +2 -1
  110. package/scripts/generate-api-availability.ts +1 -21
  111. package/scripts/generate-api-signatures.ts +75 -14
  112. package/scripts/materialize-version.ts +48 -7
  113. package/scripts/regen.ts +214 -19
  114. package/scripts/signature-store-fs.ts +1 -0
  115. package/scripts/target-version.ts +26 -0
  116. package/src/api-doc.ts +26 -0
  117. package/src/component-properties.d.ts +89 -0
  118. package/src/core-types.ts +42 -15
  119. package/src/doc-corrections.ts +53 -5
  120. package/src/emit-dts.ts +758 -198
  121. package/src/engine-globals.d.ts +5 -1
  122. package/src/go-overloads.d.ts +68 -13
  123. package/src/gui-overloads.d.ts +489 -0
  124. package/src/gui-texture-removal.d.ts +41 -0
  125. package/src/index.ts +2 -0
  126. package/src/lifecycle.ts +30 -21
  127. package/src/msg-overloads.d.ts +25 -13
  128. package/src/signature-store.ts +50 -0
  129. package/src/timers.d.ts +2 -1
  130. package/src/vmath-overloads.d.ts +26 -0
@@ -0,0 +1,105 @@
1
+ /** @noSelfInFile */
2
+ import type { Hash, Vector3, Vector4 } from "../../src/core-types";
3
+
4
+ declare global {
5
+ /**
6
+ * Label API documentation
7
+ */
8
+ namespace label {
9
+ /**
10
+ * Rich-text layout object
11
+ */
12
+ interface layout_object {
13
+ /**
14
+ * object type, currently `link` or `sprite`
15
+ */
16
+ type: string;
17
+ /**
18
+ * the object's `id` attribute, or its generated layout object id
19
+ */
20
+ id: Hash;
21
+ /**
22
+ * zero-based UTF-32 offset in the visible text
23
+ */
24
+ text_offset: number;
25
+ /**
26
+ * visible UTF-32 text length covered by the object
27
+ */
28
+ text_length: number;
29
+ /**
30
+ * unscaled lower-left x-coordinate relative to the label's pivot
31
+ */
32
+ x: number;
33
+ /**
34
+ * unscaled lower-left y-coordinate relative to the label's pivot
35
+ */
36
+ y: number;
37
+ /**
38
+ * resolved object width
39
+ */
40
+ width: number;
41
+ /**
42
+ * resolved object height
43
+ */
44
+ height: number;
45
+ /**
46
+ * markup attributes keyed by name
47
+ */
48
+ attributes: LuaTable<string, string>;
49
+ }
50
+ interface properties {
51
+ /**
52
+ * The color of the label. The type of the property is vector4.
53
+ */
54
+ color: Vector4;
55
+ /**
56
+ * The font used when rendering the label. The type of the property is hash.
57
+ */
58
+ font: Hash;
59
+ /**
60
+ * The leading of the label. This value is used to scale the line spacing of text.
61
+ * The type of the property is number.
62
+ */
63
+ leading: number;
64
+ /**
65
+ * The line break of the label.
66
+ * This value is used to adjust the vertical spacing of characters in the text.
67
+ * The type of the property is boolean.
68
+ */
69
+ line_break: boolean;
70
+ /**
71
+ * The material used when rendering the label. The type of the property is hash.
72
+ */
73
+ material: Hash;
74
+ /**
75
+ * The outline color of the label. The type of the property is vector4.
76
+ */
77
+ outline: Vector4;
78
+ /**
79
+ * The scale of the label. `go.get` returns and `go.set` takes a vector3; `go.animate` also takes a number, which sets a uniform scale.
80
+ */
81
+ scale: Vector3;
82
+ /**
83
+ * The shadow color of the label. The type of the property is vector4.
84
+ */
85
+ shadow: Vector4;
86
+ /**
87
+ * Returns the size of the label. The size will constrain the text if line break is enabled.
88
+ * The type of the property is vector3.
89
+ */
90
+ size: Vector3;
91
+ /**
92
+ * The text of the label.
93
+ */
94
+ text: string;
95
+ /**
96
+ * The tracking of the label.
97
+ * This value is used to adjust the vertical spacing of characters in the text.
98
+ * The type of the property is number.
99
+ */
100
+ tracking: number;
101
+ }
102
+ }
103
+ }
104
+
105
+ export {};
@@ -0,0 +1,89 @@
1
+ /** @noSelfInFile */
2
+ import type { Hash, Vector3 } from "../../src/core-types";
3
+
4
+ declare global {
5
+ /**
6
+ * Model API documentation
7
+ */
8
+ namespace model {
9
+ /**
10
+ * Axis-aligned bounding box
11
+ */
12
+ interface aabb {
13
+ /**
14
+ * minimum local-space bounds
15
+ */
16
+ min: Vector3;
17
+ /**
18
+ * maximum local-space bounds
19
+ */
20
+ max: Vector3;
21
+ }
22
+ /**
23
+ * Model animation playback properties
24
+ */
25
+ interface play_properties {
26
+ /**
27
+ * duration of a linear blend from the current animation
28
+ */
29
+ blend_duration?: number;
30
+ /**
31
+ * normalized initial animation cursor
32
+ */
33
+ offset?: number;
34
+ /**
35
+ * positive animation playback rate
36
+ */
37
+ playback_rate?: number;
38
+ }
39
+ interface properties {
40
+ /**
41
+ * The current animation set on the component. The type of the property is hash.
42
+ */
43
+ readonly animation: Hash;
44
+ /**
45
+ * The normalized animation cursor. The type of the property is number.
46
+ * Please note that model events may not fire as expected when the cursor is manipulated directly.
47
+ */
48
+ cursor: number;
49
+ /**
50
+ * The animation playback rate. A multiplier to the animation playback rate. The type of the property is number.
51
+ */
52
+ playback_rate: number;
53
+ /**
54
+ * The texture hash id of the model. Used for getting/setting model texture for unit 0-7
55
+ */
56
+ texture0: Hash;
57
+ /**
58
+ * The texture hash id of the model. Used for getting/setting model texture for unit 0-7
59
+ */
60
+ texture1: Hash;
61
+ /**
62
+ * The texture hash id of the model. Used for getting/setting model texture for unit 0-7
63
+ */
64
+ texture2: Hash;
65
+ /**
66
+ * The texture hash id of the model. Used for getting/setting model texture for unit 0-7
67
+ */
68
+ texture3: Hash;
69
+ /**
70
+ * The texture hash id of the model. Used for getting/setting model texture for unit 0-7
71
+ */
72
+ texture4: Hash;
73
+ /**
74
+ * The texture hash id of the model. Used for getting/setting model texture for unit 0-7
75
+ */
76
+ texture5: Hash;
77
+ /**
78
+ * The texture hash id of the model. Used for getting/setting model texture for unit 0-7
79
+ */
80
+ texture6: Hash;
81
+ /**
82
+ * The texture hash id of the model. Used for getting/setting model texture for unit 0-7
83
+ */
84
+ texture7: Hash;
85
+ }
86
+ }
87
+ }
88
+
89
+ export {};
@@ -0,0 +1,59 @@
1
+ /** @noSelfInFile */
2
+ import type { Hash } from "../../src/core-types";
3
+
4
+ declare global {
5
+ /**
6
+ * Functions and properties for controlling particle effect component playback and
7
+ * shader constants.
8
+ */
9
+ namespace particlefx {
10
+ /**
11
+ * Options used when stopping particle effects.
12
+ */
13
+ interface stop_options {
14
+ /**
15
+ * Instantly clear spawned particles.
16
+ */
17
+ clear?: boolean;
18
+ }
19
+ type EMITTER_STATE = typeof particlefx.EMITTER_STATE_POSTSPAWN | typeof particlefx.EMITTER_STATE_PRESPAWN | typeof particlefx.EMITTER_STATE_SLEEPING | typeof particlefx.EMITTER_STATE_SPAWNING;
20
+ /**
21
+ * postspawn state The emitter is not spawning any particles, but has particles that are still alive.
22
+ */
23
+ const EMITTER_STATE_POSTSPAWN: number & { readonly __brand: "particlefx.EMITTER_STATE_POSTSPAWN" };
24
+ /**
25
+ * prespawn state The emitter will be in this state when it has been started but before spawning any particles. Normally the emitter is in this state for a short time, depending on if a start delay has been set for this emitter or not.
26
+ */
27
+ const EMITTER_STATE_PRESPAWN: number & { readonly __brand: "particlefx.EMITTER_STATE_PRESPAWN" };
28
+ /**
29
+ * sleeping state The emitter does not have any living particles and will not spawn any particles in this state.
30
+ */
31
+ const EMITTER_STATE_SLEEPING: number & { readonly __brand: "particlefx.EMITTER_STATE_SLEEPING" };
32
+ /**
33
+ * spawning state The emitter is spawning particles.
34
+ */
35
+ const EMITTER_STATE_SPAWNING: number & { readonly __brand: "particlefx.EMITTER_STATE_SPAWNING" };
36
+ interface properties {
37
+ /**
38
+ * The animation used during rendering by an emitter in a particle FX component.
39
+ * The property type is a hash and refers to a valid animation in an atlas or a tile source resource.
40
+ * If the animation isn't found, and error will be thrown.
41
+ */
42
+ animation: Hash;
43
+ /**
44
+ * The image used during rendering by an emitter in a particle FX component.
45
+ * The property type is a hash and refers to an image resource (atlas or tile source).
46
+ * Note: When setting the image, if the currently playing animation of the emitter
47
+ * isn't found in the new image, the animation will be set to the first animation found.
48
+ */
49
+ image: Hash;
50
+ /**
51
+ * The material used during rendering by an emitter in a particle FX component.
52
+ * The property type is a hash and refers to a material resource.
53
+ */
54
+ material: Hash;
55
+ }
56
+ }
57
+ }
58
+
59
+ export {};
@@ -0,0 +1,333 @@
1
+ /** @noSelfInFile */
2
+ import type { Hash, Vector3 } from "../../src/core-types";
3
+
4
+ declare global {
5
+ /**
6
+ * Collision object physics API documentation
7
+ */
8
+ namespace physics {
9
+ type event = BuiltinMessages["contact_point_event"] & { type: Hash<"contact_point_event"> } | BuiltinMessages["collision_event"] & { type: Hash<"collision_event"> } | BuiltinMessages["trigger_event"] & { type: Hash<"trigger_event"> } | BuiltinMessages["ray_cast_response"] & { type: Hash<"ray_cast_response"> } | BuiltinMessages["ray_cast_missed"] & { type: Hash<"ray_cast_missed"> };
10
+ /**
11
+ * The available fields depend on the joint type.
12
+ */
13
+ interface joint_properties {
14
+ /**
15
+ * whether the connected objects should collide
16
+ */
17
+ collide_connected?: boolean;
18
+ /**
19
+ * Natural spring length between the anchor points.
20
+ */
21
+ length?: number;
22
+ /**
23
+ * Mass-spring-damper frequency in Hertz; zero disables softness.
24
+ */
25
+ frequency?: number;
26
+ /**
27
+ * Damping ratio, where zero is no damping and one is critical damping.
28
+ */
29
+ damping?: number;
30
+ /**
31
+ * Maximum fixed-joint rope length.
32
+ */
33
+ max_length?: number;
34
+ /**
35
+ * Local translation unit axis in the first body.
36
+ */
37
+ local_axis_a?: Vector3;
38
+ /**
39
+ * Angle of the second body relative to the first body, in radians.
40
+ */
41
+ reference_angle?: number;
42
+ /**
43
+ * Lower angular limit in radians.
44
+ */
45
+ lower_angle?: number;
46
+ /**
47
+ * Upper angular limit in radians.
48
+ */
49
+ upper_angle?: number;
50
+ /**
51
+ * Lower translation limit, usually in meters.
52
+ */
53
+ lower_translation?: number;
54
+ /**
55
+ * Upper translation limit, usually in meters.
56
+ */
57
+ upper_translation?: number;
58
+ /**
59
+ * Maximum motor torque used to reach the desired speed, usually in N-m.
60
+ */
61
+ max_motor_torque?: number;
62
+ /**
63
+ * Maximum motor force used to reach the desired speed.
64
+ */
65
+ max_motor_force?: number;
66
+ /**
67
+ * Desired motor speed.
68
+ */
69
+ motor_speed?: number;
70
+ /**
71
+ * Whether joint limits are enabled.
72
+ */
73
+ enable_limit?: boolean;
74
+ /**
75
+ * Whether the joint motor is enabled.
76
+ */
77
+ enable_motor?: boolean;
78
+ }
79
+ /**
80
+ * The available optional fields depend on the joint type.
81
+ */
82
+ interface joint_properties_info {
83
+ /**
84
+ * whether the connected objects collide
85
+ */
86
+ collide_connected: boolean;
87
+ /**
88
+ * spring length
89
+ */
90
+ length?: number;
91
+ /**
92
+ * spring frequency
93
+ */
94
+ frequency?: number;
95
+ /**
96
+ * damping ratio
97
+ */
98
+ damping?: number;
99
+ /**
100
+ * fixed-joint maximum length
101
+ */
102
+ max_length?: number;
103
+ /**
104
+ * local joint axis
105
+ */
106
+ local_axis_a?: Vector3;
107
+ /**
108
+ * reference angle
109
+ */
110
+ reference_angle?: number;
111
+ /**
112
+ * lower angular limit
113
+ */
114
+ lower_angle?: number;
115
+ /**
116
+ * upper angular limit
117
+ */
118
+ upper_angle?: number;
119
+ /**
120
+ * lower translation limit
121
+ */
122
+ lower_translation?: number;
123
+ /**
124
+ * upper translation limit
125
+ */
126
+ upper_translation?: number;
127
+ /**
128
+ * maximum motor torque
129
+ */
130
+ max_motor_torque?: number;
131
+ /**
132
+ * maximum motor force
133
+ */
134
+ max_motor_force?: number;
135
+ /**
136
+ * motor speed
137
+ */
138
+ motor_speed?: number;
139
+ /**
140
+ * whether limits are enabled
141
+ */
142
+ enable_limit?: boolean;
143
+ /**
144
+ * whether the motor is enabled
145
+ */
146
+ enable_motor?: boolean;
147
+ /**
148
+ * Read-only current hinge angle in radians.
149
+ */
150
+ joint_angle?: number;
151
+ /**
152
+ * Read-only current hinge angular speed or slider/wheel translation speed.
153
+ */
154
+ joint_speed?: number;
155
+ /**
156
+ * Read-only current slider or wheel translation, usually in meters.
157
+ */
158
+ joint_translation?: number;
159
+ }
160
+ /**
161
+ * Ray-cast options
162
+ */
163
+ interface raycast_options {
164
+ /**
165
+ * Return every hit instead of only the closest hit.
166
+ */
167
+ all?: boolean;
168
+ }
169
+ /**
170
+ * The available geometry fields depend on `type`.
171
+ */
172
+ interface shape_data {
173
+ /**
174
+ * shape type
175
+ */
176
+ type: physics.SHAPE_TYPE;
177
+ /**
178
+ * sphere diameter or capsule pole diameter
179
+ */
180
+ diameter?: number;
181
+ /**
182
+ * box dimensions
183
+ */
184
+ dimensions?: Vector3;
185
+ /**
186
+ * capsule height
187
+ */
188
+ height?: number;
189
+ }
190
+ type JOINT_TYPE = typeof physics.JOINT_TYPE_FIXED | typeof physics.JOINT_TYPE_HINGE | typeof physics.JOINT_TYPE_SLIDER | typeof physics.JOINT_TYPE_SPRING | typeof physics.JOINT_TYPE_WELD | typeof physics.JOINT_TYPE_WHEEL;
191
+ type SHAPE_TYPE = typeof physics.SHAPE_TYPE_BOX | typeof physics.SHAPE_TYPE_CAPSULE | typeof physics.SHAPE_TYPE_HULL | typeof physics.SHAPE_TYPE_MESH | typeof physics.SHAPE_TYPE_SPHERE;
192
+ /**
193
+ * Fixed joint; uses `max_length` from physics.joint_properties.
194
+ */
195
+ const JOINT_TYPE_FIXED: number & { readonly __brand: "physics.JOINT_TYPE_FIXED" };
196
+ /**
197
+ * Hinge joint; uses the angular-limit and motor fields from physics.joint_properties.
198
+ */
199
+ const JOINT_TYPE_HINGE: number & { readonly __brand: "physics.JOINT_TYPE_HINGE" };
200
+ /**
201
+ * Slider joint; uses the translation-limit and motor fields from physics.joint_properties.
202
+ */
203
+ const JOINT_TYPE_SLIDER: number & { readonly __brand: "physics.JOINT_TYPE_SLIDER" };
204
+ /**
205
+ * Spring joint; uses `length`, `frequency`, and `damping` from physics.joint_properties.
206
+ */
207
+ const JOINT_TYPE_SPRING: number & { readonly __brand: "physics.JOINT_TYPE_SPRING" };
208
+ /**
209
+ * Weld joint; uses `reference_angle`, `frequency`, and `damping` from physics.joint_properties.
210
+ */
211
+ const JOINT_TYPE_WELD: number & { readonly __brand: "physics.JOINT_TYPE_WELD" };
212
+ /**
213
+ * Wheel joint; uses the axis, motor, frequency, and damping fields from physics.joint_properties.
214
+ */
215
+ const JOINT_TYPE_WHEEL: number & { readonly __brand: "physics.JOINT_TYPE_WHEEL" };
216
+ /**
217
+ * Box shape.
218
+ */
219
+ const SHAPE_TYPE_BOX: number & { readonly __brand: "physics.SHAPE_TYPE_BOX" };
220
+ /**
221
+ * Capsule shape; supported only by 3D physics.
222
+ */
223
+ const SHAPE_TYPE_CAPSULE: number & { readonly __brand: "physics.SHAPE_TYPE_CAPSULE" };
224
+ /**
225
+ * Convex hull shape.
226
+ */
227
+ const SHAPE_TYPE_HULL: number & { readonly __brand: "physics.SHAPE_TYPE_HULL" };
228
+ /**
229
+ * Triangle mesh shape; supported only by the Bullet 3D backend.
230
+ */
231
+ const SHAPE_TYPE_MESH: number & { readonly __brand: "physics.SHAPE_TYPE_MESH" };
232
+ /**
233
+ * Sphere shape.
234
+ */
235
+ const SHAPE_TYPE_SPHERE: number & { readonly __brand: "physics.SHAPE_TYPE_SPHERE" };
236
+ namespace message {
237
+ namespace physics {
238
+ /**
239
+ * collision object information
240
+ */
241
+ interface collision_info {
242
+ /**
243
+ * object position in world space
244
+ */
245
+ position: Vector3;
246
+ /**
247
+ * object identifier
248
+ */
249
+ id: Hash;
250
+ /**
251
+ * object collision group
252
+ */
253
+ group: Hash;
254
+ }
255
+ /**
256
+ * contact-point object information
257
+ */
258
+ interface contact_point_info {
259
+ /**
260
+ * contact point position in world space
261
+ */
262
+ position: Vector3;
263
+ /**
264
+ * object position in world space
265
+ */
266
+ instance_position: Vector3;
267
+ /**
268
+ * contact normal pointing from the other object toward this object
269
+ */
270
+ normal: Vector3;
271
+ /**
272
+ * object velocity relative to the other object
273
+ */
274
+ relative_velocity: Vector3;
275
+ /**
276
+ * object mass in kilograms
277
+ */
278
+ mass: number;
279
+ /**
280
+ * object identifier
281
+ */
282
+ id: Hash;
283
+ /**
284
+ * object collision group
285
+ */
286
+ group: Hash;
287
+ }
288
+ /**
289
+ * trigger interaction object information
290
+ */
291
+ interface trigger_info {
292
+ /**
293
+ * object identifier
294
+ */
295
+ id: Hash;
296
+ /**
297
+ * object collision group
298
+ */
299
+ group: Hash;
300
+ }
301
+ }
302
+ }
303
+ interface properties {
304
+ /**
305
+ * The angular damping value for the collision object. Setting this value alters the damping of
306
+ * angular motion of the object (rotation). Valid values are between 0 (no damping) and 1 (full damping).
307
+ */
308
+ angular_damping: number;
309
+ /**
310
+ * The current angular velocity of the collision object component as a vector3.
311
+ * The velocity is measured as a rotation around the vector with a speed equivalent to the vector length
312
+ * in radians/s.
313
+ */
314
+ angular_velocity: Vector3;
315
+ /**
316
+ * The linear damping value for the collision object. Setting this value alters the damping of
317
+ * linear motion of the object. Valid values are between 0 (no damping) and 1 (full damping).
318
+ */
319
+ linear_damping: number;
320
+ /**
321
+ * The current linear velocity of the collision object component as a vector3.
322
+ * The velocity is measured in units/s (pixels/s).
323
+ */
324
+ linear_velocity: Vector3;
325
+ /**
326
+ * READ ONLY Returns the defined physical mass of the collision object component as a number.
327
+ */
328
+ readonly mass: number;
329
+ }
330
+ }
331
+ }
332
+
333
+ export {};