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

大约有 1,208 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0103 秒)

311. 照相机-正交相机 [ 75%]

...E; /** * (pos.x pos.y) 屏幕位置 * pos.z 深度取值范围(-1,1); * */ var pos = new Laya.Vector3(310,500,0); var _translate = new Laya.Vector3(0, 0, 0); var dialog = Laya.stage.addChild(new Laya.Image("../../res/cartoon2/background.jpg")); var scene = Laya.stage.addChild(new Laya.Scene()); var ...

来源: Laya_示例 发布时间: 20240930

312. hBox使用问题 [ 75%]

...r.create(this, onAssetLoaded)) private function onAssetLoaded():void { for(var i:int=0;i<picAy.length;i++) { var texture:Texture= Loader.getRes(picAy); var ape:Sprite = new Sprite; //ape.x=i*(stageWidth/4) //Tween.to(ape, { x : i*(stageWidth/4) },1500,Ease.sineOut); var bl:Number=texture.width/te...

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

313. [LayaAir2] 在使用videoDom创建视频元素后iPad跟iPhone中位置不一样 [ 75%]

... ot%3B,1); this.htmlvideo.video.addEventListener("loadedmetadata",()=>{ var videoTexture:Laya.VideoTexture = new Laya.VideoTexture(); videoTexture.video = this.htmlvideo.video; videoTexture.video.play(); videoTexture.video.loop = true; var texture2D = new Laya.Texture2D(videoTexture.video.videoWi...

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

314. 分享:LayaAir下Loading进度条的制作(ActionScript 3.0) [ 75%]

...ProgressBar; import laya.utils.Handler; public class LoadingDemo { private var progressBar:ProgressBar; public function LoadingDemo() { Laya.init(550,400); //预加载loading条资源 var pro1:Object={url:"loads/progressBar.png",type:Loader.IMAGE}; var pro2:Object={url:"loads/progressBar$bar.png",ty...

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

315. Sprite中的width,height和size(width,height)感觉没作用啊 [ 74%]

...你可以通过先clear在drawTexture的方法设置下,代码如下: var sprite = new laya.display.Sprite(); sprite.loadImage("comp/bg.png",0,0,0,0,Handler.create(this,function(texture:laya.resource.Texture){         sprite.graphics.clear();         sprite.graphics.drawTexture(textu...

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

316. laya.ui.View [ 74%]

...果可以当作图片源,再次绘制到其他Sprite里面,示例: var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 var texture:Texture = new Texture(htmlCanvas);//使用htmlCanvas创建Texture var sp:Sprite = new Sprite().pos(0, 200);//创建精...

来源: laya_api 发布时间: 20170929

317. normalizedViewport修改问题 [ 74%]

...'normalizedViewport',function(){ if (!this._viewportExpressedInClipSpace){ var vp=this._viewport; var size=this.renderTargetSize; var sizeW=size.width; var sizeH=size.height; this._normalizedViewport.x=vp.x / sizeW; this._normalizedViewport.y=vp.y / sizeH; this._normalizedViewport.width=vp.width / s...

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

318. 新手入坑请教下各位大神关于LayaMaxUI问题 [ 74%]

...import View=Laya.View; import Dialog=Laya.Dialog; import Scene=Laya.Scene; var REG: Function = Laya.ClassUtils.regClass; export module ui.test { export class TestSceneUI extends Laya.Scene {         public scoreLbl:Laya.Label;         public tipLbll:Laya.Label; constructor(){ super()...

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

319. LayaFlash getQualifiedClassName和组件定义问题 [ 74%]

...继承一个基类,让子类继承去修改子类的属性值。或者 var Classs:Class=ApplicationDomain.currentDomain.getDefinition("Rect") as Class; var mcOne:MovieClip=new Classs() as MovieClip; mcOne.speed=10; addChild(mcOne); var mcTwo:MovieClip=new Classs() as MovieClip; mcTwo.spe...

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

320. 如何获取脚本组件中动效模板实例对象? [ 74%]

...对象身上的动效模板实例啊?如果是UI类,可以通过设置var变量,在UI类中直接this.动效模板名字使用,但是脚本组件中怎么办呢?脚本组件中,即使设置了var变量,也是无法获取到这个动效模板对象的啊?求解? 2021-01-25 添加评...

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