diff --git a/src/config.md b/src/config.md index 38c1ea6e1..a4d24e0ae 100644 --- a/src/config.md +++ b/src/config.md @@ -34,7 +34,7 @@ Enable_Appreciation:true; 如果你同时准备了多语言剧本,需要在脚本中读取当前界面语言,并跳转到对应的场景文件。可以使用内部变量 `$userData.optionData.language`: -```webgal +``` webgal setVar:lang=($userData.optionData.language); changeScene:start_zh.txt -when=lang==0; changeScene:start_en.txt -when=lang==1; diff --git a/src/developers/readme.md b/src/developers/readme.md index 5e22b1bc1..3e28d75d1 100644 --- a/src/developers/readme.md +++ b/src/developers/readme.md @@ -44,13 +44,13 @@ WebGAL 目前使用 yarn 作为包管理器,以及 yarn workspace monorepo 管 如果你没有 yarn ,请输入以下指令安装 -```shell +``` bash npm install yarn -g ``` 然后在项目根目录执行 -```shell +``` bash yarn ``` 以安装依赖。 @@ -68,13 +68,13 @@ yarn 你可以通过运行以下脚本启动开发服务器 -```shell +``` bash yarn dev ``` 如果你想要构建 WebGAL,请使用 -```shell +``` bash yarn build ``` diff --git a/src/developers/terre.md b/src/developers/terre.md index efeb91850..7266659c6 100644 --- a/src/developers/terre.md +++ b/src/developers/terre.md @@ -32,13 +32,13 @@ WebGAL Terre 的仓库在 [WebGAL Terre - GitHub](https://github.com/OpenWebGAL/ ### 安装依赖 -```bash +``` bash yarn ``` ### 启动开发服务器 -```bash +``` bash yarn dev ``` @@ -59,13 +59,13 @@ yarn dev 1、Clone WebGAL 引擎项目(推荐在相邻目录 Clone,这样可以使用自动化脚本) -``` +``` bash git clone https://github.com/OpenWebGAL/WebGAL.git ``` 2、**(假设你在 Terre 项目的相邻目录 Clone WebGAL 项目,未这样做的开发者请忽略)** 在 WebGAL 引擎仓库运行自动化脚本构建 WebGAL 到 WebGAL Terre -``` +``` bash sh release-to-terre.sh ``` @@ -75,7 +75,7 @@ sh release-to-terre.sh 2、构建 WebGAL 项目(此步骤在 WebGAL 引擎仓库中执行) -``` +``` bash yarn yarn build ``` @@ -84,7 +84,7 @@ yarn build **此处假设你在 Terre 项目的相邻目录 Clone WebGAL 项目,如果你有不同的目录结构,请根据实际情况修改。** -``` +``` bash # 进入 Terre 目录 cd ../WebGAL_Terre/packages/terre2/assets/templates/WebGAL_Template || exit # 删除其他文件 @@ -122,7 +122,7 @@ WebGAL Terre 是一个 TypeScript 全栈项目,使用 OpenAPI 来生成请求 以下代码示例展示了后端接口需要使用的关键注解: -```typescript +``` typescript @Post('createGame') @ApiOperation({ summary: 'Create a new game' }) @ApiResponse({ status: 200, description: 'Game creation result.' }) diff --git a/src/en/config.md b/src/en/config.md index 5805039e2..ba3cf3979 100644 --- a/src/en/config.md +++ b/src/en/config.md @@ -34,7 +34,7 @@ Enable_Appreciation:true; If you also prepare multiple script languages, read the current interface language in your script and jump to the corresponding scene file. You can use the internal variable `$userData.optionData.language`: -```webgal +``` webgal setVar:lang=($userData.optionData.language); changeScene:start_zh.txt -when=lang==0; changeScene:start_en.txt -when=lang==1; diff --git a/src/en/developers/readme.md b/src/en/developers/readme.md index 406dacf8f..b82082fee 100644 --- a/src/en/developers/readme.md +++ b/src/en/developers/readme.md @@ -44,13 +44,13 @@ WebGAL currently uses yarn as a package manager and yarn workspace as a monorepo If you don't have yarn, please install it using the following command: -```shell +``` bash npm install yarn -g ``` Then, execute the following command in the project root directory: -```shell +``` bash yarn ``` @@ -69,13 +69,13 @@ This project has 3 packages, each corresponding to different functionalities: You can start the development server by running the following script: -```shell +``` bash yarn dev ``` If you want to build WebGAL, use: -```shell +``` bash yarn build ``` diff --git a/src/en/developers/terre.md b/src/en/developers/terre.md index f170cce75..a71e80f28 100644 --- a/src/en/developers/terre.md +++ b/src/en/developers/terre.md @@ -32,13 +32,13 @@ The WebGAL Terre repository is located at [WebGAL Terre - GitHub](https://github ### Installing Dependencies -```bash +``` bash yarn ``` ### Starting the Development Server -```bash +``` bash yarn dev ``` @@ -59,13 +59,13 @@ Generally, we will update the latest version of the engine template to the Terre 1. Clone the WebGAL engine project (it is recommended to clone in the adjacent directory, so that you can use the automation script) -``` +``` bash git clone https://github.com/OpenWebGAL/WebGAL.git ``` 2. **(Assuming you cloned the WebGAL project in the directory adjacent to the Terre project, developers who did not do this please ignore)** Run the automation script in the WebGAL engine repository to build WebGAL to WebGAL Terre -``` +``` bash sh release-to-terre.sh ``` @@ -75,7 +75,7 @@ sh release-to-terre.sh 2. Build the WebGAL project (this step is executed in the WebGAL engine repository) -``` +``` bash yarn yarn build ``` @@ -84,7 +84,7 @@ yarn build **Here we assume that you cloned the WebGAL project in the directory adjacent to the Terre project. If you have a different directory structure, please modify it according to the actual situation.** -``` +``` bash # Enter the Terre directory cd ../WebGAL_Terre/packages/terre2/assets/templates/WebGAL_Template || exit # Delete other files @@ -122,7 +122,7 @@ To make this process work correctly, pay attention to the following annotations The following code example demonstrates the key annotations required for backend interfaces: -```typescript +``` typescript @Post('createGame') @ApiOperation({ summary: 'Create a new game' }) @ApiResponse({ status: 200, description: 'Game creation result.' }) diff --git a/src/en/getting-started.md b/src/en/getting-started.md index 2fbbba97d..c4654347b 100644 --- a/src/en/getting-started.md +++ b/src/en/getting-started.md @@ -29,20 +29,20 @@ Windows 7 users please refer to **[How to start making with Visual Editor on Win ## Method 2: Start debugging from source code (For makers who want higher customization) -``` shell +``` bash git clone https://github.com/OpenWebGAL/WebGAL.git ``` Install and use yarn to install dependencies -``` shell +``` bash npm install yarn -g yarn ``` WebGAL uses vite as a packaging and debugging tool, you can start the development server by running the following script -``` shell +``` bash yarn dev ``` @@ -54,7 +54,7 @@ It is recommended to use VS Code for development, and use plugins to achieve syn If you want to package, please use -``` shell +``` bash yarn build ``` diff --git a/src/en/live2D.md b/src/en/live2D.md index 1549c7540..b8e407eaa 100644 --- a/src/en/live2D.md +++ b/src/en/live2D.md @@ -29,6 +29,6 @@ If you use WebGAL Terre 4.6 portable mode, `[user data directory]` is the `data` You can use the `-motion=motionName` or `-expression=expressionName` parameters to switch expressions, such as: -``` +``` webgal changeFigure:xxx.json -motion=angry -expression=angry01; ``` diff --git a/src/en/script-reference/commands/applyStyle.md b/src/en/script-reference/commands/applyStyle.md index c1ffd2dcd..2920b1a7b 100644 --- a/src/en/script-reference/commands/applyStyle.md +++ b/src/en/script-reference/commands/applyStyle.md @@ -8,7 +8,7 @@ First, create a new style in the UI template. Then use the `applyStyle` command Connect the original style name and the new style name with `->`. Multiple replacements can be written at once and separated by English commas `,`. The format is: originalStyle->newStyle,originalStyle2->newStyle2,... -```webgal +``` webgal ; Replace the speaker-name background with red, assuming the new style exists in the UI template applyStyle:TextBox_ShowName_Background->TextBox_ShowName_Background_Red; Character:This is a line.; @@ -18,7 +18,7 @@ applyStyle:TextBox_ShowName_Background->TextBox_ShowName_Background_Green,TextBo No matter which new style the original style is replaced with, the replacement still starts from the original style name: -```webgal +``` webgal applyStyle:OriginalStyleName->NewStyleName1; applyStyle:NewStyleName1->NewStyleName2; Wrong applyStyle:OriginalStyleName->NewStyleName2; @@ -35,7 +35,7 @@ Choices use the following style names: | `Choose_item` | Clickable choice | | `Choose_item_disabled` | Choice whose condition is not met and cannot be clicked | -```webgal +``` webgal ; Replace clickable choices with Choose_item_Red defined in the template applyStyle:Choose_item->Choose_item_Red; ``` diff --git a/src/en/script-reference/commands/bgm.md b/src/en/script-reference/commands/bgm.md index ccdad9be2..c72073825 100644 --- a/src/en/script-reference/commands/bgm.md +++ b/src/en/script-reference/commands/bgm.md @@ -7,7 +7,7 @@ A four-in-one command for playing background music, switching background music, Sets the path of the background music. When the file path is empty or `none`, playback stops. See [Audio](../../webgal-script/audio.md) for details. -```webgal +``` webgal ; If no BGM exists, this plays BGM. bgm:01.wav; ; If BGM already exists, this switches BGM. @@ -18,7 +18,7 @@ bgm:; If the background music path stays the same, the music is not interrupted. Instead, the new parameters are applied to the current background music. -```webgal +``` webgal bgm:morning.wav; ; Adjust volume without interrupting the BGM bgm:morning.wav -volume=50; @@ -27,7 +27,7 @@ bgm:morning.wav -volume=50; ## Parameters -```webgal +``` webgal bgm:01.wav -volume=100; bgm:01.wav -volume=50; Adjust volume ``` @@ -40,7 +40,7 @@ bgm:01.wav -volume=50; Adjust volume The fade-in duration of the background music. -```webgal +``` webgal bgm:01.wav -enter=1500; bgm:02.wav -enter=1500; ``` @@ -48,7 +48,7 @@ bgm:02.wav -enter=1500; ### unlockname If this parameter is omitted or the name is empty, the music will not be collected. -```webgal +``` webgal bgm:01.wav -unlockname=MyBgm01; ``` @@ -56,6 +56,6 @@ bgm:01.wav -unlockname=MyBgm01; Writing only `series` will not collect the music. Make sure `unlockname` is also set. -```webgal +``` webgal bgm:01.wav -unlockname=MyBgm01 -series=MySeries01; ``` diff --git a/src/en/script-reference/commands/callSteam.md b/src/en/script-reference/commands/callSteam.md index 358424f0c..58cc9a785 100644 --- a/src/en/script-reference/commands/callSteam.md +++ b/src/en/script-reference/commands/callSteam.md @@ -10,7 +10,7 @@ This command only works in builds that provide Steam / Electron bridge support. Fill in `Steam_AppID` in `game/config.txt`. WebGAL initializes Steam integration when the game starts. -```text +``` text Steam_AppID:480; ``` @@ -27,13 +27,13 @@ There is no statement content. All values are passed through named parameters. Sets the Steam achievement ID to unlock. It must match the achievement API name configured in the Steam backend. -```webgal +``` webgal callSteam: -achievementId=ACH_WIN_ONE_GAME; ``` ## Example -```webgal +``` webgal ; Unlock achievement callSteam: -achievementId=ACH_WIN_ONE_GAME; ``` diff --git a/src/en/script-reference/commands/changeBg.md b/src/en/script-reference/commands/changeBg.md index 9cd47e384..916b19bff 100644 --- a/src/en/script-reference/commands/changeBg.md +++ b/src/en/script-reference/commands/changeBg.md @@ -7,7 +7,7 @@ A three-in-one command for background entrance, background replacement, and back Sets the path of the background image. When the file path is empty or `none`, the background exits. See [Backgrounds and Figures](../../webgal-script/bg-and-figure.md) for details. -```webgal +``` webgal ; If no background exists, this makes the background enter. changeBg:bg.png; ; If a background already exists, this replaces it. @@ -21,36 +21,36 @@ If the background image path and `id` stay the same, entrance or exit animation ## Parameters -```webgal +``` webgal changeBg:bg.png -transform={"position":{"x":-50,"y":-20},"rotation":0.1,"scale":{"x":1.2,"y":1.2},"brightness":0.5,"blur":10}; ``` -```webgal +``` webgal changeBg:bg.png -enter=enter-from-left; ``` -```webgal +``` webgal changeBg:bg.png -exit=exit-to-right; ``` Applied to the default entrance animation. Default value: 1500. -```webgal +``` webgal changeBg:bg.png -duration=200; ``` Applied to the default entrance animation. -```webgal +``` webgal changeBg:bg.png -ease=easeOut; ``` ### unlockname If this parameter is omitted or the name is empty, the image will not be collected. -```webgal +``` webgal changeBg:bg.png -unlockname=MyCg01; ``` @@ -58,7 +58,7 @@ changeBg:bg.png -unlockname=MyCg01; Writing only `series` will not collect the image. Make sure `unlockname` is also set. -```webgal +``` webgal changeBg:bg.png -unlockname=MyCg01 -series=MySeries01; ``` @@ -69,7 +69,7 @@ changeBg:bg.png -unlockname=MyCg01 -series=MySeries01; The entrance animation duration. If omitted, it defaults to the value of `duration`, whose default is 1500. -```webgal +``` webgal changeBg:bg.png -enterDuration=500; ``` @@ -80,6 +80,6 @@ changeBg:bg.png -enterDuration=500; The exit animation duration. If omitted, the default value is 1500. -```webgal +``` webgal changeBg:bg.png -exitDuration=800; ``` diff --git a/src/en/script-reference/commands/changeFigure.md b/src/en/script-reference/commands/changeFigure.md index a147b31fd..9ba965720 100644 --- a/src/en/script-reference/commands/changeFigure.md +++ b/src/en/script-reference/commands/changeFigure.md @@ -7,7 +7,7 @@ A four-in-one command for figure entrance, figure replacement, figure exit, and Sets the path of the figure. When the file path is empty or `none`, the figure exits. See [Backgrounds and Figures](../../webgal-script/bg-and-figure.md) for details. -```webgal +``` webgal ; If no figure exists, this makes the figure enter. changeFigure:1/open_eyes.png; ; If a figure already exists, this replaces it. @@ -18,7 +18,7 @@ changeFigure:none; If the figure path and `id` stay the same, entrance or exit animation will not be triggered. Instead, the new parameters are applied to the target figure. -```webgal +``` webgal ; Live2D figure entrance changeFigure:character_a/model.json -id=aaa; ; Modify a Live2D figure's motion and expression @@ -31,7 +31,7 @@ WebGAL currently supports image figures, Live2D figures, and Spine figures. Any format that is not Live2D or Spine will be imported as an image figure. -```webgal +``` webgal changeFigure:1/open_eyes.png; ``` @@ -43,7 +43,7 @@ Using Live2D requires some preparation. See [About Live2D](../../live2D.md) for Set the path of a Live2D model (.json/.model3.json), and WebGAL will load the Live2D model. -```webgal +``` webgal changeFigure:character_a/model.json; ``` @@ -55,42 +55,42 @@ Using Spine requires some preparation. See [About Spine](../../spine.md) for det If your Spine model is in .skel format, you can write the file path directly. -```webgal +``` webgal changeFigure:character_x/model.skel; ``` If your Spine model is in .json format, specify the figure type as Spine after the path to avoid importing it as a Live2D model by mistake. -```webgal +``` webgal changeFigure:character_x/model.json?type=spine; ``` ## Parameters -```webgal +``` webgal changeFigure:1/open_eyes.png -transform={"position":{"x":-50,"y":-20},"rotation":0.1,"scale":{"x":1.2,"y":1.2},"brightness":0.5,"blur":10}; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -enter=enter-from-left; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -exit=exit-to-right; ``` Applied to the default entrance animation. Default value: 300. -```webgal +``` webgal changeFigure:1/open_eyes.png -duration=200; ``` Applied to the default entrance animation. -```webgal +``` webgal changeFigure:1/open_eyes.png -ease=easeOut; ``` @@ -101,7 +101,7 @@ changeFigure:1/open_eyes.png -ease=easeOut; The entrance animation duration. If omitted, it defaults to the value of `duration`, whose default is 300. -```webgal +``` webgal changeFigure:1/open_eyes.png -enterDuration=200; ``` @@ -112,7 +112,7 @@ changeFigure:1/open_eyes.png -enterDuration=200; The exit animation duration. If omitted, the default value is 450. -```webgal +``` webgal changeFigure:1/open_eyes.png -exitDuration=300; ``` @@ -127,7 +127,7 @@ If `id` is omitted or an empty string, `left` gives the figure the default id `f These parameters only take effect when a figure enters or is replaced. To modify the coordinates of a figure already on stage, use commands such as `setTransform`, `setAnimation`, or `setTempAnimation`. ::: -```webgal +``` webgal changeFigure:1/open_eyes.png -left; changeFigure:1/open_eyes.png -right; ``` @@ -142,7 +142,7 @@ If this parameter is omitted or its value is an empty string: - If `right` is `true`, the default id is `fig-right` - If both `left` and `right` are `false`, the default id is `fig-center` -```webgal +``` webgal ; Different ids mean figures do not replace each other even if their initial positions are the same. changeFigure:1/open_eyes.png -id=aaa; changeFigure:2/open_eyes.png -id=bbb; @@ -157,7 +157,7 @@ changeFigure:3/open_eyes.png -id=ccc -left; The figure's layer. Larger values place the figure higher. If values are the same, the figure that entered later is placed higher. If omitted, the default value is 0. -```webgal +``` webgal ; Figure aaa is above figure bbb. changeFigure:1/open_eyes.png -id=aaa -zIndex=2; changeFigure:2/open_eyes.png -id=bbb -zIndex=1; @@ -169,7 +169,7 @@ changeFigure:2/open_eyes.png -id=bbb -zIndex=1; Sets the figure blend mode. It only takes effect when the figure enters or is replaced. -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -blendMode=add; ``` @@ -178,7 +178,7 @@ changeFigure:1/open_eyes.png -id=aaa -blendMode=add; Replaces the statement content with an empty string. -```webgal +``` webgal changeFigure:1/open_eyes.png -clear; changeFigure:1/open_eyes.png -none; ``` @@ -193,7 +193,7 @@ Image figure differential animation flag. The current cloud engine writes this v Sets image figure differential paths for open mouth, half-open mouth, and closed mouth. -```webgal +``` webgal changeFigure:1/open_eyes.png -mouthOpen=1/open_mouth.png; changeFigure:1/open_eyes.png -mouthHalfOpen=1/halfopen_mouth.png; changeFigure:1/open_eyes.png -mouthClose=1/closed_mouth.png; @@ -204,7 +204,7 @@ changeFigure:1/open_eyes.png -mouthClose=1/closed_mouth.png; Sets image figure differential paths for open eyes and closed eyes. -```webgal +``` webgal changeFigure:1/open_eyes.png -eyesOpen=1/open_eyes.png; changeFigure:1/open_eyes.png -eyesClose=1/closed_eyes.png; ``` @@ -214,7 +214,7 @@ changeFigure:1/open_eyes.png -eyesClose=1/closed_eyes.png; For Live2D or Spine figures, sets the motion name and plays the corresponding motion animation. -```webgal +``` webgal changeFigure:character_a/model.json -motion=sad; changeFigure:character_a/model.json -motion=smile; ``` @@ -225,7 +225,7 @@ changeFigure:character_a/model.json -motion=smile; For Spine figures, sets the skin name and switches to the corresponding skin. To switch both Spine animation and skin, continue using `motion` for animation and `skin` for skin. -```webgal +``` webgal changeFigure:character_x/model.json?type=spine -skin=default; changeFigure:character_x/model.json?type=spine -motion=anime_00_wait -skin=03_surprise; ``` @@ -235,7 +235,7 @@ changeFigure:character_x/model.json?type=spine -motion=anime_00_wait -skin=03_su For Live2D figures, sets the expression name and switches to the corresponding expression. -```webgal +``` webgal changeFigure:character_a/model.json -expression=smile; changeFigure:character_a/model.json -expression=sad; ``` @@ -251,7 +251,7 @@ The x axis is positive to the right, and the y axis is positive downward. This parameter only takes effect when the figure enters or is replaced. ::: -```webgal +``` webgal ; Expand 300 pixels to the left and right changeFigure:character_a/model.json -bounds=-300,0,300,0; ``` @@ -269,7 +269,7 @@ Parameters: - `"closedDuration"`: number, closed-eye duration in milliseconds, default 50 - `"openingDuration"`: number, opening-eye duration in milliseconds, default 150 -```webgal +``` webgal changeFigure:character_a/model.json -blink={"blinkInterval":5000,"blinkIntervalRandom":2000,"closingDuration":100,"closedDuration":50,"openingDuration":150}; ``` @@ -285,6 +285,6 @@ Parameters: - `"y"`: number, y coordinate of the focus point, range -1 to 1, default 0 - `"instant"`: boolean, whether to look at the focus point immediately, default false -```webgal +``` webgal changeFigure:character_a/model.json -focus={"x":0.5,"y":0.2,"instant":false}; ``` diff --git a/src/en/script-reference/commands/changeScene.md b/src/en/script-reference/commands/changeScene.md index 75a291070..26c3a9532 100644 --- a/src/en/script-reference/commands/changeScene.md +++ b/src/en/script-reference/commands/changeScene.md @@ -9,7 +9,7 @@ See [Scene and Branch](../../webgal-script/scenes.md) for details. If this command succeeds, subsequent commands in the current scene will not be executed. -```webgal +``` webgal CharacterA:Time to go.; changeScene:chapter_01/part_02.txt; Debug:If you see this line, the scene switch failed.; @@ -21,7 +21,7 @@ Switching scenes does not clear the current scene, such as figures and backgroun ::: - chapter_01/part_01.txt -```webgal +``` webgal changeBg:home/character_a/bedroom.png; changeFigure:main_character/character_a/thinking.png -next; CharacterA:Let's go to her house today!; @@ -31,7 +31,7 @@ changeFigure:none -next; Manually close figure changeScene:chapter_01/part_02.txt; ``` - chapter_01/part_02.txt -```webgal +``` webgal changeBg:home/character_b/living_room.png; changeFigure:main_character/character_b/smile.png -next; CharacterB:Oh, it's you. What can I do for you?; diff --git a/src/en/script-reference/commands/choose.md b/src/en/script-reference/commands/choose.md index 671b6d2e8..4bed80f53 100644 --- a/src/en/script-reference/commands/choose.md +++ b/src/en/script-reference/commands/choose.md @@ -11,7 +11,7 @@ Currently, choices can jump to: - A scene file - A label in the current scene -```webgal +``` webgal CharacterA:Where should we go today?; choose:Go to the shop:chapter_01/shop.txt|Someone's house:chapter_01/house_b.txt|Stay home:home; ; @@ -32,7 +32,7 @@ Each option can add condition prefixes before the option text: - `[condition expression]`: controls whether the option can be clicked. - `->`: separates condition prefixes from the actual option content. -```webgal +``` webgal setVar:hasTicket=true; setVar:doorPower=1; choose:(hasTicket==true)->Show ticket:ticket|(doorPower>0)[doorPower>1]->Force the door:force|Go home:home; diff --git a/src/en/script-reference/commands/getUserInput.md b/src/en/script-reference/commands/getUserInput.md index 9ba42e7e9..85b7c7606 100644 --- a/src/en/script-reference/commands/getUserInput.md +++ b/src/en/script-reference/commands/getUserInput.md @@ -6,7 +6,7 @@ Gets user input. Sets the variable name. The value entered by the user will be saved to this variable. -```webgal +``` webgal CharacterB:Thank you so much. Could you tell me your name?; getUserInput:player_name -title=Your Name -buttonText=Confirm -defaultValue=Bob; CharacterB:{player_name}, I'll remember that.; @@ -21,7 +21,7 @@ After the player confirms input, the engine writes the variable, closes the inpu Sets the title of the input box. -```webgal +``` webgal getUserInput:player_name -title=Your Name; ``` @@ -30,7 +30,7 @@ getUserInput:player_name -title=Your Name; Sets the confirmation button text. -```webgal +``` webgal getUserInput:player_name -buttonText=Confirm; ``` @@ -39,7 +39,7 @@ getUserInput:player_name -buttonText=Confirm; Sets the default value of the input box. -```webgal +``` webgal getUserInput:player_name -defaultValue=Bob; ``` @@ -50,7 +50,7 @@ If the player confirms without entering anything, the engine writes `defaultValu Sets the regular expression rule used to validate the input. -```webgal +``` webgal getUserInput:player_name -rule=^.{1,2}$; ``` @@ -61,7 +61,7 @@ Sets regular expression flags, such as `g` for global matching and `i` for case- For details, see [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp#flags). -```webgal +``` webgal getUserInput:player_name -rule=^.{1,2}$ -ruleFlag=g; ``` @@ -70,7 +70,7 @@ getUserInput:player_name -rule=^.{1,2}$ -ruleFlag=g; Sets the text shown in the error popup when validation fails. You can use `$0` to get the user's input. -```webgal +``` webgal getUserInput:player_name -rule=^.{1,2}$ -ruleText=$0 must be 1-2 characters; ``` @@ -81,6 +81,6 @@ Sets the button text of the error popup when validation fails. Default: `OK` -```webgal +``` webgal getUserInput:player_name -rule=^.{1,2}$ -ruleText=$0 must be 1-2 characters -ruleButtonText=OK; ``` diff --git a/src/en/script-reference/commands/global.md b/src/en/script-reference/commands/global.md index a13a5a078..8f815b83e 100644 --- a/src/en/script-reference/commands/global.md +++ b/src/en/script-reference/commands/global.md @@ -9,7 +9,7 @@ When the value is `true`, the next statements are executed while the current statement is being executed, until a statement whose `next` value is `false` is found. -```webgal +``` webgal label:loop; ; changeBg:bg.png -next; @@ -44,7 +44,7 @@ Some commands are not compatible with `next`. For example, adding `next` to the Writes a conditional expression. The current statement is executed only when the condition is `true`. -```webgal +``` webgal label:start; ; setVar:coin=10; @@ -68,7 +68,7 @@ jumpLabel:start; After this statement's performance ends, automatically executes the next statement even if the player has not enabled autoplay. -```webgal +``` webgal changeBg:bg.png -next; changeFigure:1/open_eyes.png -transform={"position":{"x":-500}} -id=aaa -next; changeFigure:2/open_eyes.png -transform={"position":{"x":500}} -id=bbb; diff --git a/src/en/script-reference/commands/intro.md b/src/en/script-reference/commands/intro.md index cd5827561..2ff84d1ab 100644 --- a/src/en/script-reference/commands/intro.md +++ b/src/en/script-reference/commands/intro.md @@ -7,7 +7,7 @@ Full-screen text command. Sets a paragraph of text that is displayed as full-screen text. Use `|` to split it into multiple lines. See [Blackout Text](../../webgal-script/dialogue.md#blackout-text) for details. -```webgal +``` webgal intro:This is the first line|This is the second line|This is the third line; ``` @@ -23,7 +23,7 @@ Sets the font size. Available values: - `medium` - medium font - `large` - large font -```webgal +``` webgal intro:This is a paragraph -fontSize=large; ``` @@ -33,7 +33,7 @@ intro:This is a paragraph -fontSize=large; Sets the font color. For example, `rgba(0,0,0,1)` means black and `rgba(255,255,255,1)` means white. The alpha range is 0 to 1. -```webgal +``` webgal intro:This is a paragraph -fontColor=rgba(48, 135, 206, 1); ``` @@ -43,7 +43,7 @@ intro:This is a paragraph -fontColor=rgba(48, 135, 206, 1); Sets the background color. For example, `rgba(0,0,0,1)` means black and `rgba(255,255,255,1)` means white. The alpha range is 0 to 1. -```webgal +``` webgal intro:This is a paragraph -backgroundColor=rgba(22,22,22,0.8); ``` @@ -52,7 +52,7 @@ intro:This is a paragraph -backgroundColor=rgba(22,22,22,0.8); Sets the path of the background image used by full-screen text. If this parameter is not set, `backgroundColor` is used. -```webgal +``` webgal intro:This is a paragraph -backgroundImage=bg.png; ``` @@ -66,7 +66,7 @@ Sets how the full-screen text appears. Supported animation effects: - `pixelateEffect`: blur - `revealAnimation`: scroll reveal -```webgal +``` webgal intro:This is the first line|This is the second line|This is the third line -animation=slideIn; ``` @@ -78,7 +78,7 @@ intro:This is the first line|This is the second line|This is the third line -ani Sets the display delay of each line. -```webgal +``` webgal intro:This is the first line|This is the second line|This is the third line -delayTime=1000; ``` @@ -88,7 +88,7 @@ intro:This is the first line|This is the second line|This is the third line -del When the value is `true`, the next statement is not automatically executed after all text is displayed, until the player clicks the screen. When the value is `false`, the next statement is automatically executed after all text is displayed, even if the player has not enabled autoplay. -```webgal +``` webgal intro:This is a paragraph -hold; ``` @@ -98,6 +98,6 @@ intro:This is a paragraph -hold; When the value is `true`, the user must click the screen manually to show the next line. It also sets `hold` to `true` and ignores `delayTime`. When the value is `false`, the next line is displayed automatically. -```webgal +``` webgal intro:This is a paragraph -userForward; ``` diff --git a/src/en/script-reference/commands/jumpLabel.md b/src/en/script-reference/commands/jumpLabel.md index bda425629..9c78b4e83 100644 --- a/src/en/script-reference/commands/jumpLabel.md +++ b/src/en/script-reference/commands/jumpLabel.md @@ -7,7 +7,7 @@ See [Label Jump](../../webgal-script/scenes.md#label-jump) for details. Sets the target label name to jump to. -```webgal +``` webgal label:think; ; CharacterA:I remember she likes...; @@ -25,7 +25,7 @@ CharacterA:Right, it was the rabbit plush.; `jumpLabel` can be used with the common `-when` parameter. If the condition is not met, this statement is skipped and the story continues with the next statement. -```webgal +``` webgal setVar:score=2; jumpLabel:scoreHigh -when=score>1; CharacterA:You see this when the score is not enough.; diff --git a/src/en/script-reference/commands/label.md b/src/en/script-reference/commands/label.md index 2870d72bd..c3218e90d 100644 --- a/src/en/script-reference/commands/label.md +++ b/src/en/script-reference/commands/label.md @@ -7,7 +7,7 @@ See [Label Jump](../../webgal-script/scenes.md#label-jump) for details. Sets the label name. This command itself performs no action, but it can be used with `choose` and `jumpLabel`. -```webgal +``` webgal label:myLabel; ``` diff --git a/src/en/script-reference/commands/playEffect.md b/src/en/script-reference/commands/playEffect.md index f34315a27..629417e23 100644 --- a/src/en/script-reference/commands/playEffect.md +++ b/src/en/script-reference/commands/playEffect.md @@ -7,7 +7,7 @@ A three-in-one command for playing sound effects, replacing sound effects, and s Sets the sound effect file path. When the file path is empty or `none`, sound effect playback stops. See [Playing Sound Effects](../../webgal-script/audio.md#playing-sound-effects) for details. -```webgal +``` webgal ; If no sound effect exists, this plays a sound effect. playEffect:rain.wav; ; If a sound effect already exists, this replaces it. @@ -24,7 +24,7 @@ playEffect:none; After an id is set for a sound effect, the sound effect can loop. Sound effects with different ids and sound effects without ids can be played on top of each other. -```webgal +``` webgal ; Loop footsteps playEffect:footsteps.wav -id=footsteps; ; Loop rain @@ -40,6 +40,6 @@ playEffect:thunder.wav; Sets the sound effect volume percentage. 0 means muted, 100 means maximum volume. -```webgal +``` webgal playEffect:rain.wav -id=rain -volume=60; ``` diff --git a/src/en/script-reference/commands/say.md b/src/en/script-reference/commands/say.md index ca1532840..80bc76ba6 100644 --- a/src/en/script-reference/commands/say.md +++ b/src/en/script-reference/commands/say.md @@ -7,7 +7,7 @@ Dialogue command. Any unrecognized command is attempted as a dialogue command. Sets one line of text, which appears in the dialogue box. Use `|` to split it into multiple lines. See [Basic](../../webgal-script/base.md) and [Dialogue](../../webgal-script/dialogue.md) for details. -```webgal +``` webgal Speaker:Hello, world!; ``` @@ -23,7 +23,7 @@ The dialogue box does not appear in these cases: When the value is `true`, immediately executes the next command after all text is displayed, even if the player has not enabled autoplay. -```webgal +``` webgal changeFigure:1/open_eyes.png -next; CharacterA:What exactly is going on... -notend; changeFigure:1/closed_eyes.png -next; @@ -35,7 +35,7 @@ I can't look! -concat; When the value is `true`, existing text in the dialogue box is not cleared. The new text continues after it. -```webgal +``` webgal changeFigure:1/open_eyes.png -next; CharacterA:What exactly is going on... -notend; changeFigure:1/closed_eyes.png -next; @@ -48,7 +48,7 @@ I can't look! -concat; Sets the speaker name, which appears in the speaker field of the dialogue box. If this parameter is omitted, the dialogue box continues using the previous speaker name. -```webgal +``` webgal say:Hello, world! -speaker=CharacterA; ; Without speaker, the character name continues using the previous value say:World, hello!; @@ -58,7 +58,7 @@ WebGAL supports simplified speaker syntax. If the characters from the beginning of the line to the first English colon are not a command, they are used as the speaker name. If the whole line has no English colon and no speaker name can be found, the previous speaker name is used. -```webgal +``` webgal CharacterA:Hello, world!; ; Speaker is still CharacterA World, hello!; @@ -69,7 +69,7 @@ World, hello!; When the value is `true`, clears the speaker. The speaker field will not be shown in the dialogue box, which is usually used for narration. -```webgal +``` webgal say:This is a line. -speaker=CharacterA; say:This is narration. -clear; say:This is a line. -speaker=CharacterB; @@ -77,7 +77,7 @@ say:This is a line. -speaker=CharacterB; WebGAL supports simplified narration syntax. If there are no characters before the first English colon, the sentence is treated as narration. -```webgal +``` webgal CharacterA:This is a line.; :This is narration.; CharacterB:This is a line.; @@ -88,13 +88,13 @@ CharacterB:This is a line.; Sets the path of the voice file played while speaking. -```webgal +``` webgal CharacterA:Hello, world! -vocal=hello_world.wav; ``` WebGAL supports simplified voice file syntax. -```webgal +``` webgal CharacterA:Hello, world! -hello_world.wav; ``` @@ -109,7 +109,7 @@ Sets font size. Available values: After this value is set, it is passed to subsequent dialogue until it is set again. -```webgal +``` webgal CharacterA:Hello, world! -fontSize=small; CharacterA:Hello, world!; Still small font CharacterA:Hello, world! -fontSize=large; @@ -121,7 +121,7 @@ CharacterA:Hello, world! -fontSize=default; When the value is `true`, WebGAL tries to drive the left, right, or center figure to speak with mouth movement. -```webgal +``` webgal CharacterA:Hello, world! -left; CharacterA:Hello, world! -right; CharacterA:Hello, world! -center; @@ -132,7 +132,7 @@ CharacterA:Hello, world! -center; Sets the figure id. WebGAL tries to drive the figure with the corresponding id to speak with mouth movement. -```webgal +``` webgal CharacterA:Hello, world! -figureId=aaa; ``` diff --git a/src/en/script-reference/commands/setAnimation.md b/src/en/script-reference/commands/setAnimation.md index b34f15041..77f18539d 100644 --- a/src/en/script-reference/commands/setAnimation.md +++ b/src/en/script-reference/commands/setAnimation.md @@ -12,26 +12,26 @@ If you want to define a multi-segment animation directly in the script, use [set If you only want to set a single-segment animation, use [setTransform](setTransform.md). ::: -```webgal +``` webgal setAnimation:shake -target=aaa; ``` ## Parameters -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setAnimation:shake -target=aaa; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setAnimation:shake -target=aaa -writeDefault; ``` -```webgal +``` webgal ; Assume this is a very long animation setAnimation:shake -target=aaa -keep -next; CharacterA:First line; diff --git a/src/en/script-reference/commands/setTempAnimation.md b/src/en/script-reference/commands/setTempAnimation.md index 8e2872b12..b705e681d 100644 --- a/src/en/script-reference/commands/setTempAnimation.md +++ b/src/en/script-reference/commands/setTempAnimation.md @@ -12,7 +12,7 @@ If you want to reuse an animation, use [setAnimation](setAnimation.md). If you only want to set a single-segment animation, use [setTransform](setTransform.md). ::: -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; ; Flashbang animation setTempAnimation:[{"duration":0},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":200},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":2500}] -target=aaa; @@ -21,19 +21,19 @@ setTempAnimation:[{"duration":0},{"brightness":2,"contrast":0,"duration":200,"ea ## Parameters -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"duration":0},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":200},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":2500}] -target=aaa; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"duration":0},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":200},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":2500}] -target=aaa -writeDefault; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"duration":0},{"scale":{"x":2,"y":2},"duration":10000}] -target=aaa -keep -next; CharacterA:First line; diff --git a/src/en/script-reference/commands/setTextbox.md b/src/en/script-reference/commands/setTextbox.md index 82045511b..47705ba99 100644 --- a/src/en/script-reference/commands/setTextbox.md +++ b/src/en/script-reference/commands/setTextbox.md @@ -15,7 +15,7 @@ If `setTextbox` shows the dialogue box but the dialogue box still does not appea - Both the speech content and character name are empty - __Hide all UI__ is enabled -```webgal +``` webgal CharacterA:I will take you somewhere.; setTextbox:hide; changeBg:shop.png; diff --git a/src/en/script-reference/commands/setTransform.md b/src/en/script-reference/commands/setTransform.md index f35957d79..af770040a 100644 --- a/src/en/script-reference/commands/setTransform.md +++ b/src/en/script-reference/commands/setTransform.md @@ -10,7 +10,7 @@ Sets a single-line JSON string for [transform and effects](../others/transform-r This command only generates one animation segment. If you need to set a multi-segment animation, use [setAnimation](setAnimation.md) or [setTempAnimation](setTempAnimation.md). ::: -```webgal +``` webgal changeFigure:character_a/normal.png -id=aaa; ; Move left setTransform:{"position":{"x":-500},"saturation":0.8} -target=aaa -duration=500; @@ -21,31 +21,31 @@ setTransform:{"brightness":0.5,"contrast":1.2} -target=aaa -duration=500; ## Parameters -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTransform:{"brightness":0.5} -target=aaa -duration=500; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTransform:{"brightness":0.5} -target=aaa -duration=500; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTransform:{"brightness":0.5} -target=aaa -duration=500 -ease=linear; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTransform:{"brightness":0.5} -target=aaa -duration=500 -writeDefault; ``` -```webgal +``` webgal ; Assume this is a very long animation setTransform:{"scale":{"x":2,"y":2}} -target=aaa -duration=10000 -keep -next; CharacterA:First line; diff --git a/src/en/script-reference/commands/setVar.md b/src/en/script-reference/commands/setVar.md index 4e00e70d3..a6daa9c0b 100644 --- a/src/en/script-reference/commands/setVar.md +++ b/src/en/script-reference/commands/setVar.md @@ -14,7 +14,7 @@ Supported value types: WebGAL attempts to convert unrecognized value types into strings. -```webgal +``` webgal setVar:char_b_fav=15; Character B initial favor ; CharacterB:Hey, can you tell what's different about me today?; @@ -56,7 +56,7 @@ changeScene:chapter_02/part_01.txt; When the value is `true`, sets a persistent global variable. Persistent variables take effect throughout the whole game unless the user clears all data. When the value is `false`, sets a normal variable. Normal variables only take effect in the current scene, are saved in save data, and restored when the save is loaded. -```webgal +``` webgal ; Assume this is the beginning of a new game ; If this is already another playthrough, jump directly to the extra-playthrough story jumpLabel:another_life -when=multiple_playthroughs; diff --git a/src/en/script-reference/others/animation-reference.md b/src/en/script-reference/others/animation-reference.md index e1de3707d..504fcfda8 100644 --- a/src/en/script-reference/others/animation-reference.md +++ b/src/en/script-reference/others/animation-reference.md @@ -4,7 +4,7 @@ WebGAL supports setting consecutive [transform and effect](../others/transform-r A transform and effect object looks like this: -```json +``` json { "position": { "x": -500, @@ -17,7 +17,7 @@ A transform and effect object looks like this: An animation segment object is a transform and effect object with additional properties such as duration: -```json +``` json { "position": { "x": -500, @@ -32,7 +32,7 @@ An animation segment object is a transform and effect object with additional pro Multiple animation segment objects can form an animation: -```json +``` json [ { "duration": 0 @@ -61,7 +61,7 @@ Except for required properties such as `duration`, many properties in animation The "existing value" inherited here means the target object's transform and effect snapshot before the animation starts, not the ending state of the previous animation segment. ::: -```webgal +``` webgal ; The figure object's initial coordinate is (-500,0) changeFigure:character_a/normal.png -id=aaa -transform={"position":{"x":-500,"y":0}}; ; The multi-segment animation coordinates are: @@ -72,7 +72,7 @@ setTempAnimation:[{"duration":0},{"position":{"x":500},"duration":500},{"positio The first segment in an animation is the starting state. Its duration is usually set to 0. Even if it is greater than 0, it will not produce an animation effect. You can still set transform and effect properties on the first segment so the animation jumps directly to a specified state when it starts. -```webgal +``` webgal ; The figure object's initial coordinate is (0,0) changeFigure:character_a/normal.png -id=aaa; ; Walk from left to right, jumping directly to the left side when the animation starts @@ -88,14 +88,14 @@ setTempAnimation:[{"position":{"x":-500},"duration":0},{"position":{"x":500},"du The duration of each animation segment. -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"position":{"x":-500},"duration":0},{"position":{"x":500},"duration":1000}] -target=aaa; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"position":{"x":-500},"duration":0},{"position":{"x":500},"duration":1000,"ease":"bounceOut"}] -target=aaa; ``` diff --git a/src/en/script-reference/others/transform-reference.md b/src/en/script-reference/others/transform-reference.md index 1e71faea8..518ed8a3f 100644 --- a/src/en/script-reference/others/transform-reference.md +++ b/src/en/script-reference/others/transform-reference.md @@ -2,13 +2,13 @@ `transform` is the stage object's transform and effect property set. It includes position, rotation, scale, and filter properties. Its format looks like this: -```json +``` json {"position":{"x":0,"y":0},"rotation":0,"scale":{"x":1,"y":1},"alpha":1,"blur":0,"colorRed":255,"colorGreen":255,"colorBlue":255} ``` You usually do not need to write every property. Write only the properties you want to modify. Unmodified properties inherit existing values or use defaults depending on the situation. -```webgal +``` webgal setTransform:{"position":{"x":100},"rotation":45} -target=aaa -duration=500; ; This inherits the existing transform and changes only the blur filter value setTransform:{"blur":20} -target=aaa -duration=500; @@ -18,7 +18,7 @@ setTransform:{"saturation":0} -target=aaa -duration=500 -writeDefault; For filter properties, a filter is fully disabled only when all values of that filter are set to defaults. Otherwise, the filter remains until the object exits, which may cause unnecessary performance cost. When needed, explicitly set related properties to default values to disable filters. -```webgal +``` webgal changeBg:bg.png -transform={"brightness":0.5,"blur":10} -next; changeFigure:1/open_eyes.png -id=aaa; ; @@ -53,7 +53,7 @@ Filters are currently applied to the image in this order: Position. Modify its x and y properties to change the object's coordinates on the stage. -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"position":{"x":500,"y":-50}}; setTransform:{"position":{"x":-200,"y":50}} -target=aaa -duration=500; ``` @@ -64,7 +64,7 @@ setTransform:{"position":{"x":-200,"y":50}} -target=aaa -duration=500; Rotation. Changes the object's rotation in radians. Clockwise is positive. -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"rotation":-3.14}; setTransform:{"rotation":1.57} -target=aaa -duration=500; ``` @@ -74,7 +74,7 @@ setTransform:{"rotation":1.57} -target=aaa -duration=500; Scale. Modify its x and y properties to change the object's scale ratio. -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"scale":{"x":0.5,"y":0.5}}; setTransform:{"scale":{"x":2,"y":2}} -target=aaa -duration=500; ``` @@ -87,7 +87,7 @@ setTransform:{"scale":{"x":2,"y":2}} -target=aaa -duration=500; Opacity. -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"alpha":0.8}; setTransform:{"alpha":0.2} -target=aaa -duration=500; ``` @@ -99,7 +99,7 @@ setTransform:{"alpha":0.2} -target=aaa -duration=500; Blur. -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"blur":10}; setTransform:{"blur":30} -target=aaa -duration=500; ``` @@ -132,7 +132,7 @@ Gamma. The red, green, and blue components of the color tone. -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"brightness":0.3,"colorRed":128}; setTransform:{"contrast":2,"colorBlue":64} -target=aaa -duration=500; ``` @@ -163,7 +163,7 @@ Bloom blur amount. If both `bloom` and `bloomBrightness` are default values, adj Bloom threshold. Higher values make only brighter parts of the image produce bloom. -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"bloom":1,"bloomBlur":10,"bloomThreshold":0}; setTransform:{"bloom":1,"bloomBlur":10,"bloomThreshold":0.8} -target=aaa -duration=500; ``` @@ -189,7 +189,7 @@ Bevel thickness. The red, green, and blue components of the bevel color. -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"bevel":1,"bevelThickness":20,"bevelRed":128}; setTransform:{"bevel":1,"bevelThickness":20,"bevelBlue":64} -target=aaa -duration=500; ``` @@ -202,7 +202,7 @@ setTransform:{"bevel":1,"bevelThickness":20,"bevelBlue":64} -target=aaa -duratio Switches for old film, dot, RGB split, glitch, godray, and reflection filters. -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"oldFilm":1}; setTransform:{"oldFilm":0} -target=aaa -duration=500; ``` diff --git a/src/en/spine.md b/src/en/spine.md index 7b445d83e..3c60582fc 100644 --- a/src/en/spine.md +++ b/src/en/spine.md @@ -30,7 +30,7 @@ Note: The following steps are based on the WebGAL source code. You can find the 2. Install `pixi-spine` using yarn in the `package/webgal` directory: -``` +``` bash cd package/webgal yarn add pixi-spine@3.1.2 ``` @@ -39,7 +39,7 @@ yarn add pixi-spine@3.1.2 Uncomment the following commented lines (starting around line 30): -``` +``` typescript // pixiSpineLoading = import('pixi-spine') // .then((module) => { // spineLoader = new PIXI.Loader(); @@ -63,23 +63,23 @@ Uncomment the following commented lines (starting around line 30): For example: ``` -game/ - figure/ - exampleSpine/ - data.json - atlas.atlas - skeleton.skel +game +└── figure + └── exampleSpine + ├── data.json + ├── atlas.atlas + └── skeleton.skel ``` If you are using a JSON format Spine sprite, you need to pass in the type using a script similar to the following, so that the engine recognizes its type as Spine. -``` +``` webgal changeFigure:exampleSpine/data.json?type=spine; ``` Use the `motion` argument to switch Spine animations. If you also need to switch the Spine skin, pass the `skin` argument. -``` +``` webgal changeFigure:exampleSpine/data.json?type=spine -motion=anime_00_wait; changeFigure:exampleSpine/data.json?type=spine -skin=default; changeFigure:exampleSpine/data.json?type=spine -motion=anime_03_surprise -skin=03_surprise; diff --git a/src/en/tech/readme.md b/src/en/tech/readme.md index 12bb6a3a5..c3813897c 100644 --- a/src/en/tech/readme.md +++ b/src/en/tech/readme.md @@ -20,7 +20,7 @@ WebGAL scene files are mainly divided by lines to distinguish scripts. At the be WebGAL scripts are generally in the form of -``` +``` webgal command:content -arg1 -arg2 ......;comment ``` @@ -30,7 +30,7 @@ Among them, `command` represents the statement instruction, such as `bgm`, `chan WebGAL's dialogues are generally written in the following form: -``` +``` webgal 森川由绮:胸につかえていることを、时は解决してくれない。忘却のラベルを贴るだけで -voice_1.ogg; ``` @@ -38,13 +38,13 @@ For visual novels, since dialogues are generally the main part of the script, We Therefore, the true representation of this dialogue should be: -``` +``` webgal say:胸につかえていることを、时は解决してくれない。忘却のラベルを贴るだけで -speaker=森川由绮 vocal=voice_1.ogg; ``` In addition, if the dialogue is spoken by one person, the person's name can be omitted before the speaker changes: -``` +``` webgal 森川由绮:胸につかえていることを; 时は解决してくれない; 忘却のラベルを贴るだけで; diff --git a/src/en/webgal-script/animation.md b/src/en/webgal-script/animation.md index 443c9d28d..472e5306c 100644 --- a/src/en/webgal-script/animation.md +++ b/src/en/webgal-script/animation.md @@ -6,7 +6,7 @@ Use the statement `setAnimation:animation name -target=target;` **Example:** -``` ws +``` webgal ; // Set an animation for the center sprite to enter from the bottom, and proceed to the next line setAnimation:enter-from-bottom -target=fig-center -next; ``` @@ -125,7 +125,7 @@ In the file `animationTable.json`: Then, you can call it in the script: -``` ws +``` webgal setAnimation:enter-from-left -target=fig-left -next; ``` @@ -168,7 +168,7 @@ An animation with a duration of 0 milliseconds and only one time slice is a tran You can also override WebGAL's default fade-in and fade-out entrance and exit effects with your own animation effects. For example: -``` +``` webgal setTransition: -target=fig-center -enter=enter-from-bottom -exit=exit; ``` @@ -202,13 +202,13 @@ Prepare the following differential sprites for the character: **1. Register differential images and show the sprite** -```webgal +``` webgal changeFigure:1/normal.png -id=charA -mouthOpen=1/mouth_open.png -mouthHalfOpen=1/mouth_half.png -mouthClose=1/normal.png; ``` **2. Play voice and drive the mouth shape** -```webgal +``` webgal ; Drive a free sprite by id CharacterA:Hello, world! -vocal=charA_hello.wav -figureId=charA; ``` @@ -217,7 +217,7 @@ The engine switches between `mouthOpen`, `mouthHalfOpen`, and `mouthClose` accor ### Positioned Sprite Example -```webgal +``` webgal ; Show the center sprite and register differential images changeFigure:1/normal.png -mouthOpen=1/mouth_open.png -mouthHalfOpen=1/mouth_half.png -mouthClose=1/normal.png; diff --git a/src/en/webgal-script/audio.md b/src/en/webgal-script/audio.md index af3c51d41..842b520bd 100644 --- a/src/en/webgal-script/audio.md +++ b/src/en/webgal-script/audio.md @@ -4,25 +4,25 @@ Playing background music is extremely simple, you just need to put the background music in the `bgm` folder, and then use the `bgm` instruction to play the background music. -``` ws +``` webgal bgm:Summer_Shadow.mp3; ``` You can set a `-volume` parameter for the background music to adjust its volume. -``` ws +``` webgal bgm:Summer_Shadow.mp3 -volume=30; ``` In addition, you can also use the `-enter` parameter to fade in the playback. -``` ws +``` webgal bgm:Summer_Shadow.mp3 -enter=3000; ``` Finally, you can use the following statement to fade out the background music. -``` ws +``` webgal bgm:none -enter=3000; ``` @@ -36,20 +36,20 @@ When `-enter` is not used, or a value other than 0 to is used, the default value As we all know, the most attractive part of visual novels is often their excellent voice acting. Put the voice acting file in the `vocal` folder, and then add the `-Voice file name` parameter in the dialog script to play the voice. The syntax is as follows. -``` ws +``` webgal Hachiman Hikigaya:Just arrived -V3.ogg; ``` When talking continuously, the way the voice is introduced is the same. -``` ws +``` webgal Yukino Yukinoshita:You're here early -V1.ogg; Sorry, have you been waiting long? -V2.ogg; ``` At the same time, you can set a `-volume` parameter to adjust its volume. -``` ws +``` webgal Hachiman Hikigaya:Just arrived -V3.ogg -volume=30; ``` @@ -62,13 +62,13 @@ When `-volume` is not set, or a value other than 0 to 100 is used, the default v After putting your dubbing into the `vocal` folder, you can use the `playEffect` instruction to play the sound effects^_^ -``` ws +``` webgal playEffect:xxx.mp3; ``` You can set a `-volume` parameter for the sound effect to adjust its volume. -``` ws +``` webgal playEffect:xxx.mp3 -volume=30; ``` @@ -81,7 +81,7 @@ When `-volume` is not set, or a value other than 0 to 100 is used, the default v Giving the sound effect an `id` will automatically enable the sound effect loop, and the same `id` will be used to stop it later. -``` ws +``` webgal playEffect:xxx.mp3 -id=xxx; playEffect:none -id=xxx; // Stop this looping sound effect ``` @@ -90,7 +90,7 @@ playEffect:none -id=xxx; // Stop this looping sound effect Use `unlockBgm` to unlock the audio in the audio appreciation. -``` ws +``` webgal ; // Unlock bgm and give it a name unlockBgm:s_Title.mp3 -name=Smiling-Swinging!!!; ``` \ No newline at end of file diff --git a/src/en/webgal-script/base.md b/src/en/webgal-script/base.md index 81d9eca8a..6b0c49ee6 100644 --- a/src/en/webgal-script/base.md +++ b/src/en/webgal-script/base.md @@ -8,7 +8,7 @@ The following tutorials will teach you how to use WebGAL script. WebGAL script will only parse the content before the semicolon in each line, so the content after the semicolon will be regarded as a comment. -``` ws +``` webgal WebGAL:Hello!; The content after semicolon will be regarded as a comment ; You can directly input a semicolon, then write a single-line comment ``` @@ -27,7 +27,7 @@ Common symbols that need escaping: | `;` | `\;` | | `|` | `\|` | -```ws +``` webgal intro:I will display these symbols\: \:\,\.\; just look -hold; WebGAL:I will display these symbols\: \:\,\.\; just look; choose:I will display these symbols\: \:\,\.\; just look:nextLabel; @@ -45,7 +45,7 @@ You can add the parameter `-next` after any statement. This will cause the next Example: -``` ws +``` webgal changeBg:testBG03.jpg -next; // Will execute the next statement immediately ``` @@ -60,7 +60,7 @@ At this time, you can use the `-notend` `-concat` parameters to insert any state An example is given below: This is a demonstration of switching 立ち絵 in the middle of a dialogue. -``` ws +``` webgal WebGAL:Test statement insert 演出!Switch 立ち絵 immediately...... -notend; changeFigure:k1.png -next; Switch 立ち絵!Switch expression immediately...... -notend -concat; @@ -70,7 +70,7 @@ Switch expression! -concat; You can also use only the `-concat` parameter to connect the next sentence after the previous dialogue, because the `-notend` parameter will move to the next sentence after the dialogue fades in. -```ws +``` webgal This is the first sentence...; This sentence will only appear after the user clicks the mouse -concat; ``` diff --git a/src/en/webgal-script/bg-and-figure.md b/src/en/webgal-script/bg-and-figure.md index 952172395..ffe704b23 100644 --- a/src/en/webgal-script/bg-and-figure.md +++ b/src/en/webgal-script/bg-and-figure.md @@ -6,7 +6,7 @@ For WebGAL to load backgrounds and figures, your background images should be pla You can then change the currently displayed background image and figure with the following simple statements: -``` ws +``` webgal changeBg:testBG03.jpg; // Change background changeFigure:testFigure02.png; // Change figure changeBg:none; // Close background @@ -15,7 +15,7 @@ changeFigure:none; // Close figure You may have noticed that after changing the background image or figure, you need to click the mouse again to display the next line of dialogue. If you want to execute the content of the next statement immediately after changing the background/figure, use the `-next` parameter. -``` ws +``` webgal changeBg:testBG03.jpg -next; changeFigure:testFigure02.png -next; // Change figure Ichishiki: Thank you, senior! ; @@ -27,7 +27,7 @@ If you do this, the program will execute the next statement immediately after th You can now place different figures in three different positions on the page. Just add the position you want to place the figure at the end of the statement, as shown in the following example: -``` ws +``` webgal changeFigure:testFigure03.png -left; changeFigure:testFigure04.png; changeFigure:testFigure03.png -right; @@ -35,7 +35,7 @@ changeFigure:testFigure03.png -right; The above three lines correspond to the left, center, and right positions, respectively. The figures in the three different positions are independent of each other, so if you need to clear a figure, you must clear it separately: -``` ws +``` webgal changeFigure:none -left; changeFigure:none; changeFigure:none -right; @@ -43,7 +43,7 @@ changeFigure:none -right; If you want to execute the next statement immediately after the figure is changed, the operation is the same as before, that is, add the parameter `-next` : -``` ws +``` webgal changeFigure:testFigure03.png -left -next; changeFigure:testFigure04.png -next; changeFigure:testFigure03.png -right -next; @@ -53,7 +53,7 @@ changeFigure:testFigure03.png -right -next; If you want to control the position of the character sprites more precisely, or use more than 3 character sprites, you can specify `id` and initial position for them: -``` ws +``` webgal ; // A free figure with an initial position on the right changeFigure:testFigure03.png -left -id=test1; ; // Close the figure by id @@ -68,7 +68,7 @@ If you want to reset the position of a figure with an ID, close it first and the Many games allow mini avatars to be placed in the lower left corner of the text box. Here is the syntax used in this engine: -``` ws +``` webgal ; // Display minipic_test.png in the lower left corner miniAvatar:minipic_test.png; ; // Close this mini avatar @@ -79,7 +79,7 @@ miniAvatar:none; Use `unlockCg` to unlock CGs in CG appreciation. -``` ws +``` webgal ; // Unlock CG and give it a name unlockCg:xgmain.jpeg -name="Starlight Cafe and the Butterfly of Death" -series=1; ``` @@ -92,7 +92,7 @@ For a description of the effect fields, please refer to [Animation](animation.md You can set some transform and filter effects for the figure when setting the figure. Here is an example: -``` +``` webgal changeFigure:stand.png -transform={"alpha":1,"position":{"x":0,"y":500},"scale":{"x":1,"y":1},"rotation":0,"blur":0,"brightness":1,"contrast":1,"saturation":1,"gamma":1,"colorRed":255,"colorGreen":255,"colorBlue":255,"oldFilm":0,"dotFilm":0,"reflectionFilm":0,"glitchFilm":0,"rgbFilm":0,"godrayFilm":0} -next; ``` @@ -102,7 +102,7 @@ For a description of the effect fields, please refer to [Animation](animation.md You can also use `setTransform` to set effects for existing figures directly, for example: -``` +``` webgal setTransform:{"position":{"x":100,"y":0}} -target=fig-center -duration=0; ``` diff --git a/src/en/webgal-script/dialogue.md b/src/en/webgal-script/dialogue.md index 99bf1d563..253cda073 100644 --- a/src/en/webgal-script/dialogue.md +++ b/src/en/webgal-script/dialogue.md @@ -18,7 +18,7 @@ The way to write character dialogue is very simple, you just need to enter `Char Example: -``` ws +``` webgal Yukino Yukinoshita: Please have some tea; Yui Yuigahama: Ah, thank you; Komachi: Thank you, Sister Yukino!; @@ -31,7 +31,7 @@ After each dialogue/script, use a semicolon as the end. (Sometimes it works if y If your multiple dialogues do not change the character name, you can use continuous dialogue, and you can omit the character name, and use it when you need it: -``` ws +``` webgal Yukino Yukinoshita: You're here early; ; // At this time, the character name of the dialogue is still "Yukino Yukinoshita" Sorry, have you been waiting long?; @@ -42,7 +42,7 @@ Hachiman Hikigaya: Just arrived; If you want to create a monologue dialogue without a character name, leave a blank space before the colon (but do not omit the colon): -``` ws +``` webgal :This is a monologue; ``` @@ -50,13 +50,13 @@ If you want to create a monologue dialogue without a character name, leave a bla In many games, some text is displayed on a black screen, which is used to introduce the theme or express the character's mental activities. You can use the intro command to perform a monologue: -``` ws +``` webgal intro: Memories don't need a suitable script, | Anyway, once you say it, | It all becomes a joke. ; ``` The monologue is split by the separator (|), that is, each | represents a line break. In the actual performance, the above text will become: -``` ws +``` webgal Memories don't need a suitable script, Anyway, once you say it, It all becomes a joke. @@ -64,7 +64,7 @@ It all becomes a joke. If you want to keep the monologue UI after the monologue ends instead of continuing the game flow, use the ` -hold` parameter. -``` ws +``` webgal intro:Recalling doesn't need a suitable script,|anyway, once it's spoken,|it all becomes a joke. -hold; ``` @@ -72,7 +72,7 @@ intro:Recalling doesn't need a suitable script,|anyway, once it's spoken,|it all Use the `getUserInput` instruction to get user input and write it into a variable, for example: -``` +``` webgal getUserInput:name -title=What is your name -buttonText=OK; Write user input to variable name ``` @@ -82,13 +82,13 @@ Among them, the `title` parameter is the text of the prompt, and `buttonText` is You can use the `{}` syntax in a statement to perform variable interpolation and pass a variable into the statement, for example: -``` +``` webgal WebGAL: Nice to meet you, {name}! ``` Variable interpolation also applies to character names, for example: -``` +``` webgal {name}: I like WebGAL the most too!; ``` @@ -100,7 +100,7 @@ The grammar of Ruby is `[Word to be annotated](annotation)` Example: -``` +``` webgal 『[笑顔](えがお)』なんて、『[笑う](わらう)』なんて、[誰](だれ)でも[出来](でき)るもん…! ``` @@ -112,7 +112,7 @@ Text enhancement syntax is an enhancement to a specific piece of text. Text encl In simple terms, it takes the following form: -``` +``` webgal WebGAL:[Text](style-alltext=font-style:italic\;font-size:80%\; style=color:#66327C\; ruby=wen ben) ``` @@ -146,13 +146,13 @@ If the new text enhancement syntax is used, the phonetic annotation is written i Sometimes, for some special performance effects, you may want to temporarily close the text box, so you can use the following instructions to close the text box: -``` ws +``` webgal setTextbox:hide; // Close the text box ``` When the value of the `setTextbox` instruction is `hide`, the text box will be closed and the user will not be able to open it in any way. If you want to display the text box again, call this command again and enter any value other than `hide`. -``` ws +``` webgal setTextbox:on; // Can be any value other than hide. ``` @@ -160,7 +160,7 @@ setTextbox:on; // Can be any value other than hide. If you want to end the game and return to the title after the plot, please use: -``` ws +``` webgal end; ``` diff --git a/src/en/webgal-script/scenes.md b/src/en/webgal-script/scenes.md index 8fe75b9cd..21b9d75dd 100644 --- a/src/en/webgal-script/scenes.md +++ b/src/en/webgal-script/scenes.md @@ -14,13 +14,13 @@ If you are using WebGAL Terre visual editor, you should pay special attention to Suppose you have written two chapters of the script, namely `Chapter-1.txt` and `Chapter-2.txt`. After `Chapter-1.txt` is finished running, you want to jump to the scene corresponding to `Chapter-2.txt`, please use the following statement: -``` ws +``` webgal changeScene:Chapter-2.txt; ``` Example: -``` ws +``` webgal (Chapter-1.txt) ...... ...... @@ -40,13 +40,13 @@ If you need to call another scene in a scene, you can use `callScene`, and the o Statement: -``` ws +``` webgal callScene:Chapter-2.txt; ``` Example: -``` ws +``` webgal (Chapter-1.txt) ...... ...... @@ -67,7 +67,7 @@ callScene:Chapter-2.txt; If there are branch options in your script, and you want to enter different chapters by selecting different options, please use `choose`. Use `Option text: Chapter file name` to define an option. Use `|` to separate different options. An example is as follows: -``` ws +``` webgal choose:Stop her:Chapter-2.txt|Go home:Chapter-3.txt; ``` @@ -77,7 +77,7 @@ You only need to match the text of the option with the name of the script to be You can also conditionally display choices or allow the user to click on them based on variables, with the following syntax: -```ws +``` webgal choose:(showConditionVar>1)[enableConditionVar>2]->Call out to her:Chapter-2.txt|Go home:Chapter-3.txt; ``` @@ -93,7 +93,7 @@ If your branch is very long, I do not recommend that you use this method, becaus ### Create a label (`label`) -``` ws +``` webgal ...... jumpLabel:label_1; // Jump to label_1 ...... @@ -110,7 +110,7 @@ If `jumpLabel` is compared to any door, then the end point of this any door is t With the above foundation, you can use `choose` to implement the use of branches to jump to the position of `label`: -``` ws +``` webgal ...... choose:Branch 1:label_1|Branch 2:label_2; label:label_1; // Create a label named label_1 @@ -127,7 +127,7 @@ label:end; // Create a label named end Note that at the end of each branch, you should use `jumpLabel` to jump to the position you want. Since the program is executed linearly, if you do not jump to a location at the end of the branch, the program will continue to run down, for example: -``` ws +``` webgal ...... choose:Branch 1:label_1|Branch 2:label_2; label:label_1; // Create a label named label_1 diff --git a/src/en/webgal-script/special-effect.md b/src/en/webgal-script/special-effect.md index ca5448e28..2e51a66ca 100644 --- a/src/en/webgal-script/special-effect.md +++ b/src/en/webgal-script/special-effect.md @@ -8,7 +8,7 @@ Currently, WebGAL's effect system is powered by PixiJS. Initialize Pixi using `pixiInit`. -``` ws +``` webgal pixiInit; ``` @@ -22,7 +22,7 @@ If you want to clear the effects that have already taken effect, you can use thi Add effects using `pixiPerform`. -``` ws +``` webgal pixiPerform:rain; // Add a rain effect ``` @@ -41,7 +41,7 @@ Note: After the effect takes effect, if it is not re initialized, the effect wil If you want to superimpose two or more effects, you can superimpose different effects without using the `pixiInit` command. -``` ws +``` webgal pixiPerform:rain; pixiPerform:snow; ``` @@ -56,7 +56,7 @@ You can download the source code, then find `/Core/gameScripts/pixiPerformScript The effects container is divided into a foreground container and a background container, and the foreground container is used here as an example. -``` ts +``` typescript // Get the current Pixi effect Container const effectsContainer = WebGAL.gameplay.pixiStage!.foregroundEffectsContainer!; // Call the Pixi App method, which may be useful for determining screen size, etc. @@ -73,7 +73,7 @@ Then, import the `effect registration method` at the beginning of the file to re At the end of the file, use it to register your effect, the first parameter is the effect name, and the second parameter is the method to call the effect. -``` ts +``` typescript import {registerPerform} from '../pixiPerformManager'; // Let's say this is your effect @@ -87,12 +87,12 @@ registerPerform('myPerform', { fg: () => myPerform(parameters) }); Finally, compile WebGAL with support for your custom effects -``` shell +``` bash yarn run build; ``` This way, you can call your effects in the script -``` ws +``` webgal pixiPerform:myPerform; ``` \ No newline at end of file diff --git a/src/en/webgal-script/variable.md b/src/en/webgal-script/variable.md index 2b821e4e6..d5ebaa108 100644 --- a/src/en/webgal-script/variable.md +++ b/src/en/webgal-script/variable.md @@ -8,7 +8,7 @@ Don't use the variable system until you figure out how to use scene jumping and To set a variable: -``` ws +``` webgal setVar:a=1; // You can set a number setVar:a=true // You can set a boolean setVar:a=Character Name // You can set a string @@ -16,7 +16,7 @@ setVar:a=Character Name // You can set a string To set a random number, use `random()` -```ws +``` webgal setVar:a=random(); ``` @@ -28,23 +28,23 @@ setVar:a=random(); 3. [floating] (boolean): Specifies whether to return a floating-point number. Instead of writing arguments, it generates a floating-point number in the range 0-1 -```ws +``` webgal setVar:a=random(); ``` Of course, we can also specify **Range**. For example, if you want a random number between 5 and 10, You can write: -```ws +``` webgal SetVar: a = the random (5, 10); ``` Of course you want it to use ranges to generate values that also have decimals, then specify a third argument: -```ws +``` webgal SetVar: a = the random (5, 10, true); # will generate a floating point number between 5 and 10 ``` You can also use previously defined variables when setting variables. -``` ws +``` webgal setVar:a=1; setVar:b=a+1; ``` @@ -55,7 +55,7 @@ You can add a `-when=(condition)` parameter after a statement to conditionally e For example: -``` ws +``` webgal setVar:a=1; ; // Jump to scene 1 when a is greater than 1 changeScene:1.txt -when=a>1; @@ -76,7 +76,7 @@ Any statement can be conditionally executed with the `-when` parameter. By combi Use the `getUserInput` statement to get user input, for example: -``` +``` webgal getUserInput:name -title=What's your name? -buttonText=OK; Store the user input in the variable name ``` @@ -86,7 +86,7 @@ Where `title` is the prompt text, `buttonText` is the text on the OK button You can use the `{}` syntax in statements to interpolate variables, passing a variable into the statement, for example: -``` +``` webgal setVar:name=WebGAL; setVar:engine=WebGAL; {name}:Welcome to {engine}! This is a brand new visual novel engine for web.; @@ -100,7 +100,7 @@ In order to solve the problem that the author may want to set multiple weeks, a Adding the `-global` parameter can set persistent (global) variables -```ws +``` webgal setVar:a=1 -global; ``` @@ -108,7 +108,7 @@ This sets a variable that does not change with存档 reading. Example of use: -```ws +``` webgal jumpLabel:turn-2 -when=a>0; setVar:a=1 -global; First playthrough; @@ -131,14 +131,14 @@ The properties for `stage` can be found in the `state` TAB under the WebGAL edit You can access them using `$`, for example to get the value of BGM: -```ws +``` webgal setVar:a=($stage.bgm.volume); WebGAL:The current BGM volume is{a}; ``` Of course, you can also use it directly in a conversation: -```ws +``` webgal WebGAL:The current BGM volume is{$stage.bgm.volume}; ``` @@ -148,7 +148,7 @@ WebGAL:The current BGM volume is{$stage.bgm.volume}; We can also access the global variables in `config.txt` : -```ws +``` webgal setVar:title=(Game_name); WebGAL:The current title of the game is{title}; ``` @@ -157,7 +157,7 @@ The same goes for modifications. When changing the game title to a new one, the Adding the `global` flag indicates that we are modifying a configuration variable: -```ws +``` webgal setVar:Game_name=('New Game Title') -global; WebGAL:The current title of the game is{Game_name}; ``` @@ -173,7 +173,7 @@ To do this, use `Clear all data` in the game options. Of course, you can also create a custom configuration variable in `config.txt`, such as a version number: -```text +``` text Game_name:欢迎使用WebGAL!; Game_key:f60ad5725c1588; Title_img:WebGAL_New_Enter_Image.png; @@ -185,7 +185,7 @@ version:1; Then we can access it, modify it, and so on in a script: -```ws +``` webgal setVar:v=(version); WebGAL:The current version number is{v}; setVar:version=version*2 -global; diff --git a/src/en/webgal-script/video.md b/src/en/webgal-script/video.md index 0e8f190fb..296d81380 100644 --- a/src/en/webgal-script/video.md +++ b/src/en/webgal-script/video.md @@ -4,7 +4,7 @@ Put the video inside `video` folder, then use `playVideo` to play it. -``` ws +``` webgal playVideo:OP.mp4; ``` diff --git a/src/en/win7.md b/src/en/win7.md index c1eaa8d35..b1b6f9f71 100644 --- a/src/en/win7.md +++ b/src/en/win7.md @@ -58,7 +58,7 @@ Manual method: 3. Run the following command: - ```bash + ``` bash npm i # or (if you have yarn installed) yarn @@ -76,7 +76,7 @@ Manual method: 3. Run the following command: - ```bash + ``` bash node main.js ``` @@ -94,7 +94,7 @@ If your computer has installed a version of node lower than 14, please switch to Clone the [WebGAL_Terre](https://github.com/OpenWebGAL/WebGAL_Terre) repository. -``` shell +``` bash git clone https://github.com/OpenWebGAL/WebGAL_Terre.git ``` @@ -102,7 +102,7 @@ git clone https://github.com/OpenWebGAL/WebGAL_Terre.git Install yarn (optional, recommended) -``` shell +``` bash npm i -g yarn ``` @@ -114,7 +114,7 @@ npm i -g yarn Install dependencies in the project root directory. - ```shell + ``` bash yarn ``` @@ -128,13 +128,13 @@ npm i -g yarn 2. Install dependencies - ``` shell + ``` bash yarn ``` 3. Package *terre2* - ``` shell + ``` bash yarn run build ``` @@ -142,7 +142,7 @@ npm i -g yarn 5. Add a *package.json* file in *dist*, content (note to fill in the relevant information): - ```json + ``` json { "name": "webgal-terre-2-win7-server", "version": "version number", @@ -170,7 +170,7 @@ npm i -g yarn 1. Install dependencies in the visual editor directory. - ``` shell + ``` bash npm i # or (yarn recommended) yarn diff --git a/src/getting-started.md b/src/getting-started.md index 91da18f11..3aab6f984 100644 --- a/src/getting-started.md +++ b/src/getting-started.md @@ -29,20 +29,20 @@ Windows 7 用户请参考 **[Windows 7 使用可视化编辑器开始制作的 ## 方法2:从源代码开始调试(适用于想要更高自定义程度的制作者) -``` shell +``` bash git clone https://github.com/OpenWebGAL/WebGAL.git ``` 安装并使用 yarn 安装依赖 -``` shell +``` bash npm install yarn -g yarn ``` WebGAL 使用 vite 作为打包与调试工具,你可以通过运行以下脚本启动开发服务器 -``` shell +``` bash yarn dev ``` @@ -54,7 +54,7 @@ yarn dev 如果你要打包,请使用 -``` shell +``` bash yarn build ``` diff --git a/src/ja/config.md b/src/ja/config.md index b1f4e5a63..96af802c2 100644 --- a/src/ja/config.md +++ b/src/ja/config.md @@ -34,7 +34,7 @@ Enable_Appreciation:true; 複数言語のスクリプトも用意している場合は、スクリプト内で現在の UI 言語を読み取り、対応するシーンファイルへ分岐してください。内部変数 `$userData.optionData.language` を利用できます。 -```webgal +``` webgal setVar:lang=($userData.optionData.language); changeScene:start_zh.txt -when=lang==0; changeScene:start_en.txt -when=lang==1; diff --git a/src/ja/developers/readme.md b/src/ja/developers/readme.md index a068798c1..e465cf2db 100644 --- a/src/ja/developers/readme.md +++ b/src/ja/developers/readme.md @@ -44,13 +44,13 @@ WebGAL は現在、パッケージマネージャーとして yarn を、モノ yarn がない場合は、次のコマンドを使用してインストールしてください。 -```shell +``` bash npm install yarn -g ``` 次に、プロジェクトのルートディレクトリで次のコマンドを実行します。 -```shell +``` bash yarn ``` @@ -69,13 +69,13 @@ yarn 次のスクリプトを実行して開発サーバーを起動できます。 -```shell +``` bash yarn dev ``` WebGAL をビルドする場合は、次のコマンドを使用します。 -```shell +``` bash yarn build ``` diff --git a/src/ja/developers/terre.md b/src/ja/developers/terre.md index 6124f40d4..607a3d73a 100644 --- a/src/ja/developers/terre.md +++ b/src/ja/developers/terre.md @@ -32,13 +32,13 @@ WebGAL Terre のリポジトリは [WebGAL Terre - GitHub](https://github.com/Op ### 依存関係のインストール -```bash +``` bash yarn ``` ### 開発サーバーの起動 -```bash +``` bash yarn dev ``` @@ -59,13 +59,13 @@ yarn dev 1. WebGAL エンジンリポジトリをクローンします(隣接ディレクトリにクローンすることをお勧めします。これにより、自動化スクリプトを使用できます) -``` +``` bash git clone https://github.com/OpenWebGAL/WebGAL.git ``` 2. **(Terre プロジェクトの隣接ディレクトリに WebGAL プロジェクトをクローンした場合、そうでない開発者は無視してください)** WebGAL エンジンリポジトリで自動化スクリプトを実行して、WebGAL を WebGAL Terre にビルドします -``` +``` bash sh release-to-terre.sh ``` @@ -75,7 +75,7 @@ sh release-to-terre.sh 2. WebGAL プロジェクトをビルドします(この手順は WebGAL エンジンリポジトリで実行します) -``` +``` bash yarn yarn build ``` @@ -84,7 +84,7 @@ yarn build **ここでは、Terre プロジェクトの隣接ディレクトリに WebGAL プロジェクトをクローンしていると想定しています。異なるディレクトリ構造を使用している場合は、それに応じて変更してください。** -``` +``` bash # Terre ディレクトリに移動します cd ../WebGAL_Terre/packages/terre2/assets/templates/WebGAL_Template || exit # 他のファイルを削除します @@ -122,7 +122,7 @@ WebGAL Terre は、TypeScript を使用したフルスタックプロジェク 次のコード例は、バックエンドインターフェースに必要な主要なアノテーションを示しています。 -```typescript +``` typescript @Post('createGame') @ApiOperation({ summary: 'Create a new game' }) @ApiResponse({ status: 200, description: 'Game creation result.' }) diff --git a/src/ja/getting-started.md b/src/ja/getting-started.md index 1db7933b8..3c1fcf80c 100644 --- a/src/ja/getting-started.md +++ b/src/ja/getting-started.md @@ -29,20 +29,20 @@ Windows 7ユーザーは**[Windows 7でビジュアルエディターを使用 ## 方法2:ソースコードからデバッグを開始する(より高いカスタマイズの程度を望む制作者向け) -``` shell +``` bash git clone https://github.com/OpenWebGAL/WebGAL.git ``` yarnをインストールして依存関係をインストールします -``` shell +``` bash npm install yarn -g yarn ``` WebGALはviteをバンドルとデバッグのツールとして使用しています。以下のスクリプトを実行して開発サーバーを起動することができます。 -``` shell +``` bash yarn dev ``` @@ -54,7 +54,7 @@ yarn dev バンドルする場合は、以下を使用してください。 -``` shell +``` bash yarn build ``` diff --git a/src/ja/live2D.md b/src/ja/live2D.md index be7847a52..a4d3cc85b 100644 --- a/src/ja/live2D.md +++ b/src/ja/live2D.md @@ -29,6 +29,6 @@ `-motion=motionName`または`-expression=expressionName`パラメータを使用して表情を切り替えることができます。例: -``` +``` webgal changeFigure:xxx.json -motion=angry -expression=angry01; ``` diff --git a/src/ja/script-reference/commands/applyStyle.md b/src/ja/script-reference/commands/applyStyle.md index e96e328f6..8e5013c0a 100644 --- a/src/ja/script-reference/commands/applyStyle.md +++ b/src/ja/script-reference/commands/applyStyle.md @@ -8,7 +8,7 @@ UI スタイルを変更します。 元のスタイル名と新しいスタイル名は `->` で接続します。複数の置換を同時に指定でき、各置換は英語のカンマ `,` で区切ります。 形式は、元スタイル名->新スタイル名,元スタイル名2->新スタイル名2,... です。 -```webgal +``` webgal ; UI テンプレート内に新しいスタイルがある前提で、キャラ名背景を赤に置き換える applyStyle:TextBox_ShowName_Background->TextBox_ShowName_Background_Red; キャラ名:これは一文です; @@ -18,7 +18,7 @@ applyStyle:TextBox_ShowName_Background->TextBox_ShowName_Background_Green,TextBo 元のスタイルがどの新しいスタイルに置き換えられていても、置換は常に元のスタイル名から指定します。 -```webgal +``` webgal applyStyle:元スタイル名->新スタイル名1; applyStyle:新スタイル名1->新スタイル名2; 誤り applyStyle:元スタイル名->新スタイル名2; @@ -35,7 +35,7 @@ applyStyle:元スタイル名->新スタイル名2; | `Choose_item` | クリック可能な選択肢 | | `Choose_item_disabled` | 条件を満たさずクリックできない選択肢 | -```webgal +``` webgal ; クリック可能な選択肢をテンプレートで定義した Choose_item_Red に置き換える applyStyle:Choose_item->Choose_item_Red; ``` diff --git a/src/ja/script-reference/commands/bgm.md b/src/ja/script-reference/commands/bgm.md index 17f52a431..bd608aa91 100644 --- a/src/ja/script-reference/commands/bgm.md +++ b/src/ja/script-reference/commands/bgm.md @@ -7,7 +7,7 @@ BGM の再生、切り替え、停止、パラメータ設定を行う 4 in 1 BGM のパスを指定します。ファイルパスが空、または `none` の場合は再生を停止します。 詳しくは[音声](../../webgal-script/audio.md)を参照してください。 -```webgal +``` webgal ; BGM がない場合、この文は BGM を再生します。 bgm:01.wav; ; すでに BGM がある場合、この文は BGM を切り替えます。 @@ -18,7 +18,7 @@ bgm:; BGM のパスが変わらない場合、BGM は中断されず、新しいパラメータだけが適用されます。 -```webgal +``` webgal bgm:morning.wav; ; BGM を中断せず音量を調整する bgm:morning.wav -volume=50; @@ -27,7 +27,7 @@ bgm:morning.wav -volume=50; ## パラメータ -```webgal +``` webgal bgm:01.wav -volume=100; bgm:01.wav -volume=50; 音量を調整 ``` @@ -40,7 +40,7 @@ bgm:01.wav -volume=50; 音量を調整 BGM のフェードイン時間です。 -```webgal +``` webgal bgm:01.wav -enter=1500; bgm:02.wav -enter=1500; ``` @@ -48,7 +48,7 @@ bgm:02.wav -enter=1500; ### unlockname このパラメータを省略した場合、または名前が空の場合、この音楽は収録されません。 -```webgal +``` webgal bgm:01.wav -unlockname=MyBgm01; ``` @@ -56,6 +56,6 @@ bgm:01.wav -unlockname=MyBgm01; `series` だけを指定しても収録は行われません。必ず `unlockname` も指定してください。 -```webgal +``` webgal bgm:01.wav -unlockname=MyBgm01 -series=MySeries01; ``` diff --git a/src/ja/script-reference/commands/callSteam.md b/src/ja/script-reference/commands/callSteam.md index 4ef0ff792..9acd9842f 100644 --- a/src/ja/script-reference/commands/callSteam.md +++ b/src/ja/script-reference/commands/callSteam.md @@ -10,7 +10,7 @@ Electron / Steam ブリッジを通じて Steam 実績を解除します。 `game/config.txt` に `Steam_AppID` を記入します。WebGAL は起動時に Steam 連携を初期化します。 -```text +``` text Steam_AppID:480; ``` @@ -27,13 +27,13 @@ Steam_AppID:480; 解除する Steam 実績 ID を指定します。Steam バックエンドで設定した実績 API 名と一致している必要があります。 -```webgal +``` webgal callSteam: -achievementId=ACH_WIN_ONE_GAME; ``` ## 例 -```webgal +``` webgal ; 実績を解除 callSteam: -achievementId=ACH_WIN_ONE_GAME; ``` diff --git a/src/ja/script-reference/commands/changeBg.md b/src/ja/script-reference/commands/changeBg.md index 61b0bb129..c4e019e71 100644 --- a/src/ja/script-reference/commands/changeBg.md +++ b/src/ja/script-reference/commands/changeBg.md @@ -7,7 +7,7 @@ 背景画像のパスを指定します。ファイルパスが空、または `none` の場合は背景が退場します。 詳しくは[背景と立ち絵](../../webgal-script/bg-and-figure.md)を参照してください。 -```webgal +``` webgal ; 背景が存在しない場合、この文は背景を登場させます。 changeBg:bg.png; ; すでに背景が存在する場合、この文は背景を置き換えます。 @@ -21,36 +21,36 @@ changeBg:none; ## パラメータ -```webgal +``` webgal changeBg:bg.png -transform={"position":{"x":-50,"y":-20},"rotation":0.1,"scale":{"x":1.2,"y":1.2},"brightness":0.5,"blur":10}; ``` -```webgal +``` webgal changeBg:bg.png -enter=enter-from-left; ``` -```webgal +``` webgal changeBg:bg.png -exit=exit-to-right; ``` デフォルトの登場アニメーションに適用されます。デフォルト値は 1500 です。 -```webgal +``` webgal changeBg:bg.png -duration=200; ``` デフォルトの登場アニメーションに適用されます。 -```webgal +``` webgal changeBg:bg.png -ease=easeOut; ``` ### unlockname このパラメータを省略した場合、または名前が空の場合、この画像は収録されません。 -```webgal +``` webgal changeBg:bg.png -unlockname=MyCg01; ``` @@ -58,7 +58,7 @@ changeBg:bg.png -unlockname=MyCg01; `series` だけを指定しても収録は行われません。必ず `unlockname` も指定してください。 -```webgal +``` webgal changeBg:bg.png -unlockname=MyCg01 -series=MySeries01; ``` @@ -69,7 +69,7 @@ changeBg:bg.png -unlockname=MyCg01 -series=MySeries01; 登場アニメーションの持続時間です。省略した場合は `duration` の値を使用します(デフォルト 1500)。 -```webgal +``` webgal changeBg:bg.png -enterDuration=500; ``` @@ -80,6 +80,6 @@ changeBg:bg.png -enterDuration=500; 退場アニメーションの持続時間です。省略した場合のデフォルト値は 1500 です。 -```webgal +``` webgal changeBg:bg.png -exitDuration=800; ``` diff --git a/src/ja/script-reference/commands/changeFigure.md b/src/ja/script-reference/commands/changeFigure.md index 003e9bb0b..85d3d8377 100644 --- a/src/ja/script-reference/commands/changeFigure.md +++ b/src/ja/script-reference/commands/changeFigure.md @@ -7,7 +7,7 @@ 立ち絵のパスを指定します。ファイルパスが空、または `none` の場合は立ち絵が退場します。 詳しくは[背景と立ち絵](../../webgal-script/bg-and-figure.md)を参照してください。 -```webgal +``` webgal ; 立ち絵が存在しない場合、この文は立ち絵を登場させます。 changeFigure:1/open_eyes.png; ; すでに立ち絵が存在する場合、この文は立ち絵を置き換えます。 @@ -18,7 +18,7 @@ changeFigure:none; 立ち絵のパスと `id` が同じままの場合、登場・退場アニメーションは発火せず、新しいパラメータが対象立ち絵に適用されます。 -```webgal +``` webgal ; Live2D 立ち絵を登場させる changeFigure:character_a/model.json -id=aaa; ; Live2D 立ち絵のモーションと表情を変更する @@ -31,7 +31,7 @@ changeFigure:character_a/model.json -id=aaa -motion=smile -expression=sad; Live2D または Spine ではない形式は、画像立ち絵として読み込まれます。 -```webgal +``` webgal changeFigure:1/open_eyes.png; ``` @@ -43,7 +43,7 @@ Live2D を使用するには準備が必要です。詳しくは [Live2Dにつ Live2D モデル(.json/.model3.json)のパスを指定すると、WebGAL は Live2D モデルを読み込みます。 -```webgal +``` webgal changeFigure:character_a/model.json; ``` @@ -55,42 +55,42 @@ Spine を使用するには準備が必要です。詳しくは [Spineについ Spine モデルが .skel 形式の場合は、そのファイルパスを直接指定できます。 -```webgal +``` webgal changeFigure:character_x/model.skel; ``` Spine モデルが .json 形式の場合は、Live2D モデルとして誤って読み込まれないように、パスの後ろで立ち絵タイプを Spine と指定する必要があります。 -```webgal +``` webgal changeFigure:character_x/model.json?type=spine; ``` ## パラメータ -```webgal +``` webgal changeFigure:1/open_eyes.png -transform={"position":{"x":-50,"y":-20},"rotation":0.1,"scale":{"x":1.2,"y":1.2},"brightness":0.5,"blur":10}; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -enter=enter-from-left; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -exit=exit-to-right; ``` デフォルトの登場アニメーションに適用されます。デフォルト値は 300 です。 -```webgal +``` webgal changeFigure:1/open_eyes.png -duration=200; ``` デフォルトの登場アニメーションに適用されます。 -```webgal +``` webgal changeFigure:1/open_eyes.png -ease=easeOut; ``` @@ -101,7 +101,7 @@ changeFigure:1/open_eyes.png -ease=easeOut; 登場アニメーションの持続時間です。省略した場合は `duration` の値を使用します(デフォルト 300)。 -```webgal +``` webgal changeFigure:1/open_eyes.png -enterDuration=200; ``` @@ -112,7 +112,7 @@ changeFigure:1/open_eyes.png -enterDuration=200; 退場アニメーションの持続時間です。省略した場合のデフォルト値は 450 です。 -```webgal +``` webgal changeFigure:1/open_eyes.png -exitDuration=300; ``` @@ -127,7 +127,7 @@ changeFigure:1/open_eyes.png -exitDuration=300; これらのパラメータは、立ち絵の登場時または置き換え時にのみ有効です。すでに場に出ている立ち絵の座標を変更する場合は、`setTransform`、`setAnimation`、`setTempAnimation` などのコマンドを使用してください。 ::: -```webgal +``` webgal changeFigure:1/open_eyes.png -left; changeFigure:1/open_eyes.png -right; ``` @@ -142,7 +142,7 @@ changeFigure:1/open_eyes.png -right; - `right` が `true` なら、デフォルト id は `fig-right` - `left` と `right` がどちらも `false` なら、デフォルト id は `fig-center` -```webgal +``` webgal ; 異なる id を指定すると、初期位置が同じでも立ち絵は互いに置き換わりません。 changeFigure:1/open_eyes.png -id=aaa; changeFigure:2/open_eyes.png -id=bbb; @@ -157,7 +157,7 @@ changeFigure:3/open_eyes.png -id=ccc -left; 立ち絵のレイヤーです。値が大きいほど上に表示されます。同じ値の場合、後から登場した立ち絵が上に表示されます。 省略した場合のデフォルト値は 0 です。 -```webgal +``` webgal ; 立ち絵 aaa は立ち絵 bbb より上に表示されます。 changeFigure:1/open_eyes.png -id=aaa -zIndex=2; changeFigure:2/open_eyes.png -id=bbb -zIndex=1; @@ -169,7 +169,7 @@ changeFigure:2/open_eyes.png -id=bbb -zIndex=1; 立ち絵のブレンドモードを設定します。立ち絵の登場時または置き換え時にのみ有効です。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -blendMode=add; ``` @@ -178,7 +178,7 @@ changeFigure:1/open_eyes.png -id=aaa -blendMode=add; ステートメント内容を空文字列に置き換えます。 -```webgal +``` webgal changeFigure:1/open_eyes.png -clear; changeFigure:1/open_eyes.png -none; ``` @@ -193,7 +193,7 @@ changeFigure:1/open_eyes.png -none; 画像立ち絵の口開き、半開き、口閉じ差分パスを指定します。 -```webgal +``` webgal changeFigure:1/open_eyes.png -mouthOpen=1/open_mouth.png; changeFigure:1/open_eyes.png -mouthHalfOpen=1/halfopen_mouth.png; changeFigure:1/open_eyes.png -mouthClose=1/closed_mouth.png; @@ -204,7 +204,7 @@ changeFigure:1/open_eyes.png -mouthClose=1/closed_mouth.png; 画像立ち絵の目開き、目閉じ差分パスを指定します。 -```webgal +``` webgal changeFigure:1/open_eyes.png -eyesOpen=1/open_eyes.png; changeFigure:1/open_eyes.png -eyesClose=1/closed_eyes.png; ``` @@ -214,7 +214,7 @@ changeFigure:1/open_eyes.png -eyesClose=1/closed_eyes.png; Live2D または Spine 立ち絵では、モーション名を指定し、対応するモーションアニメーションを再生します。 -```webgal +``` webgal changeFigure:character_a/model.json -motion=sad; changeFigure:character_a/model.json -motion=smile; ``` @@ -225,7 +225,7 @@ changeFigure:character_a/model.json -motion=smile; Spine 立ち絵では、スキン名を指定し、対応する skin に切り替えます。 Spine のアニメーションとスキンを同時に切り替える場合は、`motion` でアニメーションを、`skin` でスキンを指定します。 -```webgal +``` webgal changeFigure:character_x/model.json?type=spine -skin=default; changeFigure:character_x/model.json?type=spine -motion=anime_00_wait -skin=03_surprise; ``` @@ -235,7 +235,7 @@ changeFigure:character_x/model.json?type=spine -motion=anime_00_wait -skin=03_su Live2D 立ち絵では、表情名を指定して対応する表情に切り替えます。 -```webgal +``` webgal changeFigure:character_a/model.json -expression=smile; changeFigure:character_a/model.json -expression=sad; ``` @@ -251,7 +251,7 @@ x 軸は右方向が正、y 軸は下方向が正です。 このパラメータは、立ち絵の登場時または置き換え時にのみ有効です。 ::: -```webgal +``` webgal ; 左右に 300 ピクセル拡張 changeFigure:character_a/model.json -bounds=-300,0,300,0; ``` @@ -269,7 +269,7 @@ Live2D 立ち絵では、まばたきパラメータを制御する JSON 文字 - `"closedDuration"`: 数値、閉眼時間、単位ミリ秒、デフォルト値 50 - `"openingDuration"`: 数値、目を開く時間、単位ミリ秒、デフォルト値 150 -```webgal +``` webgal changeFigure:character_a/model.json -blink={"blinkInterval":5000,"blinkIntervalRandom":2000,"closingDuration":100,"closedDuration":50,"openingDuration":150}; ``` @@ -285,6 +285,6 @@ x 軸は右方向が正、y 軸は上方向が正です。 - `"y"`: 数値、注視点の y 座標、範囲 -1 から 1、デフォルト値 0 - `"instant"`: 真偽値、注視点へ即座に向くかどうか、デフォルト値 false -```webgal +``` webgal changeFigure:character_a/model.json -focus={"x":0.5,"y":0.2,"instant":false}; ``` diff --git a/src/ja/script-reference/commands/changeScene.md b/src/ja/script-reference/commands/changeScene.md index 353f01064..71fdf1f61 100644 --- a/src/ja/script-reference/commands/changeScene.md +++ b/src/ja/script-reference/commands/changeScene.md @@ -9,7 +9,7 @@ このコマンドが成功した場合、現在のシーン内で後続のコマンドは実行されません。 -```webgal +``` webgal キャラA:そろそろ出発しよう。; changeScene:chapter_01/part_02.txt; デバッグ:この文が見えた場合、シーン切り替えに失敗しています。; @@ -21,7 +21,7 @@ changeScene:chapter_01/part_02.txt; ::: - chapter_01/part_01.txt -```webgal +``` webgal changeBg:home/character_a/bedroom.png; changeFigure:main_character/character_a/thinking.png -next; キャラA:今日は彼女の家に行こう!; @@ -31,7 +31,7 @@ changeFigure:none -next; 立ち絵を手動で閉じる changeScene:chapter_01/part_02.txt; ``` - chapter_01/part_02.txt -```webgal +``` webgal changeBg:home/character_b/living_room.png; changeFigure:main_character/character_b/smile.png -next; キャラB:あなたでしたか。何か用ですか?; diff --git a/src/ja/script-reference/commands/choose.md b/src/ja/script-reference/commands/choose.md index f7e6cf44d..0c86cb115 100644 --- a/src/ja/script-reference/commands/choose.md +++ b/src/ja/script-reference/commands/choose.md @@ -11,7 +11,7 @@ - シーンファイル - 現在のシーン内のラベル -```webgal +``` webgal キャラA:今日はどこへ行こう?; choose:店へ行く:chapter_01/shop.txt|誰かの家:chapter_01/house_b.txt|家にいる:home; ; @@ -32,7 +32,7 @@ label:home; - `[条件式]`: 選択肢をクリック可能にするかどうかを制御します。 - `->`: 条件プレフィックスと実際の選択肢内容を区切ります。 -```webgal +``` webgal setVar:hasTicket=true; setVar:doorPower=1; choose:(hasTicket==true)->チケットを見せる:ticket|(doorPower>0)[doorPower>1]->力ずくで開ける:force|家に帰る:home; diff --git a/src/ja/script-reference/commands/getUserInput.md b/src/ja/script-reference/commands/getUserInput.md index 2e8dff570..a8710ffcd 100644 --- a/src/ja/script-reference/commands/getUserInput.md +++ b/src/ja/script-reference/commands/getUserInput.md @@ -6,7 +6,7 @@ 変数名を指定します。ユーザーが入力した値はこの変数に保存されます。 -```webgal +``` webgal キャラB:本当にありがとうございます。お名前を教えていただけますか?; getUserInput:player_name -title=あなたの名前 -buttonText=確認 -defaultValue=Bob; キャラB:{player_name}、覚えておきます。; @@ -21,7 +21,7 @@ getUserInput:player_name -title=あなたの名前 -buttonText=確認 -defaultVa 入力ボックスのタイトルを設定します。 -```webgal +``` webgal getUserInput:player_name -title=あなたの名前; ``` @@ -30,7 +30,7 @@ getUserInput:player_name -title=あなたの名前; 確認ボタンのテキストを設定します。 -```webgal +``` webgal getUserInput:player_name -buttonText=確認; ``` @@ -39,7 +39,7 @@ getUserInput:player_name -buttonText=確認; 入力ボックスのデフォルト値を設定します。 -```webgal +``` webgal getUserInput:player_name -defaultValue=Bob; ``` @@ -50,7 +50,7 @@ getUserInput:player_name -defaultValue=Bob; 入力検証に使う正規表現ルールを設定します。 -```webgal +``` webgal getUserInput:player_name -rule=^.{1,2}$; ``` @@ -61,7 +61,7 @@ getUserInput:player_name -rule=^.{1,2}$; 詳しくは [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp#flags) を参照してください。 -```webgal +``` webgal getUserInput:player_name -rule=^.{1,2}$ -ruleFlag=g; ``` @@ -70,7 +70,7 @@ getUserInput:player_name -rule=^.{1,2}$ -ruleFlag=g; 検証に失敗したときに表示するエラーポップアップの文言を設定します。`$0` でユーザー入力を取得できます。 -```webgal +``` webgal getUserInput:player_name -rule=^.{1,2}$ -ruleText=$0は1-2文字にしてください; ``` @@ -81,6 +81,6 @@ getUserInput:player_name -rule=^.{1,2}$ -ruleText=$0は1-2文字にしてくだ デフォルトは `OK` です。 -```webgal +``` webgal getUserInput:player_name -rule=^.{1,2}$ -ruleText=$0は1-2文字にしてください -ruleButtonText=OK; ``` diff --git a/src/ja/script-reference/commands/global.md b/src/ja/script-reference/commands/global.md index ecabdd0ee..e9c66601f 100644 --- a/src/ja/script-reference/commands/global.md +++ b/src/ja/script-reference/commands/global.md @@ -9,7 +9,7 @@ 値が `true` の場合、現在のステートメントを実行しながら、`next` が `false` のステートメントに到達するまで後続のステートメントも同時に実行します。 -```webgal +``` webgal label:loop; ; changeBg:bg.png -next; @@ -44,7 +44,7 @@ jumpLabel:loop; 条件式を記述します。条件が `true` の場合のみ、現在のステートメントを実行します。 -```webgal +``` webgal label:start; ; setVar:coin=10; @@ -68,7 +68,7 @@ jumpLabel:start; このステートメントの演出が終了した後、プレイヤーがオート再生を有効にしていなくても次のステートメントを自動的に実行します。 -```webgal +``` webgal changeBg:bg.png -next; changeFigure:1/open_eyes.png -transform={"position":{"x":-500}} -id=aaa -next; changeFigure:2/open_eyes.png -transform={"position":{"x":500}} -id=bbb; diff --git a/src/ja/script-reference/commands/intro.md b/src/ja/script-reference/commands/intro.md index b1c66680d..8a99d73cb 100644 --- a/src/ja/script-reference/commands/intro.md +++ b/src/ja/script-reference/commands/intro.md @@ -7,7 +7,7 @@ 画面全体に表示するテキストを指定します。`|` を使って複数行に分割できます。 詳しくは[黒画面テキスト](../../webgal-script/dialogue.md#黒画面テキスト)を参照してください。 -```webgal +``` webgal intro:これは1行目のテキストです|これは2行目のテキストです|これは3行目のテキストです; ``` @@ -23,7 +23,7 @@ intro:これは1行目のテキストです|これは2行目のテキストで - `medium` - 中サイズフォント - `large` - 大きいフォント -```webgal +``` webgal intro:これは文章です -fontSize=large; ``` @@ -33,7 +33,7 @@ intro:これは文章です -fontSize=large; フォント色を設定します。`rgba(0,0,0,1)` は黒、`rgba(255,255,255,1)` は白を表します。透明度の範囲は 0 から 1 です。 -```webgal +``` webgal intro:これは文章です -fontColor=rgba(48, 135, 206, 1); ``` @@ -43,7 +43,7 @@ intro:これは文章です -fontColor=rgba(48, 135, 206, 1); 背景色を設定します。`rgba(0,0,0,1)` は黒、`rgba(255,255,255,1)` は白を表します。透明度の範囲は 0 から 1 です。 -```webgal +``` webgal intro:これは文章です -backgroundColor=rgba(22,22,22,0.8); ``` @@ -52,7 +52,7 @@ intro:これは文章です -backgroundColor=rgba(22,22,22,0.8); 全画面テキストの背景画像パスを指定します。このパラメータを設定しない場合は `backgroundColor` が使用されます。 -```webgal +``` webgal intro:これは文章です -backgroundImage=bg.png; ``` @@ -66,7 +66,7 @@ intro:これは文章です -backgroundImage=bg.png; - `pixelateEffect`: ぼかし - `revealAnimation`: 巻物のように展開 -```webgal +``` webgal intro:これは1行目のテキストです|これは2行目のテキストです|これは3行目のテキストです -animation=slideIn; ``` @@ -78,7 +78,7 @@ intro:これは1行目のテキストです|これは2行目のテキストで 各行の表示遅延時間を設定します。 -```webgal +``` webgal intro:これは1行目のテキストです|これは2行目のテキストです|これは3行目のテキストです -delayTime=1000; ``` @@ -88,7 +88,7 @@ intro:これは1行目のテキストです|これは2行目のテキストで 値が `true` の場合、すべてのテキスト表示後、プレイヤーが画面をクリックするまで次の文を自動実行しません。 値が `false` の場合、プレイヤーがオート再生を有効にしていなくても、すべてのテキスト表示後に次の文を自動実行します。 -```webgal +``` webgal intro:これは文章です -hold; ``` @@ -98,6 +98,6 @@ intro:これは文章です -hold; 値が `true` の場合、次の行を表示するにはユーザーが手動で画面をクリックする必要があります。また `hold` を `true` にし、`delayTime` を無視します。 値が `false` の場合、次の行を自動表示します。 -```webgal +``` webgal intro:これは文章です -userForward; ``` diff --git a/src/ja/script-reference/commands/jumpLabel.md b/src/ja/script-reference/commands/jumpLabel.md index ab174b2fc..c56667dc3 100644 --- a/src/ja/script-reference/commands/jumpLabel.md +++ b/src/ja/script-reference/commands/jumpLabel.md @@ -7,7 +7,7 @@ ジャンプ先のラベル名を指定します。 -```webgal +``` webgal label:think; ; キャラA:彼女が好きだったのはたしか……; @@ -25,7 +25,7 @@ label:correct; `jumpLabel` は共通パラメータ `-when` と組み合わせて使用できます。条件を満たさない場合、この文はスキップされ、物語は次の文を実行します。 -```webgal +``` webgal setVar:score=2; jumpLabel:scoreHigh -when=score>1; キャラA:点数が足りない場合はここが表示されます。; diff --git a/src/ja/script-reference/commands/label.md b/src/ja/script-reference/commands/label.md index 94565cd93..947752c40 100644 --- a/src/ja/script-reference/commands/label.md +++ b/src/ja/script-reference/commands/label.md @@ -7,7 +7,7 @@ ラベル名を指定します。このコマンド自体は何も実行しませんが、`choose` や `jumpLabel` と組み合わせて使用できます。 -```webgal +``` webgal label:myLabel; ``` diff --git a/src/ja/script-reference/commands/playEffect.md b/src/ja/script-reference/commands/playEffect.md index 19777cc0c..c5c7a4459 100644 --- a/src/ja/script-reference/commands/playEffect.md +++ b/src/ja/script-reference/commands/playEffect.md @@ -7,7 +7,7 @@ 効果音ファイルのパスを指定します。ファイルパスが空、または `none` の場合は効果音の再生を停止します。 詳しくは[効果音を再生する](../../webgal-script/audio.md#効果音を再生する)を参照してください。 -```webgal +``` webgal ; 効果音が存在しない場合、この文は効果音を再生します。 playEffect:rain.wav; ; すでに効果音が存在する場合、この文は効果音を置き換えます。 @@ -24,7 +24,7 @@ playEffect:none; 効果音に id を設定すると、効果音をループ再生できます。 異なる id の効果音と id なしの効果音は重ねて再生できます。 -```webgal +``` webgal ; 足音をループ再生 playEffect:footsteps.wav -id=footsteps; ; 雨音をループ再生 @@ -40,6 +40,6 @@ playEffect:thunder.wav; 効果音の音量パーセンテージを設定します。0 はミュート、100 は最大音量です。 -```webgal +``` webgal playEffect:rain.wav -id=rain -volume=60; ``` diff --git a/src/ja/script-reference/commands/say.md b/src/ja/script-reference/commands/say.md index 8ab827ef3..2ad357f4a 100644 --- a/src/ja/script-reference/commands/say.md +++ b/src/ja/script-reference/commands/say.md @@ -7,7 +7,7 @@ 会話ボックスに表示する一文を指定します。`|` を使って複数行に分割できます。 詳しくは[基本](../../webgal-script/base.md)と[会話](../../webgal-script/dialogue.md)を参照してください。 -```webgal +``` webgal 話者:こんにちは、世界!; ``` @@ -23,7 +23,7 @@ 値が `true` の場合、すべての文字を表示した直後に次のコマンドを実行します。プレイヤーがオート再生を有効にしていなくても実行されます。 -```webgal +``` webgal changeFigure:1/open_eyes.png -next; キャラA:いったい何をしているんだ…… -notend; changeFigure:1/closed_eyes.png -next; @@ -35,7 +35,7 @@ changeFigure:1/closed_eyes.png -next; 値が `true` の場合、会話ボックス内の既存テキストを消さず、その後ろに新しいテキストを続けます。 -```webgal +``` webgal changeFigure:1/open_eyes.png -next; キャラA:いったい何をしているんだ…… -notend; changeFigure:1/closed_eyes.png -next; @@ -48,7 +48,7 @@ changeFigure:1/closed_eyes.png -next; 話者名を指定します。この名前は会話ボックスの話者欄に表示されます。 このパラメータを省略した場合、会話ボックスは前回の話者名を引き続き使用します。 -```webgal +``` webgal say:こんにちは、世界! -speaker=キャラA; ; speaker パラメータがない場合、キャラ名は前回の値を引き続き使用します say:世界、こんにちは!; @@ -58,7 +58,7 @@ WebGAL は話者の簡略記法に対応しています。 行頭から最初の英語コロンまでの文字列がコマンドではない場合、それを話者名として扱います。 英語コロンがなく話者名が見つからない場合、前回の話者名を引き続き使用します。 -```webgal +``` webgal キャラA:こんにちは、世界!; ; 話者は引き続きキャラA 世界、こんにちは!; @@ -69,7 +69,7 @@ WebGAL は話者の簡略記法に対応しています。 値が `true` の場合、話者を消去します。このとき会話ボックスの話者欄は表示されません。通常はナレーションに使用します。 -```webgal +``` webgal say:これは一文です。 -speaker=キャラA; say:これはナレーションです。 -clear; say:これは一文です。 -speaker=キャラB; @@ -77,7 +77,7 @@ say:これは一文です。 -speaker=キャラB; WebGAL はナレーションの簡略記法にも対応しています。最初の英語コロンの前に文字がない場合、その文はナレーションとして扱われます。 -```webgal +``` webgal キャラA:これは一文です。; :これはナレーションです。; キャラB:これは一文です。; @@ -88,13 +88,13 @@ WebGAL はナレーションの簡略記法にも対応しています。最初 発話時に再生する音声ファイルのパスを指定します。 -```webgal +``` webgal キャラA:こんにちは、世界! -vocal=hello_world.wav; ``` WebGAL は音声ファイルの簡略記法に対応しています。 -```webgal +``` webgal キャラA:こんにちは、世界! -hello_world.wav; ``` @@ -109,7 +109,7 @@ WebGAL は音声ファイルの簡略記法に対応しています。 この値を設定すると、再度設定されるまで後続の会話にも引き継がれます。 -```webgal +``` webgal キャラA:こんにちは、世界! -fontSize=small; キャラA:こんにちは、世界!; 引き続き小さいフォント キャラA:こんにちは、世界! -fontSize=large; @@ -121,7 +121,7 @@ WebGAL は音声ファイルの簡略記法に対応しています。 値が `true` の場合、WebGAL は左、右、中央の立ち絵の口パクを駆動しようとします。 -```webgal +``` webgal キャラA:こんにちは、世界! -left; キャラA:こんにちは、世界! -right; キャラA:こんにちは、世界! -center; @@ -132,7 +132,7 @@ WebGAL は音声ファイルの簡略記法に対応しています。 立ち絵の id を指定します。WebGAL は対応する id の立ち絵の口パクを駆動しようとします。 -```webgal +``` webgal キャラA:こんにちは、世界! -figureId=aaa; ``` diff --git a/src/ja/script-reference/commands/setAnimation.md b/src/ja/script-reference/commands/setAnimation.md index c1819bee9..9919beb03 100644 --- a/src/ja/script-reference/commands/setAnimation.md +++ b/src/ja/script-reference/commands/setAnimation.md @@ -12,26 +12,26 @@ 単段アニメーションだけを設定したい場合は、[setTransform](setTransform.md) コマンドを使用してください。 ::: -```webgal +``` webgal setAnimation:shake -target=aaa; ``` ## パラメータ -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setAnimation:shake -target=aaa; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setAnimation:shake -target=aaa -writeDefault; ``` -```webgal +``` webgal ; とても長いアニメーションだと仮定 setAnimation:shake -target=aaa -keep -next; キャラA: 1行目; diff --git a/src/ja/script-reference/commands/setTempAnimation.md b/src/ja/script-reference/commands/setTempAnimation.md index b91897f79..177a001e1 100644 --- a/src/ja/script-reference/commands/setTempAnimation.md +++ b/src/ja/script-reference/commands/setTempAnimation.md @@ -12,7 +12,7 @@ 単段アニメーションだけを設定したい場合は、[setTransform](setTransform.md) コマンドを使用してください。 ::: -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; ; 閃光弾アニメーション setTempAnimation:[{"duration":0},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":200},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":2500}] -target=aaa; @@ -21,19 +21,19 @@ setTempAnimation:[{"duration":0},{"brightness":2,"contrast":0,"duration":200,"ea ## パラメータ -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"duration":0},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":200},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":2500}] -target=aaa; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"duration":0},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":200},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":2500}] -target=aaa -writeDefault; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"duration":0},{"scale":{"x":2,"y":2},"duration":10000}] -target=aaa -keep -next; キャラA: 1行目; diff --git a/src/ja/script-reference/commands/setTextbox.md b/src/ja/script-reference/commands/setTextbox.md index 374dd1b43..1d6520ce2 100644 --- a/src/ja/script-reference/commands/setTextbox.md +++ b/src/ja/script-reference/commands/setTextbox.md @@ -15,7 +15,7 @@ - 発話内容とキャラクター名がどちらも空 - __すべての UI を非表示__ が有効 -```webgal +``` webgal キャラA:ある場所へ連れていくよ。; setTextbox:hide; changeBg:shop.png; diff --git a/src/ja/script-reference/commands/setTransform.md b/src/ja/script-reference/commands/setTransform.md index 4e148ea32..5fbe4d4ff 100644 --- a/src/ja/script-reference/commands/setTransform.md +++ b/src/ja/script-reference/commands/setTransform.md @@ -10,7 +10,7 @@ このコマンドは 1 つのアニメーション片だけを生成します。多段アニメーションを設定する必要がある場合は、[setAnimation](setAnimation.md) または [setTempAnimation](setTempAnimation.md) コマンドを使用してください。 ::: -```webgal +``` webgal changeFigure:character_a/normal.png -id=aaa; ; 左へ移動 setTransform:{"position":{"x":-500},"saturation":0.8} -target=aaa -duration=500; @@ -21,31 +21,31 @@ setTransform:{"brightness":0.5,"contrast":1.2} -target=aaa -duration=500; ## パラメータ -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTransform:{"brightness":0.5} -target=aaa -duration=500; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTransform:{"brightness":0.5} -target=aaa -duration=500; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTransform:{"brightness":0.5} -target=aaa -duration=500 -ease=linear; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTransform:{"brightness":0.5} -target=aaa -duration=500 -writeDefault; ``` -```webgal +``` webgal ; とても長いアニメーションだと仮定 setTransform:{"scale":{"x":2,"y":2}} -target=aaa -duration=10000 -keep -next; キャラA: 1行目; diff --git a/src/ja/script-reference/commands/setVar.md b/src/ja/script-reference/commands/setVar.md index 2fc01294e..8e185c863 100644 --- a/src/ja/script-reference/commands/setVar.md +++ b/src/ja/script-reference/commands/setVar.md @@ -14,7 +14,7 @@ WebGAL は認識できない値の型を文字列に変換しようとします。 -```webgal +``` webgal setVar:char_b_fav=15; キャラ B の初期好感度 ; キャラB:ねえねえ、今日の私どこが違うかわかる?; @@ -56,7 +56,7 @@ changeScene:chapter_02/part_01.txt; 値が `true` の場合、長期(グローバル)変数を設定します。長期変数はユーザーが全データを削除しない限り、ゲーム全体で有効です。 値が `false` の場合、通常変数を設定します。通常変数は現在のシーン内でのみ有効で、セーブ時に保存され、ロード時に復元されます。 -```webgal +``` webgal ; 新規ゲーム開始時だと仮定 ; すでに周回プレイなら、周回専用の物語へ直接ジャンプする jumpLabel:another_life -when=multiple_playthroughs; diff --git a/src/ja/script-reference/others/animation-reference.md b/src/ja/script-reference/others/animation-reference.md index ebb96c55c..8cf78cb5e 100644 --- a/src/ja/script-reference/others/animation-reference.md +++ b/src/ja/script-reference/others/animation-reference.md @@ -4,7 +4,7 @@ WebGAL は連続した[変換・エフェクト](../others/transform-reference.m 変換・エフェクトオブジェクトの例: -```json +``` json { "position": { "x": -500, @@ -17,7 +17,7 @@ WebGAL は連続した[変換・エフェクト](../others/transform-reference.m アニメーション片オブジェクトは、変換・エフェクトオブジェクトに持続時間などの追加属性を持たせたものです。 -```json +``` json { "position": { "x": -500, @@ -32,7 +32,7 @@ WebGAL は連続した[変換・エフェクト](../others/transform-reference.m 複数のアニメーション片オブジェクトで 1 つのアニメーションを構成できます。 -```json +``` json [ { "duration": 0 @@ -61,7 +61,7 @@ WebGAL は連続した[変換・エフェクト](../others/transform-reference.m ここで継承される「既存値」とは、アニメーション実行前の対象オブジェクトの変換・エフェクトスナップショットであり、前のアニメーション片の終了状態ではありません。 ::: -```webgal +``` webgal ; 立ち絵オブジェクトの初期座標は (-500,0) changeFigure:character_a/normal.png -id=aaa -transform={"position":{"x":-500,"y":0}}; ; 多段アニメーションの座標は順に: @@ -72,7 +72,7 @@ setTempAnimation:[{"duration":0},{"position":{"x":500},"duration":500},{"positio アニメーション内の最初の片は開始状態です。通常は duration を 0 に設定します。0 より大きくしてもアニメーション効果は発生しません。 最初の片にも変換・エフェクト属性を設定でき、その場合アニメーション開始時に指定状態へ直接ジャンプします。 -```webgal +``` webgal ; 立ち絵オブジェクトの初期座標は (0,0) changeFigure:character_a/normal.png -id=aaa; ; 左から右へ移動し、アニメーション開始時に直接左側へジャンプします @@ -88,14 +88,14 @@ setTempAnimation:[{"position":{"x":-500},"duration":0},{"position":{"x":500},"du 各アニメーション片の持続時間です。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"position":{"x":-500},"duration":0},{"position":{"x":500},"duration":1000}] -target=aaa; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"position":{"x":-500},"duration":0},{"position":{"x":500},"duration":1000,"ease":"bounceOut"}] -target=aaa; ``` diff --git a/src/ja/script-reference/others/transform-reference.md b/src/ja/script-reference/others/transform-reference.md index 0a4c0b402..8d974c602 100644 --- a/src/ja/script-reference/others/transform-reference.md +++ b/src/ja/script-reference/others/transform-reference.md @@ -2,13 +2,13 @@ `transform` はステージオブジェクトの変換・エフェクト属性で、位置、回転、拡大縮小、各種フィルター属性を含みます。形式は次の例のようになります。 -```json +``` json {"position":{"x":0,"y":0},"rotation":0,"scale":{"x":1,"y":1},"alpha":1,"blur":0,"colorRed":255,"colorGreen":255,"colorBlue":255} ``` 通常、すべての属性を完全に書く必要はありません。変更したい属性だけを書けば、未変更の属性は状況に応じて既存値を継承するか、デフォルト値を使用します。 -```webgal +``` webgal setTransform:{"position":{"x":100},"rotation":45} -target=aaa -duration=500; ; この文は既存の変換・エフェクトを継承し、その上でぼかしフィルターの値を変更します setTransform:{"blur":20} -target=aaa -duration=500; @@ -18,7 +18,7 @@ setTransform:{"saturation":0} -target=aaa -duration=500 -writeDefault; フィルター属性については、そのフィルターのすべての値がデフォルト値になったときだけ、フィルターが完全に無効になります。そうでない場合、フィルターはオブジェクトが退場するまで存在し続け、不要なパフォーマンスコストにつながる可能性があります。そのため、必要に応じて関連属性を明示的にデフォルト値へ戻し、フィルターを無効化することを推奨します。 -```webgal +``` webgal changeBg:bg.png -transform={"brightness":0.5,"blur":10} -next; changeFigure:1/open_eyes.png -id=aaa; ; @@ -53,7 +53,7 @@ setTransform:{"bloomBlur":0,"bloomThreshold":0} -target=aaa -duration=500; 位置です。x と y 属性を変更すると、ステージ内のオブジェクト座標を変更できます。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"position":{"x":500,"y":-50}}; setTransform:{"position":{"x":-200,"y":50}} -target=aaa -duration=500; ``` @@ -64,7 +64,7 @@ setTransform:{"position":{"x":-200,"y":50}} -target=aaa -duration=500; 回転です。オブジェクトの回転ラジアンを変更します。時計回りが正方向です。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"rotation":-3.14}; setTransform:{"rotation":1.57} -target=aaa -duration=500; ``` @@ -74,7 +74,7 @@ setTransform:{"rotation":1.57} -target=aaa -duration=500; 拡大縮小です。x と y 属性を変更すると、オブジェクトの拡大率を変更できます。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"scale":{"x":0.5,"y":0.5}}; setTransform:{"scale":{"x":2,"y":2}} -target=aaa -duration=500; ``` @@ -107,7 +107,7 @@ setTransform:{"scale":{"x":2,"y":2}} -target=aaa -duration=500; 色調の赤、緑、青成分です。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"brightness":0.3,"colorRed":128}; setTransform:{"contrast":2,"colorBlue":64} -target=aaa -duration=500; ``` @@ -138,7 +138,7 @@ setTransform:{"contrast":2,"colorBlue":64} -target=aaa -duration=500; ブルームのしきい値です。値を上げると、画像内の明るい部分だけにブルーム効果が発生します。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"bloom":1,"bloomBlur":10,"bloomThreshold":0}; setTransform:{"bloom":1,"bloomBlur":10,"bloomThreshold":0.8} -target=aaa -duration=500; ``` diff --git a/src/ja/spine.md b/src/ja/spine.md index 623353d5f..23e57322a 100644 --- a/src/ja/spine.md +++ b/src/ja/spine.md @@ -30,7 +30,7 @@ SPINE RUNTIMESは、ESOTERIC SOFTWARE LLCによって「現状のまま」提供 2. `package/webgal`パッケージでyarnを使用してpixi-spineをインストールする -``` +``` bash cd package/webgal yarn add pixi-spine@3.1.2 ``` @@ -39,7 +39,7 @@ yarn add pixi-spine@3.1.2 以下のコメントアウトされた行(約30行目から)のコメントを外します。 -``` +``` typescript // pixiSpineLoading = import('pixi-spine') // .then((module) => { // spineLoader = new PIXI.Loader(); @@ -63,23 +63,23 @@ yarn add pixi-spine@3.1.2 例: ``` -game/ - figure/ - exampleSpine/ - data.json - atlas.atlas - skeleton.skel +game +└── figure + └── exampleSpine + ├── data.json + ├── atlas.atlas + └── skeleton.skel ``` JSON形式のSpine立ち絵を使用している場合は、エンジンがSpineタイプとして認識できるように、以下のようなスクリプトを使用してタイプを渡す必要があります。 -``` +``` webgal changeFigure:exampleSpine/data.json?type=spine; ``` Spineのアニメーションを切り替える場合は `motion` 引数を使います。Spineのskinも切り替えたい場合は、追加で `skin` 引数を指定します。 -``` +``` webgal changeFigure:exampleSpine/data.json?type=spine -motion=anime_00_wait; changeFigure:exampleSpine/data.json?type=spine -skin=default; changeFigure:exampleSpine/data.json?type=spine -motion=anime_03_surprise -skin=03_surprise; diff --git a/src/ja/tech/readme.md b/src/ja/tech/readme.md index 3fae11643..f57191528 100644 --- a/src/ja/tech/readme.md +++ b/src/ja/tech/readme.md @@ -20,7 +20,7 @@ WebGAL シーンファイルは主に改行によってスクリプトを区別 WebGAL のスクリプトは一般に次の形式です。 -``` +``` webgal command:content -arg1 -arg2 ......;comment ``` @@ -30,7 +30,7 @@ command:content -arg1 -arg2 ......;comment WebGAL の会話は一般的に次のように記述されます。 -``` +``` webgal 森川由绮:胸につかえていることを、时は解决してくれない。忘却のラベルを贴るだけで -voice_1.ogg; ``` @@ -38,13 +38,13 @@ WebGAL の会話は一般的に次のように記述されます。 したがって、この会話の真の表現は次のようになります。 -``` +``` webgal say:胸につかえていることを、时は解决してくれない。忘却のラベルを贴るだけで -speaker=森川由绮 vocal=voice_1.ogg; ``` それ以外に、会話が 1 人のキャラクターによって発せられる場合、会話の相手が変わるまでは、キャラクター名を省略することもできます。 -``` +``` webgal 森川由绮:胸につかえていることを; 时は解决してくれない; 忘却のラベルを贴るだけで; diff --git a/src/ja/webgal-script/animation.md b/src/ja/webgal-script/animation.md index a164f0954..1be877973 100644 --- a/src/ja/webgal-script/animation.md +++ b/src/ja/webgal-script/animation.md @@ -6,7 +6,7 @@ **例:** -``` ws +``` webgal ; // 中央の立ち絵に下から入ってくるアニメーションを設定し、次の行に移動します setAnimation:enter-from-bottom -target=fig-center -next; ``` @@ -125,7 +125,7 @@ setAnimation:enter-from-bottom -target=fig-center -next; その後、スクリプトで呼び出すことができます。 -``` ws +``` webgal setAnimation:enter-from-left -target=fig-left -next; ``` @@ -168,7 +168,7 @@ setAnimation:enter-from-left -target=fig-left -next; WebGAL のデフォルトのフェードイン・フェードアウトの登場・退場エフェクトを上書きして、独自のエフェクトに置き換えることもできます。例えば、以下のようにします。 -``` +``` webgal setTransition: -target=fig-center -enter=enter-from-bottom -exit=exit; ``` @@ -202,13 +202,13 @@ WebGAL は差分画像を使って、画像立ち絵の口パク同期アニメ **1. 差分を登録して立ち絵を登場させる** -```webgal +``` webgal changeFigure:1/normal.png -id=charA -mouthOpen=1/mouth_open.png -mouthHalfOpen=1/mouth_half.png -mouthClose=1/normal.png; ``` **2. 音声を再生して口パクを駆動する** -```webgal +``` webgal ; id で自由立ち絵を駆動する キャラA:こんにちは、世界! -vocal=charA_hello.wav -figureId=charA; ``` @@ -217,7 +217,7 @@ changeFigure:1/normal.png -id=charA -mouthOpen=1/mouth_open.png -mouthHalfOpen=1 ### 位置立ち絵の例 -```webgal +``` webgal ; 中央立ち絵を登場させ、差分を登録する changeFigure:1/normal.png -mouthOpen=1/mouth_open.png -mouthHalfOpen=1/mouth_half.png -mouthClose=1/normal.png; diff --git a/src/ja/webgal-script/audio.md b/src/ja/webgal-script/audio.md index 211bba224..6459fe0d7 100644 --- a/src/ja/webgal-script/audio.md +++ b/src/ja/webgal-script/audio.md @@ -4,25 +4,25 @@ BGMを再生する方法はとても簡単で、BGMを`bgm`フォルダに配置して、`bgm`命令を使ってBGMを再生するだけです。 -``` ws +``` webgal bgm:夏影.mp3; ``` BGMには`-volume`パラメータを設定して、音量を調整することができます。 -``` ws +``` webgal bgm:夏影.mp3 -volume=30; ``` また、`-enter`パラメータを使って、フェードイン再生することができます。 -``` ws +``` webgal bgm:夏影.mp3 -enter=3000; ``` 最後に、以下の文を使って、BGMをフェードアウトすることができます。 -``` ws +``` webgal bgm:none -enter=3000; ``` @@ -36,20 +36,20 @@ bgm:none -enter=3000; ご存知の通り、ビジュアルノベルは優れた声優陣が演じることで、最も魅力的なものになります。音声ファイルを`vocal`フォルダに入れて、会話スクリプトに`-音声ファイル名`パラメータを追加すると、音声を再生することができます。構文の例を以下に示します。 -``` ws +``` webgal 比企谷八幡:今来たばかりだ -V3.ogg; ``` 連続会話の場合も、音声の導入方法は同じです。 -``` ws +``` webgal 雪ノ下雪乃:随分早いですね -V1.ogg; 待たせちゃった? -V2.ogg; ``` 同時に`-volume`パラメータを設定して、音量を調整することができます。 -``` ws +``` webgal 比企谷八幡:今来たばかりだ -V3.ogg -volume=30; ``` @@ -62,13 +62,13 @@ bgm:none -enter=3000; 音声ファイルを`vocal`フォルダに入れた後、`playEffect`命令を使って効果音を再生することができます^_^ -``` ws +``` webgal playEffect:xxx.mp3; ``` 効果音には`-volume`パラメータを設定して、音量を調整することができます。 -``` ws +``` webgal playEffect:xxx.mp3 -volume=30; ``` @@ -81,7 +81,7 @@ playEffect:xxx.mp3 -volume=30; 効果音に`id`を付与すると、自動的に効果音のループ再生が有効になり、同じ`id`を使用して停止することができます。 -``` ws +``` webgal playEffect:xxx.mp3 -id=xxx; playEffect:none -id=xxx; // このループ効果音を停止する ``` @@ -90,7 +90,7 @@ playEffect:none -id=xxx; // このループ効果音を停止する `unlockBgm`を使って、鑑賞できる音声のロックを解除します。 -``` ws +``` webgal ; // bgmのロックを解除して名前を付ける unlockBgm:s_Title.mp3 -name=Smiling-Swinging!!!; ``` \ No newline at end of file diff --git a/src/ja/webgal-script/base.md b/src/ja/webgal-script/base.md index 3dfff75c6..247ed77f8 100644 --- a/src/ja/webgal-script/base.md +++ b/src/ja/webgal-script/base.md @@ -8,7 +8,7 @@ WebGALスクリプトは、各行のセミコロンより前の内容のみを解析します。したがって、セミコロンより後の内容はコメントとみなされます。 -``` ws +``` webgal WebGAL:こんにちは!; セミコロンより後の内容はコメントとみなされます ; セミコロンを直接入力して、1行コメントを書くこともできます ``` @@ -27,7 +27,7 @@ WebGAL スクリプトでは、英語のコロン `:` でコマンドと内容 | `;` | `\;` | | `|` | `\|` | -```ws +``` webgal intro:表示されます\: \:\,\.\; 見てください -hold; WebGAL:表示されます\: \:\,\.\; 見てください; choose:表示されます\: \:\,\.\; 見てください:nextLabel; @@ -45,7 +45,7 @@ choose:表示されます\: \:\,\.\; 見てください:nextLabel; 例: -``` ws +``` webgal changeBg:testBG03.jpg -next; // 次の文をすぐに実行します ``` @@ -60,7 +60,7 @@ changeBg:testBG03.jpg -next; // 次の文をすぐに実行します 例を以下に示します。これは、会話中に立ち絵を切り替えるデモです。 -``` ws +``` webgal WebGAL:テスト文挿入演出!今すぐ立ち絵を切り替えます...... -notend; changeFigure:k1.png -next; 立ち絵を切り替えます!今すぐ表情を切り替えます...... -notend -concat; @@ -70,7 +70,7 @@ changeFigure:k2.png -next; `-concat` パラメータのみを使用して、次の文を前の文の会話に接続することもできます。`-notend` パラメータは、会話のフェードアウト後に次の文に移動するためです。 -``` ws +``` webgal これは最初の文です......; ユーザーがマウスをクリックすると、2 番目の文に移ります -concat; ``` diff --git a/src/ja/webgal-script/bg-and-figure.md b/src/ja/webgal-script/bg-and-figure.md index 6c7d20ae6..e0105b362 100644 --- a/src/ja/webgal-script/bg-and-figure.md +++ b/src/ja/webgal-script/bg-and-figure.md @@ -6,7 +6,7 @@ WebGALで背景と立ち絵を読み込むには、背景画像は`background` 次に、以下の簡単な文で現在表示されている背景画像と立ち絵を変更することができます。 -``` ws +``` webgal changeBg:testBG03.jpg; // 背景を変更 changeFigure:testFigure02.png; // 立ち絵を変更 changeBg:none; // 背景を閉じる @@ -15,7 +15,7 @@ changeFigure:none; // 立ち絵を閉じる 背景画像や立ち絵を変更した後、次の会話を表示するために再度マウスをクリックする必要があることに気付くかもしれません。背景/立ち絵を変更した後、すぐに次の文の内容を実行したい場合は、`-next`パラメータを使用してください。 -``` ws +``` webgal changeBg:testBG03.jpg -next; changeFigure:testFigure02.png -next; // 立ち絵を変更 一色:先輩ありがとう!; @@ -27,7 +27,7 @@ changeFigure:testFigure02.png -next; // 立ち絵を変更 現在、ページの3つの異なる位置に異なる立ち絵を配置できます。立ち絵を配置する文に配置する位置を追加するだけで済みます。例を以下に示します。 -``` ws +``` webgal changeFigure:testFigure03.png -left; changeFigure:testFigure04.png; changeFigure:testFigure03.png -right; @@ -35,7 +35,7 @@ changeFigure:testFigure03.png -right; 上記の3行は、それぞれ左、中央、右の3つの異なる位置に対応しています。3つの異なる位置の立ち絵は相互に独立しているため、立ち絵を消去する必要がある場合は、それぞれ独立して消去する必要があります。 -``` ws +``` webgal changeFigure:none -left; changeFigure:none; changeFigure:none -right; @@ -43,7 +43,7 @@ changeFigure:none -right; 立ち絵を変更した後、すぐに次の文を実行したい場合は、以前と同様に`-next`パラメータを追加します。 -``` ws +``` webgal changeFigure:testFigure03.png -left -next; changeFigure:testFigure04.png -next; changeFigure:testFigure03.png -right -next; @@ -53,7 +53,7 @@ changeFigure:testFigure03.png -right -next; もし、より詳細に立ち絵を制御したい場合や、3つ以上の立ち絵を使用したい場合は、立ち絵に `id` と初期位置を指定することができます。 -``` ws +``` webgal ; // 右側に初期位置がある自由な立ち絵 changeFigure:testFigure03.png -left -id=test1; ; // idで立ち絵を閉じる @@ -68,7 +68,7 @@ ID付きの立ち絵の位置をリセットする場合は、まず閉じてか 多くのゲームでは、テキストボックスの左下にミニアバターを配置できます。以下は、このエンジンで使用される構文です。 -``` ws +``` webgal ; // 左下にminipic_test.pngを表示する miniAvatar:minipic_test.png; ; // このミニアバターを閉じる @@ -79,7 +79,7 @@ miniAvatar:none; `unlockCg`を使用して、CG鑑賞のCGをアンロックします。 -``` ws +``` webgal ; // CGをアンロックして名前を付ける unlockCg:xgmain.jpeg -name=星光咖啡馆与死神之蝶 -series=1; ``` @@ -92,7 +92,7 @@ unlockCg:xgmain.jpeg -name=星光咖啡馆与死神之蝶 -series=1; 立ち絵を設定するときに、立ち絵にいくつかの変換とフィルターエフェクトを設定できます。以下に例を示します。 -``` +``` webgal changeFigure:stand.png -transform={"alpha":1,"position":{"x":0,"y":500},"scale":{"x":1,"y":1},"rotation":0,"blur":0,"brightness":1,"contrast":1,"saturation":1,"gamma":1,"colorRed":255,"colorGreen":255,"colorBlue":255,"oldFilm":0,"dotFilm":0,"reflectionFilm":0,"glitchFilm":0,"rgbFilm":0,"godrayFilm":0} -next; ``` @@ -102,7 +102,7 @@ changeFigure:stand.png -transform={"alpha":1,"position":{"x":0,"y":500},"scale": また、`setTransform`を使用して、既存の立ち絵に直接エフェクトを設定することもできます。例えば、 -``` +``` webgal setTransform:{"position":{"x":100,"y":0}} -target=fig-center -duration=0; ``` diff --git a/src/ja/webgal-script/dialogue.md b/src/ja/webgal-script/dialogue.md index 3acf4235a..e91a2235e 100644 --- a/src/ja/webgal-script/dialogue.md +++ b/src/ja/webgal-script/dialogue.md @@ -18,7 +18,7 @@ 例: -``` ws +``` webgal 雪ノ下雪乃:お茶どうぞ; 由比ヶ浜:あ、ありがとう; 小町:雪乃姉ありがとう!; @@ -31,7 +31,7 @@ 複数の会話でキャラクター名が変わらない場合は、連続会話としてキャラクター名を省略して、必要なときにだけキャラクター名を書くことができます。 -``` ws +``` webgal 雪ノ下雪乃:随分早いですね; ; // このとき、会話のキャラクター名はまだ「雪ノ下雪乃」です お待たせしてしまいましたか?; @@ -42,7 +42,7 @@ キャラクター名のないナレーションの会話を作成したい場合は、コロンの前に空白を入れてください(コロンは省略できません)。 -``` ws +``` webgal :これはナレーションです; ``` @@ -50,13 +50,13 @@ 多くのゲームでは、テーマを導入したり、キャラクターの心理描写を表現したりするために、黒画面にテキストが表示されます。独白を演出するには、introコマンドを使用します。 -``` ws +``` webgal intro:思い出には適した脚本はいらない、|口に出せば、|それは戯言になる。; ``` 独白の改行は区切り記号(|)で行われます。つまり、|ごとに改行されます。実際の演出では、上記のテキストは次のように表示されます。 -``` ws +``` webgal 思い出には適した脚本はいらない、 口に出せば、 それは戯言になる。 @@ -64,7 +64,7 @@ intro:思い出には適した脚本はいらない、|口に出せば、|それ 独白が終わった後も独白画面を維持し、ゲームを続行しないようにするには、`-hold` パラメータを使用します。 -``` ws +``` webgal intro:思い出には台本はいらない、|口に出せば、|戯言になる。 -hold; ``` @@ -72,7 +72,7 @@ intro:思い出には台本はいらない、|口に出せば、|戯言になる `getUserInput`コマンドを使用してユーザー入力を取得し、変数に書き込みます。たとえば、 -``` +``` webgal getUserInput:name -title=あなたの呼び方は -buttonText=決定; ユーザー入力をname変数に書き込む ``` @@ -82,13 +82,13 @@ getUserInput:name -title=あなたの呼び方は -buttonText=決定; ユーザ `{}`構文を使用してステートメント内で変数の補完を行い、変数をステートメントに挿入できます。たとえば、 -``` +``` webgal WebGAL:はじめまして、{name}さん! ``` 変数の補完は、キャラクター名にも適用されます。たとえば、 -``` +``` webgal {name}:私もWebGALが一番好きです!; ``` @@ -100,7 +100,7 @@ WebGAL:はじめまして、{name}さん! 例: -``` +``` webgal 『[笑顔](えがお)』なんて、『[笑う](わらう)』なんて、[誰](だれ)でも[出来](でき)るもん…! ``` @@ -112,7 +112,7 @@ WebGAL 4.5.3 では、「テキスト拡張文法」機能が追加されまし 簡単に言うと、次の形式になります。 -``` +``` webgal WebGAL:[テキスト](style-alltext=font-style:italic\;font-size:80%\; style=color:#66327C\; ruby=てきすと) ``` @@ -146,13 +146,13 @@ WebGAL:[テキスト](style-alltext=font-style:italic\;font-size:80%\; style=col 特殊な演出効果のために、一時的にテキストボックスを閉じたい場合があります。そのため、次のコマンドを使用してテキストボックスを閉じることができます。 -``` ws +``` webgal setTextbox:hide; // テキストボックスを閉じる ``` `setTextbox`コマンドの値が`hide`の場合、テキストボックスは閉じられ、ユーザーはどの方法でも開くことができません。テキストボックスを再度表示するには、このコマンドをもう一度呼び出して、`hide`以外の任意の値を入力します。 -``` ws +``` webgal setTextbox:on; // hide以外の任意の値にすることができます。 ``` @@ -160,7 +160,7 @@ setTextbox:on; // hide以外の任意の値にすることができます。 ストーリーの最後にゲームを終了してタイトルに戻したい場合は、次を使用してください。 -``` ws +``` webgal end; ``` diff --git a/src/ja/webgal-script/scenes.md b/src/ja/webgal-script/scenes.md index 8390f350d..62473aaeb 100644 --- a/src/ja/webgal-script/scenes.md +++ b/src/ja/webgal-script/scenes.md @@ -14,13 +14,13 @@ WebGAL Terreビジュアルエディタを使用している場合は、エデ 現在、2つの章のスクリプト、つまり`Chapter-1.txt`と`Chapter-2.txt`を作成したとします。`Chapter-1.txt`の実行が終了したら、`Chapter-2.txt`に対応するシーンにジャンプするには、次のステートメントを使用します。 -``` ws +``` webgal changeScene:Chapter-2.txt; ``` 例: -``` ws +``` webgal (Chapter-1.txt) ...... ...... @@ -40,13 +40,13 @@ changeScene:Chapter-2.txt; ステートメント: -``` ws +``` webgal callScene:Chapter-2.txt; ``` 例: -``` ws +``` webgal (Chapter-1.txt) ...... ...... @@ -68,7 +68,7 @@ callScene:Chapter-2.txt; `選択肢のテキスト:章ファイル名`を使用して選択肢を定義します。異なる選択肢を区切るには`|`を使用します。例を以下に示します。 -``` ws +``` webgal choose:彼女を呼び止める:Chapter-2.txt|家に帰る:Chapter-3.txt; ``` @@ -78,7 +78,7 @@ choose:彼女を呼び止める:Chapter-2.txt|家に帰る:Chapter-3.txt; 変数に応じて、オプションを条件付きで表示したり、ユーザーがオプションをクリックできるようにしたりすることもできます。構文は次のとおりです。 -```ws +``` webgal choose:(showConditionVar>1)[enableConditionVar>2]->彼女に声を掛ける:Chapter-2.txt|家に帰る:Chapter-3.txt; ``` @@ -94,7 +94,7 @@ choose:(showConditionVar>1)[enableConditionVar>2]->彼女に声を掛ける:Chap ### ラベル(`label`)の作成 -``` ws +``` webgal ...... jumpLabel:label_1; // label_1にジャンプします ...... @@ -111,7 +111,7 @@ label:label_1; // label_1という名前のラベルを作成します 上記の基本事項がわかれば、`choose`を使用して分岐を使用して`label`のある場所にジャンプできます。 -``` ws +``` webgal ...... choose:分岐1:label_1|分岐2:label_2; label:label_1; // label_1という名前のラベルを作成します @@ -128,7 +128,7 @@ label:end; // endという名前のラベルを作成します 各分岐の最後に、希望する場所にジャンプするために`jumpLabel`を使用する必要があります。プログラムは線形に実行されるため、分岐の最後にジャンプしない場合、プログラムは次の行に実行を続行します。例えば、以下のような場合です。 -``` ws +``` webgal ...... choose:分岐1:label_1|分岐2:label_2; label:label_1; // label_1という名前のラベルを作成します diff --git a/src/ja/webgal-script/special-effect.md b/src/ja/webgal-script/special-effect.md index 47f4c05a9..15e9f47bd 100644 --- a/src/ja/webgal-script/special-effect.md +++ b/src/ja/webgal-script/special-effect.md @@ -8,7 +8,7 @@ `pixiInit` を使用して Pixi を初期化します。 -``` ws +``` webgal pixiInit; ``` @@ -22,7 +22,7 @@ pixiInit; `pixiPerform` を使用してエフェクトを追加します。 -``` ws +``` webgal pixiPerform:rain; // 雨のエフェクトを追加する ``` @@ -41,7 +41,7 @@ pixiPerform:rain; // 雨のエフェクトを追加する 2 つ以上エフェクトを重ねたい場合は、`pixiInit` コマンドを使用せずに異なるエフェクトを重ねることができます。 -``` ws +``` webgal pixiPerform:rain; pixiPerform:snow; ``` @@ -56,7 +56,7 @@ pixiPerform:snow; エフェクトコンテナは前景コンテナと背景コンテナに分割され、ここでは前景コンテナを例としています。 -``` ts +``` typescript // 現在の Pixi エフェクト Container を取得する const effectsContainer = WebGAL.gameplay.pixiStage!.foregroundEffectsContainer!; // Pixi App の呼び出し方法で、画面のサイズなどを決定するのに役立ちます @@ -73,7 +73,7 @@ effectsContainer.addChild(container); ファイルの末尾で登録したエフェクトを使用します。最初のパラメータはエフェクト名、2 番目のパラメータはエフェクトを呼び出すメソッドです。 -``` ts +``` typescript import {registerPerform} from '../pixiPerformManager'; // これがエフェクトだと仮定します @@ -87,12 +87,12 @@ registerPerform('myPerform', { fg: () => myPerform(パラメータ) }); 最後に、カスタムエフェクトをサポートする WebGAL をコンパイルします。 -``` shell +``` bash yarn run build; ``` これで、スクリプトでエフェクトを呼び出すことができます。 -``` ws +``` webgal pixiPerform:myPerform; ``` \ No newline at end of file diff --git a/src/ja/webgal-script/variable.md b/src/ja/webgal-script/variable.md index bbf03ef47..12944d735 100644 --- a/src/ja/webgal-script/variable.md +++ b/src/ja/webgal-script/variable.md @@ -8,7 +8,7 @@ 変数を設定する: -``` ws +``` webgal setVar:a=1; // 数字を設定可能 setVar:a=true // 真偽値を設定可能 setVar:a=キャラクター名 // 文字列を設定可能 @@ -16,7 +16,7 @@ setVar:a=キャラクター名 // 文字列を設定可能 乱数を設定する場合は、`random()` を使用してください。 -```ws +``` webgal setVar:a=random(); ``` @@ -28,23 +28,23 @@ setVar:a=random(); 3. [floating] (boolean): 浮動小数点数を返すかどうかを指定します。 パラメータを書かずに0-1区間の浮動小数点数ですを生成します -```ws +``` webgal setVar:a=random(); ``` もちろん、私たちは**範囲**を指定することもできます。たとえば、5~10の間の乱数が必要な場合は、書くことができます: -```ws +``` webgal setVar:a=random(5,10); ``` もちろん、範囲を使用して生成したい数値にも小数があるので、3番目のパラメータを指定することができます。 -```ws +``` webgal setVar:a=random(5,10,true); # 5~10の浮動小数点数が生成されます ``` 以前に他の変数を定義している場合は、変数を設定する際にそれらを使用することもできます。 -``` ws +``` webgal setVar:a=1; setVar:b=a+1; ``` @@ -55,7 +55,7 @@ setVar:b=a+1; 例えば: -``` ws +``` webgal setVar:a=1; ; // a が 1 より大きい場合、シーン 1 にジャンプする changeScene:1.txt -when=a>1; @@ -76,7 +76,7 @@ changeScene:3.txt; `getUserInput` 命令を使用してユーザー入力を取得します。例えば: -``` +``` webgal getUserInput:name -title=あなたの名前を教えてください -buttonText=確認; ユーザー入力を name 変数に書き込む ``` @@ -86,7 +86,7 @@ getUserInput:name -title=あなたの名前を教えてください -buttonText= `{}` 構文を使用して文の中で変数補間を行い、変数を文に挿入することができます。例えば: -``` +``` webgal setVar:name=WebGAL; setVar:engine=WebGAL; {name}: {engine} へようこそ!これは、まったく新しいウェブベースのビジュアルノベルエンジンです。; @@ -100,7 +100,7 @@ WebGAL の通常の変数はセーブデータに依存します。つまり、 `-global` パラメータを追加すると、永続(グローバル)変数を設定することができます。 -```ws +``` webgal setVar:a=1 -global; ``` @@ -108,7 +108,7 @@ setVar:a=1 -global; 使用例: -```ws +``` webgal jumpLabel:turn-2 -when=a>0; setVar:a=1 -global; 1周目; @@ -131,14 +131,14 @@ WebGAL には現在、`stage` と `userData` の 2 つの組み込み変数フ それらにアクセスするには `$` を使用します (例: BGM の値を取得します)。 -```ws +``` webgal setVar:a=($stage.bgm.volume); WebGAL:現在のBGMボリュームは、以下の通りです{a}; ``` もちろん、会話で直接使用することもできます: -```ws +``` webgal WebGAL:現在のBGMボリュームは、以下の通りです{$stage.bgm.volume}; ``` @@ -148,7 +148,7 @@ WebGAL:現在のBGMボリュームは、以下の通りです{$stage.bgm.volume} また、`config.txt` のグローバル変数にもアクセスできます: -```ws +``` webgal setVar:title=(Game_name); WebGAL:現在のゲームのタイトルは次のとおりです{title}; ``` @@ -157,7 +157,7 @@ WebGAL:現在のゲームのタイトルは次のとおりです{title}; `global`パラメータを追加して、構成変数を変更していることを示します: -```ws +``` webgal setVar:Game_name=新しいゲームタイトル -global; WebGAL:現在のゲームのタイトルは次のとおりです{Game_name}; ``` @@ -173,7 +173,7 @@ WebGAL:現在のゲームのタイトルは次のとおりです{Game_name}; もちろん、`config.txt`でカスタム構成変数を作成することもできます。たとえば、バージョン番号を作成します: -```text +``` text Game_name:欢迎使用WebGAL!; Game_key:f60ad5725c1588; Title_img:WebGAL_New_Enter_Image.png; @@ -185,7 +185,7 @@ version:1; 次に、スクリプトでそれを取得して変更できます: -```ws +``` webgal setVar:v=(version); WebGAL:現在のバージョン番号は{v}; setVar:version=version*2 -global; diff --git a/src/ja/webgal-script/video.md b/src/ja/webgal-script/video.md index 49c8420e9..057e946e8 100644 --- a/src/ja/webgal-script/video.md +++ b/src/ja/webgal-script/video.md @@ -4,7 +4,7 @@ 動画は `video` フォルダに置き、`playVideo` を使用して再生します。 -``` ws +``` webgal playVideo:OP.mp4; ``` diff --git a/src/ja/win7.md b/src/ja/win7.md index 3440506d3..77224c40d 100644 --- a/src/ja/win7.md +++ b/src/ja/win7.md @@ -57,7 +57,7 @@ 3. 以下のコマンドを実行する。 - ```bash + ``` bash npm i # あるいは(yarn をインストールしている場合) yarn @@ -75,7 +75,7 @@ 3. 以下のコマンドを実行する。 - ```bash + ``` bash node main.js ``` @@ -93,7 +93,7 @@ [WebGAL_Terre](https://github.com/OpenWebGAL/WebGAL_Terre) リポジトリをクローンする。 -``` shell +``` bash git clone https://github.com/OpenWebGAL/WebGAL_Terre.git ``` @@ -101,7 +101,7 @@ git clone https://github.com/OpenWebGAL/WebGAL_Terre.git yarn をインストールする(任意だが推奨)。 -``` shell +``` bash npm i -g yarn ``` @@ -113,7 +113,7 @@ npm i -g yarn プロジェクトのルートディレクトリで依存関係をインストールする。 - ```shell + ``` bash yarn ``` @@ -127,13 +127,13 @@ npm i -g yarn 2. 依存関係をインストールする - ``` shell + ``` bash yarn ``` 3. *terre2* をパッケージ化する - ``` shell + ``` bash yarn run build ``` @@ -141,7 +141,7 @@ npm i -g yarn 5. *dist* に *package.json* ファイルを追加する。内容は以下の通り(関連情報を必ず入力すること)。 - ```json + ``` json { "name": "webgal-terre-2-win7-server", "version": "バージョン番号", @@ -169,7 +169,7 @@ npm i -g yarn 1. ビジュアルエディタのディレクトリで依存関係をインストールする。 - ``` shell + ``` bash npm i # あるいは(yarn を推奨) yarn diff --git a/src/live2D.md b/src/live2D.md index 798b19489..a00e33540 100644 --- a/src/live2D.md +++ b/src/live2D.md @@ -29,6 +29,6 @@ 你可以使用 `-motion=motionName` 或 `-expression=expressionName` 参数来切换表情,如: -``` +``` webgal changeFigure:xxx.json -motion=angry -expression=angry01; ``` diff --git a/src/script-reference/commands/applyStyle.md b/src/script-reference/commands/applyStyle.md index bcc0a9acb..5f414089d 100644 --- a/src/script-reference/commands/applyStyle.md +++ b/src/script-reference/commands/applyStyle.md @@ -8,7 +8,7 @@ 原样式名与新样式名之间用 `->` 连接,您可以同时替换多个样式,每个替换之间用英文逗号 `,` 分隔。 格式如:原样式名->新样式名,原样式名2->新样式名2,... -```webgal +``` webgal ; 将角色名背景替换为红色,前提是在 UI 模板里写了新样式 applyStyle:TextBox_ShowName_Background->TextBox_ShowName_Background_Red; 角色名:这是一句话; @@ -18,24 +18,24 @@ applyStyle:TextBox_ShowName_Background->TextBox_ShowName_Background_Green,TextBo 无论原样式被替换为什么新样式,替换样式依旧是原样式名在前; -```webgal -applyStyle:原样式名->新样式名1; -applyStyle:新样式名1->新样式名2; 错误 -applyStyle:原样式名->新样式名2; -``` - -## 常用可替换样式 - -选择枝使用以下样式名: - -| 样式名 | 作用 | -| :--- | :--- | -| `Choose_Main` | 选项列表容器 | -| `Choose_item_outer` | 单个选项的外层容器 | -| `Choose_item` | 可点击选项 | -| `Choose_item_disabled` | 条件未满足、不可点击的选项 | - -```webgal -; 将可点击选项替换成模板中定义的 Choose_item_Red -applyStyle:Choose_item->Choose_item_Red; -``` +``` webgal +applyStyle:原样式名->新样式名1; +applyStyle:新样式名1->新样式名2; 错误 +applyStyle:原样式名->新样式名2; +``` + +## 常用可替换样式 + +选择枝使用以下样式名: + +| 样式名 | 作用 | +| :--- | :--- | +| `Choose_Main` | 选项列表容器 | +| `Choose_item_outer` | 单个选项的外层容器 | +| `Choose_item` | 可点击选项 | +| `Choose_item_disabled` | 条件未满足、不可点击的选项 | + +``` webgal +; 将可点击选项替换成模板中定义的 Choose_item_Red +applyStyle:Choose_item->Choose_item_Red; +``` diff --git a/src/script-reference/commands/bgm.md b/src/script-reference/commands/bgm.md index 657d92d63..d4c558100 100644 --- a/src/script-reference/commands/bgm.md +++ b/src/script-reference/commands/bgm.md @@ -7,7 +7,7 @@ 填写背景音乐的路径。当文件路径为空或为 none 时,表示停止播放。 详情请见[音频](../../webgal-script/audio.md)。 -```webgal +``` webgal ; 如果没有背景音乐,则此句表示播放背景音乐。 bgm:01.wav; ; 如果已有背景音乐存在,则此句表示切换背景音乐。 @@ -18,7 +18,7 @@ bgm:; 若背景音乐的路径不变,则不会打断背景音乐, 而是将新参数应用到背景音乐上。 -```webgal +``` webgal bgm:morning.wav; ; 调整音量,但不会打断背景音乐 bgm:morning.wav -volume=50; @@ -27,7 +27,7 @@ bgm:morning.wav -volume=50; ## 参数 -```webgal +``` webgal bgm:01.wav -volume=100; bgm:01.wav -volume=50; 调整音量 ``` @@ -40,7 +40,7 @@ bgm:01.wav -volume=50; 调整音量 背景音乐的淡入时间。 -```webgal +``` webgal bgm:01.wav -enter=1500; bgm:02.wav -enter=1500; ``` @@ -48,7 +48,7 @@ bgm:02.wav -enter=1500; ### unlockname 如果不填写该参数,或名称为空,则不会收录此音乐。 -```webgal +``` webgal bgm:01.wav -unlockname=MyBgm01; ``` @@ -56,6 +56,6 @@ bgm:01.wav -unlockname=MyBgm01; 单独填写 `series` 不会进行收录,请确保同时填写了 `unlockname`。 -```webgal +``` webgal bgm:01.wav -unlockname=MyBgm01 -series=MySeries01; ``` diff --git a/src/script-reference/commands/callScene.md b/src/script-reference/commands/callScene.md index c32be7fbb..eb0417aab 100644 --- a/src/script-reference/commands/callScene.md +++ b/src/script-reference/commands/callScene.md @@ -10,7 +10,7 @@ 调用场景不会清空当前场景(如立绘、背景),若没有主动关闭,它们将被带到新场景中。 ::: -```webgal +``` webgal 角色A:我记得在商店的时候......; callScene:chapter_01/shop.txt; 角色A:原来是这样,我知道是怎么回事了; diff --git a/src/script-reference/commands/callSteam.md b/src/script-reference/commands/callSteam.md index 1c0df1930..bbdcb9c0e 100644 --- a/src/script-reference/commands/callSteam.md +++ b/src/script-reference/commands/callSteam.md @@ -10,7 +10,7 @@ 在 `game/config.txt` 中填写 `Steam_AppID`,WebGAL 会在启动时初始化 Steam 集成。 -```text +``` text Steam_AppID:480; ``` @@ -27,13 +27,13 @@ Steam_AppID:480; 填写要解锁的 Steam 成就 ID,与 Steam 后台配置的成就 API 名称一致。 -```webgal +``` webgal callSteam: -achievementId=ACH_WIN_ONE_GAME; ``` ## 示例 -```webgal +``` webgal ; 解锁成就 callSteam: -achievementId=ACH_WIN_ONE_GAME; ``` diff --git a/src/script-reference/commands/changeBg.md b/src/script-reference/commands/changeBg.md index b5f25ce11..e78eb3d1f 100644 --- a/src/script-reference/commands/changeBg.md +++ b/src/script-reference/commands/changeBg.md @@ -7,7 +7,7 @@ 填写背景图片的路径。当文件路径为空或为 `none` 时,表示背景退场。 详情请见[背景与立绘](../../webgal-script/bg-and-figure.md)。 -```webgal +``` webgal ; 如果没有背景存在,则此句表示背景入场。 changeBg:bg.png; ; 如果已有背景存在,则此句表示替换背景。 @@ -21,44 +21,44 @@ changeBg:none; ## 参数 -```webgal +``` webgal changeBg:bg.png -transform={"position":{"x":-50,"y":-20},"rotation":0.1,"scale":{"x":1.2,"y":1.2},"brightness":0.5,"blur":10}; ``` -```webgal +``` webgal changeBg:bg.png -enter=enter-from-left; ``` -```webgal +``` webgal changeBg:bg.png -exit=exit-to-right; ``` -作用于默认入场动画,默认值为 1500。 -```webgal +作用于默认入场动画,默认值为 1500。 +``` webgal changeBg:bg.png -duration=200; ``` -作用于默认入场动画。 -```webgal +作用于默认入场动画。 +``` webgal changeBg:bg.png -ease=easeOut; ``` -### unlockname - -如果不填写该参数,或名称为空,则不会收录此图片。 -```webgal -changeBg:bg.png -unlockname=MyCg01; -``` +### unlockname + +如果不填写该参数,或名称为空,则不会收录此图片。 +``` webgal +changeBg:bg.png -unlockname=MyCg01; +``` ### series 单独填写 `series` 不会进行收录,请确保同时填写了 `unlockname`。 -```webgal +``` webgal changeBg:bg.png -unlockname=MyCg01 -series=MySeries01; ``` @@ -67,9 +67,9 @@ changeBg:bg.png -unlockname=MyCg01 -series=MySeries01; - 单位:毫秒 - 范围:0 到正无穷 -入场动画时长。若未填写,默认取 `duration` 的值(默认 1500)。 +入场动画时长。若未填写,默认取 `duration` 的值(默认 1500)。 -```webgal +``` webgal changeBg:bg.png -enterDuration=500; ``` @@ -80,6 +80,6 @@ changeBg:bg.png -enterDuration=500; 退场动画时长。若未填写,默认值为 1500。 -```webgal +``` webgal changeBg:bg.png -exitDuration=800; ``` diff --git a/src/script-reference/commands/changeFigure.md b/src/script-reference/commands/changeFigure.md index 9c5ce1aa5..efcdcdf8a 100644 --- a/src/script-reference/commands/changeFigure.md +++ b/src/script-reference/commands/changeFigure.md @@ -7,7 +7,7 @@ 填写立绘的路径。当文件路径为空或为 `none` 时,表示立绘退场。 详情请见[背景与立绘](../../webgal-script/bg-and-figure.md)。 -```webgal +``` webgal ; 如果没有立绘存在,则此句表示立绘入场。 changeFigure:1/open_eyes.png; ; 如果已有立绘存在,则此句表示替换立绘。 @@ -18,7 +18,7 @@ changeFigure:none; 如果立绘的路径与 `id` 保持不变,则不会触发入场或退场动画,而是将新参数应用到目标立绘上。 -```webgal +``` webgal ; Live2d 立绘入场 changeFigure:character_a/model.json -id=aaa; ; 修改 Live2d 立绘的动作表情 @@ -30,7 +30,7 @@ changeFigure:character_a/model.json -id=aaa -motion=smile -expression=sad; ### 图片立绘 任何不是 Live2D 或 Spine 的格式,都将尝试作为图片立绘导入。 -```webgal +``` webgal changeFigure:1/open_eyes.png; ``` @@ -42,7 +42,7 @@ changeFigure:1/open_eyes.png; 填入 Live2D 模型 (.json/.model3.json) 的路径,WebGAL 会加载 Live2D 模型。 -```webgal +``` webgal changeFigure:character_a/model.json; ``` @@ -54,42 +54,42 @@ changeFigure:character_a/model.json; 如果您的 Spine 模型是 .skel 格式,您可以直接填写该文件的路径。 -```webgal +``` webgal changeFigure:character_x/model.skel; ``` 如果您的 Spine 模型是 .json 格式,您需要在路径后指定立绘类型为 Spine,避免误当作 Live2D 模型导入。 -```webgal +``` webgal changeFigure:character_x/model.json?type=spine; ``` ## 参数 -```webgal +``` webgal changeFigure:1/open_eyes.png -transform={"position":{"x":-50,"y":-20},"rotation":0.1,"scale":{"x":1.2,"y":1.2},"brightness":0.5,"blur":10}; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -enter=enter-from-left; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -exit=exit-to-right; ``` 作用于默认入场动画,默认值为 300。 -```webgal +``` webgal changeFigure:1/open_eyes.png -duration=200; ``` 作用于默认入场动画。 -```webgal +``` webgal changeFigure:1/open_eyes.png -ease=easeOut; ``` @@ -100,7 +100,7 @@ changeFigure:1/open_eyes.png -ease=easeOut; 入场动画时长。若未填写,默认取 `duration` 的值(默认 300)。 -```webgal +``` webgal changeFigure:1/open_eyes.png -enterDuration=200; ``` @@ -111,7 +111,7 @@ changeFigure:1/open_eyes.png -enterDuration=200; 退场动画时长。若未填写,默认值为 450。 -```webgal +``` webgal changeFigure:1/open_eyes.png -exitDuration=300; ``` @@ -125,7 +125,7 @@ changeFigure:1/open_eyes.png -exitDuration=300; 此参数仅在立绘出场,或替换立绘时生效。如果需要修改在场立绘的坐标,请使用 `setTransform`、`setAnimation`、`setTempAnimation` 等命令。 ::: -```webgal +``` webgal changeFigure:1/open_eyes.png -left; ``` @@ -139,7 +139,7 @@ changeFigure:1/open_eyes.png -left; 此参数仅在立绘出场,或替换立绘时生效。如果需要修改在场立绘的坐标,请使用 `setTransform`、`setAnimation`、`setTempAnimation` 等命令。 ::: -```webgal +``` webgal changeFigure:1/open_eyes.png -right; ``` @@ -153,7 +153,7 @@ changeFigure:1/open_eyes.png -right; - 若 `right` 参数为 `true`,则默认赋予该立绘以 `fig-right` 的 id - 若 `left` 和 `right` 参数均为 `false`,则默认赋予该立绘以 `fig-center` 的 id -```webgal +``` webgal ; 填写了不同 id 后,即使初始位置相同,立绘也不会相互顶替。 changeFigure:1/open_eyes.png -id=aaa; changeFigure:2/open_eyes.png -id=bbb; @@ -168,7 +168,7 @@ changeFigure:3/open_eyes.png -id=ccc -left; 立绘的层级,数值越大,立绘图层越靠上。如果数值相同,则入场较晚的立绘图层会更靠上。 若不填写该参数,默认值为0。 -```webgal +``` webgal ; 立绘 aaa 会在立绘 bbb 上方。 changeFigure:1/open_eyes.png -id=aaa -zIndex=2; changeFigure:2/open_eyes.png -id=bbb -zIndex=1; @@ -180,7 +180,7 @@ changeFigure:2/open_eyes.png -id=bbb -zIndex=1; 设置立绘的混合模式。仅在立绘出场或替换立绘时生效。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -blendMode=add; ``` @@ -189,7 +189,7 @@ changeFigure:1/open_eyes.png -id=aaa -blendMode=add; 将语句内容替换为空字符串。 -```webgal +``` webgal changeFigure:1/open_eyes.png -clear; ``` @@ -198,7 +198,7 @@ changeFigure:1/open_eyes.png -clear; 将语句内容替换为空字符串。 -```webgal +``` webgal changeFigure:1/open_eyes.png -none; ``` @@ -212,7 +212,7 @@ changeFigure:1/open_eyes.png -none; 填写图片立绘的路径,作为张嘴时的立绘差分。 -```webgal +``` webgal changeFigure:1/open_eyes.png -mouthOpen=1/open_mouth.png; ``` @@ -221,7 +221,7 @@ changeFigure:1/open_eyes.png -mouthOpen=1/open_mouth.png; 填写图片立绘的路径,作为半张嘴时的立绘差分。 -```webgal +``` webgal changeFigure:1/open_eyes.png -mouthHalfOpen=1/halfopen_mouth.png; ``` @@ -230,7 +230,7 @@ changeFigure:1/open_eyes.png -mouthHalfOpen=1/halfopen_mouth.png; 填写图片立绘的路径,作为闭嘴时的立绘差分。 -```webgal +``` webgal changeFigure:1/open_eyes.png -mouthClose=1/closed_mouth.png; ``` @@ -239,7 +239,7 @@ changeFigure:1/open_eyes.png -mouthClose=1/closed_mouth.png; 填写图片立绘的路径,作为睁眼时的立绘差分。 -```webgal +``` webgal changeFigure:1/open_eyes.png -eyesOpen=1/open_eyes.png; ``` @@ -248,7 +248,7 @@ changeFigure:1/open_eyes.png -eyesOpen=1/open_eyes.png; 填写图片立绘的路径,作为闭眼时的立绘差分。 -```webgal +``` webgal changeFigure:1/open_eyes.png -eyesClose=1/closed_eyes.png; ``` @@ -257,7 +257,7 @@ changeFigure:1/open_eyes.png -eyesClose=1/closed_eyes.png; 对于 Live2D 立绘或 Spine 立绘,填写动作名称,播放对应的动作动画。 -```webgal +``` webgal changeFigure:character_a/model.json -motion=sad; changeFigure:character_a/model.json -motion=smile; ``` @@ -268,7 +268,7 @@ changeFigure:character_a/model.json -motion=smile; 对于 Spine 立绘,填写皮肤名称,切换到对应的 skin。 如需同时切换 Spine 的动画与皮肤,继续使用 `motion` 指定动画,使用 `skin` 指定皮肤。 -```webgal +``` webgal changeFigure:character_x/model.json?type=spine -skin=default; changeFigure:character_x/model.json?type=spine -motion=anime_00_wait -skin=03_surprise; ``` @@ -278,7 +278,7 @@ changeFigure:character_x/model.json?type=spine -motion=anime_00_wait -skin=03_su 对于 Live2D 立绘,填写表情名称,切换对应的表情。 -```webgal +``` webgal changeFigure:character_a/model.json -expression=smile; changeFigure:character_a/model.json -expression=sad; ``` @@ -294,7 +294,7 @@ x 轴以向右为正方向,y 轴以向下为正方向。 此参数仅在立绘出场,或替换立绘时生效。 ::: -```webgal +``` webgal ; 往左和往右拓展 300 像素 changeFigure:character_a/model.json -bounds=-300,0,300,0; ``` @@ -312,7 +312,7 @@ changeFigure:character_a/model.json -bounds=-300,0,300,0; - `"closedDuration"`: 数字,闭眼时间,单位毫秒,默认值 50 - `"openingDuration"`: 数字,睁眼持续时间,单位毫秒,默认值 150 -```webgal +``` webgal changeFigure:character_a/model.json -blink={"blinkInterval":5000,"blinkIntervalRandom":2000,"closingDuration":100,"closedDuration":50,"openingDuration":150}; ``` @@ -328,6 +328,6 @@ x 轴以向右为正方向,y 轴以向上为正方向。 - `"y"`: 数字,注视点的 y 坐标,范围 -1 到 1,默认值 0 - `"instant"`: 布尔值,是否立即转向注视点,默认值 false -```webgal +``` webgal changeFigure:character_a/model.json -focus={"x":0.5,"y":0.2,"instant":false}; ``` diff --git a/src/script-reference/commands/changeScene.md b/src/script-reference/commands/changeScene.md index f78773840..e59b11250 100644 --- a/src/script-reference/commands/changeScene.md +++ b/src/script-reference/commands/changeScene.md @@ -9,7 +9,7 @@ 如果此命令成功执行,当前场景的后续命令将不会被执行。 -```webgal +``` webgal 角色A:该出发了。; changeScene:chapter_01/part_02.txt; 调试对话:如果你看到了这句话,说明切换场景失败了。; @@ -21,7 +21,7 @@ changeScene:chapter_01/part_02.txt; ::: - chapter_01/part_01.txt -```webgal +``` webgal changeBg:home/character_a/bedroom.png; changeFigure:main_character/character_a/thinking.png -next; 角色A:今天去她家里吧!; @@ -31,7 +31,7 @@ changeFigure:none -next; 手动关闭立绘 changeScene:chapter_01/part_02.txt; ``` - chapter_01/part_02.txt -```webgal +``` webgal changeBg:home/character_b/living_room.png; changeFigure:main_character/character_b/smile.png -next; 角色B:是你啊,有什么事吗?; diff --git a/src/script-reference/commands/choose.md b/src/script-reference/commands/choose.md index c22ed0902..caa4a6961 100644 --- a/src/script-reference/commands/choose.md +++ b/src/script-reference/commands/choose.md @@ -1,17 +1,17 @@ -# choose - -显示选项。 - -## 语句内容 - -填写多个选项。每个选项包括 __选项文本__ 和 __跳转目标__ 两个部分,用英文冒号 `:` 分割;每个选项之间用 `|` 分隔。 -详情请见[分支选择](../../webgal-script/scenes.md#分支选择)。 - -目前可以跳转至 -- 场景文件 -- 本场景的某个标签 - -```webgal +# choose + +显示选项。 + +## 语句内容 + +填写多个选项。每个选项包括 __选项文本__ 和 __跳转目标__ 两个部分,用英文冒号 `:` 分割;每个选项之间用 `|` 分隔。 +详情请见[分支选择](../../webgal-script/scenes.md#分支选择)。 + +目前可以跳转至 +- 场景文件 +- 本场景的某个标签 + +``` webgal 角色A:今天去哪儿呢?; choose:去商店:chapter_01/shop.txt|某人家里:chapter_01/house_b.txt|待在家里:home; ; @@ -32,7 +32,7 @@ label:home; - `[条件表达式]`:控制选项是否可点击。 - `->`:分隔条件前缀和实际选项内容。 -```webgal +``` webgal setVar:hasTicket=true; setVar:doorPower=1; choose:(hasTicket==true)->出示门票:ticket|(doorPower>0)[doorPower>1]->强行开门:force|回家:home; diff --git a/src/script-reference/commands/comment.md b/src/script-reference/commands/comment.md index 116baeb94..9c93eb6cd 100644 --- a/src/script-reference/commands/comment.md +++ b/src/script-reference/commands/comment.md @@ -7,13 +7,13 @@ `;` 后面可以跟随注释内容,该命令本身不执行任何操作。 详情请见[注释](../../webgal-script/base.md#注释)。 -```webgal +``` webgal ; 这是一个注释 ``` 任何命令语句的第一个 `;` (`\;` 除外) 后的内容被视为行内注释。行内注释不会改变该行的命令类型。 -```webgal +``` webgal changeFigure:character_a/normal.png -id=aaa; setTransform:{"position":{"x":-500}} -target=aaa -duration=500; 给立绘 B 让位置 changeFigure:character_b/normal.png -id=bbb -transform={"position":{"x":500}}; diff --git a/src/script-reference/commands/end.md b/src/script-reference/commands/end.md index a8a08923c..5d4b423c3 100644 --- a/src/script-reference/commands/end.md +++ b/src/script-reference/commands/end.md @@ -5,6 +5,6 @@ ## 语句内容 不需要填写任何内容。 -```webgal +``` webgal end; ``` diff --git a/src/script-reference/commands/filmMode.md b/src/script-reference/commands/filmMode.md index 6d9ab61f9..91c2b9e54 100644 --- a/src/script-reference/commands/filmMode.md +++ b/src/script-reference/commands/filmMode.md @@ -6,7 +6,7 @@ 当不填写或填写 `none` 时,关闭电影模式。其他任何字符串均表示开启电影模式。 -```webgal +``` webgal filmMode:on; 角色A:真相只有一个; filmMode:none; diff --git a/src/script-reference/commands/getUserInput.md b/src/script-reference/commands/getUserInput.md index b2a4f56ab..923cdc217 100644 --- a/src/script-reference/commands/getUserInput.md +++ b/src/script-reference/commands/getUserInput.md @@ -6,7 +6,7 @@ 填写变量名称,用户输入的值将保存在该变量中。 -```webgal +``` webgal 角色B:真的是太感谢您了,能告诉我您的名字吗?; getUserInput:player_name -title=您的名字 -buttonText=确认 -defaultValue=Bob; 角色B:{player_name},我记住了。; @@ -21,7 +21,7 @@ getUserInput:player_name -title=您的名字 -buttonText=确认 -defaultValue=Bo 设置输入框的标题。 -```webgal +``` webgal getUserInput:player_name -title=您的名字; ``` @@ -30,7 +30,7 @@ getUserInput:player_name -title=您的名字; 设置确认按钮文本。 -```webgal +``` webgal getUserInput:player_name -buttonText=确认; ``` @@ -39,7 +39,7 @@ getUserInput:player_name -buttonText=确认; 设置输入框的默认值。 -```webgal +``` webgal getUserInput:player_name -defaultValue=Bob; ``` @@ -50,7 +50,7 @@ getUserInput:player_name -defaultValue=Bob; 设置输入验证的正则表达式规则。输入的内容将以此正则进行校验。 -```webgal +``` webgal getUserInput:player_name -rule=^.{1,2}$; ``` @@ -61,7 +61,7 @@ getUserInput:player_name -rule=^.{1,2}$; 具体参数详情请查看 [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp#flags)。 -```webgal +``` webgal getUserInput:player_name -rule=^.{1,2}$ -ruleFlag=g; ``` @@ -70,7 +70,7 @@ getUserInput:player_name -rule=^.{1,2}$ -ruleFlag=g; 设置校验不通过时弹出的错误弹窗的提示文本,可使用 `$0` 获取用户输入的内容。 -```webgal +``` webgal getUserInput:player_name -rule=^.{1,2}$ -ruleText=$0不符合1-2个字符; ``` @@ -81,6 +81,6 @@ getUserInput:player_name -rule=^.{1,2}$ -ruleText=$0不符合1-2个字符; 默认为`OK` -```webgal +``` webgal getUserInput:player_name -rule=^.{1,2}$ -ruleText=$0不符合1-2个字符 -ruleButtonText=确定; ``` diff --git a/src/script-reference/commands/global.md b/src/script-reference/commands/global.md index 379dede41..a1474295c 100644 --- a/src/script-reference/commands/global.md +++ b/src/script-reference/commands/global.md @@ -9,7 +9,7 @@ global 并非一个命令。此页面介绍的是所有命令均可使用的通 当值为 `true` 时,在执行当前语句的同时,同步执行接下来的语句,直至找到 `next` 为 `false` 的语句为止。 -```webgal +``` webgal label:loop; ; changeBg:bg.png -next; @@ -44,7 +44,7 @@ jumpLabel:loop; 书写条件表达式,仅当条件为 `true` 时,执行当前语句。 -```webgal +``` webgal label:start; ; setVar:coin=10; @@ -68,7 +68,7 @@ jumpLabel:start; 在这一句的演出结束后,自动执行下一句,即使玩家未开启自动播放。 -```webgal +``` webgal changeBg:bg.png -next; changeFigure:1/open_eyes.png -transform={"position":{"x":-500}} -id=aaa -next; changeFigure:2/open_eyes.png -transform={"position":{"x":500}} -id=bbb; diff --git a/src/script-reference/commands/intro.md b/src/script-reference/commands/intro.md index 5aec8778d..4ac40b6b9 100644 --- a/src/script-reference/commands/intro.md +++ b/src/script-reference/commands/intro.md @@ -7,7 +7,7 @@ 输入一段文字,这段文字会以全屏文字的形式显示在屏幕上。可以使用 `|` 来分割多行文字。 详情请见[黑屏文字](../../webgal-script/dialogue.md#黑屏文字)。 -```webgal +``` webgal intro:这是第一行文字|这是第二行文字|这是第三行文字; ``` @@ -23,7 +23,7 @@ intro:这是第一行文字|这是第二行文字|这是第三行文字; - `medium` - 中号字体 - `large` - 大号字体 -```webgal +``` webgal intro:这是一段话 -fontSize=large; ``` @@ -33,7 +33,7 @@ intro:这是一段话 -fontSize=large; 设置字体颜色,格式如 `rgba(0,0,0,1)`,表示黑色,`rgba(255,255,255,1)` 表示白色。透明度范围为 0 到 1。 -```webgal +``` webgal intro:这是一段话 -fontColor=rgba(48, 135, 206, 1); ``` @@ -43,7 +43,7 @@ intro:这是一段话 -fontColor=rgba(48, 135, 206, 1); 设置背景颜色,格式如 `rgba(0,0,0,1)`,表示黑色,`rgba(255,255,255,1)` 表示白色。透明度范围为 0 到 1。 -```webgal +``` webgal intro:这是一段话 -backgroundColor=rgba(22,22,22,0.8); ``` @@ -52,7 +52,7 @@ intro:这是一段话 -backgroundColor=rgba(22,22,22,0.8); 填写背景图像的路径,将其作为全屏文字的背景图像。若未设置此参数,则使用 `backgroundColor`。 -```webgal +``` webgal intro:这是一段话 -backgroundImage=bg.png; ``` @@ -66,7 +66,7 @@ intro:这是一段话 -backgroundImage=bg.png; - `pixelateEffect`:模糊 - `revealAnimation`:卷轴展开 -```webgal +``` webgal intro:这是第一行文字|这是第二行文字|这是第三行文字 -animation=slideIn; ``` @@ -78,7 +78,7 @@ intro:这是第一行文字|这是第二行文字|这是第三行文字 -animati 设置每行文字的显示延迟时间。 -```webgal +``` webgal intro:这是第一行文字|这是第二行文字|这是第三行文字 -delayTime=1000; ``` @@ -88,7 +88,7 @@ intro:这是第一行文字|这是第二行文字|这是第三行文字 -delayTi 当值为 `true` 时,所有文字显示完毕后,不会自动执行下一句,直到玩家点击屏幕。 当值为 `false` 时,所有文字显示完毕后,自动执行下一句,即使玩家未开启自动播放。 -```webgal +``` webgal intro:这是一段话 -hold; ``` @@ -98,6 +98,6 @@ intro:这是一段话 -hold; 当值为 `true` 时,需要用户手动点击屏幕,才会显示下一行文字,并设置 `hold` 为 `true`,忽略 `delayTime`。 当值为 `false` 时,自动显示下一行文字。 -```webgal +``` webgal intro:这是一段话 -userForward; ``` diff --git a/src/script-reference/commands/jumpLabel.md b/src/script-reference/commands/jumpLabel.md index 94e17f6a7..a7086fe16 100644 --- a/src/script-reference/commands/jumpLabel.md +++ b/src/script-reference/commands/jumpLabel.md @@ -1,20 +1,20 @@ -# jumpLabel - -跳转到指定标签。 -详情请见[标签跳转](../../webgal-script/scenes.md#标签跳转)。 - -## 语句内容 - -填写要跳转的目标标签名称。 - -```webgal -label:think; -; -角色A:我记得她好像喜欢......; -choose:小熊玩偶:wrong|兔子玩偶:correct; -; -label:wrong; -角色A:好像不太对,再想想。; +# jumpLabel + +跳转到指定标签。 +详情请见[标签跳转](../../webgal-script/scenes.md#标签跳转)。 + +## 语句内容 + +填写要跳转的目标标签名称。 + +``` webgal +label:think; +; +角色A:我记得她好像喜欢......; +choose:小熊玩偶:wrong|兔子玩偶:correct; +; +label:wrong; +角色A:好像不太对,再想想。; jumpLabel:think; ; label:correct; @@ -25,7 +25,7 @@ label:correct; `jumpLabel` 可以配合通用参数 `-when` 使用。条件不满足时,本句会被跳过,剧情继续执行下一句。 -```webgal +``` webgal setVar:score=2; jumpLabel:scoreHigh -when=score>1; 角色A:分数不足时会看到这里。; diff --git a/src/script-reference/commands/label.md b/src/script-reference/commands/label.md index 3f94627b2..7bd0b8413 100644 --- a/src/script-reference/commands/label.md +++ b/src/script-reference/commands/label.md @@ -7,7 +7,7 @@ 填写标签名称。该命令本身不执行任何操作,但可以配合 `choose` 和 `jumpLabel` 使用。 -```webgal +``` webgal label:myLabel; ``` diff --git a/src/script-reference/commands/miniAvatar.md b/src/script-reference/commands/miniAvatar.md index ff3e539e8..7cb2b55f3 100644 --- a/src/script-reference/commands/miniAvatar.md +++ b/src/script-reference/commands/miniAvatar.md @@ -7,7 +7,7 @@ 填写小头像图片的路径。当文件路径为空或为 `none` 时,表示隐藏小头像。 详情请见[放置小头像](../../webgal-script/bg-and-figure.md#放置小头像)。 -```webgal +``` webgal miniAvatar:character_a/avatar.png; 角色A:这是角色 A 在说话; miniAvatar:character_b/avatar.png; diff --git a/src/script-reference/commands/pixiInit.md b/src/script-reference/commands/pixiInit.md index b950f9db7..2d0cd162a 100644 --- a/src/script-reference/commands/pixiInit.md +++ b/src/script-reference/commands/pixiInit.md @@ -7,7 +7,7 @@ 不需要填写任何内容。 详情请见[特效](../../webgal-script/special-effect.md)。 -```webgal +``` webgal pixiInit; 初始化舞台特效 pixi:rain; 说话者:下雨了。; diff --git a/src/script-reference/commands/pixiPerform.md b/src/script-reference/commands/pixiPerform.md index 1c600bc49..3d0307c94 100644 --- a/src/script-reference/commands/pixiPerform.md +++ b/src/script-reference/commands/pixiPerform.md @@ -13,7 +13,7 @@ - `snow`:下雪 - `heavySnow`:下大雪 -```webgal +``` webgal pixiInit; 初始化舞台特效 pixiPerform:rain; 说话者:下雨了。; @@ -23,7 +23,7 @@ pixiInit; 清除所有舞台特效 您可以叠加使用两种不同的舞台特效。 -```webgal +``` webgal pixiInit; pixiPerform:rain; pixiPerform:snow; diff --git a/src/script-reference/commands/playEffect.md b/src/script-reference/commands/playEffect.md index dfa068804..21af349da 100644 --- a/src/script-reference/commands/playEffect.md +++ b/src/script-reference/commands/playEffect.md @@ -7,7 +7,7 @@ 填写音效文件的路径。当文件路径为空或为 `none` 时,表示停止播放音效。 详情请见[播放效果音](../../webgal-script/audio.md#播放效果音)。 -```webgal +``` webgal ; 如果没有音效存在,则此句表示播放音效。 playEffect:rain.wav; ; 如果已有音效存在,则此句表示替换音效。 @@ -24,7 +24,7 @@ playEffect:none; 为音效设置 id 后,音效可以循环播放。 不同 id 的音效与无 id 的音效可以叠加播放。 -```webgal +``` webgal ; 循环播放脚步声 playEffect:footsteps.wav -id=footsteps; ; 循环播放雨声 @@ -40,6 +40,6 @@ playEffect:thunder.wav; 设置音效的音量百分比,0 为静音,100 为最大音量。 -```webgal +``` webgal playEffect:rain.wav -id=rain -volume=60; ``` diff --git a/src/script-reference/commands/playVideo.md b/src/script-reference/commands/playVideo.md index f1e620ab7..2052eb4a7 100644 --- a/src/script-reference/commands/playVideo.md +++ b/src/script-reference/commands/playVideo.md @@ -7,7 +7,7 @@ 填写视频文件的路径,全屏播放该视频,图层高于立绘和背景,并临时静音对话语音和背景音乐。 详情请见[视频](../../webgal-script/video.md)。 -```webgal +``` webgal playVideo:video.mp4; ``` @@ -19,6 +19,6 @@ playVideo:video.mp4; 当值为 `true` 时,不允许跳过视频。 当值为 `false` 或不填写该参数时,双击可跳过视频。 -```webgal +``` webgal playVideo:video.mp4 -skipOff; ``` diff --git a/src/script-reference/commands/say.md b/src/script-reference/commands/say.md index 8e651187e..dfd593059 100644 --- a/src/script-reference/commands/say.md +++ b/src/script-reference/commands/say.md @@ -7,7 +7,7 @@ 填写一句话,这句话将出现在对话框中。可以使用 `|` 来分割多行文字。 详情请见[基础](../../webgal-script/base.md)与[对话](../../webgal-script/dialogue)。 -```webgal +``` webgal 说话人:你好,世界!; ``` @@ -23,7 +23,7 @@ 当值为 `true` 时,显示完所有文字后,立刻执行下一条命令,即使玩家未开启自动播放。 -```webgal +``` webgal changeFigure:1/open_eyes.png -next; 角色A:这到底是在干什么啊...... -notend; changeFigure:1/closed_eyes.png -next; @@ -35,7 +35,7 @@ changeFigure:1/closed_eyes.png -next; 当值为 `true` 时,不会清空对话框内已有的文字,而是在此基础上,让新文字接续在后面。 -```webgal +``` webgal changeFigure:1/open_eyes.png -next; 角色A:这到底是在干什么啊...... -notend; changeFigure:1/closed_eyes.png -next; @@ -48,7 +48,7 @@ changeFigure:1/closed_eyes.png -next; 填写说话者的名称,该名称将出现在对话框的说话者栏中。 若未填写此参数,则对话框将继续使用上一次的说话者名称。 -```webgal +``` webgal say:你好,世界! -speaker=角色A; ; 若没有 speaker 参数,角色名继续使用上一次的值 say:世界,你好!; @@ -58,7 +58,7 @@ WebGAL 支持说话者的简化写法。 若句首到第一个英文冒号之间的字符不是命令,那么将其作为说话者名称。 若整句没有英文冒号,即找不到说话者名称,则继续使用上一次的说话者名称。 -```webgal +``` webgal 角色A:你好,世界!; ; 说话者仍然为角色A 世界,你好!; @@ -69,7 +69,7 @@ WebGAL 支持说话者的简化写法。 当值为 `true` 时,将清除说话者,此时对话框的说话者栏不会显示,通常可用于旁白。 -```webgal +``` webgal say:这是一句话。 -speaker=角色A; say:这是一个旁白。 -clear; say:这是一句话。 -speaker=角色B; @@ -77,7 +77,7 @@ say:这是一句话。 -speaker=角色B; WebGAL 支持旁白的简化写法。当句首到第一个英文冒号之间没有一个字符,那么将这句话作为旁白。 -```webgal +``` webgal 角色A:这是一句话。; :这是一句旁白。; 角色B:这是一句话。; @@ -88,13 +88,13 @@ WebGAL 支持旁白的简化写法。当句首到第一个英文冒号之间没 填写声音文件的路径,说话时将播放该声音文件。 -```webgal +``` webgal 角色A:你好,世界! -vocal=hello_world.wav; ``` WebGAL 支持声音文件的简化写法。 -```webgal +``` webgal 角色A:你好,世界! -hello_world.wav; ``` @@ -109,7 +109,7 @@ WebGAL 支持声音文件的简化写法。 当此值被设置后,会传递到之后的对话,直至被再次设置。 -```webgal +``` webgal 角色A:你好,世界! -fontSize=small; 角色A:你好,世界!; 依然是小字体 角色A:你好,世界! -fontSize=large; @@ -121,7 +121,7 @@ WebGAL 支持声音文件的简化写法。 当值为 `true` 时,WebGAL 将尝试驱动左侧立绘张嘴说话。 -```webgal +``` webgal 角色A:你好,世界! -left; ``` @@ -130,7 +130,7 @@ WebGAL 支持声音文件的简化写法。 当值为 `true` 时,WebGAL 将尝试驱动右侧立绘张嘴说话。 -```webgal +``` webgal 角色A:你好,世界! -right; ``` @@ -139,7 +139,7 @@ WebGAL 支持声音文件的简化写法。 当值为 `true` 时,WebGAL 将尝试驱动中间立绘张嘴说话。 -```webgal +``` webgal 角色A:你好,世界! -center; ``` @@ -148,7 +148,7 @@ WebGAL 支持声音文件的简化写法。 填写立绘的 id,WebGAL 将尝试驱动对应 id 的立绘张嘴说话。 -```webgal +``` webgal 角色A:你好,世界! -figureId=aaa; ``` diff --git a/src/script-reference/commands/setAnimation.md b/src/script-reference/commands/setAnimation.md index a5a7e33a6..b49680ced 100644 --- a/src/script-reference/commands/setAnimation.md +++ b/src/script-reference/commands/setAnimation.md @@ -12,26 +12,26 @@ 如果您只想设置单段动画,请使用 [setTransform](setTransform.md) 命令。 ::: -```webgal +``` webgal setAnimation:shake -target=aaa; ``` ## 参数 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setAnimation:shake -target=aaa; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setAnimation:shake -target=aaa -writeDefault; ``` -```webgal +``` webgal ; 假设这是一个特别长的动画 setAnimation:shake -target=aaa -keep -next; 角色A: 第一句话; diff --git a/src/script-reference/commands/setComplexAnimation.md b/src/script-reference/commands/setComplexAnimation.md index 42f96091a..d070306aa 100644 --- a/src/script-reference/commands/setComplexAnimation.md +++ b/src/script-reference/commands/setComplexAnimation.md @@ -10,19 +10,19 @@ - `universalSoftIn`:通用透明度淡入 - `universalSoftOff`:通用透明度淡出 -```webgal +``` webgal setComplexAnimation:universalSoftIn -target=aaa -duration=1000; ``` ## 参数 -```webgal +``` webgal setComplexAnimation:universalSoftIn -target=fig-center -duration=1000; ``` 作用于复杂动画的持续时间。 -```webgal +``` webgal setComplexAnimation:universalSoftIn -target=fig-center -duration=1000; ``` diff --git a/src/script-reference/commands/setTempAnimation.md b/src/script-reference/commands/setTempAnimation.md index 0534b0434..23451a958 100644 --- a/src/script-reference/commands/setTempAnimation.md +++ b/src/script-reference/commands/setTempAnimation.md @@ -12,7 +12,7 @@ 如果您只想设置单段动画,请使用 [setTransform](setTransform.md) 命令。 ::: -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; ; 闪光弹动画 setTempAnimation:[{"duration":0},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":200},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":2500}] -target=aaa; @@ -21,19 +21,19 @@ setTempAnimation:[{"duration":0},{"brightness":2,"contrast":0,"duration":200,"ea ## 参数 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"duration":0},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":200},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":2500}] -target=aaa; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"duration":0},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":200},{"brightness":2,"contrast":0,"duration":200,"ease":"circIn"},{"brightness":1,"contrast":1,"duration":2500}] -target=aaa -writeDefault; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"duration":0},{"scale":{"x":2,"y":2},"duration":10000}] -target=aaa -keep -next; 角色A: 第一句话; diff --git a/src/script-reference/commands/setTextbox.md b/src/script-reference/commands/setTextbox.md index 407cd6307..7cd506ae1 100644 --- a/src/script-reference/commands/setTextbox.md +++ b/src/script-reference/commands/setTextbox.md @@ -1,7 +1,7 @@ -# setTextbox - -显示和隐藏文本框的二合一命令。 - +# setTextbox + +显示和隐藏文本框的二合一命令。 + ## 语句内容 填写 `hide` 时,隐藏对话框,其他任何字符串均表示显示对话框。 @@ -9,13 +9,13 @@ ::: info 用 `setTextbox` 隐藏对话框后,若后续没有其他 `setTextbox` 命令显示对话框,则对话框将一直保持隐藏状态。 -::: - -如果用 `setTextbox` 显示对话框,但是对话框仍然没有出现,可能是因为以下情况: -- 说话内容与角色名均为空 -- 开启了 __隐藏所有 UI__ - -```webgal +::: + +如果用 `setTextbox` 显示对话框,但是对话框仍然没有出现,可能是因为以下情况: +- 说话内容与角色名均为空 +- 开启了 __隐藏所有 UI__ + +``` webgal 角色A:带你去一个地方。; setTextbox:hide; changeBg:shop.png; diff --git a/src/script-reference/commands/setTransform.md b/src/script-reference/commands/setTransform.md index eb30711d1..ce46030aa 100644 --- a/src/script-reference/commands/setTransform.md +++ b/src/script-reference/commands/setTransform.md @@ -10,7 +10,7 @@ 此命令只生成一段动画,如果您需要设置多段动画,请使用 [setAnimation](setAnimation.md) 或 [setTempAnimation](setTempAnimation.md) 命令。 ::: -```webgal +``` webgal changeFigure:character_a/normal.png -id=aaa; ; 向左移动 setTransform:{"position":{"x":-500},"saturation":0.8} -target=aaa -duration=500; @@ -21,36 +21,36 @@ setTransform:{"brightness":0.5,"contrast":1.2} -target=aaa -duration=500; ## 参数 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTransform:{"brightness":0.5} -target=aaa -duration=500; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTransform:{"brightness":0.5} -target=aaa -duration=500; ``` - -```webgal -changeFigure:1/open_eyes.png -id=aaa; -setTransform:{"brightness":0.5} -target=aaa -duration=500 -ease=linear; -``` + +``` webgal +changeFigure:1/open_eyes.png -id=aaa; +setTransform:{"brightness":0.5} -target=aaa -duration=500 -ease=linear; +``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTransform:{"brightness":0.5} -target=aaa -duration=500 -writeDefault; ``` -```webgal -; 假设这是一个特别长的动画 -setTransform:{"scale":{"x":2,"y":2}} -target=aaa -duration=10000 -keep -next; -角色A: 第一句话; -角色A: 第二句话; -角色A: 第三句话; -; 这会打断 aaa 的跨语句动画,并播放新动画 -setTransform:{"scale":{"x":1,"y":1}} -target=aaa -duration=10000 -keep -next; -``` +``` webgal +; 假设这是一个特别长的动画 +setTransform:{"scale":{"x":2,"y":2}} -target=aaa -duration=10000 -keep -next; +角色A: 第一句话; +角色A: 第二句话; +角色A: 第三句话; +; 这会打断 aaa 的跨语句动画,并播放新动画 +setTransform:{"scale":{"x":1,"y":1}} -target=aaa -duration=10000 -keep -next; +``` diff --git a/src/script-reference/commands/setTransition.md b/src/script-reference/commands/setTransition.md index 5fedc2bd2..8fffbd968 100644 --- a/src/script-reference/commands/setTransition.md +++ b/src/script-reference/commands/setTransition.md @@ -7,7 +7,7 @@ 不需要填写任何语句内容。 详情请见[设置进出场效果](../../webgal-script/animation.md#设置进出场效果)。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -next; setTransition: -target=aaa -enter=enter-from-left; 角色A: 你好! @@ -19,21 +19,21 @@ changeFigure:none -id=aaa -next; ## 参数 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -next; setTransition: -target=aaa -enter=enter-from-left; 角色A: 你好! ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -next; setTransition: -target=aaa -enter=enter-from-left; 角色A: 你好! ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -next; 角色A: 你好! setTransition: -target=aaa -exit=exit-to-right; diff --git a/src/script-reference/commands/setVar.md b/src/script-reference/commands/setVar.md index 0c130a730..8291c0ec0 100644 --- a/src/script-reference/commands/setVar.md +++ b/src/script-reference/commands/setVar.md @@ -14,7 +14,7 @@ WebGAL 会尝试将无法识别的值类型,转换为字符串。 -```webgal +``` webgal setVar:char_b_fav=15; 角色 B 初始好感度 ; 角色B:呐呐,看不看得出来我今天哪里不一样?; @@ -56,7 +56,7 @@ changeScene:chapter_02/part_01.txt; 当值为 `true` 时,表示设置一个长效(全局)变量。长效变量在整个游戏中生效,除非用户清除全部数据。 当值为 `false` 时,表示设置一个普通变量。普通变量只在当前场景中生效,存档后会被保存,读档后恢复。 -```webgal +``` webgal ; 假设这是新游戏的开头 ; 如果已经是多周目了,就直接跳到多周目专用的剧情 jumpLabel:another_life -when=multiple_playthroughs; diff --git a/src/script-reference/commands/showVars.md b/src/script-reference/commands/showVars.md index e45de6d2c..362a8f27f 100644 --- a/src/script-reference/commands/showVars.md +++ b/src/script-reference/commands/showVars.md @@ -6,6 +6,6 @@ 不需要填写任何内容。 -```webgal +``` webgal showVars; ``` diff --git a/src/script-reference/commands/unlockBgm.md b/src/script-reference/commands/unlockBgm.md index 602986818..277dd19b3 100644 --- a/src/script-reference/commands/unlockBgm.md +++ b/src/script-reference/commands/unlockBgm.md @@ -6,7 +6,7 @@ 填写音乐的路径。 -```webgal +``` webgal unlockBgm:school/morning.mp3 -name=学校的早晨; ``` @@ -16,12 +16,12 @@ unlockBgm:school/morning.mp3 -name=学校的早晨; 若不填写 `name`,则以音乐的路径作为名称。 -```webgal +``` webgal unlockBgm:school/morning.mp3 -name=学校的早晨; ``` ### series -```webgal +``` webgal unlockBgm:school/morning.mp3 -name=早晨 -series=学校; ``` diff --git a/src/script-reference/commands/unlockCg.md b/src/script-reference/commands/unlockCg.md index c83251d4e..67a90679a 100644 --- a/src/script-reference/commands/unlockCg.md +++ b/src/script-reference/commands/unlockCg.md @@ -6,7 +6,7 @@ 填写图片的路径。 -```webgal +``` webgal unlockCg:chapter_03/date.png -name=第一次约会; ``` @@ -16,12 +16,12 @@ unlockCg:chapter_03/date.png -name=第一次约会; 若不填写 `name`,则以图片的路径作为名称。 -```webgal +``` webgal unlockCg:chapter_03/date.png -name=第一次约会; ``` ### series -```webgal +``` webgal unlockCg:chapter_03/date.png -name=第一次约会 -series=角色B; ``` diff --git a/src/script-reference/commands/wait.md b/src/script-reference/commands/wait.md index 88d70d5e0..3a090bed7 100644 --- a/src/script-reference/commands/wait.md +++ b/src/script-reference/commands/wait.md @@ -7,7 +7,7 @@ 填写一个数字,作为等待时间,单位为毫秒。 有时出于演出效果的需要,可能需要等待一段时间,再执行下一句。 -```webgal +``` webgal 角色A:让我想想; 角色A:......; wait:5000; 等待 5 秒 diff --git a/src/script-reference/others/animation-reference.md b/src/script-reference/others/animation-reference.md index b3bc854f7..ace047699 100644 --- a/src/script-reference/others/animation-reference.md +++ b/src/script-reference/others/animation-reference.md @@ -58,7 +58,7 @@ WebGAL 支持设置连续的 [变换效果](../others/transform-reference.md) 继承现有值的「现有值」是指,在执行动画前,目标对象的变换效果快照,而不是上一个动画片段的结束状态。 ::: -```webgal +``` webgal ; 立绘对象初始坐标为 (-500,0) changeFigure:character_a/normal.png -id=aaa -transform={"position":{"x":-500,"y":0}}; ; 多段动画的坐标依次为 @@ -69,7 +69,7 @@ setTempAnimation:[{"duration":0},{"position":{"x":500},"duration":500},{"positio 动画里的第一个片段为起始状态,通常 duration 设为 0 即可,即使设置了大于 0 的数,也不会有动画效果。 您仍然可以为第一个片段设置变换效果属性,这样可以在动画开始时直接跳转到指定状态。 -```webgal +``` webgal ; 立绘对象初始坐标为 (0,0) changeFigure:character_a/normal.png -id=aaa; ; 从左走到右,动画开始时直接跳转到左边 @@ -85,14 +85,14 @@ setTempAnimation:[{"position":{"x":-500},"duration":0},{"position":{"x":500},"du 每个动画片段的持续时间。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"position":{"x":-500},"duration":0},{"position":{"x":500},"duration":1000}] -target=aaa; ``` -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa; setTempAnimation:[{"position":{"x":-500},"duration":0},{"position":{"x":500},"duration":1000,"ease":"bounceOut"}] -target=aaa; ``` diff --git a/src/script-reference/others/transform-reference.md b/src/script-reference/others/transform-reference.md index bdfb283ac..bf0acbcc0 100644 --- a/src/script-reference/others/transform-reference.md +++ b/src/script-reference/others/transform-reference.md @@ -2,12 +2,12 @@ `transform` 是舞台对象的变换效果属性,包含位置、旋转、缩放与各种滤镜属性。其格式如下面例子所示: -```json +``` json {"position":{"x":0,"y":0},"rotation":0,"scale":{"x":1,"y":1},"alpha":1,"blur":0,"colorRed":255,"colorGreen":255,"colorBlue":255} ``` 通常不需要完整书写所有的属性,您可以只写入需要修改的属性,未修改的属性将根据具体情况,继承现有值或者使用默认值。 -```webgal +``` webgal setTransform:{"position":{"x":100},"rotation":45} -target=aaa -duration=500; ; 此句会继承已有的变换效果,并在此基础上修改了模糊滤镜的值 setTransform:{"blur":20} -target=aaa -duration=500; @@ -16,7 +16,7 @@ setTransform:{"saturation":0} -target=aaa -duration=500 -writeDefault; ``` 对于滤镜属性,仅当该滤镜的所有值都为默认值时,该滤镜才会彻底关闭。否则该滤镜会持续存在,直至该对象退场,这可能会导致一些不必要的性能消耗,因此推荐开发者在必要时,显式修改相关属性为默认值以关闭滤镜。 -```webgal +``` webgal changeBg:bg.png -transform={"brightness":0.5,"blur":10} -next; changeFigure:1/open_eyes.png -id=aaa; ; @@ -51,7 +51,7 @@ setTransform:{"bloomBlur":0,"bloomThreshold":0} -target=aaa -duration=500; 位置。修改其 x 和 y 属性可以改变对象在舞台中的坐标。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"position":{"x":500,"y":-50}}; setTransform:{"position":{"x":-200,"y":50}} -target=aaa -duration=500; ``` @@ -62,7 +62,7 @@ setTransform:{"position":{"x":-200,"y":50}} -target=aaa -duration=500; 旋转。改变对象的旋转弧度,以顺时针为正方向。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"rotation":-3.14}; setTransform:{"rotation":1.57} -target=aaa -duration=500; ``` @@ -72,7 +72,7 @@ setTransform:{"rotation":1.57} -target=aaa -duration=500; 缩放。修改其 x 和 y 属性可以改变对象的缩放比例。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"scale":{"x":0.5,"y":0.5}}; setTransform:{"scale":{"x":2,"y":2}} -target=aaa -duration=500; ``` @@ -85,7 +85,7 @@ setTransform:{"scale":{"x":2,"y":2}} -target=aaa -duration=500; 透明度。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"alpha":0.8}; setTransform:{"alpha":0.2} -target=aaa -duration=500; ``` @@ -97,7 +97,7 @@ setTransform:{"alpha":0.2} -target=aaa -duration=500; 模糊。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"blur":10}; setTransform:{"blur":30} -target=aaa -duration=500; ``` @@ -109,7 +109,7 @@ setTransform:{"blur":30} -target=aaa -duration=500; 亮度。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"brightness":0.3}; setTransform:{"brightness":1.5} -target=aaa -duration=500; ``` @@ -119,7 +119,7 @@ setTransform:{"brightness":1.5} -target=aaa -duration=500; 对比度。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"contrast":0.3}; setTransform:{"contrast":2} -target=aaa -duration=500; ``` @@ -129,7 +129,7 @@ setTransform:{"contrast":2} -target=aaa -duration=500; 饱和度。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"saturation":0.3}; setTransform:{"saturation":2} -target=aaa -duration=500; ``` @@ -139,7 +139,7 @@ setTransform:{"saturation":2} -target=aaa -duration=500; 伽马值。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"gamma":0.5}; setTransform:{"gamma":1.2} -target=aaa -duration=500; ``` @@ -150,7 +150,7 @@ setTransform:{"gamma":1.2} -target=aaa -duration=500; 色调的红色分量。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"colorRed":128}; setTransform:{"colorRed":64} -target=aaa -duration=500; ``` @@ -161,7 +161,7 @@ setTransform:{"colorRed":64} -target=aaa -duration=500; 色调的绿色分量。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"colorGreen":128}; setTransform:{"colorGreen":64} -target=aaa -duration=500; ``` @@ -172,7 +172,7 @@ setTransform:{"colorGreen":64} -target=aaa -duration=500; 色调的蓝色分量。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"colorBlue":128}; setTransform:{"colorBlue":64} -target=aaa -duration=500; ``` @@ -185,7 +185,7 @@ setTransform:{"colorBlue":64} -target=aaa -duration=500; 泛光的强度。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"bloom":0.5,"bloomBlur":10}; setTransform:{"bloom":1,"bloomBlur":10} -target=aaa -duration=500; ``` @@ -195,7 +195,7 @@ setTransform:{"bloom":1,"bloomBlur":10} -target=aaa -duration=500; 泛光的亮度。与颜色调整滤镜的 `brightness` 的区别在于,此参数不会影响泛光叠加层的亮度。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"bloom":1,"bloomBrightness":0.5,"bloomBlur":10}; setTransform:{"bloom":1,"bloomBrightness":1,"bloomBlur":10} -target=aaa -duration=500; ``` @@ -207,7 +207,7 @@ setTransform:{"bloom":1,"bloomBrightness":1,"bloomBlur":10} -target=aaa -duratio 泛光的模糊程度。若 `bloom` 和 `bloomBrightness` 均为默认值,单独调整此属性不会有任何视觉上的区别。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"bloom":1,"bloomBlur":0}; setTransform:{"bloom":1,"bloomBlur":30} -target=aaa -duration=500; ``` @@ -218,7 +218,7 @@ setTransform:{"bloom":1,"bloomBlur":30} -target=aaa -duration=500; 泛光的阈值。当数值调高时,仅图像中较亮的部分会产生泛光效果。若 `bloom` 和 `bloomBrightness` 均为默认值,单独调整此属性不会有任何视觉上的区别。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"bloom":1,"bloomBlur":10,"bloomThreshold":0}; setTransform:{"bloom":1,"bloomBlur":10,"bloomThreshold":0.8} -target=aaa -duration=500; ``` @@ -231,7 +231,7 @@ setTransform:{"bloom":1,"bloomBlur":10,"bloomThreshold":0.8} -target=aaa -durati 倒角的透明度。如果 `bevelThickness` 为 0,单独调整此属性不会有任何视觉上的区别。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"bevel":0.5,"bevelThickness":20}; setTransform:{"bevel":1,"bevelThickness":20} -target=aaa -duration=500; ``` @@ -243,7 +243,7 @@ setTransform:{"bevel":1,"bevelThickness":20} -target=aaa -duration=500; 倒角的厚度。如果 `bevel` 为 0,单独调整此属性不会有任何视觉上的区别。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"bevel":1,"bevelThickness":20}; setTransform:{"bevel":1,"bevelThickness":30} -target=aaa -duration=500; ``` @@ -254,7 +254,7 @@ setTransform:{"bevel":1,"bevelThickness":30} -target=aaa -duration=500; 倒角颜色的红色分量。如果 `bevel` 或 `bevelThickness` 为默认值,单独调整此属性不会有任何视觉上的区别。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"bevel":1,"bevelThickness":20,"bevelRed":128}; setTransform:{"bevel":1,"bevelThickness":20,"bevelRed":64} -target=aaa -duration=500; ``` @@ -265,7 +265,7 @@ setTransform:{"bevel":1,"bevelThickness":20,"bevelRed":64} -target=aaa -duration 倒角颜色的绿色分量。如果 `bevel` 或 `bevelThickness` 为默认值,单独调整此属性不会有任何视觉上的区别。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"bevel":1,"bevelThickness":20,"bevelGreen":128}; setTransform:{"bevel":1,"bevelThickness":20,"bevelGreen":64} -target=aaa -duration=500; ``` @@ -276,7 +276,7 @@ setTransform:{"bevel":1,"bevelThickness":20,"bevelGreen":64} -target=aaa -durati 倒角颜色的蓝色分量。如果 `bevel` 或 `bevelThickness` 为默认值,单独调整此属性不会有任何视觉上的区别。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"bevel":1,"bevelThickness":20,"bevelBlue":128}; setTransform:{"bevel":1,"bevelThickness":20,"bevelBlue":64} -target=aaa -duration=500; ``` @@ -289,7 +289,7 @@ setTransform:{"bevel":1,"bevelThickness":20,"bevelBlue":64} -target=aaa -duratio 老电影滤镜的开关。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"oldFilm":1}; setTransform:{"oldFilm":0} -target=aaa -duration=500; ``` @@ -300,7 +300,7 @@ setTransform:{"oldFilm":0} -target=aaa -duration=500; 点状滤镜的开关。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"dotFilm":1}; setTransform:{"dotFilm":0} -target=aaa -duration=500; ``` @@ -311,7 +311,7 @@ setTransform:{"dotFilm":0} -target=aaa -duration=500; RGB 分离滤镜的开关。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"rgbFilm":1}; setTransform:{"rgbFilm":0} -target=aaa -duration=500; ``` @@ -322,7 +322,7 @@ setTransform:{"rgbFilm":0} -target=aaa -duration=500; 故障滤镜的开关。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"glitchFilm":1}; setTransform:{"glitchFilm":0} -target=aaa -duration=500; ``` @@ -333,7 +333,7 @@ setTransform:{"glitchFilm":0} -target=aaa -duration=500; 光辉滤镜的开关。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"godrayFilm":1}; setTransform:{"godrayFilm":0} -target=aaa -duration=500; ``` @@ -344,7 +344,7 @@ setTransform:{"godrayFilm":0} -target=aaa -duration=500; 反射滤镜的开关。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"reflectionFilm":1}; setTransform:{"reflectionFilm":0} -target=aaa -duration=500; ``` @@ -354,7 +354,7 @@ setTransform:{"reflectionFilm":0} -target=aaa -duration=500; 冲击波的相位。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"shockwave":0}; setTransform:{"shockwave":1} -target=aaa -duration=500; ``` @@ -364,7 +364,7 @@ setTransform:{"shockwave":1} -target=aaa -duration=500; 径向渐变透明的半径。 -```webgal +``` webgal changeFigure:1/open_eyes.png -id=aaa -transform={"radiusAlpha":0.2}; setTransform:{"radiusAlpha":1.5} -target=aaa -duration=500; ``` diff --git a/src/spine.md b/src/spine.md index 5e7a45671..454539f4e 100644 --- a/src/spine.md +++ b/src/spine.md @@ -30,7 +30,7 @@ THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY EXPRESS 2、在 `package/webgal` 包中使用 yarn 安装 pixi-spine -``` +``` bash cd package/webgal yarn add pixi-spine@3.1.2 ``` @@ -39,7 +39,7 @@ yarn add pixi-spine@3.1.2 注意到以下被注释的行(大约从 30 行开始),取消注释即可。 -``` +``` typescript // pixiSpineLoading = import('pixi-spine') // .then((module) => { // spineLoader = new PIXI.Loader(); @@ -63,23 +63,23 @@ yarn add pixi-spine@3.1.2 例如: ``` -game/ - figure/ - exampleSpine/ - data.json - atlas.atlas - skeleton.skel +game +└── figure + └── exampleSpine + ├── data.json + ├── atlas.atlas + └── skeleton.skel ``` 如果你使用的是 JSON 格式的 Spine 立绘,你需要使用类似以下脚本的方式传入类型,以使引擎识别其类型为 Spine。 -``` +``` webgal changeFigure:exampleSpine/data.json?type=spine; ``` 如果你需要切换 Spine 动画,继续使用 `motion` 参数;如果你需要切换 Spine 的皮肤,则使用 `skin` 参数。 -``` +``` webgal changeFigure:exampleSpine/data.json?type=spine -motion=anime_00_wait; changeFigure:exampleSpine/data.json?type=spine -skin=default; changeFigure:exampleSpine/data.json?type=spine -motion=anime_03_surprise -skin=03_surprise; diff --git a/src/tech/readme.md b/src/tech/readme.md index 2a4168e5c..213a962ca 100644 --- a/src/tech/readme.md +++ b/src/tech/readme.md @@ -20,7 +20,7 @@ WebGAL 场景文件主要是以行来区分脚本的。在解析的一开始,W WebGAL 的脚本一般是形如 -``` +``` webgal command:content -arg1 -arg2 ......;comment ``` @@ -32,7 +32,7 @@ command:content -arg1 -arg2 ......;comment WebGAL 的对话一般以如下形式书写: -``` +``` webgal 森川由绮:胸につかえていることを、时は解决してくれない。忘却のラベルを贴るだけで -voice_1.ogg; ``` @@ -40,13 +40,13 @@ WebGAL 的对话一般以如下形式书写: 所以,这段对话的真正表示应该为: -``` +``` webgal say:胸につかえていることを、时は解决してくれない。忘却のラベルを贴るだけで -speaker=森川由绮 vocal=voice_1.ogg; ``` 除此以外,如果对话由一个人物发出,那么在对话人发生改变前,还可以省略人物名称: -``` +``` webgal 森川由绮:胸につかえていることを; 时は解决してくれない; 忘却のラベルを贴るだけで; diff --git a/src/template-reference/ui/choose.md b/src/template-reference/ui/choose.md index 199a722bd..884b8cb4d 100644 --- a/src/template-reference/ui/choose.md +++ b/src/template-reference/ui/choose.md @@ -6,7 +6,7 @@ ## 结构 {#structure} -```tsx +``` tsx return (