大约有 2,682 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0085 秒)
Laya_社区(2157) Laya2.0_文档(119) Laya3.0_api(106) Laya_示例(84) Laya2.0_api(57) Laya2.0_示例(55) laya_api(53) Laya3.0_文档(51)
调用图集中小图片失败 var sp:Sprite=new Sprite(); sp.loadImage("img/btnbg2.png"); Laya.stage.addChild(sp); var sp1:Sprite=new Sprite(); sp1.loadImage("system/twoP.png"); Laya.stage.addChild(sp1); img图集中的小图可以调用到,system的图集调用不到,在浏览器的资源列表...
来源: Laya_社区 发布时间: 20170518
...要知道。 1. 使用getBounds/ getGraphicBounds。 ```javascript var sp:Sprite = new Sprite(); sp.graphics.drawRect(0, 0, 100, 100, "#FF0000"); var bounds:Rectangle = sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但由于其需要计...
来源: Laya2.0_文档 发布时间: 20210715
...ge.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#FFFFFF"; this.form = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing = 10; var rowHeightD...
来源: Laya_示例 发布时间: 20251209
...显示。 > ## 一、遮罩API介绍 遮罩属性位于[laya.display.Sprite](https://layaair2.ldc2.layabox.com/api2/Chinese/index.html?version=2.9.0beta&type=Core&category=display&class=laya.display.Sprite) API内,该属性的说明如图1所示: (图1) ## 二、简单...
来源: Laya2.0_文档 发布时间: 20210715
...tate(new Vector3(-30, 0, 0), true, false); //添加地板 var floor:MeshSprite3D = scene.addChild(new MeshSprite3D(PrimitiveMesh.createPlane(10, 2000, 100, 100))) as MeshSprite3D; //给地板添加物理组件 var floorCollicar:PhysicsCollider = floor.addComponent(PhysicsCollider); // 添加colli...
来源: Laya_社区 发布时间: 20190417
RopeJoint代码动态创建 无法设置otherbody等属性 var img:Sprite = new Sprite(); //加载显示图片,坐标位于100,50 img.loadImage("res/layabox.png"); img.x=(Laya.stage.width-256)/2; //添加到舞台 Laya.stage.addChild(img); var img2:Sprite = new Sprite(); //加载显示图片,...
来源: Laya_社区 发布时间: 20200217
...l, function(tex) { //使用纹理 var earth1 = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createSphere(5, 32, 32))); earth1.transform.translate(new Laya.Vector3(10, 20, -8)); var earthMat = new Laya.BlinnPhongMaterial(); earthMat.albedoTexture = tex; earthMat.albedoIntensity = 1; earth1...
来源: Laya2.0_文档 发布时间: 20210715
# Sprite3D的克隆 ###### *version :2.0.1beta Update:2019-4-13* 关于克隆,LayaAir3D中提供了几种接口。比较常用的`clone`和`cloneto`这两种通用的方法就不多做介绍了。这里详细讲解下Sprite3D中特有的克隆接口`instantiate`。 ```typescript static instantiate...
来源: Laya2.0_文档 发布时间: 20210715
sprite怎么移除通过loadimage方法显示的图片? var mask = new Laya.Sprite(); mask.loadImage('img/warn_mine.png'); this.addChild(mask); 怎么从mask中去掉warn_mine这个图片 2018-01-19 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...
来源: Laya_社区 发布时间: 20180119
...ine", true); // 设置画布上的对齐参照物 var reference = new Laya.Sprite(); Laya.stage.addChild(reference); reference.pos(100, 100); reference.size(600, 400); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#CCCCCC"); // 每次舞台尺寸变更时,都会调用Utils....
来源: Laya_示例 发布时间: 20251209