Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .meteor/.finished-upgraders
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ notices-for-facebook-graph-api-2
1.2.0-meteor-platform-split
1.2.0-cordova-changes
1.2.0-breaking-changes
1.3.0-split-minifiers-package
3 changes: 2 additions & 1 deletion .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ session # Client-side reactive dictionary for your app
jquery # Helpful client-side library
tracker # Meteor's client-side reactive programming library

standard-minifiers # JS/CSS minifiers run for production mode
es5-shim # ECMAScript 5 compatibility for older browsers.
ecmascript # Enable ECMAScript2015+ syntax in app code

Expand All @@ -23,3 +22,5 @@ insecure # Allow all DB writes from clients (for prototyping)
http

aramk:requirejs
standard-minifier-css
standard-minifier-js
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@1.2.1
METEOR@1.3.2.4
137 changes: 71 additions & 66 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -1,67 +1,72 @@
allow-deny@1.0.4
aramk:requirejs@2.1.15_1
autopublish@1.0.4
autoupdate@1.2.4
babel-compiler@5.8.24_1
babel-runtime@0.1.4
base64@1.0.4
binary-heap@1.0.4
blaze@2.1.3
blaze-html-templates@1.0.1
blaze-tools@1.0.4
boilerplate-generator@1.0.4
caching-compiler@1.0.0
caching-html-compiler@1.0.2
callback-hook@1.0.4
check@1.1.0
ddp@1.2.2
ddp-client@1.2.1
ddp-common@1.2.2
ddp-server@1.2.2
deps@1.0.9
diff-sequence@1.0.1
ecmascript@0.1.6
ecmascript-runtime@0.2.6
ejson@1.0.7
es5-shim@4.1.14
fastclick@1.0.7
geojson-utils@1.0.4
hot-code-push@1.0.0
html-tools@1.0.5
htmljs@1.0.5
http@1.1.1
id-map@1.0.4
insecure@1.0.4
jquery@1.11.4
launch-screen@1.0.4
livedata@1.0.15
logging@1.0.8
meteor@1.1.10
meteor-base@1.0.1
minifiers@1.1.7
minimongo@1.0.10
mobile-experience@1.0.1
mobile-status-bar@1.0.6
mongo@1.1.3
mongo-id@1.0.1
npm-mongo@1.4.39_1
observe-sequence@1.0.7
ordered-dict@1.0.4
promise@0.5.1
random@1.0.5
reactive-dict@1.1.3
reactive-var@1.0.6
reload@1.1.4
retry@1.0.4
routepolicy@1.0.6
session@1.1.1
spacebars@1.0.7
spacebars-compiler@1.0.7
standard-minifiers@1.0.2
templating@1.1.5
templating-tools@1.0.0
tracker@1.0.9
ui@1.0.8
underscore@1.0.4
url@1.0.5
webapp@1.2.3
webapp-hashing@1.0.5
autopublish@1.0.7
autoupdate@1.2.9
babel-compiler@6.6.4
babel-runtime@0.1.8
base64@1.0.8
binary-heap@1.0.8
blaze@2.1.7
blaze-html-templates@1.0.4
blaze-tools@1.0.8
boilerplate-generator@1.0.8
caching-compiler@1.0.4
caching-html-compiler@1.0.6
callback-hook@1.0.8
check@1.2.1
ddp@1.2.5
ddp-client@1.2.7
ddp-common@1.2.5
ddp-server@1.2.6
deps@1.0.12
diff-sequence@1.0.5
ecmascript@0.4.3
ecmascript-runtime@0.2.10
ejson@1.0.11
es5-shim@4.5.10
fastclick@1.0.11
geojson-utils@1.0.8
hot-code-push@1.0.4
html-tools@1.0.9
htmljs@1.0.9
http@1.1.5
id-map@1.0.7
insecure@1.0.7
jquery@1.11.8
launch-screen@1.0.11
livedata@1.0.18
logging@1.0.12
meteor@1.1.14
meteor-base@1.0.4
minifier-css@1.1.11
minifier-js@1.1.11
minimongo@1.0.16
mobile-experience@1.0.4
mobile-status-bar@1.0.12
modules@0.6.1
modules-runtime@0.6.3
mongo@1.1.7
mongo-id@1.0.4
npm-mongo@1.4.43
observe-sequence@1.0.11
ordered-dict@1.0.7
promise@0.6.7
random@1.0.9
reactive-dict@1.1.7
reactive-var@1.0.9
reload@1.1.8
retry@1.0.7
routepolicy@1.0.10
session@1.1.5
spacebars@1.0.11
spacebars-compiler@1.0.11
standard-minifier-css@1.0.6
standard-minifier-js@1.0.6
templating@1.1.9
templating-tools@1.0.4
tracker@1.0.13
ui@1.0.11
underscore@1.0.8
url@1.0.9
webapp@1.2.8
webapp-hashing@1.0.9
37 changes: 13 additions & 24 deletions client/viewer/viewer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

