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

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

2451. 分享:为List组件下Item(Box)下的Button(或其他组件)进行监听! [ 47%]

...getChildByName('btn'); btn.on(Event.CLICK,this,onClickBtn,[index]); } Laya.class(TestUI, "TestUI", TestPageUI); //按钮Click回调 function onClickBtn(index) { alert("你点击了第:"+index+"个btn"); } //初始化引擎 Laya.init(600, 400); Laya.stage.bgColor='#EEFFCC'; Laya.loader.load("res/at...

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

2452. laya.utils.Stat_API3.0 [ 47%]

... All Inherited Externals Only exported Menu Globals "laya/utils/Stat" Stat Class Stat Stat 是一个性能统计面板,可以实时更新相关的性能参数。 参与统计的性能参数如下(所有参数都是每大约1秒进行更新): FPS(WebGL):WebGL 模式下的帧频,也就是...

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

2453. iphone6闪退 [ 47%]

iphone6闪退 objc[644]: Class JSWTFMainThreadCaller is implemented in both /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore and /private/var/mobile/Containers/Bundle/Application/6815AAA5-5DD9-4F5E-B035-86F46C8BD87F/layabox.app/layabox. One of the two will be used. Which one is un...

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

2454. 要做一个方形倒计时,请问该怎么实现,不知道该怎么做 [ 47%]

...p.TheGame; import laya.display.Sprite; import laya.maths.Rectangle; public class CdSprite extends Sprite { public static const START:int = -90; public static const COLOR:String = "#000000"; private var r:Number = BarCell.WID / Math.SQRT2; private var rect:Rectangle = new Rectangle(0,0,BarCell.WID,Ba...

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

2455. laya.resource.Texture2D_API3.0 [ 47%]

...d Externals Only exported Menu Globals "laya/resource/Texture2D" Texture2D Class Texture2D Texture2D 类用于生成2D纹理。 Hierarchy BaseTexture Texture2D Index Constructors constructor Properties _id destroyedImmediately lock name url uuid DEBUG TEXTURE2D blackTexture errorTexture grayTexture ...

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

2456. 如何自定义Shader(JavaScript-3D基础(JS)-LayaAir3D之shader) [ 47%]

...之后材质基类由BaseMaterial变更为Material。 ```typescript export class CustomMaterial extends Laya.Material { constructor() { super(); //设置本材质使用的shader名字 this.setShaderName("CustomShader"); } } ``` #### 4.使用自定义材质 ​ 在使用自定义材质之前,一定...

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

2457. 引擎 TiledMap 居然不支持图块翻转 [ 47%]

...73741824;     const TiledMapFlipConstHalf = TiledMapFlipConst / 2;     class GridSprite extends Laya.Sprite {         constructor() {             super(...arguments);             this.relativeX = 0;             this.relativeY = 0;             this.isAloneObject = fals...

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

2458. 渲染优化原则(TypeScript-2D进阶篇(TS)-性能优化) [ 47%]

...10000个文本(根据电脑性能而定,本例为10000): ```typescript class Test { private text:Laya.Text; constructor() { Laya.init(550,400,Laya.WebGL); Laya.Stat.show(); var textBox=new Laya.Sprite(); for(var i=0;i (图1) 当我们对文字所在的容器设置为cacheAs之后,如下面...

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

2459. 微信小游戏想使用截图功能是使用canvasToTempFilePath()吗 [ 47%]

... /** * 微信不带ImageData,需重写,记得赋值到window */ export class ImageData { public data: Uint8ClampedArray; public width: number; public height: number; public constructor(width: number, height: number) { this.width = width; this.height = height; this.data = new Uint8ClampedArray(wi...

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

2460. 分享:Panel下动态修改子容器宽高并刷新显示! [ 47%]

...aya.ui.Panel; import laya.utils.Browser; import laya.utils.Handler; public class LayaUISample { public function LayaUISample() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height); //ui组件,除了image和clip外,其他皮肤均需要预加载资源,此处添...

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