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

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

551. 用最新版本的IDE开发,用AS语言开发,用HttpRequest加载图片报错,用JS语言开发却可以加载 [ 59%]

...JS语言开发却可以加载 按照 技术文档里的事例: public function LayaSample() { //初始化引擎 Laya.init(1136, 640); var sp:Sprite = new Sprite(); var xhr:HttpRequest = new HttpRequest(); xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr....

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

552. 寻路系统(JavaScript-3D基础(JS)-LayaAir3D之高级应用) [ 59%]

...``typescript //监听鼠标抬起 Laya.stage.on(Laya.Event.MOUSE_UP, this, function() { this.index = 0; //获取每次生成路径 this.getGridIndex(this.path[this.curPathIndex % this.pointCount].x, this.path[this.curPathIndex++ % this.pointCount].z, this.startPoint); this.getGridIndex(this.path[thi...

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

553. layanative安卓端需要怎么添加ttf字体,需要增加两种字体? [ 59%]

...andler; /** * ... * @author ww */ public class TestTTFLoader  {   public function TestTTFLoader()  { Laya.init(1000, 900);   Laya.loader.load("res/remember.ttf",new Handler(this,test)); }   private function test():void { var text:Text; text = new Text(); text.fontSize = 30; text.color = "#ff000...

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

554. 材质的加载(JavaScript-3D基础(JS)-LayaAir3D之Material材质) [ 59%]

...Laya.BaseMaterial.load("res/skyBox2/skyBox2.lmat",Laya.Handler.create(this,function(mat) { var skyRenderer = camera.skyRenderer; //创建天空盒的mesh skyRenderer.mesh = Laya.SkyBox.instance; //设置天空盒材质 skyRenderer.material = mat; })); ``` ![](img/1.png)(图1)

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

555. 材质的加载(TypeScript-3D基础(TS)-LayaAir3D之Material材质) [ 59%]

...Laya.BaseMaterial.load("res/skyBox2/skyBox2.lmat",Laya.Handler.create(this,function(mat) { var skyRenderer = camera.skyRenderer; //创建天空盒的mesh skyRenderer.mesh = Laya.SkyBox.instance; //设置天空盒材质 skyRenderer.material = mat; })); ``` ![](img/1.png)(图1)

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

556. Sprite中的width,height和size(width,height)感觉没作用啊 [ 59%]

...(width,height)是我理解问题,还是我写错了呢。。。。 function Init(){ Laya.init(800,600); bg = new laya.display.Sprite(); bg.loadImage("res/bg.png"); bg.pos(0,0); bg.width = 100; bg.height = 100; bg.size(100,100); Laya.stage.addChild(bg); } 2016-07-11 添加评论 免费帖 -->...

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

557. Spine适配版(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 59%]

...private var skeleton:SpineSkeleton; private var index: Number = -1; public function Main() { Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; Stat.show(); this.startFun(); } private function startFun(): void { this.templet =...

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

558. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 59%]

...aya.stage.addChild(new TabUI()) this.getGold.on(Laya.Event.MOUSE_DOWN,this,function(){ console.log("点击事件") }) // console.log(this.getGold) } } new Main() Laya_Aaron • 2017-12-13 17:09 getGold 哪定义的呢 xdkaka • 2017-12-13 17:17 上面图片截图了,是在UI编辑模式...

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

559. 在加载swf动画之后在封装的里面报错了 , 用的官网的例子 [ 59%]

...6 值。     *@return Int16 值。     */     __proto.getInt16=function(){         if (this._pos_+2 > this._length)throw "getInt16 error - Out of bounds";         var us=this._d_.getInt16(this._pos_,this._xd_);         this._pos_+=2;         return us; ...

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

560. 播放音效时报错Failed to set the 'buffer' property on 'AudioBufferSourceNode'的问题 [ 59%]

...ffer' property on 'AudioBufferSourceNode'的问题 __proto._tryClearBuffer=function(sourceNode){ // if (!Browser.onMac){ // try{ // sourceNode.buffer=null; // }catch (e){ // WebAudioSoundChannel._tryCleanFailed=true; // } // return; // } try {sourceNode.buffer=WebAudioSound._miniBuffer;}catch (e){We...

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