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

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

151. websocket连接出错 [ 81%]

...var io = require('socket.io').listen(server); server.listen(8888); console.log("服务器启动"); io.on('connection', function (ws) { console.log('客户端连接成功!'); ws.on('foo', function(data){ console.log(data); }); }); 自己写的html页面 <!DOCTYPE html> <html> <head&g...

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

152. 音频-播放演示 [ 81%]

...#FFFFFF", "center"); return btn; } // 播放音效 onPlaySound() { console.log("播放音效"); Laya.SoundManager.playSound("res/sounds/btn.mp3", 1, new Laya.Handler(this, this.onComplete)); } // 播放音乐 onPlayMusic() { console.log("播放音乐"); Laya.SoundManager.playMusic("res/sounds/bgm.mp...

来源: Laya2.0_示例 发布时间: 20240930

153. 在线急等,发现你们这个编译器一个bug,不能实现负负得正,昨天明明解决了,过了一会又不行了,怎么回事 [ 81%]

...Ball = function(){ this.ball.x -= this.vx; this.ball.y += this.vy; console.log("111111"); this.vy *= 0.99; this.vy += 0.25; console.log("222222"); if (this.ball.y + this.vy >= this.img1 ||this.ball.y + this.vy <= 0) { this.vy = -this.vy; console.log("33333"); } if (this.ball.x + this.vx > t...

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

154. 音频-播放演示 [ 81%]

...stage.addChild(button); return button; } function onPlayMusic(e) { console.log("播放音乐"); SoundManager.playMusic("../../res/sounds/bgm.mp3", 1, new Handler(this, onComplete)); } function onPlaySound(e) { console.log("播放音效"); SoundManager.playSound("../../res/sounds/btn.mp3", 1, new Han...

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

155. 使用getUserInfo获取的用户信息 [ 81%]

...nfo({ withCredentials:false, lang: 'zh_CN', success: (res) => { console.log(res); // BigData.ins.user = res.data[0]; }, fail: () => { console.log("userInfo"+JSON.stringify("fail")); }, complete: () => { // console.log("userInfo"+JSON.stringify(selfData)); } Res打印出来时空的 附件 :...

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

156. layaair获取xml信息出错 [ 81%]

...: var configData:XmlDom = Loader.getRes(config_PATH) as XmlDom; console.log(configData); console.log(configData.attributes); console.log(configData.childNodes);   xml如下: <root>     <config>          <PATH>../h5/</PAHT>     </config> </root> 2...

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

157. 程序当中更改适配模式后,没有生效成相对应的适配模式效果是为什么? [ 81%]

...ht = Laya.Browser.clientHeight; if (stageWidth < stageHeight) { console.log("one", Laya.stage.scaleMode) Laya.stage.scaleMode = Laya.Stage.SCALE_NOSCALE; //1 console.log("one1", Laya.stage.scaleMode) } else { console.log("two", Laya.stage.scaleMode) Laya.stage.scaleMode = Laya.Stage.SCALE_EXACTFI...

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

158. 射线检测报错,outHitInfo.sprite3D=null; [ 81%]

...a = this.scene.scene.getChildByName("Main Camera") as Laya.Camera; console.log("当前摄像机的名字是:" + this.camera.name); }  public _start(state:Laya.RenderState):void{ this.ray = new Laya.Ray(Laya.Vector3.ZERO,Laya.Vector3.ZERO); this.phasorSprite3D = new Laya.PhasorSpriter3D(); Laya.st...

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

159. Laya2.6.0 升级至Laya2.8.0 Native环境 加载ttf 字体不生效 [ 81%]

...        } else {                     console.log("OPPOSANS-R ttf 字体加载成功");                 }                 return resolve(success);             }), Laya.Handler.create(this, (pro) => {         ...

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

160. list item 添加事件后无法监听 [ 81%]

...   return list; }  function updateItem(cell, index) {     console.log(index);     // console.log(cell.dataSource);     cell.setImg(cell.dataSource[index]);     cell.on(Laya.Event.CLICK, function() {         console.log("click")     }) }  function onSelect(index) {  ...

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