Hi everyone!
The first stable version of the Macro Three is now released and available for download. Now you can easily load and display 3D objects in XWiki!
Link to the extension: https://extensions.xwiki.org/xwiki/bin/view/Extension/MacroThree/
You can find the usage instructions and documentation on the extension page. The instructions and demos are also available on the page Macros.ThreeMacro
upon extension installation in your wiki.
If you find any bugs or have any feature requests, add them as issues on Loading....
Thanks and hope you like the macro.
Best,
Fawad
Great @ginpachi! Congrats
Idea for improvement: regroup the 4 parameters file
, files
, document
, attachment
into 1
In your macro you just need a single references
parameters of type ResourceReference
(see for example xwiki-platform/xwiki-platform-core/xwiki-platform-office/xwiki-platform-office-macro/src/main/java/org/xwiki/rendering/macro/office/OfficeMacroParameters.java at ba0430d06ff9e637189c78a53205d30cb20c64d6 · xwiki/xwiki-platform · GitHub). See also https://extensions.xwiki.org/xwiki/bin/view/Extension/Office%20Macro#HFromWikiSyntax
I think a List<ResourceReference>
should work automatically too.
This gives you even more power and is future-proof since new resource type can be added in the future without a change to your macro code.
Nice. I didn’t know about this. This would definitely work great.
One question though. Can we use generics like java.util.List<org.xwiki.rendering.listener.reference.ResourceReference>
as parameter type?
It seems generics work.
I had one more question. How exactly can we use ResourceReference
to get a URL of the resource directly in velocity?