大约有 2,023 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0064 秒)
Laya_社区(1419) Laya2.0_文档(233) Laya_示例(141) Laya2.0_示例(117) Laya3.0_api(61) Laya3.0_文档(39) Laya2.0_api(7) laya_api(6)
...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.bgColorTweener = new Tween(); this.setup(); } setup() { this.createPhoenixes(); // 动态背景渲染 this.evalBgColor(); Laya.timer.frameLoop(1, this, this.renderBg); } createPhoenixes() { let scaleFactor = Math.min( La...
来源: Laya2.0_示例 发布时间: 20241117
...s/threeDimen/skinModel/PangZi/PangZi-doubipangzi.lm"], Laya.Handler.create(this, onComplete)); var sprite3d1; var sprite3d2; var sprite3d3; var sprite3d4; var sphereMesh; var str5 = "旁白 : 秀恩爱,死得快! (MeshCollider)"; function onComplete(){ //添加精灵到场景 sprite3d1 = scene.a...
来源: Laya_示例 发布时间: 20241117
...)(); function setup() { initMatter(); initWorld(); Laya.stage.on("resize", this, onResize); } function initMatter() { var gameWorld = new Sprite(); Laya.stage.addChild(gameWorld); // 初始化物理引擎 engine = Matter.Engine.create( { enableSleeping: true }); Matter.Engine.run(engine); var render...
来源: Laya_示例 发布时间: 20241117
...开发更高效。class Physics_Physics_CollisionEvent { constructor() { this.count = 7; this.bodys = []; this.touching = []; 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....
来源: Laya2.0_示例 发布时间: 20241117
...= "bitmap"; Laya.stage.addChild(guideContainer); gameContainer.on("click", this, nextStep); //绘制遮罩区,含透明度,可见游戏背景 var maskArea = new Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContainer.addChi...
来源: Laya_示例 发布时间: 20241117
...ture/layabox.png"); box.meshRender.material = mat; Laya.timer.frameLoop(1, this, checkHit); var ray = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0)); var point = new Laya.Vector2(); var _position = new Laya.Vector3(0, 0.25, 0); var _quaternion = new Laya.Quaternion(); var _outHit...
来源: Laya_示例 发布时间: 20241117
...bgColor = "#232628"; Laya.loader.load([texture1, texture2], Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { ape = new Sprite(); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); // 显示默认纹理 switchTexture(); ape.on("c...
来源: Laya_示例 发布时间: 20241117
... function ListItemRender() { var label = null; ListItemRender.__super.call(this); this.size(100, 20); label = new Label(); label.fontSize = 12; label.color = "#FFFFFF"; this.addChild(label); this.setLabel = function(value) { label.text = value; } } Laya.class(ListItemRender, "ListItemRender", Box); ...
来源: Laya_示例 发布时间: 20241117
...ake() { Shake.instance.start(5, 500); Shake.instance.on(Laya.Event.CHANGE, this, onShake); console.text = '开始接收设备摇动\n'; } function onShake() { shakeCount++; console.text += "设备摇晃了" + shakeCount + "次\n"; if (shakeCount >= 3) { Shake.instance.stop(); console.text += "停止...
来源: Laya_示例 发布时间: 20241117
...aya.stage.loadImage("../../res/pixi/laserBG.jpg"); Laya.stage.frameLoop(1, this, animate); })(); function animate() { if (tick > frequency) { tick = 0; // iterate through the dudes and update the positions var laser = new Sprite(); laser.loadImage("../../res/pixi/laser0" + ((type % 5) + 1) + ".png")...
来源: Laya_示例 发布时间: 20241117