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

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

271. 深入理解LayaAir引擎架构和实现原理(一)跨平台引擎源码编译 [ 41%]

...取引擎源码 LayaAir查看目录结构      laya引擎是使用TypeScript开发的,引擎核心代码在src/LayaAir路径下,查看tsconfig.json文件可知其编译目标环境为es6。编译引擎代码 项目路径下[code]npm i 复制代码[/code] 安装所需依赖库 查看package.js...

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

272. 3D性能优化 · LayaAir3.4 · 引擎文档 · LAYABOX [ 41%]

...码如下: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //共享材质,用于合批 public batchMat: Laya.Material; //颜色数目 private _colorNums = 20; //精灵数目 private _spriteNums = 200; private _createColorBufferData() { //随机给20个...

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

273. HTTP通信 · LayaAir3.4 · 引擎文档 · LAYABOX [ 38%]

...。 二、使用引擎的请求方法 XMLHttpRequest(XHR)是一个 JavaScript 对象,它提供了一种在浏览器中以异步方式发送 HTTP(或 HTTPS)请求并处理服务器响应的机制。例如,获取远程资源、提交表单数据、发送JSON数据等。 在LayaAir引擎中...

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

274. 2D光遮挡器与阴影 · LayaAir3.4 · 引擎文档 · LAYABOX [ 37%]

...ss, property } = Laya; @regClass() export class LightOccluder extends Laya.Script { private spotLight: Laya.Sprite = new Laya.Sprite(); private background: Laya.Sprite = new Laya.Sprite(); private lightOccluder: Laya.Sprite = new Laya.Sprite(); private backgroundTexture: string = "resources/bg2.png"...

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

275. 性能分析插件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 36%]

...工具。 const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property(Number) public projectId: number = 23; private perfMain: LayaPerf = new LayaPerf(); onEnable(): void { this.perfMain.init(this.projectId); } } projectId使用后端给项目分配的项...

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

276. (实现手指控制模型的缩放旋转)触控可以识别 但是导入的模型没有根据触控反应 [ 35%]

...精灵添加组件(脚本)         monkey.addComponent(MonkeyScript);         scene.addChild(monkey);         //设置相机的观察目标为小猴子         camera.transform.lookAt(monkey.transform.position, new Laya.Vector3(0, 1, 0));         this.text...

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

277. 2D网格渲染器 · LayaAir3.4 · 引擎文档 · LAYABOX [ 34%]

...ass, property } = Laya; @regClass() export class Mesh2DRender extends Laya.Script { @property({type: Laya.Sprite}) private layaMonkey: Laya.Sprite; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { Laya.loader.load("resources/layabox.png", Laya.Loader.IMAGE).then(() =...

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

278. Laya多点触控是有开关吗 为什么多点触控没有任何反应 [ 32%]

...精灵添加组件(脚本)         monkey.addComponent(MonkeyScript);         scene.addChild(monkey);         //设置相机的观察目标为小猴子         camera.transform.lookAt(monkey.transform.position, new Laya.Vector3(0, 1, 0));              ...

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

279. 使用3D摄像机 · LayaAir3.4 · 引擎文档 · LAYABOX [ 32%]

...rty } = Laya; @regClass() export default class CameraControll extends Laya.Script { @property( { type: Laya.Sprite3D } ) public target: Laya.Sprite3D; private camera: Laya.Camera; public distanceUp: number = 0.5;//相机与目标的竖直高度参数 public distanceAway: number = 10;//相机与目...

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

280. 2D寻路 · LayaAir3.4 · 引擎文档 · LAYABOX [ 26%]

...Class, property } = Laya; @regClass() export class TestSprite extends Laya.Script { // 用于显示鼠标点击的位置 @property({ type: Laya.Sprite }) public hit: Sprite; private _temp: Sprite; private _allAgent: Nav2DAgent[] = []; private findCompents(lists: any[], sprite: Sprite, componentType:...

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