-
Notifications
You must be signed in to change notification settings - Fork 1
docs(spec/package):about model of sutera package using yaml #67
base: main
Are you sure you want to change the base?
Changes from all commits
7a78c83
21c8a4e
bb7c2f6
38d24ca
74d8bc7
049cc89
50c7fd2
31505c0
591c055
b83bc01
a57a6ee
6c255ff
1160680
030c025
45b9b43
81a9e6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # モデルのSuteraパッケージについて(yamlフォーマット) | ||
| ## 概要 | ||
| Suteraパッケージではワールド内に設置された3Dモデルの情報を本項目で説明してるyaml^[1]フォーマットを用いて管理しています。 | ||
|
|
||
| ## モデルのyamlファイルに必要な要素 | ||
| Suteraパッケージにおいてワールド内で設置されたオブジェクトの位置や、3Dモデルへのパスといったオブジェクトに関する様々な情報を保持する必要があります。Suteraパッケージではそれらオブジェクトに関する情報を以下のような要素を持ったyamlファイルを用いて管理しています。 | ||
|
|
||
| ### metadata | ||
| ファイルの基本的な情報が記載される部分です。 | ||
| - `type`: Suteraパッケージのタイプを示します。オブジェクトの場合Sutera-objectと記載されます | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `sutera_version`: 使用されているSuteraのバージョンが記載されます | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `name`: オブジェクトの名前が記載されます | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `version`: オブジェクトのバージョンが記載されます | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `id`: オブジェクトに割り振るidを記載します | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ### model | ||
| 使用する3Dモデルのモデルデータに関して記述される部分です。 | ||
| - `type`: 使用する3Dモデルのファイルタイプを記載してください | ||
| - `path`: 使用する3Dモデルのファイルへの絶対パスを指定してください | ||
|
|
||
| ### material | ||
| 3Dモデルで使用するマテリアルに関して記述する部分です。 | ||
| - `type`: マテリアルに使用するファイルのタイプを記述してください | ||
| - `path`: マテリアルに使用するファイルの絶対パスを記述してください | ||
|
|
||
| ### physics | ||
| モデルの物理的挙動の設定に関して記述する部分です。 | ||
| - `coliders`: | ||
| コライダーに関して設定する部分です。配列であるため、設定しない場合は空配列[]を設定してください。コライダーを設定する際はコライダーの`type`と各タイプごとのパラメータを記述してください。以下にSuteraで使用できる主要なコライダーのタイプと設定項目の例を記載します。 | ||
| #### `box` | ||
| 箱型のコライダーです。x,y,z軸方向のboxの大きさを指定してください。 | ||
| ``` | ||
| type: box | ||
| x: 1 | ||
| y: 1 | ||
| z: 1 | ||
| ``` | ||
| #### `sphere` | ||
| 球形のコライダーです。球の半径`r`を指定してください。 | ||
| ``` | ||
| type: sphere | ||
| r: 1 | ||
| ``` | ||
|
|
||
| #### `cupsule` | ||
| カプセル方のコライダーです。球の半径`r`と高さ`h`を指定してください。 | ||
| ``` | ||
| type: sphere | ||
| r: 1 | ||
| h: 2 | ||
| ``` | ||
|
|
||
|
|
||
| - `rigidbody`: 物理演算について記述する項目です | ||
| - `gravity`: `True`に設定すると重力の影響を受けます | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `mass`: 質量の設定で単位は`[kg]`です。明記しない場合は0となり重力がないという扱いになります | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `drag`: オブジェクトに影響する空気抵抗の大きさです。0の場合空気抵抗が0となります | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `angular_drag`: トルクによって回転する際に、オブジェクトに影響する空気抵抗の大きさです。0の場合空気抵抗は0となります | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ### `specs` | ||
| オブジェクトをワールドに設置した際の位置や回転などといった情報を記述する部分です。 | ||
| - `location`: ワールドにおけるオブジェクトのグローバル座標です。`x,y,z`の3次元直交座標系で記載します | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [textlint] <eslint.rules.ja-technical-writing/max-kanji-continuous-len> reported by reviewdog 🐶
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `rotation`: オブジェクトの回転を表します。`x,y,z,w`のクォータニオンで記載します | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `scale`: オブジェクトのスケールです。locationと同じく`x,y,z`の3次元直交座標系で記載します | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [textlint] <eslint.rules.ja-technical-writing/max-kanji-continuous-len> reported by reviewdog 🐶
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `origin`: ワールドにおけるオブジェクトの原点です。グローバル座標で表され、オブジェクトをリスポーンした際にはこの位置にオブジェクトが移動します | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `origin_rotation`: ワールドにオブジェクトがスポーンした際の角度を指定します。`rotation`と同様に`x,y,z,w`のクォータニオンで記載します | ||
See2et marked this conversation as resolved.
Show resolved
Hide resolved
See2et marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ## yamlファイルの例 | ||
| [model.yaml](./model.yaml)に本項目で説明したワールドに設置する3Dモデルに関するyamlファイルの例が記載されています。 | ||
|
|
||
| ## 参考文献,脚注 | ||
| ^[1~] YAML (「YAML Ain't Markup Language」の再帰的頭字語) は、人間に優しく、日常の一般的なタスクで最新のプログラミング言語とうまく連携するように設計されたデータシリアル化言語です。^[2] | ||
slotsu0809 marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [textlint] <eslint.rules.ja-technical-writing/sentence-length> reported by reviewdog 🐶 |
||
| ^[2~] yaml公式サイトspecification v1.2.2 https://yaml.org/spec/1.2.2/ 閲覧2024/7/23 | ||
slotsu0809 marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [textlint] <eslint.rules.ja-technical-writing/ja-no-mixed-period> reported by reviewdog 🐶 |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| metadata: | ||
| type: Sutera-object | ||
| sutera_version: 0.1.0 | ||
| name: sofa | ||
| version: 0.2.0 | ||
| id: ball | ||
|
|
||
| model: | ||
| type: gltf #ファイルのタイプを記述 | ||
| path: models/sofa.gltf #ファイルの置いてあるフォルダへの絶対パスを指定 | ||
|
|
||
| material: | ||
| type: sbsar #マテリアルのファイルタイプについて記述 | ||
| path: materials/sofa.sbsar #マテリアルのファイルへの絶対パス | ||
|
|
||
| physics: | ||
| colliders: | ||
| - type: sphere | ||
| radius: 3 | ||
| rigidbody: | ||
| gravity: true | ||
| mass: 50 | ||
| drag: 1 | ||
| angular_drag: 0 | ||
|
|
||
| specs: | ||
| location: | ||
| x:5 | ||
| y:5 | ||
| z:0 | ||
| rotation: | ||
| x:0 | ||
| y:0 | ||
| z:0 | ||
| w:0 | ||
| scale: | ||
| x:1 | ||
| y:1 | ||
| z:1 | ||
| origin: | ||
| x:1 | ||
| y:1 | ||
| z:0 | ||
| origin_rotation: | ||
| x:0 | ||
| y:0 | ||
| z:0 | ||
| w:0 |
Uh oh!
There was an error while loading. Please reload this page.