Skip to content

Instantly share code, notes, and snippets.

View yiskang's full-sized avatar

Eason Kang yiskang

View GitHub Profile
@yiskang
yiskang / Simple-viewer-Transparnt.html
Created September 10, 2024 04:13
Make APS Viewer background transparent and add custom background image by CSS
<html>
<head>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=no" />
<meta charset="utf-8">
<link rel="stylesheet" href="https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/style.min.css"
type="text/css">
<script src="https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/viewer3D.min.js"></script>
@yiskang
yiskang / index.js
Created July 12, 2024 05:37
Read Excel (XLXS) file from ACC Docs
const { SdkManagerBuilder } = require('@aps_sdk/autodesk-sdkmanager');
const { OssClient } = require('@aps_sdk/oss');
const XLSX = require('xlsx');
const axios = require('axios');
const sdk = SdkManagerBuilder.create().build();
const ossClient = new OssClient(sdk);
(async () => {
@yiskang
yiskang / SimpleAggreatedView-diff.html
Created July 11, 2024 05:12
AggregatedView with Diff Extension
<!DOCTYPE html>
<html>
<head>
<title>Multiple 3D Viewer - Autodesk Forge AggregatedView</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<!-- The Viewer CSS -->
@yiskang
yiskang / SensorHeatmapsExtension.js
Created March 5, 2024 01:42
APS DataViz Extensions Demo - Another way of creating heatmaps by using Revit Rooms, replacing public/extensions/SensorHeatmapsExtension.js
/// import * as Autodesk from "@types/forge-viewer";
import { UIBaseExtension } from './BaseExtension.js';
import { findNearestTimestampIndex } from './HistoricalDataView.js';
import { SensorHeatmapsPanel } from './SensorHeatmapsPanel.js';
export const SensorHeatmapsExtensionID = 'IoT.SensorHeatmaps';
export class SensorHeatmapsExtension extends UIBaseExtension {
constructor(viewer, options) {
super(viewer, options);
this.panel = undefined;
this._surfaceShadingData = undefined;
@yiskang
yiskang / RevitRooms.html
Last active April 1, 2024 08:37
Sample: Show Revit rooms from master view with a general Revit 3D view by model aggregation (Loading Multiple Models).
<html>
<head>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=no" />
<meta charset="utf-8">
<link rel="stylesheet" href="https://developer.api.autodesk.com/modelderivative/v2/viewers/7.88.*/style.min.css"
type="text/css">
<script src="https://developer.api.autodesk.com/modelderivative/v2/viewers/7.88.*/viewer3D.min.js"></script>
@yiskang
yiskang / RevitProjectBasePointExtension.js
Created March 21, 2023 08:33
A APS Viewer extension for getting Revit Project Base Point position by AEC Model Data
/////////////////////////////////////////////////////////////////////
// Copyright (c) Autodesk, Inc. All rights reserved
// Written by Forge Partner Development
//
// 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.
@yiskang
yiskang / DummyExportContext.cs
Created December 27, 2022 09:42
Dummy Revit Custom Exporter - This sample runs a dummy exporter to test if current Revit 3D view can be exported without any errors. It won't produce any files, just run the export API.
// (C) Copyright 2022 by Autodesk, Inc.
//
// 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.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
@yiskang
yiskang / aec-dropme.html
Last active June 30, 2022 06:10
Demo of Forge Viewer's DropMe extension. Video: https://youtu.be/VNPnXb075Bc
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/style.css"
type="text/css">
<script src="https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/viewer3D.js"></script>
@yiskang
yiskang / DrawSectionBoxExt.js
Last active August 23, 2022 03:21
Forge Viewer: Demo how to get bounds of current section box and draw it on the screen
/////////////////////////////////////////////////////////////////////
// Copyright (c) Autodesk, Inc. All rights reserved
// Written by Forge Partner Development
//
// 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.
@yiskang
yiskang / RoomLocatorExtension.js
Last active December 2, 2021 07:30
Find the room where a Forge Viewer object located. (Revit)
/////////////////////////////////////////////////////////////////////
// Copyright (c) Autodesk, Inc. All rights reserved
// Written by Forge Partner Development
//
// 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.