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

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

1. 文本-Overflow [ 100%]

...GL; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(600, 300, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createTexts(); })(); function createTexts() { var t1 = c...

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

2. UI-Slider [ 99%]

...{ var hs = new HSlider(); hs.skin = "../../res/ui/hslider.png"; hs.width = 300; hs.pos(50, 170); hs.min = 0; hs.max = 100; hs.value = 50; hs.tick = 1; hs.changeHandler = new Handler(this, onChange); Laya.stage.addChild(hs); } function placeVSlider() { var vs = new VSlider(); vs.skin = "../../res/ui/...

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

3. UI-ScrollBar [ 98%]

...ar hs = new HScrollBar(); hs.skin = "../../res/ui/hscroll.png"; hs.width = 300; hs.pos(50, 170); hs.min = 0; hs.max = 100; hs.changeHandler = new Handler(this, onChange); Laya.stage.addChild(hs); } function placeVScroller() { var vs = new VScrollBar(); vs.skin = "../../res/ui/vscroll.png"; vs.height...

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

4. 缓动-时间线 [ 95%]

...:0.5, scaleY:0.5},2000,null,0) .addLabel("turnDown",0).to(target,{x:450, y:300, scaleX:0.2, scaleY:1, alpha:1},2000,null,0) .addLabel("turnLeft",0).to(target,{x:100, y:300, scaleX:1, scaleY:0.2, alpha:0.1},2000,null,0) .addLabel("turnUp",0).to(target,{x:100, y:100, scaleX:1, scaleY:1, alpha:1},2000,...

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

5. 鼠标交互-双指缩放(多点触控) [ 94%]

..., this, onMouseUp); } function createSprite() { sp = new Sprite(); var w = 300, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } fun...

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

6. UI-Input [ 93%]

...Laya.Handler; var WebGL = Laya.WebGL; var SPACING = 100; var INPUT_WIDTH = 300; var INPUT_HEIGHT = 50; var Y_OFFSET = 50; var skins; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Lay...

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

7. 文本-自动换行 [ 89%]

...,面向AS/JS/TS开发者提供HTML5开发技术方案!"; txt.width = 300; txt.fontSize = 40; txt.color = "#ffffff"; //设置文本为多行文本 txt.wordWrap = true; txt.x = Laya.stage.width - txt.textWidth >> 1; txt.y = Laya.stage.height - txt.textHeight >> 1; Laya.stage.addChild(txt); } })();...

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

8. 文本-下划线 [ 87%]

...发行商\n面向AS/JS/TS开发者提供HTML5开发技术方案"; txt.size(300, 50); txt.fontSize = 20; txt.color = "#ffffff"; txt.align = align; // 设置下划线 txt.underline = true; txt.underlineColor = underlineColor; txt.pos(x, y); Laya.stage.addChild(txt); return txt; } })();module laya { im...

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

9. UI-Tree [ 85%]

.../../res/ui/vscroll.png"; tree.itemRender = Item; tree.xml = xml; tree.size(300, 300); tree.x = (Laya.stage.width - tree.width) / 2; tree.y = (Laya.stage.height - tree.height) / 2; Laya.stage.addChild(tree); } })();module laya { import Stage = Laya.Stage; import Tree = Laya.Tree; import Browser = Lay...

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

10. Sprite-轴心点 [ 85%]

...bgColor = "#232628"; createApes(); })(); function createApes() { var gap = 300; sp1 = new Sprite(); sp1.loadImage("../../res/apes/monkey2.png", 0, 0); sp1.pos((Laya.stage.width - gap) / 2, Laya.stage.height / 2); //设置轴心点为中心 sp1.pivot(55, 72); Laya.stage.addChild(sp1); //不设置轴...

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