# webGLmmk

Members

83

• Rank

## Contact Methods

• Website URL
gs4thewin.com
@gs4thewin

## Profile Information

• Gender
Not Telling
• Interests
But that ain't my business tho....

## Recent Profile Visitors

3545 profile views

1. ## Orbiting planets...

Ok so simply by playing with the numbers, I got it to do what I wanted to do. https://www.babylonjs-playground.com/#2FPT1A#158 There are now two variables, alpha, and alpha 2, they both store Math.PI. Outside the renderBeforeeRegister function. Inside the rendereBeforeRegister function, lines 87 and 90. set the planet into orbit with the parameters passed into X Y and Z. I got what I wanted it to do by increasing the number of radians passed into Math.sin & Math.cos: (alpha + 2, or whatever). Going to be struggling for a while to understand this entire line of code, and why it works...any direction or insight on that would be very much appreciated, like, Why is it that If these lines are NOT inside registerBeforeRender, the planets don't orbit......tho I"m sure other posts have more pressing issues ... back to the unit circle...?
2. ## Orbiting planets...

Using a playground scene originating from this post/thread: @wingnut adding another planet: https://www.babylonjs-playground.com/#2FPT1A#157 and I'm trying to figure out how to get the planets to start at different locations along the orbit. I understand how adjusting the x and z parameters inside the planet.position =Vector3 INSIDE the registerBeforeRender adjusts the orbit path itself, making it oblong etc....right now im just sticking with the same circular orbit. I just want the outer green planet to start at a different place, perhaps off to the right. Setting the position outside the registerBeforeRender does nothing - it gets overridden by the position inside RegisterBeforeRender. Im not sure if what Im missing is related to that function, or what....i tried a few things but without 100% understanding of whats going on here...Trig skills a bit weak, working on that...

Great...it worked as long as I was running it through the server. So is the server is needed because of the procedural texture? I don't think I can run it on github then...still not running the file there, or locally without going through the server...that going to have to find an actual host... Also, kinda silly noob question, but I was looking around github to find where you got that link, in case I needed the other ones...is there a convenient place where you copy and paste it from? It didn't work when i just copied a raw link from within the dist/preview folders

The demo does work on the playground. Just tried it from my local webserver (apache 2 var/www etc). I tried 2 files that I downloaded from the playground: 1 the basic scene with the sphere and plane (the one that first appears default on the playground), and my custom scene with the procedural texture: https://www.babylonjs-playground.com/#KM3TC#20 The first file with the basic scene ran in my browser, but my custom one here did not. Still white screen. Thanks...

Do I still need to include hand, cannon, and oimo files in the <head> of a local document? Or are they integrated into the main babylon.js cdn link? Just noticed the links are no longer on the github page... It's been a bit... Also, when I download the zip for the playground basic scene, then open it up, it renders fine. When I open the following scene with a procedural texture, i just get white screen. ,, *edit*... uploaded to github and it won't run there either. This was the same file from the downloaded zip in the following playground scene...has preview links... hashtag confused https://www.babylonjs-playground.com/#KM3TC#20
6. ## debugging canvas2d -syntax?

Ah, so this is brand new to me. Will dig in. About time to find better ways to procedurally generate the scene anyway.
7. ## debugging canvas2d -syntax?

http://www.babylonjs-playground.com/#IVDDJI So this first function going on creates a set of button controls with canvas 2d..the scene should be creating a bunch of randomly generated sphere's in quasi space scene. It was working and I hadn't changed anything..I've been out of this for a while. Anyway so it won't render, and the browser points me to line 13 ( in the playground version as well). My debugging synapses aren't working well right now as I'm trying to get back in gear. buttonControls2.js:13 Uncaught TypeError: Cannot read property 'CACHESTRATEGY_DONTCACHE' of undefined Playground says expected expression, got '}' Nothing is popping out at me right now...it looks right.
8. ## [SOLVED] - Pause the audio engine

Older thread, but this is how I used the Sound class: Sound.play(), sound.pause(), sound.stop(). http://www.babylonjs-playground.com/#KZQGPA#1 Does what it needs to. Next step is to try to put the pause on the same button as the play..i think i've got that worked out...and design of course @MackeyK24 @davrous @Nabroski
9. ## Procedurally Generated Content - elements

Ok so I guess I have to get back on the Node train again, and related DB's. Pretty comfortable with all the OOP, but databases were always like, "I'll get to that when I need to get to that". Apparently that's where I'm getting to pretty soon. I think I did something with PHP/mySQL once lol. Who hasn't. Was never particularly anxious about the ability to figure it out when I needed to use it. You can cripple your productivity worrying about all the things there IS to learn..its better to just learn what you need when you need it. I came across something called "Nodegame" that seems pretty promising. http://nodegame.org/. Obviously don't want a stack that's meant for standard webdev. Enough gamedevs doing this now that there hopefully will be something easier for me to jump into. [Here's the deal guys, gamedevs...you do all the hard work, and then I tweet about how awesome you are. thanks for the framework. Open source is the best.] Yeah, any game idea I want to develop that's not a simple arcade style game will need to store it's objects in a DB. That I expected, though not as immediately. This star scene was never really meant to be a game, but it's probably a good way to build my skills. I like the idea of using particles as distant stars. They'd need static positioning in this scene though...they're not going to emit from anything. maybe SolidParticleSystem. No worries, I don't take it all as gospel ...you do have a way of helping me think of things I haven't considered, so the brainstorming around to different possibilities has it's value.

11. ## Procedurally Generated Content - elements

I'm sorry, I don't really have any code examples, since this is totally new to me. I want to start creating all my babylon scenes with procedurally generated content - I mean elements, not just textures. For example, this space scene with randomly distributed stars.. http://www.babylonjs-playground.com/#1PWCZ8#2 I can render quite a bit less if i just relocate sections as the camera moves forward. I'd rather start with another scene though, something simpler, like a "ground", moving tiles based on position of the camera - in fact putting it that way makes it seem even easier...(its never as easy as it seems) I've started to read up on techniques, and I'm sure I can figure it out, but I thought I'd just shout out in case I've missed any nice examples in my forum searches. Most of what comes up is related to textures. I'm not particularly concerned about materials right now, just environments and elements that are generated with movement. What I DO understand is that its a wide open field and how you procedurally generate depends entirely on what you are trying to create. Been on hiatus for a few months, too busy but I'M BACK B