大约有 538 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0057 秒)
Laya_社区(426) Laya2.0_文档(37) Laya3.0_文档(22) Laya2.0_示例(12) Laya_示例(11) laya_api(11) Laya3.0_api(10) Laya2.0_api(9)
...方便显示,我们新建一个ui项目。简单的调用接口如下: class LayaUISample { constructor() { //初始化引擎 Laya.init(600,400,Laya.WebGL); //设置Laya提供的worker.js路径 Laya.WorkerLoader.workerPath = "libs/worker.js"; //开启worker线程 Laya.WorkerLoader.enable = true;...
来源: Laya3.0_文档 发布时间: 20251010
...aya.utils.Browser; import laya.utils.Stat; import laya.webgl.WebGL; public class LayaAirDemo { private var templete:Templet;//动画模板类 private var skeleton:Skeleton;//骨骼动画类 private var curNum:int=0;//curNum%2求余数,切换不同皮肤 public function LayaAirDemo() { Laya.init(Br...
来源: Laya_社区 发布时间: 20170324
...直接处理即可。 接收字符串数据的完整示例: const { regClass } = Laya; @regClass() export class WebSocketDemo extends Laya.Script { private socket: Laya.Socket; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { this.socket = new Laya.Socket(); // 注...
来源: Laya3.0_文档 发布时间: 20251010
...曲线,然后通过drawLines来画。给你 一个参考代码 export class CatmullRomSpline { private points: number[]; constructor(points: number[]) { if (points.length < 4 || points.length % 2 !== 0) { throw new Error("At least two points (four numbers) are required, and the total number ...
来源: Laya_社区 发布时间: 20241008
...码如下所示: ```javascript /** * 分包 */ module subpackage{ export class b{ private GameMain:any; private ui:any; constructor(){ //监听按钮btnA的点击事件,触发后处理 this.GameMain.newUI.btnA.on(Laya.Event.CLICK, this, this.showB); } //显示B页 private showB():void { this.Gam...
来源: Laya2.0_文档 发布时间: 20210715
...,建议用脚本方式实现,比如子弹脚本。 */ export default class GameUI extends ui.test.TestSceneUI { constructor() { super(); //添加3D场景 Laya.Scene3D.load("res/Conventional/SimpleTown_DemoScene.ls",Laya.Handler.create(this,function(s:Laya.Scene3D):void{ var scene = s; L...
来源: Laya_社区 发布时间: 20181227
API DocumentationAll Packages | All Classes | Index | Frames No Frames TiledMapProperties | Methods | Constants Packagelaya.mapClasspublic class TiledMapInheritanceTiledMap Object tiledMap是整个地图的核心 地图以层级来划分地图(例如:地表层,植被层,建筑层...
来源: laya_api 发布时间: 20170929
API DocumentationAll Packages | All Classes | Index | Frames No Frames TiledMapProperties | Methods | Constants Packagelaya.mapClasspublic class TiledMapInheritanceTiledMap Object tiledMap是整个地图的核心 地图以层级来划分地图(例如:地表层,植被层,建筑层...
来源: Laya2.0_api 发布时间: 20190513
...m.layabox.test W/om.layabox.tes: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V (light greylist, reflection) Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logE...
来源: Laya_社区 发布时间: 20190723
...ports, "__esModule", { value: true }); const t = require("./test/TestExportClass"); // 程序入口 class GameMain { constructor() { // Laya.init(600,400); console.log("start"); var exportCls = new t.TestExportCls(); exportCls.callFunc(); } } new GameMain(); } http://requirejs.org/docs/errors.html#m...
来源: Laya_社区 发布时间: 20171116