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

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

111. 高级应用-渲染纹理 [ 55%]

...ya.loader.load(["../../res/threeDimen/ui/button.png"], Laya.Handler.create(null, function () { var changeActionButton = Laya.stage.addChild(new Laya.Button("../../res/threeDimen/ui/button.png", "渲染目标")); changeActionButton.size(160, 40); changeActionButton.labelBold = true; changeActionButto...

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

112. Laya.loader.create 进度回调函数执行两次!!! 上次发问题一直没有回复 [ 55%]

...er.create(this,this.on3DComplete),Laya.Handler.create(this,this.onProgress,null,false)); Manager.prototype.onProgress = function(value) { console.log("value=="+Math.floor(value*100)+"%"); }   输出结果: 0.19186599730944645 0.5251993306427798 1 0.5002049180327869 0.5626793032786885 0.6251536885...

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

113. JS进度条加载问题 [ 55%]

...为true,根据加载文件个数获取加载进度 Laya.loader.load(arr,null,Laya.Handler.create(this,onProLoaded),null,true,true); } function showProgress() { progressBar=new Laya.Sprite(); progressBar.loadImage("comp/BG1.jpg",50,300); progressBar.width=300; progressBar.sizeGrid="5,5,5,5"; progre...

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

114. UI-RefreshList [ 55%]

...rea = Laya.TextArea; class UI_RefreshList { constructor() { this.baseBox = null; this.refreshLoading = null; this.loadingAni = null; this.loadingLabel = null; this.refreshList = null; /** 消息生成的当前最大id值 */ this.msgIdNow=1; /** 滚动条效果是否停止 */ this.scrollBarIsStop=fal...

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

115. 区块地图-滚动地图 [ 55%]

... /** * 地图加载完成的回调 */ private function completeHandler(e:*=null):void { Laya.stage.on(Event.RESIZE, this, this.resize); resize(); } //鼠标按下拖动地图 private function mouseDown(e:*=null):void { mLastMouseX = Laya.stage.mouseX; mLastMouseY = Laya.stage.mouseY; Laya.stage.on(E...

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

116. HTMLDivElement如何设置文本区域内可以上下拖动的效果 [ 54%]

...="#eeffcc"; var sp:Sprite=new Sprite(); sp.graphics.drawRect(50,50,300,300,null,"#0000FF",2); Laya.stage.addChild(sp); html=new HTMLDivElement(); html.innerHTML="<span>哈哈哈哈哈</span>"; Laya.stage.addChild(html); html.on(Event.MOUSE_DOWN,this,onHtmlDown); } private function onHtml...

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

117. LayaAir开发笔记(1)五十音图连连看 [ 54%]

...]); card[index].name = index; card[index].graphics.drawRect(0, 0, 80, 120, null, "#000000", 2); card[index].graphics.loadImage("linkgame_card.jpg"); card[index].size(80, 120); card[index].pos(10 + 100 * i, 130 + 140 * j); card[index].on(Laya.Event.CLICK, this, function(e) { if (gameStatue == true) {...

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

118. 陀螺仪接口无效呢?Gyroscope.instance.on(Event.CHANGE, this, onOrientationChange); 什么原因呢 [ 54%]

...Change); function onOrientationChange(absolute, info) { if (info.alpha === null) { addLog("当前设备不支持陀螺仪。"); return; } else if (firstTime && !absolute && !Browser.onIOS) { firstTime = false; addLog("在当前设备中无法获取地球坐标系,使用设备坐标...

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

119. 2D性能优化 · LayaAir3.0文档 · LAYABOX [ 54%]

...所有引用。Sprite提供的destory()方法会帮助设置内部引用为null。 例如,以下代码确保对象能够被作为垃圾回收: //创建一个Sprite实例 var sp:Laya.Sprite = new Laya.Sprite(); //将sp内部引用设置为null sp.destroy(); 当对象设置为null,不会立即...

来源: Laya3.0_文档 发布时间: 20231008

120. 2D物理-桥 [ 54%]

... from "../Main"; export class Physics_Physics_Bridge { Main: typeof Main = null; private ecount = 30; private label: Label; constructor(maincls: typeof Main) { this.Main = maincls; Laya.Config.isAntialias = true; Laya.init(1200, 700, WebGL); Stat.show(); Physics.enable(); PhysicsDebugDraw.enable(); ...

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