大约有 518 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0056 秒)
Laya_社区(280) Laya2.0_文档(68) Laya3.0_api(54) Laya_示例(42) Laya3.0_文档(34) Laya2.0_示例(24) Laya2.0_api(9) laya_api(7)
...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.buildWorld(); this.createLogger(); } buildWorld() { const Event = Laya.Event; this.createCoralRect(); this.createDeepSkyblueRect(); this.createDarkOrchidRect(); /...
来源: Laya2.0_示例 发布时间: 20251130
...n | 文本的垂直对齐方式。可选值有top、middle、bottom。 | | color | 文本的颜色值。默认为黑色。 | | bgColor | 文本背景颜色。 | | font | 文本的字体名称。 | | fontSize | 文本的字体大小。 | | bold | 文本是否为粗体字显示。 | | italic | 文本...
来源: Laya2.0_文档 发布时间: 20210714
...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } private setup(): void { this.createLabel("#FFFFFF", null).pos(30, 50); this.createLabel("#00FFFF", null).pos(290, 50); this.createLabel("#FFFF00", "#FFFFFF").pos(30, 100); this.createLabel("...
来源: Laya_社区 发布时间: 20180529
...的文本let t1 = Laya.stage.addChild(new Laya.Label);t1.text = "aaaa";t1.color = "#ff0000";let t2 = Laya.stage.addChild(new Laya.Label);t2.text = "bbb";t2.color = "#ff0000";t2.y = 100;t2.disabled = true 步骤二:复制下面代码继续在浏览器控制台执行,可以看到第一个红色...
来源: Laya_社区 发布时间: 20240117
...nction GameMain(){ var tx= new Laya.Text(); tx.text='这是一个demo'; tx.color='#ffffff'; tx.fontSize="20"; tx.pos(Laya.stage.width /2 ,Laya.stage.height /2); tx.pivot(tx.width /2 ,tx.height / 2); tx.align="center"; tx.valign="middle"; Laya.stage.addChild(tx); } })() 2017-11-15 添加评论 免...
来源: Laya_社区 发布时间: 20171115
...; directionLight.direction = new Laya.Vector3(0, -0.8, -1); directionLight.color = new Laya.Vector3(1, 1, 1); //灯光开启阴影 directionLight.shadow = true; //可见阴影距离 directionLight.shadowDistance = 3; //生成阴影贴图尺寸 directionLight.shadowResolution = 2048; //生成阴影...
来源: Laya_示例 发布时间: 20251130
...Laya.Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createBridge(); this.eventListener(); } createBridge() { const startPosX = 250, startPosY = 450; let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let groundBody = new Laya.RigidBody();...
来源: Laya2.0_示例 发布时间: 20251130
...n test():void { var text:Text; text = new Text(); text.fontSize = 30; text.color = "#ff0000"; text.text = "你好"; text.pos(100, 100); Laya.stage.addChild(text); text = new Text(); text.fontSize = 30; text.color = "#ff0000"; text.text = "你好"; text.font = "remember"; text.pos(100, 200); Laya....
来源: Laya_社区 发布时间: 20191211
...d(p); p.style.font = "Impact"; p.style.fontSize = 30; var html = "<span color='#e3d26a'>使用</span>"; html += "<span style='color:#FFFFFF;font-weight:bold'>HTMLDivElement</span>"; html += "<span color='#6ad2e3'>创建的</span><br/>"; html += "<span col...
来源: Laya_社区 发布时间: 20180410
...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.init(); } init() { const Sprite = Laya.Sprite, Animation = Laya.Animation, Text = Laya.Text, Event = Laya.Event; // 创建背景 this.spBg = Sprite.fromImage(PathBg); Laya.stage.addChild(t...
来源: Laya2.0_示例 发布时间: 20251130