-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is svelte-scenejs on the roadmap? #79
Labels
Comments
I will remake scenejs for all frameworks including svelte. (in hooks or reactive form) I will release it within this month.
<script>
import { useSceneItem } from "scenejs";
const {
left, top, transform,
play,
} = useSceneItem({
0: {
left: "0px",
top: "100px",
transform: "translate(0px)",
},
1: {
left: "100px",
top: "100px",
transform: "translate(100px)",
},
});
play();
</script>
<div style={{ transform: $transform, left: $left, top: $top }}>
Target
</div> |
That's great to hear! Looking forward to it :-) |
daybrush
added a commit
that referenced
this issue
Dec 15, 2022
[email protected] is released. https://github.com/daybrush/scenejs/tree/master/packages/svelte-scenejs $ npm install svelte-scenejs <script>
import {
useScene,
useSceneItem,
useFrame,
useNowFrame,
} from "svelte-scenejs";
const scene = new Scene({
"a1": {
0: {
left: "0px",
top: "0px",
transform: `translate(0px, 0px)`,
},
1: {
left: "100px",
top: "100px",
transform: `translate(100px, 0px)`,
},
},
"a2": {
0: {
left: "0px",
top: "0px",
transform: `translate(0px, 0px)`,
},
1: {
left: "100px",
top: "100px",
transform: `translate(100px, 0px)`,
},
}
});
const { cssText: cssText1 } = useNowFrame(scene.getItem("a1"));
const { cssText: cssText2 } = useNowFrame(scene.getItem("a2"));
</script>
<div class="container">
<div class="a1" style={$cssText1}></div>
<div class="a2" style={$cssText2}></div>
</div> There are still many shortcomings and explanations are insufficient.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been enjoying working your svelte-movable library. Would love to know if you've considered a svelte client for scenejs.
The text was updated successfully, but these errors were encountered: