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

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

211. 缓动-时间线 [ 86%]

...种开发语言、LayaAirIDE让项目开发更高效。(function () { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Event = Laya.Event; var Keyboard = Laya.Keyboard; var TimeLine = Laya.TimeLine; var WebGL = Laya.WebGL; var target; var timeLine = new TimeLine(); (function () { // 不支持We...

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

212. 怎么检测两个不规则物体之间的碰撞 [ 86%]

...链接 提交 2 个回复 cuixueying 赞同来自: 可以参考下: var sprite:Sprite = new Sprite(); sprite.graphics.drawRect(100,100,100,100,"#ff9900"); var hitarea:HitArea = new HitArea(); var graphics:Graphics = new Graphics(); graphics.drawRect(100,100,100,100,"#ff9900"); hitarea.hit = graphi...

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

213. 输入设备-贪吃蛇(重力感应) [ 86%]

...a.stage.removeChild(food); foods.splice(i, 1); } } } produceFood() { const Sprite = Laya.Sprite; // 最多五个食物同屏 if (foods.length == 5) return; let food = new Sprite(); Laya.stage.addChild(food); foods.push(food); const foodSize = 40; food.size(foodSize, foodSize); food.graphics.drawRect...

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

214. 鼠标交互-滑动 [ 86%]

...种开发语言、LayaAirIDE让项目开发更高效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Event = Laya.Event; var Browser = Laya.Browser; var Tween = Laya.Tween; var WebGL = Laya.WebGL; //swipe滚动范围 var TrackLength = 200; //触发swipe的拖动距离 var TOGGL...

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

215. drawToCanvas无法截取到有子元素。 [ 86%]

... QZONE 微信 liqunyang 赞同来自: // test drawToCanvas const sp1 = new Sprite(); sp1.loadImage('bet/cheer_1_3.png'); const sp2 = new Sprite(); sp2.x = 100; sp2.loadImage('bet/cheer_1_4.png'); sp1.addChild(sp2); this.addChild(sp1); const htmlCanvas = sp1.drawToCanvas(640, 200, 0, 0); const canvas...

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

216. 多摄像机窗口的使用(ActionScript-3D基础(AS3)-LayaAir3D之Camera) [ 86%]

...t = scene.addChild(new DirectionLight()) as DirectionLight; //加载模型 Sprite3D.load("res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh", Handler.create(null, function(sp:Sprite3D):void { //将模型加到场景上 var layaMonkey:Sprite3D = scene.addChild(sp) as Sprite3D; })) ``` 编译运行上...

来源: Laya2.0_文档 发布时间: 20210715

217. 性能测试-卡通人物2 [ 86%]

...e; var Text = Laya.Text; var Stat = Laya.Stat; var WebGL = Laya.WebGL; var Sprite = Laya.Sprite; var Animation = Laya.Animation; // Class Character function Character(images) { Character.super(this); Character.WIDTH = 110; Character.HEIGHT = 110; var bloodBar; var animation; var nameLabel; Character...

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

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

...区域为黑色,其它机型都是正常的。 this.guideContainer = new Sprite(); this.guideContainer.cacheAs = "bitmap"; Utils.GuideLayer.addChild(this.guideContainer); this.guideContainer.on(Laya.Event.CLICK, this, this.nextStep); this.mouseEnabled = false; var maskArea: Laya.Sprite = new Laya....

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

219. list 下 生成图片模糊 [ 86%]

...hildren(); var root = cell.getChildByName('root'); if (!root) { root = new Sprite(); root.pos(0, 0); root.name = "root"; cell.addChild(root); } 。。。。。 生成的 图片 从一个场景中回来在生成 他的 子物体 Sprite 在切换场景再回来 在生成 如此多次 自后 我的 lis...

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

220. 两个问题都关于LayaAir的ios真机 [ 86%]

... = stateMap[e.type]); } public static function addDark(target:laya.display.Sprite, isDark:Boolean = true):void { if (isDark) { // laya.ui.UIUtils.addFilter(target, DARK); target.filters=[ new ColorFilter([0.7, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 1, 0])]; } else { // laya.ui.UIUtil...

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