This commit is contained in:
2025-07-17 17:18:21 +08:00
commit 1ffc1b5cf0
5309 changed files with 1150310 additions and 0 deletions
@@ -0,0 +1,102 @@
export class WebSDK{
//初始化
init(cb: Function = null) {
console.log("init webSDK");
cb && cb();
}
//检查权限
checkAutoSetting(autoKey:string, cb:Function = null) {
cb && cb(true);
}
//获取用户信息
getUserInfo(cb:Function = null) {
cb && cb({ nickName:"默认用户", avatarUrl:"https://hxzgame.vip.hnhxzkj.com/lzx/XiangQin/webHead.png" });
}
//登录
login(cb: Function = null) {
cb && cb({ platform:2, code: null });
}
//显示视频广告
show_video(callback:Function, tag:number) {
callback && callback({ code: 0, tag: tag });
}
//显示插屏
show_splash() {
}
//显示Banner
show_banner(...args) {
}
//隐藏Banner
hide_banner(...args) {
}
//主动拉起分享
show_share(rewardCB?:Function) {
rewardCB && rewardCB();
}
//获取设备分辨率
getWindowSize() {
return {width:screen.width, height: screen.height};
}
//显示游戏圈
show_gameClub(leftRatio, topRatio, widthRatio, heightRatio) {
}
//隐藏游戏圈
hide_gameClub() {
}
//检查是否支持base64音频播放
checkSupportBase64Audio() {
return true;
}
//播放base64音频
playBase64Audio(base64:string, loop:boolean) {
let substring = base64;
let qianzhui = "data:audio/x-wav;base64,"
if(base64.startsWith(qianzhui)) {
substring = base64.substring(qianzhui.length, base64.length)
}
// 解码 Base64 字符串为二进制数据
const binaryData = atob(substring);
// 创建一个包含二进制数据的 Uint8Array
const byteArray = new Uint8Array(binaryData.length);
for (let i = 0; i < binaryData.length; i++) {
byteArray[i] = binaryData.charCodeAt(i);
}
// 创建 Blob 对象,指定 MIME 类型为音频格式(例如 mp3)
const audioBlob = new Blob([byteArray], { type: 'audio/mp3' });
// 创建音频 URL
const audioUrl = URL.createObjectURL(audioBlob);
console.log("web 播放base64音频", audioUrl)
// 创建音频元素并播放
const audio = new Audio(audioUrl);
audio.play();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 442 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "80546519-99eb-491b-b19e-f7ebcf013483",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "80546519-99eb-491b-b19e-f7ebcf013483@6c48a",
"displayName": "coco_portrait",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "80546519-99eb-491b-b19e-f7ebcf013483",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "80546519-99eb-491b-b19e-f7ebcf013483@f9941",
"displayName": "coco_portrait",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -1,
"trimX": 0,
"trimY": 2,
"width": 276,
"height": 362,
"rawWidth": 276,
"rawHeight": 364,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-138,
-181,
0,
138,
-181,
0,
-138,
181,
0,
138,
181,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
362,
276,
362,
0,
0,
276,
0
],
"nuv": [
0,
0,
1,
0,
0,
0.9945054945054945,
1,
0.9945054945054945
],
"minPos": [
-138,
-181,
0
],
"maxPos": [
138,
181,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "80546519-99eb-491b-b19e-f7ebcf013483@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "80546519-99eb-491b-b19e-f7ebcf013483@6c48a"
}
}
@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "3e4f8ef7-0d7d-4a49-8b37-03c47188eddd",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "3e4f8ef7-0d7d-4a49-8b37-03c47188eddd@6c48a",
"displayName": "tarenaya_disgust",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "3e4f8ef7-0d7d-4a49-8b37-03c47188eddd",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "3e4f8ef7-0d7d-4a49-8b37-03c47188eddd@f9941",
"displayName": "tarenaya_disgust",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 50.5,
"offsetY": -72,
"trimX": 105,
"trimY": 144,
"width": 816,
"height": 1045,
"rawWidth": 925,
"rawHeight": 1189,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-408,
-522.5,
0,
408,
-522.5,
0,
-408,
522.5,
0,
408,
522.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
105,
1045,
921,
1045,
105,
0,
921,
0
],
"nuv": [
0.11351351351351352,
0,
0.9956756756756757,
0,
0.11351351351351352,
0.8788898233809924,
0.9956756756756757,
0.8788898233809924
],
"minPos": [
-408,
-522.5,
0
],
"maxPos": [
408,
522.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "3e4f8ef7-0d7d-4a49-8b37-03c47188eddd@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "3e4f8ef7-0d7d-4a49-8b37-03c47188eddd@6c48a"
}
}
@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "fb29951a-6b07-4899-a829-189a569eedc5",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "fb29951a-6b07-4899-a829-189a569eedc5@6c48a",
"displayName": "eirini_default",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "fb29951a-6b07-4899-a829-189a569eedc5",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "fb29951a-6b07-4899-a829-189a569eedc5@f9941",
"displayName": "eirini_default",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "none",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 925,
"height": 1189,
"rawWidth": 925,
"rawHeight": 1189,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-462.5,
-594.5,
0,
462.5,
-594.5,
0,
-462.5,
594.5,
0,
462.5,
594.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
1189,
925,
1189,
0,
0,
925,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-462.5,
-594.5,
0
],
"maxPos": [
462.5,
594.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "fb29951a-6b07-4899-a829-189a569eedc5@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "fb29951a-6b07-4899-a829-189a569eedc5@6c48a"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 499 KiB

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "91c22405-e7db-402c-9d68-462d7466a5c0",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "91c22405-e7db-402c-9d68-462d7466a5c0@6c48a",
"displayName": "lingxia_default",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "91c22405-e7db-402c-9d68-462d7466a5c0",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "91c22405-e7db-402c-9d68-462d7466a5c0@f9941",
"displayName": "lingxia_default",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "none",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 925,
"height": 1189,
"rawWidth": 925,
"rawHeight": 1189,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-462.5,
-594.5,
0,
462.5,
-594.5,
0,
-462.5,
594.5,
0,
462.5,
594.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
1189,
925,
1189,
0,
0,
925,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-462.5,
-594.5,
0
],
"maxPos": [
462.5,
594.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "91c22405-e7db-402c-9d68-462d7466a5c0@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "91c22405-e7db-402c-9d68-462d7466a5c0@6c48a"
}
}
@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "d071cd0c-0db6-43ca-a764-c9177c6d9ea7",
"files": [
".jpg",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "d071cd0c-0db6-43ca-a764-c9177c6d9ea7@6c48a",
"displayName": "krischya_3_cg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "d071cd0c-0db6-43ca-a764-c9177c6d9ea7",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "d071cd0c-0db6-43ca-a764-c9177c6d9ea7@f9941",
"displayName": "krischya_3_cg",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 996,
"height": 1280,
"rawWidth": 996,
"rawHeight": 1280,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-498,
-640,
0,
498,
-640,
0,
-498,
640,
0,
498,
640,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
1280,
996,
1280,
0,
0,
996,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-498,
-640,
0
],
"maxPos": [
498,
640,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "d071cd0c-0db6-43ca-a764-c9177c6d9ea7@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": false,
"fixAlphaTransparencyArtifacts": false,
"redirect": "d071cd0c-0db6-43ca-a764-c9177c6d9ea7@6c48a"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 413 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 985 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB