大约有 28 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0033 秒)
...象以外,可以将滤镜应用于任何显示对象,开发者通常对Image组件使用最多。选择Image组件,在属性设置面板的杂项中,添加滤镜的属性Filters,如动图1-1所示,演示了如何在Image组件上使用滤镜。 (动图1-1) 如图1-2所示,可以创...
来源: Laya3.0_文档 发布时间: 20250826
...loading(nPercent)更新进度条。 伪代码如下: var nPercent=0; var image1 = document.createElement('img'); image1.onload=function() { if(window.loadingView){ nPercent+=33; window.loadingView.loading(nPercent); } } image1.src = "a.png"; var image2 = document.createElement('img'); image2.onloa...
来源: Laya3.0_文档 发布时间: 20251010
...erDemo 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...
来源: Laya3.0_文档 发布时间: 20251010
图像组件(Image)一、通过LayaAir IDE创建Image组件1.1 创建image1.2 常用属性1.3 脚本控制Image二、通过代码创建Image组件图像组件(Image) 一、通过LayaAir IDE创建Image组件 1.1 创建image Image 是 UI 里最常见的显示图像的组件,用来显示位...
来源: Laya3.0_文档 发布时间: 20251010
... { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }; img.src = window.URL.createObjectURL(blob); document.body.appendChild(img); } } xhr....
来源: Laya3.0_文档 发布时间: 20230303
....size(600, 275); panel.pos(150, 150); this.owner.addChild(panel); // 创建Image组件,作为Panel的子节点 let img: Laya.Image; for (var i: number = 0; i < 4; i++) { // 创建4个Image,水平排列 img = new Laya.Image("atlas/comp/image.png"); img.x = i * 512; panel.addChild(img); } } } ...
来源: Laya3.0_文档 发布时间: 20251010
LayaAir和原生DomLayaAir之SVGLayaAir之Dom元素ImageLayaAir之Dom元素videoLayaAir之dom元素FileLayaAir之dom元素script标签LayaAir之dom元素iframeLayaAir和原生Dom 在开发项目中,开发者难免遇到dom元素支持,但是LayaAir中不支持或者支持的不完善。那么...
来源: Laya3.0_文档 发布时间: 20251010
...纹理。 绘制图形 Graphics:绘制一个或者一组图形。 2.3.1 Image的Texture 首先,Sprite的Texture是支持通过拖入或者加载一张图片作为纹理Texture绘制的。 如动图2-6所示,来了解下拖入一张图片到Texture属性中的过程: (动图2-6) 注意:...
来源: Laya3.0_文档 发布时间: 20251010
...要将网络图片下载后的本地缓存地址传入给创建好的nativeImage中,并派发完成事件;在这一步中我们也将图片的缓存地址写入到了资源映射表中。 在加载过程中会执行下图中MiniWorkLoader基类的load方法,将url传入到woker线程中进...
来源: Laya3.0_文档 发布时间: 20251010
...plete(e: any = null): void { this.dialog = new Laya.Dialog(); var bg: Laya.Image = new Laya.Image(this.assets[0]); this.dialog.addChild(bg); var button: Laya.Button = new Laya.Button(this.assets[1]); button.name = Laya.Dialog.CLOSE; button.pos(this.DIALOG_WIDTH - this.CLOSE_BTN_WIDTH - this.CLOSE_BT...
来源: Laya3.0_文档 发布时间: 20230303