Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="https://developer.api.autodesk.com/modelderivative/v2/viewers/style.min.css?v=v7.*" type="text/css">
  <script language="JavaScript" src="https://developer.api.autodesk.com/modelderivative/v2/viewers/viewer3D.min.js?v=v7.*"></script>
  <meta name="viewport" content="width=device-width">
<style>
</style>
</head>
<body>
  <div  ></div>
</body>
</html>
 
Autodesk.Viewing.Initializer( {'env' : 'Local'}, () =>{
  new Autodesk.Viewing.Private.GuiViewer3D(document.getElementsByTagName('div')[0]).start('https://dukedhx.github.io/Forge-Workshop/shaver/0.svf');
  NOP_VIEWER.addEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT, ()=>{
    console.log(233);
    NOP_VIEWER.impl.sceneAfter.skipDepthTarget = true;
NOP_VIEWER.impl.sceneAfter.skipIdTarget = true;
    setTimeout(()=>{
    const geometry = new THREE.Geometry();
 geometry.vertices.push(new THREE.Vector3(0, 0, 0),
                        new THREE.Vector3(0, 0, 100));
const  material = new THREE.LineDashedMaterial({color: 0xFF0000,
                                              dashSize: 3,
                                              gapSize: 1});
geometry.computeLineDistances();
geometry.lineDistancesNeedUpdate = true;
NOP_VIEWER.impl.matman().addMaterial('material', material, true);
NOP_VIEWER.impl.sceneAfter.add(new THREE.Line(geometry, material));
    },2000)
  })
})
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
dukedhxpro
0viewers