微信小程序编译
All checks were successful
Plugin Library CI / publish (00.BuildOriginality) (push) Successful in 13s
Plugin Library CI / publish (00.StaryEvo) (push) Successful in 17s
Plugin Library CI / publish (00.StaryEvoTools) (push) Successful in 35s
Plugin Library CI / publish (01.HybridCLR) (push) Successful in 15s
Plugin Library CI / publish (02.InformationSave) (push) Successful in 3s
Plugin Library CI / publish (03.YooAsset) (push) Successful in 33s
Plugin Library CI / publish (04.AudioCore) (push) Successful in 3s
Plugin Library CI / publish (05.TableTextConversion) (push) Successful in 5s
Plugin Library CI / publish (06.UIFarme) (push) Successful in 15s
Plugin Library CI / publish (07.RKTools) (push) Successful in 2s
Plugin Library CI / publish (08.UniTask) (push) Successful in 3s
Plugin Library CI / publish (09.CodeChecker) (push) Successful in 16s
Plugin Library CI / publish (10.StoryEditor) (push) Successful in 3s
Plugin Library CI / publish (10.XNode) (push) Successful in 3s
Plugin Library CI / publish (11.PointCloudTools) (push) Successful in 2s
Plugin Library CI / publish (12.WeixinMinigame) (push) Successful in 2m32s
All checks were successful
Plugin Library CI / publish (00.BuildOriginality) (push) Successful in 13s
Plugin Library CI / publish (00.StaryEvo) (push) Successful in 17s
Plugin Library CI / publish (00.StaryEvoTools) (push) Successful in 35s
Plugin Library CI / publish (01.HybridCLR) (push) Successful in 15s
Plugin Library CI / publish (02.InformationSave) (push) Successful in 3s
Plugin Library CI / publish (03.YooAsset) (push) Successful in 33s
Plugin Library CI / publish (04.AudioCore) (push) Successful in 3s
Plugin Library CI / publish (05.TableTextConversion) (push) Successful in 5s
Plugin Library CI / publish (06.UIFarme) (push) Successful in 15s
Plugin Library CI / publish (07.RKTools) (push) Successful in 2s
Plugin Library CI / publish (08.UniTask) (push) Successful in 3s
Plugin Library CI / publish (09.CodeChecker) (push) Successful in 16s
Plugin Library CI / publish (10.StoryEditor) (push) Successful in 3s
Plugin Library CI / publish (10.XNode) (push) Successful in 3s
Plugin Library CI / publish (11.PointCloudTools) (push) Successful in 2s
Plugin Library CI / publish (12.WeixinMinigame) (push) Successful in 2m32s
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
|
||||
import storage from './storage';
|
||||
import userInfo from './userinfo';
|
||||
import moduleHelper from './module-helper';
|
||||
import share from './share';
|
||||
import ad from './ad';
|
||||
import canvasHelper from './canvas';
|
||||
import fs from './fs';
|
||||
import openData from './open-data';
|
||||
import util from './util';
|
||||
import cloud from './cloud';
|
||||
import audio from './audio/index';
|
||||
import texture from './texture';
|
||||
import fix from './fix';
|
||||
import canvasContext from './canvas-context';
|
||||
import video from './video';
|
||||
import logger from './logger';
|
||||
import gameClub from './game-club';
|
||||
import sdk from './sdk';
|
||||
import camera from './camera';
|
||||
import recorder from './recorder';
|
||||
import uploadFile from './upload-file';
|
||||
import gameRecorder from './game-recorder';
|
||||
import chat from './chat';
|
||||
import font from './font/index';
|
||||
import authorize from './authorize';
|
||||
import videoDecoder from './video/index';
|
||||
import mobileKeyboard from './mobileKeyboard/index';
|
||||
import touch from './touch/index';
|
||||
import TCPSocket from './TCPSocket/index';
|
||||
import UDPSocket from './UDPSocket/index';
|
||||
import bluetooth from './bluetooth/index';
|
||||
import gyroscope from './gyroscope/index';
|
||||
const unityVersion = '$unityVersion$';
|
||||
GameGlobal.unityNamespace = GameGlobal.unityNamespace || {};
|
||||
GameGlobal.unityNamespace.unityVersion = unityVersion;
|
||||
window._ScaleRate = 1;
|
||||
|
||||
if (unityVersion && unityVersion.split('.').slice(0, 2)
|
||||
.join('') < '20193') {
|
||||
const width = window.innerWidth * window.devicePixelRatio;
|
||||
const height = window.innerHeight * window.devicePixelRatio;
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
window._ScaleRate = window.devicePixelRatio;
|
||||
}
|
||||
Object.defineProperty(canvas, 'clientHeight', {
|
||||
get() {
|
||||
return window.innerHeight * window._ScaleRate;
|
||||
},
|
||||
configurable: true,
|
||||
});
|
||||
Object.defineProperty(canvas, 'clientWidth', {
|
||||
get() {
|
||||
return window.innerWidth * window._ScaleRate;
|
||||
},
|
||||
configurable: true,
|
||||
});
|
||||
Object.defineProperty(document.body, 'clientHeight', {
|
||||
get() {
|
||||
return window.innerHeight * window._ScaleRate;
|
||||
},
|
||||
configurable: true,
|
||||
});
|
||||
Object.defineProperty(document.body, 'clientWidth', {
|
||||
get() {
|
||||
return window.innerWidth * window._ScaleRate;
|
||||
},
|
||||
configurable: true,
|
||||
});
|
||||
Object.defineProperty(document, 'fullscreenEnabled', {
|
||||
get() {
|
||||
return true;
|
||||
},
|
||||
configurable: true,
|
||||
});
|
||||
fix.init();
|
||||
const WXWASMSDK = {
|
||||
WXInitializeSDK() {
|
||||
moduleHelper.init();
|
||||
moduleHelper.send('Inited', 200);
|
||||
},
|
||||
...storage,
|
||||
...userInfo,
|
||||
...share,
|
||||
...ad,
|
||||
...canvasHelper,
|
||||
...fs,
|
||||
...openData,
|
||||
...util,
|
||||
...cloud,
|
||||
...audio,
|
||||
...texture,
|
||||
...video,
|
||||
...logger,
|
||||
...gameClub,
|
||||
canvasContext,
|
||||
...sdk,
|
||||
...camera,
|
||||
...recorder,
|
||||
...uploadFile,
|
||||
...gameRecorder,
|
||||
...chat,
|
||||
...font,
|
||||
...authorize,
|
||||
...videoDecoder,
|
||||
...mobileKeyboard,
|
||||
...touch,
|
||||
...TCPSocket,
|
||||
...UDPSocket,
|
||||
...bluetooth,
|
||||
...gyroscope,
|
||||
};
|
||||
GameGlobal.WXWASMSDK = WXWASMSDK;
|
||||
Reference in New Issue
Block a user