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

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

11. 关于实例化 动画特效.efc 文件的问题 [ 85%]

...错: 具体是layaUI.max.all.js里的这一行:effect01UI.__super.call(this); TypeError: Cannot read property 'call' of undefined   请问我应该怎么实例化 effectAnimation.efc 这种模板?   2018-01-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...

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

12. 模型与动画的导入使用 · LayaAir3.3 · 引擎文档 · LAYABOX [ 85%]

...("girl/girl.lh").then(res => { let girl : Laya.Sprite3D = res.create(); this.scene3D.addChild(girl); //获得Animator this._animator = girl.getComponent<Laya.Animator>(Laya.Animator); }); this.on( Laya.Event.MOUSE_DOWN, this, this.switchAni ); } switchAni(): void { if (this._isRun) { //播...

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

13. 字体切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 85%]

...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.fontclp.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.fontclp.size(500, 60); //大小 this.fontclp.pivot(this.fontclp.width/2, this.fontclp.height/2); //轴心点 this.fontclp.skin = "atlas/...

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

14. 物理射线检测(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 84%]

...ory=3d&group=Physics3D&name=PhysicsWorld_RayShapeCast)); ```typescript this.hitResult = new Laya.HitResult(); this.hitResults= []; //是否穿透 if (this.castAll) { //进行射线检测,检测所有碰撞的物体 this.scene.physicsSimulation.raycastAllFromTo(this.from, this.to, this.hitResults...

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

15. 继承自Laya.BaseMaterial并且自定义Shader的的自定义材质如何设置透明渲染 [ 84%]

... _mainCol : number; inited : boolean = false; constructor() { super(); if(!this.inited) { CMat._mainTex = Laya.Shader3D.propertyNameToID("u_MainTex"); CMat._mainCol = Laya.Shader3D.propertyNameToID("u_MainCol"); CMat.initShader(); this.inited = true; } this.setShaderName("CMatShader"); } public SetM...

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

16. playSound和playMusic结束时候有异常抛出 [ 83%]

...usic/Music_start.mp3",                      Laya.Handler.create(this, this.onLoadFinished));     }     onLoadFinished()     {         Laya.SoundManager.playMusic("res/music/Music_start.mp3", 1);     } } new GameMain();   -------------------------------------------------------...

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

17. 定时器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 83%]

...。 * @param delay 延迟几帧(单位为帧)。 * @param caller 执行域(this)。 * @param method 定时器回调函数。 * @param args 回调参数。 * @param coverBefore 是否覆盖之前的延迟执行,默认为 true 。 */ frameOnce(delay: number, caller: any, method: Function, args: any[...

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

18. 2D拖尾渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 83%]

...法只执行一次 onAwake(): void { //在节点上添加2D拖尾渲染器 this._trail2D = this.owner.addComponent(Laya.Trail2DRender); //设置淡出时间 this._trail2D.time = 1; //设置最小距离 this._trail2D.minVertexDistance = 0.1; //设置宽度倍数 this._trail2D.widthMultiplier = 50; //...

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

19. 3D变换 · LayaAir3.3 · 引擎文档 · LAYABOX [ 82%]

...cal: boolean = true): void { if (isLocal) { Matrix4x4.createFromQuaternion(this.localRotation, Transform3D._tempMatrix0); Vector3.transformCoordinate(translation, Transform3D._tempMatrix0, Transform3D._tempVector30); Vector3.add(this.localPosition, Transform3D._tempVector30, this._localPosition); th...

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

20. socket大型项目回调 [ 80%]

... = console.log; console.warn = console.log; console.error = console.log; } this._message = new Message(); this._package = new Package(); this.socket = null; this.callbacks = {}; this.handlers = {}; // Map from request id to route this.routeMap = {}; this.heartbeatInterval = 0; this.heartbeatTimeout ...

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