
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
ion-3d-engine
Advanced tools
A Javascript library for building 3D websites and virtual reality experiences.
A Javascript library for building 3D websites and virtual reality experiences.
Table of contents:
Please visit ion 3D Engine wiki for the full documentation!
A simple and easy to use library to create 3D user interfaces that is also capable to be lauched in VR headsets.
This library is powered by Three.js. As a result, the Scene Hierarchy, Meshes (components here), and Materials are all Three.js objects and the API is consistent with Three.js API. Your components can also be integrated into your existing Three.js scene.
ion 3D Engine is available as an npm package:
npm install ion-3d-engine
This library depends on Three.js:
npm install three
NPM instiallation is recommended to be used with a bundler such as Webpack.
ES6 style import:
import ION from 'ion-3d-engine';
CommonJS style import:
const ION = require('ion-3d-engine');
Using the module in a script tag:
<!-- Add the polyfill es-module-shims.js because the import maps are not yet supported by all browsers -->
<script async src="https://unpkg.com/es-module-shims@1.6.3/dist/es-module-shims.js"></script>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.150.1/build/three.module.js",
"ion-3d-engine": "https://unpkg.com/ion-3d-engine/dist/ion-3d-engine.module.js"
}
}
</script>
<script type="module">
import * as THREE from "three";
import * as ION from "ion-3d-engine";
// code...
</script>
<!-- ThreeJS Scripts deprecated with r150+, and will be removed with r160. Please use ES Modules. -->
<script src="https://unpkg.com/three@0.150.0/build/three.min.js"></script>
<script src="https://unpkg.com/ion-3d-engine/dist/ion-3d-engine.js"></script>
<script>
// THREE and ION available globally...
</script>
There are only a few steps to setup the engine and render HTML in a 3D scene:
rootElement and add it to an entity. The HTML element is root of the DOM tree that we want to render in 3D./* Engine */
const engine = new ION.Engine({
canvas: canvas,
fullScreen: true,
control: ION.SpaceControl,
vrEnabled: true,
stats: true,
});
/* GUI Component */
const rootElement = document.getElementById('sample');
const guiComponent = new ION.GUIComponent({
rootElement: rootElement,
pixelRatio: 150,
transparent: true,
});
/* Entity */
const guiEntity = new ION.Entity();
guiEntity.addComponent(guiComponent);
engine.addEntity(guiEntity);
/* System */
const guiSystem = new ION.GUISystem();
engine.addSystem(guiSystem);
/* Engine Start */
engine.start();
You can use your own custom ThreeJS scene and camera when creating the engine instance:
/* Scene: */
const scene = new THREE.Scene();
scene.background = new THREE.Color( 0xffffff );
/* Camera: */
const camera = new THREE.PerspectiveCamera(75, 2, 0.1, 100);
/* Engine: */
const canvas = document.querySelector('#viewport');
const engine = new ION.Engine({
canvas,
scene,
camera,
control: ION.SpaceControl,
vrEnabled: true,
});
engine.start();
Setting runtime callbacks gives you the ability to execute your own update functions in the animation loop at each frame:
engine.setRuntimeCallback(() => {
console.log('Running at each frame...');
});
See the live demo and full source code of such integration.
Please visit ion 3D Engine wiki for the full documentation!
ion Engine is based on entity-component-system (ECS) architecture which is a popular and powerful pattern to develop 3D applications. The building blocks of this model are:
Components: they are encapsulated data holders and decoupled from the application logic. Components can be attached to entities to describe their attributes and how to be treated by systems.
Entities: each entity represents a different conceptual object with the desired components in the 3D scene. For example, an entity with a GUI component can be rendered as a 3D user interface.
Systems: a system is a process which acts on the entities. For example, a GUI system queries the entities with a GUI Component and handles the GUI related operations and renders them into the 3D scene.
All the examples and live demos are listed in examples page.
For the complete API documentation visit API page.
Let's build together! We'd love to have your input and try to maintain a low response time. This can be:
See Roadmap and Contributing for more information.
FAQs
A Javascript library for building 3D websites and virtual reality experiences.
The npm package ion-3d-engine receives a total of 0 weekly downloads. As such, ion-3d-engine popularity was classified as not popular.
We found that ion-3d-engine 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.