- using sketchfab's built-in SSR
- baked IES lighting into texture, with Blender
- DEMO: https://sketchfab.com/3d-models/azzardo-paco-set-of-3-ceiling-lamps-ies-data-0cd32a887e5947af8820be9a9a5f2d26
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
/////////////////////////////////////////////////////////////////////////////// | |
// MeshData viewer extension | |
// by Philippe Leefsma, July 2015 | |
// | |
/////////////////////////////////////////////////////////////////////////////// | |
AutodeskNamespace("Autodesk.ADN.Viewing.Extension"); | |
Autodesk.ADN.Viewing.Extension.MeshData = function (viewer, options) { | |
Autodesk.Viewing.Extension.call(this, viewer, options); |
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
const fetch = require('node-fetch'); | |
const sceneid = `test`; | |
const FORGEURL = `https://developer.api.autodesk.com`; | |
class ForgeAPI { | |
constructor(key, secret, bucket) { | |
this.key = key; | |
this.secret = secret; |
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
let labelRenderer; | |
let scene; | |
class LabelsExtension extends Autodesk.Viewing.Extension { | |
constructor(viewer, options) { | |
super(viewer, options); | |
scene = new THREE.Scene(); | |
} | |
createLabelsFromDBids(labels) { |
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
/** | |
* @license twgl.js 0.0.26 Copyright (c) 2015, Gregg Tavares All Rights Reserved. | |
* Available via the MIT license. | |
* see: http://github.com/greggman/twgl.js for details | |
*/ | |
/** | |
* @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved. | |
* Available via the MIT or new BSD license. | |
* see: http://github.com/jrburke/almond for details | |
*/ |
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
/////////////////////// | |
// | |
// LMVToSPD.cpp - An LMV to SPD convertor. | |
// | |
// | |
#include "Config.h" | |
#include "Log.h" | |
#include "Translator.h" | |
#include "Path.h" |
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
/* | |
* Script for downloading SVF assets from the Model Derivative service. | |
npm install forge-convert-utils | |
APS_CLIENT_ID=1234 | |
APS_CLIENT_SECRET=12356 | |
Usage: node download-svf.js <urn> <path/to/output/folder> | |
*/ | |
const { SvfDownloader } = require('forge-convert-utils'); | |
const { APS_CLIENT_ID, APS_CLIENT_SECRET } = process.env; |
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
/** | |
* Interface file for customer who want to override or add new API routes | |
* @example | |
* router.get("/api/YourAPI", (req, res) => { | |
* res.send("Hello world."); | |
* }) | |
* @param {Router} router An express router object | |
*/ | |
const ForgeSDK = require("forge-apis"); |
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
# run command download.sh | |
wget --compression=auto -r -i lmvfilelist.txt | |
mv autodeskviewer.com/viewers/latest/ ./lmv | |
mv fonts.autodesk.com ./lmv | |
rm -fr autodeskviewer.com | |
# Switch Forge logo for ACME Logo | |
wget https://e7.pngegg.com/pngimages/135/411/png-clipart-acme-markets-havertown-grocery-store-supermarket-retail-others-miscellaneous-angle.png |