Skip to content

Commit

Permalink
update to 1.2.192
Browse files Browse the repository at this point in the history
  • Loading branch information
d954mas committed Feb 10, 2022
1 parent f5379cf commit d7702c0
Show file tree
Hide file tree
Showing 11 changed files with 2,614 additions and 2,097 deletions.
10 changes: 5 additions & 5 deletions DefoldDocs/api/collision_object.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function physics.get_gravity() end

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

---Get a table for properties for a connected joint. The joint has to be created before
Expand Down Expand Up @@ -69,7 +69,7 @@ function physics.get_joint_reaction_torque(collisionobject, joint_id) end
---object, false otherwise.
---@param url string|hash|url the collision object to check the mask of.
---@param group string the name of the group to check for.
---@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
---@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
function physics.get_maskbit(url, group) end

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

---Flips the collision shapes horizontally for a collision object
Expand All @@ -130,8 +130,8 @@ function physics.set_joint_properties(collisionobject, joint_id, properties) end
---Sets or clears the masking of a group (maskbit) in a collision object.
---@param url string|hash|url the collision object to change the mask of.
---@param group string the name of the group (maskbit) to modify in the mask.
---@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
function physics.set_maskbit(url, group, type) end
---@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
function physics.set_maskbit(url, group, maskbit) end

---Flips the collision shapes vertically for a collision object
---@param url string|hash|url the collision object that should flip its shapes
Expand Down
42 changes: 42 additions & 0 deletions DefoldDocs/doc/camera_doc.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,48 @@
"tparams": [],
"type": "MESSAGE",
"name": "release_camera_focus"
},
{
"replaces": "",
"description": "Vertical field of view of the camera.\nThe type of the property is float.",
"parameters": [],
"returnvalues": [],
"notes": [],
"brief": "<span class=\"type\">float</span> camera fov",
"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>",
"members": [],
"error": "",
"tparams": [],
"type": "PROPERTY",
"name": "fov"
},
{
"replaces": "",
"description": "Camera frustum near plane.\nThe type of the property is float.",
"parameters": [],
"returnvalues": [],
"notes": [],
"brief": "<span class=\"type\">float</span> camera near_z",
"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>",
"members": [],
"error": "",
"tparams": [],
"type": "PROPERTY",
"name": "near_z"
},
{
"replaces": "",
"description": "Camera frustum far plane.\nThe type of the property is float.",
"parameters": [],
"returnvalues": [],
"notes": [],
"brief": "<span class=\"type\">float</span> camera far_z",
"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>",
"members": [],
"error": "",
"tparams": [],
"type": "PROPERTY",
"name": "far_z"
}
]
}
285 changes: 285 additions & 0 deletions DefoldDocs/doc/dmFileDescriptor_doc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,285 @@
{
"info": {
"group": "DEFOLD SDK",
"description": "File Descriptor functions.",
"namespace": "dmFileDescriptor",
"brief": "SDK File Descriptor API documentation",
"file": "dmsdk/dlib/file_descriptor.h",
"path": "engine/dlib/src/dmsdk/dlib/file_descriptor.h",
"name": "FileDescriptor"
},
"elements": [
{
"replaces": "",
"description": "Poll events",
"parameters": [],
"returnvalues": [],
"notes": [],
"brief": "Poll events",
"examples": "",
"members": [
{
"doc": "",
"type": "",
"name": "EVENT_READ"
},
{
"doc": "",
"type": "",
"name": "EVENT_WRITE"
},
{
"doc": "",
"type": "",
"name": "EVENT_ERROR"
}
],
"error": "",
"tparams": [],
"type": "ENUM",
"name": "PollEvent"
},
{
"replaces": "",
"description": "Poller",
"parameters": [],
"returnvalues": [],
"notes": [],
"brief": "Poller",
"examples": "",
"members": [],
"error": "",
"tparams": [],
"type": "STRUCT",
"name": "Poller"
},
{
"replaces": "",
"description": "Set capacity of poller.",
"parameters": [
{
"doc": "Poller",
"name": "poller",
"types": [
"Poller*"
]
},
{
"doc": "Capacity",
"name": "capacity",
"types": [
"uint32_T"
]
}
],
"returnvalues": [],
"notes": [],
"brief": "Set capacity of poller.",
"examples": "",
"members": [],
"error": "",
"tparams": [],
"type": "FUNCTION",
"name": "PollerSetCapacity"
},
{
"replaces": "",
"description": "Clear event from poller.",
"parameters": [
{
"doc": "Poller",
"name": "poller",
"types": [
"Poller*"
]
},
{
"doc": "Event to clear",
"name": "event",
"types": [
"PollEvent"
]
},
{
"doc": "File descriptor to clear",
"name": "fd",
"types": [
"int"
]
}
],
"returnvalues": [
{
"doc": "",
"name": "",
"types": [
"void"
]
}
],
"notes": [],
"brief": "Clear event from poller.",
"examples": "",
"members": [],
"error": "",
"tparams": [],
"type": "FUNCTION",
"name": "PollerClearEvent"
},
{
"replaces": "",
"description": "Set file descriptor event to poll for",
"parameters": [
{
"doc": "Poller",
"name": "poller",
"types": [
"Poller*"
]
},
{
"doc": "Event to set",
"name": "event",
"types": [
"PollEvent"
]
},
{
"doc": "File descriptor to clear",
"name": "fd",
"types": [
"int"
]
}
],
"returnvalues": [
{
"doc": "",
"name": "",
"types": [
"void"
]
}
],
"notes": [],
"brief": "Set file descriptor event to poll for",
"examples": "",
"members": [],
"error": "",
"tparams": [],
"type": "FUNCTION",
"name": "PollerSetEvent"
},
{
"replaces": "",
"description": "Check if event exists for file descriptor",
"parameters": [
{
"doc": "Poller",
"name": "poller",
"types": [
"Poller*"
]
},
{
"doc": "Event to check",
"name": "event",
"types": [
"PollEvent"
]
},
{
"doc": "File descriptor to clear",
"name": "fd",
"types": [
"int"
]
}
],
"returnvalues": [
{
"doc": "True if event exists.",
"name": "",
"types": [
"bool"
]
}
],
"notes": [],
"brief": "Check if event exists for file descriptor",
"examples": "",
"members": [],
"error": "",
"tparams": [],
"type": "FUNCTION",
"name": "PollerHasEvent"
},
{
"replaces": "",
"description": "Reset poller.",
"parameters": [
{
"doc": "Poller",
"name": "spoller",
"types": [
"Poller*"
]
}
],
"returnvalues": [
{
"doc": "",
"name": "",
"types": [
"void"
]
}
],
"notes": [],
"brief": "Reset poller.",
"examples": "",
"members": [],
"error": "",
"tparams": [],
"type": "FUNCTION",
"name": "PollerReset"
},
{
"replaces": "",
"description": "Wait for event",
"parameters": [
{
"doc": "Poller",
"name": "poller",
"types": [
"Poller*"
]
},
{
"doc": "Timeout. For blocking pass -1. (milliseconds)",
"name": "timeout",
"types": [
"int"
]
}
],
"returnvalues": [
{
"doc": "Non-negative value on success, 0 on timeout and\n-1 on error with errno set to indicate the error",
"name": "",
"types": [
"Result"
]
}
],
"notes": [],
"brief": "Wait for event",
"examples": "",
"members": [],
"error": "",
"tparams": [],
"type": "FUNCTION",
"name": "Wait"
}
]
}
Loading

0 comments on commit d7702c0

Please sign in to comment.