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

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

561. 请教一个图片处理成黑白的问题 [ 67%]

...删除 2017-06-15 0 0 分享 微博 QZONE 微信 189*****192 赞同来自: var grayscaleMat = [0.3086, 0.6094, 0.0820, 0, 0, 0.3086, 0.6094, 0.0820, 0, 0, 0.3086, 0.6094, 0.0820, 0, 0, 0, 0, 0, 1, 0]; var grayscaleFilter = new ColorFilter(grayscaleMat); var grayApe = new Sprite(); grayApe.loadImage(...

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

562. 请问下,2.0子域工程如何创建UI显示在shareCanvas上 [ 67%]

...,然后2.0beta4 子域怎么制作内容呢,就像是用微信需要 var image = Laya.Browser.window.wx.createImage(); image.onload = function () { console.log(image.width, image.height); context.drawImage(image, 0, 0); }; 绘制到sharecanvas 一样,我直接创建scene和view 都没有效果...

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

563. laya.ui.Dialog_API3.0 [ 67%]

...i.Dialog; import laya.utils.Handler; public class Dialog_Example { private var dialog:Dialog_Instance; public function Dialog_Example() { Laya.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load("resource/ui/btn...

来源: Laya3.0_api 发布时间: 20231115

564. Image属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 67%]

...**创建图片***/ private function createImage():void { //实例化图片 var img:Image = new Image("../../../../res/ui/dialog (3).png"); //设置位置 img.pos(165, 62.5); //加载到舞台 Laya.stage.addChild(img); } } } ```

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

565. Animation创建和销毁的问题 [ 67%]

...示了,以下是代码部分 环境:1.7.17_Beta 语言:as3 private var testAnim1:Animation; private var testAnim2:Animation; public function LayaSample() { //初始化引擎 Laya.init(1136, 640,WebGL); trace("ok..."); Laya.stage.on(Event.KEY_DOWN, this, this.onKeydown); } private function onKe...

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

566. IDE创建动画调用问题 [ 67%]

...phicNode的初始skin,请问应该怎么获取到这个GraphicNode?   var light: Laya.Animation = new Laya.Animation(); light.loadAnimation("ani/thunder.ani"); Laya.stage.addChild(light); light.play(0, true); 用light.frames获取结果为null,不行 2017-08-03 添加评论 免费帖 --> 分...

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

567. 碰撞检测问题 [ 67%]

...问题 我根据官方的示例的理解,想把这个盒子放在第十层 var dhBox = scene.addChild(new Laya.MeshSprite3D(new Laya.BoxMesh(0.25, 0.05, 0.4))); var dhBoxMat = new Laya.StandardMaterial(); dhBox.meshRender.material = dhBoxMat; dhBox.transform.position = new Laya.Vector3(0.32, 2.13, 3...

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

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

...xtends Laya.Sprite{ constructor() { super(); new init(); function init() { var bg1 = new Laya.Sprite(); var bg2 = new Laya.Sprite(); //背景图 // box.loadImage("../bin/background.png"); // Laya.stage.addChild(box); bg1.loadImage("../bin/background.png"); this.addChild(bg1); bg2.loadImage("../bin/b...

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

569. HttpRequest在native下没有abort方法吗? [ 67%]

...手动关闭请求。但是HttpRequest在native下没有abort方法吗? var httpRequest = new laya.net.HttpRequest(); var h: any = httpRequest.http; h.abort(); 用的引擎版本是1.7.19.1beta 用的native版本是0.9.16 2018-08-07 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...

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

570. 位图拉伸 模糊 [ 67%]

位图拉伸 模糊 var i=new Laya.Sprite(); i.loadImage('res/DUMMY1.png'); i.scale(10,10); Laya.stage.addChild(i);   做像素游戏的时候,位图做缩放的话,能不能去掉这个平滑处理,就是如图这样的像素效果 另外,刚才我在UI里面把一个小的像素区域作...

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