scene, sim, app, system, math

About advanced scenes, and the Thyme scripting language used in Algodoo.

scene, sim, app, system, math

Postby FLO » Tue Aug 29, 2017 8:40 pm

Scene

App.GUI.preScaleBrowserThumbnails = true, default = true. Set to true to scale the scene thumbnail PNG:s before handing them over to WebKit. This produces higher quality previews and also saves disk space and rendering time.
App.sceneFadeInTime = 1, default = 1. Controls the time it takes for a newly loaded scene to fade in
App.killerPlanes = true, default = true. Controls whether or not new scenes should have default killer planes added to them. When switching this on or off, the current scene WILL be affected.
App.groundPlane = true, default = true. Controls whether or not new scenes should have a plane added to them.
Sim.legacyMode = 2, default = 2. Set to 0 for pre 1.9 scenes. The only difference is in how the contact force is calculated. Set to 1 for pre 1.9.9 scenes. 2==body air friction
Sim.positionsLast = true, default = true. If true, first integrate velocities, then positions. If false, do the other way around. True is recommended for correct preview of forces when paused. False is recommended for viewing scenes made before 2.0.1.
Scene.moveWorld
Scene.entityByGeomID
Scene.MakeModern. Run to update scene to the current version of Algodoo. May change the behavior of the scene (hopefully for the better).
Scene.addGroup
Scene.SelectLayer
Scene.author = FLO
Scene.algoboxID. The identifier, if any, of this scene on the scene sharing service 'Algobox'.
Scene.addLayer
Scene.addPolygon
Scene.addThruster
Scene.addCircle
Scene.loadScene
Scene.addWater
Scene.importPhunlet
Scene.addSpring
Scene.addWidget
Scene.addPlane
Scene.title
Scene.Open
Scene.addLineEndPoint
Scene.New
Scene.RemoveEntity
Scene.description
Scene.addLaserPen
Scene.setFilter
Scene.entityByID
Scene.Camera.suspendFollowIfTooling = true, default = true. If true, the camera will temporarily stop following an object when you are using a tool on it (e.g. dragging it).
Scene.Camera.trackRotation = false, default = false
Scene.Camera.zoom = 150.00009, default = 150
Scene.Camera.smoothRotation = true, default = true
Scene.Camera.frictionConst = [20, 0, 0], default = [20, 0, 0]. Friction of velocity; constant, linear and quadratic. In units: pixels/s
Scene.Camera.smoothPan = true, default = true
Scene.Camera.smoothFactor = 0.9, default = 0.9
Scene.Camera.rotation = 0, default = 0
Scene.Camera.kineticPanning = true, default = true. Turns on/off the kinetic/inertial panning ("throwing the camera")
Scene.Camera.pan = [0.53656632, 2.1468503], default = [0, 0]
Scene.Camera.smoothZoom = true, default = true
Scene.controllAccelerationFollowCamera = false, default = true. If true, control acceleration will depend on the orientation of the camera instead of the scene.
Scene.sounds
Scene.addBox
Scene.addContact
Scene.addHinge
Scene.gravityRotationOffset = NaN, default = NaN
Scene.addFixjoint
Scene.setBodyAttrib
Scene.SaveAs
Scene.MoveToOrigo
Scene.fileDir. The directory in which a saved version of the scene can be found
Scene.Clear
Scene.addPen
Scene.textures
Scene.EraseWater
Scene.ScrambleZOrder. Re-arrange the z order of all entities.
Scene.cloneEntityTo. Clones one entity to a specific world coordinate. Returns the clone. Example: Scene.cloneEntityTo(Scene.entityByID(37), [10,10]);



Sim

