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

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

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

....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

72. 鼠标交互-自定义事件 [ 76%]

...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_示例 发布时间: 20241118

73. laya.display.Graphics_API3.0 [ 76%]

...wCurves drawEllipse drawImage drawLine drawLines drawPath drawPie drawPoly drawRect drawTexture drawTextures drawTriangles fillBorderText fillText fillTexture getBounds loadImage removeCmd restore rotate save scale strokeText transform translate Constructors constructor new Graphics(): Graphics Defi...

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

74. 鼠标交互-自定义事件 [ 75%]

... 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_示例 发布时间: 20241118

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

...例子我们看下 测试代码: 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

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

...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_示例 发布时间: 20241118

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

...   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

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

...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

79. 多重遮罩显示异常 [ 73%]

...{ super(); this.init(); } init() { let bg = new Laya.Sprite(); bg.graphics.drawRect(0, 0, 500, 500, '#aaa'); this.addChild(bg); this.panel = new Laya.Panel(); this.panel.width = 500; this.panel.height = 500; this.panel.vScrollBarSkin = ''; this.panel.hScrollBarSkin = ''; this.addChild(this.panel); l...

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

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

...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_示例 发布时间: 20241118