Archaegeo / DualUniverseLuaIssues

DualUniverse LUA Issue Tracking
GNU General Public License v3.0
5 stars 0 forks source link

More C/C++ Methods #22

Open EasternGamer opened 3 years ago

EasternGamer commented 3 years ago

Simply put, I've noticed a large number of the Lua community suggesting certain things be implemented on a lower level, especially JSON processing. So, to that effect, similar to library.systemResolution3(...), library should also have the following:

library.decode/library.decodeJSON

library.encode/library.encodeJSON

Less commonly, here are some of my recommendations: library.systemResolution4(...) so 4x4 matrices could be done.

Then, while I'm here, I'll suggest that the currently vec3, quaternion, matrix4, and so on, should all be implemented under library like the following, though it is probably unlikely to be implemented:

local vec3 = library.vec3
local vector = vec3({0,0,0})
vector.normalize()
-- and so on

local quaternion = library.quaternion
local quat1 = quaternion({0,0,0,1})
local quat2 = quaternion({0,0,0,1})
quat1.multiply(quat2)
-- and so on

Technically, the actual C methods lie in the "multiply" or "normalize" calls, with just the initial preamble for initiating and organizing it under the library title.

NQ-Ligo commented 2 years ago

Hi there!

On some points, I totally agree with this point @EasternGamer . The only reason we haven't pushed more on the library is simply because we haven't been able to look into it. But we have plans to potentially add things to it, and why not json parsing indeed.