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

大约有 4,102 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0213 秒)

1811. [LayaAir3]sprite.drawToTexture( ) 无法绘制容器内容 [ 76%]

...如     onEnable(): void {         const { x, y, width, height } = this.box         Laya.loader.load('comp/image.png').then(v=>{             const texture = this.box.drawToTexture(width, height, x, y) as Laya.Texture             this.snapshot.texture = texture         })...

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

1812. 对象监听另外一个脚本的执行方法不被执行 [ 76%]

...主界面脚本中写入按钮的监听 //下拉菜单信息按钮监听 this.AllTitleButton.on(Laya.Event.MOUSE_DOWN, this, ButtonClickManager.clickinstance.AllTitleButtonClick);   而在另外的一个单例脚本中单例分离了执行方法 因为按钮监听太多 需要分离 监听和执行...

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

1813. CheckBox属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 76%]

... //设置舞台背景颜色 Laya.stage.bgColor = "#ffffff"; //资源路径 this.skin1 = "checkbox.png"; this.skin2 = "checkbox.png"; //加载资源成功后,执行onLoad回调方法 Laya.loader.load([skin1,skin2],Laya.Handler.create(this,onLoaded)); function onLoaded(){ //创建一个CheckBox实...

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

1814. 裁切图片后,该用什么方式去重绘出裁切后的图片 [ 76%]

...的多边形位置点数据): draw() {         const pp = this.owner.getComponent(Laya.PolygonCollider).points;         let points = this.pointS_to_pointA(pp)         let owner: Laya.Sprite = this.owner as Laya.Sprite         const ctx = owner.grap...

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

1815. 使用 addChild 加载界面后,绑定事件报错 [ 76%]

...artUI {     constructor() {         super();          this.btnStart.on(Laya.Event.CLICK, this, this.startGame);     }      startGame(): void {         //Laya.Scene.open("GameView.scene");         if (!Main.gameView) {             Main.gameVie...

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

1816. MovieClip 给SWF播放的对象 [ 76%]

...才对啊? Sprite.as public function set transform(value:Matrix):void { this._tfChanged = false; var m:Matrix = this._transform || (this._transform = _createTransform()); value.copyTo(m); _setTransform(m); //设置transform时重置x,y if (value) { _x = value.tx; _y = value.ty; value.tx = value.ty...

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

1817. [LayaAir3]LayaAir3.3使用Fairygui开发UI,滤镜效果对不上 [ 76%]

...交 2 个回复 layabox 赞同来自: 开发者自己写的错误代码,this._closeButton = fgui.UIPackage.createObject("Package1", "image"); 应该改成this._closeButton = fgui.UIPackage.createObject("Package1", "Component1"); 2025-09-08 0 2 分享 微博 QZONE 微信 LayaAir大为 赞同来自:...

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

1818. 骨骼动画进阶(ActionScript-2D进阶篇(AS3)-动画进阶) [ 76%]

...; //创建动画模板 templet = new Templet(); templet.on(Event.COMPLETE, this, parseComplete); templet.on(Event.ERROR, this, onError); //加载动画文件 templet.loadAni("res/spine/goblins/goblins.sk"); } private function onError():void { trace("parse error"); } private function parseComplete():...

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

1819. 调用Sprite的drawToCanvas怎么返回的是uint8array [ 76%]

...         {                          var _canvas:* =this.drawToCanvas(this.width,this.height,0,0);             var base64:*  = _canvas._canvas.source.toDataURL();                         return base64;          } 附件 : --> 2017-04-01 添...

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

1820. 加载模型后如何取得在Unity的Transform.Rotation属性 [ 76%]

...位置(Transform.rotation)。 当我利用下式旋转后,         this.needle.transform.rotate(vect,false,false); 我可以看到模型transform.rotation值的变化,         console.log(this.needle.transform.rotation); 但是,我查看         console.log(this.needle.transform.ro...

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