Skip to content

DO NOT MERGE - customization #524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
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
27 changes: 8 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"build_engine": "npm run update_engine_exports && esbuild source/engine/main.js --bundle --minify --global-name=OV --outfile=build/engine/o3dv.min.js",
"build_engine_module": "npm run update_engine_exports && rollup --config tools/rollup.js && tsc --project tools/tsconfig.json",
"build_website_dev": "esbuild source/website/index.js --bundle --minify --global-name=OV --sourcemap --loader:.ttf=file --loader:.woff=file --loader:.svg=file --outfile=build/website_dev/o3dv.website.min.js",
"build_website": "esbuild source/website/index.js --bundle --minify --global-name=OV --loader:.ttf=file --loader:.woff=file --loader:.svg=file --outfile=build/website/o3dv.website.min.js",
"build_website": "esbuild source/website/index.js --bundle --minify --global-name=OV --loader:.ttf=file --loader:.woff=file --loader:.svg=file --outfile=build/website_dev/o3dv.website.min.js",
"update_engine_exports": "run-python3 tools/update_engine_exports.py"
},
"devDependencies": {
Expand Down
16 changes: 8 additions & 8 deletions source/website/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ export function RegisterToolbarPlugin (plugin)
export function StartWebsite ()
{
window.addEventListener ('load', () => {
if (window.self !== window.top) {
let noEmbeddingDiv = AddDiv (document.body, 'noembed');
AddDiv (noEmbeddingDiv, null, Loc ('Embedding Online 3D Viewer in an iframe is not supported.'));
let link = AddDomElement (noEmbeddingDiv, 'a', null, Loc ('Open Online 3D Viewer'));
link.target = '_blank';
link.href = window.self.location;
return;
}
// if (window.self !== window.top) {
// let noEmbeddingDiv = AddDiv (document.body, 'noembed');
// AddDiv (noEmbeddingDiv, null, Loc ('Embedding Online 3D Viewer in an iframe is not supported.'));
// let link = AddDomElement (noEmbeddingDiv, 'a', null, Loc ('Open Online 3D Viewer'));
// link.target = '_blank';
// link.href = window.self.location;
// return;
// }

document.getElementById ('intro_dragdrop_text').innerHTML = Loc ('Drag and drop 3D models here.');
document.getElementById ('intro_formats_title').innerHTML = Loc ('Check an example file:');
Expand Down
2 changes: 1 addition & 1 deletion source/website/website.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export class Website
this.InitDragAndDrop ();
this.InitSidebar ();
this.InitNavigator ();
this.InitCookieConsent ();
// this.InitCookieConsent ();

this.viewer.SetMouseClickHandler (this.OnModelClicked.bind (this));
this.viewer.SetMouseMoveHandler (this.OnModelMouseMoved.bind (this));
Expand Down
2 changes: 1 addition & 1 deletion website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<body>
<input type="file" id="open_file" style="display:none;" multiple></input>
<div class="header" id="header">
<div class="title">
<div class="title" style="display: none;">
<div class="title_left">
<a href="index.html">
<svg class="logo_image"><use href="assets/images/3dviewer_net_logo_text.svg#logo"></use></svg>
Expand Down