Changes to pc.scroll.pub

Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 7: container 1000px
+ - Video
+ https://www.youtube.com/watch?v=FRqeJB6JZJA
- Demo
- Simple Information Tracker
Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 6: container 1000px
-
- Demo
Breck Yunits
Breck Yunits
17 days ago
readme.md
Changed around line 1
+ Particle Chain Demos
+ ====================
+
+ Links
+ - Demo
+ /demo.html Demo
+ - Simple Information Tracker
+ https://sit.scroll.pub/ Simple Information Tracker
+ - Original blog post
+ https://breckyunits.com/particleChain.html Original blog post
Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 1
+ buildTxt readme.md
Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 1
- container 600px
+ container 1000px
- demoBody.scroll
- Demo
Changed around line 12: Links
- Simple Information Tracker
- Original blog post
- https://breckyunits.com/particleChain.html
+ https://breckyunits.com/particleChain.html
+
+ demoBody.scroll
Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 5: container 600px
- iframes demo.html
+ demoBody.scroll
- Demo
Breck Yunits
Breck Yunits
17 days ago
updated demoBody.scroll
demoBody.scroll
Changed around line 23: div
+ demo.js
Breck Yunits
Breck Yunits
17 days ago
updated demoIncludes.scroll
demoIncludes.scroll
Changed around line 1
- https://d3js.org/d3.v7.min.js
- demo.js
+ https://d3js.org/d3.v7.min.js
Breck Yunits
Breck Yunits
17 days ago
updated demoBody.scroll
demoBody.scroll
Changed around line 1
+ demoIncludes.scroll
Breck Yunits
Breck Yunits
17 days ago
updated demoIncludes.scroll
demoIncludes.scroll
Changed around line 1
+ demo.css
+ https://sdk.scroll.pub/products/Utils.browser.js
+ https://sdk.scroll.pub/products/Particle.browser.js
+ https://d3js.org/d3.v7.min.js
+ demo.js
Breck Yunits
Breck Yunits
17 days ago
updated demo.scroll
demo.scroll
Changed around line 1
- demo.css
- https://sdk.scroll.pub/products/Utils.browser.js
- https://sdk.scroll.pub/products/Particle.browser.js
- https://d3js.org/d3.v7.min.js
- demo.js
Breck Yunits
Breck Yunits
17 days ago
created demoIncludes.scroll
demoIncludes.scroll
Breck Yunits
Breck Yunits
17 days ago
updated demo.scroll
demo.scroll
Changed around line 1
+ demo.css
+ https://d3js.org/d3.v7.min.js
+ demo.js
- demo.css
- https://d3js.org/d3.v7.min.js
- demo.js
Breck Yunits
Breck Yunits
17 days ago
updated demo.scroll
demo.scroll
Changed around line 3: https://sdk.scroll.pub/products/Utils.browser.js
+ h1 ParticleChain Cryptocurrency Demo
+ style text-align: center; margin-bottom: 20px
Breck Yunits
Breck Yunits
17 days ago
updated demoBody.scroll
demoBody.scroll
Changed around line 1
- h1 ParticleChain Cryptocurrency Demo
- style text-align: center; margin-bottom: 20px
Breck Yunits
Breck Yunits
17 days ago
Deleted demo.html
demo.html
Changed around line 0
-
-
-
-
-
- type="text/javascript"
- src="https://sdk.scroll.pub/products/Utils.browser.js"
- >
-
- type="text/javascript"
- src="https://sdk.scroll.pub/products/Particle.browser.js"
- >
- ParticleChain Crypto Demo
-
-
-
-

- ParticleChain Cryptocurrency Demo
-
-
-
-

Network

-
-

- Network Nodes |
- Users |
- Transactions
-

-
-
-

Particle Chain

-
-
-
-

File Tree

