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

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

81. 2D精灵光 · LayaAir3.3 · 引擎文档 · LAYABOX [ 78%]

... = this.spriteLight.getComponent(Laya.SpriteLight2D); spritelightComponent.color = new Laya.Color(1, 1, 1); spritelightComponent.intensity = 0.5; let tex = Laya.loader.getRes("resources/spritelight.png"); spritelightComponent.spriteTexture = tex; } // 配置方向光 setDirectLight(): void { let dir...

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

82. UI-TextArea [ 78%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(skin, Handler.create(this, onLoadComplete)); })(); function onLoadComplete() { var ta = new TextArea(""); ta.skin = skin; ta.font = "Arial"; ta.fontSize = 18; ta.bold = true; ta.color = "#3...

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

83. 文本-自动换行 [ 78%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createText(); })(); function createText() { var txt = new Text(); txt.text = "Layabox是HTML5引擎技术提供商与优秀的游戏发行商,面向AS/JS/TS开发者提供HTML5开发技术方案!"; txt....

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

84. layabox 只支持一个灯光? [ 78%]

....scene.addChild(new Laya.SpotLight()) as Laya.SpotLight; this.loadCCDlight.color = new Laya.Vector3(1, 1, 1); this.loadCCDlight.transform.position = new Laya.Vector3(-1, 1.2, 0.0); this.loadCCDlight.direction = new Laya.Vector3(0.15, -1.0, 0.0); this.loadCCDlight.attenuation = new Laya.Vector3(0.0, ...

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

85. 射线检测-选取物体 [ 78%]

...ra.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); camera.clearColor = null; //方向光 var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya.Vector3(0.6, 0.6, 0.6); directionLight.direction = new Laya.Vector3(1, -1, -1); //平面 var plane = sc...

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

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

...odes;         //设置舞台背景色         Laya.stage.bgColor  = "#ffff99";             //实例一个背景         var bg = new Image();         bg.skin = "res/img/loadingBg.jpg";         Laya.stage.addChild(bg);             //...

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

87. 计时器-延迟调用 [ 77%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; demonstrate(); })(); function demonstrate() { for (var i = 0; i < 10; i++) { Laya.timer.callLater(this, onCallLater); } } function onCallLater() { console.log("onCallLater triggered"); var text = new Text()...

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

88. 请问,如何获得StandardMaterial,为什么transformUV始终是null [ 77%]

...directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya.Vector3(0.6, 0.6, 0.6); directionLight.direction = new Laya.Vector3(1, -1, -1); //加载网格 var layaMonkey = scene.addChild(new Laya.MeshSprite3D(Laya.Mesh.load("../../res/threeDimen/skinModel/LayaMonkey/A...

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

89. 滤镜-颜色滤镜 [ 77%]

...效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var ColorFilter = Laya.ColorFilter; var Texture = Laya.Texture; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var ApePath = "../../res/apes/monkey2.png"; var apeTexture; (function() { // 不支持...

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

90. 屏幕适配的缩放模式详解(JavaScript-2D基础篇(JS)-屏幕适配) [ 77%]

...            //设置舞台背景色         Laya.stage.bgColor  = "#ffff99";             //实例一个背景         var bg = new Image();         bg.skin = "res/img/loadingBg.jpg";         Laya.stage.addChild(bg);              ...

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