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

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

261. 如何使用3D场景2D人物进行混合开发(TypeScript-3D基础(TS)-LayaAir3D之高级应用) [ 95%]

...ory=3d&group=Advance&name=Secne3DPlayer2D)) ```typescript //变换位置 this._position.x = Math.sin(this.scaleDelta += 0.01) * 2; this._position.z = Math.cos(this.scaleDelta += 0.01) * 2; //修改球的位置 this.sphere.transform.position = this._position; //计算位置 this._camera.viewport.pr...

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

262. websocket连接, ws 时没问题,改成 wss 没反应 [ 95%]

...该怎么改?或者哪里有连接 wss 的代码片段?谢谢!     this.byte = new Laya.Byte();     this.byte.endian = Laya.Byte.LITTLE_ENDIAN;  //这里我们采用小端     this.socket = new Laya.Socket();     this.socket.endian = Laya.Byte.LITTLE_ENDIAN;  //这里我们采用小...

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

263. 新人求教!!! [ 95%]

...通过回调方法绘制图片并添加到舞台      Laya.loader.load([this.monkey1,this.monkey2],Laya.Handler.create(this,this.graphicsImg)); } private graphicsImg():void{    //创建一个实例    this.img = new Laya.Sprite();    //添加到舞台    Laya.stage.addChild(this.img);   ...

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

264. Sprite-新手引导 [ 95%]

...= "bitmap"; Laya.stage.addChild(guideContainer); gameContainer.on("click", this, nextStep); //绘制遮罩区,含透明度,可见游戏背景 var maskArea = new Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContainer.addChi...

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

265. 用LayaAir引擎解析Tiled Map地图(TypeScript-2D进阶篇(TS)-扩展模块) [ 95%]

...Laya.Browser.width,Laya.Browser.height,Laya.WebGL); //创建TiledMap实例 this.tMap = new Laya.TiledMap(); //创建Rectangle实例,视口区域 var viewRect:Laya.Rectangle = new Laya.Rectangle(); //创建TiledMap地图 this.tMap.createMap("res/TiledMap/orthogonal.json",viewRect); } } new GameMain...

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

266. 鼠标交互-拖动 [ 95%]

...; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(this, setup)); })(); function setup() { createApe(); showDragRegion(); } function createApe() { ape = new Sprite(); ape.loadImage(ApePath); Laya.stage.addChild(ape); var texture = Laya.loader.getRes(ApePath); ape.pivot(textur...

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

267. 如何使用3D场景2D人物进行混合开发(ActionScript-3D基础(AS3)-LayaAir3D之高级应用) [ 95%]

...ory=3d&group=Advance&name=Secne3DPlayer2D)) ```typescript //变换位置 this._position.x = Math.sin(this.scaleDelta += 0.01) * 2; this._position.z = Math.cos(this.scaleDelta += 0.01) * 2; //修改球的位置 this.sphere.transform.position = this._position; //计算位置 this._camera.viewport.pr...

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

268. 混合模式-Lighter [ 95%]

...ePhoenixes(); // 动态背景渲染 evalBgColor(); Laya.timer.frameLoop(1, this, renderBg); } function createPhoenixes() { var scaleFactor = Math.min( Laya.stage.width / (phoenixWidth * 2), Laya.stage.height / phoenixHeight); // 加了混合模式的凤凰 var blendedPhoenix = createAnimation(); ble...

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

269. UI-Button [ 95%]

... COLUMNS - 1) - BUTTON_HEIGHT) / 2; Laya.loader.load(skins, Handler.create(this, this.onUIAssetsLoaded)); } onUIAssetsLoaded() { for (let i = 0, len = skins.length; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya....

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

270. tab 是否可以做到左右滑动切换view呢? [ 95%]

...现。 2016-08-23 0 0 分享 微博 QZONE 微信 asdf131 赞同来自: { this.on(laya.events.Event.MOUSE_DOWN ,this, this.onMouseDown);         this.on(laya.events.Event.MOUSE_UP ,this, this.onMouseUp);              }     private onMouseDownX : number;     private onMouseDownY :...

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