Sim.separatingContactsBounce = true, default = true. If false, separating contacts are always treated as resting. False before 2.0.0
Sim.limitAngVel = 0.25, default = 0.25. Rotation will be clamped to never exceed this value. Unit: revolutions per time step.
Sim.cableSafetyDistance = 0, default = 0. Attach a cable body every...
Sim.airSwitch = true, default = true
Sim.blockedContactSolver3N = true, default = true. If enabled, 3-contact manifolds will have their normal force solved directly. Only active if blockedContactSolver is true.
Sim.limitVel = 2.9979245e+008, default = 2.9979245e+008. Something moving faster than this will be removed from the simulation. This is to gracefully handle 'explosions'. Unit is m/s.
Sim.tick
Sim.gravitySwitch = true, default = true
Sim.sabreSetNumBodies = true, default = true. Inform Sabre about how many bodies there are. Keep true for speed. Keep false for debugging.
Sim.solvePenetrationDamping = false, default = false
Sim.solveTCables = 0.05, default = 0.05
Sim.airDensity = 0.01, default = 0.01
Sim.nyquistFactor = 4, default = 4. Unused
Sim.directSolveIters = 3, default = 3. How many iterations of the direct solver?
Sim.mlcp_maxIter = 7, default = 7
Sim.geomAttraction = true, default = true. Attraction is based on geometry center rather than body center
Sim.cableMaxImpFactor = +inf, default = +inf
Sim.maxSpringStrength = 10, default = 10. Multiplied with effective mass and simulation frequency to produce the maximum recommended spring force
Sim.debugCables = false, default = false
Sim.cableJacobianScale = 1, default = 1
Sim.airFrictionLinear = 0.01, default = 0.01. The linear term of the air friction
Sim.direct_lcp = true, default = true. Use LCP solver (when doing direct solving). Set to false to use just a linear solver, ignoring bounds for things such as normal impulse.
Sim.directContactSolveChains = true, default = true. Use direct solver for contacts of chain bodies (that satisfies directContactSolveChainsMassRatioLimit)
Sim.airFrictionMultiplier = 1, default = 1
Sim.fastPolyAABB = true, default = true. If true, the polygon AABB will be estimated from the OBB. This is faster, but more inaccurate, leading to more narrow phase tests
Sim.Step
Sim.solveConstCables = 1e+008, default = 1e+008
Sim.directContactSolveChainsMassRatioLimit = 5, default = 5. A body contacting a chain must be this times heavier than the chain lump to be eligible for direct solve. A low number here can put much strain on the system, and even cause instabilities.
Sim.largeOverlapTest = true, default = true. If true, will try to treat large overlaps of geometries separately
Sim.directSpringSolve = false, default = false. Use direct solver for constraint springs
Sim.legacyMode = 2, default = 2. Set to 0 for pre 1.9 scenes. The only difference is in how the contact force is calculated. Set to 1 for pre 1.9.9 scenes. 2==body air friction
Sim.gravityAngleOffset = 0, default = 0
Sim.warmStartProgressiveCutoff = 0.1, default = 0.1. If warmStartProgressive is true, the warm start factor will increase from warmStartFactor towards warmStartProgressiveMax as relative velocity goes below warmStartProgressiveCutoff
Sim.cableMaxMassRation = 2, default = 2
Sim.cableLineSmartChoice = true, default = true
Sim.blockedContactSolver4N = false, default = false. If enabled, 4-contact manifolds will have their normal force solved directly. Only active if blockedContactSolver is true.
Sim.airFrictionQuadratic = 0.001, default = 0.001. The quadratic term of the air friction. Before Algodoo 2.0, this was always zero.
Sim.bodyCount
Sim.solveConstantAdhesive = 1e+006, default = 1e+006. Spring constant strength of adhesive contacts. Should be much weaker than 'solveConstant'
Sim.warmStartProgressive = false, default = false. If true, warm starting will increase as relative velocity decreases, as controlled by warmStartProgressiveCutoff.
WARNING: Makes stacks unstable
Sim.iterativeHingesToo = true, default = true. If true, hinge that can be solve directly are _also_ solved iteratively for double effect.
Sim.pureIterativeFinish = true, default = true. End solve with one pure iterative and one pure direct solve. This solves some rare problems.
Sim.initialFriction = 0, default = 0. The friction bounds (box friction) of the first direct solve
Sim.warmStartProgressiveMax = 1, default = 1. Maximum warm start when warmStartProgressive is enabled
Sim.regularizeBounces = true, default = true. use regularization for bouncing contacts. Solves the problem with over-determined systems by relaxation, but dissipates energy.
Sim.stepsPerFrame = 0, default = 0. If greater than 0: take exactly this many simulation steps per frame.
Sim.solverSOR = [1, 1, 1], default = [1, 1, 1]. Controls the relaxation of the iterative solver. The three values controls the relaxation at the beginning, middle and end of the iteration.
Sim.solveDistFactor = 1, default = 1
Sim.cableExtrudeContacts = false, default = false. Use extruded contacts when calculating current cable stretch. WARNING: don't use.
Sim.solveRandomizeConstraints = true, default = true. Makes towers stable. without it, the bricks of the towers diverge.
Sim.running = false, default = false. Is the simulation running?
Sim.time
Sim.limitPos = 1e+008, default = 1e+008. Anything further away from the origin than this will be erased. This is due to floating point precision issues, and also to gracefully handle 'explosions'. Unit is m.
Sim.useSkipLists = true, default = true. Use skip lists to speed up polygon intersection tests
Sim.cableMiliatryConstraint = false, default = false
Sim.timeFactor = 1, default = 1
Sim.targetPenetration = 0.0001, default = 0.0001. Should be small, i.e. hardly noticeable
Sim.blockedContactSolver2NF = false, default = false. If enabled, 2-contact manifolds will have their normal and friction force solved directly. Only active if blockedContactSolver is true.
Sim.cableBendStrength = 1, default = 1. Bend constraint strength constant (inverse compliance) for (stretched) cable hinges
Sim.particleCount
Sim.solveRegularizationFactor = 1, default = 1
Sim.scriptUpdatesEveryStep = true, default = true. If true, dynamicly scripted attributes (e.g. vel={[0,0]}) will be executed on each simulation step, instead of only once per frame
Sim.solveAccFactor = 1, default = 1
Sim.collideCallbacksEveryStep = true, default = true. If false, onCollide callbacks will be called at most once per frame.
Sim.solveTcontacts = 0.05, default = 0.05
Sim.multipleContactEventPerPair = false, default = false. Set to true to get multiple "onCollide" callbacks per geometry pair per time step. In addition, the contact event will contain impulse information.
Sim.projectContacts = false, default = false. Project contacts to be perfectly touching (reduce overlaps)
Sim.cableMaxSlack = 0.1, default = 0.1
Sim.frequency = 60, default = 60
Sim.windStrength = 0, default = 0. Strength of wind i m/s
Sim.warmStartFactor = 0.5, default = 0.5
Sim.geomCount
Sim.airFrictionVersion = 3, default = 3. This controls the air resistance of objects.
If set to 0, the diameter of the object is estimated quickly using the OBB.
If set to 1, the true diameter will be used (slower, more precise). The force will be applied to the center of mass of the geometry.
If set to 2, the force will be applied to the center of the bounding box.
If set to 3, the force will be applied to a point that depends on the angle of attack (for polygons).
Sim.warmStart = true, default = true
Sim.mlcp_tolerance = 1e-006, default = 1e-006
Sim.dsFirst = true, default = true. Should the direct solver always be called first?
Sim.debugSolver = false, default = false. Debug solver
Sim.direct_friction = false, default = false. Will attempt to solve the friction via the direct solver.
In practice, this means solving the system directly once using MLCP (without friction), then iteratively adopt a friction box based on the previous normal impulse.
At least two directSolveIters is required for this method.
Sim.adHocSolver = false, default = false
Sim.blockedContactSolver = false, default = false. If enabled, small contact manifolds are solved by direct method
Sim.gravityStrength = 9.8, default = 9.8
Sim.iterativeContactsToo = true, default = true. If true, contacts that can be solve directly are _also_ solved iteratively for double effect. Only matters if direct friction is on.
Sim.Step_N
Sim.solveReverseConstraints = false, default = false. Before solving the constraints, will reverse the order of the constraint list every other simulation step
Sim.cableLineConstraint = true, default = true
Sim.hingeAutoBend_unilateral = false, default = false. Only apply auto-bend-constraint on pulling forces
Sim.skipDistance = 0.15, default = 0.15. The fraction of the polygon obb diagonal used as skip distance in the skip lists
Sim.dsLast = true, default = true. Should the direct solver always be called last?
Sim.preApplyForces = true, default = true. Apply forces as velocity changes before starting solver. If false, forces are handled by the solver
Sim.sabreThreads = 1, default = 1. Number of threads sent into SabreData::setLogicalStructure
Sim.cableAdaptiveSlack = false, default = false
Sim.solveVelFactor = 1, default = 1
Sim.hingeAutoBend_cutoff = 0.35, default = 0.35
Sim.windAngle = 0, default = 0. Direction of the wind in radians. 0 is to the right.
Sim.solveConstant = 1e+008, default = 1e+008
Sim.solveIter = 30, default = 30
Sim.directContactSolveAll = false, default = false. Use direct solver for all contacts
Sim.sortBroadPhasePairs = false, default = false. Set to true to sort the broad-phase pairs before doing narrow phase (may improve cache locality)
Sim.blockedContactSolver2N = true, default = true. If enabled, 2-contact manifolds will have their normal force solved directly. Only active if blockedContactSolver is true.
Sim.cables = false, default = false
Sim.solvePreSortConstraints = false, default = false. WARNING: INCOMPATIBLE WITH WARM STARTING
Sim.solveTconstraints = 0.05, default = 0.05
Sim.solveStiffIter = 0, default = 0
Sim.cableBendConstraint = false, default = false. Add bend constraints to stretched cables?
Sim.hingeAutoBend = true, default = true
Sim.cableDistanceConstraint = true, default = true
Sim.positionsLast = true, default = true. If true, first integrate velocities, then positions. If false, do the other way around. True is recommended for correct preview of forces when paused. False is recommended for viewing scenes made before 2.0.1.
Sim.rotFrictionLinear = 0.0314, default = 0.0314. Rotational damping. Only applies if air friction is turned on. The inertia of the object is irrelevant (unless legacyMode == 0).
Sim.directDragSolve = false, default = true. Use direct solver for drag tool hinge
Sim.forceContactCalculations = false, default = false
Sim.hingeAngleConstraintType = 0, default = 0. 0 and 1 are slightly different definitions of the angular constraint
Sim.hingeAutoBend_dampingFactor = 0.4, default = 0.4
Sim.bruteColliderCutoff = 0, default = 0
Sim.hingeAutoBendIsHolonomic = true, default = true. If true, the automatic bend constraints of hinges are holonomic, i.e. without a target angle
Sim.directHingeSolve = true, default = true. Use direct solver for hinges
Sim.springForce = 1000, default = 1000
Sim.impactCutoff = 0.05, default = 0.05. For restitution >= 1: if the contact will separate in this many seconds it will be treateted as bouncing - else resting. Should be about the same as solveTcontacts
Sim.iterativeSpringsToo = true, default = true. If true, spring constraints that can be solve directly are _also_ solved iteratively for double effect.
Sim.maxPositionCorrection = +inf, default = +inf


