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

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

1. 显示与切换图片(TypeScript-LayaAir基础篇(TS)-位图) [ 100%]

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

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

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

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

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

3. 显示与切换图片(ActionScript-LayaAir基础篇(AS3)-位图) [ 95%]

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

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

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

...多种做法,而其间差异很有必要知道。 1. 使用getBounds/ getGraphicBounds。 ```javascript var sp:Sprite = new Sprite(); sp.graphics.drawRect(0, 0, 100, 100, "#FF0000"); var bounds:Rectangle  = sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` ​ getBounds可以满足多...

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

5. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 89%]

...多种做法,而其间差异很有必要知道。 1. 使用getBounds/ getGraphicBounds。 ```typescript var sp=new Laya.Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但...

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

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

...多种做法,而其间差异很有必要知道。 1. 使用getBounds/ getGraphicBounds。 ```javascript var sp=new Laya.Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但...

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

7. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 55%]

...this,this.drawHandler); } private function drawHandler():void { Laya.stage.graphics.clear(); var dataArray:Uint8Array = new Uint8Array(analyser.frequencyBinCount); analyser.getByteFrequencyData(dataArray); var step:int = Math.round(dataArray.length / 60); for (var i:int = 0; i < 40; i++) { var energ...

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