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

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

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

...x; import laya.net.Loader; import laya.resource.Texture; import laya.utils.Handler; public class LayaAirDemo { public 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.ge...

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

222. 微信小游戏加载 BitmapFont 问题 [ 58%]

...加载这个文件的时候 Laya.loader.load([{ url: "button_font.fnt" }], Handler.create(null, onLoaded)); 图片里的 type="font",最终执行的 tempData=data.data; tempData 直接就是button_font.fnt里面内容的字符串类型MiniLoader.onReadNativeCallBack=function(encoding,url,type,cach...

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

223. Clip属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 58%]

...ya.ui.Button; import laya.ui.Clip; import laya.ui.Image; import laya.utils.Handler; import laya.webgl.WebGL; public class UI_Clip { /***控制器按钮资源***/ private var buttonSkin:String = "../../../../res/ui/button-7.png"; /***切片资源***/ private var clipSkin:String = "../../../../res/ui/...

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

224. 分享:LayaAir下如何获取图集下的小图资源? [ 58%]

...e; import laya.net.Loader; import laya.resource.Texture; import laya.utils.Handler; public class Main { public function Main() { //初始化引擎 Laya.init(600, 800); //加载引擎需要的资源 Laya.loader.load([{url:"res/atlas/atlas_res.json",type:Loader.ATLAS}], Handler.create(this, onLoaded))...

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

225. 照相机-正交相机 [ 58%]

...ent; import laya.resource.Texture; import laya.ui.Image; import laya.utils.Handler; import laya.utils.Stat; import common.CameraMoveScript; public class OrthographicCamera { /** * (pos.x pos.y) 屏幕位置 * pos.z 深度取值范围(-1,1); * */ private var pos:Vector3 = new Vector3(310, 500, 0); pr...

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

226. Socket连接不上(已解决) [ 58%]

...自: 服务器需要按照http协议进行解码,WebSocketServerProtocolHandler处理数据 我这边用的netty4.x 下面是管道处理流程 //HttpServerCodec: 针对http协议进行编解码 pipeline.addLast("httpServerCodec", new HttpServerCodec()); //ChunkedWriteHandler分块写处理,文...

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

227. 高级应用-实时阴影 [ 57%]

...ane.lh", "../../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh" ], Laya.Handler.create(this, onComplete)); var _quaternion = new Laya.Quaternion(); Laya.timer.frameLoop(1, null, function () { Laya.Quaternion.createFromYawPitchRoll(0.025, 0, 0, _quaternion); var _direction = directionLight.directi...

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

228. dialog的lock属性没出现 [ 57%]

....ui.Button; import laya.ui.Dialog; import laya.ui.Image; import laya.utils.Handler; import laya.webgl.WebGL; public class DialogCenterClose { private const DIALOG_WIDTH:int = 220; private const DIALOG_HEIGHT:int = 275; private const CLOSE_BTN_WIDTH:int = 43; private const CLOSE_BTN_PADDING:int = 5; ...

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

229. Sprite3D-Sprite3D加载 [ 57%]

... import laya.events.Event; import laya.resource.Texture; import laya.utils.Handler; import laya.utils.Stat; import common.CameraMoveScript; public class Sprite3DLoad { public function Sprite3DLoad() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Stage.SCALE_FULL; Laya.stage.screenMode = Stage.SCR...

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

230. 关于as版的Animation.createFrames()不能工作? [ 57%]

...; import laya.display.Sprite; import laya.display.Stage; import laya.utils.Handler; import laya.net.Loader; import laya.events.Event; public class LayaUISample { protected var text:Text; protected var aaa:AAA; public function LayaUISample() { Laya.init(1540, 990); Laya.Stat.show(); Laya.loader.load(...

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