App

App.checkForUpdates = true, default = true. If true, Algodoo will check for updates and news every "updateInterval" days.
App.autosaveTime = 300, default = 300. Specifies in seconds the duration between automatically saves
App.fadeColor = [0, 0, 0], default = [0, 0, 0]
App.sceneFadeInTime = 1, default = 1. Controls the time it takes for a newly loaded scene to fade in
App.Undo
App.transformAttribs = true, default = true. If true, attributes such as velocities, motor and spring strength and hinge break limit will be transformed by rotation and scaling, in a matter that will attempt to preserve the interaction of the template.
App.laserFuzziness = 0.7, default = 0.7. Increase this to make the edges of the laser beam more fuzzy.
App.enableScriptMenu = true, default = true. Enables a menu where object attributes can be bound to Thyme functions
App.numColorsInRainbow = 12, default = 12. How many colors is a white laser beam split up into?
App.Step
App.mousePos
App.scalePowSpringDamping = 0, default = 0. When scaling x times, this attribute will be scaled by x^this
App.waterFanceyFactor = 10, default = 10
App.maxPlotPoints = 100000, default = 100000. The maximum number of points a plot will be drawn with
App.waterElongation = 0.05, default = 0.05
App.waterReflectiveness = 1, default = 1. Independent of refractive index, the reflectiveness gives the ability to emulate anti-reflective coating.
Default is 1. A value of 0 will remove all reflections (but leave refractions intact).
Note that a reflectiveness of 1 does not guarantee reflection -the amount of reflected light will still depend on the refractive index.
App.currentPalette = default, default = default
App.Redo
App.FreeUpMemory. Will try to free up memory and lower App.maxUndo.
App.laserWaterBVH = false, default = false. If true, will try to speed up the laser-water ray-tracing using a BVH
App.lastVersion = v2.1.0
App.waterTracerLightness = 0.75, default = 0.75. Sets the lightness of the water tracers in relation to waterColor
App.chainDensityFactor = 1, default = 1
App.alwaysCalculateForces = true, default = true. If true, force calculations will done even when simulation is paused, provided there is any force visualization turned on at the moment
App.polytoolPreviewColor = [1, 0.5, 1, 0.4], default = [1, 0.5, 1, 0.4]
App.HQPolygons = false, default = false. Store polygon distance maps in 16-bit textures instead of 8-bit
App.scalePowMotorTorque = 4, default = 4. When scaling x times, this attribute will be scaled by x^this
App.laserEvents = true, default = true. Must be true to enable laser events
App.lineWidth = 3, default = 3
App.Background.fadeCloudsOnSimStop = true, default = true
App.Background.skyColor = [0.45, 0.55, 1, 1], default = [0.45, 0.55, 1, 1]
App.Background.drawClouds = true, default = true
App.Background.cloudOpacity = 0.6, default = 0.6
App.fadeScale = [0.95, 0.95], default = [0.95, 0.95]
App.minPointDist = 0.15, default = 0.15
App.metaCutoff = 0.5, default = 0.5
App.AddUndoPoint
App.drawBodyCenters = false, default = false
App.fadeAnglePickerTime = 0.5, default = 0.5. How long it takes for the angle picker to fade in
App.maxCogs = 128, default = 128. The maximum number of cogs on a gear
App.waterColor = [0.1, 0.1, 1, 0.7], default = [0.1, 0.1, 1, 0.7]
App.Grid.base = 4, default = 4
App.Grid.snap = true, default = true
App.Grid.opacity = 1, default = 1
App.Grid.grid = false, default = false
App.Grid.topness = 0.5, default = 0.5. The interpolation factor for drawing behind vs drawing infront of the objects. 0=all behind, 1=all in front.
App.Grid.numAxes = 2, default = 2
App.Grid.scale = 2, default = 2
App.DPI = 86, default = 86
App.tracerFuzziness = 0, default = 0. Increase this to make the edges of a traced line more fuzzy. Only works with shaders on.
App.moveToTrashOnOverwrite = true, default = true. If enabled, when you overwrite a file, the old will be moved to trash instead of deleted.
App.useLaserFuzzNoShaders = true, default = true. Set to false to use classic laser drawing when shaders are disabled
App.enableUndoMerge = true, default = true. If true, undo actions of same type will merge when done within 10 seconds of last move. Only for: drag, move, slider, texture, palette.
App.waterTracers = 0, default = 0. Some water particles will have subtle tracers to give the mater more texture. This parameter decides what fraction of the water particles should have such tracer. 5 is a good value. Set to 0 to turn off.
App.borderWidth = 0.03, default = 0.03. Unit: screen cm
App.drawParticleNeighbors = false, default = false
App.maxUndo = 15, default = 30
App.alwaysCalcContacts = false, default = false. Set to true to continuously calculate contacts every drawn frame (for debugging)
App.drawParticleCenters = false, default = false
App.scalePowThrusterForce = 3, default = 3. When scaling x times, this attribute will be scaled by x^this
App.maxSPHSpawn = 2000, default = 2000. Maximum number of water particles spawned from one "Liquify" command
App.timeUntilRealTool = 0.5, default = 0.5. How long a tool can be canceled by another touch
App.drawClipPlanes = false, default = false. Should the clip planes be drawn
App.scaleGravityField = false, default = false
App.updateInterval = 1, default = 1. The number of days between checking for updates. Only applies if "checkForUpdates" is true.
App.waterRefractiveIndex = 1.33, default = 1.33
App.forceVertexPolygonDrawing = false, default = false. Force drawing of polygons with triangles instead of distance maps
App.drawCollisions = false, default = false
App.maxPointDist = 0.5, default = 0.5
App.scalePowSpringStrength = 2, default = 2. When scaling x times, this attribute will be scaled by x^this
App.screenshotsWithAlpha = true, default = true. Set to true to save the screen shots and plots with the opacity channel intact.
Usefull if you set the sky color to transparent.
App.changeSimWhenVisualizing = true, default = true. If set, the simulation will change slightly when visualizing forces in order to show less jumpy force arrows
App.maxTracerLife = 1000, default = 1000. The number of samples saved by each tracer, unless its fade time demands more
App.laserSuperBoost = 1, default = 1. Multiply each laser:s light strength with this
App.Step_N
App.pointSize = 3, default = 3
App.scalePowMotorSpeed = 0, default = 0. When scaling x times, this attribute will be scaled by x^this
App.scalePowAttraction = 1, default = 1. When scaling x times, this attribute will be scaled by x^this
App.waterTracerSize = 0.015, default = 0.015
App.borderSelectedWidthFactor = 5, default = 5. Times larger
App.hideWelcomeScreen = true, default = false. If true, the welcome screen is not shown
App.autosaveEnable = true, default = true. Enables/disables automatically savings completely.
App.drawMapOBBs = false, default = false
App.fadeTranslate = [0, 0], default = [0, 0]
App.laserWidth = 0.2, default = 0.2. How wide is the laser in relation to the laser pointer
App.drawCables = false, default = false
App.iceColorMultiplier = [2, 2, 2, 1], default = [2, 2, 2, 1]. The color of ice, when freezing water, is the water color multiplied with this
App.tracerOverdraw = false, default = false. If true, a tracer crossing its own path will draw doubly there. If false the tracer will never draw on top of itself.
Having this true can make tracer path look weird at sharp turns.
Having this false looks bad with anti-aliasing (shaders) on.
App.drawScaleIndicator = true, default = true
App.laserBroadPhase = true, default = true. If true, will try to speed up the laser-geom ray-tracing using the sweep and prune broad-phase information
App.killerPlanes = true, default = true. Controls whether or not new scenes should have default killer planes added to them. When switching this on or off, the current scene WILL be affected.
App.maxPolygonBorderFactor = 0.7, default = 0.7. good values: 0.5-1.0
App.drawSelectionOBB = false, default = false
App.drawVelocityFactor = 0.02, default = 0.02
App.groundPlane = true, default = true. Controls whether or not new scenes should have a plane added to them.
App.rainbowSplitMult = 0.33333334, default = 0.33333334. When a laser is split up into a rainbow, multiply the resulting components with this.
App.laserResolution = 10, default = 10. Higher means better quality laser for finite light speed
App.maxBorderAreaSpecial = 0.4, default = 0.4. The maximum factor of the geometry area that can be occupied by the border of a selected of highlighted geometry
App.drawOBBs = false, default = false
System.WriteToFile. Append some text to a file - usage: WriteToFile("foo.txt", "some text"). Returns 'true' on success.
Tools.DragTool.drawStrength = false, default = false. Draw the force applied by the drag tool
Tools.DragTool.maxForce = +inf, default = +inf. Maximum force applied by drag tool
SPH.unilateral = true, default = true. Only apply separating forces, i.e. forces to counter too HIGH pressure. Only affects incompressible fluids.
Having this set to true prevents water to stick to objects. Having this false will sometimes cause explosions when a water particle has only one neighbor.
GUI.Skin.windowSnappedSpacing = 1, default = 1. Pixels. The distance between snapped windows
GUI.Skin.Borders.DragHoriz.texture = drag_horiz_wrapped_dotted, default = drag_horiz_wrapped_dotted
GUI.Skin.Borders.VertLine.texture = vert_line_wrapped, default = vert_line_wrapped
GUI.Skin.Borders.HorizLine.texture = horiz_line_wrapped, default = horiz_line_wrapped
GUI.Skin.Borders.DragVert.texture = drag_vert_wrapped_dotted, default = drag_vert_wrapped_dotted
GUI.Skin.sliderHeight = 12, default = 12. The height, in pixels, of sliders. Should be approximately the same as "smallIconSize". Used as inner height of SliderRange and SliderMarker borders.
GUI.Skin.smallIconSize = 16, default = 16. The size, in pixels, of small icons, such as those in the context menu and in front of check-boxes and radio-buttons. Should be approximately the same as "fontSize".
GUI.pixelSnapOffset = 0.1, default = 0.1. An offset for pixel snapping to prevent fluctuations for ties
Sim.airFrictionVersion = 3, default = 3. This controls the air resistance of objects.
If set to 0, the diameter of the object is estimated quickly using the OBB.
If set to 1, the true diameter will be used (slower, more precise). The force will be applied to the center of mass of the geometry.
If set to 2, the force will be applied to the center of the bounding box.
If set to 3, the force will be applied to a point that depends on the angle of attack (for polygons).
Sim.hingeAutoBend_unilateral = false, default = false. Only apply auto-bend-constraint on pulling forces
Sim.preApplyForces = true, default = true. Apply forces as velocity changes before starting solver. If false, forces are handled by the solver
Sim.rotFrictionLinear = 0.0314, default = 0.0314. Rotational damping. Only applies if air friction is turned on. The inertia of the object is irrelevant (unless legacyMode == 0).
Keys.bind. Example: Keys.bind("a", {App.Background.skyColor = [1,0,0,1]});


