15,038
个编辑
更改
无编辑摘要
function initializePixiLive2d() { mw.loader.using('ext.gadget.pixiLive2DLoader').then( function() { window.animations.PIXILive2DLoader.init().then( function() { window.animations.initApp = function(canvas, container) { PIXI5.settings.RESOLUTION = window.devicePixelRatio; return new PIXI5.Application({ view: canvas, resizeTo: container, backgroundAlpha: 0, transparent: true, }); }; });
} );
}
mw.hook( 'wikipage.content' ).add( function ( $content ) {
var $showcase = $content.find( '#unit-image-showcase' );
if ( $showcase.length ) {
initializePixiLive2d();
}
} );