mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-24 21:55:09 +00:00
feat(physics): Enhance physics bridge service with new functionalities
- Added SetGravity method to adjust the gravity in the physics world. - Introduced AddSphereRigidBody method for creating sphere rigid bodies. - Implemented RemoveRigidBody method to delete existing rigid bodies. - Added SetRigidBodyTransform method to update the position and rotation of rigid bodies. - Included ApplyForce and ApplyImpulse methods for applying forces and impulses to rigid bodies. - Added SetLinearVelocity method to set the linear velocity of rigid bodies. - Enhanced StepSimulation method to accept a maxSubSteps parameter. - Implemented GetBodyCount method to retrieve the number of rigid bodies in the world. - Added Clear method to remove all rigid bodies from the physics world. - Updated the script engine service to bind new physics methods to Lua. - Enhanced material configuration handling in shader script service. - Introduced MaterialXMaterialConfig structure for better material management. - Added texture binding support in ShaderPaths structure. - Included stb_image implementation for image loading support.
This commit is contained in:
@@ -125,6 +125,12 @@ Context.__index = Context
|
||||
function Context:new(options)
|
||||
options = options or {}
|
||||
local style = options.style or DEFAULT_STYLE
|
||||
if options.style == nil and type(config) == "table" then
|
||||
local guiFont = config.gui_font
|
||||
if type(guiFont) == "table" and type(guiFont.font_size) == "number" then
|
||||
style.fontSize = guiFont.font_size
|
||||
end
|
||||
end
|
||||
local opacity = 1.0
|
||||
if type(config) == "table" and type(config.gui_opacity) == "number" then
|
||||
opacity = config.gui_opacity
|
||||
|
||||
Reference in New Issue
Block a user