// load JavaScript library code once (per 3D stream)
// this is because the DOM element could exist multiple times within
// the extension section.
if (!libLoadedList.contains(stream.referencePDF())) {
stream.addJSCode(getLibJSCode());
libLoadedList.add(stream.referencePDF());
}
// Add JavaScript code for initializing a new textsprite
stream.addJSCode("\naddTextSprite('"
+ JavaScriptUtil.escapeString(resName)