@playdrop/playdrop-cli 0.16.16 → 0.17.1

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.
Files changed (369) hide show
  1. package/config/client-meta.json +4 -4
  2. package/dist/apiClient.d.ts +1 -2
  3. package/dist/apiClient.js +1 -16
  4. package/dist/appUrls.js +4 -0
  5. package/dist/apps/build.d.ts +12 -4
  6. package/dist/apps/build.js +55 -22
  7. package/dist/apps/index.d.ts +2 -1
  8. package/dist/apps/index.js +4 -1
  9. package/dist/apps/loadCheck.d.ts +5 -1
  10. package/dist/apps/loadCheck.js +52 -18
  11. package/dist/apps/serverBuild.d.ts +17 -0
  12. package/dist/apps/serverBuild.js +155 -0
  13. package/dist/apps/staticHtml.d.ts +1 -0
  14. package/dist/apps/staticHtml.js +19 -10
  15. package/dist/apps/upload.d.ts +12 -2
  16. package/dist/apps/upload.js +127 -46
  17. package/dist/catalogue.d.ts +23 -1
  18. package/dist/catalogue.js +126 -100
  19. package/dist/commandContext.d.ts +6 -3
  20. package/dist/commandContext.js +108 -18
  21. package/dist/commands/build.js +0 -7
  22. package/dist/commands/captureListing.d.ts +3 -0
  23. package/dist/commands/captureListing.js +48 -4
  24. package/dist/commands/chat.d.ts +4 -0
  25. package/dist/commands/chat.js +133 -8
  26. package/dist/commands/check.js +34 -1
  27. package/dist/commands/create.js +30 -263
  28. package/dist/commands/dev.js +37 -3
  29. package/dist/commands/devBrowser.js +2 -2
  30. package/dist/commands/devGameServer.d.ts +16 -0
  31. package/dist/commands/devGameServer.js +237 -0
  32. package/dist/commands/devRuntimeAssets.d.ts +1 -0
  33. package/dist/commands/devRuntimeAssets.js +2 -0
  34. package/dist/commands/devServer.d.ts +3 -0
  35. package/dist/commands/devServer.js +111 -5
  36. package/dist/commands/generation.d.ts +33 -4
  37. package/dist/commands/generation.js +304 -115
  38. package/dist/commands/login.js +23 -7
  39. package/dist/commands/review.d.ts +1 -1
  40. package/dist/commands/review.js +68 -95
  41. package/dist/commands/source.d.ts +19 -0
  42. package/dist/commands/source.js +142 -0
  43. package/dist/commands/tweaks.js +5 -11
  44. package/dist/commands/upload-content.d.ts +1 -1
  45. package/dist/commands/upload-content.js +16 -12
  46. package/dist/commands/upload.d.ts +17 -1
  47. package/dist/commands/upload.js +47 -10
  48. package/dist/commands/worker/archive-staging.d.ts +1 -0
  49. package/dist/commands/worker/archive-staging.js +13 -2
  50. package/dist/commands/worker/e2e-fixtures.d.ts +32 -0
  51. package/dist/commands/worker/e2e-fixtures.js +466 -0
  52. package/dist/commands/worker/game-server-infra.d.ts +80 -0
  53. package/dist/commands/worker/game-server-infra.js +595 -0
  54. package/dist/commands/worker/game-source-git.d.ts +126 -0
  55. package/dist/commands/worker/game-source-git.js +782 -0
  56. package/dist/commands/worker/generation.d.ts +94 -0
  57. package/dist/commands/worker/generation.js +1458 -0
  58. package/dist/commands/worker/runtime.d.ts +8 -10
  59. package/dist/commands/worker/runtime.js +51 -45
  60. package/dist/commands/worker.d.ts +79 -19
  61. package/dist/commands/worker.js +1796 -419
  62. package/dist/config.d.ts +2 -0
  63. package/dist/config.js +16 -3
  64. package/dist/environment.d.ts +0 -1
  65. package/dist/environment.js +0 -8
  66. package/dist/index.js +92 -13
  67. package/dist/workerAppProject.d.ts +1 -1
  68. package/dist/workerAppProject.js +15 -2
  69. package/node_modules/@playdrop/api-client/dist/client.d.ts +72 -25
  70. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  71. package/node_modules/@playdrop/api-client/dist/client.js +33 -0
  72. package/node_modules/@playdrop/api-client/dist/core/request.d.ts +1 -0
  73. package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
  74. package/node_modules/@playdrop/api-client/dist/core/request.js +17 -11
  75. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +51 -6
  76. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
  77. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +338 -41
  78. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +24 -1
  79. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
  80. package/node_modules/@playdrop/api-client/dist/domains/ai.js +20 -0
  81. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +13 -8
  82. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
  83. package/node_modules/@playdrop/api-client/dist/domains/apps.js +158 -90
  84. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -0
  85. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
  86. package/node_modules/@playdrop/api-client/dist/domains/assets.js +27 -0
  87. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +35 -3
  88. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
  89. package/node_modules/@playdrop/api-client/dist/domains/chat.js +89 -7
  90. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -1
  91. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
  92. package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +9 -0
  93. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +1 -2
  94. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
  95. package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +0 -11
  96. package/node_modules/@playdrop/api-client/dist/domains/social.d.ts +29 -0
  97. package/node_modules/@playdrop/api-client/dist/domains/social.d.ts.map +1 -0
  98. package/node_modules/@playdrop/api-client/dist/domains/social.js +79 -0
  99. package/node_modules/@playdrop/api-client/dist/index.d.ts +80 -29
  100. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  101. package/node_modules/@playdrop/api-client/dist/index.js +217 -56
  102. package/node_modules/@playdrop/api-client/dist/runtime.d.ts +18 -0
  103. package/node_modules/@playdrop/api-client/dist/runtime.d.ts.map +1 -0
  104. package/node_modules/@playdrop/api-client/dist/runtime.js +54 -0
  105. package/node_modules/@playdrop/api-client/package.json +7 -0
  106. package/node_modules/@playdrop/config/client-meta.json +4 -4
  107. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +11 -0
  108. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
  109. package/node_modules/@playdrop/config/dist/src/creator-plans.js +13 -1
  110. package/node_modules/@playdrop/config/dist/src/deployment.d.ts +0 -1
  111. package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
  112. package/node_modules/@playdrop/config/dist/src/deployment.js +0 -8
  113. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +0 -1
  114. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
  115. package/node_modules/@playdrop/config/dist/src/public-deployment.js +0 -8
  116. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts +1 -1
  117. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +2 -2
  118. package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
  119. package/node_modules/@playdrop/config/dist/src/server/logging.js +31 -2
  120. package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +10 -0
  121. package/node_modules/@playdrop/config/dist/test/deployment.test.js +0 -4
  122. package/node_modules/@playdrop/config/dist/test/runtime-service-origins.test.js +2 -0
  123. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  124. package/node_modules/@playdrop/config/package.json +6 -0
  125. package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts +9 -0
  126. package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts.map +1 -0
  127. package/node_modules/@playdrop/game-source-git/dist/src/archive.js +107 -0
  128. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts +29 -0
  129. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts.map +1 -0
  130. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.js +64 -0
  131. package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts +8 -0
  132. package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts.map +1 -0
  133. package/node_modules/@playdrop/game-source-git/dist/src/export.js +25 -0
  134. package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts +39 -0
  135. package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts.map +1 -0
  136. package/node_modules/@playdrop/game-source-git/dist/src/git.js +195 -0
  137. package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts +6 -0
  138. package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts.map +1 -0
  139. package/node_modules/@playdrop/game-source-git/dist/src/ignore.js +51 -0
  140. package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts +10 -0
  141. package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts.map +1 -0
  142. package/node_modules/@playdrop/{boxel-core/dist/src/humanoid/r15 → game-source-git/dist/src}/index.js +9 -4
  143. package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts +17 -0
  144. package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts.map +1 -0
  145. package/node_modules/@playdrop/game-source-git/dist/src/lock.js +72 -0
  146. package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts +10 -0
  147. package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts.map +1 -0
  148. package/node_modules/@playdrop/game-source-git/dist/src/materialize.js +99 -0
  149. package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts +24 -0
  150. package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts.map +1 -0
  151. package/node_modules/@playdrop/game-source-git/dist/src/paths.js +207 -0
  152. package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts +66 -0
  153. package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts.map +1 -0
  154. package/node_modules/@playdrop/game-source-git/dist/src/repository.js +213 -0
  155. package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts +2 -0
  156. package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts.map +1 -0
  157. package/node_modules/@playdrop/game-source-git/dist/test/core.test.js +441 -0
  158. package/node_modules/@playdrop/game-source-git/dist/tsconfig.tsbuildinfo +1 -0
  159. package/node_modules/@playdrop/game-source-git/package.json +28 -0
  160. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
  161. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
  162. package/node_modules/@playdrop/types/dist/agent-task-terminal.js +15 -9
  163. package/node_modules/@playdrop/types/dist/api.d.ts +728 -164
  164. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  165. package/node_modules/@playdrop/types/dist/api.js +60 -11
  166. package/node_modules/@playdrop/types/dist/asset-pack.d.ts +2 -0
  167. package/node_modules/@playdrop/types/dist/asset-pack.d.ts.map +1 -1
  168. package/node_modules/@playdrop/types/dist/asset.d.ts +22 -8
  169. package/node_modules/@playdrop/types/dist/asset.d.ts.map +1 -1
  170. package/node_modules/@playdrop/types/dist/asset.js +26 -26
  171. package/node_modules/@playdrop/types/dist/chat.d.ts +107 -3
  172. package/node_modules/@playdrop/types/dist/chat.d.ts.map +1 -1
  173. package/node_modules/@playdrop/types/dist/chat.js +33 -4
  174. package/node_modules/@playdrop/types/dist/index.d.ts +3 -0
  175. package/node_modules/@playdrop/types/dist/index.d.ts.map +1 -1
  176. package/node_modules/@playdrop/types/dist/index.js +7 -1
  177. package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts +11 -0
  178. package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts.map +1 -0
  179. package/node_modules/@playdrop/types/dist/public-cache-tags.js +78 -0
  180. package/node_modules/@playdrop/types/dist/realtime.d.ts +3 -15
  181. package/node_modules/@playdrop/types/dist/realtime.d.ts.map +1 -1
  182. package/node_modules/@playdrop/types/dist/social.d.ts +64 -0
  183. package/node_modules/@playdrop/types/dist/social.d.ts.map +1 -0
  184. package/node_modules/@playdrop/{boxel-three/dist/src/types.js → types/dist/social.js} +14 -2
  185. package/node_modules/@playdrop/types/dist/spritesheet.d.ts +51 -0
  186. package/node_modules/@playdrop/types/dist/spritesheet.d.ts.map +1 -0
  187. package/node_modules/@playdrop/types/dist/spritesheet.js +73 -0
  188. package/node_modules/@playdrop/types/dist/version.d.ts +86 -58
  189. package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
  190. package/node_modules/@playdrop/types/dist/version.js +111 -0
  191. package/node_modules/@playdrop/types/package.json +14 -0
  192. package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
  193. package/node_modules/@playdrop/vox-three/dist/src/index.js +1 -1
  194. package/node_modules/@playdrop/vox-three/dist/src/index.js.map +1 -1
  195. package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +0 -3
  196. package/node_modules/@playdrop/vox-three/dist/src/vox.js +0 -110
  197. package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
  198. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +0 -18
  199. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
  200. package/node_modules/@playdrop/vox-three/package.json +8 -4
  201. package/node_modules/@playwright/mcp/node_modules/fsevents/LICENSE +22 -0
  202. package/node_modules/@playwright/mcp/node_modules/fsevents/README.md +83 -0
  203. package/node_modules/@playwright/mcp/node_modules/fsevents/fsevents.d.ts +46 -0
  204. package/node_modules/@playwright/mcp/node_modules/fsevents/fsevents.js +82 -0
  205. package/node_modules/@playwright/mcp/node_modules/fsevents/fsevents.node +0 -0
  206. package/node_modules/@playwright/mcp/node_modules/fsevents/package.json +62 -0
  207. package/package.json +9 -11
  208. package/dist/assets/model-artifacts.d.ts +0 -8
  209. package/dist/assets/model-artifacts.js +0 -382
  210. package/dist/assets/model-worker.d.ts +0 -22
  211. package/dist/assets/model-worker.js +0 -123
  212. package/node_modules/@playdrop/ai-client/dist/index.d.ts +0 -441
  213. package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +0 -1
  214. package/node_modules/@playdrop/ai-client/dist/index.js +0 -499
  215. package/node_modules/@playdrop/ai-client/package.json +0 -22
  216. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +0 -13
  217. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +0 -141
  218. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +0 -1
  219. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +0 -47
  220. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +0 -313
  221. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +0 -1
  222. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.d.ts +0 -3
  223. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +0 -36
  224. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +0 -1
  225. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +0 -23
  226. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js +0 -11
  227. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js.map +0 -1
  228. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +0 -4
  229. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js +0 -21
  230. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js.map +0 -1
  231. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +0 -4
  232. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js +0 -24
  233. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js.map +0 -1
  234. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +0 -3
  235. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.js.map +0 -1
  236. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +0 -3
  237. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +0 -387
  238. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +0 -1
  239. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +0 -6
  240. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js +0 -3
  241. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js.map +0 -1
  242. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +0 -3
  243. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +0 -373
  244. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +0 -1
  245. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +0 -12
  246. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +0 -215
  247. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +0 -1
  248. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +0 -4
  249. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js +0 -18
  250. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +0 -1
  251. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +0 -42
  252. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +0 -145
  253. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +0 -1
  254. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +0 -26
  255. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +0 -65
  256. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js.map +0 -1
  257. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +0 -33
  258. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +0 -175
  259. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +0 -1
  260. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r15.json +0 -1517
  261. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r6.json +0 -61
  262. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +0 -10
  263. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +0 -23
  264. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js.map +0 -1
  265. package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +0 -19
  266. package/node_modules/@playdrop/boxel-core/dist/src/index.js +0 -36
  267. package/node_modules/@playdrop/boxel-core/dist/src/index.js.map +0 -1
  268. package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +0 -26
  269. package/node_modules/@playdrop/boxel-core/dist/src/materials.js +0 -184
  270. package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +0 -1
  271. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +0 -68
  272. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +0 -488
  273. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +0 -1
  274. package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +0 -4
  275. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +0 -380
  276. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +0 -1
  277. package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +0 -29
  278. package/node_modules/@playdrop/boxel-core/dist/src/textures.js +0 -208
  279. package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +0 -1
  280. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +0 -9
  281. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +0 -312
  282. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +0 -1
  283. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +0 -9
  284. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +0 -154
  285. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +0 -1
  286. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +0 -2
  287. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +0 -121
  288. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +0 -1
  289. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +0 -20
  290. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +0 -389
  291. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +0 -1
  292. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +0 -3
  293. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +0 -206
  294. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +0 -1
  295. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +0 -12
  296. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +0 -81
  297. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +0 -1
  298. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +0 -12
  299. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +0 -318
  300. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +0 -1
  301. package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +0 -168
  302. package/node_modules/@playdrop/boxel-core/dist/src/types.js +0 -3
  303. package/node_modules/@playdrop/boxel-core/dist/src/types.js.map +0 -1
  304. package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +0 -24
  305. package/node_modules/@playdrop/boxel-core/dist/src/validation.js +0 -620
  306. package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +0 -1
  307. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +0 -11
  308. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +0 -135
  309. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +0 -1
  310. package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +0 -23
  311. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +0 -52
  312. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +0 -1
  313. package/node_modules/@playdrop/boxel-core/package.json +0 -19
  314. package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +0 -4
  315. package/node_modules/@playdrop/boxel-three/dist/src/animations.js +0 -92
  316. package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +0 -8
  317. package/node_modules/@playdrop/boxel-three/dist/src/builders.js +0 -363
  318. package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +0 -24
  319. package/node_modules/@playdrop/boxel-three/dist/src/context.js +0 -58
  320. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +0 -100
  321. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +0 -927
  322. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +0 -18
  323. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +0 -294
  324. package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +0 -17
  325. package/node_modules/@playdrop/boxel-three/dist/src/index.js +0 -64
  326. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +0 -40
  327. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +0 -96
  328. package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +0 -8
  329. package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +0 -88
  330. package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +0 -7
  331. package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +0 -123
  332. package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +0 -4
  333. package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +0 -48
  334. package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +0 -3
  335. package/node_modules/@playdrop/boxel-three/dist/src/scene.js +0 -168
  336. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +0 -29
  337. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +0 -623
  338. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +0 -13
  339. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +0 -133
  340. package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +0 -17
  341. package/node_modules/@playdrop/boxel-three/dist/src/textures.js +0 -216
  342. package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +0 -112
  343. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +0 -28
  344. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +0 -344
  345. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +0 -24
  346. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +0 -113
  347. package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.d.ts +0 -1
  348. package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +0 -137
  349. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +0 -20
  350. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +0 -85
  351. package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.d.ts +0 -1
  352. package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +0 -104
  353. package/node_modules/@playdrop/boxel-three/dist/test/index.test.d.ts +0 -1
  354. package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +0 -30
  355. package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.d.ts +0 -1
  356. package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +0 -88
  357. package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.d.ts +0 -1
  358. package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +0 -42
  359. package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.d.ts +0 -1
  360. package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +0 -73
  361. package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.d.ts +0 -1
  362. package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +0 -85
  363. package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.d.ts +0 -1
  364. package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +0 -73
  365. package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.d.ts +0 -1
  366. package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +0 -136
  367. package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.d.ts +0 -1
  368. package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +0 -42
  369. package/node_modules/@playdrop/boxel-three/package.json +0 -28
