大约有 19 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0032 秒)
...ody, engine: engine }); // create two boxes and a ground var boxA = Bodies.rectangle(400, 200, 80, 80); var boxB = Bodies.rectangle(450, 50, 80, 80); var ground = Bodies.rectangle(400, 500, 810, 60, { isStatic: true }); // add all of the bodies to the world World.add(engine.world, [boxA, boxB, groun...
来源: Laya_社区 发布时间: 20170905
...mouseConstraint.mouse; } function initWorld() { var ground = Matter.Bodies.rectangle(395, 600, 815, 50, { isStatic: true, render: { visible: false } }), rockOptions = { density: 0.004, render: { sprite: { texture: '../../res/physics/img/rock.png', xOffset: 23.5, yOffset: 23.5 } } }, rock = Matter.Bo...
来源: Laya_示例 发布时间: 20241118
...nner.run(engine); LayaRender.run(render); World.add(engine.world, [ Bodies.rectangle(200, 150, 500, 20, { isStatic: true, angle: Math.PI * 0.06 }), Bodies.rectangle(500, 350, 1650, 20, { isStatic: true, angle: -Math.PI * 0.06 }), Bodies.rectangle(300, 560, 1600, 20, { isStatic: true, angle: Math.PI ...
来源: Laya_社区 发布时间: 20170728
..., 50, 8, 1, 10, 10, function(x, y) { return Bodies.rectangle(x, y, 50, 20, { collisionFilter: { group: group } }); }); Composites.chain(ropeA, 0.5, 0, -0.5, 0, { stiffness: 0.8, length: 2, render: { type: 'line' } }); ...
来源: Laya_社区 发布时间: 20180323
.../2, h/2); sp.graphics.fillTexture(text, 0, 0, w, h); partA = Matter.Bodies.rectangle(x, y, w, h, { isStatic:true, layaSprite:sp, }); sp = new Laya.Sprite(); w = size/5, h=size; sp.pivot(w/2, h/2); sp.graphics.fillTexture(text, 0, 0, w, h); partB = Matter.Bodies.rectangle(x, y, w, h, { isStatic:tru...
来源: Laya_社区 发布时间: 20180625
...oth, Matter.Bodies.circle(300, 500, 80, { isStatic: true }), Matter.Bodies.rectangle(500, 480, 80, 80, { isStatic: true }) ]); } function onResize() { // 设置鼠标的坐标缩放 Matter.Mouse.setScale( mouseConstraint.mouse, { x: 1 / (Laya.stage.clientScaleX * Laya.stage._canvasTransform.a), y: 1...
来源: Laya_示例 发布时间: 20241118
...; var space:Number = 600/5; Matter.World.add(engine.world, [ Matter.Bodies.rectangle(100+space*0,150,50,50,{ restitution: rest}), Matter.Bodies.circle(100+space*3,150,25,{ restitution: rest}), // walls Matter.Bodies.rectangle(400, 0, 800, 50, { isStatic: true }), Matter.Bodies.rectangle(400, 600, 80...
来源: Laya_社区 发布时间: 20171214
...():void { var ground1:* = Matter.Bodies.rectangle(500, 0, 1000, 20, {isStatic: true, render: {fillStyle: '#edc51e', strokeStyle: '#b5a91c'}}); var ground2:* = Matter.Bodies.rectangle(0, 500, 20, 1000, {isStatic: true, render: {fillStyle: '#edc5...
来源: Laya_社区 发布时间: 20170822
...', xOffset: 116 / 2, yOffset: 98 / 2 - 2 } } this._body = Matter.Bodies.rectangle(WinWidth / 4, WinHeight / 2, 75, 70, birdOptions); 第一个问题是透明度opacity设置无效 第二个问题: 上面这个是初始化,后面在游戏过程中...
来源: Laya_社区 发布时间: 20180611
...width / 2, ball_skin.height / 2); var ball = Matter.Bodies.rectangle(330, 1,50, 80, { layaSprite: ball_skin, // 绑定一个laya的Sprite, 不能用render.sprite density: 1, // 密度 restitution: 0.1// 弹性 }); Matt...
来源: Laya_社区 发布时间: 20170721