大约有 229 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0037 秒)
Laya_社区(174) Laya2.0_示例(20) Laya_示例(18) Laya2.0_文档(9) Laya3.0_api(3) Laya3.0_文档(3) laya_api(1) Laya2.0_api(1)
... Laya.stage.addChild(sp[j + i * 10]); sp[j + i * 10].graphics.drawRect(0, 0, 50, 50, "black"); sp[j + i * 10].size(50, 50); sp[j + i * 10].pos(i * 60, j * 60); sp[j + i * 10].on(Laya.Event.MOUSE_OVER, this, over); sp[j + i * 10].on(Laya.Eve...
来源: Laya_社区 发布时间: 20160715
...案一: var s:Sprite = new Sprite(); s.graphics.setAlpha(0.3); s.graphics.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.drawRec...
来源: Laya_社区 发布时间: 20180209
...这样设计是不是有问题?var a:Sprite = new Sprite(); a.graphics.drawRect(0,0,200, 200, "#00ff00"); a.size(200, 200); a.pos(0, 0); a.on(Event.CLICK, null, function(e:Event):void{ trace("click a"); }) Laya.stage.addChild(a); var b:Sprite = new Sprite(); b.graphics.drawRect(0,0,200, 200, "#000...
来源: Laya_社区 发布时间: 20181026
...ce); reference.pos(100, 100); reference.size(600, 400); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#CCCCCC"); // 每次舞台尺寸变更时,都会调用Utils.fitDOMElementInArea设置Video的位置,对齐的位置和refence重合 Laya.stage.on(Laya.Event.RESIZE, this,...
来源: Laya_示例 发布时间: 20251130
...发不了 var btn:Sprite = new Sprite(); login.addChild(btn); btn.graphics.drawRect(100, 200, 50, 50, "#000"); btn.pos(100, 200); btn.size(50,50); btn.on(Event.MOUSE_DOWN, this, function():void {console.log(1);}); btn.on换成Laya.stage.on是可以触发的,但是btn却触发不了。 麻烦解答...
来源: Laya_社区 发布时间: 20170525
... 微信 mrchenx 赞同来自: var _parent = new 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的时候,_c...
来源: Laya_社区 发布时间: 20170222
...teSprite(); })(); function createSprite() { sp = new Sprite(); sp.graphics.drawRect(0, 0, 200, 200, "#D2691E"); sp.pivot(100, 100); sp.x = Laya.stage.width / 2; sp.y = Laya.stage.height / 2; sp.size(200, 200); Laya.stage.addChild(sp); sp.on(ROTATE, this, onRotate); // 侦听自定义的事件 sp.on(...
来源: Laya_示例 发布时间: 20251130
...ce); reference.pos(100, 100); reference.size(600, 400); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#CCCCCC"); // 每次舞台尺寸变更时,都会调用Utils.fitDOMElementInArea设置Video的位置,对齐的位置和refence重合 Laya.stage.on(Laya.Event.RESIZE, this,...
来源: Laya2.0_示例 发布时间: 20251130
... for (var j = 0; j < 100; j++) { img.graphics.drawRect(i, j, 2, 2, "#CD5C5C"); } } 这样绘制会有10000个drawcall 官方有能降低drawcall的方法吗 2020-03-23 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 ...
来源: Laya_社区 发布时间: 20200323
... Laya.Sprite, Event = Laya.Event; this.sp = new Sprite(); this.sp.graphics.drawRect(0, 0, 200, 200, "#D2691E"); this.sp.pivot(100, 100); this.sp.x = Laya.stage.width / 2; this.sp.y = Laya.stage.height / 2; this.sp.size(200, 200); Laya.stage.addChild(this.sp); this.sp.on(ROTATE, this, this.onRotate);...
来源: Laya2.0_示例 发布时间: 20251130