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

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

31. 屏幕适配-屏幕适配 [ 95%]

...ight"]; //当前适配模式索引 var index = 0; //全局文本信息 var txt; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(1136, 640); //设置适配模式 Laya.stage.scaleMode = "noscale"; //设置横竖屏 Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; //设置水平对齐...

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

32. 屏幕适配-屏幕适配 [ 95%]

...", "showall", "noborder", "full", "fixedwidth", "fixedheight"], index = 0, 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时自动切换...

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

33. Sprite optimizeScrollRect = true 似乎有问题 [ 95%]

...ion (_content, _fontSize, _color, _width, _autoSize, _wordWrap, _ID) { var txt = new Text(); txt.text = _content; txt.cacheAs = 'bitmap'; txt.fontSize = _fontSize; txt.bold = true; txt.font = 'wordFont'; txt.color = _color; txt.strokeColor = '#000000'; //txt.stroke = 2; txt.width = _width; txt.autoS...

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

34. 渲染性能实例问题 [ 95%]

...ya.Stat.show();var textBox = new Laya.Sprite();for(var i=0;i<10000;i++){txt=new Text();txt.text=(Math.random()*100).toFixed(0);txt.color="#CCCCCC";txt.x=Math.random()*550;txt.y=Math.random()*400;textBox.addChild(txt);}Laya.stage.addChild(textBox); 附件 : --> 2019-05-31 添加评论 免费帖 --...

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

35. layadcc打包后需要整包更新的问题 [ 95%]

...路径算的还是文件内容呢? 2、如图1,filetable.bin,filetable.txt,filetable1.txt分别存的是什么内容呢?如果是文件对应的crc,为啥有3个呢?猜测.bin是filetable.txt的压缩版,但是为啥有filetable.txt,filetable1.txt两个呢? 3、如图2,打开filetabl...

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

36. 报错:找不到基类,按照laya社区的解答做了,但是导致了另外一个类和接口出现一样的错 [ 95%]

...   {             Laya.init(600, 300);             var txt:Text = new Text();             txt.text = "HelloLayaBox";             txt.color = "#ff0000";             txt.fontSize = 66;             txt.bold = true;                    ...

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

37. 加载-销毁Texture使用的图片资源 [ 95%]

....graphics.drawRect(0, 0, this.btn.width, this.btn.height, "#057AFB"); this.txt = new Text(); this.txt.text = "销毁"; this.txt.pos(75, 15); this.txt.fontSize = 25; this.txt.color = "#FF0000"; this.btn.addChild(this.txt); this.btn.pos(20, 160); Laya.stage.addChild(this.btn); //添加侦听 this.btn....

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

38. 位图文本怎么做渐变消隐动画? [ 95%]

...赞同来自: private createText(font: string): void {         var txt: Text = new Text();         txt.width = 250;         txt.wordWrap = true;         txt.text = "测试文本";         txt.font = font;         txt.leading = 5;         txt.po...

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

39. Text 居中 搭配 Tween 显示结果有问题。 [ 95%]

Text 居中 搭配 Tween 显示结果有问题。 var txt = new Laya.Text(); txt.text = "做个测试"; txt.x = 0; txt.y = 0; txt.color = "#FFFFFF"; txt.fontSize = 12; txt.width = 800; txt.height = 600; txt.align = "center"; txt.valign = "middle"; Laya.stage.addChild(txt); Laya.Tween.to(txt, { scal...

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

40. webgl文字显示不齐 [ 95%]

webgl文字显示不齐 let txt; txt = new Laya.Text(); txt.text = "abcde"; txt.fontSize = 100; Laya.stage.addChild(txt); txt = new Laya.Text(); txt.text = "我们是最好的"; txt.fontSize = 50; txt.x = 0; txt.y = 300; txt.scale(2,2); Laya.stage.addChild(txt);在laya2.0版本里,上面第二个...

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