Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
three-x3
Advanced tools
Readme
An interactive plug-and-play debugger and inspector for the Three.js JavaScript 3D library.
yarn add three three-x3
npm install three three-x3
import * as THREE from 'three';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
import THREEx3 from 'three-x3';
const x3 = new THREEx3(
{ THREE, OrbitControls, camera, renderer, scene }
);
x3.add(focusLight);
x3.add(light);
x3.add(cube, { label: 'Cube' });
x3.add(camera);
renderer.setAnimationLoop(() => {
cube.rotation.x += 0.01; cube.rotation.y += 0.01;
x3.tick();
x3.fps(() => {
renderer.render(scene, camera);
});
});
<script src="https://cdn.jsdelivr.net/npm/three@0.126.1/build/three.min.js" integrity="sha256-RhW9lLg3YYVh/c3z+9Q8cUD5GFShsH1f7mR0lvCROpk=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/three@0.126.1/examples/js/controls/OrbitControls.js" integrity="sha256-+ncCNttOcMopCUa47Sn26Tg06ZC2SnWoi/XikKAhnSY=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/three-x3@0.0.2/dist/x3-standalone.js" integrity="sha256-0ExWK4qAjoTCSQ2V15Z2tcdiRHexpO8qrOUNCGAWMC0=" crossorigin="anonymous"></script>
const x3 = new THREEx3(
{
THREE, OrbitControls: THREE.OrbitControls,
camera, renderer, scene,
}
);
x3.add(focusLight);
x3.add(light);
x3.add(cube, { label: 'Cube' });
x3.add(camera);
renderer.setAnimationLoop(() => {
cube.rotation.x += 0.01; cube.rotation.y += 0.01;
x3.tick();
x3.fps(() => {
renderer.render(scene, camera);
});
});
const x3 = new THREEx3(
{
THREE: THREE, OrbitControls: THREE.OrbitControls,
camera: camera, renderer: renderer, scene: scene,
},
options
);
options
parameter for new THREEx3
:
Property | Possible Values | Info |
---|---|---|
orbit | true false | OrbitControls |
grid | true false { visible: true, size: 10, divisions: 10 } { visible: false } | GridHelper |
axes | true false { visible: true, size: 5 } { visible: false } | AxesHelper |
Add a controller for the object:
x3.add(light, options);
x3.add(cube, options);
x3.add(camera, options);
options
parameter for add
:
Property | Possible Values | Info |
---|---|---|
label | 'Some Label' | Label for the folder. |
helper | true false { visible: true } { visible: false } | Helper for lights. e.g. PointLightHelper |
open | true false | Tells whether the folder should be closed or open. |
xyz | ['position', 'rotation', 'scale'] | An array with the properties to show .x .y .z controls. |
Must run inside setAnimationLoop
:
renderer.setAnimationLoop(() => {
x3.tick();
renderer.render(scene, camera);
});
Displays a Performance Monitor with FPS (frames per second):
renderer.setAnimationLoop(() => {
x3.tick();
x3.fps(() => {
renderer.render(scene, camera);
});
});
FAQs
An interactive plug-and-play debugger and inspector for the Three.js JavaScript 3D library.
The npm package three-x3 receives a total of 3 weekly downloads. As such, three-x3 popularity was classified as not popular.
We found that three-x3 demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.