Skip to content

Commit d7702c0

Browse files
committed
update to 1.2.192
1 parent f5379cf commit d7702c0

11 files changed

Lines changed: 2614 additions & 2097 deletions

DefoldDocs/api/collision_object.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function physics.get_gravity() end
3838

3939
---Returns the group name of a collision object as a hash.
4040
---@param url string|hash|url the collision object to return the group of.
41-
---@return hash hash value of the group. function checkIsEnemy() local grp = physics.get_group("#collisionobject") assert( grp == hash("enemy") ) end
41+
---@return hash hash value of the group. local function check_is_enemy() local group = physics.get_group("#collisionobject") return group == hash("enemy") end
4242
function physics.get_group(url) end
4343

4444
---Get a table for properties for a connected joint. The joint has to be created before
@@ -69,7 +69,7 @@ function physics.get_joint_reaction_torque(collisionobject, joint_id) end
6969
---object, false otherwise.
7070
---@param url string|hash|url the collision object to check the mask of.
7171
---@param group string the name of the group to check for.
72-
---@return boolean boolean value of the maskbit. 'true' if present, 'false' otherwise. function checkCollideWithUser() -- to check if the collisionobject would collide with "user" group local hits_user = physics.get_maskbit("#collisionobject","user") return hits_user end
72+
---@return boolean boolean value of the maskbit. 'true' if present, 'false' otherwise. local function is_invincible() -- check if the collisionobject would collide with the "bullet" group local invincible = physics.get_maskbit("#collisionobject", "bullet") return invincible end
7373
function physics.get_maskbit(url, group) end
7474

7575
---Ray casts are used to test for intersections against collision objects in the physics world.
@@ -111,7 +111,7 @@ function physics.set_gravity(gravity) end
111111
---string value. The group name should exist i.e. have been used in
112112
---a collision object in the editor.
113113
---@param url string|hash|url the collision object affected.
114-
---@param group string the new group name to be assigned. function changeCollisionGroup() physics.set_group("#collisionobject", "enemy") end
114+
---@param group string the new group name to be assigned. local function change_collision_group() physics.set_group("#collisionobject", "enemy") end
115115
function physics.set_group(url, group) end
116116

117117
---Flips the collision shapes horizontally for a collision object
@@ -130,8 +130,8 @@ function physics.set_joint_properties(collisionobject, joint_id, properties) end
130130
---Sets or clears the masking of a group (maskbit) in a collision object.
131131
---@param url string|hash|url the collision object to change the mask of.
132132
---@param group string the name of the group (maskbit) to modify in the mask.
133-
---@param type bool boolean value of the new maskbit. 'true' to enable, 'false' to disable. function makeUserAlly() -- no longer collide with the "user" group physics.set_maskbit("#collisionobject","user",false) end
134-
function physics.set_maskbit(url, group, type) end
133+
---@param maskbit boolean boolean value of the new maskbit. 'true' to enable, 'false' to disable. local function make_invincible() -- no longer collide with the "bullet" group physics.set_maskbit("#collisionobject", "bullet", false) end
134+
function physics.set_maskbit(url, group, maskbit) end
135135

136136
---Flips the collision shapes vertically for a collision object
137137
---@param url string|hash|url the collision object that should flip its shapes

