I know its not BJS, but I have seen people request for easy ways to animate or change values on a scene from the scroll position of the page.
All the other Libraries that are out there require a ton of extra steps and its a super pain. This is to alleviate that stress…
If you have any features, you want to let me know or if there are bugs please let me know ASAP.
Here is a quick preview of it in action, ill put up a live example here at some point once I have time:
If you need an example there is a simple example page on the GitHub and Ill add more examples later. UPDATE
Before I got off for the day I added a quick BJS Scene Example
I put up a live example if anyone wants to actually see the library in use without grabbing the repository. This page has 60+ animations being controlled by the system its pretty cool (almost certain I could make every adobe muse scroll example) https://pryme8.github.io/scrolls.js/
Also have it up on a CDN and NPM now…
I have not seem to found a real limitation to it yet, so I am excited to wrap up work on the 3d website now.
@labris after looking at the website it looks like you could accomplish this with the down scroll still and just animating your scene to the left or right. Not really sure how they did theirs but its nice, I don’t like how you cant see the scrollbar though! I am trying to get the 3d website up and running here soon that uses it and maybe that will make more sense than on how to do it with scrolls. You would basically just do a fixed div over a body of a set height to accomplish this effect with scrolls.
If you really need the horizontal tracking though for some purpose I can add that.
Yes, this is exactly what I was asking about (mouse scroll down = horizontal move).
I am writing a short review about several interesting 3D websites. The idea is:
To demonstrate several completely different and sometimes unusual approaches/solutions;
To show that all of them are possible to make with BabylonJS.
Horizontal move on mouse scroll could produce interesting effects but usually it is overused by designers (seems that they can’t stop because it is so cooool). In my example it is nice when you look at it for the first time - but after 3rd-4th screen the effect becomes boring, and even annoying after next screens since usability really sucks
Well I suppose that one review will be not enough anyway
Since most of our clients are already enclasped with Chrismas fever I lack some time to finish even the first review. Still I feel the urgent need to educate clients and to show what is possible to do with 3D Web - most of them still know nothing about it…
Anyway, I will publish my reviews on the forum first; maybe after some time it would be reasonable to create some website for that.
I’m trying to get this working on an imported 3D Object but I don’t know what I’m doing wrong.
Babylon generated Objects work, but everytime I’m trying to use it on an imported 3D Model it simply say’s it can’t get the position of undefined…
Maybe someone can help me? I’m going crazy on this one…
I am not sure what you are trying to do with the scrolling, but in order to access the mesh you can use, for your example: BABYLON.SceneLoader.ImportMesh("", "https://raw.githubusercontent.com/BabylonJS/MeshesLibrary/master/", "shaderBall.glb", scene, function (newMeshes) { var ball = newMeshes[0]; ball.position = new BABYLON.Vector3(10, 3, 10); });
Here newMeshes[0] is the root node for all transformations.
If you need to get the mesh outside this function, you can use, for example scene.getMeshByID or scene.getMeshByName.
What are mesh names or mesh ID - you can use the Inspector to see them. In order to call Inspector outside the Playground use scene.debugLayer.show();
I had to make some updates to be able to do it in the playground… but you have an optional target param now for the scroll system to be able to use a specific element instead of the page itself.