大约有 589 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0049 秒)
Laya_社区(199) Laya2.0_示例(114) Laya3.0_文档(94) Laya2.0_api(91) laya_api(48) Laya_示例(24) Laya2.0_文档(16) Laya3.0_api(3)
...ivate apePath: string = "../../res/apes/monkey2.png"; private ape: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "sh...
来源: Laya_示例 发布时间: 20260106
...aya.Camera(0, 0.01, 1000)); camera.transform.translate(new Laya.Vector3(0, consts.CAMERA_HEI, 0)); camera.transform.rotate(new Laya.Vector3(-45, 0, 0), true, false); camera.orthographic = true; camera.orthographicVerticalSize = 15; this.mainCamera = camera; // var directionLight = scene.addChild(new...
来源: Laya_社区 发布时间: 20180126
...活状态,请问纯代码怎么实现场景创建激活,谢谢? const scene = new Laya.Scene(); scene.onOpened = () => { console.log('scene onOpened'); }; scene.open(); console.log('scene', scene.active, scene.activeInHierarchy); Laya.timer.frameOnce(10, this, () => { console.log('...
来源: Laya_社区 发布时间: 20190218
...的属性入口中,在代码里给 Tree 对象赋值的示例如下: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Tree }) public tree: Laya.Tree; //组件被激活后执行,此时所有节点和组件均已创建完毕,...
来源: Laya3.0_文档 发布时间: 20251010
...se strict'; Object.defineProperty(exports, "__esModule", { value: true }); const vscode = require("vscode"); function activate(context) { let disposable = vscode.commands.registerCommand('extension.buildTemplate', () => { vscode.window.showInformationMessage('build template complete.'); }); conte...
来源: Laya_社区 发布时间: 20180728
...种开发语言、LayaAirIDE让项目开发更高效。class DOM_Video { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALI...
来源: Laya2.0_示例 发布时间: 20260106
..., maggots = [], wrapBounds, maggotTexture; class PerformanceTest_Maggots { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Rectangle = Laya.Rectangle; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Br...
来源: Laya2.0_示例 发布时间: 20260106
... success 回调来通知加载完成。示例代码如下: ```javascript const loadTask = wx.loadSubpackage({ name: 'stage1', // name 可以填 name 或者 root success: function(res) { // 分包加载成功后通过 success 回调 }, fail: function(res) { // 分包加载失败通过 fail 回调 }...
来源: Laya2.0_文档 发布时间: 20210715
... 得意须尽欢 赞同来自: 调用音频的方法:其中starttime为0 const channel = Laya.SoundManager.playSound(url, loop ? 0 : 1, null, startTime); 2025-11-27 0 0 分享 微博 QZONE 微信 Fany 赞同来自: native包中我这边也出现过.概率很低.之前我一直以为是我程序报...
来源: Laya_社区 发布时间: 20251127
[LayaAir3]Pool对象池获取继承对象时会返回基类对象 const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { let item1 = Laya.Pool.createByClass(TestClass); console.log('item1:', item1.type); Laya.Pool.recoverByClass(item1); let item2 = Laya...
来源: Laya_社区 发布时间: 20250819