大约有 3,990 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0095 秒)
Laya_社区(2836) Laya2.0_文档(369) Laya2.0_api(225) laya_api(169) Laya_示例(157) Laya2.0_示例(117) Laya3.0_api(62) Laya3.0_文档(55)
...本,并且绑定 _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
...将不会有效果。 ```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
... public class CombatRole extends BaseRole { private var _templet:Templet; public function CombatRole() { super(); initView(); } private function initView():void ...
来源: Laya_社区 发布时间: 20170204
...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
...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
...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
...我分别用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
... /**是否是从右向左的显示顺序*/ public static var RightToLeft:Boolean = false; /** * 设置文字排版模式为右到左。 */ public static function setTextRightToLeft():void { ...
来源: Laya_社区 发布时间: 20180703
...@仓颉:已经重现了,问题是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
...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