JavaScript
语言:
JaveScriptBabelCoffeeScript
确定
var player = document.createElement('audio')
player.src = '/uploads/141102/paradise_circus.mp3';
player.autobuffer = true;
// Uncomment the following line to activate the music
player.play();
// Timing - Static value used to match up with the music
// x and y are the values that gravity alternates between
// for each axis (between -1 and +1 multiplied by this value).
// They are dynamically updated.
var params = {
timing: 675,
x: 0,
y: 0,
};
var Bodies = Matter.Bodies;
var Composites = Matter.Composites;
var Constraint = Matter.Constraint;
var Engine = Matter.Engine;
var Events = Matter.Events;
var MouseConstraint = Matter.MouseC