大约有 6,598 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0142 秒)
Laya_社区(5247) Laya3.0_api(482) Laya2.0_文档(363) Laya_示例(154) Laya2.0_示例(116) Laya3.0_文档(105) Laya2.0_api(67) laya_api(64)
.../新建一个球体模型并添加到舞台上 var sphere = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createSphere(1))); //新建一个球形的碰撞盒 var sphereShape = new Laya.SphereColliderShape(1); //给球添加刚体 var sphereRigid = sphere.addComponent(Laya.Rigidbody3D); //...
来源: Laya2.0_文档 发布时间: 20210715
...板代码如下:(窗口有点难看...) function copyText(str) { new ShowDiv(str); } function ShowDiv(str) { var _this = this; this.AppConfirm = document.getElementById("AppConfirm"); if (this.AppConfirm == null) { this.AppConfirm = document.createElement("div"); document.body.appendC...
来源: Laya_社区 发布时间: 20181214
webgl文字显示不齐 let txt; txt = new Laya.Text(); txt.text = "abcde"; txt.fontSize = 100; Laya.stage.addChild(txt); txt = new Laya.Text(); txt.text = "我们是最好的"; txt.fontSize = 50; txt.x = 0; txt.y = 300; txt.scale(2,2); Laya.stage.addChild(txt);在laya2.0版本里,上面第二个...
来源: Laya_社区 发布时间: 20181119
...(); } connect() { const Socket = Laya.Socket, Event = Laya.Event; socket = new Socket(); //socket.connect("echo.websocket.org", 80); socket.connectByUrl("ws://echo.websocket.org:80"); output = socket.output; socket.on(Event.OPEN, this, this.onSocketOpen); socket.on(Event.CLOSE, this, this.onSocketCl...
来源: Laya2.0_示例 发布时间: 20260303
...ine切换动作后显示异常解决方法 例: var catSprite:Skeleton = new Skeleton(); this.catSprite.load(xxx,回调)--加载好使用spine或dragbones的文件 private function 回调(){ catSprite.showSkinByName("动作名") //最初使用这种方式显示 结果是图片乱跳 显示异常 ...
来源: Laya_社区 发布时间: 20180614
...示有问题 onConfigLoaded(): void { let alive = new Array(); alive.push({url:"res/FGUIMain/Common_atlas0.png", type:Laya.Loader.IMAGE}); Laya.loader.load(alive, Laya.Handler.create(this, this.LoadFinish)); } private ...
来源: Laya_社区 发布时间: 20210618
...lpha2); } function createButton(label) { var w = 300, h = 60; var button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } function onDecreaseAlpha1(e) { //移除鼠标...
来源: Laya_示例 发布时间: 20260303
...Object):void { var json:String = JSON.stringify(req); var data:ByteArray = new ByteArray(); data.writeUTFBytes(json); data.compress(); var obj:Object = {}; var headByte:ByteArray = new ByteArray(); writeHeader(obj, headByte); _socket.output.clear(); _socket.output.writeBytes(headByte); _socket.outpu...
来源: Laya_社区 发布时间: 20170710
... } function keyboardInspector() { var numKeyDown = keyDownList.length; var newText = '[ '; for (var i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIG...
来源: Laya_示例 发布时间: 20260303
...a.Handler.create(this, this.onProgress)); } onProgress() { this.Progress = new Progress(); Laya.stage.addChild(this.Progress); //加载资源进度并且监听 Laya.loader.load(this.arr, Laya.Handler.create(this, this.onAssetsLoaded), Laya.Handler.create(this, this.onAssetsLoading, null, false)); } ...
来源: Laya_社区 发布时间: 20171217