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

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

141. 2.x引擎项目升级指南 · LayaAir3.0文档 · LAYABOX [ 56%]

....on(Laya.Event.CLICK, ()=> { console.log("clicked"); }); class MyScript extends Laya.Script { //脚本事件 onMouseClick(e:Event) { console.log("clicked"); } } aNode.addComponent(MyScript); 以上两种方式是等价的,且在纯2D,或2D/3D混合这两种情况中均可正常使用。 3.2 2...

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

142. 微信小游戏加载资源问题 [ 56%]

...niFileMgr.DESCENDING = 2; MiniFileMgr.NUMERIC = 16; class MiniSoundChannel extends Laya.SoundChannel { constructor(audio, miniSound) { super(); this._audio = audio; this._miniSound = miniSound; this._onEnd = MiniSoundChannel.bindToThis(this.__onEnd, this); audio.onEnded(this._onEnd); } static bindTo...

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

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

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

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

144. Dialog 第一次打开总是出现在窗口右下角,这是为啥,再打开就正常剧中了? [ 55%]

...个窗口,都是这样,代码如下 export default class SettingDialog extends Laya.Dialog { constructor() { super(); this.loadScene('assets/scenes/dialogs/SettingDialog.scene'); } }{ "x":0, "type":"Dialog", "selectedBox":2, "selecteID":3, "searchKey":"Dialog", "props":{"width":1624,"sceneColor"...

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

145. 请问laya有没有类似翻页容器(pageView)的组件? [ 55%]

...fo"; import { ui } from "../ui/layaMaxUI"; export default class RuleDialog extends ui.scene.RuleDialogUI { private m_index: number = -1; private m_downValue: number = -1; constructor() { super(); this.list_rule.hScrollBarSkin = ""; this.list_rule.renderHandler = new Laya.Handler(this, this.updateIte...

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

146. 动画状态机详解 · LayaAir3.0文档 · LAYABOX [ 55%]

...下: ... import Vector3 = Laya.Vector3; ... export class AnimationScript extends Laya.AnimatorStateScript { ... private model: Laya.Sprite3D; /**@internal */ setPlayScriptInfo(animator: Laya.Animator | Laya.Animator2D, layerindex: number, playstate: Laya.AnimatorState | Laya.AnimatorState2D) { ......

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

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

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

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

148. 3d显示对象克隆体超出舞台不再显示的bug2.1.0.btea1 [ 55%]

...脚本方式实现,比如子弹脚本。 */ export default class GameUI extends ui.test.TestSceneUI { scene3d:Laya.Scene3D; sp:Laya.Sprite3D; sp2:Laya.Sprite3D; translateA = new Laya.Vector3(-0.05, 0, 0); translateD = new Laya.Vector3( 0.05, 0, 0); constructor() { super(); //添加3D场景 var sce...

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

149. UNITY导出的模型旋转不了 [ 55%]

...rotate(vect,false,false); //}); })); })); })(this); class BoxControlScript extends Laya.Script3D { constructor() { super(); this.obj = null; this.rotation = new Laya.Vector3(0, 1, 0); } /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行...

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

150. 3D粒子编辑模块 · LayaAir3.0文档 · LAYABOX [ 55%]

...建,播放,暂停,销毁,清理对象池 export class Particle3D extends Sprite3D { private _isInited: boolean = false; private _filePath: string = null; private _particle: Laya.Sprite = null; private _shuriKenParticle3D: Array<ShuriKenParticle3D>= []; private _shurikenParticleSystem: ...

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