Minor modification.
This commit is contained in:
parent
005d616405
commit
60b2e02fa8
@ -194,6 +194,9 @@
|
||||
Or you can use the browse button above.
|
||||
</div>
|
||||
<div class="intro_section">
|
||||
<a href="index.html#model=assets/models/christmas_challenge.gltf,assets/models/christmas_challenge.bin">🎄 Christmas Challenge 🎄</a>
|
||||
</div>
|
||||
<div class="intro_section only_full_height">
|
||||
<div>Example models:</div>
|
||||
<div class="example_models">
|
||||
<a href="index.html#model=assets/models/logo.obj,assets/models/logo.mtl">logo</a>
|
||||
|
||||
@ -164,16 +164,18 @@ OV.Website = class
|
||||
}
|
||||
|
||||
if (this.parameters.fileNameDiv.innerHTML === 'christmas_challenge.gltf') {
|
||||
this.eventHandler.HandleEvent ('christmas_challenge', { type : 'loaded' });
|
||||
let meshUserData = this.viewer.GetMeshUserDataUnderMouse (mouseCoordinates);
|
||||
if (meshUserData !== null && meshUserData.originalMeshId.meshIndex === 0) {
|
||||
this.navigator.ToggleMeshVisibility (meshUserData.originalMeshId);
|
||||
if (meshUserData.originalMeshId.IsEqual (new OV.MeshInstanceId (59, 0))) {
|
||||
this.eventHandler.HandleEvent ('christmas_challenge', { type : 'solved' });
|
||||
this.navigator.FitMeshToWindow (meshUserData.originalMeshId);
|
||||
setTimeout (() => {
|
||||
let dialog = new OV.ButtonDialog ();
|
||||
let contentDiv = dialog.Init ('You did it!', [
|
||||
{
|
||||
name : 'Cancel',
|
||||
name : 'Close',
|
||||
subClass : 'outline',
|
||||
onClick () {
|
||||
dialog.Hide ();
|
||||
@ -182,12 +184,12 @@ OV.Website = class
|
||||
{
|
||||
name : 'Tweet!',
|
||||
onClick () {
|
||||
window.open('https://twitter.com/intent/tweet?screen_name=Online3DViewer&ref_src=twsrc%5Etfw&text=I%27ve%20just%20solved%20the%20Christmas%20Challenge.%20%E2%9D%A4%F0%9F%8E%84%F0%9F%8E%81%20%0a%0aCheck%20it%20out%20here:%20LINK', '_blank');
|
||||
window.open ('https://twitter.com/intent/tweet?ref_src=twsrc%5Etfw&text=I%27ve%20just%20solved%20the%20@Online3DViewer%20Christmas%20Challenge.%20%E2%9D%A4%F0%9F%8E%84%F0%9F%8E%81%20%0a%0aGive%20it%20a%20try%20here:%20https://tinyurl.com/o3dvchristmas%0a%0a%233d%20%233dviewer%20%23threejs%20%23opensource%20%23christmas', '_blank');
|
||||
dialog.Hide ();
|
||||
}
|
||||
}
|
||||
]);
|
||||
OV.AddDiv (contentDiv, null, 'You\'ve just solved the Christmas Challenge. ❤🎄🎁');
|
||||
OV.AddDiv (contentDiv, null, 'You\'ve just solved the Christmas Challenge. ❤🎄🎁');
|
||||
dialog.Show ();
|
||||
this.dialog = dialog;
|
||||
}, 1500);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user