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

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

1. Panel使用文档(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 100%]

... Laya.init(800,600); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas",Handler.create(this,onLoaded)); } private function onLoaded():void { //实例化Panel组件 var panel:Panel = new Panel(); //给panel添加背景色 panel.graphics.drawRect(0,0,100,100,"#ffcccc"); //给panel设置...

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

2. Panel使用文档(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 99%]

... Laya.init(800, 600); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, this.onLoaded)); } private onLoaded(): void { //实例化Panel组件 var panel: Laya.Panel = new Laya.Panel(); //给panel添加背景色 panel.graphics.drawRect(0, 0, 100, 100, "#ffcccc")...

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

3. Panel使用文档(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 99%]

... Laya.init(800, 600); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { //实例化Panel组件 var panel = new Laya.Panel(); //给panel添加背景色 panel.graphics.drawRect(0, 0, 100, 100, "#ffcccc"); //给panel设置宽高...

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

4. ViewStack属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 85%]

...布后生成在layaUI.max.all.ts文件中,我们直接使用它。 创建ComponentDemo.ts并设置默认程序,编写代码如下: ```typescript // 程序入口 class ComponentDemo{ /**包含tab与viewStack组件的测试页面**/ private comp:ui.ComponentDemoUI; constructor() { Laya.init(1334...

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

5. ViewStack属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 84%]

...布后生成在layaUI.max.all.js文件中,我们直接使用它。 创建ComponentDemo.js并设置默认程序,编写代码如下: ```javascript Laya.init(1334, 750,Laya.WebGL); Laya.stage.scaleMode = "full"; Laya.stage.bgColor = "#ffffff"; //加载图集成功后,执行onLoaded回调方法 ...

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

6. ViewStack属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 83%]

...存页面,按F12发布页面,发布后在项目ui文件夹中生成了ComponentDemoUI.as类,我们直接使用它。 创建ComponentDemo.as并设置默认程序,编写代码如下: ```java package { import laya.utils.Handler; import laya.webgl.WebGL; //导入UI发布生成的类 import ui....

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

7. 动效模板(JavaScript-LayaAir基础篇(JS)-动画基础) [ 77%]

...加载成功后将UI界面添加到舞台上 Laya.loader.load("./res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //实例化导出的UI类 var efc = new ui.TestPUI(); //添加到舞台 Laya.stage.addChild(efc); } ``` 运行后,按钮被按下时,动画效果如动...

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

8. 动效模板(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 76%]

...景编辑器中,如图7所示,(*注意:本例中的button组件在comp目录下*)。 ![图7](img/7.png) (图7) **步骤二**:将制作的缩放动效模板(scale.efc)拖拽到Button组件下,如动画8所示。 ![图8](img/8.gif)(图8) **步骤三**:为实现居中缩放效...

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

9. 二进制图片(JavaScript-2D进阶篇(JS)-游戏加载策略) [ 69%]

... ```JavaScript var xhr = new XMLHttpRequest(); xhr.open("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = functi...

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

10. 二进制图片(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 69%]

... ```javascript var xhr = new XMLHttpRequest(); xhr.open("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = functi...

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