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

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

101. 预设/场景的导出(ActionScript-3D基础(AS3)-LayaAir3D之3D场景可视化编辑) [ 60%]

...场景.ls示例代码如下(这里我们直接修改GameUI类)。 ```typescript package script { import ui.test.TestSceneUI; import laya.d3.core.scene.Scene3D; import laya.d3.core.Camera; import laya.display.Stage; /** * 本示例采用非脚本的方式实现,而使用继承页面基类,实现...

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

102. UNITY导出的模型旋转不了 [ 60%]

....transform.rotate(new Laya.Vector3(0, 0.9, 0)); obj.addComponent(BoxControlScript); //旋转方向与角度设置 //var vect = new Laya.Vector3(0,1,0); //每10毫秒旋转一次 //Laya.timer.loop(10,null,function(){ //obj.transform.rotate(vect,false,false); //}); })); })); })(this); class BoxControl...

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

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

...去做相机跟踪 代码如下: 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(): void {      ...

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

104. Laya3.0正式版spine3.8的动画资源不能正常显示 [ 60%]

... { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { private skeleton: SpineSkeleton; private index: number = -1; public pageWidth: number; public pageHeight: number; onStart() { console.log("Game start"); Laya.loader.load("resources/res/spineboy-pma.skel", Loader.SPIN...

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

105. 多光源渲染(ActionScript-3D基础(AS3)-LayaAir3D之灯光) [ 60%]

...聚光)影响的数量。 > 开启并且修改多光源渲染参数 ```typescript var config:Config3D = new Config3D(); //开启多光源 config.enbaleMultiLight = true; //设置最大光源数 config.maxLightCount = 16; Laya3D.init(750, 1334, config); ``` > 关闭多光源渲染 ```typescript var c...

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

106. Spine骨骼动画 · LayaAir3文档 · LAYABOX [ 60%]

...示例: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Sprite }) public sprite: Laya.Sprite; private spine: Laya.Spine2DRenderNode; private index: number = -1; //组件被激活后执行,此时所有节点和组件均已创建...

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

107. [LayaAirIDE3]2d相机打包后问题 [ 59%]

... regClass, property } = Laya;  @regClass() export class Main extends Laya.Script {     @property({ type: Laya.Sprite })     public player: Laya.Sprite;      @property({ type: Laya.Sprite })     public joystick: Laya.Sprite;      @property({ type: Laya.Sprite })     public map: Laya.Sp...

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

108. 如何启用摇一摇 [ 59%]

...块编译宏使用,上面的写法看着有点累,可以参考下: /*[IF-SCRIPT-BEGIN] _model = model; var SHAKE_THRESHOLD = 100; var last_update = 0; var x = y = z = last_x = last_y = last_z = 0;; var canShake = 1; if (__JS__('window.DeviceMotionEvent')){__JS__('window').addEventListener("devicem...

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

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

射线检测报错,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

110. Spine渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 59%]

... { regClass, property } = Laya; @regClass() export class Demo extends Laya.Script { spine: Laya.Spine2DRenderNode; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { // 加载Spine动画数据资源(json文件),注意一定...

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