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

大约有 1,326 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0054 秒)

491. 微信平台下如何截屏 [ 64%]

...vas; let t = mainCanvas.getTexture(); let imgSp = new Sprite(); Laya.stage.addChild(this.imgSp) imgSp.graphics.drawTexture(t)) 2020-06-17 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起人 无 相关问题 关于微...

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

492. 绘制三角形、多边形及根据数据绘制图案(JavaScript-LayaAir基础篇(JS)-矢量图) [ 64%]

...    {         sp = new Sprite();         Laya.stage.addChild(sp);         //画三角形         sp.graphics.drawPoly(30, 28, [0, 100, 50, 0, 100, 100], "#ffff00");     } })(); ``` 代码运行效果如下图所示: ​ ![blob.png](img/2.png) ​ ...

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

493. 图片遮罩大小跟设置不一致 [ 64%]

...howApe() { // 方法1:使用loadImage var ape = new Sprite(); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); // 方法2:使用drawTexture Laya.loader.load("https://s2.d2scdn.com/2017/12/ ... ot%3B, Handler.create(this, function() { var t = Laya.loader.getRes("https://s2.d...

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

494. VScrollBar属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 64%]

....changeHandler = new Handler(this, onChange); //加载到舞台 Laya.stage.addChild(vScrollBar); //创建提示信息 createPromptText(vScrollBar) } /***创建提示信息***/ private function createPromptText(scrollBar:ScrollBar):void { //实例化提示信息 promptText=new Text(); //提示框字...

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

495. HScrollBar属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 64%]

....changeHandler = new Handler(this, onChange); //加载到舞台 Laya.stage.addChild(hScrollBar); //创建提示信息 createPromptText(hScrollBar) } /***创建提示信息***/ private function createPromptText(scrollBar:ScrollBar):void { //实例化提示信息 promptText=new Text(); //提示框字...

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

496. 加载本地项目图片资源 [ 64%]

...如下  var ape: Sprite = new Sprite();             Laya.stage.addChild(ape);             ape.loadImage("../../res/atlas/—.png"); 2017-11-08 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起人 1...

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

497. sprite点击事件 位置便宜 [ 64%]

...ngle(rect.x-100,rect.y-100,200,200); // rect.hitArea = hitArea; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, mouseHandler); rect.on(Event.MOUSE_UP, this, mouseHandler); rect.on(Event.CLICK, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, mouseHandler); r...

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

498. Image不能清空图片吗? [ 64%]

...MakeMc){ //类型小图片 this.lastMakeMc = new Image(); this.collectUIMC.addChild(this.lastMakeMc); this.lastMakeMc.pos(123,68); this.lastMakeMc.size(32,32); }else{ this.lastMakeMc.skin = "face/type"+type+".png"; } if(type == -999){ this.lastMakeMc.dispose(); } 2018-06-23 添加评论 免费帖 --...

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

499. 如何动态创建2D刚体 [ 64%]

...动态创建刚体的 Ming • 2020-10-11 13:34 可以 这样写吗 Sprite.addChild(new Laya.RigidBody()); 小小泽 จุ บ • 2020-10-11 15:50 var rigidBody:Laya.Rigidbody= image.addComponent(Laya.Rigidbody);。addComponent是添加组件

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

500. 绘制三角形、多边形及根据数据绘制图案(TypeScript-LayaAir基础篇(TS)-矢量图) [ 64%]

...      this.sp = new Sprite();             Laya.stage.addChild(this.sp);             //画三角形             this.sp.graphics.drawPoly(30, 28, [0, 100, 50, 0, 100, 100], "#ffff00");            }     } } new laya.Sprite_DrawShapes(...

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