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

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

91. IDE-显示IDE创建的界面 [ 65%]

...st赋值,先获得一个数据源数组 var arr: Array = []; for (var i: number = 0; i < 100; i++) { arr.push({ label: "item " + i, clip: i % 9 }); } //给list赋值更改list的显示 this.list.array = arr; //还可以自定义list渲染方式,可以打开下面注释看一下效果 //list.rend...

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

92. 缓动-缓动函数演示 [ 64%]

...ass Tween_EaseFunctionsDemo { private character: Sprite; private duration: number = 2000; private tween: Tween; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode =...

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

93. 缓动-缓动函数演示 [ 64%]

...ass Tween_EaseFunctionsDemo { private character: Sprite; private duration: number = 2000; private tween: Tween; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode =...

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

94. 高级应用-寻路导航 [ 64%]

...ivate _quaternion: Laya.Quaternion = new Laya.Quaternion(); private index: number = 0; private curPathIndex: number = 0; private nextPathIndex: number = 1; private moveSprite3D: Laya.Sprite3D; private pointCount: number = 10; private scene: Laya.Scene; constructor() { Laya3D.init(0, 0, true); Laya.s...

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

95. WebSocket发送与接收数据(TypeScript-LayaAir基础篇(TS)-数据与通信) [ 63%]

...数据,按照服务器传递过来的数据,按照顺序读取 var a:number = this.byte.getByte(); var b:number = this.byte.getInt16(); var c:number = this.byte.getFloat32(); var d:string = this.byte.getString(); var e:string = this.byte.getUTFString(); } ```

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

96. 网络和格式-Socket [ 62%]

...output.writeByte发送 var message: string = "demonstrate "; for (var i: number = 0; i "); // 使用output.writeByte发送 var message:String = "demonstrate "; for (var i:int = 0; i < message.length; ++i) { output.writeByte(message.charCodeAt(i)); } socket.flush(); } private function onSocketClose(e...

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

97. 计时器-延迟调用 [ 61%]

..."#232628"; this.demonstrate(); } private demonstrate(): void { for (var i: number = 0; i < 10; i++) { Laya.timer.callLater(this, this.onCallLater); } } private onCallLater(): void { console.log("onCallLater triggered"); var text: Text = new Text(); text.font = "SimHei"; text.fontSize = 30; text.colo...

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

98. laya.resource.NativeContext_API3.0 [ 61%]

...ce/NativeContext.ts:67 Static ENUM_TEXTALIGN_CENTER ENUM_TEXTALIGN_CENTER: number = 1 Defined in laya/resource/NativeContext.ts:80 Static ENUM_TEXTALIGN_DEFAULT ENUM_TEXTALIGN_DEFAULT: number = 0 Defined in laya/resource/NativeContext.ts:79 Static ENUM_TEXTALIGN_RIGHT ENUM_TEXTALIGN_RIGHT: number = ...

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

99. Sprite-缓存为静态图像 [ 61%]

...: Sprite = new Sprite(); // 随机摆放文本 var text: Text; for (var i: number = 0; i < 1000; i++) { text = new Text(); text.fontSize = 20; text.text = (Math.random() * 100).toFixed(0); text.rotation = Math.random() * 360; text.color = "#CCCCCC"; text.x = Math.random() * Laya.stage.width; text.y ...

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

100. 计时器-延迟调用 [ 60%]

..."#232628"; this.demonstrate(); } private demonstrate(): void { for (var i: number = 0; i < 10; i++) { Laya.timer.callLater(this, this.onCallLater); } } private onCallLater(): void { console.log("onCallLater triggered"); var text: Text = new Text(); text.font = "SimHei"; text.fontSize = 30; text.colo...

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