大约有 168 项符合查询结果, 库内数据总量为 30,897 项。 (搜索耗时: 0.0038 秒)
...聚光)影响的数量。 > 开启并且修改多光源渲染参数 ```typescript var config:Config3D = new Config3D(); //开启多光源 config.enbaleMultiLight = true; //设置最大光源数 config.maxLightCount = 16; Laya3D.init(750, 1334, config); ``` > 关闭多光源渲染 ```typescript var c...
来源: Laya2.0_文档 发布时间: 20210714
...示例: 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
...块编译宏使用,上面的写法看着有点累,可以参考下: /*[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
射线检测报错,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
...24 18:14 写一个ts文件,写上 export default class Move extends Laya.Script{ /** @prop {name:target,tips:"目标容器",type:Prefab}*/ targetPrefab:Laya.Prefab; } 将文件在编辑模式下赋给点添加组件=》code=》move 然后创建一个box拖为预制体 放在工程 Scenes...
来源: Laya_社区 发布时间: 20181024
...了几个改动,在图3-3中都会有标识 对Label组件增加了LabelScript脚本(有“+”号标识) 对item节点修改了width属性(属性设置面板有黄色线提示) 添加了Button组件(有“+”号标识) 这些修改也可以覆盖到预制体中,我们来看看如...
来源: Laya3.0_文档 发布时间: 20241014
...了几个改动,在图3-3中都会有标识 对Label组件增加了LabelScript脚本(有“+”号标识) 对item节点修改了width属性(属性设置面板有黄色线提示) 添加了Button组件(有“+”号标识) 这些修改也可以覆盖到预制体中,我们来看看如...
来源: Laya3.0_文档 发布时间: 20250214
...08* [Cannon.js](https://github.com/schteppe/cannon.js) :完全使用 JavaScript 编写的优秀 3D 物理引擎,包含简单的碰撞检测、各种形状的摩擦力、弹力、约束等功能。在LayaAir 2.7.0beta中,完成了对其基本功能的支持,并逐步在后续的版本中完...
来源: Laya2.0_文档 发布时间: 20210715
...显示None,也无法拖放! 代码如下: @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property(String) public text: string = ""; @property(Laya.Image) public image: Laya.Image = null; constructor() { ...
来源: Laya_社区 发布时间: 20230412
... { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { private mCurrIndex: number = 0; private mArmature: Laya.Skeleton; onStart() { console.log("Game start"); //加载内置骨骼动画资源 Laya.loader.load("skeleton/Dragon/Dragon.sk").then((templet: Laya.Templet) =&g...
来源: Laya3.0_文档 发布时间: 20240910