• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 1,363 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0072 秒)

101. 创建多个Sprite对象后,再次取出来的时候坐标全为0,0高宽跟创建时的也一样 [ 86%]

创建多个Sprite对象后,再次取出来的时候坐标全为0,0高宽跟创建时的也一样 在创建的同位置的Sprite并设置了同坐标以及相同大小之后,再次根据getChildByName()获取出来时x,y坐标居然是0,0而且高度跟宽度也会变化很多,请问...

来源: Laya_社区 发布时间: 20180427

102. graphics 问题 [ 86%]

...内容相关的链接 提交 3 个回复 cuixueying 赞同来自: var sp:Sprite=new Sprite(); sp.graphics.save(); var matrix:Matrix=new Matrix(); matrix.rotate(45); matrix.translate(100,100); sp.graphics.transform(matrix); sp.graphics.drawRect(0,0,200,100,"#FF0000"); sp.graphics.restore(); Laya.stag...

来源: Laya_社区 发布时间: 20170609

103. 圆形的头像怎么实现? [ 86%]

...过scale了 但是效果是这样的 :     代码 : var point = new Sprite(); this.addChild(point); point.graphics.drawCircle(88, 86, 40, 'transparent');   var tx = new Sprite(); tx.loadImage(PATH + 'tx.jpg'); tx.scale(0.3,0.3); this.addChild(tx); tx.mask = point; 2017-09-28 0 2 分享 微博...

来源: Laya_社区 发布时间: 20170928

104. 三个图好像无法绑定同的事件? [ 86%]

...同的事件? Laya.init(400, 400, laya.webgl.WebGL); var img1 = new Laya.Sprite(); img1.loadImage('https://layaair.ldc.layabox.com/demo/h5/res/apes/monkey2.png',100,100,90,90); Laya.stage.addChild(img1); img1.on(Laya.Event.CLICK,this, function(name){ console.log(name);},['图1']); var img2 = new L...

来源: Laya_社区 发布时间: 20180621

105. 用ide打包后的图片,Texture显示出来? [ 86%]

用ide打包后的图片,Texture显示出来? Sprite和Image可以显示出来,Texture报错、、、说找到图片   代码 : Laya.loader.load([{url: "comp.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); function onLoaded(){     var aa = new Sprite();     Laya.sta...

来源: Laya_社区 发布时间: 20171226

106. 屏幕适配的缩放模式详解(TypeScript-2D基础篇(TS)-屏幕适配) [ 86%]

...Text = Laya.Text;     import Image = Laya.Image;     import Sprite = Laya.Sprite;       export class SmartScale_T {           //适配模式         private modes:string = "exactfit";         //全局文本信息         private txt: Text...

来源: Laya2.0_文档 发布时间: 20200307

107. 图片能按轴心旋转 [ 86%]

...aleMode = 'fixedauto' Laya.stage.screenMode = 'vertical' let bg = new Laya.Sprite(); bg.loadImage("../res/image/interface/intro_bg.png",375,667,1500,1500); bg.pivot(750,750) bg.alpha = 1 bg.rotation = 10图片是正方形的 如上设置过pivot之后 并没有按 正方形中心点旋转 2018-05-19...

来源: Laya_社区 发布时间: 20180519

108. 加载到舞台的3D模型显示贴图 [ 86%]

...载lh文件显示的原因。 var staticMesh = scene.addChild(new Laya.Sprite3D()); staticMesh.once(Laya.Event.HIERARCHY_LOADED, null, function (sprite) { var meshSprite = sprite.getChildAt(0);//此对象一定是MeshSprite3D类型,会导致出错 var mesh = meshSprite.meshFilter.sharedMesh;...

来源: Laya_社区 发布时间: 20161021

109. 3D模型怎么删除?没回切换页面原来的模型都还在? [ 86%]

...his.scene); 3.新建模型,并且添加B页面的3D场景中 var map: Laya.Sprite3D = Laya.Sprite3D.load("cj/cj.lh"); this.scene.addChild(map);   4.切换页面 private playGame(): void { Laya.stage.removeChild(this.welcomePanel); this.gamePanel = new GamePanel();//管是是重新new的,模...

来源: Laya_社区 发布时间: 20180411

110. 最新版本绘制100x100个sprite ios显示 [ 86%]

最新版本绘制100x100个sprite ios显示 /* 游戏地图 */ function GameMap(){ this.MapRowNum = 100; this.MapColNum = 100; GameMap.super(this); this.init(); } Laya.class(GameMap, "GameMap", laya.display.Sprite); var _proto = GameMap.prototype; _proto.init = function(){ var boxSp = new la...

来源: Laya_社区 发布时间: 20161008