This file contains hidden or 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
///////////////////////////////////////////////////////// | |
// Re-Flex handle element demo | |
// | |
///////////////////////////////////////////////////////// | |
class ReflexHandleDemo | |
extends React.Component { | |
render () { | |
return ( |
This file contains hidden or 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
///////////////////////////////////////////////////////// | |
// Re-Flex Size Collapsible element demo | |
// | |
///////////////////////////////////////////////////////// | |
class CollapsibleElementCls extends React.Component { | |
componentWillReceiveProps (nextProps) { | |
if (this.props.onCollapse && | |
this.getSize() < this.props.threshold) { |
This file contains hidden or 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
///////////////////////////////////////////////////////// | |
// ReactPie: a responsive PieChart in pure React + SVG | |
// by Philippe Leefsma, Jan 2017 | |
// | |
///////////////////////////////////////////////////////// | |
import PieSegment from './ReactPieSegment' | |
import ReactTooltip from 'react-tooltip' | |
import Measure from 'react-measure' | |
import PropTypes from 'prop-types' | |
import Stopwatch from 'Stopwatch' |
This file contains hidden or 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
/////////////////////////////////////////////////////////// | |
// PointCloudMarkup: high-perf markup 3D for Forge Viewer | |
// by Philippe Leefsma, December 2017 | |
// | |
/////////////////////////////////////////////////////////// | |
import EventsEmitter from 'EventsEmitter' | |
import defaultTex from './texture.png' | |
export default class PointCloudMarkup extends EventsEmitter { |
This file contains hidden or 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
///////////////////////////////////////////////////////////////////// | |
// MeshSelectionExtension, written by Philippe Leefsma - Dec 2017 | |
// | |
// Illustrates how to perform double ray casting to detect selection | |
// of custom meshes added to the scene and handle occlusion with | |
// Viewer meshes from loaded model. | |
// | |
///////////////////////////////////////////////////////////////////// | |
class MeshSelectionExtension extends Autodesk.Viewing.Extension { |
This file contains hidden or 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
///////////////////////////////////////////////////////// | |
// Viewing.Extension.ViewableSelector | |
// by Philippe Leefsma, November 2017 | |
// | |
///////////////////////////////////////////////////////// | |
import MultiModelExtensionBase from 'Viewer.MultiModelExtensionBase' | |
import './Viewing.Extension.ViewableSelector.scss' | |
import WidgetContainer from 'WidgetContainer' | |
import ReactTooltip from 'react-tooltip' | |
import ServiceManager from 'SvcManager' |
This file contains hidden or 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
'use strict'; | |
/** | |
* TreeOnDemand view control | |
* @constructor | |
* @param {TreeDelegate} treeDelegate | |
* @param {Object} root - A node in the model Document | |
* @param {HTMLElement} parentContainer - DOM element parent of the tree. | |
* @param {Object} options | |
*/ |
This file contains hidden or 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
///////////////////////////////////////////////////////// | |
// upload resource | |
// | |
///////////////////////////////////////////////////////// | |
router.post('/buckets/:bucketKey', | |
uploadSvc.uploader.any(), | |
async(req, res) => { | |
try { |
This file contains hidden or 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
///////////////////////////////////////////////////////// | |
// Uploads object to bucket using resumable endpoint | |
// | |
///////////////////////////////////////////////////////// | |
uploadObjectChunked ( | |
getToken, | |
bucketKey, objectKey, | |
file, | |
opts = {}) { |
This file contains hidden or 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
//From https://github.com/yvt/threejs-geometry-hittest | |
let norm = new THREE.Vector3() | |
let t1 = new THREE.Vector3() | |
let t2 = new THREE.Vector3() | |
let depth = 0 | |
function checkBoxSeparation( | |
phase, | |
minX, minY, minZ, |
NewerOlder