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

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

1. 性能测试-卡通人物2 [ 100%]

...语言、LayaAirIDE让项目开发更高效。let amount = 500, character1 = [ "res/cartoon2/yd-6_01.png", "res/cartoon2/yd-6_02.png", "res/cartoon2/yd-6_03.png", "res/cartoon2/yd-6_04.png", "res/cartoon2/yd-6_05.png", "res/cartoon2/yd-6_06.png", "res/cartoon2/yd-6_07.png", "res/cartoon2/yd-6_08.png...

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

2. 鼠标交互-双指旋转(多点触控) [ 97%]

...touches.length == 2) { preRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].stageX - touches[1].stageX); Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove); } } onMouseMove(e) { let touches = e.touches; if (touches && touches.length == 2) { let nowRadian = Math.atan2( touch...

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

3. UI-Tree [ 97%]

...类对应的json对象: // {"child": [{"type": "Clip", "props": {"x": "13", "y": "0", "left": "12", "height": "24", "name": "selectBox", "skin": "ui/clip_selectBox.png", "right": "0", "clipY": "2"}}, {"type": "Clip", "props": {"y": "4", "x": "14", "name": "folder", "clipX": "1", "skin": "ui/clip_t...

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

4. 文本-多行输入 [ 96%]

...inputText.multiline = true; inputText.wordWrap = true; inputText.size(350, 100); inputText.x = Laya.stage.width - inputText.width >> 1; inputText.y = Laya.stage.height - inputText.height >> 1; inputText.padding = [2,2,2,2]; // 移动端输入提示符 inputText.prompt = "Type some word..."; // 设...

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

5. 计时器-间隔循环 [ 95%]

...age.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { let vGap = 100; this.rotateTimeBasedText = this.createText("基于时间旋转", Laya.stage.width / 2, (Laya.stage.height - vGap) / 2); this.rotateFrameRateBasedText = this.createText("基于帧频旋转", this.rotateTimeBasedText.x, th...

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

6. UI-Button [ 95%]

...言、LayaAirIDE让项目开发更高效。let COLUMNS = 2, BUTTON_WIDTH = 147, BUTTON_HEIGHT = 165 / 3, HORIZONTAL_SPACING = 200, VERTICAL_SPACING = 100, xOffset, yOffset, skins; class UI_Button { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat...

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

7. UI-Clip [ 94%]

...ew Image(bgSkin); bg.size(224, 302); bg.pos(Laya.stage.width - bg.width >> 1, Laya.stage.height - bg.height >> 1); Laya.stage.addChild(bg); } createTimerAnimation() { const Clip = Laya.Clip; this.counter = new Clip(clipSkin, 10, 1); Laya.stage.addChild(this.counter); this.counter.autoPlay = true; th...

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

8. 混合模式-Lighter [ 93%]

...hoenixes(); // 动态背景渲染 this.evalBgColor(); Laya.timer.frameLoop(1, this, this.renderBg); } createPhoenixes() { let scaleFactor = Math.min( Laya.stage.width / (phoenixWidth * 2), Laya.stage.height / phoenixHeight); // 混合模式的凤凰 let blendedPhoenix = this.createAnimation(); blend...

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

9. 粒子-粒子演示1 [ 93%]

...高效。let partPath = "res/particles/GravityMode.part"; class Particle_T1 { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Loader = Laya.Loader, Stat = Laya.Stat; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya....

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

10. 鼠标交互-拖动 [ 93%]

...mit = 200; dragRegion = new Rectangle(Laya.stage.width - dragWidthLimit >> 1, Laya.stage.height - dragHeightLimit >> 1, dragWidthLimit, dragHeightLimit); //画出拖动限制区域 Laya.stage.graphics.drawRect( dragRegion.x, dragRegion.y, dragRegion.width, dragRegion.height, null, "#FFFFFF", 2); } o...

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