Skip to content

Commit c33d919

Browse files
Site changes [skip-ci]
1 parent a2abc2d commit c33d919

File tree

1,059 files changed

+8797
-3960
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,059 files changed

+8797
-3960
lines changed

_includes/examples/render/screen_to_world/bee_script.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
local DISPLAY_WIDTH = sys.get_config_int("display.width")
2-
local DISPLAY_HEIGHT = sys.get_config_int("display.height")
3-
41
-- function to convert screen (mouse/touch) coordinates to
52
-- world coordinates given a camera component
63
-- this function will use the camera view and projection to
@@ -9,11 +6,13 @@ local function screen_to_world(x, y, z, camera_id)
96
local projection = camera.get_projection(camera_id)
107
local view = camera.get_view(camera_id)
118
local w, h = window.get_size()
9+
1210
-- The window.get_size() function will return the scaled window size,
1311
-- ie taking into account display scaling (Retina screens on macOS for
1412
-- instance). We need to adjust for display scaling in our calculation.
15-
w = w / (w / DISPLAY_WIDTH)
16-
h = h / (h / DISPLAY_HEIGHT)
13+
local scale = window.get_display_scale()
14+
w = w / scale
15+
h = h / scale
1716

1817
-- https://defold.com/manuals/camera/#converting-mouse-to-world-coordinates
1918
local inv = vmath.inv(projection * view)
Binary file not shown.

examples/animation/basic_tween/Defoldexamples_asmjs.js

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

examples/animation/basic_tween/Defoldexamples_pthread_wasm.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/animation/basic_tween/Defoldexamples_wasm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"content":[{"name":"game.projectc","size":4103,"pieces":[{"name":"game0.projectc","offset":0}]},{"name":"game.arci","size":1408,"pieces":[{"name":"game0.arci","offset":0}]},{"name":"game.arcd","size":38692,"pieces":[{"name":"game0.arcd","offset":0}]},{"name":"game.dmanifest","size":1585,"pieces":[{"name":"game0.dmanifest","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game0.public.der","offset":0}]}],"total_size":45950}
1+
{"content":[{"name":"game.projectc","size":4138,"pieces":[{"name":"game0.projectc","offset":0}]},{"name":"game.arci","size":1408,"pieces":[{"name":"game0.arci","offset":0}]},{"name":"game.arcd","size":38692,"pieces":[{"name":"game0.arcd","offset":0}]},{"name":"game.dmanifest","size":1585,"pieces":[{"name":"game0.dmanifest","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game0.public.der","offset":0}]}],"total_size":45985}
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)