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

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

161. 自动图集配置 · LayaAir3.4 · 引擎文档 · LAYABOX [ 43%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { declare owner: Laya.Image; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { //需要先加载图集再使用,注意,图集要放到resources目录下或者在构建发...

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

162. 压缩纹理 · LayaAir3.4 · 引擎文档 · LAYABOX [ 42%]

...下: const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onAwake(): void { let img = new Laya.Image; Laya.stage.addChild(img); img.pos(500,100); img.skin = "resources/layabox.png"; //纹理压缩的图片的路径 } onStart() { Laya.Stat.show(0, 0); //性能面...

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

163. 动画状态机 · LayaAir3.4 · 引擎文档 · LAYABOX [ 42%]

...下: ... import Vector3 = Laya.Vector3; ... export class AnimationScript extends Laya.AnimatorStateScript { ... private model: Laya.Sprite3D; /**@internal */ setPlayScriptInfo(animator: Laya.Animator | Laya.Animator2D, layerindex: number, playstate: Laya.AnimatorState | Laya.AnimatorState2D) { ......

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

164. 2D光遮挡器与阴影 · LayaAir3.4 · 引擎文档 · LAYABOX [ 42%]

...onst { regClass, property } = Laya; @regClass() export class LightOccluder extends Laya.Script { private spotLight: Laya.Sprite = new Laya.Sprite(); private background: Laya.Sprite = new Laya.Sprite(); private lightOccluder: Laya.Sprite = new Laya.Sprite(); private backgroundTexture: string = "resou...

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

165. 精灵 · LayaAir3.4 · 引擎文档 · LAYABOX [ 41%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件被激活...

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

166. 性能分析插件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 41%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property(Number) public projectId: number = 23; private perfMain: LayaPerf = new LayaPerf(); onEnable(): void { this.perfMain.init(this.projectId); } } projectId使用后端给项目分配的项目id,...

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

167. 微信小游戏 · LayaAir3.4 · 引擎文档 · LAYABOX [ 41%]

...: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方...

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

168. 加载.lh文件 运行后黑屏 无法显示 [ 40%]

....addChild(this.text); } } //激活启动类 new Main(); class MonkeyScript extends Laya.Script3D{     private _scene:Laya.Scene3D;     private _text:Laya.Text;     private _camera:Laya.Camera;     private rotation:Laya.Vector3;     private lastPosition:Laya.Vector2;     priva...

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

169. (实现手指控制模型的缩放旋转)触控可以识别 但是导入的模型没有根据触控反应 [ 40%]

...ild(this.text); } } //激活启动类 new MultiTouch(); class MonkeyScript extends Laya.Script3D{     private _scene:Laya.Scene3D;     private _text:Laya.Text;     private _camera:Laya.Camera;     private rotation:Laya.Vector3;     private lastPosition:Laya.Vector2;     priva...

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

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

...ipt /** * TypeScript语言的3D脚本示例 */ export default class TSDemo extends Laya.Script3D { constructor() { super(); } } ``` > 2D脚本与3D脚本不要混用,如果是用IDE创建的脚本模板,需要将继承的2D脚本类(Laya.Script)改为3D脚本类(Laya.Script3D), ###### ...

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