大约有 28 项符合查询结果, 库内数据总量为 30,786 项。 (搜索耗时: 0.0021 秒)
...); function createSprite() { sp = new Sprite(); sp.graphics.drawRect(0, 0, 200, 200, "#D2691E"); sp.pivot(100, 100); sp.x = Laya.stage.width / 2; sp.y = Laya.stage.height / 2; sp.size(200, 200); Laya.stage.addChild(sp); sp.on(ROTATE, this, onRotate); // 侦听自定义的事件 sp.on(Event.CLICK, th...
来源: Laya_示例 发布时间: 20241124
...nteractiveTarget() { var rect = new Sprite(); rect.graphics.drawRect(0, 0, 200, 200, "#D2691E"); rect.size(200, 200); rect.x = (Laya.stage.width - 200) / 2; rect.y = (Laya.stage.height - 200) / 2; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, mouseHandler); rect.on(...
来源: Laya_示例 发布时间: 20241124
...ateCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya....
来源: Laya_示例 发布时间: 20241124
...ateCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya....
来源: Laya_示例 发布时间: 20241124
...ateCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya....
来源: Laya_示例 发布时间: 20241124
...ateCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya....
来源: Laya_示例 发布时间: 20241124
...ya.stage.bgColor = "#232628"; setup(); })(); function setup() { var vGap = 200; rotateTimeBasedText = createText("基于时间旋转", Laya.stage.width / 2, (Laya.stage.height - vGap) / 2); rotateFrameRateBasedText = createText("基于帧频旋转", rotateTimeBasedText.x, rotateTimeBasedText.y + vGa...
来源: Laya_示例 发布时间: 20241124
...up }, render: { visible: false } }; var cloth = Matter.Composites.softBody(200, 200, 20, 12, 5, 5, false, 8, particleOptions); for (var i = 0; i < 20; i++) { cloth.bodies[i].isStatic = true; } Matter.World.add(engine.world, [ cloth, Matter.Bodies.circle(300, 500, 80, { isStatic: true }), Matter.Bodi...
来源: Laya_示例 发布时间: 20241124
...me = "暗紫色矩形容器"; darkOrchidRect.graphics.drawRect(-100, -100, 200, 200, "#9932CC"); darkOrchidRect.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(darkOrchidRect); // 为true时,碰撞区域会被修正为实际显示边界 // mouseThrough命名真是具有强烈...
来源: Laya_示例 发布时间: 20241124
... = Laya.Handler; var WebGL = Laya.WebGL; var SPACING = 150; var X_OFFSET = 200; var Y_OFFSET = 200; var skins; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = St...
来源: Laya_示例 发布时间: 20241124