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

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

1. 缓动-简单的Tween [ 100%]

...../res/cartoonCharacters/2.png"); characterB.pivot(34, 50); characterB.y = 250; Laya.stage.graphics.drawLine(terminalX, 0, terminalX, Laya.stage.height, "#FFFFFF"); // characterA使用Tween.to缓动 Tween.to(characterA, { x: terminalX }, 1000); // characterB使用Tween.from缓动 characterB.x = term...

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

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

...fontName); } function createText(font) { var txt = new Text(); txt.width = 250; txt.wordWrap = true; txt.text = "Do one thing at a time, and do well."; txt.font = font; txt.leading = 5; txt.pos(Laya.stage.width - txt.width >> 1, Laya.stage.height - txt.height >> 1); Laya.stage.addChild(txt); } })();...

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

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

...a.stage.bgColor = "#FFFFFF"; this.form = 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 + ...

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

4. Sprite-新手引导 [ 87%]

...1, y: 575, radius: 150, tip: "../../res/guide/help6.png", tipx: 200, tipy: 250 }, { x: 883, y: 620, radius: 100, tip: "../../res/guide/help4.png", tipx: 730, tipy: 380 }, { x: 1128, y: 583, radius: 110, tip: "../../res/guide/help3.png", tipx: 900, tipy: 300 }]; var guideStep = 0; var hitArea; var in...

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

5. 加载-销毁Texture使用的图片资源 [ 85%]

...; this.aniFly.loadAtlas(this.PathFly); this.aniFly.play(); this.aniFly.pos(250, 100); Laya.stage.addChild(this.aniFly); //创建按钮 this.btn = new Sprite().size(205, 55); this.btn.graphics.drawRect(0, 0, this.btn.width, this.btn.height, "#057AFB"); this.txt = new Text(); this.txt.text = "销毁";...

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

6. 缓动-缓动函数演示 [ 79%]

...100, 50); tween && tween.clear(); tween = Tween.to(character, { x: 350, y: 250 }, duration, Ease[list.selectedItem]); } function createDurationCrontroller() { var durationInput = createInputWidthLabel("Duration:", '2000', 400, 10); durationInput.on(Event.INPUT, this, function() { duration = parseInt...

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

7. 物理引擎-Slingshot [ 65%]

...: 20.5, yOffset: 28 } } }); }); var ground2 = Matter.Bodies.rectangle(610, 250, 200, 20, { isStatic: true, render: { fillStyle: '#edc51e', strokeStyle: '#b5a91c' } }); var pyramid2 = Matter.Composites.pyramid(550, 0, 5, 10, 0, 0, function(x, y, column) { var texture = column % 2 === 0 ? '../../res/p...

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