-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
126 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,99 @@ | ||
<template> | ||
<div class="container"> | ||
<section class="hero"> | ||
<div class="hero-body"> | ||
<div class="container"> | ||
<h1 class="title"> | ||
Environment control. | ||
</h1> | ||
<h2 class="subtitle"> | ||
Set day/night cycle. Fog, colors and much more. | ||
</h2> | ||
</div> | ||
</div> | ||
</section> | ||
<div class="container container-top"> | ||
<div class="columns"> | ||
<div class="column"> | ||
<div class="field"> | ||
<label class="label is-normal">Time of day {{timeOfDay.hour}}:{{timeOfDay.minutes}}</label> | ||
<input type="checkbox" checked="checked" id="renderer_m2" name="renderer_m2" /> | ||
<label for="renderer_m2"><span></span>Enable time of day</label> | ||
</div> | ||
<div class="field"> | ||
<label class="label is-normal">Time of day (hours)</label> | ||
<p class="control"> | ||
<input class="input range ltpurple" | ||
v-tooltip="`Current time: ${timeOfDay.hour}:${timeOfDay.minutes}`" | ||
type="range" | ||
v-on:change="setTimeOfDay($event, 'hour')" | ||
v-on:input="setTimeOfDay($event, 'hour')" | ||
min="0" | ||
max="1" | ||
step="0.005" | ||
value="0.5"> | ||
</p> | ||
</div> | ||
<div class="field"> | ||
<label class="label is-normal">Time of day (minutes)</label> | ||
<p class="control"> | ||
<input class="input range ltpurple" | ||
v-tooltip="`Current time: ${timeOfDay.hour}:${timeOfDay.minutes}`" | ||
type="range" | ||
v-on:change="setTimeOfDay($event, 'minutes')" | ||
v-on:input="setTimeOfDay($event, 'minutes')" | ||
min="0" | ||
max="1" | ||
step="0.005" | ||
value="0.5"> | ||
</p> | ||
</div> | ||
</div> | ||
<div class="column render"> | ||
<label class="label is-normal">Render</label> | ||
<div class="field"> | ||
<input type="checkbox" checked="checked" id="renderer_m2" name="renderer_m2" /> | ||
<label for="renderer_m2"><span></span>Decoration objects (M2)</label> | ||
</div> | ||
<div class="field"> | ||
<input type="checkbox" checked="checked" id="renderer_details" name="renderer_details" /> | ||
<label for="renderer_details"><span></span>Details</label> | ||
</div> | ||
<div class="field"> | ||
<input type="checkbox" checked="checked" id="renderer_terrain" name="renderer_terrain" /> | ||
<label for="renderer_terrain"><span></span>Terrain</label> | ||
</div> | ||
<div class="field"> | ||
<input type="checkbox" checked="checked" id="renderer_wmo" name="renderer_wmo" /> | ||
<label for="renderer_wmo"><span></span>World Model Object (WMO)</label> | ||
</div> | ||
<div class="field"> | ||
<input type="checkbox" checked="checked" id="renderer_liquids" name="renderer_liquids" /> | ||
<label for="renderer_liquids"><span></span>Liquids</label> | ||
</div> | ||
<div class="field"> | ||
<input type="checkbox" checked="checked" id="renderer_mountains" name="renderer_mountains" /> | ||
<label for="renderer_mountains"><span></span>Mountains</label> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'environment', | ||
methods: {}, | ||
methods: { | ||
setTimeOfDay (element, kind) { | ||
const currentHour = this.$store.state.environment.timeOfDay.hour; | ||
const currentMinutes = this.$store.state.environment.timeOfDay.minutes; | ||
const time = element.target.value; | ||
const toHour = Math.floor(((time / 3600) * 86400)); | ||
const hour = toHour < 23 ? toHour : 23; | ||
const toMinutes = Math.floor(((time / 60) * 3600)); | ||
const minutes = toMinutes < 59 ? toMinutes : 59; | ||
if (kind === 'hour') { | ||
const timeOfDay = { hour, minutes: currentMinutes }; | ||
this.timeOfDay = timeOfDay; | ||
this.$store.commit('setTimeOfDay', timeOfDay); | ||
} else if (kind === 'minutes') { | ||
const timeOfDay = { hour: currentHour, minutes }; | ||
this.timeOfDay = timeOfDay; | ||
this.$store.commit('setTimeOfDay', timeOfDay); | ||
} | ||
} | ||
}, | ||
data() { | ||
return {}; | ||
return { | ||
timeOfDay: this.$store.state.environment.timeOfDay, | ||
}; | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,120 +1,37 @@ | ||
<template> | ||
<div class="container container-top"> | ||
<div class="columns"> | ||
<div class="column"> | ||
<div class="field"> | ||
<label class="label is-normal">Slow motion (FPS:60)</label> | ||
<p class="control"> | ||
<input class="input range ltpurple" type="range"> | ||
</p> | ||
</div> | ||
<div class="field"> | ||
<label class="label is-normal">Time of day (hours)</label> | ||
<p class="control"> | ||
<input class="input range ltpurple" | ||
v-tooltip="`Current time: ${timeOfDay.hour}:${timeOfDay.minutes}`" | ||
type="range" | ||
v-on:change="setTimeOfDay($event, 'hour')" | ||
v-on:input="setTimeOfDay($event, 'hour')" | ||
min="0" | ||
max="1" | ||
step="0.005" | ||
value="0.5"> | ||
</p> | ||
</div> | ||
<div class="field"> | ||
<label class="label is-normal">Time of day (minutes)</label> | ||
<p class="control"> | ||
<input class="input range ltpurple" | ||
v-tooltip="`Current time: ${timeOfDay.hour}:${timeOfDay.minutes}`" | ||
type="range" | ||
v-on:change="setTimeOfDay($event, 'minutes')" | ||
v-on:input="setTimeOfDay($event, 'minutes')" | ||
min="0" | ||
max="1" | ||
step="0.005" | ||
value="0.5"> | ||
</p> | ||
</div> | ||
</div> | ||
<div class="column"> | ||
<div class="field"> | ||
<label class="label is-normal">Attach x</label> | ||
<p class="control"> | ||
<input class="input range ltpurple" type="range"> | ||
</p> | ||
</div> | ||
<div class="field"> | ||
<label class="label is-normal">Attach y</label> | ||
<p class="control"> | ||
<input class="input range ltpurple" type="range"> | ||
</p> | ||
</div> | ||
<div class="field"> | ||
<label class="label is-normal">Attach z</label> | ||
<p class="control"> | ||
<input class="input range ltpurple" type="range"> | ||
</p> | ||
</div> | ||
</div> | ||
<div class="column render"> | ||
<label class="label is-normal">Render</label> | ||
<div class="field"> | ||
<input type="checkbox" checked="checked" id="renderer_m2" name="renderer_m2" /> | ||
<label for="renderer_m2"><span></span>Decoration objects (M2)</label> | ||
</div> | ||
<div class="field"> | ||
<input type="checkbox" checked="checked" id="renderer_details" name="renderer_details" /> | ||
<label for="renderer_details"><span></span>Details</label> | ||
</div> | ||
<div class="field"> | ||
<input type="checkbox" checked="checked" id="renderer_terrain" name="renderer_terrain" /> | ||
<label for="renderer_terrain"><span></span>Terrain</label> | ||
</div> | ||
<div class="field"> | ||
<input type="checkbox" checked="checked" id="renderer_wmo" name="renderer_wmo" /> | ||
<label for="renderer_wmo"><span></span>World Model Object (WMO)</label> | ||
</div> | ||
<div class="field"> | ||
<input type="checkbox" checked="checked" id="renderer_liquids" name="renderer_liquids" /> | ||
<label for="renderer_liquids"><span></span>Liquids</label> | ||
</div> | ||
<div class="field"> | ||
<input type="checkbox" checked="checked" id="renderer_mountains" name="renderer_mountains" /> | ||
<label for="renderer_mountains"><span></span>Mountains</label> | ||
</div> | ||
</div> | ||
</div> | ||
<section class="section"> | ||
<div class="columns"> | ||
<div class="column"> | ||
|
||
<div class="container"> | ||
<h1 class="title">Welcome</h1> | ||
<h2 class="subtitle"> | ||
BugCraft Studio is the <strong>open source</strong> machinima tool for Machinima makers like you. | ||
</h2> | ||
</div> | ||
|
||
</div> | ||
<div class="column"> | ||
<figure class="image is-256x256"> | ||
<img src="/static/intro-box.png"> | ||
</figure> | ||
</div> | ||
<div class="column"> | ||
<figure class="image is-256x256"> | ||
<img src="/static/intro-box-learn.png"> | ||
</figure> | ||
</div> | ||
<div class="column"> | ||
<figure class="image is-256x256"> | ||
<img src="/static/intro-box-discord.png"> | ||
</figure> | ||
</div> | ||
</div> | ||
</section> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'general', | ||
methods: { | ||
setTimeOfDay (element, kind) { | ||
const currentHour = this.$store.state.environment.timeOfDay.hour; | ||
const currentMinutes = this.$store.state.environment.timeOfDay.minutes; | ||
const time = element.target.value; | ||
const toHour = Math.floor(((time / 3600) * 86400)); | ||
const hour = toHour < 23 ? toHour : 23; | ||
const toMinutes = Math.floor(((time / 60) * 3600)); | ||
const minutes = toMinutes < 59 ? toMinutes : 59; | ||
if (kind === 'hour') { | ||
const timeOfDay = { hour, minutes: currentMinutes }; | ||
this.timeOfDay = timeOfDay; | ||
this.$store.commit('setTimeOfDay', timeOfDay); | ||
} else if (kind === 'minutes') { | ||
const timeOfDay = { hour: currentHour, minutes }; | ||
this.timeOfDay = timeOfDay; | ||
this.$store.commit('setTimeOfDay', timeOfDay); | ||
} | ||
} | ||
}, | ||
data() { | ||
return { | ||
timeOfDay: this.$store.state.environment.timeOfDay, | ||
}; | ||
}, | ||
name: 'general' | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters