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

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

311. Sprite3D添加组件或脚本(ActionScript-3D基础(AS3)-LayaAir3D之精灵) [ 83%]

...function onComplete():void { //记载场景 var scene:Scene3D = Laya.stage.addChild(new Scene3D()) as Scene3D; //加载相机 var camera:Camera = scene.addChild(new Camera(0, 0.1, 100)) as Camera; camera.transform.translate(new Vector3(0, 0.8, 1.5)); camera.transform.rotate(new Vector3(-15, 0, 0), t...

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

312. 导出的3D资源加载报错 [ 83%]

...odelOK():void { //添加3D场景 var scene:Scene = new Scene(); Laya.stage.addChild(scene); //创建摄像机(横纵比,近距裁剪,远距裁剪) var camera:Camera = new Camera( 0, 0.1, 1000); //加载到场景 scene.addChild(camera); //旋转摄像机角度 camera.transform.rotate(new Vector3(...

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

313. 鼠标交互-Hold [ 83%]

...ge.width / 2, Laya.stage.height / 2); this.ape.scale(0.8, 0.8); Laya.stage.addChild(this.ape); // 鼠标交互 this.ape.on(Event.MOUSE_DOWN, this, this.onApePress); } onApePress(e) { const Event = Laya.Event; // 鼠标按下后,HOLD_TRIGGER_TIME毫秒后hold Laya.timer.once(HOLD_TRIGGER_TIME, this...

来源: Laya2.0_示例 发布时间: 20241124

314. 分享:DrawToCanvas内存释放问题! [ 83%]

...加被截屏对象 sp= new Sprite(); sp.loadImage("bg2.png"); Laya.stage.addChild(sp); //创建DrawToCanvas命令按钮 var btnDraw:Sprite=CreateBtn(100,400); btnDraw.on(Event.CLICK,this,onClickBtnDraw); } //创建按钮 private function CreateBtn(xx:int,yy:int):Sprite { var btn:Sprite=new Sprite();...

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

315. laya2.7.3 Cannon物理设置了ColliderShape的localOffset属性 并 isKinematic=true时模型会匀速移动 [ 83%]

...stage.alignV = "top"; Laya.stage.alignH = "left";  let scene = Laya.stage.addChild(new Laya.Scene3D());  let camera = new Laya.Camera(0, 0.1, 100); scene.addChild(camera); camera.transform.translate(new Laya.Vector3(0, 2, 5)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false);  le...

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

316. 鼠标交互-双指缩放(多点触控) [ 83%]

...2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length == 2) { lastDistance = getDistance(touches); Laya.stage.on(Event.MOUSE_MOVE, this, o...

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

317. 其他引擎的Demo-Example_23 [ 83%]

...2(distY, distX) + Math.PI) * 180 / Math.PI; lasers.push(laser); Laya.stage.addChild(laser); frequency *= 0.9; } for (let i = 0; i 60 * 0.3) { laser.alpha *= 0.9; laser.scaleY = laser.alpha; if (laser.alpha = []; private tick: number = 0; private frequency: number = 80; private type: number = 0; cons...

来源: Laya2.0_示例 发布时间: 20241124

318. 官方LayaAir之灯光一节示例背景在微信里表现不一致 [ 83%]

...启统计信息 Laya.Stat.show(); //添加3D场景 var scene = Laya.stage.addChild(new Laya.Scene()); //创建摄像机(纵横比,近距裁剪,远距裁剪) var camera:Laya.Camera = new Laya.Camera(0,0.1,100); //加载到场景 scene.addChild(camera); //移动摄像机位置 camera.transform...

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

319. Cannot read property 'toDefault' of undefined报错是什么原因 [ 83%]

...sePickingScene.super(this); this.camera = new Laya.Camera(0,0.1,100); this.addChild(this.camera); this.camera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY; this.skyBox = new Laya.SkyBox(); this.camera.sky = this.skyBox; this.skyBox.textureCube = Laya.TextureCube.load("skyBox/skyCube.ltc"); this.camera....

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

320. 求助 Uncaught SyntaxError: Unexpected identifier [ 83%]

...数据 Stat.show(); // 给舞台添加laya3d场景 var scene= Laya.stage.addChild(new Scene()) as Scene; //初始化照相机 var camera = scene.addChild(new Camera()) as Camera; camera.transform.position = new Vector3(0, 3, 3); camera.transform.rotate(new Vector3( -45, 0, 0), true, false); camera.a...

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