DefoldDocs/doc/camera_doc.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,48 @@
7979
"tparams": [],
8080
"type": "MESSAGE",
8181
"name": "release_camera_focus"
82+
},
83+
{
84+
"replaces": "",
85+
"description": "Vertical field of view of the camera.\nThe type of the property is float.",
86+
"parameters": [],
87+
"returnvalues": [],
88+
"notes": [],
89+
"brief": "<span class=\"type\">float</span> camera fov",
90+
"examples": "<div class=\"codehilite\"><pre><span></span><span class=\"k\">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\">fov</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;</span><span class=\"s\">#camera&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;</span><span class=\"s\">fov&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;</span><span class=\"s\">#sprite&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;</span><span class=\"s\">fov&quot;</span><span class=\"p\">,</span> <span class=\"n\">fov</span> <span class=\"o\">+</span> <span class=\"mf\">0.1</span><span class=\"p\">)</span>\n <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">animate</span><span class=\"p\">(</span><span class=\"s2\">&quot;</span><span class=\"s\">#camera&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;</span><span class=\"s\">fov&quot;</span><span class=\"p\">,</span> <span class=\"n\">go</span><span class=\"p\">.</span><span class=\"n\">PLAYBACK_ONCE_PINGPONG</span><span class=\"p\">,</span> <span class=\"mf\">1.2</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\">1</span><span class=\"p\">)</span>\n<span class=\"k\">end</span>\n</pre></div>",
91+
"members": [],
92+
"error": "",
93+
"tparams": [],
94+
"type": "PROPERTY",
95+
"name": "fov"
96+
},
97+
{
98+
"replaces": "",
99+
"description": "Camera frustum near plane.\nThe type of the property is float.",
100+
"parameters": [],
101+
"returnvalues": [],
102+
"notes": [],
103+
"brief": "<span class=\"type\">float</span> camera near_z",
104+
"examples": "<div class=\"codehilite\"><pre><span></span><span class=\"k\">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\">near_z</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;</span><span class=\"s\">#camera&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;</span><span class=\"s\">near_z&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;</span><span class=\"s\">#sprite&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;</span><span class=\"s\">near_z&quot;</span><span class=\"p\">,</span> <span class=\"mi\">10</span><span class=\"p\">)</span>\n<span class=\"k\">end</span>\n</pre></div>",
105+
"members": [],
106+
"error": "",
107+
"tparams": [],
108+
"type": "PROPERTY",
109+
"name": "near_z"
110+
},
111+
{
112+
"replaces": "",
113+
"description": "Camera frustum far plane.\nThe type of the property is float.",
114+
"parameters": [],
115+
"returnvalues": [],
116+
"notes": [],
117+
"brief": "<span class=\"type\">float</span> camera far_z",
118+
"examples": "<div class=\"codehilite\"><pre><span></span><span class=\"k\">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\">far_z</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;</span><span class=\"s\">#camera&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;</span><span class=\"s\">far_z&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;</span><span class=\"s\">#sprite&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;</span><span class=\"s\">far_z&quot;</span><span class=\"p\">,</span> <span class=\"mi\">10</span><span class=\"p\">)</span>\n<span class=\"k\">end</span>\n</pre></div>",
119+
"members": [],
120+
"error": "",
121+
"tparams": [],
122+
"type": "PROPERTY",
123+
"name": "far_z"
82124
}
83125
]
84126
}
Lines changed: 285 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,285 @@
1+
{
2+
"info": {
3+
"group": "DEFOLD SDK",
4+
"description": "File Descriptor functions.",
5+
"namespace": "dmFileDescriptor",
6+
"brief": "SDK File Descriptor API documentation",
7+
"file": "dmsdk/dlib/file_descriptor.h",
8+
"path": "engine/dlib/src/dmsdk/dlib/file_descriptor.h",
9+
"name": "FileDescriptor"
10+
},
11+
"elements": [
12+
{
13+
"replaces": "",
14+
"description": "Poll events",
15+
"parameters": [],
16+
"returnvalues": [],
17+
"notes": [],
18+
"brief": "Poll events",
19+
"examples": "",
20+
"members": [
21+
{
22+
"doc": "",
23+
"type": "",
24+
"name": "EVENT_READ"
25+
},
26+
{
27+
"doc": "",
28+
"type": "",
29+
"name": "EVENT_WRITE"
30+
},
31+
{
32+
"doc": "",
33+
"type": "",
34+
"name": "EVENT_ERROR"
35+
}
36+
],
37+
"error": "",
38+
"tparams": [],
39+
"type": "ENUM",
40+
"name": "PollEvent"
41+
},
42+
{
43+
"replaces": "",
44+
"description": "Poller",
45+
"parameters": [],
46+
"returnvalues": [],
47+
"notes": [],
48+
"brief": "Poller",
49+
"examples": "",
50+
"members": [],
51+
"error": "",
52+
"tparams": [],
53+
"type": "STRUCT",
54+
"name": "Poller"
55+
},
56+
{
57+
"replaces": "",
58+
"description": "Set capacity of poller.",
59+
"parameters": [
60+
{
61+
"doc": "Poller",
62+
"name": "poller",
63+
"types": [
64+
"Poller*"
65+
]
66+
},
67+
{
68+
"doc": "Capacity",
69+
"name": "capacity",
70+
"types": [
71+
"uint32_T"
72+
]
73+
}
74+
],
75+
"returnvalues": [],
76+
"notes": [],
77+
"brief": "Set capacity of poller.",
78+
"examples": "",
79+
"members": [],
80+
"error": "",
81+
"tparams": [],
82+
"type": "FUNCTION",
83+
"name": "PollerSetCapacity"
84+
},
85+
{
86+
"replaces": "",
87+
"description": "Clear event from poller.",
88+
"parameters": [
89+
{
90+
"doc": "Poller",
91+
"name": "poller",
92+
"types": [
93+
"Poller*"
94+
]
95+
},
96+
{
97+
"doc": "Event to clear",
98+
"name": "event",
99+
"types": [
100+
"PollEvent"
101+
]
102+
},
103+
{
104+
"doc": "File descriptor to clear",
105+
"name": "fd",
106+
"types": [
107+
"int"
108+
]
109+
}
110+
],
111+
"returnvalues": [
112+
{
113+
"doc": "",
114+
"name": "",
115+
"types": [
116+
"void"
117+
]
118+
}
119+
],
120+
"notes": [],
121+
"brief": "Clear event from poller.",
122+
"examples": "",
123+
"members": [],
124+
"error": "",
125+
"tparams": [],
126+
"type": "FUNCTION",
127+
"name": "PollerClearEvent"
128+
},
129+
{
130+
"replaces": "",
131+
"description": "Set file descriptor event to poll for",
132+
"parameters": [
133+
{
134+
"doc": "Poller",
135+
"name": "poller",
136+
"types": [
137+
"Poller*"
138+
]
139+
},
140+
{
141+
"doc": "Event to set",
142+
"name": "event",
143+
"types": [
144+
"PollEvent"
145+
]
146+
},
147+
{
148+
"doc": "File descriptor to clear",
149+
"name": "fd",
150+
"types": [
151+
"int"
152+
]
153+
}
154+
],
155+
"returnvalues": [
156+
{
157+
"doc": "",
158+
"name": "",
159+
"types": [
160+
"void"
161+
]
162+
}
163+
],
164+
"notes": [],
165+
"brief": "Set file descriptor event to poll for",
166+
"examples": "",
167+
"members": [],
168+
"error": "",
169+
"tparams": [],
170+
"type": "FUNCTION",
171+
"name": "PollerSetEvent"
172+
},
173+
{
174+
"replaces": "",
175+
"description": "Check if event exists for file descriptor",
176+
"parameters": [
177+
{
178+
"doc": "Poller",
179+
"name": "poller",
180+
"types": [
181+
"Poller*"
182+
]
183+
},
184+
{
185+
"doc": "Event to check",
186+
"name": "event",
187+
"types": [
188+
"PollEvent"
189+
]
190+
},
191+
{
192+
"doc": "File descriptor to clear",
193+
"name": "fd",
194+
"types": [
195+
"int"
196+
]
197+
}
198+
],
199+
"returnvalues": [
200+
{
201+
"doc": "True if event exists.",
202+
"name": "",
203+
"types": [
204+
"bool"
205+
]
206+
}
207+
],
208+
"notes": [],
209+
"brief": "Check if event exists for file descriptor",
210+
"examples": "",
211+
"members": [],
212+
"error": "",
213+
"tparams": [],
214+
"type": "FUNCTION",
215+
"name": "PollerHasEvent"
216+
},
217+
{
218+
"replaces": "",
219+
"description": "Reset poller.",
220+
"parameters": [
221+
{
222+
"doc": "Poller",
223+
"name": "spoller",
224+
"types": [
225+
"Poller*"
226+
]
227+
}
228+
],
229+
"returnvalues": [
230+
{
231+
"doc": "",
232+
"name": "",
233+
"types": [
234+
"void"
235+
]
236+
}
237+
],
238+
"notes": [],
239+
"brief": "Reset poller.",
240+
"examples": "",
241+
"members": [],
242+
"error": "",
243+
"tparams": [],
244+
"type": "FUNCTION",
245+
"name": "PollerReset"
246+
},
247+
{
248+
"replaces": "",
249+
"description": "Wait for event",
250+
"parameters": [
251+
{
252+
"doc": "Poller",
253+
"name": "poller",
254+
"types": [
255+
"Poller*"
256+
]
257+
},
258+
{
259+
"doc": "Timeout. For blocking pass -1. (milliseconds)",
260+
"name": "timeout",
261+
"types": [
262+
"int"
263+
]
264+
}
265+
],
266+
"returnvalues": [
267+
{
268+
"doc": "Non-negative value on success, 0 on timeout and\n-1 on error with errno set to indicate the error",
269+
"name": "",
270+
"types": [
271+
"Result"
272+
]
273+
}
274+
],
275+
"notes": [],
276+
"brief": "Wait for event",
277+
"examples": "",
278+
"members": [],
279+
"error": "",
280+
"tparams": [],
281+
"type": "FUNCTION",
282+
"name": "Wait"
283+
}
284+
]
285+
}

0 commit comments

Comments
 (0)