大约有 1,567 项符合查询结果, 库内数据总量为 30,779 项。 (搜索耗时: 0.0056 秒)
Laya_社区(1103) Laya2.0_文档(231) Laya_示例(108) Laya2.0_示例(69) Laya3.0_文档(43) Laya3.0_api(11) Laya2.0_api(2)
...图片资源可以用任意png资源替代,存放于`项目根目录/bin/res`目录下,注意要确保资源路径与资源名称正确。 #### screenModeDemo.ts 示例代码如下: ```javascript function showScreen() { //图片 var img = new Laya.Image(); img.centerX = 0; img.centerY = -70; i...
来源: Laya2.0_文档 发布时间: 20210715
...e; import laya.display.Stage; import laya.filters.ColorFilter; import laya.resource.Texture; import laya.utils.Browser; import laya.utils.Handler; import laya.webgl.WebGL; public class Main { private const ApePath:String = "res/img/monkey1.png"; private var apeTexture:Texture; public function Main()...
来源: Laya2.0_文档 发布时间: 20210715
...加到舞台 Laya.stage.addChild(Img); //加载显示图片 Img.loadImage("res/tt.png",w,h); return Img; } /**创建红色滤镜位图方法**/ function creteRedFilter(){ //颜色滤镜矩阵,红色 var colorMatrix = [ 1, 0, 0, 0, 0, //R 0, 0, 0, 0, 0, //G 0, 0, 0, 0, 0, //B 0, 0, 0, 1, 0, //A ]; //...
来源: Laya_社区 发布时间: 20170811
...图片资源可以用任意png资源替代,存放于`项目根目录/bin/res`目录下,注意要确保资源路径与资源名称正确。 #### screenModeDemo.ts 示例代码如下: ```javascript function showScreen(): void { //图片 var img:Laya.Image = new Laya.Image(); img.centerX = 0; img...
来源: Laya2.0_文档 发布时间: 20210715
...g = 'js-websocket'; private JS_WS_CLIENT_VERSION:string = '0.0.5'; private RES_OK:number = 200; private RES_FAIL:number = 500; private RES_OLD_CLIENT:number = 501; private socket:Laya.Socket = null; private callbacks:any = {}; private handlers:any = {}; // Map from request id to route private routeM...
来源: Laya_社区 发布时间: 20180119
...ublic class HelloLayabox { private const AniConfPath:String = "../../../../res/role.atlas"; private var roleAni:Animation; public function HelloLayabox() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; L...
来源: Laya2.0_文档 发布时间: 20210715
...如下: ```javascript var xhr = new XMLHttpRequest(); xhr.open("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload...
来源: Laya2.0_文档 发布时间: 20210714
...ar layaMonkey = scene.addChild(new Laya.MeshSprite3D(Laya.Mesh.load("../../res/threeDimen/skinModel/LayaMonkey/Assets/LayaMonkey/LayaMonkey-LayaMonkey.lm"))); layaMonkey.transform.localScale = new Laya.Vector3(0.3, 0.3, 0.3); layaMonkey.transform.rotation = new Laya.Quaternion(0.7071068, 0, 0, -0.70...
来源: Laya_示例 发布时间: 20241119
...如下: ```javascript var xhr = new XMLHttpRequest(); xhr.open("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload...
来源: Laya2.0_文档 发布时间: 20210714
...Component("ScaleButton", ScaleButton); Laya.loader.load("res/atlas/com/loading.atlas", Laya.Handler.create(this, this.loadGame)); } private loadGame(): void { var resArray = [ { url: "res/atlas/lobby/create_room.atla...
来源: Laya_社区 发布时间: 20181213