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

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

111. 发现一个奇怪的问题。。。 [ 73%]

...同来自: 这个是正常的,你设置完轴心点后,同时设置下pospos值与pivot值相反即可,,,因为你设置轴心点后,轴心点实际上是不动的,而是显示对象绕轴心点移动,直到轴心点是开发者设置的位置值为止! 2017-05-22 0 0 分享 微...

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

112. DOM元素-视频 [ 73%]

...r reference = new Laya.Sprite(); Laya.stage.addChild(reference); reference.pos(100, 100); reference.size(600, 400); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#CCCCCC"); // 每次舞台尺寸变更时,都会调用Utils.fitDOMElementInArea设置Video的位置,对齐的...

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

113. ToolTip鼠标悬停的使用 [ 73%]

...w Button(); Laya.stage.addChild(button); button.label="button One"; button.pos(100,100); button.skin="comp/button.png"; button.toolTip="我是button One!"; //自定义鼠标提示 var button2:Button=new Button(); Laya.stage.addChild(button2); button2.label="button Two"; button2.pos(250,100); button2...

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

114. 龙骨动画demo [ 73%]

龙骨动画demo var skeleton = new Laya.Skeleton(); skeleton.pos(100, 500); skeleton.zOrder = 1; skeleton.load("dragonBones/chicken/chicken.sk", Laya.Handler.create(this, (e) => { console.log(e); let num = skeleton.getAnimNum() let name = skeleton.getAniNameByIndex(num - 1); skeleton.play(name)...

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

115. 遮罩 模糊 [ 73%]

遮罩 模糊 var mask = new Sprite(); mask.size(79, 118) mask.pos(38.5, 59); mask.name = "mask"; mask.pivotToCenter(); mask.graphics.drawRect(-38.5, -59, 79, 118, '#000000'); var maskContainer = new Sprite(); maskContainer.size(79, 118); maskContainer.pos(38.5, 59); maskContainer.pivotToCenter(); ...

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

116. 关于Laya.loader.load和getRes的问题 [ 73%]

...w Sprite(); ape.graphics.drawTexture(t,0,0); Laya.stage.addChild(ape); ape.pos(200, 0); })); 这可以正常运行,但是我把外面的 load 函数去掉,将第二个参数中的函数内容独立后却不能显示图片:var t:Texture = Laya.loader.getRes("../../../../res/apes/monkey2.png");...

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

117. 关于graphics镂空的问题https://ask.layabox.com/question/139 [ 73%]

...击穿透完全一致的效果。var redBox:Sprite = new Sprite(); redBox.pos(250,200); redBox.autoSize = true; redBox.graphics.drawRect(0,0,100,100,'#ff0000'); Laya.stage.addChild(redBox); redBox.on("click",this,function(){ trace("click redbox"); }); redBox.on("mouseover",this,function(){ redBox.gr...

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

118. 脚本属性类型为Vector如何赋值 [ 73%]

脚本属性类型为Vector如何赋值 /** @prop {name:pos, tips:"模型位置", type:Vector,labels:"x,y,z"}*/ public pos: number = [0,30,0];脚本属性类型为Vector,如何给xyz赋上默认值呢   现在ide中显示的都是0,试了default属性没起作用 附件 : --> 2019-05-23 添加...

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

119. webgl模式下对Panel组件旋转时Panel子对象显示错误的BUG! [ 73%]

...PanelRotationTest = new PanelRotationTest(Laya.Sprite); testSpriteRotation.pos(300,260); Laya.stage.addChild(testSpriteRotation); var testPanelRotation:PanelRotationTest = new PanelRotationTest(Laya.Panel); testPanelRotation.pos(1000,260); Laya.stage.addChild(testPanelRotation); Laya.Tween.to(testPa...

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

120. 性能测试-虫子(慎入) [ 73%]

... + wb.width) x -= wb.width; if (y wb.y + wb.height) y -= wb.height; maggot.pos(x, y); } tick += 0.1; } })();module laya { import Sprite = Laya.Sprite; import Browser = Laya.Browser; import Handler = Laya.Handler; import Stat = Laya.Stat; import Rectangle = Laya.Rectangle; import WebGL = Laya.WebGL; ...

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