-
-
-
-
-
-
-
-
Breck Yunits
Breck Yunits
17 days ago
updated demo.scroll
demo.scroll
Changed around line 1
+ buildHtml
Breck Yunits
Breck Yunits
17 days ago
updated demoBody.scroll
demoBody.scroll
Changed around line 2: h1 ParticleChain Cryptocurrency Demo
- div
+ div
- svg
- id networkCanvas
Breck Yunits
Breck Yunits
17 days ago
updated demoBody.scroll
demoBody.scroll
Changed around line 1
+ h1 ParticleChain Cryptocurrency Demo
+ style text-align: center; margin-bottom: 20px
+ div
+ class container
+ div
+ class section
+ h2 Network
+ svg
+ id networkCanvas
+ p
+ span Network Nodes
+ class node
+ span |
+ span Users
+ class user-node
+ span |
+ span Transactions
+ class message
+ div
+ class section
+ h2 Particle Chain
+ div
+ id chainContent
+ div
+ class section
+ h2 File Tree
+ div
+ id fileTree
Breck Yunits
Breck Yunits
17 days ago
created demoBody.scroll
demoBody.scroll
Breck Yunits
Breck Yunits
17 days ago
updated demo.scroll
demo.scroll
Changed around line 1
+ https://sdk.scroll.pub/products/Utils.browser.js
+ https://sdk.scroll.pub/products/Particle.browser.js
+ title ParticleChain Crypto Demo
+ demo.css
+ demoBody.scroll
+ https://d3js.org/d3.v7.min.js
+ demo.js
Breck Yunits
Breck Yunits
17 days ago
created demo.scroll
demo.scroll
Breck Yunits
Breck Yunits
17 days ago
updated demo.js
demo.js
Changed around line 1
+ // Network simulation setup
+ const svg = d3
+ .select("#networkCanvas")
+ .attr("width", "100%")
+ .attr("height", 400);
+
+ const width = 380;
+ const height = 400;
+
+ // Network nodes (5 validator nodes)
+ const networkNodes = Array.from({ length: 5 }, (_, i) => ({
+ id: `N${i}`,
+ x: Math.random() * width,
+ y: Math.random() * height * 0.7,
+ type: "network",
+ }));
+
+ // User nodes (3 users)
+ const userNodes = Array.from({ length: 3 }, (_, i) => ({
+ id: `U${i}`,
+ x: Math.random() * width,
+ y: height * 0.7 + Math.random() * height * 0.3,
+ type: "user",
+ }));
+
+ const allNodes = [...networkNodes, ...userNodes];
+
+ // Draw nodes
+ svg
+ .selectAll(".node")
+ .data(allNodes)
+ .enter()
+ .append("circle")
+ .attr("class", (d) => (d.type === "network" ? "node" : "user-node"))
+ .attr("r", 8)
+ .attr("cx", (d) => d.x)
+ .attr("cy", (d) => d.y);
+
+ // Transaction simulation
+ let transactionCount = 1;
+ const users = ["alice", "bob", "charlie"];
+ let balances = { alice: 100.0, bob: 50.0, charlie: 0.0 };
+
+ function simulateTransaction() {
+ // Random user-to-user transaction
+ const from = users[Math.floor(Math.random() * users.length)];
+ const to = users.filter((u) => u !== from)[Math.floor(Math.random() * 2)];
+ const amount = Math.floor(Math.random() * 10) + 1;
+
+ if (balances[from] < amount) return; // Skip if insufficient funds
+
+ // Create animated message
+ const userNode = userNodes.find((n) => n.id === `U${users.indexOf(from)}`);
+ const targetNode =
+ networkNodes[Math.floor(Math.random() * networkNodes.length)];
+
+ const message = svg
+ .append("circle")
+ .attr("class", "message")
+ .attr("cx", userNode.x)
+ .attr("cy", userNode.y);
+
+ message
+ .transition()
+ .duration(1000)
+ .attr("cx", targetNode.x)
+ .attr("cy", targetNode.y)
+ .on("end", () => {
+ // Network consensus simulation
+ networkNodes.forEach((node, i) => {
+ if (node !== targetNode) {
+ const relay = svg
+ .append("circle")
+ .attr("class", "message")
+ .attr("cx", targetNode.x)
+ .attr("cy", targetNode.y);
+
+ relay
+ .transition()
+ .duration(500)
+ .delay(i * 200)
+ .attr("cx", node.x)
+ .attr("cy", node.y)
+ .remove();
+ }
+ });
+
+ // After consensus, append to chain
+ setTimeout(() => {
+ appendTransaction(from, to, amount);
+ message.remove();
+ }, 1200);
+ });
+ }
+
+ const transactions = [];
+ function appendTransaction(from, to, amount) {
+ transactionCount++;
+ balances[from] -= amount;
+ balances[to] += amount;
+
+ const timestamp = new Date().toISOString();
+ const hash = "tx" + Math.random().toString(36).substring(2, 15);
+
+ const transaction = `
+ write transaction/${transactionCount}
+ amount ${amount.toFixed(1)}
+ from ${from}
+ to ${to}
+ write wallets/${from}
+ balance ${balances[from].toFixed(1)}
+ write wallets/${to}
+ balance ${balances[to].toFixed(1)}
+ commit
+ author Network
+ timestamp ${timestamp}
+ message Transfer ${amount} from ${from} to ${to}
+ order ${transactionCount}
+ id ${hash}`;
+ transactions.push(transaction);
+
+ const chainContent = document.getElementById("chainContent");
+ chainContent.textContent += transaction;
+ chainContent.scrollTop = chainContent.scrollHeight;
+
+ const tree = new Particle(`wallets/
+ ${Object.keys(balances)
+ .map((t, i) => t)
+ .join("\n ")}
+ transactions/
+ ${transactions.map((t, i) => i).join("\n ")}`);
+
+ // Update file tree
+ const fileTree = document.getElementById("fileTree");
+ fileTree.textContent = tree.toString();
+ }
+
+ // Start simulation
+ setInterval(simulateTransaction, 500);
Breck Yunits
Breck Yunits
17 days ago
created demo.js
demo.js
Breck Yunits
Breck Yunits
17 days ago
updated demo.css
demo.css
Changed around line 1
+ body {
+ font-family: Arial, sans-serif;
+ margin: 0;
+ padding: 20px;
+ background: #f0f0f0;
+ }
+ .container {
+ max-width: 1200px;
+ margin: 0 auto;
+ display: grid;
+ grid-template-columns: 1fr 1fr 1fr;
+ gap: 20px;
+ }
+ .section {
+ background: white;
+ padding: 20px;
+ border-radius: 8px;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+ }
+ #networkCanvas {
+ width: 100%;
+ height: 400px;
+ border: 1px solid #ddd;
+ }
+ #chainContent {
+ height: 400px;
+ overflow-y: auto;
+ white-space: pre;
+ background: #f8f8f8;
+ padding: 10px;
+ font-family: monospace;
+ }
+ #fileTree {
+ height: 400px;
+ overflow-y: auto;
+ padding: 10px;
+ white-space: pre;
+ }
+ .node {
+ fill: #4285f4;
+ color: #4285f4;
+ }
+ .user-node {
+ fill: #34a853;
+ color: #34a853;
+ }
+ .message {
+ fill: #fbbc05;
+ color: #fbbc05;
+ r: 3;
+ }
Breck Yunits
Breck Yunits
17 days ago
created demo.css
demo.css
Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 5: container 600px
- iframe
- src demo.html
- width 600
- height 600
+ iframes demo.html
- Demo
Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 7: container 600px
+ width 600
+ height 600
- Demo
Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 5: container 600px
- iframe demo.html
+ iframe
+ src demo.html
- Demo
Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 5: container 600px
+ iframe demo.html
+
- Demo
Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 10: Links
- Simple Information Tracker
+ - Original blog post
+ https://breckyunits.com/particleChain.html
Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 1
- container
+ container 600px
Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 1
+ container
Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 1
+ editButton edit.html
Breck Yunits
Breck Yunits
17 days ago
updated demo.html
demo.html
Changed around line 81
-
- ParticleChain Crypto Ledger write wallets/alice balance 100.0 write
- wallets/bob balance 50.0 commit author System timestamp
- 2025-02-25T12:00:00Z message Initial state order 1 id
- 7d8f9a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p
-
+
Breck Yunits
Breck Yunits
17 days ago
updated demo.html
demo.html
Changed around line 1
+
+
+
+
+
+ type="text/javascript"
+ src="https://sdk.scroll.pub/products/Utils.browser.js"
+ >
+
+ type="text/javascript"
+ src="https://sdk.scroll.pub/products/Particle.browser.js"
+ >
+ ParticleChain Crypto Demo
+
+
+
+

