|
@@ -96,13 +96,13 @@ https://gemini.google.com/share/8340c20dd2d1
|
|
|
|
|
|
|
|
## 技术栈
|
|
## 技术栈
|
|
|
|
|
|
|
|
-| 层级 | 技术 |
|
|
|
|
|
-| ------------ | --------------------------------------------------- |
|
|
|
|
|
-| 渲染引擎 | WebGL 2(自研,无外部 GL 框架) |
|
|
|
|
|
-| 构建工具 | Vite 5 + TypeScript 5 |
|
|
|
|
|
-| 打包插件 | vite-plugin-singlefile(输出单文件 HTML) |
|
|
|
|
|
|
|
+| 层级 | 技术 |
|
|
|
|
|
+| ------------ | -------------------------------------------------------------------- |
|
|
|
|
|
+| 渲染引擎 | WebGL 2(自研,无外部 GL 框架) |
|
|
|
|
|
+| 构建工具 | Vite 5 + TypeScript 5 |
|
|
|
|
|
+| 打包插件 | vite-plugin-singlefile(输出单文件 HTML) |
|
|
|
| 广告平台适配 | AdPlatformAdapter(Applovin / Unity / Playturbo-Mintegral / Google) |
|
|
| 广告平台适配 | AdPlatformAdapter(Applovin / Unity / Playturbo-Mintegral / Google) |
|
|
|
-| 单文件产物 | 默认与各平台 profile 均输出自包含 HTML |
|
|
|
|
|
|
|
+| 单文件产物 | 默认与各平台 profile 均输出自包含 HTML |
|
|
|
|
|
|
|
|
## 项目结构
|
|
## 项目结构
|
|
|
|
|
|
|
@@ -121,11 +121,11 @@ assets/
|
|
|
css/ # 样式
|
|
css/ # 样式
|
|
|
dist/
|
|
dist/
|
|
|
index.html # 默认产物
|
|
index.html # 默认产物
|
|
|
- applovin/applovin.html # Applovin 产物
|
|
|
|
|
- unity/unity.html # Unity 产物
|
|
|
|
|
- playturbo/playturbo.html # Playturbo 产物
|
|
|
|
|
- mintegral/mintegral.html # Mintegral 产物
|
|
|
|
|
- google/google.html # Google 产物
|
|
|
|
|
|
|
+ applovin/index.html # Applovin 产物
|
|
|
|
|
+ unity/index.html # Unity 产物
|
|
|
|
|
+ playturbo/index.html # Playturbo 产物
|
|
|
|
|
+ mintegral/index.html # Mintegral 产物
|
|
|
|
|
+ google/index.html # Google 产物
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
## 开发调试
|
|
## 开发调试
|
|
@@ -160,11 +160,11 @@ http://42.193.231.145:5173
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
npm run build # dist/index.html
|
|
npm run build # dist/index.html
|
|
|
-npm run build:applovin # dist/applovin/applovin.html
|
|
|
|
|
-npm run build:unity # dist/unity/unity.html
|
|
|
|
|
-npm run build:playturbo # dist/playturbo/playturbo.html
|
|
|
|
|
-npm run build:mintegral # dist/mintegral/mintegral.html
|
|
|
|
|
-npm run build:google # dist/google/google.html
|
|
|
|
|
|
|
+npm run build:applovin # dist/applovin/index.html
|
|
|
|
|
+npm run build:unity # dist/unity/index.html
|
|
|
|
|
+npm run build:playturbo # dist/playturbo/index.html
|
|
|
|
|
+npm run build:mintegral # dist/mintegral/index.html
|
|
|
|
|
+npm run build:google # dist/google/index.html
|
|
|
npm run build:all # 依次输出以上全部产物
|
|
npm run build:all # 依次输出以上全部产物
|
|
|
```
|
|
```
|
|
|
|
|
|
|
@@ -196,7 +196,7 @@ npm run build:all # 依次输出以上全部产物
|
|
|
|
|
|
|
|
**预览工具**:https://p.applov.in/playablePreview?create=1
|
|
**预览工具**:https://p.applov.in/playablePreview?create=1
|
|
|
|
|
|
|
|
-1. 执行 `npm run build:applovin`,打开预览工具,上传 `dist/applovin/applovin.html`
|
|
|
|
|
|
|
+1. 执行 `npm run build:applovin`,打开预览工具,上传 `dist/applovin/index.html`
|
|
|
2. 检查项:
|
|
2. 检查项:
|
|
|
- [ ] 广告正常加载,WebGL 填色可交互
|
|
- [ ] 广告正常加载,WebGL 填色可交互
|
|
|
- [ ] CTA 按钮可点击(Applovin 通过 `ExitApi.exit()` 关闭广告,落地页由平台后台配置)
|
|
- [ ] CTA 按钮可点击(Applovin 通过 `ExitApi.exit()` 关闭广告,落地页由平台后台配置)
|
|
@@ -207,27 +207,40 @@ npm run build:all # 依次输出以上全部产物
|
|
|
|
|
|
|
|
**规范文档**:https://docs.unity.com/zh-cn/grow/acquire/creatives/playable/specifications
|
|
**规范文档**:https://docs.unity.com/zh-cn/grow/acquire/creatives/playable/specifications
|
|
|
|
|
|
|
|
-1. 执行 `npm run build:unity`,在 Unity Creative 后台上传 `dist/unity/unity.html`
|
|
|
|
|
-2. 检查项:
|
|
|
|
|
|
|
+**验证方式**:Unity 没有 Web 端预览工具,需通过 **Ad Testing App**(iOS / Android,最新版 4.0.0)扫码验证。
|
|
|
|
|
+
|
|
|
|
|
+1. 执行 `npm run build:unity`,将 `dist/unity/index.html` 托管到可访问的 HTTPS URL
|
|
|
|
|
+2. 在 Unity Ads Dashboard 上传素材,或在 Ad Testing App 中直接扫码加载
|
|
|
|
|
+3. 检查项:
|
|
|
- [ ] `dapi.gameReady()` 被正确调用(可在控制台确认)
|
|
- [ ] `dapi.gameReady()` 被正确调用(可在控制台确认)
|
|
|
- [ ] CTA 跳转正常(Unity 使用 MRAID `mraid.open(url)` 跳转)
|
|
- [ ] CTA 跳转正常(Unity 使用 MRAID `mraid.open(url)` 跳转)
|
|
|
- [ ] 广告尺寸符合规范(单文件 HTML,无外部请求)
|
|
- [ ] 广告尺寸符合规范(单文件 HTML,无外部请求)
|
|
|
|
|
+ - [ ] 文件大小 ≤ 5 MB
|
|
|
|
|
|
|
|
### Google AdMob / Google Ads
|
|
### Google AdMob / Google Ads
|
|
|
|
|
|
|
|
**规范文档**:https://support.google.com/google-ads/answer/9981650?hl=en#_HTML
|
|
**规范文档**:https://support.google.com/google-ads/answer/9981650?hl=en#_HTML
|
|
|
|
|
|
|
|
-1. 执行 `npm run build:google`,使用 Google Web Designer 或 HTML5 验证工具检验 `dist/google/google.html`
|
|
|
|
|
-2. 检查项:
|
|
|
|
|
|
|
+**验证工具**:https://h5validator.appspot.com/adwords/asset
|
|
|
|
|
+
|
|
|
|
|
+Google 的官方验证器要求上传 `.zip` 而非裸 HTML。需要先将产物打包为 zip,上传时勾选 **"Select for App Campaigns"**,然后点击眼睛图标预览。
|
|
|
|
|
+
|
|
|
|
|
+1. 执行 `npm run build:google`,将 `dist/google/index.html` 打包为 `google-ad.zip`
|
|
|
|
|
+2. 打开 h5validator,上传 zip,勾选 "Select for App Campaigns"
|
|
|
|
|
+3. 点击眼睛图标预览,测试交互和 CTA 点击
|
|
|
|
|
+4. 检查项:
|
|
|
- [ ] 无外部网络请求(所有资源均已内联)
|
|
- [ ] 无外部网络请求(所有资源均已内联)
|
|
|
- - [ ] 文件大小满足限制(≤5 MB)
|
|
|
|
|
- - [ ] CTA 可正常触发 `window.open(url)`
|
|
|
|
|
|
|
+ - [ ] 文件大小满足限制(≤5 MB,zip 内 ≤512 个文件)
|
|
|
|
|
+ - [ ] CTA 可正常触发跳转(Google 平台使用 `ExitApi.exit()`)
|
|
|
- [ ] 不依赖 `document.write` 或被禁用 API
|
|
- [ ] 不依赖 `document.write` 或被禁用 API
|
|
|
|
|
+ - [ ] 包含方向 meta 标签(`<meta name="ad.orientation" content="portrait">`)
|
|
|
|
|
|
|
|
### Mintergal / Playturbo
|
|
### Mintergal / Playturbo
|
|
|
|
|
|
|
|
**规范文档**:https://www.playturbo.com/review/doc
|
|
**规范文档**:https://www.playturbo.com/review/doc
|
|
|
|
|
|
|
|
|
|
+**预览工具**:https://www.playturbo.com/review
|
|
|
|
|
+
|
|
|
1. 执行 `npm run build:playturbo` 或 `npm run build:mintegral`,按平台文档要求上传对应产物
|
|
1. 执行 `npm run build:playturbo` 或 `npm run build:mintegral`,按平台文档要求上传对应产物
|
|
|
2. 检查项:
|
|
2. 检查项:
|
|
|
- [ ] 资源加载完成后调用 `window.gameReady()`
|
|
- [ ] 资源加载完成后调用 `window.gameReady()`
|