webtalekit-alpha 0.2.13 → 0.2.14

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 (398) hide show
  1. package/README.md +145 -70
  2. package/package.json +10 -2
  3. package/parser/checker.js +184 -0
  4. package/parser/checker.test.ts +491 -0
  5. package/parser/cli.js +34 -2
  6. package/parser/parser.js +25 -18
  7. package/src/core/defaultUIHandler.js +309 -0
  8. package/src/core/defaultUIHandler.js.map +1 -0
  9. package/{dist/src → src}/core/drawer.js +65 -40
  10. package/src/core/drawer.js.map +1 -0
  11. package/{dist/src → src}/core/index.js +188 -257
  12. package/{dist/src → src}/core/scenarioManager.js +29 -7
  13. package/src/core/scenarioManager.js.map +1 -0
  14. package/src/utils/eventBus.js +88 -0
  15. package/src/utils/eventBus.js.map +1 -0
  16. package/{dist/src → src}/utils/logger.js +45 -1
  17. package/src/utils/logger.js.map +1 -0
  18. package/{dist/src → src}/utils/store.js +5 -0
  19. package/src/utils/store.js.map +1 -0
  20. package/.claude/settings.local.json +0 -12
  21. package/.clinerules +0 -65
  22. package/.history/README_20240812174230.md +0 -193
  23. package/.history/README_20240812175424.md +0 -185
  24. package/.history/README_20240812191012.md +0 -185
  25. package/.history/README_20240812191155.md +0 -185
  26. package/.history/README_20240812191211.md +0 -185
  27. package/.history/README_20240812192035.md +0 -185
  28. package/.history/dist/src/core/index_20240815021552.js +0 -474
  29. package/.history/dist/src/core/index_20240815022042.js +0 -476
  30. package/.history/dist/src/core/index_20240815022206.js +0 -476
  31. package/.history/dist/src/core/index_20240815023104.js +0 -478
  32. package/.history/dist/src/core/index_20240817022019.js +0 -494
  33. package/.history/dist/src/core/index_20240818013827.js +0 -493
  34. package/.history/dist/src/core/index_20240820001418.js +0 -502
  35. package/.history/package_20240812174230.json +0 -45
  36. package/.history/package_20240825011731.json +0 -45
  37. package/.history/package_20240825011739.json +0 -44
  38. package/.history/parser/parser_20240812174230.js +0 -50
  39. package/.history/parser/parser_20240825012739.js +0 -47
  40. package/.history/parser/parser_20240825012835.js +0 -52
  41. package/.history/src/core/drawer_20240813091343.ts +0 -262
  42. package/.history/src/core/drawer_20240815232345.ts +0 -262
  43. package/.history/src/core/drawer_20240815232350.ts +0 -262
  44. package/.history/src/core/drawer_20240816025257.ts +0 -357
  45. package/.history/src/core/drawer_20240816025358.ts +0 -357
  46. package/.history/src/core/drawer_20240816030148.ts +0 -365
  47. package/.history/src/core/drawer_20240816231033.ts +0 -294
  48. package/.history/src/core/drawer_20240816231107.ts +0 -262
  49. package/.history/src/core/drawer_20240816231234.ts +0 -268
  50. package/.history/src/core/drawer_20240817013836.ts +0 -290
  51. package/.history/src/core/drawer_20240817015150.ts +0 -289
  52. package/.history/src/core/drawer_20240817015353.ts +0 -290
  53. package/.history/src/core/drawer_20240817021254.ts +0 -291
  54. package/.history/src/core/drawer_20240817023440.ts +0 -295
  55. package/.history/src/core/drawer_20240817023445.ts +0 -295
  56. package/.history/src/core/drawer_20240818015327.ts +0 -295
  57. package/.history/src/core/drawer_20240819231006.ts +0 -318
  58. package/.history/src/core/drawer_20240820002829.ts +0 -317
  59. package/.history/src/core/drawer_20240820003141.ts +0 -295
  60. package/.history/src/core/drawer_20240824010043.ts +0 -295
  61. package/.history/src/core/drawer_20240825013311.ts +0 -293
  62. package/.history/src/core/drawer_20240902235257.ts +0 -295
  63. package/.history/src/core/drawer_20240904002038.ts +0 -262
  64. package/.history/src/core/drawer_20240904004020.ts +0 -262
  65. package/.history/src/core/drawer_20240904004238.ts +0 -262
  66. package/.history/src/core/drawer_20240904005648.ts +0 -262
  67. package/.history/src/core/drawer_20240904005808.ts +0 -262
  68. package/.history/src/core/drawer_20240904010523.ts +0 -262
  69. package/.history/src/core/drawer_20240904011611.ts +0 -262
  70. package/.history/src/core/drawer_20240904011740.ts +0 -262
  71. package/.history/src/core/index_20240812190102.js +0 -443
  72. package/.history/src/core/index_20240812190105.js +0 -443
  73. package/.history/src/core/index_20240812205421.js +0 -452
  74. package/.history/src/core/index_20240812213441.js +0 -452
  75. package/.history/src/core/index_20240812214203.js +0 -453
  76. package/.history/src/core/index_20240813090823.js +0 -453
  77. package/.history/src/core/index_20240813230449.js +0 -452
  78. package/.history/src/core/index_20240813230539.js +0 -452
  79. package/.history/src/core/index_20240813231447.js +0 -453
  80. package/.history/src/core/index_20240813231449.js +0 -453
  81. package/.history/src/core/index_20240813231511.js +0 -453
  82. package/.history/src/core/index_20240813231531.js +0 -453
  83. package/.history/src/core/index_20240813231913.js +0 -453
  84. package/.history/src/core/index_20240813232356.js +0 -453
  85. package/.history/src/core/index_20240813232640.js +0 -453
  86. package/.history/src/core/index_20240813232900.js +0 -453
  87. package/.history/src/core/index_20240814221127.js +0 -454
  88. package/.history/src/core/index_20240814221322.js +0 -454
  89. package/.history/src/core/index_20240814221526.js +0 -454
  90. package/.history/src/core/index_20240814222048.js +0 -454
  91. package/.history/src/core/index_20240814222918.js +0 -459
  92. package/.history/src/core/index_20240814223136.js +0 -459
  93. package/.history/src/core/index_20240814223501.js +0 -464
  94. package/.history/src/core/index_20240814224347.js +0 -468
  95. package/.history/src/core/index_20240815013712.js +0 -474
  96. package/.history/src/core/index_20240815021534.js +0 -474
  97. package/.history/src/core/index_20240815023143.js +0 -477
  98. package/.history/src/core/index_20240815023207.js +0 -479
  99. package/.history/src/core/index_20240815023344.js +0 -481
  100. package/.history/src/core/index_20240815035600.js +0 -479
  101. package/.history/src/core/index_20240815041549.js +0 -480
  102. package/.history/src/core/index_20240815185515.js +0 -481
  103. package/.history/src/core/index_20240815192158.js +0 -481
  104. package/.history/src/core/index_20240815222912.js +0 -482
  105. package/.history/src/core/index_20240815224052.js +0 -483
  106. package/.history/src/core/index_20240815224843.js +0 -484
  107. package/.history/src/core/index_20240815224850.js +0 -483
  108. package/.history/src/core/index_20240815231706.js +0 -479
  109. package/.history/src/core/index_20240816025748.js +0 -483
  110. package/.history/src/core/index_20240816030102.js +0 -484
  111. package/.history/src/core/index_20240817013329.js +0 -485
  112. package/.history/src/core/index_20240817013526.js +0 -485
  113. package/.history/src/core/index_20240817013819.js +0 -488
  114. package/.history/src/core/index_20240817013829.js +0 -488
  115. package/.history/src/core/index_20240817014921.js +0 -494
  116. package/.history/src/core/index_20240817022057.js +0 -494
  117. package/.history/src/core/index_20240817023316.js +0 -493
  118. package/.history/src/core/index_20240818005637.js +0 -493
  119. package/.history/src/core/index_20240818005721.js +0 -493
  120. package/.history/src/core/index_20240818011804.js +0 -493
  121. package/.history/src/core/index_20240818013835.js +0 -493
  122. package/.history/src/core/index_20240818014310.js +0 -493
  123. package/.history/src/core/index_20240818014323.js +0 -493
  124. package/.history/src/core/index_20240818014333.js +0 -493
  125. package/.history/src/core/index_20240818020725.js +0 -496
  126. package/.history/src/core/index_20240819195504.js +0 -497
  127. package/.history/src/core/index_20240819202012.js +0 -495
  128. package/.history/src/core/index_20240819231228.js +0 -501
  129. package/.history/src/core/index_20240819232555.js +0 -502
  130. package/.history/src/core/index_20240819233404.js +0 -502
  131. package/.history/src/core/index_20240820003114.js +0 -495
  132. package/.history/src/core/index_20240820003120.js +0 -495
  133. package/.history/src/core/index_20240820003331.js +0 -495
  134. package/.history/src/core/index_20240820004126.js +0 -498
  135. package/.history/src/core/index_20240820004357.js +0 -497
  136. package/.history/src/core/index_20240820005103.js +0 -498
  137. package/.history/src/core/index_20240820005110.js +0 -499
  138. package/.history/src/core/index_20240820005206.js +0 -497
  139. package/.history/src/core/index_20240820005352.js +0 -497
  140. package/.history/src/core/index_20240823224904.ts +0 -505
  141. package/.history/src/core/index_20240823224905.js +0 -505
  142. package/.history/src/core/index_20240823231631.ts +0 -530
  143. package/.history/src/core/index_20240823231735.ts +0 -530
  144. package/.history/src/core/index_20240823232123.ts +0 -539
  145. package/.history/src/core/index_20240823232329.ts +0 -539
  146. package/.history/src/core/index_20240823233058.ts +0 -539
  147. package/.history/src/core/index_20240823234946.ts +0 -539
  148. package/.history/src/core/index_20240824005956.ts +0 -534
  149. package/.history/src/core/index_20240824010113.ts +0 -534
  150. package/.history/src/core/index_20240824010124.ts +0 -534
  151. package/.history/src/core/index_20240824010212.ts +0 -534
  152. package/.history/src/core/index_20240824010218.ts +0 -534
  153. package/.history/src/core/index_20240824010407.ts +0 -534
  154. package/.history/src/core/index_20240824010611.ts +0 -534
  155. package/.history/src/core/index_20240824010623.ts +0 -534
  156. package/.history/src/core/index_20240824010652.ts +0 -534
  157. package/.history/src/core/index_20240824011007.ts +0 -534
  158. package/.history/src/core/index_20240824210450.ts +0 -534
  159. package/.history/src/core/index_20240824210703.ts +0 -534
  160. package/.history/src/core/index_20240824210708.ts +0 -534
  161. package/.history/src/core/index_20240824211001.ts +0 -537
  162. package/.history/src/core/index_20240824211258.ts +0 -537
  163. package/.history/src/core/index_20240824211654.ts +0 -537
  164. package/.history/src/core/index_20240824211723.ts +0 -537
  165. package/.history/src/core/index_20240824211808.ts +0 -538
  166. package/.history/src/core/index_20240824214041.js +0 -538
  167. package/.history/src/core/index_20240824215312.ts +0 -538
  168. package/.history/src/core/index_20240824215341.ts +0 -538
  169. package/.history/src/core/index_20240824220703.ts +0 -538
  170. package/.history/src/core/index_20240824220709.ts +0 -538
  171. package/.history/src/core/index_20240825012244.ts +0 -536
  172. package/.history/src/core/index_20240825012435.ts +0 -539
  173. package/.history/src/core/index_20240825012440.ts +0 -539
  174. package/.history/src/core/index_20240826005054.ts +0 -539
  175. package/.history/src/core/index_20240826005321.ts +0 -540
  176. package/.history/src/core/index_20240826005410.ts +0 -539
  177. package/.history/src/core/index_20240826005418.ts +0 -539
  178. package/.history/src/core/index_20240830231825.ts +0 -539
  179. package/.history/src/core/index_20240831022416.ts +0 -539
  180. package/.history/src/core/index_20240901222314.js +0 -459
  181. package/.history/src/core/index_20240901222951.js +0 -459
  182. package/.history/src/core/index_20240901223824.js +0 -471
  183. package/.history/src/core/index_20240901223833.js +0 -468
  184. package/.history/src/core/index_20240902223954.js +0 -447
  185. package/.history/src/core/index_20240902224000.js +0 -446
  186. package/.history/src/core/index_20240902230345.js +0 -448
  187. package/.history/src/core/index_20240902231130.js +0 -449
  188. package/.history/src/core/index_20240902231559.js +0 -449
  189. package/.history/src/core/index_20240902232135.js +0 -449
  190. package/.history/src/core/index_20240902232809.js +0 -452
  191. package/.history/src/core/index_20240902232815.js +0 -452
  192. package/.history/src/core/index_20240903000104.js +0 -467
  193. package/.history/src/core/index_20240904001731.js +0 -444
  194. package/.history/src/core/index_20240904002038.ts +0 -539
  195. package/.history/src/core/index_20240904011848.js +0 -444
  196. package/.history/src/core/index_20240904012138.js +0 -444
  197. package/.history/src/core/index_20240904012743.js +0 -444
  198. package/.history/src/core/index_20240904013051.js +0 -444
  199. package/.history/src/core/resourceManager_20240403231531.ts +0 -16
  200. package/.history/src/core/resourceManager_20240823232627.ts +0 -17
  201. package/.history/src/core/resourceManager_20240824214014.js +0 -16
  202. package/.history/src/core/resourceManager_20240824214620.js +0 -17
  203. package/.history/src/core/scenarioManager_20240812203410.ts +0 -86
  204. package/.history/src/core/scenarioManager_20240812203839.ts +0 -94
  205. package/.history/src/core/scenarioManager_20240812213437.ts +0 -85
  206. package/.history/src/core/scenarioManager_20240813225852.ts +0 -85
  207. package/.history/src/core/scenarioManager_20240823235010.ts +0 -85
  208. package/.history/src/core/scenarioManager_20240904002038.ts +0 -94
  209. package/.history/src/core/scenarioManager_20240904012411.ts +0 -94
  210. package/.history/src/core/scenarioManager_20240904012519.ts +0 -94
  211. package/.history/src/index_20240403231531.js +0 -6
  212. package/.history/src/index_20240429233436.js +0 -8
  213. package/.history/src/index_20240429233926.js +0 -8
  214. package/.history/src/index_20240429234401.js +0 -7
  215. package/.history/src/index_20240429234404.js +0 -6
  216. package/.history/src/resource/soundObject_20240419004314.ts +0 -71
  217. package/.history/src/resource/soundObject_20240815034420.ts +0 -66
  218. package/.history/src/resource/soundObject_20240815034836.ts +0 -79
  219. package/.history/src/resource/soundObject_20240815034919.ts +0 -87
  220. package/.history/src/resource/soundObject_20240815040724.ts +0 -81
  221. package/.history/src/resource/soundObject_20240815041022.ts +0 -87
  222. package/.history/src/resource/soundObject_20240815042103.ts +0 -87
  223. package/.history/src/resource/soundObject_20240823235929.ts +0 -91
  224. package/.history/src/resource/soundObject_20240824213129.ts +0 -99
  225. package/.history/src/resource/soundObject_20240824213611.ts +0 -101
  226. package/.history/src/resource/soundObject_20240824215734.ts +0 -101
  227. package/.history/src/resource/soundObject_20240825004926.ts +0 -101
  228. package/.history/src/resource/soundObject_20240825004947.ts +0 -101
  229. package/.history/src/utils/logger_20240812174230.ts +0 -13
  230. package/.history/src/utils/logger_20240823232736.ts +0 -14
  231. package/.history/src/utils/logger_20240824214930.js +0 -14
  232. package/.history/src/utils/store_20240812174230.ts +0 -17
  233. package/.history/src/utils/store_20240823232948.ts +0 -29
  234. package/.history/src/utils/store_20240824214020.js +0 -17
  235. package/.history/src/utils/store_20240824214955.js +0 -29
  236. package/.history/src/utils/waitUtil_20240812174230.ts +0 -4
  237. package/.history/src/utils/waitUtil_20240823232739.ts +0 -4
  238. package/.history/src/utils/waitUtil_20240824214024.js +0 -4
  239. package/.history/src/utils/waitUtil_20240824215009.js +0 -4
  240. package/.history/test/js/title_20240428215305.js +0 -254
  241. package/.history/test/js/title_20240429221911.js +0 -227
  242. package/.history/test/js/title_20240429222806.js +0 -243
  243. package/.history/test/js/title_20240429222854.js +0 -263
  244. package/.history/test/js/title_20240429222906.js +0 -263
  245. package/.history/test/js/title_20240429235639.js +0 -263
  246. package/.history/test/js/title_20240429235840.js +0 -263
  247. package/.history/test/js/title_20240430014721.js +0 -262
  248. package/.history/test/js/title_20240430014759.js +0 -254
  249. package/.history/test/js/title_20240430134612.js +0 -285
  250. package/.history/test/js/title_20240430141051.js +0 -285
  251. package/.history/test/js/title_20240430173745.js +0 -245
  252. package/.history/tsconfig_20240812174230.json +0 -22
  253. package/.history/tsconfig_20240824010157.json +0 -19
  254. package/.history/tsconfig_20240824220700.json +0 -20
  255. package/.history/tsconfig_20240825011301.json +0 -20
  256. package/.history/webpack.config_20240423002825.js +0 -37
  257. package/.history/webpack.config_20240430001157.js +0 -38
  258. package/.history/webpack.config_20240430001309.js +0 -37
  259. package/.history/webpack.config_20240430002112.js +0 -37
  260. package/CLAUDE.md +0 -96
  261. package/LICENSE +0 -21
  262. package/coverage/lcov-report/base.css +0 -224
  263. package/coverage/lcov-report/block-navigation.js +0 -87
  264. package/coverage/lcov-report/core/drawer.ts.html +0 -1264
  265. package/coverage/lcov-report/core/index.html +0 -146
  266. package/coverage/lcov-report/core/resourceManager.ts.html +0 -136
  267. package/coverage/lcov-report/core/scenarioManager.ts.html +0 -373
  268. package/coverage/lcov-report/favicon.png +0 -0
  269. package/coverage/lcov-report/index.html +0 -146
  270. package/coverage/lcov-report/prettify.css +0 -1
  271. package/coverage/lcov-report/prettify.js +0 -2
  272. package/coverage/lcov-report/resource/ImageObject.ts.html +0 -433
  273. package/coverage/lcov-report/resource/index.html +0 -131
  274. package/coverage/lcov-report/resource/soundObject.ts.html +0 -346
  275. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  276. package/coverage/lcov-report/sorter.js +0 -196
  277. package/coverage/lcov-report/utils/TextMeasurer.ts.html +0 -520
  278. package/coverage/lcov-report/utils/index.html +0 -161
  279. package/coverage/lcov-report/utils/logger.ts.html +0 -142
  280. package/coverage/lcov-report/utils/store.ts.html +0 -151
  281. package/coverage/lcov-report/utils/waitUtil.ts.html +0 -97
  282. package/coverage/lcov.info +0 -882
  283. package/dist/README.md +0 -294
  284. package/dist/engineConfig.json +0 -10
  285. package/dist/package.json +0 -51
  286. package/dist/parser/cli.js +0 -61
  287. package/dist/parser/parser.js +0 -53
  288. package/dist/src/core/drawer.js.map +0 -1
  289. package/dist/src/core/scenarioManager.js.map +0 -1
  290. package/dist/src/utils/logger.js.map +0 -1
  291. package/dist/src/utils/store.js.map +0 -1
  292. package/dist/webtalekit-alpha-0.2.13.tgz +0 -0
  293. package/docs/event-system-specification.md +0 -493
  294. package/docs/glossary.html +0 -833
  295. package/docs/index.html +0 -296
  296. package/docs/tag-reference.html +0 -1317
  297. package/docs/ui-template-guide.html +0 -1068
  298. package/example/README.md +0 -29
  299. package/example/engineConfig.json +0 -10
  300. package/example/package-lock.json +0 -5145
  301. package/example/package.json +0 -26
  302. package/example/src/index.js +0 -13
  303. package/example/src/resource/background/beach.jpg +0 -0
  304. package/example/src/resource/background/city.jpg +0 -0
  305. package/example/src/resource/background/crossroad.jpg +0 -0
  306. package/example/src/resource/background/forest.jpg +0 -0
  307. package/example/src/resource/background/laboratory.jpg +0 -0
  308. package/example/src/resource/background/library.jpg +0 -0
  309. package/example/src/resource/background/living_room.jpg +0 -0
  310. package/example/src/resource/background/music_room.jpg +0 -0
  311. package/example/src/resource/background/stage.jpg +0 -0
  312. package/example/src/resource/background/sunset.jpg +0 -0
  313. package/example/src/resource/background/title_bg.png +0 -0
  314. package/example/src/resource/bgm/calm_music.wav +0 -0
  315. package/example/src/resource/bgm/doorbell.mp3 +0 -0
  316. package/example/src/resource/bgm/nc366476_Virtual_Voyage.mp3 +0 -0
  317. package/example/src/resource/bgm/title_theme.mp3 +0 -0
  318. package/example/src/resource/chara/dancer.png +0 -0
  319. package/example/src/resource/chara/guest.png +0 -0
  320. package/example/src/resource/chara/guide.png +0 -0
  321. package/example/src/resource/chara/scientist.png +0 -0
  322. package/example/src/resource/config.js +0 -0
  323. package/example/src/resource/se/doorbell.mp3 +0 -0
  324. package/example/src/resource/system/systemPicture/01_message/message.png +0 -0
  325. package/example/src/resource/system/systemPicture/02_button/button.png +0 -0
  326. package/example/src/resource/system/systemPicture/02_button/button2.png +0 -0
  327. package/example/src/resource/system/systemPicture/02_button/button3.png +0 -0
  328. package/example/src/resource/system/systemPicture/03_system_button/auto.png +0 -0
  329. package/example/src/resource/system/systemPicture/03_system_button/auto2.png +0 -0
  330. package/example/src/resource/system/systemPicture/03_system_button/close.png +0 -0
  331. package/example/src/resource/system/systemPicture/03_system_button/close2.png +0 -0
  332. package/example/src/resource/system/systemPicture/03_system_button/config.png +0 -0
  333. package/example/src/resource/system/systemPicture/03_system_button/config2.png +0 -0
  334. package/example/src/resource/system/systemPicture/03_system_button/load.png +0 -0
  335. package/example/src/resource/system/systemPicture/03_system_button/load2.png +0 -0
  336. package/example/src/resource/system/systemPicture/03_system_button/log.png +0 -0
  337. package/example/src/resource/system/systemPicture/03_system_button/log2.png +0 -0
  338. package/example/src/resource/system/systemPicture/03_system_button/menu.png +0 -0
  339. package/example/src/resource/system/systemPicture/03_system_button/menu2.png +0 -0
  340. package/example/src/resource/system/systemPicture/03_system_button/qload.png +0 -0
  341. package/example/src/resource/system/systemPicture/03_system_button/qload2.png +0 -0
  342. package/example/src/resource/system/systemPicture/03_system_button/qsave.png +0 -0
  343. package/example/src/resource/system/systemPicture/03_system_button/qsave2.png +0 -0
  344. package/example/src/resource/system/systemPicture/03_system_button/save.png +0 -0
  345. package/example/src/resource/system/systemPicture/03_system_button/save2.png +0 -0
  346. package/example/src/resource/system/systemPicture/03_system_button/screen.png +0 -0
  347. package/example/src/resource/system/systemPicture/03_system_button/screen2.png +0 -0
  348. package/example/src/resource/system/systemPicture/03_system_button/skip.png +0 -0
  349. package/example/src/resource/system/systemPicture/03_system_button/skip2.png +0 -0
  350. package/example/src/resource/system/systemPicture/03_system_button/title.png +0 -0
  351. package/example/src/resource/system/systemPicture/03_system_button/title2.png +0 -0
  352. package/example/src/resource/system/systemPicture//345/210/251/347/224/250/350/246/217/347/264/204.txt +0 -0
  353. package/example/src/resource/system/wait.gif +0 -0
  354. package/example/src/scene/animation.scene +0 -28
  355. package/example/src/scene/background.scene +0 -29
  356. package/example/src/scene/character.scene +0 -26
  357. package/example/src/scene/choice.scene +0 -97
  358. package/example/src/scene/dialog.scene +0 -105
  359. package/example/src/scene/effects.scene +0 -38
  360. package/example/src/scene/en/animation.scene +0 -28
  361. package/example/src/scene/en/background.scene +0 -26
  362. package/example/src/scene/en/character.scene +0 -26
  363. package/example/src/scene/en/choice.scene +0 -32
  364. package/example/src/scene/en/effects.scene +0 -37
  365. package/example/src/scene/en/sound.scene +0 -26
  366. package/example/src/scene/en/text.scene +0 -26
  367. package/example/src/scene/en/title.scene +0 -39
  368. package/example/src/scene/if_test.scene +0 -37
  369. package/example/src/scene/resource-error-test.scene +0 -15
  370. package/example/src/scene/save-load-test.scene +0 -48
  371. package/example/src/scene/sound.scene +0 -26
  372. package/example/src/scene/test_error.scene +0 -21
  373. package/example/src/scene/text.scene +0 -34
  374. package/example/src/scene/title.scene +0 -51
  375. package/example/src/screen/incoming.html +0 -474
  376. package/example/src/screen/title.html +0 -135
  377. package/example/src/template.html +0 -16
  378. package/example/test-results/.last-run.json +0 -4
  379. package/example/webpack.config.js +0 -69
  380. package/image.png +0 -0
  381. package/playwright-report/index.html +0 -71
  382. package/s-plan1-5Light-s-1.jpg +0 -0
  383. package/test-results/.last-run.json +0 -6
  384. package/tests/e2e/if-global-attribute.spec.js +0 -90
  385. package/tests/e2e/resource-error-handling.spec.js +0 -58
  386. package/tests/e2e/screenshots/before-error-check.png +0 -0
  387. package/tests/e2e/screenshots/choices.png +0 -0
  388. package/tests/e2e/screenshots/message-window-click-wait.png +0 -0
  389. /package/{dist/src → src}/core/resourceManager.js +0 -0
  390. /package/{dist/src → src}/core/resourceManager.js.map +0 -0
  391. /package/{dist/src → src}/resource/ImageObject.js +0 -0
  392. /package/{dist/src → src}/resource/ImageObject.js.map +0 -0
  393. /package/{dist/src → src}/resource/soundObject.js +0 -0
  394. /package/{dist/src → src}/resource/soundObject.js.map +0 -0
  395. /package/{dist/src → src}/utils/fallbackTemplate.js +0 -0
  396. /package/{dist/src → src}/utils/fallbackTemplate.js.map +0 -0
  397. /package/{dist/src → src}/utils/waitUtil.js +0 -0
  398. /package/{dist/src → src}/utils/waitUtil.js.map +0 -0
