mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-09 08:29:30 -06:00
Updated BallpitDemo and OrbDemo to use the latest changes.
This commit is contained in:
@@ -17,59 +17,15 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Customize>
|
<Customize>
|
||||||
<PreviewSwitch title="Display Cursor" v-model="followCursor" @update:model-value="forceRerender" />
|
<PreviewSwitch title="Display Cursor" v-model="followCursor" />
|
||||||
|
|
||||||
<PreviewSlider
|
<PreviewSlider title="Ball Count" :min="50" :max="500" :step="10" v-model="count" />
|
||||||
title="Ball Count"
|
|
||||||
:min="50"
|
|
||||||
:max="500"
|
|
||||||
:step="10"
|
|
||||||
v-model="count"
|
|
||||||
@onChange="
|
|
||||||
(val: number) => {
|
|
||||||
count = val;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<PreviewSlider
|
<PreviewSlider title="Gravity" :min="0.1" :max="1" :step="0.1" v-model="gravity" />
|
||||||
title="Gravity"
|
|
||||||
:min="0.1"
|
|
||||||
:max="1"
|
|
||||||
:step="0.1"
|
|
||||||
v-model="gravity"
|
|
||||||
@onChange="
|
|
||||||
(val: number) => {
|
|
||||||
gravity = val;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<PreviewSlider
|
<PreviewSlider title="Friction" :min="0.9" :max="1" :step="0.001" v-model="friction" />
|
||||||
title="Friction"
|
|
||||||
:min="0.9"
|
|
||||||
:max="1"
|
|
||||||
:step="0.001"
|
|
||||||
v-model="friction"
|
|
||||||
@onChange="
|
|
||||||
(val: number) => {
|
|
||||||
friction = val;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<PreviewSlider
|
<PreviewSlider title="Wall Bounce" :min="0.1" :max="1" :step="0.05" v-model="wallBounce" />
|
||||||
title="Wall Bounce"
|
|
||||||
:min="0.1"
|
|
||||||
:max="1"
|
|
||||||
:step="0.05"
|
|
||||||
v-model="wallBounce"
|
|
||||||
@onChange="
|
|
||||||
(val: number) => {
|
|
||||||
wallBounce = val;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</Customize>
|
</Customize>
|
||||||
|
|
||||||
<PropTable :data="propData" />
|
<PropTable :data="propData" />
|
||||||
|
|||||||
@@ -12,35 +12,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Customize>
|
<Customize>
|
||||||
<PreviewSlider
|
<PreviewSlider title="Hue Shift" :min="0" :max="360" :step="1" v-model="hue" />
|
||||||
title="Hue Shift"
|
|
||||||
:min="0"
|
|
||||||
:max="360"
|
|
||||||
:step="1"
|
|
||||||
v-model="hue"
|
|
||||||
@onChange="
|
|
||||||
(val: number) => {
|
|
||||||
hue = val;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<PreviewSlider
|
<PreviewSlider title="Hover Intensity" :min="0" :max="5" :step="0.01" v-model="hoverIntensity" />
|
||||||
title="Hover Intensity"
|
|
||||||
:min="0"
|
|
||||||
:max="5"
|
|
||||||
:step="0.01"
|
|
||||||
v-model="hoverIntensity"
|
|
||||||
@onChange="
|
|
||||||
(val: number) => {
|
|
||||||
hoverIntensity = val;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<PreviewSwitch title="Rotate on Hover" v-model="rotateOnHover" @update:model-value="forceRerender" />
|
<PreviewSwitch title="Rotate on Hover" v-model="rotateOnHover" />
|
||||||
|
|
||||||
<PreviewSwitch title="Force Hover State" v-model="forceHoverState" @update:model-value="forceRerender" />
|
<PreviewSwitch title="Force Hover State" v-model="forceHoverState" />
|
||||||
</Customize>
|
</Customize>
|
||||||
|
|
||||||
<PropTable :data="propData" />
|
<PropTable :data="propData" />
|
||||||
@@ -58,7 +36,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useForceRerender } from '@/composables/useForceRerender';
|
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import CliInstallation from '../../components/code/CliInstallation.vue';
|
import CliInstallation from '../../components/code/CliInstallation.vue';
|
||||||
import CodeExample from '../../components/code/CodeExample.vue';
|
import CodeExample from '../../components/code/CodeExample.vue';
|
||||||
@@ -71,8 +48,6 @@ import TabbedLayout from '../../components/common/TabbedLayout.vue';
|
|||||||
import { orb } from '../../constants/code/Backgrounds/orbCode';
|
import { orb } from '../../constants/code/Backgrounds/orbCode';
|
||||||
import Orb from '../../content/Backgrounds/Orb/Orb.vue';
|
import Orb from '../../content/Backgrounds/Orb/Orb.vue';
|
||||||
|
|
||||||
const { forceRerender } = useForceRerender();
|
|
||||||
|
|
||||||
const hue = ref(100);
|
const hue = ref(100);
|
||||||
const hoverIntensity = ref(0.5);
|
const hoverIntensity = ref(0.5);
|
||||||
const rotateOnHover = ref(true);
|
const rotateOnHover = ref(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user