mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 15:42:39 +08:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a7a20b64ab | |||
| 7c75834010 | |||
| 8fd985af75 | |||
| cc97bc8af4 | |||
| 92124590fe | |||
| 822ac6026c | |||
| 4a6f83bd6d | |||
| 04f063eb2b | |||
| 910865bd8b | |||
| e384f54ed2 | |||
| 5964835c83 | |||
| f4ae16247c | |||
| 4b4a3ca13f |
@@ -160,7 +160,8 @@ class ClipMotionEval implements MotionEval {
|
||||
|
||||
public overrideClips (context: AnimationGraphBindingContext): void {
|
||||
const { _originalClip: originalClip } = this;
|
||||
const overriding = context.clipOverrides?.get(originalClip);
|
||||
const clipOverrides: any = context.clipOverrides;
|
||||
const overriding: AnimationClip | null = clipOverrides && clipOverrides.get ? clipOverrides.get(originalClip) : null;
|
||||
if (overriding) {
|
||||
this._setClip(overriding, context);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,11 @@ module.exports = {
|
||||
newCubeMap: 'CubeMap',
|
||||
newRenderTexture: 'Render Texture',
|
||||
newScene: 'Scene',
|
||||
newScene:{
|
||||
'2d': '2D Scene',
|
||||
'3d': '3D Scene',
|
||||
quality: 'High Quality Scene',
|
||||
},
|
||||
newPrefab: 'Node Prefab',
|
||||
newMaterial: 'Material',
|
||||
newPhysicsMaterial: 'Physics Material',
|
||||
|
||||
@@ -37,6 +37,11 @@ module.exports = {
|
||||
newTypeScript: '脚本 (TypeScript)',
|
||||
newCubeMap: '立方体贴图',
|
||||
newScene: '场景',
|
||||
newScene:{
|
||||
'2d': '2D 场景',
|
||||
'3d': '3D 场景',
|
||||
quality: '高质量场景',
|
||||
},
|
||||
newPrefab: '预制 (Prefab)',
|
||||
newRenderTexture: '渲染纹理 (Render Texture)',
|
||||
newMaterial: '材质',
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "cocos-creator",
|
||||
"version": "4.0.0-alpha.13",
|
||||
"version": "4.0.0-alpha.18",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "cocos-creator",
|
||||
"version": "4.0.0-alpha.13",
|
||||
"version": "4.0.0-alpha.18",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cocos-creator",
|
||||
"version": "4.0.0-alpha.13",
|
||||
"version": "4.0.0-alpha.18",
|
||||
"description": "Cocos Creator is a cross-platform 2D & 3D game engine written in C++ and TypeScript, licensed under MIT.",
|
||||
"homepage": "http://www.cocos.com",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
import { ALIPAY, BYTEDANCE, HUAWEI, OPPO, RUNTIME_BASED, SUD, SUDV2, VIVO, MIGU, HONOR, WECHAT, XIAOMI, DEBUG, TEST, TAOBAO, TAOBAO_MINIGAME, WECHAT_MINI_PROGRAM } from 'internal:constants';
|
||||
import { minigame, SystemInfo as MinigameSystemInfo } from 'pal/minigame';
|
||||
import { minigame, SystemInfo as MinigameSystemInfo, WindowInfo } from 'pal/minigame';
|
||||
import { IFeatureMap } from 'pal/system-info';
|
||||
import { EventTarget } from '../../../cocos/core/event';
|
||||
import { checkPalIntegrity, withImpl } from '../../integrity-check';
|
||||
@@ -100,7 +100,10 @@ if (BYTEDANCE) {
|
||||
}
|
||||
|
||||
const originalGetSystemInfoSync = minigame.getSystemInfoSync;
|
||||
// Some platforms may not have this interface(getWindowInfo).
|
||||
const originalGetWindowInfo = minigame.getWindowInfo;
|
||||
let _cachedSystemInfo: MinigameSystemInfo = originalGetSystemInfoSync.call(minigame);
|
||||
let _cachedWindowInfo: WindowInfo | undefined = originalGetWindowInfo?.call(minigame);
|
||||
|
||||
function testAndUpdateSystemInfoCache (testAmount: number, testInterval: number): void {
|
||||
let successfullyTestTimes = 0;
|
||||
@@ -127,12 +130,19 @@ if (WECHAT && versionCompare(minigame.getAppBaseInfo().SDKVersion, '2.25.3') < 0
|
||||
minigame.onWindowResize?.(() => {
|
||||
// update cached system info
|
||||
_cachedSystemInfo = originalGetSystemInfoSync.call(minigame);
|
||||
_cachedWindowInfo = originalGetWindowInfo?.call(minigame);
|
||||
});
|
||||
|
||||
minigame.getSystemInfoSync = function (): MinigameSystemInfo {
|
||||
return _cachedSystemInfo;
|
||||
};
|
||||
|
||||
if (originalGetWindowInfo !== undefined) {
|
||||
minigame.getWindowInfo = function (): WindowInfo {
|
||||
return _cachedWindowInfo!;
|
||||
};
|
||||
}
|
||||
|
||||
class SystemInfo extends EventTarget {
|
||||
public declare readonly networkType: NetworkType;
|
||||
public declare readonly isNative: boolean;
|
||||
|
||||
Reference in New Issue
Block a user