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

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

561. 求教关于自适应问题 [ 73%]

...里的full适配模式是我需要的结果,可是里面的元素都是addChildstage上适配效果才生效 我在UI编辑器里的scene里加的组件不会进行适配,只有再次addChildstage才生效,请问有什么设置可以处理吗 2020-07-10 添加评论 免费帖 --> 分享 ...

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

562. LayaAir和原生DOM交互(JavaScript-2D进阶篇(JS)-扩展模块) [ 73%]

...var sp = new Laya.Sprite(); sp.loadImage(data, 0, 0, 200, 200); Laya.stage.addChild(sp); ``` 通过data来当做url传递给loadImage这个方法引擎就会帮我们加载并解码显示出来。loadImage这个方法中的参数不仅仅有接收地址的url还接收base64和svg的格式。编译...

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

563. 文本基础样式(JavaScript-LayaAir基础篇(JS)-文本) [ 73%]

...xt = "hello_world"; //设置文本颜色 txt.color = "#ffffff"; Laya.stage.addChild(txt); ``` 这个时候我们就可以看到txt已经添加到舞台上了,显示了txt中白色的hello_world。 接着我们给文本添加一些其他的字体样式,粗体、斜体、字体大小等。 ![3](im...

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

564. Sprite设置mask属性为什么显示是透明的?怎样才能显示正常? [ 73%]

...stroy(); gameContainer.destroy(); }   gameContainer.mask=mask; Laya.stage.addChild(gameContainer);  })();  })(); 附件 : --> 2020-06-03 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回复 为什么被折叠? 0 个...

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

565. webgl模式下对Panel组件旋转时Panel子对象显示错误的BUG! [ 73%]

...anelRotationTest(Laya.Sprite); testSpriteRotation.pos(300,260); Laya.stage.addChild(testSpriteRotation); var testPanelRotation:PanelRotationTest = new PanelRotationTest(Laya.Panel); testPanelRotation.pos(1000,260); Laya.stage.addChild(testPanelRotation); Laya.Tween.to(testPanelRotation,{rotation:720...

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

566. 自适应问题 [ 73%]

...         _sprite.graphics.drawTexture(t, 0, 0);         Laya.stage.addChild(_sprite); }); 但是出来的效果是这样,我本意是想 宽度不变 高度可以拉伸 问题1 怎么才能宽度不变 高度自适应 问题2 如果我想知道红色那块的高度 要怎么获取   附...

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

567. Laya.stage.on(Laya.Event.RESIZE,this, this.ChangeSize); [ 73%]

...,是不是就不能用open的方法,可是不用open方法的话能用addchild吗? 初学者 • 2023-05-17 10:26 如果想要监听屏幕旋转,需要怎么写呢 layabox小高 • 2023-05-17 10:30 多个问题请开多个帖子进行提问

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

568. 封装类的时候 怎么在类中表示自身? [ 73%]

...te(); //背景图 // box.loadImage("../bin/background.png"); // Laya.stage.addChild(box); bg1.loadImage("../bin/background.png"); this.addChild(bg1); bg2.loadImage("../bin/background.png"); bg2.pos(0,-852); this.addChild(bg2); 用this.addchild老是出错 2016-09-26 添加评论 免费帖 --> 分享...

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

569. 设置遮罩(JavaScript-LayaAir基础篇(JS)-位图) [ 73%]

....drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台 Laya.stage.addChild(img); } })(); ``` 运行效果如图2所示: ![图2](img/2.jpg)(图2) ### 2.2 创建一个圆形的遮罩区域 用代码创建一个圆形的遮罩区域。通过mask属性,即可实现遮罩效果。继续...

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

570. Uncaught TypeError: Cannot read property 'props' of undefined [ 73%]

...Laya3D01/Laya3D01.ls",Laya.Handler.create(null,function(scene){ Laya.stage.addChild(scene); //创建摄像机(横纵比,近距裁剪,远距裁剪) var camera= new Laya.Camera( 0, 0.1, 1000); //加载到场景 scene.addChild(camera); //移动摄像机位置 camera.transform.position=new Laya.Vect...

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