
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
Comprehensive automated performance benchmarking framework for X3D/X3DOM web scenes with FPS monitoring, node count tracking, and dual output formats
X3Test is a comprehensive automated performance benchmarking framework for X3D/X3DOM web scenes. It uses Puppeteer to simulate user interactions and collect detailed performance metrics including FPS and node count data from X3DOM's runtime.
npm install -g x3test
npm install x3test
Basic usage:
x3test -u https://example.com/scene.html
With custom options:
x3test -u https://example.com/scene.html -d 15 -o results.json -f summary
View all options:
x3test --help
import { runX3Test } from 'x3test';
await runX3Test({
url: 'https://example.com/scene.html',
duration: 10,
outputFile: 'results.json',
triggerSelector: '#startButton',
format: 'detailed'
});
| Option | Short | Description | Default |
|---|---|---|---|
--url | -u | URL of the page with X3D scene | Required |
--duration | -d | Duration of test in seconds | 20 |
--output | -o | Output file path | fps-log.json |
--trigger | -t | CSS selector for animation trigger | #beginTest |
--format | -f | Output format: detailed or summary | detailed |
--help | -h | Display help information | - |
detailed)Per-second data with FPS and node count for each measurement:
[
{
"second": 1,
"fps": 59.87,
"nodeCount": 2386
},
{
"second": 2,
"fps": 60.12,
"nodeCount": 2390
}
]
Use cases:
summary)Compact overview with aggregated statistics:
{
"scene": "AnimatedModel",
"duration": 15,
"fpsLog": [60, 60, 59, 57, 60, 60, 58, 59, 60, 60, 60, 59, 60, 58, 60],
"averageFPS": 59.3,
"nodeCount": 2322,
"renderTimeMs": 16.7
}
Use cases:
runX3Test(options)Parameters:
| Parameter | Type | Description | Default |
|---|---|---|---|
url | string | URL of the X3D scene page | Required |
duration | number | Test duration in seconds | 20 |
outputFile | string | Path for results file | fps-log.json |
triggerSelector | string | CSS selector to trigger animation | #beginTest |
format | string | Output format: detailed or summary | detailed |
Returns: Promise<void>
Example:
import { runX3Test } from 'x3test';
// Detailed analysis
await runX3Test({
url: 'https://mysite.com/3d-scene.html',
duration: 30,
outputFile: 'performance-detailed.json',
triggerSelector: '.start-animation',
format: 'detailed'
});
// Quick benchmark
await runX3Test({
url: 'https://mysite.com/3d-scene.html',
duration: 10,
outputFile: 'benchmark.json',
format: 'summary'
});
requestAnimationFrame timingx3d.runtime.states.infos.valueOf()["#NODES:"]1000 / averageFPS# Quick performance check
x3test -u https://mysite.com/scene.html -d 10 -f summary
# Detailed analysis
x3test -u https://mysite.com/scene.html -d 60 -f detailed
// In your test suite
import { runX3Test } from 'x3test';
describe('3D Scene Performance', () => {
it('should maintain 30+ FPS', async () => {
await runX3Test({
url: 'http://localhost:3000/scene.html',
duration: 10,
outputFile: 'ci-results.json',
format: 'summary'
});
const results = JSON.parse(fs.readFileSync('ci-results.json'));
expect(results.averageFPS).toBeGreaterThan(30);
});
});
# Test different scenes
x3test -u https://site.com/scene-v1.html -o v1-results.json -f summary
x3test -u https://site.com/scene-v2.html -o v2-results.json -f summary
# Compare results programmatically
Many X3D scenes require user interaction to start animations:
# Trigger with button click
x3test -u https://example.com/scene.html -t "#playButton"
# Trigger with custom selector
x3test -u https://example.com/scene.html -t ".animation-start"
# No trigger needed
x3test -u https://example.com/scene.html -t ""
For comprehensive performance analysis:
# 5-minute detailed test
x3test -u https://example.com/scene.html -d 300 -f detailed -o long-test.json
const scenes = [
'https://example.com/scene1.html',
'https://example.com/scene2.html',
'https://example.com/scene3.html'
];
for (const [index, url] of scenes.entries()) {
await runX3Test({
url,
duration: 15,
outputFile: `scene-${index + 1}-results.json`,
format: 'summary'
});
}
Scene not loading:
<x3d> elementsNo animation trigger found:
-t "#yourSelector"Low FPS readings:
Node count is null:
For troubleshooting, you can modify the source to run in non-headless mode:
// In your local copy, modify the browser launch options
const browser = await puppeteer.launch({
headless: false, // Set to false for debugging
args: ["--enable-webgl", "--no-sandbox"],
});
Contributions are welcome! Please feel free to submit issues and pull requests.
git clone https://github.com/niknarra/X3Test.git
cd X3Test
npm install
npm test
MIT License - see LICENSE file for details.
[
{
"second": 1,
"fps": 59.87,
"nodeCount": 2386
},
{
"second": 2,
"fps": 60.12,
"nodeCount": 2390
},
{
"second": 3,
"fps": 58.94,
"nodeCount": 2386
}
]
{
"scene": "AnimatedModel",
"duration": 15,
"fpsLog": [60, 60, 59, 57, 60, 60, 58, 59, 60, 60, 60, 59, 60, 58, 60],
"averageFPS": 59.3,
"nodeCount": 2322,
"renderTimeMs": 16.7
}
Made with ❤️ for the X3D/X3DOM community
FAQs
Comprehensive automated performance benchmarking framework for X3D/X3DOM web scenes with FPS monitoring, node count tracking, and dual output formats
We found that x3test demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.