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

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

21. 输入设备-摇一摇 [ 85%]

...ePic() { const Sprite = Laya.Sprite; let shakePic = new Sprite(); shakePic.loadImage("res/inputDevice/shake.png"); Laya.stage.addChild(shakePic); } showConsoleText() { const Text = Laya.Text; console = new Text(); Laya.stage.addChild(console); console.y = picH + 10; console.width = Laya.stage.width;...

来源: Laya2.0_示例 发布时间: 20240929

22. Image加载完成后的图片大小重设问题 [ 84%]

...init();     }     public init ():void     {         this.bg_img.loadImage("ui/bg.jpg",0,0,Laya.stage.width,Laya.stage.height,Laya.Handler.create(this,this.onComplete));         Laya.stage.on(Laya.Event.RESIZE,this,this.onResize);     }     onComplete():void     {         this...

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

23. 没有预加载的图片怎么获取width和height ? [ 84%]

...交 2 个回复 浪货界扛把子 赞同来自: cuixueying 给精灵设置loadimage后不能直接获取它的大小;   问题:是不是只有加载完图片在能真正获取他的width和height?   本人当前解决方法:提前加载资源,在回调中进行操作设置 text_load_wid...

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

24. Sprite-旋转缩放 [ 84%]

...() { this.ape = new Laya.Sprite(); Laya.stage.addChild(this.ape); this.ape.loadImage("res/apes/monkey2.png"); this.ape.pivot(55, 72); // this.ape.pos( Laya.stage.width / 2, Laya.stage.height / 2); this.ape.x = Laya.stage.width / 2; this.ape.y = Laya.stage.height / 2; this.scaleDelta = 0; Laya.timer....

来源: Laya2.0_示例 发布时间: 20240929

25. iPhone6 webgl渲染下sprite.loadimage加载不出canvas.toDateUrl [ 83%]

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

26. 设置滤镜(JavaScript-LayaAir基础篇(JS)-位图) [ 83%]

...pe.y = secondChild.y; } function createApe() { var ape = new Sprite(); ape.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(ape); return ape; } })(); ``` 在上面的代码中,我们创建了一个原始位图、一个红色滤镜效果位图、一个灰色滤镜效果位图。运行...

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

27. 滤镜-颜色滤镜 [ 82%]

...pe.y = secondChild.y; } function createApe() { var ape = new Sprite(); ape.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(ape); return ape; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import ColorFilter = Laya.ColorFilter; import Texture = Laya.Texture;...

来源: Laya_示例 发布时间: 20240929

28. Laya.Sprite loadImage 参数问题 [ 82%]

Laya.Sprite loadImage 参数问题 第一天学习laya,遇见个问题。api上对loadimage的描述是:   loadImage(url:String, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, complete:Handler = null) 官方文档也是这么用的:http://ldc.layabox.com/doc/?nav=zh-ts-1-3-...

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

29. Sprite-旋转缩放 [ 82%]

...232628"; createApe(); })(); function createApe() { ape = new Sprite(); ape.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.x = Laya.stage.width / 2; ape.y = Laya.stage.height / 2; Laya.timer.frameLoop(1, this, animate); } function animate(e) { ape.rotation +...

来源: Laya_示例 发布时间: 20240929

30. RopeJoint代码动态创建 无法设置otherbody等属性 [ 82%]

...r img:Sprite = new Sprite(); //加载显示图片,坐标位于100,50 img.loadImage("res/layabox.png"); img.x=(Laya.stage.width-256)/2; //添加到舞台 Laya.stage.addChild(img); var img2:Sprite = new Sprite(); //加载显示图片,坐标位于100,50 img2.loadImage("res/layabox.png"); img2.x=(La...

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