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

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

261. 为什么会出现报错 ani not found:ufo1_down [ 95%]

... var Game = (function(){ (function Game(){ // 子弹发射偏移位置表 this.bulletPos = [[0],[-15,15],[-30,0,30],[-45,-15,15,45]]; // 关卡等级 this.level = 0; // 升级等级所需要的成绩数量 this.levelUpScore = 0; // 积分成绩 this.score = 0; // 子弹级别 this.bulletLevel = 0; ...

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

262. viewportPointToRay产生的射线始终有偏差,是为什么? [ 95%]

...r2(Laya.stage.mouseX, Laya.stage.mouseY); camera.viewportPointToRay(point, this._ray);然后发现ray构造出来的位置始终不对,我沿着ray的方向放了一组3D物体,和从屏幕点击下去的位置始终有一定偏差~ 请教一下有哪些可能可以排查这个问题? 2018-02-...

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

263. 如何将原生iframe嵌入某个节点,像addChild那样嵌入 [ 95%]

...点,像addChild那样嵌入 HallView.prototype.OnClickOneGou=function(){ this.frame=Laya.Browser.document.createElement("iframe"); this.frame.width=this.con.width; this.frame.height=850; this.frame.style.margin="0"; this.frame.style.padding="0"; this.frame.style.left="0"; this.frame.style.top="50p...

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

264. 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

265. 如何使用3D场景2D人物进行混合开发(JavaScript-3D基础(JS)-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_文档 发布时间: 20210714

266. 如何使用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

267. 新人求教!!! [ 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

268. 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_示例 发布时间: 20250223

269. 用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

270. 鼠标交互-拖动 [ 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_示例 发布时间: 20250223