大约有 520 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0039 秒)
...贴图 Texture2D.load("res/threeDimen/texture/earth.png", Handler.create(this, function(texture:Texture2D):void { //设置材质纹理 material.albedoTexture = texture; })); //material.albedoTexture earth2.meshRenderer.material = material; ``` (图4) ##### 法线贴图 **Normal maps(...
来源: Laya2.0_文档 发布时间: 20210714
...//材质加载 BaseMaterial.load("res/skyBox2/skyBox2.lmat",Handler.create(this,function(mat:BaseMaterial):void { var skyRenderer:SkyRenderer = camera.skyRenderer; //创建天空盒的mesh skyRenderer.mesh = SkyBox.instance; //设置天空盒材质 skyRenderer.material = mat; })); ``` ...
来源: Laya2.0_文档 发布时间: 20210715
...t(0, 0); //定义一个命名空间的属性为app; Browser.window.app = this; } public static function getGameName():String { return "myGame"; } public function getVersion():String { return "1.2.0"; } } } ``` 编译运行,打开浏览器控制台,先后输入`app`、`app.name`、`app.getV...
来源: Laya2.0_文档 发布时间: 20210715
...it(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); this.stage.scaleMode = StageScaleMode.NO_SCALE; this.stage.align = StageAlign.TOP_LEFT; IFlash.setSize(1000, 600); //2D项目中设置场景尺寸 IFlash.setOrientationEx(1); //是否为横屏模式 IFlash.setBgcolor("#000000...
来源: Laya_社区 发布时间: 20151103
... Laya.init(550,400); Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { var json:JSON=Laya.loader.getRes("res/atlas/comp.json"); }JSON的解析和AS3的是一样的 2016-10-27 2 0 分享 微博 QZONE 微信 bobofuns - 我...
来源: Laya_社区 发布时间: 20161027
...script Scene3D.load('LayaScene_scene/Conventional/scene.ls',Handler.create(this,function(scene:Scene3D):void{ Laya.stage.addChild(scene); })); ``` (图2)
来源: Laya2.0_文档 发布时间: 20210715
......... //切换图层按钮事件监听 changeActionButton.on(Event.CLICK, this, function():void { camera.removeAllLayers(); layerIndex ++; camera.addLayer(layerIndex%4 +1); camera.addLayer(5); }); ``` (图1)
来源: Laya2.0_文档 发布时间: 20210715
...博 QZONE 微信 flyByself 赞同来自: 在用AS TS写法 也很繁琐 this. this. this. 个人觉得还是as简单 2018-02-21 0 0 分享 微博 QZONE 微信 157*****121 赞同来自: 多人协同项目,必须的as, ts ,js 用起来都非常蛋疼!对于as 淘汰的说话。。。laya只...
来源: Laya_社区 发布时间: 20180217
... ani.play(); ani.pos(400, 200); sp.addChild(ani); Laya.stage.on("keydown", this, onKeyDown); Stat.show(); } private function onKeyDown(e:Event):void { if (e.keyCode === Keyboard.H) { sp.visible = false; //隐藏界面,清理资源 Laya.loader.clearTextureRes("res/bg.jpg"); Laya.loader.clearTexture...
来源: Laya2.0_文档 发布时间: 20210714
... ani.play(); ani.pos(400, 200); sp.addChild(ani); Laya.stage.on("keydown", this, onKeyDown); Stat.show(); } private function onKeyDown(e:Event):void { if (e.keyCode === Keyboard.H) { sp.visible = false; //隐藏界面,清理资源 Laya.loader.clearTextureRes("res/bg.jpg"); Laya.loader.clearTexture...
来源: Laya2.0_文档 发布时间: 20200929