mirror of
https://github.com/sendevia/website.git
synced 2026-03-06 15:42:34 +08:00
feat: 更新配置,噪声种子只在客户端生成
This commit is contained in:
@@ -3,6 +3,7 @@ import markdownItAnchor from "markdown-it-anchor";
|
||||
import packageJson from "../package.json";
|
||||
|
||||
export default defineConfig({
|
||||
base: "/",
|
||||
title: "sendevia 的小站",
|
||||
titleTemplate: ":title",
|
||||
description: "一个随便写写的博客",
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useGlobalData } from "../composables/useGlobalData";
|
||||
const { frontmatter } = useGlobalData();
|
||||
|
||||
const seed = ref(1);
|
||||
onMounted(() => {
|
||||
seed.value = Date.now();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -8,7 +14,7 @@ const { frontmatter } = useGlobalData();
|
||||
<div class="header">
|
||||
<svg width="0" height="0">
|
||||
<filter id="noise-filter">
|
||||
<feTurbulence type="fractalNoise" baseFrequency="1" numOctaves="5" :seed="Date.now()" result="noise" />
|
||||
<feTurbulence type="fractalNoise" baseFrequency="1" numOctaves="5" :seed="seed" result="noise" />
|
||||
<feColorMatrix type="saturate" values="0" result="desaturatedNoise" />
|
||||
<feComponentTransfer>
|
||||
<feFuncR type="discrete" tableValues="0 1" />
|
||||
|
||||
Reference in New Issue
Block a user