mirror of
				https://github.com/Mabbs/mabbs.github.io
				synced 2025-10-31 09:19:43 +08:00 
			
		
		
		
	Update 4 files
- /_data/proxylist.yml - /Live2dHistoire/README.md - /Live2dHistoire/live2d/js/message.js - /proxylist.md
This commit is contained in:
		| @@ -1,4 +1,5 @@ | ||||
| # Live2d的看板娘——伊斯特瓦尔(Histoire)  | ||||
| [Original Repo](https://github.com/eeg1412/Live2dHistoire) | ||||
| #### 可用于网页端显示Live2D版的伊斯特瓦尔(Histoire) emlog插件版可以看这里:[传送门](https://www.wikimoe.com/?post=75) | ||||
| #### 基于[《给博客添加能动的看板娘(Live2D)-将其添加到网页上吧》](https://imjad.cn/archives/lab/add-dynamic-poster-girl-with-live2d-to-your-blog-02)上的源码进行修改。 | ||||
| #### 在原先的基础上加上了如下功能: | ||||
| @@ -93,9 +94,6 @@ var talkAPI = "";//如果有类似图灵机器人的聊天接口请填写接口 | ||||
| 注意路径别弄错了噢 ~   | ||||
| PHP 程序推荐使用主题函数获取绝对路径。 | ||||
|  | ||||
| ### 效果预览 | ||||
|    | ||||
|  | ||||
| 	 | ||||
| ### 模型说明 | ||||
| 本插件仅供学习和交流使用,禁止用于商业用途。 | ||||
|   | ||||
| @@ -190,7 +190,7 @@ if (!norunFlag) { | ||||
| 		if (typeof EventSource !== 'undefined' && text instanceof EventSource) { | ||||
| 			var outputContainer = $('.message')[0]; | ||||
| 			var eventFlag = false; | ||||
| 			text.onmessage = function(event) { | ||||
| 			text.onmessage = function (event) { | ||||
| 				if (event.data == "[DONE]") { | ||||
| 					text.close(); | ||||
| 					return; | ||||
| @@ -317,6 +317,70 @@ if (!norunFlag) { | ||||
| 			$('#showTalkBtn').hide(); | ||||
|  | ||||
| 		} | ||||
| 		// //获取用户名 | ||||
| 		// var live2dUser = sessionStorage.getItem("live2duser"); | ||||
| 		// if(live2dUser !== null){ | ||||
| 		// 	$('#AIuserName').val(live2dUser); | ||||
| 		// } | ||||
| 		//获取位置 | ||||
| 		var landL = sessionStorage.getItem("historywidth"); | ||||
| 		var landB = sessionStorage.getItem("historyheight"); | ||||
| 		if (landL == null || landB == null) { | ||||
| 			landL = '5px' | ||||
| 			landB = '0px' | ||||
| 		} | ||||
| 		$('#landlord').css('left', landL + 'px'); | ||||
| 		$('#landlord').css('bottom', landB + 'px'); | ||||
| 		//移动 | ||||
| 		function getEvent() { | ||||
| 			return window.event || arguments.callee.caller.arguments[0]; | ||||
| 		} | ||||
| 		var smcc = document.getElementById("landlord"); | ||||
| 		var moveX = 0; | ||||
| 		var moveY = 0; | ||||
| 		var moveBottom = 0; | ||||
| 		var moveLeft = 0; | ||||
| 		var moveable = false; | ||||
| 		var docMouseMoveEvent = document.onmousemove; | ||||
| 		var docMouseUpEvent = document.onmouseup; | ||||
| 		smcc.onmousedown = function () { | ||||
| 			var ent = getEvent(); | ||||
| 			moveable = true; | ||||
| 			moveX = ent.clientX; | ||||
| 			moveY = ent.clientY; | ||||
| 			var obj = smcc; | ||||
| 			moveBottom = parseInt(obj.style.bottom); | ||||
| 			moveLeft = parseInt(obj.style.left); | ||||
| 			if (isFirefox = navigator.userAgent.indexOf("Firefox") > 0) { | ||||
| 				window.getSelection().removeAllRanges(); | ||||
| 			} | ||||
| 			document.onmousemove = function () { | ||||
| 				if (moveable) { | ||||
| 					var ent = getEvent(); | ||||
| 					var x = moveLeft + ent.clientX - moveX; | ||||
| 					var y = moveBottom + (moveY - ent.clientY); | ||||
| 					obj.style.left = x + "px"; | ||||
| 					obj.style.bottom = y + "px"; | ||||
| 				} | ||||
| 			}; | ||||
| 			document.onmouseup = function () { | ||||
| 				if (moveable) { | ||||
| 					var historywidth = obj.style.left; | ||||
| 					var historyheight = obj.style.bottom; | ||||
| 					historywidth = historywidth.replace('px', ''); | ||||
| 					historyheight = historyheight.replace('px', ''); | ||||
| 					sessionStorage.setItem("historywidth", historywidth); | ||||
| 					sessionStorage.setItem("historyheight", historyheight); | ||||
| 					document.onmousemove = docMouseMoveEvent; | ||||
| 					document.onmouseup = docMouseUpEvent; | ||||
| 					moveable = false; | ||||
| 					moveX = 0; | ||||
| 					moveY = 0; | ||||
| 					moveBottom = 0; | ||||
| 					moveLeft = 0; | ||||
| 				} | ||||
| 			}; | ||||
| 		}; | ||||
| 		//获取音乐信息初始化 | ||||
| 		var bgmListInfo = $('input[name=live2dBGM]'); | ||||
| 		if (bgmListInfo.length == 0) { | ||||
| @@ -385,70 +449,6 @@ if (!norunFlag) { | ||||
| 				showMessage('音乐似乎加载不出来了呢!', 0); | ||||
| 			}); | ||||
| 		} | ||||
| 		// //获取用户名 | ||||
| 		// var live2dUser = sessionStorage.getItem("live2duser"); | ||||
| 		// if(live2dUser !== null){ | ||||
| 		// 	$('#AIuserName').val(live2dUser); | ||||
| 		// } | ||||
| 		//获取位置 | ||||
| 		var landL = sessionStorage.getItem("historywidth"); | ||||
| 		var landB = sessionStorage.getItem("historyheight"); | ||||
| 		if (landL == null || landB == null) { | ||||
| 			landL = '5px' | ||||
| 			landB = '0px' | ||||
| 		} | ||||
| 		$('#landlord').css('left', landL + 'px'); | ||||
| 		$('#landlord').css('bottom', landB + 'px'); | ||||
| 		//移动 | ||||
| 		function getEvent() { | ||||
| 			return window.event || arguments.callee.caller.arguments[0]; | ||||
| 		} | ||||
| 		var smcc = document.getElementById("landlord"); | ||||
| 		var moveX = 0; | ||||
| 		var moveY = 0; | ||||
| 		var moveBottom = 0; | ||||
| 		var moveLeft = 0; | ||||
| 		var moveable = false; | ||||
| 		var docMouseMoveEvent = document.onmousemove; | ||||
| 		var docMouseUpEvent = document.onmouseup; | ||||
| 		smcc.onmousedown = function () { | ||||
| 			var ent = getEvent(); | ||||
| 			moveable = true; | ||||
| 			moveX = ent.clientX; | ||||
| 			moveY = ent.clientY; | ||||
| 			var obj = smcc; | ||||
| 			moveBottom = parseInt(obj.style.bottom); | ||||
| 			moveLeft = parseInt(obj.style.left); | ||||
| 			if (isFirefox = navigator.userAgent.indexOf("Firefox") > 0) { | ||||
| 				window.getSelection().removeAllRanges(); | ||||
| 			} | ||||
| 			document.onmousemove = function () { | ||||
| 				if (moveable) { | ||||
| 					var ent = getEvent(); | ||||
| 					var x = moveLeft + ent.clientX - moveX; | ||||
| 					var y = moveBottom + (moveY - ent.clientY); | ||||
| 					obj.style.left = x + "px"; | ||||
| 					obj.style.bottom = y + "px"; | ||||
| 				} | ||||
| 			}; | ||||
| 			document.onmouseup = function () { | ||||
| 				if (moveable) { | ||||
| 					var historywidth = obj.style.left; | ||||
| 					var historyheight = obj.style.bottom; | ||||
| 					historywidth = historywidth.replace('px', ''); | ||||
| 					historyheight = historyheight.replace('px', ''); | ||||
| 					sessionStorage.setItem("historywidth", historywidth); | ||||
| 					sessionStorage.setItem("historyheight", historyheight); | ||||
| 					document.onmousemove = docMouseMoveEvent; | ||||
| 					document.onmouseup = docMouseUpEvent; | ||||
| 					moveable = false; | ||||
| 					moveX = 0; | ||||
| 					moveY = 0; | ||||
| 					moveBottom = 0; | ||||
| 					moveLeft = 0; | ||||
| 				} | ||||
| 			}; | ||||
| 		}; | ||||
| 	} | ||||
| 	$(document).ready(function () { | ||||
| 		var AIimgSrc = [ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user