大约有 2,642 项符合查询结果, 库内数据总量为 30,897 项。 (搜索耗时: 0.0125 秒)
Laya_社区(2120) Laya2.0_文档(119) Laya3.0_api(106) Laya_示例(84) Laya2.0_api(57) Laya2.0_示例(55) laya_api(53) Laya3.0_文档(48)
Sprite.loadImage在Android平台无法卡死,web和iOS平台正常 在Android平台使用Spirte.loadImage方法初始Sprite卡死,log中一直打印日志“JCGraphicsCmdDispath::calcBoundingBox Wrong command number!,cmd=-65536” 同样的代码和图片地址在web和iOS平台正常; 代码...
来源: Laya_社区 发布时间: 20171229
...IGN_MIDDLE; //设置适配模式 Laya.stage.scaleMode = "showall"; //添加Sprite var sp = new Laya.Sprite(); Laya.stage.addChild(sp); //将sp移动到横坐标400,纵坐标300的位置 sp.pos(400,300); //绘制两条在sp的原点交叉的直线 sp.graphics.drawLine(-50,0,50,0,'#00ff00',1); sp.gr...
来源: Laya_社区 发布时间: 20180524
...ve); wx.onTouchEnd(onTouchEnd); wx.onTouchCancel(onTouchCancel); var rankSprite2 = new Laya.Sprite(); rankSprite2.zOrder = 100; Laya.stage.addChild(rankSprite2); var texture = new Laya.Texture(sharedCanvas); texture.bitmap.alwaysChange = true; rankSprite2.graphics.drawTexture(texture, left*pixelRa...
来源: Laya_社区 发布时间: 20180426
...require也用不了 //b文件 export default class player extends Laya.Sprite { constructor() { super(); this.pivot(this.width / 2, this.height / 2); this.graphics.drawRect(0, 0, this._size, this._size, this._color); } } //a文件 import player from './player'; // 程序入口 class GameMain {...
来源: Laya_社区 发布时间: 20180804
...as any))), Texture.DEF_UV); this.imgSp = new Sprite(); this.imgSp.graphics.clear(); this.imgSp.cacheAs = "bitmap"; Laya.stage.addChild(this.imgSp); this.imgSp.graphics.drawT...
来源: Laya_社区 发布时间: 20200529
...是正常的,只能来这里请教了 switch (key) { case 'E': frameX = sprite.pivotX * 2; frameY = sprite.pivotY; frameRotation = 0; frame.scaleX = 1; frame.scaleY = 1; break; case 'Q': frameX = sprite.pivotX * 2; frameY = sprite.pivotY; frameRotation = 180; frame.scaleX = 1; frame.scaleY = 1; br...
来源: Laya_社区 发布时间: 20190723
iPhone6 webgl渲染下sprite.loadimage加载不出canvas.toDateUrl $("#ewm").qrcode({render:"canvas",width:parseInt(1136*0.3),height:parseInt(1136*0.3),correctLevel:0,text:textDz});//生成二维码图案 var t = new Texture(); t.load($("#ewm canvas")[0].toDataURL()); ewmSprit.graphics.drawTexture(...
来源: Laya_社区 发布时间: 20160928
...script //新建一个球体模型并添加到舞台上 var sphere:Laya.MeshSprite3D = scene.addChild(new Laya.MeshSprite3D(PrimitiveMesh.createSphere(1))) as Laya.MeshSprite3D; //新建一个球形的碰撞盒 var sphereShape:Laya.SphereColliderShape = new Laya.SphereColliderShape(1); //给球添加...
来源: Laya2.0_文档 发布时间: 20210714
...景往上挪动一下? 测试下 kezhiyu • 2018-06-04 14:33 能否用sprite做下测试。像这样 var ape = new Sprite(); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); // 方法2:使用drawTexture Laya.loader.load("../../res/apes/monkey2.png", Han...
来源: Laya_社区 发布时间: 20180604
...(!this.cubeP){ this.cubeP = this.scene.addChild(new Laya.Sprite3D()); this.cube = this.cubeP.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(1, 1, 1))); let rigidbody = this.cube.addComponent(Laya.Rigidbody3D); rigid...
来源: Laya_社区 发布时间: 20200223