
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@closet-viewer/closet-viewer
Advanced tools
Render CLO models on web environment.
CLOSET 3D Viewer is a JavaScript library to see the object in 3D on any web pages or applications supporting for HTTPS and JavaScript. By following the guide below, you can make your own 3D web viewer. As CLOSET has been also implemented with this library, you can refer to CLOSET(https://www.clo-set.com/Marketplace/Detail?itemid=a39e955d947647539314f85443c90e9b) as an example.
Only you need is "closet.viewer.js" file under "dist" folder. If you want to customize the library, see How to build
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CLO Viewer Test</title>
</head>
<body>
<script type='text/javascript' src='js/closet.viewer.js'></script>
<script>
closet.viewer.init({
element: 'detail_viewer',
width: 620,
height: 780
})
closet.viewer.loadZrestUrl('https://s3.clo3d.com/zpac/denim.zrest');
</script>
</body>
</html>
Here you need to get the URL of ZRest file. ZRest is a file format containing 3D geometry and material information only. When you upload a 3D file(ZPrj, Zpac, AVT and etc) onto CLOSET, a ZRest file is automatically generated in CLOSET server. You can get the URL of the ZRest file by using CLOSET API - api/Item/ZrestUrl/{itemId}.
Initialize viewer with options.
Option | Type | Description |
---|---|---|
element | String | Specifies a id for the container element. |
width | Number | Width of viewer. |
height | Number | Height of viewer. |
Load the file from the server and places the 3D object on the viewer.
Works in IE11+
, and all modern browsers.
If you want to modify the source code and make your own library, please follow the guide below.
First, you need to install Node.js.
Clone a copy of the git repo by running:
git clone https://github.com/clovirtualfashion/closet.viewer.js.git
cd closet.viewer.js
npm install && npm run build
npm run develop
127.0.0.1 dev.clo-set.com
FAQs
Render CLO models on web environment.
The npm package @closet-viewer/closet-viewer receives a total of 0 weekly downloads. As such, @closet-viewer/closet-viewer popularity was classified as not popular.
We found that @closet-viewer/closet-viewer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.