大约有 1,772 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0062 秒)
Laya_社区(1393) laya_api(90) Laya3.0_api(82) Laya2.0_api(72) Laya2.0_文档(59) Laya_示例(33) Laya2.0_示例(32) Laya3.0_文档(11)
...otSp = new Laya.Sprite(); this.firstSp = new Laya.Sprite(); this.firstSp.graphics.drawRect(0, -100, 200, 200, null, "#ffffff"); this.firstSp.graphics.drawLine(0, 0, 100, 100, "#ffffff", 5); this.firstSp.graphics.drawCircle(100, 100, 20, null, "ffffff"); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, ...
来源: Laya_社区 发布时间: 20190314
...n sightBeadSprite() { SightBead.super(this); this.name = 'sightBead'; this.graphics.drawCircle(0,0,40,null,'#ff0000',1); this.graphics.drawLine(-45,0,45,0,'#ff0000',1); this.graphics.drawLine(0,45,0,-45,'#ff0000',1); this.alpha = 0; Laya.stage.addChild(this); // this.pos(440,640); } Laya.class(sight...
来源: Laya_社区 发布时间: 20171012
...9() at Function/http://adobe.com/AS3/2006/builtin::call() at laya.display::Graphics/_renderOne() at laya.renders::RenderSprite/_graphics() at laya.display::Sprite/render() at laya.renders::RenderSprite/_childs() at Function/http://adobe.com/AS3/2006/builtin::call() at laya.renders::RenderSprite/_gra...
来源: Laya_社区 发布时间: 20200217
...件纹理上 A:let texture = new Laya.Texture(sharedCanvas); backImage.graphics.drawTexture(texture) B:backImage.texture = texture 1.7版本可以直接把共享画布赋值给组件纹理,2.0不行(A,B两种方法) 报如下错误: value._addReference is not a function ...
来源: Laya_社区 发布时间: 20181001
...var box = new Laya.Sprite(); var texture = Laya.loader.getRes(boxstr); box.graphics.drawTexture(texture); var arr = {data: StorageRoom.map_storageData[0][0],tag:0}; box.on(Laya.Event.MOUSE_UP,this,this.onclick,[arr]); var _proto = StorageUILayer.prototype; _proto.onclick = function(params){ co...
来源: Laya_社区 发布时间: 20171113
...的渲染中,会遍历所有的插槽,调用BoneSlot中的draw方法(graphics.drawTexture和graphics.drawSkin) ,将插槽中的纹理通过封装cmd的形式通过方法加入_cmd的队列中,通过_renderAll遍历执行所有_cmd队列中的指令进行渲染从而更新画面 。可以...
来源: Laya_社区 发布时间: 20181107
...ite { private var testPan:Sprite; public function MainUi() { super(); this.graphics.drawRect(0,0,500,500,"#fff0cc"); testPan = new Sprite(); testPan.name = "testPan"; this.addChild( testPan ); testPan.pos( 300,300); testPan.graphics.drawRect(0,0,90,100,"#faaff0"); testPan.on(Event.CLICK,this,onMouse...
来源: Laya_社区 发布时间: 20161124
...tralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); var rect1 = new Sprite(); rect1.graphics.drawRect(Laya.stage.width / 3 * 2 , Laya.stage.height / 3 * 2 - 65, 100, 100, "blue"); // rect1.graphics.dra...
来源: Laya_社区 发布时间: 20170206
...代码造成。 __proto.createOneLine=function(startWord,lastWords,hasLine,graphic,recList){ var lineY=lastWords.y+lastWords.height; if(hasLine) graphic.drawLine(startWord.x,lineY,lastWords.x+lastWords.width,lineY,this.color,1); var hitRec=HTMLHitRect.create(); hitRec.rec.setTo(startWord.x,lastWords...
来源: Laya_社区 发布时间: 20190801
...多种做法,而其间差异很有必要知道。 1. 使用getBounds/ getGraphicBounds。 ```typescript var sp=new Laya.Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但...
来源: Laya2.0_文档 发布时间: 20210714