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

大约有 391 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0042 秒)

141. 屏幕适配-屏幕适配 [ 70%]

... Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Image = Laya.Image, Text = Laya.Text; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); //设置适配模式 Laya.stage.scaleMode = "noscale"; //设置横竖屏 Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; //设置水平...

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

142. 性能测试-卡通人物2 [ 70%]

...AirIDE让项目开发更高效。(function() { var Stage = Laya.Stage; var Text = Laya.Text; var Stat = Laya.Stat; var WebGL = Laya.WebGL; var Sprite = Laya.Sprite; var Animation = Laya.Animation; // Class Character function Character(images) { Character.super(this); Character.WIDTH = 110; Character...

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

143. 性能测试-卡通人物2 [ 70%]

...Skins = [character1, character2, character3, character4], characters = [], text; class PerformanceTest_Cartoon2 { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Text = Laya.Text; // 不支持WebGL时自动切换至Canva...

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

144. 如何将一段文字放置到粘贴板 , 或者说点击一个按钮后复制copy一段文字? [ 70%]

...功能,在安卓下,直接这样写: function copyToClip(){ var Context = plus.android.importClass("android.content.Context"); var main = plus.android.runtimeMainActivity(); var clip = main.getSystemService(Context.CLIPBOARD_SERVICE); plus.android.invoke(clip,"setText","I'm copy from Native.js...

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

145. 位图字体的制作与使用(TypeScript-LayaAir基础篇(TS)-文本) [ 70%]

...esets | 字体的初始颜色。如果用白色字,可以设定为`White text with alpha`,即白色字透明底。 | | Width | 导出的位图宽度 | | Height | 导出的位图高度 | | Font descriptor | 字体描述文件,必须要选择 xml | | Textures | 纹理图片格式,必须要选...

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

146. HTMLIframeElement 不支持很多标签,希望知道这东西支持哪些标签? [ 70%]

...html并显示的测试: 1、在本地部署layaair samples 2、切换到Text_HTML示例 3、进入该示例使用的res目录:samples\res\html\test.html 4、修改此html,添加 ul 、li、table、tr、td等等标签。发现均提示 undefined class。 如图: 5、test.html 如图:   6...

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

147. 文本-字数限制 [ 70%]

...gColor = "#232628"; createInput(); })(); function createInput() { var inputText = new Input(); inputText.size(350, 100); inputText.x = Laya.stage.width - inputText.width >> 1; inputText.y = Laya.stage.height - inputText.height >> 1; // 设置字体样式 inputText.bold = true; inputText.bgColor = "#...

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

148. DOM元素-表单输入 [ 70%]

...ailInput, birthdayInput, passwordInput]); } showLabel(label, x, y) { const Text = Laya.Text; let t = new Laya.Text(); t.height = this.rowHeight; t.valign = "middle"; t.fontSize = 15; t.font = "SimHei"; t.text = label; t.pos(x, y); this.form.addChild(t); } createInputElement(){ let input = Laya.Brows...

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

149. 新建js项目 然后复制protobuf js版本贴到项目入口文件LayaUISample.js 无法运行报错 [ 70%]

...-03-18 20:24 引入了的, <!-- Protobuf --> <script type="text/javascript" src="libs/bytebuffer.js"></script> <script type="text/javascript" src="libs/protobuf.js"></script> zouww12345 • 2017-03-18 20:24 这两行注释我去...

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

150. 文本-单行输入 [ 70%]

...gColor = "#232628"; createInput(); })(); function createInput() { var inputText = new Input(); inputText.size(350, 100); inputText.x = Laya.stage.width - inputText.width >> 1; inputText.y = Laya.stage.height - inputText.height >> 1; // 移动端输入提示符 inputText.prompt = "Type some word...";...

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