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

大约有 6,579 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0115 秒)

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

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

522. Sprite-根据数据绘制路径 [ 83%]

...gColor = "#232628"; this.drawPentagram(); } drawPentagram() { let canvas = new Laya.Sprite(); Laya.stage.addChild(canvas); let path = []; path.push(0, -130); path.push(33, -33); path.push(137, -30); path.push(55, 32); path.push(85, 130); path.push(0, 73); path.push(-85, 130); path.push(-55, 32); pat...

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

523. laya官方技术文档blinnphong反射贴图不显示 [ 83%]

...nphong反射贴图不显示 //创建盒子模型 var box:Laya.MeshSprite3D=new Laya.MeshSprite3D(new Laya.BoxMesh()); scene.addChild(box); //创建BlinnPhong材质 var mat:Laya.BlinnPhongMaterial=new Laya.BlinnPhongMaterial(); //增加反射贴图(与StandardMaterial一致) mat.reflectTexture = ...

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

524. 图片不能按轴心旋转 [ 83%]

....stage.scaleMode = 'fixedauto' Laya.stage.screenMode = 'vertical' let bg = new Laya.Sprite(); bg.loadImage("../res/image/interface/intro_bg.png",375,667,1500,1500); bg.pivot(750,750) bg.alpha = 1 bg.rotation = 10图片是正方形的 如上设置过pivot之后 并没有按 正方形中心点旋转 2...

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

525. 对象池3D问题 [ 83%]

...yaScene.lh"); scene.addChild(layaMonkey) layaMonkey.transform.localScale = new Laya.Vector3(0.04,0.04,0.04); layaMonkey.transform.position = new Laya.Vector3(0, 0.5,0); // layaMonkey.transform.rotate(new Laya.Vector3(0,-Math.PI/2,0)) //漫反射贴图 var tietu=layaMonkey.getChildByName("denglongyu"...

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

526. UI-TextArea [ 83%]

...dComplete)); } onLoadComplete() { const TextArea = Laya.TextArea; let ta = new TextArea(""); ta.skin = skin; ta.font = "Arial"; ta.fontSize = 18; ta.bold = true; ta.color = "#3d3d3d"; ta.pos(100, 15); ta.size(375, 355); ta.padding = "70,8,8,8"; Laya.stage.addChild(ta); } } new UI_TextArea();module l...

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

527. 屏幕适配-缩放-No Scale [ 83%]

...#232628"; createCantralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { ...

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

528. 屏幕适配-缩放-No Border [ 83%]

...#232628"; createCantralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { ...

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

529. 【简单跑酷--JS版】---Lv.6 终篇 [ 83%]

...SPEED: texture2 = Laya.loader.getRes("res/hp_bar.png"); break; } this.bg = new Sprite(); this.bar = new Sprite(); this.bar.x = 15; this.bar.y = 2; this.bg.graphics.drawTexture(texture1, 0, 0, 180, 21); this.bar.graphics.drawTexture(texture2, 0, 0, 155, 12); this.addChild(this.bg); this.addChild(this...

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

530. 2.0版本可用的CameraMoveScript.ts [ 83%]

...{      /** @private */     protected _tempVector3: Laya.Vector3 = new Laya.Vector3();     protected lastMouseX: number;     protected lastMouseY: number;     protected yawPitchRoll: Laya.Vector3 = new Laya.Vector3();     protected resultRotation: Laya.Quaternion = new Laya.Q...

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