大约有 1,491 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0054 秒)
Laya_社区(917) Laya2.0_文档(193) Laya_示例(125) Laya2.0_示例(101) Laya3.0_api(79) Laya3.0_文档(72) laya_api(2) Laya2.0_api(2)
....prototype.init = function () { this._container = new Sprite(); Laya.stage.addChild(this._container); Laya.loader.load(["../bin/res/ui/progressBar.png", "../bin/res/ui/progressBar$bar.png"], Handler.create(this, this.onPreloaded)); }; LoadResource.prototype.onPreloaded = function () { this.initLoadD...
来源: Laya_社区 发布时间: 20200924
...e.width) / 2; ape.y = (Laya.stage.height - texture.height) / 2; Laya.stage.addChild(ape); } function applayFilter() { //创建一个发光滤镜 var glowFilter = new GlowFilter("#ffff00", 10, 0, 0); //设置滤镜集合为发光滤镜 ape.filters = [glowFilter]; } })();module laya { import Sprite = ...
来源: Laya_示例 发布时间: 20251209
...Loaded)); })(); function onAssetsLoaded() { ape = new Sprite(); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); // 显示默认纹理 switchTexture(); ape.on("click", this, switchTexture); } function switchTexture() { var textureUrl = (flag = !flag)...
来源: Laya_示例 发布时间: 20251209
... = Laya.Label; const STROKE_WIDTH = 4; var label = new Label(); Laya.stage.addChild(label); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor; } return label; } } new U...
来源: Laya2.0_示例 发布时间: 20251209
...建 Particle2D 实例 let partIns = new Particle2D(settings); Laya.stage.addChild(partIns); // 开始发射粒子 partIns.emitter.start(); // 播放 partIns.play(); partIns.x = Laya.stage.width / 2; partIns.y = Laya.stage.height / 2; } } new Particle_T2();module laya { import Stage = Laya.Stage; imp...
来源: Laya2.0_示例 发布时间: 20251209
...建 Particle2D 实例 let partIns = new Particle2D(settings); Laya.stage.addChild(partIns); // 开始发射粒子 partIns.emitter.start(); // 播放 partIns.play(); partIns.x = Laya.stage.width / 2; partIns.y = Laya.stage.height / 2; } } new Particle_T3();module laya { import Stage = Laya.Stage; imp...
来源: Laya2.0_示例 发布时间: 20251209
...age.width / 2; sp.y = Laya.stage.height / 2; sp.size(200, 200); Laya.stage.addChild(sp); sp.on(ROTATE, this, onRotate); // 侦听自定义的事件 sp.on(Event.CLICK, this, onSpriteClick); } function onSpriteClick(e) { var randomAngle = Math.random() * 180; //发送自定义事件 sp.event(ROTATE, [...
来源: Laya_示例 发布时间: 20251209
...用loadImage var ape: Sprite = new Sprite(); ape.pos(100,50); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); } } } new laya.Sprite_DisplayImage(); ``` 在示例代码里,“`100,50`”是图片的显示坐标信息。示例代码运行效果如图2-1所示: ; this.bg.graphics.drawRect(0, 0, 200, 200, '#ccc'); this.addChild(this.bg); this.htmlTxt = new Laya.HTMLDivElement(); this.htmlTxt.style.fontSize = 20; this.htmlTxt.style.width = 200; this.htmlTxt.style.borderColor = '#000'; this.htmlTxt.style.align = 'center'; this.htmlTxt.innerHT...
来源: Laya_社区 发布时间: 20210107
...BOX类 list.vScrollBarSkin =""; Laya.stage.addChild(list); list.array =this.arr; list.renderHandler =new Laya.Handler(this,this.updateItem); this.listArr.push(list); //----------------------------------------------------...
来源: Laya_社区 发布时间: 20190522