大约有 517 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0037 秒)
...境有问题? /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
...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
...ignV = Stage.ALIGN_MIDDLE; Laya.loader.load(compassImgPath, Handler.create(this, init)); })(); function init() { // 创建罗盘 createCompass(); // 创建方位指示器 createDirectionIndicator(); // 画出其他UI drawUI(); // 创建显示角度的文本 createDegreesText(); Gyroscope.instance.on...
来源: Laya_示例 发布时间: 20241117
...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_示例 发布时间: 20241117
...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_示例 发布时间: 20241117
...放音乐"); 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
...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_示例 发布时间: 20241117
.../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, 75, 110); }); var _position = new Laya.Vector3(); var _quaternion = new La...
来源: Laya_示例 发布时间: 20241117
...../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh", Laya.Handler.create(this, onComplete)); function onComplete() { var layaMonkey = scene.addChild(Laya.Sprite3D.load("../../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh")); //克隆sprite3d var layaMonkey_clone1 = Laya.Sprite3D.instantiate(la...
来源: Laya_示例 发布时间: 20241117
...r; var WebGL = Laya.WebGL; function Segment(width, height) { Segment.super(this); Segment.prototype.init = function() { this.graphics.drawRect(-height / 2, -height / 2, width + height, height, "#FF7F50"); } // 获取关节另一头位置 Segment.prototype.getPinPosition = function() { var radian = t...
来源: Laya_示例 发布时间: 20241117