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

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

71. Sprite生成的mask对Sprite作用时显示不正确 [ 78%]

...let miniMap = new Laya.Sprite(); miniMap.autoSize = true; miniMap.graphics.drawRect(0,0,100,100, '#000000'); let mapMask = new Laya.Sprite(); mapMask.autoSize = true; mapMask.graphics.drawRect(0,0,miniMap.width,miniMap.height, '#ff0000'); miniMap.mask = mapMask; Laya.stage.addChild(miniMap) 2018-11-...

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

72. 滤镜问题,有复现demo [ 77%]

...s = null,这时舞台绘画的消失了???? */ Laya.stage.graphics.drawRect(200, 200, Laya.stage.width / 2, Laya.stage.height / 2, "#ffff00"); var btn:Sprite = new Sprite(); btn.size(200, 100); btn.graphics.drawRect(0, 0, btn.width, btn.height, "#ff00ff"); Laya.stage.addChild(btn); btn.on(Ev...

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

73. 计时器-延迟执行 [ 77%]

...n(label) { var w = 300, h = 60; var button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } function onDecreaseAlpha1(e) { //移除鼠标单击事件 button1.off(Event....

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

74. 计时器-延迟执行 [ 77%]

...0; let button = new Sprite(); Laya.stage.addChild(button); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } onDecreaseAlpha1(e) { const Event = Laya.Event; //移除鼠标单击事件 t...

来源: Laya2.0_示例 发布时间: 20251130

75. 新手引导在ios浏览器表现异常 [ 77%]

...   let sp = new Laya.Sprite();             sp.graphics.drawRect(0,0,Laya.stage.width,Laya.stage.height,"#FFFFFF");             Laya.stage.addChild(sp);              let guideView = new MazeGuideView();             guideView.zOrder = MazeC...

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

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

...例子我们看下 测试代码: 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事件你没写错,就是那么写的     2017-06-08...

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

77. graphics怎么画透明色 [ 76%]

...aphics(); graphics.clear(); graphics.save(); graphics.alpha(0.6); graphics.drawRect(0,0,Laya.stage.width,Laya.stage.height,'#000000'); graphics.restore(); sprite.graphics=graphics; 2018-12-19 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起...

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

78. 鼠标交互-拖动 [ 76%]

...dthLimit, dragHeightLimit); //画出拖动限制区域 Laya.stage.graphics.drawRect( dragRegion.x, dragRegion.y, dragRegion.width, dragRegion.height, null, "#FFFFFF", 2); } function onStartDrag(e) { //鼠标按下开始拖拽(设置了拖动区域和超界弹回的滑动效果) ape.startDrag(dragReg...

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

79. 显示对象的mask缩放为0时遮罩效果不生效 [ 75%]

....width = 200; testSp.height = 50; testSp.graphics.clear(); testSp.graphics.drawRect(0, 0, testSp.width, testSp.height,'#FF0000'); let tmpMask = new Laya.Sprite(); tmpMask.width = testSp.width; tmpMask.height = testSp.height; tmpMask.graphics.clear(); tmpMask.graphics.drawRect(0, 0, testSp.width, tes...

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

80. 鼠标交互-拖动 [ 75%]

...dthLimit, dragHeightLimit); //画出拖动限制区域 Laya.stage.graphics.drawRect( dragRegion.x, dragRegion.y, dragRegion.width, dragRegion.height, null, "#FFFFFF", 2); } onStartDrag(e) { //鼠标按下开始拖拽(设置了拖动区域和超界弹回的滑动效果) this.ape.startDrag(dragRegion,...

来源: Laya2.0_示例 发布时间: 20251130