Closed gengxuelei closed 6 years ago
@gengxuelei Do you mean that you want to deploy all the scripts and models on the CDN to speed up the loading process?
We are now working on the 3.0 version, and the 2.0 version is now locked, the changes will be done on 3.0.
About scripts: And soon you will able to deploy the whole script on your CDN server. We will add an option only for the hexo-injector to let you choose whether to put the script together with your site or upload nothing to hexo site and use your custom path to load the script
About models: The future settings will like this:
const defaultOptions = { // Setting default value of options
modelPath: 'https://raw.githubusercontent.com/EYHN/hexo-helper-live2d/master/assets/z16/z16.model.json',
modelWidth: 150,
modelHeight: 300,
modelScaling: 1,
AASetting: 2, antialiasing Grade 抗锯齿等级
mobileShow: true,
mobileScaling: 0.5,
position: 'right',
horizontalOffset: 0,
verticalOffset: -20,
horizontalHeadPos: 0.5,
verticalHeadPos: 0.618,
opacityDefault: 0.7,
opacityHover: 0.1,
canvasID: 'live2DCanvas',
divID: 'hexo-helper-live2d'
}
/*
for serverJs:
jsPath:
model:
*/
As you can see, you are able to specify the path of your model's json, so just upload your model to somewhere and set the setting can solve your problem. *It only needs to give the path of `.model.json` to make the model loaded.* Of cause, the hexo injector is able to distinguish if you are using the custom path of json or the built-in model or custom model that need to be uploaded to the site*. 反正大概就是这样吧,具体完成还需要一些时日
My blog is deployed on github, but I want to keep the github url and other resources on the object store Expect to add a parameter to configure the CDN (eg:七牛云), as configured here: https://github.com/EYHN/hexo-helper-live2d/blob/master/index.js#L62
@EYHN @xiazeyu