question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Making width and height defeault for the bounds.

See original GitHub issue

For example if I set the height and width of the render window to 1600 by 600 with the engine.create options, the bounds stay at 800 by 600 (which is the default). What you have to do is update the bounds. I just think for some it might be easier that the height and width defaults to the bounds unless you change it like below.

engine.world.bounds.max.x = 1600;
engine.world.bounds.max.y = 600;

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
liabrucommented, Mar 3, 2015

This is indeed an issue.

I’m likely going to remove world bounds very soon, as their main purpose was to disable out of world bodies to prevent the browser from locking up when simulations glitched in early development.

But if I decide to keep them, I’ll add a fix for this. Thanks.

0reactions
liabrucommented, Feb 13, 2021

@vostokwork what do you want worlds bounds to do? They don’t really apply to anything in practice (they used to have a purpose, but are due to be removed). If you need collisions you should use static bodies like in the examples.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exploring the Complexities of Width and Height in CSS
The basics​​ This has to do with the box-sizing property: if it's set to content-box (the default value), the rendered size of the...
Read more >
HTML padding with 100% width and height? - Stack Overflow
If I apply the rules: width: 100%; height: 100%; padding: 5%; they produce the desired effect (at least for <div> itself) but its...
Read more >
Update: Width & Height in EaselJS - CreateJS Blog
Returns the width and height of the sourceRect (if specified) or image, extending from (x=0,y=0). Returns the bounds of the current frame. May ......
Read more >
Frame vs Bounds in iOS - Suragch - Medium
Frame origin = (0, 0) width = 80 height = 130. Bounds origin = (0, 0) width = 80 height = 130 ·...
Read more >
How to make a SwiftUI view to fill its container width and height
1 Set .frame(maxWidth: .infinity) to make the text view expand to fill a container width. 2 Set blue border will make an ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found