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

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

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

...r texture2D:Texture2D = new Texture2D(); texture2D["onAsynLoaded"](""+Math.random(),texture.bitmap); createTextureCallBack.call(callbackThis,texture2D); }3. 最终的调用: public function init(){ var s:sprite = create_a_big_sprite(); Laya.timer.once(250,this,function():void{ GameUtil.createTextu...

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

72. webgl 下当对象子显示对象存在panel且panel有子集时,旋转此显示对象会导致此显示对象的同级对象消失!(1.7.10beta) [ 46%]

...会导致显示异常,其他child消失 parent.child_1.rotation = Math.random() * 180; } } class ChildView extends ui.ChildViewUI{ constructor(){ super(); var panel = new Laya.Panel(); panel.pos(0,0); panel.size(200,50); this.addChild(panel); var panelChild = new Laya.Sprite(); panelChild.pos(0,0)...

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

73. 【简单跑酷--JS版】---Lv.5 玩家踩地板 [ 45%]

...个素材是 32 * 20 拼起来的 this.y = 32 * 6 + 32 * parseInt(8 * Math.random()); if(this.bg == null){ //贴图纹理 this.bgTexture = Laya.loader.getRes("res/floor.png"); this.bg = new laya.display.Sprite(); this.bg.graphics.clear(); this.addChild(this.bg); //因为上面的图片是截取的 ...

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

74. 我用as3调试的matter.js,刚体发生碰撞后不会旋转,我的代码在附件里 [ 43%]

...   };             var rock_:Object = Matter.Bodies.polygon(Math.random()*100+100, 50, 3, 30, rockOptions);             Matter.World.add(engine.world, [ rock_]);         }     } } 2017-08-22 0 0 分享 微博 QZONE 微信 layazzzooovvv 赞同来自: 我用js,调试了...

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

75. 3D物理系统 · LayaAir3.3 · 引擎文档 · LAYABOX [ 39%]

...private addCone(): void { //生成随机值半径和高 let raidius = Math.random() * 0.2 + 0.2; let height = Math.random() * 0.5 + 0.8; //创建圆锥形3D模型节点对象 let cone = new Laya.Sprite3D; let coneMesh = cone.addComponent(Laya.MeshFilter); let coneRender = cone.addComponent(Laya.Mesh...

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

76. 缓动动画(JavaScript-LayaAir基础篇(JS)-动画基础) [ 37%]

... * txt 缓动对象 */ function updateColor(txt){ var c = Math.floor(Math.random()*3); switch (c) { case 0: txt.color = "#eee000"; break; case 1: txt.color = "#ffffff"; break; case 2: txt.color = "#ff0000"; break; default: txt.color = "#eee000"; break; } } /** * 缓动完成后的回调方法 * txt ...

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

77. 缓动动画(TypeScript-LayaAir基础篇(TS)-动画基础) [ 36%]

...*/ private updateColor(txt:Laya.Text):void{ var c:number = Math.floor(Math.random()*3); switch (c) { case 0: txt.color = "#eee000"; break; case 1: txt.color = "#ffffff"; break; case 2: txt.color = "#ff0000"; break; default: txt.color = "#eee000"; break; } } /** * 缓动完成后的回调方法 * txt...

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

78. 一篇上手LayaAir的3D物理引擎(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 35%]

...private addCone(): void { //生成随机值半径和高 let raidius = Math.random() * 0.2 + 0.2; let height = Math.random() * 0.5 + 0.8; //创建圆锥形3D模型节点对象 let cone = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createCone(raidius, height)); //把圆锥形3D节点对象添加到3D场...

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

79. LAYABOX游戏实时语音之APP版本 [ 31%]

...g getAudioPath(){ String audioPath = mStoragePath + "/"; audioPath += UUID.randomUUID().toString() + ".wav"; return audioPath; } public boolean onTouch(final String type){ switch(type){ case "d": mPTTStartTime = System.currentTimeMillis(); startRecordAudio(); return true; case "u": mAudioDownloaded ...

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

80. 组件脚本的内置方法 · LayaAir3.3 · 引擎文档 · LAYABOX [ 31%]

.../组件被启用后执行 onEnable(): void { this._level = Math.round(Math.random() * 5) + 1; this._text = this.owner.getChildByName("levelTxt") as Laya.Text; this._text.text = this._level + ""; } //每帧更新时执行 onUpdate(): void { //让持续盒子旋转 (this.owner as Laya.Sprite).rotation...

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