import '../../public/extensions/Autodesk.ADN.Viewing.Extension.Basic/Autodesk.ADN.Viewing.Extension.Basic.js';
import '../../public/extensions/Autodesk.ADN.Viewing.Extension.DockingPanel/Autodesk.ADN.Viewing.Extension.DockingPanel.js';
import '../../public/extensions/Autodesk.ADN.Viewing.Extension.Workshop/Autodesk.ADN.Viewing.Extension.Workshop.js';


Template.viewer.onCreated(function(){

//console.log('viewer template created.')
Expand All @@ -23,7 +28,7 @@ Template.viewer.onCreated(function(){

var initViewer = function (token) {

var defaultUrn = 'dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWwyMDE2LTAyLTAxLTA5LTM2LTQ1LWtubXRvdnV2azZrc2swc3V0aG9hNDZ4cDJkenEvUm9ib3RBcm0uZHdmeA==';
var defaultUrn = getDefaultUrn();

if (defaultUrn.indexOf('urn:') !== 0)
defaultUrn = 'urn:' + defaultUrn;
Expand Down Expand Up @@ -61,26 +66,13 @@ var initViewer = function (token) {
viewer.addEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT, function(){

console.log('GEOMETRY_LOADED_EVENT');

viewer.loadExtension('Autodesk.ADN.Viewing.Extension.Basic');

viewer.loadExtension('Autodesk.ADN.Viewing.Extension.DockingPanel');

//load extensions
require(['/extensions/Autodesk.ADN.Viewing.Extension.Basic/Autodesk.ADN.Viewing.Extension.Basic.js'],
function(){
viewer.loadExtension('Autodesk.ADN.Viewing.Extension.Basic');
});

//load extensions
require(['/extensions/Autodesk.ADN.Viewing.Extension.DockingPanel/Autodesk.ADN.Viewing.Extension.DockingPanel.js'],
function(){
viewer.loadExtension('Autodesk.ADN.Viewing.Extension.DockingPanel');
});

//load extensions
require(['/extensions/Autodesk.ADN.Viewing.Extension.Workshop/Autodesk.ADN.Viewing.Extension.Workshop.js'],
function(){
viewer.loadExtension('Autodesk.ADN.Viewing.Extension.Workshop');
});


viewer.loadExtension('Autodesk.ADN.Viewing.Extension.Workshop');

});
}

Expand All @@ -101,7 +93,4 @@ var initViewer = function (token) {
initialize();


}



}
11 changes: 11 additions & 0 deletions lib/init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
getDefaultUrn = function() {
return '<your sample urn>';
}

getConsumerKey = function(){
return '<your consumer key>';
}

getClientSecret = function(){
return '<your secret key>';
}
4 changes: 2 additions & 2 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Meteor.methods({
credentials: {
// Replace placeholder below by the Consumer Key and Consumer Secret you got from
// http://developer.autodesk.com/ for the production server
client_id: process.env.CONSUMERKEY || '<your consumer key>',
client_secret: process.env.CONSUMERSECRET || '<your secret key>',
client_id: process.env.CONSUMERKEY || getConsumerKey(),
client_secret: process.env.CONSUMERSECRET || getClientSecret(),
grant_type: 'client_credentials'
},

Expand Down