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

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

51. 在一个矩形之上画另一个矩形,只显示一个矩形 [ 81%]

...- boxHeight - 10, boxWidth, boxHeight); //画出盒子 Laya.stage.graphics.drawRect( this.chuanBox.x, this.chuanBox.y, this.chuanBox.width, this.chuanBox.height, "#FFFFEE", "#FFFFFF", 2); this.sageBox = new Laya.Rectangle(this.chuanBox.x+this.chuanBox.width/2,this.chuanBox.y+this.chuanBox.height-100...

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

52. 鼠标交互-滑动 [ 81%]

...tie() { const w = 50; const h = 30; button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) button.size(w, h); button.x = (Laya.stage.width - TrackLength) / 2; button.y = L...

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

53. hitTestPrior点击穿透 [ 81%]

...GL); Laya.stage.bgColor="#EEFFCC"; var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,300,300,"#FFFF00"); sp.size(100,100); sp.on(Event.CLICK,this,onClickSp); Laya.stage.addChild(sp); var spchild:Sprite=new Sprite(); spchild.graphics.drawRect(0,0,200,200,"#FF0000"); spchild.size(200,200); spchild....

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

54. 鼠标交互-滑动 [ 81%]

...nst w = 50; const h = 30; this.button = new Sprite(); this.button.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) this.button.size(w, h); this.button.x = (Laya.stage.width - TrackLength) / ...

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

55. Sprite graphics的显示比例问题 [ 81%]

...graphics.drawCircle(100, 100, 100, null, "#ff0000", 1); character.graphics.drawRect(0, 0, 200, 200, null, "#0000ff", 1); character.graphics.drawRect(20, 20, 160, 160, null, "#0000ff", 1); character.x = 220; character.y = 220; character.pivot(100,100); // character.scale(0.5, 0.5); Laya.stage.addChil...

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

56. 绘制图形的BUG [ 81%]

...e { private var _shape:Sprite; public function MyBox() { super(); graphics.drawRect(0,0,200,200,"#00ff00"); _shape=new Sprite(); _shape.graphics.drawCircle(0,0,20,"#ff0000"); addChild(_shape); //加上这句正常,反之则异常 //_shape.cacheAsBitmap=true; pos(300,300); Tween.to(this,{rotation:3...

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

57. DOM元素-视频 [ 81%]

...ce); 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.RESIZE, this,...

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

58. 滤镜问题,有复现demo [ 80%]

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

59. 鼠标交互-双指旋转(多点触控) [ 80%]

...tion createSprite() { sp = new Sprite(); var w = 200, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var...

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

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

...: Laya.Sprite = new Laya.Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); maskArea.name = "maskArea"; this.guideContainer.addChild(maskArea); this.interactionArea = new Laya.Sprite(); this.interactionArea.blendMode = "destination-out";...

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