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
///////////////////////////////////////////////////////// | |
// Viewing.Extension.ModelLoader | |
// by Philippe Leefsma, April 2017 | |
// | |
///////////////////////////////////////////////////////// | |
import MultiModelExtensionBase from 'Viewer.MultiModelExtensionBase' | |
import ContentEditable from 'react-contenteditable' | |
import './Viewing.Extension.ModelLoader.scss' | |
import WidgetContainer from 'WidgetContainer' | |
import ServiceManager from 'SvcManager' |
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
///////////////////////////////////////////////////////// | |
// Re-Flex Size Aware element demo | |
// | |
///////////////////////////////////////////////////////// | |
class SizeAwareElement extends React.Component { | |
fitBounds (value, min, max) { | |
return Math.max(Math.min(value, max), min) | |
} |
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
/////////////////////////////////////////////////////////// | |
// Forge React Boiler Webpack production config | |
// Repo at: | |
// https://github.com/Autodesk-Forge/forge-react-boiler.nodejs | |
// | |
// by Philippe Leefsma, 2016 | |
// https://twitter.com/F3lipek | |
// | |
/////////////////////////////////////////////////////////// | |
const InlineManifestWebpackPlugin = require('inline-manifest-webpack-plugin') |
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
///////////////////////////////////////////////////////////////// | |
// Forge Viewer proxy | |
// By Philippe Leefsma, February 2017 | |
// | |
///////////////////////////////////////////////////////////////// | |
import ServiceManager from '../services/SvcManager' | |
import https from 'https' | |
import path from 'path' | |
///////////////////////////////////////////////////////////////// |
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
///////////////////////////////////////////////////////////////// | |
// ShaderMaterial Extension - Part 2 | |
// By Philippe Leefsma, February 2016 | |
// | |
///////////////////////////////////////////////////////////////// | |
import ShaderMaterialPanel from './Viewing.Extension.ShaderMaterial.Panel' | |
import ExtensionBase from 'Viewer.ExtensionBase' | |
// code for our previous basic shader | |
// without light computation |
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
///////////////////////////////////////////////////////////////// | |
// ShaderMaterial Extension - Part 1 | |
// By Philippe Leefsma, January 2016 | |
// | |
///////////////////////////////////////////////////////////////// | |
import ExtensionBase from 'Viewer.ExtensionBase' | |
const vertexShader = ` | |
varying vec2 vUv; |
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
// Example of use: | |
// isolateFull(viewer, viewer.model, [39, 45, 61]) | |
static isolateFull (viewer, model = null, dbIds = []) { | |
return new Promise(async(resolve, reject) => { | |
try { | |
model = model || viewer.model |
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
///////////////////////////////////////////////////////// | |
// Re-Flex Controlled element demo | |
// | |
///////////////////////////////////////////////////////// | |
class ControlledElementCls | |
extends React.Component { | |
constructor () { | |
super() |
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
///////////////////////////////////////////////////////// | |
// Re-Flex vertical layout with triple | |
// resizable splitter propagation | |
// | |
///////////////////////////////////////////////////////// | |
class ReflexSplitterPropagationDemo3x | |
extends React.Component { | |
render () { |
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
///////////////////////////////////////////////////////// | |
// Re-flex vertical layout with double | |
// resizable splitter propagation | |
// | |
///////////////////////////////////////////////////////// | |
class ReflexSplitterPropagationDemo2x | |
extends React.Component { | |
render () { |