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

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

1. 输入设备-贪吃蛇(重力感应) [ 100%]

...wser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; function Segment(width, height) { Segment.super(this); Segment.prototype.init = function() { this.graphics.drawRect(-height / 2, -height / 2, width + height, height, "#FF7F50"); } // 获取关节另一头位置 Segment.prototype.getPinPositio...

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

2. UI-Dialog [ 99%]

...Laya.Image; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var DIALOG_WIDTH = 220; var DIALOG_HEIGHT = 275; var CLOSE_BTN_WIDTH = 43; var CLOSE_BTN_PADDING = 5; var assets; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE...

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

3. 性能测试-虫子(慎入) [ 97%]

...s = []; var wrapBounds; var maggotTexture; (function() { Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.bgColor = "#000000"; Stat.show(); wrapBounds = new Rectangle(-padding, -padding, Laya.stage.width + padding * 2, Laya.stage.height + padding * 2); Laya.loader.load(texturePath, Handle...

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

4. UI-ProgressBar [ 94%]

...progressBar = new ProgressBar("../../res/ui/progressBar.png"); progressBar.width = 400; progressBar.x = (Laya.stage.width - progressBar.width) / 2; progressBar.y = Laya.stage.height / 2; progressBar.sizeGrid = "5,5,5,5"; progressBar.changeHandler = new Handler(this, onChange); Laya.stage.addChild(pr...

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

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

...tion() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(t...

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

6. 输入设备-摇一摇 [ 94%]

...keCount = 0; (function() { Laya.init(picW, Browser.height * picW / Browser.width); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; showShakePic(); showConsoleText(); startShake(); })(); function showShakePic() { var shakePic = new Sprite(); shakePic.loadImage("../../res/inputDevice/shake.png"); Laya.sta...

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

7. 鼠标交互-修正交互区域 [ 93%]

...tion() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { buildWor...

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

8. 性能测试-卡通人物2 [ 93%]

...ss Character function Character(images) { Character.super(this); Character.WIDTH = 110; Character.HEIGHT = 110; var bloodBar; var animation; var nameLabel; Character.prototype.createAnimation = function(images) { animation = new Animation(); animation.loadImages(images); animation.interval = 70; ani...

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

9. UI-Button [ 91%]

...andler = Laya.Handler; var WebGL = Laya.WebGL; var COLUMNS = 2; var BUTTON_WIDTH = 147; var BUTTON_HEIGHT = 165 / 3; var HORIZONTAL_SPACING = 200; var VERTICAL_SPACING = 100; var xOffset; var yOffset; var skins; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya...

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

10. DOM元素-表单输入 [ 91%]

...rm = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing = 10; var rowHeightDelta = this.rowSpacing + this.rowHeight; // 显示左侧标...

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