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

大约有 3,979 项符合查询结果, 库内数据总量为 30,906 项。 (搜索耗时: 0.0070 秒)

2021. 鼠标事件能否在有图形的区域感应,特别是子项坐标为负数时(已经找到问题) [ 68%]

...te; import laya.events.Event; public class MainUi extends Sprite { private var testPan:Sprite; public function MainUi() { super(); this.graphics.drawRect(0,0,500,500,"#fff0cc"); testPan = new Sprite(); testPan.name = "testPan"; this.addChild( testPan ); testPan.pos( 300,300); testPan.graphics.drawRe...

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

2022. 摄像机不在原点的时候3D空间转2D空间会失效? [ 68%]

...his._outHitInfo.position, this.camera.projectionViewMatrix, this._outPos); var x = this._outPos.x / Laya.stage.clientScaleX; var y = this._outPos.y / Laya.stage.clientScaleY; console.log("x = ", x, "y = ", y); 但是发现,当摄像机在原点的时候,上述转换没有任何问题,而摄像...

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

2023. Sprite.loadImage()中设置的y的值为Browser.ClientHight时不准确是为什么? [ 68%]

...mage()中设置的y的值为Browser.ClientHight时不准确是为什么? var dirBgLeft=cameraBgRight=20,dirBgBottom=20,dirBgSize=Browser.clientHeight*0.5,dirSpace=dirBgSize*0.2; var directionBg = new Sprite(); directionBg.loadImage("../bin/res/img/btn_direction$bg.png",dirBgLeft,Browser.clientHeig...

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

2024. 关于适配有点疑惑 [ 68%]

...我分别用noscale, fixedwidth, fixedheight进行试验, 代码如下:var rect; (function() { Laya.init(550, 400); // Laya.stage.scaleMode = Stage.SCALE_SHOWALL; // Laya.stage.scaleMode = "noscale"; // Laya.stage.scaleMode = "fixedwidth"; Laya.stage.scaleMode = "fixedheight"; Laya.stage.bgColor...

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

2025. 阿拉伯语言的显示都是反的 [ 68%]

... /**是否是从右向左的显示顺序*/         public static var RightToLeft:Boolean = false;   /**          * 设置文字排版模式为右到左。          */         public static function setTextRightToLeft():void         {             ...

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

2026. 添加射线后,预览运行界面一块黑 [ 68%]

...@仓颉:已经重现了,问题是Laya.Vector3.ZERO被修改了 把代码 var ray:Laya.Ray = new Laya.Ray(Laya.Vector3.ZERO,Laya.Vector3.ZERO); 改为 var ray:Laya.Ray = new Laya.Ray(new Laya.Vector3(0,0,0),new Laya.Vector3(0,0,0)); 就没问题了 仓颉 • 2023-02-20 15:35 @LayaAir3:谢谢 仓...

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

2027. HTMLDivElement下划线换行时,下划线颜色错误 [ 68%]

...proto.createOneLine=function(startWord,lastWords,hasLine,graphic,recList){ var lineY=lastWords.y+lastWords.height; if(hasLine) graphic.drawLine(startWord.x,lineY,lastWords.x+lastWords.width,lineY,this.color,1); var hitRec=HTMLHitRect.create(); hitRec.rec.setTo(startWord.x,lastWords.y,lastWords.x+las...

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

2028. 特效LOADED监听不到 [ 68%]

... null, Loader.ATLAS); } private function createAnimation(_e:*=null):void { var ani:Animation = new Animation(); ani.loadAtlas(AniConfPath); // 加载图集动画 ani.interval = 30; // 设置播放间隔(单位:毫秒) ani.index = 1; // 当前播放索引 ani.play(); // 播放图集动画 // ...

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

2029. ViewStack属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 68%]

...示。 ![动图4](img/4.gif)(动图4) **Tips**: **ViewStack组件的Var值必须要设置,在编写代码时需要通过Var声名的全局变量来控制ViewStack组件,从而改变selectedIndex的属性,实现页面的切换。本例中采用的是viewStack,如动图4右上角所示...

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

2030. 发布到微信小游戏后Timer的getHandler报错了 [ 68%]

...ID时报错了 /**@private */ __proto._getHandler=function(caller,method){ var cid=caller ? caller.$_GID || (caller.$_GID=Utils.getGID()):0; var mid=method.$_TID || (method.$_TID=(this._mid++)*100000); return this._map[cid+mid]; } 请教一下大家,有遇到过这个问题吗?请问怎么解决...

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