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

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

1291. layaAir TS项目如何引用protoBuf库? [ 53%]

...码参考了上面那个连接,但稍微做了修改: // 程序入口 class GameMain{     constructor(){         var Loader = Laya.Loader;         var Browser = Laya.Browser;         var Handler = Laya.Handler;         var ProtoBuf = Browser.window.protobuf;       ...

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

1292. ProtocolBuffer通信 · LayaAir3.4 · 引擎文档 · LAYABOX [ 53%]

...前文件 import * as protobuf from "./libs/protobuf/protobuf"; const { regClass } = Laya; @regClass() export class ProtobufDemo extends Laya.Script { onEnable() { console.log("Game start"); } } 2.2 Protobuf示例脚本 引入了protobuf模块就可以直接在项目中使用了,这里我们写了...

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

1293. 屏幕方向:自动横屏与自动竖屏的设置详解(TypeScript-LayaAir基础篇(TS)-屏幕适配) [ 53%]

...x.com/api2/Chinese/index.html?version=2.9.0beta&type=Core&category=display&class=laya.display.Stage),找到screenMode属性。如图1所示。 ![图1](img/1-1.png) (图1) #### 1.1 默认值none或者不设置screenMode属性 默认值none或者不设置screenMode属性时,无论屏幕方向如...

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

1294. TS setExternalLinkEx問題 [ 53%]

...a.Loader; import Event = Laya.Event; import Browser = Laya.Browser; export class GameMain{   constructor() {  Browser.window.conch && Browser.window.conch.showAssistantTouch(false); var ctx = document.createElement('canvas').getContext('2d'); function render(){ ctx.fillStyle='#99d9ea'; ctx...

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

1295. laya.d3.physicscannon.CannonPhysicsTriggerComponent_API3.0 [ 53%]

...physicsCannon/CannonPhysicsTriggerComponent" CannonPhysicsTriggerComponent Class CannonPhysicsTriggerComponent PhysicsTriggerComponent 类用于创建物理触发器组件。 Hierarchy CannonPhysicsComponent CannonPhysicsTriggerComponent CannonPhysicsCollider Index Constructors constructor Propertie...

来源: Laya3.0_api 发布时间: 20231102

1296. 如何实现类似AS3下的BitmapData.draw去截取区域图片? [ 53%]

...ort laya.resource.Texture;     import laya.utils.Handler;     public class CupPhone     {         public function CupPhone()         {             Laya.init(550,400);             Laya.loader.load("walk.png",Handler.create(this,onLoaded));         }    ...

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

1297. laya2.0用FlashDevelop调用编译,总是打开bin\h5\index.html [ 53%]

...ompile: false Project file: D:\Laya3DTest\code\3dtest\3dtest.as3proj. Main Class: D:/Laya3DTest/code/3dtest/src/Main.as D:/Laya3DTest/code/3dtest/bin/h5/D:/Laya3DTest/code/3dtest//bin/js/bundle.js(0): Info: Build out js sucess! D:/Laya3DTest/code/3dtest/bin/h5/D:/Laya3DTest/code/3dtest//bin/js/bundl...

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

1298. 如何监听移动端软键盘的弹出和收回? [ 53%]

...xtField; import flash.text.TextFieldType; import flash.ui.Keyboard; public class TextInput extends Sprite { private var textInput:TextField; private var sourceWidth:Number; private var sourceHeight:Number; public function TextInput() { //转换成h5项目后获取浏览器的宽度 //[IF-JS]sourceWi...

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

1299. laya.d3.physicscannon.CannonPhysicsCollider_API3.0 [ 53%]

...lobals "laya/d3/physicsCannon/CannonPhysicsCollider" CannonPhysicsCollider Class CannonPhysicsCollider PhysicsCollider 类用于创建物理碰撞器。 Hierarchy CannonPhysicsTriggerComponent CannonPhysicsCollider CannonRigidbody3D Index Constructors constructor Properties _extra _singleton canScal...

来源: Laya3.0_api 发布时间: 20231102

1300. Laya 2.2.0 只支持编译 target 为 es6的相关问题 [ 53%]

...持 es6 的 target 编译, 如果改为 target 为 es 编译,会出现 Class constructor XXX cannot be invoked without 'new'。 真机黑屏查了4个小时才查到原因,花了1个多小时改代码(之前很多地方都使用的 async/await ,而且全部改为 promise,没有 async/awa...

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