• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 585 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0042 秒)

431. 使用webgl之后toDataUrl返回黑色的图像 [ 46%]

...t,WebGL); Stat.show(); Laya.stage.bgColor = "#ffcccc"; Laya.stage.on(Event.CLICK,this,onClick); sp= new Sprite(); sp.name='base'; sp.loadImage("logo.png"); Laya.stage.addChild(sp); } private function onClick():void { var htmlsss:String=(Laya.stage.getChildAt(0) as Sprite).drawToCanvas(100,100,0,0).g...

来源: Laya_社区 发布时间: 20170523

432. 画了一个封闭的曲线,获取鼠标点击处的像素,为何坐标对不上导致拿不到正确位置的Texture? [ 46%]

...000", 15); Laya.stage.addChild(_view); _view.size(80, 100); _view.on(Event.CLICK, this, __clickHandler); } private function __clickHandler():void { trace(_view.stage.mouseX + "---" + _view.stage.mouseY); /*获取所画曲线鼠标点击处的像素,为何坐标对不上?导致无法拿到正确...

来源: Laya_社区 发布时间: 20180319

433. 引擎示例中的新手引导自己写了一次,不知道为什么无法实现点击。 [ 46%]

....height; var bg = new Sprite(); stage.addChild(bg); bg.texture = e; bg.on("click", this, onClick); var guideContainer = new Sprite(); stage.addChild(guideContainer); guideContainer.mouseEnabled = true; guideContainer.cacheAs = "bitmap"; var hitArea = new HitArea(); hitArea.hit.drawRect(0, 0, width, ...

来源: Laya_社区 发布时间: 20171031

434. iphoneX环境下新手引导的抠图透明区域为黑色,其它机型都是正常的。 [ 45%]

...uideLayer.addChild(this.guideContainer); this.guideContainer.on(Laya.Event.CLICK, this, this.nextStep); this.mouseEnabled = false; var maskArea: Laya.Sprite = new Laya.Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); maskArea.name = "m...

来源: Laya_社区 发布时间: 20171222

435. LayaBox HelloWorld实战 [ 45%]

...ya.Scene { constructor() { super(); HelloWorld.instance = this; } onBtnShowClick(){ var dialog = new Laya.Dialog(); dialog.width=300; dialog.height=600; //var bg = new Laya.Image('comp/img_bg.png'); //dialog.addChild(bg); var button = new Laya.Button('comp/button.png'); button.label='Hello World!'; ...

来源: Laya_社区 发布时间: 20190117

436. List 组件做的手风琴Demo [ 45%]

...img2 = cell.getChildByName("img2") as Laya.Image;         img1.on("click",this,this.onRefresh,[index])         //当索引相同时 BOX 高度改变         if(this.index_num ==index){             cell.height=80;             cell.y =index*30;     ...

来源: Laya_社区 发布时间: 20190522

437. 动画-旧版骨骼动画 [ 44%]

...ht - 100 * Laya.Browser.pixelRatio); this.changeActionButton.on(Laya.Event.CLICK, this, function (): void { this.playSkinAnimation(this.zombie, ++this.curStateIndex % this.skinAniUrl.length); }); })); } } new SkinAnimation_Old;package animationModule { import laya.ani.AnimationTemplet; import laya.d...

来源: Laya_示例 发布时间: 20251209

438. 布局容器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 44%]

...10,则节点最后的宽度会被设置为30。 Scroll Item To View On Click 勾选后,当点击某个item时,如果这个item处于部分显示状态,那么将会自动滚动到整个item显示完整。 Stretch X 在水平方向上的缩放操作。 None 不使用缩放。这意味item不...

来源: Laya3.0_文档 发布时间: 20251010

439. 加载TiledMap 不显示 [ 44%]

...628";          this.createMap();          Laya.stage.on("click", this, this.onStageClick);     }      private createMap(): void {         this.tiledMap = new TiledMap();         this.tiledMap.createMap("res/tiledMap/t2.json", new Rectangle(0, 0,...

来源: Laya_社区 发布时间: 20201230

440. Clip属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 44%]

..."#FFFFFF,#FFFFFF,#FFFFFF,#FFFFFF"; controller.size(84, 30); controller.on('click', this, onClipSwitchState); controller.x = (Laya.stage.width - controller.width) / 2; controller.y = (Laya.stage.height - controller.height) / 2 + 110; Laya.stage.addChild(controller); } function onClipSwitchState() { i...

来源: Laya2.0_文档 发布时间: 20210715