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

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

371. 树状列表组件 · LayaAir3.0文档 · LAYABOX [ 45%]

...ya; @regClass() export class UI_Tree extends Laya.Script { constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { var res: any[] = ["atlas/comp/vscroll.png", "atlas/comp/vscroll$bar.png", "atlas/comp/vscroll...

来源: Laya3.0_文档 发布时间: 20230828

372. 在微信小游戏中使用list,兼听不到mouseHandler跟selectHandler。 [ 45%]

...mage = Laya.Image;   var WID = 373, HEI = 85;   function Item() { Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img);   this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box);   // 主要逻辑代码 var Stage   = Laya.St...

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

373. 微信关系链:LayaAir引擎针对开发数据域使用图集支持介绍 [ 45%]

...edresize"; private static var _i:MsgMgr = null; public function MsgMgr() { super(); } public static function get instance():MsgMgr { return _i ||= new MsgMgr(); } /**初始化消息监听**/ public function init():void { //接收主域透传的数据 if(MiniAdpter.isZiYu && MiniAdpter.isPosM...

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

374. 2.0下资源加载和销毁内存问题 [ 45%]

...tmap extends Laya.Image { private szurl:string="" constructor(url:string){ super() this.onUrlChangeHandler(url); } protected onUrlChangeHandler(url:string):void     { if(this.szurl!="") this.disp() this.szurl=url; if(url==null){ this.graphics.clear(); }else{ this.skin=url; } } public disp(){ thi...

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

375. 如何自定义Shader(TypeScript-3D基础(TS)-LayaAir3D之Shader) [ 45%]

...script export class CustomMaterial extends Laya.Material { constructor() { super(); //设置本材质使用的shader名字 this.setShaderName("CustomShader"); } } ``` #### 4.使用自定义材质 ​ 在使用自定义材质之前,一定要记得初始化自己的Shader。LayaAir中自带的材质...

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

376. LayaBox HelloWorld实战 [ 45%]

...World!export default class HelloWorld extends Laya.Scene { constructor() { super(); HelloWorld.instance = this; } onBtnShowClick(){ var dialog = new Laya.Dialog(); dialog.width=300; dialog.height=600; //var bg = new Laya.Image('comp/img_bg.png'); //dialog.addChild(bg); var button = new Laya.Button('...

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

377. ScrollRect设置会引起其他的UI资源无法正在显示 [ 45%]

...e = new Sprite(); private var arr:Array = []; public function TestView() { super(); _path.pivot(0,0); _path.pos(a.x,a.y); this.addChild(_path); _path.rotation = Math.atan2(b.y - a.y, b.x - a.x) / Math.PI * 180; var len:int = Math.floor(GetPathLen()/PATH_LEN)+2; var p:Image; for(var i:int = 0;i<le...

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

378. 动效问题,没有 ui.TestPUI,官方文档是错的,几年了至今无解答 [ 45%]

...nds EffectAnimation { //然后又改成Laya.EffectAnimation constructor(){ super(); this.ani1=null; this.effectData =ui.kick_effectUI.uiView;; } } kick_effectUI.uiView={"type":"View","props":{},"compId":2,"child":[{"type":"Sprite","props":{"y":0,"x":0,"texture":"ani/p1.png"},"compId":3}],"animations...

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

379. List 组件做的手风琴Demo [ 45%]

...   public static HEI:number =30;     constructor(){         super()         this.size(Item.WID,Item.HEI);         var img1 =new Laya.Image("bg0.png");         var img2 =new Laya.Image("bg1.png");         this.pos(0,0);         img1.size(100,30);...

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

380. 仿照laya官方demo做了一个视频播放的UI,为啥在微信里不能用? [ 45%]

...DE*/ module view { export class Guide extends ui.GuideUI { constructor() { super(); // 创建Video元素 let videoElmt: any = Laya.Browser.createElement("video"); Laya.Browser.document.body.appendChild(videoElmt); // 设置Video元素地样式和属性 videoElmt.style.zInddex = Laya.Render.canvas.st...

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