-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
177 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,12 @@ <h1>Fun with circles</h1> | |
|
||
<!-- Import maps polyfill --> | ||
<!-- Remove this when import maps will be widely supported --> | ||
<script async src="https://unpkg.com/[email protected].0/dist/es-module-shims.js"></script> | ||
<script async src="https://unpkg.com/[email protected].2/dist/es-module-shims.js"></script> | ||
|
||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"rhino3dm":"https://unpkg.com/[email protected].0-beta2/rhino3dm.module.min.js" | ||
"rhino3dm":"https://unpkg.com/[email protected].1/rhino3dm.module.min.js" | ||
} | ||
} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,15 +63,14 @@ | |
|
||
<!-- Import maps polyfill --> | ||
<!-- Remove this when import maps will be widely supported --> | ||
<script async src="https://unpkg.com/[email protected].0/dist/es-module-shims.js"></script> | ||
<script async src="https://unpkg.com/[email protected].2/dist/es-module-shims.js"></script> | ||
|
||
<script id="imports" type="importmap"> | ||
{ | ||
"imports": { | ||
"three": "https://unpkg.com/[email protected]/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/[email protected]/examples/jsm/controls/OrbitControls.js", | ||
"rhino3dm":"https://unpkg.com/[email protected]/rhino3dm.module.min.js" | ||
|
||
"three": "https://unpkg.com/[email protected]/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/[email protected]/examples/jsm/controls/OrbitControls.js", | ||
"rhino3dm":"https://unpkg.com/[email protected]/rhino3dm.module.min.js" | ||
} | ||
} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,15 +33,15 @@ | |
|
||
<!-- Import maps polyfill --> | ||
<!-- Remove this when import maps will be widely supported --> | ||
<script async src="https://unpkg.com/[email protected].0/dist/es-module-shims.js"></script> | ||
<script async src="https://unpkg.com/[email protected].2/dist/es-module-shims.js"></script> | ||
|
||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"three": "https://unpkg.com/three@0.157.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.157.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/OBJLoader": "https://unpkg.com/three@0.157.0/examples/jsm/loaders/OBJLoader.js", | ||
"rhino3dm":"https://unpkg.com/[email protected].0-beta2/rhino3dm.module.min.js" | ||
"three": "https://unpkg.com/three@0.158.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.158.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/OBJLoader": "https://unpkg.com/three@0.158.0/examples/jsm/loaders/OBJLoader.js", | ||
"rhino3dm":"https://unpkg.com/[email protected].1/rhino3dm.module.min.js" | ||
} | ||
} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,14 +44,14 @@ | |
|
||
<!-- Import maps polyfill --> | ||
<!-- Remove this when import maps will be widely supported --> | ||
<script async src="https://unpkg.com/[email protected].0/dist/es-module-shims.js"></script> | ||
<script async src="https://unpkg.com/[email protected].2/dist/es-module-shims.js"></script> | ||
|
||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"three": "https://unpkg.com/three@0.157.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.157.0/examples/jsm/controls/OrbitControls.js", | ||
"rhino3dm":"https://unpkg.com/[email protected].0-beta2/rhino3dm.module.min.js" | ||
"three": "https://unpkg.com/three@0.158.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.158.0/examples/jsm/controls/OrbitControls.js", | ||
"rhino3dm":"https://unpkg.com/[email protected].1/rhino3dm.module.min.js" | ||
} | ||
} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,15 +33,15 @@ | |
|
||
<!-- Import maps polyfill --> | ||
<!-- Remove this when import maps will be widely supported --> | ||
<script async src="https://unpkg.com/[email protected].0/dist/es-module-shims.js"></script> | ||
<script async src="https://unpkg.com/[email protected].2/dist/es-module-shims.js"></script> | ||
|
||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"three": "https://unpkg.com/three@0.157.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.157.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/3DMLoader": "https://unpkg.com/three@0.157.0/examples/jsm/loaders/3DMLoader.js", | ||
"rhino3dm":"https://unpkg.com/[email protected].0-beta2/rhino3dm.module.min.js" | ||
"three": "https://unpkg.com/three@0.158.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.158.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/3DMLoader": "https://unpkg.com/three@0.158.0/examples/jsm/loaders/3DMLoader.js", | ||
"rhino3dm":"https://unpkg.com/[email protected].1/rhino3dm.module.min.js" | ||
} | ||
} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ create() | |
function create () { | ||
|
||
const loader = new Rhino3dmLoader() | ||
loader.setLibraryPath( 'https://unpkg.com/[email protected].0-beta2/' ) | ||
loader.setLibraryPath( 'https://unpkg.com/[email protected].1/' ) | ||
|
||
doc = new rhino.File3dm() | ||
|
||
|
@@ -52,6 +52,21 @@ function create () { | |
|
||
const textdot_layer_index = doc.layers().addLayer( 'TextDots', { r: 0, g: 0, b: 255, a: 255 } ) | ||
|
||
|
||
// Create two groups | ||
|
||
doc.groups().add(new rhino.Group()) | ||
doc.groups().add(new rhino.Group()) | ||
console.log(`nº of groups ${doc.groups().count}`) | ||
|
||
const group1 = doc.groups().get(0) | ||
console.log(`group id: ${group1.id}`) | ||
console.log(`group index: ${group1.index}`) | ||
|
||
const group2 = doc.groups().get(1) | ||
console.log(`group id: ${group2.id}`) | ||
console.log(`group index: ${group2.index}`) | ||
|
||
// -- POINTS / POINTCLOUDS -- // | ||
|
||
const oa_points = new rhino.ObjectAttributes() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,12 +29,12 @@ | |
|
||
<!-- Import maps polyfill --> | ||
<!-- Remove this when import maps will be widely supported --> | ||
<script async src="https://unpkg.com/[email protected].0/dist/es-module-shims.js"></script> | ||
<script async src="https://unpkg.com/[email protected].2/dist/es-module-shims.js"></script> | ||
|
||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"rhino3dm":"https://unpkg.com/[email protected].0-beta2/rhino3dm.module.min.js" | ||
"rhino3dm":"https://unpkg.com/[email protected].1/rhino3dm.module.min.js" | ||
} | ||
} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,15 +71,15 @@ | |
|
||
<!-- Import maps polyfill --> | ||
<!-- Remove this when import maps will be widely supported --> | ||
<script async src="https://unpkg.com/[email protected].0/dist/es-module-shims.js"></script> | ||
<script async src="https://unpkg.com/[email protected].2/dist/es-module-shims.js"></script> | ||
|
||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"three": "https://unpkg.com/three@0.157.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.157.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/3DMLoader": "https://unpkg.com/three@0.157.0/examples/jsm/loaders/3DMLoader.js", | ||
"rhino3dm":"https://unpkg.com/[email protected].0-beta3/rhino3dm.module.min.js" | ||
"three": "https://unpkg.com/three@0.158.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.158.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/3DMLoader": "https://unpkg.com/three@0.158.0/examples/jsm/loaders/3DMLoader.js", | ||
"rhino3dm":"https://unpkg.com/[email protected].1/rhino3dm.module.min.js" | ||
} | ||
} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,8 @@ async function load() { | |
|
||
const rhinoObject = objs.get( i ) | ||
|
||
console.log(rhinoObject.geometry()) | ||
|
||
if ( rhinoObject.geometry().objectType === rhino.ObjectType.Curve ) continue | ||
|
||
if ( rhinoObject.attributes().userStringCount > 0 ) { | ||
|
@@ -59,7 +61,7 @@ async function load() { | |
|
||
// load and pass to threejs | ||
const loader = new Rhino3dmLoader() | ||
loader.setLibraryPath( 'https://unpkg.com/[email protected].0-beta3/' ) | ||
loader.setLibraryPath( 'https://unpkg.com/[email protected].1/' ) | ||
|
||
loader.load( model, function ( object ) { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,15 +33,15 @@ | |
<div id="loader"></div> | ||
<!-- Import maps polyfill --> | ||
<!-- Remove this when import maps will be widely supported --> | ||
<script async src="https://unpkg.com/[email protected].0/dist/es-module-shims.js"></script> | ||
<script async src="https://unpkg.com/[email protected].2/dist/es-module-shims.js"></script> | ||
|
||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"three": "https://unpkg.com/three@0.157.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.157.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/3DMLoader": "https://unpkg.com/three@0.157.0/examples/jsm/loaders/3DMLoader.js", | ||
"rhino3dm":"https://unpkg.com/[email protected].0-beta2/rhino3dm.module.min.js" | ||
"three": "https://unpkg.com/three@0.158.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.158.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/3DMLoader": "https://unpkg.com/three@0.158.0/examples/jsm/loaders/3DMLoader.js", | ||
"rhino3dm":"https://unpkg.com/[email protected].1/rhino3dm.module.min.js" | ||
} | ||
} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ function init () { | |
function load() { | ||
|
||
const loader = new Rhino3dmLoader() | ||
loader.setLibraryPath( 'https://unpkg.com/[email protected].0-beta2/' ) | ||
loader.setLibraryPath( 'https://unpkg.com/[email protected].1/' ) | ||
|
||
const material = new THREE.MeshNormalMaterial() | ||
loader.load( model, function ( object ) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,14 +44,14 @@ | |
|
||
<!-- Import maps polyfill --> | ||
<!-- Remove this when import maps will be widely supported --> | ||
<script async src="https://unpkg.com/[email protected].0/dist/es-module-shims.js"></script> | ||
<script async src="https://unpkg.com/[email protected].2/dist/es-module-shims.js"></script> | ||
|
||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"three": "https://unpkg.com/three@0.157.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.157.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/3DMLoader": "https://unpkg.com/three@0.157.0/examples/jsm/loaders/3DMLoader.js" } | ||
"three": "https://unpkg.com/three@0.158.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.158.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/3DMLoader": "https://unpkg.com/three@0.158.0/examples/jsm/loaders/3DMLoader.js" } | ||
} | ||
</script> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ select.onchange = load | |
let model = 'hello_mesh.3dm' | ||
|
||
const loader = new Rhino3dmLoader() | ||
loader.setLibraryPath( 'https://unpkg.com/[email protected].0-beta2/' ) | ||
loader.setLibraryPath( 'https://unpkg.com/[email protected].1/' ) | ||
|
||
const material = new THREE.MeshNormalMaterial() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,13 +41,13 @@ | |
|
||
<!-- Import maps polyfill --> | ||
<!-- Remove this when import maps will be widely supported --> | ||
<script async src="https://unpkg.com/[email protected].0/dist/es-module-shims.js"></script> | ||
<script async src="https://unpkg.com/[email protected].2/dist/es-module-shims.js"></script> | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"three": "https://unpkg.com/three@0.157.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.157.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/3DMLoader": "https://unpkg.com/three@0.157.0/examples/jsm/loaders/3DMLoader.js" | ||
"three": "https://unpkg.com/three@0.158.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.158.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/3DMLoader": "https://unpkg.com/three@0.158.0/examples/jsm/loaders/3DMLoader.js" | ||
} | ||
} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ import { Rhino3dmLoader } from 'three/examples/jsm/loaders/3DMLoader' | |
// #region GLOBALS // | ||
|
||
const loader = new Rhino3dmLoader() | ||
loader.setLibraryPath( 'https://unpkg.com/[email protected].0-beta2/' ) | ||
loader.setLibraryPath( 'https://unpkg.com/[email protected].1/' ) | ||
|
||
const upload = document.getElementById("file-upload") | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,14 +15,14 @@ | |
|
||
<!-- Import maps polyfill --> | ||
<!-- Remove this when import maps will be widely supported --> | ||
<script async src="https://unpkg.com/[email protected].0/dist/es-module-shims.js"></script> | ||
<script async src="https://unpkg.com/[email protected].2/dist/es-module-shims.js"></script> | ||
|
||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"three": "https://unpkg.com/three@0.157.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.157.0/examples/jsm/controls/OrbitControls.js", | ||
"rhino3dm":"https://unpkg.com/[email protected].0-beta2/rhino3dm.module.min.js" | ||
"three": "https://unpkg.com/three@0.158.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.158.0/examples/jsm/controls/OrbitControls.js", | ||
"rhino3dm":"https://unpkg.com/[email protected].1/rhino3dm.module.min.js" | ||
} | ||
} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,13 +61,13 @@ | |
|
||
<!-- Import maps polyfill --> | ||
<!-- Remove this when import maps will be widely supported --> | ||
<script async src="https://unpkg.com/[email protected].0/dist/es-module-shims.js"></script> | ||
<script async src="https://unpkg.com/[email protected].1/dist/es-module-shims.js"></script> | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"three": "https://unpkg.com/three@0.157.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.157.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/3DMLoader": "https://unpkg.com/three@0.157.0/examples/jsm/loaders/3DMLoader.js", | ||
"three": "https://unpkg.com/three@0.158.0/build/three.module.js", | ||
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.158.0/examples/jsm/controls/OrbitControls.js", | ||
"three/examples/jsm/loaders/3DMLoader": "https://unpkg.com/three@0.158.0/examples/jsm/loaders/3DMLoader.js", | ||
"dat.gui": "https://unpkg.com/[email protected]/build/dat.gui.module.js" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ function load() { | |
material.envMap = scene.background | ||
|
||
const loader = new Rhino3dmLoader() | ||
loader.setLibraryPath( 'https://unpkg.com/[email protected].0-beta2/' ) | ||
loader.setLibraryPath( 'https://unpkg.com/[email protected].1/' ) | ||
|
||
// load 3dm file into three.js scene | ||
loader.load( model, function ( object ) { | ||
|
Oops, something went wrong.