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

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

201. iOS环境浏览器使用mask黑屏 [ 76%]

...代码:private _sp = new Laya.Sprite(); private _testMask() { this._sp.graphics.clear(); this._sp.graphics.drawCircle(100, 100, 50, '#ffffff'); Laya.timer.once(3000, this, () => { this.img.mask = this._sp; }) }之后编译项目 2. 使用iphone手机的safari扫码功能运行项目 3秒中之...

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

202. List中放TextInput,当list滚动的时候,复用会有问题,input中的内容会乱,尤其有输入框focus的情况下 [ 76%]

....size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.img.graphics.drawRect(0, 0, WID, HEI - 2, "#eeeeee"); this.label = new Label(); this.addChild(this.label); this.input = new TextInput(); this.addChild(this.input); this.input.x = 50; this.input.text = 'place holder'; // this.grap...

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

203. 2D寻路 · LayaAir3.3 · 引擎文档 · LAYABOX [ 76%]

...导航网格。未勾选时,该节点会被完全忽略。 Bake From: Graphics是从Sprite的图形数据生成导航网格。例如图2-12所示, (图2-12) Physics是从物理碰撞器数据生成导航网格。例如图2-13所示, (图2-13) MeshRender是从网格数据生成导航...

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

204. sprite做的按钮点击无反应? [ 76%]

... = 110; var h:int = 40; var btn:Sprite = new Sprite(); btn.size(w, h); btn.graphics.drawRect((stageWd - w) * 0.5, (stageHt - h) * 0.5-50, w, h, "#FF7F50"); btn.graphics.fillText("确 定", (stageWd) * 0.5 , (stageHt - h) * 0.5-43, "25px SimHei", "#FFFFFF", "center"); //dialog_mc.addChild(btn); Laya....

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

205. 【简单跑酷--JS版】---Lv.5 玩家踩地板 [ 76%]

...ader.getRes("res/floor.png"); this.bg = new laya.display.Sprite(); this.bg.graphics.clear(); this.addChild(this.bg); //因为上面的图片是截取的 所以右边可能没有图片了 这里补一个 this.rightBg = new laya.display.Sprite(); this.rightBg.graphics.drawTexture(laya.resource.Texture...

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

206. Tween回调方法里如何带参数? [ 76%]

...提供个例子我们看下 测试代码: var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); Laya.stage.addChild(sp); Tween.to(sp,{x:300,y:300,alpha:0.5},1000,null,Handler.create(this,function():void { sp.destroy(); })); Complete事件你没写错,就是那么写的     2...

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

207. 资源加载清除问题 [ 76%]

....create(this, onLoadCom)); 加载成功一个纹理后,用一个Sprite  graphics.drawTexture(e); 在加载成功方法里面写Loader.clearRes(mapBit, true); 会立刻清掉了纹理,Sprite上面也没有了。 如果在加载成功后加一个延时1秒,调用Loader.clearRes就清理不掉...

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

208. laya.display.Sprite_API3.0 [ 76%]

...节点。 Sprite 默认没有宽高,默认不接受鼠标事件。通过 graphics 可以绘制图片或者矢量图,支持旋转,缩放,位移等操作。Sprite同时也是容器类,可用来添加多个子节点。 注意: Sprite 默认没有宽高,可以通过getBounds函数获取;...

来源: Laya3.0_api 发布时间: 20231115

209. destination-out 叠加模式问题 [ 76%]

...d(guideContainer); maskArea = new Sprite(); maskArea.alpha = 0.3; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#0ef604"); guideContainer.addChild(maskArea); //EventManager.add(MyEvent.PLAYER_MOVE,this,playerMoveFun); playerMoveFun(); //EventManager.add(MyEvent.MYR...

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

210. DOM元素-视频 [ 75%]

...d(reference); 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.RESI...

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