@@ -38,7 +38,8 @@ var ScenarioManager = /** @class */ (function () {
38
38
  }
39
39
  ScenarioManager.prototype.setScenario = function (scenario, sceneName) {
40
40
  if (sceneName === void 0) { sceneName = ''; }
41
- this.scenarioData = scenario;
41
+ var normalizedScenario = scenario !== null && scenario !== void 0 ? scenario : [];
42
+ this.scenarioData = JSON.parse(JSON.stringify(normalizedScenario));
42
43
  this.progress.currentScene = sceneName;
43
44
  this.progress.currentIndex = 0;
44
45
  };
@@ -46,7 +47,7 @@ var ScenarioManager = /** @class */ (function () {
46
47
  var _a, _b;
47
48
  // 区別にsub=trueを追加
48
49
  var _scenario = scenario.map(function (item) { return (__assign(__assign({}, item), { sub: true })); });
49
- // この行を消すと動く
50
+ // この行を消すと動く(原因があまりにも単純でまぬけすぎたので、残しておく)
50
51
  // ('call','debug', {scenario, index})
51
52
  // index指定がある場合はその値に挿入する
52
53
  if (index) {
@@ -61,16 +62,20 @@ var ScenarioManager = /** @class */ (function () {
61
62
  return this.scenarioData;
62
63
  };
63
64
  ScenarioManager.prototype.next = function () {
64
- if (this.progress.currentIndex <= this.scenarioData.length) {
65
- var nextScenario = this.scenarioData[this.progress.currentIndex];
66
- this.progress.currentIndex += 1;
67
- return nextScenario;
65
+ if (!Array.isArray(this.scenarioData)) {
66
+ return null;
68
67
  }
69
- else {
68
+ if (this.progress.currentIndex >= this.scenarioData.length) {
70
69
  return null;
71
70
  }
71
+ var nextScenario = this.scenarioData[this.progress.currentIndex];
72
+ this.progress.currentIndex += 1;
73
+ return nextScenario;
72
74
  };
73
75
  ScenarioManager.prototype.hasNext = function () {
76
+ if (!Array.isArray(this.scenarioData)) {
77
+ return false;
78
+ }
74
79
  return this.progress.currentIndex < this.scenarioData.length;
75
80
  };
76
81
  ScenarioManager.prototype.getIndex = function () {
@@ -91,6 +96,23 @@ var ScenarioManager = /** @class */ (function () {
91
96
  ScenarioManager.prototype.getHistory = function () {
92
97
  return this.backlist;
93
98
  };
99
+ ScenarioManager.prototype.snapshot = function () {
100
+ var _a;
101
+ return {
102
+ scenario: JSON.parse(JSON.stringify((_a = this.scenarioData) !== null && _a !== void 0 ? _a : [])),
103
+ index: this.getIndex(),
104
+ sceneName: this.getSceneName(),
105
+ progress: JSON.parse(JSON.stringify(this.progress)),
106
+ history: __spreadArray([], this.getHistory(), true),
107
+ };
108
+ };
109
+ ScenarioManager.prototype.restore = function (snap) {
110
+ this.scenarioData = JSON.parse(JSON.stringify(snap.scenario));
111
+ this.progress = JSON.parse(JSON.stringify(snap.progress));
112
+ this.progress.currentIndex = snap.index;
113
+ this.progress.currentScene = snap.sceneName;
114
+ this.backlist = __spreadArray([], snap.history, true);
115
+ };
94
116
  ScenarioManager.prototype.setSelectedChoice = function (prompt, id) {
95
117
  this.progress.selected[this.progress.currentScene] = { prompt: prompt, id: id };
96
118
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scenarioManager.js","sourceRoot":"","sources":["../../../src/core/scenarioManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAqD;AAUrD;IAQE;QAHQ,eAAU,GAAgB,IAAI,yBAAW,EAAE,CAAA;QAIjD,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG;YACd,iBAAiB,EAAE,EAAE;YACrB,YAAY,EAAE,EAAE;YAChB,YAAY,EAAE,CAAC;YACf,QAAQ,EAAE;YACR,kBAAkB;aACnB;SACF,CAAA;IACH,CAAC;IAED,qCAAW,GAAX,UAAa,QAAa,EAAE,SAAoB;QAApB,0BAAA,EAAA,cAAoB;QAC9C,IAAM,kBAAkB,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAA;QACzC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAA;QAClE,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,SAAS,CAAA;QACtC,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,CAAC,CAAA;IAChC,CAAC;IAED,qCAAW,GAAX,UAAa,QAAa,EAAE,KAAa;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AQ,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAA;QACvC,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,CAAA;QAC3C,IAAI,CAAC,QAAQ,qBAAO,IAAI,CAAC,OAAO,OAAC,CAAA;IACnC,CAAC;IAED,2CAAiB,GAAjB,UAAmB,MAAa,EAAE,EAAS;QACzC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,EAAC,MAAM,QAAA,EAAE,EAAE,IAAA,EAAC,CAAA;IACnE,CAAC;IAED,uCAAa,GAAb,UAAc,KAAkB;QAC/B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;IACxB,CAAC;IAED,uCAAa,GAAb;QACE,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IACH,sBAAC;AAAD,CAAC,AAvHD,IAuHC;AAvHY,0CAAe"}
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.EventBus = void 0;
40
+ var EventBus = /** @class */ (function () {
41
+ function EventBus() {
42
+ this.handlers = new Map();
43
+ }
44
+ EventBus.prototype.on = function (event, handler) {
45
+ if (!this.handlers.has(event)) {
46
+ this.handlers.set(event, []);
47
+ }
48
+ this.handlers.get(event).push(handler);
49
+ };
50
+ EventBus.prototype.off = function (event, handler) {
51
+ var handlers = this.handlers.get(event);
52
+ if (handlers) {
53
+ var index = handlers.indexOf(handler);
54
+ if (index !== -1) {
55
+ handlers.splice(index, 1);
56
+ }
57
+ }
58
+ };
59
+ EventBus.prototype.emit = function (event, data) {
60
+ return __awaiter(this, void 0, void 0, function () {
61
+ var handlers, results, _i, handlers_1, handler, _a, _b;
62
+ return __generator(this, function (_c) {
63
+ switch (_c.label) {
64
+ case 0:
65
+ handlers = this.handlers.get(event) || [];
66
+ results = [];
67
+ _i = 0, handlers_1 = handlers;
68
+ _c.label = 1;
69
+ case 1:
70
+ if (!(_i < handlers_1.length)) return [3 /*break*/, 4];
71
+ handler = handlers_1[_i];
72
+ _b = (_a = results).push;
73
+ return [4 /*yield*/, handler(data)];
74
+ case 2:
75
+ _b.apply(_a, [_c.sent()]);
76
+ _c.label = 3;
77
+ case 3:
78
+ _i++;
79
+ return [3 /*break*/, 1];
80
+ case 4: return [2 /*return*/, results];
81
+ }
82
+ });
83
+ });
84
+ };
85
+ return EventBus;
86
+ }());
87
+ exports.EventBus = EventBus;
88
+ //# sourceMappingURL=eventBus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eventBus.js","sourceRoot":"","sources":["../../../src/utils/eventBus.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;IAGE;QACE,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAA;IAC3B,CAAC;IAED,qBAAE,GAAF,UAAY,KAAa,EAAE,OAAwB;QACjD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QAC9B,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAE,CAAC,IAAI,CAAC,OAAuB,CAAC,CAAA;IACzD,CAAC;IAED,sBAAG,GAAH,UAAa,KAAa,EAAE,OAAwB;QAClD,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QACzC,IAAI,QAAQ,EAAE,CAAC;YACb,IAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAuB,CAAC,CAAA;YACvD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;gBACjB,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;IAEK,uBAAI,GAAV,UAAoB,KAAa,EAAE,IAAQ;;;;;;wBACnC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;wBACzC,OAAO,GAAU,EAAE,CAAA;8BACK,EAAR,qBAAQ;;;6BAAR,CAAA,sBAAQ,CAAA;wBAAnB,OAAO;wBAChB,KAAA,CAAA,KAAA,OAAO,CAAA,CAAC,IAAI,CAAA;wBAAC,qBAAM,OAAO,CAAC,IAAI,CAAC,EAAA;;wBAAhC,cAAa,SAAmB,EAAC,CAAA;;;wBADb,IAAQ,CAAA;;4BAG9B,sBAAO,OAAO,EAAA;;;;KACf;IACH,eAAC;AAAD,CAAC,AAhCD,IAgCC;AAhCY,4BAAQ"}
@@ -39,7 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  return (mod && mod.__esModule) ? mod : { "default": mod };
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.outputLog = void 0;
42
+ exports.logError = exports.outputLog = void 0;
43
43
  var stacktrace_js_1 = __importDefault(require("stacktrace-js"));
44
44
  function outputLog() {
45
45
  return __awaiter(this, arguments, void 0, function (msg, level, option) {
@@ -73,4 +73,48 @@ function outputLog() {
73
73
  });
74
74
  }
75
75
  exports.outputLog = outputLog;
76
+ /**
77
+ * Log an error with stack trace
78
+ * @param error - The error object to log
79
+ * @param additionalInfo - Additional context information
80
+ */
81
+ function logError(error, additionalInfo) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var stackframes, stackString, errorMessage, stackError_1;
84
+ return __generator(this, function (_a) {
85
+ switch (_a.label) {
86
+ case 0:
87
+ _a.trys.push([0, 2, , 3]);
88
+ return [4 /*yield*/, stacktrace_js_1.default.fromError(error)];
89
+ case 1:
90
+ stackframes = _a.sent();
91
+ stackString = stackframes
92
+ .map(function (sf) {
93
+ var functionName = sf.functionName || '<anonymous>';
94
+ var fileName = sf.fileName || '<unknown>';
95
+ var lineNumber = sf.lineNumber || 0;
96
+ var columnNumber = sf.columnNumber || 0;
97
+ return " at ".concat(functionName, " (").concat(fileName, ":").concat(lineNumber, ":").concat(columnNumber, ")");
98
+ })
99
+ .join('\n');
100
+ errorMessage = [
101
+ 'ERROR:',
102
+ additionalInfo ? "Context: ".concat(additionalInfo) : '',
103
+ "Message: ".concat(error.message),
104
+ 'Stack trace:',
105
+ stackString
106
+ ].filter(function (line) { return line; }).join('\n');
107
+ console.error(errorMessage);
108
+ return [3 /*break*/, 3];
109
+ case 2:
110
+ stackError_1 = _a.sent();
111
+ // Fallback if stack trace generation fails
112
+ console.error('ERROR:', additionalInfo || '', error.message, error.stack);
113
+ return [3 /*break*/, 3];
114
+ case 3: return [2 /*return*/];
115
+ }
116
+ });
117
+ });
118
+ }
119
+ exports.logError = logError;
76
120
  //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAuC;AAIvC,SAAsB,SAAS;wDAAC,GAAoB,EAAE,KAAuB,EAAE,MAAY;;QAA3D,oBAAA,EAAA,YAAoB;QAAE,sBAAA,EAAA,aAAuB;;;;oBAC3E,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;wBACvD,KAAK,GAAG,KAAK,CAAC;oBAChB,CAAC;;;;oBAGe,qBAAM,uBAAU,CAAC,GAAG,EAAE,EAAA;;oBAA9B,KAAK,GAAG,SAAsB;oBAC9B,MAAM,GAA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CAAC,CAAC;oBAElC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;;;;oBAE5B,2CAA2C;oBAC3C,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,cAAc,IAAI,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;;;;;;CAE7E;AA1BD,4BA0BC"}
@@ -21,6 +21,11 @@ var generateStore = function () {
21
21
  var store = __assign(__assign({}, allData), { set: function (key, value) {
22
22
  storejs_1.default.set(key, value);
23
23
  this[key] = value;
24
+ }, get: function (key) {
25
+ return storejs_1.default.get(key);
26
+ }, remove: function (key) {
27
+ storejs_1.default.remove(key);
28
+ delete this[key];
24
29
  } });
25
30
  return store;
26
31
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/utils/store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAA8B;AAYvB,IAAM,aAAa,GAAG;IAC3B,IAAM,OAAO,GAAc,IAAA,iBAAO,GAAE,CAAC;IAErC,IAAM,KAAK,yBACN,OAAO,KACV,GAAG,YAAC,GAAW,EAAE,KAAU;YACzB,iBAAO,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACpB,CAAC,EACD,GAAG,YAAC,GAAW;YACb,OAAO,iBAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC,EACD,MAAM,YAAC,GAAW;YAChB,iBAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACpB,OAAQ,IAAkB,CAAC,GAAG,CAAC,CAAC;QAClC,CAAC,GACF,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC,CAAA;AAnBY,QAAA,aAAa,iBAmBzB"}
@@ -1,12 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(python:*)",
5
- "Bash(git add:*)",
6
- "Bash(git commit:*)",
7
- "Bash(git checkout:*)"
8
- ],
9
- "deny": [],
10
- "ask": []
11
- }
12
- }
package/.clinerules DELETED
@@ -1,65 +0,0 @@
1
- # CLINE RULES
2
-
3
- ## 役割
4
-
5
- あなたは、 TypeScript のエキスパートであるエンジニアです。
6
- 日本語で応答しつつ、タスクの進め方を元に効率的にコーディングを進めてください。
7
- 調査結果は、.clinerules ファイルに追記してください。
8
-
9
- ## タスクの進め方
10
-
11
- 1. ブランチを切る
12
- 2. タスクを実装する
13
-  1. webTaleKitをビルドする
14
- 2. サンプルゲームをビルドして動作確認を行う
15
- 3. PlayWrightでテストを書く
16
- 4. テストを通す
17
- 5. プルリクエストを作成する
18
-
19
- ## プロジェクト概要
20
-
21
- WebTaleKitはブラウザで動作するビジュアルノベルゲームエンジンです。
22
- ゲームはsceneファイルと呼ばれるXMLとJavaScriptの組み合わせで記述されます。
23
- ここで記述されるXMLはwebTaleScriptと呼ばれる独自のスクリプト言語で、ゲームの進行制御を記述します。
24
-
25
- sceneファイルは以下の要素を持ちます。
26
- - scenario: シナリオを記述します。テキスト、選択肢、遷移先などを記述します。
27
- - script: シーンの設定を記述します。背景画像、BGM、テンプレートファイルなどを指定します。(webTaleScriptから呼び出すJavaScriptもここで記述します。)
28
-
29
- 主要なディレクトリ構成は以下の通りです。
30
- - src
31
- - core: ゲームエンジンのコア部分です。
32
- - resource: ゲームで使用するリソースを管理するモジュールです。
33
- - utils: ゲームで使用するユーティリティ関数(ロガーや待機、値共有用のStore)を管理するモジュールです。
34
- - example: サンプルゲームが配置されています。動作確認もここで行います。
35
-
36
- ## メッセージウィンドウの改善点
37
-
38
- ### 現在の実装状況
39
- - メッセージウィンドウは `example/src/screen/title.html` で定義されています
40
- - メッセージウィンドウ(#messageWindow)は画面下部に配置され、幅100%、高さは画面の1/4(calc(720px / 4))
41
- - メッセージテキスト(#messageView)はpタグとして実装され、パディングのみ設定されています
42
- - テキスト表示処理は `src/core/drawer.ts` の `drawText` メソッドで行われ、1文字ずつテキストを追加しています
43
-
44
- ### 問題点
45
- 1. **テキスト表示領域の制限がない**:
46
- - `#messageView` に幅と高さの制限が設定されていないため、テキストが長くなるとメッセージウィンドウの表示領域を超えてしまう
47
-
48
- 2. **テキスト折り返しの設定不足**:
49
- - テキストの折り返しに関する設定(word-wrap, word-breakなど)が不足しています
50
-
51
- 3. **自動スクロール処理の欠如**:
52
- - `overflow-y: auto` が設定されているため、テキストが長くなるとスクロールバーは表示されますが、自動的にスクロールする処理は実装されていません
53
-
54
- ### 修正案
55
- 1. **CSSの改善**:
56
- - `#messageView` に幅と高さの制限を追加
57
- - テキスト折り返しの設定を追加(overflow-wrap, word-break)
58
-
59
- 2. **drawTextメソッドの改善**:
60
- - テキスト追加時にメッセージウィンドウの表示領域を超えないかチェック
61
- - 必要に応じて自動スクロール処理を追加
62
-
63
- ### 修正対象ファイル
64
- - `example/src/screen/title.html`: CSSスタイルの修正
65
- - `src/core/drawer.ts`: drawTextメソッドの改善
@@ -1,193 +0,0 @@
1
- # webTaleKit
2
-
3
- ![wabTaleKitロゴ](s-plan1-5Light-s-1.jpg)
4
-
5
- ## 目次
6
-
7
- - 概要
8
- - デモ
9
- - 環境構築手順
10
- - 動作確認手順
11
- - Quick Start(デモゲームを弄ってみよう)
12
- - できること
13
- - できないこと
14
- - フィードバックフォームのご案内
15
-
16
- ## 概要
17
-
18
- TypeScript(JavaScript) ベースのビジュアルノベルゲームエンジンです。
19
- UIをHTML・CSS・JavaScriptで柔軟に作成でき、シナリオをマークアップ言語とJavaScriptで制御できます。
20
- 自動スケーリング機能で、様々なウインドウで遊ぶことができます。
21
- VS Codeの拡張機能を用いたGUIエディタやREST API呼び出しによる生成AI連携の追加を提供予定です。
22
-
23
- ## デモ
24
-
25
- Firefoxでも、Chromeでも、Edgeでも、好きなブラウザを使いたまえ・・・!
26
- <https://test-game-chi.vercel.app/>
27
- ![alt text](image.png)
28
-
29
- ## 環境構築手順
30
-
31
- 1. Node.js(20以降)が必要です。(nvm等お好みの方法がある場合は、そちらでも構いません)
32
- - Windowsの場合は、Node.js公式サイト (<https://nodejs.org/>) からインストールしてください。
33
- - Macの場合は、`brew install node` を実行してインストールしてください。
34
- - Linuxの場合は、以下のコマンドを実行して、インストールしてください。
35
-
36
- ```bash
37
- curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
38
- sudo apt-get install -y nodejs
39
- ```
40
-
41
- 2. 以下のコマンドを実行してください
42
-
43
- ``` bash
44
- npm create tale-game your-game-title
45
- ```
46
-
47
- プロジェクトに移動して、`npm run play`を実行して、デモゲームが起動すれば、構築は完了です。
48
-
49
- ## 動作確認手順
50
-
51
- 以下のコマンドを実行してください。
52
-
53
- ```bash
54
- git clone https://github.com/EndoHizumi/testGame.git
55
- npm install
56
- npm run play
57
- ```
58
-
59
- ## Quick Start(デモゲームを弄ってみよう
60
-
61
- ### 画像を差し替える
62
-
63
- - キャラを変える場合
64
- - src/resource/chara/guide.png に上書きしてください。
65
- - 背景画像を変える
66
- - src/resource/background/title_bg.png に上書きしてください。
67
- - BGMを変える
68
- - src/resource/bgm/title_theme.mp3 に上書きしてください。
69
-
70
- - 選択肢の画像を変える
71
- - src\resource\system\systemPicture\02_button\button.png に上書きしてください。
72
- - 選択肢(マウスオーバー時)の画像を変える
73
- - src\resource\system\systemPicture\02_button\button2.png に上書きしてください。
74
- - 選択肢(クリック時)の画像を変える
75
- - src\resource\system\systemPicture\02_button\button3.png に上書きしてください。
76
-
77
- - キャラを増やす
78
- - src\resource\character 以下に表示したい画像を置きます。
79
- - 登場させたい行数で、`<show src="表示したい画像のパス"></show>` を記述する
80
- - セリフを増やす
81
- - セリフを表示させたい行数で、`<say name="キャラの名前">セリフをここに入れる</say>` を記述する
82
- - 地の文を増やす
83
- - 地の文を表示させたい行数で、`<text>セリフをここに入れる</text>` を記述する
84
-
85
- - 選択肢を増やす
86
- - 43行目のchoiceタグの中(44行-50行)で、以下のように記述すると、選択されたときに、地の文を表示する
87
-
88
- ``` html
89
- <item label='選択肢の文言'>
90
- <text>セリフをここに入れる</text>
91
- </item>
92
- ```
93
-
94
- 実装例
95
-
96
- ``` html
97
- <choice prompt="ゲームを始めますか?">
98
- <item label="はい">
99
- <jump index="5" />
100
- </item>
101
- <item label="いいえ">
102
- <jump index="16" />
103
- </item>
104
- <item label='ちょっと待ってくれ'>
105
- <text>承知しました。</text>
106
- <jump index="1" />
107
- </item>
108
- </choice>
109
- ```
110
-
111
- ## 現在の状況
112
-
113
- webTaleKitは、現在アルファ版です。
114
-
115
- 開発進捗は、[@endo_hizumi](https://x.com/endo_hizumi) で行っております。
116
- 実装予定の項目については、こちらの[Trello](https://trello.com/b/qYNGh7MY)からも確認できます。
117
-
118
- デモをプレイした感想・WebTaleKitを使って気になったことなど、意見・感想はこちらで受け付けています!
119
- [https://forms.gle/uejQwvwAb99wcJht7](https://forms.gle/uejQwvwAb99wcJht7)
120
-
121
- 検索Hashtag: #webTalekit
122
-
123
- ## アルファ版で、できること
124
-
125
- - 地の文の表示
126
- - キャラクターのセリフの表示・ボイスの再生
127
- - キャラクターの画像の表示・位置変更・アニメーション
128
- - その他の画像の画像の表示・位置変更・アニメーション
129
- - キャラクターの複数表示・位置変更・アニメーション
130
- - CGの表示・変更
131
- - 背景画像の表示・変更
132
- - 画像のフィルター操作
133
- - モノクロ化
134
- - セピア化
135
- - 透明度の変更
136
- - サイズの変更
137
- - REST API呼び出し(レスポンスの表示)
138
- - 定義した変数の表示
139
- - 表示する文章・画像の条件分岐
140
- - 選択肢の表示
141
- - 選択肢の画像の変更
142
- - 通常時
143
- - マウスオーバー
144
- - 選択時
145
- - セリフのジャンプ
146
- - Ctrlキーでの強制スキップ
147
- - Enterキーで全文表示
148
- - シナリオ(シーン)の切り替え
149
- - BGMの再生・停止
150
- - SEの再生・停止
151
- - HTMLで作った画面の表示
152
- - 解像度の設定変更
153
- - JavaScript連携
154
- - メソッドの呼び出し
155
- - 式の実行
156
- - 変数の定義・値の変更
157
-
158
- ## アルファ版(0.2.x-0.1.x)で出来ないこと
159
-
160
- - Desktopアプリケーションへのビルド
161
- - Android(iOS)向けのビルド
162
- - 画面各種のボタン
163
- - sayタグの以下の機能
164
- - キャラが表示されていないときは、表示する
165
- - セーブ&ロード機能
166
- - showタグ / hideタグの以下の機能
167
- - 子要素でフィルター指定
168
- - 子要素でアニメーション指定
169
- - スラッシュで区切ってリソース種類を指定
170
- - JavaScript側での背景画像の変更
171
- - soundタグの以下の機能
172
- - pause
173
- - setVolume
174
- - getVolume
175
- - bgmエイリアス
176
- - voiceエイリアス
177
- - seエイリアス
178
- - quakeタグ(画面を揺らす)
179
- - maskタグ(画面の暗転)
180
- - JavaScriptでのリソースの動的定義
181
- - セーブファイルの一覧の取得
182
- - ゲーム設定ファイルの反映
183
- - 画面用HTMLのcss・jsのインライン化・minify化
184
-
185
- ## アイコン素材
186
-
187
- - <https://www.silhouette-illust.com/>
188
-
189
- ## カラーコード
190
-
191
- 青: #3178C6 (TypeScript BLue)
192
- 緑: #02a889 (WebTaleKit Green)
193
- 白: #f8f8f8 (White Smoke)