大约有 1,037 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0055 秒)
Laya_社区(608) Laya2.0_文档(86) Laya3.0_api(75) Laya2.0_api(62) laya_api(57) Laya2.0_示例(53) Laya_示例(49) Laya3.0_文档(47)
...ation(); container.addChild(ani); ani.loadAtlas('1.json'); ani.play(); ani.pos(300,0); const d1 = 484; const d2 = 1438; const d3 = 950; const d4 = 1920; const container2 = new Laya.Sprite(); Laya.stage.addChild(container2); const mask2 = new Laya.Sprite(); mask2.graphics.drawPoly(d1, 0, [0, 0, d4 - ...
来源: Laya_社区 发布时间: 20170915
...d() { ape = new Sprite(); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.pos(200, 200); // 显示默认纹理 switchTexture(); ape.on("click", this, switchTexture); } function switchTexture() { var textureUrl = (flag = !flag) ? texture1 : texture2; // 更换纹理 ape.graphics.clear(); ape.loadIma...
来源: Laya2.0_文档 发布时间: 20210715
...w, h, "#FF7F50"); this.sp.size(w, h); this.sp.pivot(w / 2, h / 2); this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event = Laya.Event; // 手机上才有 touches 属性 let touches = e.touches; if (touches && to...
来源: Laya2.0_示例 发布时间: 20251130
...te0.loadImage("creatRoom/background_bk.png"); sprite0.pos(0,0 ); sprite0.cacheAsBitmap = true; Laya.stage.addChildAt(sprite0,0); var sprite1:Sprite = new Sprite(); sprite1.l...
来源: Laya_社区 发布时间: 20170314
... createSubmit(context:WebGLContext2D, ib:IndexBuffer2D, vb:VertexBuffer2D, pos:int, sv:Value2D):Submit { var o:Submit = _cache._length ? _cache[--_cache._length] : new Submit(); if (vb == null) { ...
来源: Laya_社区 发布时间: 20190628
...der.getRes(apePath); ape.pivot(texture.width / 2, texture.height / 2); ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); ape.scale(0.8, 0.8); Laya.stage.addChild(ape); // 鼠标交互 ape.on(Event.MOUSE_DOWN, this, onApePress); } function onApePress(e) { // 鼠标按下后,HOLD_TRIGGER_TIME毫...
来源: Laya_示例 发布时间: 20251130
...9-04 1 2 分享 微博 QZONE 微信 devilsome 赞同来自: shader错了,pos处理没有加上世界坐标变换,要乘上mmat 如下 vec4 pos =mmat*vec4(position.x,position.y,0,1); 2017-09-04 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 ...
来源: Laya_社区 发布时间: 20170904
...e(htmlCanvas);//使用htmlCanvas创建Texture var sp:Sprite = new Sprite().pos(0, 200);//创建精灵并把它放倒200位置 sp.graphics.drawTexture(texture);//把截图绘制到精灵上 Laya.stage.addChild(sp);//把精灵显示到舞台 也可以获取原始图片数据,分享到网上,从而...
来源: laya_api 发布时间: 20170929
...s/monkey2.png"); Laya.stage.addChild(target); target.pivot(55, 72); target.pos(100,100); } function createTimerLine() { timeLine.addLabel("turnRight",0).to(target,{x:450, y:100, scaleX:0.5, scaleY:0.5},2000,null,0) .addLabel("turnDown",0).to(target,{x:450, y:300, scaleX:0.2, scaleY:1, alpha:1},2000,...
来源: Laya_示例 发布时间: 20251130
...} find_StringAllIndex(str :String):String[]{ let pos_arr =[]; for(let i=0;i < str.length;i++){ let e = str.charAt(i); if (e=="1"){ let ii= i+1; ...
来源: Laya_社区 发布时间: 20210122