Skip to content

Commit

Permalink
Merge pull request #619 from OpenWebGAL/dev
Browse files Browse the repository at this point in the history
4.5.11
  • Loading branch information
MakinoharaShoko authored Dec 26, 2024
2 parents f4ea00b + 3326ece commit f01d4f0
Show file tree
Hide file tree
Showing 30 changed files with 511 additions and 396 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-demo-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: package.json
cache: 'yarn'

# 安装依赖
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: package.json
cache: 'yarn'

# 安装依赖
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@
"packages/*"
]
},
"private": true
"private": true,
"engines": {
"node": "18"
}
}
5 changes: 2 additions & 3 deletions packages/webgal/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "webgal",
"private": true,
"version": "4.5.10",
"version": "4.5.11",
"scripts": {
"dev": "vite --host --port 3000",
"build": "cross-env NODE_ENV=production tsc && vite build --base=./",
Expand All @@ -12,7 +12,7 @@
"@emotion/css": "^11.11.2",
"@icon-park/react": "^1.4.2",
"@reduxjs/toolkit": "^1.8.1",
"angular-expressions": "^1.1.5",
"angular-expressions": "^1.4.3",
"axios": "^0.28.0",
"cloudlogjs": "^1.0.9",
"i18next": "^22.4.15",
Expand All @@ -22,7 +22,6 @@
"modern-css-reset": "^1.4.0",
"pixi-filters": "^4.2.0",
"pixi-live2d-display-webgal": "^0.5.8",
"pixi-spine": "^3.1.2",
"pixi.js": "^6.3.0",
"popmotion": "^11.0.5",
"react": "^17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/webgal/public/game/template/template.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name":"Default Template",
"webgal-version":"4.5.10"
"webgal-version":"4.5.11"
}
3 changes: 2 additions & 1 deletion packages/webgal/src/Core/Modules/animationFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ import cloneDeep from 'lodash/cloneDeep';
import { baseTransform } from '@/store/stageInterface';
import { generateTimelineObj } from '@/Core/controller/stage/pixi/animations/timeline';
import { WebGAL } from '@/Core/WebGAL';
import PixiStage from '@/Core/controller/stage/pixi/PixiController';

export function getAnimationObject(animationName: string, target: string, duration: number) {
const effect = WebGAL.animationManager.getAnimations().find((ani) => ani.name === animationName);
if (effect) {
const mappedEffects = effect.effects.map((effect) => {
const targetSetEffect = webgalStore.getState().stage.effects.find((e) => e.target === target);
const newEffect = cloneDeep({ ...(targetSetEffect?.transform ?? baseTransform), duration: 0 });
Object.assign(newEffect, effect);
PixiStage.assignTransform(newEffect, effect);
newEffect.duration = effect.duration;
return newEffect;
});
Expand Down
5 changes: 3 additions & 2 deletions packages/webgal/src/Core/controller/gamePlay/autoPlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ export const autoNextSentence = () => {
* 自动播放的执行函数
*/
const autoPlay = () => {
const delay = webgalStore.getState().userData.optionData.autoSpeed;
const autoPlayDelay = 750 - 250 * delay;
const data = webgalStore.getState().userData.optionData.autoSpeed;
// 范围为 [250, 1750]
const autoPlayDelay = 250 + (100 - data) * 15;
let isBlockingAuto = false;
WebGAL.gameplay.performController.performList.forEach((e) => {
if (e.blockingAuto())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { stopFast } from '@/Core/controller/gamePlay/fastSkip';
import { setEbg } from '@/Core/gameScripts/changeBg/setEbg';

export const backToTitle = () => {
if (webgalStore.getState().GUI.showTitle) return;
const dispatch = webgalStore.dispatch;
stopAllPerform();
stopAuto();
Expand Down
Loading

0 comments on commit f01d4f0

Please sign in to comment.