大约有 3,033 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0059 秒)
Laya_社区(1088) Laya3.0_api(672) Laya2.0_api(368) laya_api(298) Laya2.0_文档(233) Laya_示例(146) Laya2.0_示例(118) Laya3.0_文档(110)
...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
...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
API DocumentationAll Packages | All Classes | Index | Frames No Frames PhysicsDebugDrawProperties | Methods | Events Packagelaya.physicsClasspublic class PhysicsDebugDrawInheritancePhysicsDebugDraw Sprite Node EventDispatcher Object 物理辅助线,调用PhysicsDebugDraw.enable()开启...
来源: Laya2.0_api 发布时间: 20190513
... flash.system.ApplicationDomain; import flash.system.LoaderContext; public class SwfBinary extends Sprite { public function SwfBinary() { super(); if(stage) { init(); } else { this.addEventListener(Event.ADDED_TO_STAGE,init); } } private function init(e:Event=null):void { var loader:Loader=new Loade...
来源: Laya_社区 发布时间: 20151224
... = Laya.Handler; import WebGL = Laya.WebGL; export class Sound_SimpleDemo { //声明一个信息文本 private txtInfo: Text; constructor() { // 不支持WebGL时自动切换至Canvas ...
来源: Laya_社区 发布时间: 20201203
...路径后通过wx.createWorker方法来创建Worker,在适配库中使用class MiniWorkerLoader接口来自定义实现微信小游戏的Worker内容,从而尽可能将Worker的使用接入引擎的统一处理流程,在项目层减少各平台Worker的适配,并且可以扩展到其他小...
来源: Laya3.0_文档 发布时间: 20251010
...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
...之后材质基类由BaseMaterial变更为Material。 ```typescript export class CustomMaterial extends Laya.Material { constructor() { super(); //设置本材质使用的shader名字 this.setShaderName("CustomShader"); } } ``` #### 4.使用自定义材质 在使用自定义材质之前,一定...
来源: Laya2.0_文档 发布时间: 20210715
...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
...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