<script>zns=true</script>
import zim from "https://zimjs.org/cdn/017/zim";
import { Pane } from "https://cdn.jsdelivr.net/npm/tweakpane@4.0.5/dist/tweakpane.min.js";
window.PaneGUI = Pane;
var params = {
instances: 200, // Default to 1 million
cubeScale: 10,
autoRotate: true
};
const pane = new PaneGUI({
title: "调节参数",
expanded: true
});
pane.addBinding(params, "instances", { min: 100, max: 250000, step: 100 });
pane.addBinding(params, "cubeScale", {
min: 0.001,
max: 0.05,
step: 0.001
}).on("change", (evt) => {});
pane.addBinding(params, "autoRotate");
// this would make everything global except Pane
// yet... there is still a conflict - so use zim mamespace
// zimplify(["Pane"]);
new zim.Frame(FIT, 1024, 768, blue, darker, ready);
function ready(F, S, W, H) {
// given F (Frame), S (Stage), W (width), H (height)
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.