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

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

2021. 动画状态脚本(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 68%]

...本,并且绑定 _text 文本 ```typescript //创建一个动画状态 var state2 = new Laya.AnimatorState(); state2.name = "ride"; state2.clipStart = 0 / 581; state2.clipEnd = 33 / 581; state2.clip = animator.getDefaultState().clip; state2.clip.islooping = true; //给该动画状态添加脚本 v...

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

2022. 文本对齐与自动换行(JavaScript-LayaAir基础篇(JS)-文本) [ 68%]

...将不会有效果。 ```javascript //初始化引擎 Laya.init(1136,640); var txt = new Laya.Text(); //设置文本内容 txt.text = "hello_world"; //设置文本区背景 txt.bgColor = "#c30c30"; //设置文本的宽高 txt.width = 400; txt.height = 400; //设置文本水平居中 txt.align = "cen...

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

2023. 解析sk资源报错 [ 68%]

...  public class CombatRole extends BaseRole     {         private var _templet:Templet;         public function CombatRole()         {             super();             initView();         }                  private function initView():void  ...

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

2024. 鼠标事件能否在有图形的区域感应,特别是子项坐标为负数时(已经找到问题) [ 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

2025. 摄像机不在原点的时候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

2026. 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

2027. 关于适配有点疑惑 [ 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

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

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

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

2029. 添加射线后,预览运行界面一块黑 [ 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

2030. 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