mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-12-10 15:48:46 +00:00
[adapters] 增加小游戏适配部分源码
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
const { screenWidth, screenHeight, devicePixelRatio } = tt.getSystemInfoSync()
|
||||
|
||||
export const innerWidth = screenWidth
|
||||
export const innerHeight = screenHeight
|
||||
export { devicePixelRatio }
|
||||
export const screen = {
|
||||
width: screenWidth,
|
||||
height: screenHeight,
|
||||
availWidth: innerWidth,
|
||||
availHeight: innerHeight,
|
||||
availLeft: 0,
|
||||
availTop: 0,
|
||||
}
|
||||
|
||||
export const performance = {
|
||||
now: Date.now
|
||||
};
|
||||
|
||||
export const ontouchstart = null;
|
||||
export const ontouchmove = null;
|
||||
export const ontouchend = null;
|
||||
Reference in New Issue
Block a user