Overview

I had an opportunity to try Kompakkt Standalone Viewer, so here are my notes.

It is described as follows:

This repository hosts a JavaScript file which can be included on any website to use the Kompakkt Viewer without needing to use the Kompakkt Repository or the Kompakkt Server.

Repository

It is published at:

https://github.com/Kompakkt/StandaloneViewer

You can also access the viewer via GitHub Pages:

https://kompakkt.github.io/StandaloneViewer/

Display Example

I was able to display a 3D model and annotations as shown below:

https://kompakkt.github.io/StandaloneViewer/?state=eyJyZXNvdXJjZSI6Imh0dHBzOi8vc3VraWxhbS5hd3MubGRhcy5qcC9maWxlcy9vcmlnaW5hbC8yNTNlZmRmMzQ0Nzg0NTk5NTRhZTA0ZjZiM2JlZmE1ZjM4MjJlZDU5LmdsYiIsImFubm90YXRpb25zIjpbeyJfaWQiOiI2NzcwYTE1NDRjZTFmZDAyMzQ4OGVkODAiLCJib2R5Ijp7InR5cGUiOiJhbm5vdGF0aW9uIiwiY29udGVudCI6eyJ0eXBlIjoidGV4dCIsInRpdGxlIjoibXkgdGl0bGUiLCJkZXNjcmlwdGlvbiI6Im15IGRlc2NyaXB0aW9uIiwicmVsYXRlZFBlcnNwZWN0aXZlIjp7ImNhbWVyYVR5cGUiOiJhcmNSb3RhdGVDYW0iLCJwb3NpdGlvbiI6eyJ4IjoyLjI5NzE5OTgyNzA3MzIxLCJ5IjoxLjA0NjMzMzI0ODg4Njk0LCJ6IjoxLjYzNjAwODMyNDk5NDF9LCJ0YXJnZXQiOnsieCI6MS4wMTMxMDUwMzQ4MjgxOSwieSI6MS4xNzkwMzM5OTQ2NzQ2OCwieiI6MS4wMTQ0NDIwMjY2MTUxNH0sInByZXZpZXciOiJwcmV2aWV3cy9hbm5vdGF0aW9uLzY3NzBhMTU0NGNlMWZkMDIzNDg4ZWQ4MC5wbmcifX19LCJjcmVhdGVkIjoiMjAyNC0xMi0yOVQwMTowOTo0MC4yODZaIiwiY3JlYXRvciI6eyJ0eXBlIjoicGVyc29uIiwibmFtZSI6IlNhdG9ydSBOYWthbXVyYSIsIl9pZCI6IjY3NWE5Y2U0N2QxZmIyNDUzZjBmYjNjMSJ9LCJnZW5lcmF0ZWQiOiIyMDI0LTEyLTI5VDAxOjA5OjQyLjk3NFoiLCJnZW5lcmF0b3IiOnsidHlwZSI6InNvZnR3YXJlIiwibmFtZSI6IktvbXBha2t0IiwiX2lkIjoiNjc1YTljZTQ3ZDFmYjI0NTNmMGZiM2MxIiwiaG9tZXBhZ2UiOiJodHRwczovL2dpdGh1Yi5jb20vS29tcGFra3QvS29tcGFra3QifSwiaWRlbnRpZmllciI6IjY3NzBhMTU0NGNlMWZkMDIzNDg4ZWQ4MCIsImxhc3RNb2RpZmljYXRpb25EYXRlIjoiMjAyNC0xMi0yOVQwMToxMToyNC4zNjBaIiwibGFzdE1vZGlmaWVkQnkiOnsiX2lkIjoiNjc1YTljZTQ3ZDFmYjI0NTNmMGZiM2MxIiwibmFtZSI6IlNhdG9ydSBOYWthbXVyYSIsInR5cGUiOiJwZXJzb24ifSwibW90aXZhdGlvbiI6ImRlZmF1bHRNb3RpdmF0aW9uIiwicmFua2luZyI6MSwidGFyZ2V0Ijp7InNvdXJjZSI6eyJyZWxhdGVkRW50aXR5IjoiNjc3MDllODYwY2I4ZDA2NGZhMDc1NWI3IiwicmVsYXRlZENvbXBpbGF0aW9uIjoiIn0sInNlbGVjdG9yIjp7InJlZmVyZW5jZVBvaW50Ijp7Il9pc0RpcnR5Ijp0cnVlLCJfeCI6MC40MzI0MjIyMjQwNDc5MDksIl95IjoxLjY3NDQzMTE3MTYxNjA1LCJfeiI6MS42NTQ2MTgxODc1NDE1OH0sInJlZmVyZW5jZU5vcm1hbCI6bnVsbH19LCJ2YWxpZGF0ZWQiOnRydWV9XX0%253D

However, errors occurred when annotations contained Japanese characters.

Also, annotations were not displayed on the 3D model, suggesting there may be errors in the usage.

Supplement

As the format for input annotations, it appears that annotations exported from Kompakkt can be used.

For example:

[]{}""}""}""}"""}"""}"_b,cc,gg,ill,mrt,vio""}rr"""ee""""daa"""oaa"}"}addtceetn_nntn_hess_nttnrs,sl"yyo""""}aayaieeyaionttiayikgo""e"}"i:"pnttdrttpmdrrpmdmtMMdmpvieurrlr,rd:etyiee""}"}"eoee"aaee"eioo"eeantreeee""""ea""eptslcp,t,pdr"":tt"":pfdd:""tg"cllcf____ft6{:nelcaao"""a"""r""::eo::aiii::i":eaateixyzee7t"ertmsxyzrxyze::"dr"geff"o:"ttors"""rd7"":"ieei"""g"""v""6""""6erii6""n{:eereD:::e"0a::pdrt:::e:::i"{pS7::sK7""ce7Sp"1dd"nin:an"tPaite2ea5oo5::ad5ae:,{EC:cr011c1n{t"ieTo211"111w0rta"{fmatBatrnoet...et5oeaoryn...:..."2so92tp9""iy9os"tm{Py466Nr4txansp"206010:4orc0wach6o"crodipo"375ou4ata"pe:943{171-nue2aket7n:eunetii:244rect"":e"766394"1"44rk4t7D4"fyln446mei,,c:{130104p2,N7-et7p0a{7Na"att231a1o"t930034r-ad1""dsatdau:t"r218lfnbi"938532e2k12,,1:1e1kli:u211"d"bva823090v9af-f/5"fat"oe278:0,ber242392iTmb2b/4:bmM6n{,4172""c784446e0u292g42uo7"065n3,:R089866w1r4T4ic"4rt7:414u4o789271s:a505te25ai0761l8{t364845/0"313h103"v9"905l8a291161a9,f:fuf2f,ae"058et14984n:000bd50t89,de,,,,n4f9f.0-fi6,8Co0b:bc20bo00at.343o313nc"ma2c2cm4-c"b,"t81.1/801,8,i6"9"K84"doZ7,oeT,0n"4md26/,Zp8246"a0:f7,k"4a7k,700t:7a/451K455o.b4m974p4"ca9,ekZ1k"ft,d"023488ed80.png"

However, annotations were also not displayed on the 3D model in Kompakkt itself, suggesting there may be errors somewhere in the usage.

Summary

While I was able to display the 3D model, I could not get annotations to display correctly.

I plan to continue investigating, and I hope this article serves as a useful reference.