Add more annotations

This commit is contained in:
Insality 2020-09-28 22:22:46 +03:00
parent e00ab4f0a1
commit 0b56a18578
3 changed files with 12 additions and 1 deletions

View File

@ -231,8 +231,8 @@ _Will fill later_
## License
- Original created by [AGulev](https://github.com/AGulev)
- Developed and supporting by [Insality](https://github.com/Insality)
- Original idea by [AGulev](https://github.com/AGulev)
- Assets from [Kenney](http://www.kenney.nl/)
**MIT** License

View File

@ -226,6 +226,11 @@ function StaticGrid:clear()
end
--- Return elements offset for correct posing nodes. Correct posing at
-- parent pivot node (0:0) with adjusting of node sizes and anchoring
-- @function static_grid:_get_zero_offset
-- @treturn vector3 The offset vector
-- @local
function StaticGrid:_get_zero_offset()
-- zero offset: center pos - border size * anchor
return vmath.vector3(

View File

@ -357,6 +357,11 @@ function DynamicGrid:_get_node_size(node)
end
--- Return elements offset for correct posing nodes. Correct posing at
-- parent pivot node (0:0) with adjusting of node sizes and anchoring
-- @function dynamic_grid:_get_zero_offset
-- @treturn vector3 The offset vector
-- @local
function DynamicGrid:_get_zero_offset()
-- zero offset: center pos - border size * anchor
return vmath.vector3(
@ -366,6 +371,7 @@ function DynamicGrid:_get_zero_offset()
end
--- Return side vector to correct node shifting
function DynamicGrid:_get_side_vector(side, is_forward)
if side == const.SIDE.X then
return is_forward and SIDE_VECTORS.RIGHT or SIDE_VECTORS.LEFT