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

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

91. laya.ui.TextArea_API3.0 [ 52%]

... "#efefef";//设置画布的背景颜色。 Laya.loader.load(["resource/ui/input.png"], Handler.create(this, onLoadComplete));//加载资源。 } private function onLoadComplete():void { var textArea:TextArea = new TextArea("这个一个TextArea实例。");//创建一个 TextArea 类的实例对象 ...

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

92. socket大型项目回调 [ 52%]

...onMessage"+event); // var byte:Laya.Byte = new Laya.Byte(); // this.socket.input.readBytes(byte); if (event instanceof ArrayBuffer){ var byte:Laya.Byte = new Laya.Byte(event); this.socket.input.clear(); this.processPackage(this._package.decode(byte)); } } private sendMessage(reqId, route, msg) { var...

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

93. laya.ui.TextArea [ 51%]

...| Events Packagelaya.uiClasspublic class TextAreaInheritanceTextArea TextInput Label UIComponent Sprite Node EventDispatcher Object TextArea 类用于创建显示对象以显示和输入文本。 Public Properties Hide Inherited Public Properties Show Inherited Public Properties PropertyDefined By...

来源: Laya2.0_api 发布时间: 20190513

94. websocket 中 protobuf 数据的发送与接收的具体方法是怎样的? [ 49%]

...4 API上面说socket.output是发送到服务端的数据,接收应该是input吧,如果接收的消息也是消息名称+消息内容的格式,我怎么把消息名称的4个字节获取并解析,再把后面的消息内容解析成protobuf呢,可以给我写几行示例代码吗,万分...

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

95. Socket能连接到服务器,客户端发请求也能收到服务端的数据,但是服务端主动推送数据,客户端就是收不到数据? [ 48%]

...essage is ArrayBuffer) { trace(new Byte(message).readUTFBytes()); } socket.input.clear(); } private function OnCallBack():void { MsgManger.SendMsg("LoginOut"); } private function onConnectError(e:Event=null):void { trace("error"); } } }   写了个测试例子,可以收到服务器的推送的数...

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

96. 网络通信 · LayaAir3文档 · LAYABOX [ 46%]

....readUTFBytes()); } // 清理缓存的服务端发来的数据 this.socket.input.clear(); } // 出现异常后的事件回调 private onConnectError(e: Event = null): void { console.log("error"); } 3.2 Laya.Byte 二进制读写 在开发项目中,二进制的操作是不可或缺的。在html5时...

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

97. 【经验分享】如何让ts项目支持装饰器语法,以及自动化发布相关的一些东西 [ 45%]

...h.join(nodeModulesDir, 'rollup-plugin-glsl')); let cache; const config = { input: projPath + '/src/Main.ts', output: { file: projPath + '/bin/js/bundle.js', format: 'iife', name: 'laya', sourcemap: true, }, cache: cache, watch: { include: 'src/**', exclude: 'node_modules/**', }, onwarn: (waring, war...

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

98. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 44%]

... Laya.init(100,100); var file:any = Laya.Browser.document.createElement("input"); file.type = "file"; file.style.position = "absolute"; file.style.zIndex = 999; Laya.Browser.document.body.appendChild(file);//添加到舞台 var fileReader:any = new Laya.Browser.window.FileReader(); file.onchange = f...

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

99. 和原生Dom交互 · LayaAir3.3 · 引擎文档 · LAYABOX [ 44%]

... Laya.init(100,100); var file:any = Laya.Browser.document.createElement("input"); file.type = "file"; file.style.position = "absolute"; file.style.zIndex = 999; Laya.Browser.document.body.appendChild(file);//添加到舞台 var fileReader:any = new Laya.Browser.window.FileReader(); file.onchange = f...

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

100. 父物体旋转会导致子物体的世界坐标系不正确?(附demo) [ 42%]

...uler(0, 0, -20); } // Update is called once per frame void Update () { if (Input.GetKey(KeyCode.A)) { guard.transform.position = new Vector3(guard.transform.position.x + 0.1f, guard.transform.position.y, guard.transform.position.z); } else if (Input.GetKey(KeyCode.D)) { guard.transform.position = ne...

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