• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 240 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0043 秒)

71. 【简单跑酷--JS版】---Lv.5 玩家踩地板 [ 79%]

...function(){ /** * 地板类 */ function Floor(){ //背景贴图纹理 this.bgTexture = null; //最大右边距离 this.maxRight = 0; //判断是否超过右边最大距离了 this.isOutComplete = false; //背景 this.bg = null; //背景右边补丁 this.rightBg = null; Floor.__super.call(this); } //...

来源: Laya_社区 发布时间: 20160801

72. 微信小游戏中iPhoneX的适配问题 [ 79%]

...下  (function() {     Laya.MiniAdpter.init();     // 不支持WebGL时自动切换至Canvas     Laya.init(750, 1334, Laya.WebGL);     //设置适配模式     Laya.stage.scaleMode = "exactfit";     //实例一个背景     var bg = new Laya.Image();     bg....

来源: Laya_社区 发布时间: 20180604

73. Laya.Image怎么获取图片的真实大小 [ 79%]

Laya.Image怎么获取图片的真实大小 随便举个栗子 this.bgImage = new Laya.Image("../laya/assets/comp/bg.jpg") 然后怎么获取那张图片的大小? 试了很多方法,也一顿搜索,但是没有答案 2018-07-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...

来源: Laya_社区 发布时间: 20180730

74. js继承模式 [ 78%]

...t(); } Class.prototype.init = function() { Laya.stage.addChild(this); this.bg(); Laya.timer.frameLoop(1, this, this.loop); }; Class.prototype.bg = function() { for (var i = 0; i < 2; i++) { this.img[i] = new Laya.Image('background.png'); this.addChild(this.img[i]); } this.img[0].y = 0; this.img[1...

来源: Laya_社区 发布时间: 20170619

75. HtmlDivElement宽度设置错误 [ 78%]

...xtends Laya.Sprite { constructor() { super(); this.init(); } init() { this.bg = new Laya.Sprite(); this.bg.graphics.drawRect(0, 0, 200, 200, '#ccc'); this.addChild(this.bg); this.htmlTxt = new Laya.HTMLDivElement(); this.htmlTxt.style.fontSize = 20; this.htmlTxt.style.width = 200; this.htmlTxt.style...

来源: Laya_社区 发布时间: 20210107

76. 加载模式下,如何下载不打包的图片? [ 78%]

...会生成一个ui.json,还有ui.atlas和ui.png。 如果有大图片,bg.jpg不会放到ui.png里面。 这些资源都放到服务器,需要下载。 这时候,bg.jpg需要怎么下载呢? ui.atlas里面没有bg.jpg的信息。 2018-04-27 添加评论 免费帖 --> 分享 微博 QZONE 微...

来源: Laya_社区 发布时间: 20180427

77. 预加载音频文件遇到的问题 [ 78%]

...示例), //加载声音资源 Laya.loader.load("res/sound/bloodstream_bg.mp3", Laya.Handler.create(this, onLoadedSound), null, Laya.Loader.SOUND); // })(); function onLoadedSound(){ Laya.SoundManager.playMusic("res/sound/bloodstream_bg.mp3", 0, Laya.Handler.create(this, onComplete)); } function ...

来源: Laya_社区 发布时间: 20180320

78. XMLHttpRequest cannot load [ 77%]

... lose skin comp/checkbox.png file:///F:/Laya/Project/firstGame/bin/h5/comp/bg.png Failed to load resource: net::ERR_FILE_NOT_FOUND file:///F:/Laya/Project/firstGame/bin/h5/comp/image.png Failed to load resource: net::ERR_FILE_NOT_FOUND firstGame.max.js:9137 [warn]Retry to load: F:/Laya/Project/first...

来源: Laya_社区 发布时间: 20170108

79. IOS的safari浏览器打开h5项目demo,游戏场景偏移(附件有完整demo) [ 77%]

...function LayaSample() { //初始化引擎 Laya.init(1136, 640); Laya.stage.bgColor = "#235615"; //设置适配模式 Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; //实例...

来源: Laya_社区 发布时间: 20170228

80. 引擎示例中的新手引导自己写了一次,不知道为什么无法实现点击。 [ 77%]

...ite; var HitArea = Laya.HitArea; var step = 0; Laya.init(1285, 727, Laya.WebGL); var stage = Laya.stage; var loader = Laya.loader; stage.bgColor = "#00ffff"; stage.alignH = "center"; stage.alignW = "middle"; stage.scaleMode = "showall"; loader.load("../../res/guide/crazy_snowball.png", Handler.creat...

来源: Laya_社区 发布时间: 20171031