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

大约有 2,307 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0122 秒)

291. CPU优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 81%]

... "#FF0000"); var bounds:Rectangle  = sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` ​ getBounds可以满足多数多数需求,但由于其需要计算边界,不适合频繁调用。 2. 设置容器的autoSize为true。 ```javascript var sp:Sprite = new Sprite(); sp.autoSize = tr...

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

292. 使用U3D导出粒子特效不显示 [ 81%]

...官方示例脚本,加载一个从U3D导出的2D粒子特效Laya.stage.addChild(Laya.Scene.load(url)) 但是粒子不显示。想问到底这个步骤怎么搞?急急急!!!!我把导出的资源上传了。 附件 : --> LayaScene_1.rar 2018-03-20 添加评论 免费帖 --> 分享 微...

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

293. [LayaAir3]sprite再次加入父对象滤镜渲染失效 [ 81%]

...加入父对象滤镜渲染失效 let ctn = new Laya.Sprite(); Laya.stage.addChild(ctn); let drawSp = new Laya.Sprite(); drawSp.graphics.drawRect(0, 0, 100, 100, `#ffcc00`); drawSp.x = 200; drawSp.y = 200; //由 20 个项目(排列成 4 x 5 矩阵)组成的数组,灰图 var grayscaleMat: any[]...

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

294. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 81%]

...00,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但由于其需要计算边界,不适合频繁调用。 1. 设置容器的autoSize为true。 ```javascript var sp=new Laya.Sprite(); sp.autoSize=true; sp.graphics....

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

295. UI-Image [ 81%]

... = Laya.Image; let dialog = new Image("res/ui/dialog (3).png"); Laya.stage.addChild(dialog); dialog.pos(165, 62.5); } } new UI_Image();module laya { import Stage = Laya.Stage; import Image = Laya.Image; import WebGL = Laya.WebGL; export class UI_Image { constructor() { // 不支持WebGL时自动切...

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

296. 分享一个自己做的游戏公告功能,跑马灯效果 [ 81%]

...left" this.html.style.color = "#fff" this.html.innerHTML = "" this.hornBox.addChild(this.html) this.addChild(this.hornBox) } /** 滚动动画 */ private _animate(e: Event): void { const _w = this.html.width const _x = this.html.x if (_x < -_w) { this.stop(true) } else { this.html.x -= 2 } } /** ...

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

297. localRotationEulerY旋转位置错误 [ 81%]

...      this.arr = [];         this.newScene = Laya.stage.addChild(new Laya.Scene3D()) as Laya.Scene3D;          //初始化照相机         var camera = this.newScene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera;         camera.transform...

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

298. rigidBody.applyForce 对刚体应用力,物体没有移动 [ 81%]

...tmpVector = new Laya.Vector3(0, 0, 0);         this.scene = Laya.stage.addChild(new Laya.Scene3D());         //初始化照相机         let camera = this.scene.addChild(new Laya.Camera(0, 0.1, 100));         camera.transform.translate(new Laya.Vector3(0, 6, 9.5));         camer...

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

299. 多种碰撞器形状(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 81%]

... = Math.random() * 0.75 + 0.25; //创建盒型MeshSprite3D var box = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(sX, sY, sZ))) as Laya.MeshSprite3D; //创建刚体碰撞器 var rigidBody:Laya.Rigidbody3D = box.addComponent(Laya.Rigidbody3D); //创建盒子形状碰撞器 var bo...

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

300. iphoneX环境下新手引导的抠图透明区域为黑色,其它机型都是正常的。 [ 81%]

...r = new Sprite(); this.guideContainer.cacheAs = "bitmap"; Utils.GuideLayer.addChild(this.guideContainer); this.guideContainer.on(Laya.Event.CLICK, this, this.nextStep); this.mouseEnabled = false; var maskArea: Laya.Sprite = new Laya.Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, La...

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