Untitled
unknown
plain_text
3 years ago
4.7 kB
43
Indexable
<template>
<div class="scroll" ref="el">
<p>
"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will
give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the
master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but
because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.
Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because
occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial
example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who
has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who
avoids a pain that produces no resultant pleasure?"
</p>
<p>
"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will
give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the
master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but
because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.
Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because
occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial
example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who
has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who
avoids a pain that produces no resultant pleasure?"
</p>
<p>
"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will
give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the
master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but
because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.
Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because
occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial
example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who
has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who
avoids a pain that produces no resultant pleasure?"
</p>
<p>
"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will
give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the
master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but
because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.
Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because
occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial
example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who
has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who
avoids a pain that produces no resultant pleasure?"
</p>
</div>
<div class="mouse">
<div>x: {{ x }}</div>
<div>y: {{ y }}</div>
<div>arrivedState: {{ isScrolling }}</div>
<div>directions: {{ directions }}</div>
</div>
</template>
<script setup>
const el = ref(null)
const { x, y, isScrolling, arrivedState, directions } = useScroll(el)
watch(isScrolling, () => {
console.log('hi mom');
})
</script>
<style>
body {
background-color: gray;
}
.scroll {
background-color: white;
overflow: scroll;
height: 300px;
width: 600px;
}
</style>Editor is loading...