大约有 2,307 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0070 秒)
Laya_社区(1512) Laya2.0_文档(259) Laya_示例(138) Laya2.0_示例(101) Laya3.0_api(80) Laya2.0_api(74) Laya3.0_文档(73) laya_api(70)
...是效果是这样的 : 代码 : var point = new Sprite(); this.addChild(point); point.graphics.drawCircle(88, 86, 40, 'transparent'); var tx = new Sprite(); tx.loadImage(PATH + 'tx.jpg'); tx.scale(0.3,0.3); this.addChild(tx); tx.mask = point; 2017-09-28 0 2 分享 微博 QZONE 微信 ...
来源: Laya_社区 发布时间: 20170928
...nFill(0xFFFF00); sp.graphics.drawRect(0,0,200,200); sp.graphics.endFill(); addChild(sp); var mask:Sprite=new Sprite(); mask.graphics.beginFill(0xFF0000); mask.graphics.drawCircle(0,0,50); mask.pos(100,100) mask.graphics.endFill(); sp.mask=mask ``` **LayaAir引擎中正确的用法示例:** ```java...
来源: Laya2.0_文档 发布时间: 20191206
...nFill(0xFFFF00); sp.graphics.drawRect(0,0,200,200); sp.graphics.endFill(); addChild(sp); var mask:Sprite=new Sprite(); mask.graphics.beginFill(0xFF0000); mask.graphics.drawCircle(0,0,50); mask.pos(100,100) mask.graphics.endFill(); sp.mask=mask ``` **LayaAir引擎中正确的用法示例:** ```java...
来源: Laya2.0_文档 发布时间: 20210714
...raphics.drawRect(0,0,300,300,"#ffffff"); s.graphics.setAlpha(1); addChild(s); var img:Image = new Image("a.png"); s.addChild(img); //方案二: var s:Sprite = new Sprite(); s.graphics.alpha(0.3); s.graphics.drawRect(0,0,300,300,"#ffffff"); s.graphics.alpha(1); addChild(...
来源: Laya_社区 发布时间: 20180209
...装(相当耗费内存) mArmature = mFactory.buildArmature(1); Laya.stage.addChild(mArmature); mArmature.pos(mStartX, mStartY); mArmature.scale(0.5, 0.5); mArmature.on(Event.LABEL, this, this.onEvent); mArmature.on(Event.STOPPED, this, this.completeHandler); this.play(); } completeHandler() { this.p...
来源: Laya2.0_示例 发布时间: 20251209
...型上的材质 ```typescript //初始化3D场景 var scene = Laya.stage.addChild(Laya.Loader.getRes("res/threeDimen/scene/ChangeMaterialDemo/Conventional/scene.ls")); //从场景获取球型精灵 this.sphere = scene.getChildByName("Sphere"); //获取球型精灵自带的BlinnPhong材质 billinMate...
来源: Laya2.0_文档 发布时间: 20210715
...plated(e:*=null):void { Laya.stage.addChild(img); img.on("click",this,OnImgClick); OnImgClick(); var txt:Text = new Text(); txt.text = "loa...
来源: Laya_社区 发布时间: 20170918
...pivot(box.width / 2, box.height / 2); box.pos(posx, posy); Laya.Laya.stage.addChild(box); let boxBody = box.addComponent(Laya.RigidBody); let box1Shape = box.addComponent(Laya.BoxCollider); let box2Shape = box.addComponent(Laya.BoxCollider); let box3Shape = box.addComponent(Laya.BoxCollider); let bo...
来源: Laya2.0_示例 发布时间: 20251209
...); this.img = new Laya.Sprite; this.img.loadImage(this.plane1); Laya.stage.addChild(this.img); this.img.graphics.clear(); this.img.loadImage(this.plane2); Laya.stage.addChild(this.img) } } new Main(); 出来的结果是两张图合并到了一起, 于是我再尝试 constructor() { Laya.init(1000,...
来源: Laya_社区 发布时间: 20180406
...is.img = []; this.init(); } Class.prototype.init = function() { Laya.stage.addChild(this); this.bg(); Laya.timer.frameLoop(1, this, this.loop); }; Class.prototype.bg = function() { for (var i = 0; i < 2; i++) { this.img[i] = new Laya.Image('background.png'); this.addChild(this.img[i]); } this.img...
来源: Laya_社区 发布时间: 20170619