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

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

1. 3D变换 · LayaAir3.0文档 · LAYABOX [ 100%]

...late(translation: Vector3, isLocal: boolean = true): void { if (isLocal) { Matrix4x4.createFromQuaternion(this.localRotation, Transform3D._tempMatrix0); Vector3.transformCoordinate(translation, Transform3D._tempMatrix0, Transform3D._tempVector30); Vector3.add(this.localPosition, Transform3D._tempVec...

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

2. 3D灯光与阴影 · LayaAir3.0文档 · LAYABOX [ 66%]

...color.setValue(1.0, 0.5, 0.0, 1); //设置平行光的方向 var mat: Laya.Matrix4x4 = directlightSprite.transform.worldMatrix; mat.setForward(new Laya.Vector3(-1.0, -1.0, -1.0)); directlightSprite.transform.worldMatrix = mat; setForward 平行光的方向,分别代表x、y、z轴上的方向,...

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

3. 引用第三方JS模块 · LayaAir3.0文档 · LAYABOX [ 63%]

...tart() { console.log("Game start"); // 0表示通路,1表示障碍 let myMatrix = [ [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 1, 0, 1, 1, 0], [0, 0, 1, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1, 0], [1, 1, 1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 1, 0, 1, 0], [0, 0, 1, 0, 0, 0, 0, 0] ]; this...

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

4. 屏幕适配 · LayaAir3.0文档 · LAYABOX [ 51%]

...则,计算出适配宽高需要缩放的比例,然后通过transform的matrix(矩阵)来对画布缩放至逻辑分辨率范围内,再通过viewport与DPR机制缩放还原。 基于以上种种,我们需要了解,适配宽高才是LayaAir引擎适配规则处理后的最终效果宽...

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

5. 使用3D精灵 · LayaAir3.0文档 · LAYABOX [ 42%]

...: Transform3D = destSprite3D.transform; if (worldPositionStays) { var worldMatrix: Matrix4x4 = transform.worldMatrix; original.transform.worldMatrix.cloneTo(worldMatrix); transform.worldMatrix = worldMatrix; } else { (position) && (transform.position = position); (rotation) && (trans...

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