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

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

141. 怎么获取对象的坐标 [ 79%]

...這樣:   Vector3 {elements: Float32Array[3]}   改成這樣:    console.log( camera.transform.position.x ); console.log( camera.transform.position.y ); console.log( camera.transform.position.z );   另外;你的 position 打錯,不是 postion 是 position。   2017-08-08 2 0 分享...

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

142. 游戏铺满固定大小容器,火狐和谷歌正常,edge会有滚动条? [ 79%]

...Laya.Browser.clientHeight){                         console.log("横屏",this.lastClientWidth);                         if(Laya.stage.scaleMode != Laya.Stage.SCALE_SHOWALL){                             Laya.stage.scaleMode = La...

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

143. Byte二进制读写(JavaScript-LayaAir基础篇(JS)-数据与通信) [ 79%]

...始读入byte中。省略其中的浮点数20.0和整数16 byte.pos = 0;// console.log(byte.readUTFString())//从byte中读出字符串。 ``` - 读取数据 **getByte**():number在字节流中读一个字节。 **getInt16**():number在当前字节偏移量位置处读取 Int16 值。 **getInt32**()...

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

144. 继承Scene没有onEnable [ 79%]

...    super();     }     public onAwake():void{         console.log(1111);     } }   2.继承Sprite 执行后会有onAwake         let t = new tt();         Laya.Scene.root.addChild(t);     } } //激活启动类 new Main();  class tt extends Laya.Sprite{ ...

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

145. Laya.loader.create 加载进度问题 [ 79%]

...AssetsLoading)); } ModelManager.prototype.onCreateComplete = function () { console.log("onCreateComplete"); var pipe = Laya.loader.getRes("res/Pipe/Pipe/a.lh"); console.log("pipe", pipe); } ModelManager.prototype.onAssetsLoading = function (progress) { console.log("progress = ",progress); } 打印...

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

146. 开放数据域组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 79%]

...gnore wx.setUserCloudStorage({ KVDataList: KVDataList, success: () => { console.log("数据保存成功") }, fail: () => { console.log("数据保存失败") }, complete: () => { console.log("执行调用结束回调") } }); } } 然后是getFriendCloudStorage方法,来到开放数据域的...

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

147. Laya.Byte使用getUint16读取错误 [ 79%]

Laya.Byte使用getUint16读取错误 var bytes1 = new Laya.Byte([0,8]); console.log('++',bytes1.getUint8(),bytes1.getUint8()); var bytes2 = new Laya.Byte([0,8]); console.log('++',bytes2.getUint16()); var bytes3 = new Laya.Byte([0,8,0,0]); console.log('++',bytes3.getUint32());   采用上面测试...

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

148. js socket 连接不上 [ 79%]

...r(app); 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> &l...

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

149. RopeJoint代码动态创建 无法设置otherbody [ 79%]

...mponent(Laya.RopeJoint);         this.rope.otherBody=lala;         console.log(lala);         let collider:Laya.CircleCollider=this.owner.getComponent(Laya.CircleCollider);         this.rope.otherAnchor=["540","1060"];         this.rope.maxLength=286;         console.log(this...

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

150. Error: 代码包大小为 5533 kb,上限为 4096 kb,请删除文件后重试? [ 79%]

...一个测试代码,压根就没有功能。 class Main { constructor() { console.log(Laya.Browser.width, Laya.Browser.height); this.current = { x: 0, y: Laya.Browser.height }; // Laya.stage.bgColor = "#3F51B5"; this.sp = new Laya.Sprite(); Laya.stage.addChild(this.sp); } render() { console.log("re...

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