只要我记得,我一直有这个问题.我以为它可能刚刚来自我的手机或仿真,但在发布我的应用程序后,我仍然在屏幕底部看到这个黑色矩形,看起来像状态栏.
这在我的config.xml中有这个后发生
<preference name="android-build-tool" value="gradle" />
<preference name="Fullscreen" value="true" />
<preference name="Orientation" value="portrait" />
Run Code Online (Sandbox Code Playgroud)
截图:
UPDATE
我注意到如果我最小化游戏然后再点击它(奇怪),底部的黑色条会消失.
我尝试创建一个新项目,一旦我将全屏首选项放在config.xml中,就会发生同样的事情.
看起来顶部栏转移到底部> _>
我正在尝试更改应用的整体尺寸.它读取360x640.我的画布在DPI中大4倍,因此使用了1440x2560 window.screen.width.
有一种方法可用于window.screen.width定义画布,但我正在尝试更改window.innerWidth&的值window.innderHeight.
我面临的主要问题是当我拖动一个元素时,它每4像素触摸移动1个像素,因为应用程序的宽度本身是360,画布是1440,因此在设备上移动1px,每4px我的touchmove.即使我达到60fps的阻力,如果你仔细观察,它会给拖动带来一种阻挡移动效果,而不是平滑.
我不确定,但我认为这是通过viewport在html中定义来解决的target-densitydpi=device-dpi,但这已经被弃用了.
我认为我需要的是一种使window.innerWidth等于window.screen.width的方法,这可能吗?
window.innerWidth == 360px //Can I change these values?
window.innerHeight == 640px //Can I change these values?
window.screen.width == 1440px
window.scree.height == 2560px
Run Code Online (Sandbox Code Playgroud)
PS如果问题不清楚,请不要犹豫!
我正在使用Heroku,我收到此错误..
2016-10-10T03:34:11.188366+00:00 app[web.1]: Error: Cannot find module 'module1.js'
2016-10-10T03:34:11.188369+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:339:15)
2016-10-10T03:34:11.188370+00:00 app[web.1]: at Function.Module._load (module.js:290:25)
2016-10-10T03:34:11.188371+00:00 app[web.1]: at Module.require (module.js:367:17)
2016-10-10T03:34:11.188371+00:00 app[web.1]: at require (internal/module.js:20:19)
2016-10-10T03:34:11.188372+00:00 app[web.1]: at Object.<anonymous> (/app/server.js:42:15)
2016-10-10T03:34:11.188373+00:00 app[web.1]: at Module._compile (module.js:413:34)
2016-10-10T03:34:11.188374+00:00 app[web.1]: at Object.Module._extensions..js (module.js:422:10)
2016-10-10T03:34:11.188374+00:00 app[web.1]: at Module.load (module.js:357:32)
2016-10-10T03:34:11.188375+00:00 app[web.1]: at Function.Module._load (module.js:314:12)
2016-10-10T03:34:11.188375+00:00 app[web.1]: at Function.Module.runMain (module.js:447:10)
Run Code Online (Sandbox Code Playgroud)
app.js
/**CUSTOM_MODULES**/
var module1 = require('module1.js');
/**MODULES_END**/
Run Code Online (Sandbox Code Playgroud)
module1.js
function module1(){
//My code
}
module.exports = module1;
Run Code Online (Sandbox Code Playgroud)
module1.js与我的app.js在同一目录中.
我尝试了无数的东西,但似乎没有任何效果.
我试过了:
var module1 = …Run Code Online (Sandbox Code Playgroud)