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

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

11. 加载TiledMap 不显示 [ 92%]

...Laya.stage.scaleMode = Stage.SCALE_SHOWALL;         Laya.stage.bgColor = "#232628";          this.createMap();          Laya.stage.on("click", this, this.onStageClick);     }      private createMap(): void {         this.tiledMap = new TiledMap(...

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

12. 自定义shader-地形shader [ 92%]

...fuseScale4(new Laya.Vector2(13.96364, 13.96364)); customMaterial.setAmbientColor(new Laya.Vector3(1, 1, 1)); customMaterial.setDiffuseColor(new Laya.Vector3(1, 1, 1)); customMaterial.setSpecularColor(new Laya.Vector4(1, 1, 1, 8)); customMaterial.setLightMapScaleOffset(new Laya.Vector4(0.8056641, 0.8...

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

13. layaair 3d 世界坐标辅助线怎么搞? [ 92%]

...ineXYZ.addLine(new Laya.Vector3(0, 0, 0), new Laya.Vector3(50, 0, 0), Laya.Color.RED, Laya.Color.RED); lineXYZ.addLine(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 50, 0), Laya.Color.GREEN, Laya.Color.GREEN); lineXYZ.addLine(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 50), Laya.Color.BLUE, L...

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

14. HTML文本 · LayaAir3.0文档 · LAYABOX [ 91%]

...三、代码中使用3.1 同一个文本中设置Bold、Font、FontSize、Color、下划线3.2 同一个文本中设置字体、颜色不同3.3 获取html文本的实际宽高(contextWidth、contextHeight)3.4 设置文本的水平居中对齐(align需要和width配合使用)3.5 实现超链接3....

来源: Laya3.0_文档 发布时间: 20230303

15. 富文本:LayaAir下 HtmlDivElement的使用汇总 [ 89%]

...同来自: Richer 1.简单的Html属性设置:Bold、Font、FontSize、Color、下划线 【注意,不支持斜体、描边、span标签内嵌的方式】 示例如下: var div:HTMLDivElement=new HTMLDivElement(); div.innerHTML="<span style='font-weight:bold;" + "font:24px Arial' " + "color...

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

16. 网格像素线 · LayaAir3.3 · 引擎文档 · LAYABOX [ 88%]

...要修改 BlinnPhone 的 shader 为 Laya.Unlit shader ,并勾选 Vertex Color (动图2-5) 有了材质,剩下就需要添加像素线数据了 2.4 像素线数据 像素线数据就两点,像素线的最大线数量和像素线数据,如图2-6所示 (图2-6) Max Line Count:最大...

来源: Laya3.0_文档 发布时间: 20250103

17. 绘制形状时事件不触发 [ 87%]

绘制形状时事件不触发 function myRing(x,y,r1,color1,r2,color2) {         this.sprite = new Laya.Sprite();     this.sprite.on('mousedown', this, on_down);     this.sprite.graphics.drawCircle(x, y, r2, color2, color2, 2);     this.sprite.graphics.drawCircle(x, y, r1, color1, color...

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

18. 关于缓动函数from的一些问题记录 [ 87%]

...0; Laya.Tween.to(letterText,{y:100,update:new Laya.Handler(this,this.changeColor,[letterText])},3000,Laya .Ease.backOut,Laya.Handler.create(this,this.onEaseComplete),1000,null,true); function onEaseComplete(){ console.log("ease complete"); } function changeColor(text){ console.log("update"); var c =...

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

19. 文本-字符限制 [ 86%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createTexts(); } createTexts() { this.createLabel("只允许输入数字:").pos(50, 20); let input = this.createInput(); input.pos(50, 50); input.restrict = "0-9"; this.createLabel("只允许输入...

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

20. IDE-显示IDE创建的界面 [ 86%]

...的value为2 //复杂复制,可以通知某个属性,比如:label:{color:"#ff0000",text:"Hello LayaAir"} this.box.dataSource = {slider: 50, scroll: 80, progress: 0.2, input: "This is a input", label: {color: "#ff0000", text: "Hello LayaAir"}}; //list赋值,先获得一个数据源数组 var ...

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