<?php

use FileRun\Files\Plugin;

class custom_3d_viewer extends Plugin {

	public bool $weblinksCompatible = true;
	static $localeSection = ["Custom Actions: 3D Viewer", 'File Upload'];
	static $publicMethods = ['openInBrowser', 'thumb'];

	function init() {

		$this->JSconfig = [
			"title" => self::t('3D Viewer'),
			'iconCls' => 'fa-dice-d6',
			'extensions' => ['obj', 'fbx', 'mtl', 'stl', 'dae', 'x', 'gltf', 'glb', '3ds', '3mf'],
			"popup" => true,
			"requiredUserPerms" => ["preview"],
			'requires' => ['preview']
		];
	}

	function run() {
		require $this->path.'/display.php';
	}
}