@galacean/effects 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/dist/player.d.ts +1 -2
- package/dist/weapp.js +5 -4
- package/dist/weapp.js.map +1 -1
- package/dist/weapp.mjs +5 -4
- package/dist/weapp.mjs.map +1 -1
- package/package.json +3 -3
package/dist/player.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Disposable,
|
|
1
|
+
import type { Disposable, LostHandler, RestoreHandler, SceneLoadOptions, SceneType, math, GPUCapability } from '@galacean/effects-core';
|
|
2
2
|
import { Ticker, Composition, Renderer } from '@galacean/effects-core';
|
|
3
3
|
/**
|
|
4
4
|
* `onItemClicked` 点击回调函数的传入参数
|
|
@@ -119,7 +119,6 @@ export interface PlayerConfig {
|
|
|
119
119
|
reportGPUTime?: (time: number) => void;
|
|
120
120
|
[key: string]: any;
|
|
121
121
|
}
|
|
122
|
-
export type SceneType = string | JSONValue | Scene;
|
|
123
122
|
export type SceneWithOptionsType = {
|
|
124
123
|
scene: SceneType;
|
|
125
124
|
options: SceneLoadOptions;
|
package/dist/weapp.js
CHANGED
|
@@ -19966,9 +19966,10 @@ var TextItem = /** @class */ (function (_super) {
|
|
|
19966
19966
|
if (this.textStyle.fontSize === value) {
|
|
19967
19967
|
return;
|
|
19968
19968
|
}
|
|
19969
|
+
// 保证字号变化后位置正常
|
|
19970
|
+
var diff = this.textStyle.fontSize - value;
|
|
19971
|
+
this.textLayout.lineHeight += diff;
|
|
19969
19972
|
this.textStyle.fontSize = value;
|
|
19970
|
-
// 1.5175 = 31.43 / 20
|
|
19971
|
-
this.textLayout.lineHeight = this.textStyle.fontSize * 1.5175;
|
|
19972
19973
|
this.isDirty = true;
|
|
19973
19974
|
};
|
|
19974
19975
|
/**
|
|
@@ -30287,7 +30288,7 @@ var Player = /** @class */ (function () {
|
|
|
30287
30288
|
}());
|
|
30288
30289
|
function isSceneWithOptions(scene) {
|
|
30289
30290
|
// TODO: 判断不太优雅,后期试情况优化
|
|
30290
|
-
return isObject(scene) && 'scene' in scene;
|
|
30291
|
+
return isObject(scene) && 'scene' in scene && 'options' in scene;
|
|
30291
30292
|
}
|
|
30292
30293
|
/**
|
|
30293
30294
|
* 禁止/允许创建新的播放器,已创建的不受影响
|
|
@@ -30417,7 +30418,7 @@ Renderer.create = function (canvas, framework, renderOptions) {
|
|
|
30417
30418
|
Engine.create = function (gl) {
|
|
30418
30419
|
return new GLEngine(gl);
|
|
30419
30420
|
};
|
|
30420
|
-
var version = "1.2.
|
|
30421
|
+
var version = "1.2.2";
|
|
30421
30422
|
logger.info('player version: ' + version);
|
|
30422
30423
|
|
|
30423
30424
|
exports.AbstractPlugin = AbstractPlugin;
|