{"id":27117031,"url":"https://github.com/serena1432/smoothtransition","last_synced_at":"2025-10-17T02:45:13.001Z","repository":{"id":243891715,"uuid":"813681178","full_name":"Serena1432/SmoothTransition","owner":"Serena1432","description":"A plugin handling smooth transtions for any RPG Maker MV/MZ games.","archived":false,"fork":false,"pushed_at":"2024-06-12T01:41:44.000Z","size":1983,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T05:53:35.697Z","etag":null,"topics":["javascript","javascript-games","javascript-plugins","rpg-maker","rpg-maker-mv","rpg-maker-mv-plugins","smooth-transition","smooth-transitions","transition","transition-animation"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Serena1432.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-11T14:36:55.000Z","updated_at":"2024-06-12T01:41:07.000Z","dependencies_parsed_at":"2024-06-11T21:19:26.517Z","dependency_job_id":"d570e7ea-a6d6-4ce7-ac83-90c958a320e8","html_url":"https://github.com/Serena1432/SmoothTransition","commit_stats":null,"previous_names":["serena1432/smoothtransition"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Serena1432/SmoothTransition","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Serena1432%2FSmoothTransition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Serena1432%2FSmoothTransition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Serena1432%2FSmoothTransition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Serena1432%2FSmoothTransition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Serena1432","download_url":"https://codeload.github.com/Serena1432/SmoothTransition/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Serena1432%2FSmoothTransition/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279274141,"owners_count":26138398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","javascript-games","javascript-plugins","rpg-maker","rpg-maker-mv","rpg-maker-mv-plugins","smooth-transition","smooth-transitions","transition","transition-animation"],"created_at":"2025-04-07T05:53:42.432Z","updated_at":"2025-10-17T02:45:12.955Z","avatar_url":"https://github.com/Serena1432.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SmoothTransition\n\n**SmoothTransition** is a RPG Maker MV/MZ plugin for handling smooth transitions, aiming to improve user experience(?) and look \u0026 feel for players, and replace the boring default `linear` transition.\n\n![Comparision](./comparison.gif)\n\n## Supported transition types\n\nCurrently, only 7 types of transitions are supported because I'm too lazy  💀\n\n* `linear`\n\n* `easeIn`\n\n* `easeOut`\n\n* `easeInOut`\n\n* `easeInCubic`\n\n* `easeOutCubic`\n\n* `easeInOutCubic`\n\nOf course I will add more soon, but you can add one yourself and create a Pull Request if you want ;)\n\n## Downloading the latest version\n\nYou can download the latest version from [the Releases page](https://github.com/Serena1432/SmoothTransition/releases), or you can simply clone this repository. It's about the same thing.\n\n## Installation\n\nAfter downloading, you should put it into the `js/plugins` folder of your RPG Maker MV/MZ game. After that, go to the **Plugin Manager** section (or press \u003ckbd\u003eF10\u003c/kbd\u003e) and add the **SmoothTransition** plugin into the list.\n\nChange the Plugin Parameters as you want, save the project and then you can use the plugin!\n\n## Usage\n\nThis plugin provides both **Script Commands** and **Plugin Commands**, and you can use either way that you want.\n\n### Script Commands (API Documentation)\n\n#### `SmoothTransition` class\n\nThis is a static class used to define global properties and functions used by Plugin or Script Commands.\n\n##### Properties\n\n###### `SmoothTransition.defaultTransitionType`\n\n* **Type:** `string`\n\n* **Assignable:** Yes\n\n* **Default Value**: `\"easeOut\"`\n\nThe default transition type that will be used for all transitions (if no specific transition type is defined).\n\nAssign a new value to this property to switch to another transition type.\n\n###### `SmoothTransition.overwritePictureTransition`\n\n* **Type:** `boolean`\n\n* **Assignable**: Yes\n\n* **Default Value**: `true`\n\nEnable/disable overwriting the default picture transition in the game (replacing default `linear` transition with SmoothTransition in Move Picture command).\n\nAssign a new value to this property to switch to enable/disable it.\n\n###### `SmoothTransition.transitionTypes`\n\n* **Type:** `object` of `function`\n\n* **Assignable:** Yes\n\nContains a list of objects with functions for each `transitionType` to calculate the values.\n\nThis property is assignable with new `transitionType` like the code below:\n\n```js\nSmoothTransition.transitionTypes[\"easeOut\"] = function(value) {\n    return Math.sin((value * Math.PI) / 2);\n}\n```\n\nOther functions will call the methods in `SmoothTransition.transitionTypes` with this argument below:\n\n| **Argument** | **Type** | **Required** | **Description**                   |\n| ------------ | -------- | ------------ | --------------------------------- |\n| `value`      | `number` | Yes          | The input value to be calculated. |\n\nThen that method have to return a value as described below:\n\n| **Property** | **Type** | **Description**              |\n| ------------ | -------- | ---------------------------- |\n| `value`      | `number` | The calculated/output value. |\n\n##### Methods\n\n###### `SmoothTransition.getValue(value, reverse = false, transitionType)`\n\n* **Type:** `function`\n\nCalculate a value using the given transition type.\n\n* **Passable Arguments:**\n\n| **Argument**     | **Type**  | **Required** | **Description**                                                                                                                           |\n| ---------------- | --------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| `value`          | `number`  | Yes          | The input value to be calculated.\u003cbr/\u003eMust be between `0` and `1`.                                                                        |\n| `reverse`        | `boolean` | No           | Whether the result is reversed (from `1` to `0` instead of `0` to `1`).\u003cbr/\u003eDefault value is `false`.                                     |\n| `transitionType` | `string`  | No           | The transition type will be used for transitioning.\u003cbr/\u003eDefault value is the previously defined `SmoothTransition.defaultTransitionType`. |\n\n* **Returns**: `number`\n  This function will return the output value calculated from the defined transition type.\n\n* **Examples**:\n\n```js\nSmoothTransition.getValue(0.5, false, \"easeOut\");\n// 0.7071067811865475\n```\n\n###### `SmoothTransition.processTransition(time, callback, transitionType)`\n\n* **Type:** `function`\n\nProcess a transition using the duration, callback function and transition type given.\n\n* **Passable Arguments**:\n\n| **Argument**     | **Type**          | **Required** | **Description**                                                                                                                                                    |\n| ---------------- | ----------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `time`           | `number`          | Yes          | The transition duration defined for transitioning the value from `0` to `1` (in miliseconds).                                                                      |\n| `callback`       | `function(value)` | Yes          | The callback function that will be called each time the output value changes.\u003cbr/\u003eThe only passed argument will be `value` (`number`) containing the output value. |\n| `transitionType` | `string`          | No           | The transition type will be used for transitioning.\u003cbr/\u003eDefault value is the previously defined `SmoothTransition.defaultTransitionType`.                          |\n\n* **Returns**: `number`\n  This function will return a number containing the Interval ID that you can use with the `clearInterval` function to stop the transition midway.\n\n* **Examples**:\n\n```js\nvar intervalId = SmoothTransition.processTransition(1000, (value) =\u003e {\n    var x = Math.floor(640 * value) + 320; // x will be transitioning from 320 to 640\n    var y = Math.floor(240 * value) + 120; // y will be transitioning from 120 to 360\n    $gameScreen.showPicture(1, \"picture\", 0, x, y, 100, 100, opacity, 0);\n    // The picture will be transitioning from (320, 120) to (960, 360)\n}, \"easeOut\");\n// Returns a number containing the Interval ID\nclearInterval(intervalId);\n// Use the command above if you want to stop the transition midway\n```\n\n###### `SmoothTransition.parseVariable(input)`\n\n* **Type:** `function`\n\nParse the given variable input into integer. Supports referencing a variable from current RPG Maker save file.\n\n* **Passable Arguments:**\n\n| **Argument** | **Type** | **Required** | **Description**                                                                                                                                                          |\n| ------------ | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `input`      | `string` | Yes          | The input value to be calculated.\u003cbr/\u003eYou can also pass `\\V[n]` (as same as in RPG Maker MV's Show Text command) to reference a variable in current RPG Maker save file. |\n\n* **Returns**: `?number`\n  This function will return a number containing the parsed value from the input given.\n\n* **Examples**:\n\n```js\n// Parsing a normal number\nSmoothTransition.parseVariable(\"29\");\n// 29\n\n// Referencing the value from a variable\nSmoothTransition.parseVariable(\"\\\\V[11]\");\n// Will be the same as $gameVariables.value(11)\n```\n\n#### `Game_Transition` class\n\n```js\nnew Game_Transition(id, variable, time, command, interpreter)\n```\n\nA general class containing the data for a SmoothTransition.\n\n##### Properties\n\n###### `_id`\n\n* **Type:** `number`\n\n* **Assignable:** Yes\n\nThe current transition ID.\n\n###### `_variables`\n\n* **Type:** `object`\n\n* **Assignable**: Yes\n\nThe transition's variables data. It's an object containing these two child properties:\n\n| **Property** | **Type** | **Description**                                                |\n| ------------ | -------- | -------------------------------------------------------------- |\n| `start`      | `number` | The value assigned to the variable when the transition starts. |\n| `end`        | `number` | The value assigned to the variable when the transition ends.   |\n\n###### `_time`\n\n- **Type:** `?number`\n\n- **Assignable**: Yes\n\nThe transition's given duration.\n\n###### `_command`\n\n- **Type:** `?string`\n\n- **Assignable**: Yes\n\nThe Plugin Command that will be run each time the transition's current value changes. You can also use `|` (with spaces) to split multiple Plugin Commands.\n\n###### `_interpreter`\n\n- **Type:** `?Game_Interpreter`\n\n- **Assignable**: Yes\n\nThe transition's assigned interpreter. Required to be able to call Plugin Commands.\n\n###### `_interval`\n\n- **Type:** `?number`\n\n- **Assignable**: No\n\nThe transition's current Interval ID. Will be assigned automatically when the transition starts.\n\n##### Methods\n\n###### `value(name)`\n\n- **Type:** `function`\n\n- **Passable Arguments:**\n\n| **Argument** | **Type** | **Required** | **Description**    |\n| ------------ | -------- | ------------ | ------------------ |\n| `name`       | `string` | Yes          | The variable name. |\n\n- **Returns**: `number`\n  Return the transition's variable value by name.\n\nCan be overwritten by other plugins.\n\n###### `setValue(name, value)`\n\n- **Type:** `function`\n\n- **Passable Arguments:**\n\n| **Argument** | **Type** | **Required** | **Description**           |\n| ------------ | -------- | ------------ | ------------------------- |\n| `name`       | `string` | Yes          | The variable name.        |\n| `value`      | `number` | Yes          | The variable's new value. |\n\nSet a new value for a transition variable.\n\nCan be overwritten by other plugins.\n\n###### `time()`\n\n* **Type:** `function`\n\n* **Returns**: `?number`\n  Return the transition's given duration.\n\nCan be overwritten by other plugins.\n\n###### `setTime(value)`\n\n- **Type:** `function`\n\n- **Passable Arguments:**\n\n| **Argument** | **Type** | **Required** | **Description**              |\n| ------------ | -------- | ------------ | ---------------------------- |\n| `value`      | `number` | Yes          | The new transition duration. |\n\nSet a new duration for the transition.\n\nCan be overwritten by other plugins.\n\n###### `command()`\n\n- **Type:** `function`\n\n- **Returns**: `?string`\n  Return the transition's current Plugin Command.\n\nCan be overwritten by other plugins.\n\n###### `setCommand(command)`\n\n- **Type:** `function`\n\n- **Passable Arguments:**\n\n| **Argument** | **Type** | **Required** | **Description**                      |\n| ------------ | -------- | ------------ | ------------------------------------ |\n| `command`    | `string` | Yes          | The transition's new Plugin Command. |\n\nSet a new Plugin Command for the transition.\n\nCan be overwritten by other plugins.\n\n###### `interpreter()`\n\n- **Type:** `function`\n\n- **Returns**: `?Game_Interpreter`\n  Return the transition's current interpreter.\n\nCan be overwritten by other plugins.\n\n###### `setInterpreter(interpreter)`\n\n- **Type:** `function`\n\n- **Passable Arguments:**\n\n| **Argument**  | **Type**           | **Required** | **Description**                 |\n| ------------- | ------------------ | ------------ | ------------------------------- |\n| `interpreter` | `Game_Interpreter` | Yes          | The new transition interpreter. |\n\nSet a new interpreter for the transition.\n\nCan be overwritten by other plugins.\n\n###### `start()`\n\n* **Type:** `function`\n\nStart the transition with the data given.\n\nRequires `_variables`, `_time`, `_command` and `_interpreter` properties to be defined. If not, you can set those up using `setValue()`, `setTime()`, `setCommand()`, and `setInterpreter()`.\n\nCan be overwritten by other plugins.\n\n###### `stop()`\n\n- **Type:** `function`\n\nStop the current transition. Do nothing if the transition hasn't started yet.\n\nCan be overwritten by other plugins.\n\n###### `clear()`\n\n- **Type:** `function`\n\nClear all transition data.\n\n#### `Game_Transitions` class\n\n```js\nnew Game_Transitions()\n```\n\nA general class representing the transition container, containing data from all SmoothTransitions.\n\nThis will be assigned into `$gameVariables.transitions` when the first Plugin Command runs.\n\n##### Properties\n\n###### `_transitions`\n\n* **Type:** `object`\n\nAn object containing all `Game_Transition` by transition IDs.\n\n##### Methods\n\n###### `transition(id)`\n\n* **Type:** `function`\n\n* **Passable Arguments**:\n\n| **Argument** | **Type** | **Required** | **Description**    |\n| ------------ | -------- | ------------ | ------------------ |\n| `id`         | `number` | Yes          | The transition ID. |\n\n* **Returns**: `?Game_Transition`\n  Return the transition data if the transition ID is valid.\n\nCan be overwritten by other plugins.\n\n###### `setTransition(id, {variables, time, command, interpreter})`\n\n- **Type:** `function`\n\n- **Passable Arguments**:\n\n| **Argument** | **Type** | **Required** | **Description**          |\n| ------------ | -------- | ------------ | ------------------------ |\n| `id`         | `number` | Yes          | The transition ID.       |\n| `data`       | `object` | Yes          | The new transition data. |\n\n* The `data` object argument will have these child properties:\n\n| **Property**       | **Type**           | **Required** | **Description**                                                                                                   |\n| ------------------ | ------------------ | ------------ | ----------------------------------------------------------------------------------------------------------------- |\n| `data.variables`   | `object`           | Yes          | See `Game_Transition.prototype._variables`.                                                                       |\n| `data.time`        | `number`           | Yes          | The new transition duration.                                                                                      |\n| `data.command`     | `string`           | Yes          | The transition's new Plugin Command.\u003cbr/\u003eYou can also use ` \\| ` (with spaces) to split multiple Plugin Commands. |\n| `data.interpreter` | `Game_Interpreter` | Yes          | The transition's new interpreter.                                                                                 |\n\nSet a new data for the transition by transition ID.\n\nCan be overwritten by other plugins.\n\n###### `clear()`\n\n* **Type:** `function`\n\nClear all data from all transitions.\n\nCan be overwritten by other plugins.\n\n###### `createEmpty(id)`\n\n- **Type:** `function`\n\n- **Passable Arguments**:\n\n| **Argument** | **Type** | **Required** | **Description**    |\n| ------------ | -------- | ------------ | ------------------ |\n| `id`         | `number` | Yes          | The transition ID. |\n\nCreate a new transition with no data.\n\nCan be overwritten by other plugins.\n\n### Plugin Commands\n\n#### `SmoothTransition picture value`\n\n| **Argument** | **Required** | **Description**                   |\n| ------------ | ------------ | --------------------------------- |\n| `value`      | Yes          | `on` to enable, `off` to disable. |\n\nEnable/disable overwriting the default picture transition in the game.\n\n#### `SmoothTransition variable id name start end`\n\n| **Argument** | **Required** | **Description**                                                                                                                                                                       |\n| ------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id`         | Yes          | The transition ID. Numbers only.                                                                                                                                                      |\n| `name`       | Yes          | The variable name. Spaces are not allowed.                                                                                                                                            |\n| `start`      | Yes          | The value assigned when the transition starts.\u003cbr/\u003eYou can also pass `\\V[n]` (as same as in RPG Maker MV's Show Text command) to reference a variable in current RPG Maker save file. |\n| `end`        | Yes          | The value assigned when the transition ends.\u003cbr/\u003eYou can also pass `\\V[n]` (as same as in RPG Maker MV's Show Text command) to reference a variable in current RPG Maker save file.   |\n\nSet a variable to be used in the transition.\n\n**Examples:**\n\n```\nSmoothTransition variable 1 x 100 500\nSmoothTransition variable 1 y 200 400\n```\n\n#### `SmoothTransition time id value`\n\n| **Argument** | **Required** | **Description**                                                                                         |\n| ------------ | ------------ | ------------------------------------------------------------------------------------------------------- |\n| `id`         | Yes          | The transition ID. Numbers only.                                                                        |\n| `value`      | Yes          | The transition's new duration, calculated by frames (the same as RPG Maker's default time calculation). |\n\nSet a new duration for the transition.\n\n**Examples:**\n\n```\nSmoothTransition time 1 60\n```\n\n#### `SmoothTransition cmd id command`\n\n| **Argument** | **Required** | **Description**                                                                                                                       |\n| ------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |\n| `id`         | Yes          | The transition ID. Numbers only.                                                                                                      |\n| `command`    | Yes          | The transition's new Plugin Command. Spaces are allowed.\u003cbr/\u003eYou can also use ` \\| ` (with spaces) to split multiple Plugin Commands. |\n\nSet a new Plugin Command to be executed when the transition value changes.\n\n**Examples:**\n\n```\nSmoothTransition cmd 1 TalkLive2d Koharu x y\n```\n\n#### `SmoothTransition start id`\n\n| **Argument** | **Required** | **Description**                  |\n| ------------ | ------------ | -------------------------------- |\n| `id`         | Yes          | The transition ID. Numbers only. |\n\nStart a transition by the transition ID.\n\n**Examples:**\n\n```\nSmoothTransition start 1\n```\n\n#### `SmoothTransition stop id`\n\n| **Argument** | **Required** | **Description**                  |\n| ------------ | ------------ | -------------------------------- |\n| `id`         | Yes          | The transition ID. Numbers only. |\n\nStop a transition by the transition ID.\n\n**Examples:**\n\n```\nSmoothTransition stop 1\n```\n\n#### `SmoothTransition clear id`\n\n| **Argument** | **Required** | **Description**                                                                               |\n| ------------ | ------------ | --------------------------------------------------------------------------------------------- |\n| `id`         | Yes          | The transition ID. Numbers only.\u003cbr/\u003eType `all` as the ID to clear data from all transitions. |\n\nClear all data from one or all transitions.\n\n**Examples:**\n\n```\nSmoothTransition clear 1\nSmoothTransition clear all\n```\n\n## License\n\nThis plugin is released under the MIT License, which means you can freely do anything with it without any limitations, including modifying the code or using it for commercial purposes!\n\nIf you've modified something and are willing to contribute it to this repository, feel free to create any Pull Requests.\n\n## Contact me\n\nYou can see my contact information at the last section of [my profile](https://github.com/Serena1432).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserena1432%2Fsmoothtransition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserena1432%2Fsmoothtransition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserena1432%2Fsmoothtransition/lists"}