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

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

171. 官方案例里摄像机绕物体旋转脚本的问题 [ 40%]

...例里摄像机绕物体旋转脚本的问题 官方案例里的CameraMoveScripts在2.0版本下有很多接口,属性不存在。比如this.camera.moveForward、 super._initialize(owner)、super._update(state)等,放在1.7版本里是有的。是不是LayaAir.d.ts有修改。现在有别的接...

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

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

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

173. 一篇上手LayaAir的3D物理引擎(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 39%]

...](img/3-2.png) (图3-2) 通过代码设置触发器的方式: ```typescript /* ……省略若干代码 */ //创建盒型MeshSprite3D let box = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(sX, sY, sZ))) as Laya.MeshSprite3D; //创建静态碰撞器 let staticCollider:Laya....

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

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

...码如下: 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

175. 3D粒子 · LayaAir3.4 · 引擎文档 · LAYABOX [ 36%]

...rticle3D } from "./Particle3D"; @regClass() export class Main extends Laya.Script { //粒子特效的路径 private filePath = "FireEffect"; onStart() { console.log("Game start"); //加载粒子特效资源 Laya.loader.load(this.filePath, Handler.create(this, () => { })); } //每次鼠标点下...

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

176. 3D粒子编辑模块 · LayaAir3文档 · LAYABOX [ 36%]

...rticle3D } from "./Particle3D"; @regClass() export class Main extends Laya.Script { //粒子特效的路径 private filePath = "FireEffect"; onStart() { console.log("Game start"); //加载粒子特效资源 Laya.loader.load(this.filePath, Handler.create(this, () => { })); } //每次鼠标点下...

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

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

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

178. 使用3D精灵 · LayaAir3.4 · 引擎文档 · LAYABOX [ 29%]

... const { regClass, property } = Laya; @regClass() export class CameraMoveScript extends Laya.Script3D { /** @private */ protected _tempVector3: Laya.Vector3 = new Laya.Vector3(); protected lastMouseX: number = 0; protected lastMouseY: number = 0; protected yawPitchRoll: Laya.Vector3 = new Laya.Vecto...

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

179. 网络通信 · LayaAir3文档 · LAYABOX [ 27%]

...。 1,属性 属性 类型 描述 onreadystatechange function 一个JavaScript函数对象,当readyState属性改变时会调用它。 readyState unsigned short 请求的五种状态 response varies 响应实体的类型由 responseType 来指定, 可以是 ArrayBuffer ,Blob, Document, J...

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

180. 时间轴动画 · LayaAir3.4 · 引擎文档 · LAYABOX [ 27%]

...码如下: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; constructor() { super(); } event1(p1:any, p2:any): void { console.log("event1",p1,p2); } } 在脚本中创建event1的方法和接收两个参数,最后我们来...

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