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

大约有 2,033 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0063 秒)

501. 怎么对graphics画出来的图片进行鼠标点击拖动??? [ 84%]

...e.bgColor = "#232628"; //这里是我注释掉的代码 //Laya.loader.load(this.ApePath, Handler.create(this, this.setup)); this.setup(); } private setup(): void { this.createApe(); this.showDragRegion(); } private createApe(): void { this.ape = new Sprite(); //this.ape.loadImage(this.ApePath); Laya...

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

502. 高级应用-基于物理渲染 [ 84%]

...eeDimen/scene/PBRScene/Demo.ls")); scene.once(Laya.Event.HIERARCHY_LOADED, this, function () { var camera = scene.getChildByName("Camera"); camera.addComponent(CameraMoveScript); });class PBRDemo { constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.scre...

来源: Laya_示例 发布时间: 20251130

503. 关于新手引导 [ 84%]

...ideContainer.addChild(interactionArea); gameContainer.on(Event.MOUSE_DOWN, this, downHandler); gameContainer.on(Event.MOUSE_UP, this, upHandler); } private function moveHandler():void { interactionArea.graphics.drawCircle(Laya.stage.mouseX, Laya.stage.mouseY, 30, "#ff0000"); } private function upHan...

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

504. TiledMap销毁的问题,TiledMap销毁后屏幕变灰,不能显示 [ 84%]

...有属性 */ public function clearAll():void { if (_map) { _map = null; } this.visible = false; //aniSpriteArray为空的时候,导致自己没有被销毁,直接return了 if (aniSpriteArray == null) { return; } var tAniSprite:TileAniSprite; for (var i:int = 0; i < aniSpriteArray.length; i++)...

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

505. png使用base64显示异常 [ 84%]

...在显示正常了。 __proto.parseImgForBuffer = function(url,data){ var _this = this; var image; var onload = function () { // image.onload = null; // image.onerror = null; // var data = Laya.Texture2D._parse(image); // data._url = "sdfasf" // _this.onLoaded(data); img=HTMLImage.create(image.width...

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

506. 内存优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 84%]

...颜色 Laya.stage.bgColor = "#232628"; //帧循环 Laya.timer.frameLoop(1, this, this.onFrame); } onFrame(): void { //如果创建对象时间为100帧间隔后 if (this.createTime >= 100) { //每200帧间隔创建30个雪花 for (var i: number = 0; i 640+20||img1.scaleX 在一些特殊情况我们...

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

507. 使用百度地图显示当前位置(TypeScript-LayaAir基础篇(TS)-硬件设备相关) [ 84%]

...Map;       // 百度地图命名空间 private convertor = new this.BMap.Convertor(); // 坐标转换接口   private mapDiv; // 包含百度地图的div容器 ``` ### 二、接着是构造函数: ```typescript class WatchPosition { constructor() { Laya.init(1, 1); this.init(); /...

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

508. List属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 84%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } private setup(): void { var list: List = new List(); list.itemRender = Item; list.repeatX = 1; list.repeatY = 4; list.x = (Laya.stage.width - Item.WID) / 2; list.y = (Laya.stage.height - Item.HEI * list.repeat...

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

509. SCALE_FIXED_WIDTH适配屏幕的问题 [ 83%]

... _roomId = 0;         constructor(roomId?: number) {             this._roomId = roomId;             Laya.init(750, 1218, Laya.WebGL);             Laya.Browser.document.title = 'GG游戏;             if (Laya.Browser.onPC) {                 //设置舞台缩放模...

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

510. 打包APK运行,drag拖动出现问题;color="#0"程序直接崩溃 [ 83%]

...    Laya.loader.load([GameConfig.getAssetsFile("comp")],Handler.create(this, onComplet));                          }         private var imag:Image;         private function onComplet():void         {             imag=new Image("ui/comp/image.png");  ...

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