@@ -1,4 +0,0 @@
1
- export { scanHumanoidSource, type HumanoidSourceScan, type HumanoidSourceCube, type HumanoidOverlayCube, type HumanoidPartKey, type FaceUVRect as HumanoidFaceUVRect, } from "./scanner";
2
- export { buildHumanoidR6Entity, type BuildHumanoidR6Options } from "./builder";
3
- export { IDENTITY_FACE_MAP, RIGHT_ARM_FACE_MAP, LEFT_ARM_FACE_MAP, PART_FACE_TRANSFORMS, getFaceDimensions, extractSourceFacePixels, transformFacePixels, type FaceName as HumanoidFaceName, type FaceTransform, type FaceSource, } from "./textures/face-map";
4
- export { createFaceArtifacts, type CreateFaceArtifactsParams, type FaceArtifactsResult } from "./textures/artifacts";
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createFaceArtifacts = exports.transformFacePixels = exports.extractSourceFacePixels = exports.getFaceDimensions = exports.PART_FACE_TRANSFORMS = exports.LEFT_ARM_FACE_MAP = exports.RIGHT_ARM_FACE_MAP = exports.IDENTITY_FACE_MAP = exports.buildHumanoidR6Entity = exports.scanHumanoidSource = void 0;
4
- var scanner_1 = require("./scanner");
5
- Object.defineProperty(exports, "scanHumanoidSource", { enumerable: true, get: function () { return scanner_1.scanHumanoidSource; } });
6
- var builder_1 = require("./builder");
7
- Object.defineProperty(exports, "buildHumanoidR6Entity", { enumerable: true, get: function () { return builder_1.buildHumanoidR6Entity; } });
8
- var face_map_1 = require("./textures/face-map");
9
- Object.defineProperty(exports, "IDENTITY_FACE_MAP", { enumerable: true, get: function () { return face_map_1.IDENTITY_FACE_MAP; } });
10
- Object.defineProperty(exports, "RIGHT_ARM_FACE_MAP", { enumerable: true, get: function () { return face_map_1.RIGHT_ARM_FACE_MAP; } });
11
- Object.defineProperty(exports, "LEFT_ARM_FACE_MAP", { enumerable: true, get: function () { return face_map_1.LEFT_ARM_FACE_MAP; } });
12
- Object.defineProperty(exports, "PART_FACE_TRANSFORMS", { enumerable: true, get: function () { return face_map_1.PART_FACE_TRANSFORMS; } });
13
- Object.defineProperty(exports, "getFaceDimensions", { enumerable: true, get: function () { return face_map_1.getFaceDimensions; } });
14
- Object.defineProperty(exports, "extractSourceFacePixels", { enumerable: true, get: function () { return face_map_1.extractSourceFacePixels; } });
15
- Object.defineProperty(exports, "transformFacePixels", { enumerable: true, get: function () { return face_map_1.transformFacePixels; } });
16
- var artifacts_1 = require("./textures/artifacts");
17
- Object.defineProperty(exports, "createFaceArtifacts", { enumerable: true, get: function () { return artifacts_1.createFaceArtifacts; } });
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/humanoid/r6/index.ts"],"names":[],"mappings":";;;AAAA,qCAOmB;AANjB,6GAAA,kBAAkB,OAAA;AAQpB,qCAA+E;AAAtE,gHAAA,qBAAqB,OAAA;AAE9B,gDAW6B;AAV3B,6GAAA,iBAAiB,OAAA;AACjB,8GAAA,kBAAkB,OAAA;AAClB,6GAAA,iBAAiB,OAAA;AACjB,gHAAA,oBAAoB,OAAA;AACpB,6GAAA,iBAAiB,OAAA;AACjB,mHAAA,uBAAuB,OAAA;AACvB,+GAAA,mBAAmB,OAAA;AAMrB,kDAAqH;AAA5G,gHAAA,mBAAmB,OAAA"}
@@ -1,42 +0,0 @@
1
- import type { GeometryEntry, GeometryBone, GeometryCube } from "../geometry";
2
- import type { FaceName } from "./textures/face-map";
3
- export interface FaceUVRect {
4
- x: number;
5
- y: number;
6
- width: number;
7
- height: number;
8
- }
9
- export interface HumanoidSourceCube {
10
- bone: GeometryBone;
11
- cube: GeometryCube;
12
- faces: Record<FaceName, FaceUVRect>;
13
- }
14
- export type HumanoidOverlayCube = HumanoidSourceCube;
15
- export type HumanoidPartKey = "torso" | "head" | "arm_left" | "arm_right" | "leg_left" | "leg_right";
16
- export interface HumanoidSourceScan {
17
- geometryId: string;
18
- bones: GeometryBone[];
19
- parts: Map<HumanoidPartKey, {
20
- base: HumanoidSourceCube;
21
- overlay?: HumanoidOverlayCube | undefined;
22
- }>;
23
- textureWidth: number;
24
- textureHeight: number;
25
- texturePixels: Uint8Array;
26
- baseTextureWidth: number;
27
- baseTextureHeight: number;
28
- textureScaleX: number;
29
- textureScaleY: number;
30
- }
31
- export interface ScanHumanoidSourceOptions {
32
- geometryId: string;
33
- geometry: GeometryEntry;
34
- textureWidth: number;
35
- textureHeight: number;
36
- texturePixels: Uint8Array;
37
- baseTextureWidth?: number;
38
- baseTextureHeight?: number;
39
- textureScaleX?: number;
40
- textureScaleY?: number;
41
- }
42
- export declare function scanHumanoidSource(options: ScanHumanoidSourceOptions): HumanoidSourceScan;
@@ -1,145 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scanHumanoidSource = scanHumanoidSource;
4
- const PART_BONE_CANDIDATES = {
5
- torso: ["body", "torso", "chest"],
6
- head: ["head"],
7
- arm_left: ["leftarm", "arm_left", "left_arm"],
8
- arm_right: ["rightarm", "arm_right", "right_arm"],
9
- leg_left: ["leftleg", "leg_left", "left_leg"],
10
- leg_right: ["rightleg", "leg_right", "right_leg"],
11
- };
12
- const PART_OVERLAY_CANDIDATES = {
13
- head: ["hat", "headouter", "head_outer"],
14
- torso: ["jacket", "body_outer", "torso_outer"],
15
- arm_left: ["leftsleeve", "arm_left_outer", "left_arm_overlay"],
16
- arm_right: ["rightsleeve", "arm_right_outer", "right_arm_overlay"],
17
- leg_left: ["leftpants", "leg_left_outer", "left_leg_overlay"],
18
- leg_right: ["rightpants", "leg_right_outer", "right_leg_overlay"],
19
- };
20
- const normalizeName = (value) => value
21
- .trim()
22
- .toLowerCase()
23
- .replace(/[^a-z0-9]+/g, "");
24
- const findBoneByCandidates = (bones, candidates) => {
25
- const indexed = new Map();
26
- bones.forEach((bone) => indexed.set(normalizeName(bone.name), bone));
27
- for (const candidate of candidates) {
28
- const bone = indexed.get(normalizeName(candidate));
29
- if (bone) {
30
- return bone;
31
- }
32
- }
33
- return undefined;
34
- };
35
- const resolveUVRectFromObject = (faceValue, defaultWidth, defaultHeight) => {
36
- if (!faceValue || typeof faceValue !== "object") {
37
- return { x: 0, y: 0, width: defaultWidth, height: defaultHeight };
38
- }
39
- const record = faceValue;
40
- const [u, v] = (record.uv ?? [0, 0]).map((value) => Number(value));
41
- const [width, height] = (record.uv_size ?? [defaultWidth, defaultHeight]).map((value) => Number(value));
42
- return { x: u, y: v, width, height };
43
- };
44
- const scaleValue = (value, scale) => (Number.isFinite(value) ? value * scale : value);
45
- const scaleRect = (rect, scaleX, scaleY) => ({
46
- x: scaleValue(rect.x, scaleX),
47
- y: scaleValue(rect.y, scaleY),
48
- width: scaleValue(rect.width, scaleX),
49
- height: scaleValue(rect.height, scaleY),
50
- });
51
- const computeFaceRects = (cube, scaleX, scaleY) => {
52
- const sizeX = Number(cube.size?.[0] ?? 0);
53
- const sizeY = Number(cube.size?.[1] ?? 0);
54
- const sizeZ = Number(cube.size?.[2] ?? 0);
55
- if (Array.isArray(cube.uv)) {
56
- const [u, v] = cube.uv.map((value) => Number(value));
57
- const rects = {
58
- up: { x: u + sizeZ, y: v, width: sizeX, height: sizeZ },
59
- down: { x: u + sizeZ + sizeX, y: v, width: sizeX, height: sizeZ },
60
- north: { x: u + sizeZ, y: v + sizeZ, width: sizeX, height: sizeY },
61
- east: { x: u + sizeZ + sizeX, y: v + sizeZ, width: sizeZ, height: sizeY },
62
- south: { x: u + sizeZ + sizeX + sizeZ, y: v + sizeZ, width: sizeX, height: sizeY },
63
- west: { x: u, y: v + sizeZ, width: sizeZ, height: sizeY },
64
- };
65
- return {
66
- up: scaleRect(rects.up, scaleX, scaleY),
67
- down: scaleRect(rects.down, scaleX, scaleY),
68
- north: scaleRect(rects.north, scaleX, scaleY),
69
- east: scaleRect(rects.east, scaleX, scaleY),
70
- south: scaleRect(rects.south, scaleX, scaleY),
71
- west: scaleRect(rects.west, scaleX, scaleY),
72
- };
73
- }
74
- const uvObject = cube.uv;
75
- const rects = {
76
- north: resolveUVRectFromObject(uvObject?.north, sizeX, sizeY),
77
- south: resolveUVRectFromObject(uvObject?.south, sizeX, sizeY),
78
- east: resolveUVRectFromObject(uvObject?.east, sizeZ, sizeY),
79
- west: resolveUVRectFromObject(uvObject?.west, sizeZ, sizeY),
80
- up: resolveUVRectFromObject(uvObject?.up, sizeX, sizeZ),
81
- down: resolveUVRectFromObject(uvObject?.down, sizeX, sizeZ),
82
- };
83
- return {
84
- north: scaleRect(rects.north, scaleX, scaleY),
85
- south: scaleRect(rects.south, scaleX, scaleY),
86
- east: scaleRect(rects.east, scaleX, scaleY),
87
- west: scaleRect(rects.west, scaleX, scaleY),
88
- up: scaleRect(rects.up, scaleX, scaleY),
89
- down: scaleRect(rects.down, scaleX, scaleY),
90
- };
91
- };
92
- function scanHumanoidSource(options) {
93
- const { geometryId, geometry, textureWidth, textureHeight, texturePixels } = options;
94
- const bones = geometry.bones ?? [];
95
- if (bones.length === 0) {
96
- throw new Error(`Geometry "${geometryId}" does not contain bones`);
97
- }
98
- const baseTextureWidth = options.baseTextureWidth ?? geometry.texturewidth ?? 64;
99
- const baseTextureHeight = options.baseTextureHeight ?? geometry.textureheight ?? 64;
100
- const textureScaleX = options.textureScaleX ?? (baseTextureWidth > 0 ? textureWidth / baseTextureWidth : 1);
101
- const textureScaleY = options.textureScaleY ?? (baseTextureHeight > 0 ? textureHeight / baseTextureHeight : 1);
102
- const parts = new Map();
103
- Object.keys(PART_BONE_CANDIDATES).forEach((partKey) => {
104
- const bone = findBoneByCandidates(bones, PART_BONE_CANDIDATES[partKey]);
105
- if (!bone) {
106
- throw new Error(`Geometry "${geometryId}" is missing bone for part "${partKey}"`);
107
- }
108
- if (!bone.cubes || bone.cubes.length === 0) {
109
- throw new Error(`Bone "${bone.name}" for part "${partKey}" has no cubes`);
110
- }
111
- const cube = bone.cubes[0];
112
- const base = {
113
- bone,
114
- cube,
115
- faces: computeFaceRects(cube, textureScaleX, textureScaleY),
116
- };
117
- let overlay;
118
- const overlayCandidates = PART_OVERLAY_CANDIDATES[partKey];
119
- if (overlayCandidates && overlayCandidates.length > 0) {
120
- const overlayBone = findBoneByCandidates(bones, overlayCandidates);
121
- if (overlayBone && overlayBone.cubes && overlayBone.cubes.length > 0) {
122
- const overlayCube = overlayBone.cubes[0];
123
- overlay = {
124
- bone: overlayBone,
125
- cube: overlayCube,
126
- faces: computeFaceRects(overlayCube, textureScaleX, textureScaleY),
127
- };
128
- }
129
- }
130
- parts.set(partKey, { base, overlay });
131
- });
132
- return {
133
- geometryId,
134
- bones,
135
- parts,
136
- textureWidth,
137
- textureHeight,
138
- texturePixels,
139
- baseTextureWidth,
140
- baseTextureHeight,
141
- textureScaleX,
142
- textureScaleY,
143
- };
144
- }
145
- //# sourceMappingURL=scanner.js.map
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,IAAI,eAAe,OAAO,gBAAgB,CAAC,CAAC;QAC5E,CAAC;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC;QAC5B,MAAM,IAAI,GAAuB;YAC/B,IAAI;YACJ,IAAI;YACJ,KAAK,EAAE,gBAAgB,CAAC,IAAI,EAAE,aAAa,EAAE,aAAa,CAAC;SAC5D,CAAC;QAEF,IAAI,OAAwC,CAAC;QAC7C,MAAM,iBAAiB,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC3D,IAAI,iBAAiB,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtD,MAAM,WAAW,GAAG,oBAAoB,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;YACnE,IAAI,WAAW,IAAI,WAAW,CAAC,KAAK,IAAI,WAAW,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACrE,MAAM,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC;gBAC1C,OAAO,GAAG;oBACR,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,WAAW;oBACjB,KAAK,EAAE,gBAAgB,CAAC,WAAW,EAAE,aAAa,EAAE,aAAa,CAAC;iBACnE,CAAC;YACJ,CAAC;QACH,CAAC;QAED,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,UAAU;QACV,KAAK;QACL,KAAK;QACL,YAAY;QACZ,aAAa;QACb,aAAa;QACb,gBAAgB;QAChB,iBAAiB;QACjB,aAAa;QACb,aAAa;KACd,CAAC;AACJ,CAAC"}
@@ -1,26 +0,0 @@
1
- import type { Pattern, Texture } from "../../../types";
2
- import type { FaceSource, FaceTransform, FaceName } from "./face-map";
3
- export interface CreateFaceArtifactsParams {
4
- baseId: string;
5
- face: FaceName;
6
- source: FaceSource;
7
- transform: FaceTransform;
8
- expectedSize: [number, number];
9
- textureWidth: number;
10
- textureHeight: number;
11
- texturePixels: Uint8Array;
12
- ensureMaterial: (color: {
13
- r: number;
14
- g: number;
15
- b: number;
16
- a: number;
17
- }) => string;
18
- variant?: "base" | "overlay";
19
- }
20
- export interface FaceArtifactsResult {
21
- pattern: Pattern | null;
22
- texture: Texture | null;
23
- hasTransparency: boolean;
24
- hasVisiblePixels: boolean;
25
- }
26
- export declare function createFaceArtifacts(params: CreateFaceArtifactsParams): FaceArtifactsResult;
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createFaceArtifacts = createFaceArtifacts;
4
- const face_map_1 = require("./face-map");
5
- function createFaceArtifacts(params) {
6
- const { baseId, face, source, transform, expectedSize, textureWidth, textureHeight, texturePixels, ensureMaterial, variant = "base", } = params;
7
- const transformed = (0, face_map_1.transformFacePixels)(source, transform, textureWidth, textureHeight, texturePixels);
8
- const width = transformed.width;
9
- const height = transformed.height;
10
- if (width !== expectedSize[0] || height !== expectedSize[1]) {
11
- throw new Error(`Transformed face for "${baseId}" (${face}) has size ${width}x${height} but expected ${expectedSize[0]}x${expectedSize[1]}`);
12
- }
13
- const textureMaterials = [];
14
- const localMaterialIndex = new Map();
15
- const patternData = [];
16
- let hasTransparency = false;
17
- let hasVisiblePixels = false;
18
- for (let row = 0; row < height; row += 1) {
19
- for (let col = 0; col < width; col += 1) {
20
- const idx = (row * width + col) * 4;
21
- const color = {
22
- r: transformed.data[idx],
23
- g: transformed.data[idx + 1],
24
- b: transformed.data[idx + 2],
25
- a: transformed.data[idx + 3],
26
- };
27
- if (color.a < 255) {
28
- hasTransparency = true;
29
- }
30
- if (color.a > 0) {
31
- hasVisiblePixels = true;
32
- }
33
- const materialId = ensureMaterial(color);
34
- let localIndex = localMaterialIndex.get(materialId);
35
- if (localIndex === undefined) {
36
- localIndex = textureMaterials.length;
37
- textureMaterials.push(materialId);
38
- localMaterialIndex.set(materialId, localIndex);
39
- }
40
- patternData.push(localIndex);
41
- }
42
- }
43
- if (variant === "overlay" && !hasVisiblePixels) {
44
- return { pattern: null, texture: null, hasTransparency, hasVisiblePixels: false };
45
- }
46
- const suffix = variant === "overlay" ? "_overlay" : "";
47
- const patternId = `${baseId}${suffix}`;
48
- const pattern = {
49
- id: patternId,
50
- size: [width, height],
51
- data: patternData,
52
- };
53
- const texture = {
54
- id: patternId,
55
- pattern: patternId,
56
- materials: textureMaterials,
57
- };
58
- return {
59
- pattern,
60
- texture,
61
- hasTransparency,
62
- hasVisiblePixels: true,
63
- };
64
- }
65
- //# sourceMappingURL=artifacts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../../src/humanoid/r6/textures/artifacts.ts"],"names":[],"mappings":";;AAwBA,kDA+EC;AArGD,yCAAiD;AAsBjD,SAAgB,mBAAmB,CAAC,MAAiC;IACnE,MAAM,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,EACN,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,OAAO,GAAG,MAAM,GACjB,GAAG,MAAM,CAAC;IAEX,MAAM,WAAW,GAAG,IAAA,8BAAmB,EAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC;IACvG,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;IAChC,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IAElC,IAAI,KAAK,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,MAAM,IAAI,KAAK,CACb,yBAAyB,MAAM,MAAM,IAAI,cAAc,KAAK,IAAI,MAAM,iBAAiB,YAAY,CAAC,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,EAAE,CAC5H,CAAC;IACJ,CAAC;IAED,M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ClC,kBAAkB,CAAC,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;YACjD,CAAC;YACD,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,IAAI,OAAO,KAAK,SAAS,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC/C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC;IACpF,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IACvD,MAAM,SAAS,GAAG,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;IACvC,MAAM,OAAO,GAAY;QACvB,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;QACrB,IAAI,EAAE,WAAW;KAClB,CAAC;IACF,MAAM,OAAO,GAAY;QACvB,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,SAAS;QAClB,SAAS,EAAE,gBAAgB;KAC5B,CAAC;IAEF,OAAO;QACL,OAAO;QACP,OAAO;QACP,eAAe;QACf,gBAAgB,EAAE,IAAI;KACvB,CAAC;AACJ,CAAC"}
@@ -1,33 +0,0 @@
1
- export type FaceName = "north" | "south" | "east" | "west" | "up" | "down";
2
- export type Rotation = 0 | 90 | 180 | 270;
3
- export interface FaceTransform {
4
- source: FaceName;
5
- rotate?: Rotation;
6
- flipHorizontal?: boolean;
7
- flipVertical?: boolean;
8
- }
9
- export interface FaceUVRect {
10
- x: number;
11
- y: number;
12
- width: number;
13
- height: number;
14
- }
15
- export interface FaceSource {
16
- faces: Record<FaceName, FaceUVRect>;
17
- }
18
- export declare const IDENTITY_FACE_MAP: Record<FaceName, FaceTransform>;
19
- export declare const RIGHT_ARM_FACE_MAP: Record<FaceName, FaceTransform>;
20
- export declare function mirrorArmFaceTransform(transform: FaceTransform): FaceTransform;
21
- export declare const LEFT_ARM_FACE_MAP: Record<FaceName, FaceTransform>;
22
- export declare const PART_FACE_TRANSFORMS: Record<string, Record<FaceName, FaceTransform>>;
23
- export declare function getFaceDimensions(size: [number, number, number], face: FaceName): [number, number];
24
- export declare function extractSourceFacePixels(cubeInfo: FaceSource, face: FaceName, textureWidth: number, textureHeight: number, texturePixels: Uint8Array): {
25
- width: number;
26
- height: number;
27
- data: Uint8Array;
28
- };
29
- export declare function transformFacePixels(source: FaceSource, transform: FaceTransform, textureWidth: number, textureHeight: number, texturePixels: Uint8Array): {
30
- width: number;
31
- height: number;
32
- data: Uint8Array;
33
- };
@@ -1,175 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PART_FACE_TRANSFORMS = exports.LEFT_ARM_FACE_MAP = exports.RIGHT_ARM_FACE_MAP = exports.IDENTITY_FACE_MAP = void 0;
4
- exports.mirrorArmFaceTransform = mirrorArmFaceTransform;
5
- exports.getFaceDimensions = getFaceDimensions;
6
- exports.extractSourceFacePixels = extractSourceFacePixels;
7
- exports.transformFacePixels = transformFacePixels;
8
- exports.IDENTITY_FACE_MAP = {
9
- up: { source: "up", rotate: 0 },
10
- down: { source: "down", rotate: 0 },
11
- north: { source: "north", rotate: 0 },
12
- south: { source: "south", rotate: 0 },
13
- east: { source: "east", rotate: 0 },
14
- west: { source: "west", rotate: 0 },
15
- };
16
- exports.RIGHT_ARM_FACE_MAP = {
17
- up: { source: "east", rotate: 90 },
18
- down: { source: "west", rotate: 90 },
19
- north: { source: "north", rotate: 90 },
20
- south: { source: "south", rotate: 270 },
21
- east: { source: "up", rotate: 90 },
22
- west: { source: "down", rotate: 90 },
23
- };
24
- function mirrorArmFaceTransform(transform) {
25
- const rotate = ((360 - (transform.rotate ?? 0)) % 360);
26
- return {
27
- source: transform.source,
28
- rotate,
29
- flipHorizontal: transform.flipHorizontal ?? false,
30
- flipVertical: transform.flipVertical ?? false,
31
- };
32
- }
33
- exports.LEFT_ARM_FACE_MAP = {
34
- up: mirrorArmFaceTransform(exports.RIGHT_ARM_FACE_MAP.up),
35
- down: mirrorArmFaceTransform(exports.RIGHT_ARM_FACE_MAP.down),
36
- north: mirrorArmFaceTransform(exports.RIGHT_ARM_FACE_MAP.north),
37
- south: mirrorArmFaceTransform(exports.RIGHT_ARM_FACE_MAP.south),
38
- east: { ...mirrorArmFaceTransform(exports.RIGHT_ARM_FACE_MAP.west), flipHorizontal: true },
39
- west: { ...mirrorArmFaceTransform(exports.RIGHT_ARM_FACE_MAP.east), flipHorizontal: true },
40
- };
41
- exports.PART_FACE_TRANSFORMS = {
42
- torso: exports.IDENTITY_FACE_MAP,
43
- head: exports.IDENTITY_FACE_MAP,
44
- leg_left: exports.IDENTITY_FACE_MAP,
45
- leg_right: exports.IDENTITY_FACE_MAP,
46
- arm_right: exports.RIGHT_ARM_FACE_MAP,
47
- arm_left: exports.LEFT_ARM_FACE_MAP,
48
- };
49
- function getFaceDimensions(size, face) {
50
- const [sxRaw, syRaw, szRaw] = size;
51
- const sx = Math.max(1, Math.round(Math.abs(sxRaw)));
52
- const sy = Math.max(1, Math.round(Math.abs(syRaw)));
53
- const sz = Math.max(1, Math.round(Math.abs(szRaw)));
54
- switch (face) {
55
- case "up":
56
- case "down":
57
- return [sx, sz];
58
- case "north":
59
- case "south":
60
- return [sx, sy];
61
- case "east":
62
- case "west":
63
- return [sz, sy];
64
- default:
65
- return [sx, sy];
66
- }
67
- }
68
- const clamp = (value, min, max) => {
69
- if (!Number.isFinite(value)) {
70
- return min;
71
- }
72
- if (value < min) {
73
- return min;
74
- }
75
- if (value > max) {
76
- return max;
77
- }
78
- return value;
79
- };
80
- const rotatePixels = (data, width, height, rotation) => {
81
- if (rotation === 0) {
82
- return { data, width, height };
83
- }
84
- const rotate = (((rotation % 360) + 360) % 360);
85
- const newWidth = rotate === 90 || rotate === 270 ? height : width;
86
- const newHeight = rotate === 90 || rotate === 270 ? width : height;
87
- const result = new Uint8Array(data.length);
88
- for (let y = 0; y < height; y += 1) {
89
- for (let x = 0; x < width; x += 1) {
90
- const srcIndex = (y * width + x) * 4;
91
- let destX = 0;
92
- let destY = 0;
93
- switch (rotate) {
94
- case 0:
95
- destX = x;
96
- destY = y;
97
- break;
98
- case 90:
99
- destX = height - 1 - y;
100
- destY = x;
101
- break;
102
- case 180:
103
- destX = width - 1 - x;
104
- destY = height - 1 - y;
105
- break;
106
- case 270:
107
- destX = y;
108
- destY = width - 1 - x;
109
- break;
110
- }
111
- const destIndex = (destY * newWidth + destX) * 4;
112
- result[destIndex] = data[srcIndex];
113
- result[destIndex + 1] = data[srcIndex + 1];
114
- result[destIndex + 2] = data[srcIndex + 2];
115
- result[destIndex + 3] = data[srcIndex + 3];
116
- }
117
- }
118
- return { data: result, width: newWidth, height: newHeight };
119
- };
120
- const flipPixels = (data, width, height, flipHorizontal, flipVertical) => {
121
- if (!flipHorizontal && !flipVertical) {
122
- return data;
123
- }
124
- const result = new Uint8Array(data.length);
125
- for (let y = 0; y < height; y += 1) {
126
- for (let x = 0; x < width; x += 1) {
127
- const srcIndex = (y * width + x) * 4;
128
- const targetX = flipHorizontal ? width - 1 - x : x;
129
- const targetY = flipVertical ? height - 1 - y : y;
130
- const destIndex = (targetY * width + targetX) * 4;
131
- result[destIndex] = data[srcIndex];
132
- result[destIndex + 1] = data[srcIndex + 1];
133
- result[destIndex + 2] = data[srcIndex + 2];
134
- result[destIndex + 3] = data[srcIndex + 3];
135
- }
136
- }
137
- return result;
138
- };
139
- function extractSourceFacePixels(cubeInfo, face, textureWidth, textureHeight, texturePixels) {
140
- const rect = cubeInfo.faces[face];
141
- const width = Math.max(1, Math.floor(rect.width));
142
- const height = Math.max(1, Math.floor(rect.height));
143
- const data = new Uint8Array(width * height * 4);
144
- for (let row = 0; row < height; row += 1) {
145
- for (let col = 0; col < width; col += 1) {
146
- const srcX = clamp(Math.floor(rect.x + col), 0, textureWidth - 1);
147
- const srcY = clamp(Math.floor(rect.y + row), 0, textureHeight - 1);
148
- const srcIndex = (srcY * textureWidth + srcX) * 4;
149
- const dstIndex = (row * width + col) * 4;
150
- data[dstIndex] = texturePixels[srcIndex];
151
- data[dstIndex + 1] = texturePixels[srcIndex + 1];
152
- data[dstIndex + 2] = texturePixels[srcIndex + 2];
153
- data[dstIndex + 3] = texturePixels[srcIndex + 3];
154
- }
155
- }
156
- if (face === "down") {
157
- return rotatePixels(data, width, height, 180);
158
- }
159
- if (face === "up") {
160
- const flipped = flipPixels(data, width, height, true, false);
161
- return { data: flipped, width, height };
162
- }
163
- return { data, width, height };
164
- }
165
- function transformFacePixels(source, transform, textureWidth, textureHeight, texturePixels) {
166
- const { source: face, rotate = 0, flipHorizontal = false, flipVertical = false } = transform;
167
- const extracted = extractSourceFacePixels(source, face, textureWidth, textureHeight, texturePixels);
168
- let data = extracted.data;
169
- if (flipHorizontal || flipVertical) {
170
- data = flipPixels(data, extracted.width, extracted.height, flipHorizontal, flipVertical);
171
- }
172
- const rotated = rotatePixels(data, extracted.width, extracted.height, rotate);
173
- return { data: rotated.data, width: rotated.width, height: rotated.height };
174
- }
175
- //# sourceMappingURL=face-map.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"face-map.js","sourceRoot":"","sources":["../../../../../src/humanoid/r6/textures/face-map.ts"],"names":[],"mappings":";;;AAuCA,wDAQC;AAoBD,8CAkBC;AAyFD,0DAkCC;AAED,kDAeC;AA5MY,QAAA,iBAAiB,GAAoC;IAChE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE;IAC/B,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE;IACnC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE;IACrC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE;IACrC,IAAI,EAAE,EAAE,M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