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

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

31. 屏幕适配的缩放模式详解(TypeScript-2D基础篇(TS)-屏幕适配) [ 88%]

...幕的物理宽高。 ### 示例代码中所用的背景图片: [loadingBg.jpg](http://ldc.layabox.com/uploadfile/file/20170223/1487816895380055.jpg)(点击打开或另存`1136×640`像素背景原图) ### 一、exactfit模式 ​ exactfit模式是一种不考虑内容的原始比例,直接通...

来源: Laya2.0_文档 发布时间: 20200307

32. 部分IOS机型在加载mp3音频文件时出错,资源加载异常 [ 88%]

...a.Loader.ATLAS },                      { url: "Images/BG_Gray.png", type: Laya.Loader.IMAGE },             { url: "Images/BG_PopWindow.png", type: Laya.Loader.IMAGE },             { url: "Images/BG_PopWindowIn.png", type: Laya.Loader.IMAGE },       ...

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

33. 【简单跑酷--JS版】---Lv.6 终篇 [ 88%]

...如下  (function () { /** * 血条 * */ function Hp(type){ //背景 this.bg = null; //进度条 this.bar = null; //最小值 this.MIN_VALUE = 0; //最大值 this.MAX_VALUE = 100; //值 this.value = 100; Hp.__super.call(this); this.init(type); } //能量类型 Hp.HP_TYPE_ENERGY = "hp_type_energy"; ...

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

34. 屏幕适配-屏幕适配 [ 88%]

...ar Text = Laya.Text; var Event = Laya.Event; var Image = Laya.Image; var WebGL = Laya.WebGL; //所有适配模式 var modes = ["noscale", "exactfit", "showall", "noborder", "full", "fixedwidth", "fixedheight"]; //当前适配模式索引 var index = 0; //全局文本信息 var txt; (function() { // ...

来源: Laya_示例 发布时间: 20240930

35. 屏幕适配-屏幕适配 [ 88%]

... txt; class SmartScale_T { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Image = Laya.Image, Text = Laya.Text; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); //设置适配模式 Laya.stage.scale...

来源: Laya2.0_示例 发布时间: 20240930

36. 官方视频教程中飞机大战 "this.addChild is not a function" [ 87%]

...ddChild is not a function" IDE Layabox1.7.20.2 beta 版 src/Game.js//var WebGL = laya.webgl.WebGL; //Laya.init(480, 852, WebGL); var Game = (function(){ (function Game(){ Laya.init(480,852); this.bg = BackGround(); Laya.stage.addChild(this.bg); })(); })(); src/BackGround.jsvar BackGround = (function...

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

37. 关于闭包的问题 [ 87%]

...ew Sprite(); letter.loadImage("../imgs/linkup/" + letterList[z] + ".png", (bg.width / letterList.length) * z, 0, bg.width / letterList.length, bg.height / 2); Laya.stage.addChild(letter); letter.on("click", this, (function(para){ console.log("z:"+z+";para:"+para+";letterList[para]:"+letterList[para]...

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

38. 怎样改变图片大小 [ 86%]

...请: 与内容相关的链接 提交 1 个回复 qian 赞同来自: this.bg_img.skin = "ui/bg.jpg"; this.bg_img.width = Laya.stage.width; this.bg_img.height = Laya.stage.height; Image使用skin修改显示,改变宽高时,会拉伸显示内容 2018-01-30 0 0 分享 微博 QZONE 微信 为什么...

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

39. BackGround.super(this);这个报错 Cannot read property 'call' of undefined [ 85%]

...自: var shouye=(function(){ (function shouye(){ Laya.init(100,300); this.bgimg=new BackGround(); Laya.stage.addChild(this.bgimg); })(); return shouye; })(); var BackGround = (function (_super) { function BackGround() { BackGround.super(this); this.bg=new Laya.sprite; this.bg.loaImage("war/beijing...

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

40. Sprite加载图片 是异步操作吗? [ 85%]

Sprite加载图片 是异步操作吗? this.bg_2.loadImage("background.png"); this.bg_2.pos(0,this.bg_2.height); 这时候 this.bg_2.height 的值打印出来是0 2017-10-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1...

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