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

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

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

...,LayaAir的新手引导请参考:https://layaair.ldc.layabox.com/demo/?Sprite_Guide 2017-07-10 0 3 分享 微博 QZONE 微信 a4362928 赞同来自: 仔细看了一下HitArea api,其实可以使用HitArea的hit与unHit属性结合destination-out实现flash中两次draw镂空可点击穿透完...

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

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

...a.init(1280,720,Laya.WebGL);//有问题 console.log(Laya.version); var testSpriteRotation:PanelRotationTest = new PanelRotationTest(Laya.Sprite); testSpriteRotation.pos(300,260); Laya.stage.addChild(testSpriteRotation); var testPanelRotation:PanelRotationTest = new PanelRotationTest(Laya.Panel); tes...

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

53. 性能测试-虫子(慎入) [ 82%]

...种开发语言、LayaAirIDE让项目开发更高效。(function() { var Sprite = Laya.Sprite; var Browser = Laya.Browser; var Handler = Laya.Handler; var Stat = Laya.Stat; var Rectangle = Laya.Rectangle; var WebGL = Laya.WebGL; var texturePath = "../../res/tinyMaggot.png"; var padding = 100; var ma...

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

54. 显示与切换图片(TypeScript-LayaAir基础篇(TS)-位图) [ 82%]

... > 图片的显示是游戏开发基础,本篇从API到示例分别介绍Sprite.loadImage与Graphics.drawTexture两种显示图片的方法。 ## 1、用loadImage方法显示与切换图片 ### 1.1 loadImage API概述 在API文档中搜索laya.display.Sprite,可以找到loadImage()方法,如...

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

55. 飞机大战地图滚动报错,麻烦看下? [ 82%]

...null; var box = null; function bg_rolling() {     box = new laya.display.Sprite();     Laya.stage.addChild(box);     bg1 = new laya.display.Sprite();     bg1.loadImage("res/bg1.png");     box.addChild(bg1);     bg2 = new laya.display.Sprite();     bg2.loadImage("res/bg1.png");     bg...

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

56. 关于mouseThrough设计原理问题? [ 82%]

...eThrough设计原理问题? 关于 mouseThrough 的设计原理,如果sprite对象没有设置点击事件(如 Event.CLICK),那么 sprite.mouseThrough = false;设置是没有效果的,这样设计是不是有问题?var a:Sprite = new Sprite(); a.graphics.drawRect(0,0,200, 200, "#00ff00"...

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

57. Sprite-切换纹理 [ 81%]

...1.png", monkey2Str = "res/apes/monkey2.png", monkey1Res, monkey2Res; class Sprite_SwitchTexture { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.al...

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

58. Laya2.0绘制扇形遮罩,显示到部分角度时显示会有部分缺失(demo已上传) [ 81%]

...mage('c1.png'); node.pos(300, 300) Laya.stage.addChild(node); var sp: Laya.Sprite = new Laya.Sprite(); node.mask = sp; sp.pos(50, 50); var sp2: Laya.Sprite = new Laya.Sprite(); sp2.pos(300, 500); Laya.stage.addChild(sp2); let r: number = 0 Laya.timer.loop(100, this, () => { if (r >= 360) r = 0...

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

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

...ine", true); // 设置画布上的对齐参照物 var 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....

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

60. 关于Laya.loader.load和getRes的问题 [ 81%]

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

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