大约有 1,491 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0059 秒)
Laya_社区(917) Laya2.0_文档(193) Laya_示例(125) Laya2.0_示例(101) Laya3.0_api(79) Laya3.0_文档(72) laya_api(2) Laya2.0_api(2)
...this._rootSp.hitArea = new Laya.Rectangle(0, 0, 10000, 10000) this._rootSp.addChild(this.firstSp); Laya.stage.addChild(this._rootSp); } private MouseWheel(e: Laya.Event) { let xs = this.firstSp.scaleX; if (e.delta > 0) { xs = xs * 1.2; } else { xs /= 1.2; } this.firstSp.scale(xs, xs); } } new G...
来源: Laya_社区 发布时间: 20190314
...ction createApe() { ape = new Sprite(); ape.loadImage(ApePath); Laya.stage.addChild(ape); var texture = Laya.loader.getRes(ApePath); ape.pivot(texture.width / 2, texture.height / 2); ape.x = Laya.stage.width / 2; ape.y = Laya.stage.height / 2; ape.on(Event.MOUSE_DOWN, this, onStartDrag); } function ...
来源: Laya_示例 发布时间: 20251209
... a.graphics.drawTexture(texture1, 0, 0); this.owner.addChild(a) }); Laya.loader.load("http://103.219.177.59:63344/%2 ... ot%3B, Laya.Loader.TEXTURE2D).then((texture: Laya.Texture2D) => { //在U方向上使用WARPMODE_CLAMP ...
来源: Laya_社区 发布时间: 20230316
...t(); this.phasorSpriter3D = new Laya.PhasorSpriter3D(); this.camera = this.addChild(new Laya.Camera(0, 0.1, 100)); this.camera.transform.translate(new Laya.Vector3(0, 1, 3)); //camera.addComponent(CameraMoveScript); this.camera.clearColor = null; } Laya.class(MousePickingScene, "MousePickingScene", ...
来源: Laya_社区 发布时间: 20170323
..."; ta.pos(100, 15); ta.size(375, 355); ta.padding = "70,8,8,8"; Laya.stage.addChild(ta); } } new UI_TextArea();module laya { import Stage = Laya.Stage; import TextArea = Laya.TextArea; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_TextArea {...
来源: Laya2.0_示例 发布时间: 20251209
...e = createButton("销毁动画"); DesBtn.x = 50; DesBtn.y = 50; Laya.stage.addChild(DesBtn); //创建一个Sprite充当音乐播放按钮 var addBtn:Sprite = createButton("添加动画"); addBtn.x = 250; addBtn.y = 50; Laya.stage.addChild(addBtn); DesBtn.on(Event.CLICK, this, onDesBtn); addBtn.on(Ev...
来源: Laya_社区 发布时间: 20170406
...00,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但由于其需要计算边界,不适合频繁调用。 1. 设置容器的autoSize为true。 ```javascript var sp=new Laya.Sprite(); sp.autoSize=true; sp.graphics....
来源: Laya2.0_文档 发布时间: 20210715
...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
...信 whzooo - 王掌柜 赞同来自: maskimg=new Sprite(); //addChild(maskimg); photoimg=new Sprite(); Laya.stage.addChild(photoimg); photoimg.mask=maskimg; photoimg.loadImage(imgn,0,0,500,500); Laya.timer.once(1000, this, function():void{ maskimg.lo...
来源: Laya_社区 发布时间: 20160923
... function TestView() { super(); _path.pivot(0,0); _path.pos(a.x,a.y); this.addChild(_path); _path.rotation = Math.atan2(b.y - a.y, b.x - a.x) / Math.PI * 180; _path2.rotation = Math.atan2(b.y - a.y+300, b.x - a.x) / Math.PI * 180; _path2.pos(a.x,a.y); this.addChild(_path2); var len:int = Math.floor(...
来源: Laya_社区 发布时间: 20171129