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

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

51. 微信小游戏截图问题 [ 76%]

...t, destWidth: canvas.width, destHeight: canvas.height }) this.ctx.graphics.loadImage(wxhtmlC, 0, 0,this.ctx.width,this.ctx.height); 然后用drawTextture,很多问题都是有这个,可以带到下面那些东西怎么转成图片呢? var htmlC = Laya.stage.drawToTexture(Laya.stage.width,Laya....

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

52. laya.ani.GraphicsAni_API3.0 [ 76%]

...e drawTextures drawTriangles fillBorderText fillText fillTexture getBounds loadImage removeCmd restore rotate save scale strokeText transform translate create recycle Constructors constructor new GraphicsAni(): GraphicsAni Inherited from Graphics.constructor Defined in laya/display/Graphics.ts:54 Re...

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

53. 输入设备-指南针 [ 76%]

...te; compassImg = new Sprite(); Laya.stage.addChild(compassImg); compassImg.loadImage(compassImgPath); compassImg.pivot(compassImg.width / 2, compassImg.height / 2); compassImg.pos(Laya.stage.width / 2, 400); } createDirectionIndicator() { const Sprite = Laya.Sprite; directionIndicator = new Sprite()...

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

54. 滤镜-颜色滤镜 [ 76%]

...ild.y; } private createApe(): Sprite { var ape: Sprite = new Sprite(); ape.loadImage("res/apes/monkey2.png"); Laya.stage.addChild(ape); return ape; } } } new laya.Filters_Color();package { import laya.display.Sprite; import laya.display.Stage; import laya.filters.ColorFilter; import laya.resource.Te...

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

55. 设置滤镜(TypeScript-LayaAir基础篇(TS)-位图) [ 76%]

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

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

56. 图片不能按轴心旋转 [ 75%]

...xedauto' 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

57. CPU优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 74%]

...e是不可取的。如果设置了size,autoSize将不起效。 ​ 使用loadImage后获取宽高: ```javascript var sp:Sprite = new Sprite(); sp.loadImage("res/apes/monkey2.png", 0000, Handler.create(this, function() {     console.log(sp.width, sp.height); })); Laya.stage.a...

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

58. 显示与切换图片(JavaScript-LayaAir基础篇(JS)-位图) [ 74%]

...的显示是游戏开发基础,本篇从API到示例分别介绍Sprite.loadImage与Graphics.drawTexture两种显示图片的方法。 ## 1、用loadImage方法显示与切换图片 ### 1.1 loadImage API概述 在API文档中搜索laya.display.Sprite,可以找到loadImage()方法,如图1所示...

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

59. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 74%]

...oSize是不可取的。如果设置了size,autoSize将不起效。 使用loadImage后获取宽高: ```javascript var sp=new Laya.Sprite(); sp.loadImage("res/apes/monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); ``` loadImag...

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

60. laya.display.Graphics_API3.0 [ 74%]

...e drawTextures drawTriangles fillBorderText fillText fillTexture getBounds loadImage removeCmd restore rotate save scale strokeText transform translate Constructors constructor new Graphics(): Graphics Defined in laya/display/Graphics.ts:54 Returns Graphics Accessors cmds get cmds(): any[] set cmds(...

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