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

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

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

...法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); })(); function graphicsImg() { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台 Laya.stage.addChild(img); } })(); ``` 运行...

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

2. 设置遮罩(TypeScript-LayaAir基础篇(TS)-位图) [ 99%]

...并添加到舞台 Laya.loader.load(this.Res,Laya.Handler.create(this,this.graphicsImg)); } private graphicsImg():void{ this.img = new Laya.Sprite(); //获取图片资源,绘制到画布 this.img.graphics.drawTexture(Laya.loader.getRes(this.Res),150,50); //添加到舞台 Laya.stage.addChild(this....

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

3. runTime使用(TypeScript-IDE篇(TS)-组件化开发相关) [ 75%]

...到这个页面所在的位置,在此设置设置一个背景色 bgPage.graphics.drawRect(0, 0, 300, 300, "#ffcccc"); //添加到stage Laya.stage.addChild(bgPage); //实例化MonkeyPageUI页面 var monkeyPage: ui.MonkeyPageUI = new ui.MonkeyPageUI(); //为了能够清楚的看到这个页面所在...

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

4. runTime使用(ActionScript-IDE篇(AS3)-组件化开发相关) [ 73%]

...到这个页面所在的位置,在此设置设置一个背景色 bgPage.graphics.drawRect(0,0,300,300,"#ffcccc"); //添加到stage Laya.stage.addChild(bgPage); //实例化MonkeyPageUI页面 var monkeyPage:MonkeyPageUI = new MonkeyPageUI(); //为了能够清楚的看到这个页面所在的位置...

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

5. 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

6. LayaAir引擎工具会员专属功能介绍(TypeScript-简介篇(TS)-LayaAir引擎简介) [ 52%]

...re = Laya.loader.getRes("comp/comp.png"); var sp:Sprite = new Sprite(); sp.graphics.drawTexture(img); Laya.stage.addChild(sp); })); Laya.loader.load("res/atlas/test.atlas", Handler.create(this, function():void { var img:Texture = Laya.loader.getRes("test/test.png"); var sp:Sprite = new Sprite(); sp....

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