+ ParticleChain Cryptocurrency Demo
+
+
+
+

Network

+
+

+ Network Nodes |
+ Users |
+ Transactions
+

+
+
+

Particle Chain

+
+ ParticleChain Crypto Ledger write wallets/alice balance 100.0 write
+ wallets/bob balance 50.0 commit author System timestamp
+ 2025-02-25T12:00:00Z message Initial state order 1 id
+ 7d8f9a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p
+
+
+
+

File Tree

+
+
+
+
+
+
+
+
Breck Yunits
Breck Yunits
17 days ago
created demo.html
demo.html
Breck Yunits
Breck Yunits
17 days ago
updated index.scroll
index.scroll
Changed around line 1
- Hello World my name is
+ # Particle Chain Demos
+
+ Links
+ - Demo
+ demo.html
+ - Simple Information Tracker
+ https://sit.scroll.pub/
ffff:12.186.22.250
ffff:12.186.22.250
2 months ago
updated .gitignore
.gitignore
Changed around line 5
+ .*
root
root
4 months ago
initial blank_template template
.gitignore
Changed around line 1
+ .DS_Store
+ *.html
+ *.txt
+ *.xml
+ *.css
+ *.js
+ *.csv
+ requests.scroll
index.scroll
Changed around line 1
+ buildHtml
+ theme roboto
+
+ Hello World my name is