Auto-publish.

This commit is contained in:
nebulaliu 2025-04-25 11:49:51 +08:00
parent f4896e88fc
commit 91ab934fce
102 changed files with 389 additions and 4513 deletions

View File

@ -6,6 +6,13 @@ Removed - 删除功能/接口
Fixed - 修复问题 Fixed - 修复问题
Others - 其他 Others - 其他
--> -->
## v0.1.26 【预发布】
### Feature
* 普通:增加禁止多点触控的配置
### Fixed
* 普通修复IOS长音频获取数据延迟的bug
* 普通性能分析工具修复callstack中的堆栈悬空丢失的问题
## v0.1.25 【普通更新】 ## v0.1.25 【普通更新】
### Feature ### Feature
* 普通性能深入分析工具支持Lua capture能力 * 普通性能深入分析工具支持Lua capture能力

View File

@ -1910,6 +1910,7 @@ namespace WeChatWASM
config.CompileOptions.DevelopBuild ? "true" : "false", config.CompileOptions.DevelopBuild ? "true" : "false",
config.CompileOptions.enablePerfAnalysis ? "true" : "false", config.CompileOptions.enablePerfAnalysis ? "true" : "false",
config.ProjectConf.MemorySize.ToString(), config.ProjectConf.MemorySize.ToString(),
config.SDKOptions.disableMultiTouch ? "true" : "false",
}); });
List<Rule> replaceList = new List<Rule>(replaceArrayList); List<Rule> replaceList = new List<Rule>(replaceArrayList);

View File

@ -170,6 +170,7 @@ namespace WeChatWASM
this.formCheckbox("useFriendRelation", "使用好友关系链"); this.formCheckbox("useFriendRelation", "使用好友关系链");
this.formCheckbox("useMiniGameChat", "使用社交组件"); this.formCheckbox("useMiniGameChat", "使用社交组件");
this.formCheckbox("preloadWXFont", "预加载微信字体(?)", "在game.js执行开始时预载微信系统字体运行期间可使用WX.GetWXFont获取微信字体"); this.formCheckbox("preloadWXFont", "预加载微信字体(?)", "在game.js执行开始时预载微信系统字体运行期间可使用WX.GetWXFont获取微信字体");
this.formCheckbox("disableMultiTouch", "禁用多点触控");
EditorGUILayout.EndVertical(); EditorGUILayout.EndVertical();
} }
@ -455,6 +456,7 @@ namespace WeChatWASM
this.setData("useFriendRelation", config.SDKOptions.UseFriendRelation); this.setData("useFriendRelation", config.SDKOptions.UseFriendRelation);
this.setData("useMiniGameChat", config.SDKOptions.UseMiniGameChat); this.setData("useMiniGameChat", config.SDKOptions.UseMiniGameChat);
this.setData("preloadWXFont", config.SDKOptions.PreloadWXFont); this.setData("preloadWXFont", config.SDKOptions.PreloadWXFont);
this.setData("disableMultiTouch", config.SDKOptions.disableMultiTouch);
this.setData("bgImageSrc", config.ProjectConf.bgImageSrc); this.setData("bgImageSrc", config.ProjectConf.bgImageSrc);
tex = AssetDatabase.LoadAssetAtPath<Texture>(config.ProjectConf.bgImageSrc); tex = AssetDatabase.LoadAssetAtPath<Texture>(config.ProjectConf.bgImageSrc);
this.setData("memorySize", config.ProjectConf.MemorySize.ToString()); this.setData("memorySize", config.ProjectConf.MemorySize.ToString());
@ -532,6 +534,7 @@ namespace WeChatWASM
config.SDKOptions.UseFriendRelation = this.getDataCheckbox("useFriendRelation"); config.SDKOptions.UseFriendRelation = this.getDataCheckbox("useFriendRelation");
config.SDKOptions.UseMiniGameChat = this.getDataCheckbox("useMiniGameChat"); config.SDKOptions.UseMiniGameChat = this.getDataCheckbox("useMiniGameChat");
config.SDKOptions.PreloadWXFont = this.getDataCheckbox("preloadWXFont"); config.SDKOptions.PreloadWXFont = this.getDataCheckbox("preloadWXFont");
config.SDKOptions.disableMultiTouch = this.getDataCheckbox("disableMultiTouch");
config.ProjectConf.bgImageSrc = this.getDataInput("bgImageSrc"); config.ProjectConf.bgImageSrc = this.getDataInput("bgImageSrc");
config.ProjectConf.MemorySize = int.Parse(this.getDataInput("memorySize")); config.ProjectConf.MemorySize = int.Parse(this.getDataInput("memorySize"));
config.ProjectConf.HideAfterCallMain = this.getDataCheckbox("hideAfterCallMain"); config.ProjectConf.HideAfterCallMain = this.getDataCheckbox("hideAfterCallMain");

