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

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

101. 多光源渲染(TypeScript-3D基础(TS)-LayaAir3D之灯光) [ 60%]

... > 移动灯光脚本 ```typescript export default class LightMoveScript extends Laya.Script3D { //需要操作的光源数组 public lights = []; //光源对应的位置偏移数组 public offsets = []; //光源对应的移动半径数组 public moveRanges = []; public onUpdate(){ var seed = Laya.t...

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

102. 多光源渲染(JavaScript-3D基础(JS)-LayaAir3D之灯光) [ 60%]

... > 移动灯光脚本 ```typescript export default class LightMoveScript extends Laya.Script3D { //需要操作的光源数组 public lights = []; //光源对应的位置偏移数组 public offsets = []; //光源对应的移动半径数组 public moveRanges = []; public onUpdate(){ var seed = Laya.t...

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

103. 树状列表组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 60%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Tree }) public tree: Laya.Tree; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { //初始化树状列表的数...

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

104. 射线检测报错,outHitInfo.sprite3D=null; [ 60%]

...射线检测报错,outHitInfo.sprite3D=null; 代码: class SceneScript extends Laya.Script{  private ray : Laya.Ray; private hit: Laya.RaycastHit; private phasorSprite3D:Laya.PhasorSpriter3D; private camera : Laya.Camera; private scene: Laya.Scene;  public _load(owner : any):void{ this.scene =...

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

105. Laya2.7.1 射线提示rayCast未定义 [ 60%]

Laya2.7.1 射线提示rayCast未定义 export default class click3d extends Laya.Script3D{ constructor() { super(); //创建场景 this.scene = Laya.stage.addChild(new Laya.Scene3D()); //添加相机 this.camera = (this.scene.addChild(new Laya.Camera(0, 0.1, 100))); this.camera.transform.translate(...

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

106. Laya.timer.loop() 报错 Cannot read property 'loop' of null [ 59%]

...laya/ui/List"; import { Laya } from "laya"; export default class test_move extends Image{ // /** @prop {name:move_img, tips:"用来移动的箭头", type:Image} */ // public _move_img: Image; // public _list: List; //创建一个 List 类的实例对象 list 。 private n:number = 0; private x0:numb...

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

107. [LayaAir3]Laya3.3.5 2D相机drawToRenderTexture2D不生效问题 [ 59%]

...: const { regClass, property } = Laya;  @regClass() export class Main extends Laya.Script {     @property({type: Laya.Sprite,caption:"测试组件1"})     private testSprite: Laya.Sprite;     @property({type: Laya.Sprite,caption:"测试组件2"})     private testSprite2: Laya.Sprite;   ...

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

108. WebSocket通信 · LayaAir3.4 · 引擎文档 · LAYABOX [ 59%]

...例: const { regClass } = Laya; @regClass() export class WebSocketDemo extends Laya.Script { private socket: Laya.Socket; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { this.socket = new Laya.Socket(); // 注册事件监听 this.socket.on(Laya.Event.OPEN, this, t...

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

109. UNITY导出的模型旋转不了 [ 58%]

...rotate(vect,false,false); //}); })); })); })(this); class BoxControlScript extends Laya.Script3D { constructor() { super(); this.obj = null; this.rotation = new Laya.Vector3(0, 1, 0); } /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行...

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

110. [LayaAir2]字节小游戏物理的坐标不一样,碰撞盒会比laya的小,物理的位置也不一样 [ 58%]

...理根节点去做相机跟踪 代码如下: export default class test extends Laya.Script {         strWorldRoot:Laya.Sprite;     constructor() { super(); }     cameraPlayerOffset:Laya.Point=new Laya.Point(18,0);     cameraOffset:Laya.Point=new Laya.Point(180,570);     onEnable(): voi...

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