Add lava lamp scene with soft-body blobs
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
(() => {
|
||||
const { Bodies } = Matter;
|
||||
const scenes =
|
||||
(window.PhysilinksSceneDefs = window.PhysilinksSceneDefs || []);
|
||||
const scenes = (window.PhysilinksSceneDefs =
|
||||
window.PhysilinksSceneDefs || []);
|
||||
|
||||
scenes.push({
|
||||
id: "scene1",
|
||||
@@ -12,6 +12,12 @@
|
||||
minChain: 3,
|
||||
palette: ["#ff595e", "#ffca3a", "#8ac926", "#1982c4", "#6a4c93"],
|
||||
ballRadius: 38,
|
||||
winCondition: {
|
||||
type: "score",
|
||||
target: 10000,
|
||||
onWin: { shoveBalls: true },
|
||||
nextSceneId: "scene2",
|
||||
},
|
||||
link: {
|
||||
stiffness: 0.85,
|
||||
lengthScale: 1.05,
|
||||
@@ -41,16 +47,10 @@
|
||||
render: { fillStyle: "#0ea5e9", strokeStyle: "#0ea5e9" },
|
||||
},
|
||||
),
|
||||
Bodies.rectangle(
|
||||
-wallThickness / 2,
|
||||
h / 2,
|
||||
wallThickness,
|
||||
wallHeight,
|
||||
{
|
||||
isStatic: true,
|
||||
render: { fillStyle: "#f97316", strokeStyle: "#f97316" },
|
||||
},
|
||||
),
|
||||
Bodies.rectangle(-wallThickness / 2, h / 2, wallThickness, wallHeight, {
|
||||
isStatic: true,
|
||||
render: { fillStyle: "#f97316", strokeStyle: "#f97316" },
|
||||
}),
|
||||
Bodies.rectangle(
|
||||
w + wallThickness / 2,
|
||||
h / 2,
|
||||
|
||||
Reference in New Issue
Block a user