View File

@ -2,7 +2,7 @@ namespace WeChatWASM
{ {
public class WXPluginVersion public class WXPluginVersion
{ {
public static string pluginVersion = "202503311222"; // 这一行不要改他,导出的时候会自动替换 public static string pluginVersion = "202504250349"; // 这一行不要改他,导出的时候会自动替换
} }
public class WXPluginConf public class WXPluginConf

Binary file not shown.

View File

@ -543,6 +543,11 @@
预载系统字体 预载系统字体
</summary> </summary>
</member> </member>
<member name="F:WeChatWASM.SDKOptions.disableMultiTouch">
<summary>
是否禁止多点触控
</summary>
</member>
<member name="F:WeChatWASM.CompileOptions.DevelopBuild"> <member name="F:WeChatWASM.CompileOptions.DevelopBuild">
<summary> <summary>
Development Build Development Build

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8e1e31b21258f8487d4eae0223308854 guid: 11900e5aab45727b7c0078ebb4d7daf4
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 863687d8d3945d133dc8832b6108ebbe guid: f1d2e052ecbecad0b78006c69a5dbd6a
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 46e59751737871b5c524ff82f6d5be0b guid: 684da79a42d712bd73e7879d6126499d
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -648,6 +648,7 @@ namespace WeChatWASM
/// ## 注意事项 /// ## 注意事项
/// - 基础库 v2.10.4 开始支持获取群工具小程序启动信息 /// - 基础库 v2.10.4 开始支持获取群工具小程序启动信息
/// - 基础库 v2.17.3 开始支持获取群聊小程序消息卡片、群待办小程序启动信息 /// - 基础库 v2.17.3 开始支持获取群聊小程序消息卡片、群待办小程序启动信息
/// - 基础库 v3.7.8 支持获取单聊群启动信息,获取的群(含单聊)唯一标识,可用于[聊天工具模式](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.openChatTool.html)。
/// **示例代码** /// **示例代码**
/// ```js /// ```js
/// wx.getGroupEnterInfo({ /// wx.getGroupEnterInfo({
@ -667,7 +668,10 @@ namespace WeChatWASM
/// 获取得到的开放数据为以下 json 结构(其中 opengid 为当前群的唯一标识): /// 获取得到的开放数据为以下 json 结构(其中 opengid 为当前群的唯一标识):
/// ```json /// ```json
/// { /// {
/// "opengid": "OPENGID" /// "opengid": "OPENGID", // 多聊群下返回的群唯一标识
/// "open_single_roomid": "", // 单聊群下返回的群唯一标识
/// "group_openid": "", // 用户在当前群的唯一标识
/// "chat_type": 3, // 聊天室类型
/// } /// }
/// ``` /// ```
/// **Tips** /// **Tips**
@ -1400,7 +1404,7 @@ namespace WeChatWASM
/// <summary> /// <summary>
/// [wx.openCustomerServiceConversation(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/customer-message/wx.openCustomerServiceConversation.html) /// [wx.openCustomerServiceConversation(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/customer-message/wx.openCustomerServiceConversation.html)
/// 需要基础库: `2.0.3` /// 需要基础库: `2.0.3`
/// 进入客服会话。要求在用户发生过至少一次 touch 事件后才能调用。后台接入方式与小程序一致,详见 [客服消息接入](#) /// 进入客服会话。要求在用户发生过至少一次 touch 事件后才能调用。后台接入方式与小程序一致,详见 [客服消息接入](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/customer-message/customer-message.html)
/// **注意事项** /// **注意事项**
/// - 在客服会话内点击小程序消息卡片进入小程序时,不能通过 wx.onShow 或 wx.getEnterOptionsSync 等接口获取启动路径和参数,而是应该通过 wx.openCustomerServiceConversation 接口的 success 回调获取启动路径和参数 /// - 在客服会话内点击小程序消息卡片进入小程序时,不能通过 wx.onShow 或 wx.getEnterOptionsSync 等接口获取启动路径和参数,而是应该通过 wx.openCustomerServiceConversation 接口的 success 回调获取启动路径和参数
/// </summary> /// </summary>
@ -2150,9 +2154,6 @@ namespace WeChatWASM
/// [wx.showShareImageMenu(Object object)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.showShareImageMenu.html) /// [wx.showShareImageMenu(Object object)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.showShareImageMenu.html)
/// 需要基础库: `2.14.3` /// 需要基础库: `2.14.3`
/// 打开分享图片弹窗,可以将图片发送给朋友、收藏或下载 /// 打开分享图片弹窗,可以将图片发送给朋友、收藏或下载
/// **Bug & Tip**
/// 1. `tip`: `needShowEntrance`分享的图片消息是否要带小程序入口,支持申明类目:商家自营、电商平台、餐饮服务(餐饮服务场所/餐饮服务管理企业、点餐平台、外卖平台)、旅游服务(住宿服务、景区服务、OTA、旅游管理单位)、生活服务(家政服务、丽人服务、宠物(非医院类)、婚庆服务、洗浴保健、休闲娱乐、百货/超市/便利店、开锁服务、营业性演出票务、其他宠物健康服务、洗浴保健平台、共享服务、跑腿、寄存、求职/招聘)
/// 2. `tip`: `needShowEntrance`小游戏所有类目都支持
/// </summary> /// </summary>
public static void ShowShareImageMenu(ShowShareImageMenuOption callback) public static void ShowShareImageMenu(ShowShareImageMenuOption callback)
{ {
@ -4035,6 +4036,32 @@ namespace WeChatWASM
return WXSDKManagerHandler.Instance.GetLogManager(option); return WXSDKManagerHandler.Instance.GetLogManager(option);
} }
/// <summary>
/// [[PageManager](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.html) wx.createPageManager()](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/wx.createPageManager.html)
/// 需要基础库: `3.6.7`
/// 小游戏开放页面管理器用于启动微信内置的各种小游戏活动、功能页面。具体OPENLINK值由不同的能力渠道获得。
/// **示例代码**
/// ```js
/// const pageManager = wx.createPageManager();
/// pageManager.load({
/// openlink: 'xxxxxxx-xxxxxx', // 由不同渠道获得的OPENLINK值
/// }).then((res) => {
/// // 加载成功res 可能携带不同活动、功能返回的特殊回包信息(具体请参阅渠道说明)
/// console.log(res);
/// // 加载成功后按需显示
/// pageManager.show();
/// }).catch((err) => {
/// // 加载失败,请查阅 err 给出的错误信息
/// console.error(err);
/// })
/// ```
/// </summary>
/// <returns></returns>
public static WXPageManager CreatePageManager()
{
return WXSDKManagerHandler.Instance.CreatePageManager();
}
/// <summary> /// <summary>
/// [[RealtimeLogManager](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.html) wx.getRealtimeLogManager()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/wx.getRealtimeLogManager.html) /// [[RealtimeLogManager](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.html) wx.getRealtimeLogManager()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/wx.getRealtimeLogManager.html)
/// 需要基础库: `2.14.4` /// 需要基础库: `2.14.4`

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c4230f9f65d0afb4067ad7f199b27b85 guid: d78b6fb7d09dbe1bae078947772fbf0d
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 27ba91fd1b81cbeacb6b52573fd85ae4 guid: 028866913f5004aa0dc1fd8072470e8e
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 67ed4a3abaa91dc9c1e4b4d16e4dbb68 guid: 1859edd1f26d66adbe198b0f99b1a7a0
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: e752db497c1432e0c0db45433ee1fad4 guid: 9c58bb45a5325f1e999a5d172ab12403
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 417e286407fe48d98fa3d32a0be8dd2b guid: fd2b1ba5a78553d11673cde07fbc34b9
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: dbbcf68b5add82e8b9af3be557555322 guid: 5d056b6e6b7b38dc86445b0e12aa5aa0
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 79f2656d94a7155fa52617cee1e1c82d guid: b9d2e4d94a63065b76b58b040a02a0f3
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9cd86b2766a35bd5e5fabf0c54ddeee5 guid: 7f8cd25a55131c04d1b6c5f417419c6e
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 27ea1d6b12033c02057ced80521b1736 guid: 18469f9280fd7a991eb76b0a7c78e672
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 26fad2620524f1a198423d5bc5da57ab guid: 5a0b57eac328a2025583e7647cb866b9
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3486b81a2a6ccf39f13d79f04537c8f2 guid: ee8296415b516593f1cf8de3183202bb
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 267d4849229da208523e21906566bc67 guid: 0499ad4f8b6aa8a30fdcf8902300f811
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: ba788447d16bf43c3d14e7b8a2f823b7 guid: 35dac1620f08319a23679dbe8b71f21f
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 05bc0a7a5a1c4d51a7a18dc734495366 guid: 00aaeea05816b8e3d27fef0d1b813390
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8286d999f2acef1444c9c064c1947aa8 guid: b59fd462295273502ed25208e090c190
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: cf67f985d69017a9c4e9c0783c7cb763 guid: 8c8ffb6f43e6e0d6755fc23c7736ed57
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5a34e5046ed8a73741831e7fce235e75 guid: 669f32800916e6dff988b1a292a11db4
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: a8922bfbf763a0992807484636eb1c2c guid: 451287f69ed252585ef083171d0df702
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 1acdc8f667e90f6c61273145666e7709 guid: 09aae9e454cd7f3bdf30e919c2e1ab56
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 96b51fd522badc9195b51528edd74efe guid: 93d1213adc59501b06eeabc58de2e716
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4b4b1b465fcd002143139189d339f922 guid: bbc8596fd92e50620b36770d5f0e83ef
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: dd0839e0e483154c0c1a83590f2fba02 guid: d1a59b2bbe5753377c238b36700b8c16
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: af79d7bca9bb442a8769a82da1b3646e guid: f7fbdd91b6493d05a03c6860fef62fe6
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: fd674ff15b4773bac7a5ea0bc1fedc2e guid: 67971534c2cc0bf6c4de170ca8099dcd
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 86286d61507e6b747aa5ac5f5150c2a1 guid: 64d30dc4d0217277d360b1fffff8c93f
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8bc40779fb5c843464e56220c289e80d guid: 2da4b8af1aaa1177de594c5fe3e79201
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 42d525b498a358dea7e0cbf990cc4115 guid: 6b2aaa782745e5e152df768267dd3fc3
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: a1e65411b61aebac81eb99fefa681def guid: 40d6f772e7c2a992b1a4fcd3aa5ea05a
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2865f239afa9c7d36007f28f3ccd7846 guid: 8ab70e7283e0c4b81cc128368d084f27
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: ea5f20232b13b5d0478320d67c003bb8 guid: fc1a5312994c59323aeb243041af2946
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -113,6 +113,7 @@ GameGlobal.WebAssembly = GameGlobal.WXWebAssembly;
GameGlobal.unityNamespace = GameGlobal.unityNamespace || unityNamespace; GameGlobal.unityNamespace = GameGlobal.unityNamespace || unityNamespace;
GameGlobal.realtimeLogManager = wx.getRealtimeLogManager(); GameGlobal.realtimeLogManager = wx.getRealtimeLogManager();
GameGlobal.logmanager = wx.getLogManager({ level: 0 }); GameGlobal.logmanager = wx.getLogManager({ level: 0 });
GameGlobal.disableMultiTouch = $DISABLE_MULTI_TOUCH;
// 提前监听错误并打日志 // 提前监听错误并打日志
function bindGloblException() { function bindGloblException() {
// 默认上报小游戏实时日志与用户反馈日志(所有error日志+小程序框架异常) // 默认上报小游戏实时日志与用户反馈日志(所有error日志+小程序框架异常)

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: dbbc1b55c63d5906c1c4d43cb23f058a guid: 2e3b3d4f7883e96f35d2fdc990d6bd21
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2352c88d66d393adbcfd86736ee16a90 guid: a99e38d20e3a0569143ddeb2485554d9
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 6024b62bcb3447a6644f8827ceb655f4 guid: 2a4c3ea6d438117f1af7ca60ef70c391
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: fd5dbb71eccfaf4515dc4c3e4bea6905 guid: c92ea9264d6d85a28d98a9bb4c62415b
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 92a2a80e7e483e9b2ff4f94c64fc3671 guid: 660ee6c566058987c922a47958845dcb
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8e167e21b4a76680741fec92e9e00641 guid: 0878f8040589f4ecd33d754c8b0529e1
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 81fa18bcf4f9bd1db6e61d598b3c5da1 guid: 1b11d6df4b656dba467aa6ea8e16615a
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5400bd2da06150c2c847437c6114bfe7 guid: c6aaa0932253e6ed3d4c95039e21f629
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 98f6bb6aac352bcdc459695d75b46f0d guid: ed1dca3d95eddba26ab320aa845faac4
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -9,7 +9,7 @@ import { debugLog } from '../utils';
const defaultSoundLength = 441000; const defaultSoundLength = 441000;
const needGetLength = false; const needGetLength = true;
function jsAudioCreateUncompressedSoundClip(buffer, error, length) { function jsAudioCreateUncompressedSoundClip(buffer, error, length) {
const soundClip = { const soundClip = {
buffer, buffer,
@ -70,6 +70,25 @@ function jsAudioCreateUncompressedSoundClipFromCompressedAudio(audioData, ptr, l
}); });
return soundClip; return soundClip;
} }
function getSoundLength(getAudio, retryCount = 3) {
return new Promise((resolve, reject) => {
const { duration } = getAudio;
if (duration > 0) {
resolve(duration);
}
else {
if (retryCount > 0) {
setTimeout(() => {
resolve(getSoundLength(getAudio, retryCount - 1));
}, 100);
}
else {
reject('getAudio.duration is 0');
}
}
});
}
function jsAudioCreateCompressedSoundClip(audioData, ptr, length) { function jsAudioCreateCompressedSoundClip(audioData, ptr, length) {
const soundClip = { const soundClip = {
error: false, error: false,
@ -103,12 +122,14 @@ function jsAudioCreateCompressedSoundClip(audioData, ptr, length) {
if (isSupportBufferURL) { if (isSupportBufferURL) {
const url = wx.createBufferURL(audioData); const url = wx.createBufferURL(audioData);
soundClip.url = url; soundClip.url = url;
setSoundLength();
WEBAudio.audioBufferLength += length; WEBAudio.audioBufferLength += length;
} }
else { else {
const tempFilePath = `${TEMP_DIR_PATH}/temp-audio${ptr + length}.mp3`; const tempFilePath = `${TEMP_DIR_PATH}/temp-audio${ptr + length}.mp3`;
if (GameGlobal.manager.getCachePath(tempFilePath)) { if (GameGlobal.manager.getCachePath(tempFilePath)) {
soundClip.url = tempFilePath; soundClip.url = tempFilePath;
setSoundLength();
WEBAudio.audioBufferLength += length; WEBAudio.audioBufferLength += length;
} }
else { else {
@ -116,6 +137,7 @@ function jsAudioCreateCompressedSoundClip(audioData, ptr, length) {
.writeFile(tempFilePath, audioData) .writeFile(tempFilePath, audioData)
.then(() => { .then(() => {
soundClip.url = tempFilePath; soundClip.url = tempFilePath;
setSoundLength();
WEBAudio.audioBufferLength += length; WEBAudio.audioBufferLength += length;
}) })
.catch((res) => { .catch((res) => {
@ -124,16 +146,24 @@ function jsAudioCreateCompressedSoundClip(audioData, ptr, length) {
}); });
} }
} }
if (needGetLength && soundClip.url) { function setSoundLength() {
const { audio: getAudio } = createInnerAudio(); if (needGetLength && soundClip.url) {
getAudio.src = soundClip.url; const { audio: getAudio } = createInnerAudio();
getAudio.onCanplay(() => { getAudio.src = soundClip.url;
soundClip.length = getAudio.duration * 44100; getAudio.onCanplay(() => {
setTimeout(() => { getSoundLength(getAudio).then((duration) => {
soundClip.length = getAudio.duration * 44100; soundClip.length = duration * 44100;
getAudio.destroy(); getAudio.destroy();
}, 0); })
}); .catch((e) => {
if (soundClip.length === 0) {
soundClip.error = true;
printErrMsg(e);
}
getAudio.destroy();
});
});
}
} }
return soundClip; return soundClip;
} }
@ -219,6 +249,7 @@ export class AudioChannelInstance {
this.source.mediaElement.volume = 0; this.source.mediaElement.volume = 0;
} }
this.source.mediaElement.onPlay(() => { this.source.mediaElement.onPlay(() => {
debugLog('this.source.mediaElement.onPlay');
if (typeof this.source !== 'undefined') { if (typeof this.source !== 'undefined') {
this.source.isPlaying = true; this.source.isPlaying = true;
if (!this.source.loop && this.source.mediaElement) { if (!this.source.loop && this.source.mediaElement) {
@ -240,7 +271,7 @@ export class AudioChannelInstance {
} }
}); });
this.source.mediaElement.onPause(() => { this.source.mediaElement.onPause(() => {
debugLog('onPause'); debugLog('this.source.mediaElement.onPause');
if (typeof this.source !== 'undefined') { if (typeof this.source !== 'undefined') {
this.source.isPlaying = false; this.source.isPlaying = false;
if (this.source.stopTicker) { if (this.source.stopTicker) {
@ -250,7 +281,7 @@ export class AudioChannelInstance {
} }
}); });
this.source.mediaElement.onStop(() => { this.source.mediaElement.onStop(() => {
debugLog('onStop'); debugLog('this.source.mediaElement.onStop');
if (typeof this.source !== 'undefined') { if (typeof this.source !== 'undefined') {
if (this.source.playAfterStop) { if (this.source.playAfterStop) {
this.source._reset(); this.source._reset();
@ -267,7 +298,7 @@ export class AudioChannelInstance {
} }
}); });
this.source.mediaElement.onEnded(() => { this.source.mediaElement.onEnded(() => {
debugLog('onEnded'); debugLog('this.source.mediaElement.onEnded');
if (typeof this.source !== 'undefined') { if (typeof this.source !== 'undefined') {
this.source._reset(); this.source._reset();
this.disconnectSource(); this.disconnectSource();
@ -277,7 +308,7 @@ export class AudioChannelInstance {
} }
}); });
this.source.mediaElement.onError((e) => { this.source.mediaElement.onError((e) => {
debugLog('onError', e); debugLog('this.source.mediaElement.onError', e);
printErrMsg(e); printErrMsg(e);
const { errMsg } = e; const { errMsg } = e;
@ -291,15 +322,17 @@ export class AudioChannelInstance {
} }
}); });
const fn = () => { const fn = () => {
debugLog('this.source.mediaElement.onCanplay');
if (typeof this.source !== 'undefined' && this.source.mediaElement) { if (typeof this.source !== 'undefined' && this.source.mediaElement) {
// @ts-ignore getSoundLength(this.source.mediaElement).then((duration) => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars soundClip.length = duration * 44100;
const { duration } = this.source.mediaElement; })
setTimeout(() => { .catch((e) => {
if (soundClip && this.source && this.source.mediaElement) { if (soundClip.length === 0) {
soundClip.length = Math.round(Math.max(this.source.mediaElement.duration, 0) * 44100); soundClip.error = true;
printErrMsg(e);
} }
}, 0); });
} }
}; };
if (!this.source.canPlayFnList) { if (!this.source.canPlayFnList) {
@ -910,7 +943,7 @@ export default {
if (isIOS175) { if (isIOS175) {
WEBAudio.audioContext?.close(); WEBAudio.audioContext?.close();
WEBAudio.audioContext = wx.createWebAudioContext(); WEBAudio.audioContext = wx.createWebAudioContext();
Object.values(WEBAudio.audioInstances).forEach(it => it.resetGain()); Object.values(WEBAudio.audioInstances).forEach((it) => it.resetGain());
} }
else { else {
WEBAudio.audioContext?.resume(); WEBAudio.audioContext?.resume();
@ -1126,6 +1159,7 @@ export default {
if (WEBAudio.audioWebEnabled === 0) { if (WEBAudio.audioWebEnabled === 0) {
return; return;
} }
debugLog('_JS_Sound_SetPaused', channelInstance, paused);
const channel = WEBAudio.audioInstances[channelInstance]; const channel = WEBAudio.audioInstances[channelInstance];
if (!!paused !== channel.isPaused()) { if (!!paused !== channel.isPaused()) {
if (paused) { if (paused) {

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 295b66536976505501aeb4fbccefc9ce guid: 9221a5da12e829df80230add42c7f2a0
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: b0220a77f19ced18ba8157c961305be6 guid: 6292886d55e8b77dd9d3195e7b82c07b
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 388521ad6863a2f3bd936341e89f3d28 guid: 3c709cc743d8f6a4848486834d375733
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9ac02125409b0c622aace5692350976b guid: b50c68c55d630928213104f95bb024a7
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d4c74f27fff651d90cfd276e29089a97 guid: 9f37e65efa6fa7eadcfd9c1580ea77e1
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 935e280ff127ed5ed5eb4725c90b591a guid: f14da6df00225fa057c442fca5c3b416
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: a2d6fb58778b0a82715575bfc8a62133 guid: 232e362860010b13e573a946788bf0e9
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 7f18cdd24f639ae34e017f457e0f0c4d guid: 21be94730a54b67528468b39e26903cc
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 45b3bb13ee726042d5474abbf6911985 guid: a89bbcdbfde27eade3342fbbfa73daad
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c19f7e2437eb52001dee96f1337d5bf9 guid: a2db4ee2b254032483583a473a63ad70
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: bc33c3f301b15bc79dd38cee179fd398 guid: e662d8f3b73d03250bf3c9a6bc557809
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 644374450c24e8d95c3a0b5503d81fb2 guid: 6f90921255cddb5620c988e6ae10122a
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: bae42494dcd52c823acd5d5795fcaa55 guid: 4619b7bcd6fa5c03769c6a5ac0983495
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 78d802b79a9e64979557fb3cd3e7576f guid: a42887eb0894defaf9ef0a7d931d5b7d
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5fa634f1220e1703bf4309f5b67f8441 guid: 1a75b74d0985a2c310fdb26f4f3ab8dd
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: f2edcf57dcde66410a463206c25350ef guid: 16d32d7c0d2c29717fe88b9ad8adce91
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2265f4b7cb461affeb6172023c5cb22b guid: 0ed5c7f32c817231a5179cc9447f5810
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 113cef93fb2d97d9eb5d883e84d73a21 guid: f949a78638cc43e61f31843b373b14c0
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9f43c3a9604775bfb72c9ad3a31813df guid: c3794d06ae71921926f318b672b3e113
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 638379ea86f6d7ef05c2714eb4d9160e guid: 1d039f18e407e5285072273b5985d184
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 1ad1f78fdf92190771acd990005c3307 guid: d15b831fd0e54190fd15d6cce267fb0e
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 822c8e9cbbd560ff7f5d1054cb99d0bc guid: 570dc479aad9c0c79c33fdfdbf62ba1a
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 6d34dc76425610db86f84693d55dc9ae guid: 2950790c2a8289a32460f7815b30bbe5
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: ea32420a90c5bb3affd0fd23834fc3ca guid: 5ee9f3077c7606176770fb81eab69b1b
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 1b6772ba199d536366c5e30595ec3661 guid: 17e4afb81de96d3dd094148b7f01ecef
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 88d9a8103a56c8a2aaef1ca04aab5aa0 guid: 6a8b4b3b04fd65c81d0a9b97fc5f9097
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2af36b6df75026a47725d0a935a81b8c guid: 19b3f75168f5aeb751c5b05e7c356f1d
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -233,6 +233,14 @@ export const ResType = {
GetLogManagerOption: { GetLogManagerOption: {
level: 'number', level: 'number',
}, },
LoadOption: {
openlink: 'string',
query: 'object',
},
ShowOption: {
openlink: 'string',
query: 'object',
},
Path2D: {}, Path2D: {},
OnCheckForUpdateListenerResult: { OnCheckForUpdateListenerResult: {
hasUpdate: 'bool', hasUpdate: 'bool',

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 72d47d639bf2e778668615949553fa19 guid: 73cba28f17bdd1bfef2c08fca09fa02e
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 7ddd43de792a3ff6b32178474bf375dc guid: 5bddefbf25856dcbe35cecd73caaf917
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 86a6b30602aae4af31c0bf83e964dd35 guid: f554a7c1b5964b82508fe86d108f085c
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8097c7e67dd43585c8b0e39f101c7a9c guid: 3778273dc1e648d157cc0ce4ffcff6c3
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 7eba0f0d9cfe944cab48fc761d62ad25 guid: 379ab98398f00d0d36a94848d241be2f
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c94be2b0318a021245b1746c097dc1d0 guid: be17e9119e92b75952c82b32647b89a9
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 535d5252cdea5aab37e6b1b79f68796c guid: ee4a00652e9f04715edc94fb1fec5f07
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 10d121c1d98cb43545b7ae8af3a9c049 guid: 403aebe98a1ac2f6763d3c54636bdc18
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: e557aa5faadc1229de57a038c8c6581d guid: 0444cf132bf1ba0b552102a6862b427c
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3c8ffdd21cf3dfaa83c0810d8dc37598 guid: 8fcadb5ccd31933debc0dbe054791a03
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4ff3bcaffeb06ead7d13f676ae7642e1 guid: 0db74bbdbbafe6fc7d4bd31fe9ab51f4
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d71c9194dec6ac6b3c0476772eb78272 guid: 94087b81bd882adfd58ee20c19941022
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: cb785bac2706b2aaa2231a5fbebf83aa guid: e0103a4feafc4602bd9ab036f24ae35d
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2712de5da5f23dcb4717a626fdd1517f guid: 62c38e6ee76119ee96fd2afe6a219f30
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d04a798df6fc457f71378769b036cdd3 guid: ebf4345cd96b579cb18c4616baa30e90
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -1197,8 +1197,52 @@ const isWK = false;
identifier: formatIdentifier(v.identifier, type, changed) identifier: formatIdentifier(v.identifier, type, changed)
}; };
} }
let activeTouchId = -1;
function touchEventHandlerFactory(type) { function touchEventHandlerFactory(type) {
return function (event) { return function (event) {
// 禁止多点触控
if (GameGlobal.disableMultiTouch) {
if (event.touches.length > 0 || event.changedTouches.length > 0) {
if (activeTouchId !== -1) {
const touch = event.touches.find(v => v.identifier === activeTouchId);
const changedTouch = event.changedTouches.find(v => v.identifier === activeTouchId);
event.touches = touch ? [touch] : [];
event.changedTouches = changedTouch ? [changedTouch] : [];
}
else {
event.touches = event.touches.slice(0, 1);
event.changedTouches = event.changedTouches.slice(0, 1);
}
let getFirstTouchId;
if (event.changedTouches.length > 0) {
getFirstTouchId = event.changedTouches[0].identifier;
}
if (type === 'touchstart') {
if (activeTouchId === -1) {
activeTouchId = getFirstTouchId;
}
else {
return;
}
}
else if (type === 'touchmove') {
if (getFirstTouchId !== activeTouchId) {
return;
}
}
else if (type === 'touchend') {
if (getFirstTouchId === activeTouchId) {
activeTouchId = -1;
}
else {
return;
}
}
else if (type === 'touchcancel') {
activeTouchId = -1;
}
}
}
const touchEvent = new TouchEvent(type); const touchEvent = new TouchEvent(type);
touchEvent.touches = event.touches.map(v => formatTouchEvent(v, event.type)); touchEvent.touches = event.touches.map(v => formatTouchEvent(v, event.type));
touchEvent.targetTouches = Array.prototype.slice.call(event.touches).map(v => formatTouchEvent(v, event.type)); touchEvent.targetTouches = Array.prototype.slice.call(event.touches).map(v => formatTouchEvent(v, event.type));

Some files were not shown because too many files have changed in this diff Show More