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

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

1. 2D物理-仿生机器人 [ 100%]

...ivot = [0, 8 * this.scale]; Laya.Config.isAntialias = true; Laya.Laya.init(1200, 700, Laya.WebGL); Laya.Stat.show(); Laya.Physics.enable(); Laya.PhysicsDebugDraw.enable(); Laya.Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.Laya.stage.scaleMode = ...

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

2. 文本-位图字体 [ 86%]

...)); } onFontLoaded() { // 设置空格的宽 this.bitmapFont.setSpaceWidth(10); // 注册位图字体 Laya.Text.registerBitmapFont(fontName, this.bitmapFont); this.createText(fontName); } createText(font) { let txt = new Laya.Text(); Laya.stage.addChild(txt); txt.width = 250; txt.wordWrap = true; tx...

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

3. 其他引擎的Demo-Example_21 [ 81%]

...= [], color = colors[0], liveGraphics, canvasGraphics; class PIXI_Example_21 { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Loader = Laya.Loader; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Brow...

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

4. IDE-显示IDE创建的界面 [ 81%]

...ction onBtnClick() { //手动控制组件属性 this.radio.selectedIndex = 1; this.clip.index = 8; this.tab.selectedIndex = 2; this.combobox.selectedIndex = 0; this.check.selected = true; } function onBtn2Click() { //通过赋值可以简单快速修改组件属性 //赋值有两种方式: //简...

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

5. 滤镜-颜色滤镜 [ 77%]

...项目(排列成 4 x 5 矩阵)组成的数组,红色 let redMat = [ 1, 0, 0, 0, 0, // R 0, 0, 0, 0, 0, // G 0, 0, 0, 0, 0, // B 0, 0, 0, 1, 0 // A ]; //创建一个颜色滤镜对象,红色 let redFilter = new ColorFilter(redMat); // 红色的猩猩 let redApe = this.createApe(); redApe.filter...

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

6. 其他引擎的Demo-Example_23 [ 68%]

...texture Laya.stage.loadImage("res/pixi/laserBG.jpg"); Laya.stage.frameLoop(1, this, this.animate); } animate() { const Sprite = Laya.Sprite, Point = Laya.Point; let laser; if (tick > frequency) { tick = 0; // iterate through the dudes and update the positions laser = new Sprite(); laser.loadImage("r...

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

7. UI-RefreshList [ 20%]

....refreshList = null; /** 消息生成的当前最大id值 */ this.msgIdNow=1; /** 滚动条效果是否停止 */ this.scrollBarIsStop=false; /** 移动前的上次坐标位置 */ this.moveLastPos = null; /** 列表单元是否已打开 */ this.itemIsOpen=false; /**展开的单元格索引ID */ this....

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