// TODO: Implement addIssue() method.
}
- public function addPageBackgroundColor($page, $color, $arrowsColor)
+ public function getExternalMultimediaContents($to)
{
- // TODO: Implement addPageBackgroundColor() method.
+ // TODO: Implement getExternalContents() method.
}
- public function getExternalMultimediaContents($to)
+ public function add3DViewer()
{
- // TODO: Implement getExternalContents() method.
+ // TODO: Implement add3DViewer() method.
+ }
+
+ public function addPageBackground($page, $color, $arrowsColor, $image)
+ {
+ // TODO: Implement addPageBackground() method.
}
}
public function addPDFJS($force = false);
+ public function add3DViewer();
+
public function addSEOArticle($page, $title, $intro, $image, $id = null, $url = null, $content = '');
public function getPageNumber(): int;
{
// TODO: Implement getExternalContents() method.
}
+
+ public function add3DViewer()
+ {
+ // TODO: Implement add3DViewer() method.
+ }
}
return new WebLink($id, $init, $compiler);
}
return new WebVideoLink($id, $init, $compiler);
+ case static::OBJECT3D:
+ $init['inline'] = self::normalizeInlineIntegration($init['inline'] ?? '');
+ if ($init['inline'] === 'popup') {
+ return new Object3DPopupLink($id, $init, $compiler);
+ }else{
+ return new Object3DLink($id, $init, $compiler);
+ }
case static::ACTION:
return new ActionLink($id, $init, $compiler);
case static::CART: // Basket / Cart links
--- /dev/null
+<?php
+
+namespace Fluidbook\Tools\Links;
+
+class Object3DLink extends NormalLink
+{
+ public function __construct($id, $init, &$compiler)
+ {
+ parent::__construct($id, $init, $compiler);
+ $this->compiler->add3DViewer();
+ }
+}
--- /dev/null
+<?php
+
+namespace Fluidbook\Tools\Links;
+
+class Object3DPopupLink extends NormalLink
+{
+ public function __construct($id, $init, &$compiler)
+ {
+ parent::__construct($id, $init, $compiler);
+ }
+
+ public function getURL()
+ {
+ $this->compiler->add3DViewer();
+ $this->copyExternalFile($this->to);
+ return '#/o3d/' . md5($this->to . '/' . $this->extra . '/' . $this->id);
+ }
+
+ public function getAdditionnalContent()
+ {
+ return ' data-stats-type="popup_o3d" data-stats-name="' . $this->to . '" data-model="' . $this->to . '" ';
+ }
+
+ public function getDefaultTooltip()
+ {
+ return 'click to view the 3D object';
+ }
+}