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

大约有 1,604 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0062 秒)

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

...dth >> 1, Laya.stage.height -bg.height >> 1); //加载到舞台 Laya.stage.addChild(bg); } /***创建计数器切片***/ private function createCounter():void { //实例化计数器切片 counter = new Clip(clipSkin, 10, 1); //自动播放 counter.autoPlay = true; //播放间隔时间1秒 counter.in...

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

232. 如何完全删除精灵 并回收内存 [ 86%]

...++){ let t = new Laya.Text() t.text = 'test' t.color = '#ffffff' container.addChild(t) } Laya.stage.addChild(container)新建一个精灵 向其中插入1000个文字 内存快照变为10.5var WebGL = laya.webgl.WebGL; Laya.init(600, 400, WebGL); let container = new Laya.Box() for(let i =0;i<1000...

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

233. UI-Tab [ 86%]

...electedIndex); tab.selectHandler = new Handler(this, onSelect); Laya.stage.addChild(tab); return tab; } function onSelect(index) { console.log("当前选择的标签页索引为 " + index); } })();module laya { import Stage = Laya.Stage; import Tab = Laya.Tab; import Handler = Laya.Handler; import W...

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

234. 文本-Overflow [ 86%]

..."; txt.size(300, 50); txt.fontSize = 20; txt.color = "#ffffff"; Laya.stage.addChild(txt); return txt; } })()module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_Overflow { constructor() { // 不支持WebGL时自...

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

235. 3D阴影无法渲染出来 [ 86%]

3D阴影无法渲染出来 //添加方向光 var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya.Vector3(0.6, 0.6, 0.6); directionLight.direction = new Laya.Vector3(1, -1, 0); directionLight.shadow = true; directionLight.shadowDistance = 3; directionLight...

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

236. 网络和格式-POST [ 86%]

...e.width, Laya.stage.height); logger.text = "等待响应...\n"; Laya.stage.addChild(logger); } onHttpRequestError(e) { console.log(e); } onHttpRequestProgress(e) { console.log(e); } onHttpRequestComplete(e) { logger.text += "收到数据:" + hr.data; } } new Network_POST();module laya { import Sta...

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

237. 网络和格式-GET [ 86%]

...e.width, Laya.stage.height); logger.text = "等待响应...\n"; Laya.stage.addChild(logger); } onHttpRequestError(e) { console.log(e); } onHttpRequestProgress(e) { console.log(e); } onHttpRequestComplete(e) { logger.text += "收到数据:" + hr.data; } } new Network_GET();module laya { import Stag...

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

238. Sprite-切换纹理 [ 86%]

...= Laya.loader.getRes(monkey2Str); this.ape = new Laya.Sprite(); Laya.stage.addChild(this.ape); this.ape.pivot(55, 72); this.ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.switchTexture(); this.ape.on(Laya.Event.CLICK, this, this.switchTexture); } switchTexture() { let monkey = (this.flag...

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

239. 请问老师为什么我按照官网的实例播放音频没反应呢? [ 86%]

...; soundButton.y = (Laya.stage.height - soundButton.height) / 2; Laya.stage.addChild(soundButton); //创建一个Sprite充当音乐播放按钮 var musicButton = createButton("播放音乐"); musicButton.x = soundButton.x + gap + soundButton.width; musicButton.y = soundButton.y; Laya.stage.addChild(m...

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

240. ios微信clone特效会导致特效的mesh无法显示 [ 86%]

...常。 如图:   通过一个精简的例子,定位到是clone后再addChild的特效mesh就无法显示,如果没有clone直接addChild则可以正常显示。 工程已上传,发布后上传微信可以复现。 如图:   代码很简单,如果用注释部分的代码,ios和android...

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