Giter Club home page Giter Club logo

cytanb-vci-lua's People

Contributors

feathvr avatar oocytanb avatar shiromac avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

feathvr

cytanb-vci-lua's Issues

GetSubItemTransformのcytanb_transform_tからposition,rotation,scale等を返す関数が欲しい。

最近、Messageでtransformのデータを送る際にGetSubItemTransform関数を使用したのですが、数値をVector3にそれぞれ変換するプログラムが長くなってしまう。

           local pos = Vector3.__new(message.Player[i].Pawn[j].positionX,message.Player[i].Pawn[j].positionY,
                                     message.Player[i].Pawn[j].positionZ)
           local rot = Quaternion.__new(message.Player[i].Pawn[j].rotationX,message.Player[i].Pawn[j].rotationY,
                                        message.Player[i].Pawn[j].rotationZ,message.Player[i].Pawn[j].rotationW)
           GeisterCore.PlayerArray[i].Pawn[j].SubItem.SetPosition(pos)
           GeisterCore.PlayerArray[i].Pawn[j].SubItem.SetRotation(rot)

なので、GetSubItemTransformをposition,rotation,scaleに戻す関数がほしいです。
形状としては

関数名 = function(cytanb_transorm_t)
return {
position = Vector3.__new(cytanb_transorm_t.positionX,cytanb_transorm_t.positionY,cytanb_transorm_t.positionZ),
rotation = Quaternion.__new(cytanb_transorm_t.rotationX,cytanb_transorm_t.rotationY,cytanb_transorm_t.rotationZ,cytanb_transorm_t.rotationW)
scale = Vector3.__new(cytanb_transorm_t.scaleX,cytanb_transorm_t.scaleY,cytanb_transorm_t.scaleZ)
}
end,

このようなものが良いと考えています。
関数名とこのposition,rotation,scaleの情報が含まれるアノテーション用クラス名等はoOさんの思い等があると思うのでIssueとして挙げました。

数値インデックスのタグを、オリジナルのキーの後ろに付加したい

ダンプしたときの読みやすさの観点から、キー + #タグ としておきたいです。
タグは付加情報であり、重要な情報であるオリジナルのキー値を先頭にしておきたいです。
実装済みの #__CYTANB_NEGATIVE_NUMBER は、末尾に付加しているので、それに合わせるという意味もあります。

現状の TableToSerializable は、負数の配列の場合、#__CYTANB_ARRAY_NUMBER1#__CYTANB_NEGATIVE_NUMBER と出力するので、キー値を読みづらいです。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.