incanto 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d.js +1 -1
- package/dist/3d.d.ts +39 -1
- package/dist/3d.js +4 -4
- package/dist/{create-game-C7Zsqbko.js → create-game-CdWhP6ve.js} +1 -1
- package/dist/{create-game-Bydey3CZ.js → create-game-Cq0Z41EQ.js} +3 -3
- package/dist/{gameplay-DPMgZk9W.js → gameplay-Dn3yidJw.js} +32 -3
- package/dist/gameplay.d.ts +7 -0
- package/dist/gameplay.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{physics-3d-Clv1uFzk.js → physics-3d-D8m2Hd-q.js} +1 -1
- package/dist/react.js +1 -1
- package/dist/{register-iUPtts7T.js → register-BP-kbijm.js} +95 -1
- package/dist/test.js +4 -4
- package/editor/assets/{agent8-B0ZGx-N1.js → agent8--Cd_2Y95.js} +1 -1
- package/editor/assets/{index-BLzp8moy.js → index-Dp_cYQx1.js} +40 -40
- package/editor/index.html +1 -1
- package/package.json +1 -1
- package/schemas/scene.schema.json +106 -0
- package/skills/incanto-3d-character.md +26 -0
- package/skills/incanto-node-reference.md +15 -0
package/editor/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Incanto Scene Editor</title>
|
|
7
7
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect width='16' height='16' rx='3' fill='%236ee7dc'/><text x='8' y='12' text-anchor='middle' font-size='11' font-family='monospace' fill='%230e1018'>i</text></svg>" />
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-Dp_cYQx1.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="./assets/GameServer-C56iOUgF.js">
|
|
10
10
|
<link rel="stylesheet" crossorigin href="./assets/index-D8QvwvOm.css">
|
|
11
11
|
</head>
|
package/package.json
CHANGED
|
@@ -190,6 +190,9 @@
|
|
|
190
190
|
{
|
|
191
191
|
"$ref": "#/$defs/Billboard3D"
|
|
192
192
|
},
|
|
193
|
+
{
|
|
194
|
+
"$ref": "#/$defs/BoneAttachment3D"
|
|
195
|
+
},
|
|
193
196
|
{
|
|
194
197
|
"$ref": "#/$defs/Camera2D"
|
|
195
198
|
},
|
|
@@ -1090,6 +1093,109 @@
|
|
|
1090
1093
|
},
|
|
1091
1094
|
"required": ["name", "type"]
|
|
1092
1095
|
},
|
|
1096
|
+
"BoneAttachment3D": {
|
|
1097
|
+
"type": "object",
|
|
1098
|
+
"properties": {
|
|
1099
|
+
"name": {
|
|
1100
|
+
"type": "string"
|
|
1101
|
+
},
|
|
1102
|
+
"uid": {
|
|
1103
|
+
"type": "string"
|
|
1104
|
+
},
|
|
1105
|
+
"type": {
|
|
1106
|
+
"const": "BoneAttachment3D"
|
|
1107
|
+
},
|
|
1108
|
+
"groups": {
|
|
1109
|
+
"type": "array",
|
|
1110
|
+
"items": {
|
|
1111
|
+
"type": "string"
|
|
1112
|
+
}
|
|
1113
|
+
},
|
|
1114
|
+
"tags": {
|
|
1115
|
+
"type": "object"
|
|
1116
|
+
},
|
|
1117
|
+
"props": {
|
|
1118
|
+
"type": "object",
|
|
1119
|
+
"properties": {
|
|
1120
|
+
"position": {
|
|
1121
|
+
"type": "array",
|
|
1122
|
+
"items": {
|
|
1123
|
+
"type": "number"
|
|
1124
|
+
},
|
|
1125
|
+
"minItems": 3,
|
|
1126
|
+
"maxItems": 3,
|
|
1127
|
+
"default": [0, 0, 0]
|
|
1128
|
+
},
|
|
1129
|
+
"rotation": {
|
|
1130
|
+
"type": "array",
|
|
1131
|
+
"items": {
|
|
1132
|
+
"type": "number"
|
|
1133
|
+
},
|
|
1134
|
+
"minItems": 3,
|
|
1135
|
+
"maxItems": 3,
|
|
1136
|
+
"default": [0, 0, 0]
|
|
1137
|
+
},
|
|
1138
|
+
"static": {
|
|
1139
|
+
"type": "boolean",
|
|
1140
|
+
"default": false
|
|
1141
|
+
},
|
|
1142
|
+
"scale": {
|
|
1143
|
+
"type": "array",
|
|
1144
|
+
"items": {
|
|
1145
|
+
"type": "number"
|
|
1146
|
+
},
|
|
1147
|
+
"minItems": 3,
|
|
1148
|
+
"maxItems": 3,
|
|
1149
|
+
"default": [1, 1, 1]
|
|
1150
|
+
},
|
|
1151
|
+
"visible": {
|
|
1152
|
+
"type": "boolean",
|
|
1153
|
+
"default": true
|
|
1154
|
+
},
|
|
1155
|
+
"renderOrder": {
|
|
1156
|
+
"type": "number",
|
|
1157
|
+
"default": 0
|
|
1158
|
+
},
|
|
1159
|
+
"orderGroup": {
|
|
1160
|
+
"type": "string",
|
|
1161
|
+
"enum": ["background", "terrain", "default", "characters", "effects", "overlay"],
|
|
1162
|
+
"default": "default"
|
|
1163
|
+
},
|
|
1164
|
+
"target": {
|
|
1165
|
+
"type": "string",
|
|
1166
|
+
"default": ""
|
|
1167
|
+
},
|
|
1168
|
+
"bone": {
|
|
1169
|
+
"type": "string",
|
|
1170
|
+
"default": ""
|
|
1171
|
+
}
|
|
1172
|
+
},
|
|
1173
|
+
"additionalProperties": false
|
|
1174
|
+
},
|
|
1175
|
+
"script": {
|
|
1176
|
+
"type": "object",
|
|
1177
|
+
"properties": {
|
|
1178
|
+
"name": {
|
|
1179
|
+
"type": "string"
|
|
1180
|
+
},
|
|
1181
|
+
"props": {
|
|
1182
|
+
"type": "object"
|
|
1183
|
+
}
|
|
1184
|
+
},
|
|
1185
|
+
"required": ["name"]
|
|
1186
|
+
},
|
|
1187
|
+
"network": {
|
|
1188
|
+
"type": "object"
|
|
1189
|
+
},
|
|
1190
|
+
"children": {
|
|
1191
|
+
"type": "array",
|
|
1192
|
+
"items": {
|
|
1193
|
+
"$ref": "#/$defs/node"
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
"required": ["name", "type"]
|
|
1198
|
+
},
|
|
1093
1199
|
"Camera2D": {
|
|
1094
1200
|
"type": "object",
|
|
1095
1201
|
"properties": {
|
|
@@ -117,6 +117,32 @@ itself never rotates. The skin MOUNTS at 180° (facing away from the default
|
|
|
117
117
|
camera, original parity) and then faces wherever it moves; `skinYawOffset`
|
|
118
118
|
adds a correction for models whose native forward is not +z.
|
|
119
119
|
|
|
120
|
+
## Mounting things on bones (`BoneAttachment3D`)
|
|
121
|
+
|
|
122
|
+
A sword in the hand, a hat on the head, sparks on a wingtip — parent them to a
|
|
123
|
+
`BoneAttachment3D` and they ride the LIVE animated skeleton:
|
|
124
|
+
|
|
125
|
+
```jsonc
|
|
126
|
+
{ "name": "SwordMount", "type": "BoneAttachment3D",
|
|
127
|
+
"props": { "target": "../Skin", "bone": "RightHand" },
|
|
128
|
+
"children": [
|
|
129
|
+
{ "name": "Blade", "type": "MeshInstance3D",
|
|
130
|
+
"props": { "mesh": "box", "size": [0.04, 0.04, 0.9], "position": [0, 0, 0.45],
|
|
131
|
+
"material": { "color": "#d8dde8", "metalness": 0.9, "roughness": 0.25 } } }
|
|
132
|
+
] }
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
- `target` = node path to the ModelInstance3D; `bone` = bone name. Lookup is
|
|
136
|
+
forgiving: `"RightHand"` also matches `mixamorigRightHand` /
|
|
137
|
+
`mixamorig:RightHand` (agent8's base-model is a Mixamo rig — `Head`,
|
|
138
|
+
`Spine2`, `LeftFoot`, `RightHandIndex1`…).
|
|
139
|
+
- The attachment's own `position`/`rotation` are a BONE-SPACE offset (grip
|
|
140
|
+
adjustments).
|
|
141
|
+
- Purely VISUAL: it follows the rendered skeleton, so headless the node stays
|
|
142
|
+
at its prop transform — keep hit checks range-based from the body, never
|
|
143
|
+
bone-based.
|
|
144
|
+
- `model.boneNames()` lists every bone at runtime when you need to hunt one.
|
|
145
|
+
|
|
120
146
|
## Facing a direction in 3D — the +Z-FORWARD rule (read before turning ANY skin)
|
|
121
147
|
|
|
122
148
|
This trips people up REPEATEDLY, so here is the one rule. agent8's `base-model` (and
|
|
@@ -130,6 +130,20 @@ Signals: `finished`
|
|
|
130
130
|
| `orderGroup` | `"default"` | one of: `background` `terrain` `default` `characters` `effects` `overlay` |
|
|
131
131
|
| `mode` | `"screen"` | one of: `screen` `y` `none` |
|
|
132
132
|
|
|
133
|
+
## `BoneAttachment3D` — `incanto/3d`
|
|
134
|
+
|
|
135
|
+
| Prop | Default | Kind |
|
|
136
|
+
|---|---|---|
|
|
137
|
+
| `position` | `[0,0,0]` | array |
|
|
138
|
+
| `rotation` | `[0,0,0]` | array |
|
|
139
|
+
| `static` | `false` | boolean |
|
|
140
|
+
| `scale` | `[1,1,1]` | array |
|
|
141
|
+
| `visible` | `true` | boolean |
|
|
142
|
+
| `renderOrder` | `0` | number |
|
|
143
|
+
| `orderGroup` | `"default"` | one of: `background` `terrain` `default` `characters` `effects` `overlay` |
|
|
144
|
+
| `target` | `""` | string |
|
|
145
|
+
| `bone` | `""` | string |
|
|
146
|
+
|
|
133
147
|
## `Camera2D` — `incanto/2d`
|
|
134
148
|
|
|
135
149
|
| Prop | Default | Kind |
|
|
@@ -942,6 +956,7 @@ Signals: `totalChanged(total)`
|
|
|
942
956
|
| `amount` | `10` | number |
|
|
943
957
|
| `targetGroup` | `""` | string |
|
|
944
958
|
| `oncePerTarget` | `true` | boolean |
|
|
959
|
+
| `repeatEvery` | `0` | number |
|
|
945
960
|
| `destroySelf` | `false` | boolean |
|
|
946
961
|
|
|
947
962
|
Signals: `dealtDamage(amount, target)`
|