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

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

911. 在父sprite中添加子sprite ,移动父Sprite 子sprite为什么不动? [ 54%]

...); // 名字 this.name = "gemini"; this.init(); } // 注册类 IsLand Laya.class(IsLand,"IsLand",laya.display.Sprite); // 原型 var _proto = IsLand.prototype; // 初始化 _proto.init = function(){ // 球体 this.ball = new Sprite(); // 城堡 this.tower = new Sprite(); // 飞艇 this.aeroboat = ne...

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

912. 请问js怎么触发按钮的onclick事件,按教程的写,触发不知道为什么。 [ 54%]

...的步骤为按钮绑定一个btn1.js 我在这样写的   export default class btn1 extends Laya.Script { constructor(){ alert("1"); //执行后这里触发了 super();} onEnable(){ alert("2"); //执行后这里触发了 } onclick(){ alert("3"); //执行后点击按钮这里没触发,不知道...

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

913. ts加密md5码封装 [ 54%]

...3456"); console.log(str) //len:32 //e10adc3949ba59abbe56e057f20f883emd5.ts class Md5 { private static _inst:Md5; public static get Instance():Md5 { return this._inst ||(this._inst = new Md5()); } public get_md5(str:string):string { return this.md5(str); } split(target: string | any[], step: number, ...

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

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

...(this.img);   this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box);   // 主要逻辑代码 var Stage   = Laya.Stage; var List    = Laya.List; var Handler = Laya.Handler; var WebGL   = Laya.WebGL;     (function() { // 不支持WebGL时自动切换至Canvas L...

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

915. laya.resource.Texture [ 54%]

API DocumentationAll Packages | All Classes | Index | Frames No Frames TextureProperties | Methods | Events Packagelaya.resourceClasspublic class TextureInheritanceTexture EventDispatcher ObjectSubclasses RenderTarget2D Texture 是一个纹理处理类。 Public Properties PropertyDefined...

来源: laya_api 发布时间: 20170929

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

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

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

917. 单选框组容器组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 54%]

...添加如下的示例代码,实现脚本控制RadioGroup: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.RadioGroup }) public radiogroup: Laya.RadioGroup; //组件被激活后执行,此时所有节点和组件均已创建完...

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

918. 使用3D精灵 · LayaAir3.4 · 引擎文档 · LAYABOX [ 54%]

...机添加了这个脚本。 (图6-2) 脚本的代码为: const { regClass, property } = Laya; @regClass() export class CameraMoveScript extends Laya.Script3D { /** @private */ protected _tempVector3: Laya.Vector3 = new Laya.Vector3(); protected lastMouseX: number = 0; protected lastMouseY: num...

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

919. laya.d3.core.material.PBRSpecularMaterial_API3.0 [ 54%]

...nu Globals "laya/d3/core/material/PBRSpecularMaterial" PBRSpecularMaterial Class PBRSpecularMaterial PBRSpecularMaterial 类用于实现PBR(Specular)材质。 Hierarchy PBRMaterial PBRSpecularMaterial Implements IClone Index Constructors constructor Properties destoryedImmediately lock name renderQu...

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

920. 版本号:2.0.2 beta, 在sound文件夹下音乐播放不了,放入到res文件夹下可播放 [ 54%]

...; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export default class Test_11_Sound {  //声明一个信息文本 private txtInfo: Text;  constructor() { this.setup(); }  private setup(): void { var gap: number = 10;  //创建一个Sprite充当音效播放按钮 var soundButton: Sprit...

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