大约有 2,307 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0060 秒)
Laya_社区(1512) Laya2.0_文档(259) Laya_示例(138) Laya2.0_示例(101) Laya3.0_api(80) Laya2.0_api(74) Laya3.0_文档(73) laya_api(70)
...2; button1.y = (Laya.stage.height - button1.height - vGap) / 2; Laya.stage.addChild(button1); button1.on(Event.CLICK, this, onDecreaseAlpha1); button2 = createButton("点我60帧之后 alpha - 0.5"); button2.pos(button1.x, button1.y + vGap); Laya.stage.addChild(button2); button2.on(Event.CLICK, this...
来源: Laya_示例 发布时间: 20251209
...Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale...
来源: Laya_示例 发布时间: 20251209
...Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale...
来源: Laya_示例 发布时间: 20251209
....fontSize=60; label.text="666"; label.bold=true; label.color="#000000"; sp.addChild(label); sp.size(200,200); Laya.stage.addChild(sp); Laya.timer.frameLoop(60,this,function():void{ var htmlC:HTMLCanvas=sp.drawToCanvas(200,200,0,0); var texture:Texture=new Texture(htmlC); var sp2:Sprite=new Sprite();...
来源: Laya_社区 发布时间: 20180403
...stage.alignV = "top"; Laya.stage.alignH = "left"; let scene = Laya.stage.addChild(new Laya.Scene3D()); let camera = new Laya.Camera(0, 0.1, 100); scene.addChild(camera); camera.transform.translate(new Laya.Vector3(0, 2, 5)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); le...
来源: Laya_社区 发布时间: 20200915
...Sprite(); _parent.graphics.drawRect(0, 0, 500, 500, '#ff0000'); Laya.stage.addChild(_parent); var _child = new Sprite(); _child.graphics.drawRect(0, 0, 50, 50, '#336699'); _parent.addChild(_child);就像上面那样,我需要在addChild的时候,_child默认在_parant的左下角~按上面的方...
来源: Laya_社区 发布时间: 20170222
...1_btn为null console.log(btn1_btn); // btn1_btn.label="first"; this.myvbox.addChild(btn1); var btn2=new ui.test.view_btnUI(); var btn2_btn:laya.ui.Button=btn2.getChildByName("btn") as laya.ui.Button; // btn2_btn.label="second"; this.myvbox.addChild(btn2); var btn3=new ui.test.view_btnUI(); var btn3_...
来源: Laya_社区 发布时间: 20170725
...) { const graphics = new Laya.Sprite(); this.owner.addChild(graphics); this.addBoundaryLabels(); } private addBoundaryLabels() { const minXLabel = new Laya.Text(); minXLabel.text = `minX: ${this.playerScript.mapMinX}`; ...
来源: Laya_社区 发布时间: 20251125
...te(this, onLoadFinish)); function onLoadFinish() { this.scene = Laya.stage.addChild(Laya.Scene.load("../../res/threeDimen/scene/ColliderScene/ColliderDemo.ls")); //初始化照相机 this.camera = this.scene.addChild(new Laya.Camera(0, 0.1, 100)); this.camera.transform.translate(new Laya.Vector3(0, ...
来源: Laya_示例 发布时间: 20251209
...我的第一行要换行我的第一行要换行</span>"; Laya.stage.addChild(html); var sp = new Laya.Sprite(); sp.graphics.drawRect(0, 0, 300, 30, null, "#999999"); Laya.stage.addChild(sp); var sp2 = new Laya.Sprite(); sp2.graphics.drawRect(0, 30, 300, 30, null, "#999999"); Laya.stage.addChi...
来源: Laya_社区 发布时间: 20250906