Disable Zesty banner ads while keeping beacon active
All checks were successful
Build / build (push) Successful in 1m41s
All checks were successful
Build / build (push) Successful in 1m41s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a6715c62bc
commit
abd8bb30a1
@ -24,10 +24,11 @@ async function loadAd(
|
||||
const ad = await fetchCampaignAd(adUnitId, format);
|
||||
adRef.current = ad;
|
||||
const mat = banner.material as StandardMaterial;
|
||||
mat.diffuseTexture?.dispose();
|
||||
mat.emissiveTexture?.dispose();
|
||||
const tex = new Texture(ad.assetUrl, scene);
|
||||
tex.hasAlpha = true;
|
||||
mat.diffuseTexture = tex;
|
||||
mat.emissiveTexture = tex;
|
||||
|
||||
if (ad.campaignId) sendOnLoadMetric(adUnitId, ad.campaignId);
|
||||
}
|
||||
|
||||
@ -44,8 +45,8 @@ export function createZestyBanner(
|
||||
const banner = MeshBuilder.CreatePlane('zestybanner', planeOpts, scene);
|
||||
|
||||
const mat = new StandardMaterial('zestyMat', scene);
|
||||
mat.diffuseTexture = new Texture(fmt.defaultImage, scene);
|
||||
(mat.diffuseTexture as Texture).hasAlpha = true;
|
||||
mat.emissiveTexture = new Texture(fmt.defaultImage, scene);
|
||||
(mat.emissiveTexture as Texture).hasAlpha = true;
|
||||
banner.material = mat;
|
||||
|
||||
const adRef = { current: { assetUrl: '', ctaUrl: '', campaignId: '' } };
|
||||
|
||||
@ -5,7 +5,6 @@ import {
|
||||
import { DefaultScene } from "./defaultScene";
|
||||
import { InputControlManager } from "../ship/input/inputControlManager";
|
||||
import log from './logger';
|
||||
import { createZestyBanner } from '../ads/zestyBanner';
|
||||
|
||||
const XR_RENDERING_GROUP = 3;
|
||||
const FADE_DELAY_MS = 500;
|
||||
@ -55,18 +54,6 @@ async function createXRExperience(): Promise<void> {
|
||||
disablePointerSelection: true // Disable to re-enable with custom options
|
||||
});
|
||||
log.debug(WebXRFeaturesManager.GetAvailableFeatures());
|
||||
try {
|
||||
const banner = createZestyBanner("a2170882-f232-4da0-9315-747ee049e642",
|
||||
"billboard", 10, DefaultScene.MainScene, DefaultScene.XR);
|
||||
banner.position.z = 50;
|
||||
banner.position.y = 5;
|
||||
banner.rotation.y = Math.PI;
|
||||
banner.renderOverlay = true;
|
||||
banner.overlayColor = Color3.Red();
|
||||
|
||||
} catch (e) {
|
||||
log.debug("Zesty banner init failed:", e);
|
||||
}
|
||||
// Enable pointer selection with renderingGroupId so laser is never occluded
|
||||
DefaultScene.XR.baseExperience.featuresManager.enableFeature(
|
||||
WebXRFeatureName.POINTER_SELECTION,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user