index.ejs 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>Cocos Creator | <%= projectName %></title>
  6. <!--http://www.html5rocks.com/en/mobile/mobifying/-->
  7. <meta
  8. name="viewport"
  9. content="width=device-width,user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1,minimal-ui=true"
  10. />
  11. <!--https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html-->
  12. <meta name="apple-mobile-web-app-capable" content="yes" />
  13. <meta
  14. name="apple-mobile-web-app-status-bar-style"
  15. content="black-translucent"
  16. />
  17. <meta name="format-detection" content="telephone=no" />
  18. <!-- force webkit on 360 -->
  19. <meta name="renderer" content="webkit" />
  20. <meta name="force-rendering" content="webkit" />
  21. <!-- force edge on IE -->
  22. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  23. <meta name="msapplication-tap-highlight" content="no" />
  24. <!-- force full screen on some browser -->
  25. <meta name="full-screen" content="yes" />
  26. <meta name="x5-fullscreen" content="true" />
  27. <meta name="360-fullscreen" content="true" />
  28. <!--fix fireball/issues/3568 -->
  29. <!--<meta name="browsermode" content="application">-->
  30. <meta name="x5-page-mode" content="app" />
  31. <!--<link rel="apple-touch-icon" href=".png" />-->
  32. <!--<link rel="apple-touch-icon-precomposed" href=".png" />-->
  33. <link rel="stylesheet" type="text/css" href="<%= cssUrl %>" />
  34. <script src="./libs/ethers.umd.min.js"></script>
  35. <script type="module" crossorigin src="./libs/pog.js"></script>
  36. <script type="text/javascript" src="./libs/vconsole.min.js"></script>
  37. <script
  38. name="OpenADLineJsSDK"
  39. version="1.0"
  40. type="text/javascript"
  41. src="https://protocol.openad.network/line/sdk.loader.js?v=1.0"
  42. ></script>
  43. <script src="//www.googletagservices.com/tag/js/gpt.js"></script>
  44. </head>
  45. <body>
  46. <div id="GameDiv" cc_exact_fit_screen="true">
  47. <div id="Cocos3dGameContainer">
  48. <canvas
  49. id="GameCanvas"
  50. oncontextmenu="event.preventDefault()"
  51. tabindex="99"
  52. ></canvas>
  53. </div>
  54. </div>
  55. <%- include(cocosTemplate, {}) %>
  56. <script type="text/javascript">
  57. const ads_init = function () {
  58. window.openAdNative = {
  59. adInfo: {
  60. zoneId: 429, // please check your parameter zoneId
  61. publisherId: 15, // please check your parameter publisherId
  62. eventId: 0, // Reserved Parameter
  63. },
  64. interAdInfo: {
  65. zoneId: 430, // please check your parameter zoneId
  66. publisherId: 15, // please check your parameter publisherId
  67. eventId: 0, // Reserved Parameter
  68. },
  69. adParams: {
  70. line: {
  71. type: "LMA", // LMA, LWA
  72. liffId: "2007001592-ozOgMXpb", // when type = LMA / LWA, liffId is required
  73. prototype: window.liff, // when type = LMA / LWA, prototype is required. line.prototype must contain two methods: getProfile and openWindow, whether you are using liff SDK js or npm installation package;
  74. },
  75. wallet: {
  76. // If you have a web3 wallet components, Optional
  77. type: "eth", // eth: eth wallet, kaia: line wallet, ton: ton wallet;
  78. provider: null, // here is a provider object after wallet initialization.
  79. components: "", // web3 wallet components name
  80. },
  81. },
  82. wallet: {
  83. // 当line.type === 'web'时,wallet对象必填
  84. type: "kaia", // 类型,eth: eth wallet, kaia: line wallet, ton: ton wallet
  85. provider: null, // 已经初始化的web3钱包的组件provider
  86. components: "", // web3钱包组件的名称
  87. },
  88. // userInfo object
  89. // please add reasonable user IDs for your end users.
  90. // otherwise, OpenAD statistics may be inaccurate,
  91. // which may affect your incentives
  92. userInfo: {
  93. userId: "1", // user ID , If there is no data, please leave it blank
  94. firstName: "11", // firstName or userId , If there is no data, please leave it blank
  95. lastName: "", // lastName or userId , If there is no data, please leave it blank
  96. username: "1", // userName or userId , If there is no data, please leave it blank
  97. displayName: "1", // userName or userId , If there is no data, please leave it blank
  98. },
  99. // If the user is already logged in, initialize user data
  100. initUserInfo: function (data) {
  101. this.userInfo.userId = data.userId;
  102. this.userInfo.firstName = data.firstName;
  103. this.userInfo.lastName = data.lastName;
  104. this.userInfo.username = data.username;
  105. this.userInfo.displayName = data.username;
  106. },
  107. // Close AD
  108. destroy: function (adInfo) {
  109. console.log("window.destroy:");
  110. document.querySelector(`.openADJsSDKBanner`).innerHTML = "";
  111. },
  112. };
  113. console.log("window.openADJsSDK:", window.OpenADLineJsSDK);
  114. console.log("window.openAdNative:", window.openAdNative);
  115. };
  116. window.addEventListener("DOMContentLoaded", ads_init);
  117. </script>
  118. <!-- /23296944437/rewarded -->
  119. <div id="div-gpt-ad-1747208248493-0">
  120. <script></script>
  121. </div>
  122. <script>
  123. const PogVersionText = "PogVersionTextInIndexHtml";
  124. window["pog_init_data"] = {
  125. version: PogVersionText,
  126. };
  127. </script>
  128. </body>
  129. </html>