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

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

461. 场景天空(ActionScript-3D基础(AS3)-LayaAir3D之场景渲染配置) [ 71%]

...ial.load("res/threeDimen/skyBox/skyBox1/SkyBox.lmat", Handler.create(null, function(mat:BaseMaterial):void { var skyRenderer:SkyRenderer = camera.skyRenderer; skyRenderer.mesh = SkyBox.instance; skyRenderer.material = mat; })); ``` 效果如下(图3): ![](img/3.png)(图3) **使用Unity的...

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

462. 微信小游戏 code.js 报错 Cannot read property 'apply' of undefined [ 71%]

...or Cannot read property 'apply' of undefined;at socketTask.onopen callback function TypeError: Cannot read property 'apply' of undefined     at Function.eof (http://127.0.0.1:25423/game/code.js:53674:69)     at Type.setup (http://127.0.0.1:25423/game/code.js:59330:33)     at Type.encode_setup ...

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

463. 鼠标交互-键盘交互 [ 71%]

..._Keyboard { private var logger:Text; private var keyDownList:Array; public function Interaction_Keyboard() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.sta...

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

464. 骨骼动画-多纹理 [ 71%]

...private var mArmature:Skeleton; private var mCurrSkinIndex:int = 0; public function Skeleton_MultiTexture() { WebGL.enable(); Laya.init(Browser.width, Browser.height); Laya.stage.bgColor = "#ffffff"; Stat.show(); startFun(); } public function startFun():void { mAniPath = "../../res/spine/spineRes1/d...

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

465. 位图字体的制作与使用(JavaScript-LayaAir基础篇(JS)-文本) [ 71%]

...名 mBitmapFont.loadFont("res/test.fnt",new Laya.Handler(this,onLoaded)); function onLoaded(){ init(); } function init(){ //如果位图字体中,没放空格,最好设置一个空格宽度 mBitmapFont.setSpaceWidth(10); Laya.Text.registerBitmapFont(mFontName,mBitmapFont); var txt = new Laya.Tex...

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

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

...ya.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)); } private function onLoaded():void...

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

467. 3D中如何限制角色的行走区域? [ 71%]

...ddComponent (/Users/admin/layaA4/layaA4/bin/js/bundle.js:39363:9)     at Function.Utils3D._createNodeByJson (/Users/admin/layaA4/layaA4/bin/js/bundle.js:31020:26)     at Function.Utils3D._createNodeByJson (/Users/admin/layaA4/layaA4/bin/js/bundle.js:31003:24)     at Function.Utils3D._createNod...

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

468. 怎么在模拟点击事件 [ 71%]

...age/*" id="file" type="file" /> <script> function button1(){ document.getElementById('file').click(); } 这是一个上传图片的input,但是我在layabox的某个function中写 Browser. document.getElementById('file').click(); 或者 __JS__(' document.getElemen...

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

469. 鼠标交互-滑动 [ 71%]

...ipt、TypeScript三种开发语言、LayaAirIDE让项目开发更高效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Event = Laya.Event; var Browser = Laya.Browser; var Tween = Laya.Tween; var WebGL = Laya.WebGL; //swipe滚动范围 var TrackLength = 200; //触发swipe的拖...

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

470. 使用2D地图3D人物混合进行游戏开发(ActionScript-3D基础(AS3)-LayaAir3D之高级应用) [ 71%]

...ypescript //监听一次点击事件 Laya.stage.once(Event.MOUSE_DOWN,this,function ():void { scene.addChild(layaMonkey); _layaMonkey = layaMonkey; //设置缩放 var tmpLocalScale:Vector3 = layaMonkey.transform.localScale; tmpLocalScale.setValue(0.3, 0.3, 0.3); layaMonkey.transform.localScale = tmp...

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