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

大约有 520 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0041 秒)

351. 灯光-方向光 [ 67%]

.../LayaMonkey/LayaMonkey.lh")); layaMonkey.once(Laya.Event.HIERARCHY_LOADED, this, function () { var aniSprite3d = layaMonkey.getChildAt(0); var animator = aniSprite3d.getComponentByType(Laya.Animator); animator.play(null, 1.0, 40, 70); }); var _quaternion = new Laya.Quaternion(); Laya.timer.frameLoop...

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

352. LayaBox如何多点触摸? [ 67%]

...h = 960; bmp.height = 640; var sp:Sprite = new Sprite(); sp.addChild(bmp); this.addChildAt(sp, 0); Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; sp.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin); } protected function onTouchBegin(event:TouchEvent):void { log(event.touchPointID.toSt...

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

353. 2D物理-碰撞过滤器 [ 67%]

...{ 'use strict'; class Physics_Physics_CollisionFiltering { constructor() { this.preMovementX = 0; this.preMovementY = 0; Laya.Config.isAntialias = true; Laya.Laya.init(1200, 700, Laya.WebGL); Laya.Stat.show(); Laya.Physics.enable(); Laya.PhysicsDebugDraw.enable(); Laya.Laya.stage.alignV = Laya.Stage...

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

354. mac下用FB打包发布测试页面,chrome浏览器看不到预期显示文字 [ 67%]

...境有问题?   /LayaAirTest/src/LayaAirTest.as (8):warning:Laya.init This variable is not defined. /LayaAirTest/src/LayaAirTest.as (9):warning:Laya.timer.currTimer This variable is not defined. /LayaAirTest/src/LayaAirTest.as (20):warning:Laya.stage.bgColor This variable is not defined. /LayaAir...

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

355. Sprite-显示图片 [ 66%]

...drawTexture Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, function() { var t = Laya.loader.getRes("../../res/apes/monkey2.png"); var ape = new Sprite(); ape.graphics.drawTexture(t, 0, 0); Laya.stage.addChild(ape); ape.pos(200, 0); })); } })();module laya { import Sprite = Laya....

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

356. Laya 中用什么事件可以检测声音是否播放结束? [ 66%]

...放音乐"); SoundManager.playMusic("res/sounds/bgm.mp3", 1, new Handler(this, onComplete)); } private function onPlaySound(e:Event=null):void { trace("播放音效"); SoundManager.playSound("res/sounds/btn.mp3", 1, new Handler(this, onComplete)); }播放声音或音效的第3个参数就是播放...

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

357. 输入设备-指南针 [ 66%]

...ignV = Stage.ALIGN_MIDDLE; Laya.loader.load(compassImgPath, Handler.create(this, init)); })(); function init() { // 创建罗盘 createCompass(); // 创建方位指示器 createDirectionIndicator(); // 画出其他UI drawUI(); // 创建显示角度的文本 createDegreesText(); Gyroscope.instance.on...

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

358. Sprite-显示图片 [ 66%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.showApe(); } showApe() { const monkey1Path = "./res/apes/monkey1.png", monkey2Path = "./res/apes/monkey2.png"; // 方法1:使用loadImage let ape = new Laya.Sprite(); Laya.stage.addChild(ape); ape.loadImage(monkey1Path...

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

359. 输入设备-指南针 [ 66%]

...stage.bgColor = "#232628"; Laya.loader.load(compassImgPath, Handler.create(this, this.init)); } init() { const Gyroscope = Laya.Gyroscope, Event = Laya.Event; // 创建罗盘 this.createCompass(); // 创建方位指示器 this.createDirectionIndicator(); // // 画出其他UI this.drawUI(); // // 创...

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

360. 图集制作与使用详解(ActionScript-IDE篇(AS3)-使用IDE创作) [ 66%]

...集使用示例 Laya.loader.load("./res/atlas/test.atlas", Handler.create(this, onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图集配置信息,在加载`.json`文件的图集时,需要...

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