cytanb-vci-lua's People
Forkers
feathvrcytanb-vci-lua's Issues
GetSubItemTransform のアノテーションを改善する
PR #5 でいただいたパッチの、アノテーション部分を取りいれたい。
cytanb.TableToSerializable が、非負の数値でもArrayNumberTagを付加している
例えば、{100, 200, 300, 400}
のような配列では、負の数値が含まれていないので、手を加えずにそのままにしておきたい。
現状のコードは、数値インデックスであれば常に ArrayNumberTag
を付加している。
json.parse fails when string contains escaped forward slash
json.serialize は、フォワードスラッシュ /
をエスケープします。\/
しかし、json.parse は、これを扱えず、パースエラーします。
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.