You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flowchart LR
controls["First-person controls and HUD"]
world["Ad World scene orchestration"]
boards["Interactive billboard surfaces"]
webads["GPT and Google H5 ads"]
native["Host API and AdMob plugin"]
controls -- "drive" --> world
world -- "renders" --> boards
boards -- "load content from" --> webads
world -- "requests ads via" --> native
Here are some key observations to aid the review process:
⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🧪 No relevant tests
🔒 Security concerns
Sensitive configuration exposure: corpan/plugins/tauri-plugin-admob/android/src/main/AndroidManifest.xml hardcodes what appears to be a live AdMob application ID. While this is not a secret like a password, it still exposes production monetization identifiers in source control and makes environment separation harder. Please confirm this is intentional and consider injecting environment-specific IDs at build time instead of committing them directly.
The HtmlMesh offset is computed before applying rotationY, so angled billboards are pushed along world -Z instead of their own facing direction. This can leave the ad surface coplanar with the frame or visibly offset on rotated signs.
htmlMesh.position=newVector3(cfg.x,cfg.y,cfg.z)// Slightly in front of frame to prevent z-fightingconstforward=newVector3(0,0,-0.02)forward.rotateByQuaternionAroundPointToRef(htmlMesh.rotationQuaternion??htmlMesh.rotation.toQuaternion(),Vector3.Zero(),forward,)htmlMesh.position.addInPlace(forward)htmlMesh.rotation=newVector3(0,cfg.rotationY,0)
Cleanup currently destroys all GPT slots on the page, not just the ones created by this provider instance. That can break other packs or components that also use GPT, and it should be validated that disposal is scoped to this provider's own slots and DOM nodes.
Presentation failures and normal dismissals share the same completion path, so fullscreen ads can be reported as successfully shown even when they failed to present. That can corrupt reward handling and upstream cooldown/state logic.
Call controller.dispose() during teardown so the global keyboard, mouse, and touch listeners added by createFirstPersonController are actually removed. Without this, remounting the pack can duplicate input handlers and keep stale listeners alive after unmount.
Why: This is a correct lifecycle fix: createFirstPersonController() registers global input listeners, but world.ts never calls controller.dispose(). Without that cleanup, remounting can leak stale handlers and duplicate keyboard/mouse/touch behavior.
Medium
Wait for existing script
Don't mark the GPT script as loaded just because a matching <script> tag exists. If another instance inserted the tag but it is still loading, init() can continue with window.googletag still undefined and permanently skip ad setup.
Why: The suggestion correctly identifies a race in loadScript(): a matching GPT <script> tag can exist before window.googletag is ready, causing init() to exit early and never finish setup. Waiting for the existing script to actually load materially improves reliability of gptProvider.ts.
Medium
Report presentation failures correctly
didFailToPresentFullScreenContentWithError currently routes through the same success path as a normal dismissal, so failed interstitials are reported as shown: true. Split failure handling into its own closure and resolve an error result instead; the same pattern should also be applied to RewardedDelegate.
Why: This catches a real correctness bug in AdmobPlugin.swift: didFailToPresentFullScreenContentWithError currently funnels into the same onDismiss() path and reports shown: true on failure. Separating failure handling would make interstitial results accurate, and the same issue likely exists for RewardedDelegate as noted.
Medium
Externalize AdMob application ID
Hardcoding a real AdMob application ID in the plugin forces every consuming app and environment to send traffic to the same account, including development builds. Use a manifest placeholder so the host app must inject the correct ID per build variant.
Why: The hardcoded com.google.android.gms.ads.APPLICATION_ID makes the plugin unusably tied to a single AdMob account across all consuming apps and environments. Using a manifest placeholder is a strong correctness and configurability improvement for tauri-plugin-admob.
Medium
Security
Restrict development server exposure
Binding the dev server to 0.0.0.0 exposes the entire packsRoot directory to every machine on the local network. Default this to 127.0.0.1 and only allow broader exposure through an explicit environment override.
Why: This correctly identifies that binding the Python dev server to 0.0.0.0 exposes packsRoot to the local network by default. Switching to 127.0.0.1 with an opt-in override is a meaningful hardening change for a development-only script.
Medium
Remove global ad permissions
Adding every admob:* permission to the global default capability gives all windows access to ad-loading and ad-display commands. Keep these permissions out of default.json and grant them only from a dedicated capability attached to the specific trusted window that should use ads.
Why: This is a valid least-privilege concern because putting all admob:* permissions in default.json grants them to every window using the default capability. It improves security posture, though whether it is necessary depends on the app's intended window trust model.
Low
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
meh, IDK
PR Type
Enhancement
Description
Add immersive
ad-worldBabylon packAdd interactive billboards and mobile controls
Integrate GPT web ads and AdMob
Bridge native ads through Tauri plugin
Diagram Walkthrough
File Walkthrough
17 files
Compose world systems and ad lifecycleImplement FPS keyboard, mouse, touch controlsAdd billboard targeting and ad triggeringRender joystick, hint, and interact buttonCreate neon environment lighting and effectsAdd rain and ember particle ambienceLoad GPT ads or billboard placeholdersTrigger interstitials from movement zone crossingsStyle HUD, billboards, and mobile controlsIntegrate Google H5 ad break providerAdd GPT display slot loading and refreshDelegate ad requests to native hostExtend shared host API with adsInitialize AdMob and expose ad methodsRegister AdMob plugin commands and setupImplement Android interstitial, rewarded, and banner adsImplement iOS interstitial, rewarded, and banner ads1 files
Build neon billboards with resilient HtmlMesh2 files
Define billboard layout, colors, and sizesLoad AdMob plugin into Tauri app42 files