Skip to content

Commit

Permalink
Merge pull request #808 from galacean/main
Browse files Browse the repository at this point in the history
Merge origin/main into origin/feat/2.2
  • Loading branch information
yiiqii authored Dec 27, 2024
2 parents de402e1 + e2adbf1 commit 98a2c9c
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 24 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@

---

## 2.1.5

`2024-12-27`

- Fix: 修复消息元素触发问题。[#801](https://github.com/galacean/effects-runtime/pull/801) @Sruimeng
- Fix: message item triggering issue caused by time accuracy. [#804](https://github.com/galacean/effects-runtime/pull/804) @wumaolinmaoan
- Fix: player fps setting. [#802](https://github.com/galacean/effects-runtime/pull/802) @wumaolinmaoan

## 2.1.4

`2024-12-20`
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@

---

## 2.1.5

`2024-12-27`

- Fix: Resolve the issue with message element triggering. [#801](https://github.com/galacean/effects-runtime/pull/801) @Sruimeng
- Fix: message item triggering issue caused by time accuracy. [#804](https://github.com/galacean/effects-runtime/pull/804) @wumaolinmaoan
- Fix: player fps setting. [#802](https://github.com/galacean/effects-runtime/pull/802) @wumaolinmaoan

## 2.1.4

`2024-12-20`
Expand Down
2 changes: 1 addition & 1 deletion packages/effects-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects-core",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects runtime core for the web",
"module": "./dist/index.mjs",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/effects-core/src/composition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ export class Composition extends EventEmitter<CompositionEvent<Composition>> imp
return;
}

const dt = this.getUpdateTime(deltaTime * this.speed);
const dt = parseFloat(this.getUpdateTime(deltaTime * this.speed).toFixed(0));

this.updateRootComposition(dt / 1000);
this.updateVideo();
Expand Down
2 changes: 1 addition & 1 deletion packages/effects-core/src/plugins/timeline/track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export class RuntimeClip {
}
this.parentMixer.setClipWeight(this.playable, weight);

const clipTime = clip.toLocalTime(localTime);
const clipTime = parseFloat(clip.toLocalTime(localTime).toFixed(3));

this.playable.setTime(clipTime);

Expand Down
2 changes: 1 addition & 1 deletion packages/effects-helper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects-helper",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects runtime helper for the web",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/effects-threejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects-threejs",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects runtime threejs plugin for the web",
"module": "./dist/index.mjs",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/effects-webgl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects-webgl",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects runtime webgl for the web",
"types": "./dist/index.d.ts",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/effects/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects runtime player for the web",
"module": "./dist/index.mjs",
"main": "./dist/index.js",
Expand Down
12 changes: 4 additions & 8 deletions packages/effects/src/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
AssetManager, Composition, EVENT_TYPE_CLICK, EventSystem, logger, Renderer, Material,
TextureLoadAction, Ticker, canvasPool, getPixelRatio, gpuTimer, initErrors, isAndroid,
isArray, pluginLoaderMap, setSpriteMeshMaxItemCountByGPU, spec, EventEmitter,
generateWhiteTexture, Texture, PLAYER_OPTIONS_ENV_EDITOR, isIOS, DEFAULT_FPS, Scene,
generateWhiteTexture, Texture, PLAYER_OPTIONS_ENV_EDITOR, isIOS, Scene,
} from '@galacean/effects-core';
import type { GLRenderer } from '@galacean/effects-webgl';
import { HELP_LINK } from './constants';
Expand Down Expand Up @@ -385,13 +385,9 @@ export class Player extends EventEmitter<PlayerEvent<Player>> implements Disposa
},
}, scene);

if (this.ticker) {
// 中低端设备降帧到 30fps
if (opts.renderLevel === spec.RenderLevel.B) {
this.ticker.setFPS(Math.min(this.ticker.getFPS(), 30));
} else {
this.ticker.setFPS(DEFAULT_FPS);
}
// 中低端设备降帧到 30fps·
if (this.ticker && opts.renderLevel === spec.RenderLevel.B) {
this.ticker.setFPS(Math.min(this.ticker.getFPS(), 30));
}

// TODO 目前编辑器会每帧调用 loadScene, 在这编译会导致闪帧,待编辑器渲染逻辑优化后移除。
Expand Down
2 changes: 1 addition & 1 deletion plugin-packages/alipay-downgrade/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects-plugin-alipay-downgrade",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects player downgrade plugin for Alipay",
"module": "./dist/index.mjs",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion plugin-packages/downgrade/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects-plugin-downgrade",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects player downgrade plugin",
"module": "./dist/index.mjs",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion plugin-packages/editor-gizmo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects-plugin-editor-gizmo",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects player editor gizmo plugin",
"module": "./dist/index.mjs",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion plugin-packages/model/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects-plugin-model",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects player model plugin",
"module": "./dist/index.mjs",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion plugin-packages/multimedia/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects-plugin-multimedia",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects player multimedia plugin",
"module": "./dist/index.mjs",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion plugin-packages/orientation-transformer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects-plugin-orientation-transformer",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects player orientation transformer plugin",
"module": "./dist/index.mjs",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion plugin-packages/rich-text/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects-plugin-rich-text",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects player richtext plugin",
"module": "./dist/index.mjs",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion plugin-packages/spine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects-plugin-spine",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects player spine plugin",
"module": "./dist/index.mjs",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion plugin-packages/stats/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galacean/effects-plugin-stats",
"version": "2.1.4",
"version": "2.1.5",
"description": "Galacean Effects runtime stats for the web",
"module": "./dist/index.mjs",
"main": "./dist/index.js",
Expand Down

0 comments on commit 98a2c9c

Please sign in to comment.