
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
ProViewer is a 3D model viewer for the safe and fast rendering of the most common 3D model files using the three.js library. This viewer uses encryption and decryption algorithms for the safe transaction of model files on the Internet and protection of model files from illegal copying. Currently, it supports a total of 16 different model file formats, with more to come in the future. Additionally, it will soon offer special shaders and post-processing plugins for realistic rendering and further analysis.
3DS, 3MF, AMF, DAE, FBX, MD2, GLB, GLTF, KMZ, OBJ(MTL), PLY, STL, SVG, VTK, VOX, WRL
You can run this viewer at the website: https://nova-graphix.github.io/proviewer/.
You can install this viewer (called proviewer) to your project by executing:
npm install proviewer
Then, you should include proviewer to your project as follows:
import { renderModels } from 'proviewer';
renderModels( options );
where the renderModels() is a JavaScript function that renders models, and the options is a JavaScript object that includes the model URL, CSS-style, background image, and animation variables if available.
Rendering models by dragging and dropping: With the Javascript code below, you can view your model by dragging and dropping your model file on the viewport created by the function renderModels().
import { renderModels } from 'proviewer';
renderModels();
Rendering a specific model: The following code shows an example of rendering a specific model using renderModels(). In the code below, id is the ID of the <div> HTML element for the model, style is the CSS codes that style the <div> element, img is used for the background image of this viewer, and url is for model URLs. You can write one or more model URLs in this url. In addition, you can bundle multiple models into a zip file and enter it into this url. Note that the .zip file can contain other .zip files.
import { renderModels } from 'proviewer';
renderModels({
// id: id of <div>
id: 'model',
// style: CSS styling
style: 'width:800px; height:600px; ....',
// img: (eg) '0x87ceeb' or 'skyblue' also possible
img: 'path/to/image.jpg',
// url: your model (.glb)
url: 'path/to/model.glb',
});
import { renderModels } from 'proviewer';
renderModels({
// id: internally generated if not defined
id: 'model',
// style: CSS styling
style: 'width:800px; height:600px; ....',
// img: 6 images for cube texture
img: `[
"path/to/px.png", "path/to/nx.png",
"path/to/py.png", "path/to/ny.png",
"path/to/pz.png", "path/to/nz.png"
]`,
// url: .zip contains multiple models
url: 'path/to/models.zip',
});
Rendering multiple models in grid viewports: Multiple models can be placed in grid viewports using just one WebGL renderer. In the code below, id is the ID of the <div> HTML element as a model container, and children are child elements of this <div> element, each of which renders a model within its viewport.
import { renderModels } from 'proviewer';
const style = 'width: 300px; height: 300px';
renderModels({
id: 'models',
children: [
{ style: style, url: "path/to/model_01.glb" },
{ style: style, url: "path/to/model_02.zip" },
{ style: style, url: "path/to/model_03.stl" },
....
]
});
Note that the <canvas> HTML element is created internally, and all models are drawn on this <canvas> element.
Rendering models with animation data: For animation models, input data such as the model's URL, animation clip name, etc. must be entered in JSON format in the animate property as in the following code for animation actions.
import { renderModels } from 'proviewer';
import { LoopRepeat } from 'three';
renderModels({
id: 'models',
img: 'path/to/image.png',
// url: available in json format or in string format
url: `[
"path/to/model_01.glb",
"path/to/model_02.zip"
]`,
// animate: required to be written in json format
animate: `[
{
"url": "path/to/model_01.glb",
"clip": (eg) "jump",
"duration": 1,
"loopMode": ${LoopRepeat},
"repetitions": ${Number.MAX_SAFE_INTEGER},
"combine": "crossFade"
},
{
"url": "path/to/model_02.zip",
"clip": (eg) "Run"
}
]`,
});
In the above animate code, url is required for multiple models, but not for single model. clip is required data, such as "jump" or an index pointing to "jump", and the remaining duration, loopMode, repetitions, and combine are all optional.
Encryption and decryption of model files: The function openEncryptFiles() encrypts model files with a model encryption key to prevent illegal copying on the Internet. The encrypted files can return to their original file state through the function openDecryptFiles() with a model decryption key. A file dialog box is opened by these functions. Then, the user selects the directory where the files to be encrypted or decrypted exist. When you press the OK button, the encryption or decryption process begins. Note that two secret keys for encryption and decryption are provided only to paid users.
import { openEncryptFiles, openDecryptFiles } from 'proviewerx';
// NOTE*: two model secret keys are provided only to paid users
openEncryptFiles( settings.MODEL_ENC_KEY );
openDecryptFiles( settings.MODEL_DEC_KEY );
In the code above, settings is an object that plays the same role as process.env.
Please contact us at info@nova-graphix.com for any questions or suggestions.
This project is licensed under the MIT License.
FAQs
3D model viewer with data encryption
The npm package proviewer receives a total of 2 weekly downloads. As such, proviewer popularity was classified as not popular.
We found that proviewer 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.

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.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.