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

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

41. 原生js如何调用laya里的方法? [ 90%]

...不知道怎么访问与调用,找了好多的方法都没法使用: (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+...

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

42. 高级应用-基于物理渲染 [ 90%]

...n/scene/PBRScene/Demo.ls")); scene.once(Laya.Event.HIERARCHY_LOADED, this, function () { var camera = scene.getChildByName("Camera"); camera.addComponent(CameraMoveScript); });class PBRDemo { constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode...

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

43. js怎么主动调用AS定义的静态变量? [ 90%]

...017-03-21 17:41 //class common.dataModule.DataSingleton var DataSingleton=(function(){ function DataSingleton(){}; __class(DataSingleton,'common.dataModule.DataSingleton'); DataSingleton.dxMerchantID=20000020; DataSingleton.dxAccount=null DataSingleton.dxUid=null DataSingleton.avatar=NaN DataSinglet...

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

44. IDE-显示IDE创建的界面 [ 89%]

...ndler = Laya.Handler; var Event = Laya.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示 this.btn.on(Event.CLICK, this, onBtnClick); this.btn2.on(Event.CLICK, this, onBtn2Click); function...

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

45. IDE-显示IDE创建的界面 [ 89%]

...ndler = Laya.Handler; var Event = Laya.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示 this.btn.on(Event.CLICK, this, onBtnClick); this.btn2.on(Event.CLICK, this, onBtn2Click); function...

来源: Laya2.0_示例 发布时间: 20200319

46. PBRStandardMaterial材质详解(ActionScript-3D基础(AS3)-模型材质详解) [ 89%]

...el/Materials/Textures/Barrel_AlbedoTransparency.png', Handler.create(this, function(texture:Texture2D):void { mat.albedoTexture = texture; })); //法线贴图 Texture2D.load('res/threeDimen/scene/PBRMaterialScene/Assets/PBR Barrel/Materials/Textures/Barrel_Normal.png', Handler.create(this, function(...

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

47. 二进制图片(ActionScript-2D进阶篇(AS3)-游戏加载策略) [ 89%]

...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 = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }...

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

48. LayaAir项目发布Flash版本 报错 [ 89%]

...owser.as:224] _window = RunDriver.getWindow(); public static var getWindow:Function = function():* { return __JS__('window'); } package { /** * @private */ public function __JS__(value:*):* { return null; } } 这是不再支持转flash版本的意思吗 2017-04-10 添加评论 免费帖 --> 分享 ...

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

49. 位图字体的制作与使用(ActionScript-LayaAir基础篇(AS3)-文本) [ 89%]

...r mFontName:String = "diyFont"; private var mBitmapFont:BitmapFont; public function TestBitmapFont() { Laya.init(550, 400); mBitmapFont = new BitmapFont(); //这里不需要扩展名,外部保证fnt与png文件同名 mBitmapFont.loadFont("layabmfont.fnt",new Handler(this,onLoaded)); } private func...

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

50. 材质-BlinnPhong-反射贴图 [ 89%]

..., -0.7071067); teapot2.meshFilter.sharedMesh.once(Laya.Event.LOADED, this, function () { var material = teapot2.meshRender.material; //反射贴图 material.reflectTexture = textureCube; }); Laya.timer.frameLoop(1, this, function () { teapot1.transform.rotate(this.rotation, false); teapot2.transform...

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