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

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

1. Sprite-根据数据绘制路径 [ 100%]

...三种开发语言、LayaAirIDE让项目开发更高效。class Sprite_DrawPath { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALI...

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

2. 加载-多种类型资源加载 [ 97%]

...n() { var Loader = Laya.Loader; var Handler = Laya.Handler; var ROBOT_DATA_PATH = "res/skeleton/robot/robot.bin"; var ROBOT_TEXTURE_PATH = "res/skeleton/robot/texture.png"; (function() { Laya.init(100, 100); var assets = []; assets.push( { url: ROBOT_DATA_PATH, type: Loader.BUFFER }); assets.push( {...

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

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

...EC8A49", "#AF3666", "#F6C84C", "#4C779A"], colorCount = 0, isDown = false, path = [], 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...

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

4. Sprite-显示图片 [ 82%]

...Laya.stage.bgColor = "#232628"; this.showApe(); } showApe() { const monkey1Path = "./res/apes/monkey1.png", monkey2Path = "./res/apes/monkey2.png"; // 方法1:使用loadImage let ape = new Laya.Sprite(); Laya.stage.addChild(ape); ape.loadImage(monkey1Path); // 方法2:使用drawTexture Laya.load...

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

5. Sprite-节点控制 [ 71%]

...this.createApes(); } createApes() { const Sprite = Laya.Sprite; let monkey2Path = "res/apes/monkey2.png"; this.ape1 = new Sprite(); this.ape2 = new Sprite(); this.ape1.loadImage(monkey2Path); this.ape2.loadImage(monkey2Path); this.ape1.pivot(55, 72); this.ape2.pivot(55, 72); this.ape1.pos(Laya.stage...

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

6. Sprite-轴心点 [ 70%]

...this.createApes(); } createApes() { const Sprite = Laya.Sprite; let monkey2Path = "res/apes/monkey2.png"; let gap = 150; this.ape1 = new Sprite(); Laya.stage.addChild(this.ape1); this.ape1.loadImage(monkey2Path); // 设置轴心点为中心 this.ape1.pivot(55, 72); this.ape1.pos(Laya.stage.width / 2...

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