System

Resources.ListFonts. Lists the available fonts on the system. Takes a wildcard pattern filter as first argument. Example usage:
> Resources.ListFonts("*") // Lists all fonts
> Resources.ListFonts("ar*") // Lists all fonts files starting with "ar" (e.g. arial)
> Resources.ListFonts("monospace") // Lists all monospace fonts
> Resources.ListFonts("*", "The quick brown fox jumps over the lazy dog") // Lists all fonts that can display a given string
System.time
System.objectTotal
System.position = [32, 32], default = [-1234567, -1234567]
System.RecreateWindow
System.minFPS = 20, default = 20. Algodoo will slow down the simulation in an effort to get minimum of this FPS
System.WriteToFile. Append some text to a file - usage: WriteToFile("foo.txt", "some text"). Returns 'true' on success.
System.objectCurrent
System.maximized = true, default = false
System.maxFPSPlaying = 60, default = 60. When simulation is running, Algodoo will save on CPU by sleeping if the FPS gets higher than this.
System.antiAlias = 1, default = 1
System.exit
System.stencilDepth = 8, default = 8
System.regularScreenshots = 0, default = 0. If set to a positive value N, will take an automated screen shot every N:th simulation step
System.screenshot
System.depth = 32, default = 32
System.maxFPSPaused = 60, default = 60. When simulation is paused, Algodoo will save on CPU by sleeping if the FPS gets higher than this.
System.ReadWholeFile. Returns the contents of a file as a string. Returns null on fail.
System.fullscreen = false, default = false
System.zDepth = 24, default = 24
System.resolution = [1492, 861], default = [-1234567, -1234567]
Threading.numThreads = 1, default = 1. Should be the same as the number of cores on the system.
Input.touchScreenDetectionGoodCutoff = 30, default = 30. If set to a non-zero value, the system will try to automatically detect when the user is using a touch screen. Controls the number of "unexpected" mouse events needed before a switch.
Sim.directContactSolveChainsMassRatioLimit = 5, default = 5. A body contacting a chain must be this times heavier than the chain lump to be eligible for direct solve. A low number here can put much strain on the system, and even cause instabilities.
Sim.regularizeBounces = true, default = true. use regularization for bouncing contacts. Solves the problem with over-determined systems by relaxation, but dissipates energy.
Sim.direct_friction = false, default = false. Will attempt to solve the friction via the direct solver.
In practice, this means solving the system directly once using MLCP (without friction), then iteratively adopt a friction box based on the previous normal impulse.
At least two directSolveIters is required for this method.


