Compare commits
No commits in common. "44a2ee66f07a2cacdee727909c5a61b982e5863a" and "73288f1d192384f1cdace5f979e094ac93d790f6" have entirely different histories.
44a2ee66f0
...
73288f1d19
|
|
@ -1,4 +1,4 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
release
|
release
|
||||||
node_modules
|
lib/node_modules/
|
||||||
dist
|
wordpress-plugin/
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 8.2 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 12 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 10 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 12 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.9 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 11 KiB |
|
|
@ -0,0 +1 @@
|
||||||
|
import{r as a}from"./assets/SnowAnimator-Dem4j_A7.js";function i(){const t=document.getElementById("effectiveAppsSnow");if(!t)return;if(typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){t.style.display="none";return}const e=window.YooneSnowSettings||{},n={selectedShapes:Array.isArray(e.selectedShapes)?e.selectedShapes:[],mediaItems:Array.isArray(e.mediaItems)?e.mediaItems:[],emojiItems:Array.isArray(e.emojiItems)?e.emojiItems:[],textItems:Array.isArray(e.textItems)?e.textItems:[],shapeWeights:e.shapeWeights||{},mediaWeights:e.mediaWeights||{},emojiWeights:e.emojiWeights||{},textWeights:e.textWeights||{},radiusMin:typeof e.radiusMin=="number"?e.radiusMin:1,radiusMax:typeof e.radiusMax=="number"?e.radiusMax:3,driftMin:typeof e.driftMin=="number"?e.driftMin:.4,driftMax:typeof e.driftMax=="number"?e.driftMax:1,swingMin:typeof e.swingMin=="number"?e.swingMin:.2,swingMax:typeof e.swingMax=="number"?e.swingMax:1,displayDurationSeconds:typeof e.displayDurationSeconds=="number"?e.displayDurationSeconds:0,maxCount:typeof e.maxCount=="number"?e.maxCount:0,maxCountSmall:typeof e.maxCountSmall=="number"?e.maxCountSmall:0,maxCountMedium:typeof e.maxCountMedium=="number"?e.maxCountMedium:0,maxCountLarge:typeof e.maxCountLarge=="number"?e.maxCountLarge:0,assetsMap:e.assetsMap||{}};a(t,n)}document.readyState==="complete"?i():window.addEventListener("load",i);
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
#effectiveAppsSnow{display:block;position:fixed;top:0;left:0;right:0;bottom:0;pointer-events:none;z-index:1000}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
import{r as a}from"./assets/SnowAnimator-Dem4j_A7.js";function i(){const t=document.getElementById("effectiveAppsSnow");if(!t)return;if(typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){t.style.display="none";return}const e=window.YooneSnowSettings||{},n={selectedShapes:Array.isArray(e.selectedShapes)?e.selectedShapes:[],mediaItems:Array.isArray(e.mediaItems)?e.mediaItems:[],emojiItems:Array.isArray(e.emojiItems)?e.emojiItems:[],textItems:Array.isArray(e.textItems)?e.textItems:[],shapeWeights:e.shapeWeights||{},mediaWeights:e.mediaWeights||{},emojiWeights:e.emojiWeights||{},textWeights:e.textWeights||{},radiusMin:typeof e.radiusMin=="number"?e.radiusMin:1,radiusMax:typeof e.radiusMax=="number"?e.radiusMax:3,driftMin:typeof e.driftMin=="number"?e.driftMin:.4,driftMax:typeof e.driftMax=="number"?e.driftMax:1,swingMin:typeof e.swingMin=="number"?e.swingMin:.2,swingMax:typeof e.swingMax=="number"?e.swingMax:1,displayDurationSeconds:typeof e.displayDurationSeconds=="number"?e.displayDurationSeconds:0,maxCount:typeof e.maxCount=="number"?e.maxCount:0,maxCountSmall:typeof e.maxCountSmall=="number"?e.maxCountSmall:0,maxCountMedium:typeof e.maxCountMedium=="number"?e.maxCountMedium:0,maxCountLarge:typeof e.maxCountLarge=="number"?e.maxCountLarge:0,assetsMap:e.assetsMap||{}};a(t,n)}document.readyState==="complete"?i():window.addEventListener("load",i);
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="zh-CN">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>Yoone Snow Preview</title>
|
|
||||||
</head>
|
|
||||||
<body style="margin:0;padding:0;">
|
|
||||||
<canvas id="effectiveAppsSnow" aria-hidden="true"></canvas>
|
|
||||||
<script type="module">
|
|
||||||
import santa_hat from '/src/assets/圣诞雪帽.svg'
|
|
||||||
import candy_cane from '/src/assets/圣诞拐杖.svg'
|
|
||||||
import christmas_sock from '/src/assets/圣诞袜子.svg'
|
|
||||||
import christmas_tree from '/src/assets/圣诞树.svg'
|
|
||||||
import reindeer from '/src/assets/圣诞麋鹿.svg'
|
|
||||||
import christmas_berry from '/src/assets/圣诞果.svg'
|
|
||||||
window.YooneSnowSettings = {
|
|
||||||
selectedShapes: ['dot','flake','yuanbao','coin','santa_hat','candy_cane','christmas_sock','christmas_tree','reindeer','christmas_berry'],
|
|
||||||
mediaItems: [],
|
|
||||||
emojiItems: [],
|
|
||||||
textItems: [],
|
|
||||||
shapeWeights: { dot:1, flake:4, yuanbao:1, coin:1, santa_hat:1, candy_cane:1, christmas_sock:1, christmas_tree:1, reindeer:1, christmas_berry:1 },
|
|
||||||
mediaWeights: {},
|
|
||||||
emojiWeights: {},
|
|
||||||
textWeights: {},
|
|
||||||
radiusMin: 1.0,
|
|
||||||
radiusMax: 3.0,
|
|
||||||
driftMin: 0.4,
|
|
||||||
driftMax: 1.0,
|
|
||||||
swingMin: 0.2,
|
|
||||||
swingMax: 1.0,
|
|
||||||
displayDurationSeconds: 0,
|
|
||||||
maxCount: 0,
|
|
||||||
maxCountSmall: 0,
|
|
||||||
maxCountMedium: 0,
|
|
||||||
maxCountLarge: 0,
|
|
||||||
assetsMap: {
|
|
||||||
santa_hat,
|
|
||||||
candy_cane,
|
|
||||||
christmas_sock,
|
|
||||||
christmas_tree,
|
|
||||||
reindeer,
|
|
||||||
christmas_berry
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<script type="module" src="/src/main.ts"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -6,7 +6,6 @@ export function runSnow(canvas: HTMLCanvasElement, settings: SystemSettings){
|
||||||
let viewportWidth = window.innerWidth
|
let viewportWidth = window.innerWidth
|
||||||
let viewportHeight = window.innerHeight
|
let viewportHeight = window.innerHeight
|
||||||
const dpr = window.devicePixelRatio || 1
|
const dpr = window.devicePixelRatio || 1
|
||||||
const system = createSystem(context, () => viewportWidth, () => viewportHeight, settings)
|
|
||||||
function resize(){
|
function resize(){
|
||||||
viewportWidth = window.innerWidth
|
viewportWidth = window.innerWidth
|
||||||
viewportHeight = window.innerHeight
|
viewportHeight = window.innerHeight
|
||||||
|
|
@ -19,6 +18,7 @@ export function runSnow(canvas: HTMLCanvasElement, settings: SystemSettings){
|
||||||
system.recomputeTarget()
|
system.recomputeTarget()
|
||||||
}
|
}
|
||||||
resize()
|
resize()
|
||||||
|
const system = createSystem(context, () => viewportWidth, () => viewportHeight, settings)
|
||||||
const animator = new Animator(
|
const animator = new Animator(
|
||||||
(dt) => { system.updateSystem(dt); system.renderSystem() },
|
(dt) => { system.updateSystem(dt); system.renderSystem() },
|
||||||
() => system.shouldStop(),
|
() => system.shouldStop(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue