fix actions
This commit is contained in:
19
.github/workflows/gh-pages.yml
vendored
19
.github/workflows/gh-pages.yml
vendored
@@ -14,25 +14,20 @@ jobs:
|
|||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 25
|
node-version: 25
|
||||||
ref: main
|
cache: 'npm'
|
||||||
submodules: true
|
cache-dependency-path: atmosphere/package-lock.json
|
||||||
fetch-depth: 0
|
- run: npm ci
|
||||||
- run: |
|
working-directory: min-react/
|
||||||
cd atmosphere/
|
|
||||||
npm i
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
TZ: "Asia/Tokyo"
|
TZ: "Asia/Tokyo"
|
||||||
VITE_GOOGLE_MAP_API_KEY: ${{ secrets.VITE_GOOGLE_MAP_API_KEY }}
|
run: npm run build
|
||||||
run: |
|
working-directory: min-react/
|
||||||
cd atmosphere/
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./atmosphere/dist
|
publish_dir: ./min-react/dist
|
||||||
user_name: 'ai[bot]'
|
user_name: 'ai[bot]'
|
||||||
user_email: '138105980+yui-syui-ai[bot]@users.noreply.github.com'
|
user_email: '138105980+yui-syui-ai[bot]@users.noreply.github.com'
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,5 +1,4 @@
|
|||||||
node_modules
|
node_modules
|
||||||
*package-lock.json
|
|
||||||
example
|
example
|
||||||
*yarn.lock
|
*yarn.lock
|
||||||
**DS_Store
|
**DS_Store
|
||||||
@@ -11,3 +10,4 @@ dist
|
|||||||
three-geospatial
|
three-geospatial
|
||||||
**.env
|
**.env
|
||||||
.env
|
.env
|
||||||
|
.env.production
|
||||||
|
|||||||
2465
atmosphere/package-lock.json
generated
Normal file
2465
atmosphere/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -30,14 +30,12 @@ const VRM_URL = `${BASE_URL}ai.vrm`;
|
|||||||
const VRMA_URL = `${BASE_URL}fly.vrma`;
|
const VRMA_URL = `${BASE_URL}fly.vrma`;
|
||||||
const EARTH_RADIUS = 6378137;
|
const EARTH_RADIUS = 6378137;
|
||||||
|
|
||||||
// 天気変更の間隔 (ms) - 5分
|
|
||||||
const WEATHER_INTERVAL = 5 * 60 * 1000;
|
const WEATHER_INTERVAL = 5 * 60 * 1000;
|
||||||
|
|
||||||
// 時間の進行速度 (倍率)
|
const TIME_SCALE = 10;
|
||||||
const TIME_SCALE = 100;
|
|
||||||
|
|
||||||
// 初期時刻: 正午 (12:00)
|
// 初期時刻: 正午 (12:00)
|
||||||
const INITIAL_DATE = new Date('2024-06-21T12:00:00');
|
const INITIAL_DATE = new Date('2024-06-21T16:00:00');
|
||||||
|
|
||||||
// --- Weather Presets (天候設定) ---
|
// --- Weather Presets (天候設定) ---
|
||||||
const WEATHER_PRESETS = [
|
const WEATHER_PRESETS = [
|
||||||
@@ -237,17 +235,12 @@ function AtmosphereScene() {
|
|||||||
|
|
||||||
// 3. 時間進行と太陽移動 (Canvas内なのでuseFrameが使える)
|
// 3. 時間進行と太陽移動 (Canvas内なのでuseFrameが使える)
|
||||||
useFrame((state, delta) => {
|
useFrame((state, delta) => {
|
||||||
// 時間を進める
|
|
||||||
const currentDate = dateRef.current;
|
const currentDate = dateRef.current;
|
||||||
const elapsedMs = delta * TIME_SCALE * 1000;
|
const elapsedMs = delta * TIME_SCALE * 1000;
|
||||||
currentDate.setTime(currentDate.getTime() + elapsedMs);
|
currentDate.setTime(currentDate.getTime() + elapsedMs);
|
||||||
|
|
||||||
// Atmosphere更新
|
|
||||||
if (atmosphereRef.current) {
|
if (atmosphereRef.current) {
|
||||||
atmosphereRef.current.updateByDate(currentDate);
|
atmosphereRef.current.updateByDate(currentDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 太陽移動
|
|
||||||
if (sunRef.current) {
|
if (sunRef.current) {
|
||||||
const hours = currentDate.getHours() + currentDate.getMinutes() / 60 + currentDate.getSeconds() / 3600;
|
const hours = currentDate.getHours() + currentDate.getMinutes() / 60 + currentDate.getSeconds() / 3600;
|
||||||
const sunAngle = MathUtils.mapLinear(hours, 6, 18, 0, Math.PI);
|
const sunAngle = MathUtils.mapLinear(hours, 6, 18, 0, Math.PI);
|
||||||
@@ -256,7 +249,7 @@ function AtmosphereScene() {
|
|||||||
|
|
||||||
if (hours < 6 || hours > 18) {
|
if (hours < 6 || hours > 18) {
|
||||||
sunRef.current.position.set(0, -1, 0);
|
sunRef.current.position.set(0, -1, 0);
|
||||||
sunRef.current.intensity = 0.0;
|
sunRef.current.intensity = 10.0;
|
||||||
} else {
|
} else {
|
||||||
sunRef.current.position.set(sunX, sunY, 0.2);
|
sunRef.current.position.set(sunX, sunY, 0.2);
|
||||||
sunRef.current.intensity = MathUtils.lerp(0.5, 3.0, sunY);
|
sunRef.current.intensity = MathUtils.lerp(0.5, 3.0, sunY);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { defineConfig } from 'vite'
|
|||||||
import react from '@vitejs/plugin-react'
|
import react from '@vitejs/plugin-react'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
|
||||||
base: '/',
|
base: '/',
|
||||||
//base: '/pkg/atmosphere/',
|
//base: '/pkg/atmosphere/',
|
||||||
|
plugins: [react()]
|
||||||
})
|
})
|
||||||
|
|||||||
2664
min-react/package-lock.json
generated
Normal file
2664
min-react/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user