math

math.asin
math.divide
math.posivate
math.e
math.boolnegate
math.or
math.tan
math.toFloat
math.max
math.sin
math.min
math.toInt
math.acos
math.HSV2RGB
math.pi
math.log10
math.vec.lenSq
math.vec.len
math.vec.distSq
math.vec.dist
math.cos
math.toString
math.toBool
math.pow
math.subtract
math.sum
math.comp.le
math.comp.ne
math.comp.g
math.comp.ge
math.comp.eq
math.comp.l
math.sqrt
math.and
math.log
math.atan2. atan2(y,x) returns the angle [-pi,+pi] of the vector [x,y]
math.negate
math.mod
math.HSL2RGB
math.addlist
math.RGB2HSL
math.add
math.atan
math.RGB2HSV
math.multiply
I make mainly games.
best games
best game engine
User avatar
FLO
 
Posts: 12
Joined: Thu Aug 18, 2016 5:11 pm
Location: germany

Re: scene, sim, app, system, math

Postby Kilinich » Wed Aug 30, 2017 10:39 am

Do you think we couldn't press tab by ourselves? :evil:
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: scene, sim, app, system, math

Postby FLO » Wed Aug 30, 2017 12:40 pm

I'm sorry :shock:. I will delete this post.
I make mainly games.
best games
best game engine
User avatar
FLO
 
Posts: 12
Joined: Thu Aug 18, 2016 5:11 pm
Location: germany

Re: scene, sim, app, system, math

Postby Kilinich » Thu Aug 31, 2017 9:45 am

FLO wrote:I'm sorry :shock:. I will delete this post.

No you will not :lol:
I could but I'm too lazy 8-)
Maybe someone, who don't know anything about build it thyme funcions find it helpful...
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest