大约有 1,605 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0097 秒)
Laya_社区(974) Laya2.0_文档(192) Laya_示例(138) Laya2.0_示例(101) Laya3.0_api(61) Laya2.0_api(57) laya_api(53) Laya3.0_文档(29)
...stage.width - 200) / 2; rect.y = (Laya.stage.height - 200) / 2; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, mouseHandler); rect.on(Event.MOUSE_UP, this, mouseHandler); rect.on(Event.CLICK, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, mouseHandler); r...
来源: Laya_示例 发布时间: 20241117
...ya.Stage.SCREEN_NONE; let ape: Laya.Sprite = new Laya.Sprite(); Laya.stage.addChild(ape); ape.loadImage("../laya/assets/fish_bg.png"); //开启统计信息 Laya.Stat.show(); //添加3D场景 let scene: Laya.Scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Scene; //添加照相机 let camera: La...
来源: Laya_社区 发布时间: 20180302
...ox = new ComboBox(skin, "item0,item1,item2,item3,item4,item5"); Laya.stage.addChild(comboBox); comboBox.labelSize = 30; comboBox.itemSize = 25; comboBox.selectHandler = new Handler(this, this.onSelect, [comboBox]); return comboBox; } onSelect(cb) { console.log("选中了: " + cb.selectedLabel); } ...
来源: Laya2.0_示例 发布时间: 20241117
...Text(fontName); } createText(font) { let txt = new Laya.Text(); Laya.stage.addChild(txt); txt.width = 250; txt.wordWrap = true; txt.text = "Do one thing at a time, and do well."; txt.font = font; // 文本的字体名称,以字符串形式表示 txt.leading = 5; // 垂直行间距 txt.pos(Laya.sta...
来源: Laya2.0_示例 发布时间: 20241117
...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_示例 发布时间: 20241117
...; this.progressBar = new ProgressBar("res/ui/progressBar.png"); Laya.stage.addChild(this.progressBar); this.progressBar.width = 400; this.progressBar.x = (Laya.stage.width - this.progressBar.width ) / 2; this.progressBar.y = Laya.stage.height / 2; this.progressBar.sizeGrid = "5,5,5,5"; this.progress...
来源: Laya2.0_示例 发布时间: 20241117
...t.bold = true; t.pivot(t.width / 2, t.height / 2); t.pos(x, y); Laya.stage.addChild(t); return t; } function animateTimeBased() { rotateTimeBasedText.rotation += 1; } function animateFrameRateBased() { rotateFrameRateBasedText.rotation += 1; } })();module laya { import Stage = Laya.Stage; import Tex...
来源: Laya_示例 发布时间: 20241117
...stage.width - 200) / 2; rect.y = (Laya.stage.height - 200) / 2; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, this.mouseHandler); rect.on(Event.MOUSE_UP, this, this.mouseHandler); rect.on(Event.CLICK, this, this.mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, t...
来源: Laya2.0_示例 发布时间: 20241117
....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
...画布上的对齐参照物 var reference = new Laya.Sprite(); Laya.stage.addChild(reference); reference.pos(100, 100); reference.size(600, 400); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#CCCCCC"); // 每次舞台尺寸变更时,都会调用Utils.fitDOMElementInArea设...
来源: Laya_示例 发布时间: 20241117