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

大约有 102 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0030 秒)

61. 设置滤镜(ActionScript-LayaAir基础篇(AS3)-位图) [ 68%]

...a.webgl.WebGL; public class Main { private const ApePath:String = "res/img/monkey1.png"; private var apeTexture:Texture; public function Main() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage....

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

62. 请问一下,怎么将下面这段AS3代码翻译成LayaAir的API [ 68%]

...ic function LayaAirDemo() { Laya.init(700,600); Laya.loader.load('res/apes/monkey2.png',Handler.create(this,onLoaded)) } private function onLoaded():void { var texture:Texture=Loader.getRes('res/apes/monkey2.png'); var sp:Sprite=new Sprite(); var matrix:Matrix=new Matrix(); matrix.rotate(Math.PI/4);...

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

63. 设置遮罩(ActionScript-LayaAir基础篇(AS3)-位图) [ 68%]

...台背景色 Laya.stage.bgColor = "#ffffff" //资源路径 Res = "res/img/monkey1.png"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); } private function graphicsImg():void { img = ne...

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

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

...台背景色 Laya.stage.bgColor = "#ffffff" //资源路径 Res = "res/img/monkey1.png"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); })(); function graphicsImg() { img = new Sprite(...

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

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

...景色 Laya.stage.bgColor = "#ffffff"; //资源路径 this.Res = "res/img/monkey1.png"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.Res,Laya.Handler.create(this,this.graphicsImg)); } private graphicsImg():void{ thi...

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

66. Sprite3D添加组件或脚本(JavaScript-3D基础(JS)-LayaAir3D之精灵) [ 67%]

.../预加载所有资源 var resource:Array = ["res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh"]; Laya.loader.create(resource, Laya.Handler.create(this, this.onComplete)); } onComplete(){ //记载场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //加载相机 var camera = scene.addChild(...

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

67. Sprite3D添加组件或脚本(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 67%]

.../预加载所有资源 var resource:Array = ["res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh"]; Laya.loader.create(resource, Laya.Handler.create(this, this.onComplete)); } onComplete(){ //记载场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //加载相机 var camera = scene.addChild(...

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

68. 动画挂点(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 66%]

... > 新版本骨骼挂点 ```typescript Laya.Scene3D.load("LayaScene_SceneMonkey/Conventional/SceneMonkey.ls",Laya.Handler.create(this,function(res){ Laya.stage.addChild(res); //用于挂点的精灵 var box = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(1,1,1)); var material = new Laya.BlinnPh...

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

69. 动画挂点(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 66%]

... > 新版本骨骼挂点 ```typescript Laya.Scene3D.load("LayaScene_SceneMonkey/Conventional/SceneMonkey.ls",Laya.Handler.create(this,function(res){ Laya.stage.addChild(res); //用于挂点的精灵 var box = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(1,1,1)); var material = new Laya.BlinnPh...

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

70. 鼠标交互-Hold [ 66%]

...aya.WebGL; const HOLD_TRIGGER_TIME = 1000; const apePath = "../../res/apes/monkey2.png"; //触发hold事件时间为1秒 var ape, isApeHold; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; La...

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