大约有 1,363 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0072 秒)
Laya_社区(1071) Laya3.0_api(81) Laya2.0_api(57) laya_api(53) Laya2.0_文档(50) Laya3.0_文档(38) Laya2.0_示例(7) Laya_示例(6)
...考下面代码示例,如果还有不明白的我们再沟通!var sp1:Sprite=new Sprite(); sp1.graphics.drawRect(0,0,200,400,"#FF0000"); Laya.stage.addChild(sp1); var sp2:Sprite=new Sprite(); sp2.graphics.drawRect(0,0,300,400,"#0000FF"); sp2.pos(100,100); if(sp1.getBounds().intersects(sp2.getBou...
来源: Laya_社区 发布时间: 20161202
...); }); } /** * ViewHeadViewTest */ class ViewHeadViewTest extends Laya.Sprite { constructor() { super(); this.graphics.drawRect(0, 0, 1500, 1500, "#0000ff"); this.on(Laya.Event.CLICK, this, this.onclickTest); } onclickTest(): void { ...
来源: Laya_社区 发布时间: 20170822
...图片资源加入到内存中,然后通过getRes 和 drawTexture 添加SPRITE对象到屏幕中。 预加载后的初始内存为29M左右 之后开始逐个添加SPRITE,在添加第1个到第80个头像的时候,内存显示稳定在29M 但是当添加第81个SPRITE头像的时候,内存...
来源: Laya_社区 发布时间: 20161107
...不见的,但是没有生效 Laya.init(640, 1136); let testSp = new Laya.Sprite(); testSp.width = 200; testSp.height = 50; testSp.graphics.clear(); testSp.graphics.drawRect(0, 0, testSp.width, testSp.height,'#FF0000'); let tmpMask = new Laya.Sprite(); tmpMask.width = testSp.width; tmpMask.height = t...
来源: Laya_社区 发布时间: 20200421
...; private _targetsLastValue: number = null; private targets: Array<Laya.Sprite> = null; public static instance: ColorTool = null; private targetsFilter: Laya.ColorFilter = null; private _persent: number = 0; protected constructor() { this.targets = new Array<Laya.Sprite>(); } /** * 实...
来源: Laya_社区 发布时间: 20180930
... Laya.stage.screenMode = "vertical"; Laya.Stat.show(); var icon = new Laya.Sprite(); icon.loadImage('img/test.png'); Laya.stage.addChild(icon); document.body.addEventListener("click",function(){ var kk = icon.drawToCanvas(431, 428).getContext('2d').canvas; var img = new Image(); img.src = kk.toDataU...
来源: Laya_社区 发布时间: 20161107
...模型 var boxmesh=new Laya.BoxMesh(0.6, 0.6, 0.6); var box = new Laya.MeshSprite3D(boxmesh); scene.addChild(box); box.transform.translate(_position); box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); var material = new Laya.StandardMaterial(); material.diffuseTexture = Laya.Texture2D....
来源: Laya_社区 发布时间: 20181126
...eate(null, function(scene1){ let scene = Laya.stage.addChild(scene1); Laya.Sprite3D.load("/1/res/SampleScene.lh", Laya.Handler.create(null, function(sp) { //let obj = sp; let obj = scene.addChild(sp); obj.transform.scale = new Laya.Vector3(4, 4, 4); obj.transform.rotate(new Laya.Vector3(0, 0.9, 0));...
来源: Laya_社区 发布时间: 20200611
...2d物理引擎文档都是IDE篇的。 class CollisionBoll extends Laya.Sprite { private _boll1:Laya.Sprite; constructor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:laya.physics.B...
来源: Laya_社区 发布时间: 20190428
... //加载并显示模型 roleMan = new MeshSprite3D(Mesh.load("3d/man/hero-mon_1129.lm")); roleMan.transform.localScale = new Vector3(0.01, 0.01, 0.01); roleMan.transform.localPosition = new Vector3(0, -0.5, -3); ...
来源: Laya_社区 发布时间: 20170401