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

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

171. 切换后台时,引擎如何判断是否停止定时器? [ 74%]

...      constructor() {         super();          this.stage.on(Laya.Event.FOCUS, this, this.onFocus);         this.stage.on(Laya.Event.BLUR, this, this.onBlur);         Laya.timer.frameLoop(1,this,this.onFrameLoop);     }      private onFrameLoop():void{...

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

172. sprite 设置为静态变量后,无法从舞台移除 [ 74%]

...WebGL); Stat.show(); sp=new Sprite(); sp.loadImage("background.jpg"); Laya.stage.addChild(sp); Laya.stage.on(Event.CLICK,this,onClick); function onClick():void { // TODO Auto Generated method stub Laya.stage.off(Event.CLICK,this,onClick); Laya.stage.removeChild(sp); Loader.clearRes("background.jpg")...

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

173. 精灵添加名称 [ 74%]

...#eeb9b3");         sp.on(Event.CLICK,this, onsp);         Laya.stage.addChild(sp);   }   private function onsp(e:Event){              console.log("监听到按钮"+e.target);              console.log((e.target.getChildAt(0) as Sprite).name);              console.l...

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

174. 关于event中只读属性touches,问题,求解 [ 74%]

...DemoTouch { public function DemoTouch() { Laya.init(800, 600, WebGL); Laya.stage.bgColor = "#232628"; var txt:Text = new Text(); txt.text = "hello"; txt.color = "#FF00FF"; txt.width = 100; txt.height = 100; txt.x = 200; txt.y = 100; txt.fontSize = 50; txt.on("click", this, onFunc); Laya.stage.addChi...

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

175. 3D中摄像机绕物体旋转该如何实现? [ 74%]

...Distance = Vector3.distance(this.transform.position, this.AroundPos); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.mouse...

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

176. 射线检测-放置物体 [ 74%]

...言、LayaAirIDE让项目开发更高效。Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; var scene = Laya.stage.addChild(new Laya.Scene()); //初始化照相机 var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera....

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

177. Spine适配版(TypeScript-LayaAir基础篇(TS)-动画基础) [ 74%]

...or() { Laya.init(Laya.Browser.width, Laya.Browser.height,Laya.WebGL); Laya.stage.scaleMode = Laya.Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; Laya.Stat.show(); this.startFun(); } private startFun(): void { //创建动画模板 this.templet = Laya.SpineTempletBinary(); this.templet.loadAni(t...

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

178. 如何实现3d遮罩效果? [ 74%]

...方法能够将当前渲染导出到Sprite显示 package threeDimen.primaryStage { import laya.d3.component.animation.SkinAnimations; import laya.d3.core.Camera; import laya.d3.core.MeshSprite3D; import laya.d3.core.material.StandardMaterial; import laya.d3.core.scene.Scene; import laya.d3.math.Vect...

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

179. 官方案例里摄像机绕物体旋转脚本的问题 [ 74%]

...Distance = Vector3.distance(this.transform.position, this.AroundPos); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.mouse...

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

180. LayaFlash如何使用chrome调试问题? [ 73%]

...nts.Event; public class Main extends Sprite { public function Main() { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(event:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); IFlash.setSize(960, 640); //2D项目中设置场景尺寸 I...

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