大约有 517 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0041 秒)
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...
来源: Laya2.0_示例 发布时间: 20241117
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.connect(); } 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; socke...
来源: Laya2.0_示例 发布时间: 20241117
...create("res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh", Handler.create(this, onComplete)); } ////完成回调 public function onComplete():void { //获取资源 var layaMonkey:Sprite3D = scene.addChild(Loader.getRes("res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh")) as Sprite3D; //克隆sprit...
来源: Laya2.0_文档 发布时间: 20210715
.../scene/LayaScene_AnimationEvent/Conventional/layaScene.ls", Handler.create(this, function(scene:Scene3D):void { Laya.stage.addChild(scene) as Scene3D; //获取cube对象 var cube:Sprite3D = scene.getChildByName("Cube"); //添加组件(脚本) var _script:SceneScript = cube.addComponent(SceneScript);...
来源: Laya2.0_文档 发布时间: 20210715
...d() tMap.createMap("res/TiledMap/orthogonal.json",viewRect, Handler.create(this,onMapLoaded)); } private function onMapLoaded():void { //将原地图放大2倍 tMap.scale = 2; } } } ``` 运行效果如图8所示。 ![图8](img/8.png) (图8) #### 2.2.2 设置地图缩放的中心点 很明显,图8...
来源: Laya2.0_文档 发布时间: 20210714
...eUI { constructor() { super(); this.stage.on(Laya.Event.FOCUS, this, this.onFocus); this.stage.on(Laya.Event.BLUR, this, this.onBlur); Laya.timer.frameLoop(1,this,this.onFrameLoop); } private onFrameLoop():...
来源: Laya_社区 发布时间: 20180724
...aya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } private updateRectPo...
来源: Laya_示例 发布时间: 20241117
...ya.stage.scaleMode = Stage.SCALE_NOBORDER; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } private updateRectPo...
来源: Laya_示例 发布时间: 20241117
...| !msg.data) return; var data: any = msg.data; if (this.disableInput && data) { this.event(Event.MESSAGE, data); return; } if (this._input.length > 0 && this._input.bytesAvailable < 1) { ...
来源: Laya_社区 发布时间: 20220822
...步进时长 var timeStep:Object = 1.0 / 60.0; Laya.timer.loop(1000 / 10, this, cannonUpdate); } 我是用Browser.window拿到对象后一律当成Object使用的,是不是会有什么问题呢? 2017-04-18 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请...
来源: Laya_社区 发布时间: 20170417