大约有 65 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0026 秒)
...Sprite(); img1.loadImage('https://layaair.ldc.layabox.com/demo/h5/res/apes/monkey2.png',100,100,90,90); Laya.stage.addChild(img1); img1.on(Laya.Event.CLICK,this, function(name){ console.log(name);},['图1']); var img2 = new Laya.Sprite(); img2.loadImage('https://layaair.ldc.layabox.com/demo/h5/res/a...
来源: Laya_社区 发布时间: 20180621
... ape1 = new Sprite(); ape2 = new Sprite(); ape1.loadImage("../../res/apes/monkey2.png"); ape2.loadImage("../../res/apes/monkey2.png"); ape1.pivot(55, 72); ape2.pivot(55, 72); ape1.pos(Laya.stage.width / 2, Laya.stage.height / 2); ape2.pos(200, 0); //一只猩猩在舞台上,另一只被添加成...
来源: Laya_示例 发布时间: 20251130
...eApes() { 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); //不设置轴心点默认为左上角 sp2 = new Sprite(); sp2.loadIma...
来源: Laya_示例 发布时间: 20251130
...化舞台 Laya.init(1334, 750); //需要切换的图片资源路径 this.monkey2 = "res/img/monkey2.png"; //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.monkey2,...
来源: Laya_社区 发布时间: 20170825
graphics使用matrix的异常情况 Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, function() { var t = Laya.loader.getRes("../../res/apes/monkey2.png"); var ape = new Sprite(); ape.graphics.drawTexture(t, 0, 0); ape.graphics.scale(1.01, 1) Laya.stage.addChild(ape); ape.pos(200...
来源: Laya_社区 发布时间: 20170609
...图片资源路径 private monkey1:string = "res/img/monkey1.png"; private monkey2:string = "res/img/monkey2.png"; //切换状态 private flag:boolean = false; private img:Laya.Sprite; constructor() { //初始化引擎 Laya.init(1334,750); //设置舞台背景色 La...
来源: Laya_社区 发布时间: 20180226
...dler = Laya.Handler; var WebGL = Laya.WebGL; var ApePath = "../../res/apes/monkey2.png"; var apeTexture; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER...
来源: Laya_示例 发布时间: 20251130
...:// 方法2:使用drawTexture Laya.loader.load("../../../../res/apes/monkey2.png", Handler.create(this, function():void { var t:Texture = Laya.loader.getRes("../../../../res/apes/monkey2.png"); var ape:Sprite = new Sprite(); ape.graphics.drawTexture(t,0,0); Laya.stage.addChild(ape); ape.pos(200,...
来源: Laya_社区 发布时间: 20170804
...发语言、LayaAirIDE让项目开发更高效。let apePath = "res/apes/monkey2.png", apeTexture; class Filters_Color { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); La...
来源: Laya2.0_示例 发布时间: 20251130
... extends Laya.Script { onAwake(): void { this.loadTexture("resources/image/monkey2.png", 500);//需要在resources/image放入相应的资源 this.loadTexture("https://layaair.com/3.x/demo/resources/res/apes/monkey2.png"); } /**加载并显示图片 */ loadTexture(url: string, x: number = 0, y: numb...
来源: Laya3.0_文档 发布时间: 20251010