Skip to content

Instantly share code, notes, and snippets.

View leefsmp's full-sized avatar

Philippe Leefsma leefsmp

  • Switzerland
  • 04:44 (UTC +02:00)
View GitHub Profile
@leefsmp
leefsmp / Viewing.Tool.Rotate.js
Created July 4, 2016 14:10
Rotation Control for Autodesk Viewer
import EventsEmitter from 'EventsEmitter'
export default class RotateTool extends EventsEmitter {
/////////////////////////////////////////////////////////////////
// Class constructor
//
/////////////////////////////////////////////////////////////////
constructor (viewer) {
@leefsmp
leefsmp / ForceGraph.js
Created May 3, 2016 06:07
Simple ForceGraph using d3 API
/////////////////////////////////////////////////////////////////////
// ForceGraph
// by Philippe Leefsma, April 2016
//
// Simple ForceGraph using d3 API
//
/////////////////////////////////////////////////////////////////////
import EventsEmitter from 'EventsEmitter'
import './ForceGraph.css'
import d3 from 'd3'
@leefsmp
leefsmp / PieChart.js
Created May 3, 2016 06:06
Simple PieChart using d3Pie API
/////////////////////////////////////////////////////////////////////
// PieChart
// by Philippe Leefsma, April 2016
//
// Simple PieChart using d3Pie API
//
/////////////////////////////////////////////////////////////////////
import EventsEmitter from 'EventsEmitter'
import d3pie from 'd3pie'
import d3 from 'd3'
@leefsmp
leefsmp / BarChart.js
Created May 3, 2016 06:03
Simple BarChart using d3 API
/////////////////////////////////////////////////////////////////////
// BarChart
// by Philippe Leefsma, April 2016
//
// Simple BarChart using d3 API
//
/////////////////////////////////////////////////////////////////////
import EventsEmitter from 'EventsEmitter'
import './BarChart.css'
import d3 from 'd3'
@leefsmp
leefsmp / viewer-and-data-npm-2.0.0-test.js
Last active April 26, 2016 07:15
Test for View & Data NPM 2.0.0 Package
/////////////////////////////////////////////////////////////////////
// Copyright (c) Autodesk, Inc. All rights reserved
// Written by Philippe Leefsma 2015 - ADN/Developer Technical Services
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
@leefsmp
leefsmp / Viewing.Extension.Markup3D.js
Created April 22, 2016 09:37
Markup3D Viewer Extension for View & Data API (partial sample)
/////////////////////////////////////////////////////////////////////
// Viewing.Extension.Markup3D
// by Philippe Leefsma, April 2016
//
/////////////////////////////////////////////////////////////////////
import Snap from 'imports-loader?this=>window,fix=>module.exports=0!snapsvg/dist/snap.svg.js';
import Markup3DTool from './Viewing.Extension.Markup3D.Tool'
import ExtensionBase from 'ExtensionBase'
class Markup3DExtension extends ExtensionBase {
@leefsmp
leefsmp / Autodesk.ADN.Viewing.Extension.ModelStructure.js
Created March 24, 2016 15:19
View & Data Model Structure extension
///////////////////////////////////////////////////////////////////////////////
// ModelStructure viewer extension
// by Philippe Leefsma, March 2016
//
///////////////////////////////////////////////////////////////////////////////
AutodeskNamespace("Autodesk.ADN.Viewing.Extension");
Autodesk.ADN.Viewing.Extension.ModelStructure = function (viewer, options) {
Autodesk.Viewing.Extension.call(this, viewer, options);
@leefsmp
leefsmp / snap-arc-demo.html
Last active June 21, 2020 02:16
SVG Arc Path Demo with Snap.svg
<!-- Written By Philippe Leefsma, Feb 2016 -->
<!DOCTYPE html>
<html>
<head lang="en">
<meta name="viewport" content="width=device-width, height=device-height, minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta charset="UTF-8">
<title>Snap SVG Arc Path Demo</title>
@leefsmp
leefsmp / Autodesk.ADN.Viewing.Extension.Markup.js
Created February 19, 2016 10:04
View & Data API Markup Extension
/////////////////////////////////////////////////////////////////////
// Autodesk.ADN.Viewing.Extension.Markup
// by Philippe Leefsma, Feb 2016
//
/////////////////////////////////////////////////////////////////////
AutodeskNamespace("Autodesk.ADN.Viewing.Extension");
Autodesk.ADN.Viewing.Extension.Markup = function (viewer, options) {
Autodesk.Viewing.Extension.call(this, viewer, options);
@leefsmp
leefsmp / Autodesk.ADN.Viewing.Extension.ModelLoader.js
Last active February 12, 2016 17:43
ModelLoader View & Data Extension: Allows loading, transformation and unloading of multiple models into the same scene
/////////////////////////////////////////////////////////////////////
// Autodesk.ADN.Viewing.Extension.ModelLoader
// by Philippe Leefsma, Feb 2016
//
/////////////////////////////////////////////////////////////////////
AutodeskNamespace("Autodesk.ADN.Viewing.Extension");
Autodesk.ADN.Viewing.Extension.ModelLoader = function (viewer, options) {
Autodesk.Viewing.Extension.call(this, viewer, options);