123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width,height=device-height,maximum-scale=1.0,user-scalable=no" />
- <title>Unity WebGL Player | project B</title>
- <style>
- * {
- border: 0;
- margin: 0;
- padding: 0;
- }
- </style>
- <script src="Build/UnityLoader.js"></script>
- <script>
- var storage = {};
- function getStorageValue(key, defaultValue) {
- var v = storage[key];
- if (v === null) {
- return defaultValue;
- }
- if (typeof v !== 'undefined') {
- return v;
- }
- return defaultValue;
- }
- var WXWASMSDK = {
- WXInitializeSDK() {
- gameInstance.SendMessage('WXSDKManagerHandler', 'Inited', 200);
- },
- WXStorageSetIntSync(key, value) {
- storage[key] = value;
- },
- WXStorageGetIntSync(key, defaultValue) {
- return getStorageValue(key, defaultValue);
- },
- WXStorageSetFloatSync(key, value) {
- storage[key] = value;
- },
- WXStorageGetFloatSync(key, defaultValue) {
- return getStorageValue(key, defaultValue);
- },
- WXStorageSetStringSync(key, value) {
- storage[key] = value;
- },
- WXStorageGetStringSync(key, defaultValue) {
- return getStorageValue(key, defaultValue || '');
- },
- WXStorageDeleteAllSync() {
- storage = {};
- },
- WXStorageDeleteKeySync(key) {
- delete storage[key];
- },
- WXStorageHasKeySync(key) {
- return typeof storage[key] === 'undefined';
- },
- WXCheckSession(s, f, c) {},
- WXAuthorize(scope, s, f, c) {},
- WXCreateUserInfoButton(x, y, width, height, lang, withCredentials) {
- return "";
- },
- WXUserInfoButtonShow(id) {},
- WXUserInfoButtonDestroy(id) {},
- WXUserInfoButtonHide(id) {},
- WXUserInfoButtonOffTap(id) {},
- WXUserInfoButtonOnTap(id) {},
- WXOnShareAppMessage(conf, isPromise) {},
- WXOnShareAppMessageResolve(conf) {},
- WXOffShareAppMessage() {},
- WXCreateBannerAd(conf) {
- return Math.random().toString(32);
- },
- WXCreateRewardedVideoAd(conf) {
- return Math.random().toString(32);
- },
- WXCreateInterstitialAd(conf) {
- return Math.random().toString(32);
- },
- WXCreateCustomAd(conf) {},
- WXADStyleChange(id, key, value) {},
- WXShowAd(id) {},
- WXHideAd(id) {},
- WXADGetStyleValue(id, key) {},
- WXADDestroy(id) {},
- WXADLoad(id, succ, fail) {},
- WXToTempFilePathSync(conf) {},
- WXGetUserDataPath() {},
- WXWriteFileSync(filePath, data, encoding) {},
- WXCreateFixedBottomMiddleBannerAd(adUnitId, adIntervals, height) {
- return Math.random().toString(32);
- },
- WXReportGameStart() {},
- WXReportGameSceneError(sceneId, errorType, errStr, extJsonStr) {},
- WXWriteLog(str) {},
- WXWriteWarn(str) {},
- WXHideLoadingPage() {},
- WXPreloadConcurrent() {},
- WXCreateInnerAudioContext() {
- return Math.random().toString(32);
- },
- WXInnerAudioContextSetBool() {},
- WXInnerAudioContextSetString() {},
- WXInnerAudioContextSetFloat() {},
- WXInnerAudioContextGetFloat() {},
- WXInnerAudioContextGetBool() {},
- WXInnerAudioContextPlay() {},
- WXInnerAudioContextPause() {},
- WXInnerAudioContextStop() {},
- WXInnerAudioContextDestroy() {},
- WXInnerAudioContextSeek() {},
- WXInnerAudioContextAddListener(id, key) {
- if (key === 'onCanplay') {
- setTimeout(function () {
- gameInstance.SendMessage(
- 'WXSDKManagerHandler',
- 'OnAudioCallback',
- JSON.stringify({
- callbackId: id,
- errMsg: key,
- })
- );
- }, 100);
- }
- },
- WXInnerAudioContextRemoveListener() {},
- WXPreDownloadAudios(paths, id) {
- gameInstance.SendMessage(
- 'WXSDKManagerHandler',
- 'WXPreDownloadAudiosCallback',
- JSON.stringify({
- callbackId: id.toString(),
- errMsg: '0',
- })
- );
- },
- WXCreateVideo() {
- return Math.random().toString(32);
- },
- WXVideoPlay() {},
- WXVideoAddListener() {},
- WXVideoDestroy() {},
- WXVideoExitFullScreen() {},
- WXVideoPause() {},
- WXVideoRequestFullScreen() {},
- WXVideoSeek() {},
- WXVideoStop() {},
- WXVideoRemoveListener() {},
- WXVideoSetProperty() {},
- WXShowOpenData() {},
- WXDownloadTexture(id, type, callback) {
- var Infos = {
- Texture: GameGlobal.TextureConfig,
- SpriteAtlas: GameGlobal.SpriteAtlasConfig,
- }[type];
- if (!Infos[id]) {
- return console.error(type + '映射id 不存在', id);
- }
- var path = Infos[id].p;
- var cid = type + '_' + id;
- if (downloadedTextures[cid]) {
- if (downloadedTextures[cid].data) {
- callback();
- } else {
- console.error(type + '映射id data 不存在!', id);
- }
- } else if (downloadingTextures[cid]) {
- downloadingTextures[cid].push(callback);
- } else {
- downloadingTextures[cid] = [callback];
- textureHandler.downloadFile(
- id,
- type,
- GameGlobal.AUDIO_PREFIX.replace(/\/$/, '') + '/' + path.replace(/\\/g, '/')
- );
- }
- },
- WXCreateGameClubButton() {
- return Math.random().toString(32);
- },
- WXGameClubButtonDestroy() {},
- WXGameClubButtonHide() {},
- WXGameClubButtonShow() {},
- WXGameClubButtonAddListener() {},
- WXGameClubButtonRemoveListener() {},
- WXGameClubButtonSetProperty() {},
- WXGameClubStyleChangeInt() {},
- WXGameClubStyleChangeStr() {},
- WXIsCloudTest() {
- return false;
- },
- WXUncaughtException() {},
- WXSetDataCDN() {},
- WXSetPreloadList() {},
- WXGetCachePath() {},
- WXGetPluginCachePath() {},
- WXGetFontRawData() {},
- WXShareFontBuffer() {},
- WXReportShareBehavior() {},
- WXShowAd2() {},
- WXToTempFilePath() {},
- WXDataContextPostMessage() {},
- WXHideOpenData() {},
- WXAccessFileSync() {},
- WXAccessFile() {},
- WXCopyFileSync() {},
- WXCopyFile() {},
- WXUnlinkSync() {},
- WXUnlink() {},
- WXReportUserBehaviorBranchAnalytics() {},
- WXCallFunction() {},
- WXCallFunctionInit() {},
- WXCloudID() {},
- WXWriteFile() {},
- WXWriteStringFile() {},
- WXAppendFile() {},
- WXAppendStringFile() {},
- WXWriteBinFileSync() {},
- WXReadFile() {},
- WXReadFileSync() {},
- WXLogManagerDebug() {},
- WXLogManagerInfo() {},
- WXLogManagerLog() {},
- WXLogManagerWarn() {},
- WXCleanAllFileCache() {},
- WXCleanFileCache() {},
- WXRemoveFile() {},
- WXOnLaunchProgress() {},
- WXMkdir() {},
- WXMkdirSync() {},
- WXRmdir() {},
- WXRmdirSync() {},
- WXCameraCreateCamera() {},
- WXCameraCloseFrameChange() {},
- WXCameraDestroy() {},
- WXCameraListenFrameChange() {},
- WXCameraOnAuthCancel() {},
- WXCameraOnCameraFrame() {},
- WXCameraOnStop() {},
- WX_GetRecorderManager() {},
- WX_OnRecorderError() {},
- WX_OnRecorderFrameRecorded() {},
- WX_OnRecorderInterruptionBegin() {},
- WX_OnRecorderInterruptionEnd() {},
- WX_OnRecorderPause() {},
- WX_OnRecorderResume() {},
- WX_OnRecorderStart() {},
- WX_OnRecorderStop() {},
- WX_RecorderPause() {},
- WX_RecorderResume() {},
- WX_RecorderStart() {},
- WX_RecorderStop() {},
- WX_UploadFile() {},
- WXUploadTaskAbort() {},
- WXUploadTaskOffHeadersReceived() {},
- WXUploadTaskOffProgressUpdate() {},
- WXUploadTaskOnHeadersReceived() {},
- WXUploadTaskOnProgressUpdate() {},
- WXStat() {},
- WX_GetGameRecorder() {},
- WX_GameRecorderOff() {},
- WX_GameRecorderOn() {},
- WX_GameRecorderStart() {},
- WX_GameRecorderAbort() {},
- WX_GameRecorderPause() {},
- WX_GameRecorderResume() {},
- WX_GameRecorderStop() {},
- WX_OperateGameRecorderVideo() {},
- WXChatCreate() {},
- WXChatHide() {},
- WXChatShow() {},
- WXChatClose() {},
- WXChatOpen() {},
- WXChatSetTabs() {},
- WXChatOn() {},
- WXChatOff() {},
- WXChatSetSignature() {},
- WXSetArrayBuffer() {},
- WX_FileSystemManagerReaddirSync() {},
- WX_FileSystemManagerReadCompressedFileSync() {},
- WX_FileSystemManagerClose() {},
- WX_FileSystemManagerFstat() {},
- WX_FileSystemManagerFtruncate() {},
- WX_FileSystemManagerGetFileInfo() {},
- WX_FileSystemManagerGetSavedFileList() {},
- WX_FileSystemManagerOpen() {},
- WX_FileSystemManagerRead() {},
- WX_FileSystemManagerReadCompressedFile() {},
- WX_FileSystemManagerReadZipEntry() {},
- WX_FileSystemManagerReaddir() {},
- WX_FileSystemManagerRemoveSavedFile() {},
- WX_FileSystemManagerRename() {},
- WX_FileSystemManagerRenameSync() {},
- WX_FileSystemManagerSaveFile() {},
- WX_FileSystemManagerTruncate() {},
- WX_FileSystemManagerUnzip() {},
- WX_FileSystemManagerWrite() {},
- WX_FileSystemManagerReadSync() {},
- WX_FileSystemManagerFstatSync() {},
- WX_FileSystemManagerStatSync() {},
- WX_FileSystemManagerWriteSync() {},
- WX_FileSystemManagerOpenSync() {},
- WX_FileSystemManagerSaveFileSync() {},
- WX_FileSystemManagerCloseSync() {},
- WX_FileSystemManagerFtruncateSync() {},
- WX_FileSystemManagerTruncateSync() {},
- WX_FileSystemManagerAppendFileSync() {},
- WX_FileSystemManagerAppendFileStringSync() {},
- WX_FileSystemManagerWriteStringSync() {},
- WX_FileSystemManagerReadZipEntryString() {},
- WX_FileSystemManagerWriteString() {},
- WX_OnNeedPrivacyAuthorization() {},
- WX_PrivacyAuthorizeResolve() {},
- WX_AddCard(conf, callbackId){},
- WX_AuthPrivateMessage(conf, callbackId){},
- WX_Authorize(conf, callbackId){},
- WX_CheckIsAddedToMyMiniProgram(conf, callbackId){},
- WX_CheckSession(conf, callbackId){},
- WX_ChooseImage(conf, callbackId){},
- WX_ChooseMedia(conf, callbackId){},
- WX_ChooseMessageFile(conf, callbackId){},
- WX_CloseBLEConnection(conf, callbackId){},
- WX_CloseBluetoothAdapter(conf, callbackId){},
- WX_CreateBLEConnection(conf, callbackId){},
- WX_CreateBLEPeripheralServer(conf, callbackId){},
- WX_ExitMiniProgram(conf, callbackId){},
- WX_ExitVoIPChat(conf, callbackId){},
- WX_FaceDetect(conf, callbackId){},
- WX_GetAvailableAudioSources(conf, callbackId){},
- WX_GetBLEDeviceCharacteristics(conf, callbackId){},
- WX_GetBLEDeviceRSSI(conf, callbackId){},
- WX_GetBLEDeviceServices(conf, callbackId){},
- WX_GetBLEMTU(conf, callbackId){},
- WX_GetBatteryInfo(conf, callbackId){},
- WX_GetBeacons(conf, callbackId){},
- WX_GetBluetoothAdapterState(conf, callbackId){},
- WX_GetBluetoothDevices(conf, callbackId){},
- WX_GetChannelsLiveInfo(conf, callbackId){},
- WX_GetChannelsLiveNoticeInfo(conf, callbackId){},
- WX_GetClipboardData(conf, callbackId){},
- WX_GetConnectedBluetoothDevices(conf, callbackId){},
- WX_GetExtConfig(conf, callbackId){},
- WX_GetGameClubData(conf, callbackId){},
- WX_GetGroupEnterInfo(conf, callbackId){},
- WX_GetInferenceEnvInfo(conf, callbackId){},
- WX_GetLocalIPAddress(conf, callbackId){},
- WX_GetLocation(conf, callbackId){},
- WX_GetNetworkType(conf, callbackId){},
- WX_GetPrivacySetting(conf, callbackId){},
- WX_GetScreenBrightness(conf, callbackId){},
- WX_GetSetting(conf, callbackId){},
- WX_GetShareInfo(conf, callbackId){},
- WX_GetStorageInfo(conf, callbackId){},
- WX_GetSystemInfo(conf, callbackId){},
- WX_GetSystemInfoAsync(conf, callbackId){},
- WX_GetUserInfo(conf, callbackId){},
- WX_GetUserInteractiveStorage(conf, callbackId){},
- WX_GetWeRunData(conf, callbackId){},
- WX_HideKeyboard(conf, callbackId){},
- WX_HideLoading(conf, callbackId){},
- WX_HideShareMenu(conf, callbackId){},
- WX_HideToast(conf, callbackId){},
- WX_InitFaceDetect(conf, callbackId){},
- WX_IsBluetoothDevicePaired(conf, callbackId){},
- WX_JoinVoIPChat(conf, callbackId){},
- WX_Login(conf, callbackId){},
- WX_MakeBluetoothPair(conf, callbackId){},
- WX_NavigateToMiniProgram(conf, callbackId){},
- WX_NotifyBLECharacteristicValueChange(conf, callbackId){},
- WX_OpenAppAuthorizeSetting(conf, callbackId){},
- WX_OpenBluetoothAdapter(conf, callbackId){},
- WX_OpenCard(conf, callbackId){},
- WX_OpenChannelsActivity(conf, callbackId){},
- WX_OpenChannelsEvent(conf, callbackId){},
- WX_OpenChannelsLive(conf, callbackId){},
- WX_OpenChannelsUserProfile(conf, callbackId){},
- WX_OpenCustomerServiceChat(conf, callbackId){},
- WX_OpenCustomerServiceConversation(conf, callbackId){},
- WX_OpenPrivacyContract(conf, callbackId){},
- WX_OpenSetting(conf, callbackId){},
- WX_OpenSystemBluetoothSetting(conf, callbackId){},
- WX_PreviewImage(conf, callbackId){},
- WX_PreviewMedia(conf, callbackId){},
- WX_ReadBLECharacteristicValue(conf, callbackId){},
- WX_RemoveStorage(conf, callbackId){},
- WX_RemoveUserCloudStorage(conf, callbackId){},
- WX_ReportScene(conf, callbackId){},
- WX_RequestMidasFriendPayment(conf, callbackId){},
- WX_RequestMidasPayment(conf, callbackId){},
- WX_RequestSubscribeMessage(conf, callbackId){},
- WX_RequestSubscribeSystemMessage(conf, callbackId){},
- WX_RequirePrivacyAuthorize(conf, callbackId){},
- WX_RestartMiniProgram(conf, callbackId){},
- WX_SaveFileToDisk(conf, callbackId){},
- WX_SaveImageToPhotosAlbum(conf, callbackId){},
- WX_ScanCode(conf, callbackId){},
- WX_SetBLEMTU(conf, callbackId){},
- WX_SetClipboardData(conf, callbackId){},
- WX_SetDeviceOrientation(conf, callbackId){},
- WX_SetEnableDebug(conf, callbackId){},
- WX_SetInnerAudioOption(conf, callbackId){},
- WX_SetKeepScreenOn(conf, callbackId){},
- WX_SetMenuStyle(conf, callbackId){},
- WX_SetScreenBrightness(conf, callbackId){},
- WX_SetStatusBarStyle(conf, callbackId){},
- WX_SetUserCloudStorage(conf, callbackId){},
- WX_ShowActionSheet(conf, callbackId){},
- WX_ShowKeyboard(conf, callbackId){},
- WX_ShowLoading(conf, callbackId){},
- WX_ShowModal(conf, callbackId){},
- WX_ShowShareImageMenu(conf, callbackId){},
- WX_ShowShareMenu(conf, callbackId){},
- WX_ShowToast(conf, callbackId){},
- WX_StartAccelerometer(conf, callbackId){},
- WX_StartBeaconDiscovery(conf, callbackId){},
- WX_StartBluetoothDevicesDiscovery(conf, callbackId){},
- WX_StartCompass(conf, callbackId){},
- WX_StartDeviceMotionListening(conf, callbackId){},
- WX_StartGyroscope(conf, callbackId){},
- WX_StopAccelerometer(conf, callbackId){},
- WX_StopBeaconDiscovery(conf, callbackId){},
- WX_StopBluetoothDevicesDiscovery(conf, callbackId){},
- WX_StopCompass(conf, callbackId){},
- WX_StopDeviceMotionListening(conf, callbackId){},
- WX_StopFaceDetect(conf, callbackId){},
- WX_StopGyroscope(conf, callbackId){},
- WX_UpdateKeyboard(conf, callbackId){},
- WX_UpdateShareMenu(conf, callbackId){},
- WX_UpdateVoIPChatMuteConfig(conf, callbackId){},
- WX_UpdateWeChatApp(conf, callbackId){},
- WX_VibrateLong(conf, callbackId){},
- WX_VibrateShort(conf, callbackId){},
- WX_WriteBLECharacteristicValue(conf, callbackId){},
- WX_StartGameLive(conf, callbackId){},
- WX_CheckGameLiveEnabled(conf, callbackId){},
- WX_GetUserCurrentGameliveInfo(conf, callbackId){},
- WX_GetUserRecentGameLiveInfo(conf, callbackId){},
- WX_GetUserGameLiveDetails(conf, callbackId){},
- WX_OpenChannelsLiveCollection(conf, callbackId){},
- WX_OpenPage(conf, callbackId){},
- WX_RequestMidasPaymentGameItem(conf, callbackId){},
- WX_RequestSubscribeLiveActivity(conf, callbackId){},
- WX_OperateGameRecorderVideo() {},
- WX_RemoveStorageSync() {},
- WX_ReportEvent() {},
- WX_ReportMonitor() {},
- WX_ReportPerformance() {},
- WX_ReportUserBehaviorBranchAnalytics() {},
- WX_ReserveChannelsLive() {},
- WX_RevokeBufferURL() {},
- WX_SetPreferredFramesPerSecond() {},
- WX_SetStorageSync() {},
- WX_ShareAppMessage() {},
- WX_TriggerGC() {},
- WX_OnAccelerometerChange() {},
- WX_OffAccelerometerChange() {},
- WX_OnAudioInterruptionBegin() {},
- WX_OffAudioInterruptionBegin() {},
- WX_OnAudioInterruptionEnd() {},
- WX_OffAudioInterruptionEnd() {},
- WX_OnBLECharacteristicValueChange() {},
- WX_OffBLECharacteristicValueChange() {},
- WX_OnBLEConnectionStateChange() {},
- WX_OffBLEConnectionStateChange() {},
- WX_OnBLEMTUChange() {},
- WX_OffBLEMTUChange() {},
- WX_OnBLEPeripheralConnectionStateChanged() {},
- WX_OffBLEPeripheralConnectionStateChanged() {},
- WX_OnBeaconServiceChange() {},
- WX_OffBeaconServiceChange() {},
- WX_OnBeaconUpdate() {},
- WX_OffBeaconUpdate() {},
- WX_OnBluetoothAdapterStateChange() {},
- WX_OffBluetoothAdapterStateChange() {},
- WX_OnBluetoothDeviceFound() {},
- WX_OffBluetoothDeviceFound() {},
- WX_OnCompassChange() {},
- WX_OffCompassChange() {},
- WX_OnDeviceMotionChange() {},
- WX_OffDeviceMotionChange() {},
- WX_OnDeviceOrientationChange() {},
- WX_OffDeviceOrientationChange() {},
- WX_OnError() {},
- WX_OffError() {},
- WX_OnGyroscopeChange() {},
- WX_OffGyroscopeChange() {},
- WX_OnHide() {},
- WX_OffHide() {},
- WX_OnInteractiveStorageModified() {},
- WX_OffInteractiveStorageModified() {},
- WX_OnKeyDown() {},
- WX_OffKeyDown() {},
- WX_OnKeyUp() {},
- WX_OffKeyUp() {},
- WX_OnKeyboardComplete() {},
- WX_OffKeyboardComplete() {},
- WX_OnKeyboardConfirm() {},
- WX_OffKeyboardConfirm() {},
- WX_OnKeyboardHeightChange() {},
- WX_OffKeyboardHeightChange() {},
- WX_OnKeyboardInput() {},
- WX_OffKeyboardInput() {},
- WX_OnMemoryWarning() {},
- WX_OffMemoryWarning() {},
- WX_OnMessage() {},
- WX_OnMouseDown() {},
- WX_OffMouseDown() {},
- WX_OnMouseMove() {},
- WX_OffMouseMove() {},
- WX_OnMouseUp() {},
- WX_OffMouseUp() {},
- WX_OnNetworkStatusChange() {},
- WX_OffNetworkStatusChange() {},
- WX_OnNetworkWeakChange() {},
- WX_OffNetworkWeakChange() {},
- WX_OnShareMessageToFriend() {},
- WX_OnShow() {},
- WX_OffShow() {},
- WX_OnTouchCancel() {},
- WX_OffTouchCancel() {},
- WX_OnTouchEnd() {},
- WX_OffTouchEnd() {},
- WX_OnTouchMove() {},
- WX_OffTouchMove() {},
- WX_OnTouchStart() {},
- WX_OffTouchStart() {},
- WX_OnUnhandledRejection() {},
- WX_OffUnhandledRejection() {},
- WX_OnUserCaptureScreen() {},
- WX_OffUserCaptureScreen() {},
- WX_OnVoIPChatInterrupted() {},
- WX_OffVoIPChatInterrupted() {},
- WX_OnVoIPChatMembersChanged() {},
- WX_OffVoIPChatMembersChanged() {},
- WX_OnVoIPChatSpeakersChanged() {},
- WX_OffVoIPChatSpeakersChanged() {},
- WX_OnVoIPChatStateChanged() {},
- WX_OffVoIPChatStateChanged() {},
- WX_OnWheel() {},
- WX_OffWheel() {},
- WX_OnWindowResize() {},
- WX_OffWindowResize() {},
- WX_OnAddToFavorites() {},
- WX_OnAddToFavorites_Resolve(conf){},
- WX_OffAddToFavorites() {},
- WX_OnCopyUrl() {},
- WX_OnCopyUrl_Resolve(conf){},
- WX_OffCopyUrl() {},
- WX_OnHandoff() {},
- WX_OnHandoff_Resolve(conf){},
- WX_OffHandoff() {},
- WX_OnShareTimeline() {},
- WX_OnShareTimeline_Resolve(conf){},
- WX_OffShareTimeline() {},
- WX_OnGameLiveStateChange() {},
- WX_OnGameLiveStateChange_Resolve(conf){},
- WX_OffGameLiveStateChange() {},
- WX_SetHandoffQuery(query){
- return "";
- },
- WX_GetAccountInfoSync(){
- return JSON.stringify({});
- },
- WX_GetAppAuthorizeSetting(){
- return JSON.stringify({});
- },
- WX_GetAppBaseInfo(){
- return JSON.stringify({});
- },
- WX_GetBatteryInfoSync(){
- return JSON.stringify({});
- },
- WX_GetDeviceInfo(){
- return JSON.stringify({});
- },
- WX_GetEnterOptionsSync(){
- return JSON.stringify({});
- },
- WX_GetExptInfoSync(keys){
- return JSON.stringify({});
- },
- WX_GetExtConfigSync(){
- return JSON.stringify({});
- },
- WX_GetLaunchOptionsSync(){
- return JSON.stringify({});
- },
- WX_GetMenuButtonBoundingClientRect(){
- return JSON.stringify({});
- },
- WX_GetStorageInfoSync(){
- return JSON.stringify({});
- },
- WX_GetSystemInfoSync(){
- return JSON.stringify({});
- },
- WX_GetSystemSetting(){
- return JSON.stringify({});
- },
- WX_GetWindowInfo(){
- return JSON.stringify({});
- },
- WX_CreateImageData(){
- return JSON.stringify({});
- },
- WX_CreatePath2D(){
- return JSON.stringify({});
- },
- WX_SetCursor(path, x, y){
- return "";
- },
- WX_SetMessageToFriendQuery(option){
- return "";
- },
- WX_GetTextLineHeight(option){
- return "";
- },
- WX_LoadFont(path){
- return "";
- },
- WX_GetGameLiveState(){
- return JSON.stringify({});
- },
- WX_DownloadFile() {return ""},
- WX_CreateFeedbackButton() {return ""},
- WX_GetLogManager() {return ""},
- WX_GetRealtimeLogManager() {return ""},
- WX_GetUpdateManager() {return ""},
- WX_CreateVideoDecoder() {return ""},
- WX_DownloadTaskAbort() {},
- WX_DownloadTaskOffHeadersReceived() {},
- WX_DownloadTaskOffProgressUpdate() {},
- WX_DownloadTaskOnHeadersReceived() {},
- WX_DownloadTaskOnProgressUpdate() {},
- WXFeedbackButtonSetProperty() {},
- WX_FeedbackButtonDestroy() {},
- WX_FeedbackButtonHide() {},
- WX_FeedbackButtonOffTap() {},
- WX_FeedbackButtonOnTap() {},
- WX_FeedbackButtonShow() {},
- WX_LogManagerDebug() {},
- WX_LogManagerInfo() {},
- WX_LogManagerLog() {},
- WX_LogManagerWarn() {},
- WX_RealtimeLogManagerAddFilterMsg() {},
- WX_RealtimeLogManagerError() {},
- WX_RealtimeLogManagerInfo() {},
- WX_RealtimeLogManagerSetFilterMsg() {},
- WX_RealtimeLogManagerWarn() {},
- WX_UpdateManagerApplyUpdate() {},
- WX_UpdateManagerOnCheckForUpdate() {},
- WX_UpdateManagerOnUpdateFailed() {},
- WX_UpdateManagerOnUpdateReady() {},
- WX_VideoDecoderGetFrameData() {},
- WX_VideoDecoderRemove() {},
- WX_VideoDecoderSeek() {},
- WX_VideoDecoderStart() {},
- WX_VideoDecoderStop() {},
- WX_VideoDecoderOff() {},
- WX_VideoDecoderOn() {},
- };
- var downloadedTextures = {};
- var downloadingTextures = {};
- var textureHandler = {
- downloadFile(textureId, type, prefix) {
- var url = prefix + '.png';
- var cid = type + '_' + textureId;
- var image = new Image();
- image.src = url;
- image.onload = function () {
- downloadedTextures[cid] = {
- data: image,
- };
- if (downloadingTextures[cid] instanceof Array) {
- downloadingTextures[cid].forEach(v => v());
- } else {
- downloadingTextures[cid]();
- }
- delete downloadingTextures[cid];
- };
- image.onerror = function () {
- console.error(url + ' 下载失败!');
- };
- },
- };
- var GameGlobal = {
- TextureConfig: {},
- SpriteAtlasConfig: {},
- DownloadedTextures: downloadedTextures,
- AUDIO_PREFIX: './Assets/Textures/',
- };
- window._ScaleRate = 1;
- </script>
- <script>
- var gameInstance = UnityLoader.instantiate('gameContainer', 'Build/webgl.json');
- </script>
- </head>
- <body>
- <div id="gameContainer" style="width: 100%; height: 100%; margin: auto"></div>
- <script>
- document.addEventListener('DOMContentLoaded', () => {
- var div = document.getElementById('gameContainer');
- div.style.width = window.innerWidth + 'px';
- div.style.height = window.innerHeight + 'px';
- window.canvas = document.getElementsByTagName('canvas')[0];
- });
- </script>
- </body>
- </html>
|