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

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

161. 定时器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 66%]

...果。 1. 帧间隔 1.1 定时执行一次 (基于帧率) Laya.timer.frameOnce,定义如下: /** * 定时执行一次(基于帧率)。 * @param delay 延迟几帧(单位为帧)。 * @param caller 执行域(this)。 * @param method 定时器回调函数。 * @param args 回调参数。 * @param c...

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

162. laya.d3.renderobjs.nativeobj.NativeTransform3D_API3.0 [ 66%]

...ocal hasListener localToGlobal lookAt objLookat off offAll offAllCaller on once rotate rotationTo setWorldLossyScale toDir toLocalNormal translate Constructors constructor new NativeTransform3D(owner: Sprite3D): NativeTransform3D Overrides Transform3D.__constructor Defined in laya/d3/RenderObjs/Nati...

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

163. Laya.Timer.clear 的源码可能有个问题。 [ 66%]

...数(行为),最多执行6次 for(let i = 0; i < 6; i++){ Laya.timer.once(i * 1000, this, this.b, [i], false); } //遇到一些需求变化,我希望在2s之后(可能其它某些触发情况), 停止执行 b 函数(行为) Laya.timer.once(2000,this,()=>{ Laya.timer.clear(this, this.b);...

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

164. 动画-新版骨骼动画 [ 65%]

...ite3D.load("../../res/threeDimen/skinModel/Zombie/new/Zombie.lh")); zombie.once(Laya.Event.HIERARCHY_LOADED, this, function () { //获取Animator动画组件 zombieAnimator = zombie.getChildAt(0).getComponentByType(Laya.Animator); loadUI(); }); function loadUI() { var clipName = ["walk","attack","le...

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

165. 使用HttpRequest向外部链接请求ip所在省份时,遇到 No 'Access-Control-Allow-Origin' header错误 [ 65%]

...信息 var req:HttpRequest = new HttpRequest();             req.once(Event.COMPLETE, this, function():void             {                 trace(req.data);             });             req.once(Event.ERROR, this, function():void             {  ...

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

166. 分享:Sprite 转换成3D贴图(Texture2D)的方法,如果有更好的方法,请告诉我。 [ 65%]

... public function init(){ var s:sprite = create_a_big_sprite(); Laya.timer.once(250,this,function():void{ GameUtil.createTexture(s,onTexture2DReady,this); }); } public function onTexture2DReady(t:Texture2D):void { //todo } 你会发现我用了一个 Laya.timer.once ,如果你的对象不大,也...

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

167. 材质-BlinnPhong-反射贴图 [ 65%]

...aya.Quaternion(0.7071068, 0, 0, -0.7071067); teapot2.meshFilter.sharedMesh.once(Laya.Event.LOADED, this, function () { var material = teapot2.meshRender.material; //反射贴图 material.reflectTexture = textureCube; }); Laya.timer.frameLoop(1, this, function () { teapot1.transform.rotate(this.rotat...

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

168. 材质-PBRStandard材质 [ 64%]

...ne.load("../../res/threeDimen/scene/PBRMaterialScene/Showcase.ls")); scene.once(Laya.Event.HIERARCHY_LOADED, this, function () { var camera = scene.getChildByName("Main Camera"); camera.addComponent(CameraMoveScript); camera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY; var skyBox = new Laya.SkyBox(); ...

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

169. 网络通信 · LayaAir3文档 · LAYABOX [ 64%]

...新建一个data.txt文件 //设置完成事件,添加回调方法 http.once(Laya.Event.COMPLETE, this, this.completeHandler); //设置错误事件,添加回调方法 http.once(Laya.Event.ERROR, this, this.errorHandler); //设置进度事件,添加回调方法 http.on(Laya.Event.PROGRESS, this...

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

170. 解决跨域相关! [ 64%]

...,为啥还连不上, 看代码-> this.hr=new HttpRequest(); this.hr.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); this.hr.once(Laya.Event.COMPLETE, this, this.onHttpRequestComplete); this.hr.once(Laya.Event.ERROR, this, this.onHttpRequestError); this.hr.send("http://www.baidu.c...

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