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

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

381. [LayaAir3]Pool对象池获取继承对象时会返回基类对象 [ 45%]

... { type = 0; } export class TestClass2 extends TestClass { constructor() { super(); this.type = 1; } }测试代码如上所示,打印结果是:0,0,true,预期结果是:0,1,false才对。 获取TestClass2实例时,返回的是TestClass的实例对象,看了下源码,发现是获...

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

382. 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

383. 仿照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

384. UI-Tree [ 45%]

...: {"name": "render", "right": "0", "left": "0"}}; function Item() { Item.__super.call(this); this.right = 0; this.left = 0; var selectBox = new Clip("../../res/ui/tree/clip_selectBox.png", 1, 2); selectBox.name = "selectBox"; //设置 selectBox 的name 为“selectBox”时,将被识别为树结...

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

385. UI-Tree [ 45%]

...er", "right": "0", "left": "0"}}; class Item extends Box { constructor() { super(); this.right = 0; this.left = 0; let selectBox = new Clip("res/ui/tree/clip_selectBox.png", 1, 2); selectBox.name = "selectBox"; // 设置 selectBox 的name 为“selectBox”时,将被识别为树结构的项的背...

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

386. 如何自定义Shader(ActionScript-3D基础(AS3)-LayaAir3D之shader) [ 44%]

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

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

387. Maximum call stack size exceeded [ 44%]

...GameMain extends Laya.Scene {         constructor(){             super();               GameMain.instance = this;               Laya.MouseManager.multiTouchEnabled = false;               this.loadScene("main.scene");           }           onEnable() {     ...

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

388. 微信小游戏关系链 我创建了一个开放域的项目 但是报错了 [ 44%]

...85 * 4); var WID = 375, HEI = 85; function RankListItem() { RankListItem.__super.call(this); this.size(WID, HEI); this.img = new Laya.Image(); this.addChild(this.img); this.setImg = function (src) { this.img.skin = src; } } Laya.class(RankListItem, "RankListItem", Laya.Box); //rankList var rankList ...

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

389. 面板容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 44%]

...a; @regClass() export class UI_Panel extends Laya.Script { constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { // 创建Panel组件 let panel: Laya.Panel = new Laya.Panel(); panel.hScrollBarSkin = "atlas/...

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

390. Cannot read property 'rayCast' of undefined [ 44%]

...fined export default class indexscene extends Laya.Script { constructor(){ super(); this.rotation = new Laya.Vector3(0, 0.01, 0); this.point = new Laya.Vector2(); this.ray = new Laya.Ray(new Laya.Vector3(),new Laya.Vector3()); //1.开启第四个参数 let config3D = new Laya.Config3D(); config3D.is...

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