Skip to content

Commit

Permalink
deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
abernier committed Jul 24, 2024
1 parent e47f721 commit a3ca165
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.0.1",
"exports": {
"./CheesyCanvas": "./src/CheesyCanvas.jsx",
"./deterministic-random": "./src/deterministic-random.js"
"./deterministic": "./src/deterministic.js"
},
"bin": {
"vite-build": "./bin/build.mjs"
Expand Down
6 changes: 0 additions & 6 deletions packages/examples/src/deterministic-random.js

This file was deleted.

13 changes: 13 additions & 0 deletions packages/examples/src/deterministic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import seedrandom from "seedrandom";
seedrandom("hello.", { global: true });

var style = document.createElement("style");
style.innerHTML = `
canvas[data-engine] {
animation: none !important;
transition: none !important;
opacity: 1!important;
}
`;
document.head.appendChild(style);
4 changes: 2 additions & 2 deletions packages/examples/src/vite-plugin-monkey.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function vitePluginMonkey() {
// In `src/index.[jt]sx`, add to the top of the file:
//
// ```
// import '@pmndrs/examples/deterministic-random';
// import '@pmndrs/examples/deterministic';
// ```
//

Expand All @@ -32,7 +32,7 @@ export default function vitePluginMonkey() {
// Insert the import statement at the top of the file
const importDeclaration = t.importDeclaration(
[],
t.stringLiteral("@pmndrs/examples/deterministic-random")
t.stringLiteral("@pmndrs/examples/deterministic")
);

path.node.body.unshift(importDeclaration);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a3ca165

Please sign in to comment.